config-audit/commands
Kjell Tore Guttormsen 319e5541c9 feat(campaign): plan export + execution-by-reuse (v5.7 Fase 2 Block 4c)
Completes Block 4 (4b backlog + 4c export/execution). Asymmetric: plan
export is new testable code; execution is pure reuse of the existing
per-repo implement/rollback (no new execution machinery), per the plan's
"reuse existing backup/rollback".

Plan export ("planer følger arbeidsstedet"):
- scanners/lib/campaign-export.mjs (pure, now injected, 8 tests):
  planExportPath(repo,sessionId) -> <repo>/docs/config-audit-plan-<sessionId>.md
  (sessionId-keyed so same-day re-audits never collide);
  buildPlanExportDocument({...,now}) -> provenance header + verbatim plan.
- scanners/campaign-export-cli.mjs (-cli, read-only by default, 10 tests):
  --repo resolves the repo's linked session, reads its action-plan.md,
  assembles the doc, emits {exportable,problems,targetPath,document}. Two
  gates -> exit 1 advisory: no-session-linked / no-action-plan. Writes the
  file ONLY under opt-in --write (byte-faithful copy; the LLM never re-types
  a 200-line plan). --sessions-dir override for hermetic tests; exit 0/1/3.

Command: commands/campaign.md gains an `export <path>` mode (Step 6:
preview -> approve -> --write), then routes the user to the existing
/config-audit implement (backup + verify) + rollback + set-status
implemented. Nothing auto-written (Verifiseringsplikt).

Byte-stable: lib + -cli + command-doc only -> scanner count stays 15,
agents 7, commands 21 (export is a mode, not a new command), SC-5 +
backcompat suite untouched. suite 1150->1168. Block 4a (migrateLedger)
still deferred to the first breaking schema change.

Docs: CLAUDE.md section + badge 1150->1168/65->67 files; README badge +
campaign row + Testing prose (fixed stale 1055/59 -> true 1168/67).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 10:08:04 +02:00
..
analyze.md feat(humanizer): update audit/analysis command templates group B [skip-docs] 2026-05-01 19:45:55 +02:00
campaign.md feat(campaign): plan export + execution-by-reuse (v5.7 Fase 2 Block 4c) 2026-06-23 10:08:04 +02:00
cleanup.md feat(humanizer): update action command templates [skip-docs] 2026-05-01 19:50:47 +02:00
config-audit.md feat(campaign): /config-audit campaign — human-approved write-CLI + command (v5.7 Fase 2 Block 3c) 2026-06-22 17:25:15 +02:00
discover.md feat(humanizer): update audit/analysis command templates group B [skip-docs] 2026-05-01 19:45:55 +02:00
drift.md feat(humanizer): update audit/analysis command templates group B [skip-docs] 2026-05-01 19:45:55 +02:00
feature-gap.md feat(humanizer): update audit/analysis command templates group A [skip-docs] 2026-05-01 19:41:08 +02:00
fix.md feat(humanizer): update action command templates [skip-docs] 2026-05-01 19:50:47 +02:00
help.md feat(campaign): /config-audit campaign — human-approved write-CLI + command (v5.7 Fase 2 Block 3c) 2026-06-22 17:25:15 +02:00
implement.md feat(humanizer): update action command templates [skip-docs] 2026-05-01 19:50:47 +02:00
interview.md feat(humanizer): update action command templates [skip-docs] 2026-05-01 19:50:47 +02:00
knowledge-refresh.md feat(knowledge): knowledge-refresh — living register, deterministic stale core + web poll (v5.7 Chunk 3) 2026-06-21 19:22:57 +02:00
manifest.md feat(mft): v5.6 B1 — load-pattern accounting in manifest 2026-06-20 17:48:55 +02:00
optimize.md feat(opt): optimization lens Chunk 2b — opus prose-judgment analyzer + /config-audit optimize 2026-06-21 14:01:18 +02:00
plan.md feat(humanizer): update action command templates [skip-docs] 2026-05-01 19:50:47 +02:00
plugin-health.md feat(humanizer): update audit/analysis command templates group B [skip-docs] 2026-05-01 19:45:55 +02:00
posture.md feat(humanizer): update audit/analysis command templates group A [skip-docs] 2026-05-01 19:41:08 +02:00
rollback.md feat(humanizer): update action command templates [skip-docs] 2026-05-01 19:50:47 +02:00
status.md feat(humanizer): update audit/analysis command templates group B [skip-docs] 2026-05-01 19:45:55 +02:00
tokens.md feat(tok,acr): v5.6 B2 — load-pattern column in token-hotspots 2026-06-20 20:21:01 +02:00
whats-active.md feat(humanizer): update audit/analysis command templates group A [skip-docs] 2026-05-01 19:41:08 +02:00