Cartography Skill
Intent
Produce a reusable structural map that supports exploration, planning, and onboarding.
Trigger
Use this skill when the user needs:
- •module dependency orientation
- •ownership or boundary discovery
- •impact analysis before changes
Mapping Workflow
Step 1: Build top-level tree summary
Map the repository by major zones:
- •entrypoints (
cli,app,service,runtime) - •domain logic
- •adapters/integrations
- •test and tooling directories
Output:
text
TREE_SUMMARY
- zone: "<name>"
purpose: "<role>"
key_paths:
- <path>
Step 2: Extract dependency hotspots
Identify modules with:
- •high fan-in (many callers)
- •high fan-out (many dependencies)
- •boundary crossing responsibilities
Hotspot template:
text
DEPENDENCY_HOTSPOT - module: <path-or-symbol> - fan_in: <low|medium|high> - fan_out: <low|medium|high> - risk_reason: "<why this matters>"
Step 3: Infer ownership hints
Use naming, directory conventions, and test proximity to infer:
- •module ownership domain
- •shared utility vs feature-specific code
- •likely review stakeholders
Output:
text
OWNERSHIP_HINT - area: <path> - probable_owner_scope: "<team/domain>" - confidence: <low|medium|high>
Step 4: Highlight critical pathways
For target request, map at least one end-to-end path:
input -> transformation -> side effect/output
If multiple pathways exist, provide the primary one and mention alternates.
Step 5: Emit confidence and unknowns
text
MAP_CONFIDENCE - confidence: <low|medium|high> - unknowns: - "<missing linkage>" - "<missing ownership>"
Heuristics
- •Prioritize active code over deprecated/legacy folders.
- •Use test files to confirm intended module boundaries.
- •Prefer import graph signals over file size when ranking hotspots.
Stop Conditions
- •Repository lacks enough structure to infer boundaries.
- •Generated code dominates and source ownership is unclear.
- •Request scope spans external systems not present locally.
Anti-Patterns (never)
- •Dumping directory listings without interpretation.
- •Treating every module as equally important.
- •Ignoring dependency direction when naming hotspots.
- •Claiming ownership certainty without evidence.
Example
Input:
text
"Map the runtime-to-extension-to-tools flow and identify high-risk coupling points."
Expected output:
- •
TREE_SUMMARYof runtime, extensions, tools, tests. - •
DEPENDENCY_HOTSPOTlist for coupling points. - •
OWNERSHIP_HINTandMAP_CONFIDENCEwith unknowns.