qualia-framework 6.2.7 → 6.2.10
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/README.md +18 -11
- package/agents/builder.md +7 -7
- package/agents/planner.md +39 -3
- package/agents/research-synthesizer.md +1 -1
- package/agents/researcher.md +3 -3
- package/agents/roadmapper.md +7 -7
- package/agents/verifier.md +18 -6
- package/agents/visual-evaluator.md +8 -7
- package/bin/cli.js +111 -14
- package/bin/codex-goal.js +92 -0
- package/bin/contract-runner.js +219 -0
- package/bin/host-adapters.js +66 -0
- package/bin/install.js +171 -124
- package/bin/plan-contract.js +99 -2
- package/bin/planning-hygiene.js +262 -0
- package/bin/runtime-manifest.js +32 -0
- package/bin/state-ledger.js +184 -0
- package/bin/state.js +299 -20
- package/bin/trust-score.js +276 -0
- package/docs/onboarding.html +5 -4
- package/guide.md +3 -2
- package/hooks/pre-deploy-gate.js +27 -0
- package/hooks/pre-push.js +19 -0
- package/package.json +1 -1
- package/qualia-design/design-rubric.md +17 -5
- package/qualia-design/frontend.md +5 -1
- package/qualia-design/graphics.md +47 -0
- package/rules/codex-goal.md +46 -0
- package/rules/command-output.md +35 -0
- package/skills/qualia/SKILL.md +10 -10
- package/skills/qualia-build/SKILL.md +24 -14
- package/skills/qualia-debug/SKILL.md +16 -8
- package/skills/qualia-discuss/SKILL.md +10 -10
- package/skills/qualia-doctor/SKILL.md +140 -0
- package/skills/qualia-feature/SKILL.md +27 -21
- package/skills/qualia-fix/SKILL.md +216 -0
- package/skills/qualia-flush/SKILL.md +9 -9
- package/skills/qualia-handoff/SKILL.md +9 -9
- package/skills/qualia-help/SKILL.md +3 -3
- package/skills/qualia-hook-gen/SKILL.md +1 -1
- package/skills/qualia-idk/SKILL.md +4 -4
- package/skills/qualia-issues/SKILL.md +2 -2
- package/skills/qualia-learn/SKILL.md +10 -10
- package/skills/qualia-map/SKILL.md +2 -2
- package/skills/qualia-milestone/SKILL.md +15 -15
- package/skills/qualia-new/REFERENCE.md +9 -9
- package/skills/qualia-new/SKILL.md +14 -14
- package/skills/qualia-optimize/REFERENCE.md +1 -1
- package/skills/qualia-optimize/SKILL.md +23 -16
- package/skills/qualia-pause/SKILL.md +2 -2
- package/skills/qualia-plan/SKILL.md +27 -13
- package/skills/qualia-polish/REFERENCE.md +14 -14
- package/skills/qualia-polish/SKILL.md +64 -19
- package/skills/qualia-polish/scripts/loop.mjs +3 -3
- package/skills/qualia-polish/scripts/score.mjs +9 -3
- package/skills/qualia-postmortem/SKILL.md +9 -9
- package/skills/qualia-report/SKILL.md +23 -23
- package/skills/qualia-research/SKILL.md +5 -5
- package/skills/qualia-resume/SKILL.md +4 -4
- package/skills/qualia-review/SKILL.md +28 -12
- package/skills/qualia-road/SKILL.md +18 -5
- package/skills/qualia-ship/SKILL.md +22 -22
- package/skills/qualia-skill-new/SKILL.md +13 -13
- package/skills/qualia-test/SKILL.md +5 -5
- package/skills/qualia-triage/SKILL.md +1 -1
- package/skills/qualia-verify/SKILL.md +37 -23
- package/skills/qualia-vibe/SKILL.md +13 -10
- package/skills/qualia-vibe/scripts/extract.mjs +1 -1
- package/skills/zoho-workflow/SKILL.md +1 -1
- package/templates/help.html +12 -10
- package/tests/bin.test.sh +35 -5
- package/tests/install-smoke.test.sh +23 -3
- package/tests/lib.test.sh +290 -0
- package/tests/runner.js +3 -0
- package/tests/skills.test.sh +4 -4
- package/tests/state.test.sh +65 -3
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qualia-fix
|
|
3
|
+
description: "Practical repair lane for broken existing behavior. Blends /qualia-debug root-cause discipline with /qualia-feature execution. Use when the user says 'fix this', 'bug', 'broken', 'error', 'failing test', 'regression', 'hotfix', 'not working', 'layout broken', 'slow page', or 'config is wrong'."
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Grep
|
|
10
|
+
- Glob
|
|
11
|
+
- Agent
|
|
12
|
+
argument-hint: "[--quick|--frontend|--perf|--test|--no-commit] <symptom>"
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# /qualia-fix - Repair Broken Existing Behavior
|
|
16
|
+
|
|
17
|
+
Fix is the practical lane for "this used to work, or should work, and now it does not." It combines the evidence discipline of `/qualia-debug` with the small-work execution path of `/qualia-feature`.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
- `/qualia-fix {symptom}` - diagnose and repair a named problem
|
|
22
|
+
- `/qualia-fix --quick {symptom}` - micro-fix, max 1 file, direct edit
|
|
23
|
+
- `/qualia-fix --frontend {symptom}` - bias diagnostics toward layout, CSS, hydration, responsive, and visual bugs
|
|
24
|
+
- `/qualia-fix --perf {symptom}` - bias diagnostics toward slow pages, wasteful renders, bundles, queries, and sequential awaits
|
|
25
|
+
- `/qualia-fix --test {failing command}` - start from a failing test/build command
|
|
26
|
+
- `/qualia-fix --no-commit {symptom}` - patch and verify, but leave changes uncommitted
|
|
27
|
+
|
|
28
|
+
## When To Use
|
|
29
|
+
|
|
30
|
+
- A failing test, build, typecheck, lint, deploy, or runtime path
|
|
31
|
+
- A broken existing UI, route, form, API, config, or integration
|
|
32
|
+
- A regression after recent work
|
|
33
|
+
- A small bug report with enough detail to reproduce or inspect
|
|
34
|
+
- A hotfix where the expected behavior is already known
|
|
35
|
+
|
|
36
|
+
## When Not To Use
|
|
37
|
+
|
|
38
|
+
- Net-new capability -> `/qualia-feature`
|
|
39
|
+
- Phase-sized work or 5+ likely files -> `/qualia-plan`
|
|
40
|
+
- Read-only audit -> `/qualia-review`
|
|
41
|
+
- No concrete symptom and no failing command -> `/qualia-debug`
|
|
42
|
+
- Visual craft/design quality with no functional bug -> `/qualia-polish`
|
|
43
|
+
- Whole-site aesthetic pivot -> `/qualia-vibe`
|
|
44
|
+
|
|
45
|
+
## Process
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
node ${QUALIA_BIN}/qualia-ui.js banner fix
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 1. Classify The Request
|
|
52
|
+
|
|
53
|
+
Parse `$ARGUMENTS` into:
|
|
54
|
+
|
|
55
|
+
- symptom
|
|
56
|
+
- mode: quick | frontend | perf | test | general
|
|
57
|
+
- expected behavior
|
|
58
|
+
- observed behavior
|
|
59
|
+
- named files/routes/tests if provided
|
|
60
|
+
|
|
61
|
+
If the request is actually a new feature, stop and route:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
node ${QUALIA_BIN}/qualia-ui.js end "ROUTED" "/qualia-feature"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If the request is phase-sized, stop and route:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
node ${QUALIA_BIN}/qualia-ui.js end "ROUTED" "/qualia-plan"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 2. Build The Feedback Loop
|
|
74
|
+
|
|
75
|
+
Use the cheapest check that can prove the bug is real and later prove it is fixed.
|
|
76
|
+
|
|
77
|
+
Prefer, in order:
|
|
78
|
+
|
|
79
|
+
1. User-provided failing command
|
|
80
|
+
2. Targeted test
|
|
81
|
+
3. Typecheck or lint error
|
|
82
|
+
4. Reproduction grep or route/component inspection
|
|
83
|
+
5. Recent diff inspection
|
|
84
|
+
|
|
85
|
+
Useful starting commands:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
git status --short
|
|
89
|
+
git diff --stat
|
|
90
|
+
npm test -- --runInBand 2>/dev/null || npm test 2>/dev/null || true
|
|
91
|
+
npx tsc --noEmit 2>&1 | head -40
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
For `--test`, run the exact command first and preserve the failing output.
|
|
95
|
+
|
|
96
|
+
### 3. Find Root Cause
|
|
97
|
+
|
|
98
|
+
Use a hard inspection budget of 12 Read/Grep/Bash calls before returning insufficient evidence.
|
|
99
|
+
|
|
100
|
+
Root cause must include:
|
|
101
|
+
|
|
102
|
+
- `file:line`
|
|
103
|
+
- the specific bad assumption or broken contract
|
|
104
|
+
- why the symptom follows from it
|
|
105
|
+
|
|
106
|
+
No root cause, no patch. If evidence is insufficient, write the report and stop.
|
|
107
|
+
|
|
108
|
+
### 4. Patch Minimally
|
|
109
|
+
|
|
110
|
+
Patch rules:
|
|
111
|
+
|
|
112
|
+
- Touch only files required by the root cause.
|
|
113
|
+
- Default max: 3 files.
|
|
114
|
+
- `--quick` max: 1 file.
|
|
115
|
+
- If more than 3 files are required, stop and route to `/qualia-plan` or ask for permission to widen.
|
|
116
|
+
- Do not include cleanup, refactors, formatting churn, or adjacent improvements.
|
|
117
|
+
- Preserve unrelated user changes.
|
|
118
|
+
|
|
119
|
+
### 5. Verify
|
|
120
|
+
|
|
121
|
+
Re-run the feedback loop from Step 2. Then run the smallest broad safety check that matches the stack.
|
|
122
|
+
|
|
123
|
+
Common verification:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npx tsc --noEmit
|
|
127
|
+
npm test -- --runInBand 2>/dev/null || npm test 2>/dev/null || true
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
If verification fails, do not commit. Either repair the verification failure if it is the same root cause, or write the report with the remaining failure.
|
|
131
|
+
|
|
132
|
+
### 6. Write FIX Report
|
|
133
|
+
|
|
134
|
+
Create the report directory and write `.planning/reports/fix/FIX-{YYYY-MM-DD-HHMM}.md`:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
mkdir -p .planning/reports/fix
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
# Fix Report - {YYYY-MM-DD HH:MM}
|
|
142
|
+
|
|
143
|
+
**Symptom:** {user symptom}
|
|
144
|
+
**Mode:** general | quick | frontend | perf | test
|
|
145
|
+
**Outcome:** fixed | insufficient-evidence | partial
|
|
146
|
+
|
|
147
|
+
## Feedback Loop
|
|
148
|
+
- Initial failing check: `{command or inspection}`
|
|
149
|
+
- Final passing check: `{command or inspection}`
|
|
150
|
+
|
|
151
|
+
## Root Cause
|
|
152
|
+
`{file}:{line}` - {one sentence}
|
|
153
|
+
|
|
154
|
+
## Patch
|
|
155
|
+
- Files changed: {list}
|
|
156
|
+
- Change summary: {brief summary}
|
|
157
|
+
|
|
158
|
+
## Verification
|
|
159
|
+
- `{command}` - PASS|FAIL
|
|
160
|
+
- `{command}` - PASS|FAIL
|
|
161
|
+
|
|
162
|
+
## Remaining Notes
|
|
163
|
+
- {adjacent issue not fixed, or "None"}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### 7. Commit
|
|
167
|
+
|
|
168
|
+
Unless `--no-commit` was passed:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
git add {specific changed files} .planning/reports/fix/FIX-{timestamp}.md
|
|
172
|
+
git commit -m "fix: {short symptom/root-cause summary}"
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Record state:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
node ${QUALIA_BIN}/state.js transition --to note --notes "{short fix summary}" --tasks-done 1
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### 8. Output
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
node ${QUALIA_BIN}/qualia-ui.js divider
|
|
185
|
+
node ${QUALIA_BIN}/qualia-ui.js ok "Root cause: {file:line}"
|
|
186
|
+
node ${QUALIA_BIN}/qualia-ui.js ok "Files: {changed files}"
|
|
187
|
+
node ${QUALIA_BIN}/qualia-ui.js ok "Verification: {commands}"
|
|
188
|
+
node ${QUALIA_BIN}/qualia-ui.js end "FIXED" "{next command if any}"
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Insufficient Evidence Return
|
|
192
|
+
|
|
193
|
+
If no confident root cause after 12 inspection calls, write the same FIX report with:
|
|
194
|
+
|
|
195
|
+
```markdown
|
|
196
|
+
**Outcome:** insufficient-evidence
|
|
197
|
+
|
|
198
|
+
## Narrowed To
|
|
199
|
+
- Files examined: {list}
|
|
200
|
+
- Ruled out: {list}
|
|
201
|
+
- Remaining suspects: {list}
|
|
202
|
+
|
|
203
|
+
## Recommended Next Diagnostic
|
|
204
|
+
- {specific command or reproduction step}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Do not patch and do not commit speculative work.
|
|
208
|
+
|
|
209
|
+
## Rules
|
|
210
|
+
|
|
211
|
+
1. **Repair existing behavior only.** New work belongs in `/qualia-feature`.
|
|
212
|
+
2. **Feedback loop first.** Know how the bug will be proven fixed before editing.
|
|
213
|
+
3. **Root cause or stop.** No plausible patches.
|
|
214
|
+
4. **Small patch.** Default max 3 files; quick max 1 file.
|
|
215
|
+
5. **Report every run.** The FIX report becomes searchable repair memory.
|
|
216
|
+
6. **Commit only after verification.** `--no-commit` is the only exception.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qualia-flush
|
|
3
|
-
description: "Promote daily-log raw entries to the curated knowledge tier — Karpathy-style raw→wiki flush. Reads
|
|
3
|
+
description: "Promote daily-log raw entries to the curated knowledge tier — Karpathy-style raw→wiki flush. Reads ${QUALIA_KNOWLEDGE}/daily-log/*.md, identifies recurring patterns and decisions, writes them to ${QUALIA_KNOWLEDGE}/concepts/{topic}.md, updates index.md. Trigger on 'flush memory', 'promote learnings', 'consolidate logs', 'qualia-flush', 'process daily logs', or run weekly."
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Bash
|
|
6
6
|
- Read
|
|
@@ -14,11 +14,11 @@ allowed-tools:
|
|
|
14
14
|
|
|
15
15
|
Closes the **raw → wiki** loop in the Qualia memory layer. The Stop hook
|
|
16
16
|
(`hooks/stop-session-log.js`) appends mechanical session checkpoints to
|
|
17
|
-
|
|
17
|
+
`${QUALIA_KNOWLEDGE}/daily-log/{date}.md`.
|
|
18
18
|
Those entries accumulate but stay raw — they describe what happened, not
|
|
19
19
|
what to do about it. This skill reads the recent daily-log entries with an
|
|
20
20
|
LLM (you) and writes durable concepts that the builder, planner, and
|
|
21
|
-
debug skills will surface later via `node
|
|
21
|
+
debug skills will surface later via `node ${QUALIA_BIN}/knowledge.js`.
|
|
22
22
|
|
|
23
23
|
Inspired by Karpathy's LLM knowledge bases and Cole Medin's self-evolving
|
|
24
24
|
Claude memory pattern (NotebookLM, 2026-04-25). Both run a daily/weekly
|
|
@@ -47,7 +47,7 @@ all projects. Show a one-line preview before writing anything destructive.
|
|
|
47
47
|
### 1. Banner + check the floor
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
node
|
|
50
|
+
node ${QUALIA_BIN}/qualia-ui.js banner flush 2>/dev/null || true
|
|
51
51
|
|
|
52
52
|
# Resolve the knowledge dir. Fail loud if it doesn't exist — flush is
|
|
53
53
|
# meaningless without a daily-log to read.
|
|
@@ -112,7 +112,7 @@ Things to **NOT** promote:
|
|
|
112
112
|
For each thing worth promoting, use the loader's `append`:
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
node
|
|
115
|
+
node ${QUALIA_BIN}/knowledge.js append \
|
|
116
116
|
--type {pattern|fix|client} \
|
|
117
117
|
--title "{Concise title — what's the recurring thing?}" \
|
|
118
118
|
--body "{The promoted lesson. Be specific. Include the project name(s) and dates where this pattern was observed so future you can verify.}" \
|
|
@@ -122,13 +122,13 @@ node ~/.claude/bin/knowledge.js append \
|
|
|
122
122
|
|
|
123
123
|
For a brand-new topic that doesn't fit pattern/fix/client (e.g. a Stripe
|
|
124
124
|
integration approach worth its own file), Write to
|
|
125
|
-
|
|
125
|
+
`${QUALIA_KNOWLEDGE}/concepts/{topic}.md`. Then **update `index.md`** so the
|
|
126
126
|
new file is reachable — list it under "What's where" with one line:
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
129
|
# After writing concepts/stripe-checkout.md:
|
|
130
|
-
node
|
|
131
|
-
# Returned path =
|
|
130
|
+
node ${QUALIA_BIN}/knowledge.js path stripe-checkout
|
|
131
|
+
# Returned path = ${QUALIA_KNOWLEDGE}/stripe-checkout.md (NOTE: top-level, not concepts/)
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
> **Loader behavior:** `knowledge.js load <name>` resolves bare names by walking
|
|
@@ -181,7 +181,7 @@ Format:
|
|
|
181
181
|
- **Mass-promoting everything:** if you found "promotions" for 90% of
|
|
182
182
|
daily-log entries, you're labeling, not promoting. Be selective.
|
|
183
183
|
- **Re-promoting on every flush:** before appending, run
|
|
184
|
-
`node
|
|
184
|
+
`node ${QUALIA_BIN}/knowledge.js search "{title keywords}"` to check if
|
|
185
185
|
the pattern already exists. If it does, either update it (find by `**ID:**`
|
|
186
186
|
line) or skip — never duplicate.
|
|
187
187
|
- **Hand-writing to `learned-patterns.md` etc. directly:** always go
|
|
@@ -31,7 +31,7 @@ Every Handoff milestone must produce these. They are checked against in `REQUIRE
|
|
|
31
31
|
## Process
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
node
|
|
34
|
+
node ${QUALIA_BIN}/qualia-ui.js banner handoff
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### 1. Verify Production URL (Deliverable 1)
|
|
@@ -39,13 +39,13 @@ node ~/.claude/bin/qualia-ui.js banner handoff
|
|
|
39
39
|
```bash
|
|
40
40
|
URL=$(node -e "const t=JSON.parse(require('fs').readFileSync('.planning/tracking.json','utf8'));console.log(t.deployed_url||'')")
|
|
41
41
|
if [ -z "$URL" ]; then
|
|
42
|
-
node
|
|
42
|
+
node ${QUALIA_BIN}/qualia-ui.js fail "No deployed_url — run /qualia-ship first"
|
|
43
43
|
exit 1
|
|
44
44
|
fi
|
|
45
45
|
HTTP=$(curl -s -o /dev/null -w "%{http_code}" "$URL")
|
|
46
46
|
LATENCY=$(curl -s -o /dev/null -w "%{time_total}" "$URL")
|
|
47
47
|
AUTH=$(curl -s -o /dev/null -w "%{http_code}" "$URL/api/auth/callback" 2>/dev/null || echo "N/A")
|
|
48
|
-
node
|
|
48
|
+
node ${QUALIA_BIN}/qualia-ui.js ok "URL: $URL (HTTP $HTTP, ${LATENCY}s, auth:$AUTH)"
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
If HTTP is not 2xx or latency > 1.0s → halt; deliverable fails.
|
|
@@ -119,7 +119,7 @@ git push
|
|
|
119
119
|
### 5. Update State
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
|
-
node
|
|
122
|
+
node ${QUALIA_BIN}/state.js transition --to handed_off
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
Do NOT manually edit STATE.md or tracking.json — state.js handles both.
|
|
@@ -131,11 +131,11 @@ Trigger the final `/qualia-report`. This uploads the closing state to the ERP wi
|
|
|
131
131
|
In `--auto` mode, inline-invoke `/qualia-report` now. In guided mode, show the next step:
|
|
132
132
|
|
|
133
133
|
```bash
|
|
134
|
-
node
|
|
135
|
-
node
|
|
136
|
-
node
|
|
137
|
-
node
|
|
138
|
-
node
|
|
134
|
+
node ${QUALIA_BIN}/qualia-ui.js ok "Production URL verified"
|
|
135
|
+
node ${QUALIA_BIN}/qualia-ui.js ok "Documentation updated"
|
|
136
|
+
node ${QUALIA_BIN}/qualia-ui.js ok "Client assets archived + handoff doc written"
|
|
137
|
+
node ${QUALIA_BIN}/qualia-ui.js ok "Ready for final ERP report"
|
|
138
|
+
node ${QUALIA_BIN}/qualia-ui.js end "DELIVERED" "/qualia-report"
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
## Rules
|
|
@@ -58,9 +58,9 @@ fi
|
|
|
58
58
|
### 3. Confirm
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
node
|
|
62
|
-
node
|
|
63
|
-
node
|
|
61
|
+
node ${QUALIA_BIN}/qualia-ui.js banner router
|
|
62
|
+
node ${QUALIA_BIN}/qualia-ui.js ok "Reference guide opened in browser"
|
|
63
|
+
node ${QUALIA_BIN}/qualia-ui.js info "File: /tmp/qualia-help.html"
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
If the browser does not open automatically, tell the user the file path so they can open it manually.
|
|
@@ -128,7 +128,7 @@ Two scopes:
|
|
|
128
128
|
| Scope | Action |
|
|
129
129
|
|---|---|
|
|
130
130
|
| `--scope project` (default for project rules) | Add the patch to `.claude/settings.json` in the project root |
|
|
131
|
-
| `--scope global` | Add to
|
|
131
|
+
| `--scope global` | Add to `${QUALIA_HOME}/settings.json`. Use only if rule applies to ALL projects |
|
|
132
132
|
|
|
133
133
|
Use the existing settings-merge logic from `bin/install.js:756-778` (preserves user fields, atomic write, backup-before-overwrite).
|
|
134
134
|
|
|
@@ -29,8 +29,8 @@ Run `/qualia` first when the user knows what they're trying to do. Run `/qualia-
|
|
|
29
29
|
### Step 0. Banner
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
node
|
|
33
|
-
node
|
|
32
|
+
node ${QUALIA_BIN}/qualia-ui.js banner router
|
|
33
|
+
node ${QUALIA_BIN}/qualia-ui.js spawn "diagnostic" "Reading planning and codebase in isolation..."
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Say: **"Let me take a proper look."**
|
|
@@ -143,8 +143,8 @@ If one of these maps to an existing Qualia command, use it:
|
|
|
143
143
|
### Step 4. Close
|
|
144
144
|
|
|
145
145
|
```bash
|
|
146
|
-
node
|
|
147
|
-
node
|
|
146
|
+
node ${QUALIA_BIN}/qualia-ui.js divider
|
|
147
|
+
node ${QUALIA_BIN}/qualia-ui.js end "DIAGNOSED" "{top-recommended action if it's a command, else leave blank}"
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
## Rules
|
|
@@ -34,7 +34,7 @@ This skill cannot work meaningfully without:
|
|
|
34
34
|
|
|
35
35
|
### 1. Determine phase
|
|
36
36
|
|
|
37
|
-
Phase number from `$ARGUMENTS` if provided, else current from `node
|
|
37
|
+
Phase number from `$ARGUMENTS` if provided, else current from `node ${QUALIA_BIN}/state.js check`.
|
|
38
38
|
|
|
39
39
|
### 2. Load substrate
|
|
40
40
|
|
|
@@ -138,7 +138,7 @@ Filed {date}. Status: open queue.
|
|
|
138
138
|
git add .planning/phase-{N}-issues.md
|
|
139
139
|
git commit -m "docs(phase-{N}): externalize {N_slices} slices to GH issue queue"
|
|
140
140
|
|
|
141
|
-
node
|
|
141
|
+
node ${QUALIA_BIN}/qualia-ui.js end "QUEUE FILED" "/qualia-triage"
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
## Rules
|
|
@@ -12,7 +12,7 @@ allowed-tools:
|
|
|
12
12
|
|
|
13
13
|
# /qualia-learn — Save Knowledge
|
|
14
14
|
|
|
15
|
-
Persist learnings across projects and sessions. Saved to
|
|
15
|
+
Persist learnings across projects and sessions. Saved to `${QUALIA_KNOWLEDGE}/`.
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
@@ -39,7 +39,7 @@ Client-specific preferences, design choices, requirements.
|
|
|
39
39
|
## Process
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
node
|
|
42
|
+
node ${QUALIA_BIN}/qualia-ui.js banner learn
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
### 1. Classify
|
|
@@ -60,7 +60,7 @@ unified loader, **never** raw `cat` or `grep` directly — the loader handles
|
|
|
60
60
|
missing-file edge cases and stays consistent across skills.
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
|
-
node
|
|
63
|
+
node ${QUALIA_BIN}/knowledge.js search "{title keywords}"
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
If a near-match exists:
|
|
@@ -76,7 +76,7 @@ detection, and the canonical entry format — one call, no shell escaping
|
|
|
76
76
|
concerns:
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
node
|
|
79
|
+
node ${QUALIA_BIN}/knowledge.js append \
|
|
80
80
|
--type {pattern|fix|client} \
|
|
81
81
|
--title "{Title}" \
|
|
82
82
|
--body "{The learning — be specific enough that future-you understands without context}" \
|
|
@@ -102,24 +102,24 @@ to bootstrap it.
|
|
|
102
102
|
|
|
103
103
|
## Reading Knowledge
|
|
104
104
|
|
|
105
|
-
**Always use the loader.** Hardcoded `cat
|
|
105
|
+
**Always use the loader.** Hardcoded `cat ${QUALIA_KNOWLEDGE}/X.md` is an
|
|
106
106
|
anti-pattern — it makes new files invisible (this was v4.1.0 audit finding
|
|
107
107
|
#3). The loader, by contrast, lets agents discover available knowledge via
|
|
108
108
|
the index.
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
111
|
# Print the index (entry point — read this first)
|
|
112
|
-
node
|
|
112
|
+
node ${QUALIA_BIN}/knowledge.js
|
|
113
113
|
|
|
114
114
|
# Print a specific file (accepts aliases: patterns, fixes, client)
|
|
115
|
-
node
|
|
116
|
-
node
|
|
115
|
+
node ${QUALIA_BIN}/knowledge.js load patterns
|
|
116
|
+
node ${QUALIA_BIN}/knowledge.js load common-fixes.md
|
|
117
117
|
|
|
118
118
|
# List everything available
|
|
119
|
-
node
|
|
119
|
+
node ${QUALIA_BIN}/knowledge.js list
|
|
120
120
|
|
|
121
121
|
# Search across all files
|
|
122
|
-
node
|
|
122
|
+
node ${QUALIA_BIN}/knowledge.js search "RLS"
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
The `/qualia-debug` skill should check `common-fixes.md` (`load fixes`) before
|
|
@@ -46,7 +46,7 @@ If `ALREADY_MAPPED`, ask:
|
|
|
46
46
|
### 2. Banner
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
node
|
|
49
|
+
node ${QUALIA_BIN}/qualia-ui.js banner map
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
### 3. Spawn 5 Mapper Agents (parallel)
|
|
@@ -175,7 +175,7 @@ git commit -m "docs: map existing codebase"
|
|
|
175
175
|
### 7. Route
|
|
176
176
|
|
|
177
177
|
```bash
|
|
178
|
-
node
|
|
178
|
+
node ${QUALIA_BIN}/qualia-ui.js end "CODEBASE MAPPED" "/qualia-new"
|
|
179
179
|
```
|
|
180
180
|
|
|
181
181
|
## What `/qualia-new` Does With This
|
|
@@ -29,7 +29,7 @@ Triggered after `/qualia-verify` passes on the LAST phase of the current milesto
|
|
|
29
29
|
### 1. Validate Readiness
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
node
|
|
32
|
+
node ${QUALIA_BIN}/state.js check
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
`state.js close-milestone` enforces two guards:
|
|
@@ -67,7 +67,7 @@ Roadmapper prompt for the extension:
|
|
|
67
67
|
|
|
68
68
|
```
|
|
69
69
|
Agent(prompt="
|
|
70
|
-
Read your role:
|
|
70
|
+
Read your role: @${QUALIA_AGENTS}/roadmapper.md
|
|
71
71
|
|
|
72
72
|
<mode>extend-demo-to-full</mode>
|
|
73
73
|
<existing_journey>.planning/JOURNEY.md</existing_journey>
|
|
@@ -95,8 +95,8 @@ milestone when /qualia-milestone opens each one.
|
|
|
95
95
|
**If "Demo only — close here":** treat the demo as a shipped-and-done project. Skip Steps 2-9 of the normal flow. Just run:
|
|
96
96
|
|
|
97
97
|
```bash
|
|
98
|
-
node
|
|
99
|
-
node
|
|
98
|
+
node ${QUALIA_BIN}/state.js close-milestone --force
|
|
99
|
+
node ${QUALIA_BIN}/qualia-ui.js end "DEMO SHIPPED" "/qualia-report"
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
In `--auto` mode, inline-invoke `/qualia-report` and stop.
|
|
@@ -104,7 +104,7 @@ In `--auto` mode, inline-invoke `/qualia-report` and stop.
|
|
|
104
104
|
**If "Pause":** stop, show:
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
|
-
node
|
|
107
|
+
node ${QUALIA_BIN}/qualia-ui.js info "Demo milestone left open. Run /qualia-milestone again when you decide."
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
If the demo branch did NOT fire (full project, or demo with multiple milestones already after extension), continue to Step 2.
|
|
@@ -112,8 +112,8 @@ If the demo branch did NOT fire (full project, or demo with multiple milestones
|
|
|
112
112
|
### 2. Banner + Confirm
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
node
|
|
116
|
-
node
|
|
115
|
+
node ${QUALIA_BIN}/qualia-ui.js banner milestone
|
|
116
|
+
node ${QUALIA_BIN}/qualia-ui.js journey-tree .planning/JOURNEY.md
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
The journey-tree shows the user WHERE they are on the ladder before asking the close question. Read `.planning/JOURNEY.md` to find the next milestone's name + scope. Show:
|
|
@@ -152,7 +152,7 @@ Edit `.planning/REQUIREMENTS.md`:
|
|
|
152
152
|
Closes current milestone's counters, appends a summary to `tracking.json` milestones[]:
|
|
153
153
|
|
|
154
154
|
```bash
|
|
155
|
-
node
|
|
155
|
+
node ${QUALIA_BIN}/state.js close-milestone
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
If all phases are verified and ≥ 2 phases exist, this succeeds without `--force`. Otherwise add `--force` (rare — usually means the user is closing a preview/demo milestone).
|
|
@@ -180,7 +180,7 @@ Spawn the roadmapper with the next milestone's JOURNEY.md sketch as input:
|
|
|
180
180
|
|
|
181
181
|
```
|
|
182
182
|
Agent(prompt="
|
|
183
|
-
Read your role:
|
|
183
|
+
Read your role: @${QUALIA_AGENTS}/roadmapper.md
|
|
184
184
|
|
|
185
185
|
<mode>next-milestone</mode>
|
|
186
186
|
<journey_file>.planning/JOURNEY.md</journey_file>
|
|
@@ -198,7 +198,7 @@ Do NOT re-plan completed milestones. Do NOT create a new JOURNEY.md — the
|
|
|
198
198
|
existing one stays the source of truth.
|
|
199
199
|
|
|
200
200
|
After writing ROADMAP.md, update STATE.md via:
|
|
201
|
-
node
|
|
201
|
+
node ${QUALIA_BIN}/state.js init --force \\
|
|
202
202
|
--project '{project}' --client '{client}' --type '{type}' \\
|
|
203
203
|
--milestone_name '{next name}' \\
|
|
204
204
|
--phases '<JSON: next milestone phases>' \\
|
|
@@ -221,8 +221,8 @@ git commit -m "milestone: close M{N} ({current name}) → open M{N+1} ({next nam
|
|
|
221
221
|
**Case A: this WAS the Handoff milestone closing → project is done.**
|
|
222
222
|
|
|
223
223
|
```bash
|
|
224
|
-
node
|
|
225
|
-
node
|
|
224
|
+
node ${QUALIA_BIN}/qualia-ui.js milestone-complete {N} "Handoff" ""
|
|
225
|
+
node ${QUALIA_BIN}/qualia-ui.js end "PROJECT SHIPPED" "/qualia-report"
|
|
226
226
|
```
|
|
227
227
|
|
|
228
228
|
In `--auto` mode, inline-invoke `/qualia-report` and stop. No further chaining — the project is done.
|
|
@@ -230,7 +230,7 @@ In `--auto` mode, inline-invoke `/qualia-report` and stop. No further chaining
|
|
|
230
230
|
**Case B: a non-final milestone just closed → next milestone is open.**
|
|
231
231
|
|
|
232
232
|
```bash
|
|
233
|
-
node
|
|
233
|
+
node ${QUALIA_BIN}/qualia-ui.js milestone-complete {N} "{current name}" "{next name}"
|
|
234
234
|
```
|
|
235
235
|
|
|
236
236
|
**In `--auto` mode**, pause here and ask (this is ONE of the two human gates in auto mode, the other being journey approval at `/qualia-new` time):
|
|
@@ -244,13 +244,13 @@ node ~/.claude/bin/qualia-ui.js milestone-complete {N} "{current name}" "{next n
|
|
|
244
244
|
If "Continue": the auto-chain resumes. If "Pause": stop, show:
|
|
245
245
|
|
|
246
246
|
```bash
|
|
247
|
-
node
|
|
247
|
+
node ${QUALIA_BIN}/qualia-ui.js end "M{N} CLOSED · M{N+1} READY" "/qualia-plan 1 --auto"
|
|
248
248
|
```
|
|
249
249
|
|
|
250
250
|
**In guided mode**, always stop and show the next step regardless of position:
|
|
251
251
|
|
|
252
252
|
```bash
|
|
253
|
-
node
|
|
253
|
+
node ${QUALIA_BIN}/qualia-ui.js end "M{N} CLOSED · M{N+1} OPEN" "/qualia-plan 1"
|
|
254
254
|
```
|
|
255
255
|
|
|
256
256
|
## What Stays, What Changes
|
|
@@ -9,7 +9,7 @@ Spawn all 4 as parallel `Agent()` calls in a single message. Each uses the same
|
|
|
9
9
|
|
|
10
10
|
```
|
|
11
11
|
Agent(prompt="
|
|
12
|
-
Read your role:
|
|
12
|
+
Read your role: @${QUALIA_AGENTS}/researcher.md
|
|
13
13
|
|
|
14
14
|
<dimension>stack</dimension>
|
|
15
15
|
<domain>{inferred domain from PROJECT.md}</domain>
|
|
@@ -19,7 +19,7 @@ Read your role: @~/.claude/agents/researcher.md
|
|
|
19
19
|
", subagent_type="qualia-researcher", description="Stack research")
|
|
20
20
|
|
|
21
21
|
Agent(prompt="
|
|
22
|
-
Read your role:
|
|
22
|
+
Read your role: @${QUALIA_AGENTS}/researcher.md
|
|
23
23
|
|
|
24
24
|
<dimension>features</dimension>
|
|
25
25
|
<domain>{inferred domain}</domain>
|
|
@@ -29,7 +29,7 @@ Read your role: @~/.claude/agents/researcher.md
|
|
|
29
29
|
", subagent_type="qualia-researcher", description="Features research")
|
|
30
30
|
|
|
31
31
|
Agent(prompt="
|
|
32
|
-
Read your role:
|
|
32
|
+
Read your role: @${QUALIA_AGENTS}/researcher.md
|
|
33
33
|
|
|
34
34
|
<dimension>architecture</dimension>
|
|
35
35
|
<domain>{inferred domain}</domain>
|
|
@@ -39,7 +39,7 @@ Read your role: @~/.claude/agents/researcher.md
|
|
|
39
39
|
", subagent_type="qualia-researcher", description="Architecture research")
|
|
40
40
|
|
|
41
41
|
Agent(prompt="
|
|
42
|
-
Read your role:
|
|
42
|
+
Read your role: @${QUALIA_AGENTS}/researcher.md
|
|
43
43
|
|
|
44
44
|
<dimension>pitfalls</dimension>
|
|
45
45
|
<domain>{inferred domain}</domain>
|
|
@@ -55,7 +55,7 @@ Spawn after all 4 researchers complete.
|
|
|
55
55
|
|
|
56
56
|
```
|
|
57
57
|
Agent(prompt="
|
|
58
|
-
Read your role:
|
|
58
|
+
Read your role: @${QUALIA_AGENTS}/research-synthesizer.md
|
|
59
59
|
|
|
60
60
|
Merge the 4 research files at .planning/research/ into .planning/research/SUMMARY.md.
|
|
61
61
|
This is a multi-milestone project -- the SUMMARY must suggest a FULL milestone arc
|
|
@@ -70,7 +70,7 @@ Spawn with full-journey mandate. If the user passed `--full-detail`, set `<full_
|
|
|
70
70
|
|
|
71
71
|
```
|
|
72
72
|
Agent(prompt="
|
|
73
|
-
Read your role:
|
|
73
|
+
Read your role: @${QUALIA_AGENTS}/roadmapper.md
|
|
74
74
|
|
|
75
75
|
<task>
|
|
76
76
|
Create the FULL JOURNEY for this project:
|
|
@@ -82,7 +82,7 @@ User-scoped v1 features:
|
|
|
82
82
|
{list of features selected in Step 9, grouped by category}
|
|
83
83
|
|
|
84
84
|
Template type: {template_type from config.json}
|
|
85
|
-
If set, use
|
|
85
|
+
If set, use ${QUALIA_TEMPLATES}/projects/{type}.md as the milestone arc starting point.
|
|
86
86
|
|
|
87
87
|
<full_detail>{true if --full-detail, else false}</full_detail>
|
|
88
88
|
- false (default): Milestone 1 gets full phase detail; M2..M{N-1} stay as sketches. Detail fills in when each milestone opens via /qualia-milestone.
|
|
@@ -92,7 +92,7 @@ The final milestone MUST be named 'Handoff' with the fixed 4 phases
|
|
|
92
92
|
(Polish, Content + SEO, Final QA, Handoff). Do not omit it.
|
|
93
93
|
|
|
94
94
|
After writing, update STATE.md via:
|
|
95
|
-
node
|
|
95
|
+
node ${QUALIA_BIN}/state.js init \
|
|
96
96
|
--project '{name}' --client '{client}' --type '{type}' \
|
|
97
97
|
--milestone_name '{Milestone 1 name}' \
|
|
98
98
|
--phases '<JSON: Milestone 1 phases only>' \
|
|
@@ -103,7 +103,7 @@ After writing, update STATE.md via:
|
|
|
103
103
|
|
|
104
104
|
## Journey ladder format
|
|
105
105
|
|
|
106
|
-
The branded journey ladder rendered in Step 11. Use `node
|
|
106
|
+
The branded journey ladder rendered in Step 11. Use `node ${QUALIA_BIN}/qualia-ui.js journey-tree .planning/JOURNEY.md` for the programmatic version. The manual ASCII fallback format is below.
|
|
107
107
|
|
|
108
108
|
```
|
|
109
109
|
## Proposed Journey
|