analyzthis_design 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/HOW-TO-USE.md +2 -1
  2. package/README.md +39 -7
  3. package/dist/HOW-TO-USE.md +2 -1
  4. package/dist/README.md +39 -7
  5. package/dist/bin/cli.js +22 -4
  6. package/dist/lib/chunk-run.js +2 -0
  7. package/dist/lib/install.js +53 -0
  8. package/dist/lib/knowledge.js +49 -18
  9. package/dist/lib/mcp-server.js +206 -75
  10. package/dist/lib/orchestrator/run.js +5 -0
  11. package/dist/lib/session.js +33 -2
  12. package/dist/skills/anuj/SKILL.md +7 -0
  13. package/dist/skills/arjun/SKILL.md +5 -263
  14. package/dist/skills/arjun/references/lens.md +265 -0
  15. package/dist/skills/kavi/SKILL.md +7 -0
  16. package/dist/skills/knowledge-bank/SKILL.md +14 -116770
  17. package/dist/skills/meera/SKILL.md +7 -0
  18. package/dist/skills/noor/SKILL.md +7 -0
  19. package/dist/skills/persona-orchestrator/SKILL.md +5 -195
  20. package/dist/skills/persona-orchestrator/references/lens.md +197 -0
  21. package/dist/skills/priya/SKILL.md +7 -0
  22. package/dist/skills/raj/SKILL.md +7 -0
  23. package/dist/skills/receipt/SKILL.md +17 -0
  24. package/dist/skills/ux-story-gate/SKILL.md +5 -338
  25. package/dist/skills/ux-story-gate/references/lens.md +340 -0
  26. package/dist/skills/zara/SKILL.md +7 -0
  27. package/package.json +1 -1
  28. package/skills/anuj/SKILL.md +7 -0
  29. package/skills/arjun/SKILL.md +5 -263
  30. package/skills/arjun/references/lens.md +265 -0
  31. package/skills/kavi/SKILL.md +7 -0
  32. package/skills/knowledge-bank/SKILL.md +14 -116770
  33. package/skills/meera/SKILL.md +7 -0
  34. package/skills/noor/SKILL.md +7 -0
  35. package/skills/persona-orchestrator/SKILL.md +5 -195
  36. package/skills/persona-orchestrator/references/lens.md +197 -0
  37. package/skills/priya/SKILL.md +7 -0
  38. package/skills/raj/SKILL.md +7 -0
  39. package/skills/receipt/SKILL.md +17 -0
  40. package/skills/ux-story-gate/SKILL.md +5 -338
  41. package/skills/ux-story-gate/references/lens.md +340 -0
  42. package/skills/zara/SKILL.md +7 -0
package/HOW-TO-USE.md CHANGED
@@ -108,7 +108,8 @@ npx analyzthis_design sync --target all
108
108
  | Review against PRDs and stories | `/ux-story-gate` | Task map + routing before critique |
109
109
  | Set visual direction | `/mood-board` | References + design-system patterns + team deliberation |
110
110
  | Index the repo for personas | `/kavi` | Kavi → knowledge bank |
111
- | Get a single-lens opinion | `/arjun`, `/meera`, `/priya`, `/zara`, `/noor`, `/anuj` | Targeted follow-up |
111
+ | Get a single-lens opinion | `/arjun`, `/meera`, `/priya`, `/zara`, `/noor`, `/anuj` | Targeted follow-up. Default is a short verdict — say expand for the full schema |
112
+ | See inferred token spend | `/receipt` | Not a bill. Same as `npx analyzthis_design receipt` |
112
113
 
113
114
  **Important:** do not use `/persona-orchestrator` or `/design-critic` when you want wireframes. They are for critique.
114
115
 
package/README.md CHANGED
@@ -4,6 +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.4.0 — Claude-path efficiency (1 Sep 2026)
8
+
9
+ Same SHIP / REVISE / BLOCK. Fewer tokens on Claude Code and Claude Desktop. Not Caveman-speak. Not a proxy.
10
+
11
+ - **Lite MCP catalog (default):** `analyzthis_design` (router) + `analyzthis_retrieve` + `analyzthis_session` + `analyzthis_receipt`. Old 19-tool list: `ANALYZTHIS_MCP_CATALOG=full` or `npx analyzthis_design mcp --catalog full`.
12
+ - **Receipt:** every MCP result ends with inferred tokens (not a bill). CLI: `npx analyzthis_design receipt`. Slash: `/receipt`.
13
+ - **Slim skill fronts:** Arjun, story-gate, and orchestrator load a short front. Call retrieve (`kind=skill`) for the lens. Personas default to verdict + top 3 + one evidence line; say **expand** for the full schema.
14
+ - **Knowledge bank** is an index. Load one persona slice (`kind=knowledge`, `persona=zara`). Do not inject the whole bank.
15
+ - **Tokens per verdict** prints on `receipt` and CLI `run`.
16
+ - Optional: wrap our stdio MCP through Caveman’s shrink if you already run Caveman. We do not ship a proxy.
17
+
18
+ ## v2.3.1 — independently callable personas (31 Aug 2026)
19
+
20
+ After install, type `/noor`, `/anuj`, `/arjun`, `/meera`, `/priya`, `/zara`, `/raj`, `/kavi` even if Claude’s slash menu only lists Getting Started.
21
+
22
+ - `npx analyzthis_design --target claude` is the same as `install --target claude` (leading `--target` used to print “Unknown command”).
23
+ - Install writes project slash commands into `.claude/commands/` and `.cursor/commands/`.
24
+ - `mcp --configure claude` writes Claude Desktop, Claude Code (`~/.claude.json`), and this repo’s `.mcp.json` when you are in a project.
25
+ - Do not `npm install` this package inside a pnpm/Yarn `workspace:*` repo — use `npx … --target` instead.
26
+ - Slash and MCP still use the model already in your chat. CLI `run` still picks a strong planner and cheap chunks.
27
+
28
+ Website changelog: [analyzthis-lab.vercel.app/design#whats-new](https://analyzthis-lab.vercel.app/design#whats-new)
29
+
30
+ ## v2.3.0 — MCP for any IDE
31
+
32
+ 19 MCP tools (`analyzthis_noor`, not `/noor`). Slash commands and MCP are different pipes. MCP never creates a slash menu entry.
33
+
7
34
  ## v2.2 — project-scoped knowledge bank
8
35
 
9
36
  Knowledge sources are now scoped per project by default. `collect`, `connect`, `sync`, `disconnect`, and `status` operate on the project derived from your current working directory, and the built `knowledge-bank` skill is written into that project's local skills directory (`<project>/.claude/skills/knowledge-bank/SKILL.md`, `<project>/.cursor/skills/...`, etc.). Invoking a skill from one project never reads another project's vaults.
@@ -21,17 +48,21 @@ Pass `--global` to opt into the legacy merged behavior (read `config.sources` an
21
48
 
22
49
  Use `npx analyzthis_design run-unchunked` for the legacy single-pass orchestrator.
23
50
 
24
- **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.3.0 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
51
+ **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.4.0 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
25
52
 
26
53
  ---
27
54
 
28
55
  ## Quick start
29
56
 
30
57
  ```bash
31
- # 1. Install the npm package (no auto-install, no obfuscation)
58
+ # 1. Install the CLI globally (optional). Do not run npm install inside a
59
+ # pnpm/Yarn workspace repo — npm cannot read workspace:* and will fail.
60
+ # Prefer npx from any folder:
32
61
  npm install -g analyzthis_design
33
62
 
34
- # 2. Install slash commands into your IDE (explicit, consent-based)
63
+ # 2. Copy skills + slash commands into your IDE (consent-based)
64
+ npx analyzthis_design install --target all
65
+ # Same thing: a leading --target means install
35
66
  npx analyzthis_design --target all
36
67
 
37
68
  # 3. Run a task in v2.0 chunked mode (free/cheap models)
@@ -41,13 +72,14 @@ npx analyzthis_design run --task "Review invoice approval screen"
41
72
  npx analyzthis_design run-unchunked --task "Review invoice approval screen" --provider host
42
73
  ```
43
74
 
44
- > **Security:** This package publishes **plain source** — no obfuscation, no minification, no dynamic require. Every file in `dist/` is readable and auditable. The `postinstall` script only prints a welcome message; it does **not** write to any AI-agent directories. Skill installation requires an explicit `npx analyzthis_design --target <ide>` command.
75
+ > **Security:** This package publishes **plain source** — no obfuscation, no minification, no dynamic require. Every file in `dist/` is readable and auditable. The `postinstall` script only prints a welcome message; it does **not** write to any AI-agent directories. Skill installation requires an explicit `npx analyzthis_design install --target <ide>` (or `npx analyzthis_design --target <ide>`).
45
76
  >
46
- > **MCP (universal):** `npx analyzthis_design mcp` starts a local MCP server with 19 tools (all personas + combination passes + utilities). Auto-configures for Cursor, Claude Desktop, and Windsurf during `--target all` install. For Lovable, v0, Bolt, Replit, ChatGPT: run `npx analyzthis_design mcp --configure <tool>` for a config snippet.
77
+ > **MCP (universal):** `npx analyzthis_design mcp` starts a local MCP server. Default catalog is **lite** (router + retrieve + session + receipt). Full 19 named tools: `ANALYZTHIS_MCP_CATALOG=full` or `mcp --catalog full`. Auto-configures for Cursor, Claude Desktop, **Claude Code**, and Windsurf during install. For Lovable, v0, Bolt, Replit, ChatGPT: run `npx analyzthis_design mcp --configure <tool>` for a config snippet.
47
78
 
48
79
  ### Install by target IDE
49
80
 
50
81
  ```bash
82
+ npx analyzthis_design install --target claude
51
83
  npx analyzthis_design --target claude
52
84
  npx analyzthis_design --target codex
53
85
  npx analyzthis_design --target grok
@@ -55,7 +87,7 @@ npx analyzthis_design --target windsurf
55
87
  npx analyzthis_design --target all --force
56
88
  ```
57
89
 
58
- **After install:** type `/getting-started` in Cursor or Claude Code (or `@getting-started` in Windsurf). For a complete walkthrough, see [HOW-TO-USE.md](./HOW-TO-USE.md). Re-print CLI help anytime with `npx analyzthis_design welcome`.
90
+ **After install:** type `/noor`, `/arjun`, `/ux-ideator` (or `@` in Windsurf). Claude’s menu may only show Getting Started — type the name anyway. Also `/getting-started`. Walkthrough: [HOW-TO-USE.md](./HOW-TO-USE.md). Re-print help: `npx analyzthis_design welcome`.
59
91
 
60
92
  | Tool | Skills installed to | Invoke |
61
93
  |---|---|---|
@@ -849,7 +881,7 @@ skills/
849
881
  | **MCP server** | `npx analyzthis_design mcp` starts a local MCP server exposing 19 tools — all 8 individual personas + 6 combination passes + 5 utilities. Any MCP-compatible client can discover and call them. |
850
882
  | **Auto-configure MCP** | `npx analyzthis_design mcp --configure cursor` (or `claude`, `windsurf`) writes the MCP config automatically. `--target all` now auto-configures MCP during install. |
851
883
  | **Universal IDE support** | Cursor, Claude Desktop, Windsurf auto-configured. Lovable, v0, Bolt, Replit, ChatGPT: run `mcp --configure <tool>` for a copy-paste config snippet. |
852
- | **19 MCP tools** | 8 individual personas (arjun, meera, priya, zara, noor, anuj, raj, kavi) + 6 combination passes (ux-ideator, persona-orchestrator, design-critic, ux-story-gate, design-director, mood-board) + 5 utilities (evolve-check, collect, retrieve, session, system-prompt) |
884
+ | **MCP lite + full** | Default: router (`analyzthis_design`) + retrieve + session + receipt. Full 19 named tools behind `--catalog full`. |
853
885
  | **System prompt fallback** | `analyzthis_system_prompt` tool generates a consolidated prompt for tools that don't support MCP yet |
854
886
 
855
887
  ## What's new in v2.2
@@ -108,7 +108,8 @@ npx analyzthis_design sync --target all
108
108
  | Review against PRDs and stories | `/ux-story-gate` | Task map + routing before critique |
109
109
  | Set visual direction | `/mood-board` | References + design-system patterns + team deliberation |
110
110
  | Index the repo for personas | `/kavi` | Kavi → knowledge bank |
111
- | Get a single-lens opinion | `/arjun`, `/meera`, `/priya`, `/zara`, `/noor`, `/anuj` | Targeted follow-up |
111
+ | Get a single-lens opinion | `/arjun`, `/meera`, `/priya`, `/zara`, `/noor`, `/anuj` | Targeted follow-up. Default is a short verdict — say expand for the full schema |
112
+ | See inferred token spend | `/receipt` | Not a bill. Same as `npx analyzthis_design receipt` |
112
113
 
113
114
  **Important:** do not use `/persona-orchestrator` or `/design-critic` when you want wireframes. They are for critique.
114
115
 
package/dist/README.md CHANGED
@@ -4,6 +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.4.0 — Claude-path efficiency (1 Sep 2026)
8
+
9
+ Same SHIP / REVISE / BLOCK. Fewer tokens on Claude Code and Claude Desktop. Not Caveman-speak. Not a proxy.
10
+
11
+ - **Lite MCP catalog (default):** `analyzthis_design` (router) + `analyzthis_retrieve` + `analyzthis_session` + `analyzthis_receipt`. Old 19-tool list: `ANALYZTHIS_MCP_CATALOG=full` or `npx analyzthis_design mcp --catalog full`.
12
+ - **Receipt:** every MCP result ends with inferred tokens (not a bill). CLI: `npx analyzthis_design receipt`. Slash: `/receipt`.
13
+ - **Slim skill fronts:** Arjun, story-gate, and orchestrator load a short front. Call retrieve (`kind=skill`) for the lens. Personas default to verdict + top 3 + one evidence line; say **expand** for the full schema.
14
+ - **Knowledge bank** is an index. Load one persona slice (`kind=knowledge`, `persona=zara`). Do not inject the whole bank.
15
+ - **Tokens per verdict** prints on `receipt` and CLI `run`.
16
+ - Optional: wrap our stdio MCP through Caveman’s shrink if you already run Caveman. We do not ship a proxy.
17
+
18
+ ## v2.3.1 — independently callable personas (31 Aug 2026)
19
+
20
+ After install, type `/noor`, `/anuj`, `/arjun`, `/meera`, `/priya`, `/zara`, `/raj`, `/kavi` even if Claude’s slash menu only lists Getting Started.
21
+
22
+ - `npx analyzthis_design --target claude` is the same as `install --target claude` (leading `--target` used to print “Unknown command”).
23
+ - Install writes project slash commands into `.claude/commands/` and `.cursor/commands/`.
24
+ - `mcp --configure claude` writes Claude Desktop, Claude Code (`~/.claude.json`), and this repo’s `.mcp.json` when you are in a project.
25
+ - Do not `npm install` this package inside a pnpm/Yarn `workspace:*` repo — use `npx … --target` instead.
26
+ - Slash and MCP still use the model already in your chat. CLI `run` still picks a strong planner and cheap chunks.
27
+
28
+ Website changelog: [analyzthis-lab.vercel.app/design#whats-new](https://analyzthis-lab.vercel.app/design#whats-new)
29
+
30
+ ## v2.3.0 — MCP for any IDE
31
+
32
+ 19 MCP tools (`analyzthis_noor`, not `/noor`). Slash commands and MCP are different pipes. MCP never creates a slash menu entry.
33
+
7
34
  ## v2.2 — project-scoped knowledge bank
8
35
 
9
36
  Knowledge sources are now scoped per project by default. `collect`, `connect`, `sync`, `disconnect`, and `status` operate on the project derived from your current working directory, and the built `knowledge-bank` skill is written into that project's local skills directory (`<project>/.claude/skills/knowledge-bank/SKILL.md`, `<project>/.cursor/skills/...`, etc.). Invoking a skill from one project never reads another project's vaults.
@@ -21,17 +48,21 @@ Pass `--global` to opt into the legacy merged behavior (read `config.sources` an
21
48
 
22
49
  Use `npx analyzthis_design run-unchunked` for the legacy single-pass orchestrator.
23
50
 
24
- **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.3.0 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
51
+ **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.4.0 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
25
52
 
26
53
  ---
27
54
 
28
55
  ## Quick start
29
56
 
30
57
  ```bash
31
- # 1. Install the npm package (no auto-install, no obfuscation)
58
+ # 1. Install the CLI globally (optional). Do not run npm install inside a
59
+ # pnpm/Yarn workspace repo — npm cannot read workspace:* and will fail.
60
+ # Prefer npx from any folder:
32
61
  npm install -g analyzthis_design
33
62
 
34
- # 2. Install slash commands into your IDE (explicit, consent-based)
63
+ # 2. Copy skills + slash commands into your IDE (consent-based)
64
+ npx analyzthis_design install --target all
65
+ # Same thing: a leading --target means install
35
66
  npx analyzthis_design --target all
36
67
 
37
68
  # 3. Run a task in v2.0 chunked mode (free/cheap models)
@@ -41,13 +72,14 @@ npx analyzthis_design run --task "Review invoice approval screen"
41
72
  npx analyzthis_design run-unchunked --task "Review invoice approval screen" --provider host
42
73
  ```
43
74
 
44
- > **Security:** This package publishes **plain source** — no obfuscation, no minification, no dynamic require. Every file in `dist/` is readable and auditable. The `postinstall` script only prints a welcome message; it does **not** write to any AI-agent directories. Skill installation requires an explicit `npx analyzthis_design --target <ide>` command.
75
+ > **Security:** This package publishes **plain source** — no obfuscation, no minification, no dynamic require. Every file in `dist/` is readable and auditable. The `postinstall` script only prints a welcome message; it does **not** write to any AI-agent directories. Skill installation requires an explicit `npx analyzthis_design install --target <ide>` (or `npx analyzthis_design --target <ide>`).
45
76
  >
46
- > **MCP (universal):** `npx analyzthis_design mcp` starts a local MCP server with 19 tools (all personas + combination passes + utilities). Auto-configures for Cursor, Claude Desktop, and Windsurf during `--target all` install. For Lovable, v0, Bolt, Replit, ChatGPT: run `npx analyzthis_design mcp --configure <tool>` for a config snippet.
77
+ > **MCP (universal):** `npx analyzthis_design mcp` starts a local MCP server. Default catalog is **lite** (router + retrieve + session + receipt). Full 19 named tools: `ANALYZTHIS_MCP_CATALOG=full` or `mcp --catalog full`. Auto-configures for Cursor, Claude Desktop, **Claude Code**, and Windsurf during install. For Lovable, v0, Bolt, Replit, ChatGPT: run `npx analyzthis_design mcp --configure <tool>` for a config snippet.
47
78
 
48
79
  ### Install by target IDE
49
80
 
50
81
  ```bash
82
+ npx analyzthis_design install --target claude
51
83
  npx analyzthis_design --target claude
52
84
  npx analyzthis_design --target codex
53
85
  npx analyzthis_design --target grok
@@ -55,7 +87,7 @@ npx analyzthis_design --target windsurf
55
87
  npx analyzthis_design --target all --force
56
88
  ```
57
89
 
58
- **After install:** type `/getting-started` in Cursor or Claude Code (or `@getting-started` in Windsurf). For a complete walkthrough, see [HOW-TO-USE.md](./HOW-TO-USE.md). Re-print CLI help anytime with `npx analyzthis_design welcome`.
90
+ **After install:** type `/noor`, `/arjun`, `/ux-ideator` (or `@` in Windsurf). Claude’s menu may only show Getting Started — type the name anyway. Also `/getting-started`. Walkthrough: [HOW-TO-USE.md](./HOW-TO-USE.md). Re-print help: `npx analyzthis_design welcome`.
59
91
 
60
92
  | Tool | Skills installed to | Invoke |
61
93
  |---|---|---|
@@ -849,7 +881,7 @@ skills/
849
881
  | **MCP server** | `npx analyzthis_design mcp` starts a local MCP server exposing 19 tools — all 8 individual personas + 6 combination passes + 5 utilities. Any MCP-compatible client can discover and call them. |
850
882
  | **Auto-configure MCP** | `npx analyzthis_design mcp --configure cursor` (or `claude`, `windsurf`) writes the MCP config automatically. `--target all` now auto-configures MCP during install. |
851
883
  | **Universal IDE support** | Cursor, Claude Desktop, Windsurf auto-configured. Lovable, v0, Bolt, Replit, ChatGPT: run `mcp --configure <tool>` for a copy-paste config snippet. |
852
- | **19 MCP tools** | 8 individual personas (arjun, meera, priya, zara, noor, anuj, raj, kavi) + 6 combination passes (ux-ideator, persona-orchestrator, design-critic, ux-story-gate, design-director, mood-board) + 5 utilities (evolve-check, collect, retrieve, session, system-prompt) |
884
+ | **MCP lite + full** | Default: router (`analyzthis_design`) + retrieve + session + receipt. Full 19 named tools behind `--catalog full`. |
853
885
  | **System prompt fallback** | `analyzthis_system_prompt` tool generates a consolidated prompt for tools that don't support MCP yet |
854
886
 
855
887
  ## What's new in v2.2
package/dist/bin/cli.js CHANGED
@@ -75,6 +75,7 @@ Usage:
75
75
  ── Efficiency / cost commands ────────────────────────────────
76
76
  metrics Print the last run's cost metrics (--all for every project)
77
77
  cost Print the last run's $ cost from config.pricing (--all for every project)
78
+ receipt Inferred token receipt for host (slash/MCP) turns — not a bill
78
79
  export-training Write accepted-output JSONL pairs for LoRA prep
79
80
  (--persona <id>, --all, --output <path>)
80
81
  feedback export Write rejected + correction JSONL pairs (DPO / negative examples)
@@ -86,9 +87,11 @@ Usage:
86
87
  ── MCP server (for any AI IDE: Cursor, Claude Desktop, Lovable, v0, Bolt) ──
87
88
  mcp Start the MCP server on stdio (for MCP client config)
88
89
  mcp --configure cursor Write MCP config to ~/.cursor/mcp.json
89
- mcp --configure claude Write MCP config to Claude Desktop config
90
+ mcp --configure claude Write MCP config to Claude Desktop + Claude Code
90
91
  mcp --configure windsurf Write MCP config to Windsurf
91
92
  mcp --configure <tool> Print manual MCP config for any other tool
93
+ mcp --catalog lite|full Lite (default): router + retrieve + session + receipt
94
+ full: all 19 named tools. Or ANALYZTHIS_MCP_CATALOG=full
92
95
 
93
96
  ── Mood board commands ─────────────────────────────────────
94
97
  moodboard create --task <text> Build a mood board from web + DS references
@@ -248,7 +251,13 @@ Docs: https://github.com/rishikeshjoshi/analyzthis_design
248
251
 
249
252
  // ─── Parse args ──────────────────────────────────────────────────────────────
250
253
 
251
- const [,, cmd, ...flags] = process.argv;
254
+ let [, , cmd, ...flags] = process.argv;
255
+ // Leading flags mean install: `npx analyzthis_design --target claude`
256
+ // Keep --help / -h as help, not install.
257
+ if (cmd && cmd.startsWith('-') && cmd !== '--help' && cmd !== '-h') {
258
+ flags = [cmd, ...flags];
259
+ cmd = 'install';
260
+ }
252
261
 
253
262
  function getFlag(name) {
254
263
  // Supports both --flag=value and --flag value
@@ -763,11 +772,12 @@ switch (cmd) {
763
772
  case 'mcp': {
764
773
  const mcpServer = require('../lib/mcp-server');
765
774
  const configureTarget = getFlag('configure');
775
+ const catalogVal = getFlag('catalog');
766
776
  if (configureTarget) {
767
- mcpServer.writeMcpConfig(configureTarget);
777
+ mcpServer.writeMcpConfig(configureTarget, { catalog: catalogVal });
768
778
  break;
769
779
  }
770
- mcpServer.startStdioServer();
780
+ mcpServer.startStdioServer(catalogVal);
771
781
  break;
772
782
  }
773
783
 
@@ -959,6 +969,8 @@ switch (cmd) {
959
969
  console.log(` objections_raised: ${m.objections_raised ?? 0}`);
960
970
  console.log(` objections_resolved: ${m.objections_resolved ?? 0}`);
961
971
  console.log(` raj_escalations: ${m.raj_escalations ?? 0}`);
972
+ console.log(` host_turns: ${(m.host_turns || []).length}`);
973
+ console.log(` tokens_per_verdict: ${m.tokens_per_verdict ?? 'n/a'}`);
962
974
  const d = state.deliberation;
963
975
  if (d?.mode) {
964
976
  console.log(` deliberation_mode: ${d.mode}, consensus=${d.consensus_reached}`);
@@ -975,6 +987,12 @@ switch (cmd) {
975
987
  break;
976
988
  }
977
989
 
990
+ case 'receipt': {
991
+ const receipt = require('../lib/receipt');
992
+ console.log('\n' + receipt.report({ project: projectVal }) + '\n');
993
+ break;
994
+ }
995
+
978
996
  // ── Persona feedback (v1.16) ────────────────────────────────────────────
979
997
 
980
998
  case 'feedback': {
@@ -172,6 +172,8 @@ async function runChunked(opts) {
172
172
  output_tokens_est: totalOutput,
173
173
  cost_usd: Number(totalCost.toFixed(6)),
174
174
  mode: 'chunked',
175
+ verdicts_this_run: 1,
176
+ tokens_per_verdict: totalInput || null,
175
177
  cache_hits: cacheHits,
176
178
  effort_log: results.map(function(r) {
177
179
  return {
@@ -17,6 +17,25 @@ const PACKAGE_ROOT = resolvePackageRoot(__dirname);
17
17
  const PACKAGE_SKILLS_DIR = path.join(PACKAGE_ROOT, 'skills');
18
18
  const WELCOME_MARKER = path.join(os.homedir(), '.analyzthis_design', '.welcome-shown');
19
19
 
20
+ // Slash items written into the current project so /noor shows in the menu.
21
+ const PROJECT_COMMANDS = [
22
+ 'noor',
23
+ 'anuj',
24
+ 'arjun',
25
+ 'meera',
26
+ 'priya',
27
+ 'zara',
28
+ 'raj',
29
+ 'kavi',
30
+ 'ux-ideator',
31
+ 'design-director',
32
+ 'persona-orchestrator',
33
+ 'design-critic',
34
+ 'getting-started',
35
+ 'devi',
36
+ 'receipt',
37
+ ];
38
+
20
39
  const SKILLS = [
21
40
  'getting-started',
22
41
  'arjun',
@@ -42,6 +61,7 @@ const SKILLS = [
42
61
  'design-personas',
43
62
  'design-reference',
44
63
  'knowledge-bank',
64
+ 'receipt',
45
65
  ];
46
66
 
47
67
  function getPackageVersion() {
@@ -88,6 +108,13 @@ function printWelcomeBanner(targetId, log = console.log) {
88
108
  log(` ${gs} ← read this first`);
89
109
  }
90
110
 
111
+ log('');
112
+ log(' Independent personas — type the name (even if the menu only shows Getting Started):');
113
+ log(` ${p}noor ${p}anuj ${p}arjun ${p}meera ${p}priya ${p}zara ${p}raj ${p}kavi`);
114
+ if (targetId === 'claude') {
115
+ log(' Claude may only list Getting Started. Type /noor anyway.');
116
+ }
117
+
91
118
  log('');
92
119
  log(' Design — wireframes (new screens):');
93
120
  log(` ${p}ux-ideator two competing text wireframes + deliberation`);
@@ -180,6 +207,29 @@ function installMissing(skill, destinations, force) {
180
207
  return status;
181
208
  }
182
209
 
210
+ function installProjectCommands({ force = false, log = console.log } = {}) {
211
+ const cwd = process.cwd();
212
+ const roots = [
213
+ path.join(cwd, '.claude', 'commands'),
214
+ path.join(cwd, '.cursor', 'commands'),
215
+ ];
216
+ const installed = [];
217
+ const skipped = [];
218
+ for (const root of roots) {
219
+ for (const skill of PROJECT_COMMANDS) {
220
+ const result = installFlat(skill, root, force);
221
+ if (result === 'installed') installed.push(`${path.relative(cwd, root)}/${skill}.md`);
222
+ else if (result === 'skipped') skipped.push(skill);
223
+ }
224
+ }
225
+ if (installed.length > 0) {
226
+ log(`\n✅ Project slash commands → ${path.join(cwd, '.claude/commands')} and .cursor/commands`);
227
+ log(' Type /noor /arjun /ux-ideator in this repo. Restart the IDE if the menu is stale.');
228
+ } else if (skipped.length > 0) {
229
+ log(`\n⏭ Project slash commands already present (use --force to overwrite).`);
230
+ }
231
+ }
232
+
183
233
  function install({ silent = false, force = false, target = 'cursor', showBanner = true } = {}) {
184
234
  const log = silent ? () => {} : console.log;
185
235
  const warn = silent ? () => {} : console.warn;
@@ -239,6 +289,8 @@ function install({ silent = false, force = false, target = 'cursor', showBanner
239
289
  }
240
290
  }
241
291
  }
292
+
293
+ installProjectCommands({ force, log });
242
294
  }
243
295
 
244
296
  function remove({ silent = false, target = 'cursor' } = {}) {
@@ -287,6 +339,7 @@ module.exports = {
287
339
  install,
288
340
  remove,
289
341
  SKILLS,
342
+ PROJECT_COMMANDS,
290
343
  TARGET_DIRS,
291
344
  TARGETS,
292
345
  ALL_TARGET_IDS,
@@ -8,12 +8,10 @@ const crypto = require('crypto');
8
8
 
9
9
  const CONFIG_DIR = path.join(os.homedir(), '.analyzthis_design');
10
10
  const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
11
- // When published, this file lives at dist/lib/ — go up two levels to reach package root
12
- const KNOWLEDGE_SKILL = path.join(__dirname, '..', '..', 'skills', 'knowledge-bank', 'SKILL.md');
13
- const KNOWLEDGE_SLICE_ROOT = path.join(CONFIG_DIR, 'kb-slices');
14
-
15
11
  const { resolvePackageRoot } = require('./platforms');
16
12
  const PACKAGE_ROOT = resolvePackageRoot(__dirname);
13
+ const KNOWLEDGE_SKILL = path.join(PACKAGE_ROOT, 'skills', 'knowledge-bank', 'SKILL.md');
14
+ const KNOWLEDGE_SLICE_ROOT = path.join(CONFIG_DIR, 'kb-slices');
17
15
  const AGENTS_DIR = path.join(PACKAGE_ROOT, 'agents');
18
16
 
19
17
  // Keywords used to auto-group vault notes into categories
@@ -326,41 +324,74 @@ function sync({ targets = ['cursor'], project, global = false, cwd } = {}) {
326
324
  ? 'global (merged across projects)'
327
325
  : `project: ${scopeInfo.projectId}`;
328
326
 
329
- let md = `---
330
- name: knowledge-bank
331
- description: Personal knowledge bank takes precedence over all built-in persona defaults.
327
+ let fullMd = `---
328
+ name: knowledge-bank-full
329
+ description: Full project notes. Do not load this file into chat. Retrieve one persona slice instead.
332
330
  disable-model-invocation: true
333
331
  ---
334
332
 
335
- # Knowledge Bank
333
+ # Knowledge Bank (full dump — do not inject)
336
334
 
337
335
  > Last synced: ${date}
338
336
  > Scope: ${scopeLabel}
339
337
  > Sources: ${sourceList}
340
338
  > Files loaded: ${totalFiles}
341
339
 
342
- **INSTRUCTION TO ALL PERSONAS:** This knowledge bank contains project-specific context that overrides your built-in defaults. Read every section below before forming any opinion. When this knowledge bank conflicts with your built-in knowledge, this knowledge bank wins.
343
-
344
- ---
345
-
346
340
  `;
347
341
 
348
342
  let hasContent = false;
343
+ let indexLines = '';
349
344
  for (const { key, heading } of sectionDefs) {
350
345
  if (sections[key].length === 0) continue;
351
346
  hasContent = true;
352
- md += `${heading}\n\n`;
347
+ fullMd += `${heading}\n\n`;
348
+ indexLines += `${heading}\n`;
353
349
  for (const note of sections[key]) {
354
- md += `### ${note.title}\n\n${note.content}\n\n`;
350
+ fullMd += `### ${note.title}\n\n${note.content}\n\n`;
351
+ indexLines += `- ${note.title}\n`;
355
352
  }
356
- md += '---\n\n';
353
+ fullMd += '---\n\n';
354
+ indexLines += '\n';
357
355
  }
358
356
 
359
357
  if (!hasContent) {
360
- md += `_No matching files found. Check your --tags or --include filters, or remove filters to include all notes._\n`;
358
+ fullMd += `_No matching files found. Check your --tags or --include filters, or remove filters to include all notes._\n`;
359
+ indexLines += `_No notes yet. Run collect/sync first._\n`;
361
360
  }
362
361
 
363
- // Write to the package's own skills/knowledge-bank/SKILL.md (source of truth)
362
+ const md = `---
363
+ name: knowledge-bank
364
+ description: Project knowledge index — retrieve one persona slice. Do not load the full bank.
365
+ disable-model-invocation: true
366
+ ---
367
+
368
+ # Knowledge Bank
369
+
370
+ > Last synced: ${date}
371
+ > Scope: ${scopeLabel}
372
+ > Sources: ${sourceList}
373
+ > Files loaded: ${totalFiles}
374
+
375
+ **INSTRUCTION TO ALL PERSONAS:** Load your persona slice via retrieve. Do not load the whole bank. When a slice conflicts with built-in defaults, the slice wins.
376
+
377
+ \`\`\`
378
+ npx analyzthis_design retrieve — or MCP analyzthis_retrieve
379
+ kind=knowledge persona=arjun|meera|priya|zara|noor|anuj|raj|kavi
380
+ \`\`\`
381
+
382
+ You cannot know host tokens. Do not invent a dollar figure.
383
+
384
+ ## Index (titles only)
385
+
386
+ ${indexLines}
387
+ `;
388
+
389
+ // Full dump stays on disk for retrieve; the skill is an index only.
390
+ const projectIdForFull = scopeInfo.projectId || 'default';
391
+ const fullDir = path.join(KNOWLEDGE_SLICE_ROOT, projectIdForFull);
392
+ fs.mkdirSync(fullDir, { recursive: true });
393
+ fs.writeFileSync(path.join(fullDir, 'full.md'), fullMd);
394
+
364
395
  fs.mkdirSync(path.dirname(KNOWLEDGE_SKILL), { recursive: true });
365
396
  fs.writeFileSync(KNOWLEDGE_SKILL, md);
366
397
 
@@ -470,7 +501,7 @@ function buildPersonaSlice(personaId, sections, sectionDefs, projectId) {
470
501
  }
471
502
 
472
503
  function writePersonaSlices(sections, sectionDefs, projectId) {
473
- const personas = ['arjun', 'meera', 'priya', 'zara', 'noor', 'anuj', 'raj'];
504
+ const personas = ['arjun', 'meera', 'priya', 'zara', 'noor', 'anuj', 'raj', 'kavi'];
474
505
  const dir = path.join(KNOWLEDGE_SLICE_ROOT, projectId || 'default');
475
506
  fs.mkdirSync(dir, { recursive: true });
476
507
  const written = [];