@nbiish/cognitive-tools-mcp 8.4.3 → 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 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="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>
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 **6-Stage Mandatory Cognitive Progression Framework** - Enhanced MCP server requiring sequential processing through all 6 stages for complete cognitive enhancement. Each stage 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.
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 STAGE PROGRESSION
29
+ ### ⚡ MANDATORY TWO-PHASE PROGRESSION
30
30
 
31
- **BREAKING CHANGE v8.4.2**: Stages are now **MANDATORY** and must be completed sequentially:
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**: Orientation & Strategic Planning
35
- 3. **Stage 3**: Recursive Enhancement & Strategy Development
36
- 4. **Stage 4**: Evaluation & Decision Framework
37
- 5. **Stage 5**: Deep Analysis & Implementation
38
- 6. **Stage 6**: Action Planning & Synthesis
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
- # Add to your MCP client configuration
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": "gikendaasowin-aabajichiganan-mcp",
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):**
@@ -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 6-Stage Mandatory Cognitive Progression Framework for Enhanced MCP Server Implementation},
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 6-Stage Cognitive Deliberation MCP Server (v7.0.0)
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 6-stage framework combining
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
- * v7.0.0 REVOLUTIONARY RELEASE - Enhanced 6-Stage Framework:
13
- * - Complete reimplementation with Scientific Investigation + OOReD + Critical Thinking
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.4.0",
29
- description: "MANDATORY 6-Stage Cognitive Progression Framework - Enhanced MCP server ENFORCING sequential processing through all 6 stages. Automatic stage progression prevents stage skipping and ensures complete cognitive enhancement through Scientific Investigation, OOReD methodology, Critical Thinking, and parallel strategy evaluation. Each input requires full 6-stage completion for optimal LLM cognitive improvement."
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, stage, previous_results) {
37
+ // Validate and enforce mandatory two-phase progression
38
+ function validateMandatoryProgression(input, phase, previous_results) {
39
39
  const sessionId = generateSessionId(input);
40
- const stageNum = parseInt(stage.replace('stage', ''));
41
- if (stageNum === 1) {
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
- currentStage: 1,
45
+ currentPhase: 1,
46
46
  originalInput: input,
47
- stageResults: [],
47
+ phaseResults: [],
48
+ toolUsageCount: 0,
48
49
  startTime: Date.now()
49
50
  };
50
51
  activeSessions.set(sessionId, session);
51
- return { sessionId, isValid: true, currentStage: 1 };
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: Stage ${stage} attempted without starting from Stage 1. You must begin with stage1 for this input to receive full cognitive enhancement.`);
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 expectedStage = existingSession.currentStage + 1;
58
- if (stageNum !== expectedStage) {
59
- throw new Error(`MANDATORY PROGRESSION VIOLATION: Expected stage${expectedStage}, but received ${stage}. Sequential progression required: stage1stage2 → stage3 → stage4 → stage5 → stage6`);
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: phase1phase2`);
60
61
  }
61
62
  if (!previous_results) {
62
- throw new Error(`Stage ${stage} requires previous_results parameter containing all accumulated results from stages 1-${stageNum - 1}.`);
63
+ throw new Error(`Phase ${phase} requires previous_results parameter containing all accumulated results from phase 1.`);
63
64
  }
64
- return { sessionId, isValid: true, currentStage: stageNum };
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
- function countToolsInStage(stageOutput) {
258
- // Count mentions of common tool usage patterns
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.*read/gi,
262
- /file.*write/gi,
263
- /code.*exec/gi,
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 count = 0;
273
+ let toolCount = 0;
272
274
  toolPatterns.forEach(pattern => {
273
- const matches = stageOutput.match(pattern);
274
- if (matches)
275
- count += matches.length;
275
+ const matches = stageResult.match(pattern);
276
+ if (matches) {
277
+ toolCount += matches.length;
278
+ }
276
279
  });
277
- return count;
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
@@ -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
- * - Stage 1: Always starts new session (Scientific Investigation)
1340
- * - Stages 2-6: Require previous_results from all previous stages
1341
- * - Sessions automatically track progression to prevent stage skipping
1342
- * - Each input creates unique session requiring full 6-stage completion
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
- * - Stage 1: Scientific Investigation (Question→Hypothesis→Experiment→Analysis→Conclusion)
1346
- * - Stage 2: OOReD Strategic Planning (Observe→Orient→Reason→Decide)
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 6-stage progression session."),
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,49 +1372,133 @@ server.tool("deliberate", {
1372
1372
  previous_results: z
1373
1373
  .string()
1374
1374
  .optional()
1375
- .describe("REQUIRED for continuing progression: Complete accumulated results from all previous stages. Include ONLY when continuing an existing session (stages 2-6).")
1376
- }, async ({ input, mode, context, previous_results }) => {
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
- logToolCall(toolName, `Mode: ${mode}, Previous Results: ${previous_results ? 'Yes' : 'No'}`);
1382
+ logToolCall(toolName, `Phase: ${phase}, Mode: ${mode}, Previous Results: ${previous_results ? 'Yes' : 'No'}`);
1379
1383
  try {
1380
1384
  const sessionId = generateSessionId(input);
1381
1385
  let session = activeSessions.get(sessionId);
1382
- let currentStage;
1386
+ let currentPhase;
1383
1387
  let contextualInput = input;
1384
1388
  let accumulatedResults = previous_results || "";
1389
+ let phaseResult;
1390
+ let toolUsageCount = 0;
1385
1391
  if (!session || !previous_results) {
1386
- // Start a new session at Stage 1
1387
- currentStage = 1;
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;
1388
1397
  session = {
1389
1398
  sessionId,
1390
- currentStage: 1,
1399
+ currentPhase: 1,
1391
1400
  originalInput: input,
1392
- stageResults: [],
1401
+ phaseResults: [],
1402
+ toolUsageCount: 0,
1393
1403
  startTime: Date.now()
1394
1404
  };
1395
1405
  activeSessions.set(sessionId, session);
1396
- logToolCall(toolName, `New session started: ${sessionId}, Stage: 1`);
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
+ \`\`\``;
1397
1439
  }
1398
1440
  else {
1399
- // Continue existing session
1400
- currentStage = session.currentStage + 1;
1401
- if (currentStage > 6) {
1402
- return { content: [{ type: "text", text: "PROGRESSION COMPLETE: All 6 stages already completed for this input. Session finished." }] };
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.`);
1403
1444
  }
1404
- // Use the provided previous_results as the full context
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;
1405
1450
  accumulatedResults = previous_results;
1406
- contextualInput = `${input}\n\n[COGNITIVE PROGRESSION CONTEXT - Previous Stages]\n${accumulatedResults}`;
1407
- logToolCall(toolName, `Continuing session: ${sessionId}, Advancing to Stage: ${currentStage}`);
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}\`\`\``;
1408
1492
  }
1409
- const stageKey = `stage${currentStage}`;
1410
- // Process the current stage
1411
- const stageResult = await processProgressiveStage(contextualInput, mode, context, stageKey, accumulatedResults);
1412
1493
  // Update session state
1413
- session.currentStage = currentStage;
1414
- session.stageResults.push(stageResult); // Append the full result of the current stage
1415
- activeSessions.set(sessionId, session);
1416
- logToolResult(toolName, true, `Stage ${currentStage} completed`);
1417
- return { content: [{ type: "text", text: stageResult }] };
1494
+ if (session) {
1495
+ session.currentPhase = currentPhase;
1496
+ session.phaseResults.push(phaseResult);
1497
+ session.toolUsageCount = toolUsageCount;
1498
+ activeSessions.set(sessionId, session);
1499
+ }
1500
+ logToolResult(toolName, true, `Phase ${currentPhase} completed`);
1501
+ return { content: [{ type: "text", text: phaseResult }] };
1418
1502
  }
1419
1503
  catch (error) {
1420
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.3",
4
- "description": "MANDATORY 6-Stage Cognitive Progression Framework - ENFORCES sequential processing through all 6 stages. Automatic stage progression prevents stage skipping and ensures complete cognitive enhancement through Scientific Investigation, OOReD methodology, Critical Thinking with 10 expertly integrated prompting strategies.",
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.