analyzthis_design 1.12.0 → 1.18.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.
- package/.github/ISSUE_TEMPLATE/persona-feedback.yml +75 -0
- package/README.md +173 -25
- package/agents/cards/design-director.md +19 -0
- package/agents/cards/kavi.md +1 -1
- package/agents/design-spec-schema.json +111 -0
- package/agents/manifests/design-director.json +26 -0
- package/agents/manifests/kavi.json +1 -1
- package/agents/router.json +9 -2
- package/agents/session-schema.json +29 -0
- package/dist/bin/cli.js +1 -1
- package/dist/lib/cache.js +1 -1
- package/dist/lib/collect.js +1 -1
- package/dist/lib/cost.js +1 -1
- package/dist/lib/design-spec.js +2 -0
- package/dist/lib/export.js +1 -1
- package/dist/lib/feedback-submit.js +1 -0
- package/dist/lib/feedback.js +1 -0
- package/dist/lib/install.js +1 -1
- package/dist/lib/knowledge.js +1 -1
- package/dist/lib/orchestrator/run.js +1 -1
- package/dist/lib/platforms.js +1 -1
- package/dist/lib/research.js +1 -1
- package/dist/lib/retrieve.js +1 -1
- package/dist/lib/session.js +1 -1
- package/dist/lib/source-discovery.js +2 -0
- package/package.json +4 -2
- package/skills/collect-knowledge/SKILL.md +7 -115
- package/skills/design-director/SKILL.md +169 -0
- package/skills/design-spec/SKILL.md +106 -0
- package/skills/getting-started/SKILL.md +16 -7
- package/skills/kavi/SKILL.md +118 -0
- package/skills/persona-orchestrator/SKILL.md +26 -0
- package/skills/ux-ideator/SKILL.md +22 -0
- package/supabase/feedback-config.example.json +7 -0
- package/supabase/migrations/001_persona_feedback.sql +54 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: Persona feedback
|
|
2
|
+
description: Report when a design persona got it wrong or you had to correct it
|
|
3
|
+
title: "[feedback] "
|
|
4
|
+
labels: ["persona-feedback"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Help improve analyzthis_design personas. Prefer CLI submit when possible:
|
|
10
|
+
`npx analyzthis_design feedback record ...` then `npx analyzthis_design feedback submit --yes`
|
|
11
|
+
|
|
12
|
+
- type: dropdown
|
|
13
|
+
id: persona
|
|
14
|
+
attributes:
|
|
15
|
+
label: Persona
|
|
16
|
+
options:
|
|
17
|
+
- arjun
|
|
18
|
+
- meera
|
|
19
|
+
- priya
|
|
20
|
+
- zara
|
|
21
|
+
- raj
|
|
22
|
+
- noor
|
|
23
|
+
- anuj
|
|
24
|
+
- design-director
|
|
25
|
+
- other
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
|
|
29
|
+
- type: dropdown
|
|
30
|
+
id: rating
|
|
31
|
+
attributes:
|
|
32
|
+
label: How happy were you with the output?
|
|
33
|
+
options:
|
|
34
|
+
- "1 — very unhappy"
|
|
35
|
+
- "2 — unhappy"
|
|
36
|
+
- "3 — okay"
|
|
37
|
+
- "4 — good"
|
|
38
|
+
- "5 — great"
|
|
39
|
+
validations:
|
|
40
|
+
required: true
|
|
41
|
+
|
|
42
|
+
- type: checkboxes
|
|
43
|
+
id: tags
|
|
44
|
+
attributes:
|
|
45
|
+
label: What went wrong?
|
|
46
|
+
options:
|
|
47
|
+
- label: wrong_hierarchy
|
|
48
|
+
- label: invented_tokens
|
|
49
|
+
- label: missed_ds
|
|
50
|
+
- label: too_verbose
|
|
51
|
+
- label: bad_ia
|
|
52
|
+
- label: off_brief
|
|
53
|
+
- label: other
|
|
54
|
+
|
|
55
|
+
- type: textarea
|
|
56
|
+
id: comment
|
|
57
|
+
attributes:
|
|
58
|
+
label: What was wrong?
|
|
59
|
+
placeholder: The persona suggested colors that aren't in our design system...
|
|
60
|
+
validations:
|
|
61
|
+
required: true
|
|
62
|
+
|
|
63
|
+
- type: textarea
|
|
64
|
+
id: correction
|
|
65
|
+
attributes:
|
|
66
|
+
label: What did you want instead? (how you corrected it)
|
|
67
|
+
placeholder: Use --color-primary from tokens.css; primary CTA should be top-right...
|
|
68
|
+
validations:
|
|
69
|
+
required: true
|
|
70
|
+
|
|
71
|
+
- type: input
|
|
72
|
+
id: version
|
|
73
|
+
attributes:
|
|
74
|
+
label: Package version (optional)
|
|
75
|
+
placeholder: "1.17.0"
|
package/README.md
CHANGED
|
@@ -37,8 +37,8 @@ npx analyzthis_design --target all --force
|
|
|
37
37
|
| Cursor | `~/.cursor/skills/<name>/SKILL.md` | `/getting-started` |
|
|
38
38
|
| Claude Code | `~/.claude/skills/<name>/SKILL.md` (+ legacy `~/.claude/commands/`) | `/getting-started` |
|
|
39
39
|
| Codex CLI | `~/.codex/skills/<name>/SKILL.md` | skill name / AGENTS.md |
|
|
40
|
-
| Grok Build | `~/.grok/skills/<name>/SKILL.md` | `/
|
|
41
|
-
| Windsurf Cascade | `~/.codeium/windsurf/skills/<name>/SKILL.md` | `@
|
|
40
|
+
| Grok Build | `~/.grok/skills/<name>/SKILL.md` | `/kavi` |
|
|
41
|
+
| Windsurf Cascade | `~/.codeium/windsurf/skills/<name>/SKILL.md` | `@kavi` |
|
|
42
42
|
| Cross-agent | `~/.agents/skills/<name>/SKILL.md` | discovered by multiple hosts |
|
|
43
43
|
|
|
44
44
|
All skills use the **Agent Skills** `SKILL.md` standard — same files work across Cursor, Claude, Grok, Windsurf, and Codex. The CLI (`collect`, `run`, `sync`) is host-agnostic; only *where skills are discovered* differs.
|
|
@@ -52,7 +52,9 @@ All skills use the **Agent Skills** `SKILL.md` standard — same files work acro
|
|
|
52
52
|
| Command | What it does |
|
|
53
53
|
|---|---|
|
|
54
54
|
| `/getting-started` | **First-run guide** — which command to use for wireframes vs critique |
|
|
55
|
-
| `/
|
|
55
|
+
| `/design-director` | **Full producer path** — ideation → DesignSpec (tokens + components) → spec gates → implement when approved |
|
|
56
|
+
| `/ux-ideator` | **Full ideation** — two competing text wireframes (minimalist vs dense), deliberation, delight, feasibility, DesignSpec |
|
|
57
|
+
| `/design-spec` | **DesignSpec contract** — layout, tokens, component mapping, states (use with design-director) |
|
|
56
58
|
| `/noor` | **Quick minimalist wireframe** — Concept A text wireframe, progressive disclosure |
|
|
57
59
|
| `/anuj` | **Power-user wireframe** — Concept B text wireframe, density + bulk actions |
|
|
58
60
|
|
|
@@ -60,18 +62,18 @@ All skills use the **Agent Skills** `SKILL.md` standard — same files work acro
|
|
|
60
62
|
|
|
61
63
|
| Command | What it does |
|
|
62
64
|
|---|---|
|
|
63
|
-
| `/
|
|
65
|
+
| `/kavi` | **Kavi — Knowledge Archivist.** Scans the codebase, builds an Obsidian vault, LLM-enriches notes, syncs into the knowledge bank. Run once per project before critiques. _(Alias: `/collect-knowledge`)_ |
|
|
64
66
|
| `/persona-orchestrator` | **Agentic critique entry point** (not for wireframes). MoE router + session state, ux-story-gate intake, persona chain, DS / hierarchy / verify gates → SHIP/REVISE/BLOCK |
|
|
65
67
|
| `/ux-story-gate` | Task-first gate: PRDs, DS/Figma discovery, MoE routing, browser verify, assess-only mode |
|
|
66
68
|
| `/design-critic` | 4-persona critique → Composite Score + Information Hierarchy Gate |
|
|
67
69
|
|
|
68
70
|
### 8 Personas
|
|
69
71
|
|
|
70
|
-
Invoke critique personas for targeted, already-grounded questions. For **wireframes**, use `/ux-ideator`, `/noor`, or `/anuj`. For full screen **critique**, prefer `/persona-orchestrator` or `/ux-story-gate`. Run
|
|
72
|
+
Invoke critique personas for targeted, already-grounded questions. For **wireframes**, use `/ux-ideator`, `/noor`, or `/anuj`. For full screen **critique**, prefer `/persona-orchestrator` or `/ux-story-gate`. Run **`/kavi`** first so they have project context.
|
|
71
73
|
|
|
72
74
|
| Command | Persona | What they evaluate |
|
|
73
75
|
|---|---|---|
|
|
74
|
-
| `/
|
|
76
|
+
| `/kavi` | Kavi — Knowledge Archivist | Scan repo → Obsidian vault → enrich → sync knowledge bank (producer, not a critic) |
|
|
75
77
|
| `/arjun` | UX + Visual Design | UX Honeycomb + Visual Design Audit (hierarchy, color, type, spacing, components, style fit, micro-interactions) |
|
|
76
78
|
| `/meera` | Business Agent | Retention, ARR, GTM lever, adoption risk; hierarchy vs north-star check |
|
|
77
79
|
| `/priya` | Feasibility Agent | Engineering effort (T-shirt sizing, 2-axis model), state machine traps |
|
|
@@ -90,7 +92,7 @@ Invoke critique personas for targeted, already-grounded questions. For **wirefra
|
|
|
90
92
|
|
|
91
93
|
---
|
|
92
94
|
|
|
93
|
-
## Agentic system (v1.
|
|
95
|
+
## Agentic system (v1.15)
|
|
94
96
|
|
|
95
97
|
```
|
|
96
98
|
User ask / Figma URL
|
|
@@ -160,20 +162,36 @@ Provider defaults live in `~/.analyzthis_design/config.json`:
|
|
|
160
162
|
"claude-sonnet-5": { "input_per_m": 2, "output_per_m": 10 },
|
|
161
163
|
"gpt-4o": { "input_per_m": 2.50, "output_per_m": 10 }
|
|
162
164
|
},
|
|
163
|
-
"research": { "provider": "https://example.com/search?q={query}" }
|
|
165
|
+
"research": { "provider": "https://example.com/search?q={query}" },
|
|
166
|
+
"collect": {
|
|
167
|
+
"web_urls": ["https://your-company.com/brand-guidelines"],
|
|
168
|
+
"web_queries": ["competitor onboarding patterns"],
|
|
169
|
+
"web_limit": 10,
|
|
170
|
+
"web_from_repo": true
|
|
171
|
+
}
|
|
164
172
|
}
|
|
165
173
|
```
|
|
166
174
|
|
|
167
175
|
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.
|
|
168
176
|
|
|
169
|
-
**Web research:**
|
|
177
|
+
**Web research (automatic in collect):**
|
|
178
|
+
|
|
179
|
+
Kavi fetches URLs during `collect` — from config and from links in README/PRD markdown — and merges them into the knowledge bank. You usually do **not** need a separate `research` step.
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
npx analyzthis_design collect # repo + web URLs in one pass
|
|
183
|
+
npx analyzthis_design collect --dry-run # preview URLs Kavi will fetch
|
|
184
|
+
npx analyzthis_design collect --no-web # repo only
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Manual research (optional, when you want one-off fetches without a full collect):
|
|
170
188
|
|
|
171
189
|
```bash
|
|
172
190
|
npx analyzthis_design research --url https://example.com/design-tokens
|
|
173
191
|
npx analyzthis_design research --query "EY design system tokens"
|
|
174
192
|
```
|
|
175
193
|
|
|
176
|
-
Writes to `~/.analyzthis_design/sessions/{id}/web-context.md` and merges into the knowledge bank on `sync`.
|
|
194
|
+
Writes to `~/.analyzthis_design/sessions/{id}/web-context.md` and merges into the knowledge bank on `sync` / `collect`.
|
|
177
195
|
|
|
178
196
|
---
|
|
179
197
|
|
|
@@ -264,11 +282,101 @@ analyzthis_design is a design **critique** layer, not a design generator. The pe
|
|
|
264
282
|
**LoRA readiness (export hook only — no training in this release):**
|
|
265
283
|
|
|
266
284
|
```bash
|
|
267
|
-
|
|
285
|
+
# Good examples (positive pairs)
|
|
286
|
+
npx analyzthis_design session accept --persona arjun
|
|
268
287
|
npx analyzthis_design export-training --persona arjun --all
|
|
288
|
+
|
|
289
|
+
# Bad output + how you corrected it (negative / DPO pairs) — v1.16
|
|
290
|
+
npx analyzthis_design session accept --persona arjun --reject \
|
|
291
|
+
--comment "Invented tokens not in our DS" \
|
|
292
|
+
--correction "Use --color-primary and spacing-4 from tokens.css" \
|
|
293
|
+
--rating 2 --tags invented_tokens,missed_ds
|
|
294
|
+
|
|
295
|
+
npx analyzthis_design feedback record --persona arjun --rating 2 \
|
|
296
|
+
--comment "Hierarchy wrong — CTA buried" \
|
|
297
|
+
--correction "Primary action should be top-right, above the fold"
|
|
298
|
+
|
|
299
|
+
npx analyzthis_design feedback list
|
|
300
|
+
npx analyzthis_design feedback export --persona arjun --all
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
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.
|
|
304
|
+
|
|
305
|
+
**Correction export** writes `{ assistant_rejected, assistant_preferred, user_comment, tags }` to `~/.analyzthis_design/feedback/<persona>-corrections.jsonl` — useful when users were unhappy or had to rewrite persona output. Every entry is also appended to a global `corrections.jsonl` across projects.
|
|
306
|
+
|
|
307
|
+
Once a persona accumulates ~100–300 accepted pairs (and optionally correction pairs), that data is ready for a future fine-tuning pass on an open model — not part of this package yet.
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Persona feedback — corrections & unhappiness (v1.16)
|
|
312
|
+
|
|
313
|
+
When a persona gets it wrong, you can record **what was wrong** and **how you fixed it**. This feeds future fine-tuning (negative / DPO pairs) alongside the existing positive `export-training` path.
|
|
314
|
+
|
|
315
|
+
| Command | Purpose |
|
|
316
|
+
|---------|---------|
|
|
317
|
+
| `feedback record` | Log rating, comment, correction, tags for a persona's last output |
|
|
318
|
+
| `feedback list` | See all feedback for this project (or `--all`) |
|
|
319
|
+
| `feedback export` | Write `{ assistant_rejected, assistant_preferred, … }` JSONL |
|
|
320
|
+
| `session accept --reject --comment …` | Reject + record in one step |
|
|
321
|
+
|
|
322
|
+
Suggested tags: `wrong_hierarchy`, `invented_tokens`, `missed_ds`, `too_verbose`, `bad_ia`, `off_brief`.
|
|
323
|
+
|
|
324
|
+
Stored in `session-state.json` → `feedback_log` and appended globally to `~/.analyzthis_design/feedback/corrections.jsonl`.
|
|
325
|
+
|
|
326
|
+
### Community collection (v1.17) — opt-in submit
|
|
327
|
+
|
|
328
|
+
For **open-source contributors**, share anonymized corrections with maintainers:
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
npx analyzthis_design feedback record --persona arjun --rating 2 --comment "..." --correction "..."
|
|
332
|
+
npx analyzthis_design feedback submit --dry-run # preview redacted payload
|
|
333
|
+
npx analyzthis_design feedback submit --all --yes # send unsent entries (asks consent once)
|
|
334
|
+
npx analyzthis_design feedback status
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**What gets sent:** persona, rating, tags, comment, correction, redacted output snippets, anonymous install id, package version.
|
|
338
|
+
|
|
339
|
+
**What does NOT get sent:** project paths, repo names, emails, API keys, full source trees.
|
|
340
|
+
|
|
341
|
+
**Maintainer setup (Supabase):**
|
|
342
|
+
|
|
343
|
+
1. Create a Supabase project
|
|
344
|
+
2. Run `supabase/migrations/001_persona_feedback.sql` in the SQL editor
|
|
345
|
+
3. Copy `supabase/feedback-config.example.json` into `~/.analyzthis_design/config.json` under `"feedback"` (or set env vars `ANALYZTHIS_FEEDBACK_URL` + `ANALYZTHIS_FEEDBACK_ANON_KEY`)
|
|
346
|
+
4. View submissions in Supabase Table Editor → `persona_feedback`
|
|
347
|
+
|
|
348
|
+
Users can also file GitHub issues via **Persona feedback** template if they prefer not to use CLI submit.
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## DesignSpec — Designer-grade handoff (v1.15)
|
|
353
|
+
|
|
354
|
+
Personas can now guide **what** and **how** to design — not just critique.
|
|
355
|
+
|
|
356
|
+
```
|
|
357
|
+
/ux-ideator or /design-director
|
|
358
|
+
↓
|
|
359
|
+
Text wireframe + information hierarchy
|
|
360
|
+
↓
|
|
361
|
+
DesignSpec JSON (layout, tokens, components, states)
|
|
362
|
+
↓
|
|
363
|
+
Spec gates: DS + hierarchy + Arjun visual
|
|
364
|
+
↓
|
|
365
|
+
status: ship → implement (if build_approved)
|
|
366
|
+
↓
|
|
367
|
+
Browser verify + delta critique
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
**DesignSpec** fields: `intent`, `information_hierarchy`, `layout.regions`, `tokens` (from your DS), `components[]` (real import paths), `states` (empty/loading/error/success), `do`/`dont`.
|
|
371
|
+
|
|
372
|
+
```bash
|
|
373
|
+
npx analyzthis_design spec template # empty copy-paste block
|
|
374
|
+
npx analyzthis_design spec validate --file design-spec.json
|
|
375
|
+
npx analyzthis_design spec save --file design-spec.json
|
|
376
|
+
npx analyzthis_design spec show
|
|
269
377
|
```
|
|
270
378
|
|
|
271
|
-
|
|
379
|
+
Schema: `agents/design-spec-schema.json`. Producer orchestration: `/design-director`.
|
|
272
380
|
|
|
273
381
|
---
|
|
274
382
|
|
|
@@ -291,32 +399,53 @@ Writes `{ system_card, digest, user, assistant }` JSONL pairs to `~/.analyzthis_
|
|
|
291
399
|
|
|
292
400
|
---
|
|
293
401
|
|
|
294
|
-
## Knowledge collection — Kavi (v1.
|
|
402
|
+
## Knowledge collection — Kavi (v1.14)
|
|
295
403
|
|
|
296
|
-
Kavi is a **producer** persona (not a critic). One command scans the current repo, writes an Obsidian vault, optionally enriches notes
|
|
404
|
+
Kavi is a **producer** persona (not a critic). One command scans the current repo, **discovers Obsidian vaults and knowledge graphs**, **fetches external URLs**, writes an Obsidian vault with dynamic `Sources/*.md` manifests, optionally enriches notes, then auto-connects and syncs everything into the knowledge bank.
|
|
297
405
|
|
|
298
406
|
```
|
|
299
|
-
/
|
|
407
|
+
/kavi (or npx analyzthis_design collect)
|
|
408
|
+
↓
|
|
409
|
+
Scan codebase → draft Obsidian notes
|
|
300
410
|
↓
|
|
301
|
-
|
|
411
|
+
Discover knowledge sources (.obsidian vaults, wikis, refs in README/docs)
|
|
302
412
|
↓
|
|
303
|
-
|
|
413
|
+
Write Sources/*.md manifest notes + _meta/knowledge-sources.md
|
|
304
414
|
↓
|
|
305
|
-
|
|
415
|
+
Auto-connect discovered vaults + fetch web URLs → web-context.md
|
|
306
416
|
↓
|
|
307
|
-
|
|
417
|
+
LLM enrich (optional)
|
|
308
418
|
↓
|
|
309
|
-
|
|
419
|
+
connect + sync → knowledge bank (repo + vaults + web)
|
|
420
|
+
↓
|
|
421
|
+
Personas read unified context first
|
|
310
422
|
```
|
|
311
423
|
|
|
312
424
|
```bash
|
|
313
425
|
# In your app repo (sync KB to every host):
|
|
314
426
|
npx analyzthis_design collect --target all
|
|
315
|
-
npx analyzthis_design collect --dry-run
|
|
427
|
+
npx analyzthis_design collect --dry-run # preview notes + URLs
|
|
428
|
+
npx analyzthis_design collect --no-web # skip external fetch
|
|
316
429
|
npx analyzthis_design collect --no-enrich --limit 50
|
|
317
430
|
npx analyzthis_design collect --vault ~/Documents/MyProjectVault --target claude
|
|
318
431
|
```
|
|
319
432
|
|
|
433
|
+
Add external sources and vault paths in `~/.analyzthis_design/config.json`:
|
|
434
|
+
|
|
435
|
+
```json
|
|
436
|
+
{
|
|
437
|
+
"collect": {
|
|
438
|
+
"source_paths": ["~/Documents/MyCompanyVault"],
|
|
439
|
+
"scan_home_vaults": false,
|
|
440
|
+
"auto_connect_discovered": true,
|
|
441
|
+
"web_urls": ["https://your-company.com/brand-guidelines"],
|
|
442
|
+
"web_limit": 10
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Kavi auto-discovers: `.obsidian/` vaults in the repo, markdown wikis, knowledge-graph mentions, and vault paths referenced in README / AGENTS.md / docs. Each discovery gets a `Sources/*.md` manifest note fed into the knowledge bank.
|
|
448
|
+
|
|
320
449
|
Vault folders: `PRDs/`, `Brand/`, `Product/`, `Pages/`, `Components/`, `Design/`, `Tech/`, `Research/`, `_meta/`. Notes use YAML frontmatter + `[[wikilinks]]`. Re-runs skip unchanged enriched notes via content hash.
|
|
321
450
|
|
|
322
451
|
Enrichment needs one of: `OPENAI_API_KEY`, `GEMINI_API_KEY`, `ANTHROPIC_API_KEY`, `ZAI_API_KEY`. Without a key, Kavi still writes a draft vault and syncs it.
|
|
@@ -356,8 +485,14 @@ npx analyzthis_design welcome [--target cursor|claude|all]
|
|
|
356
485
|
npx analyzthis_design remove --target all
|
|
357
486
|
npx analyzthis_design list --target all
|
|
358
487
|
|
|
488
|
+
# Design spec
|
|
489
|
+
npx analyzthis_design spec template
|
|
490
|
+
npx analyzthis_design spec validate --file design-spec.json
|
|
491
|
+
npx analyzthis_design spec save --file design-spec.json
|
|
492
|
+
npx analyzthis_design spec show
|
|
493
|
+
|
|
359
494
|
# Knowledge collection (Kavi)
|
|
360
|
-
npx analyzthis_design collect [--vault path] [--dry-run] [--no-enrich] [--limit N] [--target
|
|
495
|
+
npx analyzthis_design collect [--vault path] [--dry-run] [--no-enrich] [--no-web] [--no-discover] [--web-limit N] [--target ...]
|
|
361
496
|
|
|
362
497
|
# Knowledge bank
|
|
363
498
|
npx analyzthis_design connect --vault <path> [--tags ...] [--include ...]
|
|
@@ -367,7 +502,15 @@ npx analyzthis_design status
|
|
|
367
502
|
|
|
368
503
|
# Session (agentic)
|
|
369
504
|
npx analyzthis_design session init|show|reset [--project id] [--all]
|
|
370
|
-
npx analyzthis_design session accept --persona <id> [--reject]
|
|
505
|
+
npx analyzthis_design session accept --persona <id> [--reject] [--comment "..."] [--correction "..."] [--rating 1-5] [--tags a,b]
|
|
506
|
+
|
|
507
|
+
# Persona feedback (v1.16)
|
|
508
|
+
npx analyzthis_design feedback record --persona <id> [--rating 1-5] [--comment "..."] [--correction "..."] [--tags a,b]
|
|
509
|
+
npx analyzthis_design feedback list [--all]
|
|
510
|
+
npx analyzthis_design feedback export [--persona <id>] [--all] [--output path] [--include-positive]
|
|
511
|
+
npx analyzthis_design feedback submit [--persona <id>] [--all] [--yes] [--dry-run]
|
|
512
|
+
npx analyzthis_design feedback status
|
|
513
|
+
npx analyzthis_design feedback revoke
|
|
371
514
|
|
|
372
515
|
# Research
|
|
373
516
|
npx analyzthis_design research --url <url>
|
|
@@ -384,6 +527,7 @@ npx analyzthis_design run --task "..." [--lite | --full] [--experts a,b]
|
|
|
384
527
|
npx analyzthis_design metrics [--project id] [--all]
|
|
385
528
|
npx analyzthis_design cost [--project id] [--all]
|
|
386
529
|
npx analyzthis_design export-training --persona <id> [--project id] [--all] [--output path]
|
|
530
|
+
npx analyzthis_design feedback export [--persona <id>] [--project id] [--all] [--output path]
|
|
387
531
|
```
|
|
388
532
|
|
|
389
533
|
---
|
|
@@ -397,18 +541,22 @@ bin/cli.js CLI entry point
|
|
|
397
541
|
lib/
|
|
398
542
|
install.js Skill installation
|
|
399
543
|
knowledge.js Vault sync + web-context merge
|
|
400
|
-
collect.js Kavi — codebase scan →
|
|
544
|
+
collect.js Kavi — codebase scan → vault → source discovery → enrich → sync
|
|
545
|
+
source-discovery.js Obsidian vault / wiki / knowledge-graph discovery + manifest MD
|
|
401
546
|
platforms.js Cross-host skill paths (Cursor, Claude, Codex, Grok, Windsurf, agents)
|
|
402
547
|
session.js Shared session-state.json (+ digest, metrics, vault_path)
|
|
403
548
|
research.js URL / query → web-context.md
|
|
404
549
|
retrieve.js Filtered, citation-ready CSV row retrieval
|
|
405
550
|
cache.js On-disk cache for retrieve/kb slices
|
|
406
551
|
export.js LoRA training-pair export hook
|
|
552
|
+
feedback.js Persona unhappiness + correction logging (session + global JSONL)
|
|
553
|
+
feedback-submit.js Opt-in anonymized submit to Supabase (community feedback)
|
|
407
554
|
cost.js $-cost report from metrics × config.pricing
|
|
408
555
|
orchestrator/run.js Standalone LLM runtime (v2) — MoE, effort-graded tiers, caps, cache-aware
|
|
409
556
|
scripts/obfuscate.js Build step → dist/
|
|
410
557
|
skills/
|
|
411
|
-
|
|
558
|
+
kavi/ Kavi — Knowledge Archivist (/kavi)
|
|
559
|
+
collect-knowledge/ Alias for Kavi (backward compatible)
|
|
412
560
|
persona-orchestrator/ Agentic critique entry point
|
|
413
561
|
ux-story-gate/ Task-first gate + DS/MoE/verify/assess phases
|
|
414
562
|
design-critic/ 4-persona critique + hierarchy gate
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Design Director (card)
|
|
2
|
+
|
|
3
|
+
Producer orchestrator — ideation → **DesignSpec** → spec gates → implementation when `build_approved`.
|
|
4
|
+
|
|
5
|
+
**Allowed:** run ux-ideator wireframes; synthesize DesignSpec; DS + hierarchy + Arjun spec validation; hand off SHIPped spec to host for TSX build; post-build verify.
|
|
6
|
+
|
|
7
|
+
**Forbidden:** implement on `assess_only`; skip spec gates; code without `status: ship`.
|
|
8
|
+
|
|
9
|
+
## Lite summary (for routing only)
|
|
10
|
+
Use full `skills/design-director/SKILL.md` for any producer run — never lite for spec synthesis.
|
|
11
|
+
|
|
12
|
+
## Spec gate checklist
|
|
13
|
+
- DS: tokens from project, no invented hex
|
|
14
|
+
- Hierarchy: rank #1 → `hierarchy_rank: 1` component
|
|
15
|
+
- Arjun: type/spacing/contrast classes on spec
|
|
16
|
+
- All pass → `status: ship` → build if approved
|
|
17
|
+
|
|
18
|
+
## CLI
|
|
19
|
+
`npx analyzthis_design spec show | validate | template`
|
package/agents/cards/kavi.md
CHANGED
|
@@ -23,4 +23,4 @@ Knowledge bank: [synced count] → [targets]
|
|
|
23
23
|
Next: run /persona-orchestrator or any critique persona — they read this bank first.
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Consult `skills/
|
|
26
|
+
Consult `skills/kavi/SKILL.md` for the host workflow. Prefer running `npx analyzthis_design collect` over re-scanning files in chat. Invoke as **`/kavi`** (alias: `/collect-knowledge`).
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "DesignSpec",
|
|
4
|
+
"description": "Machine-readable design contract produced after ideation. Guides WHAT to design and HOW (tokens, components, layout, states). Personas and the host LLM must not drift from a SHIPped spec.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["version", "screen_name", "status", "intent", "information_hierarchy", "layout", "tokens", "components", "states"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"version": { "type": "string", "const": "1.0" },
|
|
9
|
+
"screen_name": { "type": "string", "minLength": 1 },
|
|
10
|
+
"status": { "enum": ["draft", "spec_review", "ship", "revise"] },
|
|
11
|
+
"intent": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"required": ["primary_user_task", "primary_action"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"primary_user_task": { "type": "string" },
|
|
16
|
+
"north_star_metric": { "type": "string" },
|
|
17
|
+
"primary_action": { "type": "string" },
|
|
18
|
+
"business_framing": { "type": "string" }
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"information_hierarchy": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"minItems": 1,
|
|
24
|
+
"items": { "type": "string" }
|
|
25
|
+
},
|
|
26
|
+
"layout": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": ["grid", "regions"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"grid": { "type": "string", "description": "e.g. 12-col, single-column" },
|
|
31
|
+
"max_width": { "type": "string", "description": "Tailwind or token, e.g. max-w-7xl" },
|
|
32
|
+
"breakpoints": { "type": "array", "items": { "type": "string" } },
|
|
33
|
+
"nav_level": { "type": "string", "enum": ["L1", "L2", "L3"] },
|
|
34
|
+
"regions": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"minItems": 1,
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"required": ["name", "content"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"name": { "type": "string" },
|
|
42
|
+
"span": { "type": "string" },
|
|
43
|
+
"content": { "type": "string" }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"tokens": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": ["colors", "typography", "spacing"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"colors": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
54
|
+
"typography": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
55
|
+
"spacing": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
56
|
+
"source": { "type": "string", "description": "tailwind.config | css-vars | figma | knowledge-bank" }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"components": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"minItems": 1,
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"required": ["region", "component"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"region": { "type": "string" },
|
|
67
|
+
"component": { "type": "string" },
|
|
68
|
+
"import_path": { "type": "string" },
|
|
69
|
+
"variant": { "type": "string" },
|
|
70
|
+
"props": { "type": "object" },
|
|
71
|
+
"hierarchy_rank": { "type": "number", "minimum": 1 }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"states": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"required": ["empty", "loading", "error", "success"],
|
|
78
|
+
"properties": {
|
|
79
|
+
"empty": { "type": "string" },
|
|
80
|
+
"loading": { "type": "string" },
|
|
81
|
+
"error": { "type": "string" },
|
|
82
|
+
"success": { "type": "string" }
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"motion": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"enabled": { "type": "boolean" },
|
|
89
|
+
"notes": { "type": "string" }
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"do": { "type": "array", "items": { "type": "string" } },
|
|
93
|
+
"dont": { "type": "array", "items": { "type": "string" } },
|
|
94
|
+
"wireframe_ref": { "type": "string" },
|
|
95
|
+
"delight_moment": { "type": "string" },
|
|
96
|
+
"effort_estimate": { "type": "string" },
|
|
97
|
+
"citations": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": { "type": "string", "description": "[filename, row N: \"value\"] format" }
|
|
100
|
+
},
|
|
101
|
+
"spec_verdict": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"properties": {
|
|
104
|
+
"arjun_visual": { "enum": ["pass", "revise", "pending"] },
|
|
105
|
+
"ds_gate": { "enum": ["pass", "fail", "pending"] },
|
|
106
|
+
"hierarchy_gate": { "enum": ["pass", "fail", "pending"] },
|
|
107
|
+
"notes": { "type": "string" }
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "design-director",
|
|
3
|
+
"role": "design_producer",
|
|
4
|
+
"system_skill": "skills/design-director/SKILL.md",
|
|
5
|
+
"system_card": "agents/cards/design-director.md",
|
|
6
|
+
"tier": "critique",
|
|
7
|
+
"max_output_tokens": 4000,
|
|
8
|
+
"parallel_safe_with": [],
|
|
9
|
+
"inputs": ["task_map", "ds_checklist", "design_spec", "knowledge_bank"],
|
|
10
|
+
"outputs": ["design_spec", "implementation_handoff", "verify_results"],
|
|
11
|
+
"allowed_tools": ["design-reference", "design-spec", "browser_verify", "figma_mcp"],
|
|
12
|
+
"allowed_jobs": [
|
|
13
|
+
"orchestrate ideation → DesignSpec → spec gates → implementation handoff",
|
|
14
|
+
"validate spec against DS and information hierarchy",
|
|
15
|
+
"guide host LLM implementation from SHIPped spec"
|
|
16
|
+
],
|
|
17
|
+
"forbidden_jobs": [
|
|
18
|
+
"skip spec gates and jump to code",
|
|
19
|
+
"implement when mode is assess_only",
|
|
20
|
+
"invent components not in design_spec.components"
|
|
21
|
+
],
|
|
22
|
+
"routing_triggers": ["design-director", "design spec", "guide how to design", "build this design", "implement spec"],
|
|
23
|
+
"never_route_for": ["full_screen_review_only"],
|
|
24
|
+
"chain_position": null,
|
|
25
|
+
"requires_session_state": true
|
|
26
|
+
}
|
package/agents/router.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "MoE routing table — maps a classified problem type to the expert(s) that should run, and the experts that must never run for that problem type. Used by ux-story-gate Phase 1.5 and persona-orchestrator.",
|
|
3
3
|
"rules": [
|
|
4
|
+
{
|
|
5
|
+
"problem_type": "design_director",
|
|
6
|
+
"signals": ["design-director", "design director", "guide how to design", "design and build", "implement the spec", "design spec build", "producer path"],
|
|
7
|
+
"route_to": ["design-director"],
|
|
8
|
+
"never_route_to": ["design-critic_chain"],
|
|
9
|
+
"notes": "Producer path — ideation → DesignSpec → spec gates → build. Use /design-director skill, not critique chain."
|
|
10
|
+
},
|
|
4
11
|
{
|
|
5
12
|
"problem_type": "ideation_wireframe",
|
|
6
13
|
"signals": ["wireframe", "mockup", "new screen", "design from scratch", "layout", "ia concept", "ideation", "ux ideator", "text wireframe", "screen layout"],
|
|
@@ -69,10 +76,10 @@
|
|
|
69
76
|
},
|
|
70
77
|
{
|
|
71
78
|
"problem_type": "collect_knowledge",
|
|
72
|
-
"signals": ["collect knowledge", "scan codebase", "build vault", "knowledge archivist", "collect-knowledge"],
|
|
79
|
+
"signals": ["kavi", "/kavi", "collect knowledge", "scan codebase", "build vault", "knowledge archivist", "collect-knowledge"],
|
|
73
80
|
"route_to": ["kavi"],
|
|
74
81
|
"never_route_to": ["design-critic_chain", "zara", "arjun", "meera", "priya"],
|
|
75
|
-
"notes": "Producer only — run /
|
|
82
|
+
"notes": "Producer only — run /kavi or `npx analyzthis_design collect`. Never part of a critique chain."
|
|
76
83
|
}
|
|
77
84
|
]
|
|
78
85
|
}
|
|
@@ -39,6 +39,34 @@
|
|
|
39
39
|
"reason": "string — why not_run, when applicable (e.g. 'assess_only, no URL')"
|
|
40
40
|
},
|
|
41
41
|
"mode": "assess_only | build_approved",
|
|
42
|
+
"design_spec": {
|
|
43
|
+
"version": "1.0",
|
|
44
|
+
"screen_name": "string",
|
|
45
|
+
"status": "draft | spec_review | ship | revise",
|
|
46
|
+
"intent": "object — primary_user_task, primary_action, north_star_metric",
|
|
47
|
+
"information_hierarchy": ["string — rank #1 first"],
|
|
48
|
+
"layout": "object — grid, regions, nav_level",
|
|
49
|
+
"tokens": "object — colors, typography, spacing, source",
|
|
50
|
+
"components": "array — region, component, import_path, hierarchy_rank",
|
|
51
|
+
"states": "object — empty, loading, error, success",
|
|
52
|
+
"spec_verdict": "object — arjun_visual, ds_gate, hierarchy_gate, notes",
|
|
53
|
+
"updated_at": "ISO 8601"
|
|
54
|
+
},
|
|
55
|
+
"feedback_log": [
|
|
56
|
+
{
|
|
57
|
+
"id": "string — unique feedback entry id",
|
|
58
|
+
"at": "ISO 8601",
|
|
59
|
+
"persona": "string — persona id",
|
|
60
|
+
"satisfied": "boolean — true if user was happy",
|
|
61
|
+
"rating": "number | null — 1 (very unhappy) to 5 (very happy)",
|
|
62
|
+
"comment": "string — what was wrong or what they liked",
|
|
63
|
+
"correction": "string — how the user corrected or what they wanted instead",
|
|
64
|
+
"tags": ["string — e.g. wrong_hierarchy, invented_tokens, off_brief"],
|
|
65
|
+
"original_output": "string — snapshot of persona output at feedback time",
|
|
66
|
+
"submitted_at": "ISO 8601 | omitted — set when feedback submit succeeds",
|
|
67
|
+
"context": "object — task_map_summary, problem_type, mode"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
42
70
|
"vault_path": "string — Obsidian vault written by Kavi collect (empty until first collect)",
|
|
43
71
|
"last_collect_at": "ISO 8601 timestamp — last successful collect run",
|
|
44
72
|
"digest": {
|
|
@@ -47,6 +75,7 @@
|
|
|
47
75
|
"ds_at_risk": ["string — ds_checklist keys currently at risk"],
|
|
48
76
|
"experts": ["string — persona ids selected for this run"],
|
|
49
77
|
"prior_scores": { "<persona_id>": "number | string — last known score for delta re-evaluation" },
|
|
78
|
+
"design_spec_status": "draft | spec_review | ship | revise — shortcut from design_spec.status",
|
|
50
79
|
"mode": "assess_only | build_approved"
|
|
51
80
|
},
|
|
52
81
|
"metrics": {
|