agentleFS
extra-orgextra-org/extra/.claude/skills/architecture-review/SKILL.md

architecture-review

Skill119 starsChanged 5 months agoMITView on GitHub

Guard the project's architecture invariants. Use to evaluate any change affecting layers, boundaries, lifecycles, or contracts, and to decide whether an ADR is required.

82 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

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

  • 0

    Common

    Most of the 74 edited versions we read keep these.

  • 5

    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:

    Do not edit this file directly.

    line 10
  2. Distinctive:

    Before approving anything that alters a public contract.

    line 28
  3. Very specific:

    All ADRs in docs/adr/.

    line 34
  4. Distinctive:

    YAML is declarative, not executable logic: No code execution from spec values.

    line 42
  5. Distinctive:

    No global cache of rendered prompts.

    line 53
  6. Distinctive:

    Check boundaries: No client/business logic in the runtime.

    line 71
  7. Distinctive:

    Check contracts: If the YAML schema, plugin contracts, or API shape changes, require an ADR and assess compatibility.

    line 73

“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
<!-- This file is generated by tools/skills. Do not edit this file directly. Edit .ai/skills/architecture-review.md and run `make generate-ai`. -->

Skill: Architecture Review

Purpose

Guard the project's architecture invariants. Use this to evaluate any change that affects layers, boundaries, lifecycles, or contracts — and to decide whether an ADR is required.

When to Use This Skill

  • A change touches more than one layer or moves logic between layers.
  • A change affects the runtime lifecycle, the YAML→graph pipeline, prompts, plugin contracts, or tool/MCP integration.
  • Reviewing whether a design respects the project's invariants.
  • Before approving anything that alters a public contract.

Files to Read First

  • AGENTS.md §3 (non-negotiable rules) and §4 (layout).
  • docs/ARCHITECTURE.md and docs/RUNTIME_LIFECYCLE.md.
  • All ADRs in docs/adr/.
  • The specific layer doc(s) the change touches.

Core Principles (project architecture invariants)

These are binding. A change that violates one must be redesigned or justified by a new/updated ADR.

  • YAML is declarative, not executable logic. No code execution from spec values; routing conditions are declarative.
  • Validate before compile. YAML is validated before it is compiled.
  • Runtime never executes raw YAML dictionaries. It operates only on typed compiled models.
  • Validated config compiles into typed internal models (CompiledAgentGraph).
  • RuntimeEngine is created once at startup; the compiled graph is immutable and shared read-only.
  • ExecutionContext is created per request and holds all request-scoped state. No request state on the engine/graph.
  • Prompt templates may be cached; rendered values are resolved per request. No global cache of rendered prompts.
  • Client-specific auth/context/business logic lives in plugin boundary, never in the runtime.
  • Tool permissions are enforced outside prompts, at the tool/data layer; injected params can't be overridden by the model.
  • Agents declare needs; the runtime resolves and enforces them.
  • Plugin contracts stay generic — no client-specific fields baked into it.
  • MCP/tool integrations go through adapters, not directly into core logic.

Process

  1. Map the change to layers. Identify which src/agentplatform/<layer> packages it touches and whether responsibilities stay separated.
  2. Check the pipeline direction. Data flows validate → compile → graph → runtime → (prompts/context/tools). Flag backward/sideways coupling.
  3. Check lifecycles. Engine-once vs. context-per-request; no request state on long-lived objects; graph immutable.
  4. Check boundaries. No client/business logic in the runtime; external systems behind adapters; security enforced outside prompts.
  5. Check contracts. If the YAML schema, plugin contracts, or API shape changes, require an ADR and assess compatibility.
  6. Decide. Conforms / needs redesign / needs an ADR. Record reasoning.

Checklist Before Finishing

  • Each invariant in Core Principles is satisfied (or an ADR justifies a change).
  • Change sits in the correct layer; boundaries intact.
  • Pipeline direction preserved; no improper coupling.
  • Engine-once / context-per-request lifecycle respected.
  • No client-specific logic in the runtime; integrations via adapters.
  • Security enforced outside prompts; injected params non-overridable.
  • Contract changes have an ADR and a compatibility note.
  • make check passes.

Common Mistakes to Avoid

  • Letting the runtime read raw YAML or skip compilation.
  • Storing request state on RuntimeEngine/compiled graph for convenience.
  • Caching rendered prompts globally.
  • Slipping client auth/business rules into the runtime instead of plugins.
  • Calling MCP/LLM/DB directly from core logic instead of through an adapter.
  • Changing a contract silently without an ADR.

Expected Final Report

State: which layers/contracts the change touches; how each relevant invariant is upheld (or which ADR justifies a deviation); lifecycle/boundary findings; whether an ADR is required; and a clear verdict (conforms / redesign / ADR needed).

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.