analyzthis_design 2.3.1 → 2.4.1

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 (52) hide show
  1. package/HOW-TO-USE.md +28 -9
  2. package/README.md +27 -3
  3. package/dist/HOW-TO-USE.md +28 -9
  4. package/dist/README.md +27 -3
  5. package/dist/bin/cli.js +145 -3
  6. package/dist/lib/accept.js +95 -0
  7. package/dist/lib/chunk-run.js +2 -0
  8. package/dist/lib/feedback-submit.js +2 -0
  9. package/dist/lib/install.js +9 -0
  10. package/dist/lib/knowledge.js +49 -18
  11. package/dist/lib/mcp-server.js +181 -36
  12. package/dist/lib/orchestrator/run.js +5 -0
  13. package/dist/lib/receipt.js +102 -0
  14. package/dist/lib/session.js +84 -2
  15. package/dist/lib/share.js +131 -0
  16. package/dist/skills/accept/SKILL.md +52 -0
  17. package/dist/skills/anuj/SKILL.md +7 -0
  18. package/dist/skills/arjun/SKILL.md +5 -263
  19. package/dist/skills/arjun/references/lens.md +265 -0
  20. package/dist/skills/getting-started/SKILL.md +3 -0
  21. package/dist/skills/kavi/SKILL.md +7 -0
  22. package/dist/skills/knowledge-bank/SKILL.md +11 -25
  23. package/dist/skills/meera/SKILL.md +7 -0
  24. package/dist/skills/noor/SKILL.md +7 -0
  25. package/dist/skills/persona-orchestrator/SKILL.md +5 -195
  26. package/dist/skills/persona-orchestrator/references/lens.md +197 -0
  27. package/dist/skills/priya/SKILL.md +7 -0
  28. package/dist/skills/raj/SKILL.md +7 -0
  29. package/dist/skills/receipt/SKILL.md +17 -0
  30. package/dist/skills/share/SKILL.md +54 -0
  31. package/dist/skills/ux-story-gate/SKILL.md +5 -338
  32. package/dist/skills/ux-story-gate/references/lens.md +340 -0
  33. package/dist/skills/zara/SKILL.md +7 -0
  34. package/package.json +1 -1
  35. package/skills/accept/SKILL.md +52 -0
  36. package/skills/anuj/SKILL.md +7 -0
  37. package/skills/arjun/SKILL.md +5 -263
  38. package/skills/arjun/references/lens.md +265 -0
  39. package/skills/getting-started/SKILL.md +3 -0
  40. package/skills/kavi/SKILL.md +7 -0
  41. package/skills/knowledge-bank/SKILL.md +11 -25
  42. package/skills/meera/SKILL.md +7 -0
  43. package/skills/noor/SKILL.md +7 -0
  44. package/skills/persona-orchestrator/SKILL.md +5 -195
  45. package/skills/persona-orchestrator/references/lens.md +197 -0
  46. package/skills/priya/SKILL.md +7 -0
  47. package/skills/raj/SKILL.md +7 -0
  48. package/skills/receipt/SKILL.md +17 -0
  49. package/skills/share/SKILL.md +54 -0
  50. package/skills/ux-story-gate/SKILL.md +5 -338
  51. package/skills/ux-story-gate/references/lens.md +340 -0
  52. 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
 
@@ -312,21 +313,39 @@ Each persona reads the session state, so you do not need to repeat the task.
312
313
 
313
314
  ## 8. After the run — accept, reject, evolve
314
315
 
315
- ### Mark an output accepted
316
+ ### Designer path (remember this)
316
317
 
317
- ```bash
318
- npx analyzthis_design session accept --persona arjun
318
+ In chat, after `/zara` or any persona:
319
+
320
+ ```
321
+ /accept yes
322
+ ```
323
+
324
+ or
325
+
326
+ ```
327
+ /accept no — too much motion on the daily table
319
328
  ```
320
329
 
321
- ### Reject with correction
330
+ No terminal flags. `/accept` writes keep or skip for **local** evolution.
331
+
332
+ To send a correction to the published package:
333
+
334
+ ```
335
+ /share
336
+ ```
337
+
338
+ Then **yes** if the preview looks right. Redacted — no folder names, emails, or keys.
339
+
340
+ ### CLI (same thing, if you prefer the terminal)
322
341
 
323
342
  ```bash
324
- npx analyzthis_design session accept --persona arjun --reject \
325
- --comment "Invented tokens not in our DS" \
326
- --correction "Use --color-primary and spacing-4 from tokens.css" \
327
- --rating 2 --tags invented_tokens,missed_ds
343
+ npx analyzthis_design accept --keep --persona arjun
344
+ npx analyzthis_design accept --fix --persona arjun --because "Invented tokens use tokens.css"
328
345
  ```
329
346
 
347
+ The older `session accept` / `feedback record` flags still work.
348
+
330
349
  ### Make the team learn
331
350
 
332
351
  ```bash
package/README.md CHANGED
@@ -4,6 +4,23 @@ 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.1 — `/accept` and `/share` (designer keep / skip / send)
8
+
9
+ After `/zara` (or any persona), type `/accept yes` or `/accept no` plus one sentence. No CLI flags. Writes keep or skip for **local** evolution. Slash-only notes still count.
10
+
11
+ To send a correction to the **published** package: `/share` (preview) then `/share yes`. Redacted. Uses the HTTP endpoint if configured; otherwise a GitHub issue on joshirishi/analyzthis_design.
12
+
13
+ ## v2.4.0 — Claude-path efficiency (1 Sep 2026)
14
+
15
+ Same SHIP / REVISE / BLOCK. Fewer tokens on Claude Code and Claude Desktop. Not Caveman-speak. Not a proxy.
16
+
17
+ - **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`.
18
+ - **Receipt:** every MCP result ends with inferred tokens (not a bill). CLI: `npx analyzthis_design receipt`. Slash: `/receipt`.
19
+ - **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.
20
+ - **Knowledge bank** is an index. Load one persona slice (`kind=knowledge`, `persona=zara`). Do not inject the whole bank.
21
+ - **Tokens per verdict** prints on `receipt` and CLI `run`.
22
+ - Optional: wrap our stdio MCP through Caveman’s shrink if you already run Caveman. We do not ship a proxy.
23
+
7
24
  ## v2.3.1 — independently callable personas (31 Aug 2026)
8
25
 
9
26
  After install, type `/noor`, `/anuj`, `/arjun`, `/meera`, `/priya`, `/zara`, `/raj`, `/kavi` even if Claude’s slash menu only lists Getting Started.
@@ -37,7 +54,7 @@ Pass `--global` to opt into the legacy merged behavior (read `config.sources` an
37
54
 
38
55
  Use `npx analyzthis_design run-unchunked` for the legacy single-pass orchestrator.
39
56
 
40
- **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.3.1 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
57
+ **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.4.1 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
41
58
 
42
59
  ---
43
60
 
@@ -63,7 +80,7 @@ npx analyzthis_design run-unchunked --task "Review invoice approval screen" --pr
63
80
 
64
81
  > **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>`).
65
82
  >
66
- > **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, **Claude Code**, and Windsurf during install. For Lovable, v0, Bolt, Replit, ChatGPT: run `npx analyzthis_design mcp --configure <tool>` for a config snippet.
83
+ > **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.
67
84
 
68
85
  ### Install by target IDE
69
86
 
@@ -138,6 +155,9 @@ Invoke critique personas for targeted, already-grounded questions. For **wirefra
138
155
  | `/knowledge-bank` | Auto-populated from your connected vault (or from Kavi collect). All personas read this first. |
139
156
  | `/design-reference` | CSV reference data (colors, typography, UX guidelines, stacks, …) |
140
157
  | `/collect-knowledge` | Alias for `/kavi` |
158
+ | `/accept` | Keep or skip the last persona note (yes / no). Local evolution — no CLI flags. |
159
+ | `/share` | Send a correction to the package (preview, then yes). Redacted. |
160
+ | `/receipt` | Inferred token receipt for this project. Not a bill. |
141
161
 
142
162
  ---
143
163
 
@@ -731,6 +751,10 @@ npx analyzthis_design status
731
751
 
732
752
  # Session (agentic)
733
753
  npx analyzthis_design session init|show|reset [--project id] [--all]
754
+ npx analyzthis_design accept --keep [--persona zara] # designer keep (slash: /accept yes)
755
+ npx analyzthis_design accept --fix --because "one sentence" # designer skip (slash: /accept no)
756
+ npx analyzthis_design share # preview notes for the package
757
+ npx analyzthis_design share --send # send (slash: /share yes)
734
758
  npx analyzthis_design session accept --persona <id> [--reject] [--comment "..."] [--correction "..."] [--rating 1-5] [--tags a,b]
735
759
 
736
760
  # Persona feedback (v1.16)
@@ -870,7 +894,7 @@ skills/
870
894
  | **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. |
871
895
  | **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. |
872
896
  | **Universal IDE support** | Cursor, Claude Desktop, Windsurf auto-configured. Lovable, v0, Bolt, Replit, ChatGPT: run `mcp --configure <tool>` for a copy-paste config snippet. |
873
- | **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) |
897
+ | **MCP lite + full** | Default: router (`analyzthis_design`) + retrieve + session + receipt. Full 19 named tools behind `--catalog full`. |
874
898
  | **System prompt fallback** | `analyzthis_system_prompt` tool generates a consolidated prompt for tools that don't support MCP yet |
875
899
 
876
900
  ## 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
 
@@ -312,21 +313,39 @@ Each persona reads the session state, so you do not need to repeat the task.
312
313
 
313
314
  ## 8. After the run — accept, reject, evolve
314
315
 
315
- ### Mark an output accepted
316
+ ### Designer path (remember this)
316
317
 
317
- ```bash
318
- npx analyzthis_design session accept --persona arjun
318
+ In chat, after `/zara` or any persona:
319
+
320
+ ```
321
+ /accept yes
322
+ ```
323
+
324
+ or
325
+
326
+ ```
327
+ /accept no — too much motion on the daily table
319
328
  ```
320
329
 
321
- ### Reject with correction
330
+ No terminal flags. `/accept` writes keep or skip for **local** evolution.
331
+
332
+ To send a correction to the published package:
333
+
334
+ ```
335
+ /share
336
+ ```
337
+
338
+ Then **yes** if the preview looks right. Redacted — no folder names, emails, or keys.
339
+
340
+ ### CLI (same thing, if you prefer the terminal)
322
341
 
323
342
  ```bash
324
- npx analyzthis_design session accept --persona arjun --reject \
325
- --comment "Invented tokens not in our DS" \
326
- --correction "Use --color-primary and spacing-4 from tokens.css" \
327
- --rating 2 --tags invented_tokens,missed_ds
343
+ npx analyzthis_design accept --keep --persona arjun
344
+ npx analyzthis_design accept --fix --persona arjun --because "Invented tokens use tokens.css"
328
345
  ```
329
346
 
347
+ The older `session accept` / `feedback record` flags still work.
348
+
330
349
  ### Make the team learn
331
350
 
332
351
  ```bash
package/dist/README.md CHANGED
@@ -4,6 +4,23 @@ 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.1 — `/accept` and `/share` (designer keep / skip / send)
8
+
9
+ After `/zara` (or any persona), type `/accept yes` or `/accept no` plus one sentence. No CLI flags. Writes keep or skip for **local** evolution. Slash-only notes still count.
10
+
11
+ To send a correction to the **published** package: `/share` (preview) then `/share yes`. Redacted. Uses the HTTP endpoint if configured; otherwise a GitHub issue on joshirishi/analyzthis_design.
12
+
13
+ ## v2.4.0 — Claude-path efficiency (1 Sep 2026)
14
+
15
+ Same SHIP / REVISE / BLOCK. Fewer tokens on Claude Code and Claude Desktop. Not Caveman-speak. Not a proxy.
16
+
17
+ - **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`.
18
+ - **Receipt:** every MCP result ends with inferred tokens (not a bill). CLI: `npx analyzthis_design receipt`. Slash: `/receipt`.
19
+ - **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.
20
+ - **Knowledge bank** is an index. Load one persona slice (`kind=knowledge`, `persona=zara`). Do not inject the whole bank.
21
+ - **Tokens per verdict** prints on `receipt` and CLI `run`.
22
+ - Optional: wrap our stdio MCP through Caveman’s shrink if you already run Caveman. We do not ship a proxy.
23
+
7
24
  ## v2.3.1 — independently callable personas (31 Aug 2026)
8
25
 
9
26
  After install, type `/noor`, `/anuj`, `/arjun`, `/meera`, `/priya`, `/zara`, `/raj`, `/kavi` even if Claude’s slash menu only lists Getting Started.
@@ -37,7 +54,7 @@ Pass `--global` to opt into the legacy merged behavior (read `config.sources` an
37
54
 
38
55
  Use `npx analyzthis_design run-unchunked` for the legacy single-pass orchestrator.
39
56
 
40
- **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.3.1 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
57
+ **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.4.1 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
41
58
 
42
59
  ---
43
60
 
@@ -63,7 +80,7 @@ npx analyzthis_design run-unchunked --task "Review invoice approval screen" --pr
63
80
 
64
81
  > **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>`).
65
82
  >
66
- > **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, **Claude Code**, and Windsurf during install. For Lovable, v0, Bolt, Replit, ChatGPT: run `npx analyzthis_design mcp --configure <tool>` for a config snippet.
83
+ > **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.
67
84
 
68
85
  ### Install by target IDE
69
86
 
@@ -138,6 +155,9 @@ Invoke critique personas for targeted, already-grounded questions. For **wirefra
138
155
  | `/knowledge-bank` | Auto-populated from your connected vault (or from Kavi collect). All personas read this first. |
139
156
  | `/design-reference` | CSV reference data (colors, typography, UX guidelines, stacks, …) |
140
157
  | `/collect-knowledge` | Alias for `/kavi` |
158
+ | `/accept` | Keep or skip the last persona note (yes / no). Local evolution — no CLI flags. |
159
+ | `/share` | Send a correction to the package (preview, then yes). Redacted. |
160
+ | `/receipt` | Inferred token receipt for this project. Not a bill. |
141
161
 
142
162
  ---
143
163
 
@@ -731,6 +751,10 @@ npx analyzthis_design status
731
751
 
732
752
  # Session (agentic)
733
753
  npx analyzthis_design session init|show|reset [--project id] [--all]
754
+ npx analyzthis_design accept --keep [--persona zara] # designer keep (slash: /accept yes)
755
+ npx analyzthis_design accept --fix --because "one sentence" # designer skip (slash: /accept no)
756
+ npx analyzthis_design share # preview notes for the package
757
+ npx analyzthis_design share --send # send (slash: /share yes)
734
758
  npx analyzthis_design session accept --persona <id> [--reject] [--comment "..."] [--correction "..."] [--rating 1-5] [--tags a,b]
735
759
 
736
760
  # Persona feedback (v1.16)
@@ -870,7 +894,7 @@ skills/
870
894
  | **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. |
871
895
  | **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. |
872
896
  | **Universal IDE support** | Cursor, Claude Desktop, Windsurf auto-configured. Lovable, v0, Bolt, Replit, ChatGPT: run `mcp --configure <tool>` for a copy-paste config snippet. |
873
- | **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) |
897
+ | **MCP lite + full** | Default: router (`analyzthis_design`) + retrieve + session + receipt. Full 19 named tools behind `--catalog full`. |
874
898
  | **System prompt fallback** | `analyzthis_system_prompt` tool generates a consolidated prompt for tools that don't support MCP yet |
875
899
 
876
900
  ## What's new in v2.2
package/dist/bin/cli.js CHANGED
@@ -60,6 +60,10 @@ Usage:
60
60
  session accept Mark a persona's last output accepted, for training export
61
61
  (--persona <id>, optional --reject to unmark)
62
62
  Optional feedback: --comment, --correction, --rating 1-5, --tags a,b
63
+ accept Designer keep / skip (same as /accept). --keep or --fix
64
+ Optional: --persona, --because "one sentence", --liked (keep, not shipped)
65
+ share Designer send-to-package (same as /share). Preview, then --send
66
+ Optional: --because "one sentence", --persona
63
67
 
64
68
  ── Persona feedback commands ─────────────────────────────────
65
69
  feedback record Record unhappiness or a correction for a persona output
@@ -75,6 +79,7 @@ Usage:
75
79
  ── Efficiency / cost commands ────────────────────────────────
76
80
  metrics Print the last run's cost metrics (--all for every project)
77
81
  cost Print the last run's $ cost from config.pricing (--all for every project)
82
+ receipt Inferred token receipt for host (slash/MCP) turns — not a bill
78
83
  export-training Write accepted-output JSONL pairs for LoRA prep
79
84
  (--persona <id>, --all, --output <path>)
80
85
  feedback export Write rejected + correction JSONL pairs (DPO / negative examples)
@@ -86,9 +91,11 @@ Usage:
86
91
  ── MCP server (for any AI IDE: Cursor, Claude Desktop, Lovable, v0, Bolt) ──
87
92
  mcp Start the MCP server on stdio (for MCP client config)
88
93
  mcp --configure cursor Write MCP config to ~/.cursor/mcp.json
89
- mcp --configure claude Write MCP config to Claude Desktop config
94
+ mcp --configure claude Write MCP config to Claude Desktop + Claude Code
90
95
  mcp --configure windsurf Write MCP config to Windsurf
91
96
  mcp --configure <tool> Print manual MCP config for any other tool
97
+ mcp --catalog lite|full Lite (default): router + retrieve + session + receipt
98
+ full: all 19 named tools. Or ANALYZTHIS_MCP_CATALOG=full
92
99
 
93
100
  ── Mood board commands ─────────────────────────────────────
94
101
  moodboard create --task <text> Build a mood board from web + DS references
@@ -217,6 +224,10 @@ Usage:
217
224
  npx analyzthis_design devi respond --run ~/.analyzthis_design/runs/... --step 001-arjun --file out.md
218
225
  npx analyzthis_design run-unchunked --task "Review this screen" --provider anthropic
219
226
 
227
+ npx analyzthis_design accept --keep --persona zara
228
+ npx analyzthis_design accept --fix --persona zara --because "too much motion on the table"
229
+ npx analyzthis_design share
230
+ npx analyzthis_design share --send
220
231
  npx analyzthis_design session accept --persona arjun
221
232
  npx analyzthis_design session accept --persona arjun --reject \\
222
233
  --comment "Invented tokens not in our DS" \\
@@ -319,6 +330,11 @@ const budgetVal = getFlag('budget');
319
330
  const sequentialFlag = flags.includes('--sequential');
320
331
  const maxChunksVal = getFlag('max-chunks');
321
332
  const unchunkedFlag = flags.includes('--unchunked');
333
+ const keepFlag = flags.includes('--keep');
334
+ const fixFlag = flags.includes('--fix') || flags.includes('--no');
335
+ const likedFlag = flags.includes('--liked');
336
+ const becauseVal = getFlag('because');
337
+ const sendFlag = flags.includes('--send');
322
338
 
323
339
  // ─── Commands ────────────────────────────────────────────────────────────────
324
340
 
@@ -769,11 +785,12 @@ switch (cmd) {
769
785
  case 'mcp': {
770
786
  const mcpServer = require('../lib/mcp-server');
771
787
  const configureTarget = getFlag('configure');
788
+ const catalogVal = getFlag('catalog');
772
789
  if (configureTarget) {
773
- mcpServer.writeMcpConfig(configureTarget);
790
+ mcpServer.writeMcpConfig(configureTarget, { catalog: catalogVal });
774
791
  break;
775
792
  }
776
- mcpServer.startStdioServer();
793
+ mcpServer.startStdioServer(catalogVal);
777
794
  break;
778
795
  }
779
796
 
@@ -965,6 +982,8 @@ switch (cmd) {
965
982
  console.log(` objections_raised: ${m.objections_raised ?? 0}`);
966
983
  console.log(` objections_resolved: ${m.objections_resolved ?? 0}`);
967
984
  console.log(` raj_escalations: ${m.raj_escalations ?? 0}`);
985
+ console.log(` host_turns: ${(m.host_turns || []).length}`);
986
+ console.log(` tokens_per_verdict: ${m.tokens_per_verdict ?? 'n/a'}`);
968
987
  const d = state.deliberation;
969
988
  if (d?.mode) {
970
989
  console.log(` deliberation_mode: ${d.mode}, consensus=${d.consensus_reached}`);
@@ -981,6 +1000,129 @@ switch (cmd) {
981
1000
  break;
982
1001
  }
983
1002
 
1003
+ case 'receipt': {
1004
+ const receipt = require('../lib/receipt');
1005
+ console.log('\n' + receipt.report({ project: projectVal }) + '\n');
1006
+ break;
1007
+ }
1008
+
1009
+ case 'accept': {
1010
+ const accept = require('../lib/accept');
1011
+ const wantKeep = keepFlag || yesFlag;
1012
+ const wantFix = fixFlag;
1013
+ try {
1014
+ if (wantKeep && wantFix) {
1015
+ console.error('\n ✗ Use --keep or --fix, not both.\n');
1016
+ process.exit(1);
1017
+ }
1018
+ if (!wantKeep && !wantFix) {
1019
+ const peek = accept.preview({ project: projectVal });
1020
+ console.log('\n Keep the last note?');
1021
+ console.log(' Yes: npx analyzthis_design accept --keep' + (peek.persona ? ` --persona ${peek.persona}` : ''));
1022
+ console.log(' No: npx analyzthis_design accept --fix --because "one sentence"');
1023
+ if (peek.persona) console.log(` Last persona: ${peek.persona}`);
1024
+ else console.log(' Last persona: not sure — add --persona zara (or arjun, meera, …)');
1025
+ console.log('');
1026
+ break;
1027
+ }
1028
+ if (wantKeep) {
1029
+ const result = accept.keep({
1030
+ project: projectVal,
1031
+ persona: personaVal,
1032
+ comment: commentVal || becauseVal || '',
1033
+ shipped: !likedFlag,
1034
+ note: commentVal || '',
1035
+ });
1036
+ console.log(`\n✅ Kept ${result.persona}'s note.` + (result.shipped ? ' Marked as shipped for evolution.' : ' Saved as liked (not shipped).') + '\n');
1037
+ break;
1038
+ }
1039
+ const result = accept.fix({
1040
+ project: projectVal,
1041
+ persona: personaVal,
1042
+ because: becauseVal || commentVal || '',
1043
+ correction: correctionVal || '',
1044
+ rating: ratingVal,
1045
+ tags: parseFeedbackTags(tagsVal),
1046
+ });
1047
+ console.log(`\n✅ Logged your fix for ${result.persona}. The team can learn from it.\n`);
1048
+ } catch (err) {
1049
+ if (err.code === 'NEED_PERSONA') {
1050
+ console.error('\n ✗ Which note? Add --persona zara (or arjun, meera, priya, noor, anuj, raj).\n');
1051
+ process.exit(1);
1052
+ }
1053
+ if (err.code === 'NEED_BECAUSE') {
1054
+ console.error('\n ✗ Add one sentence: --because "what was wrong or what you did instead"\n');
1055
+ process.exit(1);
1056
+ }
1057
+ console.error(`\n ✗ ${err.message}\n`);
1058
+ process.exit(1);
1059
+ }
1060
+
1061
+ break;
1062
+ }
1063
+
1064
+ case 'share': {
1065
+ const share = require('../lib/share');
1066
+ const acceptMod = require('../lib/accept');
1067
+ const wantSend = sendFlag || yesFlag;
1068
+ (async () => {
1069
+ try {
1070
+ if (!wantSend) {
1071
+ if (becauseVal || commentVal) {
1072
+ acceptMod.fix({
1073
+ project: projectVal,
1074
+ persona: personaVal,
1075
+ because: becauseVal || commentVal,
1076
+ correction: correctionVal || becauseVal || commentVal,
1077
+ });
1078
+ }
1079
+ const peek = share.preview({ project: projectVal, persona: personaVal, all: allFlag });
1080
+ if (!peek.count) {
1081
+ console.log('\n Nothing to send yet. After a critique: /accept no plus one sentence, then /share.\n');
1082
+ return;
1083
+ }
1084
+ console.log(`\n Ready to send ${peek.count} note(s) to the package (redacted — no folders, emails, or keys).`);
1085
+ peek.rows.slice(0, 5).forEach((r) => {
1086
+ console.log(` • ${r.persona}: ${(r.comment || r.correction || '').slice(0, 100)}`);
1087
+ });
1088
+ if (peek.rows.length > 5) console.log(` … and ${peek.rows.length - 5} more`);
1089
+ console.log(peek.hasHttp ? ' Path: configured HTTP endpoint.' : ' Path: GitHub issue on joshirishi/analyzthis_design.');
1090
+ console.log(' Send? Run: npx analyzthis_design share --send\n');
1091
+ return;
1092
+ }
1093
+ const result = await share.send({
1094
+ project: projectVal,
1095
+ persona: personaVal,
1096
+ because: becauseVal || commentVal || '',
1097
+ correction: correctionVal || '',
1098
+ all: allFlag,
1099
+ });
1100
+ if (result.via === 'github-link') {
1101
+ console.log(`\n ${result.message}`);
1102
+ console.log(` ${result.url}\n`);
1103
+ return;
1104
+ }
1105
+ console.log(`\n✅ ${result.message}` + (result.url ? `\n ${result.url}` : '') + '\n');
1106
+ } catch (err) {
1107
+ if (err.code === 'NOTHING') {
1108
+ console.error('\n ✗ Nothing to send yet. /accept no plus one sentence, then /share.\n');
1109
+ process.exit(1);
1110
+ }
1111
+ if (err.code === 'NEED_PERSONA') {
1112
+ console.error('\n ✗ Which note? Add --persona zara (or arjun, meera, priya, noor, anuj, raj).\n');
1113
+ process.exit(1);
1114
+ }
1115
+ if (err.code === 'NEED_BECAUSE') {
1116
+ console.error('\n ✗ Add one sentence: --because "what was wrong or what you did instead"\n');
1117
+ process.exit(1);
1118
+ }
1119
+ console.error(`\n ✗ ${err.message}\n`);
1120
+ process.exit(1);
1121
+ }
1122
+ })();
1123
+ break;
1124
+ }
1125
+
984
1126
  // ── Persona feedback (v1.16) ────────────────────────────────────────────
985
1127
 
986
1128
  case 'feedback': {
@@ -0,0 +1,95 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Designer keep / skip for evolution.
5
+ * Slash /accept talks in yes/no. This module writes the session flags.
6
+ */
7
+
8
+ var session = require('./session');
9
+ var feedback = require('./feedback');
10
+ var outcome = require('./outcome');
11
+
12
+ var PERSONA_IDS = session.PERSONA_IDS;
13
+
14
+ function resolvePersona(opts) {
15
+ var raw = String(opts.persona || '').toLowerCase().trim();
16
+ if (raw && PERSONA_IDS.indexOf(raw) === -1) {
17
+ var err = new Error('Unknown persona. Use: ' + PERSONA_IDS.join(', '));
18
+ err.code = 'BAD_PERSONA';
19
+ throw err;
20
+ }
21
+ var id = raw || session.inferLastPersona({ project: opts.project });
22
+ if (!id) {
23
+ var need = new Error('NEED_PERSONA');
24
+ need.code = 'NEED_PERSONA';
25
+ throw need;
26
+ }
27
+ return id;
28
+ }
29
+
30
+ function keep(opts) {
31
+ opts = opts || {};
32
+ var persona = resolvePersona(opts);
33
+ session.ensurePersonaOutput({
34
+ project: opts.project,
35
+ persona: persona,
36
+ text: opts.note,
37
+ });
38
+ session.markAccepted({ project: opts.project, persona: persona, accepted: true });
39
+ if (opts.comment) {
40
+ feedback.recordFeedback({
41
+ project: opts.project,
42
+ persona: persona,
43
+ satisfied: true,
44
+ rating: 5,
45
+ comment: opts.comment,
46
+ correction: '',
47
+ markRejected: false,
48
+ });
49
+ }
50
+ var shipped = opts.shipped !== false;
51
+ if (shipped) {
52
+ outcome.confirmOutcome({ project: opts.project, persona: persona, outcome: 'shipped' });
53
+ }
54
+ return { persona: persona, kept: true, shipped: shipped };
55
+ }
56
+
57
+ function fix(opts) {
58
+ opts = opts || {};
59
+ var persona = resolvePersona(opts);
60
+ var because = String(opts.because || opts.comment || '').trim();
61
+ var correction = String(opts.correction || because).trim();
62
+ if (!because) {
63
+ var need = new Error('NEED_BECAUSE');
64
+ need.code = 'NEED_BECAUSE';
65
+ throw need;
66
+ }
67
+ session.ensurePersonaOutput({
68
+ project: opts.project,
69
+ persona: persona,
70
+ text: opts.note,
71
+ });
72
+ feedback.recordFeedback({
73
+ project: opts.project,
74
+ persona: persona,
75
+ satisfied: false,
76
+ rating: opts.rating != null ? Number(opts.rating) : 2,
77
+ comment: because,
78
+ correction: correction,
79
+ tags: opts.tags || ['other'],
80
+ markRejected: true,
81
+ });
82
+ outcome.confirmOutcome({ project: opts.project, persona: persona, outcome: 'revised' });
83
+ return { persona: persona, kept: false, because: because };
84
+ }
85
+
86
+ function preview(opts) {
87
+ opts = opts || {};
88
+ var state = session.show({ project: opts.project });
89
+ return {
90
+ persona: session.inferLastPersona({ project: opts.project }),
91
+ hasSession: !!state,
92
+ };
93
+ }
94
+
95
+ module.exports = { keep, fix, preview, PERSONA_IDS };
@@ -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 {
@@ -316,6 +316,8 @@ module.exports = {
316
316
  resolveSubmitConfig,
317
317
  submitFeedback,
318
318
  submitStatus,
319
+ collectUnsentEntries,
320
+ markEntriesSubmitted,
319
321
  loadConsent,
320
322
  saveConsent,
321
323
  revokeConsent,
@@ -33,6 +33,9 @@ const PROJECT_COMMANDS = [
33
33
  'design-critic',
34
34
  'getting-started',
35
35
  'devi',
36
+ 'receipt',
37
+ 'accept',
38
+ 'share',
36
39
  ];
37
40
 
38
41
  const SKILLS = [
@@ -60,6 +63,9 @@ const SKILLS = [
60
63
  'design-personas',
61
64
  'design-reference',
62
65
  'knowledge-bank',
66
+ 'receipt',
67
+ 'accept',
68
+ 'share',
63
69
  ];
64
70
 
65
71
  function getPackageVersion() {
@@ -127,6 +133,9 @@ function printWelcomeBanner(targetId, log = console.log) {
127
133
  log(` ${p}design-critic 4-persona critique + composite score`);
128
134
  log(` ${p}deliberation-protocol adversarial review rules (objections, Raj)`);
129
135
  log(` ${p}devi host LLM: voice personas when CLI has no API keys`);
136
+ log(` ${p}accept keep or skip the last note (yes / no) — local evolution`);
137
+ log(` ${p}share send a correction to the package (preview, then yes)`);
138
+ log(` ${p}receipt inferred tokens for this project (not a bill)`);
130
139
 
131
140
  log('');
132
141
  log(' CLI (host mode — no API keys):');