agentleFS
stjarnstromstjarnstrom/spec-system/skills/architecture/SKILL.md

architecture

Skill0 starsChanged 45 days agoMITView on GitHub

Find where code is hard to change or test and deepen it: survey hot spots, rank deepening candidates, design the chosen interface twice, and land it as a plan. Use when the user wants to improve architecture, reduce coupling, make code more testable or easier for agents to navigate, design a module's interface, or when a bug had no correct seam to test at.

136 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use intelligent-routing, bash-linux 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.
  • SKB3002Skill

    intelligent-routing

    Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.

    Also in 6 projects that use this

  • xenitV1Skill

    bash-linux

    Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

    Also in 8 projects that use this

  • xenitV1Skill

    red-team-tactics

    Red team tactics principles based on MITRE ATT&CK. Attack phases, detection evasion, reporting.

    Also in 8 projects that use this

  • SKB3002Skill

    nextjs-react-expert

    React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.

    Also in 3 projects that use this

  • +8 more from xenitV1

The file

Files
SKILL.md

Make modules deeper: more behaviour behind a smaller interface. The terms used here — module, interface, depth, seam, adapter, leverage, locality — are defined in vocabulary.md; use them exactly.

A module seam is where behaviour can change without editing that place. A registry seam is a path in specs/registry.yaml that no capability owns. They are different objects; say which one you mean.

Procedure

  1. Scope before scanning. The user's direction, if they gave one. Otherwise the hot spots: files that change most often (git log --since=6.months --name-only --format= | sort | uniq -c | sort -rn | head -30) and the clusters python3 ${CLAUDE_PLUGIN_ROOT}/substrate/cochange.py . reports. Read the glossary, the ADRs, and — with a spec layer — the registry, so capability boundaries are known before module ones.
  2. Survey for friction. Send general-purpose subagents, told to read and not edit, to walk the scoped area and report, with file:line, where understanding one behaviour means bouncing between many small modules; modules that fail the deletion test; logic extracted for testability whose real bugs hide in how it is called; details leaking across a seam; behaviour that can only be tested past its interface; code with no correct seam for a regression test.
  3. Rank candidates. For each: the files, the friction, the proposed deepening, what it buys in locality and leverage, the dependency category and so the test strategy (vocabulary.md), and a strength — Strong, Worth exploring, or Speculative. Flag any that contradict an ADR, and say only when the friction justifies reopening it. End with one top recommendation. Say so plainly when nothing is worth changing. Ask which candidate to take — one per session.
  4. Design it twice. For the chosen candidate, send three or four subagents in parallel, each designing the interface under a different constraint from vocabulary.md — the smallest interface, the common caller made trivial, flexibility, ports and adapters. Each returns the interface with its invariants and error modes, a usage example, what it hides, and its test strategy. Compare them on depth, locality, and seam placement, and recommend one — a strong read, not a menu. Hybrids are fine.
  5. Land it through the spec layer.

    • A deepening that preserves behaviour changes no statement: write it as a standalone plan in docs/changes/active/ (capability: none), tasks sliced as spec-amend slices them, each naming the tests that must stay green. New tests at the deepened interface replace the old shallow ones rather than layering on them — but a test named in a verified-by: is re-pointed to its replacement in the same task, never simply deleted.
    • A capability boundary in the wrong place is registry work: spec-system:spec-boundaries proposes the correction.
    • A structural rule worth keeping — no imports across this boundary, this vocabulary stays inside — becomes an invariant with a checked-by command, confirmed to go red on a planted violation and green again after.
    • A candidate the user rejects for a reason that will hold becomes an ADR (FORMAT.md's three gates), so the next survey does not propose it again.

    The plan can then run unattended through spec-system:spec-run.

Rules

  • Scope first; a whole-repo scan finds everything and prioritises nothing.
  • Interfaces are proposed in step 4, not before; step 3 names problems.
  • New module names that stick go into the glossary.

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.