agentleFS
cenconq25cenconq25/claude-code-app-studio/.claude/skills/architecture-review/SKILL.md

architecture-review

Skill40 starsChanged 7 months agoMITView on GitHub

Validates the architecture against all PRDs. Builds a traceability matrix from PRD requirements to ADRs, identifies coverage gaps, detects cross-ADR conflicts, and produces a PASS/CONCERNS/FAIL verdict. Run after Required ADRs are written; rerun whenever PRDs change. Read-only — never edits files.

78 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 11 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 70 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-only. Outputs a structured verdict and traceability matrix.

    line 14
  2. Distinctive:

    All P0 ADRs from the architecture's Required list are written

    line 21
  3. Distinctive:

    Before kicking off the first sprint

    line 23
  4. Distinctive:

    Before a major release

    line 24
  5. Distinctive:

    Run in a fresh session — independent of any authoring context.

    line 26
  6. Distinctive:

    If running degraded, label the report header: "Degraded — no Accepted ADRs yet.

    line 49
  7. Very specific:

    Verify every cross-cutting concern in architecture.md Sections 4-19 has either:

    line 92
  8. Very specific:

    Read docs/framework-reference/<framework>/VERSION.md for the risk level.

    line 104
  9. Very specific:

    If PASS: tell the user the architecture is locked enough to proceed to epics.

    line 201
  10. Distinctive:

    If CONCERNS: list the 3 highest-leverage fixes the user should run, then re-run this skill.

    line 203
  11. Distinctive:

    If FAIL: refuse to proceed to epics.

    line 205
  12. Distinctive:

    Every uncovered v1 TR-ID is listed by ID and PRD

    line 211
  13. Distinctive:

    Every conflict names both ADRs and the specific contradiction

    line 212
  14. Distinctive:

    Read-only — never modifies any file

    line 214

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

Holistic check that every PRD requirement is covered by an ADR, that ADRs do not contradict each other, that the framework knowledge-cutoff risk is honored across all decisions, and that no architectural stance is silently broken.

Read-only. Outputs a structured verdict and traceability matrix.


Purpose / When to Run

Run when:

  • All P0 ADRs from the architecture's Required list are written
  • A batch of PRDs changed (after /propagate-design-change)
  • Before kicking off the first sprint
  • Before a major release

Run in a fresh session — independent of any authoring context.

Inputs

  • docs/architecture/architecture.md
  • All docs/architecture/ADR-*.md
  • All design/prd/*.md
  • design/systems-index.md
  • docs/framework-reference/<framework>/
  • docs/architecture/architecture-registry.yaml if present

Outputs

  • A printed report including a traceability matrix and verdict
  • No file writes

Phase 1: Pre-checks

  • Confirm docs/architecture/architecture.md exists. Fail otherwise.
  • Confirm at least 1 ADR with Status: Accepted exists. If none, run anyway but in degraded mode.

If running degraded, label the report header: "Degraded — no Accepted ADRs yet. This pass identifies coverage gaps only."


Phase 2: Build the Traceability Index

For each PRD:

  1. Extract all TR-IDs from Section 3 Detailed Requirements (TR-<system>-NNN)
  2. Identify which ADRs reference each TR-ID by grepping docs/architecture/ADR-*.md for the TR-ID

Build a matrix:

| PRD | TR-ID | Requirement summary | Covered by | ADR Status |
|-----|-------|---------------------|------------|------------|
| auth.md | TR-auth-001 | OAuth login | ADR-0003 | Accepted |
| auth.md | TR-auth-002 | Token refresh | ADR-0003 | Accepted |
| auth.md | TR-auth-003 | Biometric unlock | — | UNCOVERED |
| paywall.md | TR-paywall-001 | Receipt validation | ADR-0009 | Proposed |

Categorize each row:

  • COVERED — Accepted — TR-ID has at least one ADR with Status: Accepted addressing it
  • COVERED — Proposed — TR-ID has an ADR but the ADR is still Proposed
  • UNCOVERED — TR-ID has no ADR reference
  • OVER-COVERED — TR-ID has multiple Accepted ADRs that may conflict

Phase 3: Cross-ADR Conflict Detection

For each pair of Accepted ADRs in the same domain, scan for:

  • State ownership conflicts — ADR-A claims current_user ownership; ADR-B also writes to it
  • Interface contradictions — ADR-A defines event userLoggedIn; ADR-B uses user_logged_in for the same thing
  • Performance budget contradictions — ADR-A claims 200ms cold start; ADR-B implies an SDK that adds 300ms
  • Deprecated-API references — any ADR using an API listed in docs/framework-reference/<framework>/breaking-changes.md as deprecated

Each conflict becomes a finding.


Phase 4: Architecture Doc Cross-Check

Verify every cross-cutting concern in architecture.md Sections 4-19 has either:

  • An Accepted ADR, OR
  • A pointer to a planned/Proposed ADR, OR
  • An explicit deferral with reason ("not in v1")

Flag bare descriptions without ADRs in the architecture doc:

  • "We use Sentry" with no ADR → MEDIUM finding (decision recorded only in arch doc, not as a tracked ADR)

Phase 5: Framework Knowledge-Cutoff Audit

Read docs/framework-reference/<framework>/VERSION.md for the risk level.

If MEDIUM/HIGH:

  • For every ADR, check the Framework Compatibility table
  • Flag any ADR with empty or "Unknown" Verification Required for a HIGH-risk domain → HIGH finding
  • Flag any ADR using post-cutoff APIs that are not listed in Framework Compatibility → HIGH finding

Phase 6: Mobile Cross-Cutting Checks

These checks are mobile-specific and often skipped. Each absence is a finding.

  • Account deletion — App Store guideline 5.1.1(v) and Play policy require an in-app deletion path. Is there a PRD or ADR addressing this?
  • App Tracking Transparency (iOS) — if any tracking is described, is there an ADR for the ATT prompt timing and copy?
  • Play Data Safety / iOS Privacy nutrition labels — is there a PRD section or ADR governing what data is collected and how it is declared?
  • Push token rotation — does the push ADR address rotation?
  • Receipt validation — for any IAP, is server-side validation specified?
  • Background task limits — does the background ADR respect iOS BGTaskScheduler limits and Android Doze constraints?
  • Deep link auth gating — does the navigation ADR specify what happens to deep links when the user is logged out?
  • Min OS — are min OS versions consistent across PRDs and ADRs?
  • App size impact — is the architecture aware of bundle size budget?

Each missing item: HIGH if regulatory / store-policy; MEDIUM otherwise.


Phase 7: Optional Specialist Synthesis

Spawn Task to:

  • mobile-architect — read the matrix and flag missed coverage or strategic concerns
  • Framework specialist — validate post-cutoff API claims and breaking-changes entries

The reviewer integrates the findings.


Phase 8: Verdict

Tally:

  • CRITICAL — UNCOVERED v1 TR-ID, store-policy gap (account deletion missing), regulatory gap (data safety), framework-deprecated API in Accepted ADR
  • HIGH — interface contradictions between Accepted ADRs, P0 ADR still Proposed, missing knowledge-cutoff verification
  • MEDIUM — over-coverage requiring resolution, missing mobile cross-cutting addresses (push token rotation, etc.)
  • LOW — cosmetic (naming inconsistency in ADR titles)

Verdict ladder:

  • 0 CRITICAL, 0 HIGH → PASS
  • 0 CRITICAL, ≤ 5 HIGH → CONCERNS
  • 1+ CRITICAL or 6+ HIGH → FAIL

Phase 9: Output

# Architecture Review

**Verdict: <PASS / CONCERNS / FAIL>**

## Coverage Summary
- Total PRD requirements: <N>
- Covered (Accepted): <N>
- Covered (Proposed): <N>
- Uncovered: <N>
- Over-covered: <N>

## Traceability Matrix
[abbreviated table — uncovered + Proposed-only rows highlighted]

## CRITICAL findings
1. <finding>
   Affecting: <PRD or ADR list>
   Fix: <specific action>

## HIGH findings
1. <finding>
   Fix: <action>

## MEDIUM findings
- <list>

## LOW findings
- <list>

## Strengths
- <what is well-covered>

## Recommended next steps
- For each CRITICAL: <action — e.g., write ADR for biometric unlock, address account deletion in a new PRD>
- After fixes: re-run `/architecture-review`
- For PASS: proceed to `/create-control-manifest` and then `/create-epics`

Phase 10: Exit Notes

If PASS: tell the user the architecture is locked enough to proceed to epics. Suggest /create-control-manifest next.

If CONCERNS: list the 3 highest-leverage fixes the user should run, then re-run this skill.

If FAIL: refuse to proceed to epics; the team must close gaps first.


Quality Gates

  • Every uncovered v1 TR-ID is listed by ID and PRD
  • Every conflict names both ADRs and the specific contradiction
  • The verdict matches the tally rules
  • Read-only — never modifies any file

Examples

PASS run: 47 TR-IDs, 47 covered (44 Accepted, 3 Proposed in low-risk domains), 0 conflicts, 0 critical mobile gaps. Verdict: PASS. Recommend /create-control-manifest.

FAIL run: 47 TR-IDs, 41 covered, 6 uncovered (including biometric unlock and account deletion). 2 ADRs use deprecated APIs per breaking-changes.md. Verdict: FAIL. Recommend writing 4 missing ADRs and revising 2 existing ones.

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.