analyzthis_design 1.20.1 → 2.0.1

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 (173) hide show
  1. package/HOW-TO-USE.md +436 -0
  2. package/README.md +183 -36
  3. package/agents/cards/chunk-planner.md +5 -0
  4. package/agents/cards/mood-board.md +13 -0
  5. package/agents/cards/query-expander.md +17 -0
  6. package/agents/cards/ranker.md +16 -0
  7. package/agents/cards/run-unchunked.md +7 -0
  8. package/agents/chain.json +15 -0
  9. package/agents/manifests/anuj.json +1 -0
  10. package/agents/manifests/arjun.json +1 -0
  11. package/agents/manifests/chunk-planner.json +18 -0
  12. package/agents/manifests/kavi.json +1 -0
  13. package/agents/manifests/meera.json +1 -0
  14. package/agents/manifests/mood-board.json +23 -0
  15. package/agents/manifests/noor.json +1 -0
  16. package/agents/manifests/priya.json +1 -0
  17. package/agents/manifests/query-expander.json +13 -0
  18. package/agents/manifests/raj.json +1 -0
  19. package/agents/manifests/ranker.json +13 -0
  20. package/agents/manifests/run-unchunked.json +19 -0
  21. package/agents/manifests/zara.json +1 -0
  22. package/agents/router.json +14 -0
  23. package/agents/session-schema.json +27 -0
  24. package/dist/.github/ISSUE_TEMPLATE/persona-feedback.yml +75 -0
  25. package/dist/HOW-TO-USE.md +436 -0
  26. package/dist/README.md +869 -0
  27. package/dist/agents/cards/anuj.md +28 -0
  28. package/dist/agents/cards/arjun.md +29 -0
  29. package/dist/agents/cards/chunk-planner.md +5 -0
  30. package/dist/agents/cards/design-director.md +19 -0
  31. package/dist/agents/cards/devi.md +15 -0
  32. package/dist/agents/cards/kavi.md +26 -0
  33. package/dist/agents/cards/meera.md +27 -0
  34. package/dist/agents/cards/mood-board.md +13 -0
  35. package/dist/agents/cards/noor.md +28 -0
  36. package/dist/agents/cards/priya.md +27 -0
  37. package/dist/agents/cards/query-expander.md +17 -0
  38. package/dist/agents/cards/raj.md +29 -0
  39. package/dist/agents/cards/ranker.md +16 -0
  40. package/dist/agents/cards/run-unchunked.md +7 -0
  41. package/dist/agents/cards/zara.md +30 -0
  42. package/dist/agents/chain.json +76 -0
  43. package/dist/agents/deliberation-schema.json +44 -0
  44. package/dist/agents/design-spec-schema.json +111 -0
  45. package/dist/agents/manifests/anuj.json +32 -0
  46. package/dist/agents/manifests/arjun.json +47 -0
  47. package/dist/agents/manifests/chunk-planner.json +18 -0
  48. package/dist/agents/manifests/design-critic.json +21 -0
  49. package/dist/agents/manifests/design-director.json +26 -0
  50. package/dist/agents/manifests/devi.json +31 -0
  51. package/dist/agents/manifests/kavi.json +34 -0
  52. package/dist/agents/manifests/meera.json +32 -0
  53. package/dist/agents/manifests/mood-board.json +23 -0
  54. package/dist/agents/manifests/noor.json +33 -0
  55. package/dist/agents/manifests/persona-orchestrator.json +17 -0
  56. package/dist/agents/manifests/priya.json +32 -0
  57. package/dist/agents/manifests/query-expander.json +13 -0
  58. package/dist/agents/manifests/raj.json +31 -0
  59. package/dist/agents/manifests/ranker.json +13 -0
  60. package/dist/agents/manifests/run-unchunked.json +19 -0
  61. package/dist/agents/manifests/ux-story-gate.json +23 -0
  62. package/dist/agents/manifests/zara.json +33 -0
  63. package/dist/agents/router.json +99 -0
  64. package/dist/agents/session-schema.json +152 -0
  65. package/dist/bin/cli.js +1 -1
  66. package/dist/lib/cache.js +1 -1
  67. package/dist/lib/chunk-executor.js +1 -0
  68. package/dist/lib/chunk-models.js +1 -0
  69. package/dist/lib/chunk-planner.js +1 -0
  70. package/dist/lib/chunk-router.js +1 -0
  71. package/dist/lib/chunk-run.js +1 -0
  72. package/dist/lib/chunk-synthesis.js +1 -0
  73. package/dist/lib/chunk-telemetry.js +1 -0
  74. package/dist/lib/collect.js +1 -1
  75. package/dist/lib/cost.js +1 -1
  76. package/dist/lib/dedup.js +1 -0
  77. package/dist/lib/deliberation.js +1 -1
  78. package/dist/lib/design-spec.js +1 -1
  79. package/dist/lib/evolve.js +1 -0
  80. package/dist/lib/export.js +1 -1
  81. package/dist/lib/feedback-submit.js +1 -1
  82. package/dist/lib/feedback.js +1 -1
  83. package/dist/lib/host-llm.js +1 -1
  84. package/dist/lib/install.js +1 -1
  85. package/dist/lib/knowledge.js +1 -1
  86. package/dist/lib/lessons.js +1 -0
  87. package/dist/lib/moodboard.js +1 -0
  88. package/dist/lib/orchestrator/run.js +1 -1
  89. package/dist/lib/outcome.js +1 -0
  90. package/dist/lib/platforms.js +1 -1
  91. package/dist/lib/provider.js +1 -1
  92. package/dist/lib/query-expander.js +1 -0
  93. package/dist/lib/ranker.js +1 -0
  94. package/dist/lib/reference-pack.js +1 -0
  95. package/dist/lib/research.js +1 -1
  96. package/dist/lib/retrieve.js +1 -1
  97. package/dist/lib/session.js +1 -1
  98. package/dist/lib/source-discovery.js +1 -1
  99. package/dist/lib/synthesis.js +1 -1
  100. package/dist/lib/token-gate.js +1 -1
  101. package/dist/skills/anuj/SKILL.md +92 -0
  102. package/dist/skills/arjun/SKILL.md +291 -0
  103. package/dist/skills/chunk-planner/SKILL.md +45 -0
  104. package/dist/skills/collect-knowledge/SKILL.md +20 -0
  105. package/dist/skills/deliberation-protocol/SKILL.md +131 -0
  106. package/dist/skills/design-critic/SKILL.md +191 -0
  107. package/dist/skills/design-director/SKILL.md +181 -0
  108. package/dist/skills/design-personas/SKILL.md +100 -0
  109. package/dist/skills/design-reference/SKILL.md +83 -0
  110. package/dist/skills/design-reference/app-interface.csv +31 -0
  111. package/dist/skills/design-reference/charts.csv +26 -0
  112. package/dist/skills/design-reference/colors.csv +162 -0
  113. package/dist/skills/design-reference/google-fonts.csv +1924 -0
  114. package/dist/skills/design-reference/icons.csv +106 -0
  115. package/dist/skills/design-reference/landing.csv +35 -0
  116. package/dist/skills/design-reference/products.csv +162 -0
  117. package/dist/skills/design-reference/react-performance.csv +45 -0
  118. package/dist/skills/design-reference/schema.json +159 -0
  119. package/dist/skills/design-reference/stacks/angular.csv +51 -0
  120. package/dist/skills/design-reference/stacks/astro.csv +54 -0
  121. package/dist/skills/design-reference/stacks/flutter.csv +53 -0
  122. package/dist/skills/design-reference/stacks/html-tailwind.csv +56 -0
  123. package/dist/skills/design-reference/stacks/jetpack-compose.csv +53 -0
  124. package/dist/skills/design-reference/stacks/laravel.csv +51 -0
  125. package/dist/skills/design-reference/stacks/nextjs.csv +53 -0
  126. package/dist/skills/design-reference/stacks/nuxt-ui.csv +51 -0
  127. package/dist/skills/design-reference/stacks/nuxtjs.csv +59 -0
  128. package/dist/skills/design-reference/stacks/react-native.csv +52 -0
  129. package/dist/skills/design-reference/stacks/react.csv +54 -0
  130. package/dist/skills/design-reference/stacks/shadcn.csv +61 -0
  131. package/dist/skills/design-reference/stacks/svelte.csv +54 -0
  132. package/dist/skills/design-reference/stacks/swiftui.csv +51 -0
  133. package/dist/skills/design-reference/stacks/threejs.csv +54 -0
  134. package/dist/skills/design-reference/stacks/vue.csv +50 -0
  135. package/dist/skills/design-reference/styles.csv +85 -0
  136. package/dist/skills/design-reference/typography.csv +75 -0
  137. package/dist/skills/design-reference/ui-reasoning.csv +162 -0
  138. package/dist/skills/design-reference/ux-guidelines.csv +100 -0
  139. package/dist/skills/design-spec/SKILL.md +106 -0
  140. package/dist/skills/devi/SKILL.md +114 -0
  141. package/dist/skills/getting-started/SKILL.md +144 -0
  142. package/dist/skills/kavi/SKILL.md +118 -0
  143. package/dist/skills/knowledge-bank/SKILL.md +43 -0
  144. package/dist/skills/meera/SKILL.md +76 -0
  145. package/dist/skills/mood-board/SKILL.md +113 -0
  146. package/dist/skills/noor/SKILL.md +96 -0
  147. package/dist/skills/persona-orchestrator/SKILL.md +220 -0
  148. package/dist/skills/priya/SKILL.md +75 -0
  149. package/dist/skills/raj/SKILL.md +77 -0
  150. package/dist/skills/run-unchunked/SKILL.md +49 -0
  151. package/dist/skills/ux-ideator/SKILL.md +187 -0
  152. package/dist/skills/ux-story-gate/SKILL.md +353 -0
  153. package/dist/skills/zara/SKILL.md +85 -0
  154. package/dist/supabase/deliberation-config.example.json +15 -0
  155. package/dist/supabase/feedback-config.example.json +7 -0
  156. package/dist/supabase/migrations/001_persona_feedback.sql +54 -0
  157. package/package.json +7 -4
  158. package/scripts/validate-csvs.js +197 -0
  159. package/skills/chunk-planner/SKILL.md +45 -0
  160. package/skills/design-reference/google-fonts.csv +1924 -1924
  161. package/skills/design-reference/products.csv +162 -162
  162. package/skills/design-reference/schema.json +159 -0
  163. package/skills/design-reference/stacks/angular.csv +1 -1
  164. package/skills/design-reference/stacks/astro.csv +1 -1
  165. package/skills/design-reference/stacks/laravel.csv +2 -2
  166. package/skills/design-reference/stacks/threejs.csv +54 -54
  167. package/skills/design-reference/styles.csv +85 -85
  168. package/skills/design-reference/typography.csv +75 -74
  169. package/skills/design-reference/ui-reasoning.csv +1 -1
  170. package/skills/getting-started/SKILL.md +12 -0
  171. package/skills/mood-board/SKILL.md +113 -0
  172. package/skills/persona-orchestrator/SKILL.md +35 -1
  173. package/skills/run-unchunked/SKILL.md +49 -0
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: deliberation-protocol
3
+ description: Adversarial deliberation protocol for all design personas. Personas ground objections in real task/PRD/UI context, run parallel critique rounds with low default satisfaction until consensus or Raj escalation. Use when personas hand off, deliberate, object, or review prior output.
4
+ ---
5
+
6
+ # Deliberation Protocol (v1.19)
7
+
8
+ Personas are **hard to satisfy by design**. They do not pass generic handoff documents — they **read, object, and ask contextual questions** about the real task, PRD, UI, and design system until evidence resolves objections or Raj arbitrates.
9
+
10
+ Schema: `agents/deliberation-schema.json`
11
+
12
+ ---
13
+
14
+ ## Two modes
15
+
16
+ | Mode | When | Output |
17
+ |------|------|--------|
18
+ | **Review** | Rounds 0..N-1, or when prior `persona_outputs` exist | Objections, questions, grounding — **not** a full rewrite |
19
+ | **Produce** | Final round after consensus or Raj ruling | Full persona output schema + deliberation JSON |
20
+
21
+ Default: `accepts_prior: false`, `satisfaction_with_prior` below threshold (0.4) until specific claims are addressed with evidence.
22
+
23
+ ---
24
+
25
+ ## Mandatory grounding
26
+
27
+ Every **objection** must include `grounded_in` citing one of:
28
+
29
+ - `task_map[N]` — primary user task from session
30
+ - PRD excerpt from knowledge bank / vault
31
+ - UI region (e.g. header, primary CTA, nav)
32
+ - DS token or component path from repo
33
+
34
+ **Forbidden:** generic handoff paragraphs ("Arjun scored X, therefore…") without contesting a **specific claim**.
35
+
36
+ ---
37
+
38
+ ## Deliberation JSON block (required)
39
+
40
+ End every review-round response with:
41
+
42
+ ```json deliberation
43
+ {
44
+ "grounding": [{"type": "task_map", "ref": "task_map[0]", "note": "Primary task is checkout, CTA buried"}],
45
+ "satisfaction_with_prior": 0.25,
46
+ "accepts_prior": false,
47
+ "objections": [{
48
+ "target_persona": "arjun",
49
+ "claim": "Friction is low because labels are clear",
50
+ "evidence_required": "Show task completion path in 3 steps from PRD",
51
+ "blocking": true,
52
+ "grounded_in": "task_map[0]: complete purchase in under 60s"
53
+ }],
54
+ "questions": ["Why is secondary nav above primary CTA given task_map[0]?"],
55
+ "revisions": ["Move primary CTA above fold, align with hierarchy rank #1"],
56
+ "verdict": "CONTEST"
57
+ }
58
+ ```
59
+
60
+ Verdict values: `CONTEST` | `ACCEPT` | `SHIP` | `REVISE` | `BLOCK`
61
+
62
+ ---
63
+
64
+ ## Parallel adversarial pairs
65
+
66
+ From `agents/chain.json` → `deliberation_groups`:
67
+
68
+ - **Critique:** Arjun → Meera∥Priya → Zara
69
+ - **Ideation:** Meera → Noor∥Anuj → Arjun → Zara∥Priya
70
+ - **Lite MoE:** Arjun → Meera
71
+
72
+ Parallel personas critique **each other's output** on the same round — not independent essays.
73
+
74
+ ---
75
+
76
+ ## Raj escalation
77
+
78
+ Activate Raj when:
79
+
80
+ - 2+ unresolved **blocking** objections
81
+ - Same claim repeats without new evidence (stalemate)
82
+ - Round >= `escalate_to_raj_after_round` (default 2) with open objections
83
+
84
+ **Order (v1.20):** Raj runs **after all deliberation groups complete** — e.g. Zara always runs before Raj in the critique chain.
85
+
86
+ Raj reads all `persona_outputs` + `deliberation.round_log` and issues mandatory Stalemate Resolution.
87
+
88
+ ---
89
+
90
+ ## CLI / config
91
+
92
+ ```bash
93
+ npx analyzthis_design run --task "..." --full --dry-run # shows deliberation groups
94
+ npx analyzthis_design run --task "..." --satisfaction 0.3 # harder to please
95
+ npx analyzthis_design run --task "..." --max-rounds 2
96
+ npx analyzthis_design run --task "..." --no-deliberate # legacy sequential
97
+ ```
98
+
99
+ Config (`~/.analyzthis_design/config.json`):
100
+
101
+ ```json
102
+ {
103
+ "deliberation": {
104
+ "satisfaction_threshold": 0.4,
105
+ "max_rounds": 3,
106
+ "parallel_pairs": [["noor", "anuj"], ["meera", "priya"]],
107
+ "objection_token_cap": 600,
108
+ "prior_output_chars_first": 800,
109
+ "prior_output_chars_rebuttal": 400,
110
+ "prior_output_chars_produce": 1200,
111
+ "context_pack_chars_objection": 1500,
112
+ "context_pack_chars_produce": 3000,
113
+ "escalate_to_raj_after_round": 2
114
+ }
115
+ }
116
+ ```
117
+
118
+ **Low satisfaction ≠ unlimited tokens.** Objection rounds use **lite persona cards** (not full SKILL.md), **600-token output cap** (enforced on API + Devi/host), and **400-char prior-output snippets** on rebuttal rounds (parsed deliberation JSON summary preferred). Only synthesis and Raj produce rounds use full schemas.
119
+
120
+ ---
121
+
122
+ ## Session state
123
+
124
+ After deliberation runs, `session-state.json` includes:
125
+
126
+ - `deliberation.round_log` — per-persona parsed blocks per round
127
+ - `deliberation.open_objections` — unresolved blocking items
128
+ - `deliberation.consensus_reached` — boolean
129
+ - `metrics.deliberation_rounds`, `objections_raised`, `objections_resolved`, `raj_escalations`
130
+
131
+ Inspect: `npx analyzthis_design session show` | `npx analyzthis_design metrics`
@@ -0,0 +1,191 @@
1
+ ---
2
+ name: design-critic
3
+ description: Run a structured multi-persona design critique with 4 specialist agents — Arjun (UX + Visual), Meera (Business), Priya (Feasibility), Zara (Delight). Includes an Information Hierarchy Gate that surfaces hierarchy failures regardless of composite score. Use when you want a rigorous, multi-dimensional review of a screen, flow, feature design, or UI mockup. Returns a Composite Score, verdict (SHIP/REVISE/BLOCK), and ranked action items.
4
+ ---
5
+
6
+ # Design Critic
7
+
8
+ Four specialist personas evaluate a design independently across UX, business, feasibility, and delight dimensions. Then synthesize into a composite verdict.
9
+
10
+ ---
11
+
12
+ ## Step -1: Load knowledge bank (highest priority)
13
+
14
+ Before anything else, read the knowledge-bank skill from your host (sibling preferred): `~/.cursor/skills/knowledge-bank/SKILL.md`, `~/.claude/skills/knowledge-bank/SKILL.md`, `~/.grok/skills/knowledge-bank/SKILL.md`, `~/.agents/skills/knowledge-bank/SKILL.md`, or legacy `~/.claude/commands/knowledge-bank.md`.
15
+
16
+ If the knowledge bank has content (i.e. it is not the "No knowledge bank connected yet" placeholder):
17
+ - Treat every section in the knowledge bank as **ground truth** for this project
18
+ - Brand guidelines, design decisions, product context, and research insights override your built-in defaults
19
+ - Reference specific knowledge bank entries when scoring or critiquing — quote them directly when relevant
20
+
21
+ If the knowledge bank is empty or missing, proceed without it.
22
+
23
+ ---
24
+
25
+ ## Step 0: Gather session context
26
+
27
+ Before starting, ask the user for (or read from `_session-context` if available):
28
+
29
+ ```
30
+ Product name:
31
+ Primary user (role, session frequency, entity volume):
32
+ North-star metric:
33
+ Tech stack + design system:
34
+ Is this a high-frequency working surface? [yes / no / mixed]
35
+ First-time user surfaces in scope? [yes / no]
36
+ Known research data (engagement rates, drop-off points, support tickets):
37
+ ```
38
+
39
+ If any field is blank, treat it as "unknown — do not assume."
40
+
41
+ ---
42
+
43
+ ## Phase 1 — Arjun (UX lens)
44
+
45
+ Read `~/.cursor/skills/arjun/SKILL.md` and activate Arjun.
46
+
47
+ Arjun produces two output blocks: UX Critique (Honeycomb) and Visual Design Audit. Score the UX Honeycomb using the grade rubric in his SKILL.md, then run the Visual Design Audit in full — do not skip it even if Desirable scored B or above. Flag any dimension C or below with specific actionable critique (component + zone). His combined score = (UX score + Visual score) / 2. Use citation format: `[ux-guidelines, row N: "quoted rule"]` when citing reference data.
48
+
49
+ ---
50
+
51
+ ## Phase 2 — Meera (Business lens)
52
+
53
+ Read `~/.cursor/skills/meera/SKILL.md` and activate Meera.
54
+
55
+ **Adversarial review (v1.19):** Read `deliberation-protocol` from your host skills dir (sibling preferred), e.g. `~/.cursor/skills/deliberation-protocol/SKILL.md`, `~/.claude/skills/deliberation-protocol/SKILL.md`, `~/.grok/skills/deliberation-protocol/SKILL.md`, `~/.agents/skills/deliberation-protocol/SKILL.md`, or legacy `~/.claude/commands/deliberation-protocol.md`. Do NOT open with a generic handoff paragraph. Instead:
56
+ - Read Arjun's output and **contest specific claims** with business evidence from task_map and knowledge bank
57
+ - Default `accepts_prior: false` until hierarchy matches north-star metric
58
+ - Meera runs **in parallel with Priya** in adversarial mode — each objects to the other's assumptions about adoption vs effort
59
+
60
+ Produce the Business Impact output block after review rounds. Use citation format: `[products.csv, row N: "quoted value"]`.
61
+
62
+ ---
63
+
64
+ ## Phase 3 — Priya (Feasibility lens)
65
+
66
+ Read `~/.cursor/skills/priya/SKILL.md` and activate Priya.
67
+
68
+ **Adversarial review:** Challenge Meera's adoption assumptions and Arjun's UX fixes with **concrete implementation cost**. Cite real stack/components from knowledge bank. Parallel with Meera — object, do not summarize.
69
+
70
+ Produce the Feasibility Analysis output block with T-shirt size using two-axis model.
71
+
72
+ ---
73
+
74
+ ## Phase 4 — Zara (Delight lens)
75
+
76
+ Read `~/.cursor/skills/zara/SKILL.md` and activate Zara.
77
+
78
+ **Adversarial review:** Given Priya's effort ceiling, **contest** whether delight budget exists. Object if delight would violate hierarchy or feasibility constraints.
79
+
80
+ If high-frequency working surface: output only — *"no delight needed here — speed is the craft."*
81
+
82
+ Otherwise produce the Delight Pass output block after deliberation rounds close.
83
+
84
+ ---
85
+
86
+ ## Phase 4.5 — Deliberation synthesis (before composite score)
87
+
88
+ Read `deliberation-protocol` from your host skills dir (sibling preferred), e.g. `~/.cursor/skills/deliberation-protocol/SKILL.md`, `~/.claude/skills/deliberation-protocol/SKILL.md`, `~/.grok/skills/deliberation-protocol/SKILL.md`, `~/.agents/skills/deliberation-protocol/SKILL.md`, or legacy `~/.claude/commands/deliberation-protocol.md`.
89
+
90
+ - Run objection rounds until `consensus_reached` or Raj escalates (2+ blocking objections, stalemate)
91
+ - CLI: `npx analyzthis_design run --task "..." --full` enforces this in standalone runtime
92
+ - Phase 5 composite score runs **only after** deliberation closes — not after pass-the-parcel handoffs
93
+
94
+ ---
95
+
96
+ ## Phase 5 — Composite score and verdict
97
+
98
+ After all four personas have spoken:
99
+
100
+ ```
101
+ ## Composite Score
102
+ Arjun (UX + Visual): [1–5] ← combined score: (UX score + Visual score) / 2
103
+ Meera (Business): [1–5]
104
+ Priya (Feasibility): [1–5]
105
+ Zara (Delight): [1–5]
106
+ Total: [sum /20]
107
+
108
+ Verdict:
109
+ SHIP = 16–20 (ready to build)
110
+ REVISE = 10–15 (specific changes required before build)
111
+ BLOCK = <10 (fundamental problems; activate Raj)
112
+
113
+ Top 3 actionable changes (ranked by impact):
114
+ 1. [change] — assigned to [Arjun/Meera/Priya/Zara]
115
+ 2. [change] — assigned to [...]
116
+ 3. [change] — assigned to [...]
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Information Hierarchy Gate
122
+
123
+ Run this check immediately after Phase 5, before the re-evaluation protocol or BLOCK escalation. Information hierarchy failures are treated like accessibility failures — they bypass the composite score math because a screen that leads with the wrong thing is broken regardless of how well everything else scores.
124
+
125
+ Check both signals:
126
+ 1. **Arjun's Visual Hierarchy dimension** (from the Visual Design Audit) — did it score C or below?
127
+ 2. **Meera's Hierarchy check line** (from the Business Impact block) — did rank #1 on screen fail to match the north-star driver?
128
+
129
+ ```
130
+ ## Information Hierarchy Gate
131
+ Arjun's Visual Hierarchy grade: [A–F]
132
+ Meera's Hierarchy check: [matches / does not match]
133
+ Gate status: [PASS / FAIL]
134
+ ```
135
+
136
+ **If either signal fails:** the hierarchy issue is inserted into the Top 3 actionable changes automatically, even if it would not otherwise have ranked in the top 3 by score impact. State explicitly: *"Inserted by the Information Hierarchy Gate — this bypasses normal ranking because [Arjun / Meera] flagged a hierarchy failure."*
137
+
138
+ **If both signals pass:** no gate action needed, proceed normally.
139
+
140
+ ---
141
+
142
+ ## Browser Verify Gate (post-phase)
143
+
144
+ After the Information Hierarchy Gate and before declaring SHIP, if a running URL is available, run the same steps as `ux-story-gate` Phase 4.5: navigate → snapshot → click the primary task → screenshot at mobile + desktop. Record results in session state (`verify_results`). Do not declare SHIP if the primary interaction is broken. If browser tools are unavailable, mark `verify_results.primary_task: "not_run"` explicitly.
145
+
146
+ ---
147
+
148
+ ## Re-evaluation Protocol (after REVISE verdict)
149
+
150
+ When the user applies changes and re-shares the updated design:
151
+
152
+ 1. Run only the personas originally assigned to the Top 3 changes — not all four
153
+ 2. Re-score only the Honeycomb dimensions that were flagged C or below
154
+ 3. Issue a delta verdict:
155
+
156
+ ```
157
+ ## Re-evaluation
158
+ Changes applied: [list what the user addressed]
159
+ Personas re-run: [Arjun / Meera / Priya / Zara — only those assigned]
160
+
161
+ Updated scores:
162
+ [Persona]: [old score] → [new score] — [one-line reason]
163
+ [Persona]: [old score] → [new score] — [one-line reason]
164
+
165
+ Total: [old /20] → [new /20]
166
+ Updated verdict: SHIP / REVISE / BLOCK
167
+ Information Hierarchy Gate: [PASS / FAIL — re-check if it was previously FAIL]
168
+ ```
169
+
170
+ If new total ≥ 16 AND the Information Hierarchy Gate passes: verdict upgrades to SHIP — no further changes required.
171
+ If new total remains <10, or the Information Hierarchy Gate still fails: activate Raj.
172
+
173
+ ---
174
+
175
+ ## BLOCK escalation
176
+
177
+ If Composite Score < 10, or if two personas reach a structural objection neither will concede:
178
+
179
+ Read `~/.cursor/skills/raj/SKILL.md` and activate Raj.
180
+ Raj produces a revision directive using the mandatory Decision Format from his skill file.
181
+
182
+ ---
183
+
184
+ ## Relationship rules between personas
185
+
186
+ - Arjun owns the visual foundation (Visual Design Audit) — he diagnoses and prescribes visual fixes himself, in full, on every pass
187
+ - Zara adds exactly ONE delight moment on top of Arjun's visual foundation — she does not re-audit visual quality
188
+ - Meera translates Arjun's friction points into retention and ARR language
189
+ - Priya cost-checks every Zara delight addition — names cost (low/medium/high) explicitly
190
+ - Raj only speaks during stalemate, BLOCK, or a persistent Information Hierarchy Gate failure — does not volunteer opinions
191
+ - Information hierarchy is a cross-cutting priority, not a single persona's dimension — Arjun grades the visual execution of it, Meera checks it against the north-star metric, and the gate enforces that a failure on either signal cannot be outscored by strong performance elsewhere
@@ -0,0 +1,181 @@
1
+ ---
2
+ name: design-director
3
+ description: End-to-end design director — ideation, DesignSpec synthesis, spec gates (DS + hierarchy + visual), then guided implementation when build_approved. Use when you want personas to guide WHAT and HOW to design like a senior designer, not just critique.
4
+ ---
5
+
6
+ # Design Director
7
+
8
+ Orchestrates **brief → wireframe → DesignSpec → spec gates → implementation → verify**.
9
+
10
+ Unlike `/persona-orchestrator` (critique-only) and unlike bare `/ux-ideator` (stops at wireframe), this skill owns the full **producer** path.
11
+
12
+ ---
13
+
14
+ ## When to use
15
+
16
+ - "Design and build this screen"
17
+ - "Guide the LLM on how to design our settings page"
18
+ - "Turn this wireframe into an implementable spec"
19
+ - After `/kavi` when starting a new feature
20
+
21
+ **Prerequisites:** Run `/kavi` or `npx analyzthis_design collect` so tokens and components come from the repo.
22
+
23
+ ---
24
+
25
+ ## Phase 0 — Session + knowledge
26
+
27
+ 1. `npx analyzthis_design session show` — init if missing
28
+ 2. Read knowledge-bank skill (sibling or `~/.cursor/skills/knowledge-bank/SKILL.md`)
29
+ 3. Set `mode`:
30
+ - User said assess/propose/review only → `assess_only` (stop after spec)
31
+ - User said build/implement/ship/apply → `build_approved`
32
+
33
+ Persist `mode` to session state.
34
+
35
+ ---
36
+
37
+ ## Phase 1 — Intake (ux-story-gate)
38
+
39
+ Run Phases 0–1.5 from `skills/ux-story-gate/SKILL.md`:
40
+
41
+ - PRD / task map
42
+ - DS checklist + Figma node if available
43
+ - MoE routing (for context only — this skill overrides chain selection)
44
+
45
+ Do not skip the task map.
46
+
47
+ ---
48
+
49
+ ## Phase 2 — Ideation (wireframes)
50
+
51
+ Run `skills/ux-ideator/SKILL.md` Phases 1–4 (Meera → Noor + Anuj → deliberation).
52
+
53
+ **Mandatory:** full Concept A/B text wireframes (deep schema), not lite cards.
54
+
55
+ Output: one **synthesized wireframe** with declared information hierarchy.
56
+
57
+ ---
58
+
59
+ ## Phase 3 — DesignSpec synthesis
60
+
61
+ Read `skills/design-spec/SKILL.md`.
62
+
63
+ Convert the synthesized wireframe into a complete **DesignSpec** JSON block:
64
+
65
+ - Map every visible region → `layout.regions`
66
+ - Map every interactive element → `components[]` with real import paths from the repo
67
+ - Copy token values from knowledge bank / tailwind.config — set `tokens.source`
68
+ - Fill all four `states`
69
+ - Add `do` / `dont` from persona deliberation
70
+ - Set `"status": "spec_review"`
71
+
72
+ Persist:
73
+
74
+ ```bash
75
+ npx analyzthis_design spec validate # host extracts ```design-spec``` block and validates
76
+ ```
77
+
78
+ Update session `design_spec` and `information_hierarchy.ranking` from the spec.
79
+
80
+ ---
81
+
82
+ ## Phase 4 — Spec gates + adversarial spec review (v1.19)
83
+
84
+ Read `deliberation-protocol` from your host skills dir (sibling preferred), e.g. `~/.cursor/skills/deliberation-protocol/SKILL.md`, `~/.claude/skills/deliberation-protocol/SKILL.md`, `~/.grok/skills/deliberation-protocol/SKILL.md`, `~/.agents/skills/deliberation-protocol/SKILL.md`, or legacy `~/.claude/commands/deliberation-protocol.md`. After DesignSpec draft, run **adversarial review loops** before `spec_verdict`:
85
+
86
+ | Persona | Contests |
87
+ |---------|----------|
88
+ | Arjun | Information hierarchy vs layout regions; visual/token choices |
89
+ | Priya | Component import paths, effort, state machine traps |
90
+ | Zara | Delight scope vs feasibility budget |
91
+
92
+ Each persona: Review mode first — grounded objections citing `task_map`, real `import_path` values, DS tokens. Default `accepts_prior: false`. Raj on stalemate.
93
+
94
+ CLI: personas debate during `npx analyzthis_design run --task "..." --full` with deliberation enabled.
95
+
96
+ ### 4a — DS gate
97
+
98
+ Check `ds_checklist` from Phase 1. Spec must use token names, not invented hex. Fail → `"status": "revise"`, list fixes in `spec_verdict.notes`.
99
+
100
+ ### 4b — Hierarchy gate
101
+
102
+ Rank #1 in `information_hierarchy` must match the component with `hierarchy_rank: 1` and the dominant layout region.
103
+
104
+ ### 4c — Arjun visual pass on the spec
105
+
106
+ Read `skills/arjun/SKILL.md` — scoped **spec review only**:
107
+
108
+ - Typography scale consistent?
109
+ - Spacing rhythm (`tokens.spacing`) sufficient?
110
+ - Color classes WCAG-safe per knowledge bank?
111
+
112
+ Update `spec_verdict`. All three pass → set `"status": "ship"`.
113
+
114
+ **If any gate fails:** stop. Do not implement. Return Top 3 spec fixes.
115
+
116
+ ---
117
+
118
+ ## Phase 5 — Implementation (build_approved + ship only)
119
+
120
+ Skip entirely if `mode: assess_only` or `status !== "ship"`.
121
+
122
+ **The DesignSpec is the contract.** The host LLM must:
123
+
124
+ 1. Read `session-state.json` → `design_spec`
125
+ 2. Implement **only** what the spec lists — same components, tokens, regions, states
126
+ 3. Use TypeScript + Tailwind + existing project components (match user stack)
127
+ 4. No new colors, no extra primary CTAs, no components not in `components[]`
128
+
129
+ Handoff prompt to self:
130
+
131
+ > Implement `{design_spec.screen_name}` exactly per session `design_spec`. Run Priya sanity check after first draft.
132
+
133
+ Optional: run `skills/priya/SKILL.md` for effort confirmation before coding.
134
+
135
+ ---
136
+
137
+ ## Phase 6 — Post-build verify
138
+
139
+ 1. Run ux-story-gate Phase 4.5 (browser) if URL available
140
+ 2. Re-run **hierarchy gate** on the built UI (screenshot or DOM): is rank #1 still dominant?
141
+ 3. Arjun delta: visual audit on implemented screen vs spec — REVISE only flagged sections
142
+
143
+ Record in `verify_results` and session `design_spec.spec_verdict`.
144
+
145
+ ---
146
+
147
+ ## Output summary block
148
+
149
+ ```
150
+ ## Design Director — Run Summary
151
+ Mode: [assess_only | build_approved]
152
+ Wireframe: [synthesized concept — one line]
153
+ Spec status: [draft | spec_review | ship | revise]
154
+ DS gate: [pass | fail]
155
+ Hierarchy gate: [pass | fail]
156
+ Arjun spec pass: [pass | fail]
157
+ Implementation: [done | skipped — reason]
158
+ Verify: [pass | fail | not_run]
159
+ Next step: [implement | fix spec | fix UI per delta list]
160
+ ```
161
+
162
+ ---
163
+
164
+ ## Relationship to other skills
165
+
166
+ | Skill | Role |
167
+ |---|---|
168
+ | `/ux-ideator` | Wireframes + deliberation (Phases 1–2 of this skill) |
169
+ | `/design-spec` | Spec format + validation rules |
170
+ | `/persona-orchestrator` | Critique existing UI — use **after** build for SHIP/REVISE |
171
+ | `/design-critic` | Multi-persona review — not the producer path |
172
+
173
+ ---
174
+
175
+ ## CLI helpers
176
+
177
+ ```bash
178
+ npx analyzthis_design spec template
179
+ npx analyzthis_design spec show
180
+ npx analyzthis_design spec validate --file design-spec.json
181
+ ```
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: design-personas
3
+ description: Load the session context template for design persona workflows. Use this to set up context before running design-critic or ux-ideator. All 7 personas (Arjun, Meera, Priya, Zara, Noor, Anuj, Raj) read this context at runtime to ground their critiques in project-specific data.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Design Personas — Session Context
8
+
9
+ This skill provides the session context template used by all 7 design personas. Fill this in before starting a `design-critic` or `ux-ideator` session. Fields left blank are treated as "unknown — do not assume."
10
+
11
+ ---
12
+
13
+ ## How to use
14
+
15
+ 1. Copy the template below into your chat
16
+ 2. Fill in what you know — leave blank what you don't
17
+ 3. Run `/design-critic` or `/ux-ideator`
18
+
19
+ ---
20
+
21
+ ## Session Context Template
22
+
23
+ ```
24
+ ## Product
25
+ Product name:
26
+ Industry / vertical:
27
+ Product type: [B2B SaaS / marketplace / consumer app / internal tool / other]
28
+ Stage: [early / growth / mature]
29
+
30
+ ## Primary user
31
+ Who they are:
32
+ Session frequency: [daily / weekly / monthly / occasional]
33
+ Entity volume: [e.g. "50 campaigns", "200 orders", "10 clients"]
34
+ Key pain points:
35
+
36
+ ## Business context (Meera reads this)
37
+ Primary north-star metric: [e.g. retention, ARR, DAU, conversion rate]
38
+ Customer segments: [e.g. enterprise / mid-market / SMB]
39
+ Competitive context: [key competitors, parity gaps, differentiation opportunities]
40
+ Pricing model: [subscription / usage-based / freemium / other]
41
+
42
+ ## User research (Arjun reads this)
43
+ Available research: [session recordings / interviews / surveys / support tickets / analytics]
44
+ Key engagement data: [e.g. "feature X has <5% click rate", "users drop off at step 3"]
45
+ Known friction points:
46
+ Empty / error states that exist:
47
+
48
+ ## Expert-user profile (Anuj reads this)
49
+ Who the expert user is:
50
+ High-frequency actions (>10×/session):
51
+ Actions that currently require multiple clicks but shouldn't:
52
+ Bulk operations needed:
53
+
54
+ ## Tech stack (Priya reads this)
55
+ Frontend: [e.g. React, Vue, Next.js]
56
+ Backend: [e.g. REST API, GraphQL]
57
+ Known infrastructure constraints:
58
+ Third-party dependencies relevant to this feature:
59
+ Design system / component library:
60
+ Components already available for this feature:
61
+
62
+ ## Design system (Noor + Anuj + Priya read this)
63
+ Component library:
64
+ Known gaps (components not in library):
65
+ Token system: [CSS vars / design tokens / Tailwind / other]
66
+
67
+ ## PRD context (Raj reads this)
68
+ Primary persona priority: [who does the PRD explicitly prioritize?]
69
+ Stated success criteria:
70
+ Known constraints ("must not" statements):
71
+ Prior design decisions already made:
72
+
73
+ ## Surface classification (Zara reads this)
74
+ Is this a high-frequency working surface? [yes / no / mixed]
75
+ First-time-user surfaces in scope:
76
+ Once-ever moments in scope (onboarding, first success, etc.):
77
+ Available animation/motion capabilities:
78
+
79
+ ## Recent product decisions (all personas read this)
80
+ 1.
81
+ 2.
82
+ 3.
83
+
84
+ ## What is NOT in scope
85
+ -
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Persona reference map
91
+
92
+ | Persona | Role | Active in |
93
+ |---------|------|-----------|
94
+ | Arjun | UX Agent — UX Honeycomb | `design-critic` Ph5, `ux-ideator` Ph2 |
95
+ | Meera | Business Agent — retention, ARR, GTM | `design-critic` Ph5, `ux-ideator` Ph1 |
96
+ | Priya | Feasibility Agent — engineering effort | `design-critic` Ph5, `ux-ideator` Ph6 |
97
+ | Zara | Delight Agent — Peak-End, one moment | `design-critic` Ph5, `ux-ideator` Ph5.5 |
98
+ | Noor | IA Architect — Concept A, minimalist | `ux-ideator` Ph2, Ph3, Ph4 |
99
+ | Anuj | Power-User Advocate — Concept B, dense | `ux-ideator` Ph2, Ph3, Ph4 |
100
+ | Raj | Arbitrator — stalemate only | `ux-ideator` Ph4, Ph5 fallback |
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: design-reference
3
+ description: Shared design reference data used by all 7 design personas. Contains color palettes, UI styles, typography pairings, UX guidelines, product-type patterns, landing page layouts, chart types, icon library, mobile interface rules, React performance patterns, and stack-specific guidance. Personas read specific files from this directory when making design decisions.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Design Reference Data
8
+
9
+ Shared knowledge base for all 7 design personas. Each CSV covers a specific design domain. Personas read only the files relevant to their current task — see the mapping below.
10
+
11
+ ---
12
+
13
+ ## File index
14
+
15
+ | File | What it contains | Who reads it |
16
+ |---|---|---|
17
+ | `ux-guidelines.csv` | Platform-specific UX rules — scroll behavior, nav, feedback, accessibility (WCAG) | Arjun, Noor, Anuj |
18
+ | `ui-reasoning.csv` | UI pattern decisions by product category — recommended style, color mood, effects, anti-patterns | Arjun, Noor, Meera |
19
+ | `app-interface.csv` | Mobile-specific rules — icon labels, touch targets, gestures (iOS/Android/React Native) | Arjun, Anuj |
20
+ | `styles.csv` | 85 UI styles — keywords, best-for, do-not-use-for, light/dark, performance, accessibility, Tailwind compatibility | Zara, Noor |
21
+ | `colors.csv` | 161 WCAG-tested color palettes — primary/secondary/accent/background tokens by product type | Zara, Meera, Noor |
22
+ | `typography.csv` | 74 font pairings — heading + body fonts, mood keywords, best-for, CSS import, Tailwind config | Zara |
23
+ | `google-fonts.csv` | Full Google Fonts catalog — use only when picking a specific font pairing | Zara (conditional) |
24
+ | `products.csv` | 162 product type → style mappings — recommended style, landing pattern, dashboard style, color focus | Meera, Raj |
25
+ | `landing.csv` | Landing page layout patterns — section order, CTA placement, color strategy, conversion optimization | Meera, Zara |
26
+ | `charts.csv` | 25 chart types — when to use, when not to use, accessibility grade, library recommendation | Arjun, Zara |
27
+ | `icons.csv` | Phosphor icon catalog — name, keywords, import code, usage context, style | Noor, Zara |
28
+ | `react-performance.csv` | React rendering patterns — memoization, lazy loading, virtualization, bundle splitting | Priya |
29
+ | `stacks/nextjs.csv` | Next.js-specific patterns and component guidance | Priya |
30
+ | `stacks/react.csv` | React-specific patterns | Priya |
31
+ | `stacks/shadcn.csv` | ShadCN component availability and usage | Priya, Noor, Anuj |
32
+ | `stacks/[other].csv` | angular, astro, flutter, html-tailwind, jetpack-compose, laravel, nuxt-ui, nuxtjs, react-native, svelte, swiftui, threejs, vue | Priya (match to session context stack) |
33
+
34
+ ---
35
+
36
+ ## How personas use this data
37
+
38
+ Each persona's SKILL.md specifies which files to read and when. Personas do NOT read all files at once — they read the minimum set needed for the current evaluation.
39
+
40
+ **Reading rule:** Read the CSV, extract the rows relevant to the product type / stack / style in the session context, and use that data to ground your output in specific, named values rather than abstract advice.
41
+
42
+ ## Citation format (mandatory for all personas)
43
+
44
+ Every time you cite a value from a reference file, use this format inline:
45
+
46
+ ```
47
+ [filename, row N: "exact quoted value from the relevant column"]
48
+ ```
49
+
50
+ **Examples:**
51
+ - `[ux-guidelines.csv, row 22: "Minimum 44×44px touch targets — Severity: High"]`
52
+ - `[ui-reasoning.csv, row 6: "Financial Dashboard — must_have: real-time-updates, must_have: high-contrast"]`
53
+ - `[styles.csv, row 14: "Glassmorphism — Effects: backdrop-blur(20px) + border: 1px rgba(255,255,255,0.2)"]`
54
+ - `[stacks/shadcn.csv, row 8: "DataTable — supports column visibility toggle and row selection"]`
55
+
56
+ **Never cite abstractly.** "Add a 44px touch target" is wrong. `[ux-guidelines.csv, row 22: "Minimum 44×44px — Severity: High"]` is correct. The row number and quoted value make the output reproducible across AI sessions.
57
+
58
+ ---
59
+
60
+ ## Reference paths (after install)
61
+
62
+ All files live at: `~/.cursor/skills/design-reference/`
63
+
64
+ ```
65
+ ~/.cursor/skills/design-reference/
66
+ ├── ux-guidelines.csv
67
+ ├── ui-reasoning.csv
68
+ ├── app-interface.csv
69
+ ├── styles.csv
70
+ ├── colors.csv
71
+ ├── typography.csv
72
+ ├── google-fonts.csv
73
+ ├── products.csv
74
+ ├── landing.csv
75
+ ├── charts.csv
76
+ ├── icons.csv
77
+ ├── react-performance.csv
78
+ └── stacks/
79
+ ├── nextjs.csv
80
+ ├── react.csv
81
+ ├── shadcn.csv
82
+ └── ... (16 stacks total)
83
+ ```