qualia-framework 2.6.0 → 3.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 (328) hide show
  1. package/CLAUDE.md +63 -0
  2. package/README.md +108 -30
  3. package/agents/builder.md +110 -0
  4. package/agents/planner.md +186 -0
  5. package/agents/qa-browser.md +186 -0
  6. package/agents/verifier.md +369 -0
  7. package/bin/cli.js +691 -492
  8. package/bin/install.js +622 -0
  9. package/bin/qualia-ui.js +284 -0
  10. package/bin/state.js +824 -0
  11. package/bin/statusline.js +252 -0
  12. package/docs/erp-contract.md +161 -0
  13. package/guide.md +63 -0
  14. package/hooks/auto-update.js +117 -0
  15. package/hooks/block-env-edit.js +52 -0
  16. package/hooks/branch-guard.js +68 -0
  17. package/hooks/migration-guard.js +83 -0
  18. package/hooks/pre-compact.js +52 -0
  19. package/hooks/pre-deploy-gate.js +149 -0
  20. package/hooks/pre-push.js +53 -0
  21. package/hooks/session-start.js +126 -0
  22. package/package.json +30 -20
  23. package/rules/design-reference.md +179 -0
  24. package/rules/frontend.md +126 -0
  25. package/rules/infrastructure.md +87 -0
  26. package/skills/qualia/SKILL.md +88 -0
  27. package/skills/qualia-build/SKILL.md +115 -0
  28. package/skills/qualia-debug/SKILL.md +87 -0
  29. package/skills/qualia-design/SKILL.md +99 -0
  30. package/skills/qualia-handoff/SKILL.md +66 -0
  31. package/skills/qualia-help/SKILL.md +60 -0
  32. package/skills/qualia-idk/SKILL.md +8 -0
  33. package/skills/qualia-learn/SKILL.md +111 -0
  34. package/skills/qualia-new/SKILL.md +323 -0
  35. package/skills/qualia-pause/SKILL.md +63 -0
  36. package/skills/qualia-plan/SKILL.md +101 -0
  37. package/skills/qualia-polish/SKILL.md +207 -0
  38. package/skills/qualia-quick/SKILL.md +37 -0
  39. package/skills/qualia-report/SKILL.md +114 -0
  40. package/skills/qualia-resume/SKILL.md +49 -0
  41. package/skills/qualia-review/SKILL.md +161 -0
  42. package/skills/qualia-ship/SKILL.md +90 -0
  43. package/skills/qualia-skill-new/SKILL.md +167 -0
  44. package/skills/qualia-task/SKILL.md +91 -0
  45. package/skills/qualia-test/SKILL.md +134 -0
  46. package/skills/qualia-verify/SKILL.md +113 -0
  47. package/templates/DESIGN.md +475 -0
  48. package/templates/help.html +476 -0
  49. package/templates/plan.md +42 -0
  50. package/templates/project.md +22 -0
  51. package/templates/state.md +27 -0
  52. package/templates/tracking.json +20 -0
  53. package/tests/bin.test.sh +687 -0
  54. package/tests/hooks.test.sh +384 -0
  55. package/tests/runner.js +1956 -0
  56. package/tests/state.test.sh +713 -0
  57. package/tests/statusline.test.sh +243 -0
  58. package/bin/collect-metrics.sh +0 -62
  59. package/framework/.claudeignore +0 -51
  60. package/framework/CLAUDE.md +0 -51
  61. package/framework/MCP_SETUP.md +0 -229
  62. package/framework/agents/architecture-strategist.md +0 -53
  63. package/framework/agents/backend-agent.md +0 -150
  64. package/framework/agents/code-simplicity-reviewer.md +0 -86
  65. package/framework/agents/frontend-agent.md +0 -111
  66. package/framework/agents/kieran-typescript-reviewer.md +0 -96
  67. package/framework/agents/performance-oracle.md +0 -111
  68. package/framework/agents/qualia-codebase-mapper.md +0 -761
  69. package/framework/agents/qualia-debugger.md +0 -1204
  70. package/framework/agents/qualia-executor.md +0 -882
  71. package/framework/agents/qualia-integration-checker.md +0 -424
  72. package/framework/agents/qualia-phase-researcher.md +0 -457
  73. package/framework/agents/qualia-plan-checker.md +0 -700
  74. package/framework/agents/qualia-planner.md +0 -1245
  75. package/framework/agents/qualia-project-researcher.md +0 -603
  76. package/framework/agents/qualia-research-synthesizer.md +0 -200
  77. package/framework/agents/qualia-roadmapper.md +0 -606
  78. package/framework/agents/qualia-verifier.md +0 -686
  79. package/framework/agents/red-team-qa.md +0 -130
  80. package/framework/agents/security-auditor.md +0 -72
  81. package/framework/agents/team-orchestrator.md +0 -229
  82. package/framework/agents/teams/framework-audit-team.md +0 -66
  83. package/framework/agents/teams/full-stack-team.md +0 -48
  84. package/framework/agents/teams/optimize-team.md +0 -53
  85. package/framework/agents/teams/review-team.md +0 -70
  86. package/framework/agents/teams/ship-team.md +0 -86
  87. package/framework/agents/test-agent.md +0 -182
  88. package/framework/hooks/auto-format.sh +0 -54
  89. package/framework/hooks/block-env-edit.sh +0 -42
  90. package/framework/hooks/branch-guard.sh +0 -43
  91. package/framework/hooks/confirm-delete.sh +0 -59
  92. package/framework/hooks/migration-validate.sh +0 -77
  93. package/framework/hooks/notification-speak.sh +0 -16
  94. package/framework/hooks/pre-commit.sh +0 -100
  95. package/framework/hooks/pre-compact.sh +0 -56
  96. package/framework/hooks/pre-deploy-gate.sh +0 -160
  97. package/framework/hooks/qualia-colors.sh +0 -32
  98. package/framework/hooks/retention-cleanup.sh +0 -62
  99. package/framework/hooks/save-session-state.sh +0 -185
  100. package/framework/hooks/session-context-loader.sh +0 -96
  101. package/framework/hooks/session-learn.sh +0 -32
  102. package/framework/hooks/skill-announce.sh +0 -123
  103. package/framework/hooks/tool-error-announce.sh +0 -27
  104. package/framework/install.ps1 +0 -323
  105. package/framework/install.sh +0 -313
  106. package/framework/qualia-framework/VERSION +0 -1
  107. package/framework/qualia-framework/assets/qualia-logo.png +0 -0
  108. package/framework/qualia-framework/bin/collect-metrics.sh +0 -67
  109. package/framework/qualia-framework/bin/generate-report-docx.py +0 -429
  110. package/framework/qualia-framework/bin/qualia-tools.js +0 -2201
  111. package/framework/qualia-framework/bin/qualia-tools.test.js +0 -1054
  112. package/framework/qualia-framework/references/checkpoints.md +0 -775
  113. package/framework/qualia-framework/references/completion-checklists.md +0 -359
  114. package/framework/qualia-framework/references/continuation-format.md +0 -249
  115. package/framework/qualia-framework/references/continuation-prompt.md +0 -97
  116. package/framework/qualia-framework/references/decimal-phase-calculation.md +0 -65
  117. package/framework/qualia-framework/references/design-quality.md +0 -56
  118. package/framework/qualia-framework/references/employee-guide.md +0 -167
  119. package/framework/qualia-framework/references/git-integration.md +0 -254
  120. package/framework/qualia-framework/references/git-planning-commit.md +0 -50
  121. package/framework/qualia-framework/references/model-profile-resolution.md +0 -32
  122. package/framework/qualia-framework/references/model-profiles.md +0 -73
  123. package/framework/qualia-framework/references/phase-argument-parsing.md +0 -61
  124. package/framework/qualia-framework/references/planning-config.md +0 -195
  125. package/framework/qualia-framework/references/questioning.md +0 -141
  126. package/framework/qualia-framework/references/tdd.md +0 -263
  127. package/framework/qualia-framework/references/ui-brand.md +0 -160
  128. package/framework/qualia-framework/references/verification-patterns.md +0 -612
  129. package/framework/qualia-framework/templates/DEBUG.md +0 -159
  130. package/framework/qualia-framework/templates/DESIGN.md +0 -81
  131. package/framework/qualia-framework/templates/UAT.md +0 -247
  132. package/framework/qualia-framework/templates/codebase/architecture.md +0 -255
  133. package/framework/qualia-framework/templates/codebase/concerns.md +0 -310
  134. package/framework/qualia-framework/templates/codebase/conventions.md +0 -307
  135. package/framework/qualia-framework/templates/codebase/integrations.md +0 -280
  136. package/framework/qualia-framework/templates/codebase/stack.md +0 -186
  137. package/framework/qualia-framework/templates/codebase/structure.md +0 -285
  138. package/framework/qualia-framework/templates/codebase/testing.md +0 -480
  139. package/framework/qualia-framework/templates/config.json +0 -35
  140. package/framework/qualia-framework/templates/context.md +0 -283
  141. package/framework/qualia-framework/templates/continue-here.md +0 -78
  142. package/framework/qualia-framework/templates/debug-subagent-prompt.md +0 -91
  143. package/framework/qualia-framework/templates/discovery.md +0 -146
  144. package/framework/qualia-framework/templates/lab-notes.md +0 -16
  145. package/framework/qualia-framework/templates/milestone-archive.md +0 -123
  146. package/framework/qualia-framework/templates/milestone.md +0 -115
  147. package/framework/qualia-framework/templates/phase-prompt.md +0 -567
  148. package/framework/qualia-framework/templates/planner-subagent-prompt.md +0 -117
  149. package/framework/qualia-framework/templates/project.md +0 -184
  150. package/framework/qualia-framework/templates/projects/ai-agent.md +0 -156
  151. package/framework/qualia-framework/templates/projects/mobile-app.md +0 -181
  152. package/framework/qualia-framework/templates/projects/voice-agent.md +0 -134
  153. package/framework/qualia-framework/templates/projects/website.md +0 -137
  154. package/framework/qualia-framework/templates/requirements.md +0 -231
  155. package/framework/qualia-framework/templates/research-project/ARCHITECTURE.md +0 -204
  156. package/framework/qualia-framework/templates/research-project/FEATURES.md +0 -147
  157. package/framework/qualia-framework/templates/research-project/PITFALLS.md +0 -200
  158. package/framework/qualia-framework/templates/research-project/STACK.md +0 -120
  159. package/framework/qualia-framework/templates/research-project/SUMMARY.md +0 -170
  160. package/framework/qualia-framework/templates/research.md +0 -552
  161. package/framework/qualia-framework/templates/roadmap.md +0 -206
  162. package/framework/qualia-framework/templates/state.md +0 -179
  163. package/framework/qualia-framework/templates/summary-complex.md +0 -59
  164. package/framework/qualia-framework/templates/summary-minimal.md +0 -41
  165. package/framework/qualia-framework/templates/summary-standard.md +0 -48
  166. package/framework/qualia-framework/templates/summary.md +0 -246
  167. package/framework/qualia-framework/templates/user-setup.md +0 -311
  168. package/framework/qualia-framework/templates/verification-report.md +0 -322
  169. package/framework/qualia-framework/workflows/add-phase.md +0 -179
  170. package/framework/qualia-framework/workflows/add-todo.md +0 -157
  171. package/framework/qualia-framework/workflows/audit-milestone.md +0 -241
  172. package/framework/qualia-framework/workflows/check-todos.md +0 -176
  173. package/framework/qualia-framework/workflows/complete-milestone.md +0 -858
  174. package/framework/qualia-framework/workflows/diagnose-issues.md +0 -219
  175. package/framework/qualia-framework/workflows/discovery-phase.md +0 -289
  176. package/framework/qualia-framework/workflows/discuss-phase.md +0 -534
  177. package/framework/qualia-framework/workflows/execute-phase.md +0 -559
  178. package/framework/qualia-framework/workflows/execute-plan.md +0 -438
  179. package/framework/qualia-framework/workflows/help.md +0 -470
  180. package/framework/qualia-framework/workflows/insert-phase.md +0 -220
  181. package/framework/qualia-framework/workflows/list-phase-assumptions.md +0 -178
  182. package/framework/qualia-framework/workflows/map-codebase.md +0 -327
  183. package/framework/qualia-framework/workflows/new-milestone.md +0 -363
  184. package/framework/qualia-framework/workflows/new-project.md +0 -982
  185. package/framework/qualia-framework/workflows/pause-work.md +0 -122
  186. package/framework/qualia-framework/workflows/plan-milestone-gaps.md +0 -256
  187. package/framework/qualia-framework/workflows/plan-phase.md +0 -422
  188. package/framework/qualia-framework/workflows/progress.md +0 -389
  189. package/framework/qualia-framework/workflows/quick.md +0 -252
  190. package/framework/qualia-framework/workflows/remove-phase.md +0 -326
  191. package/framework/qualia-framework/workflows/research-phase.md +0 -74
  192. package/framework/qualia-framework/workflows/resume-project.md +0 -306
  193. package/framework/qualia-framework/workflows/set-profile.md +0 -80
  194. package/framework/qualia-framework/workflows/settings.md +0 -145
  195. package/framework/qualia-framework/workflows/transition.md +0 -556
  196. package/framework/qualia-framework/workflows/update.md +0 -197
  197. package/framework/qualia-framework/workflows/verify-phase.md +0 -195
  198. package/framework/qualia-framework/workflows/verify-work.md +0 -625
  199. package/framework/rules/context7.md +0 -14
  200. package/framework/rules/frontend.md +0 -33
  201. package/framework/rules/speed.md +0 -23
  202. package/framework/scripts/__pycache__/say.cpython-314.pyc +0 -0
  203. package/framework/scripts/apply-retention.sh +0 -120
  204. package/framework/scripts/bootstrap-pop-os.sh +0 -354
  205. package/framework/scripts/claude-voice +0 -13
  206. package/framework/scripts/cleanup.sh +0 -131
  207. package/framework/scripts/cowork-mode.sh +0 -141
  208. package/framework/scripts/generate-project-claude-md.sh +0 -153
  209. package/framework/scripts/load-test-webhook.js +0 -172
  210. package/framework/scripts/say.py +0 -236
  211. package/framework/scripts/showcase-video-recorder/ffmpeg-builder.js +0 -167
  212. package/framework/scripts/showcase-video-recorder/playwright-helpers.js +0 -216
  213. package/framework/scripts/speak.py +0 -55
  214. package/framework/scripts/speak.sh +0 -18
  215. package/framework/scripts/status.sh +0 -138
  216. package/framework/scripts/sync-to-framework.sh +0 -65
  217. package/framework/scripts/voice-hotkey.py +0 -227
  218. package/framework/scripts/voice-input.sh +0 -51
  219. package/framework/skills/animate/SKILL.md +0 -202
  220. package/framework/skills/bolder/SKILL.md +0 -144
  221. package/framework/skills/browser-qa/SKILL.md +0 -536
  222. package/framework/skills/clarify/SKILL.md +0 -179
  223. package/framework/skills/client-handoff/SKILL.md +0 -135
  224. package/framework/skills/collab-onboard/SKILL.md +0 -111
  225. package/framework/skills/colorize/SKILL.md +0 -170
  226. package/framework/skills/critique/SKILL.md +0 -126
  227. package/framework/skills/deep-research/SKILL.md +0 -240
  228. package/framework/skills/delight/SKILL.md +0 -329
  229. package/framework/skills/deploy/SKILL.md +0 -261
  230. package/framework/skills/deploy-verify/SKILL.md +0 -377
  231. package/framework/skills/deploy-verify/scripts/canary-check.sh +0 -206
  232. package/framework/skills/deploy-verify/scripts/check-console-errors.js +0 -147
  233. package/framework/skills/deploy-verify/scripts/check-cwv.js +0 -139
  234. package/framework/skills/deploy-verify/scripts/project-detect.sh +0 -84
  235. package/framework/skills/deploy-verify/scripts/verify.sh +0 -548
  236. package/framework/skills/design-quieter/SKILL.md +0 -130
  237. package/framework/skills/distill/SKILL.md +0 -149
  238. package/framework/skills/docs-lookup/SKILL.md +0 -79
  239. package/framework/skills/fcm-notifications/SKILL.md +0 -125
  240. package/framework/skills/financial-ledger/SKILL.md +0 -1039
  241. package/framework/skills/frontend-master/NOTICE.md +0 -4
  242. package/framework/skills/frontend-master/SKILL.md +0 -127
  243. package/framework/skills/frontend-master/reference/color-and-contrast.md +0 -132
  244. package/framework/skills/frontend-master/reference/interaction-design.md +0 -123
  245. package/framework/skills/frontend-master/reference/motion-design.md +0 -99
  246. package/framework/skills/frontend-master/reference/responsive-design.md +0 -114
  247. package/framework/skills/frontend-master/reference/spatial-design.md +0 -100
  248. package/framework/skills/frontend-master/reference/typography.md +0 -131
  249. package/framework/skills/frontend-master/reference/ux-writing.md +0 -107
  250. package/framework/skills/harden/SKILL.md +0 -357
  251. package/framework/skills/i18n-rtl/SKILL.md +0 -752
  252. package/framework/skills/learn/SKILL.md +0 -95
  253. package/framework/skills/memory/SKILL.md +0 -50
  254. package/framework/skills/mobile-expo/SKILL.md +0 -977
  255. package/framework/skills/mobile-expo/references/store-checklist.md +0 -550
  256. package/framework/skills/nestjs-backend/README.md +0 -73
  257. package/framework/skills/nestjs-backend/SKILL.md +0 -446
  258. package/framework/skills/nestjs-backend/references/templates.md +0 -1173
  259. package/framework/skills/normalize/SKILL.md +0 -79
  260. package/framework/skills/onboard/SKILL.md +0 -242
  261. package/framework/skills/openrouter-agent/SKILL.md +0 -922
  262. package/framework/skills/polish/SKILL.md +0 -209
  263. package/framework/skills/pr/SKILL.md +0 -66
  264. package/framework/skills/qualia/SKILL.md +0 -199
  265. package/framework/skills/qualia-add-todo/SKILL.md +0 -68
  266. package/framework/skills/qualia-audit-milestone/SKILL.md +0 -95
  267. package/framework/skills/qualia-check-todos/SKILL.md +0 -55
  268. package/framework/skills/qualia-complete-milestone/SKILL.md +0 -134
  269. package/framework/skills/qualia-debug/SKILL.md +0 -149
  270. package/framework/skills/qualia-design/SKILL.md +0 -203
  271. package/framework/skills/qualia-discuss-phase/SKILL.md +0 -72
  272. package/framework/skills/qualia-evolve/SKILL.md +0 -200
  273. package/framework/skills/qualia-execute-phase/SKILL.md +0 -89
  274. package/framework/skills/qualia-framework-audit/SKILL.md +0 -604
  275. package/framework/skills/qualia-guide/SKILL.md +0 -32
  276. package/framework/skills/qualia-help/SKILL.md +0 -114
  277. package/framework/skills/qualia-idk/SKILL.md +0 -352
  278. package/framework/skills/qualia-list-phase-assumptions/SKILL.md +0 -67
  279. package/framework/skills/qualia-new-milestone/SKILL.md +0 -72
  280. package/framework/skills/qualia-new-project/SKILL.md +0 -232
  281. package/framework/skills/qualia-optimize/SKILL.md +0 -417
  282. package/framework/skills/qualia-pause-work/SKILL.md +0 -96
  283. package/framework/skills/qualia-plan-milestone-gaps/SKILL.md +0 -57
  284. package/framework/skills/qualia-plan-phase/SKILL.md +0 -104
  285. package/framework/skills/qualia-production-check/SKILL.md +0 -0
  286. package/framework/skills/qualia-progress/SKILL.md +0 -53
  287. package/framework/skills/qualia-quick/SKILL.md +0 -89
  288. package/framework/skills/qualia-report/SKILL.md +0 -166
  289. package/framework/skills/qualia-research-phase/SKILL.md +0 -88
  290. package/framework/skills/qualia-resume-work/SKILL.md +0 -62
  291. package/framework/skills/qualia-review/SKILL.md +0 -263
  292. package/framework/skills/qualia-start/SKILL.md +0 -161
  293. package/framework/skills/qualia-verify-work/SKILL.md +0 -132
  294. package/framework/skills/rag/SKILL.md +0 -750
  295. package/framework/skills/responsive/SKILL.md +0 -231
  296. package/framework/skills/retro/SKILL.md +0 -284
  297. package/framework/skills/sakani-conventions/SKILL.md +0 -136
  298. package/framework/skills/sakani-conventions/evals/evals.json +0 -23
  299. package/framework/skills/sakani-conventions/references/entities.md +0 -365
  300. package/framework/skills/sakani-conventions/references/error-codes.md +0 -95
  301. package/framework/skills/seo-master/SKILL.md +0 -490
  302. package/framework/skills/seo-master/references/checklist.md +0 -199
  303. package/framework/skills/seo-master/references/structured-data.md +0 -609
  304. package/framework/skills/ship/SKILL.md +0 -239
  305. package/framework/skills/stack-researcher/SKILL.md +0 -215
  306. package/framework/skills/status/SKILL.md +0 -154
  307. package/framework/skills/status/scripts/health-check.sh +0 -562
  308. package/framework/skills/subscription-payments/SKILL.md +0 -250
  309. package/framework/skills/supabase/SKILL.md +0 -973
  310. package/framework/skills/supabase/references/templates.md +0 -159
  311. package/framework/skills/team/SKILL.md +0 -67
  312. package/framework/skills/test-runner/SKILL.md +0 -202
  313. package/framework/skills/voice-agent/SKILL.md +0 -1312
  314. package/framework/skills/zoho-workflow/SKILL.md +0 -51
  315. package/framework/statusline-command.sh +0 -117
  316. package/framework/teams/default/inboxes/plan-04.json +0 -9
  317. package/framework/teams/review-team.md +0 -75
  318. package/framework/teams/ship-team.md +0 -86
  319. package/profiles/fawzi.json +0 -16
  320. package/profiles/hasan.json +0 -16
  321. package/profiles/moayad.json +0 -16
  322. package/templates/CLAUDE-owner.md +0 -52
  323. package/templates/CLAUDE.md.hbs +0 -58
  324. package/templates/env.claude.template +0 -12
  325. package/templates/settings.json +0 -172
  326. package/uninstall.sh +0 -90
  327. /package/{framework/rules → rules}/deployment.md +0 -0
  328. /package/{framework/rules → rules}/security.md +0 -0
@@ -1,982 +0,0 @@
1
- <purpose>
2
- Initialize a new project through unified flow: questioning, research (optional), requirements, roadmap. This is the most leveraged moment in any project — deep questioning here means better plans, better execution, better outcomes. One workflow takes you from idea to ready-for-planning.
3
- </purpose>
4
-
5
- <required_reading>
6
- Read all files referenced by the invoking prompt's execution_context before starting.
7
- </required_reading>
8
-
9
- <process>
10
-
11
- ## 1. Setup
12
-
13
- **MANDATORY FIRST STEP — Execute these checks before ANY user interaction:**
14
-
15
- ```bash
16
- INIT=$(node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js init new-project)
17
- ```
18
-
19
- Parse JSON for: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`.
20
-
21
- **If `project_exists` is true:** Error — project already initialized. Use `/qualia-progress`.
22
-
23
- **If `has_git` is false:** Initialize git:
24
- ```bash
25
- git init
26
- ```
27
-
28
- ## 1.5. Scan Uploaded Files for Tech Stack Conflicts
29
-
30
- **Before asking any questions**, check if the user placed files in the project directory:
31
-
32
- ```bash
33
- ls *.pdf *.docx *.doc *.txt *.md *.png *.jpg *.jpeg 2>/dev/null | head -10
34
- ```
35
-
36
- If files are found, read them. If ANY file mentions a tech stack that differs from the Qualia standard (Next.js + React + TypeScript + Supabase + Vercel), you MUST ask the user:
37
-
38
- Use AskUserQuestion:
39
- - header: "Tech Stack"
40
- - question: "The uploaded document mentions {detected stack}. Which stack should we use?"
41
- - options:
42
- - "Qualia stack (Recommended)" — Next.js + React + TypeScript + Supabase + Vercel. This is what we build with.
43
- - "Document stack" — Use {detected stack} as specified in the document. The workflow adapts.
44
-
45
- **Never silently adopt a non-Qualia stack from uploaded documents.** Always confirm first.
46
-
47
- If no files found or no stack conflict: skip silently.
48
-
49
- ## 2. Brownfield Offer
50
-
51
- **If `needs_codebase_map` is true** (from init — existing code detected but no codebase map):
52
-
53
- Use AskUserQuestion:
54
- - header: "Existing Code"
55
- - question: "I detected existing code in this directory. Would you like to map the codebase first?"
56
- - options:
57
- - "Map codebase first" — Run /qualia-map-codebase to understand existing architecture (Recommended)
58
- - "Skip mapping" — Proceed with project initialization
59
-
60
- **If "Map codebase first":**
61
-
62
- Run the codebase mapping INLINE — invoke the `/qualia-map-codebase` skill directly, wait for it to complete, then continue to Step 3. Do NOT exit the flow and tell the user to re-run — that breaks the experience.
63
-
64
- **If "Skip mapping" OR `needs_codebase_map` is false:** Continue to Step 3.
65
-
66
- ## 3. Deep Questioning
67
-
68
- **Display stage banner:**
69
-
70
- ```
71
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
72
- Qualia ► QUESTIONING
73
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
74
- ```
75
-
76
- **Open the conversation:**
77
-
78
- Ask inline (freeform, NOT AskUserQuestion):
79
-
80
- "What do you want to build?"
81
-
82
- Wait for their response. This gives you the context needed to ask intelligent follow-up questions.
83
-
84
- **Follow the thread:**
85
-
86
- Based on what they said, ask follow-up questions that dig into their response. Use AskUserQuestion with options that probe what they mentioned — interpretations, clarifications, concrete examples.
87
-
88
- Keep following threads. Each answer opens new threads to explore. Ask about:
89
- - What excited them
90
- - What problem sparked this
91
- - What they mean by vague terms
92
- - What it would actually look like
93
- - What's already decided
94
-
95
- Consult `questioning.md` for techniques:
96
- - Challenge vagueness
97
- - Make abstract concrete
98
- - Surface assumptions
99
- - Find edges
100
- - Reveal motivation
101
-
102
- **Check context (background, not out loud):**
103
-
104
- As you go, mentally check the context checklist from `questioning.md`. If gaps remain, weave questions naturally. Don't suddenly switch to checklist mode.
105
-
106
- **Decision gate:**
107
-
108
- When you could write a clear PROJECT.md, use AskUserQuestion:
109
-
110
- - header: "Ready?"
111
- - question: "I think I understand what you're after. Ready to create PROJECT.md?"
112
- - options:
113
- - "Create PROJECT.md" — Let's move forward
114
- - "Keep exploring" — I want to share more / ask me more
115
-
116
- If "Keep exploring" — ask what they want to add, or identify gaps and probe naturally.
117
-
118
- Loop until "Create PROJECT.md" selected.
119
-
120
- ## 3.5. Template Selection
121
-
122
- **Detect project type from questioning answers.** Look for signals:
123
- - "website", "landing page", "marketing site", "SaaS" → `website`
124
- - "chatbot", "AI assistant", "chat agent", "AI agent" → `ai-agent`
125
- - "voice agent", "phone agent", "call bot", "VAPI", "Retell" → `voice-agent`
126
- - "mobile app", "iOS", "Android", "React Native", "Expo" → `mobile-app`
127
-
128
- **If a project type is detected:**
129
-
130
- Use AskUserQuestion:
131
- - header: "Template"
132
- - question: "This looks like a {type} project. Use the {type} template? Pre-populates standard phases so you only plan what's unique."
133
- - options:
134
- - "Use template (Recommended)" — Pre-populate phases from {type} template, customize during roadmap
135
- - "Skip template" — Build roadmap from scratch through full questioning
136
-
137
- **If "Use template":**
138
- 1. Read the template: `~/.claude/qualia-framework/templates/projects/{type}.md`
139
- 2. Store template choice in memory for Step 8 (roadmap creation)
140
- 3. Set `template_type` = detected type
141
- 4. Set `template_phases` = phases from template file
142
-
143
- **If "Skip template" OR no type detected:** Continue normally. Set `template_type` = null.
144
-
145
- ## 4. Write PROJECT.md
146
-
147
- Synthesize all context into `.planning/PROJECT.md` using the template from `templates/project.md`.
148
-
149
- **For greenfield projects:**
150
-
151
- Initialize requirements as hypotheses:
152
-
153
- ```markdown
154
- ## Requirements
155
-
156
- ### Validated
157
-
158
- (None yet — ship to validate)
159
-
160
- ### Active
161
-
162
- - [ ] [Requirement 1]
163
- - [ ] [Requirement 2]
164
- - [ ] [Requirement 3]
165
-
166
- ### Out of Scope
167
-
168
- - [Exclusion 1] — [why]
169
- - [Exclusion 2] — [why]
170
- ```
171
-
172
- All Active requirements are hypotheses until shipped and validated.
173
-
174
- **For brownfield projects (codebase map exists):**
175
-
176
- Infer Validated requirements from existing code:
177
-
178
- 1. Read `.planning/codebase/ARCHITECTURE.md` and `STACK.md`
179
- 2. Identify what the codebase already does
180
- 3. These become the initial Validated set
181
-
182
- ```markdown
183
- ## Requirements
184
-
185
- ### Validated
186
-
187
- - ✓ [Existing capability 1] — existing
188
- - ✓ [Existing capability 2] — existing
189
- - ✓ [Existing capability 3] — existing
190
-
191
- ### Active
192
-
193
- - [ ] [New requirement 1]
194
- - [ ] [New requirement 2]
195
-
196
- ### Out of Scope
197
-
198
- - [Exclusion 1] — [why]
199
- ```
200
-
201
- **Key Decisions:**
202
-
203
- Initialize with any decisions made during questioning:
204
-
205
- ```markdown
206
- ## Key Decisions
207
-
208
- | Decision | Rationale | Outcome |
209
- |----------|-----------|---------|
210
- | [Choice from questioning] | [Why] | — Pending |
211
- ```
212
-
213
- **Last updated footer:**
214
-
215
- ```markdown
216
- ---
217
- *Last updated: [date] after initialization*
218
- ```
219
-
220
- Do not compress. Capture everything gathered.
221
-
222
- **Commit PROJECT.md:**
223
-
224
- ```bash
225
- mkdir -p .planning
226
- node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "docs: initialize project" --files .planning/PROJECT.md
227
- ```
228
-
229
- ## 5. Workflow Preferences
230
-
231
- **Use sensible defaults. Ask ONE question:**
232
-
233
- ```
234
- questions: [
235
- {
236
- header: "Settings",
237
- question: "Use recommended settings? (Interactive, standard depth, all quality agents, balanced models)",
238
- multiSelect: false,
239
- options: [
240
- { label: "Yes (Recommended)", description: "Best for client projects — all quality gates enabled" },
241
- { label: "Quick mode", description: "Faster: skip research, fewer phases (3-5), budget models" },
242
- { label: "Customize", description: "Choose each setting individually" }
243
- ]
244
- }
245
- ]
246
- ```
247
-
248
- **If "Yes (Recommended)":** Use all defaults below.
249
- **If "Quick mode":** Use quick defaults (depth: quick, research: false, plan_check: false, model_profile: budget).
250
- **If "Customize":** Show individual options for mode, depth, execution, research, plan_check, verifier, model_profile as separate AskUserQuestion calls.
251
-
252
- **Defaults (Recommended):**
253
- - mode: interactive
254
- - depth: standard (5-8 phases)
255
- - parallelization: true
256
- - model_profile: balanced
257
- - workflow.research: true
258
- - workflow.plan_check: true
259
- - workflow.verifier: true
260
-
261
- Create `.planning/config.json` with all settings:
262
-
263
- ```json
264
- {
265
- "mode": "yolo|interactive",
266
- "depth": "quick|standard|comprehensive",
267
- "parallelization": true|false,
268
- "commit_docs": true|false,
269
- "model_profile": "quality|balanced|budget",
270
- "workflow": {
271
- "research": true|false,
272
- "plan_check": true|false,
273
- "verifier": true|false
274
- }
275
- }
276
- ```
277
-
278
- **commit_docs is always true.** Never add `.planning/` to `.gitignore` — it must be tracked for team collaboration and portal sync.
279
-
280
- **Commit config.json:**
281
-
282
- ```bash
283
- node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "chore: add project config" --files .planning/config.json
284
- ```
285
-
286
- **Note:** Run `/qualia-settings` anytime to update these preferences.
287
-
288
- ## 5.5. Resolve Model Profile
289
-
290
- Use models from init: `researcher_model`, `synthesizer_model`, `roadmapper_model`.
291
-
292
- ## 6. Research Phase
293
-
294
- Check `config.json` → `workflow.research`. If true, run research. If false, skip to step 7.
295
-
296
- Do NOT ask the user again — this was already decided in step 5 (workflow preferences).
297
-
298
- **If research is enabled:**
299
-
300
- Display stage banner:
301
- ```
302
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
303
- Qualia ► RESEARCHING
304
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
305
-
306
- Researching [domain] ecosystem...
307
- ```
308
-
309
- Create research directory:
310
- ```bash
311
- mkdir -p .planning/research
312
- ```
313
-
314
- **Determine milestone context:**
315
-
316
- Check if this is greenfield or subsequent milestone:
317
- - If no "Validated" requirements in PROJECT.md → Greenfield (building from scratch)
318
- - If "Validated" requirements exist → Subsequent milestone (adding to existing app)
319
-
320
- Display spawning indicator:
321
- ```
322
- ◆ Spawning 4 researchers in parallel...
323
- → Stack research
324
- → Features research
325
- → Architecture research
326
- → Pitfalls research
327
- ```
328
-
329
- Spawn 4 parallel qualia-project-researcher agents with rich context:
330
-
331
- ```
332
- Task(prompt="First, read /home/qualia/.claude/agents/qualia-project-researcher.md for your role and instructions.
333
-
334
- <research_type>
335
- Project Research — Stack dimension for [domain].
336
- </research_type>
337
-
338
- <milestone_context>
339
- [greenfield OR subsequent]
340
-
341
- Greenfield: Research the standard stack for building [domain] from scratch.
342
- Subsequent: Research what's needed to add [target features] to an existing [domain] app. Don't re-research the existing system.
343
- </milestone_context>
344
-
345
- <question>
346
- What's the standard 2025 stack for [domain]?
347
- </question>
348
-
349
- <project_context>
350
- [PROJECT.md summary - core value, constraints, what they're building]
351
- </project_context>
352
-
353
- <downstream_consumer>
354
- Your STACK.md feeds into roadmap creation. Be prescriptive:
355
- - Specific libraries with versions
356
- - Clear rationale for each choice
357
- - What NOT to use and why
358
- </downstream_consumer>
359
-
360
- <quality_gate>
361
- - [ ] Versions are current (verify with Context7/official docs, not training data)
362
- - [ ] Rationale explains WHY, not just WHAT
363
- - [ ] Confidence levels assigned to each recommendation
364
- </quality_gate>
365
-
366
- <output>
367
- Write to: .planning/research/STACK.md
368
- Use template: /home/qualia/.claude/qualia-framework/templates/research-project/STACK.md
369
- </output>
370
- ", subagent_type="general-purpose", model="{researcher_model}", description="Stack research")
371
-
372
- Task(prompt="First, read /home/qualia/.claude/agents/qualia-project-researcher.md for your role and instructions.
373
-
374
- <research_type>
375
- Project Research — Features dimension for [domain].
376
- </research_type>
377
-
378
- <milestone_context>
379
- [greenfield OR subsequent]
380
-
381
- Greenfield: What features do [domain] products have? What's table stakes vs differentiating?
382
- Subsequent: How do [target features] typically work? What's expected behavior?
383
- </milestone_context>
384
-
385
- <question>
386
- What features do [domain] products have? What's table stakes vs differentiating?
387
- </question>
388
-
389
- <project_context>
390
- [PROJECT.md summary]
391
- </project_context>
392
-
393
- <downstream_consumer>
394
- Your FEATURES.md feeds into requirements definition. Categorize clearly:
395
- - Table stakes (must have or users leave)
396
- - Differentiators (competitive advantage)
397
- - Anti-features (things to deliberately NOT build)
398
- </downstream_consumer>
399
-
400
- <quality_gate>
401
- - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
402
- - [ ] Complexity noted for each feature
403
- - [ ] Dependencies between features identified
404
- </quality_gate>
405
-
406
- <output>
407
- Write to: .planning/research/FEATURES.md
408
- Use template: /home/qualia/.claude/qualia-framework/templates/research-project/FEATURES.md
409
- </output>
410
- ", subagent_type="general-purpose", model="{researcher_model}", description="Features research")
411
-
412
- Task(prompt="First, read /home/qualia/.claude/agents/qualia-project-researcher.md for your role and instructions.
413
-
414
- <research_type>
415
- Project Research — Architecture dimension for [domain].
416
- </research_type>
417
-
418
- <milestone_context>
419
- [greenfield OR subsequent]
420
-
421
- Greenfield: How are [domain] systems typically structured? What are major components?
422
- Subsequent: How do [target features] integrate with existing [domain] architecture?
423
- </milestone_context>
424
-
425
- <question>
426
- How are [domain] systems typically structured? What are major components?
427
- </question>
428
-
429
- <project_context>
430
- [PROJECT.md summary]
431
- </project_context>
432
-
433
- <downstream_consumer>
434
- Your ARCHITECTURE.md informs phase structure in roadmap. Include:
435
- - Component boundaries (what talks to what)
436
- - Data flow (how information moves)
437
- - Suggested build order (dependencies between components)
438
- </downstream_consumer>
439
-
440
- <quality_gate>
441
- - [ ] Components clearly defined with boundaries
442
- - [ ] Data flow direction explicit
443
- - [ ] Build order implications noted
444
- </quality_gate>
445
-
446
- <output>
447
- Write to: .planning/research/ARCHITECTURE.md
448
- Use template: /home/qualia/.claude/qualia-framework/templates/research-project/ARCHITECTURE.md
449
- </output>
450
- ", subagent_type="general-purpose", model="{researcher_model}", description="Architecture research")
451
-
452
- Task(prompt="First, read /home/qualia/.claude/agents/qualia-project-researcher.md for your role and instructions.
453
-
454
- <research_type>
455
- Project Research — Pitfalls dimension for [domain].
456
- </research_type>
457
-
458
- <milestone_context>
459
- [greenfield OR subsequent]
460
-
461
- Greenfield: What do [domain] projects commonly get wrong? Critical mistakes?
462
- Subsequent: What are common mistakes when adding [target features] to [domain]?
463
- </milestone_context>
464
-
465
- <question>
466
- What do [domain] projects commonly get wrong? Critical mistakes?
467
- </question>
468
-
469
- <project_context>
470
- [PROJECT.md summary]
471
- </project_context>
472
-
473
- <downstream_consumer>
474
- Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
475
- - Warning signs (how to detect early)
476
- - Prevention strategy (how to avoid)
477
- - Which phase should address it
478
- </downstream_consumer>
479
-
480
- <quality_gate>
481
- - [ ] Pitfalls are specific to this domain (not generic advice)
482
- - [ ] Prevention strategies are actionable
483
- - [ ] Phase mapping included where relevant
484
- </quality_gate>
485
-
486
- <output>
487
- Write to: .planning/research/PITFALLS.md
488
- Use template: /home/qualia/.claude/qualia-framework/templates/research-project/PITFALLS.md
489
- </output>
490
- ", subagent_type="general-purpose", model="{researcher_model}", description="Pitfalls research")
491
- ```
492
-
493
- After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
494
-
495
- ```
496
- Task(prompt="
497
- <task>
498
- Synthesize research outputs into SUMMARY.md.
499
- </task>
500
-
501
- <research_files>
502
- Read these files:
503
- - .planning/research/STACK.md
504
- - .planning/research/FEATURES.md
505
- - .planning/research/ARCHITECTURE.md
506
- - .planning/research/PITFALLS.md
507
- </research_files>
508
-
509
- <output>
510
- Write to: .planning/research/SUMMARY.md
511
- Use template: /home/qualia/.claude/qualia-framework/templates/research-project/SUMMARY.md
512
- Commit after writing.
513
- </output>
514
- ", subagent_type="qualia-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
515
- ```
516
-
517
- Display research complete banner and key findings:
518
- ```
519
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
520
- Qualia ► RESEARCH COMPLETE ✓
521
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
522
-
523
- ## Key Findings
524
-
525
- **Stack:** [from SUMMARY.md]
526
- **Table Stakes:** [from SUMMARY.md]
527
- **Watch Out For:** [from SUMMARY.md]
528
-
529
- Files: `.planning/research/`
530
- ```
531
-
532
- **If "Skip research":** Continue to Step 7.
533
-
534
- ## 7. Define Requirements
535
-
536
- Display stage banner:
537
- ```
538
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
539
- Qualia ► DEFINING REQUIREMENTS
540
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
541
- ```
542
-
543
- **Load context:**
544
-
545
- Read PROJECT.md and extract:
546
- - Core value (the ONE thing that must work)
547
- - Stated constraints (budget, timeline, tech limitations)
548
- - Any explicit scope boundaries
549
-
550
- **If research exists:** Read research/FEATURES.md and extract feature categories.
551
-
552
- **Present features by category:**
553
-
554
- ```
555
- Here are the features for [domain]:
556
-
557
- ## Authentication
558
- **Table stakes:**
559
- - Sign up with email/password
560
- - Email verification
561
- - Password reset
562
- - Session management
563
-
564
- **Differentiators:**
565
- - Magic link login
566
- - OAuth (Google, GitHub)
567
- - 2FA
568
-
569
- **Research notes:** [any relevant notes]
570
-
571
- ---
572
-
573
- ## [Next Category]
574
- ...
575
- ```
576
-
577
- **If no research:** Gather requirements through conversation instead.
578
-
579
- Ask: "What are the main things users need to be able to do?"
580
-
581
- For each capability mentioned:
582
- - Ask clarifying questions to make it specific
583
- - Probe for related capabilities
584
- - Group into categories
585
-
586
- **Scope each category:**
587
-
588
- For each category, use AskUserQuestion:
589
-
590
- - header: "[Category name]"
591
- - question: "Which [category] features are in v1?"
592
- - multiSelect: true
593
- - options:
594
- - "[Feature 1]" — [brief description]
595
- - "[Feature 2]" — [brief description]
596
- - "[Feature 3]" — [brief description]
597
- - "None for v1" — Defer entire category
598
-
599
- Track responses:
600
- - Selected features → v1 requirements
601
- - Unselected table stakes → v2 (users expect these)
602
- - Unselected differentiators → out of scope
603
-
604
- **Identify gaps:**
605
-
606
- Use AskUserQuestion:
607
- - header: "Additions"
608
- - question: "Any requirements research missed? (Features specific to your vision)"
609
- - options:
610
- - "No, research covered it" — Proceed
611
- - "Yes, let me add some" — Capture additions
612
-
613
- **Validate core value:**
614
-
615
- Cross-check requirements against Core Value from PROJECT.md. If gaps detected, surface them.
616
-
617
- **Generate REQUIREMENTS.md:**
618
-
619
- Create `.planning/REQUIREMENTS.md` with:
620
- - v1 Requirements grouped by category (checkboxes, REQ-IDs)
621
- - v2 Requirements (deferred)
622
- - Out of Scope (explicit exclusions with reasoning)
623
- - Traceability section (empty, filled by roadmap)
624
-
625
- **REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, CONTENT-02)
626
-
627
- **Requirement quality criteria:**
628
-
629
- Good requirements are:
630
- - **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
631
- - **User-centric:** "User can X" (not "System does Y")
632
- - **Atomic:** One capability per requirement (not "User can login and manage profile")
633
- - **Independent:** Minimal dependencies on other requirements
634
-
635
- Reject vague requirements. Push for specificity:
636
- - "Handle authentication" → "User can log in with email/password and stay logged in across sessions"
637
- - "Support sharing" → "User can share post via link that opens in recipient's browser"
638
-
639
- **Present full requirements list:**
640
-
641
- Show every requirement (not counts) for user confirmation:
642
-
643
- ```
644
- ## v1 Requirements
645
-
646
- ### Authentication
647
- - [ ] **AUTH-01**: User can create account with email/password
648
- - [ ] **AUTH-02**: User can log in and stay logged in across sessions
649
- - [ ] **AUTH-03**: User can log out from any page
650
-
651
- ### Content
652
- - [ ] **CONT-01**: User can create posts with text
653
- - [ ] **CONT-02**: User can edit their own posts
654
-
655
- [... full list ...]
656
-
657
- ---
658
-
659
- Does this capture what you're building? (yes / adjust)
660
- ```
661
-
662
- If "adjust": Return to scoping.
663
-
664
- **Commit requirements:**
665
-
666
- ```bash
667
- node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "docs: define v1 requirements" --files .planning/REQUIREMENTS.md
668
- ```
669
-
670
- ## 8. Create Roadmap
671
-
672
- Display stage banner:
673
- ```
674
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
675
- Qualia ► CREATING ROADMAP
676
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
677
-
678
- ◆ Spawning roadmapper...
679
- ```
680
-
681
- Spawn qualia-roadmapper agent with context:
682
-
683
- ```
684
- Task(prompt="
685
- <planning_context>
686
-
687
- **Project:**
688
- @.planning/PROJECT.md
689
-
690
- **Requirements:**
691
- @.planning/REQUIREMENTS.md
692
-
693
- **Research (if exists):**
694
- @.planning/research/SUMMARY.md
695
-
696
- **Config:**
697
- @.planning/config.json
698
-
699
- </planning_context>
700
-
701
- <template_context>
702
- Template type: {template_type or 'none'}
703
- {If template_type is set, inline the full template file content from ~/.claude/qualia-framework/templates/projects/{template_type}.md}
704
- </template_context>
705
-
706
- <instructions>
707
- Create roadmap:
708
- 1. If template provided: use template phases as starting structure, merge with project-specific requirements. Mark template-sourced phases with `source: template`. Add skill references and team fields from template.
709
- 2. If no template: derive phases from requirements (don't impose structure)
710
- 3. Map every v1 requirement to exactly one phase
711
- 4. Derive 2-5 success criteria per phase (observable user behaviors)
712
- 5. Validate 100% coverage
713
- 6. **FEATURE PHASES ONLY.** Do NOT add review, deploy, or handoff phases. The finish line system (/qualia-complete-milestone → polish → review → PR → deploy → handoff) handles the 70%-to-100% journey automatically after all feature phases are done. Adding them to the roadmap causes duplication.
714
- 7. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
715
- 8. Return ROADMAP CREATED with summary
716
-
717
- Write files first, then return. This ensures artifacts persist even if context is lost.
718
- </instructions>
719
- ", subagent_type="qualia-roadmapper", model="{roadmapper_model}", description="Create roadmap")
720
- ```
721
-
722
- **Handle roadmapper return:**
723
-
724
- **If `## ROADMAP BLOCKED`:**
725
- - Present blocker information
726
- - Work with user to resolve
727
- - Re-spawn when resolved
728
-
729
- **If `## ROADMAP CREATED`:**
730
-
731
- Read the created ROADMAP.md and present it nicely inline:
732
-
733
- ```
734
- ---
735
-
736
- ## Proposed Roadmap
737
-
738
- **[N] phases** | **[X] requirements mapped** | All v1 requirements covered ✓
739
-
740
- | # | Phase | Goal | Requirements | Success Criteria |
741
- |---|-------|------|--------------|------------------|
742
- | 1 | [Name] | [Goal] | [REQ-IDs] | [count] |
743
- | 2 | [Name] | [Goal] | [REQ-IDs] | [count] |
744
- | 3 | [Name] | [Goal] | [REQ-IDs] | [count] |
745
- ...
746
-
747
- ### Phase Details
748
-
749
- **Phase 1: [Name]**
750
- Goal: [goal]
751
- Requirements: [REQ-IDs]
752
- Success criteria:
753
- 1. [criterion]
754
- 2. [criterion]
755
- 3. [criterion]
756
-
757
- **Phase 2: [Name]**
758
- Goal: [goal]
759
- Requirements: [REQ-IDs]
760
- Success criteria:
761
- 1. [criterion]
762
- 2. [criterion]
763
-
764
- [... continue for all phases ...]
765
-
766
- ---
767
- ```
768
-
769
- **CRITICAL: Ask for approval before committing:**
770
-
771
- Use AskUserQuestion:
772
- - header: "Roadmap"
773
- - question: "Does this roadmap structure work for you?"
774
- - options:
775
- - "Approve" — Commit and continue
776
- - "Adjust phases" — Tell me what to change
777
- - "Review full file" — Show raw ROADMAP.md
778
-
779
- **If "Approve":** Continue to commit.
780
-
781
- **If "Adjust phases":**
782
- - Get user's adjustment notes
783
- - Re-spawn roadmapper with revision context:
784
- ```
785
- Task(prompt="
786
- <revision>
787
- User feedback on roadmap:
788
- [user's notes]
789
-
790
- Current ROADMAP.md: @.planning/ROADMAP.md
791
-
792
- Update the roadmap based on feedback. Edit files in place.
793
- Return ROADMAP REVISED with changes made.
794
- </revision>
795
- ", subagent_type="qualia-roadmapper", model="{roadmapper_model}", description="Revise roadmap")
796
- ```
797
- - Present revised roadmap
798
- - Loop until user approves
799
-
800
- **If "Review full file":** Display raw `cat .planning/ROADMAP.md`, then re-ask.
801
-
802
- **Commit roadmap (after approval):**
803
-
804
- ```bash
805
- node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
806
- ```
807
-
808
- ## 9. Environment Setup
809
-
810
- Display stage banner:
811
- ```
812
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
813
- Qualia ► ENVIRONMENT SETUP
814
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
815
- ```
816
-
817
- **Detect what's needed based on project type and stack:**
818
-
819
- Check PROJECT.md and research/STACK.md for:
820
- - Supabase → needs project creation or linking
821
- - Vercel → needs project linking
822
- - Environment variables → needs `.env.local`
823
- - External services (Stripe, VAPI, etc.) → needs API keys
824
-
825
- **Present setup checklist:**
826
-
827
- Use AskUserQuestion:
828
- - header: "Env Setup"
829
- - question: "Let's set up the development environment. Which of these are ready?"
830
- - multiSelect: true
831
- - options (dynamically generated from detection):
832
- - "Supabase project exists" — I have a Supabase project ready to link
833
- - "Vercel project exists" — I have a Vercel project ready
834
- - "I'll set these up now" — Walk me through creating them
835
- - "Skip for now" — I'll handle environment setup myself later
836
-
837
- **If "I'll set these up now":**
838
-
839
- Walk through each needed service:
840
-
841
- 1. **Supabase** (if detected):
842
- ```bash
843
- supabase init # If no supabase/ directory
844
- supabase link --project-ref <ref> # User provides ref
845
- ```
846
-
847
- 2. **Vercel** (if detected):
848
- ```bash
849
- vercel link # Interactive linking
850
- ```
851
-
852
- 3. **Environment variables:**
853
- Create `.env.local` with placeholders:
854
- ```bash
855
- cat > .env.local << 'EOF'
856
- # Supabase
857
- NEXT_PUBLIC_SUPABASE_URL=
858
- NEXT_PUBLIC_SUPABASE_ANON_KEY=
859
- SUPABASE_SERVICE_ROLE_KEY=
860
-
861
- # Add other detected services...
862
- EOF
863
- ```
864
-
865
- Tell user: "Fill in the values from your Supabase dashboard (Settings → API). I'll wait."
866
-
867
- 4. **Verify setup:**
868
- ```bash
869
- # Check Supabase connection
870
- supabase status 2>/dev/null
871
-
872
- # Check env vars are populated (not empty)
873
- grep -c "=$" .env.local # Should be 0 if all filled
874
- ```
875
-
876
- **If "Skip for now":**
877
- Note in STATE.md: `env_setup: pending` so future commands can warn.
878
-
879
- ## 9.5. Design Context (frontend projects)
880
-
881
- **Check if project involves frontend work:**
882
-
883
- ```bash
884
- HAS_FRONTEND=$(grep -qiE 'website|landing|dashboard|ui|frontend|page|component|SaaS|web app' .planning/PROJECT.md .planning/ROADMAP.md 2>/dev/null && echo "true" || echo "false")
885
- ```
886
-
887
- **If `HAS_FRONTEND` is true:** Run a brief design consultation (NOT `/critique` — there's no code to critique yet).
888
-
889
- Ask the employee 3 questions using AskUserQuestion:
890
- 1. **Aesthetic direction** — "What feel should this project have?" (options: Clean/minimal, Bold/striking, Warm/friendly, Corporate/professional)
891
- 2. **Color palette** — "Any brand colors or preferences?" (freeform — or offer to pick based on aesthetic)
892
- 3. **Reference sites** — "Any websites you'd like it to look/feel like?" (freeform)
893
-
894
- Write `.planning/DESIGN.md` with the answers structured as a design brief. This is read by the frontend guard before any UI work starts.
895
-
896
- **If `HAS_FRONTEND` is false:** Skip silently.
897
-
898
- **Commit setup:**
899
- ```bash
900
- node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "chore: environment setup" --files .env.local supabase/config.toml
901
- ```
902
-
903
- Ensure `.env.local` is in `.gitignore` (create/append if needed).
904
-
905
- ## 10. Done
906
-
907
- Present completion with next steps:
908
-
909
- ```
910
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
911
- Qualia ► PROJECT INITIALIZED ✓
912
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
913
-
914
- **[Project Name]**
915
-
916
- | Artifact | Location |
917
- |----------------|-----------------------------|
918
- | Project | `.planning/PROJECT.md` |
919
- | Config | `.planning/config.json` |
920
- | Research | `.planning/research/` |
921
- | Requirements | `.planning/REQUIREMENTS.md` |
922
- | Roadmap | `.planning/ROADMAP.md` |
923
- | Environment | `.env.local` |
924
-
925
- **[N] phases** | **[X] requirements** | Ready to build ✓
926
-
927
- ───────────────────────────────────────────────────────────────
928
-
929
- ## ▶ Next Up
930
-
931
- **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
932
-
933
- /qualia-plan-phase 1 — plan the first phase
934
-
935
- **Also available:**
936
- - /qualia-discuss-phase 1 — discuss approach before planning
937
-
938
- ───────────────────────────────────────────────────────────────
939
- ```
940
-
941
- </process>
942
-
943
- <output>
944
-
945
- - `.planning/PROJECT.md`
946
- - `.planning/config.json`
947
- - `.planning/research/` (if research selected)
948
- - `STACK.md`
949
- - `FEATURES.md`
950
- - `ARCHITECTURE.md`
951
- - `PITFALLS.md`
952
- - `SUMMARY.md`
953
- - `.planning/REQUIREMENTS.md`
954
- - `.planning/ROADMAP.md`
955
- - `.planning/STATE.md`
956
-
957
- </output>
958
-
959
- <success_criteria>
960
-
961
- - [ ] .planning/ directory created
962
- - [ ] Git repo initialized
963
- - [ ] Brownfield detection completed
964
- - [ ] Deep questioning completed (threads followed, not rushed)
965
- - [ ] PROJECT.md captures full context → **committed**
966
- - [ ] config.json has workflow mode, depth, parallelization → **committed**
967
- - [ ] Research completed (if selected) — 4 parallel agents spawned → **committed**
968
- - [ ] Requirements gathered (from research or conversation)
969
- - [ ] User scoped each category (v1/v2/out of scope)
970
- - [ ] REQUIREMENTS.md created with REQ-IDs → **committed**
971
- - [ ] qualia-roadmapper spawned with context
972
- - [ ] Roadmap files written immediately (not draft)
973
- - [ ] User feedback incorporated (if any)
974
- - [ ] ROADMAP.md created with phases, requirement mappings, success criteria
975
- - [ ] STATE.md initialized
976
- - [ ] REQUIREMENTS.md traceability updated
977
- - [ ] If frontend project: DESIGN.md created with design brief
978
- - [ ] User knows next step is `/qualia-discuss-phase 1`
979
-
980
- **Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
981
-
982
- </success_criteria>