agentleFS
augments-labsaugments-labs/sdlc-skills/skills/common/mapping-the-codebase/SKILL.md

mapping-the-codebase

Skill1 starsChanged 4 months agoMITView on GitHub

Maps how a region of code fits together — its callers, owners, and boundaries — before it is changed. Use when code whose structure and callers have not been established for this task is about to be changed or debugged, or when asked how a change travels through the codebase. Skip only when a current boundary record covers the region and its inputs.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before you touch unfamiliar code, understand its shape.

    line 8
  2. Distinctive:

    Skip: only when a Step 3 boundary record for this region exists and is inside its freshness limit.

    line 13
  3. Distinctive:

    Before reading anything, write the intended change, how far it could reach, and why the boundary you picked holds that reach.

    line 19
  4. Distinctive:

    Start at the containing module and its neighbors: responsibilities, runtime entry points, callers, collaborators, data between them.

    line 27
  5. Distinctive:

    Use the domain's vocabulary, never "service / handler / util".

    line 34
  6. Very specific:

    Write the boundary record to .sdlc-skills/evidence/{{YYYY-MM-DD}}-{{topic}}/boundary-record.md unless the user names another path: what the …

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Mapping the Codebase

Before you touch unfamiliar code, understand its shape. The failure this prevents is editing a region by pattern-matching on syntax while missing how it actually fits together — who calls it, what it owns, where the boundaries are.

When to use

  • You're about to change, debug, or extend a part of the codebase you don't know well.
  • Skip only when a Step 3 boundary record for this region exists and is inside its freshness limit; one changed line can still alter a public, data, security, or release path.

Step 1: Set the boundary

  1. Before reading anything, write the intended change, how far it could reach, and why the boundary you picked holds that reach. Compatibility- sensitive change → never stop at direct callers.
  2. Pin the repository or working state and the identity of every external input the reading depends on. Write what makes the reading stale.

Step 2: Map

  1. Start at the containing module and its neighbors: responsibilities, runtime entry points, callers, collaborators, data between them.
  2. As risk warrants, trace: generated code and build inputs; persistent state and migrations; public contracts and consumers; configuration, deployment, operational paths; tests, CI, proof surfaces; ownership and change history. Per surface excluded from that list → an evidence-based reason.
  3. Use the domain's vocabulary, never "service / handler / util".
  4. Attach each conclusion to current files, symbols, searches, commands, or revisions. Separate observed from inferred. Mark stale or unavailable.

Step 3: State the boundaries

  1. Write the boundary record to .sdlc-skills/evidence/{{YYYY-MM-DD}}-{{topic}}/boundary-record.md unless the user names another path: what the region owns, what it delegates, where its seams are, which downstream obligations a change must preserve.
  2. Set a freshness limit. Past it, or a pinned input changed → revalidate affected claims before relying on them.
  3. Implementation finds a caller or surface the map never covered → stop and reorient. Never extend the map from memory.

Gotchas

  • A caller reached through configuration, reflection, a generated route, or a scheduler never appears in an import search, so a map built from imports draws a boundary that a runtime caller crosses.
  • A boundary record carries no signal of its own staleness; past its freshness limit it reads exactly like a current one.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.