Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

§2. Component diagram

planarian @ a924e09 · Spec v4.6 · snapshot main · all versions

┌────────────────────────────────────────────────────────────────────────┐
│  USER SURFACES          console · `ask` CLI · launcher box             │
└──────────────┬──────────────────────────────────────────┬──────────────┘
               │ requests                                 │ approvals (secure path)
               ▼                                          ▼
┌────────────────────────┐                     ┌─────────────────────────┐
│  INTENT MATCHER        │  unmatched / fuzzy  │  APPROVAL BROKER        │
│  phrases → transitions ├────────────┐        │  tokens bound to the    │
│  or desired-state      │            │        │  concrete candidate     │
│  overrides             │            ▼        └────────────┬────────────┘
└──────────────┬─────────┘   ┌──────────────────┐           │ token
               │ proposal    │  MODEL SERVICE   │           │
               │             │  unprivileged;   │           │
               │             │  emits proposals │           │
               │             └────────┬─────────┘           │
               ▼                      ▼ proposal            ▼
┌────────────────────────────────────────────────────────────────────────┐
│  CORE                                                                  │
│  ┌───────────┐ ┌───────────┐ ┌─────────┐ ┌──────────────┐ ┌─────────┐ │
│  │ INCIDENT  │▶│ DIAGNOSER │▶│ POLICY  │▶│ EXECUTOR     │▶│ JOURNAL │ │
│  │ lifecycle │ │ search    │ │ derives │ │ transaction  │ │ durable │ │
│  │ budgets   │ │ over graph│ │ facts;  │ │ protocol     │ │ states  │ │
│  │ cooldowns │ │           │ │ decides │ │              │ │         │ │
│  └─────▲─────┘ └───────────┘ └─────────┘ └──────┬───────┘ └────▲────┘ │
│        │ divergences                            │               │      │
└────────┼────────────────────────────────────────┼───────────────┼──────┘
         │                                        ▼               │
┌────────┴───────────────────┐   ┌──────────────────────────┐ ┌──┴──────────┐
│  STATE                     │   │  BACKENDS (swappable)    │ │ RECOVERY    │
│  desired (conditions,      │◀──│  units: systemd          │ │ WATCHDOG    │
│   overrides)               │   │  config: nixos-rebuild   │ │ separate    │
│  observed (unknown, stale) │   │  snapshots: btrfs/ZFS    │ │ unit; reads │
│  health (probe contract)   │   │  inventory: udev/sysfs   │ │ the journal │
│  graph (typed edges)       │   │  kernel: Linux           │ └─────────────┘
└────────────────────────────┘   └──────────────────────────┘
                                            │
                             ┌──────────────┴───────────────┐
                             │  TRAINING GYM (offline)      │
                             │  faults, lifecycle cases,    │
                             │  disruption metrics          │
                             └──────────────────────────────┘

Arrows into the core carry proposals. Only the executor calls backends. The model has exactly one write capability: submit a proposal. The recovery watchdog is a separate process that can finish or revert a transaction when the daemon is gone. Everything drawn above the CORE box is a principal (§7, §11); the core’s response to its own failure is enforced by systemd and the initrd, not by the core (§12d).