chore(release): v5.8.0 — campaign motor (Fase 2)

Bump plugin.json 5.7.0 -> 5.8.0, README version badge + version-history row,
and CHANGELOG [5.8.0]. Covers the full Fase 2 campaign motor (durable ledger,
read-only campaign-cli, human-approved campaign-write-cli + /config-audit
campaign, cross-repo backlog, per-repo plan export with execution-by-reuse)
plus the pre-release cleanup (knowledge-refresh wiring, CLAUDE.md trim).

Scanner count 15, agents 7, commands 20 -> 21, tests 1091 -> 1168. All counts
verified green via self-audit --check-readme.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-06-23 12:03:36 +02:00
commit 759daa7201
3 changed files with 54 additions and 2 deletions

View file

@ -5,6 +5,57 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [5.8.0] - 2026-06-23
### Summary
"Campaign motor" — a durable, machine-wide audit **campaign** that sits ABOVE individual sessions.
A single audited repo is one session; a fleet of repos is a campaign. This release adds a durable
ledger (per-repo lifecycle + machine-wide roll-up), a read-only reporter and a human-approved write
surface behind one `/config-audit campaign` command, a cross-repo prioritized backlog, and per-repo
plan export — with execution deliberately **reusing** the existing implement/rollback engines rather
than adding new machinery. The whole campaign surface is `-cli`/lib only, so the scanner count stays
**15**, agents **7**, and the snapshot suite is untouched; commands 20 → **21**.
### Added
- **Durable campaign ledger (`scanners/lib/campaign-ledger.mjs`).** The ledger that sits above
sessions: a repo list + per-repo lifecycle (`pending → audited → planned → implemented`) + a
machine-wide roll-up (counts by status and by severity, aggregated across repos). Persists to a
single JSON file **outside** the plugin dir (`~/.claude/config-audit/campaign-ledger.json`, next
to `sessions/`) so it survives uninstall / reinstall / upgrade. Pure transforms
(`createLedger` / `addRepo` / `setRepoStatus` / `rollUp`) with `now` injected (never the clock) +
a soft `validateLedger` + a thin IO shell; `schemaVersion` stamped from the start.
- **Cross-repo prioritized backlog (`buildBacklog`).** One machine-wide work list — each item is a
repo (the ledger tracks per-repo severity *counts*, not individual findings), ordered by a
weighted severity score (`critical:1000 / high:100 / medium:10 / low:1`) with a deterministic
tie-break so criticals always win. Includes only repos not yet `implemented` that have known
findings.
- **`/config-audit campaign` (commands 20 → 21).** A thin orchestrator that always **reports** first
(read-only `campaign-cli`: status, roll-up, backlog) and, for `init` / `add` / `set-status`,
proposes the change and mutates **only on explicit human approval** via `campaign-write-cli` — it
never hand-edits the ledger JSON (verification duty). `add --discover <root>` finds git repos
under a root to pick from; marking a repo `audited` attaches findings-by-severity from its session
(or user-provided counts), never invented.
- **Per-repo plan export (`campaign-export-cli`).** `--repo <path>` resolves the repo's linked
session, reads its `action-plan.md`, and (under opt-in `--write`) drops a provenance-stamped,
byte-faithful copy into that repo's own `docs/config-audit-plan-<session>.md` — a durable record
next to the code it changes. Advisory gates for "no session linked" / "no action plan yet".
### Changed
- **Execution by reuse.** A campaign adds no execution engine of its own: the exported `docs/` file
is the durable record, while `/config-audit implement` (backup + apply + verify) and
`/config-audit rollback` do the work, then `campaign set-status <repo> implemented` records it.
- **`knowledge-refresh` wired into the surface.** The v5.7.0 `knowledge-refresh` command shipped but
was never routed; it is now in the `/config-audit` router (argument-hint + routing) and the `help`
command table.
- **CLAUDE.md trimmed to lean invariants.** The 19 per-scanner / per-block implementation notes
moved verbatim into `docs/scanner-internals.md` ("Implementation notes"); CLAUDE.md drops
540 → 134 lines (raising its own config grade B → A). A real "Conventions" section now points at
`.claude/rules/`.
### Tests
- 1091 → **1168** (campaign ledger +28, read-only campaign-cli +8, campaign-write-cli +11,
cross-repo backlog +12, plan-export +18).
## [5.7.0] - 2026-06-21
### Summary