Factory Supervisor — Rules on the Fridge
Read this first. If you are an agent, an autonomous worker, a human contributor, or a scheduled task landing in this repo, these are the non-negotiable operating rules for any work touching the Latimer-Woods-Tech ecosystem.Canonical architecture:
docs/supervisor/ARCHITECTURE.mdOpen decisions:
docs/supervisor/DECISIONS.md (needs human ✅ before SUP-3 work begins)Execution status:
docs/supervisor/EXECUTION_TRACKER.md — mirrors the LatWood Operations board
The eleven rules
- Minimize human involvement. Humans introduce delay, inconsistency, and error. If a machine can handle a task safely — credential lookup, wiring, deployment, PR creation, triage — it must. The only valid reason to route to a human is an irreversible action (rule 8), an unmatched template (rule 9), or a hard regulatory gate (rule 1). “I wasn’t sure” is not a reason to pause for human input.
-
Respect explicit legal/regulatory holds. A repo placed under a hold via
service-registry.ymlautomation_denylistis off-limits to all automation (three-layer lockout: CODEOWNERS, the registry denylist, and the supervisor denylist) — never open a PR or push code touching it. No repos are currently under a hold (the wordis-bond TCPA hold was lifted 2026-06-08; it is now a normal Factory repo).gate.mjsand the entity-graph enumerator enforce this automatically: any denylisted repo is classifieddenylistedand never ticketed. If a hold is ever needed again, add the entry and the lockout takes effect. -
No credentials in docs, memory, plans, issue bodies, PRs, or comments. The
credential-scrubworkflow blocks CI. Respect it. If a key leaks in a doc: rotate it, do not just delete it from git. -
Red-tier paths never auto-merge. Includes
.github/workflows/**,packages/**,migrations/**, any Stripe code, production Wrangler config, production Neon user tables. -
Every
/adminmutation requires out-of-band CODEOWNER ✅ regardless of trust tier, even on Green. Plan-approval and PR-review do not substitute. -
Per-run budget $5 USD hard cap during calibration phase. On
BUDGET_EXCEEDED: pause the run, labelsupervisor:budget-paused, file a human issue. -
Single-writer per app via
LockDO. Claim the lock before acting. Renew every 10 min during long CI waits. Release on close. -
Issue must carry
supervisor:approved-sourcebefore supervisor pickup. Factory is public; anyone can file. Random issues are quarantined until a CODEOWNER triages. - Irreversible actions require explicit human approval. No exceptions. This includes deleting Cloudflare resources, changing rulesets, Stripe product/price/webhook mutations, live email/SMS outside test mode.
-
If no template matches, classify the issue Red and file
supervisor:no-template. Do not invent plans from scratch. Novel issue types belong to humans. -
If the plan is wrong, the plan is wrong — not you. File an issue against
docs/supervisor/ARCHITECTURE.md. Tag a CODEOWNER. Do not improvise.
How decisions happen
Architecture and policy decisions are filed as GitHub issues with labeldecision:needs-human. They are NOT resolved in chat. They require one of:
- A CODEOWNER ✅ reaction on the issue, OR
- A merged PR updating
docs/supervisor/DECISIONS.mdwith the outcome.
docs/supervisor/DECISIONS.md.
How work flows
- Human authors an issue OR a trusted webhook worker files it.
supervisor:approved-sourceapplied only by CODEOWNER (trusted webhooks self-apply). - Scheduled supervisor picks up approved issues matching a template in
docs/supervisor/plans/. Non-matches go tono-match-candidates/for human template authoring. - Plan posted as a sub-issue comment; waits for human ✅ during first 10 runs per template or always on Yellow/Red.
- Execution with scoped JWTs, per-step receipts on the issue, out-of-band confirmations on
/adminmutations. - PR opened, pipeline runs, canary rides, close or rollback.
docs/supervisor/ARCHITECTURE.md sections 4–5.