Feature audit
The AUD story closing every feature (ADR-0020). It checks the feature in depth and the whole project in breadth. Each check leaves evidence in the story's Findings table; a problem is fixed in the audit, or becomes a story.
Procedure: the /audit skill. Sections A to E are first reviewed by the independent auditor subagent (fresh context, read-only, ADR-0021); each of its findings is reproduced before being recorded.
A. Mathematics (feature, in depth)
- Re-derive every formula of the feature from its
@see(derivation or reference), without looking at the code. - Recompute every expected test value by hand; compare with the test.
- Look for missing cases: degenerate input (0, empty, aligned, coincident), sign, bounds, very large values.
- Mutation spot-check: break each function once (flip a sign, swap an operator, change a constant) and check that at least one test fails; restore. Record each mutation and the failing test.
- Properties: every function with a stateable invariant has
test.propproperties (ADR-0022); add the missing ones.
B. Sources
- Feature: re-open every
@seetarget online — still reachable, still saying what is cited; update the[verified] YYYY-MM-DDdate indocs/references.md. - Project: the weekly link check (
links.yml) is green — run it on demand if needed;[unverified]rows: try again, or keep them uncited. - No
@seepoints to an[unverified]row (lint guarantees it; check noeslint-disablebypasses it).
C. Provenance (no copied code)
- Every function is written from its derivation or specification, not from third-party code; its TSDoc formula matches its body.
- No comment, identifier pattern or structure taken from a known library; when in doubt, search the distinctive line on GitHub code search.
- Licenses: GPL / LGPL code was only read (
docs/research/§4); no dependency added without its row indocs/tooling/dependencies.md.
D. Duplicates
- Exported API (
npm run docs:api, orsrc/**): no two functions for one concept, no near-identical helpers. - Derivations and references: no two documents for the same result; no URL under two IDs (
tests/references.test.ts). - Tests: no copy-pasted test hiding a missing case.
E. Consistency
- Code ↔ TSDoc ↔ derivation ↔
docs/domain/↔ ADRs say the same thing. - Open questions of
docs/domain/README.md: still open, or answered by the feature. AGENTS.md,CLAUDE.md,docs/conventions/,docs/tooling/describe what the project really does.- Backlog: statuses, feature plan, epic table up to date.
F. Quality gates
npm run check:allgreen; coverage 100 %;npm run buildgreen.- No
.skip/.onlyin tests; everyeslint-disablehas a justification still valid. - The feature is demonstrable (playground or tests) for its
VALstory. - Agent configuration (
AGENTS.md,CLAUDE.md,.claude/rules/, skills, agents) still matches the project; contradictions removed.
G. Next feature
List the sources and questions the next feature will need: they feed its research spike.
H. Light evolvability check
The six questions of the evolvability review in one line each (size, tools, fitness functions, patterns, agent configuration, process). What deserves action goes to the improvement log, treated at the epic retrospective (ADR-0023).
Findings table (in the AUD story)
| Check | Result | Evidence | Action |
|---|---|---|---|
A4 — mutation of filletSetback (sign of τ) | caught | fillet-setback.test.ts "direction" fails | — |
Regression and end-to-end tests are added when the applications exist (ADR-0020), not by the feature audits.