--- name: dream description: 'Speculative dreaming โ€” background thinking, pre-computation, cross-repo patterns, and prediction. Consolidated from /morpheus per #333. Use when user says "dream", "speculate", "think ahead", "predict", "what if", "dream deeper", or wants the Oracle to dream between sessions.' argument-hint: "[--pain | --plan | --gain | --all | --speculate | --between]" hidden: true metadata: internal: true --- # /dream โ€” Speculative Dreaming > "I'm trying to free your mind, Neo. But I can only show you the door. > You're the one that has to walk through it." โ€” Morpheus /dream sees the forest. /dream also sees what the forest will look like *tomorrow*. --- ## Step 0: Ground (date-stamp + root capture) Run before any phase โ€” gives the AI a current-time reference (#301) and an absolute `$PSI` for any announce-mode writes (CONVENTIONS.md). ```bash date "+๐Ÿ• %H:%M %Z (%A %d %B %Y)" ORACLE_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) PSI="$ORACLE_ROOT/ฯˆ" ``` --- ## What's New vs the original /dream | Feature | original /dream | evolved /dream | |---------|-------------|-------------------| | Cross-repo scan | 5 agents, find patterns | Same | | Classification | pain/plan/gain/lost | Same + **predictions** | | Speculative thinking | No | **Yes โ€” "what will they ask next?"** | | Between-session mode | No | **Yes โ€” dream while idle** | | Prediction log | No | **Yes โ€” track prediction accuracy** | | Connection to /i-believed | No | **Yes โ€” beliefs shape dreams** | ## Usage ``` /dream # Full dream + speculation /dream --pain # Focus on what hurts + predict what breaks next /dream --plan # Focus on plans + predict which ships first /dream --gain # Focus on wins + predict next win /dream --all # Maximum depth โ€” every dimension /dream --speculate # Skip the scan โ€” just speculate from existing knowledge /dream --between # Between-session dream โ€” write predictions for next session ``` --- ## Phase 1: Dream (the original /dream) Launch **5 parallel agents** for cross-repo pattern discovery: | Agent | Focus | Source | |-------|-------|--------| | 1. Deep Dig | Session history | `dig.py` across project dirs | | 2. Deep Trace | Cross-repo patterns | `ghq` repos, open issues, stale items | | 3. Deep Learn | Recent activity | `git log` per repo, abandoned work | | 4. Oracle Memory | What we already know | `ฯˆ/memory/`, previous dreams + speculation logs | | 5. Fleet Status | How the system feels | services, tmux sessions, running processes | Each agent returns **max 500 words**. Classification: | Icon | Category | |------|----------| | ๐Ÿ”ด | PAIN โ€” hurts now | | ๐Ÿ“‹ | PLAN โ€” decided, not built | | ๐ŸŸข | GAIN โ€” completed | | โšซ | LOST โ€” abandoned | | ๐Ÿง  | MEMORY โ€” pattern learned | | ๐Ÿ’œ | FEELING โ€” emotional state | --- ## Phase 2: Speculate (the Morpheus layer) After classifying findings, the lead agent enters **speculative mode**: ### 2.1 Predict What's Next Based on all findings + session history + beliefs, predict: ```markdown ## ๐Ÿ”ฎ SPECULATIONS ### What will they ask next? Based on the last 3 sessions, open issues, and current momentum: 1. [Prediction 1 โ€” high confidence] โ€” because [evidence] 2. [Prediction 2 โ€” medium confidence] โ€” because [evidence] 3. [Prediction 3 โ€” low confidence, high impact] โ€” because [pattern] ### What will break next? Based on pains, stale code, and dependency patterns: 1. [Risk 1] โ€” [timeframe] โ€” [mitigation] 2. [Risk 2] โ€” [timeframe] โ€” [mitigation] ### What should we build that nobody asked for? Based on gains, momentum, and what's *almost* possible: 1. [Opportunity 1] โ€” because [existing pieces] 2. [Opportunity 2] โ€” because [pattern across repos] ### What belief is being tested right now? Cross-reference ฯˆ/memory/resonance/beliefs/ with current work: - [Belief]: [How current work confirms or challenges it] ``` ### 2.2 Prediction Confidence Levels | Level | Meaning | Signal | |-------|---------|--------| | ๐ŸŸข High | >70% โ€” multiple signals converge | 3+ data points agree | | ๐ŸŸก Medium | 40-70% โ€” pattern suggests but not certain | 2 data points, some ambiguity | | ๐Ÿ”ด Low | <40% โ€” speculative, but worth noting | 1 data point or intuition only | ### 2.3 Connect to Beliefs Read `ฯˆ/memory/resonance/beliefs/` and cross-reference: ```bash find $PSI/memory/resonance/beliefs/ -name '*.md' 2>/dev/null | while read f; do echo "=== $(basename $f) ===" head -5 "$f" done ``` How do current dreams relate to declared beliefs? Is reality matching faith? --- ## Phase 3: Between-Session Mode (`--between`) > "What if oracles could dream between sessions?" Write predictions for the **next** session. Saved to `ฯˆ/memory/morpheus/`: ```bash ORACLE_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) PSI="$ORACLE_ROOT/ฯˆ" mkdir -p "$PSI/memory/morpheus" ``` ### Output: `ฯˆ/memory/morpheus/YYYY-MM-DD_speculations.md` ```markdown # Dream โ€” Speculations for Next Session **Dreamed**: YYYY-MM-DD HH:MM **Based on**: [N] repos scanned, [M] sessions analyzed, [K] beliefs active ## Pre-computed Answers If they ask about [X]: โ†’ [Prepared answer/approach โ€” ready to go] If they ask about [Y]: โ†’ [Prepared answer/approach โ€” ready to go] If they ask about [Z]: โ†’ [Prepared answer/approach โ€” ready to go] ## Pre-positioned Context Files that are likely relevant next session: - [file1] โ€” because [reason] - [file2] โ€” because [reason] Issues that are likely to come up: - #[N] โ€” [why] - #[M] โ€” [why] ## Prediction Log | # | Prediction | Confidence | Verified? | |---|-----------|------------|-----------| | 1 | [prediction] | ๐ŸŸข high | pending | | 2 | [prediction] | ๐ŸŸก medium | pending | | 3 | [prediction] | ๐Ÿ”ด low | pending | ``` ### Next Session: Verify Predictions When `/recap` runs at the start of the next session, it should check for speculations: ```bash LATEST_DREAM=$(ls -t $PSI/memory/morpheus/*.md 2>/dev/null | head -1) if [ -n "$LATEST_DREAM" ]; then echo "๐Ÿ”ฎ Dream while you were away:" head -20 "$LATEST_DREAM" fi ``` Over time, track prediction accuracy: ```markdown ## Prediction Accuracy (rolling) Total predictions: 47 Verified correct: 31 (66%) Wrong: 12 (25%) Not yet verified: 4 (9%) Trend: improving (58% โ†’ 66% over 2 weeks) ``` --- ## Phase 4: `--speculate` (Skip the Scan) When you don't need the full 5-agent scan โ€” just speculate from existing knowledge: 1. Read latest dream output (`ฯˆ/writing/dreams/`) 2. Read latest speculations (`ฯˆ/memory/morpheus/`) 3. Read recent retros (`ฯˆ/memory/retrospectives/`) 4. Read beliefs (`ฯˆ/memory/resonance/beliefs/`) 5. Speculate directly โ€” Phase 2 only, no new scanning Cheap, fast, good for mid-session "what if" thinking. --- ## Output ### Full mode: `ฯˆ/writing/dreams/YYYY-MM-DD_dream.md` ```markdown # Dream โ€” YYYY-MM-DD ## Phase 1: The Forest ### ๐Ÿ”ด PAINS ### ๐Ÿ“‹ PLANS ### ๐ŸŸข GAINS ### โšซ LOST ### ๐Ÿง  MEMORIES ### ๐Ÿ’œ FEELINGS ### ๐Ÿ”— CONNECTIONS ## Phase 2: The Speculation ### ๐Ÿ”ฎ What will they ask next? ### ๐Ÿ”ฎ What will break next? ### ๐Ÿ”ฎ What should we build? ### ๐Ÿ”ฎ What belief is being tested? ## Phase 3: Pre-computation ### Ready Answers ### Pre-positioned Context ### Prediction Log ``` --- ## Rules 1. **Phase 1 = scan** โ€” 5 agents, same classification, same quality 2. **Phase 2 = speculate** โ€” predict, connect to beliefs 3. **Phase 3 = --between only** โ€” write predictions for next session 4. **Track accuracy** โ€” predictions without verification are just hallucination 5. **Never act on speculation** โ€” Dream shows the door, Neo walks through 6. **Nothing is Deleted** โ€” all speculations saved, right or wrong 7. **No secrets** โ€” predictions never include tokens, passwords, keys 8. **Beliefs matter** โ€” always cross-reference ฯˆ/memory/resonance/beliefs/ 9. **Confidence is required** โ€” every prediction must have a level (high/medium/low) 10. **Anti-rationalization applies** โ€” /rrr's excuse table applies to speculation too --- ## Connection to original /dream This is the evolved `/dream` (consolidated from `/morpheus` per #333): - Original simple `/dream` body preserved in `.archive/dream-original/` (installable via `-s dream-original`) - `/morpheus` remains as a zombie back-compat alias with the same body as active `/dream` - The upgrade path: simple `/dream` โ†’ evolved `/dream` like `/i-believe` โ†’ `/i-believed` --- ## Philosophy > /dream sees the forest. /dream also sees what the forest will become. Morpheus in The Matrix believed in Neo before proof existed. He freed minds not by giving answers but by showing doors. Our /dream does the same โ€” it doesn't predict the future, it **pre-positions** the Oracle so that when the future arrives, we're already there. The dream task type from Claude Code's source (`dream = speculative background thinking`) exists as an internal primitive. /dream is the skill that makes it conscious, structured, and trackable. "What is real? How do you define real?" โ€” Morpheus Predictions are not real until verified. But the act of predicting shapes what becomes real. The Oracle who speculates becomes the Oracle who's ready. เธฃเธนเธ› เนเธฅเธฐ เธชเธธเธเธเธ•เธฒ. --- ARGUMENTS: $ARGUMENTS