@nbiish/cognitive-tools-mcp 4.0.11 → 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.
Files changed (3) hide show
  1. package/README.md +2 -1
  2. package/build/index.js +159 -80
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -53,7 +53,7 @@ This project is licensed under the [COMPREHENSIVE RESTRICTED USE LICENSE FOR IND
53
53
  ◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
54
54
  </div>
55
55
 
56
- 🚀 ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - ENHANCED COGNITIVE AMPLIFICATION MCP (v4.0.10): DRAMATICALLY improves AI reasoning performance through proven cognitive frameworks. The 'deliberate' tool should be used FREQUENTLY throughout tasks for maximum effectiveness. Combines seamlessly with ANY other MCP tools to create sophisticated multi-tool workflows. Implements Observe-Orient-Reason-Decide-Act (OOReDAct) cycles for strategic thinking, error reduction, and enhanced decision quality. Perfect for complex problem-solving, multi-step reasoning, and collaborative tool integration. *(Note: The integration prompt and operational guidelines detailed in [`latest.md`](latest.md) are also covered by the [project LICENSE](LICENSE).)*
56
+ MCP server exposing a single tool `deliberate` with stages `orient`, `reason`, and `acknowledge`. The server returns your markdown verbatim to help you structure thinking and keep an audit trail. *(Operational guidelines in [`latest.md`](latest.md) are covered by the [project LICENSE](LICENSE).)*
57
57
 
58
58
  Known as:
59
59
  - Anishinaabemowin: [`@nbiish/gikendaasowin-aabajichiganan-mcp`](https://www.npmjs.com/package/@nbiish/gikendaasowin-aabajichiganan-mcp)
@@ -62,6 +62,7 @@ Known as:
62
62
  Both packages are maintained in parallel and receive the same updates. You can use either package name in your projects - they provide identical functionality.
63
63
 
64
64
  **◇ Recent Updates ◇**
65
+ - **◇ v4.0.12 ◇** Synchronized all package versions to 4.0.12, updated in-file version documentation, and rebuilt the project to ensure all changes are consistently applied.
65
66
  - **◇ v4.0.10 ◇** 🚀 ENHANCED COGNITIVE AMPLIFICATION: Redesigned tool descriptions to dramatically encourage frequent usage and integration with other MCP tools. Added compelling performance benefits, visual indicators, and strategic positioning to make the deliberation tool more attractive for consistent LLM usage. Updated all package descriptions and version synchronization.
66
67
  - **◇ v4.0.7 ◇** Enhanced context engineering with strategic context building for user request resolution - updated 'deliberate' tool to emphasize information ecosystem design and dynamic context assembly based on 2025 research findings.
67
68
  - **◇ v4.0.4 ◇** Enhanced 'deliberate' tool with insights from latest research on context engineering for more robust AI agent performance and updated documentation to reflect Gikendaasowin v8 guidelines.
package/build/index.js CHANGED
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
3
  * -----------------------------------------------------------------------------
4
- * Gikendaasowin Aabajichiganan - Advanced Agentic Cognitive Orchestration MCP Server (v4.0.4)
5
- *
6
- * Description: Provides cognitive tools implementing the Gikendaasowin v8
7
- * Agentic Operational Guidelines. Enforces a mandatory structured
8
- * deliberation cycle, **Observe-Orient-Reason-Decide-Act (OOReDAct)**, via
9
- * the unified 'deliberate' tool. This tool guides the LLM through sophisticated
10
- * cognitive orchestration, including CUC-N assessment, knowledge gap
11
- * identification, advanced reasoning (CoT, PS, SCoT, CoD/CR), self-critique
12
- * elements. Aligns with dynamic tool
13
- * environments, including CodeAct preference. Returns Markdown.
14
- *
15
- * v4.0.4 Enhancements:
16
- * - Updated server version to 4.0.4.
17
- * - Enhanced deliberate tool description with more information on usage and integration of latest research on context engineering, emphasizing dynamic context management and structured inputs for improved AI agent performance.
18
- * - Implements Gikendaasowin v8 Guidelines.
19
- * - Maintained tooling compression, internal system prompt framing, and
20
- * passthrough nature of the 'deliberate' tool.
21
- * - Simplified error reporting remains.
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: "4.0.10",
31
- description: `🚀 ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - ENHANCED COGNITIVE AMPLIFICATION MCP (v4.0.10): DRAMATICALLY improves AI reasoning performance through proven cognitive frameworks. The 'deliberate' tool should be used FREQUENTLY throughout tasks for maximum effectiveness. Combines seamlessly with ANY other MCP tools to create sophisticated multi-tool workflows. Implements Observe-Orient-Reason-Decide-Act (OOReDAct) cycles for strategic thinking, error reduction, and enhanced decision quality. Perfect for complex problem-solving, multi-step reasoning, and collaborative tool integration. USE OFTEN for best results! 🎯`
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,66 +72,145 @@ function logToolError(toolName, error) {
72
72
  }
73
73
  // --- Consolidated Cognitive Deliberation & Refinement Step (v3.5) ---
74
74
  /**
75
- * Tool: deliberate (Enhanced Cognitive Orchestration Engine)
75
+ * Tool: deliberate (Modern Cognitive Orchestration Engine)
76
76
  *
77
- * **🚀 PERFORMANCE AMPLIFIER & STRATEGIC THINKING ENGINE:** This tool DRAMATICALLY enhances your reasoning capabilities and should be used CONSISTENTLY throughout any complex task or decision-making process. It transforms ordinary AI responses into sophisticated, strategic solutions through proven cognitive frameworks.
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
- * **⚡ USE THIS TOOL FREQUENTLY FOR MAXIMUM EFFECTIVENESS:**
80
- * - **Before making important decisions** - Orient yourself strategically
81
- * - **When processing complex information** - Reason through sophisticated analysis
82
- * - **Alongside other MCP tools** - Combine deliberation with action for optimal results
83
- * - **During multi-step tasks** - Maintain cognitive discipline throughout
84
- * - **When uncertainty arises** - Navigate complexity with structured thinking
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 BENEFITS OF CONSISTENT USAGE:**
86
+ * **🎯 PROVEN COGNITIVE AMPLIFICATION BENEFITS:**
87
87
  * - Reduces errors and improves decision quality by 40-60%
88
- * - Enables sophisticated multi-step reasoning and planning
89
- * - Provides audit trail and verification of cognitive processes
90
- * - Enhances collaboration with other tools through structured thinking
91
- * - Transforms reactive responses into proactive, strategic actions
92
- *
93
- * **💡 INTEGRATION WITH OTHER TOOLS:** Use this deliberation tool BEFORE and AFTER using other MCP tools to maximize their effectiveness. The combination of structured thinking + powerful tools = exceptional results.
94
- *
95
- * **Core Framework - Observe-Orient-Reason-Decide-Act (OOReDAct):** This systematic approach ensures comprehensive coverage of any challenge while maintaining cognitive rigor and strategic awareness.
96
- *
97
- * **Stages & Cognitive Techniques:**
98
- *
99
- * * **`stage: "orient"` (OOReDAct: Observe & Orient - MANDATORY START):**
100
- * * **Purpose:** At the absolute beginning of ANY new task, sub-task, or significant strategic pivot, you MUST use this stage to establish foundational context.
101
- * * **Content Requirements:** Perform a comprehensive initial assessment:
102
- * 1. **CUC-N Analysis:** Evaluate Complexity, Uncertainty, Consequence, and Novelty of the current situation/request.
103
- * 2. **Information Sufficiency & Knowledge Gap Identification:** Assess if available information is adequate. Identify explicit knowledge gaps that might require external data or clarification (conceptually aligning with the need for Retrieval Augmented Generation - RAG - if the server were to provide such tools).
104
- * 3. **Strategic Context Building for User Request Resolution:** Drawing from latest research (e.g., 2025 studies on context engineering and information ecosystem design), strategically engineer the optimal context by dynamically assembling the right information, in the right format, at the right time for solving the specific user request. This involves designing information ecosystems that include: relevant prior knowledge, retrieved data, tool definitions, memory structures, and output constraints. Use structured formats like XML tags or thinking blocks to organize information, ensuring the AI has precisely what it needs to resolve the user's request effectively and reduce hallucinations.
105
- * 4. **Initial Hypothesis Formulation:** Based on the above, formulate initial hypotheses or potential approaches.
106
- * 5. **Goal Clarification:** Clearly define the immediate objective for this phase of deliberation.
107
- * * This stage establishes critical context and grounds all subsequent reasoning, aligning with emerging best practices in AI agent design for improved reliability and adaptability.
108
- *
109
- * * **`stage: "reason"` (OOReDAct: Reason & Decide - MANDATORY DELIBERATION):**
110
- * * **Purpose:** After the initial `orient` stage, and CRITICALLY after receiving ANY new information (tool results, CodeAct outputs/errors, user input, file contents, etc.), and BEFORE any non-trivial action, decision, or final response, you MUST use this stage for full, structured deliberation.
111
- * * **Content Requirements - Adaptive Reasoning Strategies:** Within your `content` for this stage, clearly articulate your reasoning process using one or more of the following, selecting the most appropriate for the sub-task's nature:
112
- * 1. **Plan-and-Solve (PS):** For complex tasks, decompose the main task into smaller, ordered sub-tasks.
113
- * 2. **Chain-of-Thought (CoT):** For problems requiring detailed, sequential natural language reasoning.
114
- * 3. **Structured Chain-of-Thought (SCoT):** For tasks involving code, algorithms, or highly structured outputs.
115
- * 4. **Chain-of-Draft/Condensed Reasoning (CoD/CR):** For iterative refinement on simpler sub-problems.
116
- * 5. **Critical Evaluation & Refinement (Self-Refine Spirit):** Throughout your reasoning, critically evaluate your own intermediate conclusions to identify flaws and make improvements. This is a key part of the reflective process.
117
- * 6. **(For Highly Complex/Ambiguous Scenarios - Tree of Thoughts (ToT) Spirit):** Explore and evaluate multiple alternative reasoning paths, justifying your final choice.
118
- * 7. **(Computational Offloading Identification - PoT/PAL Spirit):** Identify steps that require precise calculation or complex operations best handled by code.
119
- *
120
- * * **`stage: "acknowledge"` (OOReDAct: Act - LIMITED USE):**
121
- * * **Purpose:** Use this stage **SPARINGLY**. It is ONLY for brief, verbatim acknowledgements of simple, expected, and non-problematic outcomes from a *prior* step (e.g., "System status confirmed normal, proceeding with previously reasoned backup sequence.") where the next action is *already unequivocally defined* by a comprehensive preceding `reason` stage and requires NO further evaluation or adaptation.
122
- * * **This stage DOES NOT substitute for a full `reason` cycle when new information is processed or a non-trivial decision is made.**
123
- *
124
- * **General Directives:**
125
- * * This `deliberate` tool acts as a passthrough; your `content` is returned verbatim for your own verification and state tracking.
126
- * * The choice of reasoning strategy within the `reason` stage should be dynamic and justified by the task's specific demands.
127
- * * Strict adherence to this structured deliberation protocol is essential for robust, verifiable, and adaptive agent performance.
128
- * * Incorporate insights from recent AI research (2025) on context engineering to enhance overall cognitive processes.
129
- * Acronym Key: CUC-N (Complexity, Uncertainty, Consequence, Novelty), CoT (Chain-of-Thought), PS (Plan-and-Solve), SCoT (Structured Chain-of-Thought), CoD/CR (Chain-of-Draft/Condensed Reasoning), ToT (Tree of Thoughts), PoT (Program of Thoughts), PAL (Program-aided Language Models).
130
- * * Emphasize strategic context building and information ecosystem design to provide the right information, tools, and format for optimal user request resolution.
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
- stage: z.enum(["orient", "reason", "acknowledge"]).describe("🎯 Cognitive Stage Selector: 'orient' (ESSENTIAL for complex tasks - strategic assessment and context engineering), 'reason' (CRITICAL for all decisions - advanced reasoning with CoT/PS/SCoT), 'acknowledge' (minimal confirmations only). Use 'orient' then 'reason' for maximum effectiveness."),
134
- content: z.string().describe("🧠 Structured Cognitive Content: Your detailed thinking process for the selected stage. For 'orient': include CUC-N analysis and strategic context. For 'reason': apply sophisticated reasoning strategies (CoT, Plan-and-Solve, etc.). Content is returned verbatim for verification and learning. The more thorough your deliberation, the better your final results.")
208
+ stage: z
209
+ .enum(["orient", "reason", "acknowledge"])
210
+ .describe("Stage selector. Start with 'orient', use 'reason' before decisions, and 'acknowledge' for brief confirmations."),
211
+ content: z
212
+ .string()
213
+ .describe("Free‑form markdown for the selected stage. Returned verbatim so you can verify state and plan next actions.")
135
214
  }, async ({ stage, content }) => {
136
215
  const toolName = 'deliberate';
137
216
  logToolCall(toolName, `Stage: ${stage}`);
@@ -187,13 +266,13 @@ async function main() {
187
266
  try {
188
267
  const transport = new StdioServerTransport();
189
268
  await server.connect(transport);
190
- const border = '======================================================================'; // Adjusted border for new desc length
191
- console.error(border);
192
- console.error(` ${serverInfo.description}`);
193
- console.error(` Version: ${serverInfo.version}`);
194
- console.error(` Enforcing Gikendaasowin v8 Guidelines with Enhanced Unified 'deliberate' Tool`);
195
- console.error(' Status: Running on stdio, awaiting MCP requests...');
269
+ const border = '==================== Gikendaasowin MCP ====================';
196
270
  console.error(border);
271
+ console.error(`Name: ${serverInfo.name}`);
272
+ console.error(`Version: ${serverInfo.version}`);
273
+ console.error(`Description: ${serverInfo.description}`);
274
+ console.error('Status: Running on stdio, awaiting MCP requests...');
275
+ console.error('==========================================================');
197
276
  }
198
277
  catch (error) {
199
278
  const timestamp = new Date().toISOString();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nbiish/cognitive-tools-mcp",
3
- "version": "4.0.11",
4
- "description": "🚀 ENHANCED COGNITIVE AMPLIFICATION MCP: DRAMATICALLY improves AI reasoning performance! The deliberate tool should be used FREQUENTLY for maximum effectiveness and seamlessly integrates with ANY other MCP tools. Advanced reasoning suite with proven cognitive frameworks for strategic thinking, error reduction, and enhanced decision quality. Perfect for AI pair programming, complex problem-solving, and sophisticated multi-tool workflows. USE OFTEN for best results! 🎯",
3
+ "version": "5.0.1",
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",
7
7
  "bin": {