qualia-framework 3.6.0 → 4.0.3
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/CLAUDE.md +23 -11
- package/README.md +96 -51
- package/agents/builder.md +25 -14
- package/agents/plan-checker.md +29 -16
- package/agents/planner.md +33 -24
- package/agents/research-synthesizer.md +25 -12
- package/agents/roadmapper.md +89 -84
- package/agents/verifier.md +11 -2
- package/bin/cli.js +18 -13
- package/bin/install.js +34 -45
- package/bin/qualia-ui.js +267 -1
- package/bin/state.js +164 -12
- package/bin/statusline.js +4 -1
- package/docs/erp-contract.md +12 -0
- package/guide.md +85 -22
- package/hooks/migration-guard.js +23 -9
- package/hooks/pre-compact.js +39 -11
- package/hooks/pre-deploy-gate.js +3 -4
- package/hooks/pre-push.js +6 -3
- package/hooks/session-start.js +8 -8
- package/package.json +1 -1
- package/rules/frontend.md +5 -13
- package/skills/qualia/SKILL.md +8 -1
- package/skills/qualia-build/SKILL.md +49 -4
- package/skills/qualia-debug/SKILL.md +6 -0
- package/skills/qualia-design/SKILL.md +9 -1
- package/skills/qualia-discuss/SKILL.md +6 -0
- package/skills/qualia-handoff/SKILL.md +92 -12
- package/skills/qualia-help/SKILL.md +18 -4
- package/skills/qualia-idk/SKILL.md +166 -0
- package/skills/qualia-learn/SKILL.md +6 -0
- package/skills/qualia-map/SKILL.md +7 -0
- package/skills/qualia-milestone/SKILL.md +128 -79
- package/skills/qualia-new/SKILL.md +163 -230
- package/skills/qualia-optimize/SKILL.md +8 -0
- package/skills/qualia-pause/SKILL.md +5 -0
- package/skills/qualia-plan/SKILL.md +25 -10
- package/skills/qualia-polish/SKILL.md +8 -0
- package/skills/qualia-quick/SKILL.md +7 -0
- package/skills/qualia-report/SKILL.md +17 -0
- package/skills/qualia-research/SKILL.md +7 -0
- package/skills/qualia-resume/SKILL.md +3 -0
- package/skills/qualia-review/SKILL.md +7 -0
- package/skills/qualia-ship/SKILL.md +5 -0
- package/skills/qualia-skill-new/SKILL.md +6 -0
- package/skills/qualia-task/SKILL.md +8 -1
- package/skills/qualia-test/SKILL.md +7 -0
- package/skills/qualia-verify/SKILL.md +65 -3
- package/templates/help.html +4 -4
- package/templates/journey.md +113 -0
- package/templates/plan.md +56 -11
- package/templates/requirements.md +82 -22
- package/templates/roadmap.md +41 -14
- package/templates/tracking.json +2 -0
- package/tests/hooks.test.sh +5 -5
- package/tests/runner.js +381 -7
|
@@ -1,160 +1,209 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qualia-milestone
|
|
3
|
-
description: "Close
|
|
3
|
+
description: "Close the current milestone and open the next one — loads the next milestone's scope from JOURNEY.md (no ad-hoc naming). Archives artifacts, marks requirements Complete, regenerates ROADMAP.md for the next milestone."
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Agent
|
|
4
10
|
---
|
|
5
11
|
|
|
6
12
|
# /qualia-milestone — Milestone Closeout
|
|
7
13
|
|
|
8
|
-
|
|
14
|
+
Triggered after `/qualia-verify` passes on the LAST phase of the current milestone. Archives the current milestone's artifacts, marks its requirements Complete, and opens the next milestone — **scope pulled directly from JOURNEY.md**, not improvised.
|
|
9
15
|
|
|
10
16
|
## When to Use
|
|
11
17
|
|
|
12
|
-
- After `/qualia-verify N` passes on the LAST phase of
|
|
13
|
-
- Before starting a v1.5 / v2.0 cycle
|
|
18
|
+
- After `/qualia-verify N` passes on the LAST phase of the current milestone
|
|
14
19
|
- NOT for individual phase completions — use `/qualia-verify N` for that
|
|
20
|
+
- NOT for starting a brand-new project — use `/qualia-new` for that
|
|
15
21
|
|
|
16
22
|
## Usage
|
|
17
23
|
|
|
18
|
-
`/qualia-milestone` — close the current milestone, open the next
|
|
24
|
+
`/qualia-milestone` — close the current milestone, open the next from JOURNEY.md
|
|
25
|
+
`/qualia-milestone --auto` — close + open next, then pause at the milestone boundary to ask "Continue to M{N+1}?" (the one human gate in auto mode beyond initial journey approval)
|
|
19
26
|
|
|
20
27
|
## Process
|
|
21
28
|
|
|
22
29
|
### 1. Validate Readiness
|
|
23
30
|
|
|
24
31
|
```bash
|
|
25
|
-
node ~/.claude/bin/state.js check
|
|
32
|
+
node ~/.claude/bin/state.js check
|
|
26
33
|
```
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
- `
|
|
31
|
-
|
|
35
|
+
`state.js close-milestone` enforces two guards:
|
|
36
|
+
- `MILESTONE_NOT_READY` — any phase not verified
|
|
37
|
+
- `MILESTONE_TOO_SMALL` — milestone has < 2 phases
|
|
38
|
+
|
|
39
|
+
If either fires (without `--force`), stop and show the error. The user must verify remaining phases first (or add `--force` for explicit bypass on a preview/demo milestone).
|
|
40
|
+
|
|
41
|
+
### 2. Banner + Confirm
|
|
32
42
|
|
|
33
|
-
If not ready:
|
|
34
43
|
```bash
|
|
35
|
-
node ~/.claude/bin/qualia-ui.js
|
|
44
|
+
node ~/.claude/bin/qualia-ui.js banner milestone
|
|
45
|
+
node ~/.claude/bin/qualia-ui.js journey-tree .planning/JOURNEY.md
|
|
36
46
|
```
|
|
37
|
-
Exit.
|
|
38
47
|
|
|
39
|
-
|
|
48
|
+
The journey-tree shows the user WHERE they are on the ladder before asking the close question. Read `.planning/JOURNEY.md` to find the next milestone's name + scope. Show:
|
|
49
|
+
- Current milestone name + phases completed + requirements delivered
|
|
50
|
+
- Next milestone name + phase sketch + why-now from JOURNEY.md
|
|
51
|
+
|
|
52
|
+
- header: "Close + open next?"
|
|
53
|
+
- question: "Close {current} and open Milestone {N+1}: {next name}?"
|
|
54
|
+
- options:
|
|
55
|
+
- "Close + open next" — archive this one, regenerate ROADMAP.md for {next name}
|
|
56
|
+
- "Pause" — don't close yet
|
|
57
|
+
|
|
58
|
+
### 3. Archive Current Milestone
|
|
40
59
|
|
|
41
60
|
```bash
|
|
42
|
-
|
|
61
|
+
milestone_slug="milestone-{N}-$(echo '{current name}' | tr '[:upper:] ' '[:lower:]-')"
|
|
62
|
+
mkdir -p .planning/archive/$milestone_slug
|
|
63
|
+
|
|
64
|
+
cp .planning/ROADMAP.md .planning/archive/$milestone_slug/ROADMAP.md
|
|
65
|
+
cp .planning/STATE.md .planning/archive/$milestone_slug/STATE.md
|
|
66
|
+
cp .planning/tracking.json .planning/archive/$milestone_slug/tracking.json
|
|
67
|
+
# Move per-phase artifacts if present
|
|
68
|
+
for f in .planning/phase-*-plan.md .planning/phase-*-verification.md .planning/phase-*-context.md .planning/phase-*-research.md .planning/phase-*-gaps-plan.md; do
|
|
69
|
+
[ -f "$f" ] && mv "$f" .planning/archive/$milestone_slug/ 2>/dev/null
|
|
70
|
+
done
|
|
43
71
|
```
|
|
44
72
|
|
|
45
|
-
###
|
|
73
|
+
### 4. Mark Requirements Complete
|
|
46
74
|
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
- Requirements delivered
|
|
75
|
+
Edit `.planning/REQUIREMENTS.md`:
|
|
76
|
+
- In the Traceability table, flip this milestone's REQ-IDs from Pending/In Progress → **Complete**
|
|
77
|
+
- Leave the per-milestone section structure intact (preserves history)
|
|
51
78
|
|
|
52
|
-
|
|
53
|
-
- question: "Close {milestone name} and move to the next milestone?"
|
|
54
|
-
- options:
|
|
55
|
-
- "Close it" — Archive and open next
|
|
56
|
-
- "Not yet" — I want to add more first
|
|
79
|
+
### 5. Close Milestone in State Machine
|
|
57
80
|
|
|
58
|
-
|
|
81
|
+
Closes current milestone's counters, appends a summary to `tracking.json` milestones[]:
|
|
59
82
|
|
|
60
83
|
```bash
|
|
61
|
-
|
|
62
|
-
cp .planning/ROADMAP.md .planning/archive/{milestone_slug}-ROADMAP.md
|
|
63
|
-
cp .planning/STATE.md .planning/archive/{milestone_slug}-STATE.md
|
|
64
|
-
cp .planning/tracking.json .planning/archive/{milestone_slug}-tracking.json
|
|
65
|
-
cp -r .planning/phases .planning/archive/{milestone_slug}-phases
|
|
84
|
+
node ~/.claude/bin/state.js close-milestone
|
|
66
85
|
```
|
|
67
86
|
|
|
68
|
-
|
|
87
|
+
If all phases are verified and ≥ 2 phases exist, this succeeds without `--force`. Otherwise add `--force` (rare — usually means the user is closing a preview/demo milestone).
|
|
88
|
+
|
|
89
|
+
### 6. Read Next Milestone From JOURNEY.md
|
|
90
|
+
|
|
91
|
+
Parse `.planning/JOURNEY.md` to extract the next milestone's:
|
|
92
|
+
- name
|
|
93
|
+
- phase list with goals
|
|
94
|
+
- requirements covered (REQ-IDs)
|
|
95
|
+
- exit criteria
|
|
69
96
|
|
|
70
|
-
|
|
71
|
-
- Mark every v1 requirement as Complete in the traceability table
|
|
72
|
-
- Move the `## v1 Requirements` section content to `## Completed (v1)` at the top (for historical reference)
|
|
73
|
-
- Elevate `## v2 Requirements` → `## v1 Requirements` (next milestone's scope)
|
|
97
|
+
If the next milestone is **Handoff** (always the last milestone), use the fixed 4-phase Handoff template (Polish, Content + SEO, Final QA, Handoff) from the journey template.
|
|
74
98
|
|
|
75
|
-
|
|
99
|
+
If JOURNEY.md doesn't exist (legacy project pre-v4), fall back to asking the user:
|
|
76
100
|
|
|
77
101
|
- header: "Next milestone"
|
|
78
102
|
- question: "What's the next milestone called?"
|
|
79
|
-
- options (dynamic):
|
|
80
|
-
- "v1.5 — {suggested name based on v2 requirements}"
|
|
81
|
-
- "v2.0 — {bigger rewrite}"
|
|
82
|
-
- "Custom name" — let me type it
|
|
83
103
|
|
|
84
|
-
|
|
104
|
+
Then manually sketch its phases. But ideally every v4 project has a JOURNEY.md from the start.
|
|
85
105
|
|
|
86
|
-
|
|
106
|
+
### 7. Regenerate ROADMAP.md for the New Milestone
|
|
107
|
+
|
|
108
|
+
Spawn the roadmapper with the next milestone's JOURNEY.md sketch as input:
|
|
87
109
|
|
|
88
110
|
```
|
|
89
111
|
Agent(prompt="
|
|
90
112
|
Read your role: @~/.claude/agents/roadmapper.md
|
|
91
113
|
|
|
92
|
-
<
|
|
93
|
-
|
|
114
|
+
<mode>next-milestone</mode>
|
|
115
|
+
<journey_file>.planning/JOURNEY.md</journey_file>
|
|
116
|
+
<next_milestone_num>{N+1}</next_milestone_num>
|
|
117
|
+
<next_milestone_name>{next name from JOURNEY.md}</next_milestone_name>
|
|
94
118
|
|
|
95
|
-
|
|
96
|
-
Milestone
|
|
119
|
+
<task>
|
|
120
|
+
Regenerate .planning/ROADMAP.md for Milestone {N+1}. The sketch in JOURNEY.md
|
|
121
|
+
gives you phase names + one-line goals — elevate to full phase-level detail:
|
|
122
|
+
- 2-5 success criteria per phase
|
|
123
|
+
- requirements coverage from REQUIREMENTS.md (section for this milestone)
|
|
124
|
+
- dependency ordering
|
|
125
|
+
|
|
126
|
+
Do NOT re-plan completed milestones. Do NOT create a new JOURNEY.md — the
|
|
127
|
+
existing one stays the source of truth.
|
|
128
|
+
|
|
129
|
+
After writing ROADMAP.md, update STATE.md via:
|
|
130
|
+
node ~/.claude/bin/state.js init --force \\
|
|
131
|
+
--project '{project}' --client '{client}' --type '{type}' \\
|
|
132
|
+
--milestone_name '{next name}' \\
|
|
133
|
+
--phases '<JSON: next milestone phases>' \\
|
|
134
|
+
--total_phases <count>
|
|
135
|
+
|
|
136
|
+
--force is needed because a project already exists.
|
|
137
|
+
</task>
|
|
138
|
+
", subagent_type="qualia-roadmapper", description="Open milestone {N+1}")
|
|
139
|
+
```
|
|
97
140
|
|
|
98
|
-
|
|
99
|
-
The previous milestone's archive is at .planning/archive/.
|
|
141
|
+
### 8. Commit
|
|
100
142
|
|
|
101
|
-
|
|
102
|
-
|
|
143
|
+
```bash
|
|
144
|
+
git add .planning/
|
|
145
|
+
git commit -m "milestone: close M{N} ({current name}) → open M{N+1} ({next name})"
|
|
103
146
|
```
|
|
104
147
|
|
|
105
|
-
###
|
|
148
|
+
### 9. Route (auto-chain aware — the milestone boundary is a human gate in auto mode)
|
|
106
149
|
|
|
107
|
-
|
|
150
|
+
**Case A: this WAS the Handoff milestone closing → project is done.**
|
|
108
151
|
|
|
109
152
|
```bash
|
|
110
|
-
node ~/.claude/bin/
|
|
153
|
+
node ~/.claude/bin/qualia-ui.js milestone-complete {N} "Handoff" ""
|
|
154
|
+
node ~/.claude/bin/qualia-ui.js end "PROJECT SHIPPED" "/qualia-report"
|
|
111
155
|
```
|
|
112
156
|
|
|
113
|
-
|
|
157
|
+
In `--auto` mode, inline-invoke `/qualia-report` and stop. No further chaining — the project is done.
|
|
114
158
|
|
|
115
|
-
|
|
159
|
+
**Case B: a non-final milestone just closed → next milestone is open.**
|
|
116
160
|
|
|
117
161
|
```bash
|
|
118
|
-
node ~/.claude/bin/
|
|
119
|
-
--project "{project name}" \
|
|
120
|
-
--client "{client}" \
|
|
121
|
-
--type "{type}" \
|
|
122
|
-
--phases '{JSON from new roadmap}' \
|
|
123
|
-
--total_phases {new N}
|
|
162
|
+
node ~/.claude/bin/qualia-ui.js milestone-complete {N} "{current name}" "{next name}"
|
|
124
163
|
```
|
|
125
164
|
|
|
126
|
-
|
|
165
|
+
**In `--auto` mode**, pause here and ask (this is ONE of the two human gates in auto mode, the other being journey approval at `/qualia-new` time):
|
|
166
|
+
|
|
167
|
+
- header: "Milestone {N} shipped"
|
|
168
|
+
- question: "Continue to Milestone {N+1}: {next name} now?"
|
|
169
|
+
- options:
|
|
170
|
+
- "Continue" — inline-invoke `/qualia-plan 1 --auto` for the new milestone
|
|
171
|
+
- "Pause here" — stop and let the user resume later with `/qualia-plan 1 --auto`
|
|
172
|
+
|
|
173
|
+
If "Continue": the auto-chain resumes. If "Pause": stop, show:
|
|
127
174
|
|
|
128
175
|
```bash
|
|
129
|
-
|
|
130
|
-
git commit -m "feat({milestone_slug}): close milestone, open {next milestone}"
|
|
176
|
+
node ~/.claude/bin/qualia-ui.js end "M{N} CLOSED · M{N+1} READY" "/qualia-plan 1 --auto"
|
|
131
177
|
```
|
|
132
178
|
|
|
133
|
-
|
|
179
|
+
**In guided mode**, always stop and show the next step regardless of position:
|
|
134
180
|
|
|
135
181
|
```bash
|
|
136
|
-
node ~/.claude/bin/qualia-ui.js end "
|
|
182
|
+
node ~/.claude/bin/qualia-ui.js end "M{N} CLOSED · M{N+1} OPEN" "/qualia-plan 1"
|
|
137
183
|
```
|
|
138
184
|
|
|
139
185
|
## What Stays, What Changes
|
|
140
186
|
|
|
141
187
|
**Stays:**
|
|
142
|
-
- `.planning/PROJECT.md` — the project doesn't change
|
|
143
|
-
- `.planning/
|
|
144
|
-
-
|
|
145
|
-
-
|
|
188
|
+
- `.planning/PROJECT.md` — the project identity doesn't change
|
|
189
|
+
- `.planning/JOURNEY.md` — the North Star is the SAME file across all milestones; don't regenerate it
|
|
190
|
+
- `.planning/DESIGN.md` — design system persists
|
|
191
|
+
- `.planning/archive/` — historical milestones preserved
|
|
192
|
+
- `tracking.json` lifetime fields + milestones[] array — cumulative history
|
|
146
193
|
|
|
147
194
|
**Changes:**
|
|
148
|
-
- `.planning/REQUIREMENTS.md` —
|
|
149
|
-
- `.planning/ROADMAP.md` —
|
|
150
|
-
- `.planning/STATE.md` — reset to Phase 1 of new milestone
|
|
195
|
+
- `.planning/REQUIREMENTS.md` — this milestone's REQ-IDs marked Complete
|
|
196
|
+
- `.planning/ROADMAP.md` — regenerated for the new milestone's phases
|
|
197
|
+
- `.planning/STATE.md` — reset to Phase 1 of the new milestone
|
|
151
198
|
|
|
152
199
|
**Discarded (but archived):**
|
|
153
|
-
- `.planning/
|
|
200
|
+
- `.planning/phase-*-*.md` files from the closed milestone — moved to archive
|
|
154
201
|
|
|
155
202
|
## Rules
|
|
156
203
|
|
|
157
|
-
1. **Don't close early.**
|
|
158
|
-
2. **
|
|
159
|
-
3. **
|
|
160
|
-
4. **
|
|
204
|
+
1. **Don't close early.** state.js enforces: all phases verified + ≥ 2 phases, unless `--force`.
|
|
205
|
+
2. **JOURNEY.md is the source of truth for next milestone.** Don't ask the user to name it unless JOURNEY.md is missing (legacy project).
|
|
206
|
+
3. **Archive, don't delete.** Old phase work stays accessible via `.planning/archive/`.
|
|
207
|
+
4. **New milestone = fresh phase numbering.** First phase of the new milestone is Phase 1, not Phase {N+1}.
|
|
208
|
+
5. **ERP sync aware.** tracking.json milestones[] gets a summary entry on close — the ERP reads this to render the tree.
|
|
209
|
+
6. **Handoff is the final milestone.** If the current milestone IS Handoff, there is no "next" — route to `/qualia-report` and the project is done.
|