config-audit/scanners
Kjell Tore Guttormsen f93830ce74 feat(campaign): durable machine-wide campaign-ledger core (v5.7 Fase 2 Block 3a THIN)
Add the durable ledger that sits ABOVE individual config-audit sessions for a
machine-wide audit campaign: repo list + per-repo lifecycle (pending → audited →
planned → implemented) + a machine-wide roll-up by status and severity.

scanners/lib/campaign-ledger.mjs — same hybrid split as knowledge-refresh:
- PURE transforms (createLedger / addRepo / setRepoStatus / rollUp) with `now`
  injected (YYYY-MM-DD, never the clock) → deterministic + unit-testable.
- soft validateLedger (returns {valid,errors}, never throws) for loaded data;
  transforms throw on programmer error (invalid status, unknown path).
- thin IO shell (defaultLedgerPath / loadLedger→null-on-ENOENT / saveLedger).
- persists to ~/.claude/config-audit/campaign-ledger.json — OUTSIDE the plugin
  dir (next to sessions/) so it survives uninstall/reinstall/upgrade.
- schemaVersion stamped from the start → cheap Block 4 migration.

THIN scope (Block 3a, operator-approved): ledger + roll-up + persistence only —
no CLI/command/execution (Blocks 3b/3c/4). Internal plumbing, byte-stable until
consumed: no `export async function scan` + lives in lib/ → scanner count stays
15, no orchestrator wiring, SC-5 unchanged.

tests/lib/campaign-ledger.test.mjs — 28 tests (TDD, red→green). Full hermetic
suite 1091→1119 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 13:30:44 +02:00
..
lib feat(campaign): durable machine-wide campaign-ledger core (v5.7 Fase 2 Block 3a THIN) 2026-06-22 13:30:44 +02:00
cache-prefix-scanner.mjs fix(tokens): refresh stale "Opus 4.7" framing to model-neutral + Opus 4.8 anchor 2026-06-18 15:27:36 +02:00
claude-md-linter.mjs feat(rul,cml): durability findings — config lost after compaction (v5.5.0 / A) 2026-06-20 11:20:04 +02:00
collision-scanner.mjs feat(config-audit): cross-plugin collision scanner COL (v5 N6) [skip-docs] 2026-05-01 07:46:15 +02:00
conflict-detector.mjs fix(permissions): param-aware DIS dead-allow + CNF conflict matching 2026-06-18 13:06:20 +02:00
disabled-in-schema-scanner.mjs feat(dis): flag forbidden-param permission rules CC silently ignores 2026-06-19 14:04:25 +02:00
drift-cli.mjs feat(humanizer): forbidden-words lint runner + test wrapper (SC-3) [skip-docs] 2026-05-01 18:11:15 +02:00
feature-gap-scanner.mjs feat(feature-gap): recommend disableBundledSkills under skill-listing pressure 2026-06-18 21:38:19 +02:00
fix-cli.mjs feat(humanizer): forbidden-words lint runner + test wrapper (SC-3) [skip-docs] 2026-05-01 18:11:15 +02:00
fix-engine.mjs fix(hkv,rul): add 3 verified hook events; correct globs-rule wording 2026-06-20 09:56:00 +02:00
hook-validator.mjs fix(hkv): remove post-session — it is a runner hook, not a settings event 2026-06-20 10:12:52 +02:00
import-resolver.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
knowledge-refresh-cli.mjs feat(knowledge): knowledge-refresh — living register, deterministic stale core + web poll (v5.7 Chunk 3) 2026-06-21 19:22:57 +02:00
manifest.mjs feat(mft): v5.6 B1 — load-pattern accounting in manifest 2026-06-20 17:48:55 +02:00
mcp-config-validator.mjs fix(mcp-config-validator): remove invented trust field (verify-first) 2026-06-18 14:22:56 +02:00
optimization-lens-scanner.mjs feat(opt): optimization lens CA-OPT-001 (procedure→skill) — v5.7 Fase 1 Chunk 2a 2026-06-20 23:10:03 +02:00
optimize-lens-cli.mjs feat(opt): optimization lens Chunk 2b — opus prose-judgment analyzer + /config-audit optimize 2026-06-21 14:01:18 +02:00
output-style-scanner.mjs feat(ost): v5.6 C — output-style scanner (CA-OST, count 13→14) 2026-06-20 21:02:44 +02:00
plugin-health-scanner.mjs feat(plh): flag plugin-agent frontmatter Claude Code ignores (v5.5.0 / E) 2026-06-20 11:11:12 +02:00
posture.mjs feat(humanizer): forbidden-words lint runner + test wrapper (SC-3) [skip-docs] 2026-05-01 18:11:15 +02:00
rollback-engine.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
rules-validator.mjs feat(rul,cml): durability findings — config lost after compaction (v5.5.0 / A) 2026-06-20 11:20:04 +02:00
scan-orchestrator.mjs feat(opt): optimization lens CA-OPT-001 (procedure→skill) — v5.7 Fase 1 Chunk 2a 2026-06-20 23:10:03 +02:00
self-audit.mjs feat(skill-listing): add SKL scanner for the skill-listing token budget 2026-06-18 17:36:28 +02:00
settings-validator.mjs feat(set): validate autoMode structure + flag it in shared settings (CA-SET) 2026-06-19 22:14:26 +02:00
skill-listing-scanner.mjs refactor(skl): extract skill-listing budget to shared lib (single source of truth) 2026-06-18 21:23:01 +02:00
token-hotspots-cli.mjs fix(tokens): refresh stale "Opus 4.7" framing to model-neutral + Opus 4.8 anchor 2026-06-18 15:27:36 +02:00
token-hotspots.mjs feat(tok,acr): v5.6 B2 — load-pattern column in token-hotspots 2026-06-20 20:21:01 +02:00
whats-active.mjs feat(humanizer): wire humanizer into 6 remaining CLIs with --raw 2026-05-01 17:47:09 +02:00