analyzthis_design 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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
@@ -21,7 +21,7 @@ Pass `--global` to opt into the legacy merged behavior (read `config.sources` an
21
21
 
22
22
  Use `npx analyzthis_design run-unchunked` for the legacy single-pass orchestrator.
23
23
 
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)
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)
25
25
 
26
26
  ---
27
27
 
@@ -42,6 +42,8 @@ npx analyzthis_design run-unchunked --task "Review invoice approval screen" --pr
42
42
  ```
43
43
 
44
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.
45
+ >
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.
45
47
 
46
48
  ### Install by target IDE
47
49
 
@@ -733,9 +735,18 @@ npx analyzthis_design run --continue --task "..." # resume host-mode run after
733
735
  # CSV validation
734
736
  npx analyzthis_design validate # validate all 28 CSV files against schema.json
735
737
 
738
+ # MCP server (for any AI IDE: Cursor, Claude Desktop, Lovable, v0, Bolt, Replit)
739
+ npx analyzthis_design mcp # start stdio MCP server
740
+ npx analyzthis_design mcp --configure cursor # auto-config Cursor
741
+ npx analyzthis_design mcp --configure claude # auto-config Claude Desktop
742
+ npx analyzthis_design mcp --configure windsurf # auto-config Windsurf
743
+ npx analyzthis_design mcp --configure <tool> # print config for any other tool
744
+
736
745
  # Self-evolving team (v1.21)
737
746
  npx analyzthis_design evolve --extract [--window N] [--dry-run]
738
747
  npx analyzthis_design evolve --apply <patchId> [--dry-run]
748
+ npx analyzthis_design evolve --metrics [--project id]
749
+ npx analyzthis_design evolve --ready [--project id]
739
750
  npx analyzthis_design outcome --infer [--window N]
740
751
  npx analyzthis_design outcome --pending
741
752
  npx analyzthis_design outcome --confirm --persona <id> --result shipped|revised|blocked|missed
@@ -783,6 +794,8 @@ lib/
783
794
  chunk-telemetry.js Per-chunk model quality tracking
784
795
  chunk-run.js Top-level chunked execution coordinator
785
796
  reference-pack.js Shared multi-file CSV + vault retrieval (buildReferencePack)
797
+ mcp-server.js MCP server — 19 tools for any MCP-compatible IDE
798
+ system-prompt.js Consolidated prompt generator (fallback for non-MCP tools)
786
799
  moodboard.js Mood-board engine: collect web/DS references, tag, deliberate
787
800
  dedup.js Cross-persona redundancy detection
788
801
  lessons.js Self-evolving lessons store (extract/retrieve/inject)
@@ -829,6 +842,27 @@ skills/
829
842
 
830
843
  ---
831
844
 
845
+ ## What's new in v2.3
846
+
847
+ | Feature | Description |
848
+ |---------|-------------|
849
+ | **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
+ | **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
+ | **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) |
853
+ | **System prompt fallback** | `analyzthis_system_prompt` tool generates a consolidated prompt for tools that don't support MCP yet |
854
+
855
+ ## What's new in v2.2
856
+
857
+ | Feature | Description |
858
+ |---------|-------------|
859
+ | **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?" |
860
+ | **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. |
861
+ | **Raj authority expanded** | Raj can now challenge the task premise (not just arbitrate stalemates). "Accepting the task framing without questioning it" is explicitly forbidden. |
862
+ | **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. |
863
+ | **Devi evolution check** | After every successful run, Devi prints an evolution readiness hint and asks if the team is ready to evolve. |
864
+ | **Plain source, no obfuscation** | Removed `javascript-obfuscator` entirely. `dist/` is fully auditable plain JavaScript. `postinstall` only prints a message — no auto-install. |
865
+
832
866
  ## What's new in v2.0
833
867
 
834
868
  | 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
@@ -21,7 +21,7 @@ Pass `--global` to opt into the legacy merged behavior (read `config.sources` an
21
21
 
22
22
  Use `npx analyzthis_design run-unchunked` for the legacy single-pass orchestrator.
23
23
 
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)
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)
25
25
 
26
26
  ---
27
27
 
@@ -42,6 +42,8 @@ npx analyzthis_design run-unchunked --task "Review invoice approval screen" --pr
42
42
  ```
43
43
 
44
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.
45
+ >
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.
45
47
 
46
48
  ### Install by target IDE
47
49
 
@@ -733,9 +735,18 @@ npx analyzthis_design run --continue --task "..." # resume host-mode run after
733
735
  # CSV validation
734
736
  npx analyzthis_design validate # validate all 28 CSV files against schema.json
735
737
 
738
+ # MCP server (for any AI IDE: Cursor, Claude Desktop, Lovable, v0, Bolt, Replit)
739
+ npx analyzthis_design mcp # start stdio MCP server
740
+ npx analyzthis_design mcp --configure cursor # auto-config Cursor
741
+ npx analyzthis_design mcp --configure claude # auto-config Claude Desktop
742
+ npx analyzthis_design mcp --configure windsurf # auto-config Windsurf
743
+ npx analyzthis_design mcp --configure <tool> # print config for any other tool
744
+
736
745
  # Self-evolving team (v1.21)
737
746
  npx analyzthis_design evolve --extract [--window N] [--dry-run]
738
747
  npx analyzthis_design evolve --apply <patchId> [--dry-run]
748
+ npx analyzthis_design evolve --metrics [--project id]
749
+ npx analyzthis_design evolve --ready [--project id]
739
750
  npx analyzthis_design outcome --infer [--window N]
740
751
  npx analyzthis_design outcome --pending
741
752
  npx analyzthis_design outcome --confirm --persona <id> --result shipped|revised|blocked|missed
@@ -783,6 +794,8 @@ lib/
783
794
  chunk-telemetry.js Per-chunk model quality tracking
784
795
  chunk-run.js Top-level chunked execution coordinator
785
796
  reference-pack.js Shared multi-file CSV + vault retrieval (buildReferencePack)
797
+ mcp-server.js MCP server — 19 tools for any MCP-compatible IDE
798
+ system-prompt.js Consolidated prompt generator (fallback for non-MCP tools)
786
799
  moodboard.js Mood-board engine: collect web/DS references, tag, deliberate
787
800
  dedup.js Cross-persona redundancy detection
788
801
  lessons.js Self-evolving lessons store (extract/retrieve/inject)
@@ -829,6 +842,27 @@ skills/
829
842
 
830
843
  ---
831
844
 
845
+ ## What's new in v2.3
846
+
847
+ | Feature | Description |
848
+ |---------|-------------|
849
+ | **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
+ | **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
+ | **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) |
853
+ | **System prompt fallback** | `analyzthis_system_prompt` tool generates a consolidated prompt for tools that don't support MCP yet |
854
+
855
+ ## What's new in v2.2
856
+
857
+ | Feature | Description |
858
+ |---------|-------------|
859
+ | **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?" |
860
+ | **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. |
861
+ | **Raj authority expanded** | Raj can now challenge the task premise (not just arbitrate stalemates). "Accepting the task framing without questioning it" is explicitly forbidden. |
862
+ | **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. |
863
+ | **Devi evolution check** | After every successful run, Devi prints an evolution readiness hint and asks if the team is ready to evolve. |
864
+ | **Plain source, no obfuscation** | Removed `javascript-obfuscator` entirely. `dist/` is fully auditable plain JavaScript. `postinstall` only prints a message — no auto-install. |
865
+
832
866
  ## What's new in v2.0
833
867
 
834
868
  | 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]
@@ -751,6 +758,19 @@ switch (cmd) {
751
758
  process.exit(1);
752
759
  }
753
760
 
761
+ // ── MCP server ─────────────────────────────────────────────────────────
762
+
763
+ case 'mcp': {
764
+ const mcpServer = require('../lib/mcp-server');
765
+ const configureTarget = getFlag('configure');
766
+ if (configureTarget) {
767
+ mcpServer.writeMcpConfig(configureTarget);
768
+ break;
769
+ }
770
+ mcpServer.startStdioServer();
771
+ break;
772
+ }
773
+
754
774
  // ── Retrieve-on-demand reference rows ───────────────────────────────────
755
775
 
756
776
  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
  };
@@ -227,6 +227,17 @@ function install({ silent = false, force = false, target = 'cursor', showBanner
227
227
  if (showBanner && !silent && (installed.length > 0 || skipped.length > 0)) {
228
228
  printWelcomeBanner(tId, log);
229
229
  }
230
+
231
+ // Auto-configure MCP server for supported hosts.
232
+ if (tId === 'cursor' || tId === 'claude' || tId === 'windsurf') {
233
+ try {
234
+ const mcpServer = require('./mcp-server');
235
+ mcpServer.writeMcpConfig(tId);
236
+ log(' MCP server configured. Restart ' + t.label + ' to activate.\n');
237
+ } catch (e) {
238
+ // MCP config is best-effort — don't fail install if it doesn't work.
239
+ }
240
+ }
230
241
  }
231
242
  }
232
243