config-audit/commands
Kjell Tore Guttormsen acd1cf1248 fix(commands): stop writing files no later step can read, and payloads nobody asked for
Dogfooding the four read commands (posture, tokens, manifest, whats-active)
surfaced four defect classes, all in the seam between what a command template
promises and what the scanner behind it actually does.

M-BUG-40, fifth arm: posture wrote four temp files it could never read back.
#49 closed the $$/cross-block class in four commands, but posture survived it —
and so did the guard written to prevent exactly this. The guard compared each
$$ path to the block that created it, so a path written once and then read via
prose had no second occurrence to flag. Measured live: written from PID 21614,
read attempted from PID 23772. The invariant is now blanket (no $$ in any temp
path), which also caught fix.md and feature-gap.md.

M-BUG-43: 6 of 7 scanners write their payload to stdout when --raw/--json is
set even when --output-file was given, and the templates redirected only
stderr. Measured: posture 255 182 B, whats-active 35 922 B, drift 28 316 B,
manifest 23 825 B, tokens 8 768 B. fix and feature-gap never read the file they
wrote, so both recovered one letter grade from a quarter-megabyte dump.

tokens swallowed --json and --with-telemetry-recipe: documented, never
threaded, so --json returned the humanized payload where the docs promise
byte-stable v5.0.0 output.

M-BUG-42: manifest's render contract asked for {load}; the payload carries
loadPattern, so the Load column rendered blank for all 96 rows.

Four new tests (1449 -> 1453), each verified red before the fix. The
render-contract test checks {field} names against a live payload from a
fixture, since a hardcoded key list would drift. Frozen v5.0.0 snapshots
untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VGCk9o27eWo9uXLjkZTXEq
2026-08-01 20:40:07 +02:00
..
analyze.md fix(commands): stop assuming shell state survives between blocks 2026-08-01 20:12:17 +02:00
campaign.md fix(commands): stop assuming shell state survives between blocks 2026-08-01 20:12:17 +02:00
cleanup.md fix(commands): close the promises the command templates could not keep 2026-07-31 21:27:07 +02:00
config-audit.md fix(commands): stop writing files no later step can read, and payloads nobody asked for 2026-08-01 20:40:07 +02:00
discover.md fix(commands): stop writing files no later step can read, and payloads nobody asked for 2026-08-01 20:40:07 +02:00
drift.md fix(commands): stop writing files no later step can read, and payloads nobody asked for 2026-08-01 20:40:07 +02:00
feature-gap.md fix(commands): stop writing files no later step can read, and payloads nobody asked for 2026-08-01 20:40:07 +02:00
fix.md fix(commands): stop writing files no later step can read, and payloads nobody asked for 2026-08-01 20:40:07 +02:00
help.md fix(commands): wire knowledge-refresh into router + help 2026-06-23 10:31:05 +02:00
implement.md fix(commands): stop assuming shell state survives between blocks 2026-08-01 20:12:17 +02:00
interview.md fix(commands): stop assuming shell state survives between blocks 2026-08-01 20:12:17 +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 fix(commands): stop writing files no later step can read, and payloads nobody asked for 2026-08-01 20:40:07 +02:00
optimize.md feat(optimize): add --subtract, the subtraction axis, behind a deterministic floor 2026-07-31 16:24:51 +02:00
plan.md fix(commands): stop assuming shell state survives between blocks 2026-08-01 20:12:17 +02:00
plugin-health.md fix(commands): stop writing files no later step can read, and payloads nobody asked for 2026-08-01 20:40:07 +02:00
posture.md fix(commands): stop writing files no later step can read, and payloads nobody asked for 2026-08-01 20:40:07 +02:00
rollback.md fix(rollback): restore the backup path contract the engine and the commands disagreed on 2026-07-31 17:23:30 +02:00
status.md fix(commands): close the promises the command templates could not keep 2026-07-31 21:27:07 +02:00
tokens.md fix(commands): stop writing files no later step can read, and payloads nobody asked for 2026-08-01 20:40:07 +02:00
whats-active.md fix(commands): stop writing files no later step can read, and payloads nobody asked for 2026-08-01 20:40:07 +02:00