Skip to content

roeimichael/cartographer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

cartographer

Cartographer

CI License: MIT Claude Code

Map, audit, and refactor a 1000-file codebase the way a senior engineer would โ€” but with 17 specialist reviewers running in parallel.

A Claude Code plugin that builds a dependency + call graph, segments the repo by integration / domain, dispatches per-segment specialist reviewers in waves of โ‰ค5, synthesizes findings into a P0โ€“P3 refactor backlog, and optionally applies surgical fixes behind a confirmation gate.

Install

Inside Claude Code:

/plugin install cartographer

Cartographer is published in the official Claude Code plugin marketplace โ€” no marketplace add step needed.

Use

/cartographer:audit              # full pipeline โ€” graph โ†’ segments โ†’ review โ†’ backlog โ†’ fixes
/cartographer:map                # graph + diagrams only, no review (cheap, no LLM cost)

Or just say it in plain English โ€” the skill triggers on phrases like "audit this project", "map out my codebase", "find duplication across the repo".

The plugin walks you through scope โ†’ clarifying questions โ†’ segment confirmation โ†’ cost estimate โ†’ review โ†’ backlog โ†’ fixes, asking before any expensive step.

What you get

  • Dependency + call graph + class hierarchy (Python AST-precise, JS/TS/Go regex-best-effort)
  • Pipeline traces from entry points (API handlers, main(), workers) โ€” one Mermaid flowchart per pipeline
  • OpenAPI extraction + per-endpoint deep call trace with cross-endpoint reuse map
  • 17 specialist reviewers: auth-security, supabase, db-schema, telegram-bot, ai-pipeline, backend-api, data-pipeline, queue-worker, webhook-integration, frontend-ui, frontend-designer, mobile, cli-tool, test-suite, file-storage, realtime-streaming, devops-config, caching, generalist
  • Cross-cutting synthesis โ€” duplication, naming drift, centralization candidates
  • Refactor backlog ranked P0โ€“P3
  • Fix application (opt-in, behind a gate) โ€” branch isolation, surgical edits, test runner

Pipeline

Phase 0    Scope & opt-in                            (interactive)
Phase 1    Build dep + call + class graph            (script)
Phase 1.5  Trace pipelines from entry points         (script)
Phase 1.6  OpenAPI + per-endpoint deep call trace    (script)
Phase 2    Detect & label functional segments        (script)
Phase 3    Plan review waves                         (script)
Phase 3.5  Match a specialist to each segment        (script)
Phase 4    Dispatch review subagents (โ‰ค5 per wave)   (Claude)
Phase 5    Synthesize cross-cutting findings         (script + Claude)
Phase 6    Final report + refactor backlog           (Claude)
Phase 7    Apply backlog fixes (opt-in)              (Claude + script)

Phases 1 โ†’ 3.5 are deterministic Python (~30s for 300 files, no LLM cost). Only Phase 4 and 7 spend subagent invocations. A 1000-file repo with 20 segments costs ~20 subagent calls, not 1000 file reads.

Run scripted phases standalone (no Claude Code)

For CI or to just get the diagrams:

pip install pathspec networkx rapidfuzz
bash run_pipeline.sh /path/to/your/repo            # writes to <repo>/.cartographer/
bash run_pipeline.sh /path/to/your/repo --readonly # writes to ~/.cartographer/<hash>/

Languages

  • Python โ€” AST-precise (full call graph + class hierarchy with bases/methods/fields)
  • JavaScript / TypeScript โ€” regex-based, best-effort (TS path aliases resolved)
  • Go โ€” regex-based, best-effort

Tree-sitter for non-Python is on the roadmap.

License

MIT โ€” see LICENSE.

Contributing

PRs welcome. Open an issue first for non-trivial changes โ€” the issue templates cover bug reports and feature requests. New specialist reviewers are the easiest contribution: drop a markdown file under agents/ with YAML frontmatter and the matcher auto-discovers it.

About

๐Ÿ—บ๏ธ Claude Code plugin: maps, audits and refactors codebases with parallel specialist reviewers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors