Organ 01 / Plane A: Kernel Reflexes
franken sentinel serve · internal/sentinel · internal/reflex
Go Kernel Sentinel & MCP Server
Polls /proc/pressure/memory, cgroup v2 memory.events, and journald at 100 ms-1 Hz with linear 60 s TTO forecasting.
- Applies one reversible L1 reflex inside 250 ms: bounded
200 ms cgroup_reclaim with in-flight deduplication, or runtime MemoryHigh throttle with TTL auto-rollback.
- Reconciles vanished transient
*.service units every tick and captures single-process OOM kills via memory.events.
- Serves Streamable HTTP
POST /mcp and GET /v1/events SSE with automatic cursor reset on restart.
Organ 02 / Plane B: Kiro Crew Brain
app.json · .kiro/agents/
Event-Driven 4-Agent Orchestration
franken-conductor wakes immediately via webhook on incident.opened or vote grant, backed by a 15 m sweep cron.
franken-sentry executes read-only L0 tools (node_snapshot, cgroup_top, journal_tail, process_tree).
franken-architect submits remediation steps to plan_submit (max 2 revisions) to lock a canonical SHA-256 plan_hash.
franken-remediator coordinates human WhatsApp polling and executes signed L2 actions step by step.
Organ 03 / Trust Gate: Hands
internal/policy · internal/approval
Policy & PreToolUse Audit Gate
Every proposed plan is validated against policy/actions.yaml before reaching Sentinel or leaving MCP.
- Allows only explicit allowlisted actions and permanently shields PID 1,
ssh/sshd, systemd-journald, tailscaled, Sentinel, and franken-bridge.
- Pipes every MCP tool call through
franken guard --audit, logging a redacted SQLite audit row and halting policy violations with exit code 2.
Organ 04 / Plane C: Conscience
cmd/wa-bridge · verify_worker.go
Headless WhatsApp Bridge & Forward Verification
Single owner of the whatsmeow SQLite session; syncs node identity dynamically from Sentinel health and SSE streams.
- Delivers redacted alerts under 2 s and builds Native Poll options strictly from validated plan labels with deterministic short-code fallback.
- Mints single-use per-step Ed25519 tokens bound to
plan_hash + step_id + action + target with mode-0600 private key isolation.
- Observes a 120 s forward
verify_health window and runs a 15 s x 3 heartbeat watcher before restoring L1 limits and writing postmortems.