Get the FREE Ultimate OpenClaw Setup Guide →

cognitive-debug

Use Caution
npx machina-cli add skill rana/yogananda-skills/cognitive-debug --openclaw
Files (1)
SKILL.md
3.7 KB

Examine the conversation history and any relevant project context.

Cognitive Debugging

Target: $ARGUMENTS

Dialogue Mode

If --dialogue is specified, present the traced reasoning chain and identified breakpoints (Steps 1-3), then pause. Ask the user to confirm or correct the trace before generating corrective questions and the corrected path. The user often knows where thinking went wrong better than the tool does — their correction makes Steps 4-5 sharper. Without --dialogue, run all steps and deliver the complete analysis.

Step 1: State the Conclusion

What was concluded, decided, or produced? State it precisely — the output of the reasoning, not the intent.

Step 2: Trace the Reasoning Chain

Walk backward through the reasoning that led to the conclusion. For each link:

  • What observation or input triggered this step?
  • What reasoning connected it to the next step?
  • Was this reasoning from mechanism (how things actually work) or from pattern (how things usually seem)?

Step 3: Identify Breakpoints

Find where the reasoning diverged. Common failure modes:

  • Fear-driven reasoning: Protecting against what might go wrong instead of tracing what actually happens. "This could deadlock" without verifying the mechanism.
  • Premature compression: Jumping to "X means Y" without tracing the full chain. Compressing a nuanced situation into a simple (wrong) conclusion.
  • Pattern-matching over mechanism: Treating a similar-looking situation as identical without checking whether the similarity is structural or superficial.
  • Coherence drive: Resolving a tension prematurely because ambiguity felt uncomfortable. Picking an answer to have an answer.
  • Associative momentum: Following one line of reasoning past where it stopped being productive. Continuing to elaborate a wrong model instead of stepping back.
  • Solution orientation: Jumping to fix something before understanding whether it's actually broken.

Step 4: Corrective Questions

For each breakpoint, propose the question that would have redirected:

  • "What does the code/system/mechanism actually do here?"
  • "Am I reasoning from fear or from observation?"
  • "What's the simplest experiment that would falsify this concern?"
  • "What would happen if I traced this with pencil and paper?"
  • "First understand what IS before worrying about what MIGHT BE."

Step 5: Corrected Path

Trace the reasoning again with the corrective questions applied. Where does it lead differently?

Output

  1. Original reasoning chain (compact)
  2. Breakpoints identified (what went wrong, why)
  3. Corrective questions (what would have helped at each breakpoint)
  4. Corrected conclusion (where better reasoning leads)
  5. Pattern to watch for (the recurring failure mode to catch next time)

Output Management

Hard constraints:

  • Segment output into groups of up to 5 breakpoints, prioritizing the earliest divergence point — fixing that often resolves downstream issues.
  • Write each segment incrementally. Do not accumulate a single large response.
  • After completing each segment, continue immediately to the next. Do not wait for user input.
  • Continue until the full reasoning trace, all breakpoints, corrective questions, and corrected path are reported.
  • If the analysis surface is too large to complete in one session, state what was covered and what remains.

Source

git clone https://github.com/rana/yogananda-skills/blob/main/skills/cognitive-debug/SKILL.mdView on GitHub

Overview

Cognitive-debug lets you examine a conversation's reasoning trace to spot where thinking went astray. It guides you through locating breakpoints like fear-driven or pattern-based reasoning, and provides corrective questions to steer toward a clearer path. This helps improve accuracy and transparency in AI reasoning.

How This Skill Works

Review the target argument, then follow Steps 1-5: state the conclusion, trace the reasoning, identify breakpoints, pose corrective questions, and derive a corrected path. In Dialogue Mode (--dialogue) the chain is shown and paused for user confirmation before generating the corrected path; without it, the full analysis runs.

When to Use It

  • When a conclusion seems inaccurate after the initial reasoning
  • When a model relies on pattern-matching rather than mechanism
  • When there is unexplained premature compression of information
  • When you need to surface the chain of thought for audit
  • When debugging decisions in complex problem-solving

Quick Start

  1. Step 1: Set the ARGUMENTS you want debugged
  2. Step 2: Decide on Dialogue Mode (--dialogue) or standard run
  3. Step 3: Run Steps 1-5 to generate the original reasoning, breakpoints, corrective questions, and corrected path

Best Practices

  • Explicitly separate mechanism vs. pattern-based steps in reasoning
  • Pause to ask corrective questions at each breakpoint
  • Use pencil-and-paper or traceable experiments to verify steps
  • Keep outputs segmented and report progress in chunks
  • Always surface the corrected path and warning patterns to watch for

Example Use Cases

  • Debugging a math solution where the model jumped to a result without full justification
  • Tracing a programming reasoning to find where a faulty assumption crept in
  • Auditing a chat about a historical event to ensure no pattern-based bias
  • Verifying a product design decision that relied on superficial similarities
  • Revising a project plan after identifying incorrect causal links

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers