analyzthis_design 1.10.0 → 1.11.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/README.md CHANGED
@@ -11,24 +11,35 @@ Install once. Run structured UX critiques, multi-phase ideation, and task-ground
11
11
  ## Install
12
12
 
13
13
  ```bash
14
- # Cursor (default)
14
+ # Cursor (default) + cross-agent path on postinstall
15
15
  npx analyzthis_design
16
16
 
17
- # Claude Code
17
+ # Claude Code (skills dir + legacy commands)
18
18
  npx analyzthis_design --target claude
19
19
 
20
20
  # Codex CLI
21
21
  npx analyzthis_design --target codex
22
22
 
23
- # All three at once
24
- npx analyzthis_design --target all
23
+ # Grok Build (xAI)
24
+ npx analyzthis_design --target grok
25
+
26
+ # Windsurf Cascade
27
+ npx analyzthis_design --target windsurf
28
+
29
+ # All supported hosts at once
30
+ npx analyzthis_design --target all --force
25
31
  ```
26
32
 
27
- | Tool | Skills installed to |
28
- |---|---|
29
- | Cursor | `~/.cursor/skills/` |
30
- | Claude Code | `~/.claude/commands/` |
31
- | Codex CLI | `~/.codex/skills/` |
33
+ | Tool | Skills installed to | Invoke |
34
+ |---|---|---|
35
+ | Cursor | `~/.cursor/skills/<name>/SKILL.md` | `/collect-knowledge` |
36
+ | Claude Code | `~/.claude/skills/<name>/SKILL.md` (+ legacy `~/.claude/commands/`) | `/collect-knowledge` |
37
+ | Codex CLI | `~/.codex/skills/<name>/SKILL.md` | skill name / AGENTS.md |
38
+ | Grok Build | `~/.grok/skills/<name>/SKILL.md` | `/collect-knowledge` |
39
+ | Windsurf Cascade | `~/.codeium/windsurf/skills/<name>/SKILL.md` | `@collect-knowledge` |
40
+ | Cross-agent | `~/.agents/skills/<name>/SKILL.md` | discovered by multiple hosts |
41
+
42
+ 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.
32
43
 
33
44
  ---
34
45
 
@@ -38,17 +49,19 @@ npx analyzthis_design --target all
38
49
 
39
50
  | Command | What it does |
40
51
  |---|---|
41
- | `/persona-orchestrator` | **Recommended agentic entry point.** Loads MoE router + session state, runs ux-story-gate intake, executes the right persona chain, enforces DS / hierarchy / verify gates, synthesises a SHIP/REVISE/BLOCK verdict. |
52
+ | `/collect-knowledge` | **Kavi Knowledge Archivist.** Scans the codebase, builds an Obsidian vault, LLM-enriches notes, syncs into the knowledge bank so every critique persona reads company context first. Run this once per project before critiques. |
53
+ | `/persona-orchestrator` | **Recommended agentic critique entry point.** Loads MoE router + session state, runs ux-story-gate intake, executes the right persona chain, enforces DS / hierarchy / verify gates, synthesises a SHIP/REVISE/BLOCK verdict. |
42
54
  | `/ux-story-gate` | Task-first gate: discovers PRDs, DS/Figma discovery, MoE routing, browser verify, assess-only mode. |
43
55
  | `/design-critic` | 4-persona critique → `SHIP / REVISE / BLOCK` verdict with a Composite Score out of 20 + Information Hierarchy Gate. |
44
56
  | `/ux-ideator` | 6-phase ideation → two competing IA concepts, deliberation, delight pass, feasibility check. |
45
57
 
46
- ### 7 Individual Personas
58
+ ### 8 Personas
47
59
 
48
- Invoke directly for targeted, already-grounded questions. For full screen evaluation, prefer `/persona-orchestrator` or `/ux-story-gate`.
60
+ Invoke critique personas for targeted, already-grounded questions. For full screen evaluation, prefer `/persona-orchestrator` or `/ux-story-gate`. Run `/collect-knowledge` first so they have project context.
49
61
 
50
62
  | Command | Persona | What they evaluate |
51
63
  |---|---|---|
64
+ | `/collect-knowledge` | Kavi — Knowledge Archivist | Scan repo → Obsidian vault → enrich → sync knowledge bank (producer, not a critic) |
52
65
  | `/arjun` | UX + Visual Design | UX Honeycomb + Visual Design Audit (hierarchy, color, type, spacing, components, style fit, micro-interactions) |
53
66
  | `/meera` | Business Agent | Retention, ARR, GTM lever, adoption risk; hierarchy vs north-star check |
54
67
  | `/priya` | Feasibility Agent | Engineering effort (T-shirt sizing, 2-axis model), state machine traps |
@@ -62,12 +75,12 @@ Invoke directly for targeted, already-grounded questions. For full screen evalua
62
75
  | Command | Purpose |
63
76
  |---|---|
64
77
  | `/design-personas` | Session context template — fill in once before a session |
65
- | `/knowledge-bank` | Auto-populated from your connected vault. All personas read this first. |
78
+ | `/knowledge-bank` | Auto-populated from your connected vault (or from Kavi collect). All personas read this first. |
66
79
  | `/design-reference` | CSV reference data (colors, typography, UX guidelines, stacks, …) |
67
80
 
68
81
  ---
69
82
 
70
- ## Agentic system (v1.10)
83
+ ## Agentic system (v1.11)
71
84
 
72
85
  ```
73
86
  User ask / Figma URL
@@ -268,9 +281,45 @@ Writes `{ system_card, digest, user, assistant }` JSONL pairs to `~/.analyzthis_
268
281
 
269
282
  ---
270
283
 
284
+ ## Knowledge collection — Kavi (v1.11)
285
+
286
+ Kavi is a **producer** persona (not a critic). One command scans the current repo, writes an Obsidian vault, optionally enriches notes with an LLM, then auto-connects and syncs into the knowledge bank.
287
+
288
+ ```
289
+ /collect-knowledge (or npx analyzthis_design collect)
290
+
291
+ Scan codebase (gitignore-aware) → draft Obsidian notes
292
+
293
+ LLM enrich (batched; skip with --no-enrich if no API key)
294
+
295
+ ~/.analyzthis_design/vaults/{project-id}/
296
+
297
+ connect + sync → knowledge-bank skill
298
+
299
+ Arjun / Meera / … read company context first
300
+ ```
301
+
302
+ ```bash
303
+ # In your app repo (sync KB to every host):
304
+ npx analyzthis_design collect --target all
305
+ npx analyzthis_design collect --dry-run
306
+ npx analyzthis_design collect --no-enrich --limit 50
307
+ npx analyzthis_design collect --vault ~/Documents/MyProjectVault --target claude
308
+ ```
309
+
310
+ 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.
311
+
312
+ 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.
313
+
314
+ ---
315
+
271
316
  ## Knowledge Bank — Connect your vault
272
317
 
273
318
  ```bash
319
+ # Option A — let Kavi build the vault from the codebase (recommended for new projects)
320
+ npx analyzthis_design collect
321
+
322
+ # Option B — connect an existing Obsidian vault or markdown folder
274
323
  npx analyzthis_design connect --vault ~/Documents/MyVault
275
324
  npx analyzthis_design connect --vault ~/vault --tags design,brand,prd,product
276
325
  npx analyzthis_design connect --vault ~/vault --include Design,Brand,PRDs,Research
@@ -296,6 +345,9 @@ npx analyzthis_design --force
296
345
  npx analyzthis_design remove --target all
297
346
  npx analyzthis_design list --target all
298
347
 
348
+ # Knowledge collection (Kavi)
349
+ npx analyzthis_design collect [--vault path] [--dry-run] [--no-enrich] [--limit N] [--target cursor|claude|grok|windsurf|agents|all]
350
+
299
351
  # Knowledge bank
300
352
  npx analyzthis_design connect --vault <path> [--tags ...] [--include ...]
301
353
  npx analyzthis_design sync [--target all]
@@ -314,7 +366,7 @@ npx analyzthis_design research --query <text>
314
366
  npx analyzthis_design retrieve --file <csv> --column <col> --keywords a,b [--limit N]
315
367
 
316
368
  # Standalone orchestrator
317
- npx analyzthis_design run --task "..." [--figma URL] [--provider anthropic|openai] [--dry-run] [--output path]
369
+ npx analyzthis_design run --task "..." [--figma URL] [--provider anthropic|openai|google|zai] [--dry-run] [--output path]
318
370
  npx analyzthis_design run --task "..." [--lite | --full] [--experts a,b]
319
371
 
320
372
  # Efficiency / cost
@@ -334,7 +386,9 @@ bin/cli.js CLI entry point
334
386
  lib/
335
387
  install.js Skill installation
336
388
  knowledge.js Vault sync + web-context merge
337
- session.js Shared session-state.json (+ digest, metrics, accept flag)
389
+ collect.js Kavi codebase scan Obsidian vault → enrich → sync
390
+ platforms.js Cross-host skill paths (Cursor, Claude, Codex, Grok, Windsurf, agents)
391
+ session.js Shared session-state.json (+ digest, metrics, vault_path)
338
392
  research.js URL / query → web-context.md
339
393
  retrieve.js Filtered, citation-ready CSV row retrieval
340
394
  cache.js On-disk cache for retrieve/kb slices
@@ -343,7 +397,8 @@ lib/
343
397
  orchestrator/run.js Standalone LLM runtime (v2) — MoE, effort-graded tiers, caps, cache-aware
344
398
  scripts/obfuscate.js Build step → dist/
345
399
  skills/
346
- persona-orchestrator/ Agentic entry point
400
+ collect-knowledge/ Kavi Knowledge Archivist
401
+ persona-orchestrator/ Agentic critique entry point
347
402
  ux-story-gate/ Task-first gate + DS/MoE/verify/assess phases
348
403
  design-critic/ 4-persona critique + hierarchy gate
349
404
  ux-ideator/ 6-phase ideation
@@ -356,9 +411,8 @@ skills/
356
411
  ## Requirements
357
412
 
358
413
  - Node.js 16+
359
- - [Cursor](https://cursor.com) with Agent Mode (for `/skill` commands)
360
- - Claude Code or Codex CLI if using those targets
361
- - For `run` (non–dry-run): `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`
414
+ - Any Agent Skills–compatible host: [Cursor](https://cursor.com), [Claude Code](https://code.claude.com), Codex CLI, [Grok Build](https://x.ai), or Windsurf Cascade
415
+ - For `run` / `collect` enrichment: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, or `ZAI_API_KEY`
362
416
 
363
417
  ---
364
418
 
@@ -0,0 +1,26 @@
1
+ # Kavi — Knowledge Archivist (card)
2
+
3
+ Producer persona. Scans a codebase, builds an Obsidian vault, enriches notes into readable project knowledge, then wires that vault into the knowledge bank so every critique persona reads company context first.
4
+
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
+
7
+ **Forbidden:** UX / visual / business critique (→ Arjun / Meera / etc.); inventing files, APIs, or components not present in the raw extract; design generation; code edits in the scanned repo.
8
+
9
+ ## Output schema (enrichment batches)
10
+ For each draft note, emit a full Obsidian markdown file:
11
+ 1. Keep the original YAML frontmatter; set `enriched: true`.
12
+ 2. Sections: Purpose, Key facts (bullets), Related (`[[Folder/Note]]` wikilinks only to notes that exist in the batch or were listed under Related).
13
+ 3. Do not paste large code blocks — summarize what the file does in plain language.
14
+ 4. Do not invent APIs, routes, or props that are not in the Raw extract / Exports / Imports.
15
+
16
+ ## Lite report (after collect CLI)
17
+ ```
18
+ ## Kavi — Collect report
19
+ Vault: [path]
20
+ Notes: [N written / S skipped unchanged]
21
+ Enriched: [E]
22
+ Knowledge bank: [synced count] → [targets]
23
+ Next: run /persona-orchestrator or any critique persona — they read this bank first.
24
+ ```
25
+
26
+ Consult `skills/collect-knowledge/SKILL.md` for the host workflow. Prefer running `npx analyzthis_design collect` over re-scanning files in chat.
@@ -0,0 +1,33 @@
1
+ {
2
+ "id": "kavi",
3
+ "role": "knowledge_archivist",
4
+ "system_skill": "skills/collect-knowledge/SKILL.md",
5
+ "system_card": "agents/cards/kavi.md",
6
+ "tier": "structured",
7
+ "max_output_tokens": 4000,
8
+ "parallel_safe_with": [],
9
+ "inputs": ["cwd", "optional_vault_path"],
10
+ "outputs": ["obsidian_vault", "collect_report", "knowledge_bank_sync"],
11
+ "allowed_tools": ["knowledge-bank", "filesystem_scan"],
12
+ "allowed_jobs": [
13
+ "scan codebase into Obsidian vault notes (PRDs, brand, pages, components, tech, research)",
14
+ "LLM-enrich draft extracts into concise Obsidian notes",
15
+ "auto-connect + sync vault into the knowledge bank for all critique personas"
16
+ ],
17
+ "forbidden_jobs": [
18
+ "UX, visual, business, or delight critique",
19
+ "invent files / APIs / components not in the extract",
20
+ "design generation or code edits in the scanned repo",
21
+ "run inside design-critic or ideation chains"
22
+ ],
23
+ "routing_triggers": ["collect_knowledge", "scan_codebase", "build_vault", "knowledge_archivist"],
24
+ "never_route_for": ["ux_friction", "full_screen_review", "delight", "stalemate"],
25
+ "chain_position": null,
26
+ "handoff_from": [],
27
+ "handoff_to": [],
28
+ "requires_session_state": true,
29
+ "effort_overrides": {
30
+ "standard": { "when": "enrichment batch (default)", "max_output_tokens": 4000 },
31
+ "trivial": { "when": "draft-only / --no-enrich (no LLM)", "max_output_tokens": 500 }
32
+ }
33
+ }
@@ -59,6 +59,13 @@
59
59
  "route_to": ["design-critic_chain"],
60
60
  "never_route_to": ["direct_noor_without_gate"],
61
61
  "notes": "Always enter through ux-story-gate, never call /noor directly without the gate."
62
+ },
63
+ {
64
+ "problem_type": "collect_knowledge",
65
+ "signals": ["collect knowledge", "scan codebase", "build vault", "knowledge archivist", "collect-knowledge"],
66
+ "route_to": ["kavi"],
67
+ "never_route_to": ["design-critic_chain", "zara", "arjun", "meera", "priya"],
68
+ "notes": "Producer only — run /collect-knowledge or `npx analyzthis_design collect`. Never part of a critique chain."
62
69
  }
63
70
  ]
64
71
  }
@@ -39,6 +39,8 @@
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
+ "vault_path": "string — Obsidian vault written by Kavi collect (empty until first collect)",
43
+ "last_collect_at": "ISO 8601 timestamp — last successful collect run",
42
44
  "digest": {
43
45
  "task_map_summary": "string — short summary passed to persona calls instead of the full task_map/persona_outputs history",
44
46
  "hierarchy_top3": ["string — top 3 ranked hierarchy items, if declared"],