The report previously could not compute human accuracy because upstream only
says whether AI and human agree, never who was right. This adds an append-only
local store so a reviewer judges each (typically diverged) document across
weekly passes, and report monthly folds those judgments back in.
- review-store.ts: JSONL per tenant+month (~/.config/seal-use/reviews/
<corpId>-<YYYY-MM>.jsonl), append-only (weekly passes never rewrite), one
record per SN; last write wins on re-adjudication. Verdicts: ai_correct,
human_correct, both_correct, both_wrong, undecided. Env-overridable root
(SEAL_USE_REVIEWS_DIR) for tests; corrupt lines skipped.
- collect.ts: load the store, join verdicts onto fetched blocks, compute
humanAccuracy = (human_right / reviewed) * 100 over adjudicated samples,
expose reviewedCount/divergedCount, and flip humanAccuracyAvailable. No
reviews -> honest gap (still unavailable), never fabricated.
- render.ts: when available, fill the §1.2 human row with real accuracy and
replace the gap warning with a coverage note; when not, keep the warning.
- CLI: `report review set/list --month ... [--sn --verdict --note
--reviewed-by]` (set writes local store, list reads it). Help registers
both as separate commands; read-only list vs mutating set classified
accordingly. Prefix help (`report review --help`) now lists subcommands
instead of erroring.
- parser: register --template/--report-id/--max-runs/--verdict/--reviewed-by
(the first three were previously rejected as unknown, breaking report
monthly's own flags); reviewed-by moves to VALUE_FLAGS so it consumes its
argument.
- SKILL.md: document the adjudication workflow and storage semantics.
Verified: 639 tests (6 new review tests incl. tenant/month isolation, corrupt
line skip, join + accuracy math, honest no-review gap, render coverage note),
tsc clean, oxlint 0 warnings.
Eats in the ai-audit-report-template as a module. The template is the mutable
skin: describeTemplate() infers per-section data demands from ##/### headings
(keyword rules), so editing/renaming/reordering sections does not require
touching collect or render code.
- src/domains/seal/reports/: describe (heading to demand), collect (performance/
risk blocks/template groups, fetched only for declared demands), render (fills
tables by section+column signature, rewrites narrative by structure not line
number), monthly (orchestrator returning content + per-section completeness +
notes).
- report-templates/: the template body, assets, example, and downstream
validate.py/render.py (not bundled; next.validate/render in the result point
at them).
- Capability sealReportMonthlyGet (read-only, allow-listed) + CLI
"seal-use report monthly --month <YYYY-MM>" + help + KNOWN_FLAGS month +
read-only report:monthly.
- SKILL.md: routing row + a section stating the two hard rules: the template is
swappable, and metrics with no upstream source keep template sample values
with a warning note instead of fabricated numbers.
Template-path resolution branches on isCompiledBinary() (dev: module-relative to
repo root; compiled: cwd), matching how rules lint --file resolves paths, since
templates are not embedded.
Verified: bun test 633 pass (6 new reports tests), tsc clean, oxlint 0 warnings.
Live smoke: 2026-08 report for a real corp fills real accuracy/counts/distribution
and marks human-accuracy + mismatch-classification + section-6 sample rows with
gap notes.