qualia-framework 4.5.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.
Files changed (64) hide show
  1. package/AGENTS.md +24 -0
  2. package/CLAUDE.md +12 -75
  3. package/README.md +23 -16
  4. package/agents/builder.md +9 -21
  5. package/agents/planner.md +8 -0
  6. package/agents/verifier.md +8 -0
  7. package/agents/visual-evaluator.md +132 -0
  8. package/bin/cli.js +54 -18
  9. package/bin/install.js +369 -29
  10. package/bin/qualia-ui.js +208 -1
  11. package/bin/slop-detect.mjs +5 -0
  12. package/bin/state.js +34 -1
  13. package/docs/install-redesign-builder-prompt.md +290 -0
  14. package/docs/install-redesign-pilot.md +234 -0
  15. package/docs/playwright-loop-builder-prompt.md +185 -0
  16. package/docs/playwright-loop-design-notes.md +108 -0
  17. package/docs/playwright-loop-pilot-results.md +170 -0
  18. package/docs/playwright-loop-review-2026-05-03.md +65 -0
  19. package/docs/playwright-loop-tester-prompt.md +213 -0
  20. package/docs/reviews/matt-pocock-skills-analysis.md +300 -0
  21. package/guide.md +9 -5
  22. package/hooks/env-empty-guard.js +74 -0
  23. package/hooks/pre-compact.js +19 -9
  24. package/hooks/pre-deploy-gate.js +8 -2
  25. package/hooks/pre-push.js +26 -12
  26. package/hooks/supabase-destructive-guard.js +62 -0
  27. package/hooks/vercel-account-guard.js +91 -0
  28. package/package.json +2 -1
  29. package/rules/design-brand.md +4 -0
  30. package/rules/design-laws.md +4 -0
  31. package/rules/design-product.md +4 -0
  32. package/rules/design-rubric.md +4 -0
  33. package/rules/grounding.md +4 -0
  34. package/skills/qualia-build/SKILL.md +40 -46
  35. package/skills/qualia-discuss/SKILL.md +51 -68
  36. package/skills/qualia-handoff/SKILL.md +1 -0
  37. package/skills/qualia-issues/SKILL.md +151 -0
  38. package/skills/qualia-map/SKILL.md +78 -35
  39. package/skills/qualia-new/REFERENCE.md +139 -0
  40. package/skills/qualia-new/SKILL.md +45 -121
  41. package/skills/qualia-optimize/REFERENCE.md +202 -0
  42. package/skills/qualia-optimize/SKILL.md +72 -237
  43. package/skills/qualia-plan/SKILL.md +58 -65
  44. package/skills/qualia-polish-loop/REFERENCE.md +265 -0
  45. package/skills/qualia-polish-loop/SKILL.md +201 -0
  46. package/skills/qualia-polish-loop/fixtures/broken.html +117 -0
  47. package/skills/qualia-polish-loop/fixtures/clean.html +196 -0
  48. package/skills/qualia-polish-loop/scripts/loop.mjs +302 -0
  49. package/skills/qualia-polish-loop/scripts/playwright-capture.mjs +197 -0
  50. package/skills/qualia-polish-loop/scripts/score.mjs +176 -0
  51. package/skills/qualia-report/SKILL.md +141 -200
  52. package/skills/qualia-research/SKILL.md +28 -33
  53. package/skills/qualia-road/SKILL.md +103 -0
  54. package/skills/qualia-ship/SKILL.md +1 -0
  55. package/skills/qualia-task/SKILL.md +1 -1
  56. package/skills/qualia-test/SKILL.md +50 -2
  57. package/skills/qualia-triage/SKILL.md +152 -0
  58. package/skills/qualia-verify/SKILL.md +63 -104
  59. package/skills/qualia-zoom/SKILL.md +51 -0
  60. package/skills/zoho-workflow/SKILL.md +1 -1
  61. package/templates/CONTEXT.md +36 -0
  62. package/templates/decisions/ADR-template.md +30 -0
  63. package/tests/bin.test.sh +451 -7
  64. package/tests/state.test.sh +58 -0
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: qualia-issues
3
+ description: "Break a phase plan into independent vertical-slice GitHub issues with needs-triage label. Each issue is demoable end-to-end (schema → API → UI → tests). Dependency-ordered. Externalizes Qualia work to the open queue so other agents, sessions, or human contributors can pull from it. Use when user says 'create issues from this plan', 'externalize the phase', 'turn this into GitHub issues', 'qualia-issues', 'split into tickets', or after /qualia-plan when the work should be parallelizable. Hard dependency: requires tracker config — run /qualia-map first if .planning/agents/tracker.md is missing."
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Grep
10
+ - Glob
11
+ - AskUserQuestion
12
+ ---
13
+
14
+ # /qualia-issues — Phase Plan → Independent Vertical-Slice GH Issues
15
+
16
+ Externalizes a phase plan to the GitHub issue queue. Each issue is a thin slice that delivers a complete demoable behavior end-to-end. Other Qualia sessions, autonomous agents, or human contributors can then pull from the queue.
17
+
18
+ ## Why vertical slices
19
+
20
+ ANTI-PATTERN: chop the plan horizontally (issue 1 = "all schema work", issue 2 = "all API work", issue 3 = "all UI"). This creates dependencies that block parallelism, and no single issue is demoable on its own.
21
+
22
+ CORRECT: each issue traverses every layer (schema → API → UI → tests) for one narrow user-facing behavior. Many thin slices > few thick ones.
23
+
24
+ ## Hard dependencies (per Matt Pocock's ADR-0001)
25
+
26
+ This skill cannot work meaningfully without:
27
+ - `.planning/agents/tracker.md` — tells it where to file issues (GH, GL, local)
28
+ - `.planning/agents/labels.md` — tells it the canonical-role-to-existing-label mapping
29
+ - `gh` CLI authenticated (if tracker is GitHub)
30
+
31
+ **If any are missing, halt and tell the user:** "Run `/qualia-map` first — it scans your repo and writes the adapter config so Qualia honors your existing tracker conventions."
32
+
33
+ ## Process
34
+
35
+ ### 1. Determine phase
36
+
37
+ Phase number from `$ARGUMENTS` if provided, else current from `node ~/.claude/bin/state.js check`.
38
+
39
+ ### 2. Load substrate
40
+
41
+ ```bash
42
+ cat .planning/agents/tracker.md
43
+ cat .planning/agents/labels.md
44
+ cat .planning/phase-{N}-plan.md
45
+ cat .planning/CONTEXT.md 2>/dev/null
46
+ cat .planning/PROJECT.md
47
+ ```
48
+
49
+ If `phase-{N}-plan.md` is missing, halt: "No plan exists for phase {N}. Run `/qualia-plan {N}` first."
50
+
51
+ ### 3. Decompose into vertical slices
52
+
53
+ Read the phase plan tasks. Group/split into slices where each slice:
54
+ - Delivers ONE user-facing behavior end-to-end
55
+ - Touches every relevant layer (schema, server, client, tests) needed for that behavior
56
+ - Is independently demoable or verifiable
57
+ - Has explicit blocking-dependencies on other slices (kept minimal)
58
+
59
+ Use **CONTEXT.md domain language** in titles and descriptions. Don't say "user table" if the glossary says "AuthUser" or "Customer."
60
+
61
+ ### 4. Show proposed slices to user
62
+
63
+ ```
64
+ Proposed slices for phase {N}:
65
+
66
+ Slice 1: {title in domain language}
67
+ Behavior: {one sentence}
68
+ Touches: schema, server-action, page route, test
69
+ Blocks: none
70
+
71
+ Slice 2: ...
72
+ Blocks: Slice 1 (needs the schema migration)
73
+ ```
74
+
75
+ Use `AskUserQuestion`:
76
+ - header: "Approve slices?"
77
+ - question: "File these {N} issues?"
78
+ - options: "File them" / "Re-decompose" / "Cancel"
79
+
80
+ ### 5. File issues in dependency order
81
+
82
+ For each approved slice (in dependency order so blocking slices exist when blockees are filed):
83
+
84
+ ```bash
85
+ # Write the body to a temp file FIRST — never heredoc-interpolate user content into shell.
86
+ # Plan content (titles, behaviors, criteria) is user-controlled; shell metacharacters or a
87
+ # rogue 'EOF' line in the plan would break out of the heredoc. --body-file eliminates the risk.
88
+ BODY_FILE=$(mktemp -t qualia-issue.XXXXXX.md)
89
+ cat > "$BODY_FILE" <<EOF_TEMPLATE
90
+ ## End-to-end behavior
91
+ {one paragraph}
92
+
93
+ ## Acceptance criteria
94
+ - [ ] {criterion 1 — observable behavior, not implementation detail}
95
+ - [ ] {criterion 2}
96
+ - [ ] tests pass for the slice
97
+
98
+ ## Blocks
99
+ - {issue # of any blocking slice, or "none"}
100
+
101
+ ## Domain terms touched
102
+ {terms from CONTEXT.md this slice involves}
103
+
104
+ ## Phase context
105
+ Part of phase {N} ({phase name}). Plan: .planning/phase-{N}-plan.md.
106
+ EOF_TEMPLATE
107
+
108
+ gh issue create \
109
+ --title "{title in domain language}" \
110
+ --body-file "$BODY_FILE" \
111
+ --label "needs-triage,enhancement"
112
+
113
+ rm -f "$BODY_FILE"
114
+ ```
115
+
116
+ Capture the returned issue number for use in subsequent slices' "Blocks" fields.
117
+
118
+ **Why temp file, not heredoc:** plan files (`.planning/phase-{N}-plan.md`) and CONTEXT.md are project repo content — anyone with commit access can write them. A crafted plan with shell metacharacters or a literal `EOF` line in the content could break out of an inline heredoc and execute arbitrary shell. `--body-file` reads the body as raw bytes, no shell expansion. The `EOF_TEMPLATE` token (vs the standard `EOF`) is also more resistant to accidental collisions.
119
+
120
+ ### 6. Write summary
121
+
122
+ `.planning/phase-{N}-issues.md`:
123
+
124
+ ```markdown
125
+ # Phase {N} — Issue Queue
126
+
127
+ Filed {date}. Status: open queue.
128
+
129
+ | # | Slice | Issue | Blocks |
130
+ |---|---|---|---|
131
+ | 1 | {title} | #123 | none |
132
+ | 2 | {title} | #124 | #123 |
133
+ ```
134
+
135
+ ### 7. Commit and route
136
+
137
+ ```bash
138
+ git add .planning/phase-{N}-issues.md
139
+ git commit -m "docs(phase-{N}): externalize {N_slices} slices to GH issue queue"
140
+
141
+ node ~/.claude/bin/qualia-ui.js end "QUEUE FILED" "/qualia-triage"
142
+ ```
143
+
144
+ ## Rules
145
+
146
+ 1. **Each issue is demoable on its own.** If a "completed" issue can't be shown as working behavior, the slicing was wrong.
147
+ 2. **CONTEXT.md language is mandatory.** Issue titles use domain terms, not implementation jargon.
148
+ 3. **No file paths or line numbers in issue bodies.** Issues describe behavior. Implementation details live in the phase plan.
149
+ 4. **Acceptance criteria are observable behaviors.** "Form validates email format" not "regex.test() returns true".
150
+ 5. **Dependencies kept minimal.** If slice A blocks slice B blocks slice C blocks slice D, the slicing collapsed to horizontal — re-decompose.
151
+ 6. **`needs-triage` is the default label.** `/qualia-triage` will route from there.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: qualia-map
3
- description: "Map an existing codebase to infer architecture, stack, conventions, and what's already built. For brownfield projects — run BEFORE /qualia-new so Validated requirements get inferred from existing code."
3
+ description: "Map an existing codebase to infer architecture, stack, conventions, what's already built, AND adapt Qualia to the repo's existing tracker/labels/glossary conventions (onboarding). For brownfield projects — run BEFORE /qualia-new so Validated requirements get inferred from existing code and Qualia commands respect the repo's existing process."
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - Read
@@ -12,13 +12,13 @@ allowed-tools:
12
12
 
13
13
  # /qualia-map — Codebase Mapping (Brownfield)
14
14
 
15
- Scans an existing repo and produces `.planning/codebase/` architecture, stack, conventions, concerns. Used by `/qualia-new` to infer what's already built and seed Validated requirements.
15
+ Scans existing repo `.planning/codebase/` (architecture, stack, conventions, concerns). `/qualia-new` uses this to infer capabilities and seed Validated reqs.
16
16
 
17
17
  ## When to Use
18
18
 
19
- - Taking over an existing client project
20
- - Adding features to a repo you didn't build
21
- - Before `/qualia-new` on any directory that already has code
19
+ - Taking over existing client project
20
+ - Adding features to repo you didn't build
21
+ - Before `/qualia-new` on any directory with existing code
22
22
 
23
23
  ## Usage
24
24
 
@@ -48,48 +48,72 @@ If `ALREADY_MAPPED`, ask:
48
48
  node ~/.claude/bin/qualia-ui.js banner map
49
49
  ```
50
50
 
51
- ### 3. Spawn Parallel Mapper Agents
51
+ ### 3. Spawn 5 Mapper Agents (parallel)
52
52
 
53
- Map 4 dimensions in parallel for speed. Each writes one file in `.planning/codebase/`:
53
+ Each writes one file in `.planning/codebase/`:
54
54
 
55
55
  ```
56
- Agent 1: Architecture scanner
56
+ Agent 1: Architecture
57
57
  Agent(prompt="
58
- Scan the current codebase and produce .planning/codebase/architecture.md.
58
+ Scan codebase .planning/codebase/architecture.md.
59
59
  Identify: entry points, folder structure, module boundaries, data flow.
60
- Focus on WHAT the codebase does, not HOW to fix it.
60
+ Focus on WHAT, not HOW to fix.
61
61
  ", subagent_type="general-purpose", description="Architecture scan")
62
62
 
63
- Agent 2: Stack detector
63
+ Agent 2: Stack
64
64
  Agent(prompt="
65
- Detect the tech stack. Read package.json, requirements.txt, Gemfile, etc.
66
- Produce .planning/codebase/stack.md listing: runtime, framework, key libraries,
67
- database, hosting, CI. Include version numbers.
65
+ Detect stack from package.json, requirements.txt, Gemfile, etc.
66
+ Output: .planning/codebase/stack.md (runtime, framework, key libs, DB, hosting, CI + versions).
68
67
  ", subagent_type="general-purpose", description="Stack detection")
69
68
 
70
- Agent 3: Conventions analyzer
69
+ Agent 3: Conventions
71
70
  Agent(prompt="
72
- Analyze code style and conventions. Sample 10-15 files across the codebase.
73
- Produce .planning/codebase/conventions.md listing: naming, component patterns,
74
- file organization, import style, test style, commit message format.
71
+ Analyze code style/conventions. Sample 10-15 files.
72
+ Output: .planning/codebase/conventions.md (naming, component patterns, file org, import style, test style, commit format).
75
73
  ", subagent_type="general-purpose", description="Conventions analysis")
76
74
 
77
- Agent 4: Concerns scanner
75
+ Agent 4: Concerns
78
76
  Agent(prompt="
79
- Scan for code quality concerns NOT to fix, just to document.
80
- Look for: TODO/FIXME, deprecated APIs, outdated dependencies, missing tests,
81
- security smells (hardcoded secrets, no input validation).
82
- Produce .planning/codebase/concerns.md.
77
+ Scan quality concerns (document, NOT fix).
78
+ Look for: TODO/FIXME, deprecated APIs, outdated deps, missing tests, security smells.
79
+ Output: .planning/codebase/concerns.md.
83
80
  ", subagent_type="general-purpose", description="Concerns scan")
81
+
82
+ Agent 5: Onboarding adapter
83
+ Agent(prompt="
84
+ Detect existing process so Qualia honors it.
85
+ Output: .planning/codebase/onboarding.md with sections:
86
+
87
+ ## Issue tracker
88
+ - gh repo view --json url 2>/dev/null (GitHub?)
89
+ - Check: gitlab-ci.yml, .gitlab/ (GitLab?)
90
+ - Check: .scratch/, docs/issues/, ISSUES.md (local?)
91
+ - Else: 'none; Qualia uses .planning/decisions/ + tracking.json only'
92
+
93
+ ## Existing labels (only if GH/GL detected)
94
+ - gh label list --json name,description,color 2>/dev/null
95
+ - Map to canonical: bug, enhancement, needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix
96
+ - Output mapping table. Note missing canonical roles.
97
+
98
+ ## Domain docs
99
+ - Check: CONTEXT.md, GLOSSARY.md, docs/glossary.md, docs/domain.md, docs/adr/, doc/architecture/, .architecture/
100
+ - Output: location (or 'none; Qualia creates .planning/CONTEXT.md')
101
+
102
+ ## Existing agent files
103
+ - Check: CLAUDE.md, AGENTS.md, .cursor/, .cursorrules, .aider.conf.yml, .continue/
104
+ - List found. Qualia APPENDs substrate, never overwrites.
105
+
106
+ Terse. Each section < 10 lines. Programmatically parsed.
107
+ ", subagent_type="general-purpose", description="Onboarding adapter")
84
108
  ```
85
109
 
86
- ### 4. Wait for All 4
110
+ ### 4. Wait for All 5
87
111
 
88
- After all 4 agents complete, read the 4 output files.
112
+ All done read 5 outputs.
89
113
 
90
114
  ### 5. Synthesize
91
115
 
92
- Create `.planning/codebase/README.md` one-page summary linking to the 4 dimension files.
116
+ Create `.planning/codebase/README.md` (one-page summary linking dimensions):
93
117
 
94
118
  ```markdown
95
119
  # Codebase Map
@@ -112,7 +136,7 @@ Based on existing code, this project already does:
112
136
  - {capability 2} (evidence: {file path})
113
137
  - {capability 3} (evidence: {file path})
114
138
 
115
- These become **Validated requirements** in PROJECT.md when `/qualia-new` runs.
139
+ These become **Validated reqs** in PROJECT.md when `/qualia-new` runs.
116
140
 
117
141
  ## Dimension Details
118
142
 
@@ -120,8 +144,26 @@ These become **Validated requirements** in PROJECT.md when `/qualia-new` runs.
120
144
  - [Stack](./stack.md)
121
145
  - [Conventions](./conventions.md)
122
146
  - [Concerns](./concerns.md)
147
+ - [Onboarding adapter](./onboarding.md)
148
+
149
+ ## Onboarding adapter snapshot
150
+
151
+ - **Issue tracker:** {from onboarding.md}
152
+ - **Domain docs:** {from onboarding.md}
153
+ - **Existing agent files:** {from onboarding.md}
123
154
  ```
124
155
 
156
+ ### 5.5 Write adapter config (only if onboarding detected something)
157
+
158
+ Read `.planning/codebase/onboarding.md`. Per detected dimension:
159
+
160
+ - Issue tracker → `.planning/agents/tracker.md`
161
+ - Labels → `.planning/agents/labels.md` (canonical mapping)
162
+ - Domain docs at non-default path → `.planning/agents/domain.md`
163
+ - CLAUDE.md/AGENTS.md found → APPEND `## Qualia substrate` (never overwrite)
164
+
165
+ "none" → skip silently, defaults apply.
166
+
125
167
  ### 6. Commit
126
168
 
127
169
  ```bash
@@ -137,16 +179,17 @@ node ~/.claude/bin/qualia-ui.js end "CODEBASE MAPPED" "/qualia-new"
137
179
 
138
180
  ## What `/qualia-new` Does With This
139
181
 
140
- When `/qualia-new` runs AFTER `/qualia-map`, it:
182
+ After `/qualia-map`:
141
183
  1. Reads `.planning/codebase/README.md`
142
184
  2. Extracts Validated capabilities
143
- 3. Pre-populates PROJECT.md with Validated requirements section
144
- 4. Skips questions about things already built
145
- 5. Focuses questioning on NEW capabilities being added
185
+ 3. Pre-populates PROJECT.md Validated reqs
186
+ 4. Skips questions about existing capabilities
187
+ 5. Focuses on NEW capabilities
146
188
 
147
189
  ## Rules
148
190
 
149
- 1. **Non-destructive.** This skill only READS code, never modifies it.
150
- 2. **Four parallel agents.** Don't sequential-scan — parallel is ~4x faster.
151
- 3. **Dimension files are structured.** The orchestrator downstream (`/qualia-new`) reads them programmatically.
152
- 4. **Concerns fixes.** This skill documents concerns. It does NOT fix them. Use `/qualia-optimize` for that.
191
+ 1. **Non-destructive.** Only READS code. Writes to `.planning/codebase/`, `.planning/agents/`, and APPENDs to CLAUDE.md/AGENTS.md.
192
+ 2. **Five parallel agents.** No sequential scan.
193
+ 3. **Dimension files structured.** `/qualia-new` reads programmatically.
194
+ 4. **Concerns not fixes.** Document only. `/qualia-optimize` to fix.
195
+ 5. **Onboarding respects existing process.** GH issues → Qualia uses them. Never overwrite; only append.
@@ -0,0 +1,139 @@
1
+ # /qualia-new Reference Templates
2
+
3
+ Detailed agent-prompt templates and rendering formats referenced by SKILL.md.
4
+ Each section is a verbatim template -- copy it, fill the `{placeholders}`, and spawn.
5
+
6
+ ## Researcher prompts (4 dimensions)
7
+
8
+ Spawn all 4 as parallel `Agent()` calls in a single message. Each uses the same structure with a different `<dimension>`.
9
+
10
+ ```
11
+ Agent(prompt="
12
+ Read your role: @~/.claude/agents/researcher.md
13
+
14
+ <dimension>stack</dimension>
15
+ <domain>{inferred domain from PROJECT.md}</domain>
16
+ <project_context>{PROJECT.md summary}</project_context>
17
+ <milestone_context>multi-milestone -- research must cover scalability through Milestone 3+</milestone_context>
18
+ <output_path>.planning/research/STACK.md</output_path>
19
+ ", subagent_type="qualia-researcher", description="Stack research")
20
+
21
+ Agent(prompt="
22
+ Read your role: @~/.claude/agents/researcher.md
23
+
24
+ <dimension>features</dimension>
25
+ <domain>{inferred domain}</domain>
26
+ <project_context>{PROJECT.md summary}</project_context>
27
+ <milestone_context>multi-milestone -- distinguish v1 table stakes from v2 differentiators</milestone_context>
28
+ <output_path>.planning/research/FEATURES.md</output_path>
29
+ ", subagent_type="qualia-researcher", description="Features research")
30
+
31
+ Agent(prompt="
32
+ Read your role: @~/.claude/agents/researcher.md
33
+
34
+ <dimension>architecture</dimension>
35
+ <domain>{inferred domain}</domain>
36
+ <project_context>{PROJECT.md summary}</project_context>
37
+ <milestone_context>multi-milestone -- Phase 1 foundations must support final-milestone requirements</milestone_context>
38
+ <output_path>.planning/research/ARCHITECTURE.md</output_path>
39
+ ", subagent_type="qualia-researcher", description="Architecture research")
40
+
41
+ Agent(prompt="
42
+ Read your role: @~/.claude/agents/researcher.md
43
+
44
+ <dimension>pitfalls</dimension>
45
+ <domain>{inferred domain}</domain>
46
+ <project_context>{PROJECT.md summary}</project_context>
47
+ <milestone_context>multi-milestone -- flag risks that stall LATER milestones, not just v1</milestone_context>
48
+ <output_path>.planning/research/PITFALLS.md</output_path>
49
+ ", subagent_type="qualia-researcher", description="Pitfalls research")
50
+ ```
51
+
52
+ ## Synthesizer prompt
53
+
54
+ Spawn after all 4 researchers complete.
55
+
56
+ ```
57
+ Agent(prompt="
58
+ Read your role: @~/.claude/agents/research-synthesizer.md
59
+
60
+ Merge the 4 research files at .planning/research/ into .planning/research/SUMMARY.md.
61
+ This is a multi-milestone project -- the SUMMARY must suggest a FULL milestone arc
62
+ (2-5 milestones including Handoff), not just a v1 phase list. Include roadmap
63
+ implications AND handoff implications (what client takeover requires).
64
+ ", subagent_type="qualia-research-synthesizer", description="Synthesize research")
65
+ ```
66
+
67
+ ## Roadmapper prompt
68
+
69
+ Spawn with full-journey mandate. If the user passed `--full-detail`, set `<full_detail>true</full_detail>`.
70
+
71
+ ```
72
+ Agent(prompt="
73
+ Read your role: @~/.claude/agents/roadmapper.md
74
+
75
+ <task>
76
+ Create the FULL JOURNEY for this project:
77
+ - .planning/JOURNEY.md -- all milestones (2-5 including Handoff) with exit criteria
78
+ - .planning/REQUIREMENTS.md -- requirements grouped by milestone
79
+ - .planning/ROADMAP.md -- Milestone 1's phase detail (and ALL milestones if full_detail=true)
80
+
81
+ User-scoped v1 features:
82
+ {list of features selected in Step 9, grouped by category}
83
+
84
+ Template type: {template_type from config.json}
85
+ If set, use ~/.claude/qualia-templates/projects/{type}.md as the milestone arc starting point.
86
+
87
+ <full_detail>{true if --full-detail, else false}</full_detail>
88
+ - false (default): Milestone 1 gets full phase detail; M2..M{N-1} stay as sketches. Detail fills in when each milestone opens via /qualia-milestone.
89
+ - true: every milestone (M1..Handoff) gets full phase-level detail in ROADMAP.md upfront. Useful when the client wants a fully-committed plan at kickoff.
90
+
91
+ The final milestone MUST be named 'Handoff' with the fixed 4 phases
92
+ (Polish, Content + SEO, Final QA, Handoff). Do not omit it.
93
+
94
+ After writing, update STATE.md via:
95
+ node ~/.claude/bin/state.js init \
96
+ --project '{name}' --client '{client}' --type '{type}' \
97
+ --milestone_name '{Milestone 1 name}' \
98
+ --phases '<JSON: Milestone 1 phases only>' \
99
+ --total_phases <count>
100
+ </task>
101
+ ", subagent_type="qualia-roadmapper", description="Create full journey")
102
+ ```
103
+
104
+ ## Journey ladder format
105
+
106
+ The branded journey ladder rendered in Step 11. Use `node ~/.claude/bin/qualia-ui.js journey-tree .planning/JOURNEY.md` for the programmatic version. The manual ASCII fallback format is below.
107
+
108
+ ```
109
+ ## Proposed Journey
110
+
111
+ **{N} milestones to handoff** | **{X} requirements mapped** | All v1 requirements covered
112
+
113
+ +-- Milestone 1 . {Name} [CURRENT]
114
+ | Why now: {one line}
115
+ | Exit: {outcome 1}, {outcome 2}
116
+ | Phases: 1. {name} -> 2. {name} -> 3. {name}
117
+ | Requirements: {REQ-IDs}
118
+ +--
119
+ |
120
+ v
121
+ +-- Milestone 2 . {Name}
122
+ | Why now: {one line}
123
+ | Exit: {outcome 1}, {outcome 2}
124
+ | Phases: 1. {name} -> 2. {name}
125
+ | Requirements: {REQ-IDs}
126
+ +--
127
+ |
128
+ v
129
+ ...
130
+ |
131
+ v
132
+ +-- Milestone {N} . Handoff [FINAL]
133
+ | Exit: Deployed, docs, credentials, walkthrough
134
+ | Phases: 1. Polish -> 2. Content + SEO -> 3. Final QA -> 4. Handoff
135
+ +--
136
+
137
+ Milestone 1 is fully planned. Milestones 2..{N-1} are sketched and will be detailed
138
+ when they open. Milestone {N} (Handoff) uses the standard 4-phase template.
139
+ ```