qualia-framework 3.2.1 → 3.3.1

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.
@@ -367,7 +367,7 @@ status: {clean|needs_attention|critical_issues}
367
367
 
368
368
  Commit:
369
369
  ```bash
370
- node ~/.claude/qualia-framework/bin/qualia-tools.js commit "docs: optimization report ({mode} mode, {critical} critical)" --files .planning/OPTIMIZE.md
370
+ git add .planning/OPTIMIZE.md && git commit -m "docs: optimization report ({mode} mode, {critical} critical)"
371
371
  ```
372
372
 
373
373
  **Present results:**
@@ -1,101 +1,206 @@
1
1
  ---
2
2
  name: qualia-plan
3
- description: "Plan the current phase — spawns planner agent in fresh context. Use when ready to plan a phase."
3
+ description: "Plan the current phase — spawns planner, validates with plan-checker in a revision loop (max 3), optionally runs discuss/research first. Use when ready to plan a phase."
4
4
  ---
5
5
 
6
6
  # /qualia-plan — Plan a Phase
7
7
 
8
- Spawn a planner agent to break the current phase into executable tasks.
8
+ Spawn a planner agent to break the current phase into executable tasks, then validate the plan with a checker (up to 3 revision cycles) before routing to build.
9
9
 
10
10
  ## Usage
11
+
11
12
  `/qualia-plan` — plan the next unplanned phase
12
- `/qualia-plan {N}` — plan specific phase
13
+ `/qualia-plan {N}` — plan specific phase N
13
14
  `/qualia-plan {N} --gaps` — plan fixes for verification failures
15
+ `/qualia-plan {N} --skip-check` — skip the plan-checker validation loop (not recommended)
14
16
 
15
17
  ## Process
16
18
 
17
- ### 1. Determine Phase & Load Knowledge
19
+ ### 1. Determine Phase & Load Context
18
20
 
19
21
  ```bash
20
22
  cat .planning/STATE.md 2>/dev/null
23
+ cat .planning/ROADMAP.md 2>/dev/null
24
+ cat .planning/PROJECT.md 2>/dev/null
21
25
  cat ~/.claude/knowledge/learned-patterns.md 2>/dev/null
22
26
  cat ~/.claude/knowledge/client-prefs.md 2>/dev/null
23
27
  ```
24
28
 
25
29
  If no phase number given, use the current phase from STATE.md.
26
- If any learned patterns apply to this phase's work, pass them to the planner in the spawn prompt under a `## Relevant Learnings` section.
27
- If this is a client project and `client-prefs.md` has an entry for the client, include those preferences in the planner context.
28
30
 
29
- ### 2. Spawn Planner (Fresh Context)
31
+ **Read phase-specific context if it exists:**
32
+ ```bash
33
+ cat .planning/phase-{N}-context.md 2>/dev/null # from /qualia-discuss
34
+ cat .planning/phase-{N}-research.md 2>/dev/null # from /qualia-research
35
+ ```
36
+
37
+ ### 2. Optional: Suggest Deeper Prep
38
+
39
+ **If ROADMAP.md marked this phase as a "research flag" AND no phase-{N}-research.md exists:**
40
+
41
+ - header: "Research first?"
42
+ - question: "This phase was flagged for deeper research. Run /qualia-research {N} first?"
43
+ - options:
44
+ - "Yes, research first" — Run /qualia-research {N} inline, then continue
45
+ - "Skip, plan directly" — I know enough
46
+
47
+ **If phase involves compliance/regulatory/architectural stakes AND no phase-{N}-context.md exists:**
48
+
49
+ Briefly suggest: *"Want to run /qualia-discuss {N} first to lock decisions? Optional."*
50
+
51
+ Don't force it. Some phases don't need it.
52
+
53
+ ### 3. Spawn Planner (Fresh Context)
30
54
 
31
55
  ```bash
32
- node ~/.claude/bin/qualia-ui.js banner plan {N} "{phase name from STATE.md}"
56
+ node ~/.claude/bin/qualia-ui.js banner plan {N} "{phase name from ROADMAP.md}"
33
57
  node ~/.claude/bin/qualia-ui.js spawn planner "Breaking phase into tasks..."
34
58
  ```
35
59
 
36
- Spawn a subagent with `agents/planner.md` instructions:
60
+ Spawn the planner:
37
61
 
38
62
  ```
39
63
  Agent(prompt="
40
- Read your role: @agents/planner.md
64
+ Read your role: @~/.claude/agents/planner.md
41
65
 
42
- Project context:
66
+ <project_context>
43
67
  @.planning/PROJECT.md
68
+ </project_context>
44
69
 
45
- Current state:
70
+ <current_state>
46
71
  @.planning/STATE.md
72
+ </current_state>
73
+
74
+ <phase_details>
75
+ Phase {N} from ROADMAP.md:
76
+ @.planning/ROADMAP.md
47
77
 
48
- Phase {N} goal: {goal from STATE.md roadmap}
49
- Phase {N} success criteria: {criteria from STATE.md}
78
+ Goal: {goal from ROADMAP.md}
79
+ Requirements: {REQ-IDs from ROADMAP.md}
80
+ Success criteria: {success criteria from ROADMAP.md}
81
+ </phase_details>
50
82
 
51
- {If --gaps: Also read @.planning/phase-{N}-verification.md for failures to fix}
83
+ <locked_decisions>
84
+ {if phase-{N}-context.md exists, inline its Locked Decisions section; else 'none'}
85
+ </locked_decisions>
52
86
 
53
- Create the plan file at .planning/phase-{N}-plan.md
87
+ <research_findings>
88
+ {if phase-{N}-research.md exists, inline its recommendation; else 'none'}
89
+ </research_findings>
90
+
91
+ {If --gaps: Also read @.planning/phase-{N}-verification.md for failures to fix. Create gap-closure plan.}
92
+
93
+ <relevant_learnings>
94
+ {inline any applicable patterns from knowledge/learned-patterns.md}
95
+ </relevant_learnings>
96
+
97
+ Create the plan at .planning/phase-{N}-plan.md (or .planning/phase-{N}-gaps-plan.md for --gaps).
54
98
  ", subagent_type="qualia-planner", description="Plan phase {N}")
55
99
  ```
56
100
 
57
- ### 3. Review Plan
101
+ ### 4. Validate the Plan (unless --skip-check)
102
+
103
+ Read the generated plan. Spawn the plan-checker:
104
+
105
+ ```
106
+ Agent(prompt="
107
+ Read your role: @~/.claude/agents/plan-checker.md
108
+
109
+ <plan_path>.planning/phase-{N}-plan.md</plan_path>
110
+ <phase_goal>{goal from ROADMAP.md}</phase_goal>
111
+ <success_criteria>{criteria from ROADMAP.md}</success_criteria>
112
+ <project_context>@.planning/PROJECT.md</project_context>
113
+
114
+ Validate against the 7 rules. Return PASS or REVISE with structured issues.
115
+ ", subagent_type="qualia-plan-checker", description="Check plan phase {N}")
116
+ ```
58
117
 
59
- Read the generated plan. Present the summary using the UI helpers:
118
+ **Revision loop (max 3 iterations):**
119
+
120
+ - Iteration 1: Check → if REVISE, re-spawn planner with checker issues
121
+ - Iteration 2: Re-check → if REVISE, re-spawn planner with new issues
122
+ - Iteration 3: Final check → if REVISE or BLOCKED, escalate to user
123
+
124
+ For each revision:
125
+
126
+ ```
127
+ Agent(prompt="
128
+ Read your role: @~/.claude/agents/planner.md
129
+
130
+ <revision_mode>true</revision_mode>
131
+ <current_plan>@.planning/phase-{N}-plan.md</current_plan>
132
+ <checker_feedback>
133
+ {inline REVISE output from plan-checker}
134
+ </checker_feedback>
135
+
136
+ Revise the plan in place. Address every issue. Do NOT add new tasks or change scope
137
+ — only fix what the checker flagged.
138
+ ", subagent_type="qualia-planner", description="Revise plan phase {N}")
139
+ ```
140
+
141
+ After revision, spawn the checker again. Max 3 total revision cycles.
142
+
143
+ **If checker returns BLOCKED after 3 cycles:**
144
+
145
+ ```bash
146
+ node ~/.claude/bin/qualia-ui.js fail "Plan failed validation after 3 revisions"
147
+ ```
148
+
149
+ Show the remaining issues. Ask:
150
+ - "Skip validation and proceed anyway" (use `--skip-check`)
151
+ - "Adjust the roadmap" (phase scope may be wrong)
152
+ - "Adjust the phase goal" (success criteria may be under-specified)
153
+
154
+ ### 5. Present Final Plan
60
155
 
61
156
  ```bash
62
157
  node ~/.claude/bin/qualia-ui.js divider
63
158
  node ~/.claude/bin/qualia-ui.js ok "Plan ready: {count} tasks across {count} waves"
64
159
  ```
65
160
 
66
- Then, for each wave, print:
67
-
161
+ For each wave:
68
162
  ```bash
69
- node ~/.claude/bin/qualia-ui.js wave {wave_num} {wave_total} {task_count_in_wave}
163
+ node ~/.claude/bin/qualia-ui.js wave {wave_num} {wave_total} {task_count}
70
164
  node ~/.claude/bin/qualia-ui.js task 1 "{task title}"
71
165
  node ~/.claude/bin/qualia-ui.js task 2 "{task title}"
72
166
  ```
73
167
 
74
- End with an approval prompt (plain text, no UI helper): *"Approve? (yes / adjust)"*
168
+ End with plain text: *"Approve? (yes / adjust)"*
75
169
 
76
- If "adjust" — get feedback, re-spawn planner with revision context.
170
+ If "adjust" — get feedback, re-spawn planner with revision context, re-validate.
77
171
 
78
- ### 4. Update State
172
+ ### 6. Update State
79
173
 
80
174
  ```bash
81
175
  node ~/.claude/bin/state.js transition --to planned --phase {N}
82
176
  ```
83
- If state.js returns an error, show it to the employee and stop.
84
- Do NOT manually edit STATE.md or tracking.json — state.js handles both.
177
+
178
+ If state.js returns an error, show it and stop. Do NOT manually edit STATE.md or tracking.json.
179
+
180
+ ### 7. Route
85
181
 
86
182
  ```bash
87
183
  node ~/.claude/bin/qualia-ui.js end "PHASE {N} PLANNED" "/qualia-build {N}"
88
184
  ```
89
185
 
90
- ### Gap Closure Mode (`--gaps`)
186
+ ## Gap Closure Mode (`--gaps`)
91
187
 
92
188
  When invoked as `/qualia-plan {N} --gaps`, the planner is in gap-closure mode:
93
189
 
94
190
  1. Read `.planning/phase-{N}-verification.md` — extract ONLY the FAIL items
95
191
  2. For each FAIL item, create a targeted fix task:
96
- - **Files:** The specific files that failed verification
97
- - **Action:** The specific fix needed (not "fix auth" — "add session persistence check in `src/lib/auth.ts` signIn function")
98
- - **Done when:** The exact verification criterion that previously failed, restated
192
+ - **Files:** specific files that failed verification
193
+ - **Action:** specific fix (not "fix auth" — "add session persistence check in src/lib/auth.ts signIn function")
194
+ - **Done when:** the exact verification criterion that previously failed, restated
99
195
  3. Do NOT re-plan passing items. Do NOT add new features. Gap plans are surgical.
100
196
  4. Write to `.planning/phase-{N}-gaps-plan.md` (separate from original plan)
101
197
  5. All gap tasks are Wave 1 (parallel) unless they share files
198
+ 6. Plan-checker still validates the gap plan — same 7 rules apply
199
+
200
+ ## Rules
201
+
202
+ 1. **Plan-checker is mandatory by default.** Only skip with `--skip-check`, and only if you know what you're doing.
203
+ 2. **Max 3 revision cycles.** After 3 failed checks, escalate — the phase scope is probably wrong.
204
+ 3. **Honor locked decisions.** If phase-{N}-context.md exists, its locked decisions are non-negotiable.
205
+ 4. **One plan file per phase.** Don't create phase-1-plan.md AND phase-1-plan-v2.md. Edit in place.
206
+ 5. **Revision is surgical.** When revising, only fix what the checker flagged — no scope creep.
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: qualia-research
3
+ description: "Deep-research a niche domain or library BEFORE planning a specific phase. Spawns the researcher agent with Context7/WebFetch access. Writes to .planning/phase-{N}-research.md."
4
+ ---
5
+
6
+ # /qualia-research — Per-Phase Deep Research
7
+
8
+ Runs targeted research on a domain, library, or integration that a specific phase depends on. Distinct from `/qualia-new` research (which covers 4 dimensions project-wide) — this one is narrow and phase-scoped.
9
+
10
+ ## When to Use
11
+
12
+ - A phase touches a library you've never used
13
+ - A phase integrates with a niche API (FHIR, legal forms, payment gateways)
14
+ - SUMMARY.md marked this phase as a "Research flag"
15
+ - You're about to plan and realize you don't know the current best practice
16
+
17
+ ## Usage
18
+
19
+ `/qualia-research {N}` — research the current phase or phase N
20
+
21
+ ## Process
22
+
23
+ ### 1. Determine Phase
24
+
25
+ ```bash
26
+ node ~/.claude/bin/state.js check 2>/dev/null
27
+ ```
28
+
29
+ Use phase N from args, or current phase from STATE.md.
30
+
31
+ ### 2. Load Context
32
+
33
+ ```bash
34
+ cat .planning/PROJECT.md 2>/dev/null
35
+ cat .planning/ROADMAP.md 2>/dev/null
36
+ cat .planning/phase-{N}-context.md 2>/dev/null # if /qualia-discuss was run first
37
+ ```
38
+
39
+ Identify what this phase needs to know.
40
+
41
+ ### 3. Ask the User What to Research
42
+
43
+ Inline free text:
44
+
45
+ **"I'm about to research Phase {N}: {phase name}. What specifically do you want me to dig into? Library, domain, integration, pattern?"**
46
+
47
+ Wait for their answer. Their answer defines the research question.
48
+
49
+ ### 4. Spawn the Researcher
50
+
51
+ ```
52
+ Agent(prompt="
53
+ Read your role: @~/.claude/agents/researcher.md
54
+
55
+ <dimension>phase-specific</dimension>
56
+
57
+ <question>
58
+ {user's research question}
59
+ </question>
60
+
61
+ <phase_context>
62
+ Phase: {N}
63
+ Goal: {phase goal from ROADMAP.md}
64
+ Requirements: {REQ-IDs covered by this phase}
65
+ </phase_context>
66
+
67
+ <project_context>
68
+ {PROJECT.md summary}
69
+ </project_context>
70
+
71
+ <output_path>
72
+ .planning/phase-{N}-research.md
73
+ </output_path>
74
+
75
+ Research using Context7 first, then WebFetch, then WebSearch. Be specific and concrete.
76
+ Include: recommendation, rationale, version numbers (if applicable), code examples,
77
+ alternatives considered, what to avoid, sources.
78
+ ", subagent_type="qualia-researcher", description="Phase {N} research")
79
+ ```
80
+
81
+ ### 5. Review Output
82
+
83
+ Read `.planning/phase-{N}-research.md`. Present the key findings:
84
+
85
+ ```bash
86
+ node ~/.claude/bin/qualia-ui.js divider
87
+ node ~/.claude/bin/qualia-ui.js ok "Research complete"
88
+ ```
89
+
90
+ Show:
91
+ - Recommendation
92
+ - Confidence
93
+ - Top 3 key findings
94
+ - Sources used
95
+
96
+ ### 6. User Confirms or Asks More
97
+
98
+ - header: "Enough?"
99
+ - question: "Is this enough research, or should I dig deeper?"
100
+ - options:
101
+ - "Enough" — Move to planning
102
+ - "Dig deeper" — I have more questions
103
+
104
+ If "Dig deeper" — ask what they want, re-spawn the researcher with additional questions.
105
+
106
+ ### 7. Commit
107
+
108
+ ```bash
109
+ git add .planning/phase-{N}-research.md
110
+ git commit -m "docs(phase-{N}): research findings"
111
+ ```
112
+
113
+ ### 8. Route
114
+
115
+ ```bash
116
+ node ~/.claude/bin/qualia-ui.js end "PHASE {N} RESEARCH DONE" "/qualia-plan {N}"
117
+ ```
118
+
119
+ ## Rules
120
+
121
+ 1. **One research session per run.** Don't try to research phases 1 through 5 in one call.
122
+ 2. **Must produce a file.** The research is worthless if it only lives in conversation context.
123
+ 3. **Honor locked decisions from phase-{N}-context.md.** Don't research alternatives to something already locked.
124
+ 4. **Context7 first.** Always try Context7 MCP before WebFetch — it's fastest and most current for known libraries.
@@ -0,0 +1,48 @@
1
+ ---
2
+ phase: {N}
3
+ captured: {date}
4
+ ---
5
+
6
+ # Phase {N} Context: {Phase Name}
7
+
8
+ Captured during `/qualia-discuss {N}` — decisions, trade-offs, and constraints that must inform planning.
9
+
10
+ ## Goal Restatement
11
+
12
+ {What this phase must achieve, in one sentence}
13
+
14
+ ## Locked Decisions
15
+
16
+ Non-negotiable choices. Planner must honor these exactly.
17
+
18
+ | Decision | Rationale | Source |
19
+ |----------|-----------|--------|
20
+ | {e.g., "Use Supabase RLS for authorization, not middleware"} | {e.g., "Client compliance requires database-level checks"} | {who/when} |
21
+
22
+ ## Discretion (Planner Chooses)
23
+
24
+ Things the planner can decide based on research and best practice.
25
+
26
+ - {area where planner has freedom}
27
+ - {area where planner has freedom}
28
+
29
+ ## Deferred Ideas
30
+
31
+ Good ideas that are NOT in this phase. Captured so they don't get lost.
32
+
33
+ - {deferred idea} — defer to {Phase N+1 / v2 / out of scope}
34
+
35
+ ## Risk Flags
36
+
37
+ Things to watch out for during planning and building.
38
+
39
+ - **{risk}** — {mitigation approach}
40
+
41
+ ## Questions Pending Answer
42
+
43
+ Things we haven't decided yet. Must be resolved before `/qualia-plan {N}`.
44
+
45
+ - [ ] {open question}
46
+
47
+ ---
48
+ *Read by `/qualia-plan {N}` as locked planner input*
@@ -0,0 +1,55 @@
1
+ # Project Template: AI Agent / Chatbot
2
+
3
+ Typical phase structure for a chatbot, AI assistant, tool-calling agent, or RAG system.
4
+
5
+ **Default depth:** `standard` (5-8 phases)
6
+ **Typical stack:** Next.js 16 + Supabase + OpenRouter (or direct provider) + Vercel AI SDK
7
+
8
+ ## Typical Phases
9
+
10
+ ### Phase 1: Foundation
11
+
12
+ **Goal:** Project skeleton with Supabase wired, OpenRouter API configured, base chat page rendering.
13
+
14
+ **Typical success criteria:**
15
+ 1. Site loads on Vercel preview URL
16
+ 2. Chat page renders with input box
17
+ 3. Environment variables configured (`OPENROUTER_API_KEY`)
18
+
19
+ ### Phase 2: Core Agent Logic
20
+
21
+ **Goal:** Agent responds to messages with streaming.
22
+
23
+ **Requirements covered:** System prompt, chat completion, streaming response, message history display.
24
+
25
+ ### Phase 3: Tool Calling (if needed)
26
+
27
+ **Goal:** Agent can invoke tools (search, database, APIs) and return results.
28
+
29
+ **Requirements covered:** Tool definitions, tool execution, multi-step agent loop.
30
+
31
+ ### Phase 4: Memory & Persistence
32
+
33
+ **Goal:** Conversations persist across sessions, user can see history.
34
+
35
+ **Requirements covered:** Database schema for conversations, load/save, conversation list.
36
+
37
+ ### Phase 5: Polish & Guardrails
38
+
39
+ **Goal:** Rate limiting, error handling, content moderation, cost tracking.
40
+
41
+ **Requirements covered:** Rate limits per user, graceful errors, abuse prevention, usage analytics.
42
+
43
+ ## Common Requirements Categories
44
+
45
+ - **AGENT** — core agent logic and prompting
46
+ - **TOOL** — tool calling and integrations
47
+ - **CONV** — conversations and history
48
+ - **RATE** — rate limiting and abuse prevention
49
+ - **AUTH** — authentication
50
+
51
+ ## Research Flags
52
+
53
+ - **Domain-specific prompting** (legal, medical, financial advice) → run `/qualia-research` for the prompt engineering phase
54
+ - **RAG over specific datasets** (vector DB, chunking strategy) → `/qualia-discuss` before planning
55
+ - **Multi-step agent orchestration** → `/qualia-discuss` to lock tool boundaries before planning
@@ -0,0 +1,56 @@
1
+ # Project Template: Mobile App
2
+
3
+ Typical phase structure for a React Native / Expo app, iOS + Android.
4
+
5
+ **Default depth:** `standard` (5-8 phases)
6
+ **Typical stack:** Expo SDK + React Native + TypeScript + Supabase + Expo Application Services (EAS)
7
+
8
+ ## Typical Phases
9
+
10
+ ### Phase 1: Foundation
11
+
12
+ **Goal:** Expo project scaffolded, Supabase wired, auth flow working on both iOS and Android simulators.
13
+
14
+ **Typical success criteria:**
15
+ 1. App runs in Expo Go on iOS simulator
16
+ 2. App runs in Expo Go on Android emulator
17
+ 3. User can sign up + log in
18
+ 4. Session persists across app restart
19
+
20
+ ### Phase 2: Navigation & Core Screens
21
+
22
+ **Goal:** Main screens exist with navigation (Expo Router), each renders its placeholder state.
23
+
24
+ **Requirements covered:** Home, Profile, Settings, main feature screen.
25
+
26
+ ### Phase 3: Core Feature
27
+
28
+ **Goal:** The primary user capability works end-to-end on mobile.
29
+
30
+ **Requirements covered:** Feature-specific (depends on app — camera, map, list, etc.)
31
+
32
+ ### Phase 4: Native Integrations
33
+
34
+ **Goal:** Native features wired — push notifications, camera, location, secure storage.
35
+
36
+ **Requirements covered:** Push notifications (FCM/APNs), camera/gallery access, location, SecureStore for tokens.
37
+
38
+ ### Phase 5: Build & Submit
39
+
40
+ **Goal:** Production builds for iOS and Android, submitted to stores.
41
+
42
+ **Requirements covered:** EAS build profiles, app icons, splash screens, App Store Connect setup, Google Play Console setup.
43
+
44
+ ## Common Requirements Categories
45
+
46
+ - **AUTH** — authentication
47
+ - **NAV** — navigation and screens
48
+ - **CORE** — core feature
49
+ - **NAT** — native integrations (notifications, camera, location)
50
+ - **BUILD** — EAS build and store submission
51
+
52
+ ## Research Flags
53
+
54
+ - **App Store compliance** (in-app purchases, privacy, age ratings) → `/qualia-discuss` to lock scope
55
+ - **Native module choices** (notifications, maps, camera) → `/qualia-research` per phase
56
+ - **Deep linking and universal links** → `/qualia-discuss` before navigation phase
@@ -0,0 +1,55 @@
1
+ # Project Template: Voice Agent
2
+
3
+ Typical phase structure for a phone agent, VAPI bot, Retell agent, or call handling system.
4
+
5
+ **Default depth:** `standard` (5-8 phases)
6
+ **Typical stack:** Next.js 16 + Supabase + Retell AI / ElevenLabs / VAPI + Telnyx (phone numbers) + Vercel
7
+
8
+ ## Typical Phases
9
+
10
+ ### Phase 1: Foundation
11
+
12
+ **Goal:** Webhook endpoint for voice provider, Supabase wired, base call logging working.
13
+
14
+ **Typical success criteria:**
15
+ 1. Webhook endpoint deployed and reachable
16
+ 2. Supabase schema for `calls`, `transcripts`, `contacts` exists
17
+ 3. Provider credentials configured (`RETELL_API_KEY`, `ELEVENLABS_API_KEY`, `TELNYX_API_KEY`)
18
+
19
+ ### Phase 2: Agent Configuration
20
+
21
+ **Goal:** Voice agent answers calls with correct prompt and voice.
22
+
23
+ **Requirements covered:** Provider agent setup, system prompt, voice selection, greeting.
24
+
25
+ ### Phase 3: Call Flow
26
+
27
+ **Goal:** Agent handles conversation, captures data, transfers when needed.
28
+
29
+ **Requirements covered:** Conversation state, data capture (name, email, appointment), transfer to human.
30
+
31
+ ### Phase 4: Integrations
32
+
33
+ **Goal:** Post-call actions fire — CRM sync, Slack notification, email confirmation.
34
+
35
+ **Requirements covered:** CRM webhook, Slack bot, transactional email.
36
+
37
+ ### Phase 5: Polish & Monitoring
38
+
39
+ **Goal:** Low latency, graceful errors, call quality monitoring, cost tracking.
40
+
41
+ **Requirements covered:** Latency optimization, silent call recovery, cost per call tracking, dashboard.
42
+
43
+ ## Common Requirements Categories
44
+
45
+ - **CALL** — call handling and routing
46
+ - **CONV** — conversation flow
47
+ - **INTG** — external integrations (CRM, Slack, email)
48
+ - **MON** — monitoring and cost tracking
49
+ - **PROV** — voice provider configuration
50
+
51
+ ## Research Flags
52
+
53
+ - **Provider choice** (Retell vs VAPI vs ElevenLabs direct) → `/qualia-research 1` to compare for this specific use case
54
+ - **Telephony setup** (DIDs, porting, SIP) → `/qualia-discuss` to lock decisions before wiring
55
+ - **Prompt engineering for voice** → `/qualia-research` for the agent config phase
@@ -0,0 +1,58 @@
1
+ # Project Template: Website / Web App
2
+
3
+ Typical phase structure for a client website, SaaS landing page, dashboard, or marketing site.
4
+
5
+ **Default depth:** `standard` (5-8 phases)
6
+ **Typical stack:** Next.js 16 + React 19 + TypeScript + Supabase + Vercel
7
+
8
+ ## Typical Phases
9
+
10
+ ### Phase 1: Foundation
11
+
12
+ **Goal:** Project skeleton exists on Vercel with Supabase wired, auth working, and base layout rendering.
13
+
14
+ **Requirements covered:** Auth (sign up / log in / log out / session persistence), base layout, deploy pipeline.
15
+
16
+ **Typical success criteria:**
17
+ 1. Site loads on Vercel preview URL
18
+ 2. User can sign up with email + password
19
+ 3. User can log in and stay logged in across refresh
20
+ 4. Base layout renders with nav + footer
21
+
22
+ ### Phase 2: Core Feature (primary)
23
+
24
+ **Goal:** The main value-delivering feature works end-to-end.
25
+
26
+ **Requirements covered:** Primary user capability (depends on project — posting, booking, searching, etc.)
27
+
28
+ ### Phase 3: Core Feature (secondary)
29
+
30
+ **Goal:** Supporting features that make the primary feature usable.
31
+
32
+ **Requirements covered:** Profile, settings, admin panel, etc.
33
+
34
+ ### Phase 4: Content & Marketing
35
+
36
+ **Goal:** Marketing pages, copy, images, SEO meta tags.
37
+
38
+ **Requirements covered:** Homepage hero, features section, pricing, about, contact.
39
+
40
+ ### Phase 5: Polish & Launch
41
+
42
+ **Goal:** Site is production-ready.
43
+
44
+ **Requirements covered:** Responsive (mobile / tablet / desktop), animations, error states, empty states, a11y, SEO, analytics.
45
+
46
+ ## Common Requirements Categories
47
+
48
+ - **AUTH** — authentication and sessions
49
+ - **PROF** — user profiles
50
+ - **CONT** — content / primary feature
51
+ - **ADMIN** — admin panel
52
+ - **MARK** — marketing pages
53
+ - **SEO** — SEO, sitemaps, analytics
54
+
55
+ ## Research Flags
56
+
57
+ - **Niche domain integrations** (e.g., legal compliance, medical records, financial regulations) → run `/qualia-research N` before planning that phase
58
+ - **Complex auth** (SSO, multi-tenant, RBAC) → run `/qualia-discuss N` first