Skip to content

ark

Code intelligence engine for AI coding agents.

Install

$brew install magicdrive/tap/ark

Install command taken from the project's README or registry entry. Always review code before running it.

Ark

Code intelligence engine for AI coding agents.

日本語 · Getting started · MCP tools · Resolution model · Architecture

Ark parses a repository, extracts its declarations and references, resolves what each reference points to, and serves the resulting graph to coding agents over the Model Context Protocol. An agent can ask who calls a function, what a change may affect, or which code it needs to read before editing — and get an answer that states how certain it is.

Ark is a single static binary. It analyzes Go, TypeScript, TSX, PHP, Terraform, Rust, JavaScript and Python without running any code from the repository.

Why Ark

An agent working in a large repository usually navigates by text search and by reading whole files. That has costs that grow with the repository:

  • Context is spent on irrelevant code. Finding one function means reading the files around every match.
  • Names are ambiguous. Save may be declared in five packages; a text match cannot tell which one a call reaches.
  • Relationships are guessed. A function with the same name in another package, or another language, looks like a caller.
  • Unknowns look like answers. "No other callers found" may mean there are none, or that the search could not see them.

Ark addresses these with structure and evidence:

Problem What Ark provides
Too much text Declarations, call relationships and token-budgeted context for one symbol, instead of whole files
Ambiguous names Every declaration has its own symbolId; ambiguous queries return the list of declarations, never a silent pick
Guessed relationships References resolved by each language's scoping rules: imports, packages, receivers, namespaces. Names never match across languages
Hidden unknowns Every answer carries a confidence level and counts what Ark saw but could not resolve

How it works

repository files
      │
      ▼
language providers   Tree-sitter parsing (HTML: x/net/html; CSS: CSS Syntax 3), one file at a time:
      │              declarations, references, imports, language evidence
      ▼
index builder        symbols with stable IDs, containment
      │
      ▼
resolver             evidence → candidates + confidence (exact / strong / candidate)
      │
      ▼
graph                edges only from a unique exact or strong resolution;
      │              everything else counted, never dropped
      ▼
context · impact · repository map · search
      │
      ▼
MCP server  ──────►  coding agent

The index is built on the first request and reused while the source files are unchanged; extraction results are cached on disk between sessions. Details: ARCHITECTURE.md, Operations.

Quick start

1. Install

brew install magicdrive/tap/ark

Or download a binary from Releases, or run go install github.com/magicdrive/ark@main (not @latest, which resolves to the legacy v1 line — see Getting started).

2. Connect your agent — in the repository root:

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Explore related