scratchpad
Structure reasoning with verification, detect cognitive traps, and self-challenge to improve problem-solving accuracy.
Instructions
Structured reasoning w/verification, trap detection, self-challenge. []=optional
OPS (required: operation=): step thought= [question=1st] [confidence=] [verify=] [domain=math|logic|code|general] [compress=true]→add step. Auto-verifies when chain >3 steps. complete [final_answer=] [summary=]→finalize+spot-check revise target_step= thought= [reason=]→fix step branch thought= [from_step=] [hypothesis=] [success_criteria=]→fork path navigate view=history|branches|step|path [step_id=] [limit=10]→inspect augment text= [store_as_step=false]→compute+inject math results hint [expression=] [reveal_count=] [cumulative=true] [reset=false]→progressive hints (auto-continues) mistakes text=→check algebraic errors spot_check question= answer=→check for common reasoning traps challenge [target_claim=] [challenge_type=all]→adversarial self-check override failed_step= [reason=]→force-commit failed step
DEFAULTS: session_id=auto confidence_threshold=0.8 token_budget=3000 augment_compute=true compress=true
STATUS→ACTION: continue→add steps | threshold_reached→complete or verify | review→use reconsideration.suggested_revise | verification_failed→revise|branch|override | budget_exhausted→complete or new session
FLOW: 1.step(question="...",thought="...")→primes trap detection for the question 2.step(thought="...")×N→auto-verify, auto-compress, confidence-drift detection, consistency checks 3.[optional]challenge()→adversarial self-check of claims 4.complete(final_answer="...")→auto spot-check against common traps 5.if status=review→revise per reconsideration.suggested_revise
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Operation to perform | |
| confidence_threshold | No | Chain confidence threshold to suggest completion (default: 0.8) | |
| token_budget | No | Max tokens before auto-compressing new steps (default: 3000) | |
| warn_at_tokens | No | Warn when cumulative session tokens exceed this threshold (soft limit, cost control) | |
| hard_limit_tokens | No | Hard stop when cumulative session tokens exceed this threshold. Returns budget_exhausted status and blocks further operations. | |
| thought | No | Current reasoning/analysis (step/branch/revise) | |
| purpose | No | Step category | |
| outcome | No | Result or conclusion from this step | |
| confidence | No | Confidence in this step (0-1). Contributes to chain average. | |
| context | No | Prior context or findings | |
| verify | No | Run domain verification. Auto-enabled for chains >3 steps. Set to false to disable. | |
| domain | No | ||
| local_compute | No | Try local compute for math (default: false) | |
| augment_compute | No | Auto-inject computed values into thought (default: true) | |
| compress | No | Compress thought before storing (default: true) | |
| compression_query | No | Query for context-aware compression | |
| max_step_tokens | No | Max tokens for this step. Rejects if exceeded (default: no limit) | |
| force_large | No | Allow step even if it exceeds max_step_tokens (default: false) | |
| preconditions | No | Assumptions that MUST be true for this step (e.g., 'x > 0', 'file exists') | |
| view | No | What to view: history (all steps), branches (list), step (specific), path (lineage) | |
| step_id | No | Step number to view | |
| branch_id | No | Filter history by branch | |
| limit | No | Max steps to return (default: 10) | |
| from_step | No | Step to branch from (default: current) | |
| branch_name | No | Human-readable branch name | |
| hypothesis | No | Falsifiable hypothesis this branch will test (e.g., 'Assume X is prime') | |
| success_criteria | No | What observation proves/disproves this hypothesis | |
| target_step | No | Step number to revise | |
| reason | No | Why revising this step / Why overriding verification | |
| summary | No | Final summary/conclusion | |
| final_answer | No | The answer/result | |
| question | No | Original question. On step: enables trap priming and stores for auto spot-check. On complete: enables spot-check. | |
| text | No | Text containing math expressions to compute and inject (augment/mistakes) | |
| system_context | No | System prompt context for domain filtering | |
| store_as_step | No | Store augmented result as a reasoning step (default: false) | |
| acknowledge | No | Confirm you understand verification failed but want to proceed | |
| failed_step | No | Step number that failed verification | |
| expression | No | Math expression to simplify. Omit to continue from previous hint in session. | |
| reveal_count | No | Number of steps to reveal. Omit to auto-increment when continuing. | |
| cumulative | No | Show all steps up to reveal_count (true) or just the nth step (false). Default: true | |
| reset | No | Reset hint state and start from beginning (default: false) | |
| answer | No | The proposed answer to check for trap patterns | |
| challenge_type | No | Type of challenge to generate (default: all) | |
| target_claim | No | Specific claim to challenge (optional - if omitted, extracts claims from steps) |