Anvien Guide
Quick reference for all Anvien MCP tools, resources, and the knowledge graph schema.
Always Start Here
For any task involving code understanding, debugging, impact analysis, or refactoring:
- Read
anvien://repo/{name}/context — codebase overview + check index freshness
- Match your task to a skill below and read that skill file
- Follow the skill's workflow and checklist
If step 1 warns the index is stale, run anvien analyze in the terminal first.
Skills
| Task |
Skill to read |
| Understand architecture / "How does X work?" |
anvien-exploring |
| Blast radius / "What breaks if I change X?" |
anvien-impact-analysis |
| Trace bugs / "Why is X failing?" |
anvien-debugging |
| Rename / extract / split / refactor |
anvien-refactoring |
| Tools, resources, schema reference |
anvien-guide (this file) |
| Index, status, clean, wiki CLI commands |
anvien-cli |
Tools Reference
| Tool |
What it gives you |
query |
Process-grouped code intelligence — execution flows related to a concept |
context |
360-degree symbol view — categorized refs, processes it participates in |
impact |
Symbol blast radius — what breaks at depth 1/2/3 with confidence |
detect_changes |
Git-diff impact — what do your current changes affect |
rename |
Multi-file coordinated rename with confidence-tagged edits |
cypher |
Raw graph queries (read anvien://repo/{name}/schema first) |
list_repos |
Discover indexed repos |
Resources Reference
Lightweight reads (~100-500 tokens) for navigation:
| Resource |
Content |
anvien://repo/{name}/context |
Stats, staleness check |
anvien://repo/{name}/clusters |
All functional areas with cohesion scores |
anvien://repo/{name}/cluster/{clusterName} |
Area members |
anvien://repo/{name}/processes |
All execution flows |
anvien://repo/{name}/process/{processName} |
Step-by-step trace |
anvien://repo/{name}/schema |
Graph schema for Cypher |
Graph Schema
Nodes: File, Function, Class, Interface, Method, Community, Process
Edges (via CodeRelation.type): CALLS, IMPORTS, EXTENDS, IMPLEMENTS, DEFINES, MEMBER_OF, STEP_IN_PROCESS
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "myFunc"})
RETURN caller.name, caller.filePath
1---2name: anvien-guide3description: Use when the user asks about Anvien itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or workflow reference. Examples: "What Anvien tools are available?", "How do I use Anvien?"4---56# Anvien Guide78Quick reference for all Anvien MCP tools, resources, and the knowledge graph schema.910## Always Start Here1112For any task involving code understanding, debugging, impact analysis, or refactoring:13141. **Read `anvien://repo/{name}/context`** — codebase overview + check index freshness152. **Match your task to a skill below** and **read that skill file**163. **Follow the skill's workflow and checklist**1718> If step 1 warns the index is stale, run `anvien analyze` in the terminal first.1920## Skills2122| Task | Skill to read |23| -------------------------------------------- | ------------------- |24| Understand architecture / "How does X work?" | `anvien-exploring` |25| Blast radius / "What breaks if I change X?" | `anvien-impact-analysis` |26| Trace bugs / "Why is X failing?" | `anvien-debugging` |27| Rename / extract / split / refactor | `anvien-refactoring` |28| Tools, resources, schema reference | `anvien-guide` (this file) |29| Index, status, clean, wiki CLI commands | `anvien-cli` |3031## Tools Reference3233| Tool | What it gives you |34| ---------------- | ------------------------------------------------------------------------ |35| `query` | Process-grouped code intelligence — execution flows related to a concept |36| `context` | 360-degree symbol view — categorized refs, processes it participates in |37| `impact` | Symbol blast radius — what breaks at depth 1/2/3 with confidence |38| `detect_changes` | Git-diff impact — what do your current changes affect |39| `rename` | Multi-file coordinated rename with confidence-tagged edits |40| `cypher` | Raw graph queries (read `anvien://repo/{name}/schema` first) |41| `list_repos` | Discover indexed repos |4243## Resources Reference4445Lightweight reads (~100-500 tokens) for navigation:4647| Resource | Content |48| ---------------------------------------------- | ----------------------------------------- |49| `anvien://repo/{name}/context` | Stats, staleness check |50| `anvien://repo/{name}/clusters` | All functional areas with cohesion scores |51| `anvien://repo/{name}/cluster/{clusterName}` | Area members |52| `anvien://repo/{name}/processes` | All execution flows |53| `anvien://repo/{name}/process/{processName}` | Step-by-step trace |54| `anvien://repo/{name}/schema` | Graph schema for Cypher |5556## Graph Schema5758**Nodes:** File, Function, Class, Interface, Method, Community, Process59**Edges (via CodeRelation.type):** CALLS, IMPORTS, EXTENDS, IMPLEMENTS, DEFINES, MEMBER_OF, STEP_IN_PROCESS6061```cypher62MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "myFunc"})63RETURN caller.name, caller.filePath64```