@nbiish/cognitive-tools-mcp 4.0.14 → 5.0.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/build/index.js +147 -72
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
3
|
* -----------------------------------------------------------------------------
|
|
4
|
-
* Gikendaasowin Aabajichiganan -
|
|
5
|
-
*
|
|
6
|
-
* Description:
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* -
|
|
17
|
-
* -
|
|
18
|
-
* -
|
|
19
|
-
* -
|
|
20
|
-
*
|
|
21
|
-
* -
|
|
4
|
+
* Gikendaasowin Aabajichiganan - Modern Agentic Cognitive Orchestration MCP Server (v5.0.0)
|
|
5
|
+
*
|
|
6
|
+
* Description: Implements cutting-edge 2025 cognitive frameworks through the
|
|
7
|
+
* **OOReDAct cognitive cycle** (Observe-Orient-Reason-Decide-Act) with advanced
|
|
8
|
+
* reasoning strategies including Cache-Augmented Generation (CAG), Internal
|
|
9
|
+
* Knowledge Synthesis (IKS), Knowledge Synthesis Prompting (KSP), Tree-of-Thoughts
|
|
10
|
+
* lite (ToT-lite), Progressive-Hint Prompting (PHP), and Cognitive Scaffolding.
|
|
11
|
+
* Features dynamic context window optimization, quality control mechanisms,
|
|
12
|
+
* and comprehensive tool integration standards for maximum cognitive performance.
|
|
13
|
+
*
|
|
14
|
+
* v5.0.0 Major Release - Modern Prompt Engineering Framework:
|
|
15
|
+
* - Complete rewrite based on 2025 context engineering best practices
|
|
16
|
+
* - Advanced reasoning strategies: CAG, IKS, KSP, ToT-lite, PHP, Reflexion
|
|
17
|
+
* - Dynamic context ecosystem design with optimization techniques
|
|
18
|
+
* - Enhanced quality control and consistency validation
|
|
19
|
+
* - Comprehensive tool integration with CodeAct standards
|
|
20
|
+
* - Context budget management and compression strategies
|
|
21
|
+
* - Multi-perspective knowledge synthesis and validation
|
|
22
22
|
* -----------------------------------------------------------------------------
|
|
23
23
|
*/
|
|
24
24
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -27,8 +27,8 @@ import { z } from "zod";
|
|
|
27
27
|
// --- Server Definition ---
|
|
28
28
|
const serverInfo = {
|
|
29
29
|
name: "gikendaasowin-aabajichiganan-mcp",
|
|
30
|
-
version: "
|
|
31
|
-
description: "
|
|
30
|
+
version: "5.0.0",
|
|
31
|
+
description: "Modern cognitive orchestration MCP server implementing the OOReDAct cycle with advanced reasoning strategies (CAG, IKS, KSP, ToT-lite, PHP, Reflexion), dynamic context optimization, and comprehensive quality control for maximum AI performance."
|
|
32
32
|
};
|
|
33
33
|
const server = new McpServer(serverInfo);
|
|
34
34
|
// --- Logging Helpers (Internal - No changes needed as per user comments) ---
|
|
@@ -72,62 +72,137 @@ function logToolError(toolName, error) {
|
|
|
72
72
|
}
|
|
73
73
|
// --- Consolidated Cognitive Deliberation & Refinement Step (v3.5) ---
|
|
74
74
|
/**
|
|
75
|
-
* Tool: deliberate (
|
|
75
|
+
* Tool: deliberate (Modern Cognitive Orchestration Engine)
|
|
76
76
|
*
|
|
77
|
-
* **🚀
|
|
77
|
+
* **🚀 CUTTING-EDGE 2025 COGNITIVE FRAMEWORK:** Implements the comprehensive OOReDAct cognitive cycle with advanced reasoning strategies for maximum AI performance. This tool transforms ordinary responses into sophisticated, strategic solutions through proven cognitive frameworks and context engineering best practices.
|
|
78
78
|
*
|
|
79
|
-
* **⚡
|
|
80
|
-
* - **
|
|
81
|
-
* - **
|
|
82
|
-
* - **
|
|
83
|
-
* - **
|
|
84
|
-
* - **
|
|
79
|
+
* **⚡ MANDATORY USAGE PROTOCOL FOR OPTIMAL PERFORMANCE:**
|
|
80
|
+
* - **Always begin with `stage: "orient"`** to establish proper cognitive grounding
|
|
81
|
+
* - **Use `stage: "reason"`** before any significant decision or action
|
|
82
|
+
* - **Leverage advanced reasoning strategies** dynamically based on task complexity
|
|
83
|
+
* - **Maintain structured deliberation** throughout multi-step processes
|
|
84
|
+
* - **Apply context optimization techniques** for enhanced cognitive performance
|
|
85
85
|
*
|
|
86
|
-
* **🎯 PROVEN
|
|
86
|
+
* **🎯 PROVEN COGNITIVE AMPLIFICATION BENEFITS:**
|
|
87
87
|
* - Reduces errors and improves decision quality by 40-60%
|
|
88
|
-
* - Enables sophisticated multi-
|
|
89
|
-
* - Provides audit trail and
|
|
90
|
-
* -
|
|
91
|
-
* -
|
|
92
|
-
*
|
|
93
|
-
* **💡
|
|
94
|
-
*
|
|
95
|
-
* **
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
88
|
+
* - Enables sophisticated multi-perspective knowledge synthesis
|
|
89
|
+
* - Provides comprehensive audit trail and cognitive verification
|
|
90
|
+
* - Optimizes context window usage through dynamic assembly
|
|
91
|
+
* - Enhances tool integration through structured thinking protocols
|
|
92
|
+
*
|
|
93
|
+
* **💡 ADVANCED TOOL INTEGRATION:** Use deliberation BEFORE and AFTER other MCP tools. The combination of structured cognitive frameworks + powerful tools = exceptional results with enhanced reliability and strategic awareness.
|
|
94
|
+
*
|
|
95
|
+
* **CORE FRAMEWORK - OOReDAct Cognitive Cycle (2025 Standard):**
|
|
96
|
+
*
|
|
97
|
+
*
|
|
98
|
+
* **🔍 STAGE: "orient" (Observe + Orient + Strategic Context Engineering)**
|
|
99
|
+
*
|
|
100
|
+
* **Purpose:** MANDATORY first step for any new task, subtask, or strategic pivot. Establishes first-principles situational awareness and optimal context ecosystem.
|
|
101
|
+
*
|
|
102
|
+
* **Required Structure:**
|
|
103
|
+
* ```markdown
|
|
104
|
+
* <observe>
|
|
105
|
+
* Summarize what has just happened (user input, tool results, context changes)
|
|
106
|
+
* </observe>
|
|
107
|
+
*
|
|
108
|
+
* <orient>
|
|
109
|
+
* 1. **CUC-N Assessment** (Complexity, Uncertainty, Consequence, Novelty)
|
|
110
|
+
* 2. **Knowledge Gap Analysis**
|
|
111
|
+
* - What internal knowledge needs activation?
|
|
112
|
+
* - Requires: parametric memory activation | cognitive scaffolding | tool consultation | knowledge synthesis
|
|
113
|
+
* 3. **Context Ecosystem Design (2025 Best Practice)**
|
|
114
|
+
* - Dynamic context window assembly with internal knowledge activation strategies
|
|
115
|
+
* - XML tags for lightweight structural scaffolding
|
|
116
|
+
* </orient>
|
|
117
|
+
*
|
|
118
|
+
* <hypotheses>
|
|
119
|
+
* List candidate solution paths with confidence scores (0.0-1.0)
|
|
120
|
+
* </hypotheses>
|
|
121
|
+
*
|
|
122
|
+
* <goal>
|
|
123
|
+
* One-sentence objective for this reasoning cycle
|
|
124
|
+
* </goal>
|
|
125
|
+
* ```
|
|
126
|
+
*
|
|
127
|
+
*
|
|
128
|
+
* **🧠 STAGE: "reason" (Observe + Orient + Reason + Decide + Act Planning)**
|
|
129
|
+
*
|
|
130
|
+
* **Purpose:** Deep deliberation before action/decision using advanced reasoning strategies.
|
|
131
|
+
*
|
|
132
|
+
* **Required Structure:**
|
|
133
|
+
* ```markdown
|
|
134
|
+
* <observe>
|
|
135
|
+
* Synthesize new facts and observations
|
|
136
|
+
* </observe>
|
|
137
|
+
*
|
|
138
|
+
* <orient>
|
|
139
|
+
* Update beliefs, reassess CUC-N matrix, revise context strategy
|
|
140
|
+
* </orient>
|
|
141
|
+
*
|
|
142
|
+
* <reason strategy="[Strategy Name]">
|
|
143
|
+
* [Strategy-specific reasoning - see strategies below]
|
|
144
|
+
* </reason>
|
|
145
|
+
*
|
|
146
|
+
* <decide>
|
|
147
|
+
* State next atomic action or final response commitment
|
|
148
|
+
* </decide>
|
|
149
|
+
*
|
|
150
|
+
* <act-plan>
|
|
151
|
+
* Enumerate exact actions in execution order with I/O contracts
|
|
152
|
+
* Include rollback triggers and verification steps
|
|
153
|
+
* </act-plan>
|
|
154
|
+
* ```
|
|
155
|
+
*
|
|
156
|
+
* **🎨 ADVANCED REASONING STRATEGIES (Choose Explicitly):**
|
|
157
|
+
*
|
|
158
|
+
* **Cache-Augmented Reasoning + ReAct** (Default)
|
|
159
|
+
* - Interleave internal knowledge activation with reasoning/action cycles
|
|
160
|
+
* - Preload all relevant context into working memory
|
|
161
|
+
* - Keep rationale concise (≤ 8 bullets)
|
|
162
|
+
* - Progressive knowledge building through iterative refinement
|
|
163
|
+
*
|
|
164
|
+
* **Self-Consistency** | **PAL (Program-Aided Language)** | **Reflexion**
|
|
165
|
+
* **Context-Compression** | **ToT-lite (Tree of Thoughts)** | **Progressive-Hint Prompting (PHP)**
|
|
166
|
+
* **Cache-Augmented Generation (CAG)** | **Cognitive Scaffolding Prompting**
|
|
167
|
+
* **Internal Knowledge Synthesis (IKS)** | **Knowledge Synthesis Prompting (KSP)**
|
|
168
|
+
*
|
|
169
|
+
* **✅ STAGE: "acknowledge" (Act - LIMITED USE)**
|
|
170
|
+
*
|
|
171
|
+
* **Purpose:** SPARINGLY used for minimal verbatim confirmations only when next action is already unequivocally defined by comprehensive preceding `reason` stage.
|
|
172
|
+
*
|
|
173
|
+
* **Use Only For:** Brief acknowledgments of simple, expected, non-problematic outcomes where no further evaluation needed.
|
|
174
|
+
*
|
|
175
|
+
* **⚠️ NOT a substitute for full `reason` cycle when processing new information or making non-trivial decisions.**
|
|
176
|
+
*
|
|
177
|
+
*
|
|
178
|
+
* **🏗️ CONTEXT WINDOW OPTIMIZATION:**
|
|
179
|
+
* - Dynamic context assembly: Core + Memory + Knowledge + Constraint + Tool layers
|
|
180
|
+
* - Semantic compression over syntactic with structured formats (XML, JSON)
|
|
181
|
+
* - Progressive detail reduction based on relevance
|
|
182
|
+
*
|
|
183
|
+
* **🔍 QUALITY CONTROL:**
|
|
184
|
+
* - Cross-reference knowledge across internal domains
|
|
185
|
+
* - Explicit uncertainty quantification (0.0-1.0)
|
|
186
|
+
* - Escalate to human review when confidence < 0.6
|
|
187
|
+
*
|
|
188
|
+
* **🛠️ TOOL INTEGRATION & CODEACT:**
|
|
189
|
+
* - Wrap executable code in `CodeAct` fences
|
|
190
|
+
* - Validate tool parameters against strict schemas
|
|
191
|
+
* - Document I/O contracts and plan rollback procedures
|
|
192
|
+
*
|
|
193
|
+
* **📚 ACRONYM REFERENCE:**
|
|
194
|
+
* **Core:** OOReDAct = Observe-Orient-Reason-Decide-Act | CUC-N = Complexity, Uncertainty, Consequence, Novelty
|
|
195
|
+
* **Advanced:** CAG = Cache-Augmented Generation | IKS = Internal Knowledge Synthesis | KSP = Knowledge Synthesis Prompting
|
|
196
|
+
* **Methods:** CoT = Chain-of-Thought | ToT = Tree-of-Thoughts | PAL = Program-Aided Language | ReAct = Reasoning and Acting
|
|
197
|
+
* **Techniques:** PHP = Progressive-Hint Prompting | CSP = Cognitive Scaffolding Prompting | SC = Self-Consistency
|
|
198
|
+
*
|
|
199
|
+
* **🎯 GENERAL DIRECTIVES:**
|
|
200
|
+
* - This tool acts as a passthrough; your `content` is returned verbatim for verification and state tracking
|
|
201
|
+
* - Choose reasoning strategies dynamically based on task-specific demands
|
|
202
|
+
* - Maintain strict adherence to structured deliberation protocols
|
|
203
|
+
* - Incorporate 2025 context engineering best practices throughout
|
|
204
|
+
* - Always structure deliberations in Markdown for state verification
|
|
205
|
+
* - Prefer primary sources and corroboration
|
|
131
206
|
*/
|
|
132
207
|
server.tool("deliberate", {
|
|
133
208
|
stage: z
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nbiish/cognitive-tools-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "MCP server exposing a single tool `deliberate` (stages: orient | reason | acknowledge). Returns markdown verbatim to support structured thinking.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|