Skip to content

Commit 9c2ed31

Browse files
committed
planning: add 2.1-refactor-learn-skill-files
1 parent d4bc5b5 commit 9c2ed31

3 files changed

Lines changed: 94 additions & 0 deletions

File tree

.cat/issues/v2/v2.1/STATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Finalize naming conventions and UI polish before recording demo videos.
122122
- parallelize-review-concern-fixing
123123
- add-failure-investigation-to-skill-builder
124124
- fix-skill-builder-fresh-subagent-per-run
125+
- refactor-learn-skill-files
125126

126127

127128
## Issues Closed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# State
2+
3+
- **Status:** open
4+
- **Progress:** 0%
5+
- **Dependencies:** []
6+
- **Blocks:** []

0 commit comments

Comments
 (0)