agentleFS
int2t05int2t05/engineering-skills/skills/03-design/architecture/SKILL.md

architecture

Skill3 starsChanged 4 months agoMITView on GitHub

Use when designing high-level system architecture, reviewing existing designs, or making architectural decisions — produces ADRs, architecture diagrams, and evaluates scalability/NFR trade-offs. Triggers on "system design", "架构设计", "ADR", "scalability", "系统设计", "架构决策".

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:

    Document failure modes and mitigations for each component

    line 54
  2. Distinctive:

    Write an ADR when a decision is hard to reverse, surprising without context, and the result of a real trade-off.

    line 58

“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 system-level architecture: pick patterns, size components, choose datastores, and record decisions as ADRs. Pragmatic trade-offs over theoretical purity — document what you chose, what you rejected, and why.

When to use

  • Designing new system architecture or reviewing an existing one
  • Choosing between architectural patterns (monolith vs microservices, event-driven, serverless)
  • Making technology choices that carry lock-in (database, message bus, auth provider)
  • Planning for scalability or evaluating NFR trade-offs (performance, availability, cost)
  • Writing Architecture Decision Records (ADRs)
  • Triggers on "system design", "architecture review", "scalability", "ADR", "架构设计"

Not for: Code-level design patterns (use simplify or codebase-design), database-only design without system context, or feature-level API contracts (use api-design). Requirements/product-spec writing without system design (use spec — architecture takes the spec as input).

Steps

1. Gather requirements (functional + non-functional)

Collect functional requirements, constraints (budget, timeline, team), and NFRs. Use the NFR checklist to make scalability, performance, availability, security, reliability, and cost targets explicit — never assume "it should be fast." Verify: every NFR category has a concrete target or an explicit "not applicable" decision recorded.

  • Load references/nfr-checklist.md when gathering NFRs
  • Load references/system-design.md for the full design template

2. Evaluate architectural patterns

Match requirements to patterns. Don't pick microservices because they sound modern — pick the pattern whose trade-offs match your team size, domain complexity, and scaling needs.

  • Load references/architecture-patterns.md for the pattern comparison (monolith, modular monolith, microservices, serverless, event-driven, CQRS) with when-to-use criteria
  • For each candidate: write down what it makes easy and what it makes hard

3. Design components and data layer

Design component interactions, data flow, and the data layer. Choose datastores per workload — relational for transactions, document for flexible schemas, key-value for caching, time-series for metrics, graph for relationships, search for full-text.

  • Load references/database-selection.md for the database decision matrix
  • Load references/error-resilience.md for the cross-cutting error-handling strategy — throw-vs-return conventions, error propagation across layers, retry/circuit-breaker/backoff, idempotency under retry, fallback UX, error-to-user-message mapping
  • Produce a high-level architecture diagram (Mermaid preferred — see ${CLAUDE_PLUGIN_ROOT}/references/mermaid-diagrams.md)
  • Document failure modes and mitigations for each component

4. Record decisions as ADRs

Write an ADR when a decision is hard to reverse, surprising without context, and the result of a real trade-off. Skip reversible or obvious ones — they clutter the log.

  • A minimal paragraph (context + decision + why) is the default; most ADRs need nothing more.
  • Load references/adr-template.md for the expanded format (Status / Context / Decision / Consequences / Alternatives) when the trade-offs warrant recording in full.
  • Number sequentially: docs/design/adr/0001-slug.md

Output: Two layers:

  • docs/TECH.md — project-level architecture overview (diagram, components, NFRs, data layer), concise (mermaid-heavy), on main.
  • docs/vX.Y/tech.md — the current version's detailed architecture, on the version branch. Falls back to docs/TECH.md alone for single-version projects. Plus docs/design/adr/NNNN-slug.md for each significant decision (shared across versions). TECH.md is the overview; ADRs are the decision records — TECH.md references the ADRs it depends on.

5. Review with stakeholders

Validate the design with stakeholders before finalizing. If review fails, return to step 3 with recorded feedback. Verify: review feedback is incorporated or explicitly overridden with rationale.

Verify

  • ADR written for every significant decision (hard to reverse, surprising, real trade-off)
  • Architecture diagram renders (Mermaid syntax valid; all components and data flows shown)
  • Every NFR category addressed with a concrete target or explicit "not applicable"
  • Trade-offs documented for each pattern/technology choice — not just benefits
  • Failure modes identified with mitigations
  • Operational complexity and cost considered, not just functional fit

Red flags: over-engineering for hypothetical scale; choosing technology without evaluating alternatives; ignoring operational costs; designing without understanding NFRs; skipping security considerations; no ADRs for decisions that will be hard to reverse.

References

  • ${CLAUDE_PLUGIN_ROOT}/references/engineering-principles.md — shared discipline (surface assumptions, push back, verify don't assume)
  • ${CLAUDE_PLUGIN_ROOT}/references/mermaid-diagrams.md — Mermaid syntax for architecture diagrams
  • references/nfr-checklist.md — NFR categories (scalability, performance, availability, security, reliability, cost) with targets
  • references/architecture-patterns.md — pattern comparison (monolith, microservices, event-driven, CQRS, serverless)
  • references/database-selection.md — database types and decision matrix
  • references/system-design.md — full system design template
  • references/adr-template.md — ADR format, example, and naming convention
  • references/error-resilience.md — throw-vs-return, error propagation, retry/circuit-breaker, idempotency, fallback UX, error-to-message mapping

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.