Works with Pi natively, and any other agent harness over MCP · v0.25.0

Understand an unfamiliar codebase. Get a spec you can rebuild from.

CodeCartographer turns a repository into layered architecture, behavioral contracts, defect findings, and a language-agnostic reimplementation spec — with each phase validated before the next one runs, so nothing is built on a hallucinated finding.

Pi extension MCP server Drop-in template MIT licensed Human-gated synthesis
The dashboard

Every run writes a self-contained report.

A single HTML file in .codecarto/dashboard.html — no external assets, no network calls. Phase status, per-phase token and tool-use telemetry, open questions, and blockers, rendered straight from the workspace on disk.

CodeCartographer's dashboard after running its full deep-audit pipeline on its own repository: 7/7 phases complete, 50M tokens and 618 tool uses across 77 minutes, seven open questions and twelve post-pipeline items routed, no blocking artifact gaps.
What it is

Structured artifacts, three delivery surfaces, one repeatable workflow.

Use the Pi extension for the best UX, the MCP server for other coding agents, or the drop-in template when you want a zero-runtime evaluation. Each phase builds on the last.

Process

Progressive distillation.

Raw source becomes an architecture map, then contracts, protocols, and defects, then a porting bundle and reimplementation spec. Each artifact validates before the next phase uses it.

Evidence

Confidence stays visible.

Findings are marked as observed fact, strong inference, portability hazard, external-behavior claim, or open question — and an unsettled level can never carry a settled fix action. You know what is certain and what is a guess.

Continuity

Pick up where you left off.

The filesystem—not the conversation—is durable memory. A fresh LLM session reads the status and findings, then resumes without depending on compacted chat history.

Synthesis

Specs become a project plan.

Versioned library entries are proposed against a vision, explicitly confirmed by a human, merged with conflicts intact, and transformed into work packages with a decision-level provenance ledger.

Reconnaissance

Scout cheap, verify expensive.

Broad-Side fires six analysis lenses at any git repository as asynchronous batch jobs at roughly half of synchronous pricing. The output is unverified leads that tell the interactive pipeline where to spend attention — never evidence on its own.

What it produces

Instead of one summary blob, a bundle different people can actually use.

Architecture map

Layers, dependency direction, public surfaces, runtime lifecycle, concurrency model.

Defect report

Multi-pass scan for logic errors, security issues, concurrency bugs, API violations.

Behavioral contracts

Feature-by-feature behavior with defaults, error handling, and acceptance tests.

Protocols and state

Event flows, state machines, persistence formats, compatibility hazards.

Porting bundle

Synthesis layer ranking what matters, what is risky, what needs special treatment in a rewrite.

Reimplementation spec

Language-agnostic build plan with modules, acceptance scenarios, and known unknowns.

Evidence-backed project plan

Confirmed specifications become architecture, work packages, acceptance gates, conflict dispositions, and a decision-level provenance ledger.

Scouting report

Broad-Side executive synthesis plus a P0–P3 triage work order — unverified batch-scan leads routed to the phases that confirm or dismiss them.

Pipeline variants

Scale the depth to the job.

The default run is a 7-phase full analysis with a split defect scan. Scale back when you only need orientation, behavior recovery, or defect hunting — or lead with a Broad-Side scout brief when the repository is too large to skim.

7 phases

Full with deep audit

The default. Two-pass defect scan with contracts/protocols context between passes. Complete reimplementation readiness.

6 phases

Full with audit

Single defect scan. Cheaper than the deep variant when defects are mostly mechanical.

5 phases

Full

Porting and reimplementation without any defect scan. Best when the rewrite matters more than the audit.

2 phases

Defect scan

Architecture map plus multi-pass defect audit. Maintenance triage without porting plans.

3 phases

Lite

Architecture, contracts, protocols. The fastest option that still leaves durable product knowledge.

1 phase

Architecture only

Quick structural overview. Low-cost first pass to orient yourself before committing to deeper analysis.

8 phases

Scout first

The deep audit behind a Broad-Side scout brief. A completed batch reconnaissance run is distilled into leads each phase must confirm, dismiss, or carry forward.

How to start

Copy one folder, say one sentence.

Fastest path: install the Pi extension or copy .codecarto/ into your repository. The workflow reads the status file, picks up the next phase, and starts writing structured findings.

Read the installation guide
# Copy the template into your repo
cp -r /path/to/CodeCartographer/.codecarto /path/to/your-repo/

# Point any LLM at the guide
Read .codecarto/GUIDE.md and begin the analysis.
Compatible environments

Works anywhere an LLM can read and write files.

Built as a Pi extension with slash commands, widgets, and tool gating. Also ships as an MCP server. The core template stays dependency-free for any file-aware agent.

Pi extension

Install the package and use /codecarto-init, /codecarto-next, /codecarto-broadside, /codecarto-status, /codecarto-vision, /codecarto-switch-pipeline, and more — 20 commands in all, including /codecarto-guide and /codecarto-amend. Phase sub-agents run in parallel widgets with live token tracking.

MCP server

22 tools for workflow control, library operations, and Broad-Side batch reconnaissance. Wire them into Claude Code, Claude Desktop, or any MCP-compatible host. The host owns phase sessions and compaction; CodeCartographer supplies byte-identical prompts and validation. Copy-paste setup for Claude Code, Cursor, Codex, and opencode →

Drop-in template

Copy .codecarto/ into any repo. Works in OpenCode, Cursor, Windsurf, Aider, and any IDE copilot with file read/write access.

Start understanding codebases with a process instead of a lucky prompt.

Tour the pipeline variants, read the installation docs, or download the repository and drop it into your next project.

Tour the pipeline Read the docs View on GitHub