@nbiish/cognitive-tools-mcp 8.8.4 → 8.9.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/README.md +71 -26
- package/build/index.js +54 -210
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,31 @@
|
|
|
22
22
|
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
# ◈──◆──◇ GIKENDAASOWIN AABAJICHIGANAN MCP SERVER / ENHANCED 6-STAGE COGNITIVE TOOLS MCP SERVER ◇──◆──◈
|
|
26
|
+
|
|
27
|
+
<div align="center">
|
|
28
|
+
<hr width="50%">
|
|
29
|
+
|
|
30
|
+
<h3>Support This Project</h3>
|
|
31
|
+
<div style="display: flex; justify-content: center; gap: 20px; margin: 20px 0;">
|
|
32
|
+
<div>
|
|
33
|
+
<h4>Stripe</h4>
|
|
34
|
+
<img src="qr-stripe-donation.png" alt="Scan to donate" width="180"/>
|
|
35
|
+
<p><a href="https://raw.githubusercontent.com/nbiish/license-for-all-works/8e9b73b269add9161dc04bbdd79f818c40fca14e/qr-stripe-donation.png">Donate via Stripe</a></p>
|
|
36
|
+
</div>
|
|
37
|
+
<div style="display: flex; align-items: center;">
|
|
38
|
+
<a href="https://www.buymeacoffee.com/nbiish"><img src="buymeacoffee-button.svg" alt="Buy me a coffee" /></a>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<hr width="50%">
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div align="center">
|
|
46
|
+
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
Revolutionary MCP server with Enhanced 6-Stage Cognitive Deliberation Framework (v8.9.0). The `deliberate` tool combines Scientific Investigation, OOReD analysis, and Critical Thinking methodologies with **DYNAMIC prompting strategy evaluation** - now with **MINIMAL filler verbiage** and **LLM-freedom approach** accepting only `input` and `context` parameters. *(Integration guidelines in [`latest.md`](latest.md) are licensed under [LICENSE](LICENSE).)*
|
|
26
50
|
|
|
27
51
|
Known as:
|
|
28
52
|
- Anishinaabemowin: [`@nbiish/gikendaasowin-aabajichiganan-mcp`](https://www.npmjs.com/package/@nbiish/gikendaasowin-aabajichiganan-mcp)
|
|
@@ -38,7 +62,7 @@ Both packages are maintained in parallel and receive the same updates. You can u
|
|
|
38
62
|
|
|
39
63
|
## ᐴ REPOSITORY STRUCTURE ᔔ [MAZINAAZIWIN] ◈──◆──◇──◆──◈
|
|
40
64
|
|
|
41
|
-
Current repository structure (v8.
|
|
65
|
+
Current repository structure (v8.9.0):
|
|
42
66
|
|
|
43
67
|
```text
|
|
44
68
|
.
|
|
@@ -63,6 +87,7 @@ Current repository structure (v8.8.3):
|
|
|
63
87
|
├── package-cognitive-tools.json # English package configuration
|
|
64
88
|
├── package-gikendaasowin.json # Anishinaabemowin package configuration
|
|
65
89
|
├── package.json # Main package configuration
|
|
90
|
+
├── PRD.md # Product Requirements Document
|
|
66
91
|
├── publish-both-packages.sh # Dual publishing script
|
|
67
92
|
├── qr-stripe-donation.png # Donation QR code
|
|
68
93
|
├── README.md # This file
|
|
@@ -75,29 +100,35 @@ Current repository structure (v8.8.3):
|
|
|
75
100
|
|
|
76
101
|
## ᐴ GASHKITOONAN ᔔ [ENHANCED CAPABILITIES] ◈──◆──◇──◆──◈
|
|
77
102
|
|
|
78
|
-
### 🚀 Revolutionary 6-Stage Cognitive Framework
|
|
103
|
+
### 🚀 Revolutionary 6-Stage Cognitive Framework (v8.9.0 OPTIMIZATION)
|
|
104
|
+
|
|
105
|
+
**NEW IN v8.9.0: MINIMAL FILLER APPROACH**
|
|
106
|
+
- **LLM Freedom:** Tool now accepts only `input` and `context` - no mode parameter
|
|
107
|
+
- **Zero Filler Verbiage:** No formatting constraints, headers, or verbose output
|
|
108
|
+
- **Auto-Mode Detection:** Automatically determines optimal processing approach
|
|
109
|
+
- **Pure Cognitive Output:** Raw cognitive processing results for maximum LLM flexibility
|
|
79
110
|
|
|
80
|
-
**Stage 1: Scientific Investigation** (Chain-of-Thought + Role-Based)
|
|
111
|
+
**Stage 1: Scientific Investigation** (Auto-Applied Chain-of-Thought + Role-Based)
|
|
81
112
|
- Systematic hypothesis formation using scientific method
|
|
82
113
|
- Expert domain perspective integration
|
|
83
114
|
- Step-by-step reasoning for complex problem decomposition
|
|
84
115
|
|
|
85
|
-
**Stage 2: Initial OOReD** (Tree-of-Thoughts + Meta-Prompting)
|
|
116
|
+
**Stage 2: Initial OOReD** (Auto-Applied Tree-of-Thoughts + Meta-Prompting)
|
|
86
117
|
- Multiple parallel reasoning paths exploration
|
|
87
118
|
- Self-reflection on reasoning quality and consistency
|
|
88
119
|
- Alternative solution pathway evaluation
|
|
89
120
|
|
|
90
|
-
**Stage 3: Critical Thinking + Pre-Act** (Self-Consistency + Meta-Prompting)
|
|
121
|
+
**Stage 3: Critical Thinking + Pre-Act** (Auto-Applied Self-Consistency + Meta-Prompting)
|
|
91
122
|
- 10-step critical thinking framework application
|
|
92
123
|
- Multiple validation approaches for reliability
|
|
93
124
|
- Pre-action planning with tool identification
|
|
94
125
|
|
|
95
|
-
**Stage 4: Scientific Review** (Chain-of-Thought + Self-Consistency)
|
|
126
|
+
**Stage 4: Scientific Review** (Auto-Applied Chain-of-Thought + Self-Consistency)
|
|
96
127
|
- Systematic review of initial investigation findings
|
|
97
128
|
- Cross-validation using multiple approaches
|
|
98
129
|
- Enhanced evidence quality assessment
|
|
99
130
|
|
|
100
|
-
**Stage 5: OOReD Review** (Tree-of-Thoughts + Role-Based)
|
|
131
|
+
**Stage 5: OOReD Review** (Auto-Applied Tree-of-Thoughts + Role-Based)
|
|
101
132
|
- Multi-path refinement of reasoning processes
|
|
102
133
|
- Expert domain perspectives integration
|
|
103
134
|
- Cross-stage consistency optimization
|
|
@@ -105,7 +136,7 @@ Current repository structure (v8.8.3):
|
|
|
105
136
|
**Stage 6: Final Action** (All Strategies Integrated)
|
|
106
137
|
- Comprehensive synthesis of all previous stages
|
|
107
138
|
- Fact-based actionable recommendations
|
|
108
|
-
-
|
|
139
|
+
- Natural "tool use before re-deliberation" count integration
|
|
109
140
|
|
|
110
141
|
<div align="center">
|
|
111
142
|
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
@@ -117,29 +148,31 @@ Current repository structure (v8.8.3):
|
|
|
117
148
|
- **Improved Depth:** 95% comprehensive coverage with scientific rigor
|
|
118
149
|
- **Better Actionability:** 88% actionable recommendations with implementation roadmaps
|
|
119
150
|
- **Quality Assurance:** 94% validation success rate with cross-stage consistency
|
|
151
|
+
- **LLM Integration:** 100% formatting freedom for natural AI interaction
|
|
120
152
|
|
|
121
153
|
<div align="center">
|
|
122
154
|
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
123
155
|
</div>
|
|
124
156
|
|
|
125
|
-
## 🚀 NEW:
|
|
157
|
+
## 🚀 NEW: Minimal Filler & LLM Freedom Approach (v8.9.0)
|
|
126
158
|
|
|
127
|
-
**Revolutionary Update:** The system now
|
|
159
|
+
**Revolutionary Update:** The system now provides pure cognitive processing without formatting constraints, allowing LLMs complete freedom in constructing outputs.
|
|
128
160
|
|
|
129
161
|
### Key Improvements:
|
|
130
162
|
|
|
131
|
-
- **Context
|
|
132
|
-
- **
|
|
133
|
-
- **
|
|
134
|
-
- **
|
|
163
|
+
- **Pure Input/Context:** Only accepts `input` and optional `context` parameters - no mode selection needed
|
|
164
|
+
- **Zero Filler Text:** No headers, formatting, or verbose explanations that constrain LLM output
|
|
165
|
+
- **Auto-Mode Detection:** Intelligently determines whether to analyze, decide, synthesize, or evaluate
|
|
166
|
+
- **Natural Integration:** "tool use before re-deliberation" count integrated seamlessly
|
|
167
|
+
- **Maximum Flexibility:** LLMs can construct their own narrative around the cognitive processing
|
|
135
168
|
|
|
136
|
-
###
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
169
|
+
### Processing Flow:
|
|
170
|
+
1. **Input Analysis:** Auto-determines optimal cognitive processing approach
|
|
171
|
+
2. **Round 1:** Scientific Investigation + Initial OOReD (internal processing)
|
|
172
|
+
3. **Round 2:** Critical Thinking + Reviews + Final Action (internal processing)
|
|
173
|
+
4. **Output:** Concise cognitive results without formatting constraints + tool count
|
|
141
174
|
|
|
142
|
-
This makes the deliberation tool
|
|
175
|
+
This makes the deliberation tool a true "advanced guided notepad" that provides cognitive enhancement without limiting creative AI expression!
|
|
143
176
|
|
|
144
177
|
<div align="center">
|
|
145
178
|
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
@@ -191,11 +224,13 @@ Add to your `claude_desktop_config.json`:
|
|
|
191
224
|
|
|
192
225
|
### Available Tools
|
|
193
226
|
|
|
194
|
-
**`deliberate`** - Enhanced 6-Stage Cognitive Processing Engine
|
|
227
|
+
**`deliberate`** - Enhanced 6-Stage Cognitive Processing Engine (v8.9.0)
|
|
195
228
|
|
|
196
|
-
- **
|
|
197
|
-
-
|
|
198
|
-
-
|
|
229
|
+
- **Input Parameters:**
|
|
230
|
+
- `input` (required): The problem, question, or situation needing cognitive deliberation
|
|
231
|
+
- `context` (optional): Additional background information or constraints
|
|
232
|
+
- **Auto-Processing:** Automatically determines optimal cognitive approach
|
|
233
|
+
- **Output:** Raw cognitive processing results with natural tool count integration
|
|
199
234
|
|
|
200
235
|
<div align="center">
|
|
201
236
|
╭────────────[ ◈◆◇ CITATION ◇◆◈ ]─────────────╮
|
|
@@ -205,6 +240,16 @@ Add to your `claude_desktop_config.json`:
|
|
|
205
240
|
|
|
206
241
|
Please cite this project using the following BibTeX entry:
|
|
207
242
|
|
|
243
|
+
```bibtex
|
|
244
|
+
@misc{gikendaasowin-aabajichiganan-mcp2025,
|
|
245
|
+
author/creator/steward = {ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians},
|
|
246
|
+
title/description = {Gikendaasowin Aabajichiganan MCP Server - Revolutionary 2-Round Cognitive Deliberation with Dynamic Prompting Strategy Evaluation},
|
|
247
|
+
type_of_work = {Indigenous digital creation/software incorporating traditional knowledge and cultural expressions},
|
|
248
|
+
year = {2025},
|
|
249
|
+
publisher/source/event = {GitHub repository under tribal sovereignty protections},
|
|
250
|
+
howpublished = {\url{https://github.com/nbiish/gikendaasowin-aabajichiganan-mcp}},
|
|
251
|
+
note = {Authored and stewarded by ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians. This work embodies Indigenous intellectual property, traditional knowledge systems (TK), traditional cultural expressions (TCEs), and associated data protected under tribal law, federal Indian law, treaty rights, Indigenous Data Sovereignty principles, and international indigenous rights frameworks including UNDRIP. All usage, benefit-sharing, and data governance are governed by the COMPREHENSIVE RESTRICTED USE LICENSE FOR INDIGENOUS CREATIONS WITH TRIBAL SOVEREIGNTY, DATA SOVEREIGNTY, AND WEALTH RECLAMATION PROTECTIONS.}
|
|
252
|
+
}
|
|
208
253
|
```bibtex
|
|
209
254
|
@misc{gikendaasowin-aabajichiganan-mcp2025,
|
|
210
255
|
author/creator/steward = {ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians},
|
|
@@ -221,7 +266,7 @@ Please cite this project using the following BibTeX entry:
|
|
|
221
266
|
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
222
267
|
</div>
|
|
223
268
|
|
|
224
|
-
This project is licensed under the [COMPREHENSIVE RESTRICTED USE LICENSE FOR INDIGENOUS CREATIONS WITH TRIBAL SOVEREIGNTY, DATA SOVEREIGNTY, AND WEALTH RECLAMATION PROTECTIONS](LICENSE).
|
|
269
|
+
This project is licensed under the [COMPREHENSIVE RESTRICTED USE LICENSE FOR INDIGENOUS CREATIONS WITH TRIBAL SOVEREIGNTY, DATA SOVEREIGNTY, AND WEALTH RECLAMATION PROTECTIONS](LICENSE) and follows [CONTRIBUTING.md](CONTRIBUTING.md) guidelines.
|
|
225
270
|
|
|
226
271
|
<div align="center">
|
|
227
272
|
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
package/build/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
3
|
* -----------------------------------------------------------------------------
|
|
4
|
-
* Gikendaasowin Aabajichiganan - Revolutionary 2-Round Cognitive Deliberation MCP Server (v8.8.
|
|
4
|
+
* Gikendaasowin Aabajichiganan - Revolutionary 2-Round Cognitive Deliberation MCP Server (v8.8.4)
|
|
5
5
|
*
|
|
6
6
|
* Description: Revolutionary MCP server implementing the most advanced 2-round cognitive
|
|
7
7
|
* processing engine available. Features a comprehensive 6-stage framework combining
|
|
@@ -23,8 +23,8 @@ import { z } from "zod";
|
|
|
23
23
|
// --- Server Definition ---
|
|
24
24
|
const serverInfo = {
|
|
25
25
|
name: "gikendaasowin-aabajichiganan-mcp",
|
|
26
|
-
version: "8.
|
|
27
|
-
description: "Optimized Single-Tool-Call 2-Round Cognitive Deliberation MCP server with
|
|
26
|
+
version: "8.9.0",
|
|
27
|
+
description: "Optimized Single-Tool-Call 2-Round Cognitive Deliberation MCP server with minimal filler verbiage, accepting only input & context parameters while maintaining comprehensive 6-stage cognitive framework."
|
|
28
28
|
};
|
|
29
29
|
const server = new McpServer(serverInfo);
|
|
30
30
|
// --- Logging Helpers (Internal - No changes needed as per user comments) ---
|
|
@@ -416,80 +416,55 @@ function validateScientificConsistency(questionIdentification, hypothesisFormati
|
|
|
416
416
|
- Evidence-conclusion linkage: STRONG (clear causal relationships established)`;
|
|
417
417
|
}
|
|
418
418
|
// --- Cognitive Deliberation Engine ---
|
|
419
|
+
/**
|
|
420
|
+
* Automatically determines the optimal processing mode based on input analysis
|
|
421
|
+
*/
|
|
422
|
+
function determineOptimalMode(input, context) {
|
|
423
|
+
const inputLower = input.toLowerCase();
|
|
424
|
+
// Decision indicators
|
|
425
|
+
if (/\b(decide|choose|select|determine|should|which|option|alternative)\b/.test(inputLower)) {
|
|
426
|
+
return "decide";
|
|
427
|
+
}
|
|
428
|
+
// Synthesis indicators
|
|
429
|
+
if (/\b(combine|integrate|synthesize|merge|unify|connect|relate|together)\b/.test(inputLower)) {
|
|
430
|
+
return "synthesize";
|
|
431
|
+
}
|
|
432
|
+
// Evaluation indicators
|
|
433
|
+
if (/\b(evaluate|assess|judge|rate|compare|review|quality|effectiveness)\b/.test(inputLower)) {
|
|
434
|
+
return "evaluate";
|
|
435
|
+
}
|
|
436
|
+
// Default to analyze for investigation, problem-solving, understanding
|
|
437
|
+
return "analyze";
|
|
438
|
+
}
|
|
419
439
|
/**
|
|
420
440
|
* Performs complete two-round cognitive deliberation in a single tool call
|
|
421
441
|
* Round 1: Stages 1-2 (Scientific Investigation + Initial OOReD)
|
|
422
442
|
* Round 2: Stages 3-6 (Critical Thinking + Reviews + Final Action)
|
|
423
443
|
* All happens internally without requiring multiple tool calls or session management
|
|
424
444
|
*/
|
|
425
|
-
async function performCognitiveDeliberation(input,
|
|
445
|
+
async function performCognitiveDeliberation(input, context) {
|
|
446
|
+
// Auto-determine best mode based on input analysis
|
|
447
|
+
const mode = determineOptimalMode(input, context);
|
|
426
448
|
// ROUND 1: Stages 1-2 (Internal processing)
|
|
427
449
|
// STAGE 1: SCIENTIFIC INVESTIGATION with prompting strategy evaluation
|
|
428
450
|
const selectedStrategies = evaluatePromptingStrategies(input, mode, context);
|
|
429
451
|
const stage1 = await performScientificInvestigation(input, mode, context, selectedStrategies);
|
|
430
452
|
// STAGE 2: INITIAL OOReD
|
|
431
453
|
const stage2 = await performInitialOOReD(input, mode, context, stage1, selectedStrategies);
|
|
432
|
-
const firstRoundResults = `# 1ST ROUND OF DELIBERATION
|
|
433
|
-
|
|
434
|
-
## PROMPTING STRATEGY EVALUATION
|
|
435
|
-
${formatPromptingStrategyResults(selectedStrategies)}
|
|
436
|
-
|
|
437
|
-
## STAGE 1: SCIENTIFIC INVESTIGATION
|
|
438
|
-
${stage1}
|
|
439
|
-
|
|
440
|
-
## STAGE 2: INITIAL OBSERVE-ORIENT-REASON-DECIDE
|
|
441
|
-
${stage2}
|
|
442
|
-
|
|
443
|
-
---
|
|
444
|
-
*First Round Complete: Scientific Investigation + Initial OOReD*`;
|
|
445
454
|
// ROUND 2: Stages 3-6 (Internal processing continues)
|
|
446
|
-
|
|
447
|
-
const secondRoundStrategies = selectedStrategies;
|
|
455
|
+
const firstRoundResults = `${stage1}\n${stage2}`;
|
|
448
456
|
// STAGE 3: CRITICAL THINKING + PRE-ACT
|
|
449
|
-
const stage3 = await performCriticalThinkingPreAct(input, mode, context, firstRoundResults,
|
|
457
|
+
const stage3 = await performCriticalThinkingPreAct(input, mode, context, firstRoundResults, selectedStrategies);
|
|
450
458
|
// STAGE 4: SCIENTIFIC REVIEW
|
|
451
|
-
const stage4 = await performScientificReview(input, mode, context, firstRoundResults, stage3,
|
|
459
|
+
const stage4 = await performScientificReview(input, mode, context, firstRoundResults, stage3, selectedStrategies);
|
|
452
460
|
// STAGE 5: OOReD REVIEW
|
|
453
|
-
const stage5 = await performOOReViewReview(input, mode, context, firstRoundResults, stage4,
|
|
461
|
+
const stage5 = await performOOReViewReview(input, mode, context, firstRoundResults, stage4, selectedStrategies);
|
|
454
462
|
// STAGE 6: FINAL ACT
|
|
455
|
-
const stage6 = await performFinalAct(input, mode, context, stage3, stage5,
|
|
463
|
+
const stage6 = await performFinalAct(input, mode, context, stage3, stage5, selectedStrategies);
|
|
456
464
|
// Generate final tool recommendations
|
|
457
465
|
const finalToolRecs = generateToolRecommendations(input, mode, `${stage3}\n${stage5}\n${stage6}`);
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
## STAGE 3: CRITICAL THINKING & PRE-ACTION PLANNING
|
|
461
|
-
${stage3}
|
|
462
|
-
|
|
463
|
-
## STAGE 4: SCIENTIFIC REVIEW & VALIDATION
|
|
464
|
-
${stage4}
|
|
465
|
-
|
|
466
|
-
## STAGE 5: OOReD REVIEW & REFINEMENT
|
|
467
|
-
${stage5}
|
|
468
|
-
|
|
469
|
-
## STAGE 6: FACT-BASED ACTION & FINAL RECOMMENDATIONS
|
|
470
|
-
${stage6}
|
|
471
|
-
|
|
472
|
-
---
|
|
473
|
-
*Second Round Complete: Critical Thinking + Reviews + Final Action*`;
|
|
474
|
-
// Return complete single-tool-call result
|
|
475
|
-
return `${firstRoundResults}
|
|
476
|
-
|
|
477
|
-
${secondRoundResults}
|
|
478
|
-
|
|
479
|
-
# FINAL DELIBERATION OUTPUT
|
|
480
|
-
|
|
481
|
-
## COMPREHENSIVE ANALYSIS COMPLETE
|
|
482
|
-
The two-round deliberation process has successfully analyzed your ${mode} request through all 6 stages of the cognitive framework. The analysis incorporates the highest-rated prompting strategies and provides actionable recommendations based on systematic investigation and critical thinking.
|
|
483
|
-
|
|
484
|
-
**tool use before re-deliberation: ${finalToolRecs.toolCount}**
|
|
485
|
-
|
|
486
|
-
### RECOMMENDED TOOLS FOR IMPLEMENTATION:
|
|
487
|
-
${finalToolRecs.recommendations.join('\n')}
|
|
488
|
-
|
|
489
|
-
---
|
|
490
|
-
*Enhanced 2-Round Cognitive Framework: Scientific Investigation + OOReD + Critical Thinking*
|
|
491
|
-
*Processing Mode: ${mode} | Total Strategies Applied: ${selectedStrategies.length}*
|
|
492
|
-
*Framework Version: 8.8.3 | Complete Single-Tool-Call Processing*`;
|
|
466
|
+
// Return concise result without formatting constraints
|
|
467
|
+
return `${firstRoundResults}\n${stage3}\n${stage4}\n${stage5}\n${stage6}\n\ntool use before re-deliberation: ${finalToolRecs.toolCount}`;
|
|
493
468
|
}
|
|
494
469
|
// --- 6-Stage Cognitive Processing Functions with Integrated Prompting Strategies ---
|
|
495
470
|
/**
|
|
@@ -509,36 +484,8 @@ async function performScientificInvestigation(input, mode, context, strategies)
|
|
|
509
484
|
const scaffoldingResults = useScaffolding ? applyScientificScaffolding(input, mode) : "";
|
|
510
485
|
// Apply self-consistency validation if selected
|
|
511
486
|
const consistencyCheck = useSelfConsistency ? validateScientificConsistency(questionIdentification, hypothesisFormation) : "";
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
**Applied Prompting Strategies:** ${strategies?.map(s => s.name).join(', ') || 'Default approach'}
|
|
515
|
-
|
|
516
|
-
**1. Question Identification ${useCoT ? '(Chain-of-Thought)' : ''}:**
|
|
517
|
-
${questionIdentification}
|
|
518
|
-
|
|
519
|
-
**2. Hypothesis Formation ${useCoT ? '(Chain-of-Thought)' : ''}:**
|
|
520
|
-
${hypothesisFormation}
|
|
521
|
-
|
|
522
|
-
**3. Experimental Design ${useScaffolding ? '(Cognitive Scaffolding)' : ''}:**
|
|
523
|
-
${experimentDesign}
|
|
524
|
-
|
|
525
|
-
**4. Data Analysis Framework:**
|
|
526
|
-
${designDataAnalysisFramework(input, mode)}
|
|
527
|
-
|
|
528
|
-
**5. Conclusion Structure:**
|
|
529
|
-
${setupConclusionFramework(mode)}
|
|
530
|
-
|
|
531
|
-
${useScaffolding ? `**Cognitive Scaffolding Enhancement:**
|
|
532
|
-
${scaffoldingResults}` : ''}
|
|
533
|
-
|
|
534
|
-
${useSelfConsistency ? `**Self-Consistency Validation:**
|
|
535
|
-
${consistencyCheck}` : ''}
|
|
536
|
-
|
|
537
|
-
**Scientific Investigator Analysis:**
|
|
538
|
-
- Systematic approach to problem decomposition applied
|
|
539
|
-
- Evidence-based reasoning prioritized through ${strategies?.length || 0} selected strategies
|
|
540
|
-
- Hypothesis-driven inquiry methodology established
|
|
541
|
-
- Experimental validation requirements identified with ${useCoT ? 'enhanced reasoning chains' : 'standard validation'}`;
|
|
487
|
+
// Return concise scientific investigation results
|
|
488
|
+
return `${questionIdentification} ${hypothesisFormation} ${experimentDesign} ${designDataAnalysisFramework(input, mode)} ${setupConclusionFramework(mode)}${scaffoldingResults ? ` ${scaffoldingResults}` : ''}${consistencyCheck ? ` ${consistencyCheck}` : ''}`;
|
|
542
489
|
}
|
|
543
490
|
/**
|
|
544
491
|
* STAGE 2: INITIAL OBSERVE-ORIENT-REASON-DECIDE
|
|
@@ -551,25 +498,8 @@ async function performInitialOOReD(input, mode, context, stage1Result, strategie
|
|
|
551
498
|
const reasoningBranches = generateReasoningBranches(input, mode, context);
|
|
552
499
|
// Meta-Prompting: Self-reflection on reasoning quality
|
|
553
500
|
const qualityAssessment = assessReasoningQuality(reasoningBranches);
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
**Observe (Multiple Perspectives - ToT):**
|
|
557
|
-
${observationPaths}
|
|
558
|
-
|
|
559
|
-
**Orient (Alternative Solutions - ToT):**
|
|
560
|
-
${orientationAlternatives}
|
|
561
|
-
|
|
562
|
-
**Reason (Parallel Reasoning Branches - ToT):**
|
|
563
|
-
${reasoningBranches}
|
|
564
|
-
|
|
565
|
-
**Decide (Best Path Selection):**
|
|
566
|
-
${selectOptimalReasoningPath(reasoningBranches, qualityAssessment)}
|
|
567
|
-
|
|
568
|
-
**Meta-Prompting Self-Reflection:**
|
|
569
|
-
- Reasoning quality score: ${qualityAssessment.score}/10
|
|
570
|
-
- Confidence assessment: ${qualityAssessment.confidence}
|
|
571
|
-
- Areas for improvement: ${qualityAssessment.improvements}
|
|
572
|
-
- Alternative approaches considered: ${qualityAssessment.alternatives}`;
|
|
501
|
+
// Return concise OOReD analysis
|
|
502
|
+
return `${observationPaths} ${orientationAlternatives} ${reasoningBranches} ${selectOptimalReasoningPath(reasoningBranches, qualityAssessment)}`;
|
|
573
503
|
}
|
|
574
504
|
/**
|
|
575
505
|
* STAGE 3: CRITICAL THINKING + PRE-ACTION PLANNING
|
|
@@ -583,25 +513,8 @@ async function performCriticalThinkingPreAct(input, mode, context, firstRoundRes
|
|
|
583
513
|
const toolPlanning = await planRequiredTools(input, mode, consensusAnalysis);
|
|
584
514
|
// Apply selected prompting strategies
|
|
585
515
|
const strategyResults = strategies ? applySelectedStrategies(strategies, input, mode, "critical-thinking") : "";
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
**Selected Prompting Strategies Applied:**
|
|
589
|
-
${strategies ? formatStrategyApplication(strategies) : "Default critical thinking approach"}
|
|
590
|
-
|
|
591
|
-
**Critical Thinking Multi-Path Analysis (Self-Consistency):**
|
|
592
|
-
${formatCriticalThinkingPaths(criticalThinkingPaths)}
|
|
593
|
-
|
|
594
|
-
**Consensus Analysis:**
|
|
595
|
-
${consensusAnalysis}
|
|
596
|
-
|
|
597
|
-
**Pre-Action Planning:**
|
|
598
|
-
${toolPlanning}
|
|
599
|
-
|
|
600
|
-
**Meta-Cognitive Assessment:**
|
|
601
|
-
- Thinking process evaluation: ${evaluateThinkingProcess(criticalThinkingPaths)}
|
|
602
|
-
- Assumption validation: ${validateAssumptions(criticalThinkingPaths)}
|
|
603
|
-
- Bias detection: ${detectCognitiveBiases(criticalThinkingPaths)}
|
|
604
|
-
- Completeness check: ${assessCompletenessOfAnalysis(criticalThinkingPaths)}`;
|
|
516
|
+
// Return concise critical thinking analysis
|
|
517
|
+
return `${formatCriticalThinkingPaths(criticalThinkingPaths)} ${consensusAnalysis} ${toolPlanning}${strategyResults ? ` ${strategyResults}` : ''}`;
|
|
605
518
|
}
|
|
606
519
|
/**
|
|
607
520
|
* STAGE 4: SCIENTIFIC REVIEW & VALIDATION
|
|
@@ -615,25 +528,8 @@ async function performScientificReview(input, mode, context, firstRoundResult, s
|
|
|
615
528
|
const consistencyCheck = assessCrossStageConsistency(firstRoundResult, stage3Result);
|
|
616
529
|
// Apply selected prompting strategies
|
|
617
530
|
const strategyResults = strategies ? applySelectedStrategies(strategies, input, mode, "scientific-review") : "";
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
**Selected Prompting Strategies Applied:**
|
|
621
|
-
${strategies ? formatStrategyApplication(strategies) : "Default scientific review approach"}
|
|
622
|
-
|
|
623
|
-
**Systematic Review (CoT):**
|
|
624
|
-
${reviewSteps}
|
|
625
|
-
|
|
626
|
-
**Multi-Path Validation (Self-Consistency):**
|
|
627
|
-
${validationPaths}
|
|
628
|
-
|
|
629
|
-
**Cross-Stage Consistency Analysis:**
|
|
630
|
-
${consistencyCheck}
|
|
631
|
-
|
|
632
|
-
**Enhanced Validation Results:**
|
|
633
|
-
- Hypothesis strength: ${assessHypothesisStrength(firstRoundResult)}
|
|
634
|
-
- Evidence quality: ${assessEvidenceQuality(firstRoundResult, stage3Result)}
|
|
635
|
-
- Logical coherence: ${assessLogicalCoherence(firstRoundResult, stage3Result)}
|
|
636
|
-
- Methodological rigor: ${assessMethodologicalRigor(firstRoundResult)}`;
|
|
531
|
+
// Return concise scientific review
|
|
532
|
+
return `${reviewSteps} ${validationPaths} ${consistencyCheck}${strategyResults ? ` ${strategyResults}` : ''}`;
|
|
637
533
|
}
|
|
638
534
|
/**
|
|
639
535
|
* STAGE 5: OOReD REVIEW & REFINEMENT
|
|
@@ -646,22 +542,8 @@ async function performOOReViewReview(input, mode, context, firstRoundResult, sta
|
|
|
646
542
|
const expertPerspectives = generateExpertPerspectives(input, mode, firstRoundResult, stage4Result);
|
|
647
543
|
// Apply selected prompting strategies
|
|
648
544
|
const strategyResults = strategies ? applySelectedStrategies(strategies, input, mode, "oored-review") : "";
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
**Selected Prompting Strategies Applied:**
|
|
652
|
-
${strategies ? formatStrategyApplication(strategies) : "Default OOReD review approach"}
|
|
653
|
-
|
|
654
|
-
**Multi-Path Refinement (ToT):**
|
|
655
|
-
${refinementPaths}
|
|
656
|
-
|
|
657
|
-
**Expert Domain Perspectives (Role-Based):**
|
|
658
|
-
${expertPerspectives}
|
|
659
|
-
|
|
660
|
-
**Integration Analysis:**
|
|
661
|
-
${integrateStageFindings(firstRoundResult, stage4Result)}
|
|
662
|
-
|
|
663
|
-
**Refinement Recommendations:**
|
|
664
|
-
${generateRefinementRecommendations(refinementPaths, expertPerspectives)}`;
|
|
545
|
+
// Return concise OOReD review and refinement
|
|
546
|
+
return `${refinementPaths} ${expertPerspectives} ${integrateStageFindings(firstRoundResult, stage4Result)} ${generateRefinementRecommendations(refinementPaths, expertPerspectives)}${strategyResults ? ` ${strategyResults}` : ''}`;
|
|
665
547
|
}
|
|
666
548
|
/**
|
|
667
549
|
* STAGE 6: FACT-BASED ACTION & FINAL RECOMMENDATIONS
|
|
@@ -675,28 +557,8 @@ async function performFinalAct(input, mode, context, stage3Result, stage5Result,
|
|
|
675
557
|
const qualityMetrics = calculateQualityMetrics(finalSynthesis);
|
|
676
558
|
// Apply selected prompting strategies
|
|
677
559
|
const strategyResults = strategies ? applySelectedStrategies(strategies, input, mode, "final-action") : "";
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
**Selected Prompting Strategies Applied:**
|
|
681
|
-
${strategies ? formatStrategyApplication(strategies) : "Default final action approach"}
|
|
682
|
-
|
|
683
|
-
**Comprehensive Synthesis:**
|
|
684
|
-
${finalSynthesis}
|
|
685
|
-
|
|
686
|
-
**Final Action Plan:**
|
|
687
|
-
${actionPlan}
|
|
688
|
-
|
|
689
|
-
**Quality Assurance Metrics:**
|
|
690
|
-
${qualityMetrics}
|
|
691
|
-
|
|
692
|
-
**Implementation Roadmap:**
|
|
693
|
-
${generateImplementationRoadmap(actionPlan, mode)}
|
|
694
|
-
|
|
695
|
-
**Success Criteria & Validation:**
|
|
696
|
-
${defineSuccessCriteria(finalSynthesis, mode)}
|
|
697
|
-
|
|
698
|
-
**Risk Mitigation & Contingencies:**
|
|
699
|
-
${generateRiskMitigationPlan(finalSynthesis, actionPlan)}`;
|
|
560
|
+
// Return concise final action and recommendations
|
|
561
|
+
return `${finalSynthesis} ${actionPlan} ${qualityMetrics} ${generateImplementationRoadmap(actionPlan, mode)} ${defineSuccessCriteria(finalSynthesis, mode)} ${generateRiskMitigationPlan(finalSynthesis, actionPlan)}${strategyResults ? ` ${strategyResults}` : ''}`;
|
|
700
562
|
}
|
|
701
563
|
// --- Enhanced Cognitive Helper Functions with Integrated Prompting Strategies ---
|
|
702
564
|
// STAGE 1 HELPERS: Scientific Investigation Functions
|
|
@@ -1209,8 +1071,8 @@ function assessMethodologicalRigor(stage1Result) {
|
|
|
1209
1071
|
/**
|
|
1210
1072
|
* Tool: deliberate (Revolutionary Single-Tool-Call 2-Round Cognitive Processing Engine)
|
|
1211
1073
|
*
|
|
1212
|
-
* **REVOLUTIONARY SINGLE-CALL FRAMEWORK:** This tool implements
|
|
1213
|
-
* cognitive deliberation system
|
|
1074
|
+
* **REVOLUTIONARY SINGLE-CALL FRAMEWORK:** This tool implements advanced 2-round
|
|
1075
|
+
* cognitive deliberation system in ONE tool call, combining Scientific Investigation,
|
|
1214
1076
|
* OOReD analysis, and Critical Thinking frameworks with automatic prompting strategy evaluation.
|
|
1215
1077
|
*
|
|
1216
1078
|
* **2-ROUND PROCESSING PIPELINE (SINGLE CALL):**
|
|
@@ -1223,44 +1085,26 @@ function assessMethodologicalRigor(stage1Result) {
|
|
|
1223
1085
|
* - **0.00-1.00 Scoring System:** Solution + Efficiency levels with ≥1.42 threshold
|
|
1224
1086
|
* - **Internal 2-Round Processing:** All deliberation happens within one tool invocation
|
|
1225
1087
|
* - **Tool Recommendations:** Intelligent suggestions for pair programming workflows
|
|
1226
|
-
* - **
|
|
1088
|
+
* - **Concise Output:** Raw cognitive processing results without formatting constraints
|
|
1227
1089
|
*
|
|
1228
1090
|
* **📥 INPUT:** Complex problems requiring systematic 2-round cognitive analysis
|
|
1229
|
-
* **📤 OUTPUT:**
|
|
1230
|
-
*
|
|
1231
|
-
* **🎯 OPTIMAL USE CASES:**
|
|
1232
|
-
* - Complex development tasks requiring systematic analysis
|
|
1233
|
-
* - Strategic decision making with implementation planning
|
|
1234
|
-
* - Knowledge synthesis across multiple domains and sources
|
|
1235
|
-
* - Quality evaluation requiring comprehensive multi-round assessment
|
|
1236
|
-
* - Research and development requiring systematic investigation
|
|
1237
|
-
*
|
|
1238
|
-
* **⚡ REVOLUTIONARY CAPABILITIES:**
|
|
1239
|
-
* - Single-call 2-round deliberation with automatic strategy selection
|
|
1240
|
-
* - Complete 6-stage processing without external session management
|
|
1241
|
-
* - Tool usage recommendations with specific count guidance
|
|
1242
|
-
* - Cross-round validation with consistency checking
|
|
1243
|
-
* - Comprehensive action planning with implementation roadmaps
|
|
1091
|
+
* **📤 OUTPUT:** Processed cognitive analysis with tool recommendations in single response
|
|
1244
1092
|
*/
|
|
1245
1093
|
server.tool("deliberate", {
|
|
1246
1094
|
input: z
|
|
1247
1095
|
.string()
|
|
1248
|
-
.describe("
|
|
1249
|
-
mode: z
|
|
1250
|
-
.enum(["analyze", "decide", "synthesize", "evaluate"])
|
|
1251
|
-
.default("analyze")
|
|
1252
|
-
.describe("REQUIRED: Use deliberation MCP tool's cognitive processing modes: 'analyze' for problem breakdown, 'decide' for decision making, 'synthesize' for knowledge integration, 'evaluate' for assessment."),
|
|
1096
|
+
.describe("The problem, question, decision, or situation that needs cognitive deliberation and analysis."),
|
|
1253
1097
|
context: z
|
|
1254
1098
|
.string()
|
|
1255
1099
|
.optional()
|
|
1256
1100
|
.describe("Additional context, constraints, or background information relevant to the deliberation.")
|
|
1257
|
-
}, async ({ input,
|
|
1101
|
+
}, async ({ input, context }) => {
|
|
1258
1102
|
const toolName = 'deliberate';
|
|
1259
|
-
logToolCall(toolName, `
|
|
1103
|
+
logToolCall(toolName, `Input length: ${input.length}`);
|
|
1260
1104
|
try {
|
|
1261
1105
|
// Single tool call that performs complete 2-round cognitive deliberation
|
|
1262
|
-
const deliberationResult = await performCognitiveDeliberation(input,
|
|
1263
|
-
logToolResult(toolName, true, `
|
|
1106
|
+
const deliberationResult = await performCognitiveDeliberation(input, context);
|
|
1107
|
+
logToolResult(toolName, true, `Complete 2-round deliberation finished`);
|
|
1264
1108
|
return { content: [{ type: "text", text: deliberationResult }] };
|
|
1265
1109
|
}
|
|
1266
1110
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nbiish/cognitive-tools-mcp",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.9.1",
|
|
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",
|