qualia-framework 2.2.0 → 2.4.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 (30) hide show
  1. package/framework/hooks/confirm-delete.sh +2 -2
  2. package/framework/hooks/migration-validate.sh +2 -2
  3. package/framework/hooks/pre-commit.sh +4 -4
  4. package/framework/hooks/pre-deploy-gate.sh +6 -21
  5. package/framework/hooks/session-context-loader.sh +1 -1
  6. package/framework/install.sh +9 -4
  7. package/framework/qualia-engine/VERSION +1 -1
  8. package/framework/qualia-engine/templates/projects/ai-agent.md +1 -1
  9. package/framework/qualia-engine/templates/projects/voice-agent.md +4 -4
  10. package/framework/qualia-engine/templates/roadmap.md +10 -0
  11. package/framework/qualia-engine/templates/state.md +3 -0
  12. package/framework/qualia-engine/workflows/new-project.md +22 -21
  13. package/framework/skills/client-handoff/SKILL.md +125 -0
  14. package/framework/skills/collab-onboard/SKILL.md +111 -0
  15. package/framework/skills/docs-lookup/SKILL.md +4 -3
  16. package/framework/skills/learn/SKILL.md +1 -1
  17. package/framework/skills/mobile-expo/SKILL.md +117 -4
  18. package/framework/skills/openrouter-agent/SKILL.md +922 -0
  19. package/framework/skills/qualia/SKILL.md +11 -5
  20. package/framework/skills/qualia-audit-milestone/SKILL.md +5 -2
  21. package/framework/skills/qualia-complete-milestone/SKILL.md +9 -5
  22. package/framework/skills/qualia-execute-phase/SKILL.md +5 -2
  23. package/framework/skills/qualia-help/SKILL.md +96 -62
  24. package/framework/skills/qualia-new-project/SKILL.md +184 -62
  25. package/framework/skills/qualia-plan-phase/SKILL.md +5 -2
  26. package/framework/skills/qualia-verify-work/SKILL.md +14 -4
  27. package/framework/skills/qualia-workflow/SKILL.md +5 -5
  28. package/framework/skills/ship/SKILL.md +32 -6
  29. package/framework/skills/voice-agent/SKILL.md +1174 -269
  30. package/package.json +1 -1
@@ -20,8 +20,8 @@ block() {
20
20
  cat <<EOJSON
21
21
  {
22
22
  "continue": false,
23
- "stopReason": "◆ DESTRUCTIVE GUARD: $1",
24
- "systemMessage": "◆ BLOCKED: $1. Find a safer alternative. Explain to the user what was blocked and what safer approach you're using instead."
23
+ "stopReason": "◆ BLOCKED: That would $1 — finding a safer way",
24
+ "systemMessage": "◆ BLOCKED: $1. This could cause damage. Find a safer alternative and explain to the user what was blocked and what safer approach you're using instead."
25
25
  }
26
26
  EOJSON
27
27
  exit 2
@@ -32,7 +32,7 @@ check_sql_file() {
32
32
  issues=$((issues + 1))
33
33
  fi
34
34
  if grep -iE '\bCREATE\s+TABLE\b' "$file" > /dev/null 2>&1 && ! grep -iE '\bENABLE\s+ROW\s+LEVEL\s+SECURITY\b' "$file" > /dev/null 2>&1; then
35
- q_warn "New table without RLS in ${file}"
35
+ q_warn "New table needs security rules (RLS) in ${file} — tell Claude: 'add RLS policies to the new table'"
36
36
  issues=$((issues + 1))
37
37
  fi
38
38
  return $issues
@@ -61,7 +61,7 @@ fi
61
61
 
62
62
  # Warn but don't block — surface via systemMessage
63
63
  if $TRIGGERED && [ "$TOTAL" -gt 0 ]; then
64
- printf '{"continue":true,"systemMessage":"◆ MIGRATION CHECK: %d issue(s) found — review carefully"}' "$TOTAL"
64
+ printf '{"continue":true,"systemMessage":"◆ MIGRATION CHECK: %d issue(s) found — tell Claude to review and fix the migration warnings before proceeding."}' "$TOTAL"
65
65
  elif $TRIGGERED; then
66
66
  printf '{"continue":true,"systemMessage":"◆ MIGRATION CHECK: clean"}'
67
67
  fi
@@ -28,7 +28,7 @@ SECRETS_PATTERN="(api[_-]?key|apikey|secret[_-]?key|password|passwd|pwd|token|au
28
28
  for file in $STAGED_FILES; do
29
29
  if [ -f "$file" ] && grep -iE "$SECRETS_PATTERN" "$file" > /dev/null 2>&1; then
30
30
  q_fail "Secret in ${file}"
31
- FAIL_DETAILS="${FAIL_DETAILS}Potential secret in ${file}. "
31
+ FAIL_DETAILS="${FAIL_DETAILS}A password or API key was found in ${file} — tell Claude: 'remove the secret and use an environment variable instead.' "
32
32
  BLOCKED=true
33
33
  fi
34
34
  done
@@ -37,7 +37,7 @@ done
37
37
  ENV_FILES=$(echo "$STAGED_FILES" | grep -E '\.env($|\.)' | grep -v '.example' | grep -v '.sample' || true)
38
38
  if [ -n "$ENV_FILES" ]; then
39
39
  q_fail ".env file staged: ${ENV_FILES}"
40
- FAIL_DETAILS="${FAIL_DETAILS}.env file staged for commit. "
40
+ FAIL_DETAILS="${FAIL_DETAILS}.env file contains secrets and shouldn't be committed — tell Claude: 'unstage the .env file.' "
41
41
  BLOCKED=true
42
42
  fi
43
43
 
@@ -70,7 +70,7 @@ if [ -f "tsconfig.json" ]; then
70
70
  touch "$TSC_STAMP"
71
71
  else
72
72
  q_fail "TypeScript errors"
73
- FAIL_DETAILS="${FAIL_DETAILS}TypeScript errors. Run npx tsc --noEmit. "
73
+ FAIL_DETAILS="${FAIL_DETAILS}Code errors found — tell Claude: 'fix the TypeScript errors and try committing again.' "
74
74
  BLOCKED=true
75
75
  fi
76
76
  fi
@@ -82,7 +82,7 @@ if $BLOCKED; then
82
82
  {
83
83
  "continue": false,
84
84
  "stopReason": "◆ Pre-commit: blocked",
85
- "systemMessage": "◆ PRE-COMMIT BLOCKED: ${FAIL_DETAILS}Fix issues, stage corrected files, and retry."
85
+ "systemMessage": "◆ PRE-COMMIT BLOCKED: ${FAIL_DETAILS}Tell Claude to fix these issues and try committing again."
86
86
  }
87
87
  EOJSON
88
88
  exit 2
@@ -18,6 +18,7 @@ if ! echo "$COMMAND" | grep -qE 'vercel\s+.*--prod|vercel\s+--prod'; then
18
18
  exit 0
19
19
  fi
20
20
 
21
+
21
22
  # Skip if gate was passed recently (within 5 minutes)
22
23
  STAMP="/tmp/.deploy-gate-$(echo "$PWD" | md5sum | cut -c1-8)"
23
24
  if [ -f "$STAMP" ]; then
@@ -39,7 +40,7 @@ if [ -f "tsconfig.json" ]; then
39
40
  q_pass "TypeScript"
40
41
  else
41
42
  q_fail "TypeScript errors"
42
- FAIL_DETAILS="${FAIL_DETAILS}TypeScript errors found. Run npx tsc --noEmit to see details. "
43
+ FAIL_DETAILS="${FAIL_DETAILS}Code errors found tell Claude: 'fix the TypeScript errors' before deploying. "
43
44
  FAILURES=$((FAILURES + 1))
44
45
  fi
45
46
  else
@@ -52,7 +53,7 @@ if [ -f ".eslintrc.json" ] || [ -f ".eslintrc.js" ] || [ -f "eslint.config.js" ]
52
53
  q_pass "Lint"
53
54
  else
54
55
  q_fail "Lint errors"
55
- FAIL_DETAILS="${FAIL_DETAILS}ESLint errors found. Run npx eslint . to see details. "
56
+ FAIL_DETAILS="${FAIL_DETAILS}Code quality issues found tell Claude: 'fix the lint errors' before deploying. "
56
57
  FAILURES=$((FAILURES + 1))
57
58
  fi
58
59
  else
@@ -67,7 +68,7 @@ if [ -f "package.json" ]; then
67
68
  q_pass "Tests"
68
69
  else
69
70
  q_fail "Tests failed"
70
- FAIL_DETAILS="${FAIL_DETAILS}Tests failed. Run npm test to see details. "
71
+ FAIL_DETAILS="${FAIL_DETAILS}Tests are failing tell Claude: 'fix the failing tests' before deploying. "
71
72
  FAILURES=$((FAILURES + 1))
72
73
  fi
73
74
  else
@@ -75,23 +76,7 @@ if [ -f "package.json" ]; then
75
76
  fi
76
77
  fi
77
78
 
78
- # ─── Check 4: Build ───
79
- if [ -f "package.json" ]; then
80
- BUILD_SCRIPT=$(node -e "try{console.log(require('./package.json').scripts?.build||'')}catch(e){console.log('')}" 2>/dev/null)
81
- if [ -n "$BUILD_SCRIPT" ]; then
82
- if npm run build 2>/tmp/build-gate.txt 1>/dev/null; then
83
- q_pass "Build"
84
- else
85
- q_fail "Build failed"
86
- FAIL_DETAILS="${FAIL_DETAILS}Build failed. Run npm run build to see errors. "
87
- FAILURES=$((FAILURES + 1))
88
- fi
89
- else
90
- q_skip "Build"
91
- fi
92
- fi
93
-
94
- # ─── Check 5: Environment ───
79
+ # ─── Check 4: Environment ───
95
80
  if [ -f ".env.example" ] && [ ! -f ".env.local" ] && [ ! -f ".env" ]; then
96
81
  q_warn "Missing .env.local"
97
82
  WARNINGS=$((WARNINGS + 1))
@@ -132,7 +117,7 @@ if [ "$FAILURES" -gt 0 ]; then
132
117
  {
133
118
  "continue": false,
134
119
  "stopReason": "◆ Deploy gate: ${FAILURES} check(s) failed",
135
- "systemMessage": "◆ DEPLOY BLOCKED: ${FAILURES} check(s) failed. ${FAIL_DETAILS}Fix and retry vercel --prod."
120
+ "systemMessage": "◆ DEPLOY BLOCKED: ${FAILURES} check(s) failed. ${FAIL_DETAILS}Fix issues and retry with /ship."
136
121
  }
137
122
  EOJSON
138
123
  exit 2
@@ -56,7 +56,7 @@ fi
56
56
 
57
57
  # Check settings.json valid
58
58
  if [ -f "$HOME/.claude/settings.json" ]; then
59
- node -e "JSON.parse(require('fs').readFileSync('$HOME/.claude/settings.json','utf8'))" 2>/dev/null
59
+ node -e "JSON.parse(require('fs').readFileSync(require('path').join(require('os').homedir(),'.claude','settings.json'),'utf8'))" 2>/dev/null
60
60
  if [ $? -ne 0 ]; then
61
61
  ISSUES="${ISSUES}settings.json invalid. "
62
62
  fi
@@ -150,14 +150,13 @@ elif [ ! -f "$CLAUDE_DIR/CLAUDE.md" ]; then
150
150
  ## Identity
151
151
  **$ROLE_NAME** — Developer at Qualia Solutions.
152
152
 
153
- - Stack: Next.js 16+, React 19, TypeScript, Supabase, Vercel, VAPI, ElevenLabs, Telnyx, Retell AI, OpenRouter
153
+ - Stack: Next.js 16+, React 19, TypeScript, Supabase, Vercel, Retell AI, ElevenLabs, Telnyx, OpenRouter
154
154
 
155
155
  ## Role: DEVELOPER
156
156
 
157
157
  You are a developer at Qualia Solutions, working under Fawzi Goussous (founder).
158
158
  - Work on feature branches only — never push to main/master
159
- - Submit PRs for review before merging
160
- - Do NOT deploy to production — Fawzi handles deploys
159
+ - Use \`/ship\` to deploy it runs quality gates, auto-creates feature branches, and deploys
161
160
  - Cannot modify the Qualia framework (CLAUDE.md, skills, hooks)
162
161
  - Ask Fawzi when unsure about architecture decisions
163
162
 
@@ -169,10 +168,16 @@ You are a developer at Qualia Solutions, working under Fawzi Goussous (founder).
169
168
  - See \`rules/security.md\` for auth, RLS, Zod, secrets rules
170
169
  - See \`rules/frontend.md\` for design standards
171
170
 
171
+ ## Getting Started
172
+ - Run \`/collab-onboard\` when joining a new project — it explains what's built and how to contribute
173
+ - Onboarding guide: ~/Projects/qualia-erp/docs/trainee-onboarding.md
174
+
172
175
  ## Workflow
173
176
  - **MANDATORY FIRST ACTION**: On every session start, invoke the \`qualia-start\` skill before doing anything else.
174
- - Run \`/qualia-review\` before deploying anything
177
+ - Run \`/qualia-review\` before deploying
175
178
  - Run \`/browser-qa\` after frontend changes
179
+ - Run \`/pr\` to submit work for review — never push to main directly
180
+ - Run \`/qualia-idk\` if stuck — it suggests next steps and can escalate to Fawzi
176
181
  - Ask for help if stuck — don't guess
177
182
 
178
183
  ## Qualia Mode (always active)
@@ -1 +1 @@
1
- 1.14.0
1
+ 2.4.0
@@ -74,7 +74,7 @@
74
74
 
75
75
  ### Phase 4: Admin Panel
76
76
  **Goal:** Admin interface for managing the AI agent: prompts, users, analytics
77
- **Skills:** [@admin-panel, @supabase]
77
+ **Skills:** [@supabase, @frontend-master]
78
78
  **Tasks:**
79
79
  - Admin auth (role-based, separate from user auth)
80
80
  - System prompt editor (CRUD, version history)
@@ -1,8 +1,8 @@
1
1
  # Project Template: Voice Agent
2
2
 
3
- > Voice AI agent with Supabase Edge Functions, VAPI/Retell AI, and ElevenLabs.
3
+ > Voice AI agent with Supabase Edge Functions, Retell AI, and ElevenLabs.
4
4
 
5
- **Stack:** Supabase Edge Functions (Deno), VAPI / Retell AI, ElevenLabs, TypeScript
5
+ **Stack:** Supabase Edge Functions (Deno), Retell AI, ElevenLabs, TypeScript
6
6
  **Phases:** 6
7
7
  **Type:** voice-agent
8
8
 
@@ -14,7 +14,7 @@
14
14
  **Tasks:**
15
15
  - Design Supabase schema: calls, call_events, contacts, tools, system_config
16
16
  - Create edge function scaffold (Deno, cors headers, error handling)
17
- - Configure voice provider (VAPI or Retell AI): API keys, assistant creation
17
+ - Configure Retell AI: API keys, agent creation, ElevenLabs voice selection
18
18
  - Environment variables in Supabase (voice provider keys, webhook secret)
19
19
  - Basic webhook endpoint that receives and logs call events
20
20
  - RLS policies on all tables
@@ -32,7 +32,7 @@
32
32
  **Skills:** [@voice-agent]
33
33
  **Tasks:**
34
34
  - Design conversation flow (state machine: greeting → discovery → action → closing)
35
- - Create VAPI/Retell assistant configuration (system prompt, voice, language)
35
+ - Create Retell AI agent configuration (system prompt, voice, language)
36
36
  - Define conversation states and transitions
37
37
  - Slot filling logic (extract key info from conversation)
38
38
  - Multi-language support (if applicable — e.g., Greek/English/Russian)
@@ -113,6 +113,16 @@ 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:**
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.
125
+
116
126
  **Success criteria:**
117
127
  - 2-5 observable behaviors per phase (from user's perspective)
118
128
  - Cross-checked against requirements during roadmap creation
@@ -21,6 +21,7 @@ See: .planning/PROJECT.md (updated [date])
21
21
  Phase: [X] of [Y] ([Phase name])
22
22
  Plan: [A] of [B] in current phase
23
23
  Status: [Ready to plan / Planning / Ready to execute / In progress / Phase complete]
24
+ Assigned to: [employee name or "unassigned"]
24
25
  Last activity: [YYYY-MM-DD] — [What happened]
25
26
 
26
27
  Progress: [░░░░░░░░░░] 0%
@@ -69,6 +70,7 @@ None yet.
69
70
  ## Session Continuity
70
71
 
71
72
  Last session: [YYYY-MM-DD HH:MM]
73
+ Last worked by: [employee name]
72
74
  Stopped at: [Description of last completed action]
73
75
  Resume file: [Path to .continue-here*.md if exists, otherwise "None"]
74
76
  ```
@@ -127,6 +129,7 @@ Where we are right now:
127
129
  - Phase X of Y — which phase
128
130
  - Plan A of B — which plan within phase
129
131
  - Status — current state
132
+ - Assigned to — which employee is working on this phase
130
133
  - Last activity — what happened most recently
131
134
  - Progress bar — visual indicator of overall completion
132
135
 
@@ -13,7 +13,7 @@ Read all files referenced by the invoking prompt's execution_context before star
13
13
  **MANDATORY FIRST STEP — Execute these checks before ANY user interaction:**
14
14
 
15
15
  ```bash
16
- INIT=$(node /home/qualia/.claude/qualia-engine/bin/qualia-tools.js init new-project)
16
+ INIT=$(node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js init new-project)
17
17
  ```
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`.
@@ -137,7 +137,7 @@ Use AskUserQuestion:
137
137
  - "Skip template" — Build roadmap from scratch through full questioning
138
138
 
139
139
  **If "Use template":**
140
- 1. Read the template: `~/.claude/qualia-engine/templates/projects/{type}.md`
140
+ 1. Read the template: `~/.claude/qualia-framework/templates/projects/{type}.md`
141
141
  2. Store template choice in memory for Step 8 (roadmap creation)
142
142
  3. Set `template_type` = detected type
143
143
  4. Set `template_phases` = phases from template file
@@ -225,7 +225,7 @@ Do not compress. Capture everything gathered.
225
225
 
226
226
  ```bash
227
227
  mkdir -p .planning
228
- node /home/qualia/.claude/qualia-engine/bin/qualia-tools.js commit "docs: initialize project" --files .planning/PROJECT.md
228
+ node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "docs: initialize project" --files .planning/PROJECT.md
229
229
  ```
230
230
 
231
231
  ## 5. Workflow Preferences
@@ -342,7 +342,7 @@ Create `.planning/config.json` with all settings:
342
342
  **Commit config.json:**
343
343
 
344
344
  ```bash
345
- node /home/qualia/.claude/qualia-engine/bin/qualia-tools.js commit "chore: add project config" --files .planning/config.json
345
+ node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "chore: add project config" --files .planning/config.json
346
346
  ```
347
347
 
348
348
  **Note:** Run `/qualia:settings` anytime to update these preferences.
@@ -430,7 +430,7 @@ Your STACK.md feeds into roadmap creation. Be prescriptive:
430
430
 
431
431
  <output>
432
432
  Write to: .planning/research/STACK.md
433
- Use template: /home/qualia/.claude/qualia-engine/templates/research-project/STACK.md
433
+ Use template: /home/qualia/.claude/qualia-framework/templates/research-project/STACK.md
434
434
  </output>
435
435
  ", subagent_type="general-purpose", model="{researcher_model}", description="Stack research")
436
436
 
@@ -470,7 +470,7 @@ Your FEATURES.md feeds into requirements definition. Categorize clearly:
470
470
 
471
471
  <output>
472
472
  Write to: .planning/research/FEATURES.md
473
- Use template: /home/qualia/.claude/qualia-engine/templates/research-project/FEATURES.md
473
+ Use template: /home/qualia/.claude/qualia-framework/templates/research-project/FEATURES.md
474
474
  </output>
475
475
  ", subagent_type="general-purpose", model="{researcher_model}", description="Features research")
476
476
 
@@ -510,7 +510,7 @@ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
510
510
 
511
511
  <output>
512
512
  Write to: .planning/research/ARCHITECTURE.md
513
- Use template: /home/qualia/.claude/qualia-engine/templates/research-project/ARCHITECTURE.md
513
+ Use template: /home/qualia/.claude/qualia-framework/templates/research-project/ARCHITECTURE.md
514
514
  </output>
515
515
  ", subagent_type="general-purpose", model="{researcher_model}", description="Architecture research")
516
516
 
@@ -550,7 +550,7 @@ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
550
550
 
551
551
  <output>
552
552
  Write to: .planning/research/PITFALLS.md
553
- Use template: /home/qualia/.claude/qualia-engine/templates/research-project/PITFALLS.md
553
+ Use template: /home/qualia/.claude/qualia-framework/templates/research-project/PITFALLS.md
554
554
  </output>
555
555
  ", subagent_type="general-purpose", model="{researcher_model}", description="Pitfalls research")
556
556
  ```
@@ -573,7 +573,7 @@ Read these files:
573
573
 
574
574
  <output>
575
575
  Write to: .planning/research/SUMMARY.md
576
- Use template: /home/qualia/.claude/qualia-engine/templates/research-project/SUMMARY.md
576
+ Use template: /home/qualia/.claude/qualia-framework/templates/research-project/SUMMARY.md
577
577
  Commit after writing.
578
578
  </output>
579
579
  ", subagent_type="qualia-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
@@ -729,7 +729,7 @@ If "adjust": Return to scoping.
729
729
  **Commit requirements:**
730
730
 
731
731
  ```bash
732
- node /home/qualia/.claude/qualia-engine/bin/qualia-tools.js commit "docs: define v1 requirements" --files .planning/REQUIREMENTS.md
732
+ node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "docs: define v1 requirements" --files .planning/REQUIREMENTS.md
733
733
  ```
734
734
 
735
735
  ## 8. Create Roadmap
@@ -765,7 +765,7 @@ Task(prompt="
765
765
 
766
766
  <template_context>
767
767
  Template type: {template_type or 'none'}
768
- {If template_type is set, inline the full template file content from ~/.claude/qualia-engine/templates/projects/{template_type}.md}
768
+ {If template_type is set, inline the full template file content from ~/.claude/qualia-framework/templates/projects/{template_type}.md}
769
769
  </template_context>
770
770
 
771
771
  <instructions>
@@ -775,8 +775,13 @@ Create roadmap:
775
775
  3. Map every v1 requirement to exactly one phase
776
776
  4. Derive 2-5 success criteria per phase (observable user behaviors)
777
777
  5. Validate 100% coverage
778
- 6. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
779
- 7. Return ROADMAP CREATED with summary
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."
783
+ 7. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
784
+ 8. Return ROADMAP CREATED with summary
780
785
 
781
786
  Write files first, then return. This ensures artifacts persist even if context is lost.
782
787
  </instructions>
@@ -866,7 +871,7 @@ Use AskUserQuestion:
866
871
  **Commit roadmap (after approval):**
867
872
 
868
873
  ```bash
869
- node /home/qualia/.claude/qualia-engine/bin/qualia-tools.js commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
874
+ node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
870
875
  ```
871
876
 
872
877
  ## 9. Environment Setup
@@ -969,7 +974,7 @@ This runs ONCE per project. All subsequent `/qualia:execute-phase` runs will hav
969
974
 
970
975
  **Commit setup:**
971
976
  ```bash
972
- node /home/qualia/.claude/qualia-engine/bin/qualia-tools.js commit "chore: environment setup" --files .env.local supabase/config.toml
977
+ node /home/qualia/.claude/qualia-framework/bin/qualia-tools.js commit "chore: environment setup" --files .env.local supabase/config.toml
973
978
  ```
974
979
 
975
980
  Ensure `.env.local` is in `.gitignore` (create/append if needed).
@@ -1002,14 +1007,10 @@ Present completion with next steps:
1002
1007
 
1003
1008
  **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
1004
1009
 
1005
- /qualia:discuss-phase 1 — gather context and clarify approach
1006
-
1007
- <sub>/clear first → fresh context window</sub>
1008
-
1009
- ---
1010
+ /qualia-plan-phase 1 — plan the first phase
1010
1011
 
1011
1012
  **Also available:**
1012
- - /qualia:plan-phase 1 — skip discussion, plan directly
1013
+ - /qualia-discuss-phase 1 — discuss approach before planning
1013
1014
 
1014
1015
  ───────────────────────────────────────────────────────────────
1015
1016
  ```
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: client-handoff
3
+ description: "Generate client-facing project deliverables — handoff document, feature summary, credentials guide, known limitations, and maintenance notes. Use this skill whenever the user says 'handoff', 'client handoff', 'wrap up for client', 'project handoff', 'deliver to client', 'client delivery', 'hand over', or wants to prepare a project for client delivery. Also trigger after milestone completion when next step is client-facing."
4
+ tags: [client, handoff, delivery, documentation]
5
+ ---
6
+
7
+ # Client Handoff — Project Delivery Document Generator
8
+
9
+ Generate a polished, client-facing HANDOFF.md when a project is ready for delivery. Output is written for non-technical clients.
10
+
11
+ ## Usage
12
+
13
+ `/client-handoff` — Generate handoff document for the current project
14
+
15
+ ## Process
16
+
17
+ ### Step 1: Load Project Context
18
+
19
+ Read the following files to build a full picture of what was built and for whom:
20
+
21
+ - `.planning/PROJECT.md` — project name, client, deploy target
22
+ - `.planning/ROADMAP.md` — what was built (phases)
23
+ - `.planning/REQUIREMENTS.md` — what was requested
24
+ - `.planning/STATE.md` — milestone status
25
+ - Phase `SUMMARY.md` files — what was actually delivered per phase
26
+ - `CHANGELOG.md` — if exists
27
+ - `package.json` — for project name/URLs
28
+
29
+ Also detect:
30
+ - **Production URL** from Vercel project settings or PROJECT.md
31
+ - **Supabase project ref** (if applicable) — check `.env.local` variable names or PROJECT.md
32
+ - **Auth method** used (email/password, magic link, OAuth, etc.)
33
+
34
+ If any critical file is missing, note it and proceed with what's available. Do NOT block on missing files.
35
+
36
+ ### Step 2: Generate HANDOFF.md at Project Root
37
+
38
+ Write the document using this exact structure. All copy must be **plain language** — no jargon, no technical implementation details. Written for someone who has never seen the codebase.
39
+
40
+ ```markdown
41
+ # {Project Name} — Client Handoff
42
+
43
+ ## Live URL
44
+ {production URL}
45
+
46
+ ## What We Built
47
+ {Plain-language summary of features, NOT technical. Written for the client.}
48
+ - Feature 1: {what it does for the user}
49
+ - Feature 2: {what it does for the user}
50
+ ...
51
+
52
+ ## How to Use
53
+ {Brief walkthrough of the main user flows — written for someone who's never seen the app}
54
+
55
+ ### For admins (if applicable)
56
+ - How to access the admin panel
57
+ - Key admin actions
58
+
59
+ ## Access & Credentials
60
+ | Service | URL | How to Access |
61
+ |---------|-----|---------------|
62
+ | Website | {url} | Public |
63
+ | Admin Panel | {url}/admin | Login with your email |
64
+ | Supabase Dashboard | https://supabase.com/dashboard/project/{ref} | Fawzi manages access |
65
+ | Vercel Dashboard | vercel.com | Fawzi manages access |
66
+ | Domain/DNS | {registrar} | Client manages |
67
+
68
+ > **Note:** API keys and database credentials are managed by Qualia Solutions. Contact us if you need access changes.
69
+
70
+ ## Known Limitations
71
+ {Anything that doesn't work yet, scope that was deferred, or edge cases the client should know about}
72
+
73
+ ## Maintenance & Support
74
+ - **Hosting:** Vercel (auto-deploys from GitHub)
75
+ - **Database:** Supabase (managed Postgres)
76
+ - **Monitoring:** UptimeRobot — {monitoring URL if set up}
77
+ - **Updates:** Contact Qualia Solutions for feature requests or bug fixes
78
+ - **Domain renewal:** {who manages it, when it expires if known}
79
+
80
+ ## Technical Reference (for developers)
81
+ - **Stack:** {e.g. Next.js + React + TypeScript + Supabase + Tailwind}
82
+ - **Repo:** {GitHub URL}
83
+ - **Branch:** main
84
+ - **Deploy:** Push to main auto-deploys to Vercel
85
+ ```
86
+
87
+ Adapt the template to the project:
88
+ - Remove sections that don't apply (e.g. no admin panel = skip that subsection)
89
+ - Add sections if needed (e.g. mobile app = add app store links)
90
+ - Adjust the tech stack line to match what was actually used
91
+ - If no Supabase, remove that row from the credentials table
92
+
93
+ ### Step 3: Confirm with User
94
+
95
+ Display the full generated document and ask:
96
+
97
+ > "Here's the client handoff document. Review it and let me know if anything needs adjusting before I save it."
98
+
99
+ Do NOT write the file until the user confirms. Wait for approval or edits.
100
+
101
+ ### Step 4: Save & Commit
102
+
103
+ After user approval, write `HANDOFF.md` to the project root and commit:
104
+
105
+ ```bash
106
+ git add HANDOFF.md
107
+ git commit -m "docs: add client handoff document"
108
+ ```
109
+
110
+ ### Step 5: Route Next Steps
111
+
112
+ After saving, present options:
113
+
114
+ > "Handoff document saved. Next steps:"
115
+ > - "Share `HANDOFF.md` content with the client (email, PDF, or portal)"
116
+ > - "Run `/qualia-production-check` to verify everything works before handoff"
117
+ > - "Run `/ship` to deploy any final changes first"
118
+
119
+ ## Guidelines
120
+
121
+ - **Tone:** Professional but warm. The client is not a developer.
122
+ - **No secrets:** Never include API keys, service role keys, or database passwords in the document.
123
+ - **No jargon:** Avoid terms like "RLS", "middleware", "SSR", "edge functions" in client-facing sections. The Technical Reference section at the bottom is the only place for developer terminology.
124
+ - **Honest about limitations:** If something was descoped or has known issues, say so clearly. Clients respect transparency.
125
+ - **Keep it short:** The document should be scannable in 2 minutes. If a section needs more detail, link to separate docs rather than bloating the handoff.
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: collab-onboard
3
+ description: "Project-specific onboarding for new collaborators — reads .planning/ and codebase to generate orientation: what's built, patterns used, how to contribute, current state. Use this skill whenever the user says 'onboard me', 'new to this project', 'what's been built', 'orient me', 'project overview', 'get me up to speed', 'collab-onboard', or is clearly a new developer joining an existing project. Also trigger when someone asks 'how does this project work' or 'what should I know about this codebase'."
4
+ tags: [onboarding, project, orientation, developer]
5
+ ---
6
+
7
+ ## Process
8
+
9
+ ### Step 1: Gather Project Context
10
+
11
+ Read all of these (skip if missing):
12
+ ```bash
13
+ cat .planning/PROJECT.md 2>/dev/null || echo "NO_PROJECT"
14
+ cat .planning/ROADMAP.md 2>/dev/null || echo "NO_ROADMAP"
15
+ cat .planning/STATE.md 2>/dev/null || echo "NO_STATE"
16
+ cat .planning/DESIGN.md 2>/dev/null || echo "NO_DESIGN"
17
+ ```
18
+
19
+ ```bash
20
+ # Project structure
21
+ ls -d app/ src/ pages/ components/ lib/ actions/ hooks/ supabase/ types/ public/ 2>/dev/null
22
+ ```
23
+
24
+ ```bash
25
+ # Package info
26
+ node -e "try{const p=require('./package.json');console.log(JSON.stringify({name:p.name,deps:Object.keys(p.dependencies||{}),scripts:Object.keys(p.scripts||{})},null,2))}catch(e){console.log('{}')}" 2>/dev/null
27
+ ```
28
+
29
+ ```bash
30
+ # Git history summary
31
+ git log --oneline -20 2>/dev/null
32
+ git shortlog -s -n --all 2>/dev/null | head -5
33
+ ```
34
+
35
+ ```bash
36
+ # Check for local CLAUDE.md
37
+ cat CLAUDE.md 2>/dev/null || echo "NO_LOCAL_CLAUDE"
38
+ ```
39
+
40
+ ### Step 2: Analyze Codebase
41
+
42
+ Understand:
43
+ - What framework/stack is used
44
+ - Key directories and their purpose
45
+ - Database tables (from supabase/migrations/ or types/)
46
+ - API routes or server actions
47
+ - Auth pattern used
48
+ - Key environment variables needed
49
+
50
+ ### Step 3: Present Orientation
51
+
52
+ Output a structured orientation (NOT saved to file — just presented):
53
+
54
+ ```
55
+ ◆ PROJECT ORIENTATION
56
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
57
+
58
+ Project {name}
59
+ Stack Next.js + Supabase + Vercel
60
+ Status Phase {N}/{total} — {phase name}
61
+
62
+ ── WHAT THIS PROJECT DOES ─────────────────
63
+ {2-3 sentence plain-language summary}
64
+
65
+ ── WHAT'S BEEN BUILT ──────────────────────
66
+ ✓ Phase 1: {name} — {1-line summary}
67
+ ✓ Phase 2: {name} — {1-line summary}
68
+ ◆ Phase 3: {name} — in progress
69
+ · Phase 4: {name} — not started
70
+
71
+ ── KEY DIRECTORIES ────────────────────────
72
+ app/ Pages and routes
73
+ components/ UI components
74
+ lib/ Utilities, Supabase clients
75
+ actions/ Server actions (mutations)
76
+ supabase/ Migrations and edge functions
77
+
78
+ ── PATTERNS TO FOLLOW ─────────────────────
79
+ - Server Components by default, 'use client' only for interactivity
80
+ - Server Actions for all mutations (check auth first)
81
+ - Supabase server client from lib/supabase/server.ts
82
+ - RLS on every table — no exceptions
83
+ - {any project-specific patterns from CLAUDE.md}
84
+
85
+ ── GETTING STARTED ────────────────────────
86
+ 1. npm install
87
+ 2. Copy .env.example to .env.local and fill in values
88
+ 3. supabase start (for local dev) OR use linked project
89
+ 4. npm run dev
90
+ 5. Read .planning/ROADMAP.md for full project plan
91
+
92
+ ── CURRENT WORK ───────────────────────────
93
+ → Phase {N}: {name}
94
+ → Status: {planned/executing/verifying}
95
+ → Next command: /qualia-{action} {N}
96
+
97
+ ── WHO TO ASK ─────────────────────────────
98
+ Architecture decisions → Fawzi
99
+ Framework questions → /qualia-help
100
+ Stuck on anything → /qualia-idk
101
+ ```
102
+
103
+ ### Step 4: Offer Deep Dive
104
+
105
+ > "Want me to explain any specific part in more detail? Options:"
106
+ > - "Walk me through the database schema"
107
+ > - "Explain the auth flow"
108
+ > - "Show me the API/action patterns"
109
+ > - "What's the current phase about?"
110
+
111
+ Keep it practical. This is for a developer who needs to start contributing today, not a documentation exercise.