A pi coding agent extension that wires codegraph as an MCP sidecar and injects structured usage instructions into the system prompt.
When a project has a .codegraph/ index, this extension:
- Spawns
codegraph serve --mcpas a sidecar process - Registers all codegraph tools (
codegraph_search,codegraph_callers,codegraph_callees,codegraph_impact,codegraph_node,codegraph_context,codegraph_explore,codegraph_files,codegraph_status) directly in the session - Injects a
## CodeGraphsection into the base system prompt viaAPPEND_SYSTEM.mdso the instructions are present from session startup — not just on the first agent turn
If the project has no .codegraph/ directory the extension is a no-op.
codegraphCLI must be on$PATH- A
.codegraph/index must exist in the project root (runcodegraph init -ito build one)
/add @sean_pedersen/pi-codegraph
/add https://github.com/SeanPedersen/pi-codegraph
codegraph init -i # initial index buildThe file watcher keeps the index current while pi is running.