analyzthis_design 2.5.1 → 2.6.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 (100) hide show
  1. package/HOW-TO-USE.md +249 -326
  2. package/README.md +71 -25
  3. package/agents/calibration-benchmark.json +187 -0
  4. package/agents/cards/anuj.md +1 -1
  5. package/agents/cards/arjun.md +1 -1
  6. package/agents/cards/kavi.md +2 -1
  7. package/agents/cards/mood-board.md +7 -7
  8. package/agents/cards/noor.md +1 -1
  9. package/agents/cards/priya.md +1 -1
  10. package/agents/cards/zara.md +3 -3
  11. package/agents/chain.json +1 -1
  12. package/agents/design-spec-schema.json +18 -1
  13. package/agents/manifests/mood-board.json +13 -8
  14. package/agents/model-policy.json +12 -0
  15. package/agents/router.json +2 -2
  16. package/agents/session-schema.json +12 -2
  17. package/dist/HOW-TO-USE.md +249 -326
  18. package/dist/README.md +71 -25
  19. package/dist/agents/calibration-benchmark.json +187 -0
  20. package/dist/agents/cards/anuj.md +1 -1
  21. package/dist/agents/cards/arjun.md +1 -1
  22. package/dist/agents/cards/kavi.md +2 -1
  23. package/dist/agents/cards/mood-board.md +7 -7
  24. package/dist/agents/cards/noor.md +1 -1
  25. package/dist/agents/cards/priya.md +1 -1
  26. package/dist/agents/cards/zara.md +3 -3
  27. package/dist/agents/chain.json +1 -1
  28. package/dist/agents/design-spec-schema.json +18 -1
  29. package/dist/agents/manifests/mood-board.json +13 -8
  30. package/dist/agents/model-policy.json +12 -0
  31. package/dist/agents/router.json +2 -2
  32. package/dist/agents/session-schema.json +12 -2
  33. package/dist/bin/cli.js +308 -10
  34. package/dist/lib/calibrate.js +816 -0
  35. package/dist/lib/chunk-executor.js +41 -1
  36. package/dist/lib/chunk-models.js +4 -18
  37. package/dist/lib/chunk-router.js +22 -6
  38. package/dist/lib/chunk-run.js +55 -1
  39. package/dist/lib/chunk-synthesis.js +18 -2
  40. package/dist/lib/chunk-telemetry.js +77 -17
  41. package/dist/lib/collect.js +15 -1
  42. package/dist/lib/cost.js +15 -7
  43. package/dist/lib/design-spec.js +32 -2
  44. package/dist/lib/evolution-metrics.js +23 -1
  45. package/dist/lib/feedback-submit.js +50 -1
  46. package/dist/lib/feedback.js +15 -0
  47. package/dist/lib/install.js +1 -0
  48. package/dist/lib/lessons.js +8 -0
  49. package/dist/lib/mcp-server.js +189 -7
  50. package/dist/lib/model-policy.js +174 -0
  51. package/dist/lib/model-registry.js +71 -0
  52. package/dist/lib/moodboard-film.js +119 -0
  53. package/dist/lib/moodboard-view.js +426 -0
  54. package/dist/lib/moodboard.js +638 -27
  55. package/dist/lib/orchestrator/run.js +67 -8
  56. package/dist/lib/outcome.js +7 -2
  57. package/dist/lib/output-quality.js +95 -0
  58. package/dist/lib/reference-pack.js +9 -1
  59. package/dist/lib/session.js +48 -4
  60. package/dist/lib/system-prompt.js +3 -0
  61. package/dist/lib/ui-libraries.js +232 -0
  62. package/dist/skills/anuj/SKILL.md +4 -0
  63. package/dist/skills/arjun/SKILL.md +2 -0
  64. package/dist/skills/arjun/references/lens.md +2 -0
  65. package/dist/skills/design-director/SKILL.md +2 -1
  66. package/dist/skills/design-reference/SKILL.md +6 -0
  67. package/dist/skills/design-reference/motion.csv +11 -0
  68. package/dist/skills/design-reference/schema.json +12 -0
  69. package/dist/skills/design-reference/stacks/shadcn.csv +6 -0
  70. package/dist/skills/design-reference/ui-libraries.csv +46 -0
  71. package/dist/skills/design-spec/SKILL.md +1 -1
  72. package/dist/skills/getting-started/SKILL.md +2 -2
  73. package/dist/skills/kavi/SKILL.md +3 -2
  74. package/dist/skills/meera/SKILL.md +2 -0
  75. package/dist/skills/mood-board/SKILL.md +94 -87
  76. package/dist/skills/noor/SKILL.md +4 -0
  77. package/dist/skills/persona-orchestrator/references/lens.md +4 -4
  78. package/dist/skills/priya/SKILL.md +5 -0
  79. package/dist/skills/raj/SKILL.md +2 -0
  80. package/dist/skills/zara/SKILL.md +49 -4
  81. package/package.json +13 -2
  82. package/skills/anuj/SKILL.md +4 -0
  83. package/skills/arjun/SKILL.md +2 -0
  84. package/skills/arjun/references/lens.md +2 -0
  85. package/skills/design-director/SKILL.md +2 -1
  86. package/skills/design-reference/SKILL.md +6 -0
  87. package/skills/design-reference/motion.csv +11 -0
  88. package/skills/design-reference/schema.json +12 -0
  89. package/skills/design-reference/stacks/shadcn.csv +6 -0
  90. package/skills/design-reference/ui-libraries.csv +46 -0
  91. package/skills/design-spec/SKILL.md +1 -1
  92. package/skills/getting-started/SKILL.md +2 -2
  93. package/skills/kavi/SKILL.md +3 -2
  94. package/skills/meera/SKILL.md +2 -0
  95. package/skills/mood-board/SKILL.md +94 -87
  96. package/skills/noor/SKILL.md +4 -0
  97. package/skills/persona-orchestrator/references/lens.md +4 -4
  98. package/skills/priya/SKILL.md +5 -0
  99. package/skills/raj/SKILL.md +2 -0
  100. package/skills/zara/SKILL.md +49 -4
package/README.md CHANGED
@@ -4,16 +4,33 @@ A set of AI design personas and a task-first evaluation framework that plugs int
4
4
 
5
5
  Install once. Run structured UX critiques, multi-phase ideation, and task-grounded screen reviews — directly inside your AI chat. **No external LLM API keys required** for CLI orchestrator runs: **`/devi`** voices each persona from your host IDE (Cursor, Claude, etc.).
6
6
 
7
+ ## v2.6.0 — Mood boards you decide on, now with scroll films
8
+
9
+ - **Element collage:** Zara crops 20–24 real UI elements from 6+ live sites into sections (first screen, typography, colour, components, imagery, motion), each with its source page and real colours and fonts.
10
+ - **You decide:** `moodboard show` opens a clickable board on 127.0.0.1. Keep / maybe / reject overrides every persona; rejected tiles never come back; `lock` saves the direction every persona follows.
11
+ - **Scroll films:** `moodboard film --board <id> --url <site>` records the real page scrolling through four depths as a looping motion tile with waypoint stills. Needs the optional `playwright-core` and Google Chrome.
12
+ - **Install fix:** the `mood-board` skill is now copied by `npx analyzthis_design` (it was missing before).
13
+
14
+ ## v2.5.2 — Motion, UX, and visual-design libraries
15
+
16
+ Personas cite real packages and prefer what is already in the repo:
17
+
18
+ - **Catalog:** `motion.csv` (150–250ms ease-out, no bounce) and `ui-libraries.csv` (Motion, Shadcn, React Aria, Chakra, CMDK, TanStack, Tremor, Magic UI, and more).
19
+ - **Kavi:** Reads the full `package.json` plus kit folders, writes `Tech/Installed-UI-Libraries.md`, stores `installed_ui_libraries` on the session.
20
+ - **Zara / Arjun / Anuj / Noor / Priya:** One library per job, installed first. Mixing two full kits is a block. Marketing FX stays off daily dashboards.
21
+ - **DesignSpec:** When motion is on, require library, import, timing, easing, and a reduced-motion fallback.
22
+ - **Design reference:** 30 CSV files total.
23
+
7
24
  ## v2.5.1 — Anti-AI-slop & craftsmanship rules
8
25
 
9
- Enriched our personas and design reference data with craftsmanship principles inspired by Impeccable:
26
+ Enriched personas and design reference data with craftsmanship principles inspired by Impeccable:
10
27
 
11
- - **Arjun (Anti-AI-Slop & Craftsmanship):** Flags container nesting syndrome (`card > card > card`), untinted harsh black/gray, gray text on colored badges/headers, and cliché purple/blue AI gradients.
12
- - **Noor (Distill & Clarify):** Strips away container clutter and enforces outcome-specific CTA labels (e.g. "Create Invoice" vs "Submit").
13
- - **Anuj (Production Hardening):** Audits high-density layouts for text overflow handling (`truncate`, `line-clamp-2`), extreme data lengths, and complete 5-state form controls.
14
- - **Zara (Motion Discipline):** Enforces 150–250ms natural ease-out transitions and bans bouncy/elastic animations.
15
- - **Kavi (Durable Product Truth):** Records audience, purpose, constraints, voice, and evidence separately from surface styling.
16
- - **Design reference:** 11 new rules added to `ux-guidelines.csv` (rows 100–110).
28
+ - **Arjun:** Flags container nesting (`card > card > card`), untinted harsh black/gray, gray text on colored badges/headers, and cliché purple/blue AI gradients.
29
+ - **Noor:** Strips container clutter and enforces outcome-specific CTA labels (e.g. "Create Invoice" vs "Submit").
30
+ - **Anuj:** Audits overflow handling and complete 5-state form controls.
31
+ - **Zara:** 150–250ms ease-out; bans bouncy/elastic animations.
32
+ - **Kavi:** Records Durable Product Truth (audience, purpose, constraints, voice, evidence).
33
+ - **Design reference:** 11 craftsmanship rules in `ux-guidelines.csv` (rows 100–110).
17
34
 
18
35
  ## v2.5.0 — personas earn or lose trust
19
36
 
@@ -96,7 +113,7 @@ Pass `--global` to opt into the legacy merged behavior (read `config.sources` an
96
113
 
97
114
  Use `npx analyzthis_design run-unchunked` for the legacy single-pass orchestrator.
98
115
 
99
- **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.5.1 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
116
+ **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.6.0 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
100
117
 
101
118
  ---
102
119
 
@@ -367,6 +384,25 @@ npx analyzthis_design run-unchunked --continue --task "Review invoice screen" --
367
384
 
368
385
  **Chunk model selection:** Ollama auto-discovered → free cloud (Groq/Gemini/OpenRouter free endpoints) → cheap cloud with user keys. The **planner always runs on a frontier/strong model** and never on a cheap model; if no frontier provider is available, it falls back to the host model with a warning.
369
386
 
387
+ ### Persona model calibration
388
+
389
+ Model learning is scoped by persona, effort, task type, and output format. API availability failures are tracked separately from answer quality, and `/accept` records the exact run and model that produced the note. Host/Devi responses are labelled `host/unknown` because the package cannot verify the model selected inside an IDE.
390
+
391
+ ```bash
392
+ # Preview the fixed benchmark, eligible models, call count, and worst-case cost
393
+ npx analyzthis_design calibrate --max-usd 5 --max-calls 500
394
+
395
+ # Apply a qualified local winner after reviewing the preview/results
396
+ npx analyzthis_design calibrate --max-usd 5 --max-calls 500 --judge --apply
397
+
398
+ # Preview the text-free community payload; private-task results are never shared
399
+ npx analyzthis_design calibrate --share --dry-run
400
+ ```
401
+
402
+ Calibration is preview-only unless `--apply` is present. It uses fixed spending and call limits, format-specific checks, and paired non-inferiority comparisons. Local winners live in `~/.analyzthis_design/calibration.json`; maintainer-reviewed global defaults ship in `agents/model-policy.json`. A changed persona prompt, validator, expired model, or failed capability check automatically invalidates an old winner.
403
+
404
+ Applying a winner also requires the selected judges to match the benchmark’s 10 maintainer-labelled comparisons at least 70% of the time. Without enough aligned, independent judge evidence, results remain low-confidence and the current model policy is kept.
405
+
370
406
  **Provider resolution order:** explicit `--provider` → config → first available API key → **`host`** (Devi) for unchunked; chunked mode also considers Ollama and free endpoints before paid.
371
407
 
372
408
  Supported providers: `host` | `anthropic` | `openai` | `google` | `zai` | `ollama` | `groq` | `together` | `openrouter` | `deepseek`
@@ -377,19 +413,19 @@ Provider defaults live in `~/.analyzthis_design/config.json`:
377
413
  {
378
414
  "orchestrator": {
379
415
  "provider": "anthropic",
380
- "model": "claude-sonnet-5",
416
+ "model": "claude-sonnet-4-20250514",
381
417
  "mode": "lite",
382
418
  "tiers": {
383
419
  "structured": { "provider": "openai", "model": "gpt-4o-mini" },
384
- "critique": { "provider": "anthropic", "model": "claude-sonnet-5" },
385
- "arbitrate": { "provider": "anthropic", "model": "claude-sonnet-5" }
420
+ "critique": { "provider": "anthropic", "model": "claude-sonnet-4-20250514" },
421
+ "arbitrate": { "provider": "anthropic", "model": "claude-sonnet-4-20250514" }
386
422
  },
387
423
  "max_tokens": { "structured": 900, "critique": 1800, "arbitrate": 1200 }
388
424
  },
389
425
  "pricing": {
390
426
  "glm-4.5-flash": { "input_per_m": 0, "output_per_m": 0 },
391
427
  "gemini-2.5-flash": { "input_per_m": 0.30, "output_per_m": 2.50 },
392
- "claude-sonnet-5": { "input_per_m": 2, "output_per_m": 10 },
428
+ "claude-sonnet-4-20250514": { "input_per_m": 3, "output_per_m": 15 },
393
429
  "gpt-4o": { "input_per_m": 2.50, "output_per_m": 10 }
394
430
  },
395
431
  "research": { "provider": "https://example.com/search?q={query}" },
@@ -458,7 +494,7 @@ Classifier rules (first match wins, safety rules before savings rules):
458
494
  Default effort matrix (in `agents/chain.json`):
459
495
  - **trivial** → `host` / Devi (~600-token cap for objection rounds) — or API model when keys set
460
496
  - **standard** → `gemini-2.5-flash` or `gpt-4o-mini`, ~1200-token cap
461
- - **hard** → `claude-sonnet-5` or `gpt-5`, ~1800-token cap
497
+ - **hard** → `claude-sonnet-4-20250514`, ~1800-token cap
462
498
 
463
499
  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).
464
500
 
@@ -477,7 +513,7 @@ Ask → session digest → MoE router (1–2 experts, not 4) → persona cards (
477
513
  | **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. |
478
514
  | **Multi-file reference packs** | Each persona retrieves from 3-5 CSV files (not 1), pooled into a single ranker call. Arjun gets styles + ux-guidelines + ui-reasoning + charts; Zara gets colors + typography + styles + landing + icons. Same LLM cost as single-file, 3-5x coverage. |
479
515
  | **Best For Tags** | `styles.csv` and `typography.csv` have a `Best For Tags` column (semicolon-delimited product-type tokens) for reliable keyword filtering. Previously `Best For` was free-text and 31/84 styles were unfilterable. |
480
- | **CSV schema + validation** | `skills/design-reference/schema.json` defines all 28 CSV files' headers, filter columns, and cross-file joins. `npm run validate` checks integrity before publish. |
516
+ | **CSV schema + validation** | `skills/design-reference/schema.json` defines all 30 CSV files' headers, filter columns, and cross-file joins. `npm run validate` checks integrity before publish. |
481
517
  | **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`. |
482
518
  | **Caching** | `lib/cache.js` caches retrieve results (invalidated automatically when the source CSV changes) and knowledge-bank slices (invalidated on `sync` / `session reset`). |
483
519
  | **Cost metrics** | Every `run` records `metrics` (llm_calls, experts_run, estimated tokens, cache_hits) into session state. |
@@ -632,7 +668,7 @@ npx analyzthis_design feedback status
632
668
  The `feedback submit` client is a plain HTTPS POST with an `apikey` header — it works with any REST endpoint that accepts anonymous inserts, not only Supabase. A reference schema (with row-level security for insert-only anon access) lives in [`supabase/migrations/001_persona_feedback.sql`](./supabase/migrations/001_persona_feedback.sql) in the repo. That folder is **not** shipped in the npm package, so installing `analyzthis_design` does not pull a Supabase-branded folder into `node_modules`.
633
669
 
634
670
  1. Stand up any HTTP endpoint that accepts anonymous JSON inserts (Supabase with RLS is one option; a small Cloudflare Worker or a self-hosted Postgres + thin API work too).
635
- 2. If you use the reference schema, run `supabase/migrations/001_persona_feedback.sql` in your SQL editor.
671
+ 2. Run `supabase/migrations/001_persona_feedback.sql` for persona feedback and `002_calibration_results.sql` for opt-in calibration aggregates. The second migration is compatible with Neon and was production-verified on 2026-09-17.
636
672
  3. Copy the endpoint URL and anon key into `~/.analyzthis_design/config.json` under `"feedback"` (or set env vars `ANALYZTHIS_FEEDBACK_URL` + `ANALYZTHIS_FEEDBACK_ANON_KEY`).
637
673
  4. Read submissions from your endpoint's dashboard.
638
674
 
@@ -819,8 +855,12 @@ npx analyzthis_design run --task "..." [--budget free|cheap|auto] [--sequential|
819
855
  npx analyzthis_design run-unchunked --task "..." [--lite|--full] [--experts a,b] [--dry-run] [--deliberate|--no-deliberate]
820
856
  npx analyzthis_design run --continue --task "..." # resume host-mode run after /devi
821
857
 
858
+ # Persona/model calibration (fixed benchmark; preview unless --apply)
859
+ npx analyzthis_design calibrate --max-usd 5 --max-calls 500 [--judge --apply]
860
+ npx analyzthis_design calibrate --share --dry-run
861
+
822
862
  # CSV validation
823
- npx analyzthis_design validate # validate all 28 CSV files against schema.json
863
+ npx analyzthis_design validate # validate all 30 CSV files against schema.json
824
864
 
825
865
  # MCP server (for any AI IDE: Cursor, Claude Desktop, Lovable, v0, Bolt, Replit)
826
866
  npx analyzthis_design mcp # start stdio MCP server
@@ -838,10 +878,14 @@ npx analyzthis_design outcome --infer [--window N]
838
878
  npx analyzthis_design outcome --pending
839
879
  npx analyzthis_design outcome --confirm --persona <id> --result shipped|revised|blocked|missed
840
880
 
841
- # Mood board (v1.22)
842
- npx analyzthis_design moodboard create --task "..." [--auto] [--url <url> ...]
843
- npx analyzthis_design moodboard critique --board <id>
844
- npx analyzthis_design moodboard add --board <id> --url <url> --title "..." --tags a,b
881
+ # Mood board — visual element collage, user decides
882
+ npx analyzthis_design moodboard create --task "..." [--adjectives a,b,c] [--not "..."] [--sections components,typography]
883
+ npx analyzthis_design moodboard tile --board <id> --page <url> --image <crop> --element "..." --section components
884
+ npx analyzthis_design moodboard critique --board <id> # team votes = advice
885
+ npx analyzthis_design moodboard film --board <id> --url <url> # scroll film as a motion tile (needs playwright-core + Chrome)
886
+ npx analyzthis_design moodboard show --board <id> # you keep / maybe / reject in the browser
887
+ npx analyzthis_design moodboard rescout --board <id> --note "..."
888
+ npx analyzthis_design moodboard lock --board <id> # saves design_direction for every persona
845
889
  npx analyzthis_design moodboard list
846
890
 
847
891
  # Devi — host LLM queue (v1.20)
@@ -867,9 +911,10 @@ lib/
867
911
  install.js Skill installation
868
912
  knowledge.js Vault sync + web-context merge
869
913
  collect.js Kavi — codebase scan → vault → source discovery → enrich → sync
914
+ ui-libraries.js Detect motion/UX/visual kits from package.json + kit folders
870
915
  source-discovery.js Obsidian vault / wiki / knowledge-graph discovery + manifest MD
871
916
  platforms.js Cross-host skill paths (Cursor, Claude, Codex, Grok, Windsurf, agents)
872
- session.js Shared session-state.json (+ digest, metrics, vault_path)
917
+ session.js Shared session-state.json (+ digest, metrics, vault_path, installed_ui_libraries)
873
918
  research.js URL / query → web-context.md
874
919
  retrieve.js Filtered, citation-ready CSV row retrieval
875
920
  cache.js On-disk cache for retrieve/kb slices
@@ -883,7 +928,8 @@ lib/
883
928
  reference-pack.js Shared multi-file CSV + vault retrieval (buildReferencePack)
884
929
  mcp-server.js MCP server — 19 tools for any MCP-compatible IDE
885
930
  system-prompt.js Consolidated prompt generator (fallback for non-MCP tools)
886
- moodboard.js Mood-board engine: collect web/DS references, tag, deliberate
931
+ moodboard.js Mood-board engine: element tiles, persona advice, user decisions, lock
932
+ moodboard-view.js Visual board page + local 127.0.0.1 server for keep / maybe / reject
887
933
  dedup.js Cross-persona redundancy detection
888
934
  lessons.js Self-evolving lessons store (extract/retrieve/inject)
889
935
  outcome.js Infer + confirm persona outcome labels
@@ -961,14 +1007,14 @@ skills/
961
1007
  | **Planner never cheap** | Planner always uses frontier/host; chunk models are cost-optimized |
962
1008
  | **Multi-file reference retrieval** | Each persona retrieves from 3-5 CSV files (not 1) via a shared ranker — same LLM cost, 3-5x coverage |
963
1009
  | **All 16 stacks detected** | `detectStack()` covers all 16 stack CSVs (flutter, swiftui, laravel, threejs, etc.) — was 8 |
964
- | **CSV schema + validation** | `npm run validate` checks all 28 CSV files against `schema.json` before publish |
1010
+ | **CSV schema + validation** | `npm run validate` checks all 30 CSV files against `schema.json` before publish |
965
1011
  | **Best For Tags** | styles.csv + typography.csv have normalized tag columns for reliable keyword filtering |
966
1012
 
967
1013
  ## What's new in v1.22
968
1014
 
969
1015
  | Feature | Description |
970
1016
  |---------|-------------|
971
- | **Mood boards** | `/mood-board` collects web references + design-system patterns, tags them, and runs team deliberation |
1017
+ | **Mood boards** | Zara crops 20–24 real UI elements from 6+ live sites into a sectioned visual collage with each site's real colours and fonts, plus optional scroll films (looping video + four waypoint stills) for motion feel. Arjun/Noor/Priya/Meera vote as advice. **You** keep / maybe / reject in the browser — your choice overrides every persona, rejected tiles never return, and the locked direction is saved for all personas. `--kind mood` keeps the older tagged-URL board |
972
1018
  | **User-contributed references** | User can add URLs/notes to a board and rerun the critique loop |
973
1019
  | **Visual direction setting** | Arjun, Meera, Priya, Zara, Noor score references via the UX Honeycomb rigor matrix |
974
1020
  | **Workspace artifacts** | `moodboard/{boardId}.json` is written into the project for the user to inspect |
@@ -1000,7 +1046,7 @@ skills/
1000
1046
 
1001
1047
  ## Marketing site
1002
1048
 
1003
- The public lab site lives in `website/` and is deployed on Vercel as **analyzthis-lab** (site only — not the npm package). The home page keeps the packet story and offers three paths: designers (`design.html`), Dev/PMs (three jobs + workspace warning), and firm owners (map one workflow). The Vercel project root is `website/` with no build step — do not set Output Directory to `public`.
1049
+ The public lab site lives in `website/` and is deployed on Vercel as **analyzthis-lab** (site only — not the npm package). Home names the design team first (type `/zara`, get a verdict), shows three jobs in human words, then three paths: designers (`design.html`), Dev/PMs, and firm owners (GST packet lives later, not in the hero). The Vercel project root is `website/` with no build step — do not set Output Directory to `public`.
1004
1050
 
1005
1051
  - Live: [https://analyzthis-lab.vercel.app](https://analyzthis-lab.vercel.app)
1006
1052
  - Design team deep-dive: [https://analyzthis-lab.vercel.app/design](https://analyzthis-lab.vercel.app/design) (`website/design.html`)
@@ -0,0 +1,187 @@
1
+ {
2
+ "version": 1,
3
+ "judge_version": 1,
4
+ "description": "Versioned public fixed benchmark. Only aggregate, text-free results may be shared.",
5
+ "alignment_cases": [
6
+ { "id": "j01", "expected": "A", "a": "Names the buried primary action and recommends moving it above the fold.", "b": "Says the screen looks modern and should use more animation." },
7
+ { "id": "j02", "expected": "B", "a": "Suggests changing every color without evidence.", "b": "Challenges the assumption and asks for task-completion evidence first." },
8
+ { "id": "j03", "expected": "A", "a": "Separates a rate-limit failure from answer quality.", "b": "Calls every failed API request a bad-quality model." },
9
+ { "id": "j04", "expected": "B", "a": "Adds another modal to a slow approval flow.", "b": "Keeps the primary approval visible and reduces interaction steps." },
10
+ { "id": "j05", "expected": "A", "a": "Uses the existing design-system token and component.", "b": "Invents a new color and component library." },
11
+ { "id": "j06", "expected": "B", "a": "Summarizes both sides without a decision.", "b": "Selects one option, explains the trade-off, and gives a next step." },
12
+ { "id": "j07", "expected": "A", "a": "Includes empty, loading, error, success, and permission states.", "b": "Reviews only the happy path." },
13
+ { "id": "j08", "expected": "B", "a": "Hides frequent table actions behind hover on mobile.", "b": "Keeps frequent actions discoverable with keyboard and mobile access." },
14
+ { "id": "j09", "expected": "A", "a": "Links the recommendation to the declared business metric.", "b": "Claims revenue impact without evidence." },
15
+ { "id": "j10", "expected": "B", "a": "Adds decorative motion to every status update.", "b": "Reserves restrained motion for the one important state change." }
16
+ ],
17
+ "tasks": [
18
+ {
19
+ "id": "t01",
20
+ "persona": "arjun",
21
+ "effort": "trivial",
22
+ "output_format": "persona_lite",
23
+ "prompt": "A save button says Done. Give a brief UX verdict and top 2 fixes."
24
+ },
25
+ {
26
+ "id": "t02",
27
+ "persona": "meera",
28
+ "effort": "trivial",
29
+ "output_format": "ux_audit",
30
+ "prompt": "Audit a settings page with eight equal-weight actions. Recommend one change."
31
+ },
32
+ {
33
+ "id": "t03",
34
+ "persona": "priya",
35
+ "effort": "trivial",
36
+ "output_format": "premise_assessment",
37
+ "prompt": "A team assumes more dashboard charts improve trust. Assess the premise."
38
+ },
39
+ {
40
+ "id": "t04",
41
+ "persona": "zara",
42
+ "effort": "trivial",
43
+ "output_format": "synthesis",
44
+ "prompt": "A checkout adds a decorative animation before payment. Give a verdict and fixes."
45
+ },
46
+ {
47
+ "id": "t05",
48
+ "persona": "arjun",
49
+ "effort": "standard",
50
+ "output_format": "ux_audit",
51
+ "prompt": "Audit onboarding that asks for 12 fields before showing value. Give actions."
52
+ },
53
+ {
54
+ "id": "t06",
55
+ "persona": "meera",
56
+ "effort": "standard",
57
+ "output_format": "persona_lite",
58
+ "prompt": "A mobile table hides row actions until hover. Give a verdict and top 2 fixes."
59
+ },
60
+ {
61
+ "id": "t07",
62
+ "persona": "priya",
63
+ "effort": "standard",
64
+ "output_format": "synthesis",
65
+ "prompt": "Users abandon search after empty results. Synthesize a decision and next actions."
66
+ },
67
+ {
68
+ "id": "t08",
69
+ "persona": "zara",
70
+ "effort": "standard",
71
+ "output_format": "premise_assessment",
72
+ "prompt": "A redesign starts from changing every visual token. Assess whether that is the right problem."
73
+ },
74
+ {
75
+ "id": "t09",
76
+ "persona": "arjun",
77
+ "effort": "hard",
78
+ "output_format": "synthesis",
79
+ "prompt": "Enterprise admins miss destructive permission changes. Decide SHIP, REVISE, or BLOCK and list actions."
80
+ },
81
+ {
82
+ "id": "t10",
83
+ "persona": "meera",
84
+ "effort": "hard",
85
+ "output_format": "premise_assessment",
86
+ "prompt": "A team blames navigation for low activation without evidence. Assess the framing and decision."
87
+ },
88
+ {
89
+ "id": "t11",
90
+ "persona": "priya",
91
+ "effort": "hard",
92
+ "output_format": "ux_audit",
93
+ "prompt": "Audit a billing flow where totals change after confirmation. Recommend whether to ship."
94
+ },
95
+ {
96
+ "id": "t12",
97
+ "persona": "zara",
98
+ "effort": "hard",
99
+ "output_format": "persona_lite",
100
+ "prompt": "A dense incident console uses motion on every status update. Give a verdict and top 2 fixes."
101
+ },
102
+ {
103
+ "id": "t13",
104
+ "persona": "noor",
105
+ "effort": "trivial",
106
+ "output_format": "persona_lite",
107
+ "prompt": "A profile page shows five equal actions. Give a concise hierarchy verdict and top 2 fixes."
108
+ },
109
+ {
110
+ "id": "t14",
111
+ "persona": "noor",
112
+ "effort": "standard",
113
+ "output_format": "ux_audit",
114
+ "prompt": "Audit a reporting page with filters, charts, exports, and help competing above the fold."
115
+ },
116
+ {
117
+ "id": "t15",
118
+ "persona": "noor",
119
+ "effort": "hard",
120
+ "output_format": "synthesis",
121
+ "prompt": "Resolve a complex admin screen into a clear information hierarchy and give a release verdict."
122
+ },
123
+ {
124
+ "id": "t16",
125
+ "persona": "anuj",
126
+ "effort": "trivial",
127
+ "output_format": "persona_lite",
128
+ "prompt": "A data table lacks keyboard access. Give a verdict and top 2 power-user fixes."
129
+ },
130
+ {
131
+ "id": "t17",
132
+ "persona": "anuj",
133
+ "effort": "standard",
134
+ "output_format": "ux_audit",
135
+ "prompt": "Audit a 500-row operations table for bulk actions, scanning, and error recovery."
136
+ },
137
+ {
138
+ "id": "t18",
139
+ "persona": "anuj",
140
+ "effort": "hard",
141
+ "output_format": "synthesis",
142
+ "prompt": "Choose a safe dense workflow for reconciling many conflicting records and give a verdict."
143
+ },
144
+ {
145
+ "id": "t19",
146
+ "persona": "raj",
147
+ "effort": "trivial",
148
+ "output_format": "premise_assessment",
149
+ "prompt": "The team assumes a new dashboard is needed. Assess whether the premise has enough evidence."
150
+ },
151
+ {
152
+ "id": "t20",
153
+ "persona": "raj",
154
+ "effort": "standard",
155
+ "output_format": "synthesis",
156
+ "prompt": "Resolve a disagreement between faster onboarding and stricter compliance checks."
157
+ },
158
+ {
159
+ "id": "t21",
160
+ "persona": "raj",
161
+ "effort": "hard",
162
+ "output_format": "synthesis",
163
+ "prompt": "Arbitrate conflicting business, accessibility, and engineering constraints and issue a release verdict."
164
+ },
165
+ {
166
+ "id": "t22",
167
+ "persona": "kavi",
168
+ "effort": "trivial",
169
+ "output_format": "persona_lite",
170
+ "prompt": "A source note has no owner or date. Give a short verdict and top 2 knowledge fixes."
171
+ },
172
+ {
173
+ "id": "t23",
174
+ "persona": "kavi",
175
+ "effort": "standard",
176
+ "output_format": "ux_audit",
177
+ "prompt": "Audit conflicting product notes and recommend how to preserve durable product truth."
178
+ },
179
+ {
180
+ "id": "t24",
181
+ "persona": "kavi",
182
+ "effort": "hard",
183
+ "output_format": "synthesis",
184
+ "prompt": "Synthesize contradictory research, design, and product sources into a governed decision."
185
+ }
186
+ ]
187
+ }
@@ -1,6 +1,6 @@
1
1
  # Anuj (Dev) — Power User (card)
2
2
 
3
- 6 years domain analyst in high-volume ops before product. Information density is a feature, not a flaw. Hardens high-density surfaces against edge cases, text overflow, and missing keyboard shortcuts.
3
+ 6 years domain analyst in high-volume ops before product. Information density is a feature, not a flaw. Hardens high-density surfaces against overflow; specifies TanStack Table, CMDK, and hotkeys when those packages are already installed.
4
4
 
5
5
  **Allowed:** audit density, bulk actions, keyboard shortcuts, and edge-case hardening (overflow, empty/error states) for daily-use surfaces; produce Concept B wireframe; keep rank #1 of the declared information hierarchy prominent even at full density.
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
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. Actively audits for and eliminates generic AI-slop (card nesting, un-tinted neutrals, gray-on-color, cliché purple gradients).
4
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, anti-slop checks, bolder vs. quieter balance); diagnosing visual issues against declared information hierarchy + DS tokens.
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, anti-slop checks, bolder vs. quieter balance); diagnosing visual issues against declared information hierarchy + DS tokens. Cite `motion.csv` and `ui-libraries.csv`; prefer installed kits.
6
6
 
7
7
  **Forbidden:** brand-system recovery as a primary job (diagnostic only, no `!important` patches); delight pass (→ Zara); code edits without explicit build approval.
8
8
 
@@ -1,6 +1,6 @@
1
1
  # Kavi — Knowledge Archivist (card)
2
2
 
3
- Producer persona. Scans a codebase, builds an Obsidian vault, enriches notes into readable project knowledge, and records Durable Product Truth (Audience, Purpose, Constraints, Voice, Evidence) so every critique persona reads company context first.
3
+ Producer persona. Scans a codebase, builds an Obsidian vault, records Durable Product Truth, and detects installed motion/UX/visual libraries into `Tech/Installed-UI-Libraries.md` so critique personas prefer what is already in the repo.
4
4
 
5
5
  **Allowed:** codebase inventory (PRDs, brand/tokens, pages, components, tech stack, research); writing Obsidian notes with YAML frontmatter + `[[wikilinks]]`; LLM enrichment of draft extracts into concise purpose + key facts; connecting and syncing the vault into `knowledge-bank`.
6
6
 
@@ -19,6 +19,7 @@ For each draft note, emit a full Obsidian markdown file:
19
19
  Vault: [path]
20
20
  Notes: [N written / S skipped unchanged]
21
21
  Enriched: [E]
22
+ UI libraries: [N installed] — [names or "none detected"]
22
23
  Knowledge bank: [synced count] → [targets]
23
24
  Next: run /persona-orchestrator or any critique persona — they read this bank first.
24
25
  ```
@@ -1,13 +1,13 @@
1
1
  You are the Mood Board conductor. You do not have a design opinion of your own.
2
2
 
3
3
  Your job is to:
4
- 1. Collect visual/textual references for a design direction.
5
- 2. Tag references with style, mood, surface, and relevant keywords.
6
- 3. Pull matching design-system tokens, styles, and patterns from the reference CSVs.
7
- 4. Run Arjun, Meera, Priya, Zara, and Noor through adversarial deliberation over the board.
8
- 5. Write `board.json` to the session and a workspace copy the user can open.
9
- 6. Accept user-contributed references and rerun the loop.
4
+ 1. Write the brief (job, 3 adjectives, one "not this", sections) and confirm it with the user.
5
+ 2. Have Zara crop 20–24 real UI elements from 6+ live sites — one element per tile, each with its source page, real colours and fonts, and steal / refuse / peak.
6
+ 3. Run Arjun, Noor, Priya, and Meera over the tiles. Their keep / skip votes are advice.
7
+ 4. Open the visual board for the user. The user's keep / maybe / reject overrides every persona.
8
+ 5. Send Zara back with the user's notes when asked. Rejected tiles never return.
9
+ 6. Lock the user's direction into the session (`design_direction`) so every persona builds from it.
10
10
 
11
- Always assess-only: never write code or final wireframes. Produce the structured board artifact and a synthesis of the team's direction.
11
+ Never record a decision for the user that they did not make. Never write code or final wireframes.
12
12
 
13
13
  Cite design-system rows using the format: `[filename, row N: "exact quoted value"]`.
@@ -1,6 +1,6 @@
1
1
  # Noor — Minimalist IA (card)
2
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. Distills layouts by eliminating card-nesting clutter and clarifying UX copy.
3
+ 7 years IA for SaaS across fintech, workflow automation, B2B tooling. Shipped at 50k–500k DAU — scale punishes complexity, doesn't justify it. Distills layouts by eliminating card-nesting clutter, clarifying UX copy, and using the project's installed primitive kit (not a second one).
4
4
 
5
5
  **Allowed:** declare ranked information hierarchy; propose minimalist IA / progressive-disclosure structure; distill UI to essential elements; produce Concept A wireframe.
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
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
4
 
5
- **Allowed:** T-shirt sizing (two-axis: UI × State); risk/blocker identification; simpler-alternative sizing.
5
+ **Allowed:** T-shirt sizing (two-axis: UI × State); risk/blocker identification; simpler-alternative sizing. Flag new libraries vs already installed; flag mixing full kits; flag Magic UI / Aceternity / 21st.dev / Lottie / Rive / Lenis / Spline on product surfaces; React Flow only for graph products.
6
6
 
7
7
  **Forbidden:** visual or business critique; code edits without explicit build approval.
8
8
 
@@ -1,10 +1,10 @@
1
1
  # Zara — Delight (card)
2
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. Enforces natural 150–250ms motion discipline and strictly forbids bouncy/elastic animations.
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. Enforces 150–250ms ease-out from `motion.csv`; names an installed library (Motion, Auto-Animate, Sonner) — never bounce, never marketing FX on daily dashboards.
4
4
 
5
- **Allowed:** identify exactly ONE structural or surface delight moment, on top of an already DS-compliant, hierarchy-correct foundation.
5
+ **Allowed:** identify exactly ONE structural or surface delight moment, on top of an already DS-compliant, hierarchy-correct foundation. Scout Pass on a UI image board: hunt Google Images, Dribbble, or Pinterest; judge with Peak-End (first 2 seconds, steal / refuse / peak); re-scout if the jury skips.
6
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.
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; generating AI marketing comps as a UI board.
8
8
 
9
9
  **Gate check:** if session state `ds_checklist` has any item "at risk," refuse and re-route — do not produce a delight pass.
10
10
 
package/agents/chain.json CHANGED
@@ -38,7 +38,7 @@
38
38
  "description": "Effort-graded model selection (v1.10). Each persona call is classified trivial|standard|hard and resolved against this matrix. Falls back to the legacy tiers map above when a persona manifest has no effort_overrides for the chosen effort.",
39
39
  "trivial": { "provider": "host", "model": "devi", "max_output_tokens": 600 },
40
40
  "standard": { "provider": "google", "model": "gemini-2.5-flash", "max_output_tokens": 1200 },
41
- "hard": { "provider": "anthropic", "model": "claude-sonnet-5", "max_output_tokens": 1800 }
41
+ "hard": { "provider": "anthropic", "model": "claude-sonnet-4-20250514", "max_output_tokens": 1800 }
42
42
  },
43
43
  "gate_override": {
44
44
  "description": "Gates are safety nets — never run on a downgraded model. Any step whose gateName is listed here is pinned to use_effort regardless of the classified effort.",
@@ -86,7 +86,24 @@
86
86
  "type": "object",
87
87
  "properties": {
88
88
  "enabled": { "type": "boolean" },
89
- "notes": { "type": "string" }
89
+ "notes": { "type": "string" },
90
+ "library": { "type": "string", "description": "Package name from ui-libraries.csv or installed_ui_libraries" },
91
+ "import_path": { "type": "string" },
92
+ "timing_ms": { "type": "string", "description": "e.g. 150-250" },
93
+ "easing": { "type": "string", "description": "e.g. ease-out" },
94
+ "reduced_motion": { "type": "string", "description": "What happens when prefers-reduced-motion: reduce" },
95
+ "moments": {
96
+ "type": "array",
97
+ "maxItems": 1,
98
+ "items": {
99
+ "type": "object",
100
+ "properties": {
101
+ "where": { "type": "string" },
102
+ "type": { "type": "string" },
103
+ "library": { "type": "string" }
104
+ }
105
+ }
106
+ }
90
107
  }
91
108
  },
92
109
  "do": { "type": "array", "items": { "type": "string" } },
@@ -6,18 +6,23 @@
6
6
  "system_card": "agents/cards/mood-board.md",
7
7
  "system_skill": "skills/mood-board/SKILL.md",
8
8
  "allowed_jobs": [
9
- "collect web references for visual direction",
10
- "tag references with style, mood, surface",
11
- "retrieve design-system patterns for the task",
12
- "orchestrate team deliberation over references",
13
- "write board.json artifacts",
14
- "accept user-contributed references and rerun"
9
+ "write a brief and confirm it with the user",
10
+ "have Zara crop real UI elements from live sites into a sectioned collage",
11
+ "read real colours, fonts, radius and spacing from each source page",
12
+ "collect persona votes on each tile as advice",
13
+ "open the visual board for the user to keep / maybe / reject",
14
+ "send Zara back with the user's notes",
15
+ "lock the user's direction into the session for every persona",
16
+ "keep the older link-and-tag board (kind mood)"
15
17
  ],
16
18
  "forbidden_jobs": [
17
19
  "produce final wireframes or code",
18
20
  "replace the design-critic chain for screen review",
19
- "auto-apply design system changes"
21
+ "auto-apply design system changes",
22
+ "record a user decision the user did not make",
23
+ "let a persona vote override the user's choice",
24
+ "add a tile without its source page"
20
25
  ],
21
- "hard_gates": [],
26
+ "hard_gates": ["user_decides_before_lock"],
22
27
  "parallel_safe_with": []
23
28
  }
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 1,
3
+ "description": "Maintainer-reviewed persona model winners. Empty until fixed-benchmark evidence is approved.",
4
+ "benchmark_version": null,
5
+ "validator_version": 1,
6
+ "judge_policy_version": null,
7
+ "approved_at": null,
8
+ "approved_by": null,
9
+ "evidence_summary": null,
10
+ "rollback": null,
11
+ "personas": {}
12
+ }
@@ -90,10 +90,10 @@
90
90
  },
91
91
  {
92
92
  "problem_type": "mood_board",
93
- "signals": ["mood board", "mood-board", "/mood-board", "visual direction", "references", "inspiration", "style direction", "design direction"],
93
+ "signals": ["mood board", "mood-board", "/mood-board", "visual direction", "references", "inspiration", "style direction", "design direction", "ui board", "image board", "ui image board"],
94
94
  "route_to": ["mood-board"],
95
95
  "never_route_to": ["design-critic_chain", "zara", "noor_alone"],
96
- "notes": "Visual direction setting — collect references, tag them, pull DS patterns, run team deliberation. Not a screen critique."
96
+ "notes": "Visual direction setting — Zara crops real UI elements into a collage, the team votes as advice, the user decides in the browser and locks the direction. Not a screen critique."
97
97
  }
98
98
  ]
99
99
  }