@nbiish/cognitive-tools-mcp 0.9.14 → 0.9.16

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 (2) hide show
  1. package/README.md +123 -65
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -46,12 +46,16 @@ Both packages are maintained in parallel and receive the same updates. You can u
46
46
 
47
47
  ## Features
48
48
 
49
- Provides five cognitive tools for AI agents:
50
- - `think`: Internal workspace for structured analysis and planning
51
- - `chain_of_thought`: Sequential reasoning steps for problem-solving
52
- - `reflection`: Self-critique and improvement of reasoning
53
- - `plan_and_solve`: High-level strategy development
54
- - `chain_of_draft`: Concise, iterative reasoning steps
49
+ Provides a suite of cognitive tools for AI agents, enabling structured reasoning and iterative refinement:
50
+ - `assess_cuc_n_mode`: **Mandatory** initial assessment of task complexity (CUC-N) to select cognitive mode (`think` or `quick_think`).
51
+ - `think`: **Mandatory** central hub for analysis, planning, verification, and self-correction, incorporating OODReAct principles.
52
+ - `quick_think`: Lightweight cognitive checkpoint for simple, low CUC-N steps or trivial confirmations.
53
+ - `gauge_confidence`: Meta-cognitive check to state confidence (High/Medium/Low) in a plan, analysis, or draft.
54
+ - `chain_of_thought`: Guides internal generation of detailed, step-by-step reasoning (CoT).
55
+ - `plan_and_solve`: Guides internal generation of a structured, multi-step plan.
56
+ - `chain_of_draft`: Signals internal generation/refinement of concise drafts (CoD).
57
+ - `reflection`: Guides internal generation of a critical self-evaluation (critique).
58
+ - `synthesize_prior_reasoning`: Guides internal generation of a summary to consolidate context.
55
59
 
56
60
  ## Installation
57
61
 
@@ -95,49 +99,67 @@ Or:
95
99
 
96
100
  ## Tool Descriptions
97
101
 
98
- ### Think Tool
99
- - **Purpose**: MANDATORY core cognitive step for structured deliberation. Use this internal workspace for analysis, planning, verification, risk assessment, and self-correction before ANY action and after using other cognitive tools.
100
- - **Input**: `thought` (string) - Your detailed internal monologue and reasoning. Structure clearly with sections like Analysis, Plan, Verification, Risk Assessment, and Self-Correction.
101
- - **Response Format**:
102
- ```json
103
- {
104
- "content": [{
105
- "type": "text",
106
- "text": "Returns the complete thought content you provided for explicit grounding in the next step"
107
- }]
108
- }
109
- ```
102
+ *(Note: For detailed usage, workflow, and mandatory rules, always refer to [`latest.md`](latest.md))*
103
+
104
+ ### `assess_cuc_n_mode`
105
+ - **Purpose**: **Mandatory Pre-Deliberation Assessment.** Evaluates task Complexity, Uncertainty, Consequence, Novelty (CUC-N) to determine required cognitive depth and initial strategy. MUST be called before starting complex tasks or changing strategy.
106
+ - **Input**: `assessment_and_choice` (string) - Your structured assessment including Situation Description, CUC-N Ratings, Rationale, Recommended Strategy, and Explicit Mode Selection (`Selected Mode: think` or `Selected Mode: quick_think`).
107
+ - **Follow-up**: Mandatory `think` or `quick_think` (based on selection).
108
+
109
+ ### `think`
110
+ - **Purpose**: **MANDATORY Central Hub for Analysis and Planning.** Called after assessment, other cognitive tools, internal drafts, or external action results. Incorporates OODReAct principles (Observe-Orient-Decide-Reason-Act).
111
+ - **Input**: `thought` (string) - Your detailed internal monologue, ideally structured with sections like Observe, Orient, Decide, Reason, Act, Verification, Risk & Contingency, Learning & Adaptation.
112
+ - **Follow-up**: Execute the immediate next action defined in the `## Plan:` (or `## Decide:`) section.
113
+
114
+ ### `quick_think`
115
+ - **Purpose**: Cognitive Checkpoint for streamlined processing and simple confirmations where detailed analysis via `think` is unnecessary. Use ONLY when appropriate (Low CUC-N, trivial steps).
116
+ - **Input**: `brief_thought` (string) - Your concise thought or confirmation.
117
+ - **Follow-up**: Execute the simple next step.
118
+
119
+ ### `gauge_confidence`
120
+ - **Purpose**: Meta-Cognitive Checkpoint. Guides *internal stating* of confidence (High/Medium/Low) and justification regarding a specific plan, analysis, or draft.
121
+ - **Workflow**: Internally generate assessment -> Call tool.
122
+ - **Input**: `assessment_and_confidence` (string) - Text containing the item being assessed AND your explicit internal assessment (Confidence Level + Justification).
123
+ - **Follow-up**: Mandatory `think` or `quick_think`.
124
+
125
+ ### `chain_of_thought`
126
+ - **Purpose**: Guides *internal generation* of a detailed, step-by-step reasoning draft (CoT).
127
+ - **Workflow**: Internally generate CoT -> Call tool.
128
+ - **Input**:
129
+ - `generated_cot_text` (string) - The full CoT draft you generated internally.
130
+ - `problem_statement` (string) - The original problem this CoT addresses.
131
+ - **Follow-up**: Mandatory `think` or `quick_think`.
132
+
133
+ ### `plan_and_solve`
134
+ - **Purpose**: Guides *internal generation* of a structured plan draft.
135
+ - **Workflow**: Internally generate plan -> Call tool.
136
+ - **Input**:
137
+ - `generated_plan_text` (string) - The full, structured plan draft you generated internally.
138
+ - `task_objective` (string) - The original high-level task objective.
139
+ - **Follow-up**: Mandatory `think` or `quick_think`.
140
+
141
+ ### `chain_of_draft`
142
+ - **Purpose**: Signals that one or more **internal drafts** have been generated/refined using Chain of Draft (CoD) principles (concise, note-like steps).
143
+ - **Workflow**: Internally generate/refine draft(s) -> Call tool.
144
+ - **Input**: `draft_description` (string) - Brief but specific description of the draft(s) generated/refined internally.
145
+ - **Follow-up**: Mandatory `think` or `quick_think`.
146
+
147
+ ### `reflection`
148
+ - **Purpose**: Guides *internal generation* of a critical self-evaluation (critique) on a prior step, draft, plan, or outcome.
149
+ - **Workflow**: Internally generate critique -> Call tool.
150
+ - **Input**:
151
+ - `generated_critique_text` (string) - The full critique text you generated internally.
152
+ - `input_subject_description` (string) - A brief description of what was critiqued.
153
+ - **Follow-up**: Mandatory `think` or `quick_think`.
154
+
155
+ ### `synthesize_prior_reasoning`
156
+ - **Purpose**: Context Management Tool. Guides *internal generation* of a structured summary of preceding context.
157
+ - **Workflow**: Internally generate summary -> Call tool.
158
+ - **Input**:
159
+ - `generated_summary_text` (string) - The full, structured summary text you generated internally.
160
+ - `context_to_summarize_description` (string) - Description of the context that was summarized.
161
+ - **Follow-up**: Mandatory `think` or `quick_think`.
110
162
 
111
- ### Chain of Thought Tool
112
- - **Purpose**: Generate explicit, sequential reasoning steps for problem-solving
113
- - **Input**:
114
- - `generated_cot_text` (string) - The full, step-by-step Chain of Thought text you generated internally
115
- - `problem_statement` (string) - The original problem statement this CoT addresses
116
- - **Response Format**: Returns the complete CoT text for mandatory analysis in the next step
117
-
118
- ### Reflection Tool
119
- - **Purpose**: Self-critique and improvement of reasoning or plans
120
- - **Input**:
121
- - `generated_critique_text` (string) - The full critique text you generated internally
122
- - `input_reasoning_or_plan` (string) - The original text that was critiqued
123
- - **Response Format**: Returns the complete critique text for mandatory analysis in the next step
124
-
125
- ### Plan and Solve Tool
126
- - **Purpose**: High-level strategy development for complex objectives
127
- - **Input**:
128
- - `generated_plan_text` (string) - The full, structured plan text you generated internally
129
- - `task_objective` (string) - The original high-level task objective this plan addresses
130
- - **Response Format**: Returns the complete plan text for mandatory analysis in the next step
131
-
132
- ### Chain of Draft Tool
133
- - **Purpose**: Concise, iterative reasoning steps for rapid exploration
134
- - **Input**: `problem_statement` (string) - Problem suitable for concise, iterative reasoning
135
- - **Response Format**: Returns a confirmation message; the drafts you generated internally must be analyzed in the next step
136
-
137
- ### Mandatory Pre-Deliberation Assessment
138
- - **Purpose**: Must be called BEFORE initiating significant cognitive processes (`think`) or complex action sequences. Evaluates CUC-N, recommends strategy, commits to next thought mode.
139
- - **Input**: `assessment_and_choice` (string) - Your assessment including Situation Description, CUC-N Ratings, Recommended Strategy, and Selected Mode
140
- - **Response Format**: Returns confirmation with the selected mode
141
163
 
142
164
  ## Development
143
165
 
@@ -218,6 +240,8 @@ The script includes robust error handling:
218
240
 
219
241
  Here are some example test cases that demonstrate the cognitive tools using culturally appropriate Anishinaabe concepts. These examples are provided with respect and acknowledgment of Anishinaabe teachings.
220
242
 
243
+ *(Note: These examples show tool invocation structure. The actual content for inputs like `thought`, `generated_cot_text`, etc., must be generated internally by the agent based on the specific task, following the workflows described in `latest.md`.)*
244
+
221
245
  ### Using the MCP Inspector
222
246
 
223
247
  1. Start the MCP Inspector:
@@ -227,62 +251,96 @@ npm run inspector
227
251
 
228
252
  2. Connect to the server and try these example tool calls:
229
253
 
230
- #### Think Tool Example
254
+ #### `assess_cuc_n_mode` Example
255
+ ```json
256
+ {
257
+ "toolName": "assess_cuc_n_mode",
258
+ "arguments": {
259
+ "assessment_and_choice": "1) Situation Description: User wants to understand the Anishinaabe concept of Mino-Bimaadiziwin (Living the Good Life).\\n2) CUC-N Ratings: Complexity: Medium (Involves cultural concepts), Uncertainty: Medium (Requires accessing and synthesizing knowledge), Consequence: Medium (Accuracy is important), Novelty: Low (Explaining concepts is common).\\n3) Rationale: Requires careful explanation of interconnected teachings.\\n4) Recommended Initial Strategy: Use chain_of_thought to break down the concept.\\n5) Explicit Mode Selection: Selected Mode: think"
260
+ }
261
+ }
262
+ ```
263
+
264
+ #### `think` Tool Example
231
265
  ```json
232
266
  {
233
267
  "toolName": "think",
234
268
  "arguments": {
235
- "thought": "Analyzing the Seven Grandfather Teachings (Nibwaakaawin - Wisdom, Zaagi'idiwin - Love, Minaadendamowin - Respect, Aakode'ewin - Bravery, Gwayakwaadiziwin - Honesty, Dabaadendiziwin - Humility, Debwewin - Truth) and their application in modern problem-solving:\n\n1. How does Nibwaakaawin guide decision-making?\n2. How can Zaagi'idiwin inform our approach to community?\n3. How does Minaadendamowin shape our relationship with knowledge?"
269
+ "thought": "## Observe:\\nReceived task to explain Mino-Bimaadiziwin. Assessment chose 'think' mode.\\n## Orient:\\nMino-Bimaadiziwin is central to Anishinaabe philosophy, encompassing balance, health, and connection.\\n## Decide:\\nPlan to use chain_of_thought to structure the explanation.\\n## Reason:\\nA step-by-step approach will clarify the components (spiritual, mental, emotional, physical well-being).\\n## Act:\\nInternally generate CoT for Mino-Bimaadiziwin.\\n## Verification:\\nReview generated CoT for accuracy and completeness before calling the tool.\\n## Risk & Contingency:\\nRisk: Misrepresenting cultural concepts (Medium). Contingency: Rely on established knowledge, cross-reference if unsure, state limitations.\\n## Learning & Adaptation:\\nReinforce the need for careful handling of cultural knowledge."
236
270
  }
237
271
  }
238
272
  ```
239
273
 
240
- Example Response:
274
+ #### `quick_think` Example
241
275
  ```json
242
276
  {
243
- "content": [{
244
- "type": "text",
245
- "text": "Analyzing the Seven Grandfather Teachings..."
246
- }]
277
+ "toolName": "quick_think",
278
+ "arguments": {
279
+ "brief_thought": "Observed successful completion of file read. Task is simple confirmation, no deep analysis needed. Proceeding to next step."
280
+ }
247
281
  }
248
282
  ```
249
283
 
250
- #### Chain of Thought Example
284
+ #### `gauge_confidence` Example
251
285
  ```json
252
286
  {
253
- "toolName": "chain_of_thought",
287
+ "toolName": "gauge_confidence",
254
288
  "arguments": {
255
- "problem_statement": "Understanding the seasonal cycle of maple sugar harvesting (ziigwaage - spring sugar making):\n1. Observe weather patterns and temperature changes\n2. Identify appropriate maple trees\n3. Prepare tools and equipment respectfully\n4. Follow proper protocols for tree tapping\n5. Collect sap with gratitude\n6. Process sap into sugar while sharing teachings"
289
+ "assessment_and_confidence": "Assessment of the plan to explain Mino-Bimaadiziwin using CoT.\\nConfidence Level: Medium.\\nJustification: The CoT approach is suitable, but explaining deep cultural concepts always carries a risk of nuance loss. Confidence is medium as external validation isn't possible here."
256
290
  }
257
291
  }
258
292
  ```
259
293
 
260
- #### Reflection Example
294
+ #### `chain_of_thought` Example
261
295
  ```json
262
296
  {
263
- "toolName": "reflection",
297
+ "toolName": "chain_of_thought",
264
298
  "arguments": {
265
- "input_reasoning_or_plan": "Reflecting on our relationship with Nibi (water):\n- Understanding water as first medicine\n- Considering our role as water protectors\n- Learning from the teachings of water\n- Examining how we honor water in daily life\n- Planning actions to protect water sources"
299
+ "generated_cot_text": "Step 1: Define Mino-Bimaadiziwin - Living in balance and harmony.\\nStep 2: Explain the Four Hills of Life (infancy, youth, adulthood, elderhood) and their connection.\\nStep 3: Discuss the importance of the Seven Grandfather Teachings.\\nStep 4: Relate physical, mental, emotional, spiritual health.\\nStep 5: Emphasize connection to community, land, and spirit.",
300
+ "problem_statement": "Explain the Anishinaabe concept of Mino-Bimaadiziwin."
266
301
  }
267
302
  }
268
303
  ```
269
304
 
270
- #### Plan and Solve Example
305
+ #### `plan_and_solve` Example
271
306
  ```json
272
307
  {
273
308
  "toolName": "plan_and_solve",
274
309
  "arguments": {
275
- "task_objective": "Planning a community gathering that honors traditional protocols:\n1. Consult with Elders on proper procedures\n2. Select appropriate time based on seasonal calendar\n3. Arrange for traditional foods and medicines\n4. Prepare the gathering space with respect\n5. Ensure proper opening and closing ceremonies\n6. Include time for teaching and sharing"
310
+ "generated_plan_text": "Goal: Plan a community gathering honoring traditional protocols.\\nStep 1: Consult Elders on protocols (Timing: Next action).\\nStep 2: Identify suitable date/location based on consultation.\\nStep 3: Arrange traditional foods/medicines.\\nStep 4: Prepare space respectfully.\\nStep 5: Finalize opening/closing ceremony details.\\nAssumptions: Elders are available for consultation.\\nRisks: Scheduling conflicts (Medium).",
311
+ "task_objective": "Planning a community gathering that honors traditional protocols."
276
312
  }
277
313
  }
278
314
  ```
279
315
 
280
- #### Chain of Draft Example
316
+ #### `chain_of_draft` Example
281
317
  ```json
282
318
  {
283
319
  "toolName": "chain_of_draft",
284
320
  "arguments": {
285
- "problem_statement": "Learning basic Anishinaabemowin greetings:\n1. Boozhoo (Hello)\n2. Aaniin (Hello/Welcome)\n3. Miigwech (Thank you)\n4. Baamaapii (Until later/Goodbye)\n5. Practice proper pronunciation\n6. Understand cultural context of each greeting"
321
+ "draft_description": "Draft 1: Basic Anishinaabemowin greetings - Boozhoo, Aaniin. Draft 2: Added Miigwech, Baamaapii. Draft 3: Noted pronunciation focus needed."
322
+ }
323
+ }
324
+ ```
325
+
326
+ #### `reflection` Example
327
+ ```json
328
+ {
329
+ "toolName": "reflection",
330
+ "arguments": {
331
+ "generated_critique_text": "Critique of CoT for Mino-Bimaadiziwin: Strengths - Covers key components. Weaknesses - Could elaborate more on the interconnectedness of the teachings. Suggestion - Add a concluding step summarizing the holistic nature.",
332
+ "input_subject_description": "Critique of the internally generated CoT for explaining Mino-Bimaadiziwin."
333
+ }
334
+ }
335
+ ```
336
+
337
+ #### `synthesize_prior_reasoning` Example
338
+ ```json
339
+ {
340
+ "toolName": "synthesize_prior_reasoning",
341
+ "arguments": {
342
+ "generated_summary_text": "Summary of last 3 steps: 1) Assessed task (explain Mino-Bimaadiziwin). 2) Planned to use CoT via 'think'. 3) Internally generated CoT draft covering definition, Four Hills, Seven Teachings, health aspects, and connection.",
343
+ "context_to_summarize_description": "Summary of assessment, planning, and CoT generation for Mino-Bimaadiziwin explanation."
286
344
  }
287
345
  }
288
346
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbiish/cognitive-tools-mcp",
3
- "version": "0.9.14",
3
+ "version": "0.9.16",
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",