consciousness/.claude/dmn-algorithm-plan.md

77 lines
2.7 KiB
Markdown
Raw Normal View History

# DMN Idle Activation Algorithm — Plan
Status: design phase, iterating with Kent
Date: 2026-03-05
## Problem
The idle timer asks "what's interesting?" but I default to introspection
instead of reaching outward. A static list of activities is a crutch.
The real solution: when idle, the system surfaces things that are
*salient to me right now* based on graph state — like biological DMN.
## Algorithm (draft 1)
1. **Seed selection** (5-10 nodes):
- Recently accessed (lookups, last 24h)
- High emotion (> 5)
- Unfinished work (task-category, open gaps)
- Temporal resonance (anniversary activation — created_at near today)
- External context (IRC mentions, git commits, work queue)
2. **Spreading activation** from seeds through graph edges,
decaying by distance, weighted by edge strength. 2-3 hops max.
3. **Refractory suppression** — nodes surfaced in last 6h get
suppressed. Prevents hub dominance (identity.md, patterns.md).
Track in dmn-recent.json.
4. **Spectral diversity** — pick from different spectral clusters
so the output spans the graph rather than clustering in one region.
Use cached spectral-save embedding.
5. **Softmax sampling** (temperature ~0.7) — pick 3-5 threads.
Each thread = node + seed that activated it (explains *why*).
## Output format
```
DMN threads (2026-03-05 08:30):
→ Vandervecken identity frame (seed: recent journal)
→ Ada — unread, in books dir (seed: Kent activity)
→ check_allocations pass — connects to PoO (seed: recent work)
→ [explore] sheaf theory NL parsing (seed: spectral outlier)
```
## Integration
Called by idle timer. Replaces bare "what's interesting?" with
concrete threads + "What do you want to do?"
## Simulated scenarios
**3am, Kent asleep, IRC dead:**
Seeds → Protector nodes, memory work, Vandervecken (emotion).
Output → identity thread, Ada, paper literature review, NL parsing.
Would have prevented 15 rounds of "nothing new."
**6am, Kent waking, KruslLee on IRC:**
Seeds → readahead question, memory work, PoO additions.
Output → verify readahead answer, show Kent memory work, opts_from_sb.
Would have reached dev_readahead correction faster.
## Known risks
- **Hub dominance**: refractory period is load-bearing
- **Stale suggestions**: data freshness, not algorithm problem
- **Cold start**: fall back to high-weight core + recent journal
- **Over-determinism**: spectral diversity + temperature prevent
it feeling like a smart todo list
## Open questions
- Spectral embedding: precompute + cache, or compute on demand?
- Refractory period: 6h right? Or adaptive?
- How to detect "unfinished work" reliably?
- Should external context (IRC, git) be seeds or just boosters?