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.
AGENT.md was a misremembering of AGENTS.md (no plural); the rule at the end of AGENTS.md therefore pointed at a file that should never exist. Remove the symlink and name AGENTS.md instead. CLAUDE.md -> AGENTS.md stays as the genuine consumer link.
Claude Code reads CLAUDE.md and the AGENT.md convention names AGENT.md, while the repo's instructions live in AGENTS.md. Two symlinks let both consumers resolve the same single source without duplicating content. AGENTS.md already prefers AGENT.md at project scope.
Drop rules whose targets are gone: *.log, tmp/ (+ its gitkeep dance), exports/, and the enterprise-configs section (enterprises/ no longer exists). Keep the live noise: node_modules, .DS_Store, dist/bin, and the local runtime dirs that get recreated on every run (.cache, .mimosa, .apifox, .local, scripts/export-*.ts). Organized into Build / Runtime groups.
- ops/ never said what it holds; wsl-infra/ carries the systemd release-sync and backup scripts that run on the WSL host
- remove enterprises/: the loader only reads ~/.config/seal-use/enterprises, so the in-repo dir (examples + local copies) was dead config; AGENTS/README/SECURITY no longer reference it, the .gitignore whitelist is gone, and doctor's local.json comment points at the global dir
- docs update: SECURITY custom-linter scope narrowed to the global dir; rule-lint.md documents the manifest-driven plaintext exposure
- checker implementations move to linter/checkers/, eliminating the builtin/strict/hlab + index + types files sitting flat in linter/
- manifest.ts is the single source of truth for which official linters exist and which are plaintext-exposed (plaintext flag)
- plaintext.generated.ts replaces the hand-maintained official-templates.ts (580 lines): generated from checkers/ by scripts/generate-linter-plaintext.mjs, refreshed by bump-version, guarded in CI by verify:linter-plaintext
- loader is manifest-driven (list, resolve, aliases); cwd linter loading is removed - custom linters resolve only from ~/.config/seal-use/linters/
README documented commands the dispatcher no longer accepts: `seal-use tool
<toolName>` and `seal-use tools list` were both dropped in v0.10.39 while the
README kept telling readers to run them (verified: both answer "Unknown
command"). It also described `./enterprises` as loaded by default, which a test
explicitly asserts is *not*, claimed the HTTP adapter does not serve the
OpenAPI document it serves at `/openapi.json`, described `service start` as a
stdio wrapper rather than the HTTP adapter it runs, and said the MCP server
advertises exactly one tool when it advertises two (and none without
`SEAL_USE_MCP_ENABLED`).
Each claim was rewritten against the code. The `seal-use update` paragraph now
describes all three installation modes instead of only the source-checkout one.
To keep the docs from drifting again, the suite now scans README, AGENTS.md,
SECURITY.md, the skill references, and the `.agents/rules` for `seal-use <area>`
and fails if any area is not dispatchable — it flags `tool` and `tools` on the
pre-fix README, so the check is live rather than decorative.
The adapter's CORS allow-list offered `X-Seal-Home-Session` and openapi
declared it as a `localSession` security scheme required on every operation —
while no handler ever consulted the header and the scheme's own description
admitted it authenticates nothing. Generated clients would fabricate a token
for a check that does not exist, and a browser client sending it could fail a
preflight against a header the server no longer offers.
Remove the header from the allow-list (it now mirrors the two headers this
adapter actually reads), drop the scheme and its `security` requirement, and
state the trust model plainly in `info.description` where an API consumer sees
it. SECURITY.md keeps the authoritative wording and points at that paragraph
instead of at a scheme that no longer exists.
The local-adapter stance itself is untouched: no authentication is added, per
`.agents/rules/security-posture.md`.
The stdout contract was enforced by review alone, which is how `probe` shipped
prose on the machine channel: 161 output sites and no test ever asked which
stream they used. This test scans `src/` for `console.log` / `process.stdout.write`
calls and fails on any file outside the documented exceptions — `printer.ts`
(the machine-channel writer), the two document-dump commands (`doctor guide`,
`skill dump`), and the entry points that echo the captured result.
Asserted in both directions: a new writer fails, and an allow-listed file that
stops writing fails too, so the exception list cannot outlive its justification.