agentleFS
kwiggenkwiggen/claude-code-plugin/skills/architecture-review/SKILL.md

architecture-review

Skill1 starsChanged 4 months agoMITView on GitHub

Review codebase architecture for deepening opportunities — modules where the interface is nearly as complex as the implementation. Uses depth-as-leverage model and the deletion test. Use when the codebase feels tangled, after a burst of fast development, or when asked to review architecture.

78 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-stories, story-done and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • lilangMaxSkill

    create-stories

    Break a single epic into implementable story files. Reads the epic, its GDD, governing ADRs, and control manifest. Each story embeds its GDD requirement TR-ID, ADR guidance, acceptance criteria, story type, and test evidence path. Run after /create-epics for each epic.

    Also in 11 projects that use this

  • lilangMaxSkill

    story-done

    End-of-story completion review. Reads the story file, verifies each acceptance criterion against the implementation, checks for GDD/ADR deviations, prompts code review, updates story status to Complete, and surfaces the next ready story from the sprint.

    Also in 11 projects that use this

  • +10 more from lilangMax

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 11 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 70 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use these terms exactly. Do not drift to synonyms.

    line 19
  2. Distinctive:

    If deleting it concentrates complexity into something better: the module was earning its keep.

    line 41
  3. Distinctive:

    If deleting it just relocates the same logic to callers: it was shallow.

    line 42
  4. Distinctive:

    When proposing a deepened module, classify its dependencies:

    line 67
  5. Distinctive:

    Do NOT propose interfaces or start coding.

    line 95
  6. Distinctive:

    If the deepening introduces a new domain concept, suggest adding it to CONTEXT.md

    line 100
  7. Distinctive:

    Only write code after the design conversation resolves.

    line 102
  8. Distinctive:

    After a burst of fast, agent-assisted development (entropy accumulates)

    line 106
  9. Distinctive:

    When a simple feature change requires touching 5+ files

    line 107
  10. Distinctive:

    When onboarding someone new and they can't find where things live

    line 108
  11. Distinctive:

    When the same bug pattern keeps appearing in different places

    line 109

“Common” is measured: kept by at least 6 in 10 of the 70 edited versions of this file we could read. “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

Architecture Review — Find Deepening Opportunities

Surface architectural friction and propose refactors that turn shallow modules into deep ones. A deep module has a small interface hiding a lot of behavior. A shallow module has an interface nearly as complex as its implementation — the abstraction isn't earning its keep.

Vocabulary

Use these terms exactly. Do not drift to synonyms.

TermDefinition
ModuleAnything with an interface + implementation: function, class, package, file, slice
InterfaceEverything a caller must know: types, invariants, error modes, ordering constraints, config
ImplementationThe code inside the module
DepthLeverage at the interface. Deep = small interface, lots of behavior. Shallow = interface nearly as complex as implementation
SeamWhere the interface lives; the point where behavior can be altered without editing the module's internals
AdapterA concrete thing that satisfies an interface at a seam
LeverageWhat callers get from depth — how much behavior they can exercise per unit of interface they must learn
LocalityWhat maintainers get from depth — change, bugs, and knowledge concentrated in one place

Do not use: "component" (too vague), "service" (implies network), "API" (overloaded), "boundary" (use "seam").

The Core Diagnostic: The Deletion Test

For any module you suspect is shallow, ask:

Would deleting this module concentrate complexity into a meaningful new abstraction, or just move the same code somewhere else?

  • If deleting it concentrates complexity into something better: the module was earning its keep. Leave it.
  • If deleting it just relocates the same logic to callers: it was shallow. Candidate for deepening or removal.

Before Starting

  1. Read CLAUDE.md and any existing architecture docs, ADRs, or CONTEXT.md
  2. Walk the codebase organically — don't start with a checklist. Read the code. Note friction. Where do things feel tangled? Where does a simple change require touching many files?
  3. Apply the deletion test to modules that feel off
  4. Check dependency patterns — are there modules that everything depends on? Modules that depend on everything?

What to Look For

Shallow Module Symptoms

  • Interface is a thin wrapper over the implementation (pass-through methods)
  • Callers need to understand the implementation to use the interface correctly
  • Changing the implementation always requires changing callers
  • The module name describes HOW it works, not WHAT it does

Depth Opportunities

  • Multiple callers doing the same multi-step sequence (logic wants to be pulled into a deeper module)
  • Error handling scattered across callers instead of concentrated in one place
  • Configuration or setup that every caller repeats
  • Knowledge that's spread across files instead of concentrated

Dependency Classification

When proposing a deepened module, classify its dependencies:

Dependency TypeTesting Approach
Pure computation (no I/O)Test directly, no mocking needed
Local stand-in available (PGLite, in-memory FS, test DB)Use the stand-in in tests
Network boundaryDefine a port at the seam, inject transport as an adapter

Output

Present findings as a numbered list of deepening opportunities, ranked by leverage (highest first).

For each opportunity:

### [N]. [Module or area name]

**Files:** `path/to/file.ts`, `path/to/other.ts`
**Problem:** [What's shallow and why — be specific]
**Deletion test:** [What happens if you delete it? Concentrates or relocates?]
**Proposed deepening:** [How to make the interface smaller or the behavior richer]
**Leverage gain:** [What callers or maintainers get from this change]
**Risk:** [What could go wrong, dependencies that might break]
**Recommendation strength:** Strong / Moderate / Worth discussing

After Presenting

Do NOT propose interfaces or start coding. Present the candidates and ask which to explore. When the user picks one:

  1. Enter a grilling conversation about the interface design
  2. Walk the decision tree: What should the interface expose? What should it hide? What are the seams?
  3. If the deepening introduces a new domain concept, suggest adding it to CONTEXT.md

Only write code after the design conversation resolves.

When to Run This

  • After a burst of fast, agent-assisted development (entropy accumulates)
  • When a simple feature change requires touching 5+ files
  • When onboarding someone new and they can't find where things live
  • When the same bug pattern keeps appearing in different places
  • Periodically (every few weeks) on active codebases

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.