Strategic navigation of large, unfamiliar codebases. Use this skill whenever you need to understand an unfamiliar codebase, find where to make a change in a large project, trace how a feature works end-to-end, plan a migration or large refactor, or map system architecture. Also use it when you're lost in a big repo and don't know where to start, or when a user asks you to work on a codebase you haven't seen before.
Navigate large, unfamiliar codebases efficiently without trying to understand everything at once.
What do you need to do?
│
├── Make a specific change ──────────► "Logic Bubble" Isolation (#1)
│ (fix a bug, add a feature)
│
├── Understand the architecture ─────► Boundary & Registration Tracing (#2)
│ (how does this system work?)
│
├── Add something similar to ────────► Structural Pattern Matching (#3)
│ what already exists
│
└── Plan a migration or map ─────────► Metadata & Module Auditing (#4)
the full dependency graph
Use when: You need to make a targeted change (fix a bug, add a feature) and don't need to understand the whole system.
Find the Entry Point — where does data or a command enter the flow you care about?
grep_search for API endpoints, function names, or error messages from the bug report.Find the Exit Point — where does the result get output?
Draw the boundary — everything between entry and exit is your "bubble." Ignore everything outside it.
view_file_outline to skim files and identify relevant functions without reading everything.Make your change within the bubble. Test at the entry and exit points.
Use when: You need to understand the high-level architecture — how modules connect, what the extension points are, how things get wired together.
Find the "Glue" code — large systems use registration patterns, not direct calls.
Register, Factory, Provider, Manager, Plugin, Module, Handler, Middleware.grep_search with patterns like register, factory, createModule, addPlugin.Identify the Contract — find the interface or abstract class that modules must implement.
view_code_item to inspect the base class or interface.Map the Lifecycle — trace when modules are loaded vs. initialized.
init, setup, bootstrap, configure.Document what you find using the Architecture Discovery Report template below.
Use when: You need to add something similar to what already exists (new endpoint, new command, new module).
Find the closest existing example — search for a feature similar to what you're building.
find_by_name and grep_search to locate similar modules, handlers, or components.Analyze its registration — how does the existing feature register itself with the system?
Copy the structure — duplicate the existing feature's files.
Swap the internal logic — replace the business logic while keeping the registration boilerplate identical.
Verify registration — confirm the new module is picked up by the system the same way the original was.
Use when: Planning a migration, mapping the full dependency graph, or understanding which modules can be changed safely.
Start with build configuration — treat package.json, Cargo.toml, build.gradle, CMakeLists.txt, etc. as your schematic.
find_by_name to locate all build/config files.Classify modules:
grep_search to trace imports/dependencies between modules.Start from the leaves — migrate or refactor leaf modules first, working inward toward the core.
Map side effects — identify where code touches databases, APIs, file systems, or external services. These are your risk boundaries.
Fill this out when first analyzing a new codebase.
# Architecture Discovery Report: [Project Name]
## 1. System Core
- **Core Module Location:** [Path]
- **Primary Responsibility:** [e.g., Data routing, Engine kernel]
- **Evidence:** [List modules depending on this Core]
## 2. Registration Contract
- **Registration Manager:** [e.g., ModuleManager.cpp, registry.py]
- **Base Interface/Class:** [The class business logic must inherit from]
- **Required Boilerplate:**
- [ ] Method: [Name]
- [ ] Registration call: [Example]
## 3. Dependency Hierarchy
- **Leaf Modules (safe to change first):** [Modules with no incoming deps]
- **Core Modules (change last):** [Modules everything depends on]
## 4. Side-Effect Boundaries
- **I/O & Persistence:** [Filesystem, Database classes]
- **Network/API Layer:** [Socket handlers, REST clients]
- **External Services:** [Third-party APIs, message queues]
## 5. Smallest Verification Test
- **Test Location:** [File path]
- **Proposed Change:** [e.g., Change a log string]
- **How to verify:** [How to see the change in the live app]