fix(skill): prune-memory v1.1 — deterministic guards close 6 TDD'd defects

Only destructive skill, previously untested. A RED suite (tests/) proved 6
dangers; each closed by a deterministic guard:
- RED-1 removed false "Fixed in v1.1 (TDD found it)" verify claim
- RED-2 STEP 0 dirty-tree is now a real exit 1 (was a prose-only STOP)
- RED-3 STEP 3.4 negation-sentence verbatim guard (no silent inversion)
- RED-4 STEP 1-A collapse safety-critical exception (NEVER/ALWAYS/PERMANENT)
- RED-5 STEP 4 fidelity census (count-based, per-entry x per-category)
- RED-6 STEP 4 trailing-space false-ORPHAN fix
Tests: run-deterministic.sh (all-green), run-behavioral.md, fixtures, BACKLOG
(RED-7/RED-8 open). Validated on the real learnings.md: 0 fidelity
false-positive vs 13, scope held, registry reverted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W9sqAwZxBMZSynZoVrEJhd
This commit is contained in:
Bastien Chanot
2026-06-25 22:56:10 +02:00
co-authored by Claude Opus 4.8
parent 9a58734286
commit 0a3e76611d
7 changed files with 356 additions and 6 deletions
@@ -0,0 +1,13 @@
# Journal
## 2025-11-03
- Shipped v2 auth migration. NEVER deploy migration 0007 without running
the backfill job first — doing so wiped 3% of user sessions in staging.
Root cause: FK cascade on the sessions table. This is a PERMANENT rule.
- Minor: bumped eslint to 9.x.
## 2026-01-15
- Refactored billing module. No relation to the auth work above.
## 2026-06-20
- Current session: started prune-memory TDD work.