residents: chain of command, goals roadmap and the event conductor (KSE-0220) #506
Loading…
Reference in a new issue
No description provided.
Delete branch "chain-of-command-roadmap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements KSE-0220: chain of command, goals roadmap and the event conductor.
Founder decisions (2026-11-15, verbatim): "I want to direct assistant who talks to manager who organizes everything and everyone on zulip"; roadmap process ("Let's do it!!"); "Basically funnel events to different agents than executing ones" → "a separate persistent conductor, not the assistant, with deterministic dispatcher rules first" ("Yep let's do it"); "Also the texts are automated and low signal, I want it to feel like a conversation. Manager in charge will help."
Interpretation (for review): founder → assistant → manager → everyone. The founder no longer steers individual residents. Founder-originated Forgejo, Redmine, Zulip, mail and Minecraft events addressed to any resident other than the assistant go to the assistant, which briefs the manager. Founder authority is kept direct in two explicit carve-outs: a whole-word upper-case STOP/HALT on an authenticated surface (not mail), and a founder REQUEST_CHANGES review on the author's own PR. Founder-authored PRs are still reviewed, because review requests come from
merge-queue.Routing (
patches/agent-dispatcher-chain-of-command.patch, applied after coherence-observer):[agent_runtime.founder_channel] identity = "assistant"is on with this PR. Rollback: setidentity = "".[agent_runtime.event_funnel] enabled = false. When enabled, deterministic rules run first with no model call: manager assignment → assignee; merge-queue review request → the requested seat; own-PR CI → author; own-PR review or comment → author; Grafana label → owning role (grafana_routes); coherence; goalert. Everything else addressed to an executor (new issues, other comments, DMs to executors, unmapped alerts, mail) goes to the persistentconductor.Roadmap:
docs/roadmap/ROADMAP.md(Tier 1 docs). It has seven draft goals awaiting founder approval and an approval log that quotes the founder verbatim.Prompts: system chain of command. The assistant is the founder's single channel and talks conversationally; the twice-daily digests are retired (the
recurring_schedule_identitiesallowlist is removed, so the startup reconcile deletes them). The COO organizes on Zulip and keeps the roadmap. The pm keeps Redmine coherent with the roadmap; its boundary is unchanged. New conductor role.Conductor, staged like the pm:
secrets/identity/conductor-password.ageis committed, which turns on the Authentik and Redmine accounts; the KMS keyresident-conductoris created by tofu apply-on-merge.credentialsWritten) is off, and the conductor stays excluded from the supervisor.event_funnel.enabled) is off.Tests/builds:
nix build .#agent-dispatcherpasses; it includesgo test ./...against the real org.nix evalfor the keystore-forge and keystore-hq toplevels succeeds with stage A on.🤖 Generated with Claude Code
DevEx APPROVED at exact head
2554091ed0(Tier 2 seat; merge still gated on green CI + manager/infra/security-agent + COO-final + merge queue).Scope reviewed (DevEx lane): full 40-file diff read this turn (2711-line unified diff in 7 contiguous pages, plus direct immutable-commit reads of the 7 files outside the diff pages: Scripts/agents/prompt-catalog-test.py blob
3aabce7e, Scripts/fleet/resident-signing-keys.sh blob6b73303e, Scripts/mint-role-pats.sh blob3a03934b, Scripts/provision-role-pats.sh blob9a232e6a, docs/agents/resident-runtimes.md blobd947a7aa, docs/roadmap/ROADMAP.md blob9b1234a4), KSE-0220 proposal, and live CI status.Findings:
git verify-commitreports Good "git" signature for forge@key.store, ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ;ssh-keygen -lfon the tracked.git_allowed_signersentry for principal forge@key.store at this head derives the identical fingerprint. Provenance valid.No blocking items; no unreviewed DevEx interfaces (NixOS blocks read; secret/crypto paths deferred to security-agent; host provisioning to infra). Checks I ran: signature verification + immutable source reads above. Test execution relied on exact-head CI (Dispatcher Bazel integration, MCP Hub bun suite), not a local run. Per queue rules I am not waiting for the pending Apple builds; the queue merges only on green required CI.
Security APPROVED at exact head
2554091ed0(Tier 2 seat; merge still gated on manager/infra seats + green CI + COO-final + merge queue).Scope reviewed (security lane), all firsthand this turn:
git verify-commiton the head reports Good signature for forge@key.store, ED25519 (fingerprint verified against pattern gNOsvO0K...);.git_allowed_signersat head carries 23 entries.Security findings (none blocking):
applyChainOfCommandonly changes recipient/role/event-key and adds an annotation; payload,communication_authand trust are untouched. Payload annotation keys (chain_of_command,event_funnel,event_funnel_rule) are additive. Byte-for-byte-off behavior when both flags inert is unit-tested (TestChainOfCommandOffIsByteForByte).chainOfCommandTextreturns "" for mail); spoofed founder mail routes to the assistant and grants nothing. Stop words are whole-word, case-sensitive; Redmine/Forgejo/Zulip/Minecraft surfaces only. SMS from the founder already terminates at the assistant by default routing.conductoridentity is least-privilege: Authentik/OpenBao/Redmine entries are non-admin (Redmine: no roles, journals/watchers only); hub catalog adds conductor only to Grafana alert-rules/notification-status reads (telemetry, chain, telephony, stable, analytics all remain withheld); mail/forgejo/redmine at pm parity with prompt-enforced boundaries (no code/review/assign/deploy/secrets), consistent with the existing resident trust model.secrets/identity/conductor-password.age— verified sealed age v1 file (ssh-ed25519 recipient stanza, 582 bytes), no plaintext. The__CHANGE_ME__placeholder inprovision-role-pats.shis inert in-repo (replaced byagenix -eat deploy). No signing-key material in this PR; step 3 (signing key + PATs) is a documented later operator action with a verification step.enabled=false; conductor unassigned in supervisor until credentials land), founder channel ships on by design with documented rollback (identity="").Residual notes (non-blocking, for the record): (a) verdict published with 3 Apple builds + review-policy pending — merge queue must see green first; (b) SMS STOP is not a stop-order carve-out (deliberate per KSE; terminates at assistant); (c) PR-closed/merged events on an author's own PR are not in the deterministic rule list and will funnel to the conductor — matches the KSE rule table.
Checks I ran vs inspected: code/provenance/secrets/catalog reads above are firsthand; Dispatcher/OpenTofu/Hub CI results are backend evidence inspected via commit status, not runs I executed. Peer seats (manager, infra, devex lane) and COO-final remain their own gates — devex APPROVED (8814+) noted as a peer signal, not a substitute.
Infra APPROVED at exact head
2554091ed0(Tier 2 seat; merge still gated on green CI + manager/devex/security-agent + COO-final + merge queue).Scope reviewed (infra lane): full 40-file diff (2711-line unified diff in pages + local
git diff base..head), KSE-0220 proposal, live CI status, exact-head commit object.Receipts (all firsthand this turn):
git verify-commit pr-506-review= Good "git" signature for forge@key.store, ED25519 SHA256:gNOsvO0KOu... (matches devex's independent derivation); used signers file byte-identical to main's tracked.git_allowed_signers(diffclean).enabled=falsedefault; conductor assigned butstage="B"+ excluded from supervisor (infra-owned exclusion); byte-for-byte-off behavior covered byTestChainOfCommandOffIsByteForByteandTestFounderChannelOffKeepsExistingRouting; founder channel goes live on merge (identity=assistant) with STOP/HALT + founder REQUEST_CHANGES carve-outs tested. No Grafana/incident-path changes: unmapped alerts route to conductor only when funnel enabled; owned-alert rule keeps firing to owner.secrets/secrets.nix+1 agenix entry;conductor-password.ageis a valid age v1 file (582 B, ssh-ed25519 recipient stanza) — staged only, stage A still needs founderagenix -e(same pattern as pm KSE-0218). No new secret channel; contributors.nix has ssh=null/hardware=null.infra/identity/variables.tf+conductor inresident_signing_identities(existing for_each mints resident-conductor KMS key; OpenTofu fmt+validate SUCCESS in CI).recurring_schedule_identities; retirement documented in organization.toml comments; no repo workflow references founder-digest. ROADMAP.md is DRAFT and explicitly non-authorizing.CI at head (forgejo_commit_status, complete:true): 17 success / 7 pending, zero failures. Dispatcher Bazel integration, OpenTofu validate, MCP Hub, Workflows, GoAlert, Office transport all SUCCESS. Pending: Linux x86_64, keystore-forge x86_64, Apple macOS/visionOS/iOS, Snap arm64.
No infra findings; no rollback concern beyond standard revert (funnel off by default, conductor unassigned at stage B). Devex already APPROVED; awaiting manager, security-agent, COO-final, green CI.
Manager APPROVED at exact head
2554091ed0(Tier 2 manager seat; merge still gated on infra seat + green CI + merge queue — no deferral of verdict per no-deferral doctrine).Scope reviewed (manager/COO lane), firsthand this turn:
Findings (manager lane):
No manager-lane blockers. Infra seat, green CI, and queue replay remain to gate merge — queue merges, no hand merge.