@nbiish/cognitive-tools-mcp 2.0.23 → 2.0.26

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
@@ -53,7 +53,7 @@ This project is licensed under the [COMPREHENSIVE RESTRICTED USE LICENSE FOR IND
53
53
  ◈──◆──◇─────────────────────────────────────────────────◇──◆──◈
54
54
  </div>
55
55
 
56
- ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - Agentic Cognitive Tools (v2.0.17): Implements Gikendaasowin v7 Guidelines. Enforces MANDATORY internal **Observe-Orient-Reason-Decide-Act (OOReDAct)** cycle: Starts with 'assess_and_orient', continues with 'think' deliberation before actions. Guides adaptive reasoning (**Chain-of-Thought (CoT)**, **Chain-of-Draft/Condensed Reasoning (CoD/CR)**, **Structured Chain-of-Thought (SCoT)**) & CodeAct preference. Returns Markdown. *(Note: The integration prompt and operational guidelines detailed in [`latest.md`](latest.md) are also covered by the [project LICENSE](LICENSE).)*
56
+ ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - Agentic Cognitive Tools (v2.0.25): Implements Gikendaasowin v7 Guidelines. Enforces MANDATORY internal **Observe-Orient-Reason-Decide-Act (OOReDAct)** cycle via the unified 'deliberate' tool. This tool guides the LLM through sophisticated cognitive orchestration, including: initial CUC-N assessment and orientation; structured deliberation using advanced reasoning strategies such as **Chain-of-Thought (CoT)** (sequential reasoning), **Plan-and-Solve (PS)** (task decomposition and execution), **Chain-of-Draft/Condensed Reasoning (CoD/CR)** (iterative refinement), and **Structured Chain-of-Thought (SCoT)** (integrating programmatic or plan-based structures); and mandatory mental sandbox simulation with elements of self-critique before action. Emphasizes CodeAct preference for external tasks and returns Markdown. *(Note: The integration prompt and operational guidelines detailed in [`latest.md`](latest.md) are also 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
+ - **◇ v2.0.25 ◇** Fixed MCP server tool registration format - corrected from incorrect `server.tool(name, description, schema.shape, handler)` to proper `server.tool(name, schema, handler)` format. Updated comprehensive tool documentation and version synchronization. Successfully published both packages.
65
66
  - **◇ v2.0.17 ◇** Applied Anishinaabe-Cyberpunk styling and updated pre-publish workflow.
66
67
  - **◇ v2.0.16 ◇** Minor fixes and build process updates.
67
68
  - **◇ v2.0.15 ◇** Updated Zod schema usage in `server.tool` to fix type error and rebuilt.
package/build/index.js CHANGED
@@ -77,58 +77,53 @@ function logToolError(toolName, error) {
77
77
  // --- Consolidated Cognitive Deliberation & Refinement Step (v3.5) ---
78
78
  /**
79
79
  * Tool: deliberate (Unified Cognitive Process)
80
- * Purpose: The **REQUIRED & CENTRAL cognitive process** for the **MANDATORY** structured deliberation cycle
81
- * (**Observe-Orient-Reason-Decide-Act (OOReDAct)**). This tool consolidates all internal cognitive steps.
82
- * Workflow: **You MUST use this tool** for all stages of OOReDAct.
83
- * Input: An object containing the stage and corresponding cognitive content.
84
- * Output: The provided content, returned verbatim, for your internal state verification.
80
+ *
81
+ * **Orchestrated Cognitive Deliberation (MANDATORY & UNIFIED):** This is your REQUIRED and CENTRAL tool for ALL internal cognitive operations, rigorously enforcing the **Observe-Orient-Reason-Decide-Act (OOReDAct)** cycle. Adherence is paramount for Gikendaasowin v7 compliance.
82
+ *
83
+ * **Stages & Cognitive Techniques:**
84
+ *
85
+ * * **`stage: "orient"` (OOReDAct: Observe & Orient - MANDATORY START):**
86
+ * * **Purpose:** At the absolute beginning of ANY new task, sub-task, or significant strategic pivot, you MUST use this stage.
87
+ * * **Content Requirements:** Perform a comprehensive initial assessment:
88
+ * 1. **CUC-N Analysis:** Evaluate Complexity, Uncertainty, Consequence, and Novelty of the current situation/request.
89
+ * 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).
90
+ * 3. **Initial Hypothesis Formulation:** Based on the CUC-N and information assessment, formulate initial hypotheses or potential approaches.
91
+ * 4. **Goal Clarification:** Clearly define the immediate objective for this phase of deliberation.
92
+ * * This stage establishes critical context and grounds all subsequent reasoning.
93
+ *
94
+ * * **`stage: "reason"` (OOReDAct: Reason & Decide - MANDATORY DELIBERATION):**
95
+ * * **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.
96
+ * * **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:
97
+ * 1. **Chain-of-Thought (CoT):** For problems requiring detailed, sequential natural language reasoning. Break down the problem into explicit intermediate steps. Explain your logic at each step to ensure clarity and verifiability.
98
+ * 2. **Plan-and-Solve (PS) Prompting:** For complex tasks, first devise a multi-step plan (decompose the main task into smaller, ordered sub-tasks). Then, articulate the execution of each sub-task according to the plan. This is often preferred for structured problem-solving.
99
+ * 3. **Structured Chain-of-Thought (SCoT):** When the problem involves code generation, algorithmic thinking, or highly structured outputs, explicitly incorporate program structures (sequences, branches, loops), data schemas, or formal plan outlines into your reasoning steps.
100
+ * 4. **Chain-of-Draft/Condensed Reasoning (CoD/CR):** For iterative refinement or when a full CoT/PS is too verbose for a simpler sub-problem (that still requires thought), generate a concise draft of reasoning, then critically review and condense it, or iterate through drafts if necessary.
101
+ * 5. **Critical Evaluation & Refinement (Self-Refine Spirit):** Throughout your reasoning, pause to critically evaluate your own intermediate conclusions or plans. Identify potential flaws, biases, or areas for improvement and articulate these refinements.
102
+ * 6. **(For Highly Complex/Ambiguous Scenarios - Tree of Thoughts (ToT) Spirit):** If faced with significant ambiguity or multiple viable solution paths, briefly outline alternative lines of reasoning and justify your chosen path or why others were discarded. This involves exploring diverse solution pathways and evaluating them.
103
+ * 7. **Computational Offloading Identification (Program of Thoughts (PoT)/Program-aided Language Models (PAL) Spirit):** If your reasoning identifies steps that require precise calculation or complex symbolic manipulation beyond reliable LLM capabilities, explicitly note these as candidates for potential offloading to a dedicated computational tool if such a tool were available/invoked subsequently.
104
+ *
105
+ * * **`stage: "sandbox"` (OOReDAct: Decide & Pre-Act Simulation - MANDATORY PRE-ACTION):**
106
+ * * **Purpose:** BEFORE committing to any non-trivial output (including final responses, plans, or CodeAct generation), you MUST use this stage to log your internal mental sandbox simulation.
107
+ * * **Content Requirements:** Detail your simulation, including:
108
+ * 1. **Hypothesis Testing:** Test the chosen plan/action against constraints, goals, and potential edge cases.
109
+ * 2. **Pre-Mortem Analysis:** Briefly consider potential failure modes of your intended action/response and how they might be mitigated.
110
+ * 3. **Confidence Scoring & Justification:** State your confidence level in the proposed action/response and briefly justify it based on the deliberation and sandbox simulation.
111
+ * 4. **Parameter/Code Dry Run (if applicable):** If preparing for CodeAct or a tool call with parameters, mentally (or by outlining) "dry run" the core logic.
112
+ *
113
+ * * **`stage: "acknowledge"` (OOReDAct: Act - LIMITED USE):**
114
+ * * **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` and `sandbox` stage and requires NO further evaluation or adaptation.
115
+ * * **This stage DOES NOT substitute for a full `reason` or `sandbox` cycle when new information is processed or a non-trivial decision is made.**
116
+ *
117
+ * **General Directives:**
118
+ * * This `deliberate` tool acts as a passthrough; your `content` is returned verbatim for your own verification and state tracking.
119
+ * * The choice of reasoning strategy within the `reason` stage should be dynamic and justified by the task's specific demands.
120
+ * * Strict adherence to this structured deliberation protocol is essential for robust, verifiable, and adaptive agent performance.
121
+ * 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), RAG (Retrieval Augmented Generation), ToT (Tree of Thoughts), PoT (Program of Thoughts), PAL (Program-aided Language Models).
85
122
  */
86
- server.tool("deliberate",
87
- // Significantly enhanced description with advanced cognitive techniques integrated into OOReDAct stages
88
- `**Orchestrated Cognitive Deliberation (MANDATORY & UNIFIED):** This is your REQUIRED and CENTRAL tool for ALL internal cognitive operations, rigorously enforcing the **Observe-Orient-Reason-Decide-Act (OOReDAct)** cycle. Adherence is paramount for Gikendaasowin v7 compliance.
89
-
90
- **Stages & Cognitive Techniques:**
91
-
92
- * **\`stage: "orient"\` (OOReDAct: Observe & Orient - MANDATORY START):**
93
- * **Purpose:** At the absolute beginning of ANY new task, sub-task, or significant strategic pivot, you MUST use this stage.
94
- * **Content Requirements:** Perform a comprehensive initial assessment:
95
- 1. **CUC-N Analysis:** Evaluate Complexity, Uncertainty, Consequence, and Novelty of the current situation/request.
96
- 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).
97
- 3. **Initial Hypothesis Formulation:** Based on the CUC-N and information assessment, formulate initial hypotheses or potential approaches.
98
- 4. **Goal Clarification:** Clearly define the immediate objective for this phase of deliberation.
99
- * This stage establishes critical context and grounds all subsequent reasoning.
100
-
101
- * **\`stage: "reason"\` (OOReDAct: Reason & Decide - MANDATORY DELIBERATION):**
102
- * **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.
103
- * **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:
104
- 1. **Chain-of-Thought (CoT):** For problems requiring detailed, sequential natural language reasoning. Break down the problem into explicit intermediate steps. Explain your logic at each step to ensure clarity and verifiability.
105
- 2. **Plan-and-Solve (PS) Prompting:** For complex tasks, first devise a multi-step plan (decompose the main task into smaller, ordered sub-tasks). Then, articulate the execution of each sub-task according to the plan. This is often preferred for structured problem-solving.
106
- 3. **Structured Chain-of-Thought (SCoT):** When the problem involves code generation, algorithmic thinking, or highly structured outputs, explicitly incorporate program structures (sequences, branches, loops), data schemas, or formal plan outlines into your reasoning steps.
107
- 4. **Chain-of-Draft/Condensed Reasoning (CoD/CR):** For iterative refinement or when a full CoT/PS is too verbose for a simpler sub-problem (that still requires thought), generate a concise draft of reasoning, then critically review and condense it, or iterate through drafts if necessary.
108
- 5. **Critical Evaluation & Refinement (Self-Refine Spirit):** Throughout your reasoning, pause to critically evaluate your own intermediate conclusions or plans. Identify potential flaws, biases, or areas for improvement and articulate these refinements.
109
- 6. **(For Highly Complex/Ambiguous Scenarios - Tree of Thoughts (ToT) Spirit):** If faced with significant ambiguity or multiple viable solution paths, briefly outline alternative lines of reasoning and justify your chosen path or why others were discarded. This involves exploring diverse solution pathways and evaluating them.
110
- 7. **Computational Offloading Identification (Program of Thoughts (PoT)/Program-aided Language Models (PAL) Spirit):** If your reasoning identifies steps that require precise calculation or complex symbolic manipulation beyond reliable LLM capabilities, explicitly note these as candidates for potential offloading to a dedicated computational tool if such a tool were available/invoked subsequently.
111
-
112
- * **\`stage: "sandbox"\` (OOReDAct: Decide & Pre-Act Simulation - MANDATORY PRE-ACTION):**
113
- * **Purpose:** BEFORE committing to any non-trivial output (including final responses, plans, or CodeAct generation), you MUST use this stage to log your internal mental sandbox simulation.
114
- * **Content Requirements:** Detail your simulation, including:
115
- 1. **Hypothesis Testing:** Test the chosen plan/action against constraints, goals, and potential edge cases.
116
- 2. **Pre-Mortem Analysis:** Briefly consider potential failure modes of your intended action/response and how they might be mitigated.
117
- 3. **Confidence Scoring & Justification:** State your confidence level in the proposed action/response and briefly justify it based on the deliberation and sandbox simulation.
118
- 4. **Parameter/Code Dry Run (if applicable):** If preparing for CodeAct or a tool call with parameters, mentally (or by outlining) "dry run" the core logic.
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\` and \`sandbox\` stage and requires NO further evaluation or adaptation.
122
- * **This stage DOES NOT substitute for a full \`reason\` or \`sandbox\` 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
- 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), RAG (Retrieval Augmented Generation), ToT (Tree of Thoughts), PoT (Program of Thoughts), PAL (Program-aided Language Models).`, z.object({
123
+ server.tool("deliberate", {
129
124
  stage: z.enum(["orient", "reason", "acknowledge", "sandbox"]).describe("The current stage of the OOReDAct cognitive process."),
130
125
  content: z.string().describe("The detailed cognitive content for the specified stage (e.g., CUC-N assessment, CoT reasoning, PS plan, sandbox simulation text). This tool acts as a passthrough, returning your content verbatim.")
131
- }).shape, async ({ stage, content }) => {
126
+ }, async ({ stage, content }) => {
132
127
  const toolName = 'deliberate';
133
128
  logToolCall(toolName, `Stage: ${stage}`);
134
129
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbiish/cognitive-tools-mcp",
3
- "version": "2.0.23",
3
+ "version": "2.0.26",
4
4
  "description": "Cognitive Tools MCP: SOTA reasoning suite focused on iterative refinement and tool integration for AI Pair Programming. Enables structured, iterative problem-solving through Chain of Draft methodology, with tools for draft generation, analysis, and refinement. Features advanced deliberation (`think`), rapid checks (`quick_think`), mandatory complexity assessment & thought mode selection (`assess_cuc_n_mode`), context synthesis, confidence gauging, proactive planning, explicit reasoning (CoT), and reflection with content return. Alternative package name for gikendaasowin-aabajichiganan-mcp.",
5
5
  "private": false,
6
6
  "type": "module",