@@ -7,6 +7,41 @@ the format of planning files. Update all migration scripts (1.0.8.sh, 1.0.9.sh,
772.0.sh, 2.1.sh) to process closed issues. Update all relevant convention files to reflect
88the new policy.
99
10+ ## Research Findings
11+
12+ Investigation of the current codebase reveals:
13+
14+ 1 . ** CLAUDE.md** contains the rule: "Do not update closed issue files: Never modify PLAN.md or STATE.md of closed
15+ issues unless the user explicitly instructs you to. Closed issues are historical records." This rule applies to
16+ manual agent edits but does not exempt migration scripts. It needs to be updated to clarify that migration scripts
17+ are an exception.
18+
19+ 2 . ** 2.1.sh** has two phases that explicitly skip closed issues:
20+ - Phase 13 (lines 1095-1100): Skips closed issues when removing deprecated Last Updated, Completed, and Closed
21+ fields from STATE.md files
22+ - Phase 14 (lines 1156-1165): Skips closed issues when renaming ## Satisfies → ## Parent Requirements in PLAN.md
23+ - All other phases (1-12, 15-21) already process all issues including closed ones
24+
25+ 3 . ** 1.0.8.sh, 1.0.9.sh, 1.0.10.sh, 2.0.sh** : None of these scripts filter by issue status. They already process
26+ all issues (open and closed).
27+
28+ 4 . ** ` .claude/rules/common.md ` ** § "No Backwards Compatibility" mentions migration scripts must be idempotent but
29+ does not address whether closed issues should be migrated.
30+
31+ 5 . ** Multiple closed issue plan.md files** reference "closed issues are historical records" as rationale for skipping
32+ them during migration. These are historical records themselves and should not be modified.
33+
34+ ## Risk Assessment
35+ - ** Risk Level:** LOW
36+ - ** Concerns:** Migration scripts touching closed issue files could theoretically corrupt historical data
37+ - ** Mitigation:** Changes are idempotent (sed replacements are no-ops if already migrated); convention update
38+ explicitly scopes the exception to automated migration scripts only
39+
40+ ## Files to Modify
41+ - ` CLAUDE.md ` - Update "Do not update closed issue files" rule to exempt migration scripts
42+ - ` .claude/rules/common.md ` - Add guidance that migration scripts must process all issues including closed ones
43+ - ` plugin/migrations/2.1.sh ` - Remove closed-issue skipping from phases 13 and 14
44+
1045## Pre-conditions
1146
1247(none)
@@ -19,3 +54,48 @@ the new policy.
1954- [ ] CLAUDE.md and all relevant convention files updated to reflect the new policy
2055- [ ] Tests passing
2156- [ ] E2E: Run an updated migration script on a repo with closed issues and verify they are migrated
57+
58+ ## Jobs
59+
60+ ### Job 1
61+ - Update ` CLAUDE.md ` § "Do not update closed issue files" to add an exception for automated migration scripts.
62+ The updated text should clarify that the rule applies to manual agent edits during normal workflow, but
63+ automated migration scripts (under ` plugin/migrations/ ` ) must process all issues including closed ones to
64+ ensure consistent file formats across the entire issue tree.
65+ - Files: ` CLAUDE.md `
66+ - Update ` .claude/rules/common.md ` § "No Backwards Compatibility" to add a paragraph after the "Idempotency"
67+ paragraph stating that migration scripts must process all issues regardless of status (open or closed).
68+ Closed issues contain the same file formats as open issues and must be migrated to maintain consistency.
69+ The existing CLAUDE.md rule about not modifying closed issues applies only to manual agent edits, not
70+ automated migrations.
71+ - Files: ` .claude/rules/common.md `
72+ - Update ` plugin/migrations/2.1.sh ` Phase 13 (around lines 1090-1126):
73+ 1 . Remove the ` phase13_skipped=0 ` variable initialization (line 1090)
74+ 2 . Remove the 6-line "Skip closed issues" block (lines 1095-1100) that checks for ` **Status:** closed ` and
75+ continues
76+ 3 . Update the phase title comment (line 1074): change ` from open issue-level STATE.md ` to
77+ ` from issue-level STATE.md `
78+ 4 . Update the log message (line 1077): change ` from open issue-level STATE.md ` to
79+ ` from issue-level STATE.md `
80+ 5 . Update the summary log (line 1126): change
81+ ` "Phase 13 complete: $phase13_changed files changed, $phase13_skipped closed issues skipped" ` to
82+ ` "Phase 13 complete: $phase13_changed files changed" `
83+ - Files: ` plugin/migrations/2.1.sh `
84+ - Update ` plugin/migrations/2.1.sh ` Phase 14 (around lines 1146-1173):
85+ 1 . Remove the ` phase14_skipped=0 ` variable initialization (line 1146)
86+ 2 . Remove the 10-line "Skip closed issues" block (lines 1156-1165) that checks STATE.md for closed status
87+ and continues
88+ 3 . Update the phase title comment (line 1130): change ` in open issue PLAN.md files ` to
89+ ` in issue PLAN.md files `
90+ 4 . Update the log message (line 1133): change ` in open issue PLAN.md files ` to ` in issue PLAN.md files `
91+ 5 . Update the summary log (line 1173): change
92+ ` "Phase 14 complete: $phase14_changed files changed, $phase14_skipped closed issues skipped" ` to
93+ ` "Phase 14 complete: $phase14_changed files changed" `
94+ - Files: ` plugin/migrations/2.1.sh `
95+ - Update ` plugin/migrations/2.1.sh ` header comments (lines 34-37): Remove the "(closed issues are not modified)"
96+ annotations from items 13 and 14 in the changes list.
97+ - Files: ` plugin/migrations/2.1.sh `
98+ - Verify that 1.0.8.sh, 1.0.9.sh, 1.0.10.sh, and 2.0.sh already process all issues (no closed-issue filtering).
99+ No changes expected — this is a verification step only.
100+ - Run ` mvn -f client/pom.xml test ` to verify all tests pass
101+ - Update index.json to status: closed, progress: 100%
0 commit comments