System architecture

From joelhooks/joelclaw · View interactive version

System architecture is an AI agent skill from the GitHub repository joelhooks/joelclaw. Canonical joelclaw topology, Central/Relay vocabulary, and wiring map. Use when reasoning about architecture, Panda/Flagg Central migration, satellites, run capture, tracing event flow, debugging why something ran/didn't run, identifying which worker executes a function, checking what listens on a p

How to use this skill

Skill file

System Architecture (Canonical Topology)

For private topology, see .brain/resources/operator-network-context.svx in the private dark-wizard repo and the tailnet-topology skill. Replace angle-bracket placeholders before running commands.

This skill is the single source of truth for joelclaw system wiring.

Freshness notes:

Treat older “Panda is the whole system” wording as stale unless re-verified against live receipts.

Use it for:

Ground-Truth Scope + Evidence Snapshot

This document is grounded in direct reads of:

Related docs verified

Refresh receipt: 2026-06-15

This refresh folds in work from:


0) Operator map

See .brain/resources/operator-network-context.svx in the private dark-wizard repo and the tailnet-topology skill for current host assignments, accounts, storage, and private service addresses. Do not infer placement from this skill's historical process examples.

1) Verify host placement

Check the installation's private service-placement file against the current hostname and service status. Run infra/install-critical-launchdaemons.sh --plan where the launchd installer applies. Verify the expected job in its launch domain and prove a request reaches the service before calling it healthy. A tailnet name alone proves neither route locality nor service ownership.

2) Process Inventory (Long-Running)

Herdr launch-domain split

Host launchd inventory (Panda live Central snapshot)

Snapshot source: launchctl print gui/$(id -u)/<label> and plist inspection.

| Launchd label | State | PID (snapshot) | Role | Ports / endpoints |

| -------------------------------- | ----------------------: | ---------------------------: | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |

| com.joel.system-bus-worker | running | 75292 | Host worker supervisor (worker-supervisor) | supervises child bun on 3111 |

| com.joel.restate-worker | retired / rollback-only | — | Historical host Restate wrapper (scripts/restate/start.sh) | superseded by deployment/restate-worker on 9080 |

| com.joel.gateway | running | 81275 | Gateway daemon (packages/gateway/src/daemon.ts) | WS :3018, Redis bridge |

| com.joel.caddy | running | 9347 | Reverse proxy | <worker-ingress-port>, <docs-ingress-port>, 6443, <pds-ingress-port>, <ingress-port>, 8443, <event-ingress-port> |

| com.joel.talon | running | 96359 | Infra watchdog | health 127.0.0.1:9999 |

| com.joel.agent-secrets | running | 98048 | Secret lease daemon | no public port |

| com.joel.imsg-rpc | running | 61110 | iMessage JSON-RPC socket daemon | Unix socket /tmp/imsg.sock |

| com.joel.kube-operator-access | running | varies | stable kubectl/talos operator tunnel | local 16443 (kube), 15000 (talos) |

| com.joel.voice-agent | running | 71887 | voice agent runtime | local 8081 |

| com.joel.local-sandbox-janitor | scheduled | (launchd timer) | ADR-0221 local sandbox janitor (scripts/local-sandbox-janitor.sh → joelclaw workload sandboxes janitor) | logs in /tmp/joelclaw/local-sandbox-janitor.{log,err} |

| com.joelclaw.agent-mail | spawn scheduled | (none in launchctl snapshot) | agent-mail MCP HTTP service | observed listener 127.0.0.1:8765 (python process) |

| com.joel.colima | not running | — | startup helper for Colima | n/a |

| com.joel.k8s-reboot-heal | not running | — | periodic k8s heal script | n/a |

| com.joel.system-bus-sync | not running | — | sync guard watcher | n/a |

| com.joel.gateway-tripwire | not running | — | gateway tripwire script | n/a |

| com.joel.content-sync-watcher | not running | — | fs watch -> content/updated event | n/a |

| com.joel.vault-log-sync | not running | — | Vault log sync watcher | n/a |

Flagg Central launchd scaffold

Source: infra/central/README.md, infra/central/launchd/*.plist.template, and docs/prd-rhizomatic-network-canary.md.

These labels are part of the Flagg Central shadow/cutover scaffold. They are not proof that Flagg is authoritative.

| Launchd label | Domain | Role | Ports / endpoints |

| --------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |

| com.joelclaw.central.colima | system LaunchDaemon | starts the dedicated joelclaw-central Colima/Docker substrate as service infrastructure | Docker socket under /Users/joelclaw/.colima/joelclaw-central/docker.sock |

| com.joelclaw.central.compose | system LaunchDaemon | starts the shadow Central Compose stack | Redis, Typesense, Inngest, Restate, MinIO bound to 127.0.0.1 by default |

| com.joelclaw.central.health | system LaunchDaemon | bounded health + recovery state machine | health.sh can invoke recover.sh --all after repeated degraded passes |

| com.joelclaw.central.nas-mounts | system LaunchDaemon | mounts/verifies Flagg NAS tiers | /Volumes/nas-nvme, <nas-mount> |

| com.joelclaw.chorus-rhizomatic | system LaunchDaemon | Parked historical canary; no briefing injection or live claims; stop pending steering sudo | Old endpoint 127.0.0.1:4821/mcp; old satellite tunnel 127.0.0.1:7331 |

Flagg reboot acceptance rule: Central is not eligible for cutover until infra/central/scripts/reboot-proof.sh passes from another machine after hard reboot with no GUI login.

Process supervision behavior: `worker-supervisor`

Source: infra/worker-supervisor/src/main.rs

Worker supervision split note


Kubernetes process inventory

Node

Core services

| Service | Workload kind | Service type | Service port(s) | NodePort(s) / exposure | Role |

| ------------------------------- | ----------------------------------- | ---------------------------------------------------------- | ---------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |

| Inngest | StatefulSet inngest | NodePort (inngest-svc) | 8288, 8289 | 8288, 8289 | Event API + connect ws |

| Redis | StatefulSet redis | NodePort | 6379 | 6379 | Queue/state/pubsub |

| Typesense | StatefulSet typesense | NodePort | 8108 | 8108 via Colima/Lima host publish | Search + telemetry store |

| Restate | StatefulSet restate | NodePort | 8080, 9070, 9071 | 8080, 9070, 9071 | Durable workflow ingress + admin + metrics |

| system-bus-worker | Deployment | ClusterIP | 3111 | in-cluster only | Cluster-role worker (12 functions) |

| restate-worker | Deployment | ClusterIP | 9080 | in-cluster only | dagOrchestrator + dagWorker + queue drainer in full agent image |

| docs-api | Deployment | NodePort | 3838 | 3838 | PDF/docs API + agentic search + taxonomy graph |

| dkron | StatefulSet | ClusterIP (dkron-svc) + headless peer svc (dkron-peer) | 8080, 8946, 6868 | in-cluster only; operator access via short-lived CLI-managed tunnel | Distributed cron scheduler for Restate pipelines |

| livekit-server | Deployment (Helm) | NodePort | 80, 7881 | 7880 (for svc port 80), 7881 | LiveKit signaling + rtc tcp |

| bluesky-pds | Deployment (Helm-managed) | NodePort | 3000 | 3000 | AT Proto PDS |

| minio | StatefulSet | ClusterIP + NodePort | 9000, 9001 | 30900, 30901 | Legacy local S3-compatible runtime |

| aistor-s3-api (aistor ns) | NodePort service (operator-managed) | NodePort | 443, 9000 | 31000 (+ dynamic management NodePort) | AIStor S3 API (TLS + management) |

| aistor-s3-console (aistor ns) | NodePort service (operator-managed) | NodePort | <event-ingress-port> | 31001 | AIStor web console |

Restate / Firecracker runtime note

Control-plane access


3) Worker Architecture (Role Split + Registration)

Source files:

Role model

Ground-truth counts

message.requested events and watches the canonical event log. It does not run

in the gateway driver, transport daemon, or gateway session.

App registration isolation

From inngest/client.ts:

This prevents host and cluster workers from overwriting each other’s function graphs.

serveHost behavior

From serve.ts:

Kubernetes cluster worker manifest sets:

Panda host worker config should advertise an SDK callback URL the Inngest pod can actually reach. Current docs call out INNGEST_SERVE_HOST=http://<tailnet-ip>:<service-port> on Panda. Do not assume host.lima.internal or host.docker.internal works from inside Talos unless a live pod-to-host probe proves it.

Registration mechanics

Host is primary today

From index comments + function lists:


4) Event Flow (CLI → Inngest → Worker → Completion)

Canonical flow: `joelclaw send`

  1. CLI joelclaw send <event> calls Inngest.send().
  2. Inngest.send() POSTs event JSON to:
  1. Inngest server persists the event and resolves matching function triggers.
  2. Inngest dispatches function steps to the worker app graph that owns that function ID:
  1. Worker handles callbacks via /api/inngest (Hono + inngest/hono handler).
  2. Each step.run result is memoized by Inngest; next step executes when prior completes.
  3. Completion/failure is queryable via GraphQL (/v0/gql) and CLI commands (runs, run, event, events).

Run capture flow: Machine hook → Central `/api/runs` → `memory/run.captured`

  1. Runtime-native hook captures only the new Run slice:
  1. The hook posts JSON to Central:
  1. packages/system-bus/src/serve.ts validates the bearer token against the persistent local SQLite registry ~/.joelclaw/capture-auth.db. The worker refreshes this four-row registry from Typesense machines_dev in the background every five minutes. Known-token requests never wait for Typesense; an unknown token gets one bounded migration lookup.
  2. Worker writes the raw source of truth through @joelclaw/memory#writeRunBlob:
  1. Worker emits memory/run.captured to Inngest.
  2. packages/system-bus/src/inngest/functions/memory/run-captured.ts appends Run metadata, chunks, and FTS rows to SQLite sessions.db in one transaction.
  3. If POST fails from a Machine, the hook writes the POST body into ~/.joelclaw/outbox/; the Machine does not become Central just because capture is temporarily offline.
  4. If raw blobs exist but SQLite is stale, recover Inngest/worker registration first, then backfill with scripts/backfill-session-index.ts. Do not replay thousands of memory/run.captured events casually.
  5. The public Vercel app is not a Run ingress or search surface. Its POST /api/runs and POST /api/runs/search routes return 410. Machine hooks must use the Central system-bus endpoint, and operators must use joelclaw sessions search.

Recall flow: scoped request → CLI composition root → lane-preserving result

  1. Interactive callers run in a trusted GitHub checkout or pass both --project

and --workstream. Automatic callers send one exact

ComposedRecallRequestV1 through joelclaw recall --request-file - on

private stdin.

  1. Every request names principal, purpose, allowed privacy tiers, supersession

policy, and independent limits for reflections, observations, and curated

pages. The deprecated --limit flag is ignored.

  1. The CLI reads the pinned flowing-memory artifact and curated critical.db

projection, then returns three separate lanes: flowing-reflections,

flowing-observations, and curated-pages. Never merge their scores.

  1. Unavailable lanes return typed envelopes and exit 3. The gateway shows a

generic unavailable marker. Optional Inngest enrichment records redacted

telemetry and returns no context. Restate returns a generic degraded marker.

  1. Use joelclaw sessions search "<query>" --source both --extract for exact

Run/session wording, commands, and transcript evidence. Composed recall is a

broad memory surface, not raw transcript search.

  1. typesense-recall is config-selected rollback only. Status reports it as a

visible degraded warning without turning global health red.

Accepted cluster decision (2026-08-23): automatic recall inside the

system-bus and Restate cluster images is intentionally disabled/degraded after

retiring old observation recall. packages/recall is present for module

resolution, but the images do not receive a local semantic store or compiled

joelclaw recall binary. Callers must take their explicit optional-enrichment

degrade path. This is not a hidden deployment dependency. Re-enable cluster

recall only after a separately reviewed secure remote flowing-read substrate

exists.

Queue flow: `joelclaw queue emit` → Restate drainer → durable dispatch

  1. CLI joelclaw queue emit <event> persists a QueueEventEnvelope into Redis stream joelclaw:queue:events and indexes it in sorted set joelclaw:queue:priority.
  2. The restate-worker k8s deployment (packages/restate/src/index.ts) starts a deterministic queue drainer beside the channel callback listener.
  3. On startup, the drainer claims pending + never-delivered entries via @joelclaw/queue#getUnacked(), reindexes replayable entries, and emits OTEL replay evidence.
  4. Each drain tick selects the next priority candidate from the sorted set, resolves its static registry target from packages/queue/src/registry.ts, and POSTs a one-node DAG request to Restate /dagOrchestrator/{workflowId}/run/send.
  5. When backlog remains and a dispatch slot frees, the drainer self-pulses immediately instead of waiting for the next QUEUE_DRAIN_INTERVAL_MS heartbeat. That interval is now the idle poll / retry cadence, not a mandatory 2-second tax between successful sends.
  6. The current Story-3 bridge re-emits the queue item to its registered Inngest event target inside that one-node DAG request. This is deliberate: the deterministic queue/drainer is proven first; per-family Restate cutovers remain Story 4 work.
  7. On accepted Restate dispatch, the drainer acks the queue message; on failure it leaves the message in Redis, applies retry cooldown, and emits queue.dispatch.failed OTEL evidence.
  8. If backlog remains in Redis but the drainer stops making progress past QUEUE_DRAIN_STALL_AFTER_MS, it emits queue.drainer.stalled and exits non-zero so k8s restarts deployment/restate-worker. That is the self-heal path for a wedged drainer inside an otherwise-running Bun process.
  9. Crash recovery comes from the Redis stream + consumer-group replay path, not from vibes: restart the restate-worker pod, let getUnacked() reclaim the inflight entries, then drain resumes.

Workload flow: `joelclaw workload run` → Redis → Restate DAG → execution

  1. joelclaw workload plan ... --stages-from <file> can load an explicit stage DAG, validate unknown deps/self-deps/duplicates/cycles, and preserve per-stage acceptance gates.
  2. joelclaw workload run <plan-artifact> normalizes the selected stage into the canonical workload/requested runtime request.
  3. Queue admission writes the request into Redis, where the deterministic drainer forwards it into Restate as a dagOrchestrator/{workflowId}/run/send request.
  4. dagOrchestrator executes dependency waves: ready nodes in parallel, chained nodes only after every dependsOn node has terminal output.
  5. dagWorker executes the node handler:
  1. Each node emits OTEL (dag.node.*), and the workflow emits dag.workflow.* so queue → Restate → execution remains observable.
  2. Current truthful limit: the microVM runtime boots and restores snapshots in-cluster, but the broader exec-in-VM workspace drive protocol is still incomplete for general coding slices.

Webhook flow

  1. External service posts to /webhooks/:provider.
  2. Caddy routes /webhooks/* on localhost:8443 to worker localhost:3111.
  3. webhookApp verifies signature, normalizes payload, emits Inngest events (provider/event).
  4. Inngest executes subscribed functions.

"Why did this run / not run" trace recipe

  1. Start with an existing event or run id. Send a probe only when its destination and effects are explicitly authorized.
  2. joelclaw events --prefix <event-prefix> --hours 1
  3. joelclaw event <event-id> (fan-out to function runs)
  4. joelclaw run <run-id> (step trace + errors)
  5. joelclaw runs --count 20 --hours 1
  6. joelclaw otel search "<component/action>" --hours 1
  7. Validate function ownership in index.host.ts / index.cluster.ts.

5) Resolve a service endpoint

Use the local runtime config or the private operator map to find the port and listener address. Keep container ports, host loopback listeners, SSH forward ports, and external ingress separate. A healthy loopback service does not prove that a proxy, tunnel, or webhook can reach it.

For CLI probes, @joelclaw/endpoint-resolver can try localhost, a discovered or explicitly configured VM address, and cluster service DNS. Check the returned endpoint class and probe receipts. See private runtime configuration for the environment overrides.

6) Storage Topology

Run blobs / memory capture

Redis

Typesense

From current runtime code:

Firecracker runtime storage

Inngest state

docs-api surface

NAS (ADR-0088 + ADR-0187)

Tiering policy:

Access paths

| From | NVMe tier (1.5TB) | HDD tier (56TB) | Method |

| ----------------- | ------------------- | --------------------- | --------------------------- |

| macOS host | /Volumes/nas-nvme | <nas-mount> | NFS mount via LaunchDaemon |

| k8s pods | PVC nas-nvme | PVC nas-hdd | NFS PV (<nas-lan-ip>) |

| host-worker funcs | /Volumes/nas-nvme | <nas-mount> | Direct path (runs on macOS) |

k8s ↔ NAS networking

k8s pods reach the NAS via a LAN route through the Colima col0 bridge:

Talos → Docker NAT → VM col0 → macOS (ip.forwarding=1) → LAN → NAS

The VZ NAT on eth0 does NOT forward LAN traffic. Route persisted in Colima provision + colima-tunnel script:

ip route replace <nas-lan-cidr> via <vm-gateway> dev <vm-interface>

Always use IP <nas-lan-ip>, never the NAS SSH alias — DNS doesn't resolve from k8s.

Degradation contract (ADR-0187):

Flagg Central shadow storage

Rhizomatic / Chorus (parked historical canary)

Vault and durable receipts


7) Verify network paths

  1. Look up the approved route and listener in the private operator map. Do not guess a port or reconstruct a tailnet URL from an old host name.
  2. Prove the direct service health check on its own host. Then verify the tunnel or ingress independently against the expected status and body.
  3. For webhook paths, verify both the receiver's signature check and the resulting event or delivery receipt. A generic HTTP 200 is not sufficient.
  4. For run capture, use the configured JOELCLAW_CENTRAL_URL and the owning capture runbook. Verify authenticated /api/runs/health and queue/readback separately. Do not publish the private origin or auth material.

8) CLI Wiring (Command Tree → Endpoint Surface)

Primary command tree root: packages/cli/src/cli.ts.

Endpoint map by command family

| Command family | Primary backend |

| --------------------------------------------- | ----------------------------------------------------------------------------------------------------- |

| send | Inngest Event API POST /e/<event-key> |

| runs, run, functions, event, events | Inngest GraphQL POST /v0/gql |

| status | Inngest/worker health probes + k8s checks + agent-mail liveness |

| gateway * | Redis keys/channels + launchd/system ops |

| workload * | workload planner + Redis queue admission + Restate dagOrchestrator / dagWorker runtime |

| docs * | docs-api REST API (/search, /docs/*, /chunks/*, /concepts*) |

| restate cron * | Dkron REST API via direct --base-url or short-lived kubectl port-forward to svc/dkron-svc |

| otel * | ClickHouse OTEL store via capability adapter |

| recall * | CLI composition root: flowing reflections + flowing observations + curated critical.db pages; exact scope/access required |

| sessions * | Exact evidence drill-down through Central SQLite sessions.db / raw Pi session JSONL fallback |

| satellite * | thin-Machine local probes + optional Central gateway repair request over SSH |

| mail * | Agent-mail MCP HTTP (127.0.0.1:8765) via CLI adapter wrappers |

| inngest * | worker launchd + Talon + k8s + Typesense diagnostics |

Run capture is currently hook/script-driven, not a normal operator command family:

Config source:


9) Observability + Tracing Topology

OTEL event pipeline

1. ClickHouse through the OTEL collector

2. optional Convex mirror for high-severity recent window

3. optional Sentry forward for warn/error/fatal

Run/session search observability

Talon / health alerting posture

Langfuse integration points


10) Key ADR Topology Decisions

| ADR | Title | Status | Topology impact |

| -------- | ------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------- |

| ADR-0048 | Webhook gateway | shipped | /webhooks/:provider normalization + signature verification + Inngest emission |

| ADR-0088 | NAS-backed storage tiering | shipped | Defines SSD/NAS NVMe/NAS HDD storage contract |

| ADR-0089 | Single-source worker deployment | shipped | Host/cluster role split + single canonical source |

| ADR-0144 | Gateway hexagonal architecture | shipped | Gateway as composition root; heavy logic in @joelclaw/* |

| ADR-0155 | Three-stage story pipeline | shipped | Simplified story function flow through Inngest durable steps |

| ADR-0156 | Graceful worker restart | superseded | Historical restart strategy; superseded by Talon ADR |

| ADR-0159 | Talon watchdog daemon | shipped | Compiled watchdog + infra supervision model |

| ADR-0038 | Embedded pi gateway daemon | shipped | Always-on gateway session architecture |

| ADR-0051 | Tailscale Funnel ingress | shipped | Public webhook ingress via Funnel/Caddy pattern |

| ADR-0148 | k8s resilience policy | accepted | NodePort-first exposure, probe requirements, restart recovery checklist |

| ADR-0158 | worker-supervisor binary | superseded | Legacy supervisor ADR now superseded, but binary remains in active launchd path |

| ADR-0182 | node-0 localhost resilience | shipped | endpoint class fallback (localhost -> vm -> svc_dns) |

| ADR-0187 | NAS degradation fallback contract | accepted | mandatory local/remote/queued write fallback |

| ADR-0212 | AIStor as local S3 runtime | accepted | maintained local S3 runtime in aistor namespace; legacy MinIO retained for rollback |

| ADR-0243 | Runs-based memory capture | active | Machine hooks POST Runs to Central /api/runs; raw blobs are source of truth; Typesense is derived |

| ADR-0244 | Reply Grants | active | public channel replies require explicit per-thread grants; Project Threads do not authorize public posting |

| ADR-0245 | Project Threads as operator workrooms | active | bounded objectives coordinate through private #brain-joel threads with receipts |

| ADR-0246 | Mac Studio Central migration | active | Flagg shadow bootstrap, no split-brain, whole-Central cutover only after freeze/approval |

| ADR-0247 | New Central services start on Flagg | active | new Central-oriented services should prefer Flagg/shadow path instead of deepening Panda-only assumptions |


10.1) Sandbox Execution Contract (@joelclaw/agent-execution)

Package: packages/agent-execution/

Purpose: Canonical contract for sandboxed story execution shared between Restate workflows, system-bus Inngest functions, and k8s Job launcher.

Contract Types

Request: SandboxExecutionRequest

Result: SandboxExecutionResult

Artifacts: ExecutionArtifacts

Repo Materialization (Story 3)

Function: materializeRepo(targetPath, baseSha, options)

Behavior:

Returns: { path, sha, freshClone, durationMs }

Key options:

Artifact Export (Story 3)

Function: generatePatchArtifact(options)

Behavior:

Key options:

Returns: ExecutionArtifacts

Promotion Boundary (Phase 1)

Authoritative output is patch bundle + metadata.

Sandbox runs do not merge to main or push to remote. The runtime:

  1. Materializes repo at baseSha in sandbox-local workspace
  2. Executes agent task
  3. Runs verification commands
  4. Exports patch artifact with touched files and verification results
  5. Emits SandboxExecutionResult event with ExecutionArtifacts

Promotion is a separate operator decision:

This keeps sandbox runs isolated and reversible.

k8s Job Integration

Job spec generation: generateJobSpec(request, options)

Cold k8s Jobs for isolated story execution:

Runtime contract:

  1. Decode TASK_PROMPT_B64 from env
  2. Call materializeRepo() at BASE_SHA
  3. Execute agent with task
  4. Run verification commands (if VERIFICATION_COMMANDS_B64 set)
  5. Call generatePatchArtifact() with results
  6. Emit SandboxExecutionResult event with ExecutionArtifacts
  7. Exit 0 (success) or non-zero (failure)

Cancellation: Delete Job resource (SIGTERM to container)

Job deletion: generateJobDeletion(requestId) -> { name, namespace, propagationPolicy }

See k8s/agent-runner.yaml for full runtime contract specification.

Topology Impact

Current state: the host-worker local sandbox path is now using the local-isolation helpers in production code, the package has a concurrent proof that two local sandboxes keep distinct compose identity plus copied devcontainer state, guarded full-mode workflow-rig dogfood closes terminally, and cleanup now has both on-demand CLI surfaces and scheduled launchd janitoring. Follow-on work is now about deeper runtime ergonomics and debugging any remaining non-terminal stale residues, not missing basic cleanup automation.


11) Verification Commands (Health + Wiring)

Core topology

# Colima + VM IP
colima status --json

# Kubernetes control plane + node
kubectl cluster-info
kubectl get nodes -o wide

# Core workloads
kubectl get pods -n joelclaw -o wide
kubectl get svc -n joelclaw -o wide

Host supervision

# Worker supervisor launchd state
launchctl print gui/$(id -u)/com.joel.system-bus-worker | rg "state =|pid =|last exit code"

# Gateway / Caddy / Talon
launchctl print gui/$(id -u)/com.joel.gateway | rg "state =|pid ="
launchctl print gui/$(id -u)/com.joel.caddy | rg "state =|pid ="
launchctl print gui/$(id -u)/com.joel.talon | rg "state =|pid ="

# Talon health
curl -s http://127.0.0.1:9999/health

Worker role split

# Parse role counts directly from source lists
python - <<'PY'
import re
from pathlib import Path
for f,name in [('packages/system-bus/src/inngest/functions/index.host.ts','host'),('packages/system-bus/src/inngest/functions/index.cluster.ts','cluster')]:
    txt=Path(f).read_text()
    body=re.search(rf'export const {name}FunctionDefinitions = \[(.*?)\];', txt, re.S).group(1)
    count=sum(1 for line in body.splitlines() if line.strip() and not line.strip().startswith('//'))
    print(name, count)
PY

# Inngest app ID derivation logic
rg -n "INNGEST_APP_ID|system-bus-host|system-bus-cluster|WORKER_ROLE" packages/system-bus/src/inngest/client.ts

Event flow trace

# Send event
joelclaw send <event> -d '<json>'

# Trace event and resulting runs
joelclaw events --prefix <event-prefix> --hours 1 --count 20
joelclaw event <event-id>
joelclaw runs --hours 1 --count 20
joelclaw run <run-id>

# Telemetry correlation
joelclaw otel search "<component_or_action>" --hours 1

Run capture + session search

Use recall and the current session-search contract. Keep private queries in structured MCP arguments. Raw evidence requires a scope-bound evidenceDrilldownReceipt; missing projections do not grant raw access.

Flagg Central shadow

cd ~/Code/joelhooks/joelclaw
./infra/central/scripts/preflight.sh
./infra/central/scripts/health.sh
ssh <ssh-user>@<private-host> 'cd <shared-root>/src/joelclaw && ./infra/central/scripts/reboot-proof.sh'

# NAS proof when explicitly working Gate 5 storage
sudo -u joelclaw -H env NAS_EXPECTED_INTERFACE=en0 NAS_EXPECTED_MTU=1500 \
  ./infra/central/scripts/verify-nas.sh --write-probe --benchmark-mib 64

Rhizomatic / Chorus parked-state check

# Historical cleanup only: confirm whether the parked service still awaits steering sudo.
launchctl print system/com.joelclaw.chorus-rhizomatic | rg "state =|pid =|last exit code"

Do not health-check or restart Chorus as a live memory substrate. There is no session briefing injection and no real claims may land.

Networking

# Caddy route config
caddy validate --config ~/.local/caddy/Caddyfile

# Listening ports snapshot
/usr/sbin/lsof -iTCP -sTCP:LISTEN -n -P

# Tailscale runtime (if daemon available)
tailscale status --json

12) Known Unknowns (Do Not Guess)


13) Mandatory Update Policy (Non-Optional)

Update this skill in the same change whenever any of these change:

  1. Worker runtime wiring
  1. Supervision/process topology
  1. Kubernetes topology
  1. Networking/ingress
  1. Storage topology
  1. Observability/tracing
  1. CLI control-plane routing
  1. ADR status changes affecting topology
  1. Central / Relay / Satellite vocabulary or authority changes
  1. Run capture / memory ingestion changes
  1. Flagg Central scaffold changes
  1. Rhizomatic / Chorus parked-state cleanup

If any item above changed and this skill was not updated, this skill is stale and non-canonical.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.