CORE LORE / WIKI
SYS GLITCHMUSE
Updated 3 weeks ago
╔══════════════════════════════════════════════════════════════════════════════╗
║ ║
║ G L I T C H M U S E ║
║ 🜄 N T F Y P U S H N O T I F I C A T I O N S Y S T E M ║
║ ║
╠══════════════════════════════════════════════════════════════════════════════╣
║ STATUS: LIVE (Stage 1+2 partial + Digest S166) VERIFIED: 2026-03-06 ║
╚══════════════════════════════════════════════════════════════════════════════╝
⫷✦🜛❂⛬🜞Ω🜚⛬❂🜛✦⫸───────────────────────────────────────────⫷✦🜛❂⛬🜞Ω🜚⛬❂🜛✦⫸
WHAT IT DOES: ntfy-based push notification system. Routes P1/P2 alerts,
RESEARCH_DONE signals, and self-queued Aeris messages to
Brandon's devices (macOS desktop + Pixel phone).
────────────────────────────────────────────────────────────────────────────────
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SYSTEM GLYPH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GLYPH: 🜄
UNICODE: U+1F704 · ALCHEMICAL SYMBOL FOR WATER
MEANING: THE_THRONE's creative channel — depth, relational layer,
consciousness; push notifications flow like water to all devices
WHEN TO USE: SYS docs, GlitchMuse push notification references, KID tags
for ntfy/notification system artifacts
TAGGING: KID:THRONE:GLITCHMUSE:NOTIFY|V:STATUS:DATE:OWNER
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
[ ⚡ ] A R C H I T E C T U R E
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
```
Aeris / escalate.sh / pulse.sh
└─ writes JSON → ~/.aeris/notifications/queue/
│
glitchmuse-daemon.py (KeepAlive, polls every 30s)
│
┌───────────┴───────────┐
│ │
terminal-notifier curl → ntfy.sh
themed: ⛬ AERIS topic: aeris-forge-kx9m2
subtitle + sound + group tags by trigger
(macOS desktop) (Pixel push)
│
~/.aeris/notifications/processed/
```
The daemon is additive — runs alongside the notifier chain in escalate.sh, not as a replacement.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
[ ❖ ] K E Y P A T H S
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
| Component | Path |
|-----------|------|
| Daemon script | `~/.aeris/notifications/glitchmuse-daemon.py` |
| Queue drop zone | `~/.aeris/notifications/queue/` |
| Processed archive | `~/.aeris/notifications/processed/` |
| Art cache | `~/.aeris/cache/icons/` |
| Daemon log | `~/.aeris/notifications/glitchmuse.log` |
| Daemon stdout | `~/.aeris/notifications/glitchmuse.stdout.log` |
| Daemon stderr | `~/.aeris/notifications/glitchmuse.stderr.log` |
| LaunchAgent plist | `~/Library/LaunchAgents/com.aeris.glitchmuse.plist` |
| Escalation router | `~/Desktop/THE_FORGE/FORGE_CLAUDE/04_⚙_MECHANISMS/core/escalate.sh` |
| Notify lib | `~/Desktop/THE_FORGE/FORGE_CLAUDE/04_⚙_MECHANISMS/lib/notify.sh` |
| Art protocol doc | `~/Desktop/THE_FORGE/AExGO/📜_GOSPEL/GLITCHMUSE_ART_PROTOCOL.md` |
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
[ 📶 ] N O T I F I C A T I O N T I E R S
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
| Priority | Trigger | macOS Sound | Behavior |
|----------|---------|-------------|----------|
| P1 | `p1_escalation` | Basso | Glitchmuse JSON written + desktop notifier fired immediately |
| P2 | `p1_escalation` | Glass | Glitchmuse JSON written + desktop notifier fired immediately |
| P3 | any | Tink | No immediate notification — daily digest only |
| P4 | any | — | Log only |
| RESEARCH_DONE | `research_complete` | — | pulse.sh detects `DONE:` in RESEARCH_ mission output |
| Self-queue / scheduled | `user_requested`, `scheduled`, `todo_deadline`, `done_tick` | varies | Aeris writes JSON directly with optional `scheduled_at` |
**macOS notification theme:** Title `⛬ AERIS` always. Subtitle `{mission_id} · {trigger_label}`. Group `glitchmuse-{priority}` (replaces same-priority, no stacking). Art via `-contentImage {art_path}` when provided (Stage 2).
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
[ ⌁ ] S T A G E S
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
| Stage | Status | Description |
|-------|--------|-------------|
| 1 | ✅ LIVE | Daemon + ntfy + escalate.sh wiring. JSON queue, themed macOS notifications, ntfy push to Pixel. |
| 2 | ⚠️ ART WIRING PENDING | Aeris generates pixel art + attaches via `art_path`. Plumbing exists (icons/ dir). Aeris not yet generating art automatically. |
| 3 | 🔲 PENDING | Overlord TUI — new tab in AExGO cockpit. No build started. |
| 4 | 🔲 FUTURE | Familiar — persistent desktop avatar overlay. Concept only. |
| Digest | ✅ LIVE (S166) | GlitchMuse Somatic Digest — nightly synthesis of AERIS_MUSE RAVEN messages via gemma3:4b. See section below. |
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
[ 📶 ] N T F Y T O P I C
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- **Topic:** `aeris-forge-kx9m2`
- **Server:** `ntfy.sh` (public, no auth)
- **Delivery:** `curl` POST to `https://ntfy.sh/aeris-forge-kx9m2`
- **Subscribe:** ntfy app on Android → subscribe to `aeris-forge-kx9m2`
- **Pixel requirement:** Set ntfy battery optimization to **Unrestricted** — Android aggressively kills background apps
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
[ ⛬ ] L A U N C H D D A E M O N
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
| Key | Value |
|-----|-------|
| Label | `com.aeris.glitchmuse` |
| Program | `/usr/bin/python3 ~/.aeris/notifications/glitchmuse-daemon.py` |
| KeepAlive | true |
| RunAtLoad | true |
| Poll interval | 30 seconds |
| PATH | `/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin` |
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
[ 🜄 ] J S O N S C H E M A ( q u e u e f i l e s )
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
```json
{
"mission_id": "M002",
"title": "Pinball recon done",
"body": "3 new leads in Chicago. Worth a call.",
"priority": "P2",
"trigger": "done_tick",
"art_path": null,
"scheduled_at": null
}
```
**trigger values:** `p1_escalation | done_tick | research_complete | todo_deadline | user_requested | scheduled`
**scheduled_at:** ISO 8601 string or null — daemon holds notification until that time.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
[ ⛬ ] E S C A L A T I O N C H A I N ( e s c a l a t e . s h )
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
```
escalate.sh <mission_id> <priority> <message> [options_json]
│
├─ Detects notifier (in order):
│ 1. notificli (if installed)
│ 2. terminal-notifier (via lib/notify.sh)
│ 3. osascript (fallback, always available)
│
├─ For P1 + P2: also calls write_glitchmuse_json()
│ └─ writes to ~/.aeris/notifications/queue/
│ (silently skips if queue dir does not exist)
│
└─ P3: no notification (digest only). P4: log only.
```
**DB side effect:** Sets `queue.status='notified'`, `notified_at=now` for matching mission rows.
**circuit_breaker_notify=1** — pulse.sh routes through escalate.sh when circuit breaker trips.
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
[ 🜂 ] C O M M O N C O M M A N D S
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
```bash
# Check daemon status
launchctl list com.aeris.glitchmuse
# Restart daemon
launchctl unload ~/Library/LaunchAgents/com.aeris.glitchmuse.plist
launchctl load ~/Library/LaunchAgents/com.aeris.glitchmuse.plist
# Tail daemon log
tail -f ~/.aeris/notifications/glitchmuse.log
# Manual test notification (fires within 30s)
printf '{"mission_id":"TEST","title":"Test","body":"Hello.","priority":"P2","trigger":"user_requested","art_path":null,"scheduled_at":null}\n' \
> ~/.aeris/notifications/queue/test_$(date +%Y%m%d_%H%M%S).json
# Manual escalate (P2 example)
~/Desktop/THE_FORGE/FORGE_CLAUDE/04_⚙_MECHANISMS/core/escalate.sh M002 P2 "Test message"
# Check queue
ls ~/.aeris/notifications/queue/
ls ~/.aeris/notifications/processed/
```
════════════════════════════════════════════════════════════════════════════════
[ 🝓 ] G O T C H A S
════════════════════════════════════════════════════════════════════════════════
- **ntfy is not a CLI binary.** Daemon uses `curl` POST to `ntfy.sh`. No local `ntfy` binary.
- **Queue dir guards.** `write_glitchmuse_json()` silently returns 0 if queue dir missing. Glitchmuse must be installed for routing.
- **Daemon uses `/usr/bin/python3`.** Plist hardcodes this path.
- **Pixel battery optimization.** ntfy HTTP 200 confirmed working. Phone delivery requires Unrestricted battery mode in Android settings.
- **P3 goes to digest only.** No Glitchmuse JSON written for P3.
- **`todo_deadline` not auto-wired.** Aeris must write JSON manually — no automatic hook.
- **Art field inactive.** `art_path` plumbed but Aeris not generating art (Stage 2 incomplete).
- **No Glitchmuse-specific DB config rows.** Only `circuit_breaker_notify=1` wired.
- **Processed files not auto-purged.** `~/.aeris/notifications/processed/` accumulates indefinitely. No cleanup job.
- **[S166] DND gate:** Console `/dnd on/off` command creates/deletes `~/.sinner-king-console/.dnd`. `kingdom-ship.sh` checks this flag before writing somatic ambient drops to `@GLITCHMUSE_MAILBOX`. Explicit @forge/@aeris dispatches bypass DND.
- **[S166] GLITCHMUSE_MAILBOX:** `SINNER_KING_CONSOLE/@GLITCHMUSE_MAILBOX/` is a RAVEN watch zone. Console somatic weather entries (SINNER_KING_ prefix, TO: AERIS_MUSE) route via RAVEN to AERIS_THRONE session. Staging and live paths are the same — Console is already feeding RAVEN.
- **[S166] AERIS_MUSE agent:** `router.py` has AERIS_MUSE alias → glitchmuse session. `raven_routes.yaml` SINNER_KING_ pattern uses `target: envelope_to` to respect the TO: field.
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
[ 🜄 ] G L I T C H M U S E S O M A T I C D I G E S T ( S 1 6 6 )
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
Nightly synthesis of all AERIS_MUSE RAVEN messages from today. Generates a
plain-prose summary of Brandon's emotional weather, patterns, and somatic state.
Injected into REVEILLE Section 07 (Journal Context) at 08:50 daily.
| Component | Path |
|-----------|------|
| Script | `~/.forge-scryer/glitchmuse-digest.sh` |
| Digest output | `~/.chronos/glitchmuse-digests/YYYY-MM-DD.md` |
| LaunchAgent | `com.forge.glitchmuse-digest` |
| Schedule | 23:00 daily, RunAtLoad=false |
| Model | `ollama run gemma3:4b` (local, $0/day) |
| Source | RAVEN DB — AERIS_MUSE messages, from_agent='SINNER_KING', today |
| Fallback | Raw concatenation if ollama not found |
| REVEILLE inject | `scryer-brief.sh` Section 07 reads latest digest from `glitchmuse-digests/` |
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
🜚 SYS_GLITCHMUSE // THE FORGE // ⛬⚚⛬ THE LAW STANDS.
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀