gz adr audit-check¶
Verify linked OBPIs for one ADR are completed and include implementation evidence.
Usage¶
Flags¶
--json— emit the audit result as JSON (machine-readable; logs go to stderr).--strict— escalate to fail-close (exit 3) for lite-feature ADRs as well. By default, severity isblockingon heavy-lane OR foundation-kind ADRs andwarningon lite-feature ADRs;--strictlifts lite-feature toblocking. The temporal heuristic flags decorators introduced withindata/audit_thresholds.jsonthresholds (default 3 commits / 7 days) of the REQ's closing receipt, except where the introducing commit is the file-creation commit (same-commit authoring) or carries a registeredCeremony:trailer (e.g.Ceremony: gz-git-sync) — those shapes are legitimate authoring, not the GHI #272 cosmetic-backfill anti-pattern.
What It Checks¶
- ADR-to-OBPI linkage from ledger and artifact metadata
- OBPI completion markers (
status: Completedand/or**Brief Status:** Completed) - Presence of non-placeholder implementation summary evidence
- Requirement coverage from
@coverstest annotations (advisory by default; severity is fail-open so Lite-lane docs-only OBPIs do not block the audit) - Same-commit-window
@coversbackfill heuristic — flags decorators introduced withinmax_covers_backfill_commitscommits ORmax_covers_backfill_daysdays of the REQ's closing receipt (data/audit_thresholds.json). Catches the GHI #272 / #309 cosmetic-backfill anti-pattern that would otherwise silence the audit. Decorators introduced under same-commit file creation OR a registeredCeremony:trailer (gz-git-sync,obpi-reconcile,adr-closeout,ghi-close) are exempted as legitimate authoring rather than cosmetic backfill (GHI #382 / GHI #386). Severity defaults toblockingfor heavy-lane OR foundation-kind ADRs (fails-close, exit 3) andwarningfor lite-feature ADRs;--strictlifts lite-feature toblocking.
Implementation-summary evidence is parsed from inline markdown bullets in
### Implementation Summary, for example:
- Files created/modified: src/gzkit/cli.py, tests/test_cli.py- Tests added: tests/test_cli.py- Date completed: 2026-02-23
Nested bullets or empty placeholder values can cause evidence to be treated as missing.
Returns explicit missing-proof findings and exits non-zero on failure.
Coverage Section¶
The audit-check output includes a coverage section showing which REQs under
the target ADR are proven by @covers test annotations.
- Per-OBPI rollup: Each OBPI's REQ coverage count and percentage.
- Uncovered REQs: Surfaced with their severity. Advisory-severity entries
print as a yellow
Advisorysection and do not block the audit; non-advisory severities (reserved for future per-REQ escalation) print as redFAILand exit 1. OBPI completeness and evidence gaps — tracked under the separatefindingskey — remain fail-closed regardless of coverage severity. - JSON output: The
coveragekey containstotal_reqs,covered_reqs,uncovered_reqs,coverage_percent,by_obpiarray, anduncoveredlist (each entry carries aseverityfield). Thecoverage_findingskey enumerates every uncovered REQ;coverage_blockingandcoverage_advisorysplit those entries by whether they block the audit.
When an ADR defines REQs, every REQ should be reachable from a @covers
annotation (or equivalent BDD @REQ tag / doc-proof channel — see GHI #165).
Advisory-severity gaps are legitimate for Lite-lane docs-only OBPIs whose
briefs declare "N/A for TDD" (GHI #268).