mcp-rubber-duck 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +116 -1
  3. package/dist/prompts/architecture.d.ts +6 -0
  4. package/dist/prompts/architecture.d.ts.map +1 -0
  5. package/dist/prompts/architecture.js +103 -0
  6. package/dist/prompts/architecture.js.map +1 -0
  7. package/dist/prompts/assumptions.d.ts +6 -0
  8. package/dist/prompts/assumptions.d.ts.map +1 -0
  9. package/dist/prompts/assumptions.js +72 -0
  10. package/dist/prompts/assumptions.js.map +1 -0
  11. package/dist/prompts/blindspots.d.ts +6 -0
  12. package/dist/prompts/blindspots.d.ts.map +1 -0
  13. package/dist/prompts/blindspots.js +71 -0
  14. package/dist/prompts/blindspots.js.map +1 -0
  15. package/dist/prompts/diverge-converge.d.ts +6 -0
  16. package/dist/prompts/diverge-converge.d.ts.map +1 -0
  17. package/dist/prompts/diverge-converge.js +85 -0
  18. package/dist/prompts/diverge-converge.js.map +1 -0
  19. package/dist/prompts/index.d.ts +22 -0
  20. package/dist/prompts/index.d.ts.map +1 -0
  21. package/dist/prompts/index.js +57 -0
  22. package/dist/prompts/index.js.map +1 -0
  23. package/dist/prompts/perspectives.d.ts +7 -0
  24. package/dist/prompts/perspectives.d.ts.map +1 -0
  25. package/dist/prompts/perspectives.js +65 -0
  26. package/dist/prompts/perspectives.js.map +1 -0
  27. package/dist/prompts/red-team.d.ts +6 -0
  28. package/dist/prompts/red-team.d.ts.map +1 -0
  29. package/dist/prompts/red-team.js +83 -0
  30. package/dist/prompts/red-team.js.map +1 -0
  31. package/dist/prompts/reframe.d.ts +6 -0
  32. package/dist/prompts/reframe.d.ts.map +1 -0
  33. package/dist/prompts/reframe.js +71 -0
  34. package/dist/prompts/reframe.js.map +1 -0
  35. package/dist/prompts/tradeoffs.d.ts +6 -0
  36. package/dist/prompts/tradeoffs.d.ts.map +1 -0
  37. package/dist/prompts/tradeoffs.js +87 -0
  38. package/dist/prompts/tradeoffs.js.map +1 -0
  39. package/dist/prompts/types.d.ts +14 -0
  40. package/dist/prompts/types.d.ts.map +1 -0
  41. package/dist/prompts/types.js +2 -0
  42. package/dist/prompts/types.js.map +1 -0
  43. package/dist/server.d.ts.map +1 -1
  44. package/dist/server.js +20 -1
  45. package/dist/server.js.map +1 -1
  46. package/package.json +1 -1
  47. package/src/prompts/architecture.ts +111 -0
  48. package/src/prompts/assumptions.ts +80 -0
  49. package/src/prompts/blindspots.ts +79 -0
  50. package/src/prompts/diverge-converge.ts +92 -0
  51. package/src/prompts/index.ts +63 -0
  52. package/src/prompts/perspectives.ts +73 -0
  53. package/src/prompts/red-team.ts +91 -0
  54. package/src/prompts/reframe.ts +78 -0
  55. package/src/prompts/tradeoffs.ts +95 -0
  56. package/src/prompts/types.ts +14 -0
  57. package/src/server.ts +23 -0
  58. package/tests/prompts.test.ts +314 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.8.0](https://github.com/nesquikm/mcp-rubber-duck/compare/v1.7.0...v1.8.0) (2026-01-14)
2
+
3
+
4
+ ### Features
5
+
6
+ * add MCP prompts capability with 8 multi-LLM focused templates ([e62bfc1](https://github.com/nesquikm/mcp-rubber-duck/commit/e62bfc10dc3302ef8ea254684fb2bcaec1ac7fdd)), closes [#23](https://github.com/nesquikm/mcp-rubber-duck/issues/23)
7
+
1
8
  # [1.7.0](https://github.com/nesquikm/mcp-rubber-duck/compare/v1.6.1...v1.7.0) (2026-01-13)
2
9
 
3
10
 
package/README.md CHANGED
@@ -23,6 +23,9 @@ An MCP (Model Context Protocol) server that acts as a bridge to query multiple O
23
23
  - [Basic Tools](#basic-tools)
24
24
  - [Multi-Agent Tools](#multi-agent-consensus--debate-tools)
25
25
  - [MCP Bridge Tools](#mcp-bridge-tools)
26
+ - [Available Prompts](#available-prompts)
27
+ - [Known Limitations (Claude Code)](#known-limitations-claude-code)
28
+ - [Recommended: Use Prompts as Templates](#recommended-use-prompts-as-templates)
26
29
  - [Usage Examples](#usage-examples)
27
30
  - [Provider-Specific Setup](#provider-specific-setup)
28
31
  - [Docker Support](#docker-support)
@@ -40,12 +43,14 @@ An MCP (Model Context Protocol) server that acts as a bridge to query multiple O
40
43
  - ⚖️ **LLM-as-Judge**: Have ducks evaluate and rank each other's responses
41
44
  - 🔄 **Iterative Refinement**: Two ducks collaboratively improve responses
42
45
  - 🎓 **Structured Debates**: Oxford, Socratic, and adversarial debate formats
46
+ - 📝 **MCP Prompts**: 8 reusable prompt templates for multi-LLM workflows (via `/` commands)
43
47
  - 💾 **Response Caching**: Avoid duplicate API calls with intelligent caching
44
48
  - 🔁 **Automatic Failover**: Falls back to other providers if primary fails
45
49
  - 📊 **Health Monitoring**: Real-time health checks for all providers
46
50
  - 💰 **Usage Tracking**: Track requests, tokens, and estimated costs per provider
47
51
  - 🔗 **MCP Bridge**: Connect ducks to other MCP servers for extended functionality
48
52
  - 🛡️ **Granular Security**: Per-server approval controls with session-based approvals
53
+ - 🏷️ **Tool Annotations**: MCP-compliant hints for tool behavior (read-only, destructive, etc.)
49
54
  - 🎨 **Fun Duck Theme**: Rubber duck debugging with personality!
50
55
 
51
56
  ## Supported Providers
@@ -288,7 +293,7 @@ Use the compare_ducks tool with prompt: "Explain async/await in JavaScript"
288
293
 
289
294
  #### Test Specific Models
290
295
  ```
291
- Use the ask_duck tool with prompt: "Hello", provider: "openai", model: "gpt-4"
296
+ Use the ask_duck tool with prompt: "Hello", provider: "openai", model: "gpt-4o"
292
297
  ```
293
298
 
294
299
  ### Troubleshooting Claude Desktop Setup
@@ -621,6 +626,102 @@ Approve or deny a duck's MCP tool request.
621
626
  }
622
627
  ```
623
628
 
629
+ ## Available Prompts
630
+
631
+ MCP Prompts are reusable templates that help you structure questions for multi-LLM analysis. Access them via `/` commands in Claude Desktop or other MCP clients.
632
+
633
+ **Key Concept**: Unlike tools (which execute actions), prompts help you *frame your questions* to get better multi-perspective responses from multiple LLMs.
634
+
635
+ | Prompt | Purpose | Required Arguments |
636
+ |--------|---------|-------------------|
637
+ | 📊 `perspectives` | Multi-angle analysis with assigned lenses | `problem`, `perspectives` |
638
+ | 🔍 `assumptions` | Surface hidden assumptions in plans | `plan` |
639
+ | 👁️ `blindspots` | Hunt for overlooked risks and gaps | `proposal` |
640
+ | ⚖️ `tradeoffs` | Structured option comparison | `options`, `criteria` |
641
+ | 🛡️ `red_team` | Security/risk analysis from multiple angles | `target` |
642
+ | 🔄 `reframe` | Problem reframing at different levels | `problem` |
643
+ | 🏗️ `architecture` | Design review across concerns | `design`, `workloads`, `priorities` |
644
+ | 💡 `diverge_converge` | Divergent exploration then convergence | `challenge` |
645
+
646
+ ### Example: Using `perspectives` with Duck Council
647
+
648
+ The most reliable way to use prompts is as templates with duck tools:
649
+
650
+ ```
651
+ Use duck_council with this prompt:
652
+
653
+ "Analyze this problem from multiple perspectives:
654
+
655
+ **PROBLEM:** Review this authentication middleware for our API
656
+
657
+ **PERSPECTIVES:** security, performance, maintainability, error handling
658
+
659
+ **CONTEXT:** [paste your code here]
660
+
661
+ Each LLM should adopt ONE lens and provide targeted analysis from that viewpoint."
662
+ ```
663
+
664
+ ### Example: Using `tradeoffs` with Compare Ducks
665
+
666
+ ```
667
+ Use compare_ducks with this prompt:
668
+
669
+ "Analyze these technical options:
670
+
671
+ **OPTIONS:** PostgreSQL, MongoDB, Redis
672
+
673
+ **CRITERIA:** scalability, query flexibility, operational complexity, cost
674
+
675
+ **CONTEXT:** Real-time analytics dashboard with 10k concurrent users
676
+
677
+ Score each option against each criterion (1-5) and identify the biggest trade-off."
678
+ ```
679
+
680
+ This approach works reliably and leverages multi-LLM analysis.
681
+
682
+ ### Known Limitations (Claude Code)
683
+
684
+ MCP prompts are correctly implemented per the [MCP specification](https://modelcontextprotocol.io/specification/2025-06-18/server/prompts), but Claude Code's support for MCP prompts has limitations:
685
+
686
+ | Issue | Status | Workaround |
687
+ |-------|--------|------------|
688
+ | Must type `(MCP)` suffix | Required | Use `/rubber-duck:reframe (MCP)` not `/rubber-duck:reframe` |
689
+ | Arguments with spaces broken | [Won't fix](https://github.com/anthropics/claude-code/issues/6657) | Use single words: `problem="checkout-abandonment"` |
690
+ | Argument hints not shown | Missing | See table above for required arguments |
691
+ | Optional-only prompts need input | [Won't fix](https://github.com/anthropics/claude-code/issues/5597) | Type at least one character |
692
+
693
+ **Example that works:**
694
+ ```
695
+ /rubber-duck:reframe (MCP) problem="slow-api-responses"
696
+ ```
697
+
698
+ **Example that fails:**
699
+ ```
700
+ /rubber-duck:reframe (MCP) problem="Users abandon checkout at payment"
701
+ ↑ spaces break argument parsing
702
+ ```
703
+
704
+ ### Recommended: Use Prompts as Templates
705
+
706
+ For the best experience, use prompts as templates with duck tools directly. Copy the prompt structure and send to `duck_council`, `compare_ducks`, or `ask_duck`:
707
+
708
+ ```
709
+ Use duck_council with this prompt:
710
+
711
+ "Analyze this problem from multiple perspectives:
712
+
713
+ **PROBLEM:** Users abandon checkout at payment step
714
+
715
+ **PERSPECTIVES:** security, UX, performance, reliability
716
+
717
+ Each LLM should adopt ONE lens and provide targeted analysis."
718
+ ```
719
+
720
+ This approach:
721
+ - ✅ Works reliably with full argument text
722
+ - ✅ Leverages multi-LLM tools (council, compare, vote)
723
+ - ✅ No Claude Code parsing issues
724
+
624
725
  ## Usage Examples
625
726
 
626
727
  ### Basic Query
@@ -961,12 +1062,26 @@ mcp-rubber-duck/
961
1062
  │ ├── config/ # Configuration management
962
1063
  │ ├── providers/ # OpenAI client wrapper
963
1064
  │ ├── tools/ # MCP tool implementations
1065
+ │ ├── prompts/ # MCP prompt templates
964
1066
  │ ├── services/ # Health, cache, conversations
965
1067
  │ └── utils/ # Logging, ASCII art
966
1068
  ├── config/ # Configuration examples
967
1069
  └── tests/ # Test suites
968
1070
  ```
969
1071
 
1072
+ ### Tool Annotations
1073
+
1074
+ All tools include MCP-compliant annotations that describe their behavioral characteristics:
1075
+
1076
+ | Annotation | Meaning |
1077
+ |------------|---------|
1078
+ | `readOnlyHint` | Tool doesn't modify any state |
1079
+ | `destructiveHint` | Tool performs irreversible operations |
1080
+ | `idempotentHint` | Tool is safe to retry multiple times |
1081
+ | `openWorldHint` | Tool accesses external systems (APIs, network) |
1082
+
1083
+ These help MCP clients make informed decisions about tool execution and user confirmations.
1084
+
970
1085
  ## Troubleshooting
971
1086
 
972
1087
  ### Provider Not Working
@@ -0,0 +1,6 @@
1
+ import { PromptDefinition } from './types.js';
2
+ /**
3
+ * Prompt for structured architecture and design reviews.
4
+ */
5
+ export declare const architecturePrompt: PromptDefinition;
6
+ //# sourceMappingURL=architecture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"architecture.d.ts","sourceRoot":"","sources":["../../src/prompts/architecture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,gBAyGhC,CAAC"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Prompt for structured architecture and design reviews.
3
+ */
4
+ export const architecturePrompt = {
5
+ name: 'architecture',
6
+ description: 'Structured architecture or design review from multiple engineering perspectives. Each reviewer focuses on different cross-cutting concerns.',
7
+ arguments: [
8
+ {
9
+ name: 'design',
10
+ description: 'Description of the architecture, system design, or technical approach',
11
+ required: true,
12
+ },
13
+ {
14
+ name: 'workloads',
15
+ description: 'Key use cases, workloads, or scenarios the design must handle',
16
+ required: true,
17
+ },
18
+ {
19
+ name: 'priorities',
20
+ description: 'Non-functional priorities (e.g., "latency, cost, simplicity, observability")',
21
+ required: true,
22
+ },
23
+ {
24
+ name: 'uncertainties',
25
+ description: 'Areas where you feel most unsure or want extra scrutiny',
26
+ required: false,
27
+ },
28
+ ],
29
+ buildMessages: (args) => {
30
+ const { design, workloads, priorities, uncertainties } = args;
31
+ if (!design) {
32
+ throw new Error('design argument is required');
33
+ }
34
+ if (!workloads) {
35
+ throw new Error('workloads argument is required');
36
+ }
37
+ if (!priorities) {
38
+ throw new Error('priorities argument is required');
39
+ }
40
+ let messageText = `Review this architecture from multiple engineering perspectives:
41
+
42
+ **DESIGN:**
43
+ ${design}
44
+
45
+ **KEY WORKLOADS/USE CASES:**
46
+ ${workloads}
47
+
48
+ **PRIORITIES:**
49
+ ${priorities}
50
+ `;
51
+ if (uncertainties) {
52
+ messageText += `
53
+ **AREAS OF UNCERTAINTY (extra scrutiny needed):**
54
+ ${uncertainties}
55
+ `;
56
+ }
57
+ messageText += `
58
+ **YOUR TASK:**
59
+ Each reviewer should focus on a different cross-cutting concern:
60
+
61
+ 1. **Scalability & Performance**
62
+ - Can this handle the stated workloads?
63
+ - Where are the bottlenecks?
64
+ - How does it scale (vertically/horizontally)?
65
+
66
+ 2. **Reliability & Failure Modes**
67
+ - What happens when components fail?
68
+ - Are there single points of failure?
69
+ - How is state handled during failures?
70
+
71
+ 3. **Operational Complexity**
72
+ - How hard is this to deploy, monitor, and debug?
73
+ - What operational burden does this create?
74
+ - How observable is the system?
75
+
76
+ 4. **Developer Experience**
77
+ - How easy is this to understand and modify?
78
+ - What's the learning curve?
79
+ - How testable is this design?
80
+
81
+ 5. **Cost Efficiency**
82
+ - What are the cost drivers?
83
+ - Are there cheaper alternatives that meet requirements?
84
+ - How do costs scale with load?
85
+
86
+ **For each concern:**
87
+ - Identify specific issues or risks
88
+ - Suggest improvements aligned with the stated priorities
89
+ - Note trade-offs (improving one area may hurt another)
90
+
91
+ Focus on actionable feedback, not generic advice.`;
92
+ return [
93
+ {
94
+ role: 'user',
95
+ content: {
96
+ type: 'text',
97
+ text: messageText,
98
+ },
99
+ },
100
+ ];
101
+ },
102
+ };
103
+ //# sourceMappingURL=architecture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"architecture.js","sourceRoot":"","sources":["../../src/prompts/architecture.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAqB;IAClD,IAAI,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
1
+ import { PromptDefinition } from './types.js';
2
+ /**
3
+ * Prompt to surface and challenge hidden assumptions in a plan or design.
4
+ */
5
+ export declare const assumptionsPrompt: PromptDefinition;
6
+ //# sourceMappingURL=assumptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assumptions.d.ts","sourceRoot":"","sources":["../../src/prompts/assumptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,gBA0E/B,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Prompt to surface and challenge hidden assumptions in a plan or design.
3
+ */
4
+ export const assumptionsPrompt = {
5
+ name: 'assumptions',
6
+ description: 'Surface and challenge hidden assumptions in a plan, design, or idea. Identifies implicit premises that could be risky if wrong.',
7
+ arguments: [
8
+ {
9
+ name: 'plan',
10
+ description: 'The plan, design, or idea to analyze for hidden assumptions',
11
+ required: true,
12
+ },
13
+ {
14
+ name: 'constraints',
15
+ description: 'Known hard constraints that are definitely true',
16
+ required: false,
17
+ },
18
+ {
19
+ name: 'concerns',
20
+ description: 'Areas where you feel uncertain or worried',
21
+ required: false,
22
+ },
23
+ ],
24
+ buildMessages: (args) => {
25
+ const { plan, constraints, concerns } = args;
26
+ if (!plan) {
27
+ throw new Error('plan argument is required');
28
+ }
29
+ let messageText = `Please analyze the hidden assumptions in this plan:
30
+
31
+ **PLAN/DESIGN/IDEA:**
32
+ ${plan}
33
+ `;
34
+ if (constraints) {
35
+ messageText += `
36
+ **KNOWN CONSTRAINTS (definitely true):**
37
+ ${constraints}
38
+ `;
39
+ }
40
+ if (concerns) {
41
+ messageText += `
42
+ **MY CONCERNS/UNCERTAINTIES:**
43
+ ${concerns}
44
+ `;
45
+ }
46
+ messageText += `
47
+ **YOUR TASK:**
48
+ Identify the implicit assumptions underlying this plan. For each assumption:
49
+
50
+ 1. **State it explicitly** - What is being assumed without being stated?
51
+ 2. **Criticality** (high/medium/low) - How important is this assumption to the plan's success?
52
+ 3. **Fragility** (high/medium/low) - How likely is this assumption to be wrong?
53
+ 4. **Validation** - How could we test or verify this assumption?
54
+
55
+ Focus on assumptions that:
56
+ - Are easy to overlook
57
+ - Would cause significant problems if wrong
58
+ - Others analyzing this might miss
59
+
60
+ Each LLM should try to find assumptions the others might not catch.`;
61
+ return [
62
+ {
63
+ role: 'user',
64
+ content: {
65
+ type: 'text',
66
+ text: messageText,
67
+ },
68
+ },
69
+ ];
70
+ },
71
+ };
72
+ //# sourceMappingURL=assumptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assumptions.js","sourceRoot":"","sources":["../../src/prompts/assumptions.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqB;IACjD,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,iIAAiI;IACnI,SAAS,EAAE;QACT;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,6DAA6D;YAC1E,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,2CAA2C;YACxD,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,aAAa,EAAE,CAAC,IAA4B,EAAE,EAAE;QAC9C,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAE7C,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,IAAI,WAAW,GAAG;;;EAGpB,IAAI;CACL,CAAC;QAEE,IAAI,WAAW,EAAE,CAAC;YAChB,WAAW,IAAI;;EAEnB,WAAW;CACZ,CAAC;QACE,CAAC;QAED,IAAI,QAAQ,EAAE,CAAC;YACb,WAAW,IAAI;;EAEnB,QAAQ;CACT,CAAC;QACE,CAAC;QAED,WAAW,IAAI;;;;;;;;;;;;;;oEAciD,CAAC;QAEjE,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,WAAW;iBAClB;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { PromptDefinition } from './types.js';
2
+ /**
3
+ * Prompt to hunt for missing considerations, gaps, and overlooked risks.
4
+ */
5
+ export declare const blindspotsPrompt: PromptDefinition;
6
+ //# sourceMappingURL=blindspots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blindspots.d.ts","sourceRoot":"","sources":["../../src/prompts/blindspots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAyE9B,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Prompt to hunt for missing considerations, gaps, and overlooked risks.
3
+ */
4
+ export const blindspotsPrompt = {
5
+ name: 'blindspots',
6
+ description: 'Hunt for missing considerations, overlooked risks, and gaps in a proposal. Acts as a panel of critical reviewers looking for what might be underweighted.',
7
+ arguments: [
8
+ {
9
+ name: 'proposal',
10
+ description: 'The plan, code, design, or proposal to review for blindspots',
11
+ required: true,
12
+ },
13
+ {
14
+ name: 'covered',
15
+ description: 'What you think you have already addressed or considered',
16
+ required: false,
17
+ },
18
+ {
19
+ name: 'risk_tolerance',
20
+ description: 'Your risk tolerance level: low, medium, or high',
21
+ required: false,
22
+ },
23
+ ],
24
+ buildMessages: (args) => {
25
+ const { proposal, covered, risk_tolerance } = args;
26
+ if (!proposal) {
27
+ throw new Error('proposal argument is required');
28
+ }
29
+ let messageText = `Act as a panel of critical reviewers looking for blindspots.
30
+
31
+ **PROPOSAL TO REVIEW:**
32
+ ${proposal}
33
+ `;
34
+ if (covered) {
35
+ messageText += `
36
+ **ALREADY CONSIDERED:**
37
+ ${covered}
38
+ `;
39
+ }
40
+ if (risk_tolerance) {
41
+ messageText += `
42
+ **RISK TOLERANCE:** ${risk_tolerance}
43
+ `;
44
+ }
45
+ messageText += `
46
+ **YOUR TASK:**
47
+ Each reviewer should identify 2-3 potential blindspots:
48
+
49
+ 1. **Failure modes** - Ways this could fail that aren't being considered
50
+ 2. **Missing considerations** - Important factors that are overlooked
51
+ 3. **Edge cases** - Scenarios that might break assumptions
52
+ 4. **Dependencies** - External factors that could cause problems
53
+
54
+ For each blindspot:
55
+ - Be specific about WHAT the concern is
56
+ - Explain WHY it's concerning (impact if it happens)
57
+ - Suggest potential mitigations
58
+
59
+ Look for things that are easy to miss because they seem "obvious" or fall outside the immediate scope. Different reviewers should explore different angles.`;
60
+ return [
61
+ {
62
+ role: 'user',
63
+ content: {
64
+ type: 'text',
65
+ text: messageText,
66
+ },
67
+ },
68
+ ];
69
+ },
70
+ };
71
+ //# sourceMappingURL=blindspots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blindspots.js","sourceRoot":"","sources":["../../src/prompts/blindspots.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAqB;IAChD,IAAI,EAAE,YAAY;IAClB,WAAW,EACT,2JAA2J;IAC7J,SAAS,EAAE;QACT;YACE,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,8DAA8D;YAC3E,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,aAAa,EAAE,CAAC,IAA4B,EAAE,EAAE;QAC9C,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;QAEnD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,WAAW,GAAG;;;EAGpB,QAAQ;CACT,CAAC;QAEE,IAAI,OAAO,EAAE,CAAC;YACZ,WAAW,IAAI;;EAEnB,OAAO;CACR,CAAC;QACE,CAAC;QAED,IAAI,cAAc,EAAE,CAAC;YACnB,WAAW,IAAI;sBACC,cAAc;CACnC,CAAC;QACE,CAAC;QAED,WAAW,IAAI;;;;;;;;;;;;;;4JAcyI,CAAC;QAEzJ,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,WAAW;iBAClB;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { PromptDefinition } from './types.js';
2
+ /**
3
+ * Prompt for divergent exploration followed by convergence.
4
+ */
5
+ export declare const divergeConvergePrompt: PromptDefinition;
6
+ //# sourceMappingURL=diverge-converge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diverge-converge.d.ts","sourceRoot":"","sources":["../../src/prompts/diverge-converge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,gBAsFnC,CAAC"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Prompt for divergent exploration followed by convergence.
3
+ */
4
+ export const divergeConvergePrompt = {
5
+ name: 'diverge_converge',
6
+ description: 'Structure divergent thinking (explore many options) followed by convergence (evaluate and select). Maximizes creative exploration before narrowing down.',
7
+ arguments: [
8
+ {
9
+ name: 'challenge',
10
+ description: 'The problem or challenge to solve',
11
+ required: true,
12
+ },
13
+ {
14
+ name: 'width',
15
+ description: 'Exploration width: "wild" for creative/unconventional, "focused" for practical',
16
+ required: false,
17
+ },
18
+ {
19
+ name: 'convergence_criteria',
20
+ description: 'What makes a solution "good" - criteria for evaluating options',
21
+ required: false,
22
+ },
23
+ ],
24
+ buildMessages: (args) => {
25
+ const { challenge, width, convergence_criteria } = args;
26
+ if (!challenge) {
27
+ throw new Error('challenge argument is required');
28
+ }
29
+ const explorationMode = width || 'balanced';
30
+ const criteria = convergence_criteria || 'feasibility, impact, and effort required';
31
+ let messageText = `Let's use divergent-then-convergent thinking:
32
+
33
+ **CHALLENGE:**
34
+ ${challenge}
35
+
36
+ **EXPLORATION MODE:** ${explorationMode}
37
+ **SUCCESS CRITERIA:** ${criteria}
38
+
39
+ ---
40
+
41
+ ## PHASE 1: DIVERGE
42
+
43
+ Each LLM should propose 2-3 **substantially DIFFERENT** approaches. The goal is diversity, not agreement.
44
+
45
+ Guidelines:
46
+ - Maximize variety in your proposals
47
+ - Include at least one unconventional or surprising idea
48
+ - Don't self-censor "crazy" ideas yet
49
+ - Brief descriptions are fine - we'll evaluate later
50
+ `;
51
+ if (explorationMode === 'wild') {
52
+ messageText += `- Push boundaries - what would you suggest if there were no constraints?
53
+ `;
54
+ }
55
+ else if (explorationMode === 'focused') {
56
+ messageText += `- Stay practical - focus on implementable solutions
57
+ `;
58
+ }
59
+ messageText += `
60
+ ---
61
+
62
+ ## PHASE 2: CONVERGE
63
+
64
+ After all options are on the table, evaluate them against the success criteria:
65
+
66
+ 1. **Quick assessment** of each option against: ${criteria}
67
+ 2. **Identify top 2-3 candidates** that best meet the criteria
68
+ 3. **Hybrid opportunities** - can elements from different approaches be combined?
69
+ 4. **Recommendation** - which approach (or combination) should we pursue?
70
+
71
+ ---
72
+
73
+ Start with Phase 1 - generate diverse options first, then we'll converge.`;
74
+ return [
75
+ {
76
+ role: 'user',
77
+ content: {
78
+ type: 'text',
79
+ text: messageText,
80
+ },
81
+ },
82
+ ];
83
+ },
84
+ };
85
+ //# sourceMappingURL=diverge-converge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diverge-converge.js","sour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AC"}
@@ -0,0 +1,22 @@
1
+ import { Prompt, GetPromptResult } from '@modelcontextprotocol/sdk/types.js';
2
+ import { PromptDefinition } from './types.js';
3
+ /**
4
+ * Registry of all available prompts.
5
+ */
6
+ export declare const PROMPTS: Record<string, PromptDefinition>;
7
+ /**
8
+ * Get all available prompts (without buildMessages function).
9
+ * Used for prompts/list handler.
10
+ */
11
+ export declare function getPrompts(): Prompt[];
12
+ /**
13
+ * Get a specific prompt with generated messages.
14
+ * Used for prompts/get handler.
15
+ *
16
+ * @param name - The prompt name
17
+ * @param args - Arguments to pass to the prompt
18
+ * @returns GetPromptResult with description and messages
19
+ * @throws Error if prompt not found or required arguments missing
20
+ */
21
+ export declare function getPrompt(name: string, args: Record<string, string>): GetPromptResult;
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAY9C;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CASpD,CAAC;AAEF;;;GAGG;AACH,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAErC;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,eAAe,CAkBrF"}
@@ -0,0 +1,57 @@
1
+ // Import all prompt definitions
2
+ import { perspectivesPrompt } from './perspectives.js';
3
+ import { assumptionsPrompt } from './assumptions.js';
4
+ import { blindspotsPrompt } from './blindspots.js';
5
+ import { tradeoffsPrompt } from './tradeoffs.js';
6
+ import { redTeamPrompt } from './red-team.js';
7
+ import { reframePrompt } from './reframe.js';
8
+ import { architecturePrompt } from './architecture.js';
9
+ import { divergeConvergePrompt } from './diverge-converge.js';
10
+ /**
11
+ * Registry of all available prompts.
12
+ */
13
+ export const PROMPTS = {
14
+ perspectives: perspectivesPrompt,
15
+ assumptions: assumptionsPrompt,
16
+ blindspots: blindspotsPrompt,
17
+ tradeoffs: tradeoffsPrompt,
18
+ red_team: redTeamPrompt,
19
+ reframe: reframePrompt,
20
+ architecture: architecturePrompt,
21
+ diverge_converge: divergeConvergePrompt,
22
+ };
23
+ /**
24
+ * Get all available prompts (without buildMessages function).
25
+ * Used for prompts/list handler.
26
+ */
27
+ export function getPrompts() {
28
+ return Object.values(PROMPTS).map(({ buildMessages: _, ...prompt }) => prompt);
29
+ }
30
+ /**
31
+ * Get a specific prompt with generated messages.
32
+ * Used for prompts/get handler.
33
+ *
34
+ * @param name - The prompt name
35
+ * @param args - Arguments to pass to the prompt
36
+ * @returns GetPromptResult with description and messages
37
+ * @throws Error if prompt not found or required arguments missing
38
+ */
39
+ export function getPrompt(name, args) {
40
+ const prompt = PROMPTS[name];
41
+ if (!prompt) {
42
+ throw new Error(`Unknown prompt: ${name}`);
43
+ }
44
+ try {
45
+ const messages = prompt.buildMessages(args);
46
+ return {
47
+ description: prompt.description,
48
+ messages,
49
+ };
50
+ }
51
+ catch (error) {
52
+ // Re-throw with more context
53
+ const errorMessage = error instanceof Error ? error.message : String(error);
54
+ throw new Error(`Failed to build prompt "${name}": ${errorMessage}`);
55
+ }
56
+ }
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAGA,gCAAgC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,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C,KAAK,CAAC,CAAC;QAC5E,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,MAAM,YAAY,EAAE,CAAC,CAAC;IACvE,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { PromptDefinition } from './types.js';
2
+ /**
3
+ * Multi-angle analysis prompt that assigns different analytical lenses
4
+ * to each LLM for comprehensive analysis.
5
+ */
6
+ export declare const perspectivesPrompt: PromptDefinition;
7
+ //# sourceMappingURL=perspectives.d.ts.map