Tools · Code intelligence

Code intelligence tools

The toolkit for asking concrete code questions — what's the shape of this repo, where is symbol X, who imports file Y, what AST patterns match, what's actually on disk right now, and what changed-file impact the agent should verify next.

repo_map read

Token-budgeted aider-style outline of ranked files and key symbols.

When to use it

Onboarding the agent to an unfamiliar repo. Returns a high-signal map at a fixed token budget instead of a directory listing.

Input

{ "budgetTokens": 4000 }

ast_find_pattern read

Run ast-grep structural search over fresh indexed JS/TS/JSX/TSX files.

When to use it

When you need real call sites, not text matches. Catches defaulted exports, dynamic imports, and patterns grep can't see. In TSX, object-literal or JSX-ambiguous patterns are auto-anchored when needed, so { ssr: false } can still match as an expression-shaped pattern.

Input

{
  "pattern":   "supabase.from($TABLE)",
  "languages": ["ts", "tsx"],
  "pathGlob":  "app/**/*.tsx",
  "maxMatches": 200
}

symbols_of read

List indexed symbols declared in a file.

When to use it

Quick way to learn what a file exposes without re-reading the file.

imports_impact read

Trace indexed files that depend on a file.

When to use it

Before any rename or breaking change. Returns the import graph of dependents — including barrel re-exports.

Input

{ "filePath": "lib/users/queries.ts", "limit": 200 }

See How to refactor safely for the full workflow.

reef_diff_impact read

Changed-file impact composer for the current working tree.

When to use it

After edits and before final diagnostics. It combines changed files, indexed import edges, related findings, and conventions so the agent can see which callers or rules may need another look.

Input

{ "filePaths": ["lib/users/queries.ts", "lib/users/index.ts"] }

imports_hotspots read

Most widely-imported files in the project.

When to use it

"Where does the most damage start?" — refactoring centrality.

imports_cycles read

Detect circular imports across the indexed module graph.

exports_of read

List exports surfaced by a file. Useful as a preflight before editing the file's public surface.

imports_deps read

What this file imports, and from where. Inverse of imports_impact.