qualia-framework 4.4.0 → 5.1.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/AGENTS.md +24 -0
- package/CLAUDE.md +12 -63
- package/README.md +24 -18
- package/agents/builder.md +13 -33
- package/agents/plan-checker.md +18 -0
- package/agents/planner.md +17 -0
- package/agents/verifier.md +70 -0
- package/agents/visual-evaluator.md +132 -0
- package/bin/cli.js +64 -23
- package/bin/install.js +375 -29
- package/bin/qualia-ui.js +208 -1
- package/bin/slop-detect.mjs +362 -0
- package/bin/state.js +218 -2
- package/docs/erp-contract.md +5 -0
- package/docs/install-redesign-builder-prompt.md +290 -0
- package/docs/install-redesign-pilot.md +234 -0
- package/docs/playwright-loop-builder-prompt.md +185 -0
- package/docs/playwright-loop-design-notes.md +108 -0
- package/docs/playwright-loop-pilot-results.md +170 -0
- package/docs/playwright-loop-review-2026-05-03.md +65 -0
- package/docs/playwright-loop-tester-prompt.md +213 -0
- package/docs/reviews/matt-pocock-skills-analysis.md +300 -0
- package/guide.md +9 -5
- package/hooks/env-empty-guard.js +74 -0
- package/hooks/pre-compact.js +19 -9
- package/hooks/pre-deploy-gate.js +8 -2
- package/hooks/pre-push.js +26 -12
- package/hooks/supabase-destructive-guard.js +62 -0
- package/hooks/vercel-account-guard.js +91 -0
- package/package.json +2 -1
- package/rules/design-brand.md +114 -0
- package/rules/design-laws.md +148 -0
- package/rules/design-product.md +114 -0
- package/rules/design-rubric.md +157 -0
- package/rules/grounding.md +4 -0
- package/skills/qualia-build/SKILL.md +40 -46
- package/skills/qualia-discuss/SKILL.md +51 -68
- package/skills/qualia-handoff/SKILL.md +1 -0
- package/skills/qualia-issues/SKILL.md +151 -0
- package/skills/qualia-map/SKILL.md +78 -35
- package/skills/qualia-new/REFERENCE.md +139 -0
- package/skills/qualia-new/SKILL.md +85 -124
- package/skills/qualia-optimize/REFERENCE.md +202 -0
- package/skills/qualia-optimize/SKILL.md +72 -237
- package/skills/qualia-plan/SKILL.md +58 -65
- package/skills/qualia-polish/SKILL.md +180 -136
- package/skills/qualia-polish-loop/REFERENCE.md +265 -0
- package/skills/qualia-polish-loop/SKILL.md +201 -0
- package/skills/qualia-polish-loop/fixtures/broken.html +117 -0
- package/skills/qualia-polish-loop/fixtures/clean.html +196 -0
- package/skills/qualia-polish-loop/scripts/loop.mjs +302 -0
- package/skills/qualia-polish-loop/scripts/playwright-capture.mjs +197 -0
- package/skills/qualia-polish-loop/scripts/score.mjs +176 -0
- package/skills/qualia-report/SKILL.md +141 -180
- package/skills/qualia-research/SKILL.md +28 -33
- package/skills/qualia-road/SKILL.md +103 -0
- package/skills/qualia-ship/SKILL.md +1 -0
- package/skills/qualia-task/SKILL.md +1 -1
- package/skills/qualia-test/SKILL.md +50 -2
- package/skills/qualia-triage/SKILL.md +152 -0
- package/skills/qualia-verify/SKILL.md +63 -104
- package/skills/qualia-zoom/SKILL.md +51 -0
- package/skills/zoho-workflow/SKILL.md +64 -0
- package/templates/CONTEXT.md +36 -0
- package/templates/DESIGN.md +229 -435
- package/templates/PRODUCT.md +95 -0
- package/templates/decisions/ADR-template.md +30 -0
- package/tests/bin.test.sh +451 -7
- package/tests/state.test.sh +58 -0
- package/skills/qualia-design/SKILL.md +0 -169
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qualia-plan
|
|
3
|
-
description: "
|
|
3
|
+
description: "Plans the current phase by spawning a planner agent to break it into executable tasks with waves, then validates via a plan-checker revision loop (max 2 cycles). Supports gap-closure mode for verification failures. Use when the user says 'plan this phase', 'break this into tasks', 'create the plan', 'qualia-plan', 'plan phase 2', or after /qualia-new sets up the journey."
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Bash
|
|
6
6
|
- Read
|
|
@@ -15,15 +15,15 @@ allowed-tools:
|
|
|
15
15
|
|
|
16
16
|
# /qualia-plan — Plan a Phase
|
|
17
17
|
|
|
18
|
-
Spawn
|
|
18
|
+
Spawn planner to break phase into tasks, validate with checker (max 2 revision cycles), route to build.
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
21
21
|
|
|
22
|
-
`/qualia-plan` — plan
|
|
22
|
+
`/qualia-plan` — plan next unplanned phase
|
|
23
23
|
`/qualia-plan {N}` — plan specific phase N
|
|
24
24
|
`/qualia-plan {N} --gaps` — plan fixes for verification failures
|
|
25
|
-
`/qualia-plan {N} --skip-check` — skip
|
|
26
|
-
`/qualia-plan {N} --auto` — plan +
|
|
25
|
+
`/qualia-plan {N} --skip-check` — skip plan-checker loop (not recommended)
|
|
26
|
+
`/qualia-plan {N} --auto` — plan + chain into `/qualia-build {N} --auto` (no human gate)
|
|
27
27
|
|
|
28
28
|
## Process
|
|
29
29
|
|
|
@@ -38,9 +38,9 @@ node ~/.claude/bin/knowledge.js load patterns
|
|
|
38
38
|
node ~/.claude/bin/knowledge.js load client
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
No phase number → current phase from STATE.md.
|
|
42
42
|
|
|
43
|
-
**
|
|
43
|
+
**Phase-specific context (if exists):**
|
|
44
44
|
```bash
|
|
45
45
|
cat .planning/phase-{N}-context.md 2>/dev/null # from /qualia-discuss
|
|
46
46
|
cat .planning/phase-{N}-research.md 2>/dev/null # from /qualia-research
|
|
@@ -48,19 +48,17 @@ cat .planning/phase-{N}-research.md 2>/dev/null # from /qualia-research
|
|
|
48
48
|
|
|
49
49
|
### 2. Optional: Suggest Deeper Prep
|
|
50
50
|
|
|
51
|
-
**If ROADMAP.md
|
|
51
|
+
**If ROADMAP.md flagged phase for research AND no phase-{N}-research.md:**
|
|
52
52
|
|
|
53
53
|
- header: "Research first?"
|
|
54
|
-
- question: "
|
|
54
|
+
- question: "Phase flagged for research. Run /qualia-research {N} first?"
|
|
55
55
|
- options:
|
|
56
|
-
- "Yes, research first"
|
|
57
|
-
- "Skip, plan directly"
|
|
56
|
+
- "Yes, research first"
|
|
57
|
+
- "Skip, plan directly"
|
|
58
58
|
|
|
59
|
-
**If phase
|
|
59
|
+
**If phase has compliance/regulatory/architectural stakes AND no phase-{N}-context.md:**
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Don't force it. Some phases don't need it.
|
|
61
|
+
Suggest: *"Run /qualia-discuss {N} first to lock decisions? Optional."*
|
|
64
62
|
|
|
65
63
|
### 3. Spawn Planner (Fresh Context)
|
|
66
64
|
|
|
@@ -69,12 +67,9 @@ node ~/.claude/bin/qualia-ui.js banner plan {N} "{phase name from ROADMAP.md}"
|
|
|
69
67
|
node ~/.claude/bin/qualia-ui.js spawn planner "Breaking phase into tasks..."
|
|
70
68
|
```
|
|
71
69
|
|
|
72
|
-
Spawn the planner:
|
|
73
|
-
|
|
74
70
|
```
|
|
75
71
|
Agent(prompt="
|
|
76
|
-
|
|
77
|
-
Grounding + rubrics: @~/.claude/rules/grounding.md
|
|
72
|
+
Role: @~/.claude/agents/planner.md
|
|
78
73
|
|
|
79
74
|
<project_context>
|
|
80
75
|
@.planning/PROJECT.md
|
|
@@ -89,86 +84,84 @@ Phase {N} from ROADMAP.md:
|
|
|
89
84
|
@.planning/ROADMAP.md
|
|
90
85
|
|
|
91
86
|
Goal: {goal from ROADMAP.md}
|
|
92
|
-
|
|
87
|
+
Reqs: {REQ-IDs from ROADMAP.md}
|
|
93
88
|
Success criteria: {success criteria from ROADMAP.md}
|
|
94
89
|
</phase_details>
|
|
95
90
|
|
|
96
91
|
<locked_decisions>
|
|
97
|
-
{
|
|
92
|
+
{phase-{N}-context.md Locked Decisions if exists, else 'none'}
|
|
98
93
|
</locked_decisions>
|
|
99
94
|
|
|
100
95
|
<research_findings>
|
|
101
|
-
{
|
|
96
|
+
{phase-{N}-research.md recommendation if exists, else 'none'}
|
|
102
97
|
</research_findings>
|
|
103
98
|
|
|
104
|
-
{
|
|
99
|
+
{--gaps → read @.planning/phase-{N}-verification.md failures. Create gap-closure plan.}
|
|
105
100
|
|
|
106
101
|
<relevant_learnings>
|
|
107
|
-
{
|
|
102
|
+
{applicable patterns from knowledge/learned-patterns.md}
|
|
108
103
|
</relevant_learnings>
|
|
109
104
|
|
|
110
|
-
|
|
105
|
+
Output: .planning/phase-{N}-plan.md (or phase-{N}-gaps-plan.md for --gaps).
|
|
111
106
|
", subagent_type="qualia-planner", description="Plan phase {N}")
|
|
112
107
|
```
|
|
113
108
|
|
|
114
|
-
### 4. Validate
|
|
109
|
+
### 4. Validate Plan (unless --skip-check)
|
|
115
110
|
|
|
116
|
-
Read
|
|
111
|
+
Read generated plan. Spawn checker:
|
|
117
112
|
|
|
118
113
|
```
|
|
119
114
|
Agent(prompt="
|
|
120
|
-
|
|
121
|
-
Grounding + rubrics: @~/.claude/rules/grounding.md
|
|
115
|
+
Role: @~/.claude/agents/plan-checker.md
|
|
122
116
|
|
|
123
117
|
<plan_path>.planning/phase-{N}-plan.md</plan_path>
|
|
124
118
|
<phase_goal>{goal from ROADMAP.md}</phase_goal>
|
|
125
119
|
<success_criteria>{criteria from ROADMAP.md}</success_criteria>
|
|
126
120
|
<project_context>@.planning/PROJECT.md</project_context>
|
|
127
121
|
|
|
128
|
-
Validate against
|
|
122
|
+
Validate against 7 rules. Return PASS or REVISE with structured issues.
|
|
129
123
|
", subagent_type="qualia-plan-checker", description="Check plan phase {N}")
|
|
130
124
|
```
|
|
131
125
|
|
|
132
|
-
**Revision loop (max 2
|
|
126
|
+
**Revision loop (max 2):**
|
|
133
127
|
|
|
134
|
-
-
|
|
135
|
-
-
|
|
128
|
+
- Iter 1: Check → REVISE → re-spawn planner with checker issues
|
|
129
|
+
- Iter 2: Re-check → REVISE/BLOCKED → escalate to user
|
|
136
130
|
|
|
137
|
-
|
|
131
|
+
(74→86% after 1 round, 88% after 3. Iter 3 adds only 2pp; not worth extra spawn.)
|
|
138
132
|
|
|
139
|
-
|
|
133
|
+
Per revision:
|
|
140
134
|
|
|
141
135
|
```
|
|
142
136
|
Agent(prompt="
|
|
143
|
-
|
|
137
|
+
Role: @~/.claude/agents/planner.md
|
|
144
138
|
|
|
145
139
|
<revision_mode>true</revision_mode>
|
|
146
140
|
<current_plan>@.planning/phase-{N}-plan.md</current_plan>
|
|
147
141
|
<checker_feedback>
|
|
148
|
-
{
|
|
142
|
+
{REVISE output from plan-checker}
|
|
149
143
|
</checker_feedback>
|
|
150
144
|
|
|
151
|
-
Revise
|
|
152
|
-
— only fix what the checker flagged.
|
|
145
|
+
Revise in place. Address every issue. Do NOT add tasks or change scope; fix only what checker flagged.
|
|
153
146
|
", subagent_type="qualia-planner", description="Revise plan phase {N}")
|
|
154
147
|
```
|
|
155
148
|
|
|
156
|
-
After revision, spawn
|
|
149
|
+
After revision, re-spawn checker. Max 2 total cycles.
|
|
157
150
|
|
|
158
|
-
**
|
|
151
|
+
**BLOCKED after 2 cycles:**
|
|
159
152
|
|
|
160
153
|
```bash
|
|
161
154
|
node ~/.claude/bin/qualia-ui.js fail "Plan failed validation after 2 revisions"
|
|
162
155
|
```
|
|
163
156
|
|
|
164
|
-
Show
|
|
165
|
-
- "Skip validation
|
|
166
|
-
- "Adjust
|
|
167
|
-
- "Adjust
|
|
157
|
+
Show remaining issues. Options:
|
|
158
|
+
- "Skip validation" (`--skip-check`)
|
|
159
|
+
- "Adjust roadmap" (scope wrong)
|
|
160
|
+
- "Adjust phase goal" (criteria under-specified)
|
|
168
161
|
|
|
169
162
|
### 5. Present Final Plan
|
|
170
163
|
|
|
171
|
-
Render
|
|
164
|
+
Render story-file dashboard:
|
|
172
165
|
|
|
173
166
|
```bash
|
|
174
167
|
node ~/.claude/bin/qualia-ui.js plan-summary .planning/phase-{N}-plan.md
|
|
@@ -184,19 +177,19 @@ If "adjust" — get feedback, re-spawn planner with revision context, re-validat
|
|
|
184
177
|
node ~/.claude/bin/state.js transition --to planned --phase {N}
|
|
185
178
|
```
|
|
186
179
|
|
|
187
|
-
|
|
180
|
+
Error → show, stop. Do NOT edit STATE.md or tracking.json manually.
|
|
188
181
|
|
|
189
182
|
### 7. Route (auto-chain aware)
|
|
190
183
|
|
|
191
|
-
|
|
184
|
+
**`--auto`:** invoke `/qualia-build {N} --auto` inline. User approved at `/qualia-new`; no per-phase gate.
|
|
192
185
|
|
|
193
186
|
```bash
|
|
194
187
|
node ~/.claude/bin/qualia-ui.js info "Auto mode — chaining into /qualia-build {N}"
|
|
195
188
|
```
|
|
196
189
|
|
|
197
|
-
Then invoke
|
|
190
|
+
Then invoke `qualia-build` inline with `--auto`.
|
|
198
191
|
|
|
199
|
-
**
|
|
192
|
+
**Guided mode:** stop, show next step:
|
|
200
193
|
|
|
201
194
|
```bash
|
|
202
195
|
node ~/.claude/bin/qualia-ui.js end "PHASE {N} PLANNED" "/qualia-build {N}"
|
|
@@ -204,22 +197,22 @@ node ~/.claude/bin/qualia-ui.js end "PHASE {N} PLANNED" "/qualia-build {N}"
|
|
|
204
197
|
|
|
205
198
|
## Gap Closure Mode (`--gaps`)
|
|
206
199
|
|
|
207
|
-
|
|
200
|
+
With `--gaps`, planner enters gap-closure mode:
|
|
208
201
|
|
|
209
|
-
1. Read `.planning/phase-{N}-verification.md`
|
|
210
|
-
2.
|
|
211
|
-
- **Files:** specific files that failed
|
|
212
|
-
- **Action:** specific fix (not "fix auth"
|
|
213
|
-
- **
|
|
214
|
-
3. Do NOT re-plan passing items.
|
|
215
|
-
4.
|
|
216
|
-
5. All gap tasks
|
|
217
|
-
6. Plan-checker still validates
|
|
202
|
+
1. Read `.planning/phase-{N}-verification.md` → extract ONLY FAIL items
|
|
203
|
+
2. Per FAIL, create targeted fix task:
|
|
204
|
+
- **Files:** specific files that failed
|
|
205
|
+
- **Action:** specific fix (not "fix auth"; "add session persistence check in src/lib/auth.ts signIn fn")
|
|
206
|
+
- **AC:** failed criterion restated as observable behavior
|
|
207
|
+
3. Do NOT re-plan passing items. No new features. Surgical only.
|
|
208
|
+
4. Output: `.planning/phase-{N}-gaps-plan.md`
|
|
209
|
+
5. All gap tasks Wave 1 (parallel) unless they share files
|
|
210
|
+
6. Plan-checker still validates; same 7 rules
|
|
218
211
|
|
|
219
212
|
## Rules
|
|
220
213
|
|
|
221
|
-
1. **Plan-checker
|
|
222
|
-
2. **Max 3 revision cycles.**
|
|
223
|
-
3. **Honor locked decisions.**
|
|
224
|
-
4. **One plan file per phase.**
|
|
225
|
-
5. **Revision is surgical.**
|
|
214
|
+
1. **Plan-checker mandatory by default.** Skip only with `--skip-check`.
|
|
215
|
+
2. **Max 3 revision cycles.** 3 fails → escalate; scope probably wrong.
|
|
216
|
+
3. **Honor locked decisions.** phase-{N}-context.md locked decisions non-negotiable.
|
|
217
|
+
4. **One plan file per phase.** No phase-1-plan-v2.md. Edit in place.
|
|
218
|
+
5. **Revision is surgical.** Fix only what checker flagged; no scope creep.
|