qualia-framework 6.6.0 → 6.7.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.
@@ -546,7 +546,7 @@
546
546
  <div class="kit-group">
547
547
  <h4>Lock decisions before code</h4>
548
548
  <dl>
549
- <dt>/qualia-discuss</dt><dd>Without args: project-level non-technical discovery (mandatory at kickoff). With <code>N</code>: phase-level technical alignment with locked decisions and ADRs.</dd>
549
+ <dt>/qualia-scope</dt><dd>Without args: project-level non-technical discovery (mandatory at kickoff). With <code>N</code>: phase-level archetype-aware grill with locked decisions and ADRs, gated on Definition-of-Done.</dd>
550
550
  <dt>/qualia-research</dt><dd>Deep-research a niche library or domain before planning a phase.</dd>
551
551
  </dl>
552
552
  </div>
package/guide.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > Follow the road. Type the commands. The framework handles the rest.
4
4
  > `--auto` chains the whole road end-to-end with only two human checkpoints per project.
5
5
 
6
- Surface: **23 active skills**. Use `/qualia-fix` for broken behavior, `/qualia-feature` for new single-feature work, `/qualia-discuss` in PROJECT MODE for kickoff capture, `/qualia-polish --loop` for the autonomous visual loop, and `/qualia-polish --vibe` for fast layout-preserving aesthetic pivots.
6
+ Surface: **25 active skills**. Use `/qualia-fix` for broken behavior, `/qualia-feature` for new single-feature work, `/qualia-scope` in PROJECT MODE for kickoff capture, `/qualia-polish --loop` for the autonomous visual loop, and `/qualia-polish --vibe` for fast layout-preserving aesthetic pivots.
7
7
 
8
8
  For the identity statement see [`SOUL.md`](./SOUL.md). For every skill flag see [`FLAGS.md`](./FLAGS.md). When something breaks see [`TROUBLESHOOTING.md`](./TROUBLESHOOTING.md). For release history see [`CHANGELOG.md`](./CHANGELOG.md).
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qualia-framework",
3
- "version": "6.6.0",
3
+ "version": "6.7.1",
4
4
  "description": "Claude Code and Codex workflow framework by Qualia Solutions. Plan, build, verify, ship.",
5
5
  "bin": {
6
6
  "qualia-framework": "./bin/cli.js"
@@ -39,7 +39,7 @@ If the answer is `claude`, **skip this entire rule** — Claude Code has no equi
39
39
 
40
40
  - The user is on Claude Code (no `/goal` surface).
41
41
  - A goal is already active for this thread (Codex rejects `update_goal` when one exists — call `thread/goal/get` first if you're using the tool API directly).
42
- - The work is open-ended exploration with no clear objective (e.g. `/qualia`, `/qualia-discuss`). Goals are for executing a defined scope.
42
+ - The work is open-ended exploration with no clear objective (e.g. `/qualia`, `/qualia-scope`). Goals are for executing a defined scope.
43
43
 
44
44
  ## Why
45
45
 
@@ -1,6 +1,6 @@
1
1
  # One Opinion (design-decision discipline)
2
2
 
3
- Loaded on demand by design-adjacent skills: `/qualia-polish --vibe`, `/qualia-polish`, `/qualia-new` (DESIGN.md creation step), `/qualia-discuss` PROJECT MODE. Not always-on — most skills don't need it.
3
+ Loaded on demand by design-adjacent skills: `/qualia-polish --vibe`, `/qualia-polish`, `/qualia-new` (DESIGN.md creation step), `/qualia-scope` PROJECT MODE. Not always-on — most skills don't need it.
4
4
 
5
5
  ## The rule
6
6
 
@@ -22,6 +22,8 @@ node ${QUALIA_BIN}/state.js check 2>/dev/null
22
22
 
23
23
  The JSON carries a `profile` field (`strict` or `standard`; env `$QUALIA_PROFILE` wins). `strict` = hard gates, no waivers; `standard` = gates advisory, a senior may waive with a reason logged to `.planning/decisions/`. Surface it when a gate is involved.
24
24
 
25
+ **A5 — multi-person layout.** If the JSON has `"layout": "increments"`, this project is concurrency-aware: route by the increment fields, not the single phase cursor. Continue your own claim first (`my_claim`), else start `next_increment` (the first unclaimed, not-done increment). **Never** route the operator to anything in `claimed_increments[]` — those are held by another person on another branch. The status→command mapping in the table below still applies (it's computed into `next_command`); the increment fields just tell you *which* unit is yours. Legacy projects (no `layout` field) route exactly as before.
26
+
25
27
  Also gather context:
26
28
  ```bash
27
29
  test -f .continue-here.md && echo "HANDOFF_EXISTS" && head -20 .continue-here.md || echo "NO_HANDOFF"
@@ -11,6 +11,8 @@ allowed-tools:
11
11
  - AskUserQuestion
12
12
  ---
13
13
 
14
+ > **RETIRED (v6.7, A4 collapse).** Folded into `/qualia-scope`: PROJECT MODE = this kickoff interview, PHASE MODE = the pre-plan grill, picked by qualia-scope's mode router. This file is no longer installed as a slash command. Kept for history.
15
+
14
16
  # /qualia-discuss — Alignment Interview
15
17
 
16
18
  Two modes. The skill picks one based on whether an arg is passed.
@@ -91,7 +91,7 @@ Read ALL of the following if present:
91
91
  - .planning/tracking.json
92
92
  - .planning/phase-*-plan.md (ALL, not just latest)
93
93
  - .planning/phase-*-verification.md (ALL — flag any FAILs)
94
- - .planning/phase-*-context.md (from /qualia-discuss PHASE MODE, if any)
94
+ - .planning/phase-*-context.md (from /qualia-scope PHASE MODE, if any)
95
95
  - .planning/phase-*-research.md (if any)
96
96
  - .planning/DESIGN.md (skim)
97
97
  - .planning/decisions/*.md (ADRs — short read)
@@ -209,7 +209,7 @@ With all three reports + `<user_confusion>` + `<session_context>` in hand, produ
209
209
  | Verify FAILed and no postmortem ran | `/qualia-postmortem` → `/qualia-plan {N} --gaps` → `/qualia-build` |
210
210
  | Stale `.continue-here.md`, ongoing context | `/qualia-resume` → `/qualia` |
211
211
  | Brownfield drift (plan and code diverged hard) | `/qualia-map` → `/qualia-plan {N} --gaps` |
212
- | Phase context missing (no `/qualia-discuss` ran) | `/qualia-discuss {N}` → `/qualia-plan {N}` |
212
+ | Phase context missing (no `/qualia-scope` ran) | `/qualia-scope {N}` → `/qualia-plan {N}` |
213
213
  | Specific error, scope clear | `/qualia-fix '<symptom>'` |
214
214
  | Performance feels off, no profile | `/qualia-fix --perf '<route>'` or `/qualia-optimize --perf` |
215
215
  | Design feels off | `/qualia-polish --critique` then `/qualia-polish` |
@@ -59,7 +59,7 @@ If `PROJECT_TYPE=demo` AND `MILESTONE_COUNT=1`, the demo's one milestone is clos
59
59
  **If "Client signed — extend to full project":**
60
60
 
61
61
  1. Update `.planning/PROJECT.md` frontmatter: `project_type: full`.
62
- 2. Run a brief discovery top-up — invoke `/qualia-discuss` in PROJECT MODE, but only ask §9-§14 (the full-project-only questions). This adds the milestone arc, compliance, integrations, content ownership, handoff team, and budget shape.
62
+ 2. Run a brief discovery top-up — invoke `/qualia-scope` in PROJECT MODE, but only ask §9-§14 (the full-project-only questions). This adds the milestone arc, compliance, integrations, content ownership, handoff team, and budget shape.
63
63
  3. Spawn the roadmapper in `extend-to-full` mode (see prompt below). It reads the existing single milestone (now M1), the updated discovery, and produces a full JOURNEY.md with M2..M{N-1} sketches plus the Handoff milestone.
64
64
  4. Then proceed with the standard close-milestone flow (Steps 2-9) — M1 closes, M2 opens, the user is asked to continue.
65
65
 
@@ -94,22 +94,22 @@ The shape is locked, now capture the content in one sentence:
94
94
 
95
95
  > **"What are you building? One sentence — a stranger should understand it."**
96
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.
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-scope` will refine it through its 8 or 14 structured questions.
98
98
 
99
99
  This is the ONLY free-text question in the kickoff flow. Everything else is `AskUserQuestion`.
100
100
 
101
101
  ### Step 4. Mandatory Discovery Interview (PROJECT MODE)
102
102
 
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.
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-scope` NOW — that skill's structured questions are how breadth gets refined into depth.
104
104
 
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.
105
+ Invoke `/qualia-scope` inline in PROJECT MODE — non-technical kickoff interview. 8 questions for demo, 14 for full project. Pass `PROJECT_TYPE` so the scope skill skips the type question.
106
106
 
107
- This step REPLACES the old free-form "deep questioning" loop. The discuss skill captures answers verbatim into `.planning/project-discovery.md`, which seeds PROJECT.md, PRODUCT.md, CONTEXT.md, and (for full projects) JOURNEY.md milestone names.
107
+ This step REPLACES the old free-form "deep questioning" loop. The scope skill captures answers verbatim into `.planning/project-discovery.md`, which seeds PROJECT.md, PRODUCT.md, CONTEXT.md, and (for full projects) JOURNEY.md milestone names.
108
108
 
109
109
  ```bash
110
- # Inline-invoke qualia-discuss in PROJECT MODE
110
+ # Inline-invoke qualia-scope in PROJECT MODE
111
111
  # (no phase number arg = PROJECT MODE; PROJECT_TYPE env tells it which question set)
112
- PROJECT_TYPE=$PROJECT_TYPE qualia-discuss
112
+ PROJECT_TYPE=$PROJECT_TYPE qualia-scope
113
113
  ```
114
114
 
115
115
  After the interview returns, `.planning/project-discovery.md` exists with the user's answers. Read it. Confirm understanding:
@@ -118,7 +118,7 @@ After the interview returns, `.planning/project-discovery.md` exists with the us
118
118
  - question: "I have what I need to write PROJECT.md and move forward. Continue?"
119
119
  - options: ["Continue", "More questions"]
120
120
 
121
- If "More questions": re-invoke `/qualia-discuss` for additional rounds. Otherwise continue.
121
+ If "More questions": re-invoke `/qualia-scope` for additional rounds. Otherwise continue.
122
122
 
123
123
  ### Step 5. Detect Project Type
124
124
 
@@ -164,9 +164,13 @@ cp ${QUALIA_TEMPLATES}/CONTEXT.md .planning/CONTEXT.md
164
164
  # Initialize ADR folder with the template available for reference
165
165
  mkdir -p .planning/decisions
166
166
  cp ${QUALIA_TEMPLATES}/decisions/ADR-template.md .planning/decisions/_template.md
167
+
168
+ # A5: gitignore the per-step-mutated state (STATE.md, tracking.json, cursor) so
169
+ # only durable increment/release files are committed — multi-person safe.
170
+ cp ${QUALIA_TEMPLATES}/planning.gitignore .planning/.gitignore
167
171
  ```
168
172
 
169
- Then **seed the glossary from the questioning answers**. For each domain term that came up during the Step 4 `/qualia-discuss` interview — entities, actions, statuses, key nouns the user repeatedly said — add an entry to `.planning/CONTEXT.md` under `## Language` with:
173
+ Then **seed the glossary from the questioning answers**. For each domain term that came up during the Step 4 `/qualia-scope` interview — entities, actions, statuses, key nouns the user repeatedly said — add an entry to `.planning/CONTEXT.md` under `## Language` with:
170
174
  - the term
171
175
  - a one-sentence definition
172
176
  - an `Avoid:` line listing rejected synonyms (terms the team should NOT use for this concept)
@@ -180,7 +184,7 @@ git add .planning/CONTEXT.md .planning/decisions/
180
184
  git commit -m "docs: seed CONTEXT.md domain glossary + decisions/ folder"
181
185
  ```
182
186
 
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.
187
+ The glossary stays terse — one sentence per entry. It's loaded into every agent spawn; bloat costs tokens. `/qualia-scope` will grow it inline as decisions crystallize during phase planning.
184
188
 
185
189
  ### Step 8b. Write PRODUCT.md (REQUIRED)
186
190
 
@@ -418,8 +422,8 @@ Do NOT use `--quick` for: client projects, anything with compliance stakes, anyt
418
422
 
419
423
  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
424
  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.** 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.
425
+ 3. **No ad-hoc clarification questioning.** After Step 3 (one-line pitch), the next tool call is `/qualia-scope`. No "let me ask a few quick things first", no "that's too broad, can you clarify". Depth is the scope skill's job — not yours.
426
+ 4. **Discovery interview is mandatory.** Step 4 always invokes `/qualia-scope` 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
427
  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
428
  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
429
  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.
@@ -427,6 +431,6 @@ Do NOT use `--quick` for: client projects, anything with compliance stakes, anyt
427
431
  9. **Single approval gate.** One gate for the whole journey. Not per-milestone, not per-phase.
428
432
  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
433
  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.
434
+ 12. **Inline skill invocation.** When Step 2 offers `/qualia-map` or Step 4 invokes `/qualia-scope`, invoke it inline — don't exit.
431
435
  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
436
  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.
@@ -46,7 +46,7 @@ No phase number → current phase from STATE.md.
46
46
 
47
47
  **Phase-specific context (if exists):**
48
48
  ```bash
49
- cat .planning/phase-{N}-context.md 2>/dev/null # from /qualia-discuss
49
+ cat .planning/phase-{N}-context.md 2>/dev/null # from /qualia-scope
50
50
  cat .planning/phase-{N}-research.md 2>/dev/null # from /qualia-research
51
51
  ```
52
52
 
@@ -62,7 +62,7 @@ cat .planning/phase-{N}-research.md 2>/dev/null # from /qualia-research
62
62
 
63
63
  **If phase has compliance/regulatory/architectural stakes AND no phase-{N}-context.md:**
64
64
 
65
- Suggest: *"Run /qualia-discuss {N} first to lock decisions? Optional."*
65
+ Suggest: *"Run /qualia-scope {N} first to lock decisions? Optional."*
66
66
 
67
67
  ### 3. Spawn Planner (Fresh Context)
68
68
 
@@ -40,7 +40,7 @@ Phase N from args, or current phase from STATE.md.
40
40
  ```bash
41
41
  cat .planning/PROJECT.md 2>/dev/null
42
42
  cat .planning/ROADMAP.md 2>/dev/null
43
- cat .planning/phase-{N}-context.md 2>/dev/null # if /qualia-discuss was run first
43
+ cat .planning/phase-{N}-context.md 2>/dev/null # if /qualia-scope was run first
44
44
  ```
45
45
 
46
46
  Identify what phase needs to know.
@@ -77,7 +77,7 @@ Screenshots at 3 viewports (375/768/1440), scores 9 design dimensions using visi
77
77
  Before high-stakes phases, run alignment skills against `.planning/CONTEXT.md` (domain glossary) and `.planning/decisions/` (ADRs):
78
78
 
79
79
  ```
80
- /qualia-discuss → relentless one-question interview, updates CONTEXT.md inline
80
+ /qualia-scope → relentless one-question interview, updates CONTEXT.md inline
81
81
  /qualia-optimize --deepen → find shallow modules, propose Ousterhout-style refactors
82
82
  /qualia-test --tdd → vertical-slice red→green→refactor for one feature
83
83
  /qualia-map → adapt Qualia to an existing brownfield repo's conventions (5th onboarding agent)
@@ -92,7 +92,7 @@ Broken thing? → /qualia-fix (root cause, minimal patch, verify, report)
92
92
  Single feature? → /qualia-feature (new capability: inline for trivia, fresh spawn for 1-5 files)
93
93
  Paused? → /qualia (restore from .continue-here.md or STATE.md)
94
94
  End of day? → /qualia-report (mandatory before clock-out; writes ERP payload)
95
- Unsure plan? → /qualia-discuss (capture decisions before planning)
95
+ Unsure plan? → /qualia-scope (capture decisions before planning)
96
96
  ```
97
97
 
98
98
  ## Outside-road command boundaries
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: qualia-scope
3
- description: "Archetype-aware, adversarial project/increment intake. Loads the matching references/archetypes/*.md + constitution, grills the operator against its Grill variables, gates on Definition-of-Done coverage, writes spec + CONTEXT.md terms + decision ADRs. Triggers: 'scope this', 'intake', 'grill me on the build', 'what does v1 need', replaces the fixed 14-question interview."
3
+ description: "Unified intake. PROJECT MODE = non-technical kickoff interview (before /qualia-new) → project-discovery.md. PHASE/INCREMENT MODE = archetype-aware adversarial grill (before /qualia-plan N or a new increment) phase-N-context.md / scope-{slug}.md, gated on Definition-of-Done. Loads references/archetypes/*.md + constitution, writes CONTEXT.md terms + decision ADRs. Absorbs /qualia-discuss. Triggers: 'scope this', 'intake', 'kickoff interview', 'grill me on the build', 'what does v1 need'."
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - Read
@@ -11,11 +11,87 @@ allowed-tools:
11
11
  - AskUserQuestion
12
12
  ---
13
13
 
14
- # /qualia-scope — Archetype-Aware Intake
14
+ # /qualia-scope — Unified Intake
15
15
 
16
- Replaces the fixed-question interview with an **archetype-driven, adversarial, DoD-gated** grill. It does not transcribe answers it pushes back on them. It does not exit until v1 is scoped and every clarification is resolved.
16
+ The one intake skill. It absorbs `/qualia-discuss`: two intents, picked by mode.
17
17
 
18
- This skill scopes both a **new project** and a **new increment** (milestone/phase) of an existing one. Same contract either way: pick the archetype, grill its variables, close every DoD area, emit testable criteria.
18
+ - **PROJECT MODE** the non-technical kickoff that runs at the very start of `/qualia-new`. Captures the human shape of the project (audience, voice, constraints) in the client's own words `.planning/project-discovery.md`. **Never technical here.**
19
+ - **PHASE / INCREMENT MODE** — the archetype-driven, adversarial, DoD-gated grill before `/qualia-plan N` or a new increment. It does not transcribe — it pushes back. It does not exit until v1 is scoped and every clarification is resolved → `.planning/phase-{N}-context.md` (phase) or `.planning/scope-{slug}.md` (increment).
20
+
21
+ ## Mode routing
22
+
23
+ ```bash
24
+ # Arg = a phase number → PHASE MODE. No arg / non-numeric → PROJECT MODE for a fresh
25
+ # project (no .planning/STATE.md), else INCREMENT MODE for a new scope on an existing one.
26
+ if [[ "$1" =~ ^[0-9]+$ ]]; then
27
+ MODE="phase"; PHASE_N="$1"
28
+ elif [ ! -f .planning/STATE.md ] && [ ! -f .planning/PROJECT.md ]; then
29
+ MODE="project"
30
+ else
31
+ MODE="increment"
32
+ fi
33
+ ```
34
+
35
+ - `MODE=project` → **PROJECT MODE** section below, then return to `/qualia-new`.
36
+ - `MODE=phase` or `MODE=increment` → **PHASE / INCREMENT MODE** section (the archetype grill).
37
+
38
+ ---
39
+
40
+ # PROJECT MODE — Kickoff Interview
41
+
42
+ The non-technical conversation at the start of `/qualia-new`, BEFORE roadmapping or research. Captures what the client wants, who it's for, brand voice, and constraints — verbatim.
43
+
44
+ **Hard rule: never go technical here.** No "Supabase or Postgres?", no architecture forks. Stack/DoD decisions happen in PHASE MODE, per phase. This mode is for the human shape.
45
+
46
+ ### P1. Project type (or accept it from `/qualia-new`)
47
+
48
+ If `/qualia-new` already asked the Demo vs Full gate (its literal first question), it passes `PROJECT_TYPE=demo` | `PROJECT_TYPE=full` via env/arg — **skip the gate, do not re-ask.** Only ask it when invoked standalone, via **AskUserQuestion** (header "Project shape"): "Demo (single shippable milestone, sales conversation)" vs "Full project (multi-milestone arc to Handoff)". Demo runs §1–§8 of the discovery template; Full runs all 14.
49
+
50
+ ### P2. Open
51
+
52
+ ```bash
53
+ node ${QUALIA_BIN}/qualia-ui.js banner scope 2>/dev/null || true
54
+ ```
55
+
56
+ Say **"Eight quick questions for the demo path"** or **"Fourteen questions to shape the full project — we'll move fast."**
57
+
58
+ ### P3. One question at a time, from `templates/project-discovery.md`
59
+
60
+ For each §1..§8 (demo) or §1..§14 (full), ask in plain language:
61
+
62
+ ```
63
+ **Question {N}/{total}:** {question text from the template}
64
+
65
+ ({one-line clarifier showing the kind of answer that helps})
66
+ ```
67
+
68
+ **NO "Recommend:" line in PROJECT MODE** — this is open discovery, not the grill. Wait for the answer; capture verbatim, don't paraphrase back. Thin answer → one follow-up max, then move on. `[Enter]` defaults exist on §2, §3, §5 only. Anti-references (§ "three sites this should NOT look like") are required — push back once, then capture whatever they give.
69
+
70
+ ### P4. Write `.planning/project-discovery.md`
71
+
72
+ Fill `${QUALIA_TEMPLATES}/project-discovery.md` with verbatim answers; set frontmatter `project_type` and `discovered_at`.
73
+
74
+ ### P5. Hand back
75
+
76
+ ```bash
77
+ git add .planning/project-discovery.md
78
+ git commit -m "docs: project discovery interview ($PROJECT_TYPE)"
79
+ ```
80
+
81
+ Invoked inline by `/qualia-new` → return control silently (it continues from its next step). Invoked standalone → `node ${QUALIA_BIN}/qualia-ui.js end "DISCOVERY CAPTURED" "/qualia-new"`.
82
+
83
+ ### Rules — PROJECT MODE
84
+
85
+ 1. **Never technical.** Stack/architecture forks are PHASE MODE.
86
+ 2. **Verbatim capture.** The client's exact phrasing feeds PRODUCT.md voice + the CONTEXT.md glossary — don't translate into framework-speak.
87
+ 3. **One question, one answer, move on.** No batching, no drilling past one follow-up.
88
+ 4. **Demo stops at §8.** Don't ask demo clients milestone-arc questions.
89
+
90
+ ---
91
+
92
+ # PHASE / INCREMENT MODE — Archetype Grill
93
+
94
+ The adversarial, DoD-gated intake. Scopes a **new increment** (phase/milestone) of an existing project, or a fresh project's first real scope after kickoff. Pick the archetype, grill its variables, close every DoD area, emit testable criteria.
19
95
 
20
96
  ## Inputs it honors
21
97
 
@@ -103,6 +179,12 @@ If the gate fails, name the exact open items and resume grilling at Step 4. Do n
103
179
  ### 8. Close
104
180
 
105
181
  ```bash
182
+ # A5: if this project uses the per-increment layout, claim the increment you
183
+ # just scoped so concurrent operators are routed around it (committed on this
184
+ # branch). No-op on legacy projects that haven't run `state.js migrate`.
185
+ if [ -d .planning/increments ]; then
186
+ node ${QUALIA_BIN}/state.js claim --id {id} --branch "$(git branch --show-current)"
187
+ fi
106
188
  git add .planning/ && git commit -m "scope: {archetype} intake — v1 scoped, DoD closed"
107
189
  node ${QUALIA_BIN}/qualia-ui.js end "SCOPED" "/qualia-plan" # or /qualia-new for a fresh project
108
190
  ```
@@ -177,7 +177,14 @@ node ${QUALIA_BIN}/qualia-ui.js ok "Latency: ${LATENCY}s"
177
177
  ```
178
178
 
179
179
  ```bash
180
- node ${QUALIA_BIN}/state.js transition --to shipped --deployed-url "$URL"
180
+ # A5: on the per-increment layout, `release` ships the active increment, runs
181
+ # the Definition-of-Done gate, and clears its claim (one committed file → no
182
+ # merge conflict). Falls back to the legacy phase-level transition otherwise.
183
+ if [ -d .planning/increments ]; then
184
+ node ${QUALIA_BIN}/state.js release --deployed-url "$URL"
185
+ else
186
+ node ${QUALIA_BIN}/state.js transition --to shipped --deployed-url "$URL"
187
+ fi
181
188
  ```
182
189
  Do NOT manually edit STATE.md or tracking.json — state.js handles both.
183
190
 
@@ -1,6 +1,6 @@
1
1
  # {{PROJECT_NAME}} — Domain Glossary
2
2
 
3
- <!-- Domain glossary. Loaded by every road agent. Update via /qualia-discuss. Keep entries terse (1 sentence + Avoid line). -->
3
+ <!-- Domain glossary. Loaded by every road agent. Update via /qualia-scope. Keep entries terse (1 sentence + Avoid line). -->
4
4
 
5
5
  ## Language
6
6
 
@@ -350,7 +350,7 @@
350
350
  <h3>Phase Depth &mdash; Optional</h3>
351
351
  <p class="cmd-group-note">Used before / around /qualia-plan when a phase needs deeper context.</p>
352
352
  <div class="commands">
353
- <div class="cmd"><span class="cmd-name">/qualia-discuss</span><span class="cmd-desc">Capture phase decisions, trade-offs, and constraints BEFORE planning. Use for complex phases with regulatory, compliance, or architectural stakes. Creates .planning/phase-{N}-context.md that planner honors as locked input.</span></div>
353
+ <div class="cmd"><span class="cmd-name">/qualia-scope</span><span class="cmd-desc">Unified intake. No args: non-technical kickoff discovery before /qualia-new. With N: archetype-aware adversarial grill before /qualia-plan, gated on Definition-of-Done. Use for complex phases with regulatory, compliance, or architectural stakes. Creates .planning/phase-{N}-context.md that the planner honors as locked input.</span></div>
354
354
  <div class="cmd"><span class="cmd-name">/qualia-research</span><span class="cmd-desc">Deep-research a niche domain or library BEFORE planning a specific phase. Spawns the researcher agent with Context7/WebFetch access. Writes to .planning/phase-{N}-research.md.</span></div>
355
355
  <div class="cmd"><span class="cmd-name">/qualia-map</span><span class="cmd-desc">Map an existing codebase to infer architecture, stack, conventions, and what's already built. For brownfield projects &mdash; run BEFORE /qualia-new so Validated requirements get inferred from existing code.</span></div>
356
356
  <div class="cmd"><span class="cmd-name">/qualia-milestone</span><span class="cmd-desc">Close out a completed milestone and prep the next one. Archives the current milestone's artifacts, updates REQUIREMENTS.md to mark v1 requirements Complete, and creates the next milestone roadmap.</span></div>
@@ -5,7 +5,7 @@ captured: {date}
5
5
 
6
6
  # Phase {N} Context: {Phase Name}
7
7
 
8
- Captured during `/qualia-discuss {N}` — decisions, trade-offs, and constraints that must inform planning.
8
+ Captured during `/qualia-scope {N}` — decisions, trade-offs, and constraints that must inform planning.
9
9
 
10
10
  ## Goal Restatement
11
11
 
@@ -0,0 +1,10 @@
1
+ # A5: per-step-mutated planning state is LOCAL (generated views), never committed.
2
+ # Only increments/ and releases/ are the durable, committed source of truth —
3
+ # so two people on two branches never conflict on the planning files.
4
+ STATE.md
5
+ tracking.json
6
+ .cursor.json
7
+ .state.lock
8
+ .state.journal
9
+ .backup/
10
+ migration-manifest.json
@@ -6,7 +6,7 @@ discovery_mode: project
6
6
 
7
7
  # Project Discovery, {Project Name}
8
8
 
9
- The non-technical kickoff interview output. `/qualia-discuss` writes this in PROJECT MODE before `/qualia-new` generates JOURNEY.md. Captures intent, audience, brand, and constraints in the user's own words.
9
+ The non-technical kickoff interview output. `/qualia-scope` writes this in PROJECT MODE before `/qualia-new` generates JOURNEY.md. Captures intent, audience, brand, and constraints in the user's own words.
10
10
 
11
11
  Demo path: 8 questions. Full-project path: 14 questions.
12
12
 
@@ -51,5 +51,5 @@ Typical phase structure for a chatbot, AI assistant, tool-calling agent, or RAG
51
51
  ## Research Flags
52
52
 
53
53
  - **Domain-specific prompting** (legal, medical, financial advice) → run `/qualia-research` for the prompt engineering phase
54
- - **RAG over specific datasets** (vector DB, chunking strategy) → `/qualia-discuss` before planning
55
- - **Multi-step agent orchestration** → `/qualia-discuss` to lock tool boundaries before planning
54
+ - **RAG over specific datasets** (vector DB, chunking strategy) → `/qualia-scope` before planning
55
+ - **Multi-step agent orchestration** → `/qualia-scope` to lock tool boundaries before planning
@@ -51,6 +51,6 @@ Typical phase structure for a React Native / Expo app, iOS + Android.
51
51
 
52
52
  ## Research Flags
53
53
 
54
- - **App Store compliance** (in-app purchases, privacy, age ratings) → `/qualia-discuss` to lock scope
54
+ - **App Store compliance** (in-app purchases, privacy, age ratings) → `/qualia-scope` to lock scope
55
55
  - **Native module choices** (notifications, maps, camera) → `/qualia-research` per phase
56
- - **Deep linking and universal links** → `/qualia-discuss` before navigation phase
56
+ - **Deep linking and universal links** → `/qualia-scope` before navigation phase
@@ -51,5 +51,5 @@ Typical phase structure for a phone agent, VAPI bot, Retell agent, or call handl
51
51
  ## Research Flags
52
52
 
53
53
  - **Provider choice** (Retell vs VAPI vs ElevenLabs direct) → `/qualia-research 1` to compare for this specific use case
54
- - **Telephony setup** (DIDs, porting, SIP) → `/qualia-discuss` to lock decisions before wiring
54
+ - **Telephony setup** (DIDs, porting, SIP) → `/qualia-scope` to lock decisions before wiring
55
55
  - **Prompt engineering for voice** → `/qualia-research` for the agent config phase
@@ -55,4 +55,4 @@ Typical phase structure for a client website, SaaS landing page, dashboard, or m
55
55
  ## Research Flags
56
56
 
57
57
  - **Niche domain integrations** (e.g., legal compliance, medical records, financial regulations) → run `/qualia-research N` before planning that phase
58
- - **Complex auth** (SSO, multi-tenant, RBAC) → run `/qualia-discuss N` first
58
+ - **Complex auth** (SSO, multi-tenant, RBAC) → run `/qualia-scope N` first
package/tests/bin.test.sh CHANGED
@@ -1076,18 +1076,18 @@ for SKILL in qualia-zoom qualia-issues qualia-triage; do
1076
1076
  fi
1077
1077
  done
1078
1078
 
1079
- # 85. qualia-discuss SKILL.md mentions "grilling" (validates v5 fold of qualia-grill into discuss)
1080
- if grep -qi "grilling" "$TMP/.claude/skills/qualia-discuss/SKILL.md"; then
1081
- pass "qualia-discuss documents grilling pattern (folded from qualia-grill)"
1079
+ # 85. A4 fold: qualia-discuss is RETIRED, its grill absorbed by qualia-scope (PHASE MODE).
1080
+ if [ ! -f "$TMP/.claude/skills/qualia-discuss/SKILL.md" ] && grep -qi "grill" "$TMP/.claude/skills/qualia-scope/SKILL.md"; then
1081
+ pass "qualia-discuss retired; qualia-scope carries the grill (PHASE/INCREMENT MODE)"
1082
1082
  else
1083
- fail_case "qualia-discuss missing grilling reference"
1083
+ fail_case "qualia-discuss should be retired and its grill absorbed by qualia-scope"
1084
1084
  fi
1085
1085
 
1086
- # 86. qualia-discuss SKILL.md references CONTEXT.md (validates v5 substrate wiring)
1087
- if grep -q "CONTEXT.md" "$TMP/.claude/skills/qualia-discuss/SKILL.md"; then
1088
- pass "qualia-discuss references CONTEXT.md"
1086
+ # 86. qualia-scope carries the CONTEXT.md substrate + PROJECT MODE kickoff discuss used to own.
1087
+ if grep -q "CONTEXT.md" "$TMP/.claude/skills/qualia-scope/SKILL.md" && grep -q "PROJECT MODE" "$TMP/.claude/skills/qualia-scope/SKILL.md"; then
1088
+ pass "qualia-scope references CONTEXT.md + has PROJECT MODE (absorbed from qualia-discuss)"
1089
1089
  else
1090
- fail_case "qualia-discuss missing CONTEXT.md reference"
1090
+ fail_case "qualia-scope missing CONTEXT.md reference or PROJECT MODE"
1091
1091
  fi
1092
1092
 
1093
1093
  # 87. qualia-road has disable-model-invocation: true (pure reference skill, user-only)