Skip to content
back to projects
2026·shipped·Forward Deployed Engineer

The Brownfield Cartographer: Codebase Intelligence

A four-agent system that ingests a GitHub repo and produces CODEBASE.md, day-one onboarding briefs, semantic indices, and lineage graphs.

10 Academy TRP · 1-week brief
Pythontree-sitterLangGraphLLM

Architecture

Codebase Intelligence
CODEBASE.md, onboarding briefs, lineage graphs
↓ calls out to
Surveyor
tree-sitter structure map
Hydrologist
Data lineage
Semanticist
LLM purpose analysis
Archivist
Keeps docs current

Highlights

  • Surveyor uses tree-sitter to map the codebase structurally before any semantic reasoning.
  • Hydrologist traces data lineage across services so the docs reflect real flow, not aspirational architecture.
  • Archivist watches the repo and keeps the generated context current on push.

Why “brownfield”

Greenfield onboarding is easy: everyone can read a fresh README. The hard case is a five-year-old service where the README was accurate three rewrites ago. The Cartographer is built for that case, looking at what the code actually does, not what someone said it did in a wiki.

The four agents

  • Surveyor (tree-sitter, deterministic): maps modules, exports, and call graphs.
  • Hydrologist (data lineage): traces data flow across services.
  • Semanticist (LLM): produces purpose-level analysis grounded in Surveyor and Hydrologist output.
  • Archivist: re-runs the pipeline on push so the generated CODEBASE.md never drifts.

Output

A CODEBASE.md written for someone joining the team, a day-one brief tailored to a specific role, a semantic index for code search, and a lineage graph you can query.