qualia-framework 2.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 (261) hide show
  1. package/README.md +50 -0
  2. package/bin/cli.js +519 -0
  3. package/framework/agents/architecture-strategist.md +53 -0
  4. package/framework/agents/backend-agent.md +150 -0
  5. package/framework/agents/code-simplicity-reviewer.md +86 -0
  6. package/framework/agents/frontend-agent.md +111 -0
  7. package/framework/agents/kieran-typescript-reviewer.md +96 -0
  8. package/framework/agents/performance-oracle.md +111 -0
  9. package/framework/agents/qualia-codebase-mapper.md +760 -0
  10. package/framework/agents/qualia-debugger.md +1203 -0
  11. package/framework/agents/qualia-executor.md +881 -0
  12. package/framework/agents/qualia-integration-checker.md +423 -0
  13. package/framework/agents/qualia-phase-researcher.md +453 -0
  14. package/framework/agents/qualia-plan-checker.md +699 -0
  15. package/framework/agents/qualia-planner.md +1241 -0
  16. package/framework/agents/qualia-project-researcher.md +602 -0
  17. package/framework/agents/qualia-research-synthesizer.md +236 -0
  18. package/framework/agents/qualia-roadmapper.md +605 -0
  19. package/framework/agents/qualia-verifier.md +685 -0
  20. package/framework/agents/team-orchestrator.md +228 -0
  21. package/framework/agents/teams/full-stack-team.md +48 -0
  22. package/framework/agents/teams/optimize-team.md +53 -0
  23. package/framework/agents/teams/review-team.md +62 -0
  24. package/framework/agents/teams/ship-team.md +86 -0
  25. package/framework/agents/test-agent.md +182 -0
  26. package/framework/askpass.sh +2 -0
  27. package/framework/commands/design.md +53 -0
  28. package/framework/commands/quick-db.md +22 -0
  29. package/framework/config/retention.json +35 -0
  30. package/framework/core/PRINCIPLES.md +77 -0
  31. package/framework/hooks/auto-format.sh +45 -0
  32. package/framework/hooks/block-env-edit.sh +42 -0
  33. package/framework/hooks/branch-guard.sh +46 -0
  34. package/framework/hooks/confirm-delete.sh +56 -0
  35. package/framework/hooks/migration-validate.sh +68 -0
  36. package/framework/hooks/notification-speak.sh +15 -0
  37. package/framework/hooks/pre-commit.sh +80 -0
  38. package/framework/hooks/pre-compact.sh +55 -0
  39. package/framework/hooks/pre-deploy-gate.sh +151 -0
  40. package/framework/hooks/qualia-colors.sh +32 -0
  41. package/framework/hooks/retention-cleanup.sh +43 -0
  42. package/framework/hooks/save-session-state.sh +153 -0
  43. package/framework/hooks/session-context-loader.sh +28 -0
  44. package/framework/hooks/session-learn.sh +30 -0
  45. package/framework/knowledge/claudecode-bible.md +1384 -0
  46. package/framework/knowledge/client-prefs.md +22 -0
  47. package/framework/knowledge/common-fixes.md +25 -0
  48. package/framework/knowledge/deployment-map.md +35 -0
  49. package/framework/knowledge/email-signature.html +1 -0
  50. package/framework/knowledge/employees.md +8 -0
  51. package/framework/knowledge/learned-patterns.md +51 -0
  52. package/framework/knowledge/optimization-research-2026.md +137 -0
  53. package/framework/knowledge/qualia-context.md +67 -0
  54. package/framework/knowledge/supabase-patterns.md +50 -0
  55. package/framework/knowledge/voice-agent-patterns.md +46 -0
  56. package/framework/qualia-engine/VERSION +1 -0
  57. package/framework/qualia-engine/bin/qualia-tools.js +2160 -0
  58. package/framework/qualia-engine/bin/qualia-tools.test.js +1054 -0
  59. package/framework/qualia-engine/references/checkpoints.md +775 -0
  60. package/framework/qualia-engine/references/continuation-format.md +249 -0
  61. package/framework/qualia-engine/references/decimal-phase-calculation.md +65 -0
  62. package/framework/qualia-engine/references/design-quality.md +56 -0
  63. package/framework/qualia-engine/references/git-integration.md +254 -0
  64. package/framework/qualia-engine/references/git-planning-commit.md +50 -0
  65. package/framework/qualia-engine/references/model-profile-resolution.md +32 -0
  66. package/framework/qualia-engine/references/model-profiles.md +73 -0
  67. package/framework/qualia-engine/references/phase-argument-parsing.md +61 -0
  68. package/framework/qualia-engine/references/planning-config.md +195 -0
  69. package/framework/qualia-engine/references/questioning.md +141 -0
  70. package/framework/qualia-engine/references/tdd.md +263 -0
  71. package/framework/qualia-engine/references/ui-brand.md +160 -0
  72. package/framework/qualia-engine/references/verification-patterns.md +612 -0
  73. package/framework/qualia-engine/templates/DEBUG.md +159 -0
  74. package/framework/qualia-engine/templates/DESIGN.md +81 -0
  75. package/framework/qualia-engine/templates/UAT.md +247 -0
  76. package/framework/qualia-engine/templates/codebase/architecture.md +255 -0
  77. package/framework/qualia-engine/templates/codebase/concerns.md +310 -0
  78. package/framework/qualia-engine/templates/codebase/conventions.md +307 -0
  79. package/framework/qualia-engine/templates/codebase/integrations.md +280 -0
  80. package/framework/qualia-engine/templates/codebase/stack.md +186 -0
  81. package/framework/qualia-engine/templates/codebase/structure.md +285 -0
  82. package/framework/qualia-engine/templates/codebase/testing.md +480 -0
  83. package/framework/qualia-engine/templates/config.json +35 -0
  84. package/framework/qualia-engine/templates/context.md +283 -0
  85. package/framework/qualia-engine/templates/continue-here.md +78 -0
  86. package/framework/qualia-engine/templates/debug-subagent-prompt.md +91 -0
  87. package/framework/qualia-engine/templates/discovery.md +146 -0
  88. package/framework/qualia-engine/templates/milestone-archive.md +123 -0
  89. package/framework/qualia-engine/templates/milestone.md +115 -0
  90. package/framework/qualia-engine/templates/phase-prompt.md +567 -0
  91. package/framework/qualia-engine/templates/planner-subagent-prompt.md +117 -0
  92. package/framework/qualia-engine/templates/project.md +184 -0
  93. package/framework/qualia-engine/templates/projects/ai-agent.md +156 -0
  94. package/framework/qualia-engine/templates/projects/mobile-app.md +181 -0
  95. package/framework/qualia-engine/templates/projects/voice-agent.md +134 -0
  96. package/framework/qualia-engine/templates/projects/website.md +137 -0
  97. package/framework/qualia-engine/templates/requirements.md +231 -0
  98. package/framework/qualia-engine/templates/research-project/ARCHITECTURE.md +204 -0
  99. package/framework/qualia-engine/templates/research-project/FEATURES.md +147 -0
  100. package/framework/qualia-engine/templates/research-project/PITFALLS.md +200 -0
  101. package/framework/qualia-engine/templates/research-project/STACK.md +120 -0
  102. package/framework/qualia-engine/templates/research-project/SUMMARY.md +170 -0
  103. package/framework/qualia-engine/templates/research.md +552 -0
  104. package/framework/qualia-engine/templates/roadmap.md +202 -0
  105. package/framework/qualia-engine/templates/state.md +176 -0
  106. package/framework/qualia-engine/templates/summary-complex.md +59 -0
  107. package/framework/qualia-engine/templates/summary-minimal.md +41 -0
  108. package/framework/qualia-engine/templates/summary-standard.md +48 -0
  109. package/framework/qualia-engine/templates/summary.md +246 -0
  110. package/framework/qualia-engine/templates/user-setup.md +311 -0
  111. package/framework/qualia-engine/templates/verification-report.md +322 -0
  112. package/framework/qualia-engine/workflows/add-phase.md +179 -0
  113. package/framework/qualia-engine/workflows/add-todo.md +157 -0
  114. package/framework/qualia-engine/workflows/audit-milestone.md +241 -0
  115. package/framework/qualia-engine/workflows/check-todos.md +176 -0
  116. package/framework/qualia-engine/workflows/complete-milestone.md +858 -0
  117. package/framework/qualia-engine/workflows/diagnose-issues.md +219 -0
  118. package/framework/qualia-engine/workflows/discovery-phase.md +289 -0
  119. package/framework/qualia-engine/workflows/discuss-phase.md +534 -0
  120. package/framework/qualia-engine/workflows/execute-phase.md +559 -0
  121. package/framework/qualia-engine/workflows/execute-plan.md +438 -0
  122. package/framework/qualia-engine/workflows/help.md +470 -0
  123. package/framework/qualia-engine/workflows/insert-phase.md +220 -0
  124. package/framework/qualia-engine/workflows/list-phase-assumptions.md +178 -0
  125. package/framework/qualia-engine/workflows/map-codebase.md +327 -0
  126. package/framework/qualia-engine/workflows/new-milestone.md +363 -0
  127. package/framework/qualia-engine/workflows/new-project.md +1037 -0
  128. package/framework/qualia-engine/workflows/pause-work.md +122 -0
  129. package/framework/qualia-engine/workflows/plan-milestone-gaps.md +256 -0
  130. package/framework/qualia-engine/workflows/plan-phase.md +422 -0
  131. package/framework/qualia-engine/workflows/progress.md +354 -0
  132. package/framework/qualia-engine/workflows/quick.md +252 -0
  133. package/framework/qualia-engine/workflows/remove-phase.md +326 -0
  134. package/framework/qualia-engine/workflows/research-phase.md +74 -0
  135. package/framework/qualia-engine/workflows/resume-project.md +306 -0
  136. package/framework/qualia-engine/workflows/set-profile.md +80 -0
  137. package/framework/qualia-engine/workflows/settings.md +145 -0
  138. package/framework/qualia-engine/workflows/transition.md +556 -0
  139. package/framework/qualia-engine/workflows/update.md +197 -0
  140. package/framework/qualia-engine/workflows/verify-phase.md +195 -0
  141. package/framework/qualia-engine/workflows/verify-work.md +625 -0
  142. package/framework/rules/context7.md +11 -0
  143. package/framework/rules/deployment.md +29 -0
  144. package/framework/rules/frontend.md +33 -0
  145. package/framework/rules/security.md +12 -0
  146. package/framework/rules/speed.md +20 -0
  147. package/framework/scripts/__pycache__/say.cpython-314.pyc +0 -0
  148. package/framework/scripts/apply-retention.sh +120 -0
  149. package/framework/scripts/bootstrap-pop-os.sh +354 -0
  150. package/framework/scripts/claude-voice +13 -0
  151. package/framework/scripts/cleanup.sh +131 -0
  152. package/framework/scripts/cowork-mode.sh +141 -0
  153. package/framework/scripts/generate-project-claude-md.sh +153 -0
  154. package/framework/scripts/load-test-webhook.js +172 -0
  155. package/framework/scripts/say.py +236 -0
  156. package/framework/scripts/showcase-video-recorder/ffmpeg-builder.js +167 -0
  157. package/framework/scripts/showcase-video-recorder/playwright-helpers.js +216 -0
  158. package/framework/scripts/speak.py +55 -0
  159. package/framework/scripts/speak.sh +18 -0
  160. package/framework/scripts/status.sh +138 -0
  161. package/framework/scripts/sync-to-framework.sh +65 -0
  162. package/framework/scripts/voice-hotkey.py +227 -0
  163. package/framework/scripts/voice-input.sh +51 -0
  164. package/framework/skills/animate/SKILL.md +202 -0
  165. package/framework/skills/bolder/SKILL.md +144 -0
  166. package/framework/skills/browser-qa/SKILL.md +536 -0
  167. package/framework/skills/clarify/SKILL.md +179 -0
  168. package/framework/skills/colorize/SKILL.md +170 -0
  169. package/framework/skills/critique/SKILL.md +126 -0
  170. package/framework/skills/deep-research/SKILL.md +271 -0
  171. package/framework/skills/delight/SKILL.md +329 -0
  172. package/framework/skills/deploy/SKILL.md +261 -0
  173. package/framework/skills/deploy-verify/SKILL.md +377 -0
  174. package/framework/skills/deploy-verify/scripts/canary-check.sh +206 -0
  175. package/framework/skills/deploy-verify/scripts/check-console-errors.js +147 -0
  176. package/framework/skills/deploy-verify/scripts/check-cwv.js +139 -0
  177. package/framework/skills/deploy-verify/scripts/project-detect.sh +84 -0
  178. package/framework/skills/deploy-verify/scripts/verify.sh +548 -0
  179. package/framework/skills/design-quieter/SKILL.md +130 -0
  180. package/framework/skills/distill/SKILL.md +149 -0
  181. package/framework/skills/docs-lookup/SKILL.md +78 -0
  182. package/framework/skills/fcm-notifications/SKILL.md +125 -0
  183. package/framework/skills/financial-ledger/SKILL.md +1039 -0
  184. package/framework/skills/frontend-master/NOTICE.md +4 -0
  185. package/framework/skills/frontend-master/SKILL.md +127 -0
  186. package/framework/skills/frontend-master/reference/color-and-contrast.md +132 -0
  187. package/framework/skills/frontend-master/reference/interaction-design.md +123 -0
  188. package/framework/skills/frontend-master/reference/motion-design.md +99 -0
  189. package/framework/skills/frontend-master/reference/responsive-design.md +114 -0
  190. package/framework/skills/frontend-master/reference/spatial-design.md +100 -0
  191. package/framework/skills/frontend-master/reference/typography.md +131 -0
  192. package/framework/skills/frontend-master/reference/ux-writing.md +107 -0
  193. package/framework/skills/harden/SKILL.md +357 -0
  194. package/framework/skills/i18n-rtl/SKILL.md +752 -0
  195. package/framework/skills/learn/SKILL.md +71 -0
  196. package/framework/skills/memory/SKILL.md +50 -0
  197. package/framework/skills/mobile-expo/SKILL.md +864 -0
  198. package/framework/skills/mobile-expo/references/store-checklist.md +550 -0
  199. package/framework/skills/nestjs-backend/README.md +73 -0
  200. package/framework/skills/nestjs-backend/SKILL.md +446 -0
  201. package/framework/skills/nestjs-backend/references/templates.md +1173 -0
  202. package/framework/skills/normalize/SKILL.md +79 -0
  203. package/framework/skills/onboard/SKILL.md +242 -0
  204. package/framework/skills/polish/SKILL.md +209 -0
  205. package/framework/skills/pr/SKILL.md +66 -0
  206. package/framework/skills/qualia/SKILL.md +153 -0
  207. package/framework/skills/qualia-add-todo/SKILL.md +68 -0
  208. package/framework/skills/qualia-audit-milestone/SKILL.md +92 -0
  209. package/framework/skills/qualia-check-todos/SKILL.md +55 -0
  210. package/framework/skills/qualia-complete-milestone/SKILL.md +108 -0
  211. package/framework/skills/qualia-debug/SKILL.md +149 -0
  212. package/framework/skills/qualia-design/SKILL.md +203 -0
  213. package/framework/skills/qualia-discuss-phase/SKILL.md +72 -0
  214. package/framework/skills/qualia-execute-phase/SKILL.md +86 -0
  215. package/framework/skills/qualia-help/SKILL.md +67 -0
  216. package/framework/skills/qualia-idk/SKILL.md +352 -0
  217. package/framework/skills/qualia-list-phase-assumptions/SKILL.md +67 -0
  218. package/framework/skills/qualia-new-milestone/SKILL.md +72 -0
  219. package/framework/skills/qualia-new-project/SKILL.md +92 -0
  220. package/framework/skills/qualia-optimize/SKILL.md +417 -0
  221. package/framework/skills/qualia-pause-work/SKILL.md +96 -0
  222. package/framework/skills/qualia-plan-milestone-gaps/SKILL.md +57 -0
  223. package/framework/skills/qualia-plan-phase/SKILL.md +101 -0
  224. package/framework/skills/qualia-progress/SKILL.md +53 -0
  225. package/framework/skills/qualia-quick/SKILL.md +89 -0
  226. package/framework/skills/qualia-research-phase/SKILL.md +88 -0
  227. package/framework/skills/qualia-resume-work/SKILL.md +62 -0
  228. package/framework/skills/qualia-review/SKILL.md +263 -0
  229. package/framework/skills/qualia-start/SKILL.md +182 -0
  230. package/framework/skills/qualia-verify-work/SKILL.md +105 -0
  231. package/framework/skills/qualia-workflow/SKILL.md +130 -0
  232. package/framework/skills/rag/SKILL.md +750 -0
  233. package/framework/skills/responsive/SKILL.md +231 -0
  234. package/framework/skills/retro/SKILL.md +284 -0
  235. package/framework/skills/sakani-conventions/SKILL.md +136 -0
  236. package/framework/skills/sakani-conventions/evals/evals.json +23 -0
  237. package/framework/skills/sakani-conventions/references/entities.md +365 -0
  238. package/framework/skills/sakani-conventions/references/error-codes.md +95 -0
  239. package/framework/skills/seo-master/SKILL.md +490 -0
  240. package/framework/skills/seo-master/references/checklist.md +199 -0
  241. package/framework/skills/seo-master/references/structured-data.md +609 -0
  242. package/framework/skills/ship/SKILL.md +202 -0
  243. package/framework/skills/stack-researcher/SKILL.md +215 -0
  244. package/framework/skills/status/SKILL.md +154 -0
  245. package/framework/skills/status/scripts/health-check.sh +562 -0
  246. package/framework/skills/subscription-payments/SKILL.md +250 -0
  247. package/framework/skills/supabase/SKILL.md +973 -0
  248. package/framework/skills/supabase/references/templates.md +159 -0
  249. package/framework/skills/team/SKILL.md +67 -0
  250. package/framework/skills/test-runner/SKILL.md +202 -0
  251. package/framework/skills/voice-agent/SKILL.md +407 -0
  252. package/framework/skills/zoho-workflow/SKILL.md +51 -0
  253. package/framework/statusline-command.sh +117 -0
  254. package/package.json +24 -0
  255. package/profiles/fawzi.json +16 -0
  256. package/profiles/hasan.json +16 -0
  257. package/profiles/moayad.json +16 -0
  258. package/templates/CLAUDE-owner.md +52 -0
  259. package/templates/CLAUDE.md.hbs +58 -0
  260. package/templates/env.claude.template +12 -0
  261. package/templates/settings.json +141 -0
@@ -0,0 +1,352 @@
1
+ ---
2
+ name: qualia-idk
3
+ description: "Intelligent 'what should I do next?' advisor. Reads .planning/ AND codebase, understands session context, suggests smart next actions. Use this skill whenever the user says 'idk', 'what now', 'what should I do', 'I'm stuck', 'what next', 'help me decide', 'I don't know', 'not sure', 'lost', 'confused', 'qualia-idk', or seems frustrated, stuck, or unsure about their next step. Also trigger when user has been debugging the same issue repeatedly, or when all work appears complete and user asks 'now what'."
4
+ ---
5
+
6
+ # Qualia IDK — Intelligent Next-Step Advisor
7
+
8
+ When you don't know what to do next, this skill reads BOTH `.planning/` AND the codebase, understands your session context, and gives you the smartest recommendation.
9
+
10
+ **This is NOT a status report.** It's a senior dev advisor that understands your situation and tells you what to do.
11
+
12
+ ## Usage
13
+
14
+ `/qualia-idk` — Analyze situation and recommend next action
15
+
16
+ No flags. No modes. Just ask.
17
+
18
+ ## Process
19
+
20
+ ### Step 1: Gather Context (always — run all in parallel)
21
+
22
+ ```bash
23
+ cat .planning/STATE.md 2>/dev/null || echo "NO_STATE"
24
+ ```
25
+
26
+ ```bash
27
+ cat .planning/ROADMAP.md 2>/dev/null || echo "NO_ROADMAP"
28
+ ```
29
+
30
+ ```bash
31
+ # Recent phase work
32
+ ls -t .planning/phases/*/*-SUMMARY.md 2>/dev/null | head -3 | while read f; do echo "=== $f ==="; head -20 "$f"; done
33
+ ```
34
+
35
+ ```bash
36
+ # Git state
37
+ git status --short 2>/dev/null | head -10
38
+ git log --oneline -5 2>/dev/null
39
+ ```
40
+
41
+ ```bash
42
+ # Active debug sessions
43
+ ls .planning/debug/*.md 2>/dev/null 2>&1 | head -3
44
+ ```
45
+
46
+ ```bash
47
+ # Handoff file
48
+ test -f .continue-here.md && echo "HANDOFF_EXISTS" && head -20 .continue-here.md || echo "NO_HANDOFF"
49
+ ```
50
+
51
+ ```bash
52
+ # Check project type and health
53
+ test -f package.json && echo "HAS_PACKAGE" || echo "NO_PACKAGE"
54
+ test -d .planning && echo "HAS_PLANNING" || echo "NO_PLANNING"
55
+ test -f .planning/OPTIMIZE.md && echo "HAS_OPTIMIZE" && head -10 .planning/OPTIMIZE.md || echo "NO_OPTIMIZE"
56
+ test -f .planning/REVIEW.md && echo "HAS_REVIEW" || echo "NO_REVIEW"
57
+ ```
58
+
59
+ Also read the **conversation history** from this session — what has the user been doing, what errors occurred, what commands were run. This is implicit (you have the conversation context).
60
+
61
+ Read the most recent SUMMARY.md files (up to 3) fully to understand what was just built.
62
+
63
+ ### Step 2: Classify Situation
64
+
65
+ Based on gathered data, classify into ONE primary situation:
66
+
67
+ | Situation | How to Detect |
68
+ |-----------|--------------|
69
+ | `no-project` | No `.planning/` directory |
70
+ | `fresh-session` | STATE.md exists but no work done this session, no conversation context |
71
+ | `handoff` | `.continue-here.md` exists |
72
+ | `mid-work` | Uncommitted git changes, phase "in progress" |
73
+ | `phase-just-completed` | Phase status "executed" or "verified", next phase exists |
74
+ | `phase-blocked` | STATE.md lists blockers, or phase depends on incomplete phase |
75
+ | `bug-loop` | 3+ debug/fix attempts on same issue in conversation, or `.planning/debug/` has active sessions |
76
+ | `all-phases-done` | All phases in current milestone complete |
77
+ | `all-milestones-done` | No upcoming milestones, all phases across all milestones done |
78
+ | `frustrated` | Multiple errors in conversation, same files edited repeatedly, user expressing frustration |
79
+
80
+ ### Step 3: Generate Recommendations
81
+
82
+ Based on classification, present **1 primary recommendation** and **2-3 alternatives**.
83
+
84
+ ---
85
+
86
+ #### If `no-project`:
87
+
88
+ **Primary:** "No Qualia project here. What are you working on?"
89
+
90
+ **Options:**
91
+ 1. `/qualia-new-project` — Start fresh with full planning workflow
92
+ 2. `/qualia-quick [description]` — Quick task, no project setup
93
+ 3. `/qualia-new-milestone` — Add structure to existing codebase
94
+
95
+ ---
96
+
97
+ #### If `fresh-session`:
98
+
99
+ **Primary:** Show where things stand from STATE.md, route to the logical next action.
100
+
101
+ If `.continue-here.md` exists: "You left a handoff note last session. Read it first."
102
+
103
+ Otherwise: read STATE.md phase status and route like the `/qualia` smart router.
104
+
105
+ ---
106
+
107
+ #### If `handoff`:
108
+
109
+ **Primary:** "Previous session left a handoff. Here's what happened:"
110
+
111
+ Read and summarize `.continue-here.md`:
112
+ - What was done (branch, commits)
113
+ - What's uncommitted
114
+ - Dead-ends to avoid
115
+ - Suggested next steps
116
+
117
+ ---
118
+
119
+ #### If `mid-work`:
120
+
121
+ **Primary:** "You have work in progress:"
122
+ - Show uncommitted files from git status
123
+ - Show what phase/task was being worked on from STATE.md
124
+
125
+ **Options:**
126
+ 1. Continue where you left off
127
+ 2. Commit progress: suggest a commit message based on changes
128
+ 3. `/qualia-pause-work` — Save context and come back later
129
+
130
+ ---
131
+
132
+ #### If `phase-just-completed`:
133
+
134
+ **Primary:** Route to the natural next step.
135
+
136
+ If phase was executed but NOT verified:
137
+ > "Phase N is built. Verify it: `/qualia-verify-work N`"
138
+
139
+ If phase was verified:
140
+ > "Phase N is done. Next: Phase N+1 — {name}. Run `/qualia-plan-phase N+1`"
141
+
142
+ If phase was verified but has warnings:
143
+ > "Phase N passed with warnings. Review them or continue to Phase N+1?"
144
+
145
+ **Options:**
146
+ 1. Verify/continue (the primary)
147
+ 2. `/qualia-optimize` — Quick optimization check before moving on
148
+ 3. `/qualia-progress` — See the full picture
149
+
150
+ ---
151
+
152
+ #### If `phase-blocked`:
153
+
154
+ This is where the skill earns its keep. **Analyze WHY the phase is blocked.**
155
+
156
+ Read STATE.md blockers section. Read ROADMAP.md dependencies. Then:
157
+
158
+ **If blocked by dependency (another phase not done):**
159
+ > "Phase N depends on Phase M which isn't complete. But Phase K has no blockers and could run first."
160
+
161
+ Suggest reordering if safe — check that Phase K doesn't depend on Phase N.
162
+
163
+ **If blocked by technical issue:**
164
+ > "Phase N is blocked by {issue}. I can research a workaround. Want me to investigate?"
165
+
166
+ Offer to spawn a research agent.
167
+
168
+ **If blocked by external factor:**
169
+ > "This needs {external thing} before it can proceed. While waiting, here's what you can work on: {independent phases/tasks}"
170
+
171
+ **If blocked by unclear requirements:**
172
+ > "The scope isn't clear enough to plan. Run `/qualia-discuss-phase N` to work through the gray areas."
173
+
174
+ **Options always include:**
175
+ 1. The specific unblocking suggestion
176
+ 2. Skip this phase (if non-critical) — flag as deferred in ROADMAP.md
177
+ 3. Readjust milestone — rethink the phase order
178
+ 4. `/qualia-debug` — If it's a bug causing the block
179
+
180
+ ---
181
+
182
+ #### If `bug-loop`:
183
+
184
+ Detect: same error appearing multiple times in conversation, same files being edited 3+ times, user expressing frustration.
185
+
186
+ **Primary:** "You've been working on this for a while. Let's try a different angle."
187
+
188
+ Analyze what has been tried and suggest an ALTERNATIVE approach — not the same thing again.
189
+
190
+ **Options:**
191
+ 1. Different approach: {specific alternative based on conversation context}
192
+ 2. Step back: verify assumptions with a minimal reproduction
193
+ 3. `/qualia-debug --error-analysis` — Systematic root cause analysis
194
+ 4. **[EMPLOYEE ONLY]:** "This might benefit from Fawzi's input — want to flag it?"
195
+
196
+ ---
197
+
198
+ #### If `all-phases-done`:
199
+
200
+ **Primary:** "All phases in this milestone are complete! Time to verify and ship."
201
+
202
+ **Options:**
203
+ 1. `/qualia-audit-milestone` — Full milestone audit (recommended)
204
+ 2. `/qualia-optimize` — Optimization sweep before shipping
205
+ 3. `/qualia-review` — Production readiness review
206
+ 4. `/ship` — Deploy now (if you're confident)
207
+
208
+ ---
209
+
210
+ #### If `all-milestones-done`:
211
+
212
+ **Trigger Layer 3: Platform Gap Detection** (see Step 4).
213
+
214
+ ---
215
+
216
+ #### If `frustrated`:
217
+
218
+ Acknowledge without being condescending. Do NOT say "I understand your frustration" or similar platitudes.
219
+
220
+ **Primary:** "Let's step back. What's the ONE thing you need working right now?"
221
+
222
+ Focus the conversation on the single most important issue. Offer:
223
+
224
+ 1. Reset context: `/clear` and start fresh on the specific problem
225
+ 2. Research: "I can investigate {specific aspect} — want me to dig in?"
226
+ 3. Different approach: suggest an alternative to what they've been trying
227
+ 4. **[EMPLOYEE ONLY]:** "Want to get Fawzi's eyes on this?"
228
+
229
+ ---
230
+
231
+ ### Step 4: Platform Gap Detection (Layer 3)
232
+
233
+ **Only runs when `all-milestones-done` is detected.**
234
+
235
+ Scan the codebase for missing common functionality. For each category, check if it exists:
236
+
237
+ ```bash
238
+ # Auth flows
239
+ find app -name "*.tsx" -path "*/login*" -o -path "*/signup*" -o -path "*/reset*" 2>/dev/null | head -3
240
+ ```
241
+
242
+ ```bash
243
+ # Error pages
244
+ test -f app/not-found.tsx && echo "HAS_404" || echo "MISSING_404"
245
+ test -f app/error.tsx && echo "HAS_ERROR_BOUNDARY" || echo "MISSING_ERROR_BOUNDARY"
246
+ ```
247
+
248
+ ```bash
249
+ # SEO
250
+ grep -l "metadata\|generateMetadata" app/layout.tsx app/page.tsx 2>/dev/null | head -3
251
+ test -f public/sitemap.xml && echo "HAS_SITEMAP" || echo "MISSING_SITEMAP"
252
+ test -f public/robots.txt && echo "HAS_ROBOTS" || echo "MISSING_ROBOTS"
253
+ ```
254
+
255
+ ```bash
256
+ # Legal
257
+ find app -name "page.tsx" -path "*privacy*" -o -path "*terms*" 2>/dev/null | head -3
258
+ ```
259
+
260
+ ```bash
261
+ # Analytics & Monitoring
262
+ grep -rl "analytics\|gtag\|plausible\|posthog\|sentry\|LogRocket" app/ lib/ 2>/dev/null | head -3
263
+ ```
264
+
265
+ ```bash
266
+ # Accessibility basics
267
+ grep -rl "aria-label\|aria-describedby\|role=" app/ components/ 2>/dev/null | wc -l
268
+ ```
269
+
270
+ Compile missing items and score by priority:
271
+ - **HIGH** — Users will notice immediately (error pages, auth flows, mobile responsiveness)
272
+ - **MEDIUM** — Affects quality/discoverability (SEO, analytics, monitoring)
273
+ - **LOW** — Nice to have (PWA, advanced accessibility, legal pages)
274
+
275
+ **Present as a suggested next milestone:**
276
+
277
+ ```
278
+ All milestones complete! Here's what I'd suggest for the next milestone:
279
+
280
+ ## Suggested: v{X+1}.0 — Polish & Production Readiness
281
+
282
+ HIGH priority (users notice these):
283
+ - Missing 404 page
284
+ - No error boundaries
285
+ - {other HIGH items}
286
+
287
+ MEDIUM priority:
288
+ - No sitemap.xml
289
+ - Analytics not configured
290
+ - {other MEDIUM items}
291
+
292
+ Want me to:
293
+ 1. Start this milestone: /qualia-new-milestone
294
+ 2. Research best practices for any of these
295
+ 3. Just pick the top 3 and build them as quick tasks
296
+ ```
297
+
298
+ ### Step 5: Escalation Logic (Layer 4 — employees only)
299
+
300
+ **Check the role** from `~/.claude/CLAUDE.md`:
301
+
302
+ ```bash
303
+ grep -m1 "^## Role:" ~/.claude/CLAUDE.md 2>/dev/null
304
+ ```
305
+
306
+ - If `Role: OWNER` — skip ALL escalation. Fawzi doesn't need to review with himself.
307
+ - If `Role: DEVELOPER` or `Role: EMPLOYEE`:
308
+
309
+ **Escalate when:**
310
+ - Situation is `bug-loop` (3+ attempts) → "Want to get Fawzi's input?"
311
+ - Situation is `frustrated` → "This might be worth reviewing with Fawzi"
312
+ - Work involves: data migration, auth system changes, production database, payment logic → "This is high-risk. Consider reviewing with Fawzi first."
313
+ - Phase is blocked with no clear path forward → "Might be worth flagging to Fawzi"
314
+
315
+ **Escalation is always a suggestion, never forced.** Present it as one of the options, not the primary recommendation.
316
+
317
+ ### Step 6: Present Response
318
+
319
+ Output as **direct conversational text**. No file creation. No YAML. No persistence.
320
+
321
+ Format:
322
+
323
+ ```
324
+ ## Where You Are
325
+
326
+ {1-2 sentence context from STATE.md / git / conversation}
327
+
328
+ ## I Recommend
329
+
330
+ **{Top recommendation}** — {why, 1 sentence}
331
+ {Copy-paste command if applicable}
332
+
333
+ ## Other Options
334
+
335
+ 1. **{Option}** — {what, why} _{scope: quick/medium/deep}_
336
+ 2. **{Option}** — {what, why} _{scope}_
337
+ 3. **{Option}** — {what, why} _{scope}_
338
+
339
+ {If escalation applies: suggestion here, as option 4}
340
+ ```
341
+
342
+ ### Step 7: Handle Follow-ups
343
+
344
+ The user may respond with:
345
+ - A number ("2") → act on that option
346
+ - "tell me more about 2" → explain in detail
347
+ - "research option 1" → spawn a research agent for that topic
348
+ - "just do it" → execute the primary recommendation
349
+ - "skip it" → move to the next logical action
350
+ - Any natural language → respond conversationally
351
+
352
+ Follow the thread naturally. This is a conversation, not a form.
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: qualia-list-phase-assumptions
3
+ description: "Surface hidden assumptions before phase planning begins — technical approach, implementation order, scope, risks, dependencies. Use this skill whenever the user says 'list assumptions', 'what assumptions', 'phase assumptions', 'before we plan', or wants to explicitly check what they're assuming about a phase before committing to a plan. Also trigger when user mentions 'hidden assumptions', 'what are we taking for granted', or needs a pre-planning sanity check."
4
+ ---
5
+
6
+ # Qualia List Phase Assumptions — Assumption Surfacing
7
+
8
+ Surface hidden assumptions across 5 areas before phase planning begins. Conversational output only — no files created.
9
+
10
+ ## Usage
11
+
12
+ `/qualia-list-phase-assumptions 3` — List assumptions for phase 3
13
+ `/qualia-list-phase-assumptions` — Auto-detect next phase to analyze
14
+
15
+ ## Process
16
+
17
+ ### 1. Load Context
18
+
19
+ Read:
20
+ - `.planning/ROADMAP.md` — Phase description
21
+ - `.planning/PROJECT.md` — Tech stack and constraints
22
+ - `.planning/REQUIREMENTS.md` — Related requirements
23
+ - Phase RESEARCH.md if it exists
24
+
25
+ Reference: `~/.claude/qualia-engine/workflows/list-phase-assumptions.md`
26
+
27
+ ### 2. Analyze 5 Areas
28
+
29
+ For each area, identify what's being assumed without being stated:
30
+
31
+ #### Technical Approach
32
+ - What tech/libraries are we assuming we'll use?
33
+ - Are we assuming a specific architecture pattern?
34
+ - Are we assuming certain APIs or services are available?
35
+
36
+ #### Implementation Order
37
+ - Are we assuming certain things should be built first?
38
+ - Are we assuming a specific development sequence?
39
+ - Could a different order be more efficient?
40
+
41
+ #### Scope
42
+ - Are we assuming certain things are in/out of this phase?
43
+ - Are we assuming a level of polish or completeness?
44
+ - Are there edge cases we're assuming we don't need to handle?
45
+
46
+ #### Risks
47
+ - What could go wrong that we haven't considered?
48
+ - Are we assuming things will "just work"?
49
+ - What if a key assumption turns out to be wrong?
50
+
51
+ #### Dependencies
52
+ - Are we assuming other phases are complete?
53
+ - Are we assuming access to certain APIs/services/data?
54
+ - Are we assuming team availability or skills?
55
+
56
+ ### 3. Present Findings
57
+
58
+ Present assumptions conversationally, grouped by area. For each assumption, note:
59
+ - What's being assumed
60
+ - Why it matters if wrong
61
+ - How confident we should be
62
+
63
+ ### 4. Close
64
+
65
+ End with: "What do you think? Any of these surprise you or seem risky?"
66
+
67
+ No files are created — this is a conversational exercise to inform planning.
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: qualia-new-milestone
3
+ description: "Start a new milestone on an existing project — brownfield initialization with questioning, optional research, requirements, and roadmap. Use this skill whenever the user says 'new milestone', 'next milestone', 'start v2', 'milestone 2', or wants to begin a new phase of work on a project that already has a .planning directory. Also trigger when user mentions 'next version', 'new feature set', or needs to plan the next iteration of an existing project."
4
+ ---
5
+
6
+ # Qualia New Milestone — Brownfield Milestone Start
7
+
8
+ Start a new milestone on an existing project. Similar to new-project but preserves existing project context.
9
+
10
+ ## Usage
11
+
12
+ `/qualia-new-milestone` — Start new milestone interactively
13
+ `/qualia-new-milestone "v2: Add analytics dashboard"` — With initial description
14
+
15
+ ## Prerequisites
16
+
17
+ Project must already have `.planning/` directory. If not, use `qualia-new-project` instead.
18
+
19
+ ## Process
20
+
21
+ ### 1. Load Existing Context
22
+
23
+ Read:
24
+ - `.planning/PROJECT.md` — Current project state
25
+ - `.planning/milestones/` — Previous milestone archives (if any)
26
+ - `.planning/STATE.md` — Current state
27
+
28
+ Reference: `~/.claude/qualia-engine/workflows/new-milestone.md`
29
+
30
+ ### 2. Questioning Phase
31
+
32
+ Reference: `~/.claude/qualia-engine/references/questioning.md`
33
+
34
+ Ask targeted questions building on existing project knowledge:
35
+ - What's the goal of this milestone?
36
+ - What new features or improvements?
37
+ - Any tech stack changes or additions?
38
+ - What's the timeline?
39
+ - Lessons from the previous milestone to apply?
40
+
41
+ ### 3. Research (Optional)
42
+
43
+ If the milestone involves new tech or unfamiliar territory, conduct research.
44
+ Otherwise, skip — the project already has established patterns.
45
+
46
+ ### 4. Create/Update Files
47
+
48
+ #### Update PROJECT.md
49
+ Add new milestone section to existing PROJECT.md (don't overwrite).
50
+
51
+ #### Create REQUIREMENTS.md
52
+ Fresh requirements for this milestone:
53
+ Template: `~/.claude/qualia-engine/templates/requirements.md`
54
+ - Milestone definition (v{next_version})
55
+ - Functional requirements
56
+ - Non-functional requirements
57
+ - Definition of Done
58
+
59
+ #### Create ROADMAP.md
60
+ Fresh roadmap for this milestone's phases. Previous roadmap is archived in milestones/.
61
+
62
+ #### Update STATE.md
63
+ Reset phase tracking for the new milestone while preserving project-level info.
64
+
65
+ #### Research (if conducted)
66
+ Save to `.planning/research/` directory.
67
+
68
+ UI/brand reference: `~/.claude/qualia-engine/references/ui-brand.md`
69
+
70
+ ### 5. Next Step
71
+
72
+ > "Milestone v{version} initialized with {N} phases. Run `/qualia-plan-phase 1` to start planning."
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: qualia-new-project
3
+ description: "Initialize a new Qualia workflow project from scratch — questioning, research, requirements, roadmap. Use this skill whenever the user says 'new project', 'start project', 'init project', 'qualia new', or wants to begin a brand new project with the Qualia qualia-engine workflow. Also trigger when user mentions setting up .planning directory, creating a roadmap, or starting fresh on a new client project."
4
+ ---
5
+
6
+ # Qualia New Project — Project Initialization
7
+
8
+ Initialize a new project with the full Qualia qualia-engine workflow: questioning → research → requirements → roadmap.
9
+
10
+ ## Usage
11
+
12
+ `/qualia-new-project` — Start new project initialization
13
+ `/qualia-new-project "Build AI chatbot for client X"` — Start with initial description
14
+
15
+ ## Process
16
+
17
+ ### 1. Questioning Phase
18
+
19
+ Run the questioning workflow to understand the project deeply before any planning.
20
+
21
+ Reference: `~/.claude/qualia-engine/references/questioning.md`
22
+
23
+ Ask targeted questions covering:
24
+ - What is the project? Who is it for?
25
+ - What problem does it solve?
26
+ - What are the key features?
27
+ - What tech stack preferences exist?
28
+ - What are the constraints (timeline, budget, existing systems)?
29
+ - What does success look like?
30
+
31
+ ### 2. Research Phase
32
+
33
+ Based on answers, conduct research on:
34
+ - Similar solutions and competitors
35
+ - Best tech stack choices for the requirements
36
+ - Potential challenges and pitfalls
37
+ - UI/brand considerations per `~/.claude/qualia-engine/references/ui-brand.md`
38
+
39
+ ### 3. Create Project Structure
40
+
41
+ Create the `.planning/` directory with all required files:
42
+
43
+ ```bash
44
+ mkdir -p .planning/research .planning/phases .planning/quick .planning/debug
45
+ ```
46
+
47
+ #### PROJECT.md
48
+ Template from `~/.claude/qualia-engine/templates/project.md`:
49
+ - Project name, description, client
50
+ - Tech stack decisions
51
+ - Deploy target
52
+ - Key URLs and credentials references
53
+
54
+ #### config.json
55
+ ```json
56
+ {
57
+ "project": "<name>",
58
+ "version": "1.0",
59
+ "deploy": { "platform": "vercel", "domain": "" },
60
+ "stack": { "framework": "next", "db": "", "auth": "" }
61
+ }
62
+ ```
63
+
64
+ #### REQUIREMENTS.md
65
+ Template from `~/.claude/qualia-engine/templates/requirements.md`:
66
+ - Milestone definition (v1.0)
67
+ - Functional requirements (categorized)
68
+ - Non-functional requirements
69
+ - Definition of Done checklist
70
+
71
+ #### ROADMAP.md
72
+ - Break requirements into sequential phases
73
+ - Each phase: number, name, description, status, dependencies
74
+ - Phases should be small enough to complete in 1-2 sessions
75
+
76
+ #### STATE.md
77
+ - Current milestone, current phase
78
+ - Phase status table
79
+ - Quick tasks completed table
80
+ - Session log
81
+
82
+ ### 4. Next Step
83
+
84
+ After initialization, tell the user:
85
+ > "Project initialized. Next: run `/qualia-plan-phase 1` to plan the first phase."
86
+
87
+ ### Agents Used
88
+ | Agent | File | Role |
89
+ |-------|------|------|
90
+ | `qualia-project-researcher` | `~/.claude/agents/qualia-project-researcher.md` | Domain ecosystem research |
91
+ | `qualia-research-synthesizer` | `~/.claude/agents/qualia-research-synthesizer.md` | Synthesizes parallel research |
92
+ | `qualia-roadmapper` | `~/.claude/agents/qualia-roadmapper.md` | Creates ROADMAP.md |