@claude-pw/framework 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/RELEASES.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
4
4
|
|
|
5
|
+
## [0.11.0] - 2026-03-15
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Plan completion is now a clean cycle: last phase → auto-delegates to `/cpw-cleanup --complete`
|
|
9
|
+
- `/cpw-cleanup --complete` mode: generates plan summary, reviews docs, archives ALL phases, resets execution state, deletes STATUS.md
|
|
10
|
+
- `/cpw-startup` new cycle detection simplified: PLAN.md + config.json exist, STATUS.md absent
|
|
11
|
+
- `/cpw-next-step` slimmed down — completion logic moved to cleanup (net -110 lines)
|
|
12
|
+
- Workflow is now fully cyclical: startup → next-step (loop) → cleanup --complete → startup
|
|
13
|
+
|
|
5
14
|
## [0.10.0] - 2026-03-15
|
|
6
15
|
|
|
7
16
|
### Added
|
package/package.json
CHANGED
|
@@ -5,8 +5,123 @@ description: "Archive completed phases and clean accumulated state"
|
|
|
5
5
|
## Arguments
|
|
6
6
|
- No arguments: dry-run (show what would be cleaned, ask for confirmation)
|
|
7
7
|
- `--execute`: skip confirmation, execute immediately
|
|
8
|
+
- `--complete`: full plan completion cycle (summary, docs review, archive ALL, reset state). Auto-triggered by `/cpw-next-step` when the last phase completes. Can also be run manually.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## --complete mode (plan completion cycle)
|
|
13
|
+
|
|
14
|
+
If `--complete` is passed, execute the full completion cycle. This mode is designed to
|
|
15
|
+
close a finished plan, archive everything, and leave the project ready for `/cpw-startup`.
|
|
16
|
+
|
|
17
|
+
### 1. Plan completion summary
|
|
18
|
+
Generate `.planning/plan-summary.md`:
|
|
19
|
+
- Read all phase sub-plans (plans/phase-N.md for each phase in PLAN.md)
|
|
20
|
+
- Read plans/decisions.md
|
|
21
|
+
- For each phase, extract: name, step count, Objective line
|
|
22
|
+
- From decisions.md, extract decisions made during these phases
|
|
23
|
+
- Get date range from git: first plan commit and today
|
|
24
|
+
|
|
25
|
+
Write `.planning/plan-summary.md`:
|
|
26
|
+
```markdown
|
|
27
|
+
# Plan Summary
|
|
28
|
+
|
|
29
|
+
## Completed
|
|
30
|
+
- **Date**: [today]
|
|
31
|
+
- **Phases**: [N]
|
|
32
|
+
- **Steps**: [total across all phases]
|
|
33
|
+
|
|
34
|
+
## Phases
|
|
35
|
+
| # | Phase | Steps | Key output |
|
|
36
|
+
|---|-------|-------|------------|
|
|
37
|
+
| 0 | Stack and Scaffolding | 6 | Project setup, toolchain, CI |
|
|
38
|
+
| 1 | Interfaces | 5 | Module contracts, type system |
|
|
39
|
+
| ... | ... | ... | ... |
|
|
40
|
+
|
|
41
|
+
## Key decisions
|
|
42
|
+
- Phase N: [decision summary from decisions.md]
|
|
43
|
+
- ...
|
|
44
|
+
|
|
45
|
+
## Key deliverables
|
|
46
|
+
- [extracted from each phase's Objective]
|
|
47
|
+
- ...
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If a previous `.planning/plan-summary.md` exists (from a prior cycle), rename it
|
|
51
|
+
to `.planning/plan-summary-[date].md` before writing the new one.
|
|
52
|
+
|
|
53
|
+
### 2. Docs evolution review
|
|
54
|
+
Review if docs/ need updating after the full plan:
|
|
55
|
+
- Read `docs/architecture.md` — does it reflect what was actually built?
|
|
56
|
+
Compare with the plan phases and deliverables. If outdated, update it.
|
|
57
|
+
- Read `docs/interfaces.md` — are interfaces current with the final state of `src/interfaces/`?
|
|
58
|
+
If outdated, update it.
|
|
59
|
+
- If any docs were updated:
|
|
60
|
+
`make commit m="docs: update architecture and interfaces after plan completion"`
|
|
61
|
+
|
|
62
|
+
This is a lightweight pass to catch drift — not a full rewrite.
|
|
63
|
+
|
|
64
|
+
### 3. Archive ALL phase files
|
|
65
|
+
```bash
|
|
66
|
+
mkdir -p .planning/archive
|
|
67
|
+
```
|
|
68
|
+
For every phase in PLAN.md (regardless of `archiveCompletedPhases` config — in --complete mode, everything gets archived):
|
|
69
|
+
- Move `plans/phase-N.md` to `.planning/archive/phase-N.md`
|
|
70
|
+
- Move `plans/phase-N-context.md` to `.planning/archive/phase-N-context.md` (if exists)
|
|
71
|
+
|
|
72
|
+
Update PLAN.md: sub-plan column → `(archived)` for all phases.
|
|
73
|
+
|
|
74
|
+
### 4. Reset execution state
|
|
75
|
+
Clean all execution artifacts. These served the current plan cycle and are not needed for the next:
|
|
76
|
+
- **Delete** `STATUS.md` (session pointer — no longer needed)
|
|
77
|
+
- **Reset** `.planning/quick/log.md` to empty table header only
|
|
78
|
+
- **Delete** all files in `.planning/debug/resolved/`
|
|
79
|
+
- **Delete** `.planning/debug/active-session.md` (if exists)
|
|
80
|
+
- **Reset** `.planning/learnings/queue.md` to empty
|
|
81
|
+
- **Reset** `.planning/learnings/applied.md` to empty (already applied to rules/skills)
|
|
82
|
+
- **Delete** `.planning/handoff.md` (if exists)
|
|
83
|
+
- **Delete** `.planning/uat.md` (if exists)
|
|
84
|
+
|
|
85
|
+
Do NOT touch (project context that survives between cycles):
|
|
86
|
+
- `plans/decisions.md` — cumulative project history
|
|
87
|
+
- `docs/*` — project documentation (just reviewed in step 2)
|
|
88
|
+
- `.planning/config.json` — workflow settings carry over
|
|
89
|
+
- `.planning/plan-summary.md` — just generated in step 1
|
|
90
|
+
- `PLAN.md` — updated with (archived) markers
|
|
91
|
+
- `CLAUDE.md` — project instructions
|
|
92
|
+
- `.claude/skills/*` — extracted knowledge
|
|
93
|
+
- `.claude/rules/*` — project rules
|
|
94
|
+
- All source code, tests, Makefile, etc.
|
|
95
|
+
|
|
96
|
+
### 5. Commit
|
|
97
|
+
`make commit m="chore: plan complete — archived [N] phases, reset execution state"`
|
|
98
|
+
|
|
99
|
+
### 6. Report
|
|
100
|
+
```
|
|
101
|
+
══════════════════════════════════════
|
|
102
|
+
PLAN COMPLETE
|
|
103
|
+
══════════════════════════════════════
|
|
104
|
+
All [N] phases finished.
|
|
105
|
+
Summary: .planning/plan-summary.md
|
|
106
|
+
|
|
107
|
+
Archived: [N] phase files → .planning/archive/
|
|
108
|
+
Cleaned: STATUS.md, quick log, debug sessions, learnings
|
|
109
|
+
|
|
110
|
+
Project is ready for the next development cycle.
|
|
111
|
+
Run /cpw-startup to begin.
|
|
112
|
+
══════════════════════════════════════
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
STOP.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Standard mode (mid-plan cleanup)
|
|
120
|
+
|
|
121
|
+
If `--complete` is NOT passed, run the standard cleanup flow below.
|
|
122
|
+
This is for archiving completed phases while the plan is still in progress.
|
|
123
|
+
|
|
124
|
+
### 0. Load state
|
|
10
125
|
|
|
11
126
|
Read `.planning/config.json` -> extract `cleanupPolicy` (use defaults if missing):
|
|
12
127
|
- `archiveCompletedPhases`: true
|
|
@@ -23,9 +138,9 @@ Nothing to clean up. All phases are current or pending.
|
|
|
23
138
|
```
|
|
24
139
|
STOP.
|
|
25
140
|
|
|
26
|
-
|
|
141
|
+
### 1. Identify what to clean
|
|
27
142
|
|
|
28
|
-
|
|
143
|
+
#### 1.1 Completed phase files
|
|
29
144
|
If `archiveCompletedPhases` is true:
|
|
30
145
|
For each phase with Status "done" in PLAN.md:
|
|
31
146
|
- Check if `plans/phase-N.md` still exists (not already archived)
|
|
@@ -33,26 +148,26 @@ For each phase with Status "done" in PLAN.md:
|
|
|
33
148
|
- Add to archive list
|
|
34
149
|
- NEVER archive the current phase or pending phases
|
|
35
150
|
|
|
36
|
-
|
|
151
|
+
#### 1.2 Quick log done entries
|
|
37
152
|
Read `.planning/quick/log.md` (if exists):
|
|
38
153
|
- Count entries with Status: done or dismissed
|
|
39
154
|
- If count > `keepQuickLogDone`: mark oldest excess entries for removal
|
|
40
155
|
|
|
41
|
-
|
|
156
|
+
#### 1.3 Resolved debug sessions
|
|
42
157
|
List `.planning/debug/resolved/` (if exists):
|
|
43
158
|
- Count files
|
|
44
159
|
- If count > `keepResolvedDebug`: mark oldest files for deletion (by filename date prefix)
|
|
45
160
|
|
|
46
|
-
|
|
161
|
+
#### 1.4 Applied learnings
|
|
47
162
|
Read `.planning/learnings/applied.md` (if exists):
|
|
48
163
|
- Count entries (each entry starts with `---`)
|
|
49
164
|
- If count > `keepAppliedLearnings`: mark oldest excess entries for trimming
|
|
50
165
|
|
|
51
|
-
|
|
166
|
+
#### 1.5 Stale files
|
|
52
167
|
- `.planning/handoff.md` — if it exists AND STATUS.md does NOT show a handoff in progress
|
|
53
168
|
- `.planning/uat.md` — if it exists AND all phases it references are done (no active UAT)
|
|
54
169
|
|
|
55
|
-
|
|
170
|
+
### 2. Present cleanup plan
|
|
56
171
|
|
|
57
172
|
```
|
|
58
173
|
Cleanup Summary:
|
|
@@ -87,9 +202,9 @@ STOP.
|
|
|
87
202
|
If `--execute`: show the summary and proceed to step 3.
|
|
88
203
|
Otherwise: ask "Proceed? (yes/no)". If no: STOP.
|
|
89
204
|
|
|
90
|
-
|
|
205
|
+
### 3. Execute
|
|
91
206
|
|
|
92
|
-
|
|
207
|
+
#### 3.1 Archive phase files
|
|
93
208
|
```bash
|
|
94
209
|
mkdir -p .planning/archive
|
|
95
210
|
```
|
|
@@ -97,7 +212,7 @@ For each phase in the archive list:
|
|
|
97
212
|
- Move `plans/phase-N.md` to `.planning/archive/phase-N.md`
|
|
98
213
|
- Move `plans/phase-N-context.md` to `.planning/archive/phase-N-context.md` (if exists)
|
|
99
214
|
|
|
100
|
-
|
|
215
|
+
#### 3.2 Update PLAN.md
|
|
101
216
|
For each archived phase, change the sub-plan column from `plans/phase-N.md` to `(archived)`:
|
|
102
217
|
```
|
|
103
218
|
| 0 | Stack and Scaffolding | plans/phase-0.md | done |
|
|
@@ -107,22 +222,22 @@ becomes:
|
|
|
107
222
|
| 0 | Stack and Scaffolding | (archived) | done |
|
|
108
223
|
```
|
|
109
224
|
|
|
110
|
-
|
|
225
|
+
#### 3.3 Trim quick log
|
|
111
226
|
Remove done/dismissed entries beyond the keep limit from `.planning/quick/log.md`.
|
|
112
227
|
Keep the most recent N entries (by date). Preserve the table header.
|
|
113
228
|
|
|
114
|
-
|
|
229
|
+
#### 3.4 Delete old debug sessions
|
|
115
230
|
Delete files from `.planning/debug/resolved/` beyond the keep limit.
|
|
116
231
|
Delete the oldest by filename date prefix.
|
|
117
232
|
|
|
118
|
-
|
|
233
|
+
#### 3.5 Trim applied learnings
|
|
119
234
|
Remove the oldest entries from `.planning/learnings/applied.md` beyond the keep limit.
|
|
120
235
|
Keep the most recent N entries. Each entry is delimited by `---`.
|
|
121
236
|
|
|
122
|
-
|
|
237
|
+
#### 3.6 Delete stale files
|
|
123
238
|
Delete identified stale files (handoff.md, uat.md).
|
|
124
239
|
|
|
125
|
-
|
|
240
|
+
#### 3.7 Commit
|
|
126
241
|
Read `commitPlanning` from `.planning/config.json`.
|
|
127
242
|
|
|
128
243
|
Build commit message based on what was actually executed:
|
|
@@ -139,7 +254,7 @@ Check if there are staged changes (`git diff --cached --quiet`).
|
|
|
139
254
|
- If there are changes: `make commit m="[built message]"`
|
|
140
255
|
- If there are NO changes (e.g., only .planning/ was modified and commitPlanning is false): skip commit. Report: "Only local state cleaned (.planning/ is gitignored) — no commit needed."
|
|
141
256
|
|
|
142
|
-
|
|
257
|
+
### 4. Report
|
|
143
258
|
|
|
144
259
|
```
|
|
145
260
|
Cleanup complete.
|
|
@@ -43,25 +43,24 @@ Delegate to the session-recovery agent in CHECK mode:
|
|
|
43
43
|
## 1. Load context
|
|
44
44
|
|
|
45
45
|
If STATUS.md does not exist:
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Next: run `/cpw-startup` to set up the project.
|
|
51
|
-
```
|
|
52
|
-
- STOP. Do not continue.
|
|
46
|
+
- If PLAN.md exists AND `.planning/config.json` exists:
|
|
47
|
+
- This project completed a plan cycle. Report:
|
|
48
|
+
```
|
|
49
|
+
Plan completed — project is ready for the next development cycle.
|
|
53
50
|
|
|
54
|
-
-
|
|
55
|
-
|
|
51
|
+
Next: run `/cpw-startup` to start a new cycle.
|
|
52
|
+
```
|
|
53
|
+
- STOP.
|
|
54
|
+
- Otherwise:
|
|
56
55
|
- Report:
|
|
57
56
|
```
|
|
58
|
-
|
|
57
|
+
No STATUS.md found — this project hasn't been initialized yet.
|
|
59
58
|
|
|
60
|
-
Next:
|
|
61
|
-
/cpw-cleanup — archive completed phases
|
|
62
|
-
/cpw-startup — start a new development cycle
|
|
59
|
+
Next: run `/cpw-startup` to set up the project.
|
|
63
60
|
```
|
|
64
|
-
- STOP.
|
|
61
|
+
- STOP.
|
|
62
|
+
|
|
63
|
+
- Read STATUS.md -> phase, step, stage
|
|
65
64
|
- Read indicated sub-plan (plans/phase-N.md)
|
|
66
65
|
- If the file does not exist: report "Sub-plan plans/phase-N.md not found. STATUS.md may be pointing to a non-existent phase. Run `/cpw-health` to diagnose." STOP.
|
|
67
66
|
- If `plans/phase-N-context.md` exists (from /cpw-discuss), load it too
|
|
@@ -583,84 +582,12 @@ Read PLAN.md. Check if there is a next phase (any phase with Status "pending" or
|
|
|
583
582
|
|
|
584
583
|
**If there is NO next phase — plan complete:**
|
|
585
584
|
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
- Read all phase sub-plans (plans/phase-N.md for each phase in PLAN.md)
|
|
589
|
-
- Read plans/decisions.md
|
|
590
|
-
- For each phase, extract: name, step count, Objective line
|
|
591
|
-
- From decisions.md, extract decisions made during these phases
|
|
592
|
-
- Get date range from git: first plan commit and today
|
|
593
|
-
|
|
594
|
-
Write `.planning/plan-summary.md`:
|
|
595
|
-
```markdown
|
|
596
|
-
# Plan Summary
|
|
597
|
-
|
|
598
|
-
## Completed
|
|
599
|
-
- **Date**: [today]
|
|
600
|
-
- **Phases**: [N]
|
|
601
|
-
- **Steps**: [total across all phases]
|
|
602
|
-
|
|
603
|
-
## Phases
|
|
604
|
-
| # | Phase | Steps | Key output |
|
|
605
|
-
|---|-------|-------|------------|
|
|
606
|
-
| 0 | Stack and Scaffolding | 6 | Project setup, toolchain, CI |
|
|
607
|
-
| 1 | Interfaces | 5 | Module contracts, type system |
|
|
608
|
-
| ... | ... | ... | ... |
|
|
609
|
-
|
|
610
|
-
## Key decisions
|
|
611
|
-
- Phase N: [decision summary from decisions.md]
|
|
612
|
-
- ...
|
|
613
|
-
|
|
614
|
-
## Key deliverables
|
|
615
|
-
- [extracted from each phase's Objective]
|
|
616
|
-
- ...
|
|
617
|
-
```
|
|
618
|
-
|
|
619
|
-
If a previous `.planning/plan-summary.md` exists (from a prior cycle), rename it
|
|
620
|
-
to `.planning/plan-summary-[date].md` before writing the new one.
|
|
621
|
-
|
|
622
|
-
#### Docs evolution review
|
|
623
|
-
Review if docs/ need updating after the full plan:
|
|
624
|
-
- Read `docs/architecture.md` — does it reflect what was actually built?
|
|
625
|
-
Compare with the plan phases and deliverables. If outdated, update it.
|
|
626
|
-
- Read `docs/interfaces.md` — are interfaces current with the final state of `src/interfaces/`?
|
|
627
|
-
If outdated, update it.
|
|
628
|
-
- If any docs were updated:
|
|
629
|
-
`make commit m="docs: update architecture and interfaces after plan completion"`
|
|
630
|
-
|
|
631
|
-
This is a lightweight pass to catch drift — not a full rewrite.
|
|
585
|
+
All phases are done. Delegate the full completion cycle to `/cpw-cleanup --complete`.
|
|
586
|
+
This will: generate plan summary, review docs, archive all phases, reset execution state.
|
|
632
587
|
|
|
633
|
-
|
|
634
|
-
- Update STATUS.md to DONE state:
|
|
635
|
-
```
|
|
636
|
-
## Now
|
|
637
|
-
- Phase: DONE
|
|
638
|
-
- Step: --
|
|
639
|
-
- Stage: --
|
|
640
|
-
- Sub-plan: --
|
|
588
|
+
Execute `/cpw-cleanup --complete` now (invoke the command inline, do NOT ask the user to run it manually).
|
|
641
589
|
|
|
642
|
-
|
|
643
|
-
- PLAN.md
|
|
644
|
-
|
|
645
|
-
## Session notes
|
|
646
|
-
- All phases completed on [date]
|
|
647
|
-
- Plan summary: .planning/plan-summary.md
|
|
648
|
-
```
|
|
649
|
-
- `make commit m="chore: plan complete — summary and status updated"`
|
|
650
|
-
- Report:
|
|
651
|
-
```
|
|
652
|
-
══════════════════════════════════════
|
|
653
|
-
PLAN COMPLETE
|
|
654
|
-
══════════════════════════════════════
|
|
655
|
-
All [N] phases finished.
|
|
656
|
-
Summary: .planning/plan-summary.md
|
|
657
|
-
|
|
658
|
-
Next steps:
|
|
659
|
-
1. /cpw-cleanup — archive completed phases and clean state
|
|
660
|
-
2. /cpw-startup — start a new development cycle (adds new phases to the existing project)
|
|
661
|
-
3. Nothing — the project is done
|
|
662
|
-
```
|
|
663
|
-
- STOP. Do NOT attempt to advance to a non-existent phase.
|
|
590
|
+
After cleanup completes, STOP. Do NOT attempt to advance to a non-existent phase.
|
|
664
591
|
|
|
665
592
|
**If there IS a next phase — normal advancement:**
|
|
666
593
|
- Reset STATUS.md for next phase:
|
|
@@ -10,9 +10,8 @@ analysis report. You can stop after the scan by declining plan generation.
|
|
|
10
10
|
|
|
11
11
|
### Check for existing completed plan (new cycle detection)
|
|
12
12
|
Detect new cycle by ANY of these signals:
|
|
13
|
-
1.
|
|
14
|
-
2. PLAN.md exists AND all phases have Status "done" AND no phase has Status "in progress" or "pending" (implicit completion —
|
|
15
|
-
3. PLAN.md exists with phases marked "(archived)" AND no active phases (post-cleanup completion)
|
|
13
|
+
1. PLAN.md exists AND `.planning/config.json` exists AND STATUS.md does NOT exist (post-completion state — STATUS.md was deleted by /cpw-cleanup --complete)
|
|
14
|
+
2. PLAN.md exists AND all phases have Status "done" AND no phase has Status "in progress" or "pending" (implicit completion — cleanup may not have run)
|
|
16
15
|
|
|
17
16
|
If PLAN.md exists with phases "in progress" or "pending" → NOT a new cycle. Skip to standard mode detection below.
|
|
18
17
|
|