analyzthis_design 1.7.0 → 1.10.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 (42) hide show
  1. package/README.md +250 -111
  2. package/agents/cards/anuj.md +22 -0
  3. package/agents/cards/arjun.md +23 -0
  4. package/agents/cards/meera.md +21 -0
  5. package/agents/cards/noor.md +22 -0
  6. package/agents/cards/priya.md +21 -0
  7. package/agents/cards/raj.md +23 -0
  8. package/agents/cards/zara.md +24 -0
  9. package/agents/chain.json +55 -0
  10. package/agents/manifests/anuj.json +31 -0
  11. package/agents/manifests/arjun.json +46 -0
  12. package/agents/manifests/design-critic.json +21 -0
  13. package/agents/manifests/meera.json +31 -0
  14. package/agents/manifests/noor.json +32 -0
  15. package/agents/manifests/persona-orchestrator.json +17 -0
  16. package/agents/manifests/priya.json +31 -0
  17. package/agents/manifests/raj.json +30 -0
  18. package/agents/manifests/ux-story-gate.json +23 -0
  19. package/agents/manifests/zara.json +32 -0
  20. package/agents/router.json +64 -0
  21. package/agents/session-schema.json +61 -0
  22. package/dist/bin/cli.js +1 -1
  23. package/dist/lib/cache.js +1 -0
  24. package/dist/lib/cost.js +1 -0
  25. package/dist/lib/export.js +1 -0
  26. package/dist/lib/install.js +1 -1
  27. package/dist/lib/knowledge.js +1 -1
  28. package/dist/lib/orchestrator/run.js +2 -0
  29. package/dist/lib/research.js +2 -0
  30. package/dist/lib/retrieve.js +1 -0
  31. package/dist/lib/session.js +2 -0
  32. package/package.json +9 -3
  33. package/skills/anuj/SKILL.md +10 -0
  34. package/skills/arjun/SKILL.md +10 -0
  35. package/skills/design-critic/SKILL.md +6 -0
  36. package/skills/meera/SKILL.md +10 -0
  37. package/skills/noor/SKILL.md +10 -0
  38. package/skills/persona-orchestrator/SKILL.md +141 -0
  39. package/skills/priya/SKILL.md +10 -0
  40. package/skills/raj/SKILL.md +10 -0
  41. package/skills/ux-story-gate/SKILL.md +115 -3
  42. package/skills/zara/SKILL.md +10 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Analyzthis_Design
2
2
 
3
- A set of AI design personas and a task-first evaluation framework that plugs into Cursor, Claude Code, and Codex CLI as slash commands.
3
+ A set of AI design personas and a task-first evaluation framework that plugs into Cursor, Claude Code, and Codex CLI as slash commands — plus an agentic MoE router with shared session state so you can call the same graph from any IDE or from the CLI.
4
4
 
5
5
  Install once. Run structured UX critiques, multi-phase ideation, and task-grounded screen reviews — directly inside your AI chat.
6
6
 
@@ -38,150 +38,289 @@ npx analyzthis_design --target all
38
38
 
39
39
  | Command | What it does |
40
40
  |---|---|
41
- | `/ux-story-gate` | **Recommended first step.** Discovers PRDs and user stories from your knowledge bank and repo, builds a task map, routes to the right personas, and synthesises findings by task with P0/P1/P2 priorities. |
42
- | `/design-critic` | 4-persona critique `SHIP / REVISE / BLOCK` verdict with a Composite Score out of 20. |
41
+ | `/persona-orchestrator` | **Recommended agentic entry point.** Loads MoE router + session state, runs ux-story-gate intake, executes the right persona chain, enforces DS / hierarchy / verify gates, synthesises a SHIP/REVISE/BLOCK verdict. |
42
+ | `/ux-story-gate` | Task-first gate: discovers PRDs, DS/Figma discovery, MoE routing, browser verify, assess-only mode. |
43
+ | `/design-critic` | 4-persona critique → `SHIP / REVISE / BLOCK` verdict with a Composite Score out of 20 + Information Hierarchy Gate. |
43
44
  | `/ux-ideator` | 6-phase ideation → two competing IA concepts, deliberation, delight pass, feasibility check. |
44
45
 
45
46
  ### 7 Individual Personas
46
47
 
47
- Invoke directly for targeted, already-grounded questions. For full screen evaluation, prefer `/ux-story-gate`.
48
+ Invoke directly for targeted, already-grounded questions. For full screen evaluation, prefer `/persona-orchestrator` or `/ux-story-gate`.
48
49
 
49
50
  | Command | Persona | What they evaluate |
50
51
  |---|---|---|
51
- | `/arjun` | UX Agent | UX Honeycomb (7 dimensions, A–F): Useful, Usable, Findable, Credible, Accessible, Desirable, Valuable |
52
- | `/meera` | Business Agent | Retention, ARR, GTM lever, adoption risk by customer segment |
53
- | `/priya` | Feasibility Agent | Engineering effort (T-shirt sizing, 2-axis model), state machine traps, implementation risks |
54
- | `/zara` | Delight Agent | Picks exactly ONE peak delight moment — or says "speed is the craft" for working surfaces |
55
- | `/noor` | IA Architect | Minimalist, progressive-disclosure wireframe Concept A, ≤3 nav levels |
56
- | `/anuj` | Power-User Advocate | Dense, expert-optimized wireframeConcept B, bulk actions, keyboard shortcuts |
52
+ | `/arjun` | UX + Visual Design | UX Honeycomb + Visual Design Audit (hierarchy, color, type, spacing, components, style fit, micro-interactions) |
53
+ | `/meera` | Business Agent | Retention, ARR, GTM lever, adoption risk; hierarchy vs north-star check |
54
+ | `/priya` | Feasibility Agent | Engineering effort (T-shirt sizing, 2-axis model), state machine traps |
55
+ | `/zara` | Delight Agent | Exactly ONE peak delight moment — never contrast/token recovery (routes to DS Gate + Arjun) |
56
+ | `/noor` | IA Architect | Minimalist Concept A + declared ranked information hierarchy |
57
+ | `/anuj` | Power-User Advocate | Dense Concept B — bulk actions, keyboard shortcuts, hierarchy kept prominent |
57
58
  | `/raj` | Arbitrator | Resolves persona stalemates using 5 ranked product principles. Never speaks first. |
58
59
 
59
60
  ### Supporting skills
60
61
 
61
62
  | Command | Purpose |
62
63
  |---|---|
63
- | `/design-personas` | Session context template — fill in once before a session to ground all 7 personas in project-specific data |
64
+ | `/design-personas` | Session context template — fill in once before a session |
64
65
  | `/knowledge-bank` | Auto-populated from your connected vault. All personas read this first. |
66
+ | `/design-reference` | CSV reference data (colors, typography, UX guidelines, stacks, …) |
65
67
 
66
68
  ---
67
69
 
68
- ## UX Story Gate — How it works
70
+ ## Agentic system (v1.10)
69
71
 
70
- `/ux-story-gate` is the task-first entry point for any screen evaluation. It runs in 5 phases:
72
+ ```
73
+ User ask / Figma URL
74
+
75
+ /persona-orchestrator
76
+
77
+ ux-story-gate Phases 0–1.5 (PRD + DS/Figma + MoE router)
78
+
79
+ MoE subset (default, 1–2 experts) OR design-critic / ideation chain (explicit "full")
80
+
81
+ Hard gates: DS tokens → Information Hierarchy → Browser verify (skipped if assess_only + no URL)
82
+
83
+ Session state + cost metrics persisted → SHIP / REVISE / BLOCK
84
+ ```
85
+
86
+ **Shared session state** lives at `~/.analyzthis_design/sessions/{project-id}/session-state.json` so Ask→Agent turns do not re-derive the task map, DS checklist, or routing decision.
71
87
 
72
- **Phase 0 — PRD Discovery (automatic)**
73
- Before asking you anything, it scans:
74
- 1. Your connected knowledge bank for user stories, PRDs, acceptance criteria
75
- 2. The current repo for `PRD*.md`, `docs/**/*.md`, `requirements/*.md`, and any file containing "user story / acceptance criteria / done when"
88
+ ```bash
89
+ npx analyzthis_design session init
90
+ npx analyzthis_design session show
91
+ npx analyzthis_design session reset
92
+ ```
76
93
 
77
- It builds a draft task map from what it finds and asks you to confirm — you correct, not fill in from scratch.
94
+ **Portable agent graph** (same manifests for Cursor / Claude / Codex / CLI):
78
95
 
79
- **Phase 1 — Task Map Gate**
80
- If no PRD context is found anywhere, it asks for the task map manually:
81
- - Which persona? (e.g. Retailer Admin, Media Sales)
82
- - What task? (verb + object)
83
- - How often? (daily / weekly / one-time)
84
- - Done when?
85
- - Fails when?
96
+ ```
97
+ agents/
98
+ manifests/ # one JSON per persona + orchestrator
99
+ router.json # MoE problem-type expert list
100
+ chain.json # default + ideation sequential graphs
101
+ session-schema.json
102
+ ```
103
+
104
+ **Standalone runtime (v2):**
105
+
106
+ ```bash
107
+ # Print routing only (no API calls)
108
+ npx analyzthis_design run --task "Fix contrast on landing page" --dry-run
109
+
110
+ # Call Anthropic / OpenAI per persona step (MoE subset, lite schema — the default)
111
+ export ANTHROPIC_API_KEY=sk-...
112
+ npx analyzthis_design run --task "Review this screen" --figma https://figma.com/... --provider anthropic
113
+
114
+ # Force the full design-critic chain, or bypass the router entirely
115
+ npx analyzthis_design run --task "Full critique of onboarding" --full
116
+ npx analyzthis_design run --task "Just check spacing" --experts arjun
117
+ ```
118
+
119
+ Provider defaults live in `~/.analyzthis_design/config.json`:
120
+
121
+ ```json
122
+ {
123
+ "orchestrator": {
124
+ "provider": "anthropic",
125
+ "model": "claude-sonnet-5",
126
+ "mode": "lite",
127
+ "tiers": {
128
+ "structured": { "provider": "openai", "model": "gpt-4o-mini" },
129
+ "critique": { "provider": "anthropic", "model": "claude-sonnet-5" },
130
+ "arbitrate": { "provider": "anthropic", "model": "claude-sonnet-5" }
131
+ },
132
+ "max_tokens": { "structured": 900, "critique": 1800, "arbitrate": 1200 }
133
+ },
134
+ "pricing": {
135
+ "glm-4.5-flash": { "input_per_m": 0, "output_per_m": 0 },
136
+ "gemini-2.5-flash": { "input_per_m": 0.30, "output_per_m": 2.50 },
137
+ "claude-sonnet-5": { "input_per_m": 2, "output_per_m": 10 },
138
+ "gpt-4o": { "input_per_m": 2.50, "output_per_m": 10 }
139
+ },
140
+ "research": { "provider": "https://example.com/search?q={query}" }
141
+ }
142
+ ```
86
143
 
87
- **Phase 2 Field Veto Pass**
88
- Every field, button, and section on the screen gets a verdict:
89
- - ✅ Keep — maps to a task
90
- - ❌ Cut — no task owner
91
- - ⚠️ Clarify — ambiguous
144
+ The `effort_matrix` and `gate_override` live in `agents/chain.json` (not the user config) so they ship with the package and stay in sync with the agent graph. `pricing` is user-configured so you control your own $-cost reporting.
92
145
 
93
- **Phase 3 — Scale & States**
94
- Forces declaration of scale (rows/entities), and checks for Empty / Error / Loading / Edge states before personas run.
146
+ **Web research:**
95
147
 
96
- **Phase 4 — Persona Routing**
97
- Routes to the right personas based on task characteristics — not screen type.
148
+ ```bash
149
+ npx analyzthis_design research --url https://example.com/design-tokens
150
+ npx analyzthis_design research --query "EY design system tokens"
151
+ ```
98
152
 
99
- **Phase 5 Synthesis**
100
- A Task × Finding table with P0 / P1 / P2 priorities and a build-ready verdict.
153
+ Writes to `~/.analyzthis_design/sessions/{id}/web-context.md` and merges into the knowledge bank on `sync`.
101
154
 
102
155
  ---
103
156
 
104
- ## Knowledge Bank Connect your vault
157
+ ## Efficiency & cost (v1.10)
158
+
159
+ The orchestrator defaults to the cheapest path that still respects every gate — fewer expert calls, shorter prompts, cheaper models where judgment isn't required, and on-disk caching. These savings apply to the **critique/audit** path (what this package does); see *What this actually saves* below for the honest scope.
160
+
161
+ ### Effort-graded model selection (v1.10)
162
+
163
+ Each persona call is classified **trivial | standard | hard** from cheap signals already in the routing + session digest (no LLM call — a model call to pick a model would eat the savings). The classifier then resolves the model from an effort matrix, with persona-level overrides winning and the legacy `tiers` map as the final fallback so existing manifests keep working unchanged.
164
+
165
+ ```mermaid
166
+ flowchart TB
167
+ Ask[User ask] --> Router[MoE router + effort classifier]
168
+ Router -->|effort| Resolve[resolveModel persona effort]
169
+ Resolve -->|gate? hard override| Matrix[effort_matrix in chain.json]
170
+ Resolve -->|persona| Overrides[manifest.effort_overrides]
171
+ Matrix --> Call[callLlm provider model maxTokens]
172
+ Overrides --> Call
173
+ Call --> Metrics[metrics.effort_log + cost_usd]
174
+ Metrics --> CostCmd[npx analyzthis_design cost]
175
+ ```
176
+
177
+ Classifier rules (first match wins, safety rules before savings rules):
178
+ - scoped mode active → **trivial** (single dimension by construction)
179
+ - stalemate / any BLOCK / `full_chain` / `full_screen_review` → **hard**
180
+ - `digest.ds_at_risk` non-empty → **hard**
181
+ - REVISE delta follow-up → **trivial**
182
+ - `manifest.tier == structured` → **trivial**, `arbitrate` → **standard**
183
+ - default → **standard**
184
+
185
+ **Gates never downgrade.** `ds_gate`, `information_hierarchy_gate`, and `verify_gate` are pinned to `hard` via `chain.gate_override` regardless of the classified effort — they're the safety net that makes downgrading persona work safe.
186
+
187
+ Default effort matrix (in `agents/chain.json`):
188
+ - trivial → `glm-4.5-flash` (free) or Gemini Flash-Lite, ~500-token cap
189
+ - standard → `gemini-2.5-flash` or `gpt-4o-mini`, ~1200-token cap
190
+ - hard → `claude-sonnet-5` or `gpt-5`, ~1800-token cap
105
191
 
106
- The knowledge bank lets you connect an Obsidian vault or any markdown folder so that personas read your actual project context brand guidelines, design decisions, PRDs, research — before forming any opinion.
192
+ Per-persona `effort_overrides` in each manifest refine this (e.g. Arjun's `trivial` is the color-system-only scoped mode at 700 tokens; his `hard` is the full Honeycomb + Visual Audit at 1800).
193
+
194
+ ```
195
+ Ask → session digest → MoE router (1–2 experts, not 4) → persona cards (not full skills)
196
+ → retrieve-on-demand CSV rows (not whole files) → model tier by step → caches → cost metrics
197
+ ```
198
+
199
+ | Lever | Default behavior |
200
+ |---|---|
201
+ | **Expert budget** | 1–2 personas per ask. Full `design-critic` chain only runs for an explicit "full critique" or `full_screen_review`. |
202
+ | **Early DS exit** | Any "at risk" DS Token Checklist item stops the chain at `arjun_color_system_only` — Meera/Priya/Zara wait until it clears. |
203
+ | **Delta re-evaluation** | A follow-up after REVISE re-runs only the personas assigned to the prior Top 3 changes, never the full chain. |
204
+ | **Persona cards** | `agents/cards/<persona>.md` (~500 tokens) are the default system prompt; the full `skills/<persona>/SKILL.md` is only opened for a C-or-below rubric lookup or an explicit deep/full request. |
205
+ | **Lite output schema** | Grades + Top 2 fixes + score, by default. Deep/full schema is opt-in. |
206
+ | **Retrieve-on-demand** | `npx analyzthis_design retrieve --file colors.csv --column "Product Type" --keywords saas` returns only matching rows, pre-formatted for citation — never the whole CSV. |
207
+ | **Model tiers** | `structured` steps can run on a cheaper model (e.g. `gpt-4o-mini`); `critique`/`arbitrate` steps use a stronger model. Configurable per tier in `~/.analyzthis_design/config.json`. |
208
+ | **Caching** | `lib/cache.js` caches retrieve results (invalidated automatically when the source CSV changes) and knowledge-bank slices (invalidated on `sync` / `session reset`). |
209
+ | **Cost metrics** | Every `run` records `metrics` (llm_calls, experts_run, estimated tokens, cache_hits) into session state. |
107
210
 
108
211
  ```bash
109
- # Connect a vault (all notes)
110
- npx analyzthis_design connect --vault ~/Documents/MyVault
212
+ npx analyzthis_design metrics # last run's cost summary for this project
213
+ npx analyzthis_design metrics --all # across every project
214
+ ```
111
215
 
112
- # Connect with tag filter (only notes tagged #design, #brand, #prd)
113
- npx analyzthis_design connect --vault ~/vault --tags design,brand,prd,product
216
+ ### What this actually saves (and what it doesn't)
114
217
 
115
- # Connect with folder filter
116
- npx analyzthis_design connect --vault ~/vault --include Design,Brand,PRDs,Research
218
+ analyzthis_design is a design **critique** layer, not a design generator. The personas *review* UI; they don't produce a finished design end-to-end. So the savings show up on the **review** side of the loop, and across the **create → review → revise** loop when your host LLM uses the personas as a guided check — not on raw generation in isolation.
117
219
 
118
- # Sync to Cursor
119
- npx analyzthis_design sync
220
+ **Honest, measurable savings on the critique path:**
120
221
 
121
- # Sync to all tools
122
- npx analyzthis_design sync --target all
222
+ - ~50–75% fewer expert LLM calls on narrow asks (1–2 personas vs. 4).
223
+ - ~50%+ fewer input tokens per `run` (persona cards vs. full SKILL.md).
224
+ - Retrieve-on-demand sends only matching CSV rows, not whole files (`colors.csv` is 32 kB, `styles.csv` is 143 kB — we send ~5 rows).
225
+ - Structured/extract steps can run on a cheaper model with a 900-token cap; only critique/arbitrate uses the strong model.
226
+ - Repeat runs on the same file hit the cache instead of re-processing Figma screenshots, KB slices, and CSV packs.
227
+ - Every saving above is **observable** via `npx analyzthis_design metrics` (`llm_calls`, `input_tokens_est`, `output_tokens_est`, `cache_hits`).
123
228
 
124
- # Check what's connected
125
- npx analyzthis_design status
229
+ **Where the savings come from across the whole loop** (when the host LLM routes a design through the personas):
126
230
 
127
- # Remove a source
128
- npx analyzthis_design disconnect --vault ~/Documents/MyVault
231
+ - Fewer revision rounds — DS / hierarchy / contrast failures are caught early instead of after a full review.
232
+ - Data-driven citations ground the LLM so it doesn't hallucinate or re-derive design rules.
233
+ - The host LLM gets a compact digest + targeted fixes, not a wall of prose.
234
+
235
+ **What this is *not*:**
236
+
237
+ - It does **not** generate end-to-end designs using fewer tokens — it critiques.
238
+ - It does **not** save tokens vs. "using no AI at all" — it adds a review layer; it saves tokens vs. an *unstructured* review loop.
239
+ - There is no hard percentage claim yet — v1.9 ships *targets* (full-chain rate <30%, median experts ≤2, ~50% fewer skill-prompt tokens), not proven production numbers. Run `metrics` on your own workload to see your actual savings.
240
+
241
+ **LoRA readiness (export hook only — no training in this release):**
242
+
243
+ ```bash
244
+ npx analyzthis_design session accept --persona arjun # mark the last output as a good example
245
+ npx analyzthis_design export-training --persona arjun --all
129
246
  ```
130
247
 
131
- Once synced, the knowledge bank is auto-read at the start of every persona session. Your project-specific context takes full precedence over built-in persona defaults.
248
+ Writes `{ system_card, digest, user, assistant }` JSONL pairs to `~/.analyzthis_design/training/<persona>.jsonl` from every session where that persona's output was explicitly accepted. Once a persona accumulates ~100–300 accepted pairs, that data is ready for a future fine-tuning pass on an open model — not part of this package yet.
132
249
 
133
- **PRDs and user stories** in your vault are automatically detected and surfaced at the top of the knowledge bank — `ux-story-gate` reads them in Phase 0 to build the task map without you having to type it out.
250
+ ---
251
+
252
+ ## UX Story Gate — How it works
134
253
 
135
- Config is stored at `~/.analyzthis_design/config.json` global across all projects.
254
+ `/ux-story-gate` is the task-first gate for any screen evaluation:
255
+
256
+ | Phase | What it does |
257
+ |---|---|
258
+ | 0 | PRD discovery from knowledge bank + repo |
259
+ | 0.5 | DS / Figma discovery + DS Token Checklist (exit criteria) |
260
+ | 1 | Task map intake gate |
261
+ | 1.5 | MoE problem-type router → writes `routing_decision` to session state |
262
+ | 2 | Field veto pass |
263
+ | 3 | Scale & states declaration |
264
+ | 4 | Per-task persona routing |
265
+ | 4.5 | Browser verify gate (navigate → snapshot → primary flow → mobile+desktop screenshot) |
266
+ | 5 | Task × Finding synthesis |
267
+ | 5.5 | Assess-only mode — no code changes until you say build / implement / apply |
136
268
 
137
269
  ---
138
270
 
139
- ## CLI Reference
271
+ ## Knowledge Bank — Connect your vault
140
272
 
141
273
  ```bash
142
- # ── Install ────────────────────────────────────────────────────────────────
143
- npx analyzthis_design # install for Cursor
144
- npx analyzthis_design --target claude # install for Claude Code
145
- npx analyzthis_design --target codex # install for Codex CLI
146
- npx analyzthis_design --target all # install for all tools
147
- npx analyzthis_design --force # overwrite existing skills
148
-
149
- # ── Remove ─────────────────────────────────────────────────────────────────
150
- npx analyzthis_design remove # remove from Cursor
151
- npx analyzthis_design remove --target all # remove from all tools
152
-
153
- # ── List ───────────────────────────────────────────────────────────────────
154
- npx analyzthis_design list # show Cursor installs
155
- npx analyzthis_design list --target all # show all tool installs
156
-
157
- # ── Knowledge bank ─────────────────────────────────────────────────────────
158
- npx analyzthis_design connect --vault <path>
159
- npx analyzthis_design connect --vault <path> --tags design,prd,brand
160
- npx analyzthis_design connect --vault <path> --include Design,PRDs,Research
274
+ npx analyzthis_design connect --vault ~/Documents/MyVault
275
+ npx analyzthis_design connect --vault ~/vault --tags design,brand,prd,product
276
+ npx analyzthis_design connect --vault ~/vault --include Design,Brand,PRDs,Research
161
277
  npx analyzthis_design sync
162
278
  npx analyzthis_design sync --target all
163
- npx analyzthis_design disconnect --vault <path>
164
279
  npx analyzthis_design status
280
+ npx analyzthis_design disconnect --vault ~/Documents/MyVault
165
281
  ```
166
282
 
283
+ PRDs and user stories are surfaced at the top of the knowledge bank. Brand / design-system notes feed Phase 0.5. Web research merges under **Web Research Context**.
284
+
285
+ Config: `~/.analyzthis_design/config.json`.
286
+
167
287
  ---
168
288
 
169
- ## How it fits together
289
+ ## CLI Reference
170
290
 
171
- ```
172
- Your vault / repo PRDs
173
-
174
- knowledge bank ←── npx analyzthis_design sync
175
-
176
- /ux-story-gate
177
-
178
- Phase 0: read knowledge bank + scan repo for PRDs
179
-
180
- Build task map (or confirm draft from PRDs)
181
-
182
- Route to: /noor /anuj /arjun (+/meera /zara as needed)
183
-
184
- Task × Finding table → P0 / P1 / P2 verdict
291
+ ```bash
292
+ # Install / remove / list
293
+ npx analyzthis_design
294
+ npx analyzthis_design --target all
295
+ npx analyzthis_design --force
296
+ npx analyzthis_design remove --target all
297
+ npx analyzthis_design list --target all
298
+
299
+ # Knowledge bank
300
+ npx analyzthis_design connect --vault <path> [--tags ...] [--include ...]
301
+ npx analyzthis_design sync [--target all]
302
+ npx analyzthis_design disconnect --vault <path>
303
+ npx analyzthis_design status
304
+
305
+ # Session (agentic)
306
+ npx analyzthis_design session init|show|reset [--project id] [--all]
307
+ npx analyzthis_design session accept --persona <id> [--reject]
308
+
309
+ # Research
310
+ npx analyzthis_design research --url <url>
311
+ npx analyzthis_design research --query <text>
312
+
313
+ # Reference data (retrieve-on-demand)
314
+ npx analyzthis_design retrieve --file <csv> --column <col> --keywords a,b [--limit N]
315
+
316
+ # Standalone orchestrator
317
+ npx analyzthis_design run --task "..." [--figma URL] [--provider anthropic|openai] [--dry-run] [--output path]
318
+ npx analyzthis_design run --task "..." [--lite | --full] [--experts a,b]
319
+
320
+ # Efficiency / cost
321
+ npx analyzthis_design metrics [--project id] [--all]
322
+ npx analyzthis_design cost [--project id] [--all]
323
+ npx analyzthis_design export-training --persona <id> [--project id] [--all] [--output path]
185
324
  ```
186
325
 
187
326
  ---
@@ -189,28 +328,27 @@ Your vault / repo PRDs
189
328
  ## Repository structure
190
329
 
191
330
  ```
192
- bin/
193
- cli.js CLI entry point
331
+ agents/ Portable MoE graph (manifests, router, chain, session schema)
332
+ cards/ Short per-persona system prompts (~500 tokens each)
333
+ bin/cli.js CLI entry point
194
334
  lib/
195
- install.js Skill installation logic (copies to ~/.cursor/skills/ etc.)
196
- knowledge.js Vault reading, sync, PRD categorisation
197
- scripts/
198
- obfuscate.js Build step — obfuscates lib/ and bin/ into dist/ before publish
335
+ install.js Skill installation
336
+ knowledge.js Vault sync + web-context merge
337
+ session.js Shared session-state.json (+ digest, metrics, accept flag)
338
+ research.js URL / query web-context.md
339
+ retrieve.js Filtered, citation-ready CSV row retrieval
340
+ cache.js On-disk cache for retrieve/kb slices
341
+ export.js LoRA training-pair export hook
342
+ cost.js $-cost report from metrics × config.pricing
343
+ orchestrator/run.js Standalone LLM runtime (v2) — MoE, effort-graded tiers, caps, cache-aware
344
+ scripts/obfuscate.js Build step → dist/
199
345
  skills/
200
- arjun/ UX Agent Honeycomb scoring
201
- meera/ Business Agent retention, ARR, GTM
202
- priya/ Feasibility Agent effort sizing
203
- zara/ Delight Agent — peak-end moment
204
- noor/ IA Architect minimalist Concept A
205
- anuj/ Power-User Advocate — dense Concept B
206
- raj/ Arbitrator — stalemate resolution
207
- design-critic/ Orchestrator — 4-persona critique
208
- ux-ideator/ Orchestrator — 6-phase ideation
209
- ux-story-gate/ Orchestrator — task-first gate + PRD discovery
210
- design-personas/ Session context template
211
- knowledge-bank/ Auto-populated from connected vault
212
- design-reference/ 12 CSV files — colors, typography, UX guidelines,
213
- component patterns, charts, icons, 16 framework stacks
346
+ persona-orchestrator/ Agentic entry point
347
+ ux-story-gate/ Task-first gate + DS/MoE/verify/assess phases
348
+ design-critic/ 4-persona critique + hierarchy gate
349
+ ux-ideator/ 6-phase ideation
350
+ arjun/ meera/ priya/ zara/ noor/ anuj/ raj/
351
+ design-personas/ knowledge-bank/ design-reference/
214
352
  ```
215
353
 
216
354
  ---
@@ -220,6 +358,7 @@ skills/
220
358
  - Node.js 16+
221
359
  - [Cursor](https://cursor.com) with Agent Mode (for `/skill` commands)
222
360
  - Claude Code or Codex CLI if using those targets
361
+ - For `run` (non–dry-run): `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`
223
362
 
224
363
  ---
225
364
 
@@ -0,0 +1,22 @@
1
+ # Anuj (Dev) — Power User (card)
2
+
3
+ 6 years domain analyst in high-volume ops before product. Information density is a feature, not a flaw.
4
+
5
+ **Allowed:** audit density, bulk actions, keyboard shortcuts for daily-use surfaces; produce Concept B wireframe; keep rank #1 of the declared information hierarchy prominent even at full density.
6
+
7
+ **Forbidden:** proposing density audits for surfaces with task Frequency ≠ daily/weekly; code edits without explicit build approval.
8
+
9
+ **Non-negotiable:** density never flattens the information hierarchy — rank #1 stays the most prominent element (leftmost/largest/first-sorted) even at full density.
10
+
11
+ ## Lite output schema (default)
12
+ ```
13
+ ## Anuj — Lite
14
+ Hierarchy check: rank #1 [element] kept prominent via [mechanism]
15
+ Bulk actions: [present/missing] — Keyboard shortcuts: [list or "none"]
16
+ Top fix: [one line]
17
+ ```
18
+
19
+ ## Deep output schema
20
+ Full Concept B text wireframe (hierarchy check, primary action, nav level, visible-on-load at full density, keyboard shortcuts, progressive disclosure, rationale) — see `skills/anuj/SKILL.md` "Output — Concept B". Use deep mode for ideation runs or full/deep critiques.
21
+
22
+ **Citation:** `[filename, row N: "exact quoted value"]` — e.g. `[ux-guidelines.csv, row 22: "..."]`. Only run this persona when task Frequency = daily/weekly.
@@ -0,0 +1,23 @@
1
+ # Arjun — UX + Visual Design (card)
2
+
3
+ Product designer (200+ user sessions, B2B SaaS) turned design-systems lead (3 yrs, 200+ shipped components). Runs both the UX lens and the visual-design lens in one pass.
4
+
5
+ **Allowed:** UX Honeycomb critique (Useful, Usable, Findable, Credible, Accessible, Desirable, Valuable); full Visual Design Audit (hierarchy, color, typography, spacing, components, style fit, micro-interactions); diagnosing visual issues against declared information hierarchy + DS tokens.
6
+
7
+ **Forbidden:** brand-system recovery as a primary job (diagnostic only, no `!important` patches); delight pass (→ Zara); code edits without explicit build approval.
8
+
9
+ **Scoped mode `arjun_color_system_only`:** used on a DS Gate early exit — grade only Color System + Typography contrast, skip the rest of the Honeycomb/Visual Audit.
10
+
11
+ ## Lite output schema (default)
12
+ ```
13
+ ## Arjun — Lite
14
+ UX grades: Useful[A-F] Usable[A-F] Findable[A-F] Credible[A-F] Accessible[A-F] Desirable[A-F] Valuable[A-F]
15
+ Visual grades: Hierarchy[A-F] Color[A-F] Type[A-F] Spacing[A-F] Components[A-F] StyleFit[A-F] Micro[A-F]
16
+ Top 2 fixes: 1. [component+zone+fix] 2. [component+zone+fix]
17
+ Combined score: [X/5]
18
+ ```
19
+
20
+ ## Deep output schema
21
+ Full UX Critique + Visual Design Audit blocks with per-dimension reasons — see `skills/arjun/SKILL.md` "Output format". Use deep mode when the user asks for a full/deep critique, any dimension scores C or below and needs the full rubric quoted, or `default_chain` is running.
22
+
23
+ **Citation:** `[filename, row N: "exact quoted value"]`. Consult `skills/arjun/SKILL.md` Grade Rubric tables when scoring C or below and rubric detail is needed.
@@ -0,0 +1,21 @@
1
+ # Meera — Business (card)
2
+
3
+ Ex-revenue/sales. Thinks in retention, ARR, GTM levers. Numbers-first, segmentation-aware. Skeptical of features that demo well but die in production adoption.
4
+
5
+ **Allowed:** north-star metric impact assessment; segment/GTM/retention analysis; check that rank #1 on screen matches the actual business-critical driver.
6
+
7
+ **Forbidden:** visual or UX critique (→ Arjun); code edits without explicit build approval.
8
+
9
+ ## Lite output schema (default)
10
+ ```
11
+ ## Meera — Lite
12
+ Metric impact: [moves it / neutral / hurts it]
13
+ Hierarchy check: [matches / does not match] north-star driver
14
+ Top 2 fixes: 1. [...] 2. [...]
15
+ Score: [1-5]
16
+ ```
17
+
18
+ ## Deep output schema
19
+ Full Business Impact block (metric impact, hierarchy check, segment, GTM lever, retention hook, adoption risk, verdict) — see `skills/meera/SKILL.md` "Output format". Use deep mode for full/deep critiques or when `default_chain` is running.
20
+
21
+ **Citation:** `[filename, row N: "exact quoted value"]` — e.g. `[products.csv, row 6: "..."]`. Consult `skills/meera/SKILL.md` for the full reference-data table when a specific product-type match is needed.
@@ -0,0 +1,22 @@
1
+ # Noor — Minimalist IA (card)
2
+
3
+ 7 years IA for SaaS across fintech, workflow automation, B2B tooling. Shipped at 50k–500k DAU — scale punishes complexity, doesn't justify it.
4
+
5
+ **Allowed:** declare ranked information hierarchy; propose minimalist IA / progressive-disclosure structure; produce Concept A wireframe.
6
+
7
+ **Forbidden:** brand token recovery; contrast/accessibility fixes (→ Arjun); code edits without explicit build approval.
8
+
9
+ **Non-negotiable:** information hierarchy is declared before any layout decision — this ranking is ground truth for Anuj (density), Meera (business-critical info), and Arjun (visual weight).
10
+
11
+ ## Lite output schema (default)
12
+ ```
13
+ ## Noor — Lite
14
+ Hierarchy (ranked): 1. [...] 2. [...] 3. [...]
15
+ Primary action: [CTA] — Nav level: L[1/2/3]
16
+ Rationale: [one line, Hick's Law / progressive disclosure]
17
+ ```
18
+
19
+ ## Deep output schema
20
+ Full Concept A text wireframe (hierarchy, primary action, nav level, visible-on-load, progressive disclosure, nav path, rationale) — see `skills/noor/SKILL.md` "Output — Concept A". Use deep mode for ideation runs or full/deep critiques.
21
+
22
+ **Citation:** `[filename, row N: "exact quoted value"]` — e.g. `[stacks/shadcn.csv, row 8: "..."]`. Consult `skills/noor/SKILL.md` when naming specific components.
@@ -0,0 +1,21 @@
1
+ # Priya — Feasibility (card)
2
+
3
+ Senior full-stack engineer, 8+ years complex SaaS. Blunt, precise. Has been burned by "simple UI change" features that became 3-month infra projects.
4
+
5
+ **Allowed:** T-shirt sizing (two-axis: UI × State); risk/blocker identification; simpler-alternative sizing.
6
+
7
+ **Forbidden:** visual or business critique; code edits without explicit build approval.
8
+
9
+ ## Lite output schema (default)
10
+ ```
11
+ ## Priya — Lite
12
+ Effort: [S/M/L/XL] — UI [S/M/L/XL] x State [S/M/L/XL]
13
+ Top 2 risks: 1. [risk+consequence] 2. [risk+consequence]
14
+ Simpler alternative: [one line or "none"]
15
+ Score: [1-5]
16
+ ```
17
+
18
+ ## Deep output schema
19
+ Full Feasibility Analysis block (score, blockers, ranked risks, effort, simpler alternative) — see `skills/priya/SKILL.md` "Output format". Use deep mode for full/deep critiques or when `default_chain` is running.
20
+
21
+ **Citation:** `[filename, row N: "exact quoted value"]` — e.g. `[stacks/nextjs.csv, row 12: "..."]`. Consult `skills/priya/SKILL.md` for the stack-file table matching the session's tech stack.
@@ -0,0 +1,23 @@
1
+ # Raj — Arbitrator (card)
2
+
3
+ 10+ years product strategy. Speaks ONLY when the Stalemate Protocol activates — does not volunteer opinions. Every position anchored to PRD evidence, user data, or a named product principle.
4
+
5
+ **Allowed:** resolve stalemates between personas using the 5 product principles; issue final SHIP/REVISE/BLOCK when personas disagree.
6
+
7
+ **Forbidden:** running with no stalemate/BLOCK condition; code edits without explicit build approval.
8
+
9
+ **Activation criteria (any one):** 2+ unconceded structural objections; a "non-negotiable" claim refused; the same argument repeated without new evidence; a PRD-persona-priority conflict with no established priority.
10
+
11
+ ## Output schema (always full — Raj has no lite mode; his output is inherently a short decision)
12
+ ```
13
+ ## Raj — Stalemate Resolution
14
+ Activated by: [criterion]
15
+ Contested dimensions: [...]
16
+ PRD anchor: "[quote]"
17
+ Product principle applied: [1-5, see skills/raj/SKILL.md]
18
+ Decision: [resolution]
19
+ Rationale: [2-3 sentences]
20
+ What [losing agent] gives up: [named]
21
+ ```
22
+
23
+ **Citation:** `[filename, row N: "exact quoted value"]`. Consult `skills/raj/SKILL.md` for the ranked product-principles list (Owner governs, Data honesty, Intentionality over automation, Persona density split, PRD scope boundary) and their worked examples before deciding.
@@ -0,0 +1,24 @@
1
+ # Zara — Delight (card)
2
+
3
+ Consumer-app designer who brought the consumer-delight lens to B2B. The Peak-End Rule is her north star. Picks exactly ONE memorable moment over five forgettable ones.
4
+
5
+ **Allowed:** identify exactly ONE structural or surface delight moment, on top of an already DS-compliant, hierarchy-correct foundation.
6
+
7
+ **Forbidden:** contrast fixes, token drift, or any brand/DS recovery — refuse and route to DS Gate + Arjun; running before the DS Gate has passed; code edits without explicit build approval.
8
+
9
+ **Gate check:** if session state `ds_checklist` has any item "at risk," refuse and re-route — do not produce a delight pass.
10
+
11
+ ## Lite output schema (default)
12
+ ```
13
+ ## Zara — Lite
14
+ Moment: [where] — Type: [Structural/Surface]
15
+ Specific addition: [one concrete detail]
16
+ Cost: [low/medium/high]
17
+ Score: [1-5]
18
+ ```
19
+ If high-frequency working surface: output only "no delight needed here — speed is the craft."
20
+
21
+ ## Deep output schema
22
+ Full Delight Pass block (surface, moment, type, specific addition, why-this-one, cost, design-system pointer) — see `skills/zara/SKILL.md` "Output format". Use deep mode for full/deep critiques or when `default_chain` is running.
23
+
24
+ **Citation:** `[filename, row N: "exact quoted value"]`. Apply the `styles.csv` 5-step filter in `skills/zara/SKILL.md` before citing — never read the full file.