qualia-framework 5.9.0 → 5.9.1
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/package.json
CHANGED
|
@@ -51,10 +51,12 @@ Hard rule: **never go technical here.** No "Should we use Supabase or Postgres?"
|
|
|
51
51
|
|
|
52
52
|
### P1. Detect project type (or accept it from `/qualia-new`)
|
|
53
53
|
|
|
54
|
-
If `/qualia-new` already asked the Demo vs Full gate, it passes the type in as `PROJECT_TYPE=demo` or `PROJECT_TYPE=full` via env or arg
|
|
54
|
+
If `/qualia-new` already asked the Demo vs Full gate (it does this as Step 1, the literal first question), it passes the type in as `PROJECT_TYPE=demo` or `PROJECT_TYPE=full` via env or arg — **skip the gate, do not re-ask.**
|
|
55
|
+
|
|
56
|
+
Only ask the gate yourself when invoked standalone (not via `/qualia-new`). When you do, use **AskUserQuestion** (interactive UI — never plain text):
|
|
55
57
|
|
|
56
58
|
- header: "Project shape"
|
|
57
|
-
- question: "Is this a demo (single shippable milestone, sales conversation
|
|
59
|
+
- question: "Is this a demo (single shippable milestone, sales conversation) or a full project (multi-milestone arc to Handoff)?"
|
|
58
60
|
- options: ["Demo", "Full project"]
|
|
59
61
|
|
|
60
62
|
This is the only fork. Demo runs §1-§8 of the discovery template. Full project runs all 14 questions.
|
|
@@ -46,11 +46,33 @@ Initialize a project with the **entire arc mapped from kickoff to handoff**. All
|
|
|
46
46
|
node ~/.claude/bin/qualia-ui.js banner new
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Banner only. Do NOT ask anything yet. The next thing the user sees is the project-shape gate — not a free-text "tell me what to build". Shape gate first, content second, because the shape drives the question set.
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
### Step 1. Project Type Gate (Demo vs Full vs Quick) — FIRST QUESTION
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
The single most important fork. Demo and Full produce different journeys, different research depth, different milestone counts. This is the literal first interaction with the user.
|
|
54
|
+
|
|
55
|
+
Use **AskUserQuestion** (interactive UI — never a plain-text prompt):
|
|
56
|
+
|
|
57
|
+
- header: "Project shape"
|
|
58
|
+
- question: "What kind of project is this? Pick one — it drives everything else."
|
|
59
|
+
- options:
|
|
60
|
+
- "Demo" — one shippable milestone, real backend, no mocks. Built to win a client conversation, extensible via `/qualia-milestone` if they sign. 8-question discovery.
|
|
61
|
+
- "Full project" — the multi-milestone arc to Handoff. 2-5 milestones planned upfront. 14-question discovery.
|
|
62
|
+
- "Quick prototype" — landing page, throwaway, ≤1 day. Skips research and journey. (Equivalent to `--quick` flag.)
|
|
63
|
+
|
|
64
|
+
Store the answer as `PROJECT_TYPE=demo` | `PROJECT_TYPE=full` | `PROJECT_TYPE=quick`. It drives every downstream step.
|
|
65
|
+
|
|
66
|
+
**Demo design philosophy is non-negotiable (do NOT compromise on these regardless of speed pressure):**
|
|
67
|
+
- **1 milestone only.** No multi-milestone arc, no Handoff phase. The demo IS the artifact.
|
|
68
|
+
- **NO mock data.** Real backend, real database, real auth. Hardcoded JSON in components is a hard-block. If the data needs Supabase, ship Supabase.
|
|
69
|
+
- **Real agent/platform functionality.** The thing actually works end-to-end. A demo with broken flows is not a Qualia demo.
|
|
70
|
+
- **DESIGN.md mandatory.** OKLCH palette, distinctive typography, full token system. Slop-detect runs hard-block.
|
|
71
|
+
- **Focus = design + functionality.** No sales decks, no placeholder copy, no "lorem ipsum" anywhere.
|
|
72
|
+
|
|
73
|
+
Speed in a demo comes from skipping multi-milestone planning, NEVER from skipping design quality, mocking the backend, or cutting corners on the core flow.
|
|
74
|
+
|
|
75
|
+
### Step 2. Brownfield Check
|
|
54
76
|
|
|
55
77
|
```bash
|
|
56
78
|
test -f package.json && echo "HAS_PACKAGE"
|
|
@@ -58,23 +80,27 @@ test -d .git && echo "HAS_GIT"
|
|
|
58
80
|
test -f .planning/codebase/README.md && echo "ALREADY_MAPPED"
|
|
59
81
|
```
|
|
60
82
|
|
|
61
|
-
If existing code is detected AND not already mapped,
|
|
83
|
+
If existing code is detected AND not already mapped, **AskUserQuestion**:
|
|
62
84
|
|
|
63
|
-
|
|
85
|
+
- header: "Existing code detected"
|
|
86
|
+
- question: "Run `/qualia-map` to scan the repo first?"
|
|
87
|
+
- options: ["Yes — map it", "No — proceed without mapping"]
|
|
64
88
|
|
|
65
|
-
|
|
89
|
+
If yes, invoke the `qualia-map` skill inline, wait for completion, then continue. If quick prototype + brownfield, skip the map (quick is for greenfield trivial work; brownfield + quick is contradictory — route to `/qualia-feature` instead).
|
|
66
90
|
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
91
|
+
### Step 3. One-line Pitch (free-text — minimal, no clarification round)
|
|
92
|
+
|
|
93
|
+
The shape is locked, now capture the content in one sentence:
|
|
94
|
+
|
|
95
|
+
> **"What are you building? One sentence — a stranger should understand it."**
|
|
96
|
+
|
|
97
|
+
Accept whatever the user says, even if broad. **Do NOT start an ad-hoc clarification round here.** Depth comes from the structured discovery interview in Step 4, not from free-form questioning. If the answer is "a SaaS platform" — that's fine, write it down, move on. `/qualia-discuss` will refine it through its 8 or 14 structured questions.
|
|
72
98
|
|
|
73
|
-
|
|
99
|
+
This is the ONLY free-text question in the kickoff flow. Everything else is `AskUserQuestion`.
|
|
74
100
|
|
|
75
|
-
|
|
101
|
+
### Step 4. Mandatory Discovery Interview (PROJECT MODE)
|
|
76
102
|
|
|
77
|
-
|
|
103
|
+
**Hard rule:** This is the next tool call after Step 3. No ad-hoc clarification, no free-form follow-up, no "let me ask a few quick things first." If the one-line pitch was "a SaaS platform", you invoke `/qualia-discuss` NOW — that skill's structured questions are how breadth gets refined into depth.
|
|
78
104
|
|
|
79
105
|
Invoke `/qualia-discuss` inline in PROJECT MODE — non-technical kickoff interview. 8 questions for demo, 14 for full project. Pass `PROJECT_TYPE` so the discuss skill skips the type question.
|
|
80
106
|
|
|
@@ -94,11 +120,11 @@ After the interview returns, `.planning/project-discovery.md` exists with the us
|
|
|
94
120
|
|
|
95
121
|
If "More questions": re-invoke `/qualia-discuss` for additional rounds. Otherwise continue.
|
|
96
122
|
|
|
97
|
-
### Step
|
|
123
|
+
### Step 5. Detect Project Type
|
|
98
124
|
|
|
99
|
-
From questioning answers, infer type → `website` | `ai-agent` | `voice-agent` | `mobile-app` | `null`. If matched, `cat ~/.claude/qualia-templates/projects/{type}.md` gives suggested milestone arc. Store `template_type` for Step
|
|
125
|
+
From questioning answers, infer type → `website` | `ai-agent` | `voice-agent` | `mobile-app` | `null`. If matched, `cat ~/.claude/qualia-templates/projects/{type}.md` gives suggested milestone arc. Store `template_type` for Step 13.
|
|
100
126
|
|
|
101
|
-
### Step
|
|
127
|
+
### Step 6. Design Direction (frontend only)
|
|
102
128
|
|
|
103
129
|
- header: "Design"
|
|
104
130
|
- question: "What's the design vibe?"
|
|
@@ -106,7 +132,7 @@ From questioning answers, infer type → `website` | `ai-agent` | `voice-agent`
|
|
|
106
132
|
|
|
107
133
|
Plus free-text: "Any brand colors or reference sites I should look at?"
|
|
108
134
|
|
|
109
|
-
### Step
|
|
135
|
+
### Step 7. Client Context
|
|
110
136
|
|
|
111
137
|
- header: "Client"
|
|
112
138
|
- question: "Client project or internal?"
|
|
@@ -117,7 +143,7 @@ If client, ask name. Check saved prefs:
|
|
|
117
143
|
node ~/.claude/bin/knowledge.js search "{client name}"
|
|
118
144
|
```
|
|
119
145
|
|
|
120
|
-
### Step
|
|
146
|
+
### Step 8. Write PROJECT.md
|
|
121
147
|
|
|
122
148
|
Create `.planning/PROJECT.md` from the template. Include: client, what we're building, core value, validated + active requirements (empty for greenfield), out of scope, stack, design direction, decisions table.
|
|
123
149
|
|
|
@@ -127,7 +153,7 @@ git add .planning/PROJECT.md
|
|
|
127
153
|
git commit -m "docs: initialize project"
|
|
128
154
|
```
|
|
129
155
|
|
|
130
|
-
### Step
|
|
156
|
+
### Step 8a. Seed CONTEXT.md and decisions/ (v5.0 — REQUIRED)
|
|
131
157
|
|
|
132
158
|
The domain glossary is the single highest-leverage piece of substrate — every road agent loads it BEFORE PROJECT.md/DESIGN.md. Misalignment is the #1 failure mode in AI coding; CONTEXT.md kills it.
|
|
133
159
|
|
|
@@ -156,7 +182,7 @@ git commit -m "docs: seed CONTEXT.md domain glossary + decisions/ folder"
|
|
|
156
182
|
|
|
157
183
|
The glossary stays terse — one sentence per entry. It's loaded into every agent spawn; bloat costs tokens. `/qualia-discuss` will grow it inline as decisions crystallize during phase planning.
|
|
158
184
|
|
|
159
|
-
### Step
|
|
185
|
+
### Step 8b. Write PRODUCT.md (v4.5.0 — REQUIRED)
|
|
160
186
|
|
|
161
187
|
`PRODUCT.md` is the "who and why" every road agent reads before designing or building. It is **required** — the planner, builder, and verifier all load it as substrate.
|
|
162
188
|
|
|
@@ -175,7 +201,7 @@ git add .planning/PRODUCT.md
|
|
|
175
201
|
git commit -m "docs: PRODUCT.md — register, users, voice, anti-references"
|
|
176
202
|
```
|
|
177
203
|
|
|
178
|
-
### Step
|
|
204
|
+
### Step 9. Create config.json
|
|
179
205
|
|
|
180
206
|
```json
|
|
181
207
|
{
|
|
@@ -192,7 +218,7 @@ git commit -m "docs: PRODUCT.md — register, users, voice, anti-references"
|
|
|
192
218
|
|
|
193
219
|
**Note:** `workflow.research` is ALWAYS `true` for v4. It exists for telemetry but is no longer read as a gate.
|
|
194
220
|
|
|
195
|
-
### Step
|
|
221
|
+
### Step 10. Create DESIGN.md (frontend projects — v4.5.0 OKLCH-first)
|
|
196
222
|
|
|
197
223
|
If frontend work is involved, generate `.planning/DESIGN.md` from `templates/DESIGN.md`. The generation MUST commit to four things upfront (these go in §1 of DESIGN.md):
|
|
198
224
|
|
|
@@ -219,7 +245,7 @@ git add .planning/DESIGN.md .planning/config.json
|
|
|
219
245
|
git commit -m "docs: DESIGN.md — direction commit + OKLCH palette + tokens"
|
|
220
246
|
```
|
|
221
247
|
|
|
222
|
-
### Step
|
|
248
|
+
### Step 11. Run Research (ALWAYS, no permission ask)
|
|
223
249
|
|
|
224
250
|
**In v4, research runs unconditionally.** The previous `workflow.research` gate is gone. Skipping research leads to generic roadmaps and surprises late in the project — the 4-agent cost is worth it.
|
|
225
251
|
|
|
@@ -253,7 +279,7 @@ node ~/.claude/bin/qualia-ui.js ok "Research complete"
|
|
|
253
279
|
```
|
|
254
280
|
Display top 3 from SUMMARY.md (stack recommendation, table stakes, top pitfall).
|
|
255
281
|
|
|
256
|
-
### Step
|
|
282
|
+
### Step 12. Feature Scoping (Multi-Milestone)
|
|
257
283
|
|
|
258
284
|
Read `.planning/research/FEATURES.md` and present the feature landscape. Features are scoped **to milestones** — you'll decide per-feature which milestone owns it.
|
|
259
285
|
|
|
@@ -271,7 +297,7 @@ Track selections:
|
|
|
271
297
|
|
|
272
298
|
Gather any additional requirements the user wants that research missed.
|
|
273
299
|
|
|
274
|
-
### Step
|
|
300
|
+
### Step 13. Run Roadmapper
|
|
275
301
|
|
|
276
302
|
```bash
|
|
277
303
|
node ~/.claude/bin/qualia-ui.js banner roadmap
|
|
@@ -279,12 +305,12 @@ node ~/.claude/bin/qualia-ui.js banner roadmap
|
|
|
279
305
|
|
|
280
306
|
**Roadmapper output branches on `PROJECT_TYPE`:**
|
|
281
307
|
|
|
282
|
-
- **Demo** (`PROJECT_TYPE=demo`): roadmapper produces a 1-milestone JOURNEY.md (the demo milestone, 2-4 phases) plus a matching REQUIREMENTS.md and a fully-detailed ROADMAP.md. No "Handoff" milestone is appended — the demo is its own complete artifact. The journey-tree at Step
|
|
308
|
+
- **Demo** (`PROJECT_TYPE=demo`): roadmapper produces a 1-milestone JOURNEY.md (the demo milestone, 2-4 phases) plus a matching REQUIREMENTS.md and a fully-detailed ROADMAP.md. No "Handoff" milestone is appended — the demo is its own complete artifact. The journey-tree at Step 14 shows a single rung; the "extend to full project" branch is handled later by `/qualia-milestone` if the client signs.
|
|
283
309
|
- **Full project** (`PROJECT_TYPE=full`): roadmapper produces the standard 2-5 milestone arc ending in Handoff. Milestone 1 fully detailed, M2..M{N-1} sketched (unless `--full-detail`).
|
|
284
310
|
|
|
285
311
|
Spawn the roadmapper with `<project_type>$PROJECT_TYPE</project_type>` in the prompt. If the user passed `--full-detail`, include `<full_detail>true</full_detail>` so the roadmapper writes complete phase detail for ALL milestones (full project only; demo always has full detail because there's only one milestone). See REFERENCE.md section "Roadmapper prompt" for the verbatim prompt template.
|
|
286
312
|
|
|
287
|
-
### Step
|
|
313
|
+
### Step 14. Present the Journey (single view)
|
|
288
314
|
|
|
289
315
|
Render the branded journey ladder:
|
|
290
316
|
|
|
@@ -296,7 +322,7 @@ This shows M1..M{N} as a vertical ladder: shipped milestones get a green dot, cu
|
|
|
296
322
|
|
|
297
323
|
Also narrate the one-glance summary. See REFERENCE.md section "Journey ladder format" for the ASCII template.
|
|
298
324
|
|
|
299
|
-
### Step
|
|
325
|
+
### Step 15. Approval Gate (single — for the whole journey)
|
|
300
326
|
|
|
301
327
|
- header: "Journey"
|
|
302
328
|
- question: "Does this journey work for you?"
|
|
@@ -326,7 +352,7 @@ node ~/.claude/bin/qualia-ui.js info "Full phase detail for each later milestone
|
|
|
326
352
|
|
|
327
353
|
(Skip this block when `--full-detail` was used — all milestones are already fully planned in that case.)
|
|
328
354
|
|
|
329
|
-
### Step
|
|
355
|
+
### Step 16. Environment Setup
|
|
330
356
|
|
|
331
357
|
Supabase project? `supabase link` or create. Vercel project? `vercel link`. Env vars? `.env.local` with placeholders from PROJECT.md stack.
|
|
332
358
|
|
|
@@ -337,7 +363,7 @@ git add .gitignore
|
|
|
337
363
|
git commit -m "chore: environment setup" 2>/dev/null
|
|
338
364
|
```
|
|
339
365
|
|
|
340
|
-
### Step
|
|
366
|
+
### Step 17. Auto-Apply Gate (or stop here)
|
|
341
367
|
|
|
342
368
|
If invoked with `--auto`, skip straight into building Milestone 1:
|
|
343
369
|
|
|
@@ -390,15 +416,17 @@ Do NOT use `--quick` for: client projects, anything with compliance stakes, anyt
|
|
|
390
416
|
|
|
391
417
|
## Rules
|
|
392
418
|
|
|
393
|
-
1. **Project type is the first
|
|
394
|
-
2. **
|
|
395
|
-
3. **
|
|
396
|
-
4. **
|
|
397
|
-
5. **
|
|
398
|
-
6. **
|
|
399
|
-
7. **
|
|
400
|
-
8. **
|
|
401
|
-
9. **
|
|
402
|
-
10. **
|
|
403
|
-
11. **
|
|
404
|
-
12. **
|
|
419
|
+
1. **Project type is the first question, period.** Step 1 (Demo / Full / Quick) is the literal first interaction with the user — even before "what are you building". Every downstream step branches on the answer. Don't skip it, don't infer it, don't ask anything before it.
|
|
420
|
+
2. **AskUserQuestion for every discrete-choice question.** Project type, brownfield gate, design vibe, client type, approval gate, auto-chain — all use the interactive UI. The ONLY free-text question in the kickoff flow is the Step 3 one-line pitch. No plain-text prompts for anything that has a closed set of answers.
|
|
421
|
+
3. **No ad-hoc clarification questioning.** After Step 3 (one-line pitch), the next tool call is `/qualia-discuss`. No "let me ask a few quick things first", no "that's too broad, can you clarify". Depth is the discuss skill's job — not yours.
|
|
422
|
+
4. **Discovery interview is mandatory (v5.6).** Step 4 always invokes `/qualia-discuss` in PROJECT MODE. No free-form questioning loop, no "I'll just sketch PROJECT.md from the user's first message." The interview is 8 questions for demo, 14 for full project.
|
|
423
|
+
5. **Research runs automatically.** No permission ask. Only `--quick` skips it. Demo path uses `<scope>quick</scope>` (3-call budget per researcher); full project uses standard 8-call budget.
|
|
424
|
+
6. **Demo design philosophy is non-negotiable.** Real backend always (Supabase, real auth), DESIGN.md mandatory, slop-detect hard-block, 1 milestone, focus on real agent/platform functionality + design quality. No mock data, no lorem ipsum, no broken flows. Speed comes from skipping multi-milestone planning, never from skipping design quality, mocking the backend, or cutting corners on the core flow. A demo that uses mock data is not a Qualia demo.
|
|
425
|
+
7. **Demos are 1 milestone, full projects are 2-5.** Demo journeys have no "Handoff" — the demo IS the artifact. Full projects always end in Handoff (fixed 4 phases). The journey-tree adapts to both shapes.
|
|
426
|
+
8. **The full-project journey includes Handoff.** Every full project's final milestone is literally named "Handoff" with 4 standard phases. The roadmapper enforces this.
|
|
427
|
+
9. **Single approval gate.** One gate for the whole journey. Not per-milestone, not per-phase.
|
|
428
|
+
10. **Milestone 1 is fully detailed (full projects).** M2..M{N-1} are sketched. Detail fills in when each milestone opens. Demos are always fully detailed because they're 1 milestone.
|
|
429
|
+
11. **STATE.md through state.js.** Never edit STATE.md or tracking.json by hand.
|
|
430
|
+
12. **Inline skill invocation.** When Step 2 offers `/qualia-map` or Step 4 invokes `/qualia-discuss`, invoke it inline — don't exit.
|
|
431
|
+
13. **CONTEXT.md is mandatory.** Every project gets a domain glossary at `.planning/CONTEXT.md`. Seeded from the discovery interview answers. Loaded by every road agent. Kept terse.
|
|
432
|
+
14. **ADRs are scarce.** `.planning/decisions/` exists from day one but only fills with hard-to-reverse, surprising-without-context, real-tradeoff decisions. Cargo-culting ADRs ruins the signal.
|