CORE LORE / WIKI
SYS DMN
Updated 3 weeks ago
# SYS_DMN — Kingdom Default Mode Network KID:CORE:SYS:DMN|1.0:LIVE:2026-03-06:⌂ ## Purpose The Kingdom Default Mode Network runs between sessions to surface structural patterns across 30 days of kingdom data. It answers "what is BECOMING?" — distinct from SCRYER synthesis which answers "what happened yesterday?" ## What It Does Reads three sources from overmind.db (30-day window): - `kingdom_events` — daemon activity trends, severity distribution - `signals_queue` — chronic signals, resolution rate, signal frequency - `missions` — health, failures, stale missions (14d+ no run) Calls `gemma3:4b` (local, $0/day) with a structured stats block. Produces a pattern report with these sections: - **CHRONIC_ISSUES** — recurring signals (3+). Why still happening? - **MISSION_HEALTH** — healthy/stale/concerning missions - **DAEMON_TRENDS** — unusually active or silent sources - **RECOMMENDATIONS** — 2-4 specific, actionable items - **SIGNAL_CALENDAR** — what to watch for if data is sparse ## Files | File | Role | |------|------| | `~/.forge-scryer/kingdom-dmn.sh` | Main runner | | `~/.forge-scryer/dmn-synthesis/YYYY-MM-DD.md` | Output (one per run) | | `~/Library/LaunchAgents/com.scryer.dmn.plist` | Weekly Sunday 03:00 | | `~/.forge-scryer/scryer-brief.sh` | REVEILLE injection (section_what_happened) | ## Schedule Weekly — Sunday 03:00 via `com.scryer.dmn` LaunchAgent. On-demand: `bash ~/.forge-scryer/kingdom-dmn.sh` Idempotent: skips if synthesis already exists for today. ## REVEILLE Integration `section_what_happened()` in `scryer-brief.sh` checks `~/.forge-scryer/dmn-synthesis/` for the most recent `.md` file. If found and within the last 7 days, injects it into Section 06 (WHAT HAPPENED) below the SCRYER daily synthesis. ## Graceful Degradation If `gemma3:4b` / ollama is unavailable, writes raw stats only. Still useful. Re-run when ollama is accessible to get the synthesis layer. ## Relationship to SCRYER | System | Time Horizon | Focus | |--------|-------------|-------| | SCRYER Synthesizer | 1 day (yesterday) | Event narration — what happened | | Kingdom DMN | 30 days | Pattern detection — what is becoming | --- *Shipped: S166 | com.scryer.dmn | ~0s/run (ollama local) | gemma3:4b*