@nbiish/cognitive-tools-mcp 8.4.1 → 8.5.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 +58 -15
- package/build/index.js +171 -85
- package/package.json +2 -2
- package/README.md.backup +0 -183
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<p><a href="https://raw.githubusercontent.com/nbiish/license-for-all-works/8e9b73b269add9161dc04bbdd79f818c40fca14e/qr-stripe-donation.png">Donate via Stripe</a></p>
|
|
12
12
|
</div>
|
|
13
13
|
<div style="display: flex; align-items: center;">
|
|
14
|
-
<a href="https://www.buymeacoffee.com/nbiish"><img src="
|
|
14
|
+
<a href="https://www.buymeacoffee.com/nbiish"><img src="buymeacoffee-button.svg" alt="Buy me a coffee" /></a>
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
@@ -24,18 +24,21 @@
|
|
|
24
24
|
|
|
25
25
|
## ᐴ GASHKITOONAN ᔔ [CAPABILITIES] ◈──◆──◇──◆──◈
|
|
26
26
|
|
|
27
|
-
Revolutionary **
|
|
27
|
+
Revolutionary **TWO-PHASE Mandatory Cognitive Progression Framework** - Enhanced MCP server requiring sequential processing through two phases for complete cognitive enhancement. Phase 1 processes stages 1-2, Phase 2 processes stages 3-6. Each phase builds upon previous results with progressive complexity, ensuring comprehensive analysis through Scientific Investigation, OOReD methodology, Critical Thinking, and parallel strategy evaluation optimized for iterative LLM cognitive improvement.
|
|
28
28
|
|
|
29
|
-
### ⚡ MANDATORY
|
|
29
|
+
### ⚡ MANDATORY TWO-PHASE PROGRESSION
|
|
30
30
|
|
|
31
|
-
**BREAKING CHANGE v8.
|
|
31
|
+
**BREAKING CHANGE v8.5.0**: Two phases are now **MANDATORY** and must be completed sequentially:
|
|
32
32
|
|
|
33
|
+
**Phase 1: Foundation (Stages 1-2)**
|
|
33
34
|
1. **Stage 1**: Scientific Investigation (Entry Point)
|
|
34
|
-
2. **Stage 2**:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
2. **Stage 2**: Initial OOReD Analysis
|
|
36
|
+
|
|
37
|
+
**Phase 2: Synthesis (Stages 3-6)**
|
|
38
|
+
3. **Stage 3**: Critical Thinking & Pre-Action Planning
|
|
39
|
+
4. **Stage 4**: Scientific Review & Validation
|
|
40
|
+
5. **Stage 5**: OOReD Review & Refinement
|
|
41
|
+
6. **Stage 6**: Final Action & Recommendations
|
|
39
42
|
|
|
40
43
|
<div align="center">
|
|
41
44
|
◈──◆──◇───────────────────────────◇──◆──◈
|
|
@@ -49,14 +52,31 @@ npm install -g @nbiish/gikendaasowin-aabajichiganan-mcp
|
|
|
49
52
|
npm install -g @nbiish/cognitive-tools-mcp
|
|
50
53
|
```
|
|
51
54
|
|
|
52
|
-
### Ollama Integration
|
|
55
|
+
### Ollama + PydanticAI Integration (Recommended)
|
|
56
|
+
|
|
57
|
+
The modern way to use this MCP server is through our **PydanticAI + Ollama integration**:
|
|
58
|
+
|
|
53
59
|
```bash
|
|
54
|
-
#
|
|
60
|
+
# Install dependencies
|
|
61
|
+
pip install -r requirements.txt
|
|
62
|
+
|
|
63
|
+
# Run interactive cognitive enhancement
|
|
64
|
+
python cognitive_demo.py --interactive
|
|
65
|
+
|
|
66
|
+
# Process a single question
|
|
67
|
+
python cognitive_demo.py "Your question here"
|
|
68
|
+
|
|
69
|
+
# Use a different Ollama model
|
|
70
|
+
python cognitive_demo.py --model llama3.2:3b "Your question"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Claude Desktop / MCP Client Configuration
|
|
74
|
+
```json
|
|
55
75
|
{
|
|
56
76
|
"mcpServers": {
|
|
57
77
|
"gikendaasowin": {
|
|
58
|
-
"command": "
|
|
59
|
-
"args": []
|
|
78
|
+
"command": "npx",
|
|
79
|
+
"args": ["-y", "@nbiish/gikendaasowin-aabajichiganan-mcp@latest"]
|
|
60
80
|
}
|
|
61
81
|
}
|
|
62
82
|
}
|
|
@@ -68,6 +88,29 @@ npm install -g @nbiish/cognitive-tools-mcp
|
|
|
68
88
|
|
|
69
89
|
## ᐴ AABAJITOOWIN ᔔ [USAGE] ◈──◆──◇──◆──◈
|
|
70
90
|
|
|
91
|
+
### 🚀 Quick Start with PydanticAI + Ollama
|
|
92
|
+
|
|
93
|
+
The easiest way to experience the 6-stage cognitive enhancement:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Install Python dependencies
|
|
97
|
+
pip install -r requirements.txt
|
|
98
|
+
|
|
99
|
+
# Run interactive mode (recommended for exploration)
|
|
100
|
+
python cognitive_demo.py --interactive
|
|
101
|
+
|
|
102
|
+
# Process a single question
|
|
103
|
+
python cognitive_demo.py "How can AI help solve climate change?"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
This will automatically:
|
|
107
|
+
1. Connect to the published MCP server (`@nbiish/gikendaasowin-aabajichiganan-mcp`)
|
|
108
|
+
2. Use your local Ollama installation with `granite3.3:2b` (or specify `--model`)
|
|
109
|
+
3. Process your input through all 6 mandatory cognitive stages
|
|
110
|
+
4. Display beautifully formatted results with real-time progress
|
|
111
|
+
|
|
112
|
+
### Manual MCP Integration (Advanced)
|
|
113
|
+
|
|
71
114
|
### Mandatory Sequential Processing
|
|
72
115
|
|
|
73
116
|
**Stage 1 (Entry Point):**
|
|
@@ -117,7 +160,7 @@ npm install -g @nbiish/cognitive-tools-mcp
|
|
|
117
160
|
|
|
118
161
|
### Modern Prompting Integration
|
|
119
162
|
|
|
120
|
-
This tool implements the
|
|
163
|
+
This tool implements the cognitive cycle described in our [latest.md](latest.md) for systematic reasoning and action, featuring:
|
|
121
164
|
|
|
122
165
|
- **Context Engineering (2025 Best Practice)**: RAG-enhanced processing
|
|
123
166
|
- **Parallel Strategy Evaluation**: 10 advanced prompting strategies
|
|
@@ -183,7 +226,7 @@ This project is licensed under the Comprehensive Restricted Use License for Indi
|
|
|
183
226
|
```bibtex
|
|
184
227
|
@misc{gikendaasowin-aabajichiganan-mcp2025,
|
|
185
228
|
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},
|
|
186
|
-
title/description = {Revolutionary
|
|
229
|
+
title/description = {Revolutionary TWO-PHASE Mandatory Cognitive Progression Framework for Enhanced MCP Server Implementation},
|
|
187
230
|
type_of_work = {Indigenous digital creation/software incorporating traditional knowledge and cultural expressions},
|
|
188
231
|
year = {2025},
|
|
189
232
|
publisher/source/event = {GitHub repository under tribal sovereignty protections},
|
package/build/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
3
|
* -----------------------------------------------------------------------------
|
|
4
|
-
* Gikendaasowin Aabajichiganan - Enhanced
|
|
4
|
+
* Gikendaasowin Aabajichiganan - Enhanced TWO-PHASE Cognitive Deliberation MCP Server (v8.0.0)
|
|
5
5
|
*
|
|
6
6
|
* Description: Revolutionary MCP server implementing the most advanced cognitive
|
|
7
|
-
* processing engine available. Features a comprehensive
|
|
7
|
+
* processing engine available. Features a comprehensive TWO-PHASE framework combining
|
|
8
8
|
* Scientific Investigation, OOReD analysis, and Critical Thinking methodologies
|
|
9
9
|
* with expertly distributed prompting strategies (CoT, ToT, Self-Consistency,
|
|
10
10
|
* Meta-Prompting, Role-Based).
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* - Complete reimplementation with
|
|
12
|
+
* v8.0.0 REVOLUTIONARY RELEASE - Enhanced Two-Phase Framework:
|
|
13
|
+
* - Complete reimplementation with TWO-PHASE processing (Phase 1: stages 1-2, Phase 2: stages 3-6)
|
|
14
14
|
* - Strategic distribution of 5 advanced prompting strategies across 6 stages
|
|
15
15
|
* - Enhanced reliability with 45-60% error reduction through multi-stage validation
|
|
16
16
|
* - Comprehensive expert perspective integration with domain-specific analysis
|
|
@@ -25,8 +25,8 @@ import { z } from "zod";
|
|
|
25
25
|
// --- Server Definition ---
|
|
26
26
|
const serverInfo = {
|
|
27
27
|
name: "gikendaasowin-aabajichiganan-mcp",
|
|
28
|
-
version: "8.
|
|
29
|
-
description: "MANDATORY
|
|
28
|
+
version: "8.5.0",
|
|
29
|
+
description: "MANDATORY TWO-PHASE Cognitive Progression Framework - Enhanced MCP server ENFORCING sequential processing through two phases. Phase 1 processes stages 1-2, Phase 2 processes stages 3-6. Automatic phase progression prevents skipping and ensures complete cognitive enhancement through Scientific Investigation, OOReD methodology, Critical Thinking, and parallel strategy evaluation. Each input requires full two-phase completion for optimal LLM cognitive improvement."
|
|
30
30
|
};
|
|
31
31
|
const server = new McpServer(serverInfo);
|
|
32
32
|
const activeSessions = new Map();
|
|
@@ -34,34 +34,35 @@ const activeSessions = new Map();
|
|
|
34
34
|
function generateSessionId(input) {
|
|
35
35
|
return Buffer.from(input).toString('base64').slice(0, 12);
|
|
36
36
|
}
|
|
37
|
-
// Validate and enforce mandatory progression
|
|
38
|
-
function validateMandatoryProgression(input,
|
|
37
|
+
// Validate and enforce mandatory two-phase progression
|
|
38
|
+
function validateMandatoryProgression(input, phase, previous_results) {
|
|
39
39
|
const sessionId = generateSessionId(input);
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
40
|
+
const phaseNum = parseInt(phase.replace('phase', ''));
|
|
41
|
+
if (phaseNum === 1) {
|
|
42
42
|
// Starting new session - always allowed
|
|
43
43
|
const session = {
|
|
44
44
|
sessionId,
|
|
45
|
-
|
|
45
|
+
currentPhase: 1,
|
|
46
46
|
originalInput: input,
|
|
47
|
-
|
|
47
|
+
phaseResults: [],
|
|
48
|
+
toolUsageCount: 0,
|
|
48
49
|
startTime: Date.now()
|
|
49
50
|
};
|
|
50
51
|
activeSessions.set(sessionId, session);
|
|
51
|
-
return { sessionId, isValid: true,
|
|
52
|
+
return { sessionId, isValid: true, currentPhase: 1 };
|
|
52
53
|
}
|
|
53
54
|
const existingSession = activeSessions.get(sessionId);
|
|
54
55
|
if (!existingSession) {
|
|
55
|
-
throw new Error(`MANDATORY PROGRESSION VIOLATION:
|
|
56
|
+
throw new Error(`MANDATORY PROGRESSION VIOLATION: Phase ${phase} attempted without starting from Phase 1. You must begin with phase1 for this input to receive full cognitive enhancement.`);
|
|
56
57
|
}
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
-
throw new Error(`MANDATORY PROGRESSION VIOLATION: Expected
|
|
58
|
+
const expectedPhase = existingSession.currentPhase + 1;
|
|
59
|
+
if (phaseNum !== expectedPhase) {
|
|
60
|
+
throw new Error(`MANDATORY PROGRESSION VIOLATION: Expected phase${expectedPhase}, but received ${phase}. Sequential progression required: phase1 → phase2`);
|
|
60
61
|
}
|
|
61
62
|
if (!previous_results) {
|
|
62
|
-
throw new Error(`
|
|
63
|
+
throw new Error(`Phase ${phase} requires previous_results parameter containing all accumulated results from phase 1.`);
|
|
63
64
|
}
|
|
64
|
-
return { sessionId, isValid: true,
|
|
65
|
+
return { sessionId, isValid: true, currentPhase: phaseNum };
|
|
65
66
|
}
|
|
66
67
|
// --- Logging Helpers (Internal - No changes needed as per user comments) ---
|
|
67
68
|
/**
|
|
@@ -254,27 +255,30 @@ ${nextStepGuidance}
|
|
|
254
255
|
* Tool usage counter for re-deliberation guidance
|
|
255
256
|
* Counts potential external tool calls that might be recommended in each stage
|
|
256
257
|
*/
|
|
257
|
-
|
|
258
|
-
|
|
258
|
+
/**
|
|
259
|
+
* Count tools used in a stage result (for re-deliberation guidance)
|
|
260
|
+
*/
|
|
261
|
+
function countToolsInStage(stageResult) {
|
|
262
|
+
// Count references to tools/websearch/file operations in the stage result
|
|
259
263
|
const toolPatterns = [
|
|
260
|
-
/websearch/gi,
|
|
261
|
-
/file.*
|
|
262
|
-
/
|
|
263
|
-
/
|
|
264
|
-
/mcp.*server/gi,
|
|
265
|
-
/external.*tool/gi,
|
|
264
|
+
/websearch|web_search/gi,
|
|
265
|
+
/file.*tool|read_file|edit_file/gi,
|
|
266
|
+
/code.*tool|run_code|execute/gi,
|
|
267
|
+
/mcp.*server|external.*tool/gi,
|
|
266
268
|
/api.*call/gi,
|
|
267
269
|
/database.*query/gi,
|
|
268
270
|
/search.*tool/gi,
|
|
269
271
|
/knowledge.*base/gi
|
|
270
272
|
];
|
|
271
|
-
let
|
|
273
|
+
let toolCount = 0;
|
|
272
274
|
toolPatterns.forEach(pattern => {
|
|
273
|
-
const matches =
|
|
274
|
-
if (matches)
|
|
275
|
-
|
|
275
|
+
const matches = stageResult.match(pattern);
|
|
276
|
+
if (matches) {
|
|
277
|
+
toolCount += matches.length;
|
|
278
|
+
}
|
|
276
279
|
});
|
|
277
|
-
|
|
280
|
+
// Base count on stage complexity (minimum 1 tool per stage)
|
|
281
|
+
return Math.max(1, toolCount);
|
|
278
282
|
}
|
|
279
283
|
/**
|
|
280
284
|
* Evaluates all prompting strategies in parallel based on modern-prompting.mdc
|
|
@@ -1294,12 +1298,12 @@ function assessMethodologicalRigor(stage1Result) {
|
|
|
1294
1298
|
* - Multiple validation approaches for reliability
|
|
1295
1299
|
* - Pre-action planning with tool identification
|
|
1296
1300
|
*
|
|
1297
|
-
* **STAGE 4 -
|
|
1301
|
+
* **STAGE 4 - SCIENTIFIC REVIEW:** Chain-of-Thought + Self-Consistency
|
|
1298
1302
|
* - Systematic review of initial investigation findings
|
|
1299
1303
|
* - Cross-validation using multiple approaches
|
|
1300
1304
|
* - Enhanced evidence quality assessment
|
|
1301
1305
|
*
|
|
1302
|
-
* **STAGE 5 - OOReD
|
|
1306
|
+
* **STAGE 5 - OOReD REVIEW:** Tree-of-Thoughts + Role-Based Prompting
|
|
1303
1307
|
* - Multi-path refinement of reasoning processes
|
|
1304
1308
|
* - Expert domain perspectives integration
|
|
1305
1309
|
* - Cross-stage consistency optimization
|
|
@@ -1333,21 +1337,17 @@ function assessMethodologicalRigor(stage1Result) {
|
|
|
1333
1337
|
* - Quality Assurance: 94% validation success rate
|
|
1334
1338
|
*/
|
|
1335
1339
|
/**
|
|
1336
|
-
* Tool: deliberate (Enhanced 6-Stage Cognitive Processing Engine)
|
|
1340
|
+
* Tool: deliberate (Enhanced 6-Stage Cognitive Processing Engine - TWO-PHASE IMPLEMENTATION)
|
|
1337
1341
|
*
|
|
1338
|
-
* MANDATORY PROGRESSION ENFORCEMENT:
|
|
1339
|
-
* -
|
|
1340
|
-
* -
|
|
1341
|
-
* -
|
|
1342
|
-
* -
|
|
1342
|
+
* MANDATORY TWO-PHASE PROGRESSION ENFORCEMENT:
|
|
1343
|
+
* - Phase 1: Processes stages 1-2 (Scientific Investigation + Initial OOReD)
|
|
1344
|
+
* - Phase 2: Processes stages 3-6 (Critical Thinking + Reviews + Final Action)
|
|
1345
|
+
* - Each phase requires separate input call from the LLM
|
|
1346
|
+
* - Final output includes tool usage count for re-deliberation guidance
|
|
1343
1347
|
*
|
|
1344
1348
|
* Revolutionary cognitive enhancement through:
|
|
1345
|
-
* -
|
|
1346
|
-
* -
|
|
1347
|
-
* - Stage 3: Critical Thinking Pre-Act (10-step framework + prompting strategy selection)
|
|
1348
|
-
* - Stage 4: Scientific Review (Validation + refinement of findings)
|
|
1349
|
-
* - Stage 5: OOReD Deep Analysis (Implementation planning + risk assessment)
|
|
1350
|
-
* - Stage 6: Final Action Planning (Fact-based synthesis + tool recommendations)
|
|
1349
|
+
* - Phase 1: Stages 1-2 (Question→Hypothesis→Experiment→Analysis→Conclusion + Observe→Orient→Reason→Decide)
|
|
1350
|
+
* - Phase 2: Stages 3-6 (Critical Thinking + Scientific Review + OOReD Review + Final Action)
|
|
1351
1351
|
*
|
|
1352
1352
|
* Benefits:
|
|
1353
1353
|
* - 45-60% error reduction through multi-stage validation
|
|
@@ -1360,7 +1360,7 @@ function assessMethodologicalRigor(stage1Result) {
|
|
|
1360
1360
|
server.tool("deliberate", {
|
|
1361
1361
|
input: z
|
|
1362
1362
|
.string()
|
|
1363
|
-
.describe("REQUIRED: The problem, question, decision, or situation requiring cognitive deliberation. Each unique input starts a new
|
|
1363
|
+
.describe("REQUIRED: The problem, question, decision, or situation requiring cognitive deliberation. Each unique input starts a new 2-phase progression session."),
|
|
1364
1364
|
mode: z
|
|
1365
1365
|
.enum(["analyze", "decide", "synthesize", "evaluate"])
|
|
1366
1366
|
.default("analyze")
|
|
@@ -1372,47 +1372,133 @@ server.tool("deliberate", {
|
|
|
1372
1372
|
previous_results: z
|
|
1373
1373
|
.string()
|
|
1374
1374
|
.optional()
|
|
1375
|
-
.describe("REQUIRED for
|
|
1376
|
-
|
|
1375
|
+
.describe("REQUIRED for Phase 2: Complete accumulated results from Phase 1. Include ONLY when continuing to Phase 2."),
|
|
1376
|
+
phase: z
|
|
1377
|
+
.enum(["phase1", "phase2"])
|
|
1378
|
+
.default("phase1")
|
|
1379
|
+
.describe("MANDATORY: Specify 'phase1' for stages 1-2 or 'phase2' for stages 3-6. Phase 1 must complete before Phase 2.")
|
|
1380
|
+
}, async ({ input, mode, context, previous_results, phase }) => {
|
|
1377
1381
|
const toolName = 'deliberate';
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1382
|
+
logToolCall(toolName, `Phase: ${phase}, Mode: ${mode}, Previous Results: ${previous_results ? 'Yes' : 'No'}`);
|
|
1383
|
+
try {
|
|
1384
|
+
const sessionId = generateSessionId(input);
|
|
1385
|
+
let session = activeSessions.get(sessionId);
|
|
1386
|
+
let currentPhase;
|
|
1387
|
+
let contextualInput = input;
|
|
1388
|
+
let accumulatedResults = previous_results || "";
|
|
1389
|
+
let phaseResult;
|
|
1390
|
+
let toolUsageCount = 0;
|
|
1391
|
+
if (!session || !previous_results) {
|
|
1392
|
+
// Start a new session at Phase 1
|
|
1393
|
+
if (phase !== "phase1") {
|
|
1394
|
+
throw new Error(`MANDATORY PROGRESSION VIOLATION: Cannot start with ${phase}. You must begin with phase1 for this input to receive full cognitive enhancement.`);
|
|
1395
|
+
}
|
|
1396
|
+
currentPhase = 1;
|
|
1397
|
+
session = {
|
|
1398
|
+
sessionId,
|
|
1399
|
+
currentPhase: 1,
|
|
1400
|
+
originalInput: input,
|
|
1401
|
+
phaseResults: [],
|
|
1402
|
+
toolUsageCount: 0,
|
|
1403
|
+
startTime: Date.now()
|
|
1404
|
+
};
|
|
1405
|
+
activeSessions.set(sessionId, session);
|
|
1406
|
+
logToolCall(toolName, `New session started: ${sessionId}, Phase: 1`);
|
|
1407
|
+
// Process Phase 1: Stages 1-2
|
|
1408
|
+
const stage1Result = await performScientificInvestigation(input, mode, context);
|
|
1409
|
+
const stage2Result = await performInitialOOReD(input, mode, context, stage1Result);
|
|
1410
|
+
toolUsageCount = countToolsInStage(stage1Result) + countToolsInStage(stage2Result);
|
|
1411
|
+
phaseResult = `# PHASE 1 COMPLETE: STAGES 1-2 PROCESSED
|
|
1412
|
+
|
|
1413
|
+
## STAGE 1: SCIENTIFIC INVESTIGATION
|
|
1414
|
+
${stage1Result}
|
|
1415
|
+
|
|
1416
|
+
## STAGE 2: INITIAL OBSERVE-ORIENT-REASON-DECIDE
|
|
1417
|
+
${stage2Result}
|
|
1418
|
+
|
|
1419
|
+
**PHASE 1 SUMMARY:**
|
|
1420
|
+
- Scientific investigation completed with hypothesis formation
|
|
1421
|
+
- Initial OOReD analysis completed with strategic planning
|
|
1422
|
+
- Tool usage in Phase 1: ${toolUsageCount}
|
|
1423
|
+
|
|
1424
|
+
**⚠️ MANDATORY NEXT STEP:**
|
|
1425
|
+
Continue to **Phase 2** for complete cognitive enhancement (Stages 3-6).
|
|
1426
|
+
|
|
1427
|
+
**Required Phase 2 Call:**
|
|
1428
|
+
\`\`\`json
|
|
1429
|
+
{
|
|
1430
|
+
"name": "deliberate",
|
|
1431
|
+
"arguments": {
|
|
1432
|
+
"input": "${input}",
|
|
1433
|
+
"mode": "${mode}",
|
|
1434
|
+
"phase": "phase2",
|
|
1435
|
+
"previous_results": "[Copy this entire Phase 1 result as previous_results]"
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
\`\`\``;
|
|
1439
|
+
}
|
|
1440
|
+
else {
|
|
1441
|
+
// Continue to Phase 2
|
|
1442
|
+
if (phase !== "phase2") {
|
|
1443
|
+
throw new Error(`MANDATORY PROGRESSION VIOLATION: Expected phase2, but received ${phase}. Phase 1 must complete before Phase 2.`);
|
|
1444
|
+
}
|
|
1445
|
+
session = activeSessions.get(sessionId);
|
|
1446
|
+
if (!session) {
|
|
1447
|
+
throw new Error(`SESSION NOT FOUND: No active session for this input. Start with phase1 first.`);
|
|
1448
|
+
}
|
|
1449
|
+
currentPhase = 2;
|
|
1450
|
+
accumulatedResults = previous_results;
|
|
1451
|
+
contextualInput = `${input}\n\n[COGNITIVE PROGRESSION CONTEXT - Phase 1 Results]\n${accumulatedResults}`;
|
|
1452
|
+
logToolCall(toolName, `Continuing session: ${sessionId}, Processing Phase: 2`);
|
|
1453
|
+
// Process Phase 2: Stages 3-6
|
|
1454
|
+
const stage3Result = await performCriticalThinkingPreAct(contextualInput, mode, context, accumulatedResults, accumulatedResults);
|
|
1455
|
+
const stage4Result = await performScientificReview(contextualInput, mode, context, accumulatedResults, stage3Result);
|
|
1456
|
+
const stage5Result = await performOOReViewReview(contextualInput, mode, context, accumulatedResults, stage4Result);
|
|
1457
|
+
const stage6Result = await performFinalAct(contextualInput, mode, context, stage3Result, stage5Result);
|
|
1458
|
+
const phase2ToolUsage = countToolsInStage(stage3Result) + countToolsInStage(stage4Result) +
|
|
1459
|
+
countToolsInStage(stage5Result) + countToolsInStage(stage6Result);
|
|
1460
|
+
toolUsageCount = session.toolUsageCount + phase2ToolUsage;
|
|
1461
|
+
phaseResult = `# PHASE 2 COMPLETE: STAGES 3-6 PROCESSED
|
|
1462
|
+
|
|
1463
|
+
## STAGE 3: CRITICAL THINKING & PRE-ACTION PLANNING
|
|
1464
|
+
${stage3Result}
|
|
1465
|
+
|
|
1466
|
+
## STAGE 4: SCIENTIFIC REVIEW & VALIDATION
|
|
1467
|
+
${stage4Result}
|
|
1468
|
+
|
|
1469
|
+
## STAGE 5: OOReD REVIEW & REFINEMENT
|
|
1470
|
+
${stage5Result}
|
|
1471
|
+
|
|
1472
|
+
## STAGE 6: FACT-BASED ACTION & FINAL RECOMMENDATIONS
|
|
1473
|
+
${stage6Result}
|
|
1474
|
+
|
|
1475
|
+
**PHASE 2 SUMMARY:**
|
|
1476
|
+
- Critical thinking analysis completed with 10-step framework
|
|
1477
|
+
- Scientific review and validation completed
|
|
1478
|
+
- OOReD review and refinement completed
|
|
1479
|
+
- Final action planning with comprehensive recommendations
|
|
1480
|
+
- Tool usage in Phase 2: ${phase2ToolUsage}
|
|
1481
|
+
|
|
1482
|
+
**🎯 COGNITIVE ENHANCEMENT COMPLETE**
|
|
1483
|
+
All 6 stages processed through mandatory two-phase progression.
|
|
1484
|
+
|
|
1485
|
+
**FINAL SYNTHESIS:**
|
|
1486
|
+
${extractKeyInsights(stage3Result, stage5Result)}
|
|
1487
|
+
|
|
1488
|
+
**RECOMMENDED NEXT STEPS:**
|
|
1489
|
+
${extractActionableRecommendations(stage3Result, stage5Result, mode)}
|
|
1490
|
+
|
|
1491
|
+
\`\`\`tool use before re-deliberation: ${toolUsageCount}\`\`\``;
|
|
1400
1492
|
}
|
|
1401
|
-
|
|
1402
|
-
if (
|
|
1403
|
-
|
|
1493
|
+
// Update session state
|
|
1494
|
+
if (session) {
|
|
1495
|
+
session.currentPhase = currentPhase;
|
|
1496
|
+
session.phaseResults.push(phaseResult);
|
|
1497
|
+
session.toolUsageCount = toolUsageCount;
|
|
1498
|
+
activeSessions.set(sessionId, session);
|
|
1404
1499
|
}
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
existingSession.stageResults.push(previous_results);
|
|
1408
|
-
}
|
|
1409
|
-
const stageKey = `stage${currentStage}`;
|
|
1410
|
-
logToolCall(toolName, `Auto-Stage: ${currentStage}, Previous: ${previous_results ? 'Yes' : 'No'}`);
|
|
1411
|
-
try {
|
|
1412
|
-
// Process the current stage with progressive cognitive enhancement
|
|
1413
|
-
const stageResult = await processProgressiveStage(input, mode, context, stageKey, previous_results);
|
|
1414
|
-
logToolResult(toolName, true, `Stage ${currentStage} completed - ${currentStage === 6 ? 'FULL COGNITIVE ENHANCEMENT COMPLETE' : 'Continue to next stage for full enhancement'}`);
|
|
1415
|
-
return { content: [{ type: "text", text: stageResult }] };
|
|
1500
|
+
logToolResult(toolName, true, `Phase ${currentPhase} completed`);
|
|
1501
|
+
return { content: [{ type: "text", text: phaseResult }] };
|
|
1416
1502
|
}
|
|
1417
1503
|
catch (error) {
|
|
1418
1504
|
return logToolError(toolName, error);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nbiish/cognitive-tools-mcp",
|
|
3
|
-
"version": "8.
|
|
4
|
-
"description": "MANDATORY
|
|
3
|
+
"version": "8.5.1",
|
|
4
|
+
"description": "MANDATORY TWO-PHASE Cognitive Progression Framework - ENFORCES sequential processing through two phases. Phase 1 processes stages 1-2, Phase 2 processes stages 3-6. Automatic phase progression prevents skipping and ensures complete cognitive enhancement through Scientific Investigation, OOReD methodology, Critical Thinking with 10 expertly integrated prompting strategies.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
package/README.md.backup
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
# ◈──◆──◇ GIKENDAASOWIN AABAJICHIGANAN MCP SERVER / ENHANCED 6-STAGE COGNITIVE TOOLS v8.0.0 ◇──◆──◈
|
|
2
|
-
|
|
3
|
-
<div align="center">
|
|
4
|
-
<hr width="50%">
|
|
5
|
-
|
|
6
|
-
<h3>Support This Project</h3>
|
|
7
|
-
<div style="display: flex; justify-content: center; gap: 20px; margin: 20px 0;">
|
|
8
|
-
<div>
|
|
9
|
-
<h4>Stripe</h4>
|
|
10
|
-
<img src="qr-stripe-donation.png" alt="Scan to donate" width="180"/>
|
|
11
|
-
<p><a href="https://raw.githubusercontent.com/nbiish/license-for-all-works/8e9b73b269add9161dc04bbdd79f818c40fca14e/qr-stripe-donation.png">Donate via Stripe</a></p>
|
|
12
|
-
</div>
|
|
13
|
-
<div style="display: flex; align-items: center;">
|
|
14
|
-
<a href="https://www.buymeacoffee.com/nbiish"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=nbiish&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff" /></a>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<hr width="50%">
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<div align="center">
|
|
22
|
-
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
Revolutionary MCP server with Enhanced 6-Stage Cognitive Deliberation Framework & Parallel Strategy Evaluation System. The `deliberate` tool combines Scientific Investigation, OOReD analysis, and Critical Thinking methodologies with **10 expertly integrated prompting strategies** and intelligent **tool usage tracking** for optimal re-deliberation guidance. *(Integration guidelines in [`latest.md`](latest.md) are licensed under [LICENSE](LICENSE).)*
|
|
26
|
-
|
|
27
|
-
Known as:
|
|
28
|
-
- Anishinaabemowin: [`@nbiish/gikendaasowin-aabajichiganan-mcp`](https://www.npmjs.com/package/@nbiish/gikendaasowin-aabajichiganan-mcp)
|
|
29
|
-
- English: [`@nbiish/cognitive-tools-mcp`](https://www.npmjs.com/package/@nbiish/cognitive-tools-mcp)
|
|
30
|
-
|
|
31
|
-
Both packages are maintained in parallel and receive the same updates. You can use either package name in your projects - they provide identical functionality.
|
|
32
|
-
|
|
33
|
-
**See the latest integration details in [`latest.md`](latest.md).**
|
|
34
|
-
|
|
35
|
-
<div align="center">
|
|
36
|
-
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
## ᐴ GASHKITOONAN ᔔ [ENHANCED CAPABILITIES] ◈──◆──◇──◆──◈
|
|
40
|
-
|
|
41
|
-
### 🚀 Revolutionary 6-Stage Cognitive Framework
|
|
42
|
-
|
|
43
|
-
**Stage 1: Scientific Investigation** (Chain-of-Thought + Role-Based)
|
|
44
|
-
- Systematic hypothesis formation using scientific method
|
|
45
|
-
- Expert domain perspective integration
|
|
46
|
-
- Step-by-step reasoning for complex problem decomposition
|
|
47
|
-
|
|
48
|
-
**Stage 2: Initial OOReD** (Tree-of-Thoughts + Meta-Prompting)
|
|
49
|
-
- Multiple parallel reasoning paths exploration
|
|
50
|
-
- Self-reflection on reasoning quality and consistency
|
|
51
|
-
- Alternative solution pathway evaluation
|
|
52
|
-
|
|
53
|
-
**Stage 3: Critical Thinking + Pre-Act** (Self-Consistency + Meta-Prompting)
|
|
54
|
-
- 10-step critical thinking framework application
|
|
55
|
-
- Multiple validation approaches for reliability
|
|
56
|
-
- Pre-action planning with tool identification
|
|
57
|
-
|
|
58
|
-
**Stage 4: Scientific Review** (Chain-of-Thought + Self-Consistency)
|
|
59
|
-
- Systematic review of initial investigation findings
|
|
60
|
-
- Cross-validation using multiple approaches
|
|
61
|
-
- Enhanced evidence quality assessment
|
|
62
|
-
|
|
63
|
-
**Stage 5: OOReD Review** (Tree-of-Thoughts + Role-Based)
|
|
64
|
-
- Multi-path refinement of reasoning processes
|
|
65
|
-
- Expert domain perspectives integration
|
|
66
|
-
- Cross-stage consistency optimization
|
|
67
|
-
|
|
68
|
-
**Stage 6: Final Action** (All Strategies Integrated)
|
|
69
|
-
- Comprehensive synthesis of all previous stages
|
|
70
|
-
- Fact-based actionable recommendations
|
|
71
|
-
- Complete quality assurance and validation
|
|
72
|
-
- **🚀 NEW: Tool usage tracking with re-deliberation count**
|
|
73
|
-
|
|
74
|
-
### 🧠 Revolutionary Parallel Strategy Evaluation (v8.0.0)
|
|
75
|
-
|
|
76
|
-
**During Orient Stage - Intelligent Strategy Selection:**
|
|
77
|
-
|
|
78
|
-
- **10 Prompting Strategies Evaluated:** Cache-Augmented ReAct, Self-Consistency, PAL, Reflexion, ToT-lite, Progressive-Hint, CAG, Cognitive Scaffolding, IKS, KSP
|
|
79
|
-
- **Dual Scoring System:** Solution Level (0.00-0.99) + Efficiency Level (0.00-0.99)
|
|
80
|
-
- **Automatic Strategy Ranking:** Based on combined scores for optimal strategy selection
|
|
81
|
-
- **Dynamic Adaptation:** Intelligent strategy matching based on input complexity and requirements
|
|
82
|
-
- **Re-deliberation Guidance:** Tracks tool usage and provides optimal return timing
|
|
83
|
-
|
|
84
|
-
<div align="center">
|
|
85
|
-
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
## ᐴ APITENDAAGOZIJIG ᔔ [PERFORMANCE METRICS] ◈──◆──◇──◆──◈
|
|
89
|
-
|
|
90
|
-
- **Enhanced Reliability:** 45-60% error reduction through 6-stage validation + parallel strategy selection
|
|
91
|
-
- **Improved Depth:** 95% comprehensive coverage with scientific rigor + 10 integrated prompting strategies
|
|
92
|
-
- **Better Actionability:** 88% actionable recommendations with implementation roadmaps + tool usage guidance
|
|
93
|
-
- **Quality Assurance:** 94% validation success rate with cross-stage consistency
|
|
94
|
-
- **🚀 NEW: Intelligent Strategy Selection:** 92% optimal strategy matching based on dual-scoring evaluation
|
|
95
|
-
- **🚀 NEW: Re-deliberation Optimization:** 75% reduction in unnecessary tool usage through smart tracking
|
|
96
|
-
|
|
97
|
-
<div align="center">
|
|
98
|
-
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
<div align="center">
|
|
102
|
-
╭────────────[ ◈◆◇ DEVELOPMENT ◇◆◈ ]────────────╮
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
## ᐴ OZHITOON ᔔ [BUILDING] ◈──◆──◇──◆──◈
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
╭──────────────────────────────────────────────────────────────────────╮
|
|
109
|
-
│ ᐴ BASH ᔔ [ SHELL COMMANDS ] │
|
|
110
|
-
╰──────────────────────────────────────────────────────────────────────╯
|
|
111
|
-
# Install dependencies
|
|
112
|
-
npm install
|
|
113
|
-
|
|
114
|
-
# Build the package
|
|
115
|
-
npm run build
|
|
116
|
-
|
|
117
|
-
# Test locally with MCP Inspector
|
|
118
|
-
npm run inspector
|
|
119
|
-
|
|
120
|
-
# Publish both packages (maintainer only)
|
|
121
|
-
npm run publish-both
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
<div align="center">
|
|
125
|
-
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
126
|
-
</div>
|
|
127
|
-
|
|
128
|
-
## ᐴ AABAJICHIGAN ᔔ [USAGE] ◈──◆──◇──◆──◈
|
|
129
|
-
|
|
130
|
-
### Claude Desktop Integration
|
|
131
|
-
|
|
132
|
-
Add to your `claude_desktop_config.json`:
|
|
133
|
-
|
|
134
|
-
```json
|
|
135
|
-
{
|
|
136
|
-
"mcpServers": {
|
|
137
|
-
"gikendaasowin-aabajichiganan-mcp": {
|
|
138
|
-
"command": "npx",
|
|
139
|
-
"args": ["@nbiish/gikendaasowin-aabajichiganan-mcp"]
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Available Tools
|
|
146
|
-
|
|
147
|
-
**`deliberate`** - Enhanced 6-Stage Cognitive Processing Engine
|
|
148
|
-
|
|
149
|
-
- **Modes:** analyze, decide, synthesize, evaluate
|
|
150
|
-
- **Input:** Complex problems requiring comprehensive cognitive analysis
|
|
151
|
-
- **Output:** Six-stage structured analysis with actionable recommendations
|
|
152
|
-
|
|
153
|
-
<div align="center">
|
|
154
|
-
╭────────────[ ◈◆◇ CITATION ◇◆◈ ]─────────────╮
|
|
155
|
-
</div>
|
|
156
|
-
|
|
157
|
-
## ᐴ MIŻIWEWIN ᔔ [CITATION/SHARING] ◈──◆──◇──◆──◈
|
|
158
|
-
|
|
159
|
-
Please cite this project using the following BibTeX entry:
|
|
160
|
-
|
|
161
|
-
```bibtex
|
|
162
|
-
@misc{gikendaasowin-aabajichiganan-mcp2025,
|
|
163
|
-
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},
|
|
164
|
-
title/description = {GIKENDAASOWIN AABAJICHIGANAN MCP SERVER / ENHANCED 6-STAGE COGNITIVE TOOLS MCP SERVER},
|
|
165
|
-
type_of_work = {Indigenous digital creation/software incorporating traditional knowledge and cultural expressions},
|
|
166
|
-
year = {2025},
|
|
167
|
-
publisher/source/event = {GitHub repository under tribal sovereignty protections},
|
|
168
|
-
howpublished = {\url{https://github.com/nbiish/gikendaasowin-aabajichiganan-mcp}},
|
|
169
|
-
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.}
|
|
170
|
-
}
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
<div align="center">
|
|
174
|
-
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
175
|
-
</div>
|
|
176
|
-
|
|
177
|
-
This project is licensed under the [COMPREHENSIVE RESTRICTED USE LICENSE FOR INDIGENOUS CREATIONS WITH TRIBAL SOVEREIGNTY, DATA SOVEREIGNTY, AND WEALTH RECLAMATION PROTECTIONS](LICENSE).
|
|
178
|
-
|
|
179
|
-
<div align="center">
|
|
180
|
-
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
181
|
-
</div>
|
|
182
|
-
|
|
183
|
-
Copyright © 2025 ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), a descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band, and an enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians. This work embodies Traditional Knowledge and Traditional Cultural Expressions. All rights reserved.
|