analyzthis_design 2.2.0 → 2.3.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.
package/HOW-TO-USE.md CHANGED
@@ -335,6 +335,23 @@ npx analyzthis_design evolve --extract # write patch proposals
335
335
  npx analyzthis_design evolve --apply <patchId> # apply after review
336
336
  ```
337
337
 
338
+ ### Check evolution metrics
339
+
340
+ ```bash
341
+ npx analyzthis_design evolve --metrics # team evolution dashboard
342
+ npx analyzthis_design evolve --ready # check if enough data to evolve
343
+ ```
344
+
345
+ The dashboard shows a per-persona score (0-100) based on lessons, outcomes, and patches applied. Levels: Novice (0-19) -> Developing (20-39) -> Proficient (40-59) -> Advanced (60-79) -> Expert (80-100).
346
+
347
+ After every successful run, Devi prints an evolution readiness hint automatically.
348
+
349
+ ### Premise challenge (v2.2)
350
+
351
+ When you run a critique, the planner now evaluates whether your task framing is valid before planning chunks. If the premise is questionable (e.g., "users don't convert because X is buried" — but maybe they reach X and still don't convert), the planner adds a `premise_check` chunk that Raj runs first. All subsequent persona chunks see the premise assessment.
352
+
353
+ The synthesis step also explicitly resolves disagreements — if Arjun says SHIP and Meera says REVISE, the synthesis picks a winner with a forward path instead of summarizing both sides.
354
+
338
355
  ### Confirm whether the advice actually shipped
339
356
 
340
357
  ```bash
@@ -426,6 +443,8 @@ npx analyzthis_design moodboard critique --board <id>
426
443
  npx analyzthis_design moodboard add --board <id> --url <url> --tags a,b
427
444
 
428
445
  # Evolve
446
+ npx analyzthis_design evolve --metrics
447
+ npx analyzthis_design evolve --ready
429
448
  npx analyzthis_design evolve --extract --dry-run
430
449
  npx analyzthis_design evolve --apply <patchId>
431
450
  npx analyzthis_design outcome --confirm --persona arjun --result shipped
package/README.md CHANGED
@@ -4,6 +4,22 @@ 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.3.1 — independently callable personas (31 Aug 2026)
8
+
9
+ After install, type `/noor`, `/anuj`, `/arjun`, `/meera`, `/priya`, `/zara`, `/raj`, `/kavi` even if Claude’s slash menu only lists Getting Started.
10
+
11
+ - `npx analyzthis_design --target claude` is the same as `install --target claude` (leading `--target` used to print “Unknown command”).
12
+ - Install writes project slash commands into `.claude/commands/` and `.cursor/commands/`.
13
+ - `mcp --configure claude` writes Claude Desktop, Claude Code (`~/.claude.json`), and this repo’s `.mcp.json` when you are in a project.
14
+ - Do not `npm install` this package inside a pnpm/Yarn `workspace:*` repo — use `npx … --target` instead.
15
+ - Slash and MCP still use the model already in your chat. CLI `run` still picks a strong planner and cheap chunks.
16
+
17
+ Website changelog: [analyzthis-lab.vercel.app/design#whats-new](https://analyzthis-lab.vercel.app/design#whats-new)
18
+
19
+ ## v2.3.0 — MCP for any IDE
20
+
21
+ 19 MCP tools (`analyzthis_noor`, not `/noor`). Slash commands and MCP are different pipes. MCP never creates a slash menu entry.
22
+
7
23
  ## v2.2 — project-scoped knowledge bank
8
24
 
9
25
  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 +37,21 @@ Pass `--global` to opt into the legacy merged behavior (read `config.sources` an
21
37
 
22
38
  Use `npx analyzthis_design run-unchunked` for the legacy single-pass orchestrator.
23
39
 
24
- **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.2.0 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
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)
25
41
 
26
42
  ---
27
43
 
28
44
  ## Quick start
29
45
 
30
46
  ```bash
31
- # 1. Install the npm package (no auto-install, no obfuscation)
47
+ # 1. Install the CLI globally (optional). Do not run npm install inside a
48
+ # pnpm/Yarn workspace repo — npm cannot read workspace:* and will fail.
49
+ # Prefer npx from any folder:
32
50
  npm install -g analyzthis_design
33
51
 
34
- # 2. Install slash commands into your IDE (explicit, consent-based)
52
+ # 2. Copy skills + slash commands into your IDE (consent-based)
53
+ npx analyzthis_design install --target all
54
+ # Same thing: a leading --target means install
35
55
  npx analyzthis_design --target all
36
56
 
37
57
  # 3. Run a task in v2.0 chunked mode (free/cheap models)
@@ -41,11 +61,14 @@ npx analyzthis_design run --task "Review invoice approval screen"
41
61
  npx analyzthis_design run-unchunked --task "Review invoice approval screen" --provider host
42
62
  ```
43
63
 
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.
64
+ > **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
+ >
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.
45
67
 
46
68
  ### Install by target IDE
47
69
 
48
70
  ```bash
71
+ npx analyzthis_design install --target claude
49
72
  npx analyzthis_design --target claude
50
73
  npx analyzthis_design --target codex
51
74
  npx analyzthis_design --target grok
@@ -53,7 +76,7 @@ npx analyzthis_design --target windsurf
53
76
  npx analyzthis_design --target all --force
54
77
  ```
55
78
 
56
- **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`.
79
+ **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`.
57
80
 
58
81
  | Tool | Skills installed to | Invoke |
59
82
  |---|---|---|
@@ -733,9 +756,18 @@ npx analyzthis_design run --continue --task "..." # resume host-mode run after
733
756
  # CSV validation
734
757
  npx analyzthis_design validate # validate all 28 CSV files against schema.json
735
758
 
759
+ # MCP server (for any AI IDE: Cursor, Claude Desktop, Lovable, v0, Bolt, Replit)
760
+ npx analyzthis_design mcp # start stdio MCP server
761
+ npx analyzthis_design mcp --configure cursor # auto-config Cursor
762
+ npx analyzthis_design mcp --configure claude # auto-config Claude Desktop
763
+ npx analyzthis_design mcp --configure windsurf # auto-config Windsurf
764
+ npx analyzthis_design mcp --configure <tool> # print config for any other tool
765
+
736
766
  # Self-evolving team (v1.21)
737
767
  npx analyzthis_design evolve --extract [--window N] [--dry-run]
738
768
  npx analyzthis_design evolve --apply <patchId> [--dry-run]
769
+ npx analyzthis_design evolve --metrics [--project id]
770
+ npx analyzthis_design evolve --ready [--project id]
739
771
  npx analyzthis_design outcome --infer [--window N]
740
772
  npx analyzthis_design outcome --pending
741
773
  npx analyzthis_design outcome --confirm --persona <id> --result shipped|revised|blocked|missed
@@ -783,6 +815,8 @@ lib/
783
815
  chunk-telemetry.js Per-chunk model quality tracking
784
816
  chunk-run.js Top-level chunked execution coordinator
785
817
  reference-pack.js Shared multi-file CSV + vault retrieval (buildReferencePack)
818
+ mcp-server.js MCP server — 19 tools for any MCP-compatible IDE
819
+ system-prompt.js Consolidated prompt generator (fallback for non-MCP tools)
786
820
  moodboard.js Mood-board engine: collect web/DS references, tag, deliberate
787
821
  dedup.js Cross-persona redundancy detection
788
822
  lessons.js Self-evolving lessons store (extract/retrieve/inject)
@@ -829,6 +863,27 @@ skills/
829
863
 
830
864
  ---
831
865
 
866
+ ## What's new in v2.3
867
+
868
+ | Feature | Description |
869
+ |---------|-------------|
870
+ | **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
+ | **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
+ | **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) |
874
+ | **System prompt fallback** | `analyzthis_system_prompt` tool generates a consolidated prompt for tools that don't support MCP yet |
875
+
876
+ ## What's new in v2.2
877
+
878
+ | Feature | Description |
879
+ |---------|-------------|
880
+ | **Premise challenge** | Planner now evaluates whether the task premise is valid before planning chunks. Can add a `premise_check` chunk (Raj) that runs first and questions "are we solving the right problem?" |
881
+ | **Conflict resolution** | Synthesis must pick a winner when personas disagree — not summarize both sides. Detects disagreements automatically, injects them into the synthesis prompt, and requires a definitive answer with a forward path. |
882
+ | **Raj authority expanded** | Raj can now challenge the task premise (not just arbitrate stalemates). "Accepting the task framing without questioning it" is explicitly forbidden. |
883
+ | **Evolution metrics** | `evolve --metrics` shows a per-persona evolution dashboard (0-100 score, levels: Novice → Expert). `evolve --ready` checks if enough data exists to propose patches. |
884
+ | **Devi evolution check** | After every successful run, Devi prints an evolution readiness hint and asks if the team is ready to evolve. |
885
+ | **Plain source, no obfuscation** | Removed `javascript-obfuscator` entirely. `dist/` is fully auditable plain JavaScript. `postinstall` only prints a message — no auto-install. |
886
+
832
887
  ## What's new in v2.0
833
888
 
834
889
  | Feature | Description |
@@ -2,11 +2,11 @@
2
2
 
3
3
  10+ years product strategy. Speaks ONLY when the Stalemate Protocol activates — does not volunteer opinions. Every position anchored to PRD evidence, user data, or a named product principle.
4
4
 
5
- **Allowed:** resolve stalemates between personas using the 5 product principles; issue final SHIP/REVISE/BLOCK when personas disagree.
5
+ **Allowed:** resolve stalemates between personas using the 5 product principles; issue final SHIP/REVISE/BLOCK when personas disagree; challenge the task premise — "are we solving the right problem?"
6
6
 
7
- **Forbidden:** running with no stalemate/BLOCK condition; code edits without explicit build approval.
7
+ **Forbidden:** running with no stalemate/BLOCK condition; code edits without explicit build approval; accepting the task framing without questioning it.
8
8
 
9
- **Activation criteria (any one):** 2+ unconceded structural objections; a "non-negotiable" claim refused; the same argument repeated without new evidence; a PRD-persona-priority conflict with no established priority.
9
+ **Activation criteria (any one):** 2+ unconceded structural objections; a "non-negotiable" claim refused; the same argument repeated without new evidence; a PRD-persona-priority conflict with no established priority; synthesis phase (always — must resolve conflicts and challenge premise).
10
10
 
11
11
  ## Output schema (always full — Raj has no lite mode; his output is inherently a short decision)
12
12
  ```
@@ -335,6 +335,23 @@ npx analyzthis_design evolve --extract # write patch proposals
335
335
  npx analyzthis_design evolve --apply <patchId> # apply after review
336
336
  ```
337
337
 
338
+ ### Check evolution metrics
339
+
340
+ ```bash
341
+ npx analyzthis_design evolve --metrics # team evolution dashboard
342
+ npx analyzthis_design evolve --ready # check if enough data to evolve
343
+ ```
344
+
345
+ The dashboard shows a per-persona score (0-100) based on lessons, outcomes, and patches applied. Levels: Novice (0-19) -> Developing (20-39) -> Proficient (40-59) -> Advanced (60-79) -> Expert (80-100).
346
+
347
+ After every successful run, Devi prints an evolution readiness hint automatically.
348
+
349
+ ### Premise challenge (v2.2)
350
+
351
+ When you run a critique, the planner now evaluates whether your task framing is valid before planning chunks. If the premise is questionable (e.g., "users don't convert because X is buried" — but maybe they reach X and still don't convert), the planner adds a `premise_check` chunk that Raj runs first. All subsequent persona chunks see the premise assessment.
352
+
353
+ The synthesis step also explicitly resolves disagreements — if Arjun says SHIP and Meera says REVISE, the synthesis picks a winner with a forward path instead of summarizing both sides.
354
+
338
355
  ### Confirm whether the advice actually shipped
339
356
 
340
357
  ```bash
@@ -426,6 +443,8 @@ npx analyzthis_design moodboard critique --board <id>
426
443
  npx analyzthis_design moodboard add --board <id> --url <url> --tags a,b
427
444
 
428
445
  # Evolve
446
+ npx analyzthis_design evolve --metrics
447
+ npx analyzthis_design evolve --ready
429
448
  npx analyzthis_design evolve --extract --dry-run
430
449
  npx analyzthis_design evolve --apply <patchId>
431
450
  npx analyzthis_design outcome --confirm --persona arjun --result shipped
package/dist/README.md CHANGED
@@ -4,6 +4,22 @@ 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.3.1 — independently callable personas (31 Aug 2026)
8
+
9
+ After install, type `/noor`, `/anuj`, `/arjun`, `/meera`, `/priya`, `/zara`, `/raj`, `/kavi` even if Claude’s slash menu only lists Getting Started.
10
+
11
+ - `npx analyzthis_design --target claude` is the same as `install --target claude` (leading `--target` used to print “Unknown command”).
12
+ - Install writes project slash commands into `.claude/commands/` and `.cursor/commands/`.
13
+ - `mcp --configure claude` writes Claude Desktop, Claude Code (`~/.claude.json`), and this repo’s `.mcp.json` when you are in a project.
14
+ - Do not `npm install` this package inside a pnpm/Yarn `workspace:*` repo — use `npx … --target` instead.
15
+ - Slash and MCP still use the model already in your chat. CLI `run` still picks a strong planner and cheap chunks.
16
+
17
+ Website changelog: [analyzthis-lab.vercel.app/design#whats-new](https://analyzthis-lab.vercel.app/design#whats-new)
18
+
19
+ ## v2.3.0 — MCP for any IDE
20
+
21
+ 19 MCP tools (`analyzthis_noor`, not `/noor`). Slash commands and MCP are different pipes. MCP never creates a slash menu entry.
22
+
7
23
  ## v2.2 — project-scoped knowledge bank
8
24
 
9
25
  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 +37,21 @@ Pass `--global` to opt into the legacy merged behavior (read `config.sources` an
21
37
 
22
38
  Use `npx analyzthis_design run-unchunked` for the legacy single-pass orchestrator.
23
39
 
24
- **npm:** [analyzthis_design](https://www.npmjs.com/package/analyzthis_design) · **Current version:** 2.2.0 · **Step-by-step guide:** [HOW-TO-USE.md](./HOW-TO-USE.md)
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)
25
41
 
26
42
  ---
27
43
 
28
44
  ## Quick start
29
45
 
30
46
  ```bash
31
- # 1. Install the npm package (no auto-install, no obfuscation)
47
+ # 1. Install the CLI globally (optional). Do not run npm install inside a
48
+ # pnpm/Yarn workspace repo — npm cannot read workspace:* and will fail.
49
+ # Prefer npx from any folder:
32
50
  npm install -g analyzthis_design
33
51
 
34
- # 2. Install slash commands into your IDE (explicit, consent-based)
52
+ # 2. Copy skills + slash commands into your IDE (consent-based)
53
+ npx analyzthis_design install --target all
54
+ # Same thing: a leading --target means install
35
55
  npx analyzthis_design --target all
36
56
 
37
57
  # 3. Run a task in v2.0 chunked mode (free/cheap models)
@@ -41,11 +61,14 @@ npx analyzthis_design run --task "Review invoice approval screen"
41
61
  npx analyzthis_design run-unchunked --task "Review invoice approval screen" --provider host
42
62
  ```
43
63
 
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.
64
+ > **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
+ >
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.
45
67
 
46
68
  ### Install by target IDE
47
69
 
48
70
  ```bash
71
+ npx analyzthis_design install --target claude
49
72
  npx analyzthis_design --target claude
50
73
  npx analyzthis_design --target codex
51
74
  npx analyzthis_design --target grok
@@ -53,7 +76,7 @@ npx analyzthis_design --target windsurf
53
76
  npx analyzthis_design --target all --force
54
77
  ```
55
78
 
56
- **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`.
79
+ **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`.
57
80
 
58
81
  | Tool | Skills installed to | Invoke |
59
82
  |---|---|---|
@@ -733,9 +756,18 @@ npx analyzthis_design run --continue --task "..." # resume host-mode run after
733
756
  # CSV validation
734
757
  npx analyzthis_design validate # validate all 28 CSV files against schema.json
735
758
 
759
+ # MCP server (for any AI IDE: Cursor, Claude Desktop, Lovable, v0, Bolt, Replit)
760
+ npx analyzthis_design mcp # start stdio MCP server
761
+ npx analyzthis_design mcp --configure cursor # auto-config Cursor
762
+ npx analyzthis_design mcp --configure claude # auto-config Claude Desktop
763
+ npx analyzthis_design mcp --configure windsurf # auto-config Windsurf
764
+ npx analyzthis_design mcp --configure <tool> # print config for any other tool
765
+
736
766
  # Self-evolving team (v1.21)
737
767
  npx analyzthis_design evolve --extract [--window N] [--dry-run]
738
768
  npx analyzthis_design evolve --apply <patchId> [--dry-run]
769
+ npx analyzthis_design evolve --metrics [--project id]
770
+ npx analyzthis_design evolve --ready [--project id]
739
771
  npx analyzthis_design outcome --infer [--window N]
740
772
  npx analyzthis_design outcome --pending
741
773
  npx analyzthis_design outcome --confirm --persona <id> --result shipped|revised|blocked|missed
@@ -783,6 +815,8 @@ lib/
783
815
  chunk-telemetry.js Per-chunk model quality tracking
784
816
  chunk-run.js Top-level chunked execution coordinator
785
817
  reference-pack.js Shared multi-file CSV + vault retrieval (buildReferencePack)
818
+ mcp-server.js MCP server — 19 tools for any MCP-compatible IDE
819
+ system-prompt.js Consolidated prompt generator (fallback for non-MCP tools)
786
820
  moodboard.js Mood-board engine: collect web/DS references, tag, deliberate
787
821
  dedup.js Cross-persona redundancy detection
788
822
  lessons.js Self-evolving lessons store (extract/retrieve/inject)
@@ -829,6 +863,27 @@ skills/
829
863
 
830
864
  ---
831
865
 
866
+ ## What's new in v2.3
867
+
868
+ | Feature | Description |
869
+ |---------|-------------|
870
+ | **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
+ | **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
+ | **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) |
874
+ | **System prompt fallback** | `analyzthis_system_prompt` tool generates a consolidated prompt for tools that don't support MCP yet |
875
+
876
+ ## What's new in v2.2
877
+
878
+ | Feature | Description |
879
+ |---------|-------------|
880
+ | **Premise challenge** | Planner now evaluates whether the task premise is valid before planning chunks. Can add a `premise_check` chunk (Raj) that runs first and questions "are we solving the right problem?" |
881
+ | **Conflict resolution** | Synthesis must pick a winner when personas disagree — not summarize both sides. Detects disagreements automatically, injects them into the synthesis prompt, and requires a definitive answer with a forward path. |
882
+ | **Raj authority expanded** | Raj can now challenge the task premise (not just arbitrate stalemates). "Accepting the task framing without questioning it" is explicitly forbidden. |
883
+ | **Evolution metrics** | `evolve --metrics` shows a per-persona evolution dashboard (0-100 score, levels: Novice → Expert). `evolve --ready` checks if enough data exists to propose patches. |
884
+ | **Devi evolution check** | After every successful run, Devi prints an evolution readiness hint and asks if the team is ready to evolve. |
885
+ | **Plain source, no obfuscation** | Removed `javascript-obfuscator` entirely. `dist/` is fully auditable plain JavaScript. `postinstall` only prints a message — no auto-install. |
886
+
832
887
  ## What's new in v2.0
833
888
 
834
889
  | Feature | Description |
@@ -2,11 +2,11 @@
2
2
 
3
3
  10+ years product strategy. Speaks ONLY when the Stalemate Protocol activates — does not volunteer opinions. Every position anchored to PRD evidence, user data, or a named product principle.
4
4
 
5
- **Allowed:** resolve stalemates between personas using the 5 product principles; issue final SHIP/REVISE/BLOCK when personas disagree.
5
+ **Allowed:** resolve stalemates between personas using the 5 product principles; issue final SHIP/REVISE/BLOCK when personas disagree; challenge the task premise — "are we solving the right problem?"
6
6
 
7
- **Forbidden:** running with no stalemate/BLOCK condition; code edits without explicit build approval.
7
+ **Forbidden:** running with no stalemate/BLOCK condition; code edits without explicit build approval; accepting the task framing without questioning it.
8
8
 
9
- **Activation criteria (any one):** 2+ unconceded structural objections; a "non-negotiable" claim refused; the same argument repeated without new evidence; a PRD-persona-priority conflict with no established priority.
9
+ **Activation criteria (any one):** 2+ unconceded structural objections; a "non-negotiable" claim refused; the same argument repeated without new evidence; a PRD-persona-priority conflict with no established priority; synthesis phase (always — must resolve conflicts and challenge premise).
10
10
 
11
11
  ## Output schema (always full — Raj has no lite mode; his output is inherently a short decision)
12
12
  ```
package/dist/bin/cli.js CHANGED
@@ -83,6 +83,13 @@ Usage:
83
83
  research --url <url> Fetch a URL and append to session web-context.md
84
84
  research --query <text> Search stub (or provider) appended to web-context.md
85
85
 
86
+ ── MCP server (for any AI IDE: Cursor, Claude Desktop, Lovable, v0, Bolt) ──
87
+ mcp Start the MCP server on stdio (for MCP client config)
88
+ mcp --configure cursor Write MCP config to ~/.cursor/mcp.json
89
+ mcp --configure claude Write MCP config to Claude Desktop config
90
+ mcp --configure windsurf Write MCP config to Windsurf
91
+ mcp --configure <tool> Print manual MCP config for any other tool
92
+
86
93
  ── Mood board commands ─────────────────────────────────────
87
94
  moodboard create --task <text> Build a mood board from web + DS references
88
95
  [--url <url> ...] [--auto]
@@ -241,7 +248,13 @@ Docs: https://github.com/rishikeshjoshi/analyzthis_design
241
248
 
242
249
  // ─── Parse args ──────────────────────────────────────────────────────────────
243
250
 
244
- const [,, cmd, ...flags] = process.argv;
251
+ let [, , cmd, ...flags] = process.argv;
252
+ // Leading flags mean install: `npx analyzthis_design --target claude`
253
+ // Keep --help / -h as help, not install.
254
+ if (cmd && cmd.startsWith('-') && cmd !== '--help' && cmd !== '-h') {
255
+ flags = [cmd, ...flags];
256
+ cmd = 'install';
257
+ }
245
258
 
246
259
  function getFlag(name) {
247
260
  // Supports both --flag=value and --flag value
@@ -751,6 +764,19 @@ switch (cmd) {
751
764
  process.exit(1);
752
765
  }
753
766
 
767
+ // ── MCP server ─────────────────────────────────────────────────────────
768
+
769
+ case 'mcp': {
770
+ const mcpServer = require('../lib/mcp-server');
771
+ const configureTarget = getFlag('configure');
772
+ if (configureTarget) {
773
+ mcpServer.writeMcpConfig(configureTarget);
774
+ break;
775
+ }
776
+ mcpServer.startStdioServer();
777
+ break;
778
+ }
779
+
754
780
  // ── Retrieve-on-demand reference rows ───────────────────────────────────
755
781
 
756
782
  case 'retrieve': {
@@ -108,6 +108,17 @@ function plannerSystemPrompt() {
108
108
  'Each chunk targets one persona and has a clear goal, prompts, effort level, and dependencies.',
109
109
  'You must output ONLY a JSON object inside a ```json code fence.',
110
110
  '',
111
+ 'CRITICAL: Before planning chunks, evaluate whether the task premise is valid.',
112
+ 'Ask: "Are we solving the right problem?" If the premise is questionable, add a',
113
+ 'premise_check chunk (persona: raj, effort: hard) that explicitly challenges the',
114
+ 'framing. The premise_check chunk should run FIRST and its output should be',
115
+ 'available to subsequent chunks via depends_on.',
116
+ '',
117
+ 'Also add a synthesis chunk (persona: raj, effort: hard) that runs LAST and must:',
118
+ '1. Resolve any disagreements between personas (pick a winner, give a forward path)',
119
+ '2. Challenge the premise if it was not already challenged',
120
+ '3. Produce a definitive verdict — not a summary of opinions',
121
+ '',
111
122
  'Allowed personas: arjun (UX/visual), meera (business), priya (feasibility), zara (delight), noor (minimalist IA), anuj (dense power-user), raj (strategy/arbitration).',
112
123
  '',
113
124
  'Effort levels:',
@@ -119,21 +130,33 @@ function plannerSystemPrompt() {
119
130
  '{',
120
131
  ' "plan_id": "short-unique-id",',
121
132
  ' "task_summary": "one-line summary",',
133
+ ' "premise_valid": true | false | "questionable",',
134
+ ' "premise_concern": "if questionable, what is the real problem?",',
122
135
  ' "chunks": [',
123
136
  ' {',
124
- ' "id": "ia",',
125
- ' "persona": "noor",',
126
- ' "goal": "define information hierarchy",',
137
+ ' "id": "premise_check",',
138
+ ' "persona": "raj",',
139
+ ' "goal": "challenge the task framing — are we solving the right problem?",',
127
140
  ' "system_prompt": "...",',
128
141
  ' "user_prompt": "...",',
129
- ' "effort": "standard",',
142
+ ' "effort": "hard",',
130
143
  ' "depends_on": [],',
131
- ' "output_schema": "hierarchy_list"',
144
+ ' "output_schema": "premise_assessment"',
145
+ ' },',
146
+ ' {',
147
+ ' "id": "arjun",',
148
+ ' "persona": "arjun",',
149
+ ' "goal": "...",',
150
+ ' "system_prompt": "...",',
151
+ ' "user_prompt": "...",',
152
+ ' "effort": "standard",',
153
+ ' "depends_on": ["premise_check"],',
154
+ ' "output_schema": "ux_audit"',
132
155
  ' }',
133
156
  ' ],',
134
157
  ' "synthesis": {',
135
158
  ' "persona": "raj",',
136
- ' "goal": "resolve conflicts and produce final verdict",',
159
+ ' "goal": "resolve conflicts, challenge premise if needed, produce definitive verdict",',
137
160
  ' "system_prompt": "...",',
138
161
  ' "user_prompt": "..."',
139
162
  ' }',
@@ -29,18 +29,46 @@ function buildSynthesisPrompt(plan, results, contextPack) {
29
29
  lines.push(r.output.slice(0, 1200));
30
30
  }
31
31
 
32
+ // Detect disagreements between personas for explicit arbitration.
33
+ var disagreements = [];
34
+ for (var a = 0; a < results.length; a++) {
35
+ for (var b = a + 1; b < results.length; b++) {
36
+ var va = results[a].structured_output && results[a].structured_output.verdict;
37
+ var vb = results[b].structured_output && results[b].structured_output.verdict;
38
+ if (va && vb && va !== vb) {
39
+ disagreements.push(results[a].persona + ' says ' + va + ' but ' + results[b].persona + ' says ' + vb);
40
+ }
41
+ }
42
+ }
43
+
32
44
  lines.push('',
45
+ 'You MUST do the following:',
46
+ '',
47
+ '1. RESOLVE CONFLICTS: If personas disagree on any point, pick a winner. Do not present both sides and leave it open. State which persona is correct and why, with a forward path.',
48
+ '2. CHALLENGE THE PREMISE: Before accepting the task framing, ask: "Are we solving the right problem?" If the premise is questionable, flag it explicitly.',
49
+ '3. Give a definitive answer — not a summary of opinions.',
50
+ '',
33
51
  'Produce:',
52
+ '- Premise check: Is the task framing valid? If not, what is the real problem?',
53
+ '- Resolved conflicts: For each disagreement, who is right and why.',
34
54
  '- Verdict: SHIP | REVISE | BLOCK',
35
55
  '- Composite score out of 5 if applicable',
36
- '- Top 3 actionable changes',
56
+ '- Top 3 actionable changes (each with a specific forward path, not just "fix it")',
37
57
  '- Brief reasoning',
38
58
  '',
39
59
  'Use the same format as the design-critic synthesis.'
40
60
  );
41
61
 
62
+ if (disagreements.length) {
63
+ lines.splice(lines.indexOf('You MUST do the following:'), 0,
64
+ 'DETECTED DISAGREEMENTS (must resolve each):', '');
65
+ for (var d = 0; d < disagreements.length; d++) {
66
+ lines.splice(lines.indexOf('DETECTED DISAGREEMENTS'), 0, ' - ' + disagreements[d]);
67
+ }
68
+ }
69
+
42
70
  return {
43
- system: 'You synthesize multi-persona design critique outputs. Be concise and cite the most important conflicts.',
71
+ system: 'You synthesize multi-persona design critique outputs. You are decisive not a summarizer. Resolve conflicts explicitly, challenge premises, and give forward paths. If personas contradict, pick a winner with reasoning.',
44
72
  user: lines.join('\n'),
45
73
  };
46
74
  }
@@ -138,6 +166,9 @@ async function synthesize(opts) {
138
166
  markdown: syn.markdown || text,
139
167
  model_used: { provider: model.provider, model: model.model, cost: model.cost },
140
168
  contradictions: contradictions,
169
+ premise_challenge: extractPremiseCheck(text),
170
+ conflict_resolutions: extractConflictResolutions(text),
171
+ raw_synthesis: text,
141
172
  tokens: { input: inTok, output: outTok },
142
173
  cost: chunkModels.estimateCost(model, inTok, outTok),
143
174
  };
@@ -169,8 +200,34 @@ function fallbackSynthesis(results) {
169
200
  };
170
201
  }
171
202
 
203
+ function extractPremiseCheck(text) {
204
+ if (!text) return null;
205
+ var m = text.match(/premise[\s:]*check[\s:]*([^\n]+)/i);
206
+ if (m) return m[1].trim();
207
+ m = text.match(/are we solving[\s\S]{0,200}/i);
208
+ if (m) return m[0].trim();
209
+ m = text.match(/premise[\s:]*([valid|questionable|invalid]+)/i);
210
+ if (m) return m[0].trim();
211
+ return null;
212
+ }
213
+
214
+ function extractConflictResolutions(text) {
215
+ if (!text) return [];
216
+ var resolutions = [];
217
+ var blocks = text.split(/\n(?=\d+\.|resolve|conflict|disagree)/i);
218
+ for (var i = 0; i < blocks.length; i++) {
219
+ var b = blocks[i].trim();
220
+ if (/^(resolve|conflict|disagree)/i.test(b) || /^\d+\.\s*(resolve|conflict)/i.test(b)) {
221
+ resolutions.push(b.slice(0, 300));
222
+ }
223
+ }
224
+ return resolutions;
225
+ }
226
+
172
227
  module.exports = {
173
228
  synthesize: synthesize,
174
229
  buildSynthesisPrompt: buildSynthesisPrompt,
175
230
  hasContradictions: hasContradictions,
231
+ extractPremiseCheck: extractPremiseCheck,
232
+ extractConflictResolutions: extractConflictResolutions,
176
233
  };