@nbiish/cognitive-tools-mcp 8.7.0 → 8.8.2
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 +37 -0
- package/build/index.js +51 -91
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -36,6 +36,43 @@ Both packages are maintained in parallel and receive the same updates. You can u
|
|
|
36
36
|
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
37
37
|
</div>
|
|
38
38
|
|
|
39
|
+
## ᐴ REPOSITORY STRUCTURE ᔔ [MAZINAAZIWIN] ◈──◆──◇──◆──◈
|
|
40
|
+
|
|
41
|
+
Current repository structure (v8.8.1):
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
.
|
|
45
|
+
├── .cursor/ # Development rules and style guides
|
|
46
|
+
│ ├── anishinaabe-cyberpunk-style.mdc
|
|
47
|
+
│ └── rules/
|
|
48
|
+
├── .github/ # GitHub configuration
|
|
49
|
+
│ ├── copilot-instructions.md
|
|
50
|
+
│ └── FUNDING.yml
|
|
51
|
+
├── build/ # Compiled JavaScript output
|
|
52
|
+
│ └── index.js
|
|
53
|
+
├── new-flow/ # Flow documentation and images
|
|
54
|
+
│ ├── new-flow-images/
|
|
55
|
+
│ └── new-mcp-flow.md
|
|
56
|
+
├── src/ # TypeScript source code
|
|
57
|
+
│ └── index.ts
|
|
58
|
+
├── buymeacoffee-button.svg # Support button
|
|
59
|
+
├── CONTRIBUTING.md # Contribution guidelines
|
|
60
|
+
├── latest.md # Integration prompt (licensed)
|
|
61
|
+
├── LICENSE # Comprehensive restricted use license
|
|
62
|
+
├── modern-prompting.mdc # Prompting strategy definitions
|
|
63
|
+
├── package-cognitive-tools.json # English package configuration
|
|
64
|
+
├── package-gikendaasowin.json # Anishinaabemowin package configuration
|
|
65
|
+
├── package.json # Main package configuration
|
|
66
|
+
├── publish-both-packages.sh # Dual publishing script
|
|
67
|
+
├── qr-stripe-donation.png # Donation QR code
|
|
68
|
+
├── README.md # This file
|
|
69
|
+
└── tsconfig.json # TypeScript configuration
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
<div align="center">
|
|
73
|
+
◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
|
|
74
|
+
</div>
|
|
75
|
+
|
|
39
76
|
## ᐴ GASHKITOONAN ᔔ [ENHANCED CAPABILITIES] ◈──◆──◇──◆──◈
|
|
40
77
|
|
|
41
78
|
### 🚀 Revolutionary 6-Stage Cognitive Framework
|
package/build/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
3
|
* -----------------------------------------------------------------------------
|
|
4
|
-
* Gikendaasowin Aabajichiganan - Revolutionary 2-Round Cognitive Deliberation MCP Server (v8.
|
|
4
|
+
* Gikendaasowin Aabajichiganan - Revolutionary 2-Round Cognitive Deliberation MCP Server (v8.8.0)
|
|
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
|
|
8
8
|
* Scientific Investigation, OOReD analysis, and Critical Thinking methodologies
|
|
9
9
|
* with expertly evaluated prompting strategies from modern-prompting.mdc.
|
|
10
10
|
*
|
|
11
|
-
* v8.
|
|
12
|
-
* - Complete refactor implementing 2-round deliberation process
|
|
11
|
+
* v8.8.1 REVOLUTIONARY RELEASE - 2-Round Deliberation Framework:
|
|
12
|
+
* - Complete refactor implementing 2-round deliberation process as SINGLE tool call
|
|
13
13
|
* - DYNAMIC prompting strategy evaluation with in-prompt 0.00-1.00 scoring system
|
|
14
|
-
* -
|
|
14
|
+
* - Removed session management - all 6 stages happen in one tool invocation
|
|
15
15
|
* - Tool usage recommendations focusing on pair programming scenarios
|
|
16
16
|
* - Enhanced reliability with cross-round validation and consistency checking
|
|
17
17
|
* - Comprehensive markdown output with tool count recommendations
|
|
18
18
|
* - Revolutionary 2-round cognitive processing following tested specifications
|
|
19
19
|
* - CRITICAL: All strategy ratings calculated dynamically based on actual task context
|
|
20
|
+
* - SINGLE TOOL CALL: Both rounds processed internally without user session management
|
|
20
21
|
* -----------------------------------------------------------------------------
|
|
21
22
|
*/
|
|
22
23
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
23
24
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
24
25
|
import { z } from "zod";
|
|
25
|
-
const sessions = new Map();
|
|
26
26
|
// --- Server Definition ---
|
|
27
27
|
const serverInfo = {
|
|
28
28
|
name: "gikendaasowin-aabajichiganan-mcp",
|
|
29
|
-
version: "8.
|
|
30
|
-
description: "Revolutionary 2-Round Cognitive Deliberation MCP server implementing the
|
|
29
|
+
version: "8.8.1",
|
|
30
|
+
description: "Revolutionary Single-Tool-Call 2-Round Cognitive Deliberation MCP server implementing the complete 6-stage framework with dynamic prompting strategy evaluation and tool recommendations."
|
|
31
31
|
};
|
|
32
32
|
const server = new McpServer(serverInfo);
|
|
33
33
|
// --- Logging Helpers (Internal - No changes needed as per user comments) ---
|
|
@@ -366,12 +366,6 @@ function generateToolRecommendations(input, mode, deliberationResults) {
|
|
|
366
366
|
}
|
|
367
367
|
return { toolCount: Math.min(8, toolCount), recommendations };
|
|
368
368
|
}
|
|
369
|
-
/**
|
|
370
|
-
* Generates a unique session ID for multi-phase deliberation
|
|
371
|
-
*/
|
|
372
|
-
function generateSessionId() {
|
|
373
|
-
return `del_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
374
|
-
}
|
|
375
369
|
/**
|
|
376
370
|
* Formats prompting strategy evaluation results for output
|
|
377
371
|
* Shows dynamically evaluated strategies with real-time scoring
|
|
@@ -428,23 +422,19 @@ function validateScientificConsistency(questionIdentification, hypothesisFormati
|
|
|
428
422
|
}
|
|
429
423
|
// --- Cognitive Deliberation Engine ---
|
|
430
424
|
/**
|
|
431
|
-
* Performs two-round cognitive deliberation
|
|
425
|
+
* Performs complete two-round cognitive deliberation in a single tool call
|
|
432
426
|
* Round 1: Stages 1-2 (Scientific Investigation + Initial OOReD)
|
|
433
427
|
* Round 2: Stages 3-6 (Critical Thinking + Reviews + Final Action)
|
|
428
|
+
* All happens internally without requiring multiple tool calls or session management
|
|
434
429
|
*/
|
|
435
|
-
async function performCognitiveDeliberation(input, mode, context
|
|
436
|
-
//
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
const stage1 = await performScientificInvestigation(input, mode, context, selectedStrategies);
|
|
444
|
-
// STAGE 2: INITIAL OOReD
|
|
445
|
-
const stage2 = await performInitialOOReD(input, mode, context, stage1, selectedStrategies);
|
|
446
|
-
// Store first round results
|
|
447
|
-
const firstRoundResults = `# 1ST ROUND OF DELIBERATION
|
|
430
|
+
async function performCognitiveDeliberation(input, mode, context) {
|
|
431
|
+
// ROUND 1: Stages 1-2 (Internal processing)
|
|
432
|
+
// STAGE 1: SCIENTIFIC INVESTIGATION with prompting strategy evaluation
|
|
433
|
+
const selectedStrategies = evaluatePromptingStrategies(input, mode, context);
|
|
434
|
+
const stage1 = await performScientificInvestigation(input, mode, context, selectedStrategies);
|
|
435
|
+
// STAGE 2: INITIAL OOReD
|
|
436
|
+
const stage2 = await performInitialOOReD(input, mode, context, stage1, selectedStrategies);
|
|
437
|
+
const firstRoundResults = `# 1ST ROUND OF DELIBERATION
|
|
448
438
|
|
|
449
439
|
## PROMPTING STRATEGY EVALUATION
|
|
450
440
|
${formatPromptingStrategyResults(selectedStrategies)}
|
|
@@ -457,47 +447,20 @@ ${stage2}
|
|
|
457
447
|
|
|
458
448
|
---
|
|
459
449
|
*First Round Complete: Scientific Investigation + Initial OOReD*`;
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
## NEXT STEPS
|
|
476
|
-
To continue with the second round of deliberation (Stages 3-6), call the deliberate tool again with:
|
|
477
|
-
- session_id: "${firstRoundId}"
|
|
478
|
-
- Same input and parameters
|
|
479
|
-
|
|
480
|
-
**tool use before re-deliberation: ${toolRecs.toolCount}**
|
|
481
|
-
|
|
482
|
-
### RECOMMENDED TOOLS BEFORE SECOND ROUND:
|
|
483
|
-
${toolRecs.recommendations.join('\n')}`;
|
|
484
|
-
}
|
|
485
|
-
else {
|
|
486
|
-
// Second round: Stages 3-6
|
|
487
|
-
const selectedStrategies = evaluatePromptingStrategies(input, mode, context);
|
|
488
|
-
// STAGE 3: CRITICAL THINKING + PRE-ACT
|
|
489
|
-
const stage3 = await performCriticalThinkingPreAct(input, mode, context, session.firstRoundResults, selectedStrategies);
|
|
490
|
-
// STAGE 4: SCIENTIFIC REVIEW
|
|
491
|
-
const stage4 = await performScientificReview(input, mode, context, session.firstRoundResults, stage3, selectedStrategies);
|
|
492
|
-
// STAGE 5: OOReD REVIEW
|
|
493
|
-
const stage5 = await performOOReViewReview(input, mode, context, session.firstRoundResults, stage4, selectedStrategies);
|
|
494
|
-
// STAGE 6: FINAL ACT
|
|
495
|
-
const stage6 = await performFinalAct(input, mode, context, stage3, stage5, selectedStrategies);
|
|
496
|
-
// Clean up session
|
|
497
|
-
sessions.delete(sessionId);
|
|
498
|
-
// Generate final tool recommendations
|
|
499
|
-
const finalToolRecs = generateToolRecommendations(input, mode, `${stage3}\n${stage5}\n${stage6}`);
|
|
500
|
-
const secondRoundResults = `# 2ND ROUND OF DELIBERATION
|
|
450
|
+
// ROUND 2: Stages 3-6 (Internal processing continues)
|
|
451
|
+
// Re-evaluate strategies for second round
|
|
452
|
+
const secondRoundStrategies = evaluatePromptingStrategies(input, mode, context);
|
|
453
|
+
// STAGE 3: CRITICAL THINKING + PRE-ACT
|
|
454
|
+
const stage3 = await performCriticalThinkingPreAct(input, mode, context, firstRoundResults, secondRoundStrategies);
|
|
455
|
+
// STAGE 4: SCIENTIFIC REVIEW
|
|
456
|
+
const stage4 = await performScientificReview(input, mode, context, firstRoundResults, stage3, secondRoundStrategies);
|
|
457
|
+
// STAGE 5: OOReD REVIEW
|
|
458
|
+
const stage5 = await performOOReViewReview(input, mode, context, firstRoundResults, stage4, secondRoundStrategies);
|
|
459
|
+
// STAGE 6: FINAL ACT
|
|
460
|
+
const stage6 = await performFinalAct(input, mode, context, stage3, stage5, secondRoundStrategies);
|
|
461
|
+
// Generate final tool recommendations
|
|
462
|
+
const finalToolRecs = generateToolRecommendations(input, mode, `${stage3}\n${stage5}\n${stage6}`);
|
|
463
|
+
const secondRoundResults = `# 2ND ROUND OF DELIBERATION
|
|
501
464
|
|
|
502
465
|
## STAGE 3: CRITICAL THINKING & PRE-ACTION PLANNING
|
|
503
466
|
${stage3}
|
|
@@ -513,7 +476,8 @@ ${stage6}
|
|
|
513
476
|
|
|
514
477
|
---
|
|
515
478
|
*Second Round Complete: Critical Thinking + Reviews + Final Action*`;
|
|
516
|
-
|
|
479
|
+
// Return complete single-tool-call result
|
|
480
|
+
return `${firstRoundResults}
|
|
517
481
|
|
|
518
482
|
${secondRoundResults}
|
|
519
483
|
|
|
@@ -530,8 +494,7 @@ ${finalToolRecs.recommendations.join('\n')}
|
|
|
530
494
|
---
|
|
531
495
|
*Enhanced 2-Round Cognitive Framework: Scientific Investigation + OOReD + Critical Thinking*
|
|
532
496
|
*Processing Mode: ${mode} | Total Strategies Applied: ${selectedStrategies.length}*
|
|
533
|
-
*
|
|
534
|
-
}
|
|
497
|
+
*Framework Version: 8.8.0 | Complete Single-Tool-Call Processing*`;
|
|
535
498
|
}
|
|
536
499
|
// --- 6-Stage Cognitive Processing Functions with Integrated Prompting Strategies ---
|
|
537
500
|
/**
|
|
@@ -1261,25 +1224,26 @@ function assessMethodologicalRigor(stage1Result) {
|
|
|
1261
1224
|
* - Implementation Compliance: 100% specification adherence
|
|
1262
1225
|
*/
|
|
1263
1226
|
/**
|
|
1264
|
-
* Tool: deliberate (Revolutionary 2-Round Cognitive Processing Engine)
|
|
1227
|
+
* Tool: deliberate (Revolutionary Single-Tool-Call 2-Round Cognitive Processing Engine)
|
|
1265
1228
|
*
|
|
1266
|
-
* **REVOLUTIONARY
|
|
1267
|
-
* cognitive deliberation system available, combining Scientific Investigation,
|
|
1268
|
-
* analysis, and Critical Thinking frameworks with automatic prompting strategy evaluation.
|
|
1229
|
+
* **REVOLUTIONARY SINGLE-CALL FRAMEWORK:** This tool implements the most advanced 2-round
|
|
1230
|
+
* cognitive deliberation system available in ONE tool call, combining Scientific Investigation,
|
|
1231
|
+
* OOReD analysis, and Critical Thinking frameworks with automatic prompting strategy evaluation.
|
|
1269
1232
|
*
|
|
1270
|
-
* **2-ROUND PROCESSING PIPELINE:**
|
|
1233
|
+
* **2-ROUND PROCESSING PIPELINE (SINGLE CALL):**
|
|
1271
1234
|
* **Round 1 (Foundation):** Stages 1-2 - Scientific Investigation + Initial OOReD
|
|
1272
1235
|
* **Round 2 (Advanced):** Stages 3-6 - Critical Thinking + Reviews + Final Action
|
|
1273
1236
|
*
|
|
1274
1237
|
* **KEY FEATURES:**
|
|
1238
|
+
* - **SINGLE TOOL CALL:** Complete 6-stage deliberation without session management
|
|
1275
1239
|
* - **Automatic Strategy Evaluation:** Analyzes all modern-prompting.mdc strategies
|
|
1276
1240
|
* - **0.00-1.00 Scoring System:** Solution + Efficiency levels with ≥1.38 threshold
|
|
1277
|
-
* - **
|
|
1241
|
+
* - **Internal 2-Round Processing:** All deliberation happens within one tool invocation
|
|
1278
1242
|
* - **Tool Recommendations:** Intelligent suggestions for pair programming workflows
|
|
1279
|
-
* - **Markdown Output:** Structured results with tool
|
|
1243
|
+
* - **Markdown Output:** Structured results with "tool use before re-deliberation" count
|
|
1280
1244
|
*
|
|
1281
1245
|
* **📥 INPUT:** Complex problems requiring systematic 2-round cognitive analysis
|
|
1282
|
-
* **📤 OUTPUT:**
|
|
1246
|
+
* **📤 OUTPUT:** Complete structured analysis with tool recommendations in single response
|
|
1283
1247
|
*
|
|
1284
1248
|
* **🎯 OPTIMAL USE CASES:**
|
|
1285
1249
|
* - Complex development tasks requiring systematic analysis
|
|
@@ -1289,8 +1253,8 @@ function assessMethodologicalRigor(stage1Result) {
|
|
|
1289
1253
|
* - Research and development requiring systematic investigation
|
|
1290
1254
|
*
|
|
1291
1255
|
* **⚡ REVOLUTIONARY CAPABILITIES:**
|
|
1292
|
-
* - 2-round deliberation with automatic strategy selection
|
|
1293
|
-
* -
|
|
1256
|
+
* - Single-call 2-round deliberation with automatic strategy selection
|
|
1257
|
+
* - Complete 6-stage processing without external session management
|
|
1294
1258
|
* - Tool usage recommendations with specific count guidance
|
|
1295
1259
|
* - Cross-round validation with consistency checking
|
|
1296
1260
|
* - Comprehensive action planning with implementation roadmaps
|
|
@@ -1306,18 +1270,14 @@ server.tool("deliberate", {
|
|
|
1306
1270
|
context: z
|
|
1307
1271
|
.string()
|
|
1308
1272
|
.optional()
|
|
1309
|
-
.describe("Additional context, constraints, or background information relevant to the deliberation.")
|
|
1310
|
-
|
|
1311
|
-
.string()
|
|
1312
|
-
.optional()
|
|
1313
|
-
.describe("Session ID for continuing multi-phase deliberation. Use the ID returned from first round to continue with second round.")
|
|
1314
|
-
}, async ({ input, mode, context, session_id }) => {
|
|
1273
|
+
.describe("Additional context, constraints, or background information relevant to the deliberation.")
|
|
1274
|
+
}, async ({ input, mode, context }) => {
|
|
1315
1275
|
const toolName = 'deliberate';
|
|
1316
|
-
logToolCall(toolName, `Mode: ${mode}, Input length: ${input.length}
|
|
1276
|
+
logToolCall(toolName, `Mode: ${mode}, Input length: ${input.length}`);
|
|
1317
1277
|
try {
|
|
1318
|
-
//
|
|
1319
|
-
const deliberationResult = await performCognitiveDeliberation(input, mode, context
|
|
1320
|
-
logToolResult(toolName, true, `Mode: ${mode},
|
|
1278
|
+
// Single tool call that performs complete 2-round cognitive deliberation
|
|
1279
|
+
const deliberationResult = await performCognitiveDeliberation(input, mode, context);
|
|
1280
|
+
logToolResult(toolName, true, `Mode: ${mode}, Complete 2-round deliberation finished`);
|
|
1321
1281
|
return { content: [{ type: "text", text: deliberationResult }] };
|
|
1322
1282
|
}
|
|
1323
1283
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nbiish/cognitive-tools-mcp",
|
|
3
|
-
"version": "8.
|
|
4
|
-
"description": "Revolutionary 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).",
|
|
3
|
+
"version": "8.8.2",
|
|
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",
|
|
7
7
|
"bin": {
|