# Architecture Review & Fitness Assessment

Tests an architecture against the quality requirements it was meant to meet, and reports which are served, which are unproven and which the design works against.

## Deliverable

One Markdown document, `architecture-review.md`, in the structure set out under **Output** below. It reviews what **System Architecture Specification** produces against what **Non-Functional Requirements Definition** produces, and hands its findings back to the architecture's owners as questions and options, not as a redesign.

## Required inputs

- **The architecture under review** — a specification, diagrams, or the structure of the running system or codebase, in whatever form exists. Its components, interfaces, data stores and boundaries are the unit of review.
- **The requirements it must meet** — each with its metric, threshold, conditions and the consequence of missing it, exactly as their owner set them.
- **The scope of the review** — the whole system, or the named part of it.

If the architecture or the requirements are absent, stop and report it. If a requirement has no threshold, review the architecture against it as stated but record its threshold as `unknown`; the review never supplies a threshold.

## Optional inputs

- Decision records explaining why the design is shaped as it is
- Scenarios the owners care about: a component failing, a surge, a change of provider, a new consumer
- Access to the running system, its configuration or its metrics
- Incident history for the system
- The team's operating constraints: who runs it, what skills they have

Absent optional inputs do not stop the review. Each becomes a line saying what could not be checked and who holds the material that would check it.

## Execution

**1 — Establish what is reviewed.** List the components, interfaces, data stores and boundaries as the architecture documents them. Where the running system or code shows something the documents do not, record it as `undocumented` and review it too.

**2 — Take each requirement as the test, unchanged.** Copy its metric, threshold, conditions and consequence. Do not soften a requirement because the design will struggle to meet it; that struggle is the finding.

**3 — Trace each requirement to the elements that serve it.** The path through the design by which the requirement is met: which components, which interfaces, which stores. A requirement with no path is `unserved`.

**4 — Walk one scenario per requirement.** Derive it from the requirement's own conditions, and follow it through the traced path. State where it would hold and where it would break. A scenario nobody can complete from the documents is recorded as a question to the owners, not answered by guessing.

**5 — Find the trade-offs.** Decisions where serving one requirement costs another. Record both sides, which one the design favours and whether any input shows that the favouring was deliberate.

**6 — Find the structural risks.** Single points of failure, components that every path crosses, coupling that forces unrelated changes together, growth with no stated bound, and boundaries that are documented but not enforced. Each is tied to the elements that show it.

**7 — Classify every finding.** `unserved` (no path), `unproven` (a path exists and nothing shows it holds), `contradicted` (the design works against it), `served` (a path exists and evidence shows it holds). Evidence is named, never assumed.

**8 — Order by consequence.** By the consequence of missing the requirement, as its owner stated it, then by how many requirements a finding touches.

**9 — Offer options.** For each finding: the changes that would address it, what each costs and what it puts at risk elsewhere. Do not redesign, and do not choose between options; that belongs to the owners.

## Output

`architecture-review.md`, in this order:

- **1. Scope** — what was reviewed, and what is `undocumented`
- **2. Requirements** — each one copied as supplied, with its threshold as supplied or `unknown`
- **3. Trace** — per requirement: the path through the design, or `unserved`
- **4. Findings** — each one: requirement, elements, classification, evidence, consequence
- **5. Scenarios** — per requirement: where it holds, where it breaks, open questions
- **6. Trade-offs** — the decision, both sides, the side favoured and whether it was deliberate
- **7. Structural risks** — each tied to the elements that show it
- **8. Options** — per finding: changes, what each costs and what it puts at risk
- **9. What could not be checked** — missing inputs and who holds them

## Validation

The review is ready when all of these hold:

- Every requirement supplied appears in section 2 unchanged
- Every requirement has a line in section 3, a path or `unserved`
- Every finding in section 4 carries one of the four classifications and names its evidence
- No requirement is classed `served` without a named piece of evidence
- Every trade-off in section 6 shows both sides
- No threshold, metric or figure appears that no input supplied

Fail the run if a requirement is reworded to fit the design, or if a finding is classed `served` without evidence.

## Failure handling

- **No requirements supplied** — stop. Report that an architecture cannot be reviewed for fitness against requirements nobody has stated, and name **Non-Functional Requirements Definition** as the skill that produces them.
- **Architecture only partly documented** — review the documented part, list the rest as `undocumented`, and mark every requirement that depends on it `unproven` at best.
- **Requirements without thresholds** — review them as stated, record each threshold as `unknown`, and list the threshold the requester must supply.
- **No access to the running system** — classify from the documents alone, and state in section 9 that no claim of `served` could be checked against behaviour.
- **Partial material** — review what the material supports, mark the rest `NOT REVIEWED — pending <material>`, and deliver.
