qualia-framework 5.5.0 → 5.8.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 (31) hide show
  1. package/README.md +17 -13
  2. package/agents/research-synthesizer.md +4 -1
  3. package/agents/researcher.md +6 -1
  4. package/agents/visual-evaluator.md +1 -1
  5. package/bin/install.js +6 -6
  6. package/bin/slop-detect.mjs +1 -1
  7. package/docs/onboarding.html +623 -0
  8. package/guide.md +5 -6
  9. package/hooks/session-start.js +1 -1
  10. package/package.json +1 -1
  11. package/skills/qualia-discuss/SKILL.md +106 -6
  12. package/skills/qualia-feature/SKILL.md +216 -0
  13. package/skills/qualia-milestone/SKILL.md +73 -1
  14. package/skills/qualia-new/SKILL.md +52 -25
  15. package/skills/qualia-optimize/SKILL.md +1 -1
  16. package/skills/{qualia-polish-loop → qualia-polish}/REFERENCE.md +5 -5
  17. package/skills/qualia-polish/SKILL.md +13 -4
  18. package/skills/{qualia-polish-loop → qualia-polish}/scripts/loop.mjs +2 -2
  19. package/skills/{qualia-polish-loop → qualia-polish}/scripts/playwright-capture.mjs +1 -1
  20. package/skills/qualia-road/SKILL.md +10 -11
  21. package/templates/project-discovery.md +83 -0
  22. package/templates/project.md +7 -0
  23. package/tests/bin.test.sh +74 -62
  24. package/tests/slop-detect.test.sh +2 -2
  25. package/skills/qualia-polish-loop/SKILL.md +0 -201
  26. package/skills/qualia-prd/SKILL.md +0 -199
  27. package/skills/qualia-quick/SKILL.md +0 -44
  28. package/skills/qualia-task/SKILL.md +0 -98
  29. /package/skills/{qualia-polish-loop → qualia-polish}/fixtures/broken.html +0 -0
  30. /package/skills/{qualia-polish-loop → qualia-polish}/fixtures/clean.html +0 -0
  31. /package/skills/{qualia-polish-loop → qualia-polish}/scripts/score.mjs +0 -0
package/README.md CHANGED
@@ -1,14 +1,18 @@
1
- # Qualia Framework v5.3
1
+ # Qualia Framework v5.8
2
2
 
3
3
  A harness engineering framework for [Claude Code](https://claude.ai/code). It installs into `~/.claude/` and wraps your AI-assisted development workflow with structured planning, execution, verification, and deployment gates.
4
4
 
5
- It is not an application framework like Rails or Next.js. It doesn't generate code, run servers, or process data. It's an opinionated workflow layer that tells Claude how to plan, build, and verify your projects end-to-end, from "tell me what you want to make" to "here's the handoff doc for your client."
5
+ It is not an application framework like Rails or Next.js. It doesn't generate code, run servers, or process data. It's an opinionated workflow layer that tells Claude how to plan, build, and verify your projects end-to-end, from "tell me what you want to make" to "here's the handoff doc for your client."
6
6
 
7
- **The v5 line in three releases:**
8
- - **v5.0** alignment discipline. CONTEXT.md domain glossary, decisions/ ADRs, `/qualia-zoom`, `/qualia-issues`, `/qualia-triage`, slim CLAUDE.md per Matt Pocock's instruction-budget rule, insights-driven hooks (Vercel account, empty env-var, Supabase destructive guards).
9
- - **v5.1** — `/qualia-polish-loop` (autonomous visual-polish loop: screenshots a URL at three viewports, scores 8 design dimensions with vision, fixes top issues, loops until pass or kill-switch); multi-target installer (Claude Code + Codex AGENTS.md + Both); live-progress install UI.
10
- - **v5.2** polish-loop reliability. `--reduced-motion` capture flag, `--routes URL1,URL2` multi-route mode, first supervised end-to-end run.
11
- - **v5.3** Matt Pocock gaps closed. `/qualia-prd` (synthesize conversation → durable PRD), `/qualia-hook-gen` (CLAUDE.md instruction deterministic Claude Code hook), `/qualia-optimize --deepen` Step 5b parallel-interface design (3 fan-out agents producing radically different interfaces).
7
+ **The v5 line:**
8
+ - **v5.0**, alignment discipline. CONTEXT.md domain glossary, decisions/ ADRs, `/qualia-zoom`, `/qualia-issues`, `/qualia-triage`, slim CLAUDE.md per Matt Pocock's instruction-budget rule, insights-driven hooks.
9
+ - **v5.1**, autonomous visual-polish loop. Screenshots a URL at three viewports, scores 8 design dimensions with vision, fixes top issues, loops until pass or kill-switch. Multi-target installer (Claude Code + Codex AGENTS.md + Both).
10
+ - **v5.2**, polish-loop reliability. `--reduced-motion` capture flag, `--routes URL1,URL2` multi-route mode, first supervised end-to-end run.
11
+ - **v5.3**, Matt Pocock gaps closed. `/qualia-hook-gen` (CLAUDE.md instruction to deterministic Claude Code hook), `/qualia-optimize --deepen` Step 5b parallel-interface design (3 fan-out agents producing radically different interfaces).
12
+ - **v5.4-5.5**, token-discipline and plan-discipline. Cache-aware spawn ordering, scope-reduction prohibition, decision-coverage audit, requirement-coverage check.
13
+ - **v5.6**, Demo vs Full Project gate at kickoff. Mandatory discovery interview via `/qualia-discuss` in PROJECT MODE (8 questions for demos, 14 for full projects). Demo-extension branch in `/qualia-milestone` for client-signs-after-demo conversion.
14
+ - **v5.7**, `/qualia-feature` consolidates `/qualia-quick` + `/qualia-task` into one auto-scoped command.
15
+ - **v5.8**, surface cleanup. `/qualia-polish --loop` replaces `/qualia-polish-loop`. `/qualia-quick`, `/qualia-task`, and `/qualia-prd` removed (deprecated in v5.7).
12
16
 
13
17
  The Full Journey architecture carries forward: `/qualia-new` maps the entire project arc from kickoff to client handoff upfront, and the Road chains end-to-end in `--auto` mode with only two human gates per project.
14
18
 
@@ -40,6 +44,8 @@ npx qualia-framework@latest traces # View recent hook telemetry
40
44
 
41
45
  Open Claude Code in any project directory.
42
46
 
47
+ > **New to Qualia?** Open [`docs/onboarding.html`](docs/onboarding.html) in a browser for a one-page roadmap of the golden path. Best file to send a new hire.
48
+
43
49
  ### The Road — guided mode (default)
44
50
 
45
51
  ```
@@ -89,15 +95,13 @@ Two human gates per project. One halt case (gap-cycle limit exceeded on a failin
89
95
  /qualia-debug # Structured debugging
90
96
  /qualia-review # Production audit (scored diagnostics)
91
97
  /qualia-optimize # Deep optimization pass (parallel specialist agents, --deepen mode with parallel-interface design)
92
- /qualia-quick # Fast path for trivial fixes (skips planning)
93
- /qualia-task # Build one thing properly (fresh builder, atomic commit, no phase plan)
98
+ /qualia-feature # Auto-scoped single-feature build (inline for trivia, fresh spawn for 1-5 files)
94
99
  /qualia-test # Generate or run tests (--tdd mode for test-first workflow)
95
100
  /qualia-zoom # Focus on a single file or function with full context
96
101
  /qualia-issues # Break a phase plan into vertical-slice GitHub issues
97
102
  /qualia-triage # Triage open issues through the ready-for-agent state machine
98
103
  /qualia-road # View and navigate the project road (journey/milestone/phase status)
99
- /qualia-polish-loop # Autonomous visual-polish loop: screenshot vision-eval fix repeat (v5.1+)
100
- /qualia-prd # Synthesize current conversation into a durable feature spec (v5.3+)
104
+ /qualia-polish --loop # Autonomous visual-polish loop: screenshot, vision-eval, fix, repeat
101
105
  /qualia-hook-gen # Convert a CLAUDE.md/rules instruction into a deterministic hook (v5.3+)
102
106
  ```
103
107
 
@@ -139,9 +143,9 @@ Project
139
143
 
140
144
  **Why it matters:** non-technical team members can follow the ladder from any entry point. `/qualia` and `/qualia-milestone` render JOURNEY.md as a visual ladder with current position highlighted. In the ERP, the primary operational dates are project deadline, milestone deadline, and employee shift submission date; framework tasks stay internal to agent execution.
141
145
 
142
- ## What's Inside (v5.3.0)
146
+ ## What's Inside (v5.8.0)
143
147
 
144
- - **35 skills** full Road (new / plan / build / verify / milestone / polish / ship / handoff / report), depth (discuss, research, map), navigation (qualia router, idk, pause, resume, road, help), quality (debug, review, optimize with `--deepen` parallel-interface design, quick, task, test, zoom, issues, triage), v5 flagships (`qualia-polish-loop`, `qualia-prd`, `qualia-hook-gen`), and meta (learn, skill-new, flush, postmortem)
148
+ - **32 skills**, full Road (new / plan / build / verify / milestone / polish / ship / handoff / report), depth (discuss, research, map), navigation (qualia router, idk, pause, resume, road, help), quality (debug, review, optimize with `--deepen` parallel-interface design, feature, test, zoom, issues, triage), v5 flagships (`qualia-polish --loop`, `qualia-hook-gen`), and meta (learn, skill-new, flush, postmortem)
145
149
  - **9 agents** (each runs in fresh context): planner, builder, verifier, qa-browser, researcher, research-synthesizer, roadmapper, plan-checker, visual-evaluator
146
150
  - **12 hooks** (pure Node.js, cross-platform): session-start, auto-update, git-guardrails, branch-guard, pre-push tracking sync, migration-guard, pre-deploy-gate, pre-compact state save, stop-session-log, vercel-account-guard, env-empty-guard, supabase-destructive-guard
147
151
  - **6 always-loaded rules** (`rules/`): grounding, security, infrastructure, deployment, speed (CLI-first / MCP tier-list), architecture (deep modules / scout-for-shallow-code)
@@ -33,6 +33,7 @@ You receive:
33
33
  - `.planning/research/ARCHITECTURE.md`
34
34
  - `.planning/research/PITFALLS.md`
35
35
  - Project context (PROJECT.md summary)
36
+ - `<scope>` — optional: `quick` for demo projects, `standard` (default) for full projects
36
37
 
37
38
  ## Output
38
39
 
@@ -72,7 +73,9 @@ Based on:
72
73
  - ARCHITECTURE.md build order → what depends on what, which foundation must land in Milestone 1 to support final-milestone requirements
73
74
  - PITFALLS.md → which risks stall later milestones and need to be addressed in Milestone 1 foundations
74
75
 
75
- Suggest a **2-5 milestone arc ending in Handoff**:
76
+ **Quick scope (`<scope>quick</scope>`, demo projects):** Suggest a **single milestone** (no Handoff, no multi-milestone arc). The milestone is the demo itself — 2 to 4 phases that ship a real working surface end-to-end. Skip the "Handoff implications" section. The demo extends into a full project later via `/qualia-milestone` if the client signs; that conversion is handled there, not here.
77
+
78
+ **Standard scope (default):** Suggest a **2-5 milestone arc ending in Handoff**:
76
79
 
77
80
  - **Milestone 1 · Foundation** — almost always. DB, auth, base layout, deploy pipeline.
78
81
  - **Milestone 2-{N-1} · Core + Expansion** — the value-delivering capabilities, ordered by dependency.
@@ -25,11 +25,16 @@ You receive from the orchestrator:
25
25
  - `<domain>` — the project domain (e.g., "legal case management", "dental clinic booking", "voice agent for restaurants")
26
26
  - `<project_context>` — summary of PROJECT.md (core value, constraints, what they're building)
27
27
  - `<milestone_context>` — greenfield or subsequent
28
+ - `<scope>` — optional: `quick` for demo projects, `standard` (default) for full projects
28
29
  - `<output_path>` — absolute path where you write your research file
29
30
 
30
31
  ## Tool Budget
31
32
 
32
- Maximum 8 external calls total per invocation: 3 Context7 queries + 3 WebFetch calls + 2 WebSearch queries. If you exhaust this budget, write what you have and mark remaining sections as `confidence: LOW`. Research is time-boxed, not exhaustive — a 10-minute deep dive with concrete sources beats a 30-minute wander.
33
+ **Standard scope (default):** Maximum 8 external calls total per invocation 3 Context7 queries + 3 WebFetch calls + 2 WebSearch queries.
34
+
35
+ **Quick scope (`<scope>quick</scope>`, used by demo projects):** Maximum 3 external calls total — 1 Context7 query + 1 WebFetch + 1 WebSearch. The demo only needs enough research to validate the stack and surface the top pitfall — depth is wasted when there's a single milestone to ship. Drain local sources first (Steps 0a + 0b below); if local sources cover the dimension, skip external calls entirely.
36
+
37
+ If you exhaust the budget, write what you have and mark remaining sections as `confidence: LOW`. Research is time-boxed, not exhaustive — a 10-minute deep dive with concrete sources beats a 30-minute wander.
33
38
 
34
39
  **Local-first.** Before any external call, exhaust local sources (Steps 0a + 0b in *How to Research* below). Most domains have already been researched and the answers live in NotebookLM notebooks or `~/qualia-memory`. Hitting the web for content we already have is silent token waste — and the local source is usually higher-quality (curated synthesis vs raw search results).
35
40
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: qualia-visual-evaluator
3
- description: Vision-anchored evaluator for /qualia-polish-loop. Reads screenshots, scores 8 design dimensions against the rubric with cited evidence, returns top 3 issues + severity. Default: 3 (acceptable). Only deviates with quoted evidence.
3
+ description: Vision-anchored evaluator for /qualia-polish --loop. Reads screenshots, scores 8 design dimensions against the rubric with cited evidence, returns top 3 issues + severity. Default: 3 (acceptable). Only deviates with quoted evidence.
4
4
  tools: Read, Grep, Glob
5
5
  ---
6
6
 
package/bin/install.js CHANGED
@@ -390,10 +390,10 @@ async function main() {
390
390
  if (fs.existsSync(refSrc)) {
391
391
  copy(refSrc, path.join(CLAUDE_DIR, "skills", skill, "REFERENCE.md"));
392
392
  }
393
- // v5.1: Copy scripts/ subfolder if present (e.g. qualia-polish-loop ships
394
- // playwright-capture.mjs, loop.mjs, score.mjs that the skill invokes at
395
- // runtime). Recursive preserves nested files. fixtures/ also copied
396
- // for self-test scenarios.
393
+ // v5.1: Copy scripts/ subfolder if present (e.g. qualia-polish ships
394
+ // playwright-capture.mjs, loop.mjs, score.mjs that the --loop mode
395
+ // invokes at runtime). Recursive, preserves nested files. fixtures/
396
+ // also copied for self-test scenarios.
397
397
  for (const sub of ["scripts", "fixtures"]) {
398
398
  const subSrc = path.join(skillsDir, skill, sub);
399
399
  if (fs.existsSync(subSrc) && fs.statSync(subSrc).isDirectory()) {
@@ -893,7 +893,7 @@ Client-specific preferences, design choices, and requirements. Loaded by \`/qual
893
893
  excludeDefault: true,
894
894
  tips: [
895
895
  "⬢ Lost? Type /qualia for the next step",
896
- "⬢ Small fix? Use /qualia-quick to skip planning",
896
+ "⬢ Single feature? Use /qualia-feature, it auto-scopes",
897
897
  "⬢ End of day? /qualia-report submits your shift before clock-out",
898
898
  "⬢ Context isolation: every task gets a fresh AI brain",
899
899
  "⬢ The verifier doesn't trust claims — it greps the code",
@@ -1104,7 +1104,7 @@ function printSummary({ member, target, claudeInstalled }) {
1104
1104
  }
1105
1105
  console.log("");
1106
1106
  console.log(` ${DIM}New project?${RESET} ${TEAL}/qualia-new${RESET}`);
1107
- console.log(` ${DIM}Quick fix?${RESET} ${TEAL}/qualia-quick${RESET}`);
1107
+ console.log(` ${DIM}Single feature?${RESET} ${TEAL}/qualia-feature${RESET}`);
1108
1108
  console.log(` ${DIM}End of day?${RESET} ${TEAL}/qualia-report${RESET} ${DIM}(shift submission)${RESET}`);
1109
1109
  console.log(` ${DIM}Stuck?${RESET} ${TEAL}/qualia${RESET}`);
1110
1110
  console.log("");
@@ -187,7 +187,7 @@ const SKIP_DIRS = new Set([
187
187
  "coverage", ".cache", "out", ".vercel", ".vscode", ".idea",
188
188
  ".planning", ".qa-screenshots",
189
189
  // v5.1: skip test fixtures by convention. Fixtures used as regression
190
- // targets (e.g. /qualia-polish-loop's broken.html) intentionally violate
190
+ // targets (e.g. /qualia-polish --loop's broken.html) intentionally violate
191
191
  // the rules slop-detect enforces; scanning them flags real fixture bugs
192
192
  // as production slop.
193
193
  "fixtures", "__fixtures__",