/arch-skills:architecture-decision-reviewfrom Architecture skills
Reviews a design choice before it is built and returns an ADR with a reversibility call, a connascence table and fitness functions. Use when choosing between design options, or before a plan adds, splits or moves a module, dependency, schema or public API.
Ships in Architecture skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Turn a design choice into a recorded, checkable decision. The effort matches how hard the choice is to undo: most choices take the quick path.
A decision that changes a boundary is not done until it has three things:
Why: these three are what the next reviewer and the next agent need. Without them, a sound decision looks like cruft and gets "cleaned up", or a weak one spreads before anyone sees it.
If the repo has app.modules.ts and docs/verify/gate-checks.txt, read references/project-bphs-connect.md before triage. It names the module tiers, the rules that never bend, the checks the repo already runs and its ADR format. In any repo, read its own architecture doc (ARCHITECTURE.md, docs/**/architecture.md, AGENTS.md) before you propose a boundary: the decision must fit the rules it states or say which rule it changes.
Answer four questions. They choose the mode and which reference files to read. Do not read every reference file.
Q1. Does it touch a boundary? A boundary is any place where code or data crosses between modules, packages, services, processes or teams: imports, calls, schemas, events, files, shared tables, caches, env vars. If yes, the connascence lens is required (read references/connascence.md).
Q2. Type 1 or Type 2?
| Type 1 (one-way door) if any is true | Type 2 (two-way door) if all are true |
|---|---|
| Changes the shape or ownership of stored data | No stored data changes, or only additive |
| Changes a public API, event or file format others use | All callers are in this repo |
| Undo would take many modules, services or teams | Undo is one PR in one module |
| Changes tenancy, auth or a trust boundary | Sits, or can sit, behind a port |
Unsure after the table: read references/tradeoffs-reversibility.md and run its four-question reversibility test. Still unsure: treat it as Type 1.
Q3. What kind of decision is it? Read only the rows that match.
| The decision is about... | Read |
|---|---|
| A new or changed dependency; splitting or merging modules | references/coupling-metrics.md; run scripts/coupling_metrics.py (TypeScript, JavaScript, Python; --module names the modules) |
| A data model, schema, API, event or file format | references/contracts-evolution.md |
| Competing qualities (speed vs consistency, cost vs resilience), or choosing a technology or vendor | references/tradeoffs-reversibility.md |
| A migration, rewrite, feature layout or rollout | references/delivery-patterns.md |
| Which process to use (ADR, RFC, ATAM, CBAM), or writing the ADR | references/decision-frameworks.md (always in full mode) |
| Turning the decision into checks | references/fitness-functions.md (always in full mode) |
| Rating the risks you found | references/severity.md |
Most decisions need two or three files.
Q4. Is there an ADR already? Search before deciding: rg -il "<module or concept>" docs/adr docs/decisions doc/adr 2>/dev/null. If one is in scope, the new decision follows it or explicitly supersedes it. Never contradict an ADR silently.
Mode: Type 2 goes to quick mode. Type 1 goes to full mode. A Type 2 choice whose connascence row comes out stronger than Name or Type across a boundary moves up to full mode.
DECISION NOTE: <title>
Choice: <option> over <alternative>; Type 2 because <evidence>
Crossings: <connascence rows, or "none">
Revisit when: <trigger>
Copy this checklist into your working notes and tick it off. Go back a step when a later step shows a gap.
- [ ] 1 Context: read AGENTS.md / CLAUDE.md, ARCHITECTURE.md, ADRs in scope, public entries of touched modules
- [ ] 2 Frame: "We must decide X because Y. The last responsible moment is Z."
- [ ] 3 Options: 2 to 4, one is the current way or "do nothing"
- [ ] 4 Quality attribute scenarios: 1 to 3, six parts each
- [ ] 5 Information hiding: what change does each module hide?
- [ ] 6 Connascence table for each option
- [ ] 7 Dependency direction: arrows inward, no new cycles, stable direction
- [ ] 8 Trade-off points: at most 3 per option
- [ ] 9 Reversibility: if evidence is missing, port + cheapest choice + evidence needed
- [ ] 10 Recommendation with the one reason that decides it
- [ ] 11 ADR (status Proposed) with fitness functions
- [ ] 12 Self-check
Notes on the steps that need judgement:
index.ts, __init__.py, package API, OpenAPI). Read internals only to answer a specific question.TBD (owner: ...) and add it to open questions. See references/tradeoffs-reversibility.md.references/connascence.md. Check all nine types, including Value and Identity. Only Name and Type may cross a module boundary; anything stronger needs a fix in the table or a reason in the ADR.python3 scripts/coupling_metrics.py --root <src> [--module ...] --json before and after (the after state can be a sketch). Run with --help first. Domain code importing a framework, database, HTTP client or LLM SDK is Critical unless an ADR allows it.Return two things, in this order. Other skills and agents parse the first one, so keep the field names.
A. Caller summary
DECISION REVIEW: <title>
Mode: quick | full Type: 1 | 2 Sign-off: needed from <role> | not needed
Recommendation: <option>. <one sentence: the reason that decides it>
Top risks:
1. <severity> <connascence type or principle>, <locality>, <degree>: <one line>
2. ...
Fitness functions: <FF-ID: tool + rule> | none: <reason>
Unknowns: <what is assumed or TBD, with owner>
Revisit when: <trigger>
ADR: <path written> | inline below
B. ADR in the shared template from references/decision-frameworks.md (Status, Date, Decision type, Deciders, Scope, Context, Decision as invariants, Options considered, Consequences, Fitness functions, Revisit when). If the repo already has ADRs in another format, use the repo's format and carry the same content: path globs go in its scope or sources: field, fitness functions in its enforcement field or text, and "Revisit when" in its reopen section.
docs/adr/ if there is no folder).Proposed. A Type 1 ADR becomes Accepted only when a named human accepts it.Scope: line (or the repo's sources: front matter) lists path globs. pr-erosion-check uses it to find which ADRs govern a diff, so keep it accurate.| If you think... | Do this instead |
|---|---|
| "Only one option makes sense." | Add the current way or "do nothing" as an option. If it truly loses, the table shows why in one row. |
| "I'll add an interface so it is extensible." | Add a port only in front of something volatile (vendor, I/O, framework). Otherwise wait for a second real case (rule of three). |
| "The load is probably around..." | Do not estimate. Write TBD with an owner. |
| "This old pattern looks like cruft." | Search the ADRs and git log for why it exists before you replace it. If you find no reason, ask. |
| "It's Type 2, we can change it later." | Only if it sits behind a port. A choice that spreads to many call sites becomes Type 1. |
| "A connascence table is overkill here." | For a boundary crossing it is the core output. Two rows is fine. |
| "The user asked me to decide, so I'll mark it Accepted." | Recommend firmly; leave the ADR Proposed for a Type 1 decision. |
| "Let me read every reference file to be thorough." | Read only what triage selected. More text makes the review worse, not better. |
git log --format= --name-only -- <file> | sort | uniq -c | sort -rn | head.references/connascence.md (opens in a new tab)references/contracts-evolution.md (opens in a new tab)references/coupling-metrics.md (opens in a new tab)references/decision-frameworks.md (opens in a new tab)references/delivery-patterns.md (opens in a new tab)references/fitness-functions.md (opens in a new tab)references/project-bphs-connect.md (opens in a new tab)references/severity.md (opens in a new tab)references/tradeoffs-reversibility.md (opens in a new tab)scripts/coupling_metrics.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub bytefloww1013/josh-skills --plugin arch-skills6 skills in this plugin
/architecture-review-reportReviews the architecture in a written plan, spec, RFC, design doc or set of GitHub issues and writes an evidence-based report: each finding quotes its text and gives a severity, an impact and a suggestion. Use for "review this spec" or "what's wrong with this plan"./pr-erosion-checkChecks a PR, branch or diff for architecture erosion, agent shortcuts and scope beyond the linked issue, and returns a merge verdict with file:line findings. Use to review a PR or diff, before a merge, and before a coding agent reports done./repo-navigability-auditAudits how easily people and coding agents find, understand and extend code in a repo, and returns a scored report with ranked fixes and an AGENTS.md draft. Use to audit a repo's structure, make it agent-ready, or set up AGENTS.md or CLAUDE.md./state-machine-auditFind the implicit state machines in an app or repo, map them (Mermaid for big ones), judge whether each behavior is intended, flag paths to bugs or invalid states, and write a findings report./user-flow-mapperMap an app user's journey for a task as Mermaid diagrams, get approval, then build mockups/prototype and a formal UX report. Use when asked for a user flow, journey map or flow blueprint.