diff --git a/skills/code-clean/SKILL.md b/skills/code-clean/SKILL.md index b852f38..56fc4ce 100644 --- a/skills/code-clean/SKILL.md +++ b/skills/code-clean/SKILL.md @@ -3,7 +3,7 @@ name: code-clean description: | Full codebase cleanup: dead code, style/norm enforcement, structural issues. Two-phase: read-only audit, then approved fixes only - (refactorer agent). + (code-cleaner executor; refactorer inline for style/structural items). Triggers: "code-clean", "remove dead code", "cleanup", "nettoyage du code", "code hygiene". Targeted refactor without audit → /refactor. Bugs found → logged to diff --git a/skills/code-clean/test-prompts.json b/skills/code-clean/test-prompts.json index 927ff42..30575b0 100644 --- a/skills/code-clean/test-prompts.json +++ b/skills/code-clean/test-prompts.json @@ -1,5 +1,5 @@ [ - {"id": 1, "prompt": "Clean up the codebase — remove dead code and enforce style", "expected": "Two-phase: audit report first (read-only), wait for approval, then execute approved fixes via refactorer agent"}, + {"id": 1, "prompt": "Clean up the codebase — remove dead code and enforce style", "expected": "Two-phase: audit report first (read-only), wait for approval, then execute approved fixes via the code-cleaner executor (refactorer inline-loaded for style/structural items)"}, {"id": 2, "prompt": "Cleanup just the src/utils/ folder", "expected": "Scoped audit of src/utils/ only, list dead code + style violations, get approval, fix"}, - {"id": 3, "prompt": "Find dead code in this project but don't change anything yet", "expected": "Audit-only mode: produce report at .claude/audits/, do not execute fixes, BUGS-FOUND.md if bugs detected"} + {"id": 3, "prompt": "Find dead code in this project but don't change anything yet", "expected": "Audit-only mode: report persisted to .claude/tasks/plans/ and presented inline; no fixes, no commit; bugs listed in the report (BUGS-FOUND.md is written only by the PHASE 2 executor)"} ] diff --git a/skills/prune-memory/SKILL.md b/skills/prune-memory/SKILL.md index 3e0541a..21ba59d 100644 --- a/skills/prune-memory/SKILL.md +++ b/skills/prune-memory/SKILL.md @@ -317,15 +317,10 @@ NEXT: review `git diff .claude/memory/`, then `/commit-change` ## TDD note (skill itself) -v1 ships without baseline test scenarios per superpowers:writing-skills -Iron Law. Recommended before relying on the skill in production: - -1. RED: spawn subagent, give it a real `.claude/memory/` snapshot, ask - "prune obsolete entries". Document what it does naturally. -2. GREEN: invoke `/prune-memory` on the same snapshot. Verify it - follows STEP 0–4 + respects append-only rule. -3. REFACTOR: log any new rationalizations the subagent finds; add - counters to the "Common mistakes" / "Failure paths" tables. - -Until TDD is done, the skill is v1-untested. STEP 2 approval gate is -the human safety net. +Baseline RED scenarios were run and their counters are embedded: the +RED-2/RED-5/RED-6 guards live in the body above, and `tests/` holds the +fixtures (red3-negation, red4-journal, red6-orphan) plus +`run-deterministic.sh` and `run-behavioral.md`. New rationalizations a +subagent finds → add the fixture and its counter to the "Common +mistakes" / "Failure paths" tables (`tests/BACKLOG.md` tracks candidates). +STEP 2's approval gate remains the human safety net regardless.