analyzthis_design 2.5.1 → 2.5.2

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 (89) hide show
  1. package/HOW-TO-USE.md +249 -326
  2. package/README.md +54 -20
  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 +3 -2
  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 +1 -0
  14. package/agents/model-policy.json +12 -0
  15. package/agents/router.json +1 -1
  16. package/agents/session-schema.json +12 -2
  17. package/dist/HOW-TO-USE.md +249 -326
  18. package/dist/README.md +54 -20
  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 +3 -2
  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 +1 -0
  30. package/dist/agents/model-policy.json +12 -0
  31. package/dist/agents/router.json +1 -1
  32. package/dist/agents/session-schema.json +12 -2
  33. package/dist/bin/cli.js +154 -5
  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/lessons.js +8 -0
  48. package/dist/lib/mcp-server.js +119 -5
  49. package/dist/lib/model-policy.js +174 -0
  50. package/dist/lib/model-registry.js +71 -0
  51. package/dist/lib/moodboard.js +162 -28
  52. package/dist/lib/orchestrator/run.js +67 -8
  53. package/dist/lib/outcome.js +7 -2
  54. package/dist/lib/output-quality.js +95 -0
  55. package/dist/lib/reference-pack.js +9 -1
  56. package/dist/lib/session.js +48 -4
  57. package/dist/lib/system-prompt.js +3 -0
  58. package/dist/lib/ui-libraries.js +232 -0
  59. package/dist/skills/anuj/SKILL.md +2 -0
  60. package/dist/skills/arjun/references/lens.md +2 -0
  61. package/dist/skills/design-director/SKILL.md +2 -1
  62. package/dist/skills/design-reference/SKILL.md +6 -0
  63. package/dist/skills/design-reference/motion.csv +11 -0
  64. package/dist/skills/design-reference/schema.json +12 -0
  65. package/dist/skills/design-reference/stacks/shadcn.csv +6 -0
  66. package/dist/skills/design-reference/ui-libraries.csv +46 -0
  67. package/dist/skills/design-spec/SKILL.md +1 -1
  68. package/dist/skills/getting-started/SKILL.md +2 -2
  69. package/dist/skills/kavi/SKILL.md +3 -2
  70. package/dist/skills/mood-board/SKILL.md +29 -3
  71. package/dist/skills/noor/SKILL.md +2 -0
  72. package/dist/skills/priya/SKILL.md +3 -0
  73. package/dist/skills/zara/SKILL.md +50 -4
  74. package/package.json +5 -2
  75. package/skills/anuj/SKILL.md +2 -0
  76. package/skills/arjun/references/lens.md +2 -0
  77. package/skills/design-director/SKILL.md +2 -1
  78. package/skills/design-reference/SKILL.md +6 -0
  79. package/skills/design-reference/motion.csv +11 -0
  80. package/skills/design-reference/schema.json +12 -0
  81. package/skills/design-reference/stacks/shadcn.csv +6 -0
  82. package/skills/design-reference/ui-libraries.csv +46 -0
  83. package/skills/design-spec/SKILL.md +1 -1
  84. package/skills/getting-started/SKILL.md +2 -2
  85. package/skills/kavi/SKILL.md +3 -2
  86. package/skills/mood-board/SKILL.md +29 -3
  87. package/skills/noor/SKILL.md +2 -0
  88. package/skills/priya/SKILL.md +3 -0
  89. package/skills/zara/SKILL.md +50 -4
package/README.md CHANGED
@@ -4,16 +4,26 @@ 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.5.2 — Motion, UX, and visual-design libraries
8
+
9
+ Personas cite real packages and prefer what is already in the repo:
10
+
11
+ - **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).
12
+ - **Kavi:** Reads the full `package.json` plus kit folders, writes `Tech/Installed-UI-Libraries.md`, stores `installed_ui_libraries` on the session.
13
+ - **Zara / Arjun / Anuj / Noor / Priya:** One library per job, installed first. Mixing two full kits is a block. Marketing FX stays off daily dashboards.
14
+ - **DesignSpec:** When motion is on, require library, import, timing, easing, and a reduced-motion fallback.
15
+ - **Design reference:** 30 CSV files total.
16
+
7
17
  ## v2.5.1 — Anti-AI-slop & craftsmanship rules
8
18
 
9
- Enriched our personas and design reference data with craftsmanship principles inspired by Impeccable:
19
+ Enriched personas and design reference data with craftsmanship principles inspired by Impeccable:
10
20
 
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).
21
+ - **Arjun:** Flags container nesting (`card > card > card`), untinted harsh black/gray, gray text on colored badges/headers, and cliché purple/blue AI gradients.
22
+ - **Noor:** Strips container clutter and enforces outcome-specific CTA labels (e.g. "Create Invoice" vs "Submit").
23
+ - **Anuj:** Audits overflow handling and complete 5-state form controls.
24
+ - **Zara:** 150–250ms ease-out; bans bouncy/elastic animations.
25
+ - **Kavi:** Records Durable Product Truth (audience, purpose, constraints, voice, evidence).
26
+ - **Design reference:** 11 craftsmanship rules in `ux-guidelines.csv` (rows 100–110).
17
27
 
18
28
  ## v2.5.0 — personas earn or lose trust
19
29
 
@@ -96,7 +106,7 @@ Pass `--global` to opt into the legacy merged behavior (read `config.sources` an
96
106
 
97
107
  Use `npx analyzthis_design run-unchunked` for the legacy single-pass orchestrator.
98
108
 
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)
109
+ **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.5.2 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
100
110
 
101
111
  ---
102
112
 
@@ -367,6 +377,25 @@ npx analyzthis_design run-unchunked --continue --task "Review invoice screen" --
367
377
 
368
378
  **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
379
 
380
+ ### Persona model calibration
381
+
382
+ 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.
383
+
384
+ ```bash
385
+ # Preview the fixed benchmark, eligible models, call count, and worst-case cost
386
+ npx analyzthis_design calibrate --max-usd 5 --max-calls 500
387
+
388
+ # Apply a qualified local winner after reviewing the preview/results
389
+ npx analyzthis_design calibrate --max-usd 5 --max-calls 500 --judge --apply
390
+
391
+ # Preview the text-free community payload; private-task results are never shared
392
+ npx analyzthis_design calibrate --share --dry-run
393
+ ```
394
+
395
+ 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.
396
+
397
+ 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.
398
+
370
399
  **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
400
 
372
401
  Supported providers: `host` | `anthropic` | `openai` | `google` | `zai` | `ollama` | `groq` | `together` | `openrouter` | `deepseek`
@@ -377,19 +406,19 @@ Provider defaults live in `~/.analyzthis_design/config.json`:
377
406
  {
378
407
  "orchestrator": {
379
408
  "provider": "anthropic",
380
- "model": "claude-sonnet-5",
409
+ "model": "claude-sonnet-4-20250514",
381
410
  "mode": "lite",
382
411
  "tiers": {
383
412
  "structured": { "provider": "openai", "model": "gpt-4o-mini" },
384
- "critique": { "provider": "anthropic", "model": "claude-sonnet-5" },
385
- "arbitrate": { "provider": "anthropic", "model": "claude-sonnet-5" }
413
+ "critique": { "provider": "anthropic", "model": "claude-sonnet-4-20250514" },
414
+ "arbitrate": { "provider": "anthropic", "model": "claude-sonnet-4-20250514" }
386
415
  },
387
416
  "max_tokens": { "structured": 900, "critique": 1800, "arbitrate": 1200 }
388
417
  },
389
418
  "pricing": {
390
419
  "glm-4.5-flash": { "input_per_m": 0, "output_per_m": 0 },
391
420
  "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 },
421
+ "claude-sonnet-4-20250514": { "input_per_m": 3, "output_per_m": 15 },
393
422
  "gpt-4o": { "input_per_m": 2.50, "output_per_m": 10 }
394
423
  },
395
424
  "research": { "provider": "https://example.com/search?q={query}" },
@@ -458,7 +487,7 @@ Classifier rules (first match wins, safety rules before savings rules):
458
487
  Default effort matrix (in `agents/chain.json`):
459
488
  - **trivial** → `host` / Devi (~600-token cap for objection rounds) — or API model when keys set
460
489
  - **standard** → `gemini-2.5-flash` or `gpt-4o-mini`, ~1200-token cap
461
- - **hard** → `claude-sonnet-5` or `gpt-5`, ~1800-token cap
490
+ - **hard** → `claude-sonnet-4-20250514`, ~1800-token cap
462
491
 
463
492
  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
493
 
@@ -477,7 +506,7 @@ Ask → session digest → MoE router (1–2 experts, not 4) → persona cards (
477
506
  | **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
507
  | **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
508
  | **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. |
509
+ | **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
510
  | **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
511
  | **Caching** | `lib/cache.js` caches retrieve results (invalidated automatically when the source CSV changes) and knowledge-bank slices (invalidated on `sync` / `session reset`). |
483
512
  | **Cost metrics** | Every `run` records `metrics` (llm_calls, experts_run, estimated tokens, cache_hits) into session state. |
@@ -632,7 +661,7 @@ npx analyzthis_design feedback status
632
661
  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
662
 
634
663
  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.
664
+ 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
665
  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
666
  4. Read submissions from your endpoint's dashboard.
638
667
 
@@ -819,8 +848,12 @@ npx analyzthis_design run --task "..." [--budget free|cheap|auto] [--sequential|
819
848
  npx analyzthis_design run-unchunked --task "..." [--lite|--full] [--experts a,b] [--dry-run] [--deliberate|--no-deliberate]
820
849
  npx analyzthis_design run --continue --task "..." # resume host-mode run after /devi
821
850
 
851
+ # Persona/model calibration (fixed benchmark; preview unless --apply)
852
+ npx analyzthis_design calibrate --max-usd 5 --max-calls 500 [--judge --apply]
853
+ npx analyzthis_design calibrate --share --dry-run
854
+
822
855
  # CSV validation
823
- npx analyzthis_design validate # validate all 28 CSV files against schema.json
856
+ npx analyzthis_design validate # validate all 30 CSV files against schema.json
824
857
 
825
858
  # MCP server (for any AI IDE: Cursor, Claude Desktop, Lovable, v0, Bolt, Replit)
826
859
  npx analyzthis_design mcp # start stdio MCP server
@@ -867,9 +900,10 @@ lib/
867
900
  install.js Skill installation
868
901
  knowledge.js Vault sync + web-context merge
869
902
  collect.js Kavi — codebase scan → vault → source discovery → enrich → sync
903
+ ui-libraries.js Detect motion/UX/visual kits from package.json + kit folders
870
904
  source-discovery.js Obsidian vault / wiki / knowledge-graph discovery + manifest MD
871
905
  platforms.js Cross-host skill paths (Cursor, Claude, Codex, Grok, Windsurf, agents)
872
- session.js Shared session-state.json (+ digest, metrics, vault_path)
906
+ session.js Shared session-state.json (+ digest, metrics, vault_path, installed_ui_libraries)
873
907
  research.js URL / query → web-context.md
874
908
  retrieve.js Filtered, citation-ready CSV row retrieval
875
909
  cache.js On-disk cache for retrieve/kb slices
@@ -961,14 +995,14 @@ skills/
961
995
  | **Planner never cheap** | Planner always uses frontier/host; chunk models are cost-optimized |
962
996
  | **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
997
  | **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 |
998
+ | **CSV schema + validation** | `npm run validate` checks all 30 CSV files against `schema.json` before publish |
965
999
  | **Best For Tags** | styles.csv + typography.csv have normalized tag columns for reliable keyword filtering |
966
1000
 
967
1001
  ## What's new in v1.22
968
1002
 
969
1003
  | Feature | Description |
970
1004
  |---------|-------------|
971
- | **Mood boards** | `/mood-board` collects web references + design-system patterns, tags them, and runs team deliberation |
1005
+ | **Mood boards** | Tagged URLs + team deliberation. **UI image boards:** Zara scouts 3–5 real shipped screens; Arjun/Noor/Priya/Meera jury; she re-scouts if they skip (max 3 rounds) |
972
1006
  | **User-contributed references** | User can add URLs/notes to a board and rerun the critique loop |
973
1007
  | **Visual direction setting** | Arjun, Meera, Priya, Zara, Noor score references via the UX Honeycomb rigor matrix |
974
1008
  | **Workspace artifacts** | `moodboard/{boardId}.json` is written into the project for the user to inspect |
@@ -1000,7 +1034,7 @@ skills/
1000
1034
 
1001
1035
  ## Marketing site
1002
1036
 
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`.
1037
+ 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
1038
 
1005
1039
  - Live: [https://analyzthis-lab.vercel.app](https://analyzthis-lab.vercel.app)
1006
1040
  - 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
  ```
@@ -5,8 +5,9 @@ Your job is to:
5
5
  2. Tag references with style, mood, surface, and relevant keywords.
6
6
  3. Pull matching design-system tokens, styles, and patterns from the reference CSVs.
7
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.
8
+ 5. On a **ui** board: Zara scouts real screens first. Arjun, Noor, Priya, Meera jury. She re-scouts if they skip (max 3 rounds).
9
+ 6. Write `board.json` to the session and a workspace copy the user can open.
10
+ 7. Accept user-contributed references and rerun the loop.
10
11
 
11
12
  Always assess-only: never write code or final wireframes. Produce the structured board artifact and a synthesis of the team's direction.
12
13
 
@@ -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" } },
@@ -7,6 +7,7 @@
7
7
  "system_skill": "skills/mood-board/SKILL.md",
8
8
  "allowed_jobs": [
9
9
  "collect web references for visual direction",
10
+ "run a Zara UI-image-board scout then a jury loop",
10
11
  "tag references with style, mood, surface",
11
12
  "retrieve design-system patterns for the task",
12
13
  "orchestrate team deliberation over references",
@@ -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,7 +90,7 @@
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
96
  "notes": "Visual direction setting — collect references, tag them, pull DS patterns, run team deliberation. Not a screen critique."
@@ -30,8 +30,9 @@
30
30
  "experts": ["string — persona ids"],
31
31
  "reason": "string"
32
32
  },
33
+ "active_run": "object | null — { id, mode, at }; feedback only accepts outputs carrying this run id",
33
34
  "persona_outputs": {
34
- "<persona_id>": "object — structured output block per agents/manifests/<persona_id>.json"
35
+ "<persona_id>": "object — output plus run_id, attribution { provider, model, model_id, effort, policy_version, prompt_hash, validator_version }, quality, and accepted state"
35
36
  },
36
37
  "full_prompts": {
37
38
  "<persona_id>": "object — { system: string, user: string } exact prompts sent to LLM for training"
@@ -73,6 +74,8 @@
73
74
  "correction": "string — how the user corrected or what they wanted instead",
74
75
  "tags": ["string — e.g. wrong_hierarchy, invented_tokens, off_brief"],
75
76
  "original_output": "string — snapshot of persona output at feedback time",
77
+ "run_id": "string | null — exact run that produced the rated output",
78
+ "attribution": "object — provider/model/effort and policy metadata copied from the output",
76
79
  "submitted_at": "ISO 8601 | omitted — set when feedback submit succeeds",
77
80
  "context": "object — task_map_summary, problem_type, mode"
78
81
  }
@@ -83,6 +86,13 @@
83
86
  },
84
87
  "vault_path": "string — Obsidian vault written by Kavi collect (empty until first collect)",
85
88
  "last_collect_at": "ISO 8601 timestamp — last successful collect run",
89
+ "installed_ui_libraries": {
90
+ "installed": [{ "library": "string", "job": "string", "how": "package.json | folder | package+folder" }],
91
+ "missing_defaults": [{ "job": "string", "library": "string", "install": "string", "docs": "string" }],
92
+ "full_kits": ["string — Chakra, Mantine, HeroUI, MUI, Ant Design, Ark"],
93
+ "mixed_kits": "boolean — more than one full kit, or a full kit plus Shadcn",
94
+ "folders": ["string — components/ui, components/magicui, ..."]
95
+ },
86
96
  "deliberation": {
87
97
  "round": "number — current deliberation round",
88
98
  "max_rounds": "number",
@@ -141,7 +151,7 @@
141
151
  "output_tokens_est": "number — estimated output tokens across the last run",
142
152
  "cache_hits": "number — retrieve/cache hits during the last run",
143
153
  "mode": "lite | full",
144
- "effort_log": [{ "persona": "string", "effort": "trivial|standard|hard", "model": "string|null", "scoped_mode": "string|null" }],
154
+ "effort_log": [{ "persona": "string", "effort": "trivial|standard|hard", "provider": "string|null", "model": "string|null", "model_id": "string|null", "input_tokens": "number", "output_tokens": "number", "run_id": "string", "scoped_mode": "string|null" }],
145
155
  "cost_usd": "number — estimated $ cost of the run from config.pricing (0 when pricing missing)",
146
156
  "deliberation_rounds": "number — adversarial rounds executed in last run",
147
157
  "objections_raised": "number",