Dream Thinking is DreamCode's core differentiator — a structured 6-phase cognitive process that mimics human problem-solving.
Raw Input → RESEARCH → GROUND → REFLECT → PROPOSE → BUILD → ACT → Output
↓ ↓ ↓ ↓ ↓ ↓
Gather Analyze Evaluate Generate Execute Deliver
context facts options solutions actions results
Gather information from all available sources:
- File system scanning
- Git history analysis
- Web search (if NEURO is enabled)
- LTM recall (Pieces integration)
- Codebase structure analysis
Trigger: Any non-trivial request
Analyze gathered facts against context:
- Project structure and conventions
- Existing code patterns
- Configuration and constraints
- Dependency relationships
- Risk assessment
Trigger: Research complete
Evaluate options and alternatives:
- Multiple solution paths
- Trade-off analysis
- Risk/reward scoring
- Prior art review
- Edge case identification
Trigger: Grounding complete or multiple viable paths found
Generate concrete solutions:
- Implementation plans
- Code generation
- Refactoring strategies
- Testing approaches
- Documentation updates
Trigger: Reflection complete
Execute the chosen solution:
- Write/modify code
- Run commands
- Create/move files
- Execute tests
- Apply lints
Trigger: Proposal approved
Deliver and document:
- Present results
- Update memory
- Score outcomes
- Suggest next steps
- Trigger follow-up actions
Trigger: Build complete
When the breakthrough-overdrive-innovation skill is in the chain, Dream Thinking enters DREAM_INNOVATION mode:
- All 6 phases are mandatory (no skipping)
- Multi-perspective analysis with 3-5 specialists
- Scoring enforcement is stricter
- Documentation is required
- LTM persistence is guaranteed
In ~/.config/dreamcode/config.yaml:
dream_mode: true # Enable/disable dream thinking
model_router: true # Enable domain-specific model routing
scoring: true # Enable scoring enforcement- Skills Reference — The 37 skills powering each phase
- Sensor Gate — Determines which mode to use
- Scoring & Enforcement — Scores each phase outcome