|
| 1 | +# Refactor: Clean Up plugin/skills/learn/ Files |
| 2 | + |
| 3 | +## Goal |
| 4 | + |
| 5 | +Remove retroactive commentary from learn skill files (violates the no-retrospective-commentary rule in `.claude/rules/common.md`) and rename uppercase filenames to lowercase for consistency. |
| 6 | + |
| 7 | +## Background |
| 8 | + |
| 9 | +An analysis of `plugin/skills/learn/` found: |
| 10 | +- Five files contain Mxxx provenance markers or "why this gate exists" historical framing: `HOOK-WORKAROUNDS.md`, `MULTIPLE-MISTAKES.md`, `PRIMING-VERIFICATION.md`, `RELATED-FILES-CHECK.md`, `phase-prevent.md` |
| 11 | +- Six files use uppercase names: `ANTI-PATTERNS.md`, `EXAMPLES.md`, `HOOK-WORKAROUNDS.md`, `MULTIPLE-MISTAKES.md`, `PRIMING-VERIFICATION.md`, `RELATED-FILES-CHECK.md` |
| 12 | +- The `.claude/rules/common.md` § "No retrospective commentary" rule prohibits documenting what was changed/fixed historically |
| 13 | + |
| 14 | +## Files to Modify |
| 15 | + |
| 16 | +### Retroactive commentary removal |
| 17 | + |
| 18 | +| File | Retroactive content to remove | |
| 19 | +|------|-------------------------------| |
| 20 | +| `plugin/skills/learn/HOOK-WORKAROUNDS.md` | "Example - M398" label and M398 framing | |
| 21 | +| `plugin/skills/learn/MULTIPLE-MISTAKES.md` | M378 historical reference | |
| 22 | +| `plugin/skills/learn/PRIMING-VERIFICATION.md` | "M370 as why gate exists" framing | |
| 23 | +| `plugin/skills/learn/RELATED-FILES-CHECK.md` | M341 in title and body | |
| 24 | +| `plugin/skills/learn/phase-prevent.md` | M305, A002, M422 motivating-gate framing | |
| 25 | + |
| 26 | +### Filename renames (uppercase → lowercase) |
| 27 | + |
| 28 | +| Old name | New name | |
| 29 | +|----------|----------| |
| 30 | +| `ANTI-PATTERNS.md` | `anti-patterns.md` | |
| 31 | +| `EXAMPLES.md` | `examples.md` | |
| 32 | +| `HOOK-WORKAROUNDS.md` | `hook-workarounds.md` | |
| 33 | +| `MULTIPLE-MISTAKES.md` | `multiple-mistakes.md` | |
| 34 | +| `PRIMING-VERIFICATION.md` | `priming-verification.md` | |
| 35 | +| `RELATED-FILES-CHECK.md` | `related-files-check.md` | |
| 36 | + |
| 37 | +### Cross-reference updates |
| 38 | + |
| 39 | +Files that reference the renamed files and must be updated: |
| 40 | +- `plugin/skills/learn/first-use.md` → references `EXAMPLES.md`, `ANTI-PATTERNS.md` |
| 41 | +- `plugin/skills/learn/phase-analyze.md` → references `MULTIPLE-MISTAKES.md`, `HOOK-WORKAROUNDS.md` |
| 42 | +- `plugin/skills/learn/phase-prevent.md` → references `PRIMING-VERIFICATION.md`, `RELATED-FILES-CHECK.md` |
| 43 | + |
| 44 | +## Execution Plan |
| 45 | + |
| 46 | +### Step 1: Remove retroactive commentary |
| 47 | + |
| 48 | +For each file with retroactive content: |
| 49 | +- Remove or rewrite sentences/sections that frame current rules as "this exists because of Mxxx" |
| 50 | +- Example fix pattern: "This gate exists because of M305" → Remove the sentence entirely; the gate's purpose should be described by what it does, not why it was added |
| 51 | +- Example fix for labeled examples: "Example - M398" → "Example" (keep the example content, drop the mistake ID label) |
| 52 | +- Keep the behavioral content; only strip the retrospective framing |
| 53 | + |
| 54 | +### Step 2: Rename files |
| 55 | + |
| 56 | +Use `git mv` to rename each uppercase file to lowercase (preserves git history): |
| 57 | +```bash |
| 58 | +cd plugin/skills/learn |
| 59 | +git mv ANTI-PATTERNS.md anti-patterns.md |
| 60 | +git mv EXAMPLES.md examples.md |
| 61 | +git mv HOOK-WORKAROUNDS.md hook-workarounds.md |
| 62 | +git mv MULTIPLE-MISTAKES.md multiple-mistakes.md |
| 63 | +git mv PRIMING-VERIFICATION.md priming-verification.md |
| 64 | +git mv RELATED-FILES-CHECK.md related-files-check.md |
| 65 | +``` |
| 66 | + |
| 67 | +### Step 3: Update cross-references |
| 68 | + |
| 69 | +Update all references in: |
| 70 | +- `plugin/skills/learn/first-use.md` |
| 71 | +- `plugin/skills/learn/phase-analyze.md` |
| 72 | +- `plugin/skills/learn/phase-prevent.md` |
| 73 | + |
| 74 | +### Step 4: Verify and test |
| 75 | + |
| 76 | +- Confirm no uppercase filenames remain in `plugin/skills/learn/` |
| 77 | +- Confirm no Mxxx provenance markers remain in learn skill files |
| 78 | +- Run `mvn -f client/pom.xml test` and confirm all tests pass |
| 79 | +- Confirm cross-references in SKILL.md and phase files point to lowercase filenames |
| 80 | + |
| 81 | +## Post-conditions |
| 82 | + |
| 83 | +- [ ] No Mxxx provenance markers or "why this gate exists" retrospective framing in any `plugin/skills/learn/` file |
| 84 | +- [ ] All previously uppercase filenames in `plugin/skills/learn/` are now lowercase |
| 85 | +- [ ] All cross-references within the learn skill updated to lowercase filenames |
| 86 | +- [ ] Tests pass (`mvn -f client/pom.xml test` exits 0) |
| 87 | +- [ ] E2E: Load `plugin/skills/learn/first-use.md` and confirm it references `examples.md` and `anti-patterns.md` (lowercase) |
0 commit comments