From grimoire
Verifies and refines cartography files documenting code flows against the actual codebase, filling gaps, fixing inaccuracies, adding cross-references, and introducing conditional sections.
npx claudepluginhub joranhonig/grimoireThis skill uses the workspace's default tool permissions.
Verify and refine an existing cartography file against the actual codebase. Fill gaps, fix
Explores and documents code flows by tracing entry points, components, and sequences, then creates cartography files for quick context rebuilding on future visits.
Maintains persistent codebase maps (map.md, conventions.md, modules/) to record exploration learnings, consult structure before tasks, and load module context for subagents.
Orchestrates parallel subagents to map any codebase, creating docs/CODEBASE_MAP.md with architecture, file roles, dependencies, and navigation. Updates incrementally via git or scans.
Share bugs, ideas, or general feedback.
Verify and refine an existing cartography file against the actual codebase. Fill gaps, fix inaccuracies, add cross-references, and introduce conditional sections where needed.
First drafts are starting points. A cartography file created during initial exploration captures what was found, not everything that exists. Code changes, flows evolve, and initial exploration misses things. Review is how cartography files become reliable navigation maps that agents can trust.
When this skill is activated, create a todo list from the following steps. Mark each task in_progress before starting it and completed when done.
- [ ] 1. Select flow — run index, identify target cartography file
- [ ] 2. Verify against codebase — spawn subagents to check each section independently
- [ ] 3. Extend missing pieces — add what subagents found missing
- [ ] 4. Cross-reference related flows — compare with index, add reciprocal related links
- [ ] 5. Add conditional sections — separate independent sub-flows if file is too large
- [ ] 6. Update file and index — write changes, update date, re-run index
Run the indexing script to list available flows:
bash skills/cartography/scripts/index-cartography.sh grimoire/cartography/
If the user specified a flow, match it against the index. If not, present the list and ask which flow to review.
Read the target cartography file in full.
Spawn subagents to independently verify each section of the cartography file against the actual codebase. Each subagent should check one area:
Entry points subagent: For each listed entry point, verify:
Key components subagent: For each listed component, verify:
Flow sequence subagent: Trace the documented sequence through the code:
Security notes subagent: Review the security observations:
Collect all subagent results before proceeding.
Based on subagent findings, update the cartography file:
Maintain the format defined in the cartography skill's
references/cartography-format.md. Keep entries as pointers — don't add code explanations.
Compare the current flow against all other flows in the index:
related field in frontmatter[[cartography/...]] links in the Related Flows sectionRun the overlap detection script to check for significant duplication:
bash skills/review-cartography/scripts/find-overlaps.sh grimoire/cartography/
If significant overlap is detected (>40% shared components between two flows), note this to
the user and suggest [[gc-cartography]] for potential merging. Consult
references/overlap-detection.md for details on how overlap is calculated and when merging
is appropriate.
If the cartography file body exceeds ~80 lines, look for opportunities to separate independent sub-flows into conditional sections:
## Conditional: [Sub-flow Name] sections<!-- condition: load only when [topic] --> commentThe condition comment should describe when an agent should load this section. Be specific enough that an agent can match it against a user's question.
If the file is already lean (<80 lines body), skip this step.
Write all changes to the cartography file:
updated field in frontmatter to today's datecreated dateValidate the updated file:
bash skills/review-cartography/scripts/validate-cartography.sh grimoire/cartography/<flow-slug>.md
Re-run the indexing script:
bash skills/cartography/scripts/index-cartography.sh grimoire/cartography/
Present to the user:
related reference should go both ways. If you add flow B to
flow A's related list, also add flow A to flow B's.