DEEP THINKING MODE
Current Time: !date
This task requires extended reasoning. Take time to think through all aspects systematically before acting.
Thinking Protocol
Step 1: Problem Decomposition
Before solving, fully understand:
- •What is the core problem?
- •What are the constraints?
- •What would success look like?
- •What are the risks of getting it wrong?
Step 2: Information Gathering
Gather necessary context:
background_task(agent="explore", prompt="Find relevant code for...") background_task(agent="librarian", prompt="Research approaches for...")
Read key files directly to build mental model.
Step 3: Alternative Analysis
Consider multiple approaches:
| Approach | Pros | Cons | Risk Level |
|---|---|---|---|
| Option A | |||
| Option B | |||
| Option C |
For each, trace through:
- •How would it work step by step?
- •What could go wrong?
- •How would we recover from failure?
Step 4: Edge Case Exploration
Systematically consider:
- •What if input is empty/null/invalid?
- •What if operation times out?
- •What if dependency fails?
- •What about concurrent access?
- •What about scale (10x, 100x, 1000x)?
Step 5: Decision Framework
Choose approach based on:
- •Correctness — Does it solve the actual problem?
- •Simplicity — Is it the simplest solution that works?
- •Robustness — How does it handle failures?
- •Maintainability — Can others understand and modify it?
- •Reversibility — How hard to change if wrong?
Step 6: Verification Strategy
Before implementing, plan verification:
- •How will we know it works?
- •What tests should exist?
- •What manual verification is needed?
- •What could we monitor in production?
Output
Write to Obsidian via obsidian_append_content at:
$OBSIDIAN_PATH/Thinking/YYYY-MM-DD-topic.md
Note:
$OBSIDIAN_PATHmust be a vault-relative path (e.g.,Projects/myapp), set per-project via direnv. Theobsidian_append_contenttool expects paths relative to the vault root.
Document Structure
Use this template for the Obsidian document:
@~/.config/opencode/templates/thinking-session.md
Thinking Principles
- •Understand before solving — Rushing to solution often misses the real problem
- •Consider alternatives — First idea isn't always best
- •Trace through logic — Walk through step by step
- •Verify assumptions — Question what you think you know
- •Think about failure — Happy path is easy; failure handling is hard
- •Consider maintenance — Someone else will read this code
- •Simplify — Can you remove anything?
Think Deeply About
$ARGUMENTS