qualia-framework-v2 2.0.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.
- package/CLAUDE.md +63 -0
- package/README.md +48 -0
- package/agents/builder.md +75 -0
- package/agents/planner.md +102 -0
- package/agents/verifier.md +118 -0
- package/bin/install.js +248 -0
- package/guide.md +63 -0
- package/hooks/block-env-edit.sh +8 -0
- package/hooks/branch-guard.sh +13 -0
- package/hooks/pre-compact.sh +11 -0
- package/hooks/pre-deploy-gate.sh +32 -0
- package/hooks/pre-push.sh +29 -0
- package/hooks/session-start.sh +17 -0
- package/install.sh +223 -0
- package/package.json +40 -0
- package/rules/deployment.md +30 -0
- package/rules/frontend.md +33 -0
- package/rules/security.md +12 -0
- package/skills/qualia/SKILL.md +54 -0
- package/skills/qualia-build/SKILL.md +93 -0
- package/skills/qualia-handoff/SKILL.md +68 -0
- package/skills/qualia-new/SKILL.md +282 -0
- package/skills/qualia-plan/SKILL.md +84 -0
- package/skills/qualia-polish/SKILL.md +57 -0
- package/skills/qualia-quick/SKILL.md +25 -0
- package/skills/qualia-report/SKILL.md +74 -0
- package/skills/qualia-ship/SKILL.md +91 -0
- package/skills/qualia-verify/SKILL.md +79 -0
- package/statusline.sh +93 -0
- package/templates/plan.md +28 -0
- package/templates/project.md +22 -0
- package/templates/state.md +27 -0
- package/templates/tracking.json +19 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qualia-verify
|
|
3
|
+
description: "Goal-backward verification — checks if the phase ACTUALLY works, not just if tasks completed. Spawns verifier agent."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /qualia-verify — Verify a Phase
|
|
7
|
+
|
|
8
|
+
Spawn a verifier agent to check if the phase goal was achieved. Does NOT trust build summaries — greps the actual codebase.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
`/qualia-verify` — verify the current built phase
|
|
12
|
+
`/qualia-verify {N}` — verify specific phase
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
### 1. Load Context
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
echo "---PLAN---"
|
|
20
|
+
cat .planning/phase-{N}-plan.md 2>/dev/null
|
|
21
|
+
echo "---PREVIOUS---"
|
|
22
|
+
cat .planning/phase-{N}-verification.md 2>/dev/null || echo "NONE"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 2. Spawn Verifier (Fresh Context)
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
◆ QUALIA ► VERIFYING Phase {N}
|
|
29
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
30
|
+
Spawning verifier...
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Agent(prompt="
|
|
35
|
+
Read your role: @agents/verifier.md
|
|
36
|
+
|
|
37
|
+
Phase plan with success criteria:
|
|
38
|
+
@.planning/phase-{N}-plan.md
|
|
39
|
+
|
|
40
|
+
{If re-verification: Previous verification with gaps:}
|
|
41
|
+
{@.planning/phase-{N}-verification.md}
|
|
42
|
+
|
|
43
|
+
Verify this phase. Write report to .planning/phase-{N}-verification.md
|
|
44
|
+
", subagent_type="general-purpose", description="Verify phase {N}")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 3. Present Results
|
|
48
|
+
|
|
49
|
+
Read the verification report. Present:
|
|
50
|
+
|
|
51
|
+
**If PASS:**
|
|
52
|
+
```
|
|
53
|
+
◆ QUALIA ► Phase {N} VERIFIED ✓
|
|
54
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
55
|
+
|
|
56
|
+
All {count} criteria passed.
|
|
57
|
+
|
|
58
|
+
→ Run: /qualia-plan {N+1}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**If FAIL:**
|
|
62
|
+
```
|
|
63
|
+
◆ QUALIA ► Phase {N} GAPS FOUND
|
|
64
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
65
|
+
|
|
66
|
+
Passed: {pass_count}
|
|
67
|
+
Failed: {fail_count}
|
|
68
|
+
|
|
69
|
+
Gaps:
|
|
70
|
+
✗ {gap 1 — specific description}
|
|
71
|
+
✗ {gap 2 — specific description}
|
|
72
|
+
|
|
73
|
+
→ Run: /qualia-plan {N} --gaps
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 4. Update State
|
|
77
|
+
|
|
78
|
+
Update STATE.md: verification result
|
|
79
|
+
Update tracking.json: verification → "pass" or "fail"
|
package/statusline.sh
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Qualia status line — teal branded, shows phase + context + git
|
|
3
|
+
input=$(cat)
|
|
4
|
+
|
|
5
|
+
MODEL=$(echo "$input" | jq -r '.model.display_name')
|
|
6
|
+
DIR=$(echo "$input" | jq -r '.workspace.current_dir')
|
|
7
|
+
PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
|
|
8
|
+
COST=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
|
|
9
|
+
DURATION_MS=$(echo "$input" | jq -r '.cost.total_duration_ms // 0')
|
|
10
|
+
AGENT=$(echo "$input" | jq -r '.agent.name // empty')
|
|
11
|
+
WORKTREE=$(echo "$input" | jq -r '.worktree.name // empty')
|
|
12
|
+
|
|
13
|
+
# Teal palette
|
|
14
|
+
T='\033[38;2;0;206;209m' # Primary teal
|
|
15
|
+
TG='\033[38;2;0;170;175m' # Teal glow (darker)
|
|
16
|
+
TD='\033[38;2;0;130;135m' # Teal dim
|
|
17
|
+
W='\033[38;2;220;225;230m' # White
|
|
18
|
+
DIM='\033[38;2;80;90;100m' # Dim gray
|
|
19
|
+
GREEN='\033[38;2;52;211;153m' # Success green
|
|
20
|
+
YELLOW='\033[38;2;234;179;8m' # Warning
|
|
21
|
+
RED='\033[38;2;239;68;68m' # Error
|
|
22
|
+
RESET='\033[0m'
|
|
23
|
+
|
|
24
|
+
# Context bar with teal gradient
|
|
25
|
+
if [ "$PCT" -ge 80 ]; then BAR_COLOR="$RED"
|
|
26
|
+
elif [ "$PCT" -ge 50 ]; then BAR_COLOR="$YELLOW"
|
|
27
|
+
else BAR_COLOR="$T"; fi
|
|
28
|
+
|
|
29
|
+
BAR_WIDTH=10
|
|
30
|
+
FILLED=$((PCT * BAR_WIDTH / 100))
|
|
31
|
+
EMPTY=$((BAR_WIDTH - FILLED))
|
|
32
|
+
BAR=""
|
|
33
|
+
[ "$FILLED" -gt 0 ] && printf -v FILL "%${FILLED}s" && BAR="${FILL// /━}"
|
|
34
|
+
[ "$EMPTY" -gt 0 ] && printf -v PAD "%${EMPTY}s" && BAR="${BAR}${PAD// /╌}"
|
|
35
|
+
|
|
36
|
+
# Git branch (cached for speed)
|
|
37
|
+
CACHE="/tmp/qualia-git-cache"
|
|
38
|
+
if [ ! -f "$CACHE" ] || [ $(($(date +%s) - $(stat -c %Y "$CACHE" 2>/dev/null || echo 0))) -gt 3 ]; then
|
|
39
|
+
BRANCH=""
|
|
40
|
+
CHANGES=0
|
|
41
|
+
if git rev-parse --git-dir > /dev/null 2>&1; then
|
|
42
|
+
BRANCH=$(git branch --show-current 2>/dev/null)
|
|
43
|
+
CHANGES=$(git status --porcelain 2>/dev/null | wc -l | tr -d ' ')
|
|
44
|
+
fi
|
|
45
|
+
echo "$BRANCH|$CHANGES" > "$CACHE"
|
|
46
|
+
fi
|
|
47
|
+
IFS='|' read -r BRANCH CHANGES < "$CACHE"
|
|
48
|
+
|
|
49
|
+
# Qualia phase from tracking.json
|
|
50
|
+
PHASE_INFO=""
|
|
51
|
+
TRACKING=".planning/tracking.json"
|
|
52
|
+
if [ -f "$TRACKING" ]; then
|
|
53
|
+
PHASE=$(jq -r '.phase // 0' "$TRACKING" 2>/dev/null)
|
|
54
|
+
TOTAL=$(jq -r '.total_phases // 0' "$TRACKING" 2>/dev/null)
|
|
55
|
+
STATUS=$(jq -r '.status // ""' "$TRACKING" 2>/dev/null)
|
|
56
|
+
if [ "$TOTAL" -gt 0 ]; then
|
|
57
|
+
# Phase progress mini-bar
|
|
58
|
+
PDONE=$((PHASE * 100 / TOTAL))
|
|
59
|
+
PFILL=$((PDONE / 25))
|
|
60
|
+
PEMPT=$((4 - PFILL))
|
|
61
|
+
PBAR=""
|
|
62
|
+
[ "$PFILL" -gt 0 ] && printf -v PF "%${PFILL}s" && PBAR="${PF// /●}"
|
|
63
|
+
[ "$PEMPT" -gt 0 ] && printf -v PE "%${PEMPT}s" && PBAR="${PBAR}${PE// /○}"
|
|
64
|
+
PHASE_INFO="${T}${PBAR}${RESET} ${W}P${PHASE}/${TOTAL}${RESET} ${TG}${STATUS}${RESET}"
|
|
65
|
+
fi
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
# Duration
|
|
69
|
+
MINS=$((DURATION_MS / 60000))
|
|
70
|
+
SECS=$(((DURATION_MS % 60000) / 1000))
|
|
71
|
+
[ "$MINS" -gt 0 ] && DUR="${MINS}m" || DUR="${SECS}s"
|
|
72
|
+
|
|
73
|
+
# Cost
|
|
74
|
+
COST_FMT=$(printf '$%.2f' "$COST")
|
|
75
|
+
|
|
76
|
+
# Line 1: Project + Git + Phase
|
|
77
|
+
LINE1="${T}◆${RESET} ${W}${DIR##*/}${RESET}"
|
|
78
|
+
if [ -n "$BRANCH" ]; then
|
|
79
|
+
if [ "$CHANGES" -gt 0 ]; then
|
|
80
|
+
LINE1="${LINE1} ${DIM}on${RESET} ${TG}${BRANCH}${RESET} ${YELLOW}~${CHANGES}${RESET}"
|
|
81
|
+
else
|
|
82
|
+
LINE1="${LINE1} ${DIM}on${RESET} ${TG}${BRANCH}${RESET}"
|
|
83
|
+
fi
|
|
84
|
+
fi
|
|
85
|
+
[ -n "$AGENT" ] && LINE1="${LINE1} ${DIM}│${RESET} ${T}⚡${AGENT}${RESET}"
|
|
86
|
+
[ -n "$WORKTREE" ] && LINE1="${LINE1} ${DIM}│${RESET} ${TD}⎇ ${WORKTREE}${RESET}"
|
|
87
|
+
[ -n "$PHASE_INFO" ] && LINE1="${LINE1} ${DIM}│${RESET} ${PHASE_INFO}"
|
|
88
|
+
|
|
89
|
+
# Line 2: Context bar + Cost + Duration + Model
|
|
90
|
+
LINE2="${BAR_COLOR}${BAR}${RESET} ${DIM}${PCT}%${RESET} ${DIM}│${RESET} ${DIM}${COST_FMT}${RESET} ${DIM}│${RESET} ${DIM}${DUR}${RESET} ${DIM}│${RESET} ${TD}${MODEL}${RESET}"
|
|
91
|
+
|
|
92
|
+
printf '%b\n' "$LINE1"
|
|
93
|
+
printf '%b\n' "$LINE2"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
phase: {N}
|
|
3
|
+
goal: "{phase goal}"
|
|
4
|
+
tasks: {count}
|
|
5
|
+
waves: {count}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Phase {N}: {Name}
|
|
9
|
+
|
|
10
|
+
Goal: {what must be true when done}
|
|
11
|
+
|
|
12
|
+
## Task 1 — {title}
|
|
13
|
+
**Wave:** 1
|
|
14
|
+
**Files:** {files to create or modify}
|
|
15
|
+
**Action:** {exactly what to build}
|
|
16
|
+
**Context:** Read @{file references}
|
|
17
|
+
**Done when:** {observable, testable criterion}
|
|
18
|
+
|
|
19
|
+
## Task 2 — {title}
|
|
20
|
+
**Wave:** 1
|
|
21
|
+
**Files:** {files}
|
|
22
|
+
**Action:** {what to build}
|
|
23
|
+
**Done when:** {criterion}
|
|
24
|
+
|
|
25
|
+
## Success Criteria
|
|
26
|
+
- [ ] {truth 1 — what the user can do}
|
|
27
|
+
- [ ] {truth 2}
|
|
28
|
+
- [ ] {truth 3}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# {Project Name}
|
|
2
|
+
|
|
3
|
+
## Client
|
|
4
|
+
{client name}
|
|
5
|
+
|
|
6
|
+
## What We're Building
|
|
7
|
+
{description}
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- [ ] {requirement 1}
|
|
11
|
+
- [ ] {requirement 2}
|
|
12
|
+
- [ ] {requirement 3}
|
|
13
|
+
|
|
14
|
+
## Out of Scope
|
|
15
|
+
- {exclusion 1}
|
|
16
|
+
|
|
17
|
+
## Stack
|
|
18
|
+
Next.js 16+ / React 19 / TypeScript / Supabase / Vercel
|
|
19
|
+
|
|
20
|
+
## Decisions
|
|
21
|
+
| Decision | Why |
|
|
22
|
+
|----------|-----|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Project State
|
|
2
|
+
|
|
3
|
+
## Project
|
|
4
|
+
See: .planning/PROJECT.md
|
|
5
|
+
|
|
6
|
+
## Current Position
|
|
7
|
+
Phase: 1 of {N} — {Phase Name}
|
|
8
|
+
Status: ready to plan
|
|
9
|
+
Assigned to: {employee}
|
|
10
|
+
Last activity: {date} — Project initialized
|
|
11
|
+
|
|
12
|
+
Progress: [░░░░░░░░░░] 0%
|
|
13
|
+
|
|
14
|
+
## Roadmap
|
|
15
|
+
| # | Phase | Goal | Status |
|
|
16
|
+
|---|-------|------|--------|
|
|
17
|
+
| 1 | {name} | {goal} | ready |
|
|
18
|
+
| 2 | {name} | {goal} | — |
|
|
19
|
+
| 3 | {name} | {goal} | — |
|
|
20
|
+
|
|
21
|
+
## Blockers
|
|
22
|
+
None.
|
|
23
|
+
|
|
24
|
+
## Session
|
|
25
|
+
Last session: {date}
|
|
26
|
+
Last worked by: {employee}
|
|
27
|
+
Resume: —
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"project": "",
|
|
3
|
+
"client": "",
|
|
4
|
+
"type": "",
|
|
5
|
+
"assigned_to": "",
|
|
6
|
+
"phase": 0,
|
|
7
|
+
"phase_name": "",
|
|
8
|
+
"total_phases": 0,
|
|
9
|
+
"status": "setup",
|
|
10
|
+
"wave": 0,
|
|
11
|
+
"tasks_done": 0,
|
|
12
|
+
"tasks_total": 0,
|
|
13
|
+
"verification": "pending",
|
|
14
|
+
"blockers": [],
|
|
15
|
+
"last_updated": "",
|
|
16
|
+
"last_commit": "",
|
|
17
|
+
"deployed_url": "",
|
|
18
|
+
"notes": ""
|
|
19
|
+
}
|