qualia-framework 2.4.0 → 2.4.2

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 (39) hide show
  1. package/bin/collect-metrics.sh +62 -0
  2. package/framework/agents/qualia-phase-researcher.md +6 -3
  3. package/framework/agents/qualia-planner.md +10 -7
  4. package/framework/agents/qualia-research-synthesizer.md +110 -147
  5. package/framework/agents/red-team-qa.md +130 -0
  6. package/framework/hooks/auto-format.sh +9 -1
  7. package/framework/hooks/migration-validate.sh +21 -16
  8. package/framework/hooks/pre-commit.sh +13 -5
  9. package/framework/hooks/pre-deploy-gate.sh +23 -1
  10. package/framework/hooks/retention-cleanup.sh +4 -4
  11. package/framework/hooks/save-session-state.sh +18 -10
  12. package/framework/hooks/session-context-loader.sh +21 -0
  13. package/framework/hooks/skill-announce.sh +2 -0
  14. package/framework/install.ps1 +6 -6
  15. package/framework/install.sh +6 -4
  16. package/framework/qualia-engine/VERSION +1 -1
  17. package/framework/qualia-engine/bin/collect-metrics.sh +71 -0
  18. package/framework/qualia-engine/bin/qualia-tools.js +104 -63
  19. package/framework/qualia-engine/references/continuation-prompt.md +97 -0
  20. package/framework/qualia-engine/references/employee-guide.md +167 -0
  21. package/framework/qualia-engine/templates/lab-notes.md +16 -0
  22. package/framework/qualia-engine/templates/roadmap.md +2 -8
  23. package/framework/qualia-engine/workflows/execute-phase.md +17 -17
  24. package/framework/qualia-engine/workflows/new-project.md +37 -114
  25. package/framework/qualia-engine/workflows/progress.md +63 -28
  26. package/framework/skills/client-handoff/SKILL.md +13 -3
  27. package/framework/skills/deep-research/SKILL.md +34 -71
  28. package/framework/skills/learn/SKILL.md +29 -5
  29. package/framework/skills/qualia/SKILL.md +57 -17
  30. package/framework/skills/qualia-complete-milestone/SKILL.md +29 -7
  31. package/framework/skills/qualia-evolve/SKILL.md +200 -0
  32. package/framework/skills/qualia-execute-phase/SKILL.md +1 -1
  33. package/framework/skills/qualia-guide/SKILL.md +32 -0
  34. package/framework/skills/qualia-help/SKILL.md +62 -60
  35. package/framework/skills/qualia-new-project/SKILL.md +32 -30
  36. package/framework/skills/qualia-report/SKILL.md +217 -0
  37. package/framework/skills/qualia-start/SKILL.md +31 -59
  38. package/framework/skills/qualia-verify-work/SKILL.md +20 -3
  39. package/package.json +1 -1
@@ -0,0 +1,97 @@
1
+ # Checkpoint Continuation Prompt Template
2
+
3
+ Template for spawning a fresh agent to continue execution after a checkpoint pause.
4
+
5
+ **Why fresh agent:** Resume relies on internal serialization that breaks with parallel tool calls. Fresh agents with explicit state are more reliable.
6
+
7
+ ## Template
8
+
9
+ ```markdown
10
+ <objective>
11
+ Continue executing plan {plan_id} from task {resume_task_number}: {resume_task_name}.
12
+ Previous tasks are already committed. Do NOT re-execute them.
13
+ </objective>
14
+
15
+ <completed_work>
16
+ ## Tasks Already Done
17
+
18
+ {completed_tasks_table}
19
+
20
+ These tasks have been committed. Verify their commits exist before continuing:
21
+ ```bash
22
+ git log --oneline --all --grep="{plan_id}" | head -10
23
+ ```
24
+ </completed_work>
25
+
26
+ <checkpoint_resolution>
27
+ ## Checkpoint Resolution
28
+
29
+ **Checkpoint type:** {checkpoint_type}
30
+ **User response:** {user_response}
31
+
32
+ {resume_instructions}
33
+ </checkpoint_resolution>
34
+
35
+ <resume_from>
36
+ ## Resume Point
37
+
38
+ **Task:** {resume_task_number} — {resume_task_name}
39
+ **Plan path:** {plan_path}
40
+
41
+ Read the full plan for context, but only execute from task {resume_task_number} onward.
42
+ Follow the same execution rules: per-task commits, deviation handling, verification.
43
+ </resume_from>
44
+
45
+ <context>
46
+ {state_content}
47
+ {config_content}
48
+ </context>
49
+
50
+ <success_criteria>
51
+ - [ ] Previous commits verified (not re-executed)
52
+ - [ ] Remaining tasks executed from task {resume_task_number}
53
+ - [ ] Each task committed individually
54
+ - [ ] SUMMARY.md created covering ALL tasks (including pre-checkpoint)
55
+ - [ ] STATE.md updated with final position
56
+ </success_criteria>
57
+ ```
58
+
59
+ ## Resume Instructions by Checkpoint Type
60
+
61
+ ### checkpoint:human-verify
62
+ ```
63
+ The user has verified the previous work.
64
+ - "approved" → Continue to next task normally.
65
+ - Issue description → Fix the reported issue in the current task context before proceeding.
66
+ ```
67
+
68
+ ### checkpoint:decision
69
+ ```
70
+ The user selected an option for the decision point.
71
+ - Apply the user's choice: {user_response}
72
+ - This may affect how remaining tasks are implemented.
73
+ - Document the decision in SUMMARY.md under "Decisions Made".
74
+ ```
75
+
76
+ ### checkpoint:human-action
77
+ ```
78
+ The user completed a manual action (e.g., authentication, external config).
79
+ - "done" → Verify the action succeeded (run verification command if specified).
80
+ - If verification fails, inform user and wait for retry.
81
+ - If verification passes, continue to next task.
82
+ ```
83
+
84
+ ## Variables
85
+
86
+ | Variable | Source | Description |
87
+ |----------|--------|-------------|
88
+ | `{plan_id}` | Plan frontmatter | e.g., "03-02" |
89
+ | `{resume_task_number}` | Checkpoint return | Task number to resume from |
90
+ | `{resume_task_name}` | Checkpoint return | Name of the resume task |
91
+ | `{completed_tasks_table}` | Checkpoint return | Markdown table of done tasks with commit hashes |
92
+ | `{checkpoint_type}` | Plan XML | human-verify, decision, or human-action |
93
+ | `{user_response}` | User input | What the user provided at the checkpoint |
94
+ | `{resume_instructions}` | This template | Type-specific instructions from above |
95
+ | `{plan_path}` | Phase directory | Path to the PLAN.md file |
96
+ | `{state_content}` | STATE.md | Inlined project state |
97
+ | `{config_content}` | config.json | Inlined project config |
@@ -0,0 +1,167 @@
1
+ # How Qualia Works — Developer Guide
2
+
3
+ > This is everything you need to know. Follow the flow, type the commands. The framework handles the rest.
4
+
5
+ ---
6
+
7
+ ## The Big Picture
8
+
9
+ Every project follows one path:
10
+
11
+ ```
12
+ Start → Build → Polish → Review → PR → Deploy → Handoff
13
+ 70% 100%
14
+ ```
15
+
16
+ The framework tells you what to do at every step. When in doubt, type `/qualia` — it reads your project state and tells you the exact next command.
17
+
18
+ ---
19
+
20
+ ## Starting a Project
21
+
22
+ You get assigned a project. Here's what you do:
23
+
24
+ ```
25
+ /qualia-new-project ← answers questions, sets everything up
26
+ ```
27
+
28
+ This creates a `.planning/` folder with your roadmap, requirements, and phases. You don't need to understand the files — the framework reads them for you.
29
+
30
+ ---
31
+
32
+ ## The Build Cycle (repeat for each phase)
33
+
34
+ Your roadmap has phases (Phase 1, Phase 2, etc.). For each one:
35
+
36
+ ```
37
+ /qualia-plan-phase 1 ← creates the plan
38
+ /qualia-execute-phase 1 ← builds it
39
+ /qualia-verify-work 1 ← tests it
40
+ ```
41
+
42
+ Then move to the next phase. The framework tells you when to move on.
43
+
44
+ **Don't memorize this.** After each command finishes, it tells you what's next. Or type `/qualia` anytime.
45
+
46
+ ---
47
+
48
+ ## The Finish Line (this is where most people stall)
49
+
50
+ When all phases are done, you're about 70% done. The framework now guides you through:
51
+
52
+ ```
53
+ ✓ Build phases ← you already did this
54
+ ✓ Milestone audit ← framework runs this
55
+ ✓ Milestone archived ← framework does this
56
+ ▶ Design polish ← /critique → /polish → /harden
57
+ · Code review ← /qualia-review --web
58
+ · Pull request ← /pr
59
+ · Deploy ← Fawzi handles this
60
+ · Client handoff ← /client-handoff
61
+ ```
62
+
63
+ The framework walks you through each step. Just keep typing `/qualia` to see what's next.
64
+
65
+ ---
66
+
67
+ ## The 10 Commands That Matter
68
+
69
+ | When | Command | What it does |
70
+ |------|---------|-------------|
71
+ | **Starting** | `/qualia-new-project` | Sets up everything from scratch |
72
+ | **Building** | `/qualia-plan-phase N` | Plans a phase |
73
+ | | `/qualia-execute-phase N` | Builds it |
74
+ | | `/qualia-verify-work N` | Tests it |
75
+ | **Polishing** | `/critique` | Reviews the design |
76
+ | | `/polish` | Fixes spacing, alignment, details |
77
+ | | `/harden` | Handles edge cases, errors, overflow |
78
+ | **Shipping** | `/qualia-review --web` | Code quality + security audit |
79
+ | | `/pr` | Creates a pull request |
80
+ | **Anytime** | `/qualia` | "What should I do next?" |
81
+
82
+ Everything else is optional. These 10 get the job done.
83
+
84
+ ---
85
+
86
+ ## When You're Stuck
87
+
88
+ ```
89
+ /qualia ← "what's next?" — reads state, tells you the command
90
+ /qualia-idk ← "I'm lost" — analyzes everything, suggests a path
91
+ /qualia-debug ← "something is broken" — structured debugging
92
+ /qualia-progress ← "where am I?" — full progress report
93
+ ```
94
+
95
+ If none of those help, paste the error and ask Claude directly. If Claude can't fix it, escalate to Fawzi.
96
+
97
+ ---
98
+
99
+ ## Session Start / End
100
+
101
+ **Every session starts the same way.** Claude automatically runs `/qualia-start` which shows you:
102
+ - What project you're in
103
+ - What branch you're on
104
+ - System health
105
+ - What to do next
106
+
107
+ **When you're done for the day:**
108
+ ```
109
+ /qualia-pause-work ← saves your context for next time
110
+ /qualia-report ← logs what you did (Fawzi reviews these)
111
+ ```
112
+
113
+ **When you come back:**
114
+ ```
115
+ /qualia-resume-work ← picks up where you left off
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Rules (non-negotiable)
121
+
122
+ 1. **Feature branches only** — never push to main. The framework blocks it automatically.
123
+ 2. **Read before write** — don't edit files you haven't read.
124
+ 3. **MVP first** — build what's asked, nothing extra.
125
+ 4. **Push to GitHub** — you push code. Fawzi deploys to production.
126
+ 5. **`/qualia` is your friend** — lost? type it. It always knows what's next.
127
+
128
+ ---
129
+
130
+ ## What the Framework Does Behind the Scenes
131
+
132
+ You don't need to understand this, but if you're curious:
133
+
134
+ - **Hooks** run automatically on certain actions (commits, deploys, file writes). They enforce rules like "no pushing to main" and "no editing .env files." If a hook blocks you, it tells you why and how to fix it.
135
+ - **Skills** are the `/commands` you type. They're like recipes — each one does a specific thing.
136
+ - **Agents** are AI workers that skills spawn to do heavy lifting (research, verification, code review). You don't interact with them directly.
137
+ - **`.planning/`** is where the framework tracks everything about your project. Don't edit these files manually — the framework manages them.
138
+
139
+ ---
140
+
141
+ ## Quick Reference Card
142
+
143
+ ```
144
+ ◆ QUALIA DEVELOPER FLOW
145
+
146
+ /qualia-new-project
147
+
148
+ For each phase:
149
+ /qualia-plan-phase N
150
+ /qualia-execute-phase N
151
+ /qualia-verify-work N
152
+
153
+ /qualia-complete-milestone
154
+
155
+ FINISH LINE:
156
+ /critique → /polish → /harden
157
+ /qualia-review --web
158
+ /pr
159
+
160
+ Fawzi deploys
161
+
162
+ /client-handoff
163
+
164
+ Done.
165
+
166
+ Lost? Type /qualia
167
+ ```
@@ -0,0 +1,16 @@
1
+ # Lab Notes — [Project Name]
2
+
3
+ > What failed, why it failed, and what worked instead.
4
+ > Read by planners and researchers to avoid repeating dead-end approaches.
5
+ > Updated via `/learn` or manually during debugging sessions.
6
+
7
+ ---
8
+
9
+ <!-- Entry format:
10
+ ### Phase N: [Phase Title]
11
+
12
+ **Tried:** [approach that was attempted]
13
+ **Failed because:** [root cause — be specific]
14
+ **Better approach:** [what actually worked, or what to try next]
15
+ **Date:** YYYY-MM-DD
16
+ -->
@@ -113,15 +113,9 @@ Phases execute in numeric order: 2 → 2.1 → 2.2 → 3 → 3.1 → 4
113
113
  - Progress table updated by execute workflow
114
114
  - Plan count can be "TBD" initially, refined during planning
115
115
 
116
- **MANDATORY FINAL PHASES — Every client project must end with these 3 phases:**
116
+ **FEATURE PHASES ONLY Do NOT add review, deploy, or handoff phases to the roadmap.**
117
117
 
118
- | Phase | Name | What it does | Skills used |
119
- |-------|------|-------------|-------------|
120
- | N-2 | **Quality Review & Polish** | Code review (`/qualia-review`), design polish (`/critique` → `/polish` → `/harden`), fix all issues. No new features. | @qualia-review, @critique, @polish, @harden |
121
- | N-1 | **Deploy & Verify** | Deploy to production (`/ship`). Run 5-check post-deploy verification (HTTP 200, auth flow, console errors, API latency, UptimeRobot). | @ship, @deploy-verify |
122
- | N | **Client Handoff** | Generate client delivery document (`/client-handoff`). Final production audit (`/qualia-production-check`). Hand over credentials, docs, and access. | @client-handoff, @qualia-production-check |
123
-
124
- These are NOT optional. The roadmapper must always include them as the final 3 phases. Feature phases come first, then these 3 close out the milestone. An employee following the roadmap will naturally reach client handoff without having to discover it on their own.
118
+ The finish line system handles polish → review → PR → deploy → handoff automatically after all feature phases are done (`/qualia-complete-milestone` triggers it). Adding them as roadmap phases causes employees to do the work twice.
125
119
 
126
120
  **Success criteria:**
127
121
  - 2-5 observable behaviors per phase (from user's perspective)
@@ -16,7 +16,7 @@ Read STATE.md before any operation to load project context.
16
16
  Load all context in one call:
17
17
 
18
18
  ```bash
19
- INIT=$(node /home/qualia/.claude/qualia-engine/bin/qualia-tools.js init execute-phase "${PHASE_ARG}")
19
+ INIT=$(node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js init execute-phase "${PHASE_ARG}")
20
20
  ```
21
21
 
22
22
  Parse JSON for: `executor_model`, `verifier_model`, `commit_docs`, `parallelization`, `branching_strategy`, `branch_name`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `plans`, `incomplete_plans`, `plan_count`, `incomplete_count`, `state_exists`, `roadmap_exists`.
@@ -61,7 +61,7 @@ This is a suggestion only — execution continues normally regardless. The user
61
61
  Load plan inventory with wave grouping in one call:
62
62
 
63
63
  ```bash
64
- PLAN_INDEX=$(node /home/qualia/.claude/qualia-engine/bin/qualia-tools.js phase-plan-index "${PHASE_NUMBER}")
64
+ PLAN_INDEX=$(node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js phase-plan-index "${PHASE_NUMBER}")
65
65
  ```
66
66
 
67
67
  Parse JSON for: `phase`, `plans[]` (each with `id`, `wave`, `autonomous`, `objective`, `files_modified`, `task_count`, `has_summary`), `waves` (map of wave number → plan IDs), `incomplete`, `has_checkpoints`.
@@ -113,14 +113,14 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
113
113
  STATE_CONTENT=$(cat .planning/STATE.md)
114
114
  CONFIG_CONTENT=$(cat .planning/config.json 2>/dev/null)
115
115
  # Content must be inlined — @ syntax doesn't work across Task() boundaries
116
- EXECUTE_PLAN_WF=$(cat /home/qualia/.claude/qualia-engine/workflows/execute-plan.md)
117
- SUMMARY_TMPL=$(cat /home/qualia/.claude/qualia-engine/templates/summary.md)
118
- CHECKPOINTS_REF=$(cat /home/qualia/.claude/qualia-engine/references/checkpoints.md)
119
- TDD_REF=$(cat /home/qualia/.claude/qualia-engine/references/tdd.md)
116
+ EXECUTE_PLAN_WF=$(cat /home/qualia/.claude/qualia-framework/workflows/execute-plan.md)
117
+ SUMMARY_TMPL=$(cat /home/qualia/.claude/qualia-framework/templates/summary.md)
118
+ CHECKPOINTS_REF=$(cat /home/qualia/.claude/qualia-framework/references/checkpoints.md)
119
+ TDD_REF=$(cat /home/qualia/.claude/qualia-framework/references/tdd.md)
120
120
  # Detect if plan involves frontend work
121
121
  IS_FRONTEND=$(echo "$PLAN_CONTENT" | grep -qiE '\.(tsx|jsx|css|scss)|frontend|ui|component|page|layout|dashboard|form|modal' && echo "true" || echo "false")
122
122
  if [ "$IS_FRONTEND" = "true" ]; then
123
- DESIGN_CONTEXT=$(cat /home/qualia/.claude/qualia-engine/references/design-quality.md 2>/dev/null)
123
+ DESIGN_CONTEXT=$(cat /home/qualia/.claude/qualia-framework/references/design-quality.md 2>/dev/null)
124
124
  FRONTEND_SKILL=$(cat /home/qualia/.claude/skills/frontend-master/SKILL.md 2>/dev/null)
125
125
  fi
126
126
  ```
@@ -257,7 +257,7 @@ Plans with `autonomous: false` require user interaction.
257
257
  [Awaiting section from agent return]
258
258
  ```
259
259
  5. User responds: "approved"/"done" | issue description | decision selection
260
- 6. **Spawn continuation agent (NOT resume)** using continuation-prompt.md template:
260
+ 6. **Spawn continuation agent (NOT resume)** using `/home/qualia/.claude/qualia-framework/references/continuation-prompt.md` template:
261
261
  - `{completed_tasks_table}`: From checkpoint return
262
262
  - `{resume_task_number}` + `{resume_task_name}`: Current task
263
263
  - `{user_response}`: What user provided
@@ -460,7 +460,7 @@ grep "^status:" "$PHASE_DIR"/*-VERIFICATION.md | cut -d: -f2 | tr -d ' '
460
460
  |--------|--------|
461
461
  | `passed` | → update_roadmap |
462
462
  | `human_needed` | Present items for human testing, get approval or feedback |
463
- | `gaps_found` | Present gap summary, offer `/qualia:plan-phase {phase} --gaps` |
463
+ | `gaps_found` | Present gap summary, offer `/qualia-plan-phase {phase} --gaps` |
464
464
 
465
465
  **If human_needed:**
466
466
  ```
@@ -486,15 +486,15 @@ All automated checks passed. {N} items need human testing:
486
486
  ---
487
487
  ## ▶ Next Up
488
488
 
489
- `/qualia:plan-phase {X} --gaps`
489
+ `/qualia-plan-phase {X} --gaps`
490
490
 
491
491
  <sub>`/clear` first → fresh context window</sub>
492
492
 
493
493
  Also: `cat {phase_dir}/{phase}-VERIFICATION.md` — full report
494
- Also: `/qualia:verify-work {X}` — manual testing first
494
+ Also: `/qualia-verify-work {X}` — manual testing first
495
495
  ```
496
496
 
497
- Gap closure cycle: `/qualia:plan-phase {X} --gaps` reads VERIFICATION.md → creates gap plans with `gap_closure: true` → user runs `/qualia:execute-phase {X} --gaps-only` → verifier re-runs automatically (see below).
497
+ Gap closure cycle: `/qualia-plan-phase {X} --gaps` reads VERIFICATION.md → creates gap plans with `gap_closure: true` → user runs `/qualia-execute-phase {X} --gaps-only` → verifier re-runs automatically (see below).
498
498
 
499
499
  **Mandatory re-verification after gap closure:**
500
500
 
@@ -504,7 +504,7 @@ When executing with `--gaps-only`, after all gap plans complete (aggregate_resul
504
504
  2. aggregate_results reports completion
505
505
  3. verify_phase_goal re-runs (spawn qualia-verifier again)
506
506
  4. **If `passed`:** → update_roadmap (phase complete)
507
- 5. **If `gaps_found` again:** Present new gaps, offer another `/qualia:plan-phase {X} --gaps` cycle. **Never mark phase complete with gaps.**
507
+ 5. **If `gaps_found` again:** Present new gaps, offer another `/qualia-plan-phase {X} --gaps` cycle. **Never mark phase complete with gaps.**
508
508
  6. **If `human_needed`:** Present for manual testing as usual
509
509
 
510
510
  A phase MUST NOT be marked complete in ROADMAP.md until verification returns `passed` or the user explicitly approves after `human_needed`. There is no bypass.
@@ -514,7 +514,7 @@ A phase MUST NOT be marked complete in ROADMAP.md until verification returns `pa
514
514
  Mark phase complete in ROADMAP.md (date, status). **Only reachable when verification status is `passed` or user approved `human_needed` items.**
515
515
 
516
516
  ```bash
517
- node /home/qualia/.claude/qualia-engine/bin/qualia-tools.js commit "docs(phase-{X}): complete phase execution" --files .planning/ROADMAP.md .planning/STATE.md .planning/phases/{phase_dir}/*-VERIFICATION.md .planning/REQUIREMENTS.md
517
+ node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "docs(phase-{X}): complete phase execution" --files .planning/ROADMAP.md .planning/STATE.md .planning/phases/{phase_dir}/*-VERIFICATION.md .planning/REQUIREMENTS.md
518
518
  ```
519
519
  </step>
520
520
 
@@ -526,7 +526,7 @@ node /home/qualia/.claude/qualia-engine/bin/qualia-tools.js commit "docs(phase-{
526
526
 
527
527
  **Phase {X+1}: {Name}** — {Goal}
528
528
 
529
- `/clear` then `/qualia:plan-phase {X+1}`
529
+ `/clear` then `/qualia-plan-phase {X+1}`
530
530
  ```
531
531
 
532
532
  **If milestone complete:**
@@ -535,7 +535,7 @@ MILESTONE COMPLETE!
535
535
 
536
536
  All {N} phases executed.
537
537
 
538
- `/clear` then `/qualia:complete-milestone`
538
+ `/clear` then `/qualia-complete-milestone`
539
539
  ```
540
540
  </step>
541
541
 
@@ -553,7 +553,7 @@ Orchestrator: ~10-15% context. Subagents: fresh 200k each. No polling (Task bloc
553
553
  </failure_handling>
554
554
 
555
555
  <resumption>
556
- Re-run `/qualia:execute-phase {phase}` → discover_plans finds completed SUMMARYs → skips them → resumes from first incomplete plan → continues wave execution.
556
+ Re-run `/qualia-execute-phase {phase}` → discover_plans finds completed SUMMARYs → skips them → resumes from first incomplete plan → continues wave execution.
557
557
 
558
558
  STATE.md tracks: last completed plan, current wave, pending checkpoints.
559
559
  </resumption>
@@ -18,7 +18,7 @@ INIT=$(node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js init new-p
18
18
 
19
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
20
 
21
- **If `project_exists` is true:** Error — project already initialized. Use `/qualia:progress`.
21
+ **If `project_exists` is true:** Error — project already initialized. Use `/qualia-progress`.
22
22
 
23
23
  **If `has_git` is false:** Initialize git:
24
24
  ```bash
@@ -54,14 +54,12 @@ Use AskUserQuestion:
54
54
  - header: "Existing Code"
55
55
  - question: "I detected existing code in this directory. Would you like to map the codebase first?"
56
56
  - options:
57
- - "Map codebase first" — Run /qualia:map-codebase to understand existing architecture (Recommended)
57
+ - "Map codebase first" — Run /qualia-map-codebase to understand existing architecture (Recommended)
58
58
  - "Skip mapping" — Proceed with project initialization
59
59
 
60
60
  **If "Map codebase first":**
61
- ```
62
- Run `/qualia:map-codebase` first, then return to `/qualia:new-project`
63
- ```
64
- Exit command.
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.
65
63
 
66
64
  **If "Skip mapping" OR `needs_codebase_map` is false:** Continue to Step 3.
67
65
 
@@ -230,95 +228,35 @@ node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "docs: ini
230
228
 
231
229
  ## 5. Workflow Preferences
232
230
 
233
- **Round 1 Core workflow settings (4 questions):**
231
+ **Use sensible defaults. Ask ONE question:**
234
232
 
235
233
  ```
236
234
  questions: [
237
235
  {
238
- header: "Mode",
239
- question: "How do you want to work?",
240
- multiSelect: false,
241
- options: [
242
- { label: "YOLO (Recommended)", description: "Auto-approve, just execute" },
243
- { label: "Interactive", description: "Confirm at each step" }
244
- ]
245
- },
246
- {
247
- header: "Depth",
248
- question: "How thorough should planning be?",
249
- multiSelect: false,
250
- options: [
251
- { label: "Quick", description: "Ship fast (3-5 phases, 1-3 plans each)" },
252
- { label: "Standard", description: "Balanced scope and speed (5-8 phases, 3-5 plans each)" },
253
- { label: "Comprehensive", description: "Thorough coverage (8-12 phases, 5-10 plans each)" }
254
- ]
255
- },
256
- {
257
- header: "Execution",
258
- question: "Run plans in parallel?",
236
+ header: "Settings",
237
+ question: "Use recommended settings? (Interactive, standard depth, all quality agents, balanced models)",
259
238
  multiSelect: false,
260
239
  options: [
261
- { label: "Parallel (Recommended)", description: "Independent plans run simultaneously" },
262
- { label: "Sequential", description: "One plan at a time" }
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" }
263
243
  ]
264
- },
265
- // Git Tracking: always committed. Removed as a question — .planning/ must be in git for team collaboration and portal sync.
244
+ }
266
245
  ]
267
246
  ```
268
247
 
269
- **Round 2 Workflow agents:**
270
-
271
- These spawn additional agents during planning/execution. They add tokens and time but improve quality.
272
-
273
- | Agent | When it runs | What it does |
274
- |-------|--------------|--------------|
275
- | **Researcher** | Before planning each phase | Investigates domain, finds patterns, surfaces gotchas |
276
- | **Plan Checker** | After plan is created | Verifies plan actually achieves the phase goal |
277
- | **Verifier** | After phase execution | Confirms must-haves were delivered |
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.
278
251
 
279
- All recommended for important projects. Skip for quick experiments.
280
-
281
- ```
282
- questions: [
283
- {
284
- header: "Research",
285
- question: "Research before planning each phase? (adds tokens/time)",
286
- multiSelect: false,
287
- options: [
288
- { label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
289
- { label: "No", description: "Plan directly from requirements" }
290
- ]
291
- },
292
- {
293
- header: "Plan Check",
294
- question: "Verify plans will achieve their goals? (adds tokens/time)",
295
- multiSelect: false,
296
- options: [
297
- { label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
298
- { label: "No", description: "Execute plans without verification" }
299
- ]
300
- },
301
- {
302
- header: "Verifier",
303
- question: "Verify work satisfies requirements after each phase? (adds tokens/time)",
304
- multiSelect: false,
305
- options: [
306
- { label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
307
- { label: "No", description: "Trust execution, skip verification" }
308
- ]
309
- },
310
- {
311
- header: "Model Profile",
312
- question: "Which AI models for planning agents?",
313
- multiSelect: false,
314
- options: [
315
- { label: "Balanced (Recommended)", description: "Sonnet for most agents — good quality/cost ratio" },
316
- { label: "Quality", description: "Opus for research/roadmap — higher cost, deeper analysis" },
317
- { label: "Budget", description: "Haiku where possible — fastest, lowest cost" }
318
- ]
319
- }
320
- ]
321
- ```
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
322
260
 
323
261
  Create `.planning/config.json` with all settings:
324
262
 
@@ -345,22 +283,19 @@ Create `.planning/config.json` with all settings:
345
283
  node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "chore: add project config" --files .planning/config.json
346
284
  ```
347
285
 
348
- **Note:** Run `/qualia:settings` anytime to update these preferences.
286
+ **Note:** Run `/qualia-settings` anytime to update these preferences.
349
287
 
350
288
  ## 5.5. Resolve Model Profile
351
289
 
352
290
  Use models from init: `researcher_model`, `synthesizer_model`, `roadmapper_model`.
353
291
 
354
- ## 6. Research Decision
292
+ ## 6. Research Phase
355
293
 
356
- Use AskUserQuestion:
357
- - header: "Research"
358
- - question: "Research the domain ecosystem before defining requirements?"
359
- - options:
360
- - "Research first (Recommended)" — Discover standard stacks, expected features, architecture patterns
361
- - "Skip research" — I know this domain well, go straight to requirements
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).
362
297
 
363
- **If "Research first":**
298
+ **If research is enabled:**
364
299
 
365
300
  Display stage banner:
366
301
  ```
@@ -775,11 +710,7 @@ Create roadmap:
775
710
  3. Map every v1 requirement to exactly one phase
776
711
  4. Derive 2-5 success criteria per phase (observable user behaviors)
777
712
  5. Validate 100% coverage
778
- 6. **MANDATORY: After all feature phases, add these 3 final phases:**
779
- - **Quality Review & Polish** — code review (/qualia-review), design polish (/critique → /polish → /harden), fix all issues. No new features.
780
- - **Deploy & Verify** — deploy to production (/ship), 5-check post-deploy verification (HTTP 200, auth, console, latency, UptimeRobot).
781
- - **Client Handoff** — generate delivery document (/client-handoff), final production audit (/qualia-production-check), hand over credentials and docs.
782
- These 3 phases are NOT optional for client projects. They ensure the project goes from "features done" to "client has their project."
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.
783
714
  7. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
784
715
  8. Return ROADMAP CREATED with summary
785
716
 
@@ -950,25 +881,17 @@ Note in STATE.md: `env_setup: pending` so future commands can warn.
950
881
  **Check if project involves frontend work:**
951
882
 
952
883
  ```bash
953
- # Detect from roadmap, requirements, or project type
954
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")
955
885
  ```
956
886
 
957
- **If `HAS_FRONTEND` is true:** Run `/critique` to gather design context.
958
-
959
- Display banner:
960
- ```
961
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
962
- Qualia ► DESIGN CONTEXT
963
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
964
- ```
887
+ **If `HAS_FRONTEND` is true:** Run a brief design consultation (NOT `/critique` — there's no code to critique yet).
965
888
 
966
- Execute the critique skill:
967
- 1. Read `/home/qualia/.claude/skills/critique/SKILL.md`
968
- 2. Follow its process: scan codebase for existing design patterns, ask UX-focused questions, write Design Context section
969
- 3. The skill persists design context to the project's CLAUDE.md (or `.claude/` config)
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)
970
893
 
971
- This runs ONCE per project. All subsequent `/qualia:execute-phase` runs will have the design context available for the frontend-master skill and the diagnostic design pass.
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.
972
895
 
973
896
  **If `HAS_FRONTEND` is false:** Skip silently.
974
897
 
@@ -1051,8 +974,8 @@ Present completion with next steps:
1051
974
  - [ ] ROADMAP.md created with phases, requirement mappings, success criteria
1052
975
  - [ ] STATE.md initialized
1053
976
  - [ ] REQUIREMENTS.md traceability updated
1054
- - [ ] If frontend project: `/critique` run to set design context
1055
- - [ ] User knows next step is `/qualia:discuss-phase 1`
977
+ - [ ] If frontend project: DESIGN.md created with design brief
978
+ - [ ] User knows next step is `/qualia-discuss-phase 1`
1056
979
 
1057
980
  **Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
1058
981