@nbiish/cognitive-tools-mcp 8.9.8 → 10.0.3

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 (3) hide show
  1. package/README.md +12 -5
  2. package/build/index.js +47 -68
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -22,9 +22,9 @@
22
22
  ◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
23
23
  </div>
24
24
 
25
- Revolutionary MCP server with Enhanced 2-Round, 6-Stage Cognitive Deliberation Framework (v8.9.6). The `deliberate` tool implements an **LLM-guided cognitive enhancement framework** that prompts LLMs to evaluate and select from **15 modern cognitive techniques** using a **0.00-0.99 scoring system** with **≥1.53 threshold rule** - accepting only `input` and `context` parameters. *(Integration guidelines in [`latest.md`](latest.md) are licensed under [LICENSE](LICENSE).)*
25
+ Revolutionary MCP server with Enhanced 2-Round, 6-Stage Cognitive Deliberation Framework (v10.0.2). The `deliberate` tool implements an **LLM-guided cognitive enhancement framework** that prompts LLMs to evaluate and select from **15 modern cognitive techniques** using a **0.00-0.99 scoring system** with **≥1.53 threshold rule** - accepting only `input` and `context` parameters. *(Integration guidelines in [`latest.md`](latest.md) are licensed under [LICENSE](LICENSE).)*
26
26
 
27
- **🚀 MAJOR BREAKTHROUGH (v8.9.6):** Complete architectural transformation from hardcoded `CognitiveDeliberationEngine` to LLM-guided `DeliberationEngine`. The tool now functions as a **cognitive framework enhancer** that prompts LLMs to evaluate techniques themselves rather than providing pre-calculated scores, enabling true adaptive reasoning.
27
+ **🚀 MAJOR UPDATE (v10.0.2):** Fixed critical variable reference bug that was causing "ReferenceError: prompt is not defined" when using the deliberation tool. The tool now properly references the `input` parameter throughout the framework, ensuring reliable operation for all LLM implementations without input restrictions.
28
28
 
29
29
  Known as:
30
30
  - Anishinaabemowin: [`@nbiish/gikendaasowin-aabajichiganan-mcp`](https://www.npmjs.com/package/@nbiish/gikendaasowin-aabajichiganan-mcp)
@@ -40,7 +40,7 @@ Both packages are maintained in parallel and receive the same updates. You can u
40
40
 
41
41
  ## ᐴ REPOSITORY STRUCTURE ᔔ [MAZINAAZIWIN] ◈──◆──◇──◆──◈
42
42
 
43
- Current repository structure (v8.9.6):
43
+ Current repository structure (v10.0.2):
44
44
 
45
45
  ```text
46
46
  .
@@ -78,9 +78,16 @@ Current repository structure (v8.9.6):
78
78
 
79
79
  ## ᐴ GASHKITOONAN ᔔ [ENHANCED CAPABILITIES] ◈──◆──◇──◆──◈
80
80
 
81
- ### 🚀 Revolutionary LLM-Guided Cognitive Framework (v8.9.6)
81
+ ### 🚀 Revolutionary LLM-Guided Cognitive Framework (v10.0.2)
82
82
 
83
- **NEW IN v8.9.6: COMPLETE ARCHITECTURAL TRANSFORMATION**
83
+ **FIXED IN v10.0.2: CRITICAL VARIABLE REFERENCE BUG**
84
+
85
+ - **Critical Bug Fix:** Resolved "ReferenceError: prompt is not defined" error that prevented LLM usage
86
+ - **Proper Parameter Usage:** Tool now correctly references the `input` parameter throughout the deliberation framework
87
+ - **Enhanced Reliability:** No more runtime errors when LLMs call the deliberation tool
88
+ - **Unrestricted Usage:** LLMs can now use this MCP tool without any input restrictions or failures
89
+
90
+ **Core Framework Features (Maintained from v8.9.6):**
84
91
 
85
92
  - **LLM-Guided Evaluation:** Tool prompts LLMs to evaluate cognitive techniques rather than providing hardcoded scores
86
93
  - **True Adaptive Reasoning:** No pre-calculated evaluations - LLMs determine optimal strategies dynamically
package/build/index.js CHANGED
@@ -2,81 +2,71 @@
2
2
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
- // Modern prompting strategies from modern-prompting.mdc
5
+ // Compressed cognitive strategies from modern-prompting research
6
6
  const PROMPTING_STRATEGIES = {
7
+ "Chain of Draft (CoD)": {
8
+ description: "Concise reasoning drafts ≤5 words/step. Essential calculations only. Abstract verbose details."
9
+ },
7
10
  "Cache-Augmented Reasoning + ReAct": {
8
- description: "Interleave internal knowledge activation with reasoning/action cycles. Preload all relevant context into working memory. Keep rationale concise (≤ 8 bullets). Synthesize knowledge from multiple internal sources. Progressive knowledge building through iterative refinement.",
9
- type: "primary"
11
+ description: "Interleave knowledge activation with reasoning cycles. Keep rationale concise (≤8 bullets). Progressive knowledge building."
10
12
  },
11
13
  "Self-Consistency": {
12
- description: "Generate 3 short reasoning drafts in parallel. Return most consistent answer only. Use for ambiguous or high-stakes decisions.",
13
- type: "primary"
14
+ description: "Generate 3 reasoning drafts in parallel. Return most consistent answer for high-stakes decisions."
14
15
  },
15
16
  "PAL (Program-Aided Language)": {
16
- description: "Generate executable code for computational tasks. Include result + minimal rationale only. Prefix with '# PoT offload' comment.",
17
- type: "primary"
17
+ description: "Generate executable code for computational tasks. Include result + minimal rationale. Prefix '# PoT offload'."
18
18
  },
19
19
  "Reflexion": {
20
- description: "Single critique and revision cycle. Use when confidence < 0.7. Avoid verbose chain-of-thought exposure.",
21
- type: "primary"
20
+ description: "Single critique and revision cycle. Use when confidence < 0.7. Avoid verbose chain-of-thought exposure."
22
21
  },
23
22
  "Context-Compression": {
24
- description: "Apply when context exceeds budget. Use LLMLingua/LongLLMLingua compression. Prefer Minimal-CoT and bounded ToT-lite.",
25
- type: "primary"
23
+ description: "LLMLingua compression when context exceeds budget. Prefer Minimal-CoT and bounded ToT-lite."
26
24
  },
27
25
  "ToT-lite (Tree of Thoughts)": {
28
- description: "Bounded breadth/depth exploration. Use for complex problem decomposition. Limited branching to maintain efficiency.",
29
- type: "primary"
26
+ description: "Bounded breadth/depth exploration. Limited branching for complex problem decomposition efficiency."
27
+ },
28
+ "Metacognitive Prompting (MP)": {
29
+ description: "5-stage introspective reasoning: understand → judge → evaluate → decide → assess confidence. Human-like cognition."
30
30
  },
31
31
  "Automated Prompt Optimization (APO)": {
32
- description: "Autonomously refine and improve prompts based on performance feedback. Use techniques like Expert Prompting or iterative refinement to enhance clarity and effectiveness. Reduces manual prompt engineering effort and improves task outcomes.",
33
- type: "advanced"
32
+ description: "Autonomously refine prompts via performance feedback. Expert prompting + iterative refinement. Reduces manual effort."
34
33
  },
35
34
  "Reflexive Analysis": {
36
- description: "Embed ethical, legal, and cultural considerations directly into the reasoning process. Explicitly evaluate prompts and responses against project-specific guidelines (e.g., Indigenous Data Sovereignty principles). Ensures responsible and contextually-aware AI behavior.",
37
- type: "advanced"
35
+ description: "Embed ethical/legal/cultural considerations. Evaluate against project guidelines. Indigenous Data Sovereignty aware."
38
36
  },
39
37
  "Progressive-Hint Prompting (PHP)": {
40
- description: "Use previously generated outputs as contextual hints. Iterative refinement toward optimal solutions. Multi-turn interaction with cumulative knowledge building. Automatic guidance toward correct reasoning paths.",
41
- type: "advanced"
38
+ description: "Use previous outputs as contextual hints. Multi-turn interaction with cumulative knowledge building."
42
39
  },
43
40
  "Cache-Augmented Generation (CAG)": {
44
- description: "Preload all relevant context into working memory. Eliminate real-time retrieval dependencies. Leverage extended context capabilities of modern LLMs. Reduce latency and minimize retrieval errors.",
45
- type: "advanced"
41
+ description: "Preload relevant context into working memory. Eliminate real-time retrieval dependencies."
46
42
  },
47
43
  "Cognitive Scaffolding Prompting": {
48
- description: "Structure reasoning through metacognitive frameworks. Explicit mental model construction and validation. Progressive complexity building from simple to complex tasks. Self-monitoring and regulation of reasoning processes.",
49
- type: "advanced"
44
+ description: "Structure reasoning through metacognitive frameworks. Mental model construction + validation. Self-monitoring processes."
50
45
  },
51
46
  "Internal Knowledge Synthesis (IKS)": {
52
- description: "Generate hypothetical knowledge constructs from parametric memory. Activate latent knowledge through structured prompting. Cross-reference and validate internal knowledge consistency. Synthesize coherent responses from distributed model knowledge.",
53
- type: "advanced"
47
+ description: "Generate hypothetical knowledge constructs from parametric memory. Cross-reference internal knowledge consistency."
54
48
  },
55
49
  "Multimodal Synthesis": {
56
- description: "Process and integrate information from multiple modalities (e.g., text, images, data). Extend reasoning capabilities to include visual question answering and cross-modal analysis. Enables solutions for a broader range of complex, real-world tasks.",
57
- type: "advanced"
50
+ description: "Process text/images/data integration. Visual question answering + cross-modal analysis. Broader task solutions."
58
51
  },
59
52
  "Knowledge Synthesis Prompting (KSP)": {
60
- description: "Integrate knowledge from multiple internal domains. Fine-grained coherence validation for credibility. Essential for complex factual content generation. Cross-domain knowledge validation and integration.",
61
- type: "advanced"
53
+ description: "Integrate multiple internal domains. Fine-grained coherence validation. Cross-domain knowledge integration."
62
54
  },
63
55
  "Prompt Compression": {
64
- description: "LLMLingua for token budget management. Preserve semantic content while reducing length. Maintain reasoning quality under constraints.",
65
- type: "advanced"
56
+ description: "LLMLingua for token budget management. Preserve semantic content while reducing length constraints."
66
57
  }
67
58
  };
68
59
  class DeliberationEngine {
69
60
  deliberate(input, context) {
70
- // Generate the deliberation framework that prompts the LLM to evaluate strategies itself
71
- const availableStrategies = Object.entries(PROMPTING_STRATEGIES)
72
- .map(([name, strategy]) => `**${name}** (${strategy.type}): ${strategy.description}`)
61
+ // /// [6-stage self-prompting framework for LLMs with unified input]
62
+ const strategiesList = Object.entries(PROMPTING_STRATEGIES)
63
+ .map(([name, strategy]) => `**${name}:** ${strategy.description}`)
73
64
  .join('\n');
74
- return `DELIBERATION: You are now entering a 6-stage cognitive deliberation process. Please work through each stage systematically:
65
+ return `You are now entering a 6-stage cognitive deliberation process. Please work through each stage systematically:
75
66
 
76
67
  ## Stage 1: Scientific Investigation
77
- **Your Task:** Analyze the following input using scientific methodology:
78
- - **Input:** "${input}"
79
- ${context ? `- **Context:** "${context}"` : ''}
68
+ **Your Task:** Analyze the following prompt using scientific methodology:
69
+ - **Prompt:** "${input}"
80
70
 
81
71
  **Please identify:**
82
72
  1. Core question/problem
@@ -87,7 +77,7 @@ ${context ? `- **Context:** "${context}"` : ''}
87
77
  ## Stage 2: OOReD Process - Strategy Evaluation
88
78
  **Orient Stage:** You have access to these cognitive techniques:
89
79
 
90
- ${availableStrategies}
80
+ ${strategiesList}
91
81
 
92
82
  **Your Evaluation Task:**
93
83
  For each technique, consider:
@@ -98,17 +88,14 @@ For each technique, consider:
98
88
  **Selection Rule:** Choose techniques with total scores ≥1.53 for combined effectiveness
99
89
 
100
90
  ## Stage 3: Critical Thinking Framework
101
- Apply these questions:
102
- 1. What is the purpose of my thinking?
103
- 2. What precise question am I trying to answer?
104
- 3. Within what context am I operating?
105
- 4. What information do I need to gather?
106
- 5. How reliable is this information?
107
- 6. What concepts are relevant to my thinking?
108
- 7. What conclusions can I draw?
109
- 8. What assumptions am I making?
110
- 9. What are the implications?
111
- 10. What are the consequences?
91
+ Apply rapid validation checks:
92
+ 1. **Purpose:** What outcome am I optimizing for?
93
+ 2. **Question:** What specific problem needs solving?
94
+ 3. **Context:** What constraints or requirements apply?
95
+ 4. **Evidence:** What facts do I need vs. what do I have?
96
+ 5. **Reliability:** How confident am I in my information sources?
97
+ 6. **Assumptions:** What am I taking for granted that could be wrong?
98
+ 7. **Implications:** What happens if I'm right? What if I'm wrong?
112
99
 
113
100
  ## Stage 4 & 5: Review Cycles
114
101
  - Review your strategy selections against the ≥1.53 threshold
@@ -118,35 +105,27 @@ Apply these questions:
118
105
  ## Stage 6: Final Action Synthesis
119
106
  **Present your analysis in this format:**
120
107
 
121
- **Selected Cognitive Technique(s):** [List techniques scoring 1.53]
108
+ **DELIBERATION:** [Your thought process through stages 1-5]
109
+
110
+ **SELECTED TOOLS:** [List of tools you estimate are needed to accomplish the task]
122
111
 
123
112
  **Strategy Evaluation Results (0.00-0.99 scale):**
124
113
  [Show your evaluations like:]
125
114
  - TechniqueName: solution=X.XX, efficiency=Y.YY, total=Z.ZZ ✓ (if ≥1.53)
126
115
 
127
- **Estimated Tools Needed:** [1-8 tools for implementation]
128
-
129
- **Recommended Pair Programmer Tools:**
130
- - websearch (for current information and validation)
131
- - file manipulation tools (for code and document management)
132
- - code analysis tools (for computational problem solving)
133
- - context synthesis tools (for information integration)
134
- - debugging and testing tools (for solution verification)
135
-
136
- Return to 'deliberate' after using the following tools: [Your estimated tool count]
116
+ **Selected Cognitive Technique(s):** [List techniques scoring ≥1.53]
137
117
 
138
- # To accomplish Task:
139
- [Describe the task using your selected cognitive approach]
118
+ **Estimated Tools Needed:** [1-8 tools for implementation]
140
119
 
141
120
  ---
142
121
 
143
122
  **Now:** Apply your selected cognitive technique(s) to actually solve the original problem "${input}" using your enhanced reasoning framework.`;
144
123
  }
145
124
  }
146
- // MCP Server setup
125
+ // MCP Server setup with 6-stage cognitive deliberation framework
147
126
  const server = new Server({
148
127
  name: "gikendaasowin-aabajichiganan-mcp",
149
- version: "8.9.4",
128
+ version: "10.0.2", // /// [6-stage deliberation with 0.00-0.99 scoring system + prompt variable fix]
150
129
  }, {
151
130
  capabilities: {
152
131
  tools: {},
@@ -159,7 +138,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
159
138
  tools: [
160
139
  {
161
140
  name: "deliberate",
162
- description: "Advanced cognitive deliberation framework implementing 6-stage processing (Scientific Investigation → OOReD → Critical Thinking → ReviewsAction) with dynamic prompting strategy evaluation. Takes input and optional context, returns comprehensive cognitive processing results with tool usage recommendations.",
141
+ description: "Advanced cognitive deliberation framework implementing 6-stage processing (Scientific Investigation → OOReD → Critical Thinking → ReviewOOReD → Act) with dynamic prompting strategy evaluation. Takes a prompt combining the question/problem and any context, returns comprehensive cognitive processing results with tool usage recommendations.",
163
142
  inputSchema: {
164
143
  type: "object",
165
144
  properties: {
@@ -203,11 +182,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
203
182
  }
204
183
  throw new Error(`Unknown tool: ${name}`);
205
184
  });
206
- // Start the server
185
+ // Start the server with 6-stage cognitive deliberation framework
207
186
  async function main() {
208
187
  const transport = new StdioServerTransport();
209
188
  await server.connect(transport);
210
- console.error("Gikendaasowin Aabajichiganan MCP server running on stdio");
189
+ console.error("Gikendaasowin Aabajichiganan MCP server running with 6-stage cognitive deliberation framework");
211
190
  }
212
191
  main().catch((error) => {
213
192
  console.error("Fatal error in main():", error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbiish/cognitive-tools-mcp",
3
- "version": "8.9.8",
3
+ "version": "10.0.3",
4
4
  "description": "Revolutionary Single-Tool-Call MCP server with Enhanced 6-Stage Cognitive Deliberation Framework combining Scientific Investigation, OOReD, and Critical Thinking methodologies with DYNAMIC prompting strategy evaluation system (CoT, ToT, Self-Consistency, Meta-Prompting, Role-Based).",
5
5
  "private": false,
6
6
  "type": "module",