Value: high. The single most repeated defect class in this codebase is reporting clean when the scan didn't
actually run. It was fixed for a11y in #160, and B-01/B-04 show briefing reintroducing it — because the fix lived
in one command instead of in a shared shape.
Introduce a small shared result envelope — { complete: boolean, errors: ScanError[], truncated: string[] } — and make
audit, a11y, briefing, verify and stats all populate it, with one helper that decides the exit code from it.
Then add a single test that asserts every read-only command's --json carries the envelope, so the next scan command
can't ship without it. This is the structural fix that makes B-01, B-04 and B-07 non-recurring rather than three
one-off patches.
Extracted from a repo audit performed 2026-07 (the audit doc it came from was proposed via an unmerged docs PR).
Value: high. The single most repeated defect class in this codebase is reporting clean when the scan didn't
actually run. It was fixed for
a11yin #160, and B-01/B-04 showbriefingreintroducing it — because the fix livedin one command instead of in a shared shape.
Introduce a small shared result envelope —
{ complete: boolean, errors: ScanError[], truncated: string[] }— and makeaudit,a11y,briefing,verifyandstatsall populate it, with one helper that decides the exit code from it.Then add a single test that asserts every read-only command's
--jsoncarries the envelope, so the next scan commandcan't ship without it. This is the structural fix that makes B-01, B-04 and B-07 non-recurring rather than three
one-off patches.
Extracted from a repo audit performed 2026-07 (the audit doc it came from was proposed via an unmerged docs PR).