agentleFS
LeostrukaLeostruka/devin-bundle/skills/architecture/SKILL.md

architecture

Skill0 starsChanged 4 months agoMITView on GitHub

Use when designing modules, seams, and adapters, when evaluating module depth and identifying deepening opportunities in a codebase, or when modernizing legacy code incrementally (strangler-fig, seams, characterization tests, safe extraction).

82 other projects use a version of this.

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

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

  • 0

    Common

    Most of the 74 edited versions we read keep these.

  • 2

    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:

    Don't drift into "component," "service," "API," or "boundary."

    line 20
  2. Distinctive:

    One adapter = hypothetical seam; two = real: Don't add a seam unless something varies across it.

    line 40

“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

Design deep modules — a lot of behaviour behind a small interface at a clean seam, testable through that interface. Aim: leverage for callers, locality for maintainers, testability for everyone.

Reference docs: reference/DEEPENING.md (dependency categories + refactor moves), reference/DESIGN-IT-TWICE.md, reference/HTML-REPORT.md (report format).

Glossary — use these terms exactly

Don't drift into "component," "service," "API," or "boundary."

  • Module — anything with an interface and an implementation (scale-agnostic).
  • Interface — everything a caller must know: signature, invariants, ordering, error modes, config, performance.
  • Depth — leverage at the interface: behaviour exercisable per unit of interface learned. Deep = small interface + lots of implementation.
  • Seam (Feathers) — a place you can alter behaviour without editing there.
  • Adapter — a concrete thing satisfying an interface at a seam (role, not substance).
  • Leverage — what callers get from depth. Locality — what maintainers get: change and bugs concentrate in one place.

Principles

  • Depth is a property of the interface, not the implementation.
  • The deletion test — delete the module: complexity vanishes → pass-through; reappears across callers → earning its keep.
  • The interface is the test surface — callers and tests cross the same seam.
  • One adapter = hypothetical seam; two = real. Don't add a seam unless something varies across it.
  • Accept dependencies, don't create them; collapse pass-through wrappers; co-locate decisions; hide parameter clusters; push I/O to the seam; delete tests on deleted shallow modules.

Deepening process (evaluate + act)

Symptoms of shallowness: wide interface/thin impl; chains of tiny modules per concept; setup-heavy test explosion; dependency fan-out; repeated caller setup. Several together → deepening candidate.

  1. Scope before scanning (YAGNI) — user direction wins; else walk git log --oneline for hot spots. Read .devin/CONTEXT.md + ADRs first. Broad/unfamiliar → research deep-mode before the sub-agent.
  2. Explore with an architect/researcher sub-agent — organic, noting friction; apply the deletion test to suspects.
  3. Present candidates — self-contained HTML report in OS temp dir ($TMPDIR//tmp/%TEMP%, architecture-review-<ts>.html), Tailwind + Mermaid via CDN, before/after visuals, per candidate: files, problem, solution, locality/leverage benefits, strength badge (Strong / Worth exploring / Speculative). Open it for the user.
  4. Act — pick the refactor move per dependency category (reference/DEEPENING.md); tests land at the deepened interface.

Legacy modernization protocol

  1. Characterization tests first — capture current behavior before touching.
  2. Find seams — where new code can replace old.
  3. Strangle incrementally — route small slices through new impls.
  4. Refactor locally — extract, rename, deduplicate.
  5. Verify each step — tests + diff-check.
  6. Document — ADRs for architecture changes and deprecated paths.

Each commit leaves the system testable and no worse than before. Report before/after: tests, complexity, migration status.

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.