qualia-framework 4.5.0 → 5.1.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 (64) hide show
  1. package/AGENTS.md +24 -0
  2. package/CLAUDE.md +12 -75
  3. package/README.md +23 -16
  4. package/agents/builder.md +9 -21
  5. package/agents/planner.md +8 -0
  6. package/agents/verifier.md +8 -0
  7. package/agents/visual-evaluator.md +132 -0
  8. package/bin/cli.js +54 -18
  9. package/bin/install.js +369 -29
  10. package/bin/qualia-ui.js +208 -1
  11. package/bin/slop-detect.mjs +5 -0
  12. package/bin/state.js +34 -1
  13. package/docs/install-redesign-builder-prompt.md +290 -0
  14. package/docs/install-redesign-pilot.md +234 -0
  15. package/docs/playwright-loop-builder-prompt.md +185 -0
  16. package/docs/playwright-loop-design-notes.md +108 -0
  17. package/docs/playwright-loop-pilot-results.md +170 -0
  18. package/docs/playwright-loop-review-2026-05-03.md +65 -0
  19. package/docs/playwright-loop-tester-prompt.md +213 -0
  20. package/docs/reviews/matt-pocock-skills-analysis.md +300 -0
  21. package/guide.md +9 -5
  22. package/hooks/env-empty-guard.js +74 -0
  23. package/hooks/pre-compact.js +19 -9
  24. package/hooks/pre-deploy-gate.js +8 -2
  25. package/hooks/pre-push.js +26 -12
  26. package/hooks/supabase-destructive-guard.js +62 -0
  27. package/hooks/vercel-account-guard.js +91 -0
  28. package/package.json +2 -1
  29. package/rules/design-brand.md +4 -0
  30. package/rules/design-laws.md +4 -0
  31. package/rules/design-product.md +4 -0
  32. package/rules/design-rubric.md +4 -0
  33. package/rules/grounding.md +4 -0
  34. package/skills/qualia-build/SKILL.md +40 -46
  35. package/skills/qualia-discuss/SKILL.md +51 -68
  36. package/skills/qualia-handoff/SKILL.md +1 -0
  37. package/skills/qualia-issues/SKILL.md +151 -0
  38. package/skills/qualia-map/SKILL.md +78 -35
  39. package/skills/qualia-new/REFERENCE.md +139 -0
  40. package/skills/qualia-new/SKILL.md +45 -121
  41. package/skills/qualia-optimize/REFERENCE.md +202 -0
  42. package/skills/qualia-optimize/SKILL.md +72 -237
  43. package/skills/qualia-plan/SKILL.md +58 -65
  44. package/skills/qualia-polish-loop/REFERENCE.md +265 -0
  45. package/skills/qualia-polish-loop/SKILL.md +201 -0
  46. package/skills/qualia-polish-loop/fixtures/broken.html +117 -0
  47. package/skills/qualia-polish-loop/fixtures/clean.html +196 -0
  48. package/skills/qualia-polish-loop/scripts/loop.mjs +302 -0
  49. package/skills/qualia-polish-loop/scripts/playwright-capture.mjs +197 -0
  50. package/skills/qualia-polish-loop/scripts/score.mjs +176 -0
  51. package/skills/qualia-report/SKILL.md +141 -200
  52. package/skills/qualia-research/SKILL.md +28 -33
  53. package/skills/qualia-road/SKILL.md +103 -0
  54. package/skills/qualia-ship/SKILL.md +1 -0
  55. package/skills/qualia-task/SKILL.md +1 -1
  56. package/skills/qualia-test/SKILL.md +50 -2
  57. package/skills/qualia-triage/SKILL.md +152 -0
  58. package/skills/qualia-verify/SKILL.md +63 -104
  59. package/skills/qualia-zoom/SKILL.md +51 -0
  60. package/skills/zoho-workflow/SKILL.md +1 -1
  61. package/templates/CONTEXT.md +36 -0
  62. package/templates/decisions/ADR-template.md +30 -0
  63. package/tests/bin.test.sh +451 -7
  64. package/tests/state.test.sh +58 -0
@@ -936,6 +936,64 @@ else
936
936
  fail_case "backfill idempotent" "got=$RESULT"
937
937
  fi
938
938
 
939
+ # ─── v5.0.0 — next-report-id command ─────────────────────
940
+
941
+ # 52. next-report-id allocates first ID (seq=1, returns QS-REPORT-01)
942
+ TMP=$(make_project)
943
+ OUT=$(cd "$TMP" && $NODE "$STATE_JS" next-report-id 2>&1)
944
+ EXIT=$?
945
+ if [ "$EXIT" -eq 0 ] \
946
+ && echo "$OUT" | grep -q '"report_id": "QS-REPORT-01"' \
947
+ && echo "$OUT" | grep -q '"report_seq": 1'; then
948
+ pass "next-report-id allocates first ID (QS-REPORT-01, seq=1)"
949
+ else
950
+ fail_case "next-report-id first" "exit=$EXIT out=$OUT"
951
+ fi
952
+
953
+ # 53. next-report-id increments seq on second call
954
+ OUT2=$(cd "$TMP" && $NODE "$STATE_JS" next-report-id 2>&1)
955
+ if echo "$OUT2" | grep -q '"report_id": "QS-REPORT-02"' \
956
+ && echo "$OUT2" | grep -q '"report_seq": 2'; then
957
+ pass "next-report-id increments seq (QS-REPORT-02)"
958
+ else
959
+ fail_case "next-report-id increment" "out=$OUT2"
960
+ fi
961
+
962
+ # 54. next-report-id --peek does NOT increment (read-only preview)
963
+ TMP=$(make_project)
964
+ PEEK1=$(cd "$TMP" && $NODE "$STATE_JS" next-report-id --peek 2>&1)
965
+ PEEK2=$(cd "$TMP" && $NODE "$STATE_JS" next-report-id --peek 2>&1)
966
+ SEQ1=$(echo "$PEEK1" | grep -o '"report_seq": [0-9]*' | grep -o '[0-9]*')
967
+ SEQ2=$(echo "$PEEK2" | grep -o '"report_seq": [0-9]*' | grep -o '[0-9]*')
968
+ if [ "$SEQ1" = "1" ] && [ "$SEQ2" = "1" ]; then
969
+ pass "next-report-id --peek does not increment (seq stays at 1)"
970
+ else
971
+ fail_case "peek incremented" "first=$SEQ1 second=$SEQ2"
972
+ fi
973
+
974
+ # 55. next-report-id --peek followed by real call increments correctly
975
+ REAL=$(cd "$TMP" && $NODE "$STATE_JS" next-report-id 2>&1)
976
+ SEQ_REAL=$(echo "$REAL" | grep -o '"report_seq": [0-9]*' | grep -o '[0-9]*')
977
+ if [ "$SEQ_REAL" = "1" ]; then
978
+ pass "real call after peek allocates seq=1 (peek didn't consume)"
979
+ else
980
+ fail_case "peek consumed counter" "got seq=$SEQ_REAL"
981
+ fi
982
+
983
+ # 56. next-report-id reports peeked: false on real call
984
+ if echo "$REAL" | grep -q '"peeked": false'; then
985
+ pass "next-report-id real call reports peeked: false"
986
+ else
987
+ fail_case "next-report-id missing peeked: false"
988
+ fi
989
+
990
+ # 57. next-report-id reports peeked: true on --peek
991
+ if echo "$PEEK1" | grep -q '"peeked": true'; then
992
+ pass "next-report-id --peek reports peeked: true"
993
+ else
994
+ fail_case "next-report-id missing peeked: true"
995
+ fi
996
+
939
997
  # ─── Summary ─────────────────────────────────────────────
940
998
  echo ""
941
999
  echo "=== Results: $PASS passed, $FAIL failed ==="