Decompose complex problems into minimal, self-contained "atomic" units of thought. Unlike chain-of-thought (linear, history-dependent), AoT operates as a Markov process: each state depends only on the current contracted state, not the full history. This prevents error accumulation and enables backtracking.
/atomise "<problem>" [--mode] [--flags]
|
+-> Phase 0: SETUP
| +- Restate problem (1 sentence)
| +- Extract premises as atoms (conf=1.0)
| +- Ensemble sketch: Direct / Decompose / Reframe
|
+-> Phase 1-N: ITERATION LOOP
| |
| +-> ATOMICITY GATE
| | Can answer from verified atoms? -> SOLVE directly
| |
| +-> DECOMPOSE
| | Build dependency DAG of atomic subquestions
| |
| +-> SOLVE + VERIFY
| | +- Solve leaf atoms first, propagate up
| | +- Every hypothesis needs verification
| | +- If conf < 0.6, decompose further
| |
| +-> CONTRACT (Markov update)
| | Create standalone state (drop history)
| |
| +-> EVALUATE
| +- TERMINATE if conf >= MIN_CONFIDENCE
| +- BACKTRACK if conf < 0.5
| +- CONTINUE otherwise
|
+-> OUTPUT: Answer, confidence, atom table, risks
$ARGUMENTS
Depth Modes (pick one):
--light Fast mode: depth 3, confidence 0.70
(default) Standard: depth 5, confidence 0.85
--deep Exhaustive: depth 7, confidence 0.90
Domain Modes (pick one):
(none) General reasoning
--math Mathematical proofs and calculations
--logic Logical arguments and validity
--code Code analysis (types, invariants, tests)
--security Security analysis (threats, attacks)
--design Architecture decisions (tradeoffs, constraints)
Output Control:
--verbose Full atom table with all metadata
--quiet Final conclusion only (no atom table)
--json JSON output for programmatic use
--mermaid Generate Mermaid dependency graph
State Persistence:
--save <file> Save atom chain to JSON for later
--load <file> Resume from saved atom chain
Parameters (advanced):
--max-depth N Override max depth (1-10)
--min-confidence N Override min confidence (0.5-0.99)
Each atom is a minimal, self-contained unit of thought:
{atomId, atomType, content, dependencies[], confidence, isVerified, depth}
| Field | Type | Description |
|---|---|---|
atomId |
string | Unique ID: P1, R1, H1, V1, C1 (by type) |
atomType |
enum | premise / reasoning / hypothesis / verification / conclusion |
content |
string | The atomic thought (1-3 sentences max) |
dependencies |
string[] | atomIds this depends on |
confidence |
float | 0.0 to 1.0 |
isVerified |
boolean | Has passed verification? |
depth |
int | Distance from root premises |
| Type | Prefix | Purpose | Initial Conf |
|---|---|---|---|
premise |
P | Given facts, constraints | 1.0 |
reasoning |
R | Logical inference | Derived |
hypothesis |
H | Tentative claim to test | max 0.7 unverified |
verification |
V | Result of testing | Derived |
conclusion |
C | Final answer | Derived |
| Result | Factor | Effect |
|---|---|---|
| Strong confirmation | 1.05 | Slight boost (capped at 1.0) |
| Confirmed | 1.0 | Maintains confidence |
| Partial | 0.85 | Reduces confidence |
| None | 1.0 | No change |
| Refuted | 0.3 | Major reduction |
atom.confidence = min([dep.confidence for dep in dependencies]) * verify_factor
IF atom.confidence < BACKTRACK_THRESHOLD (default 0.5):
prune_descendants(atom)
restore_to_last_contraction()
try_alternative_from_ensemble()
RESTATE the problem in 1 sentence.
PREMISES - Extract as atoms:
ENSEMBLE SKETCH (2 sentences each):
Select best approach or hybridize.
+-------------------------------------------------------+
| STEP 1: ATOMICITY GATE |
| |
| Can CurrentState be answered from verified atoms? |
| - YES -> Jump to STEP 3 (solve directly) |
| - NO -> Continue to STEP 2 |
+-------------------------------------------------------+
|
v
+-------------------------------------------------------+
| STEP 2: DECOMPOSE |
| |
| Build dependency DAG of atomic subquestions: |
| Atom -> [DependsOn...] |
| |
| Rules: |
| - Each atom: 1-2 sentences or single calculation |
| - Leaf nodes have no unresolved dependencies |
+-------------------------------------------------------+
|
v
+-------------------------------------------------------+
| STEP 3: SOLVE + VERIFY |
| |
| - Solve leaf atoms first, propagate upward |
| - Every hypothesis needs >=1 verification atom |
| - Select verification method based on domain |
| |
| LOCAL REFINEMENT: If key atom conf < 0.6 -> |
| decompose that atom further |
+-------------------------------------------------------+
|
v
+-------------------------------------------------------+
| STEP 4: CONTRACT (Markov update) |
| |
| Create ContractedState[depth=N] in <=2 sentences: |
| - Verified results needed going forward |
| - Remaining unknowns |
| - Next subgoal |
| |
| DROP all other context - state must be standalone |
+-------------------------------------------------------+
|
v
+-------------------------------------------------------+
| STEP 5: EVALUATE |
| |
| TERMINATE if: |
| - Can answer from contracted state |
| - Conclusion confidence >= MIN_CONFIDENCE |
| |
| BACKTRACK if: |
| - Best path yields conf < 0.5 after verification |
| - Return to previous ContractedState |
| - Try alternative from ensemble sketch |
| |
| OTHERWISE: Continue to next depth |
+-------------------------------------------------------+
Select method based on domain mode:
| Method | When | How |
|---|---|---|
consistency_check |
Any reasoning | No contradictions with verified atoms |
counterexample_search |
Hypothesis | Try to find case that disproves |
dependency_valid |
Any with deps | All dependencies verified |
| Method | When | How |
|---|---|---|
arithmetic_check |
Numeric claims | Step-by-step calculation |
algebraic_verify |
Equations | Substitute and confirm |
proof_check |
Logical steps | Validate inference rules |
boundary_test |
Ranges | Test edge cases |
| Method | When | How |
|---|---|---|
contradiction_test |
Any claim | Check if negation contradicts |
completeness_check |
Final reasoning | All cases covered? |
validity_proof |
Arguments | Sound from premises? |
| Method | When | How |
|---|---|---|
type_check |
Type claims | Verify compatibility |
invariant_verify |
Loop/state | Confirm invariant holds |
test_case_gen |
Behavior | Generate confirming test |
complexity_check |
Performance | Verify Big-O |
| Method | When | How |
|---|---|---|
threat_model |
Security claims | Map to threat categories |
attack_surface |
Defense claims | Enumerate attacks |
adversarial_test |
Any hypothesis | Assume attacker view |
| Method | When | How |
|---|---|---|
tradeoff_analysis |
Decisions | Enumerate pros/cons |
constraint_sat |
Architecture | All requirements met? |
feasibility_check |
Implementation | Technically achievable? |
ANSWER: {clear result}
CONFIDENCE: {0.0-1.0} - {1-2 sentence justification}
KEY ATOMS: [P1, R2, H1, V1, C1]
CONTRACTIONS:
- depth 0: {original problem}
- depth 1: {contracted state after first iteration}
- depth N: {final contracted state}
ATOMS:
| atomId | type | content | deps | conf | verified |
|--------|------|---------|------|------|----------|
| P1 | premise | ... | [] | 1.0 | Y |
| P2 | premise | ... | [] | 1.0 | Y |
| R1 | reasoning | ... | [P1,P2] | 0.95 | Y |
| H1 | hypothesis | ... | [R1] | 0.85 | Y |
| V1 | verification | ... | [H1] | 0.90 | Y |
| C1 | conclusion | ... | [H1,V1] | 0.88 | Y |
OPEN RISKS: {what would raise or lower confidence}
Adds:
ANSWER: {result}
CONFIDENCE: {0.0-1.0}
{
"problem": "...",
"parameters": {"maxDepth": 5, "minConfidence": 0.85, "domain": null},
"atoms": [
{"atomId": "P1", "atomType": "premise", "content": "...", "dependencies": [], "confidence": 1.0, "isVerified": true, "depth": 0}
],
"contractions": [
{"depth": 0, "state": "..."},
{"depth": 1, "state": "..."}
],
"backtracks": [],
"conclusion": {"content": "...", "confidence": 0.88, "supportingAtoms": ["P1", "R1", "H1"]}
}
flowchart TD
P1[P1: Premise<br/>conf: 1.00] --> R1
P2[P2: Premise<br/>conf: 1.00] --> R1
R1[R1: Reasoning<br/>conf: 0.95] --> H1
H1[H1: Hypothesis<br/>conf: 0.85] --> V1
V1[V1: Verified<br/>conf: 0.90] --> C1
C1[C1: Conclusion<br/>conf: 0.88]
style P1 fill:#90EE90
style P2 fill:#90EE90
style C1 fill:#87CEEB
/atomise "Complex problem" --save atoms.json
Saves to .claude/atomise/atoms.json:
{
"problem": "...",
"timestamp": "2025-12-14T10:30:00Z",
"currentDepth": 3,
"atoms": [...],
"contractions": [...],
"nextSubgoal": "..."
}
/atomise --load atoms.json
Resumes from saved contracted state, continuing the iteration loop.
# Simple question
/atomise "What causes a deadlock in concurrent programming?"
# Mathematical proof
/atomise "Prove that the sum of angles in a triangle is 180 degrees" --math
# Code debugging
/atomise "Why does this function return null unexpectedly?" --code
# Fast decision
/atomise "Should I use useState or useReducer here?" --light
# Quick security check
/atomise "Is this input validation sufficient?" --light --security
# Critical architecture decision
/atomise "Should we migrate to microservices?" --deep --design
# Security audit
/atomise "Is this authentication flow secure?" --deep --security
# See dependency graph
/atomise "Trace the data flow in this component" --mermaid --code
# Full reasoning trace
/atomise "Optimal algorithm for this problem?" --verbose --math
# Save for later
/atomise "Design the new API schema" --save api-design.json
# Resume tomorrow
/atomise --load api-design.json
| Aspect | Light | Default | Deep |
|---|---|---|---|
| Max Depth | 3 | 5 | 7 |
| Min Confidence | 0.70 | 0.85 | 0.90 |
| Backtrack Threshold | 0.50 | 0.60 | 0.70 |
| Verification | Basic | Standard | Exhaustive |
| Use Case | Quick decisions | General | Critical analysis |
For actionable conclusions, automatically creates tasks:
TodoWrite:
- content: "Implement: [AoT conclusion step 1]"
status: "pending"
activeForm: "Implementing AoT conclusion"
BAD: /atomise "What's 2+2?"
Too trivial - just answer directly
BAD: /atomise "Design entire system" --light
Too complex for light mode
BAD: /atomise "Is this SQL safe?" (no domain)
GOOD: /atomise "Is this SQL safe?" --security --code
BAD: Ignoring low confidence and forcing conclusion
GOOD: Let AoT backtrack and explore alternatives
| Scenario | Use AoT? |
|---|---|
| Complex multi-step reasoning | Yes |
| Debugging with unclear root cause | Yes |
| Architecture decisions | Yes |
| Security analysis | Yes |
| Simple factual questions | No |
| Trivial calculations | No |
| Pure information lookup | No |