qualia-framework 2.6.0 → 3.2.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 (321) hide show
  1. package/CLAUDE.md +64 -0
  2. package/README.md +103 -30
  3. package/agents/builder.md +110 -0
  4. package/agents/planner.md +134 -0
  5. package/agents/qa-browser.md +186 -0
  6. package/agents/verifier.md +221 -0
  7. package/bin/cli.js +336 -531
  8. package/bin/install.js +570 -0
  9. package/bin/qualia-ui.js +299 -0
  10. package/bin/state.js +630 -0
  11. package/bin/statusline.js +252 -0
  12. package/guide.md +63 -0
  13. package/hooks/auto-update.js +139 -0
  14. package/hooks/branch-guard.js +47 -0
  15. package/hooks/migration-guard.js +60 -0
  16. package/hooks/pre-compact.js +32 -0
  17. package/hooks/pre-deploy-gate.js +110 -0
  18. package/hooks/pre-push.js +33 -0
  19. package/hooks/session-start.js +170 -0
  20. package/package.json +29 -20
  21. package/rules/design-reference.md +179 -0
  22. package/rules/frontend.md +126 -0
  23. package/skills/qualia/SKILL.md +87 -0
  24. package/skills/qualia-build/SKILL.md +97 -0
  25. package/skills/qualia-debug/SKILL.md +87 -0
  26. package/skills/qualia-design/SKILL.md +93 -0
  27. package/skills/qualia-handoff/SKILL.md +66 -0
  28. package/skills/qualia-idk/SKILL.md +8 -0
  29. package/skills/qualia-learn/SKILL.md +88 -0
  30. package/skills/qualia-new/SKILL.md +323 -0
  31. package/{framework/skills → skills}/qualia-optimize/SKILL.md +1 -1
  32. package/skills/qualia-pause/SKILL.md +63 -0
  33. package/skills/qualia-plan/SKILL.md +101 -0
  34. package/skills/qualia-polish/SKILL.md +157 -0
  35. package/skills/qualia-quick/SKILL.md +37 -0
  36. package/skills/qualia-report/SKILL.md +105 -0
  37. package/skills/qualia-resume/SKILL.md +49 -0
  38. package/skills/qualia-review/SKILL.md +76 -0
  39. package/skills/qualia-ship/SKILL.md +90 -0
  40. package/skills/qualia-skill-new/SKILL.md +167 -0
  41. package/skills/qualia-task/SKILL.md +91 -0
  42. package/skills/qualia-verify/SKILL.md +113 -0
  43. package/templates/DESIGN.md +137 -0
  44. package/templates/plan.md +28 -0
  45. package/templates/project.md +22 -0
  46. package/templates/state.md +27 -0
  47. package/templates/tracking.json +20 -0
  48. package/tests/bin.test.sh +673 -0
  49. package/tests/hooks.test.sh +315 -0
  50. package/tests/state.test.sh +535 -0
  51. package/tests/statusline.test.sh +243 -0
  52. package/bin/collect-metrics.sh +0 -62
  53. package/framework/.claudeignore +0 -51
  54. package/framework/CLAUDE.md +0 -51
  55. package/framework/MCP_SETUP.md +0 -229
  56. package/framework/agents/architecture-strategist.md +0 -53
  57. package/framework/agents/backend-agent.md +0 -150
  58. package/framework/agents/code-simplicity-reviewer.md +0 -86
  59. package/framework/agents/frontend-agent.md +0 -111
  60. package/framework/agents/kieran-typescript-reviewer.md +0 -96
  61. package/framework/agents/performance-oracle.md +0 -111
  62. package/framework/agents/qualia-codebase-mapper.md +0 -761
  63. package/framework/agents/qualia-debugger.md +0 -1204
  64. package/framework/agents/qualia-executor.md +0 -882
  65. package/framework/agents/qualia-integration-checker.md +0 -424
  66. package/framework/agents/qualia-phase-researcher.md +0 -457
  67. package/framework/agents/qualia-plan-checker.md +0 -700
  68. package/framework/agents/qualia-planner.md +0 -1245
  69. package/framework/agents/qualia-project-researcher.md +0 -603
  70. package/framework/agents/qualia-research-synthesizer.md +0 -200
  71. package/framework/agents/qualia-roadmapper.md +0 -606
  72. package/framework/agents/qualia-verifier.md +0 -686
  73. package/framework/agents/red-team-qa.md +0 -130
  74. package/framework/agents/security-auditor.md +0 -72
  75. package/framework/agents/team-orchestrator.md +0 -229
  76. package/framework/agents/teams/framework-audit-team.md +0 -66
  77. package/framework/agents/teams/full-stack-team.md +0 -48
  78. package/framework/agents/teams/optimize-team.md +0 -53
  79. package/framework/agents/teams/review-team.md +0 -70
  80. package/framework/agents/teams/ship-team.md +0 -86
  81. package/framework/agents/test-agent.md +0 -182
  82. package/framework/hooks/auto-format.sh +0 -54
  83. package/framework/hooks/block-env-edit.sh +0 -42
  84. package/framework/hooks/branch-guard.sh +0 -43
  85. package/framework/hooks/confirm-delete.sh +0 -59
  86. package/framework/hooks/migration-validate.sh +0 -77
  87. package/framework/hooks/notification-speak.sh +0 -16
  88. package/framework/hooks/pre-commit.sh +0 -100
  89. package/framework/hooks/pre-compact.sh +0 -56
  90. package/framework/hooks/pre-deploy-gate.sh +0 -160
  91. package/framework/hooks/qualia-colors.sh +0 -32
  92. package/framework/hooks/retention-cleanup.sh +0 -62
  93. package/framework/hooks/save-session-state.sh +0 -185
  94. package/framework/hooks/session-context-loader.sh +0 -96
  95. package/framework/hooks/session-learn.sh +0 -32
  96. package/framework/hooks/skill-announce.sh +0 -123
  97. package/framework/hooks/tool-error-announce.sh +0 -27
  98. package/framework/install.ps1 +0 -323
  99. package/framework/install.sh +0 -313
  100. package/framework/qualia-framework/VERSION +0 -1
  101. package/framework/qualia-framework/assets/qualia-logo.png +0 -0
  102. package/framework/qualia-framework/bin/collect-metrics.sh +0 -67
  103. package/framework/qualia-framework/bin/generate-report-docx.py +0 -429
  104. package/framework/qualia-framework/bin/qualia-tools.js +0 -2201
  105. package/framework/qualia-framework/bin/qualia-tools.test.js +0 -1054
  106. package/framework/qualia-framework/references/checkpoints.md +0 -775
  107. package/framework/qualia-framework/references/completion-checklists.md +0 -359
  108. package/framework/qualia-framework/references/continuation-format.md +0 -249
  109. package/framework/qualia-framework/references/continuation-prompt.md +0 -97
  110. package/framework/qualia-framework/references/decimal-phase-calculation.md +0 -65
  111. package/framework/qualia-framework/references/design-quality.md +0 -56
  112. package/framework/qualia-framework/references/employee-guide.md +0 -167
  113. package/framework/qualia-framework/references/git-integration.md +0 -254
  114. package/framework/qualia-framework/references/git-planning-commit.md +0 -50
  115. package/framework/qualia-framework/references/model-profile-resolution.md +0 -32
  116. package/framework/qualia-framework/references/model-profiles.md +0 -73
  117. package/framework/qualia-framework/references/phase-argument-parsing.md +0 -61
  118. package/framework/qualia-framework/references/planning-config.md +0 -195
  119. package/framework/qualia-framework/references/questioning.md +0 -141
  120. package/framework/qualia-framework/references/tdd.md +0 -263
  121. package/framework/qualia-framework/references/ui-brand.md +0 -160
  122. package/framework/qualia-framework/references/verification-patterns.md +0 -612
  123. package/framework/qualia-framework/templates/DEBUG.md +0 -159
  124. package/framework/qualia-framework/templates/DESIGN.md +0 -81
  125. package/framework/qualia-framework/templates/UAT.md +0 -247
  126. package/framework/qualia-framework/templates/codebase/architecture.md +0 -255
  127. package/framework/qualia-framework/templates/codebase/concerns.md +0 -310
  128. package/framework/qualia-framework/templates/codebase/conventions.md +0 -307
  129. package/framework/qualia-framework/templates/codebase/integrations.md +0 -280
  130. package/framework/qualia-framework/templates/codebase/stack.md +0 -186
  131. package/framework/qualia-framework/templates/codebase/structure.md +0 -285
  132. package/framework/qualia-framework/templates/codebase/testing.md +0 -480
  133. package/framework/qualia-framework/templates/config.json +0 -35
  134. package/framework/qualia-framework/templates/context.md +0 -283
  135. package/framework/qualia-framework/templates/continue-here.md +0 -78
  136. package/framework/qualia-framework/templates/debug-subagent-prompt.md +0 -91
  137. package/framework/qualia-framework/templates/discovery.md +0 -146
  138. package/framework/qualia-framework/templates/lab-notes.md +0 -16
  139. package/framework/qualia-framework/templates/milestone-archive.md +0 -123
  140. package/framework/qualia-framework/templates/milestone.md +0 -115
  141. package/framework/qualia-framework/templates/phase-prompt.md +0 -567
  142. package/framework/qualia-framework/templates/planner-subagent-prompt.md +0 -117
  143. package/framework/qualia-framework/templates/project.md +0 -184
  144. package/framework/qualia-framework/templates/projects/ai-agent.md +0 -156
  145. package/framework/qualia-framework/templates/projects/mobile-app.md +0 -181
  146. package/framework/qualia-framework/templates/projects/voice-agent.md +0 -134
  147. package/framework/qualia-framework/templates/projects/website.md +0 -137
  148. package/framework/qualia-framework/templates/requirements.md +0 -231
  149. package/framework/qualia-framework/templates/research-project/ARCHITECTURE.md +0 -204
  150. package/framework/qualia-framework/templates/research-project/FEATURES.md +0 -147
  151. package/framework/qualia-framework/templates/research-project/PITFALLS.md +0 -200
  152. package/framework/qualia-framework/templates/research-project/STACK.md +0 -120
  153. package/framework/qualia-framework/templates/research-project/SUMMARY.md +0 -170
  154. package/framework/qualia-framework/templates/research.md +0 -552
  155. package/framework/qualia-framework/templates/roadmap.md +0 -206
  156. package/framework/qualia-framework/templates/state.md +0 -179
  157. package/framework/qualia-framework/templates/summary-complex.md +0 -59
  158. package/framework/qualia-framework/templates/summary-minimal.md +0 -41
  159. package/framework/qualia-framework/templates/summary-standard.md +0 -48
  160. package/framework/qualia-framework/templates/summary.md +0 -246
  161. package/framework/qualia-framework/templates/user-setup.md +0 -311
  162. package/framework/qualia-framework/templates/verification-report.md +0 -322
  163. package/framework/qualia-framework/workflows/add-phase.md +0 -179
  164. package/framework/qualia-framework/workflows/add-todo.md +0 -157
  165. package/framework/qualia-framework/workflows/audit-milestone.md +0 -241
  166. package/framework/qualia-framework/workflows/check-todos.md +0 -176
  167. package/framework/qualia-framework/workflows/complete-milestone.md +0 -858
  168. package/framework/qualia-framework/workflows/diagnose-issues.md +0 -219
  169. package/framework/qualia-framework/workflows/discovery-phase.md +0 -289
  170. package/framework/qualia-framework/workflows/discuss-phase.md +0 -534
  171. package/framework/qualia-framework/workflows/execute-phase.md +0 -559
  172. package/framework/qualia-framework/workflows/execute-plan.md +0 -438
  173. package/framework/qualia-framework/workflows/help.md +0 -470
  174. package/framework/qualia-framework/workflows/insert-phase.md +0 -220
  175. package/framework/qualia-framework/workflows/list-phase-assumptions.md +0 -178
  176. package/framework/qualia-framework/workflows/map-codebase.md +0 -327
  177. package/framework/qualia-framework/workflows/new-milestone.md +0 -363
  178. package/framework/qualia-framework/workflows/new-project.md +0 -982
  179. package/framework/qualia-framework/workflows/pause-work.md +0 -122
  180. package/framework/qualia-framework/workflows/plan-milestone-gaps.md +0 -256
  181. package/framework/qualia-framework/workflows/plan-phase.md +0 -422
  182. package/framework/qualia-framework/workflows/progress.md +0 -389
  183. package/framework/qualia-framework/workflows/quick.md +0 -252
  184. package/framework/qualia-framework/workflows/remove-phase.md +0 -326
  185. package/framework/qualia-framework/workflows/research-phase.md +0 -74
  186. package/framework/qualia-framework/workflows/resume-project.md +0 -306
  187. package/framework/qualia-framework/workflows/set-profile.md +0 -80
  188. package/framework/qualia-framework/workflows/settings.md +0 -145
  189. package/framework/qualia-framework/workflows/transition.md +0 -556
  190. package/framework/qualia-framework/workflows/update.md +0 -197
  191. package/framework/qualia-framework/workflows/verify-phase.md +0 -195
  192. package/framework/qualia-framework/workflows/verify-work.md +0 -625
  193. package/framework/rules/context7.md +0 -14
  194. package/framework/rules/frontend.md +0 -33
  195. package/framework/rules/speed.md +0 -23
  196. package/framework/scripts/__pycache__/say.cpython-314.pyc +0 -0
  197. package/framework/scripts/apply-retention.sh +0 -120
  198. package/framework/scripts/bootstrap-pop-os.sh +0 -354
  199. package/framework/scripts/claude-voice +0 -13
  200. package/framework/scripts/cleanup.sh +0 -131
  201. package/framework/scripts/cowork-mode.sh +0 -141
  202. package/framework/scripts/generate-project-claude-md.sh +0 -153
  203. package/framework/scripts/load-test-webhook.js +0 -172
  204. package/framework/scripts/say.py +0 -236
  205. package/framework/scripts/showcase-video-recorder/ffmpeg-builder.js +0 -167
  206. package/framework/scripts/showcase-video-recorder/playwright-helpers.js +0 -216
  207. package/framework/scripts/speak.py +0 -55
  208. package/framework/scripts/speak.sh +0 -18
  209. package/framework/scripts/status.sh +0 -138
  210. package/framework/scripts/sync-to-framework.sh +0 -65
  211. package/framework/scripts/voice-hotkey.py +0 -227
  212. package/framework/scripts/voice-input.sh +0 -51
  213. package/framework/skills/animate/SKILL.md +0 -202
  214. package/framework/skills/bolder/SKILL.md +0 -144
  215. package/framework/skills/browser-qa/SKILL.md +0 -536
  216. package/framework/skills/clarify/SKILL.md +0 -179
  217. package/framework/skills/client-handoff/SKILL.md +0 -135
  218. package/framework/skills/collab-onboard/SKILL.md +0 -111
  219. package/framework/skills/colorize/SKILL.md +0 -170
  220. package/framework/skills/critique/SKILL.md +0 -126
  221. package/framework/skills/deep-research/SKILL.md +0 -240
  222. package/framework/skills/delight/SKILL.md +0 -329
  223. package/framework/skills/deploy/SKILL.md +0 -261
  224. package/framework/skills/deploy-verify/SKILL.md +0 -377
  225. package/framework/skills/deploy-verify/scripts/canary-check.sh +0 -206
  226. package/framework/skills/deploy-verify/scripts/check-console-errors.js +0 -147
  227. package/framework/skills/deploy-verify/scripts/check-cwv.js +0 -139
  228. package/framework/skills/deploy-verify/scripts/project-detect.sh +0 -84
  229. package/framework/skills/deploy-verify/scripts/verify.sh +0 -548
  230. package/framework/skills/design-quieter/SKILL.md +0 -130
  231. package/framework/skills/distill/SKILL.md +0 -149
  232. package/framework/skills/docs-lookup/SKILL.md +0 -79
  233. package/framework/skills/fcm-notifications/SKILL.md +0 -125
  234. package/framework/skills/financial-ledger/SKILL.md +0 -1039
  235. package/framework/skills/frontend-master/NOTICE.md +0 -4
  236. package/framework/skills/frontend-master/SKILL.md +0 -127
  237. package/framework/skills/frontend-master/reference/color-and-contrast.md +0 -132
  238. package/framework/skills/frontend-master/reference/interaction-design.md +0 -123
  239. package/framework/skills/frontend-master/reference/motion-design.md +0 -99
  240. package/framework/skills/frontend-master/reference/responsive-design.md +0 -114
  241. package/framework/skills/frontend-master/reference/spatial-design.md +0 -100
  242. package/framework/skills/frontend-master/reference/typography.md +0 -131
  243. package/framework/skills/frontend-master/reference/ux-writing.md +0 -107
  244. package/framework/skills/harden/SKILL.md +0 -357
  245. package/framework/skills/i18n-rtl/SKILL.md +0 -752
  246. package/framework/skills/learn/SKILL.md +0 -95
  247. package/framework/skills/memory/SKILL.md +0 -50
  248. package/framework/skills/mobile-expo/SKILL.md +0 -977
  249. package/framework/skills/mobile-expo/references/store-checklist.md +0 -550
  250. package/framework/skills/nestjs-backend/README.md +0 -73
  251. package/framework/skills/nestjs-backend/SKILL.md +0 -446
  252. package/framework/skills/nestjs-backend/references/templates.md +0 -1173
  253. package/framework/skills/normalize/SKILL.md +0 -79
  254. package/framework/skills/onboard/SKILL.md +0 -242
  255. package/framework/skills/openrouter-agent/SKILL.md +0 -922
  256. package/framework/skills/polish/SKILL.md +0 -209
  257. package/framework/skills/pr/SKILL.md +0 -66
  258. package/framework/skills/qualia/SKILL.md +0 -199
  259. package/framework/skills/qualia-add-todo/SKILL.md +0 -68
  260. package/framework/skills/qualia-audit-milestone/SKILL.md +0 -95
  261. package/framework/skills/qualia-check-todos/SKILL.md +0 -55
  262. package/framework/skills/qualia-complete-milestone/SKILL.md +0 -134
  263. package/framework/skills/qualia-debug/SKILL.md +0 -149
  264. package/framework/skills/qualia-design/SKILL.md +0 -203
  265. package/framework/skills/qualia-discuss-phase/SKILL.md +0 -72
  266. package/framework/skills/qualia-evolve/SKILL.md +0 -200
  267. package/framework/skills/qualia-execute-phase/SKILL.md +0 -89
  268. package/framework/skills/qualia-framework-audit/SKILL.md +0 -604
  269. package/framework/skills/qualia-guide/SKILL.md +0 -32
  270. package/framework/skills/qualia-help/SKILL.md +0 -114
  271. package/framework/skills/qualia-idk/SKILL.md +0 -352
  272. package/framework/skills/qualia-list-phase-assumptions/SKILL.md +0 -67
  273. package/framework/skills/qualia-new-milestone/SKILL.md +0 -72
  274. package/framework/skills/qualia-new-project/SKILL.md +0 -232
  275. package/framework/skills/qualia-pause-work/SKILL.md +0 -96
  276. package/framework/skills/qualia-plan-milestone-gaps/SKILL.md +0 -57
  277. package/framework/skills/qualia-plan-phase/SKILL.md +0 -104
  278. package/framework/skills/qualia-production-check/SKILL.md +0 -0
  279. package/framework/skills/qualia-progress/SKILL.md +0 -53
  280. package/framework/skills/qualia-quick/SKILL.md +0 -89
  281. package/framework/skills/qualia-report/SKILL.md +0 -166
  282. package/framework/skills/qualia-research-phase/SKILL.md +0 -88
  283. package/framework/skills/qualia-resume-work/SKILL.md +0 -62
  284. package/framework/skills/qualia-review/SKILL.md +0 -263
  285. package/framework/skills/qualia-start/SKILL.md +0 -161
  286. package/framework/skills/qualia-verify-work/SKILL.md +0 -132
  287. package/framework/skills/rag/SKILL.md +0 -750
  288. package/framework/skills/responsive/SKILL.md +0 -231
  289. package/framework/skills/retro/SKILL.md +0 -284
  290. package/framework/skills/sakani-conventions/SKILL.md +0 -136
  291. package/framework/skills/sakani-conventions/evals/evals.json +0 -23
  292. package/framework/skills/sakani-conventions/references/entities.md +0 -365
  293. package/framework/skills/sakani-conventions/references/error-codes.md +0 -95
  294. package/framework/skills/seo-master/SKILL.md +0 -490
  295. package/framework/skills/seo-master/references/checklist.md +0 -199
  296. package/framework/skills/seo-master/references/structured-data.md +0 -609
  297. package/framework/skills/ship/SKILL.md +0 -239
  298. package/framework/skills/stack-researcher/SKILL.md +0 -215
  299. package/framework/skills/status/SKILL.md +0 -154
  300. package/framework/skills/status/scripts/health-check.sh +0 -562
  301. package/framework/skills/subscription-payments/SKILL.md +0 -250
  302. package/framework/skills/supabase/SKILL.md +0 -973
  303. package/framework/skills/supabase/references/templates.md +0 -159
  304. package/framework/skills/team/SKILL.md +0 -67
  305. package/framework/skills/test-runner/SKILL.md +0 -202
  306. package/framework/skills/voice-agent/SKILL.md +0 -1312
  307. package/framework/skills/zoho-workflow/SKILL.md +0 -51
  308. package/framework/statusline-command.sh +0 -117
  309. package/framework/teams/default/inboxes/plan-04.json +0 -9
  310. package/framework/teams/review-team.md +0 -75
  311. package/framework/teams/ship-team.md +0 -86
  312. package/profiles/fawzi.json +0 -16
  313. package/profiles/hasan.json +0 -16
  314. package/profiles/moayad.json +0 -16
  315. package/templates/CLAUDE-owner.md +0 -52
  316. package/templates/CLAUDE.md.hbs +0 -58
  317. package/templates/env.claude.template +0 -12
  318. package/templates/settings.json +0 -172
  319. package/uninstall.sh +0 -90
  320. /package/{framework/rules → rules}/deployment.md +0 -0
  321. /package/{framework/rules → rules}/security.md +0 -0
@@ -1,184 +0,0 @@
1
- # PROJECT.md Template
2
-
3
- Template for `.planning/PROJECT.md` — the living project context document.
4
-
5
- <template>
6
-
7
- ```markdown
8
- # [Project Name]
9
-
10
- ## What This Is
11
-
12
- [Current accurate description — 2-3 sentences. What does this product do and who is it for?
13
- Use the user's language and framing. Update whenever reality drifts from this description.]
14
-
15
- ## Core Value
16
-
17
- [The ONE thing that matters most. If everything else fails, this must work.
18
- One sentence that drives prioritization when tradeoffs arise.]
19
-
20
- ## Requirements
21
-
22
- ### Validated
23
-
24
- <!-- Shipped and confirmed valuable. -->
25
-
26
- (None yet — ship to validate)
27
-
28
- ### Active
29
-
30
- <!-- Current scope. Building toward these. -->
31
-
32
- - [ ] [Requirement 1]
33
- - [ ] [Requirement 2]
34
- - [ ] [Requirement 3]
35
-
36
- ### Out of Scope
37
-
38
- <!-- Explicit boundaries. Includes reasoning to prevent re-adding. -->
39
-
40
- - [Exclusion 1] — [why]
41
- - [Exclusion 2] — [why]
42
-
43
- ## Context
44
-
45
- [Background information that informs implementation:
46
- - Technical environment or ecosystem
47
- - Relevant prior work or experience
48
- - User research or feedback themes
49
- - Known issues to address]
50
-
51
- ## Constraints
52
-
53
- - **[Type]**: [What] — [Why]
54
- - **[Type]**: [What] — [Why]
55
-
56
- Common types: Tech stack, Timeline, Budget, Dependencies, Compatibility, Performance, Security
57
-
58
- ## Key Decisions
59
-
60
- <!-- Decisions that constrain future work. Add throughout project lifecycle. -->
61
-
62
- | Decision | Rationale | Outcome |
63
- |----------|-----------|---------|
64
- | [Choice] | [Why] | [✓ Good / ⚠️ Revisit / — Pending] |
65
-
66
- ---
67
- *Last updated: [date] after [trigger]*
68
- ```
69
-
70
- </template>
71
-
72
- <guidelines>
73
-
74
- **What This Is:**
75
- - Current accurate description of the product
76
- - 2-3 sentences capturing what it does and who it's for
77
- - Use the user's words and framing
78
- - Update when the product evolves beyond this description
79
-
80
- **Core Value:**
81
- - The single most important thing
82
- - Everything else can fail; this cannot
83
- - Drives prioritization when tradeoffs arise
84
- - Rarely changes; if it does, it's a significant pivot
85
-
86
- **Requirements — Validated:**
87
- - Requirements that shipped and proved valuable
88
- - Format: `- ✓ [Requirement] — [version/phase]`
89
- - These are locked — changing them requires explicit discussion
90
-
91
- **Requirements — Active:**
92
- - Current scope being built toward
93
- - These are hypotheses until shipped and validated
94
- - Move to Validated when shipped, Out of Scope if invalidated
95
-
96
- **Requirements — Out of Scope:**
97
- - Explicit boundaries on what we're not building
98
- - Always include reasoning (prevents re-adding later)
99
- - Includes: considered and rejected, deferred to future, explicitly excluded
100
-
101
- **Context:**
102
- - Background that informs implementation decisions
103
- - Technical environment, prior work, user feedback
104
- - Known issues or technical debt to address
105
- - Update as new context emerges
106
-
107
- **Constraints:**
108
- - Hard limits on implementation choices
109
- - Tech stack, timeline, budget, compatibility, dependencies
110
- - Include the "why" — constraints without rationale get questioned
111
-
112
- **Key Decisions:**
113
- - Significant choices that affect future work
114
- - Add decisions as they're made throughout the project
115
- - Track outcome when known:
116
- - ✓ Good — decision proved correct
117
- - ⚠️ Revisit — decision may need reconsideration
118
- - — Pending — too early to evaluate
119
-
120
- **Last Updated:**
121
- - Always note when and why the document was updated
122
- - Format: `after Phase 2` or `after v1.0 milestone`
123
- - Triggers review of whether content is still accurate
124
-
125
- </guidelines>
126
-
127
- <evolution>
128
-
129
- PROJECT.md evolves throughout the project lifecycle.
130
-
131
- **After each phase transition:**
132
- 1. Requirements invalidated? → Move to Out of Scope with reason
133
- 2. Requirements validated? → Move to Validated with phase reference
134
- 3. New requirements emerged? → Add to Active
135
- 4. Decisions to log? → Add to Key Decisions
136
- 5. "What This Is" still accurate? → Update if drifted
137
-
138
- **After each milestone:**
139
- 1. Full review of all sections
140
- 2. Core Value check — still the right priority?
141
- 3. Audit Out of Scope — reasons still valid?
142
- 4. Update Context with current state (users, feedback, metrics)
143
-
144
- </evolution>
145
-
146
- <brownfield>
147
-
148
- For existing codebases:
149
-
150
- 1. **Map codebase first** via `/qualia:map-codebase`
151
-
152
- 2. **Infer Validated requirements** from existing code:
153
- - What does the codebase actually do?
154
- - What patterns are established?
155
- - What's clearly working and relied upon?
156
-
157
- 3. **Gather Active requirements** from user:
158
- - Present inferred current state
159
- - Ask what they want to build next
160
-
161
- 4. **Initialize:**
162
- - Validated = inferred from existing code
163
- - Active = user's goals for this work
164
- - Out of Scope = boundaries user specifies
165
- - Context = includes current codebase state
166
-
167
- </brownfield>
168
-
169
- <state_reference>
170
-
171
- STATE.md references PROJECT.md:
172
-
173
- ```markdown
174
- ## Project Reference
175
-
176
- See: .planning/PROJECT.md (updated [date])
177
-
178
- **Core value:** [One-liner from Core Value section]
179
- **Current focus:** [Current phase name]
180
- ```
181
-
182
- This ensures Claude reads current PROJECT.md context.
183
-
184
- </state_reference>
@@ -1,156 +0,0 @@
1
- # Project Template: AI Agent
2
-
3
- > AI chat agent with Next.js frontend, Supabase backend, and AI provider integration.
4
-
5
- **Stack:** Next.js 16+, React 19, TypeScript, Supabase, AI SDK / OpenRouter / Gemini, Vercel
6
- **Phases:** 7
7
- **Type:** ai-agent
8
-
9
- ## Phases
10
-
11
- ### Phase 1: Foundation
12
- **Goal:** Working Next.js app with Supabase schema, auth, and base project structure
13
- **Skills:** [@supabase]
14
- **Tasks:**
15
- - Initialize Next.js 16+ with App Router, TypeScript strict, Tailwind v4
16
- - Design Supabase schema: users, conversations, messages, system_prompts
17
- - Configure Supabase client (server.ts + client.ts pattern)
18
- - Implement auth: login, signup (Supabase Auth)
19
- - RLS policies on all tables (user can only access own conversations)
20
- - Environment variables for AI provider keys
21
- - Base layout with navigation shell
22
-
23
- **Success Criteria:**
24
- 1. User can create account and log in
25
- 2. Database schema deployed with RLS enabled
26
- 3. Server-side auth working
27
- 4. `npx tsc --noEmit` passes
28
-
29
- ---
30
-
31
- ### Phase 2: AI Core
32
- **Goal:** Working AI conversation engine with streaming responses and conversation persistence
33
- **Skills:** [@supabase]
34
- **Tasks:**
35
- - AI provider integration (OpenRouter / Gemini / OpenAI — based on project needs)
36
- - System prompt management (stored in Supabase, editable)
37
- - Streaming response handler (SSE or WebSocket)
38
- - Conversation management: create, continue, branch
39
- - Message persistence: save user messages and AI responses
40
- - Context window management (truncation strategy for long conversations)
41
- - Token usage tracking per conversation
42
- - Error handling: rate limits, provider failures, timeout recovery
43
-
44
- **Success Criteria:**
45
- 1. User can send message and receive streaming AI response
46
- 2. Conversations persist across page reloads
47
- 3. System prompt shapes AI behavior correctly
48
- 4. Graceful handling of API errors (no crash, clear user message)
49
-
50
- ---
51
-
52
- ### Phase 3: Chat UI
53
- **Goal:** Polished chat interface with real-time feel and markdown support
54
- **Skills:** [@frontend-master]
55
- **Tasks:**
56
- - Message bubbles with user/AI distinction
57
- - Streaming text animation (typewriter effect)
58
- - Markdown rendering in AI responses (code blocks, lists, links)
59
- - Typing indicator while AI generates
60
- - Conversation list sidebar with search
61
- - New conversation button
62
- - Auto-scroll to latest message
63
- - Message input with multiline support and send on Enter
64
- - Copy message button
65
- - Responsive layout (sidebar collapses on mobile)
66
-
67
- **Success Criteria:**
68
- 1. Messages render with clear user/AI visual distinction
69
- 2. Streaming responses appear character-by-character
70
- 3. Code blocks syntax-highlighted and copyable
71
- 4. UI works on mobile (sidebar toggles, input accessible)
72
-
73
- ---
74
-
75
- ### Phase 4: Admin Panel
76
- **Goal:** Admin interface for managing the AI agent: prompts, users, analytics
77
- **Skills:** [@supabase, @frontend-master]
78
- **Tasks:**
79
- - Admin auth (role-based, separate from user auth)
80
- - System prompt editor (CRUD, version history)
81
- - User management: list, view conversations, ban/unban
82
- - Conversation analytics: message counts, popular topics, response times
83
- - Token usage dashboard per user and total
84
- - AI model configuration (switch providers, adjust temperature)
85
- - Export conversations (CSV/JSON)
86
-
87
- **Success Criteria:**
88
- 1. Admin can edit system prompt and see changes reflected in new conversations
89
- 2. Admin can view user conversations and usage stats
90
- 3. Analytics dashboard shows meaningful metrics
91
- 4. Non-admins cannot access admin routes
92
-
93
- ---
94
-
95
- ### Phase 5: Channel Integration
96
- **Goal:** AI agent accessible via WhatsApp, Telegram, or web widget (based on project needs)
97
- **Skills:** [@supabase]
98
- **Tasks:**
99
- - Webhook endpoint for channel provider
100
- - Message format translation (channel format ↔ internal format)
101
- - User identity mapping (channel user → Supabase user)
102
- - Media handling (images, voice messages if applicable)
103
- - Rate limiting per channel user
104
- - Channel-specific formatting (WhatsApp markdown vs web markdown)
105
- - Health check endpoint for webhook verification
106
-
107
- **Success Criteria:**
108
- 1. Messages from channel reach AI and response returns to channel
109
- 2. Conversation history shared across channels for same user
110
- 3. Rate limiting prevents abuse
111
- 4. Webhook responds within provider timeout limits
112
-
113
- ---
114
-
115
- ### Phase 6: Safety & Resilience
116
- **Goal:** Production-grade safety: prompt injection defense, rate limiting, failover
117
- **Skills:** []
118
- **Tasks:**
119
- - Prompt injection detection (input sanitization, pattern matching)
120
- - Output filtering (PII detection, harmful content blocking)
121
- - Rate limiting: per-user, per-IP, global
122
- - AI provider failover (primary → secondary provider)
123
- - Conversation length limits with graceful handling
124
- - Input validation (max length, content type)
125
- - Logging: all AI interactions logged for audit
126
- - Error recovery: conversation state preserved on failures
127
-
128
- **Success Criteria:**
129
- 1. Known prompt injection patterns blocked
130
- 2. Rate limits enforced and clear feedback to user
131
- 3. Provider failover works (disable primary, secondary picks up)
132
- 4. No PII leaked in AI responses (if configured)
133
-
134
- ---
135
-
136
- ### Phase 7: Deploy & Verify
137
- **Goal:** Production deployment with AI-specific verification
138
- **Skills:** [@deploy-verify]
139
- **Team:** ship-team
140
- **Tasks:**
141
- - Final type check and lint
142
- - Production build
143
- - Deploy to Vercel
144
- - Verify AI provider keys work in production
145
- - Test full conversation flow in production
146
- - Load test: concurrent conversations (if applicable)
147
- - Run 6-check post-deploy verification
148
- - Supabase production review (RLS, no service key exposed)
149
-
150
- **Success Criteria:**
151
- 1. HTTP 200, auth flow works, no console errors
152
- 2. AI responds correctly in production
153
- 3. Conversations persist across sessions
154
- 4. API latency < 500ms for non-AI endpoints
155
- 5. AI response time < 5s for first token
156
- 6. No source maps or service keys exposed
@@ -1,181 +0,0 @@
1
- # Project Template: Mobile App
2
-
3
- > React Native + Expo managed workflow + Supabase. Full pipeline from dev to App Store.
4
-
5
- **Stack:** React Native, Expo (managed workflow), TypeScript, expo-router, Supabase, EAS Build/Submit
6
- **Phases:** 8
7
- **Type:** mobile-app
8
-
9
- ## Phases
10
-
11
- ### Phase 1: Foundation
12
- **Goal:** Working Expo app with TypeScript, navigation, and Supabase connected
13
- **Skills:** [@supabase]
14
- **Tasks:**
15
- - Initialize Expo project with managed workflow and TypeScript strict
16
- - Configure expo-router (file-based routing)
17
- - Set up Supabase client (with @react-native-async-storage for token persistence)
18
- - Configure environment variables (expo-constants, app.config.ts)
19
- - Create tab navigation shell (bottom tabs)
20
- - Set up development build configuration
21
- - Configure ESLint + Prettier for React Native
22
-
23
- **Success Criteria:**
24
- 1. App runs on iOS simulator and Android emulator
25
- 2. Tab navigation works between screens
26
- 3. Supabase client connects (test query succeeds)
27
- 4. TypeScript strict mode passes
28
-
29
- ---
30
-
31
- ### Phase 2: Auth
32
- **Goal:** Complete auth flow with secure token storage and deep linking
33
- **Skills:** [@supabase]
34
- **Tasks:**
35
- - Login screen (email/password)
36
- - Signup screen with email verification
37
- - Password reset flow
38
- - Auth state persistence (AsyncStorage + Supabase session)
39
- - Protected route wrapper (redirect unauthenticated to login)
40
- - Deep linking for email verification and password reset
41
- - Biometric authentication unlock (optional, Face ID / fingerprint)
42
- - Auth loading state (splash → check session → route)
43
-
44
- **Success Criteria:**
45
- 1. User can sign up, verify email, and log in
46
- 2. Session persists across app restarts
47
- 3. Deep links from email open correct screen
48
- 4. Unauthenticated users always see login screen
49
-
50
- ---
51
-
52
- ### Phase 3: Core Screens
53
- **Goal:** Main app screens with data fetching, pull-to-refresh, and CRUD
54
- **Skills:** [@supabase]
55
- **Tasks:**
56
- - Home / dashboard screen with key data
57
- - List screen with FlatList (pagination, pull-to-refresh)
58
- - Detail screen with full resource view
59
- - Create form with validation
60
- - Edit form (pre-populated)
61
- - Delete with confirmation
62
- - Search / filter functionality
63
- - Empty states and error states for all screens
64
- - Loading skeletons
65
-
66
- **Success Criteria:**
67
- 1. User can perform full CRUD on core resources
68
- 2. Lists paginate correctly and pull-to-refresh works
69
- 3. Forms validate input and show clear errors
70
- 4. Empty states and loading states visible
71
- 5. Back navigation works correctly on all flows
72
-
73
- ---
74
-
75
- ### Phase 4: Native Features
76
- **Goal:** Platform-specific features: camera, push notifications, location, biometrics
77
- **Skills:** []
78
- **Tasks:**
79
- - Push notifications (expo-notifications + Supabase Edge Function for sending)
80
- - Camera integration (expo-camera or expo-image-picker)
81
- - Location services (expo-location — if applicable)
82
- - Biometric unlock (expo-local-authentication)
83
- - Share functionality (expo-sharing)
84
- - Haptic feedback on key interactions
85
- - Platform-specific UI adjustments (iOS vs Android)
86
- - Permission request flows with clear explanations
87
-
88
- **Success Criteria:**
89
- 1. Push notifications deliver on both platforms
90
- 2. Camera/image picker works and uploads to Supabase Storage
91
- 3. Permission requests explain why access is needed
92
- 4. Haptic feedback on primary actions
93
-
94
- ---
95
-
96
- ### Phase 5: Offline & Performance
97
- **Goal:** Offline-first data with background sync and smooth 60fps UI
98
- **Skills:** []
99
- **Tasks:**
100
- - Local SQLite database (expo-sqlite) for offline cache
101
- - Sync engine: local changes → Supabase when online
102
- - Conflict resolution strategy (last-write-wins or merge)
103
- - Network status detection (NetInfo)
104
- - Optimistic updates (UI updates immediately, sync in background)
105
- - Image caching (expo-image)
106
- - List rendering optimization (FlashList or FlatList tuning)
107
- - Memory profiling and leak detection
108
- - Startup time optimization (reduce bundle, lazy imports)
109
-
110
- **Success Criteria:**
111
- 1. App works offline for core read/write operations
112
- 2. Data syncs when connectivity restored
113
- 3. No dropped frames on list scrolling (60fps)
114
- 4. App cold start < 2s
115
- 5. Memory usage stable over extended use
116
-
117
- ---
118
-
119
- ### Phase 6: App Store Prep
120
- **Goal:** App store assets, configuration, and metadata ready for submission
121
- **Skills:** []
122
- **Tasks:**
123
- - App icon (all required sizes for iOS + Android)
124
- - Splash screen (animated or static)
125
- - App Store screenshots (6.7", 6.5", 5.5" for iOS; phone + tablet for Android)
126
- - App Store description, keywords, category
127
- - Privacy policy URL
128
- - app.json / app.config.ts: version, bundle ID, permissions justification
129
- - EAS Build configuration (eas.json: development, preview, production profiles)
130
- - Code signing: Apple Developer certificates, Google Play keystore
131
-
132
- **Success Criteria:**
133
- 1. App icon renders correctly on both platforms
134
- 2. Splash screen displays during load
135
- 3. Screenshots capture key features
136
- 4. EAS Build config has all 3 profiles
137
- 5. Code signing configured for both platforms
138
-
139
- ---
140
-
141
- ### Phase 7: Build & Submit
142
- **Goal:** Production builds submitted to App Store Connect and Google Play Console
143
- **Skills:** []
144
- **Tasks:**
145
- - EAS Build: production profile for iOS
146
- - EAS Build: production profile for Android
147
- - Test production builds on physical devices
148
- - EAS Submit to App Store Connect (TestFlight)
149
- - EAS Submit to Google Play Console (internal testing track)
150
- - Fix any submission rejection issues
151
- - TestFlight beta testing round
152
- - Google Play internal testing round
153
-
154
- **Success Criteria:**
155
- 1. iOS build uploads to App Store Connect without errors
156
- 2. Android build uploads to Google Play Console without errors
157
- 3. TestFlight build installs and runs on test devices
158
- 4. Google Play internal test installs and runs
159
- 5. No crash reports from beta testing
160
-
161
- ---
162
-
163
- ### Phase 8: Post-Launch
164
- **Goal:** Production monitoring, OTA updates, and crash reporting configured
165
- **Skills:** []
166
- **Tasks:**
167
- - OTA updates: configure expo-updates for instant patches
168
- - Crash reporting (Sentry or expo-updates error tracking)
169
- - Analytics: screen views, key actions, funnel tracking
170
- - App Store listing live: submit for review (iOS), promote to production (Android)
171
- - Monitor first 48h: crash rates, ANR rates, user feedback
172
- - Hotfix process: OTA for JS changes, new build for native changes
173
- - Version bump and changelog for next release
174
-
175
- **Success Criteria:**
176
- 1. OTA updates deliver to users within minutes
177
- 2. Crash reports appear in dashboard with stack traces
178
- 3. Analytics tracking key user flows
179
- 4. App live on both stores
180
- 5. No critical crashes in first 48h
181
- 6. Hotfix pipeline tested and documented
@@ -1,134 +0,0 @@
1
- # Project Template: Voice Agent
2
-
3
- > Voice AI agent with Supabase Edge Functions, Retell AI, and ElevenLabs.
4
-
5
- **Stack:** Supabase Edge Functions (Deno), Retell AI, ElevenLabs, TypeScript
6
- **Phases:** 6
7
- **Type:** voice-agent
8
-
9
- ## Phases
10
-
11
- ### Phase 1: Foundation
12
- **Goal:** Supabase project with schema, edge function boilerplate, and voice provider connection
13
- **Skills:** [@supabase, @voice-agent]
14
- **Tasks:**
15
- - Design Supabase schema: calls, call_events, contacts, tools, system_config
16
- - Create edge function scaffold (Deno, cors headers, error handling)
17
- - Configure Retell AI: API keys, agent creation, ElevenLabs voice selection
18
- - Environment variables in Supabase (voice provider keys, webhook secret)
19
- - Basic webhook endpoint that receives and logs call events
20
- - RLS policies on all tables
21
-
22
- **Success Criteria:**
23
- 1. Edge function deployed and responding to health check
24
- 2. Voice provider can reach webhook endpoint
25
- 3. Schema deployed with RLS enabled
26
- 4. Call events logging to database
27
-
28
- ---
29
-
30
- ### Phase 2: Voice Flow Design
31
- **Goal:** Complete conversation state machine with branching paths and slot filling
32
- **Skills:** [@voice-agent]
33
- **Tasks:**
34
- - Design conversation flow (state machine: greeting → discovery → action → closing)
35
- - Create Retell AI agent configuration (system prompt, voice, language)
36
- - Define conversation states and transitions
37
- - Slot filling logic (extract key info from conversation)
38
- - Multi-language support (if applicable — e.g., Greek/English/Russian)
39
- - Interruption handling (user interrupts mid-sentence)
40
- - Silence detection and re-engagement prompts
41
- - Transfer-to-human escalation path
42
-
43
- **Success Criteria:**
44
- 1. Assistant follows designed flow in test calls
45
- 2. Slot filling correctly extracts required information
46
- 3. Language switching works naturally (if multi-language)
47
- 4. Escalation to human triggers correctly
48
-
49
- ---
50
-
51
- ### Phase 3: Webhook Handlers
52
- **Goal:** Robust webhook processing for all voice provider events
53
- **Skills:** [@supabase, @voice-agent]
54
- **Tasks:**
55
- - Webhook signature verification (prevent spoofing)
56
- - Call start handler: create call record, load contact context
57
- - Call end handler: save transcript, update call status, trigger follow-ups
58
- - Function call handler: route tool calls to appropriate handlers
59
- - Status update handler: track call progress in real-time
60
- - Error handler: graceful failure with logging
61
- - Idempotency: handle duplicate webhook deliveries
62
-
63
- **Success Criteria:**
64
- 1. All webhook events processed and logged
65
- 2. Signature verification blocks invalid requests
66
- 3. Duplicate deliveries don't create duplicate records
67
- 4. Failed handlers don't crash the entire endpoint
68
-
69
- ---
70
-
71
- ### Phase 4: Tool Functions
72
- **Goal:** Business logic tools the voice agent can call during conversations
73
- **Skills:** [@supabase]
74
- **Tasks:**
75
- - Tool definition schema (name, description, parameters)
76
- - Tool router: dispatch function calls to handlers
77
- - Business-specific tools (varies per project):
78
- - Database lookups (order status, product search, appointment check)
79
- - External API calls (CRM, inventory, booking system)
80
- - Data mutations (create appointment, update record, send notification)
81
- - Tool response formatting (structured → natural language for voice)
82
- - Tool error handling (timeout, API failure → graceful voice response)
83
- - Tool call logging (for analytics and debugging)
84
-
85
- **Success Criteria:**
86
- 1. Voice agent can call tools mid-conversation and use results
87
- 2. Tool failures produce graceful voice responses (not errors)
88
- 3. All tool calls logged with input/output
89
- 4. Tool response latency < 2s (voice conversations are latency-sensitive)
90
-
91
- ---
92
-
93
- ### Phase 5: Testing & Tuning
94
- **Goal:** Reliable voice agent with optimized latency and conversation quality
95
- **Skills:** [@voice-agent]
96
- **Tasks:**
97
- - Test call suite: happy path, edge cases, error scenarios
98
- - Latency profiling: identify slow tool calls, optimize
99
- - Voice quality tuning: adjust voice provider settings (speed, pitch, stability)
100
- - Prompt engineering: refine system prompt based on test call results
101
- - Edge case handling: unknown inputs, off-topic queries, hostile callers
102
- - Load testing: concurrent calls (if applicable)
103
- - Transcript review: analyze test transcripts for quality issues
104
- - Cost analysis: per-call cost breakdown (voice + AI + telephony)
105
-
106
- **Success Criteria:**
107
- 1. Happy path call completes successfully in < 3 minutes
108
- 2. All tool calls respond within 2s
109
- 3. Voice sounds natural (no robotic artifacts or awkward pauses)
110
- 4. Edge cases handled gracefully (no hangups or infinite loops)
111
-
112
- ---
113
-
114
- ### Phase 6: Deploy & Verify
115
- **Goal:** Production edge functions deployed with voice provider configured
116
- **Skills:** [@deploy-verify, @voice-agent]
117
- **Team:** ship-team
118
- **Tasks:**
119
- - Final type check on edge functions
120
- - Deploy edge functions to Supabase production
121
- - Configure voice provider webhooks to production URLs
122
- - Verify webhook signature validation in production
123
- - Test call in production environment
124
- - Monitor first 10 production calls for issues
125
- - Set up alerting for webhook failures
126
- - Document: phone number, webhook URLs, provider dashboard links
127
-
128
- **Success Criteria:**
129
- 1. Edge function responds 200 to health check
130
- 2. Voice provider webhook configured and verified
131
- 3. Test call completes full flow in production
132
- 4. Tool calls work with production data
133
- 5. No secrets exposed in edge function logs
134
- 6. Webhook failures trigger alerts