@claude-pw/framework 0.9.0 → 0.10.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,18 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
4
4
|
|
|
5
|
+
## [0.10.0] - 2026-03-15
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Plan completion lifecycle: summary generation (plan-summary.md), docs evolution review, DONE state in STATUS.md
|
|
9
|
+
- Robust new cycle detection in `/cpw-startup`: 3 signals (STATUS.md DONE, PLAN.md all-done, PLAN.md all-archived)
|
|
10
|
+
- Context loading before new cycle interview: loads architecture, interfaces, decisions, prior summary
|
|
11
|
+
- Plan summary preserved across cycles (renamed to plan-summary-[date].md)
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- `/cpw-next-step` no longer creates dead-end STATUS.md pointing to non-existent phase after last phase completes
|
|
15
|
+
- `/cpw-cleanup` edge cases: empty results after filtering, commit skip when only .planning/ modified, dynamic commit messages
|
|
16
|
+
|
|
5
17
|
## [0.9.0] - 2026-03-15
|
|
6
18
|
|
|
7
19
|
### Added
|
package/install.js
CHANGED
|
@@ -547,6 +547,7 @@ async function main() {
|
|
|
547
547
|
copyIfMissing(path.join(templatesDir, 'planning', 'learnings', 'queue.md'), path.join('.planning', 'learnings', 'queue.md'));
|
|
548
548
|
copyIfMissing(path.join(templatesDir, 'planning', 'learnings', 'applied.md'), path.join('.planning', 'learnings', 'applied.md'));
|
|
549
549
|
copyIfMissing(path.join(templatesDir, 'planning', 'config.json'), path.join('.planning', 'config.json'));
|
|
550
|
+
copyIfMissing(path.join(templatesDir, 'planning', 'plan-summary.md'), path.join('.planning', 'plan-summary.md'));
|
|
550
551
|
|
|
551
552
|
// Root files with template variable substitution
|
|
552
553
|
const vars = { PROJECT_NAME: projectName, DATE: date };
|
package/package.json
CHANGED
|
@@ -78,6 +78,12 @@ NO CHANGES:
|
|
|
78
78
|
|
|
79
79
|
If nothing to clean in a category, omit it from the summary.
|
|
80
80
|
|
|
81
|
+
If ALL lists are empty after step 1 filtering (no files to archive, nothing exceeds retention limits, no stale files):
|
|
82
|
+
```
|
|
83
|
+
Nothing to clean — completed phases already archived and accumulated state within retention limits.
|
|
84
|
+
```
|
|
85
|
+
STOP.
|
|
86
|
+
|
|
81
87
|
If `--execute`: show the summary and proceed to step 3.
|
|
82
88
|
Otherwise: ask "Proceed? (yes/no)". If no: STOP.
|
|
83
89
|
|
|
@@ -119,12 +125,19 @@ Delete identified stale files (handoff.md, uat.md).
|
|
|
119
125
|
### 3.7 Commit
|
|
120
126
|
Read `commitPlanning` from `.planning/config.json`.
|
|
121
127
|
|
|
128
|
+
Build commit message based on what was actually executed:
|
|
129
|
+
- If phases were archived AND state was trimmed: `"chore: archive phases N-M and trim planning state"`
|
|
130
|
+
- If only phases were archived: `"chore: archive completed phases N-M"`
|
|
131
|
+
- If only state was trimmed: `"chore: trim accumulated planning state"`
|
|
132
|
+
|
|
122
133
|
Git add the changes:
|
|
123
134
|
- `PLAN.md` (always — sub-plan column updated)
|
|
124
135
|
- `plans/` (always — phase files removed)
|
|
125
136
|
- `.planning/` (only if `commitPlanning: true`)
|
|
126
137
|
|
|
127
|
-
|
|
138
|
+
Check if there are staged changes (`git diff --cached --quiet`).
|
|
139
|
+
- If there are changes: `make commit m="[built message]"`
|
|
140
|
+
- 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."
|
|
128
141
|
|
|
129
142
|
## 4. Report
|
|
130
143
|
|
|
@@ -52,6 +52,16 @@ If STATUS.md does not exist:
|
|
|
52
52
|
- STOP. Do not continue.
|
|
53
53
|
|
|
54
54
|
- Read STATUS.md -> phase, step, stage
|
|
55
|
+
- If phase = "DONE":
|
|
56
|
+
- Report:
|
|
57
|
+
```
|
|
58
|
+
Plan is complete — all phases finished.
|
|
59
|
+
|
|
60
|
+
Next:
|
|
61
|
+
/cpw-cleanup — archive completed phases
|
|
62
|
+
/cpw-startup — start a new development cycle
|
|
63
|
+
```
|
|
64
|
+
- STOP. Do not continue.
|
|
55
65
|
- Read indicated sub-plan (plans/phase-N.md)
|
|
56
66
|
- 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.
|
|
57
67
|
- If `plans/phase-N-context.md` exists (from /cpw-discuss), load it too
|
|
@@ -566,6 +576,93 @@ If all deliverables passed (or issues were fixed):
|
|
|
566
576
|
- **trunk-based**: already on main, nothing to do
|
|
567
577
|
- **feature-branch**: create PR from `phase-N/[slug]` to main. Report PR URL. Wait for merge (or auto-merge if user approves). After merge: `git checkout main && git pull`
|
|
568
578
|
- **gitflow**: create PR from `feature/phase-N-[slug]` to develop. Report PR URL. Wait for merge. After merge: `git checkout develop && git pull`
|
|
579
|
+
- Delete `.planning/.phase-active` if it exists (re-enables normal tool permissions)
|
|
580
|
+
|
|
581
|
+
#### Check if this is the LAST phase
|
|
582
|
+
Read PLAN.md. Check if there is a next phase (any phase with Status "pending" or a `plans/phase-[N+1].md` file).
|
|
583
|
+
|
|
584
|
+
**If there is NO next phase — plan complete:**
|
|
585
|
+
|
|
586
|
+
#### Plan completion summary
|
|
587
|
+
Generate `.planning/plan-summary.md`:
|
|
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.
|
|
632
|
+
|
|
633
|
+
#### Mark DONE
|
|
634
|
+
- Update STATUS.md to DONE state:
|
|
635
|
+
```
|
|
636
|
+
## Now
|
|
637
|
+
- Phase: DONE
|
|
638
|
+
- Step: --
|
|
639
|
+
- Stage: --
|
|
640
|
+
- Sub-plan: --
|
|
641
|
+
|
|
642
|
+
## Required context
|
|
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.
|
|
664
|
+
|
|
665
|
+
**If there IS a next phase — normal advancement:**
|
|
569
666
|
- Reset STATUS.md for next phase:
|
|
570
667
|
```
|
|
571
668
|
## Now
|
|
@@ -580,7 +677,6 @@ If all deliverables passed (or issues were fixed):
|
|
|
580
677
|
## Session notes
|
|
581
678
|
- (empty)
|
|
582
679
|
```
|
|
583
|
-
- Delete `.planning/.phase-active` if it exists (re-enables normal tool permissions)
|
|
584
680
|
- If `--phase` flag is active: STOP. Do NOT advance to next phase. Report:
|
|
585
681
|
```
|
|
586
682
|
Phase N complete. UAT passed.
|
|
@@ -8,6 +8,55 @@ analysis report. You can stop after the scan by declining plan generation.
|
|
|
8
8
|
|
|
9
9
|
## 0. MODE DETECTION
|
|
10
10
|
|
|
11
|
+
### Check for existing completed plan (new cycle detection)
|
|
12
|
+
Detect new cycle by ANY of these signals:
|
|
13
|
+
1. STATUS.md exists with `Phase: DONE` (explicit completion)
|
|
14
|
+
2. PLAN.md exists AND all phases have Status "done" AND no phase has Status "in progress" or "pending" (implicit completion — STATUS.md may be missing or corrupted)
|
|
15
|
+
3. PLAN.md exists with phases marked "(archived)" AND no active phases (post-cleanup completion)
|
|
16
|
+
|
|
17
|
+
If PLAN.md exists with phases "in progress" or "pending" → NOT a new cycle. Skip to standard mode detection below.
|
|
18
|
+
|
|
19
|
+
If ANY signal matches → **NEW CYCLE** mode:
|
|
20
|
+
|
|
21
|
+
#### Load project context
|
|
22
|
+
Before interviewing, load what exists:
|
|
23
|
+
- Read `docs/architecture.md` — current architecture
|
|
24
|
+
- Read `docs/interfaces.md` — current interfaces
|
|
25
|
+
- Read `plans/decisions.md` — accumulated decisions
|
|
26
|
+
- Read `.planning/plan-summary.md` (if exists) — what was built in the last cycle
|
|
27
|
+
- Read `.planning/config.json` — workflow settings (carry over, don't re-ask)
|
|
28
|
+
|
|
29
|
+
#### Present status and ask
|
|
30
|
+
```
|
|
31
|
+
Detected a completed plan.
|
|
32
|
+
|
|
33
|
+
Previously built:
|
|
34
|
+
[summary from plan-summary.md, or phase list from PLAN.md if no summary]
|
|
35
|
+
|
|
36
|
+
Architecture: [key points from architecture.md]
|
|
37
|
+
Active decisions: [count from decisions.md]
|
|
38
|
+
|
|
39
|
+
Starting a new development cycle. This will:
|
|
40
|
+
- Keep all existing code, docs, and project structure
|
|
41
|
+
- Keep .planning/config.json (workflow settings carry over)
|
|
42
|
+
- Keep plans/decisions.md (cumulative)
|
|
43
|
+
- Add new phases to PLAN.md (continuing phase numbering)
|
|
44
|
+
|
|
45
|
+
What do you want to build next?
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Route to interview
|
|
49
|
+
- Skip mode detection (already have code), skip scan (already know the codebase), skip workflow configuration (config.json already exists).
|
|
50
|
+
- Go directly to step 3 (INTERVIEW) — scope the interview to the NEW work only. Use the loaded docs as context for what already exists.
|
|
51
|
+
- In step 4 (PLAN GENERATION):
|
|
52
|
+
- Do NOT overwrite PLAN.md — append new phases to the existing table, continuing the phase numbering (e.g., if last phase was 5, new phases start at 6)
|
|
53
|
+
- Do NOT overwrite docs/ or decisions.md
|
|
54
|
+
- Do NOT regenerate Phase 0 (stack already set up) or Phase 1 (interfaces already defined) unless the user explicitly requests it
|
|
55
|
+
- Generate new phase-N.md sub-plans for the new work
|
|
56
|
+
- Reset STATUS.md to point to the first new phase
|
|
57
|
+
- Continue to step 5 (PLAN REVIEW) and step 6 (COMMIT AND START) as normal.
|
|
58
|
+
|
|
59
|
+
### Standard mode detection (no existing plan or plan in progress)
|
|
11
60
|
Check the directory state:
|
|
12
61
|
- Are there source files? (src/, lib/, app/, *.py, *.ts, *.go, etc.)
|
|
13
62
|
- Is there git history? (more than 3 commits)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Plan Summary
|
|
2
|
+
|
|
3
|
+
## Completed
|
|
4
|
+
- **Date**: --
|
|
5
|
+
- **Phases**: --
|
|
6
|
+
- **Steps**: --
|
|
7
|
+
|
|
8
|
+
## Phases
|
|
9
|
+
| # | Phase | Steps | Key output |
|
|
10
|
+
|---|-------|-------|------------|
|
|
11
|
+
|
|
12
|
+
## Key decisions
|
|
13
|
+
(from plans/decisions.md)
|
|
14
|
+
|
|
15
|
+
## Key deliverables
|
|
16
|
+
(from phase objectives)
|