agentleFS
AbdurRafay2004AbdurRafay2004/handoff/skills/architecture/SKILL.md

architecture

Skill4 starsChanged 5 months agoMITView on GitHub

Scan the codebase for architectural friction and propose deepening opportunities as candidate cards, then interrogate the chosen one into a decision. Two entry points — proactive, when the user asks "improve the architecture" or "why is this codebase painful to work in"; reactive, when the debug skill's "3+ failed fixes = architectural problem" rule hands off here. Inherently T2/T3; the outcome is a decision plus a plan.

82 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use deployment-procedures, behavioral-modes 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.
  • xfstudioSkill

    deployment-procedures

    Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.

    Also in 5 projects that use this

  • xfstudioSkill

    behavioral-modes

    AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.

    Also in 4 projects that use this

  • tiendatworkSkill

    2d-games

    2D game development principles. Sprites, tilemaps, physics, camera.

    Also in 3 projects that use this

  • tiendatworkSkill

    3d-games

    3D game development principles. Rendering, shaders, physics, cameras.

    Also in 3 projects that use this

  • CES-LtdSkill

    oss-pr

    Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

    Also in 3 projects that use this

  • CES-LtdSkill

    pr-automation

    PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".

    Also in 3 projects that use this

  • +1 more from xfstudio
  • +5 more from tiendatwork

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 74 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the design skill's glossary exactly — module, interface, depth,

    line 25
  2. Very specific:

    Read the project's domain glossary and context notes in .handoff/context/ and any ADRs in docs/adr/ before scanning.

    line 28
  3. Distinctive:

    ADR conflicts: if a candidate contradicts an existing ADR, surface it *only* when the friction is real enough to warrant revisiting the …

    line 82
  4. Distinctive:

    Do NOT propose interfaces yet.

    line 90
  5. Distinctive:

    Only offer when a future explorer would actually need the reason.

    line 109

“Common” is measured: kept by at least 6 in 10 of the 74 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

Part of the Plan/Build phases — see the workflow skill for tiers and sequencing.

Surface architectural friction and propose deepening opportunities — refactors that turn shallow modules into deep ones. The aim is leverage, locality, and testability. This is inherently T2/T3 work: the outcome is a decision and a plan, executed via the plan skill — never an immediate rewrite.

Two entry points

  1. Proactive — the user asks to improve the architecture, or asks why this codebase is painful to change, navigate, or test.
  2. Reactive — the debug skill hands off here under its rule that 3+ failed fixes on the same bug signals an architectural problem. Start the friction scan in the neighbourhood of the failed fixes.

Vocabulary and prior decisions

  • Use the design skill's glossary exactly — module, interface, depth, seam, leverage, locality — in every suggestion. Don't drift into "component," "service," "API," or "boundary."
  • Read the project's domain glossary and context notes in .handoff/context/ and any ADRs in docs/adr/ before scanning. Domain language names good seams; ADRs record decisions this skill should not re-litigate.
  • Name things in domain terms: if the glossary defines "Order," talk about "the Order intake module" — not "the FooBarHandler."

Process

1. Friction scan

Walk the codebase organically — don't follow rigid heuristics; note where you experience friction:

  • Where does understanding one concept require bouncing between many small files? That comprehension cost is the friction itself.
  • Where are modules shallow — interface nearly as complex as the implementation?
  • Where have pure functions been extracted just for testability, while the real bugs hide in how they're called (no locality)?
  • Where do tightly-coupled modules leak across their seams?
  • Which parts are untestable through their current interface — no seam to test at?

Apply the deletion test to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? "Yes, concentrates" is the signal you want.

The scan MAY be delegated to a read-only subagent per the delegate skill — context-flooding search is its #1 trigger; you need the conclusions, not the file dumps.

2. Present candidates as markdown cards

Present findings directly in chat as plain markdown — one card per candidate:

## Candidate: <domain-term name>

**Strength:** Strong | Worth exploring | Speculative

**Files:** `path/one.py`, `path/two.py`

**Problem:** One or two sentences — what hurts, in friction terms
(bouncing, shallowness, no locality, untestable seam).

**Proposed solution:** Plain English — what would change. No interfaces yet.

**Benefits:** In terms of locality, leverage, and how tests would improve.

**Before → After:**
- Before: caller → helperA → helperB → helperC (concept smeared across 4 files)
- After:  caller → DeepModule (one seam, one place to test)
  • Recommendation strength is one of Strong, Worth exploring, Speculative.
  • Before → After is a compact text sketch (arrows, indented trees, or a short bullet pair) — enough to show the shallowness and the deepening. No HTML, no diagram files, nothing written to disk.
  • ADR conflicts: if a candidate contradicts an existing ADR, surface it only when the friction is real enough to warrant revisiting the decision, and mark it clearly: "contradicts ADR-0007 — but worth reopening because…". Don't list every theoretical refactor an ADR forbids.

End with a Top recommendation: which candidate to tackle first, and one sentence on why.

Do NOT propose interfaces yet. Ask the user: "Which of these would you like to explore?"

3. Pick one → interrogate → decide

Once the user picks a candidate, run the brief skill's interrogation on it — walk the design tree together: constraints, dependencies, the shape of the deepened module, what sits behind the seam, which tests survive. To explore alternative interfaces for the deepened module, lean on the design skill.

Side effects happen inline as decisions crystallize:

  • Naming a deepened module after a concept not in the glossary? Add the term to the domain notes in .handoff/context/. Sharpened a fuzzy term mid- conversation? Update it right there.
  • User rejects the candidate with a load-bearing reason? Offer to record it — in .handoff/context/LEARNINGS.md as a pitfall entry ("rejected: X because Y") or as an ADR in docs/adr/ — framed as: "Want me to record this so future architecture scans don't re-suggest it?" Only offer when a future explorer would actually need the reason; skip ephemeral ones ("not worth it right now") and self-evident ones.
  • Candidate accepted? The decision goes to the plan skill for an implementation plan at the appropriate tier. This skill's job ends at the decision.

Adapted from mattpocock-skills (MIT, © 2026 Matt Pocock); see ATTRIBUTION.md.

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.