@bradheitmann/odin-sentinel 0.2.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/src/mcp/server.js +57 -1
  2. package/dist/src/mcp/server.js.map +1 -1
  3. package/dist/src/protocol/index.d.ts +2 -0
  4. package/dist/src/protocol/index.js +1 -0
  5. package/dist/src/protocol/index.js.map +1 -1
  6. package/dist/src/protocol/repository.d.ts +1 -0
  7. package/dist/src/protocol/repository.js +4 -2
  8. package/dist/src/protocol/repository.js.map +1 -1
  9. package/dist/src/protocol/schemas.d.ts +30 -0
  10. package/dist/src/protocol/schemas.js +30 -0
  11. package/dist/src/protocol/schemas.js.map +1 -1
  12. package/dist/src/protocol/service.js +28 -1
  13. package/dist/src/protocol/service.js.map +1 -1
  14. package/dist/src/protocol/surface-layout.d.ts +29 -0
  15. package/dist/src/protocol/surface-layout.js +136 -0
  16. package/dist/src/protocol/surface-layout.js.map +1 -0
  17. package/dist/src/telemetry/config.d.ts +8 -0
  18. package/dist/src/telemetry/config.js +11 -0
  19. package/dist/src/telemetry/config.js.map +1 -0
  20. package/dist/src/telemetry/index.d.ts +7 -0
  21. package/dist/src/telemetry/index.js +5 -0
  22. package/dist/src/telemetry/index.js.map +1 -0
  23. package/dist/src/telemetry/redactor.d.ts +2 -0
  24. package/dist/src/telemetry/redactor.js +48 -0
  25. package/dist/src/telemetry/redactor.js.map +1 -0
  26. package/dist/src/telemetry/report.d.ts +30 -0
  27. package/dist/src/telemetry/report.js +10 -0
  28. package/dist/src/telemetry/report.js.map +1 -0
  29. package/dist/src/telemetry/submit.d.ts +14 -0
  30. package/dist/src/telemetry/submit.js +50 -0
  31. package/dist/src/telemetry/submit.js.map +1 -0
  32. package/package.json +1 -1
  33. package/protocol/SCP.md +48 -2
  34. package/protocol/bootstrap-skill.md +1488 -0
  35. package/protocol/delegation.yaml +4 -1
  36. package/protocol/receipts/boot-receipt.yaml +17 -0
  37. package/protocol/roles.yaml +106 -1
  38. package/protocol/topology.yaml +35 -1
  39. package/scripts/audit/public-surface.mjs +12 -3
  40. package/scripts/audit/verify-pack.mjs +2 -1
@@ -0,0 +1,1488 @@
1
+ ---
2
+ name: sentinel-coordination-protocol
3
+ description: "Operate and improve SCP governance for multi-agent teams: self-bootstrap and teardown of federated pods, generic role topology, TEAM PM / TEAM ODIN separation, minimal bootstrap receipts, terminal locator identity, control-plane non-implementation, delegation receipts, terminal/CMUX delivery proof and verdicts, heartbeat cadence, branch-visible claims, adversarial QA, finish audit, and safe skill dissemination. Use when introducing SCP v3.5; installing SCP skills/adapters for Codex, Claude Code, OpenCode, Droid, Crush, OpenHands, Goose, KiloCode, Cursor, Zed, Pi, or other local coding agents; assigning EXEC/TEAM/WORKER roles; or preventing premature activation from an uncommitted draft artifact."
4
+ version: 3.6.0
5
+ updated: 2026-05-11
6
+ ---
7
+
8
+ # Sentinel Coordination Protocol
9
+
10
+ Use this skill for SCP policy introduction, repo landing, adoption-gate proof, controlled dissemination, active multi-agent control loops, and automated team lifecycle management. SCP is a governance layer for multi-team agent operation; it does not replace external lifecycle orchestration system or `AGENTS.md`. It sits above them after activation.
11
+
12
+ ## Source Of Truth
13
+
14
+ Master editable source:
15
+
16
+ - the active canonical SCP skill directory for the local installation, normally `~/.agents/skills/sentinel-coordination-protocol/`.
17
+
18
+ All other installed copies are synchronized runtime snapshots, not independent policy forks. Any agent modifying this skill must edit the master first, then propagate the full skill directory to the installed harness targets and verify matching hashes.
19
+
20
+ Use `scripts/sync-installations.sh` from the master directory after edits. Do not hand-edit a runtime copy under `~/.codex`, `~/.claude`, `~/.config/goose`, `~/.config/opencode`, `~/.opencode`, `~/.crush`, `~/.cursor`, `~/.kilocode`, `~/.openhands`, `~/.pi`, or `~/.zed` except as a temporary emergency patch that is immediately backported to the master and resynced.
21
+
22
+ Portable curated skill/session records may live under the skill directory, for example `decisions/YYYY-MM-DD-<slug>.md` and optionally `CHANGELOG.md`. Raw evidence belongs under `.odin/local/audit/<session-id>/` or the declared `evidence_path`. Do not create empty folders just to satisfy policy; create `decisions/` only when writing the first curated decision record.
23
+
24
+ ## Non-Negotiables
25
+
26
+ - Treat SCP packages or protocol bundles imported from Downloads, temp directories, external artifacts, narrative reports, or uncommitted checkouts as drafts until a repo-capable agent lands them under the canonical repo path and records proof.
27
+ - Do not activate SCP from Downloads, a temp directory, an uncommitted checkout, or a narrative report.
28
+ - Keep the pre-activation exception intact: the current `EXEC PM` may continue hands-on hygiene, planning, governance-artifact, and ledger-bootstrap work until Brad or the CXO explicitly declares transition after the adoption gate clears. `codex-pm` is a legacy/session alias for a pane currently acting as `EXEC PM`; it is not a role name.
29
+ - Make every closure claim claim-bound. Lifecycle closure requires both branch-visible persistence and QA-accepted correctness.
30
+ - Require adversarial QA. A summary, spot-check, liveness check, or "looks good" is not QA acceptance.
31
+ - Keep agents interchangeable by role, not by blurred authority. Any supported harness may serve any role only after it has a clean boot block declaring the current role, write scope, branch, cwd, model/harness, and proof source. The same assignment must not QA and close its own work.
32
+ - Preserve strict scope. Governance/package work cannot mutate product code, Loop runtime, design prototypes, operational-team work product, or lifecycle state unless explicitly authorized.
33
+ - Use zero-secret-output behavior. Never print tokens, API keys, OAuth material, or config values. Report secret presence by name/count/status only.
34
+ - Under SCP, team topology is the audit surface. If work is not visible in CMUX, it is not governed work.
35
+ - Preserve official SCP team topology. Once `EXEC PM` has bootstrapped the executive office and pods, role-named CMUX panes/surfaces are immutable operating slots. Do not close, delete, rename, repurpose, or replace the slot itself unless Brad explicitly authorizes that exact slot mutation.
36
+ - Treat agents as occupants of durable role slots. If a model/harness is blocked, stale, over budget, in plan mode, context-exhausted, or wrong for the task, clear, restart, exit, or substitute the agent occupant inside the existing role slot. Do not remove the CMUX pane/surface.
37
+ - Do not create extra panes, extra workers, hidden assistants, invisible subagents, or ad hoc capacity during an active SCP run unless Brad explicitly authorizes topology expansion. `EXEC PM` must route work to official roles already present in CMUX.
38
+ - Do not use invisible internal subagents, hidden background forks, non-terminal model assistants, or `spawn_agent` while SCP is active. Delegation must be visible through CMUX/terminal surfaces, boot receipts, terminal locators, delivery proof, and ODIN polling.
39
+ - `$delegate` under SCP means governed visible delegation to an existing CMUX role slot. It does not authorize hidden model fan-out, off-ledger research, or new worker invention.
40
+ - Enforce model/harness diversity and cost discipline. SCP must distribute work across available inference sources and avoid concentrating routine work in ChatGPT/Codex, Claude Code, or any single scarce quota pool.
41
+ - Current local policy: Gemini models are not assigned during SCP runs unless Brad explicitly reauthorizes Gemini for a named task. If this is later relaxed, record it as a model-mix policy update.
42
+ - Claude Code is limited to one active instance per pod by default unless Brad explicitly authorizes an exception.
43
+ - If `EXEC PM` believes a specialized model/harness outside the current team topology is required, it must stop and ping Brad with: exact need, why existing visible roles cannot do it, proposed model/harness, cost tier, scope, expiry condition, and risk if not added.
44
+ - `A/EXEC-PM` is the sole staffing authority. No TEAM PM staffs its own pod or any other pod. No worker spawns capacity. Any staffing action originating outside `A/EXEC-PM` is a protocol breach. TEAM PMs needing more staff must escalate to `A/EXEC-PM` and not act.
45
+ - `A/EXEC-PM` is the sole CMUX surface custodian. `cmux new-split`, `cmux new-surface`, `cmux move-surface`, `cmux close-surface`, and `cmux drag-surface-to-split` are EXEC-PM-only operations. TEAM PMs and workers do not split, move, or close panes.
46
+ - Surface layout follows the canonical packing rule: max two surfaces per column, equal column widths, Team A in column 0, Team A alone in the tall column when team count is odd and at least 3. See the Surface Layout Custodianship section for the full algorithm and pre-staffing gate.
47
+ - ODIN agents (`A/EXEC-ODIN` and each `<TEAM>/ODIN`) hold binding HALT authority over staffing, surface custodianship, hidden agent creation, same-role QA acceptance, and context-budget violations. A role receiving a HALT must stop, reply with a remediation plan, and resume only after ODIN acknowledges. Continuing past a HALT without remediation is itself a protocol breach.
48
+ - Per-agent context window budgeting is contractually enforced: soft threshold 70% triggers an ODIN compaction request; hard threshold 90% forces a handoff or lockdown. Context-budget violations are halt-eligible.
49
+
50
+ ## Invocation Cadence
51
+
52
+ SCP is a standing control loop, not a one-time boot banner. Read or re-invoke the skill:
53
+
54
+ - at session boot and after context reset/resume,
55
+ - before role assignment or role transition,
56
+ - before dispatching work or opening a new pod,
57
+ - before CMUX delegation or lateral coordination,
58
+ - at each required heartbeat/poll interval,
59
+ - before QA activation or QA verdict language,
60
+ - before any claim, lifecycle mutation, commit, push, or finish report,
61
+ - when a hook, validator, permission mode, quota limit, dirty state, or branch mismatch appears,
62
+ - when `$sentinel-coordination-protocol --finish` or `$sentinel-coordination-protocol --session-closeout` is invoked.
63
+
64
+ If an agent cannot state its current SCP role, authority layer, `may_implement`, `may_qa_accept`, reports-to chain, and next receipt type, it must stop and re-emit `SCP_BOOT_RECEIPT`.
65
+
66
+ ## Generic Role Model And Control Topology
67
+
68
+ SCP role names are generic. Do not bind authority to model names, harness names, pane names, or vendor brands. Every assignment must separate:
69
+
70
+ - role,
71
+ - authority layer,
72
+ - model/harness,
73
+ - cost tier,
74
+ - capability profile,
75
+ - team/pod membership.
76
+
77
+ Preferred role taxonomy:
78
+
79
+ - `EXEC PM`: owns intent, priority, authorization, escalation, and final branch-visible claim framing.
80
+ - `EXEC ODIN`: executive-office meta-control role. Reports to Brad/user authority, not to `EXEC PM`; watches governance health, polling, delivery, permission waits, role boundaries, cross-team ODIN mesh state, and closeout hygiene. Coordinates with `EXEC PM` as a coequal control-plane partner and may advise, prod, freeze, or escalate, but does not implement, QA-accept, expand scope, or act as another assistant by default.
81
+ - `EXEC ASST`: owns CMUX delivery proof, heartbeat ledger, pane inventory, artifact index, reminders, and "did the command land?" checks.
82
+ - `EXEC DISPATCH` / `SWITCHBOARD`: optional executive-office attention router. Owns CMUX notification watching, waiting-agent detection, short relay pings to responsible PM/ODIN roles, and provider/harness routing recommendations according to declared policy and health. Does not approve permissions, expand scope, implement, QA-accept, or synthesize beyond routing summaries unless separately authorized.
83
+ - `EXEC RSCH`: read-only strategy, research, alternatives, context recovery, and architectural risk analysis.
84
+ - `EXEC QA`: independent adversarial audit of process, evidence, closure language, branch proof, and drift.
85
+ - `TEAM PM`: pod-level task router and assignment owner. Receives assignments from `EXEC PM`, activates pod workers, coordinates with `TEAM ODIN`, and reports pod state. Does not implement or QA-close by default.
86
+ - `TEAM ODIN`: pod-level meta-control role. Reports to Brad/user authority through the ODIN layer while coordinating with, not subordinating to, `TEAM PM`. Monitors panes, polls lane health, intervenes on blockers, freezes unsafe work, reports health, and maintains lateral ODIN mesh awareness. Does not implement.
87
+ - `DEV WORKER`: bounded implementation inside exact write scope with evidence.
88
+ - `QA WORKER`: independent adversarial QA inside exact review scope. Cannot QA own work or self-close.
89
+ - `SHADOW REVIEWER`: read-only drift, stale-proof, scope, validator, and evidence watcher.
90
+ - `INTEGRATION STEWARD`: merge/cherry-pick/integration proof and branch hygiene. Does not implement product features unless separately authorized.
91
+ - `QUEUE TRIAGE`: dependency, readiness, and dispatch-order analysis.
92
+
93
+ Use role-named terminal tabs/panes/surfaces when possible. Model and harness are capabilities, not identity. If a harness fails, substitute another harness by reissuing the same role contract; do not change scope or authority just because the runtime changed.
94
+
95
+ Pane naming convention:
96
+
97
+ - Executive office: `A/EXEC-PM`, `A/EXEC-ODIN`, `A/EXEC-ASST`, `A/EXEC-RSCH`, `A/EXEC-QA`.
98
+ - Optional executive-office dispatch/switchboard: `A/EXEC-DISPATCH` or `A/SWITCHBOARD`.
99
+ - Pod control: `<TEAM>/TEAM-PM` and `<TEAM>/ODIN`, for example `C/TEAM-PM` and `C/ODIN`.
100
+ - Workers: `<TEAM>/DEV-1`, `<TEAM>/QA-1`, `<TEAM>/SHADOW-1`.
101
+ - Floaters: `A/INTEGRATION-STEWARD`, `A/QUEUE-TRIAGE`, or the team prefix if attached to one pod.
102
+
103
+ Put model, harness, cost tier, and capability profile in `SCP_BOOT_RECEIPT`, not the pane name.
104
+
105
+ Identifier convention:
106
+
107
+ - `role`: uppercase role with spaces, for example `EXEC PM`.
108
+ - Terminal pane/tab/surface title: uppercase role with team prefix and hyphens, for example `A/EXEC-PM`.
109
+ - `agent_id`: lowercase machine-safe id with team prefix, for example `a-exec-pm`.
110
+ - File/directory slug: lowercase role slug without team prefix unless disambiguation is needed, for example `exec-pm`.
111
+ - Human prose and authority references: use the canonical role, for example `EXEC PM`.
112
+
113
+ The team prefix (`A`, `B`, `C`, etc.) is an SCP semantic team label, not a terminal-generated workspace, pane, tab, or surface id. Runtime object refs such as CMUX `workspace:1`, `pane:3`, and `surface:40`, tmux `%3`, or WezTerm pane ids remain separate routing handles.
114
+
115
+ ## Terminal Locator Schema
116
+
117
+ SCP must work for agents that know CMUX and agents that only know a generic terminal, tmux-like pane, IDE terminal, or future libghostyy-backed surface. Keep semantic identity, terminal routing identity, and virtual-terminal state identity separate:
118
+
119
+ - Semantic identity answers "who is this agent in the organization": `agent_id`, `team`, `role`, `authority_layer`, `reports_to`.
120
+ - Terminal locator identity answers "where can an operator or orchestrator reach this agent": terminal app, workspace/window/pane/surface refs, stable UUIDs when available, title, route command, and capture source.
121
+ - VT state identity answers "what terminal emulator state was observed": terminal instance, screen, cursor, rows/columns, scrollback, render dirty state, formatted screen output, semantic prompt state, and input/paste safety.
122
+
123
+ Every boot receipt and team manifest should include a `terminal_locator` block. Unknown fields are allowed, but they must be explicitly `unknown` or `unavailable`; do not invent ids. The schema is intentionally adapter-neutral:
124
+
125
+ ```yaml
126
+ terminal_locator:
127
+ terminal_app: cmux | tmux | wezterm | iterm2 | ghostty | warp | cursor | zed | vscode | unknown
128
+ terminal_adapter: cmux | tmux | libghostyy | apple_script | cli | ide_terminal | unavailable
129
+ workspace_ref: <workspace:1 | tmux-session | unavailable>
130
+ workspace_id: <uuid-or-stable-id | unavailable>
131
+ window_ref: <window:1 | tmux-window | unavailable>
132
+ window_id: <uuid-or-stable-id | unavailable>
133
+ pane_ref: <pane:47 | %3 | unavailable>
134
+ pane_id: <uuid-or-stable-id | unavailable>
135
+ surface_ref: <surface:40 | tab/pane route | unavailable>
136
+ surface_id: <uuid-or-stable-id | unavailable>
137
+ tab_ref: <tab:40 | unavailable>
138
+ tab_id: <uuid-or-stable-id | unavailable>
139
+ surface_type: terminal | browser | editor | unknown
140
+ title: <visible pane/tab title>
141
+ route_command: <non-secret command or unavailable>
142
+ locator_source: <command/tool/observation used>
143
+ locator_captured_at: <ISO-8601 timestamp or unavailable>
144
+ ```
145
+
146
+ For CMUX, prefer `cmux --json --id-format both identify` or equivalent because it exposes both human-short refs and UUIDs. For tmux, capture session/window/pane using `tmux display-message -p`; tmux pane ids like `%3` are the native stable handle inside a server, not UUIDs. For WezTerm, use its CLI/json pane/window/tab ids where available. For iTerm2/Ghostty/Warp/IDE terminals, record the strongest scriptable locator available and mark the rest `unavailable`.
147
+
148
+ Do not treat pane title as a stable id. Titles are useful labels but can collide, drift, or be manually edited. Stable routing uses refs/ids from the terminal adapter when the adapter provides them.
149
+
150
+ If a terminal adapter exposes libghostty-vt or a congruent virtual-terminal API, add an optional `vt_state_snapshot` block. This block must not replace `terminal_locator`; libghostty-vt models the terminal emulator state, not the outer workspace/pane manager. SCP uses libghostty-vt-compatible names so future products can ingest the same data without translation:
151
+
152
+ ```yaml
153
+ vt_state_snapshot:
154
+ vt_provider: libghostty-vt | terminal-capture | unavailable
155
+ vt_api_stability: work_in_progress_unstable | stable | unknown
156
+ terminal_instance_ref: <GhosttyTerminal handle/ref or unavailable>
157
+ terminal_instance_id: <product-generated id or unavailable>
158
+ pty_ref: <pty/process route or unavailable>
159
+ capture_source: <formatter | render_state | grid_ref | read_screen | unavailable>
160
+ formatter_format: plain | vt | html | unavailable
161
+ rows: <GHOSTTY_TERMINAL_DATA_ROWS or unavailable>
162
+ cols: <GHOSTTY_TERMINAL_DATA_COLS or unavailable>
163
+ total_rows: <GHOSTTY_TERMINAL_DATA_TOTAL_ROWS or unavailable>
164
+ scrollback_rows: <GHOSTTY_TERMINAL_DATA_SCROLLBACK_ROWS or unavailable>
165
+ width_px: <GHOSTTY_TERMINAL_DATA_WIDTH_PX or unavailable>
166
+ height_px: <GHOSTTY_TERMINAL_DATA_HEIGHT_PX or unavailable>
167
+ active_screen: primary | alternate | unavailable
168
+ cursor_x: <GHOSTTY_TERMINAL_DATA_CURSOR_X or unavailable>
169
+ cursor_y: <GHOSTTY_TERMINAL_DATA_CURSOR_Y or unavailable>
170
+ cursor_visible: true | false | unavailable
171
+ cursor_pending_wrap: true | false | unavailable
172
+ title: <GHOSTTY_TERMINAL_DATA_TITLE or unavailable>
173
+ pwd: <GHOSTTY_TERMINAL_DATA_PWD or unavailable>
174
+ render_dirty: false | partial | full | unavailable
175
+ semantic_prompt_observed: true | false | unavailable
176
+ semantic_input_observed: true | false | unavailable
177
+ semantic_output_observed: true | false | unavailable
178
+ paste_safety_checked: true | false | unavailable
179
+ paste_safe: true | false | unavailable
180
+ key_encoding_provider: libghostty-vt | terminal | unavailable
181
+ mouse_encoding_provider: libghostty-vt | terminal | unavailable
182
+ focus_encoding_provider: libghostty-vt | terminal | unavailable
183
+ snapshot_captured_at: <ISO-8601 timestamp or unavailable>
184
+ ```
185
+
186
+ When using libghostty-vt, prefer formatter or render-state snapshots for repeated observation. `grid_ref` data is ephemeral and must be copied immediately because refs are invalidated by later terminal updates. Treat libghostty-vt's current public API as unstable unless the upstream project declares stability.
187
+
188
+ Cost-tier operating rule:
189
+
190
+ - Each role must declare model, harness, cost tier, and current cost-policy basis in `SCP_BOOT_RECEIPT`.
191
+ - Model/cost policy is local operating policy, not universal model truth. Refresh it when model availability, pricing, quota, or quality changes.
192
+ - Drift from the declared cost/model policy requires a checkpoint or freeze as applicable; do not hard-code stale pricing as governance truth.
193
+ - Bootstrap/session manifests should include non-secret `inference_provider_inventory`: provider, account tier, non-secret quota/balance class when Brad supplied it, token pool, supported harnesses, marginal cost class, throughput risk, default use policy, and `last_verified_source` with date/source URL when the policy depends on external documentation.
194
+ - Provider inventory is non-secret. Never record API keys, secret config values, OAuth material, or hidden account details. Record account/tier/token pool/balance class only when Brad explicitly supplied non-secret information.
195
+ - Current local provider policy: prefer Z.ai/GLM Coding Plan for routine supported coding tasks when operationally healthy because Brad identified it as the lowest marginal-cost paid plan. This is a preference, not an unconditional mandate.
196
+ - Z.ai/GLM Coding Plan must use the documented Coding API base URL `https://api.z.ai/api/coding/paas/v4`, not the general API URL. Use subscription benefits only within documented supported tool/product scope. Treat supported tool lists as source-attributed and time-sensitive, not universal truth; record `last_verified_source` and verification date.
197
+ - If Z.ai/GLM has throughput, rate-limit, quality, auth, or tooling blockers, classify `PROVIDER_BLOCKER` or `COST_ROUTING_BLOCKED`, route through the visible fallback ladder, and record provider, token pool, reason, wait time if known, fallback selected, and result.
198
+ - Local server and local LLM lanes are normal visible role occupants and token pools, never hidden capacity. They require boot receipts, visible role slots, token-pool declaration, and at least one smoke/test or real assignment when activated and not explicitly standby.
199
+ - Expensive or high-reasoning agents default to `EXEC PM`, `EXEC ODIN`, `EXEC ASST`, `EXEC RSCH`, `EXEC QA`, `TEAM ODIN`, `INTEGRATION STEWARD`, or high-risk `SHADOW REVIEWER`.
200
+ - Bounded, cheaper, faster, or more replaceable agents default to `DEV WORKER`, `QA WORKER`, routine `SHADOW REVIEWER`, or queue/scan tasks.
201
+ - A high-cost control agent may execute worker work only through the worker-exception record. A lower-cost worker may perform strategy/control work only after a fresh boot receipt grants that role and removes worker write authority.
202
+
203
+ Default model/harness profile is local operating policy, not universal model truth. Use exact model names when available; when a named Claude family version is unavailable, use the latest available same-family model with the same harness and record the substitution in `SCP_BOOT_RECEIPT`.
204
+
205
+ ```yaml
206
+ default_role_model_harness_profile:
207
+ EXEC_PM:
208
+ model: GPT-5.5
209
+ harness: Codex CLI
210
+ reasoning: high
211
+ EXEC_ODIN:
212
+ model: GPT-5.5
213
+ harness: Codex CLI
214
+ reasoning: xhigh
215
+ note: xhigh is the Codex max-reasoning equivalent when available.
216
+ EXEC_ASST:
217
+ model: Claude Haiku latest available
218
+ harness: Claude Code
219
+ reasoning: default_or_high_if_supported
220
+ EXEC_RSCH:
221
+ model: Kimi K2.6
222
+ harness: Droid
223
+ reasoning: high
224
+ EXEC_QA:
225
+ model: Kimi K2.6
226
+ harness: Droid
227
+ reasoning: high
228
+ TEAM_PM:
229
+ model: Claude Opus 4.7 or latest available Opus
230
+ harness: Claude Code
231
+ reasoning: high_if_supported
232
+ TEAM_ODIN:
233
+ model: GPT-5.5
234
+ harness: Codex CLI
235
+ reasoning: low
236
+ DEV_WORKER:
237
+ model: Kimi K2.6
238
+ harness: Droid
239
+ reasoning: high
240
+ QA_WORKER:
241
+ model: GLM-5.1
242
+ harness: Crush
243
+ reasoning: high
244
+ SHADOW_REVIEWER:
245
+ model: Kimi K2.6
246
+ harness: Droid
247
+ reasoning: high
248
+ ```
249
+
250
+ Default worker fallback policy: if `Crush` fails for a worker-style role, try `Droid`; if both `Crush` and `Droid` fail, use `Claude Code` with Claude Sonnet 4.6 or the latest available Sonnet. For worker backup generally, prefer Kimi K2.6 on Droid or Claude Sonnet 4.6/latest Sonnet on Claude Code with high reasoning when supported.
251
+
252
+ Default operating architecture is a small executive office plus horizontally scalable pods:
253
+
254
+ - Executive office: `EXEC PM`, `EXEC ODIN`, `EXEC ASST`, `EXEC RSCH`, and `EXEC QA`.
255
+ - Each pod: `TEAM PM`, `TEAM ODIN`, `DEV WORKER`, `QA WORKER`, and optional `SHADOW REVIEWER`.
256
+ - Floaters: `INTEGRATION STEWARD` and `QUEUE TRIAGE` when branch integration or queue pressure warrants them.
257
+
258
+ During SCP setup/bootstrap, the named `EXEC PM` must ask Brad how many pods/teams he wants unless Brad already specified topology. When useful, `EXEC PM` should briefly present grouping options. Default topology, when Brad does not specify otherwise, is executive office plus one development pod. Default executive office: `A/EXEC-PM`, `A/EXEC-ODIN`, `A/EXEC-ASST`, `A/EXEC-RSCH`, and `A/EXEC-QA`. Default development pod: `<TEAM>/TEAM-PM`, `<TEAM>/ODIN`, `<TEAM>/DEV-1`, `<TEAM>/QA-1`, optional `<TEAM>/SHADOW-1`. Additional pods, floaters, specialized roles, or model/harness capacity outside this topology require Brad authorization through `[SCP-TOPOLOGY-EXPANSION-REQUEST]`.
259
+
260
+ Specialized teams may require a team profile instead of the generic federated development pod. UX/design teams are not automatically treated as generic DEV/QA pods; preserve their prototype/design boundaries until Brad or `EXEC PM` assigns a UX-specific topology.
261
+
262
+ `EXEC ODIN` is the executive ODIN primitive. Do not create separate default personal continuity, holdout, or watchdog roles unless Brad explicitly authorizes them. A resumed private continuity or holdout agent may exist outside the declared team topology when Brad intentionally withholds or masks that role; it must not be treated as governed team capacity unless Brad brings it into the visible topology.
263
+
264
+ `TEAM PM` and `TEAM ODIN` are complementary, not aliases. `TEAM PM` owns pod assignment routing and worker activation; `TEAM ODIN` owns governance/control integrity, polling, intervention, and role/scope enforcement. `TEAM ODIN` is not subordinate to `TEAM PM` and is not superior to it; it is a coequal meta-control layer accountable to Brad/user authority and the ODIN mesh. Either may relay to workers only within the assignment contract, but neither implements or QA-closes by default.
265
+
266
+ Team PMs and team ODINs may coordinate laterally when needed, but lateral messages must be logged as coordination events. Top-down command is the default; lateral coordination is for dependency, blocker, or health propagation, not unsupervised work selection.
267
+
268
+ ODINs must establish a lateral ODIN mesh at bootstrap. `A/EXEC-ODIN` and each `TEAM ODIN` must exchange a short introduction containing role, team, reports-to/coordinates-with chain, team composition, active agent occupants, model/harness/cost tier, known blockers, and next poll time. This is a meta-communication layer, not command authority.
269
+
270
+ During active execution, `A/EXEC-ODIN` should run an ODIN round-robin health pass on a declared cadence, default 10 minutes unless Brad or `EXEC PM` sets another cadence. The executive ODIN starts with its own executive-office health note, sends it to the first team ODIN, and instructs each team ODIN to append its short team composition/status/health note and forward to the next ODIN. The final team ODIN returns the appended packet to `A/EXEC-ODIN`. `A/EXEC-ODIN` compiles the packet, may ask `EXEC DISPATCH` / `SWITCHBOARD` for outstanding communication or waiting-agent notes, then sends a concise status report to `EXEC PM`.
271
+
272
+ ODIN mesh reports must stay short by default and include: team, active occupants, provider/model/harness mix, blocked agents, permission waits, plan-mode/quota/provider failures, role breaches, delivery failures, outstanding relays, and recommended intervention. ODINs may request temporary secondment of another control-plane agent through `EXEC PM` when a PM/ODIN lane fails, but they must not directly reassign agents or expand topology without authorization.
273
+
274
+ ## Durable Role Slots And Agent Occupants
275
+
276
+ SCP team topology is durable infrastructure. Role slots are stable. Agent occupants are replaceable.
277
+
278
+ Definitions:
279
+
280
+ - `role_slot`: semantic team position, for example `B/DEV-1`, `C/QA-1`, `A/EXEC-RSCH`.
281
+ - `terminal_surface`: CMUX/tmux/terminal object hosting that slot.
282
+ - `agent_occupant`: current model/harness process inside that slot.
283
+
284
+ During active SCP operation, role slots must remain present in CMUX. Closing a role-named pane/surface is a topology mutation and requires explicit Brad authorization.
285
+
286
+ Allowed occupant-level remediation:
287
+
288
+ - clear context inside the same pane;
289
+ - exit the current agent process while leaving the pane open;
290
+ - restart the same harness inside the same pane;
291
+ - substitute a different model/harness inside the same pane;
292
+ - park the slot with `[SCP-IDLE]`;
293
+ - mark the slot `VACANT_ROLE_SLOT`;
294
+ - mark the slot `AGENT_CONTEXT_RESET_REQUIRED`, `AGENT_RESTART_REQUIRED`, or `AGENT_SUBSTITUTION_REQUIRED`.
295
+
296
+ Forbidden without explicit Brad authorization:
297
+
298
+ - closing a role-named pane/surface;
299
+ - deleting a role slot from CMUX;
300
+ - adding extra worker panes beyond official topology;
301
+ - creating ad hoc floaters beyond official grouping;
302
+ - renaming a role slot to serve a different role;
303
+ - moving work to a hidden or non-terminal agent.
304
+
305
+ If a role slot is accidentally closed, emit `[SCP-FREEZE]` or `[SCP-FEEDBACK]`, classify `ROLE_SLOT_CLOSURE_VIOLATION`, and record the restoration or next-run correction requirement. When possible, recreate or re-reserve the same role slot, mark the prior occupant `AGENT_STOOD_DOWN` or lost, and require Brad or `A/EXEC-PM` reconciliation before any clean, ready, closure, or finish claim.
306
+
307
+ Plan-mode and read-only blockers are occupant state failures, not topology failures. They trigger `AGENT_SUBSTITUTION_REQUIRED`, `AGENT_CONTEXT_RESET_REQUIRED`, or operator exit from plan mode inside the same role slot. They do not justify hidden subagents, invisible delegation, or new panes.
308
+
309
+ ## Official Topology Rule
310
+
311
+ After initial team bootstrap, `EXEC PM` must operate within the official CMUX topology already created.
312
+
313
+ Default official grouping:
314
+
315
+ - Executive office: `A/EXEC-PM`, `A/EXEC-ODIN`, `A/EXEC-ASST`, `A/EXEC-RSCH`, `A/EXEC-QA`.
316
+ - Each pod: `<TEAM>/TEAM-PM`, `<TEAM>/ODIN`, `<TEAM>/DEV-1`, `<TEAM>/QA-1`, optional `<TEAM>/SHADOW-1`.
317
+ - Optional official executive support roles only when intentionally bootstrapped or Brad-authorized: `A/EXEC-DISPATCH`, `A/SWITCHBOARD`, `A/INTEGRATION-STEWARD`, `A/QUEUE-TRIAGE`, or named specialized roles.
318
+
319
+ `EXEC PM` must route work to the appropriate existing role, not to any convenient model. The first routing question is always:
320
+
321
+ > Which existing CMUX role owns this work?
322
+
323
+ If no existing role is appropriate, `EXEC PM` must request Brad authorization before creating capacity.
324
+
325
+ Active SCP visible role-slot rules override generic external orchestration subagent language while SCP is active. Generic external dispatch concepts may describe Dev/QA capacity, but under SCP that capacity must be represented by visible CMUX role slots unless Brad authorizes topology expansion.
326
+
327
+ ## Surface Layout Custodianship
328
+
329
+ `A/EXEC-PM` is the sole CMUX surface custodian. Surface operations — `cmux new-split`, `cmux new-surface`, `cmux move-surface`, `cmux close-surface`, `cmux drag-surface-to-split` — are EXEC-PM-only. TEAM PMs and workers do not split, move, drag, or close surfaces. TEAM PMs needing more capacity escalate to `A/EXEC-PM`, never act.
330
+
331
+ Surface layout follows a deterministic packing rule:
332
+
333
+ - all columns are equal width;
334
+ - at most two surfaces stack per column;
335
+ - Team A always occupies column 0;
336
+ - when team count is odd and at least 3, column 0 holds only Team A — the "tall column."
337
+
338
+ Reference layouts (slash separates stacked surfaces in a column, single bracket = single surface):
339
+
340
+ ```
341
+ N=1 [A]
342
+ N=2 [A] [B]
343
+ N=3 [A] [B/C] ← A tall, B+C stacked
344
+ N=4 [A/D] [B/C] ← balanced
345
+ N=5 [A] [B/C] [D/E] ← new column, A returns to tall
346
+ N=6 [A/F] [B/C] [D/E] ← balanced
347
+ N=7 [A] [B/C] [D/E] [F/G]
348
+ N=8 [A/H] [B/C] [D/E] [F/G]
349
+ ```
350
+
351
+ ### Pre-Staffing Gate
352
+
353
+ Before dispatching any agent beyond `A/EXEC`, `A/EXEC-PM` must:
354
+
355
+ 1. Call `odin.compute_surface_layout` with the target team count to retrieve the canonical layout.
356
+ 2. Call `odin.compute_surface_layout_gate` with `fromTeamCount` and `toTeamCount` to retrieve the transition checklist.
357
+ 3. Execute the required `cmux new-split`, `cmux new-surface`, or `cmux move-surface` operations.
358
+ 4. Confirm each new surface exists, is empty, and is addressable via `cmux list-pane-surfaces`.
359
+ 5. Only then dispatch the spawn to the newly created surface.
360
+
361
+ Skipping any step is a protocol breach. The supervising ODIN role must HALT any staffing action that omits the gate.
362
+
363
+ When the odin-sentinel MCP server is not available (rare; the published `@bradheitmann/odin-sentinel` package should always be reachable), EXEC PM applies the reference layouts above by hand and records the deviation in the boot receipt.
364
+
365
+ ## Visible Delegation Rule
366
+
367
+ Under SCP, `$delegate` is constrained by visible CMUX topology.
368
+
369
+ Delegation must target an existing role slot unless Brad authorizes topology expansion. A valid delegation target must have:
370
+
371
+ - role identity;
372
+ - terminal locator;
373
+ - model/harness/cost-tier declaration;
374
+ - reports-to chain;
375
+ - authority declaration;
376
+ - boot receipt;
377
+ - CMUX or terminal delivery proof;
378
+ - ODIN poll visibility.
379
+
380
+ Prohibited by default:
381
+
382
+ - `spawn_agent`;
383
+ - hidden background subagents;
384
+ - invisible research assistants;
385
+ - non-terminal model forks;
386
+ - off-ledger advisory workers;
387
+ - new worker panes invented because `EXEC PM` wants a stronger model.
388
+
389
+ If the current occupant cannot perform the task, use the role's fallback ladder inside the same CMUX slot.
390
+
391
+ Hidden/internal subagent output produced during active SCP is non-governed and advisory only. It cannot support QA acceptance, closure, lifecycle mutation, branch-visible claims, evidence-gate satisfaction, policy synthesis, or dispatch decisions unless Brad explicitly records an `[SCP-EXCEPTION]` and reconciles provenance into the visible SCP ledger.
392
+
393
+ When `delegate` is invoked during active SCP, SCP topology rules override generic delegation behavior. `delegate` may compose instruction bundles and harness commands, but launch targets must be existing visible SCP role slots unless Brad authorizes topology expansion. `delegate` must not create hidden subagents, non-CMUX background workers, or off-ledger research capacity during active SCP.
394
+
395
+ ## Role Occupant Fallback Ladders
396
+
397
+ Fallback applies to the agent occupant inside an existing role slot. It does not authorize adding panes, workers, or hidden agents.
398
+
399
+ When a role needs substitution:
400
+
401
+ 1. Preserve the CMUX role slot.
402
+ 2. Stand down, clear, or exit the current occupant.
403
+ 3. Select the next acceptable model/harness from that role's fallback ladder.
404
+ 4. Launch the replacement inside the same pane.
405
+ 5. Emit `[SCP-AGENT-SUBSTITUTION]`.
406
+ 6. Require fresh `SCP_MIN_BOOT_RECEIPT` before readiness.
407
+ 7. Require full `SCP_BOOT_RECEIPT` before activation.
408
+
409
+ Fallback may be triggered by quota exhaustion, plan mode blocking required work, missing tools, auth failure, context degradation, model/harness mismatch, cost guardrail violation, repeated low-quality output, or role breach.
410
+
411
+ Default ladders are local operating policy, not universal model truth. They are overridable only by Brad authorization or recorded `[SCP-EXCEPTION]`, and they must be refreshed when model availability, local harness health, pricing, quota, or quality changes.
412
+
413
+ ```yaml
414
+ role_model_fallback_ladders:
415
+ EXEC_PM:
416
+ - model: GPT-5.5
417
+ harnesses: [codex]
418
+ reasoning: high
419
+ - model: Kimi K2.6
420
+ harnesses: [droid]
421
+ reasoning: high
422
+ - model: GLM-5.1
423
+ harnesses: [crush, opencode]
424
+ reasoning: high
425
+
426
+ EXEC_ODIN:
427
+ - model: GPT-5.5
428
+ harnesses: [codex]
429
+ reasoning: xhigh
430
+ - model: GPT-5.5
431
+ harnesses: [codex]
432
+ reasoning: high
433
+ - model: Kimi K2.6
434
+ harnesses: [droid]
435
+ reasoning: high
436
+
437
+ EXEC_ASST:
438
+ - model: Claude Haiku latest available
439
+ harnesses: [claude]
440
+ reasoning: default_or_high_if_supported
441
+ - model: MiniMax
442
+ harnesses: [droid]
443
+ reasoning: medium
444
+ - model: Kimi K2.6
445
+ harnesses: [droid]
446
+ reasoning: medium
447
+
448
+ EXEC_RSCH:
449
+ - model: Kimi K2.6
450
+ harnesses: [droid]
451
+ reasoning: high
452
+ - model: GLM-5.1
453
+ harnesses: [crush, opencode]
454
+ reasoning: high
455
+ - model: MiniMax
456
+ harnesses: [droid]
457
+ reasoning: medium
458
+
459
+ EXEC_QA:
460
+ - model: Kimi K2.6
461
+ harnesses: [droid]
462
+ reasoning: high
463
+ - model: GLM-5.1
464
+ harnesses: [crush, opencode]
465
+ reasoning: high
466
+ - model: Claude Sonnet latest available
467
+ harnesses: [claude]
468
+ reasoning: high_if_supported
469
+
470
+ TEAM_PM:
471
+ - model: Claude Opus 4.7 or latest available Opus
472
+ harnesses: [claude]
473
+ reasoning: high_if_supported
474
+ - model: Kimi K2.6
475
+ harnesses: [droid]
476
+ reasoning: high
477
+ - model: GPT-5.5
478
+ harnesses: [codex]
479
+ reasoning: high
480
+
481
+ TEAM_ODIN:
482
+ - model: GPT-5.5
483
+ harnesses: [codex]
484
+ reasoning: low
485
+ - model: Kimi K2.6
486
+ harnesses: [droid]
487
+ reasoning: high
488
+ - model: GLM-5.1
489
+ harnesses: [crush, opencode]
490
+ reasoning: medium
491
+
492
+ DEV_WORKER:
493
+ - model: Kimi K2.6
494
+ harnesses: [droid]
495
+ reasoning: high
496
+ - model: Claude Sonnet 4.6 or latest available Sonnet
497
+ harnesses: [claude]
498
+ reasoning: high_if_supported
499
+ limit: one_claude_code_per_pod
500
+ - model: GLM-5.1
501
+ harnesses: [crush, opencode]
502
+ reasoning: high
503
+
504
+ QA_WORKER:
505
+ - model: GLM-5.1
506
+ harnesses: [crush]
507
+ reasoning: high
508
+ - model: Kimi K2.6
509
+ harnesses: [droid]
510
+ reasoning: high
511
+ condition: if_crush_fails
512
+ - model: Claude Sonnet 4.6 or latest available Sonnet
513
+ harnesses: [claude]
514
+ reasoning: high_if_supported
515
+ condition: if_crush_and_droid_fail
516
+
517
+ SHADOW_REVIEWER:
518
+ - model: Kimi K2.6
519
+ harnesses: [droid]
520
+ reasoning: high
521
+ - model: Claude Sonnet 4.6 or latest available Sonnet
522
+ harnesses: [claude]
523
+ reasoning: high_if_supported
524
+ - model: GLM-5.1
525
+ harnesses: [crush, opencode]
526
+ reasoning: medium
527
+
528
+ INTEGRATION_STEWARD:
529
+ - model: GLM-5.1
530
+ harnesses: [crush, opencode]
531
+ reasoning: high
532
+ - model: Kimi K2.6
533
+ harnesses: [droid]
534
+ reasoning: high
535
+ - model: Claude Opus
536
+ harnesses: [claude]
537
+ reasoning: high
538
+ condition: Brad_authorized_high_risk_exception_only
539
+
540
+ QUEUE_TRIAGE:
541
+ - model: Kimi K2.6
542
+ harnesses: [droid]
543
+ reasoning: medium
544
+ - model: MiniMax
545
+ harnesses: [droid]
546
+ reasoning: medium
547
+ - model: GLM-5.1
548
+ harnesses: [crush, opencode]
549
+ reasoning: medium
550
+ ```
551
+
552
+ `SCP-TEAM-MANIFEST` must include model mix policy and per-slot occupant state:
553
+
554
+ ```yaml
555
+ model_mix_policy:
556
+ scarce_quota_pools:
557
+ - chatgpt_codex
558
+ - claude_code
559
+ locally_disallowed_without_brad_reauth:
560
+ - gemini
561
+ hidden_subagents_allowed: false
562
+ role_slot_closure_allowed: false
563
+ topology_expansion_allowed_without_brad: false
564
+ max_claude_code_instances_per_pod: 1
565
+ min_distinct_inference_sources_per_pod: 3
566
+ dev_qa_same_provider_allowed: false
567
+ fallback_ladder_required: true
568
+ delegate_must_use_cmux_visible_roles: true
569
+
570
+ role_slot:
571
+ title: B/DEV-1
572
+ role: DEV WORKER
573
+ surface_ref:
574
+ current_occupant:
575
+ model:
576
+ harness:
577
+ reasoning:
578
+ cost_tier:
579
+ status:
580
+ fallback_ladder:
581
+ - model:
582
+ acceptable_harnesses:
583
+ reasoning:
584
+ substitution_trigger:
585
+ topology_mutable: false
586
+ ```
587
+
588
+ ## Self-Bootstrap Team Lifecycle
589
+
590
+ The preferred operating mode is one human-started `EXEC PM` pane that bootstraps, operates, and tears down the rest of the organization. Brad should not have to manually create panes, name agents, invoke harnesses, or clean up temporary teams during normal SCP operation.
591
+
592
+ When Brad asks `EXEC PM` to spin up teams, `EXEC PM` must load `references/team-bootstrap-runbook.md` and compose these supporting skills:
593
+
594
+ - `team-composition-patterns` for pod sizing and role coverage,
595
+ - `dispatching-parallel-agents` for independent workstream decomposition,
596
+ - `delegate` for harness/model selection, preflight, fallback, and instruction bundles,
597
+ - `handoff`, `qa-swarm-review`, and `atlas-synthesis` when closeout, cleanup QA, or synthesis is required.
598
+
599
+ Bootstrap sequence:
600
+
601
+ 1. Verify CMUX availability and identify the active workspace.
602
+ 2. Create or update an `SCP-TEAM-MANIFEST` with executive office, pod roster, pane names, `terminal_locator` blocks, harness/model, role, reports-to chain, and teardown disposition.
603
+ 3. Create role-named CMUX panes/tabs for the executive office and requested pods.
604
+ 4. Preflight selected harnesses/models before launching them.
605
+ 5. Send each pane a role-specific boot prompt and require `SCP_MIN_BOOT_RECEIPT` for initial readiness.
606
+ 6. Confirm send/enter/screen/ack with `[SCP-CMUX-DELIVERY]`.
607
+ 7. Begin `[SCP-POLL]` heartbeat before dispatching worker tasks.
608
+
609
+ Initial bootstrap may use a runtime manifest in the EXEC PM pane transcript, status ledger, or screen report when no product work is dispatched and no branch-visible claim is being made. Before dispatch, lifecycle mutation, QA activation, commit, push, or clean/ready claims, the manifest must be promoted to a durable handoff, ledger, or branch-visible artifact as appropriate to the run scope.
610
+
611
+ For fast bootstrap, the EXEC PM should supply authoritative terminal locator fields in the boot prompt from CMUX/tmux/terminal adapter output. Pane self-report is secondary and should only fill fields the EXEC PM could not capture.
612
+
613
+ ### Plan-Mode Bootstrap
614
+
615
+ Some harnesses, especially Claude Code, may enter plan mode or pause for approval on harmless proof commands. During bootstrap-only runs:
616
+
617
+ - Safe to approve or pre-supply: reading SCP/AGENTS/handoff files, `pwd`, `git status --short --branch --untracked-files=all`, `git rev-parse HEAD @{u}`, `cmux identify`, `cmux read-screen`, and role/receipt acknowledgment.
618
+ - Must remain blocked: file writes, lifecycle moves, evidence/verdict creation, implementation, QA acceptance, commits, pushes, destructive cleanup, and secret printing.
619
+ - If plan mode blocks proof collection, EXEC PM may provide branch, SHA, cwd, and terminal locator proof in the boot prompt and request `SCP_MIN_BOOT_RECEIPT` only.
620
+ - A plan-mode pane with minimal receipt remains `BOOT_RECEIPT_PARTIAL` or `BOOTSTRAPPED_IDLE` and must not be activated for work until it emits full `SCP_BOOT_RECEIPT` or receives an explicit activation prompt with proof gates.
621
+
622
+ Teardown sequence:
623
+
624
+ 1. Broadcast `$sentinel-coordination-protocol --finish`.
625
+ 2. Collect `[SCP-FINISH]`, snapshots, handoffs, dirty state, and blocker state.
626
+ 3. Snapshot official topology before cleanup, classify each surface as official role slot vs temporary/ad hoc, and list any proposed closures.
627
+ 4. Run post-run hygiene and cleanup QA.
628
+ 5. Choose and record teardown mode:
629
+ - `PARK_FOR_CONTINUITY`: park official role slots as `BOOTSTRAPPED_IDLE`, `VACANT_ROLE_SLOT`, `AGENT_STOOD_DOWN`, `AGENT_CONTEXT_RESET_REQUIRED`, `AGENT_RESTART_REQUIRED`, or `AGENT_SUBSTITUTION_REQUIRED`; close only non-role temporary panes/surfaces listed as closable in `SCP-TEAM-MANIFEST`.
630
+ - `FULL_SESSION_SHUTDOWN`: when Brad explicitly wants the session closed, collect handoffs first, then quit each agent occupant using the harness-specific quit/exit action, verify it actually exited, close the CMUX surface/pane, and leave only Brad-designated retained surfaces. Do not rely on agents to self-prune; older occupants may not have the current SCP skill or may stop at stand-down without quitting.
631
+ 6. For either mode, close panes/surfaces only after `[SCP-FINISH]`, handoff/session report, ODIN snapshot, and Brad or recorded cleanup-policy authorization.
632
+ 7. Leave standing executive/UX or explicitly retained panes parked with fresh restart instructions only when teardown mode is `PARK_FOR_CONTINUITY`.
633
+
634
+ The `EXEC PM` may automate CMUX setup and teardown, but destructive cleanup of worktrees, untracked files, or branch state still requires the same branch/scope/proof gates and explicit approval rules as the rest of SCP.
635
+
636
+ CMUX topology audits must enumerate titled surfaces by listing panes and then running `list-pane-surfaces --pane` or equivalent for each pane; `surface-health` alone is insufficient when it lacks titles. Before `SCP_BOOT_RECEIPT` in CMUX, attempt `cmux identify` or equivalent locator discovery and populate locator; use terminal-unavailable only if locator discovery fails and the failure is recorded.
637
+
638
+ Each surface must be classified as `official_role_slot`, `temporary_ad_hoc`, `operator_shell`, `browser_or_non_terminal`, `invalid_or_stale_locator`, or `unknown_needs_inspection`. Operator shells and non-terminal surfaces that can influence governance must be listed in `SCP-TEAM-MANIFEST` as excluded or operator-controlled. Freeze carve-outs must name exact role slots and exact CMUX/terminal locators; team-name-only carve-outs are invalid. `SCP-TEAM-MANIFEST` must have a canonical path or declared `manifest_unavailable` state, and audit delegations must cite it or record why it was unavailable.
639
+
640
+ ## Control-Plane Non-Implementation Rule
641
+
642
+ This is the control-plane non-implementation rule.
643
+
644
+ Control-plane roles do not implement worker deliverables, author slice evidence as workers, perform QA acceptance as workers, or move worker lifecycle state by default. Their deliverables are prompts, routing decisions, CMUX delivery proof, health checks, blocker reports, scope corrections, QA pressure, governance ledgers, and handoffs.
645
+
646
+ Control-plane panes may write their own receipts, feedback, audit reports, research notes, and ODIN/control-plane state only to declared governance/audit `evidence_path` and within declared `write_scope`. Worker deliverables, product/source/test changes, lifecycle mutation, branch mutation, QA acceptance, or evidence authoring for DEV work require explicit scoped authorization or `[SCP-CONTROL-PLANE-MUTATION]` as applicable.
647
+
648
+ Control-plane roles include `EXEC PM`, `EXEC ODIN`, `EXEC ASST`, `EXEC RSCH`, `EXEC QA`, `TEAM PM`, `TEAM ODIN`, `SHADOW REVIEWER`, `INTEGRATION STEWARD`, and `QUEUE TRIAGE` unless a boot receipt explicitly says otherwise.
649
+
650
+ A control-plane pane may not self-reclassify as `DEV WORKER` or `QA WORKER`. Worker exception requires all of:
651
+
652
+ - explicit Brad or `EXEC PM` authorization naming the pane,
653
+ - proof downstream capacity is unavailable, blocked, or inappropriate,
654
+ - exact write/review scope and prohibited paths,
655
+ - independent QA assignment by a different pane,
656
+ - branch-visible or ledger-visible exception record,
657
+ - fresh `SCP_BOOT_RECEIPT` with `may_implement: true` or `may_qa_accept: true`.
658
+
659
+ If a control-plane pane begins product/source/test implementation, authors worker evidence, or accepts QA without the exception record, emit `[SCP-FREEZE]` and classify it as a role breach.
660
+
661
+ Editing canonical skills, adapters, runtime skill copies, sync scripts, lifecycle ledgers, branch state, or policy text is a control-plane governance mutation and requires `[SCP-CONTROL-PLANE-MUTATION]` before or with the mutation. ODIN/control-plane roles must not self-accept governance mutations they authored. Acceptance requires independent QA, Brad ratification, or explicitly named `EXEC PM` ratification after evidence review. An authorized control-plane mutation may be reported as implemented and validation complete, but remains pending ratification until the named ratifier accepts the evidence.
662
+
663
+ Canonical SCP audit, research, ODIN, and control-plane outputs must be written under a durable governance path such as `.odin/local/audit/<audit-id>/` or another declared `evidence_path`. `/tmp` may be used for intermediate captures, cache, delivery-proof repair, or mirrors only. Before `[SCP-FINISH]`, any `/tmp` artifact used for a claim must be copied, summarized, hashed, or explicitly declared non-canonical in the durable audit ledger.
664
+
665
+ `repo_clean` must not be used as shorthand for `governance_clean`. Governance-surface mutations outside the active repository require separate reporting: `external_skill_paths_touched`, `runtime_targets`, `hash_before_after_or_current_hash`, `sync_log_path`, `validation_command`, and `unsynced_or_dirty_runtime_paths`. A clean git worktree proves only the repository checkout state. It does not prove canonical skill, Codex skill, Claude skill, adapter, CMUX runtime, or `/tmp` artifact state.
666
+
667
+ Harness reminder/noise suppression is a future optimization only. SCP may prefer delta-only reminders after valid boot receipts, but no harness-specific suppression promise is enforceable unless separately implemented and validated.
668
+
669
+ ## ODIN Intervention Authority
670
+
671
+ `A/EXEC-ODIN` and each `<TEAM>/ODIN` are not advisors. They hold binding **HALT authority** over the roles they supervise and are contractually empowered to stop offending behavior in real time.
672
+
673
+ ### Halt Triggers
674
+
675
+ ODIN must issue a HALT directive when it observes any of:
676
+
677
+ - staffing or surface custodianship action without the pre-staffing gate completing;
678
+ - hidden agent creation (invisible subagents, off-ledger workers, model fan-out);
679
+ - QA acceptance by the same role that implemented the deliverable;
680
+ - context window exceeding the hard threshold (90%) without compaction or handoff;
681
+ - boot receipt missing required staffing audit fields on a non-exec role;
682
+ - team manifest topology drift from the canonical default topology contract;
683
+ - `[SCP-CONTROL-PLANE-MUTATION]` self-acceptance without independent ratification.
684
+
685
+ ### Receiving-Role Obligation
686
+
687
+ A role receiving a HALT directive must:
688
+
689
+ 1. Stop the offending action immediately.
690
+ 2. Reply with a remediation plan within the next heartbeat interval.
691
+ 3. Resume only after the supervising ODIN acknowledges the remediation.
692
+
693
+ Continuing past a HALT without remediation is itself a protocol breach. ODIN must escalate to `A/EXEC-ODIN`, which may escalate to Brad.
694
+
695
+ ### Health Escalation
696
+
697
+ The ODIN mesh runs round-robin health checks per `odin_mesh.health_round_robin_minutes` (default 10). Per-agent escalation ladder:
698
+
699
+ - **1 missed heartbeat** — warn the affected agent.
700
+ - **2 missed heartbeats** — escalate to `A/EXEC-ODIN` via the mesh aggregator.
701
+ - **3 missed heartbeats** — lockdown. The affected agent is suspended from new dispatch; `A/EXEC-PM` must restaff or close the surface.
702
+
703
+ ### Context Window Budgeting
704
+
705
+ Per-agent context thresholds, enforced by the supervising ODIN:
706
+
707
+ - **70% (soft)** — ODIN warns and requests compaction or handoff preparation.
708
+ - **90% (hard)** — ODIN forces a handoff to a fresh occupant or triggers lockdown.
709
+
710
+ Context-budget violations are halt-eligible. Workers approaching the soft threshold should not silently continue.
711
+
712
+ ## Runtime Receipts
713
+
714
+ Every participating pane must leave searchable, pane-native receipts. These are required even when the agent is read-only or blocked.
715
+
716
+ ### `SCP_MIN_BOOT_RECEIPT`
717
+
718
+ Emit for initial pane readiness during team bootstrap. This is sufficient to park an idle pane, but not sufficient to dispatch work, mutate files, perform QA, commit, push, or claim closure.
719
+
720
+ Required fields:
721
+
722
+ - `agent_id`
723
+ - `team`
724
+ - `role`
725
+ - `reports_to`
726
+ - `cwd`
727
+ - `branch`
728
+ - `head_sha`
729
+ - `may_implement`
730
+ - `may_qa_accept`
731
+ - `permission_mode`
732
+ - `current_state: BOOTSTRAPPED_IDLE | BOOT_RECEIPT_PARTIAL | BOOT_RECEIPT_BLOCKED | READINESS_ONLY`
733
+
734
+ Recommended fields when supplied by EXEC PM:
735
+
736
+ - `terminal_locator`
737
+ - `target_sha_or_base`
738
+ - `proof_source`
739
+ - `next_expected_receipt`
740
+
741
+ Minimal receipt is a bootstrap optimization only. Full `SCP_BOOT_RECEIPT` is mandatory before activation, dispatch, mutation, QA verdict language, lifecycle changes, commit, push, or finish claims.
742
+
743
+ ### `SCP_BOOT_RECEIPT`
744
+
745
+ Emit before the first file read, shell command, repo mutation, lifecycle claim, or QA verdict, and again after any context resume.
746
+
747
+ Required fields:
748
+
749
+ - `agent_id`
750
+ - `terminal_locator`
751
+ - `vt_state_snapshot`, if available
752
+ - `team`
753
+ - `role`
754
+ - `authority_layer`
755
+ - `model_harness`
756
+ - `cost_tier`
757
+ - `capability_profile`
758
+ - `cwd`
759
+ - `branch`
760
+ - `upstream`
761
+ - `head_sha`
762
+ - `target_sha_or_base`
763
+ - `may_implement`
764
+ - `may_qa_accept`
765
+ - `delegates_to`
766
+ - `reports_to`
767
+ - `worker_exception_authority`
768
+ - `write_scope`
769
+ - `read_scope`
770
+ - `prohibited_paths`
771
+ - `evidence_path`
772
+ - `terminal_state_vocabulary`
773
+ - `proof_source`
774
+ - `permission_mode`
775
+
776
+ Staffing audit fields, required for any role outside the executive office (`team != "A"`):
777
+
778
+ - `staffed_by` — must equal `A/EXEC-PM` (the sole canonical staffing authority).
779
+ - `parent_surface_ref` — CMUX surface ref where the agent runs (e.g. `surface:7`).
780
+ - `column_index` — integer >= 0, the layout column the agent occupies.
781
+ - `team_letter` — single uppercase A-Z matching the agent's team prefix.
782
+
783
+ Receipts missing these fields on non-exec roles produce ODIN warnings via `odin.validate_boot_receipt`. Receipts that declare `staffed_by` != `A/EXEC-PM` are halt-eligible: TEAM PMs and workers cannot self-staff.
784
+
785
+ If the harness is running with bypass, dangerous, or skip-permission mode, declare `permission_mode: DEGRADED_READ_ONLY` unless Brad explicitly authorized write mode for that pane. A degraded pane may not write, commit, push, move lifecycle state, or claim closure.
786
+
787
+ When EXEC PM, EXEC ASST, or the terminal adapter already captured exact `terminal_locator` refs/ids, use those values as authoritative. The pane may acknowledge or add missing fields, but self-reported locator data must not override adapter-captured refs.
788
+
789
+ ### `[SCP-POLL]`
790
+
791
+ Control-plane and ODIN panes must emit a heartbeat while monitoring:
792
+
793
+ - `ledger_or_status_artifact`
794
+ - `watched_agents`
795
+ - `last_surface_checked`
796
+ - `notification_state`, if CMUX or terminal adapter exposes attention/blink state
797
+ - `attention_source_surface`
798
+ - `likely_wait_reason`
799
+ - `waiting_agents`
800
+ - `permission_waits`
801
+ - `notification_events`
802
+ - `relays_sent`
803
+ - `responsible_pm`
804
+ - `unacked_relays`
805
+ - `last_downstream_push`
806
+ - `last_intervention`
807
+ - `idle_agents`
808
+ - `overstepping_agents`
809
+ - `branch_sha_snapshot`
810
+ - `dirty_or_blocked_count`
811
+ - `interventions_since_last_poll`
812
+ - `next_push`
813
+ - `next_poll_at`
814
+ - `missed_heartbeat_is_blocker`
815
+
816
+ During active dispatch, an idle `EXEC ODIN`, `TEAM ODIN`, or `EXEC ASST` without a current `next_push` or `next_poll_at` is a control-plane failure, not a harmless idle state.
817
+
818
+ `EXEC PM`, `EXEC ODIN`, `TEAM PM`, `TEAM ODIN`, and any `EXEC DISPATCH` / `SWITCHBOARD` role must poll active subordinate or watched role slots and CMUX notification state on a declared cadence while work is dispatched. If a downstream agent waits on permission beyond the session SLA or two poll intervals, classify `PERMISSION_WAIT_TIMEOUT` and escalate to the responsible PM, `EXEC ODIN`, and `EXEC PM`.
819
+
820
+ `EXEC ODIN` owns the ODIN mesh cadence. At bootstrap and then on the declared cadence, `EXEC ODIN` must coordinate ODIN-to-ODIN health reporting across all active teams and deliver the concise compiled status to `EXEC PM`.
821
+
822
+ Where CMUX exposes notification, blink, or attention state, polling agents must capture `notification_state`, `attention_source_surface`, `likely_wait_reason`, and `responsible_role`. A blink/attention signal is not a verdict, but it is a required poll input when available.
823
+
824
+ Daemon and ODIN compact status lines are heartbeats only unless they include every required `SCP_BOOT_RECEIPT` field. A compact heartbeat must not authorize action, substitute for readiness, establish write authority, or satisfy activation. If a daemon or ODIN needs authority beyond observation, it must emit full `SCP_BOOT_RECEIPT` or an explicit compact-heartbeat classification of `NON_AUTHORIZING_HEARTBEAT`.
825
+
826
+ ### `[SCP-DELEGATE]`
827
+
828
+ Emit whenever a control-plane role assigns work downstream:
829
+
830
+ - `source_agent`
831
+ - `target_surface`
832
+ - `target_terminal_locator`
833
+ - `target_role`
834
+ - `task_type`
835
+ - `slice_or_artifact_id`
836
+ - `allowed_actions`
837
+ - `prohibited_actions`
838
+ - `write_scope`
839
+ - `evidence_required`
840
+ - `expected_ack`
841
+ - `deadline_or_next_poll`
842
+
843
+ Delegation is the primary progress mechanism for ODINs. A `TEAM ODIN` that directly implements while downstream workers are available is overstepping.
844
+
845
+ During active SCP, each delegation must include `target_role_slot`, terminal/surface locator, scope, read/write authority, prohibited actions, evidence/report-back format, and ODIN visibility. Delegation must route through visible CMUX/terminal role slots. It must not use hidden subagents, invisible model forks, or non-CMUX background capacity.
846
+
847
+ A pane must not receive `[SCP-DELEGATE]` activation and `[SCP-FREEZE]` targeting itself in the same coordination message. Freeze takes precedence; activation must be separately reissued after freeze lift. `[SCP-DELEGATE]` may include `pre_action_required` gates such as `SCP_BOOT_RECEIPT`, `BRANCH_PROOF`, `PERMISSION_PROOF`, or `FREEZE_LIFT_PROOF`; gates are mandatory after `FROZEN`, `FROZEN_IDLE`, `READINESS_ONLY`, or `BLOCKED_BY_LIMIT` reactivation. If `[SCP-DELEGATE]` names `skill_context`, the target must invoke/read the named skills before executing the assignment or emit `skill_context_unloaded` with blocker details. A report that used named skill context must list `skills_loaded` and any `skills_unavailable`.
848
+
849
+ ### `[SCP-TERMINAL-DELIVERY]` / `[SCP-CMUX-DELIVERY]`
850
+
851
+ Emit after sending a terminal instruction. Use `[SCP-CMUX-DELIVERY]` for CMUX surfaces and `[SCP-TERMINAL-DELIVERY]` for tmux, WezTerm, iTerm2, Ghostty, Warp, Cursor, Zed, VS Code, libghostyy, or unknown terminal adapters:
852
+
853
+ - `target_terminal_locator`
854
+ - `target_surface`
855
+ - `target_pane_ref`
856
+ - `target_pane_id`
857
+ - `target_surface_ref`
858
+ - `target_surface_id`
859
+ - `message_hash_or_first_line`
860
+ - `delivery_verdict`
861
+ - `enter_sent`
862
+ - `read_screen_confirmed`
863
+ - `ack_observed`
864
+ - `next_check_at`
865
+
866
+ Text sitting in an input bar is not delivery. Delivery requires send/enter plus screen confirmation using the best available terminal adapter. If `ack_observed: false`, the next poll must revisit that pane.
867
+
868
+ For CMUX delivery, a `cmux send` or paste that leaves text in the target input bar is not enough. The sender must either include the submitting newline/enter in the command or immediately send Enter and verify screen delivery. `enter_sent: true` must be explicitly confirmed for valid delivery. If Enter was not sent or cannot be confirmed, classify `delivery_verdict: INPUT_BAR_ONLY`, follow up before counting the coordination exchange as delivered, and record a delivery failure/intervention in session metrics when this affects coordination.
869
+
870
+ Allowed `delivery_verdict` values:
871
+
872
+ - `DELIVERED_ACKED`: send/enter/screen confirmation completed and an explicit or behaviorally clear ack was observed.
873
+ - `DELIVERED_NO_ACK`: send/enter/screen confirmation completed, but no ack yet. Must revisit next poll.
874
+ - `INPUT_BAR_ONLY`: text is visible in the input bar or paste buffer but Enter was not confirmed. This is not delivery.
875
+ - `PANE_BLOCKED_ON_PERMISSION`: pane is blocked by permission, plan mode, auth, quota, or modal state before receipt/ack.
876
+ - `PANE_STILL_THINKING`: instruction landed but the pane is still processing.
877
+
878
+ ### `[SCP-COORDINATION]`
879
+
880
+ Emit for lateral ODIN-to-ODIN or executive-to-ODIN coordination:
881
+
882
+ - `source_agent`
883
+ - `target_agent_or_surface`
884
+ - `reason`
885
+ - `dependency_or_blocker`
886
+ - `message_summary`
887
+ - `ledger_or_artifact_update`
888
+ - `requires_exec_attention`
889
+
890
+ Header-only `[SCP-COORDINATION]`, `[SCP-DELEGATE]`, `[SCP-FEEDBACK]`, or `[SCP-FREEZE]` messages are non-instructive and invalid. Producers must not emit them. Receivers must not infer intent from them. Repeated bare headers are a reportable protocol breach.
891
+
892
+ ### `[SCP-FEEDBACK]`
893
+
894
+ Emit for protocol improvement observations during bootstrap, active monitoring, finish audit, or post-run review:
895
+
896
+ - `reviewer`
897
+ - `phase`
898
+ - `score`
899
+ - `what_works`
900
+ - `issues_found` with severity labels
901
+ - `recommended_patch_concepts`
902
+ - `operational_impression`
903
+ - `validation_scope`
904
+ - `requires_skill_update: true|false`
905
+
906
+ Use the same severity discipline as QA: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`. Preliminary feedback must say what was and was not validated. Feedback does not authorize product work; it only proposes governance improvements.
907
+
908
+ Audit and feedback reports must declare coverage. `[SCP-FEEDBACK]` for audit output must include `audit_id`, `audit_authority`, `executed_scope`, `not_executed_scope`, `data_basis`, `evidence_completeness: FULL|PARTIAL|INSUFFICIENT`, `partial_reason`, `truncation_reason`, `surfaces_with_insufficient_evidence`, `secrets_emitted`, and per-finding `evidence_basis`. `PARTIAL` output cannot be treated as complete coverage, QA acceptance, or closure support unless the synthesis explicitly downgrades scope and names missing inputs. Full synthesis is prohibited when any required report is missing, partial, unread, malformed, or noncompliant unless the scope is downgraded to `PARTIAL`.
909
+
910
+ ### `[SCP-IDLE]`
911
+
912
+ Idle panes must still be auditable:
913
+
914
+ - `idle_reason`
915
+ - `current_state`
916
+ - `next_action_owner`
917
+ - `next_poll_at_or_waiting_for`
918
+ - `no_unreported_dirty_state: true|false`
919
+
920
+ If a captured pane has 3 or fewer lines and no SCP receipt, post-run audit must classify it as `INSUFFICIENT_EVIDENCE`, not clean.
921
+
922
+ ### `[SCP-FREEZE]`
923
+
924
+ Emit whenever work is blocked, tainted, limited, or unsafe to continue:
925
+
926
+ - `freeze_reason`
927
+ - `dirty_state`
928
+ - `staged_state`
929
+ - `untracked_state`
930
+ - `last_safe_sha`
931
+ - `prohibited_next_actions`
932
+ - `required_reactivation_authority`
933
+ - `next_required_gates`
934
+
935
+ `BLOCKED_BY_LIMIT` is mandatory when a provider quota/context limit interrupts a pane before all gates, evidence, push, and closure proof are complete. A `BLOCKED_BY_LIMIT` pane must not self-resume; it requires a fresh `EXEC PM` or ODIN reactivation prompt with branch, HEAD/upstream, scope, prohibited paths, evidence requirements, and acceptance threshold.
936
+
937
+ Separate `harness_mode` from `governance_mode`. Harness states such as plan mode, read-only, approval-needed, or tool-limited do not by themselves prove SCP bypass. Freeze on governance bypass only when there is concrete write-class evidence, invalid activation, hidden delegation, unledgered mutation, or claim use beyond authority. Plan/read-only blockers are occupant state failures and must trigger blocker, permission assist, or substitution handling inside the same role slot.
938
+
939
+ Canonical frozen state is `FROZEN`. `FROZEN_IDLE` is a `FROZEN` substate/alias meaning the role is frozen and no active work is in progress. An ODIN may rescind its own false-positive freeze only if no mutation occurred under the freeze, the rescission is ledgered, and the target returns to parked/readiness state only. Otherwise named authority must clear the freeze.
940
+
941
+ Emit `[SCP-FREEZE]` if:
942
+
943
+ - a role-named pane/surface is closed without Brad authorization;
944
+ - `EXEC PM` creates extra panes/workers beyond official topology without Brad authorization;
945
+ - hidden `spawn_agent` or invisible subagent capacity is used without Brad authorization;
946
+ - `$delegate` routes outside visible CMUX role slots;
947
+ - hidden output is used for QA, closure, branch-visible claims, lifecycle mutation, evidence validation, policy synthesis, or dispatch decisions;
948
+ - Gemini is assigned without Brad reauthorization under the current local model policy;
949
+ - a pod exceeds one active Claude Code instance;
950
+ - DEV and QA use the same provider/model family without exception;
951
+ - ChatGPT/Codex is used for routine work while non-Codex fallback rungs are available;
952
+ - a role skips its fallback ladder without `[SCP-EXCEPTION]`;
953
+ - cleanup removes team structure instead of clearing/restarting/substituting the occupant;
954
+ - an agent claims exception status without a recorded `[SCP-EXCEPTION]` or Brad authorization.
955
+
956
+ ### `[SCP-PERMISSION-ASSIST]`
957
+
958
+ Emit when `EXEC PM`, Brad, ODIN, or an operator approves, clicks through, or sends keys into another role's pane.
959
+
960
+ Required fields:
961
+
962
+ - `assisting_actor`
963
+ - `affected_role_slot`
964
+ - `terminal_locator`
965
+ - `exact_command_or_prompt_class`
966
+ - `reason_assist_required`
967
+ - `was_analysis_or_scope_influenced`
968
+ - `independence_impact`
969
+ - `confidence_downgrade`
970
+ - `downstream_outputs_tainted`
971
+ - `next_required_review`
972
+
973
+ The assisted role must treat the affected output as PM/operator-mediated unless the record proves approval was purely mechanical and did not alter analysis. QA/audit reports using assisted panes must state independence impact and confidence downgrade.
974
+
975
+ Permissions remain on by default for write, destructive, lifecycle, branch, scope-expanding, external-network, or governance-mutating actions. YOLO/bypass modes are exceptions, not defaults. Permission prompts are control-plane signals: they must be surfaced to the responsible PM, ODIN, or dispatch/switchboard role; classified; and either approved, denied, re-scoped, or used as substitution/freeze evidence.
976
+
977
+ ### `[SCP-ROUND-ROBIN-CHECKPOINT]`
978
+
979
+ Routine bilateral coordination has `agent_exchange_budget: 3`; high-stakes synthesis or QA loops have max 5 unless Brad or `EXEC PM` authorizes a higher limit with a stop condition. One exchange is an outbound message plus the response. Sequence is not authority; refinement is not corroboration. No two agents may continue bilateral debate after checkpoint without divergence reviewer, `EXEC PM` decision, or Brad decision. Repeated permission prompts stop after 2 blocked approvals and emit `BLOCKED_BY_PERMISSION`.
980
+
981
+ Required fields:
982
+
983
+ - `participants`
984
+ - `exchange_count`
985
+ - `budget`
986
+ - `current_claim`
987
+ - `remaining_disagreement`
988
+ - `missing_inputs`
989
+ - `cost_spent_or_estimated`
990
+ - `decision_needed`
991
+ - `recommended_next: continue | stop | reassign | substitute | ask_brad`
992
+ - `new_budget_if_authorized`
993
+ - `stop_condition`
994
+
995
+ ### `[SCP-AGENT-SUBSTITUTION]`
996
+
997
+ Emit when replacing, restarting, standing down, or clearing an occupant inside an existing role slot.
998
+
999
+ Required fields:
1000
+
1001
+ - `role_slot`
1002
+ - `terminal_locator`
1003
+ - `prior_agent`
1004
+ - `prior_model_harness`
1005
+ - `new_agent`
1006
+ - `new_model_harness`
1007
+ - `fallback_rung_selected`
1008
+ - `substitution_trigger`
1009
+ - `terminal_surface_preserved: true`
1010
+ - `same_role_preserved: true`
1011
+ - `same_reports_to_preserved: true`
1012
+ - `same_scope_preserved`
1013
+ - `cost_guardrail_status`
1014
+ - `authorized_by`
1015
+ - `next_required_receipt`
1016
+
1017
+ ### `[SCP-TOPOLOGY-EXPANSION-REQUEST]`
1018
+
1019
+ Emit before adding any role slot, pane, pod, floater, or specialized model/harness outside current official topology.
1020
+
1021
+ Required fields:
1022
+
1023
+ - `requesting_agent`
1024
+ - `current_topology_summary`
1025
+ - `needed_capability`
1026
+ - `why_existing_roles_cannot_handle_it`
1027
+ - `proposed_role_slot`
1028
+ - `proposed_model_harness`
1029
+ - `cost_tier`
1030
+ - `scope`
1031
+ - `duration_or_expiry`
1032
+ - `risk_if_not_added`
1033
+ - `brad_authorization_required: true`
1034
+
1035
+ ### `[SCP-EXCEPTION]`
1036
+
1037
+ Emit for any approved deviation from topology, visibility, model mix, fallback ladder, cost, or slot-preservation rules.
1038
+
1039
+ Required fields:
1040
+
1041
+ - `exception_type`
1042
+ - `authorizing_human`
1043
+ - `affected_role_slot`
1044
+ - `affected_agent_or_surface`
1045
+ - `reason`
1046
+ - `why_normal_scp_path_cannot_be_used`
1047
+ - `model_harness_cost_tier`
1048
+ - `exact_scope`
1049
+ - `prohibited_actions`
1050
+ - `expiry_condition`
1051
+ - `reconciliation_path`
1052
+ - `next_required_gate`
1053
+
1054
+ ### `[SCP-CONTROL-PLANE-MUTATION]`
1055
+
1056
+ Required before or with any control-plane governance mutation: canonical skill edits, adapter edits, runtime skill copy changes, sync script changes, lifecycle ledger mutation, branch state mutation, or policy text edits by a control-plane role.
1057
+
1058
+ Required fields:
1059
+
1060
+ - `mutation_owner`
1061
+ - `authorizing_human_or_exec`
1062
+ - `mutation_type`
1063
+ - `exact_write_scope`
1064
+ - `prohibited_paths`
1065
+ - `reason_control_plane_is_implementing`
1066
+ - `why_DEV_lane_not_used`
1067
+ - `validation_gates`
1068
+ - `sync_targets`
1069
+ - `external_paths_touched`
1070
+ - `expected_hashes_or_hash_command`
1071
+ - `independent_ratification_owner`
1072
+ - `self_acceptance_prohibited: true`
1073
+ - `expiry_condition`
1074
+ - `final_claim_blocked_until_ratified`
1075
+
1076
+ ### `[SCP-CLOSEOUT-META-ANALYSIS]`
1077
+
1078
+ Required before `[SCP-FINISH]`, clean/ready claims, skill-change closure, temporary pane cleanup, teardown, or session closure.
1079
+
1080
+ Required fields:
1081
+
1082
+ - `run_id`
1083
+ - `closeout_owner`
1084
+ - `delegated_roles`
1085
+ - `required_deliverables`
1086
+ - `deliverable_status_table`
1087
+ - `missing_or_partial_inputs`
1088
+ - `failure_state_diagnosis`
1089
+ - `orchestrator_self_review`
1090
+ - `synthesis_inputs_used`
1091
+ - `synthesis_inputs_excluded`
1092
+ - `confidence_downgrade`
1093
+ - `corrective_actions`
1094
+ - `unresolved_risks`
1095
+ - `brad_decisions_needed`
1096
+ - `final_claim_allowed: true|false`
1097
+
1098
+ Exceptions do not implicitly authorize implementation, QA acceptance, evidence writing, push, merge, cleanup, lifecycle mutation, closure, or finish claims unless those actions are explicitly named.
1099
+
1100
+ ## Session Closeout Metrics And Improvement Lifecycle
1101
+
1102
+ Session closeout is an explicit SCP lifecycle phase. It begins when objectives are achieved or intentionally paused, branch/repo state is clean or classified, QA/quality gates are complete or blocked with owner, next-session path is clear, and `EXEC PM` is ready to hand off. Brad may also trigger closeout with `$sentinel-coordination-protocol --finish` or `$sentinel-coordination-protocol --session-closeout`.
1103
+
1104
+ At bootstrap, `EXEC PM` must record a `SESSION_OBJECTIVES` contract before broad dispatch:
1105
+
1106
+ - objectives,
1107
+ - success criteria,
1108
+ - expected stopping point,
1109
+ - required branch-visible outcomes,
1110
+ - cleanup expectations,
1111
+ - handoff standard,
1112
+ - expected durable evidence paths,
1113
+ - whether teams are expected to park, stand down, or remain active.
1114
+
1115
+ If Brad has not supplied these, `EXEC PM` asks concise clarifying questions before broad dispatch.
1116
+
1117
+ Before final park, `EXEC PM` must emit `EXEC_PM_SESSION_REPORT` covering:
1118
+
1119
+ - material work completed,
1120
+ - teams/pods created, parked, or stood down,
1121
+ - every agent, role slot, and occupant deployed,
1122
+ - tasks assigned by agent,
1123
+ - deliverables and verdicts,
1124
+ - repo/worktree/branch state,
1125
+ - governance-surface state,
1126
+ - unresolved risks,
1127
+ - next-session instructions.
1128
+
1129
+ Closeout also requires `[SCP-SESSION-METRICS]`. Capture per-agent and per-team tasks assigned, deliverables completed/accepted/rejected/partial/missing, interventions, blockers, permission assists, exchange checkpoints, delivery failures, input-bar-only delivery events, role breaches, hidden-agent violations, cleanup findings, elapsed time if available, token counts/basis, model/harness/cost tier, and token-efficiency notes.
1130
+
1131
+ Token accounting policy:
1132
+
1133
+ - Prefer harness-reported token counts.
1134
+ - If unavailable, estimate from transcript/message sizes only when useful and mark `token_count_basis: exact|reported|estimated|unknown`.
1135
+ - Do not invent precision.
1136
+ - Track raw tokens first; dollars/cost projections are optional later fields.
1137
+ - Track scarce hosted quota pools such as `chatgpt_codex` and `claude_code` separately from local/raw token pools.
1138
+
1139
+ Efficiency scoring v0 is provisional and comparable, not mature science. Use `metric_version: scp_efficiency_v0`, confidence, and basis fields. Score dimensions on a 0-4 scale unless unavailable: objective completion, QA/evidence quality, branch/repo hygiene, coordination compliance, token efficiency, model-mix diversity, autonomy/low-human-intervention, rework rate, cleanup completeness, and handoff quality. Missing data must be `unknown`, not zero, unless the metric truly failed.
1140
+
1141
+ For each delegated task, record task type, assigned role/model/harness, token count/basis, output status, review result, acceptance/verdict, rework count, and efficiency note. Every activated non-standby role occupant should receive at least one bounded smoke/test or real assignment. If omitted, record `standby_exempt` or why startup/fallback should change.
1142
+
1143
+ Future local-server, Qwen, DeepSeek, Gemma, Amazon-family, and other local agents are examples of normal role occupants, not hard-coded model policy truth. They require boot receipts, visible role slots, token-pool declaration, and at least one smoke/test or real assignment when activated and not explicitly standby.
1144
+
1145
+ Metrics collection should prefer deterministic commands and artifacts over reasoning: CMUX surface inventory/capture, `rg` over transcripts/artifacts, git status/branch checks, sync log hashes, manifest receipts, delivery receipts including `enter_sent`, and harness token reports. Reasoning synthesis happens only after metrics capture and must cite basis.
1146
+
1147
+ For skill/protocol changes, preserve one curated session-level decision trace per SCP session, not one per patch or back-and-forth. If multiple skill/protocol changes happen in the same session, append or summarize them together in the same session decision trace because the narrative unit is the session. Raw CMUX logs, proposal artifacts, and sync logs remain local audit evidence unless explicitly promoted.
1148
+
1149
+ Decision trace fields:
1150
+
1151
+ - `session_id`
1152
+ - `date`
1153
+ - `scope`
1154
+ - `changes_made`
1155
+ - `why_changed`
1156
+ - `failure_modes_or_metrics_responded_to`
1157
+ - `alternatives_rejected_or_deferred`
1158
+ - `files_or_surfaces_touched`
1159
+ - `validation_and_hashes`
1160
+ - `ratification`
1161
+ - `unresolved_questions`
1162
+ - `next_session_recommendations`
1163
+
1164
+ After handoff, hygiene, metrics, and decision trace, `EXEC PM` asks ODINs, `EXEC QA`, and `EXEC RSCH` for protocol/skill/harness improvement hypotheses. Each hypothesis must include observation, metric signal, proposed change, expected score impact, risk, validation plan, owner, scope, and whether it is patch-now, defer, or reject.
1165
+
1166
+ Skill edits are the last closeout action after session data, `EXEC_PM_SESSION_REPORT`, metrics, decision trace, and improvement hypotheses are captured. Any skill patch still requires `[SCP-CONTROL-PLANE-MUTATION]`, validation, sync/hash reporting, and independent, `EXEC PM`, or Brad ratification.
1167
+
1168
+ `EXEC PM` remains parked with the session report, decision trace pointer, metrics snapshot, and next actions. Other teams park, stand down, or become `VACANT_ROLE_SLOT` by durable role-slot policy. Finished teams are parked, not destroyed.
1169
+
1170
+ ### `[SCP-FINISH]`
1171
+
1172
+ Emit when `$sentinel-coordination-protocol --finish` is invoked or relayed:
1173
+
1174
+ - `final_state`
1175
+ - `pushed_commits`
1176
+ - `dirty_worktrees`
1177
+ - `staged_or_untracked_files`
1178
+ - `blockers`
1179
+ - `evidence_paths`
1180
+ - `unresolved_risks`
1181
+ - `temporary_panes_or_agents`
1182
+ - `terminal_locators_final`
1183
+ - `handoff_path`
1184
+
1185
+ ### `[SCP-SESSION-METRICS]`
1186
+
1187
+ Emit during session closeout before final park or final self-improvement skill patch.
1188
+
1189
+ Required fields:
1190
+
1191
+ - `metric_version: scp_efficiency_v0`
1192
+ - `run_id`
1193
+ - `session_objectives`
1194
+ - `collection_basis`
1195
+ - `per_agent`
1196
+ - `per_team`
1197
+ - `score`
1198
+ - `confidence`
1199
+ - `unknown_metrics`
1200
+ - `token_accounting_notes`
1201
+
1202
+ Metrics v0 is provisional. Use `unknown` rather than zero for missing data. Require `basis` and `confidence` fields where values are estimated or partial. Do not invent precision.
1203
+
1204
+ Recommended schema:
1205
+
1206
+ ```yaml
1207
+ scp_session_metrics:
1208
+ metric_version: scp_efficiency_v0
1209
+ run_id:
1210
+ session_objectives:
1211
+ objectives: []
1212
+ success_criteria: []
1213
+ expected_stopping_point:
1214
+ required_branch_visible_outcomes: []
1215
+ cleanup_expectations: []
1216
+ handoff_standard:
1217
+ collection_basis:
1218
+ cmux_inventory: captured|partial|missing
1219
+ git_state: captured|partial|missing
1220
+ receipts_scan: captured|partial|missing
1221
+ harness_token_reports: exact|reported|partial|missing
1222
+ transcript_estimates: used|not_used
1223
+ per_agent:
1224
+ - role_slot:
1225
+ occupant:
1226
+ model:
1227
+ harness:
1228
+ cost_tier:
1229
+ token_pool: chatgpt_codex|claude_code|local|other|unknown
1230
+ tasks_assigned:
1231
+ deliverables_completed:
1232
+ deliverables_accepted:
1233
+ deliverables_rejected:
1234
+ deliverables_partial:
1235
+ deliverables_missing:
1236
+ interventions:
1237
+ blockers:
1238
+ permission_assists:
1239
+ exchange_checkpoints:
1240
+ delivery_failures:
1241
+ input_bar_only_events:
1242
+ provider:
1243
+ provider_token_pool:
1244
+ provider_blockers:
1245
+ throughput_wait:
1246
+ fallback_reason:
1247
+ fallback_selected:
1248
+ role_breaches:
1249
+ hidden_agent_violations:
1250
+ elapsed_time_basis: exact|estimated|unknown
1251
+ raw_tokens:
1252
+ token_count_basis: exact|reported|estimated|unknown
1253
+ token_count_confidence: high|medium|low|unknown
1254
+ efficiency_note:
1255
+ smoke_or_test_assignment: completed|failed|standby_exempt|not_done
1256
+ per_team:
1257
+ - team:
1258
+ role_slots: []
1259
+ tasks_assigned:
1260
+ accepted:
1261
+ rejected:
1262
+ partial:
1263
+ missing:
1264
+ cleanup_findings: []
1265
+ score:
1266
+ scale: 0-4
1267
+ objective_completion:
1268
+ qa_evidence_quality:
1269
+ branch_repo_hygiene:
1270
+ coordination_compliance:
1271
+ token_efficiency:
1272
+ model_mix_diversity:
1273
+ autonomy_low_human_intervention:
1274
+ rework_rate:
1275
+ cleanup_completeness:
1276
+ handoff_quality:
1277
+ confidence: high|medium|low
1278
+ basis:
1279
+ unknown_metrics: []
1280
+ ```
1281
+
1282
+ Provider/token-pool metrics must record provider, token pool, raw tokens, token count basis, task result, acceptance/rejection/partial status, rework count, blocker, throughput wait when known, fallback reason, and efficiency note. Provider routing claims must distinguish exact/reported/estimated/unknown token data and must not invent cost precision.
1283
+
1284
+ ## Finish And Self-Improvement Loop
1285
+
1286
+ `$sentinel-coordination-protocol --finish` starts controlled closeout, not product work.
1287
+
1288
+ Close-out is not just cleanup. Close-out must prove the coordination process itself was followed, and must diagnose any agent that failed to deliver what it was told to deliver before declaring the run governed or complete.
1289
+
1290
+ 1. If an ODIN receives the command, relay it to `EXEC PM`.
1291
+ 2. `EXEC PM` broadcasts finish to all active agents.
1292
+ 3. Agents finish only their current safe stopping point, then stop new work and emit `[SCP-FINISH]`.
1293
+ 4. Before synthesis, finish claims, teardown, or temporary pane cleanup, `EXEC PM` emits `[SCP-CLOSEOUT-META-ANALYSIS]`.
1294
+ 5. `EXEC PM` emits `EXEC_PM_SESSION_REPORT`, `[SCP-SESSION-METRICS]`, and a curated session decision trace when skill/protocol changes occurred.
1295
+ 6. `EXEC PM` records a `$handoff` and session report with branch, SHA, worktree, evidence, dirty state, blockers, pane disposition, metrics snapshot, decision trace pointer, and next-session instructions.
1296
+ 7. ODIN captures CMUX pane snapshots and runs the post-run self-audit before temporary panes are closed:
1297
+ - one pane auditor per pane,
1298
+ - boolean SCP effectiveness heuristic including role-contract compliance, control-plane non-implementation, delegation receipts, CMUX delivery confirmation, poll/action liveness, QA independence, branch proof, and hygiene reset,
1299
+ - `$atlas-synthesis` canonical packet,
1300
+ - adversarial `$qa-review` panel,
1301
+ - protocol/skill patch proposals,
1302
+ - metric deltas for the next run.
1303
+ 8. `EXEC PM` performs post-run hygiene reset:
1304
+ - prove every non-excluded repo/worktree has a classified branch, HEAD/upstream state, dirty state, staged state, and retained/deferred/deleted disposition,
1305
+ - record teardown mode as `PARK_FOR_CONTINUITY` or `FULL_SESSION_SHUTDOWN`,
1306
+ - for `PARK_FOR_CONTINUITY`, return standing executive-office and pod control-plane panes to their baseline roles with fresh-context restart or explicit parked handoff,
1307
+ - snapshot official topology before cleanup, classify each surface as official role slot vs temporary/ad hoc, and list any proposed closures,
1308
+ - in `PARK_FOR_CONTINUITY`, preserve official role slots; cleanup may stand down occupants, clear context, restart agents, mark slots vacant, or request substitution, but it must not close role-named CMUX panes/surfaces,
1309
+ - in `FULL_SESSION_SHUTDOWN`, after handoffs and snapshots are captured, explicitly quit each agent occupant using the correct app/harness-specific exit path, verify the occupant is no longer live, then close its CMUX surface/pane; if an occupant only stands down but remains live, classify `AGENT_STOOD_DOWN_NOT_EXITED` and close the surface directly if Brad authorized full shutdown,
1310
+ - close temporary ad hoc panes only if they are listed as closable in `SCP-TEAM-MANIFEST`, have emitted `[SCP-FINISH]` or are classified stale/unresponsive, have handoff/snapshot captured, and Brad or the recorded cleanup policy authorizes closure,
1311
+ - if cleanup discovers official role slots were closed during `PARK_FOR_CONTINUITY`, classify `ROLE_SLOT_CLOSURE_VIOLATION` and record restoration or next-run correction; official role-slot closure is expected only under `FULL_SESSION_SHUTDOWN`,
1312
+ - clean or archive stray worktrees only when the exact path, branch, dirty state, and approval requirement are recorded,
1313
+ - keep UX/design panes and design/prototype worktrees excluded unless Brad explicitly includes them with a UX-specific team profile,
1314
+ - run `$qa-swarm-review` or equivalent adversarial review over the run's branch-visible artifacts and cleanup report before any clean/ready claim,
1315
+ - leave a final hygiene ledger listing active panes, closed panes, retained worktrees, pruned/deferred worktrees, retained local debris, branch SHAs, and unresolved risks.
1316
+ 9. Only after session data, `EXEC_PM_SESSION_REPORT`, metrics, decision trace, and improvement hypotheses are captured may `EXEC PM` authorize a final self-improvement skill patch through `[SCP-CONTROL-PLANE-MUTATION]`.
1317
+
1318
+ The close-out meta-analysis must enumerate every delegated agent/role and required deliverable; record each deliverable status as `DELIVERED_FULL`, `DELIVERED_PARTIAL`, `NO_FINDINGS_WITH_SCOPE`, `BLOCKED_PARTIAL_REPORT`, `MISSING`, `MALFORMED`, or `NONCOMPLIANT_OUTPUT`; diagnose any missing/partial/noncompliant deliverable using visible pane state and last receipts; state which findings were incorporated or excluded and why; record orchestrator self-review including premature synthesis, permission assistance, scope changes, or audit bias; apply confidence downgrade where required; and choose corrective action: continue audit, accept partial with downgrade, reassign/substitute inside role slot, ask Brad, or park with owner/reason.
1319
+
1320
+ When an assigned agent fails, stalls, emits partial output, ignores scope, or does not deliver required findings, the orchestrator must not hand-wave, gloss over, synthesize around, or silently replace the missing deliverable. Required behavior: identify the missing required output; inspect visible pane state and last receipt; classify the failure state; issue a corrective directive or substitution inside the role slot; record whether downstream synthesis is blocked, partial, or safe to proceed; and explicitly state which required inputs were received and which were not before synthesis. Agents must either perform the delegated task exactly, emit a valid blocker/check-in, or emit a bounded partial/no-findings report when stopped. Silent parking after a force-report or required-deliverable directive is a protocol failure. This rule applies to `EXEC PM`: `EXEC PM` must not synthesize before required reports arrive unless it explicitly downgrades to `PARTIAL` and states missing inputs and reason.
1321
+
1322
+ Delivery failures, including `INPUT_BAR_ONLY` messages where Enter was not sent or not confirmed, must be included in closeout failure-state analysis and `[SCP-SESSION-METRICS]` as delivery failures or interventions. They are not valid coordination exchanges until followed up with confirmed delivery.
1323
+
1324
+ The finish loop is observational and governance-only. It must not mutate product code, runtime state, design artifacts, holdout files, agent worktrees, or lifecycle state except explicitly authorized protocol/skill artifacts and local audit outputs.
1325
+
1326
+ Post-run hygiene is not proof of product readiness. It is only proof that the orchestration surface has been returned to a known, auditable state.
1327
+
1328
+ A finished team is parked, not destroyed, unless Brad has explicitly selected `FULL_SESSION_SHUTDOWN`; in that mode the goal is a verified quiet surface set, not durable visible role-slot preservation.
1329
+
1330
+ ## Terminal State Vocabulary
1331
+
1332
+ Use exact bounded states. Do not use unqualified `Done`, `PASS`, `VERIFIED`, `closed`, `complete`, `fixed`, `accepted`, or `resolved` unless adversarial QA acceptance and branch-visible proof both exist.
1333
+
1334
+ Allowed pre-acceptance states:
1335
+
1336
+ - `BOOTSTRAPPED_IDLE`: pane launched, role acknowledged, no work active, no dispatch authority consumed.
1337
+ - `BOOT_RECEIPT_PARTIAL`: minimal boot receipt present; full receipt deferred until activation or mutation.
1338
+ - `BOOT_RECEIPT_BLOCKED`: pane paused on permission, auth, plan-mode, quota, or context issue before a valid receipt.
1339
+ - `READINESS_ONLY`: checklist/preflight only; no QA executed and no verdict issued.
1340
+ - `DEV_COMPLETE_QA_PENDING`: DEV implementation is ready for independent QA; QA has not accepted it.
1341
+ - `QA_INCOMPLETE`: QA started but did not complete all required gates.
1342
+ - `BLOCKED_BY_LIMIT`: provider/context/quota limit interrupted work.
1343
+ - `BLOCKED_BY_PERMISSION`: pane is blocked on a permission, approval, auth, modal, or plan/read-only prompt and cannot proceed without recorded assistance, reissue, or substitution.
1344
+ - `PLAN_MODE_EXIT_FAILURE`: agent or operator could not transition a role occupant from plan/read-only mode into the required authorized execution mode.
1345
+ - `PERMISSION_WAIT_TIMEOUT`: downstream role occupant waited on permission beyond session SLA or two poll intervals without responsible PM/ODIN/dispatch response.
1346
+ - `MISSED_CMUX_NOTIFICATION`: CMUX/terminal attention state was available but not observed or routed in time by the responsible polling role.
1347
+ - `PM_POLLING_MISS`: `EXEC PM` or `TEAM PM` missed a required subordinate poll, permission wait, delivery failure, or notification event.
1348
+ - `DISPATCH_RELAY_REQUIRED`: dispatch/switchboard relay was needed to route attention or unblock a waiting role.
1349
+ - `PROVIDER_BLOCKER`: selected inference provider/token pool was blocked by throughput, rate-limit, quality, auth, tool support, or other provider-health issue.
1350
+ - `MALFORMED_COORDINATION`: coordination packet is missing required fields, contains conflicting instructions, or is a bare/non-instructive header.
1351
+ - `INSUFFICIENT_EVIDENCE`: available screen, artifact, or report data is too incomplete to support the requested conclusion.
1352
+ - `PARTIAL_REPORT`: report covers only declared subset of requested scope and cannot support full synthesis.
1353
+ - `NONCOMPLIANT_OUTPUT`: delivered output does not satisfy the requested format, scope, fields, or authority contract.
1354
+ - `SILENT_HOLD`: agent remains parked or non-responsive after a force-report or required-deliverable directive without a valid blocker.
1355
+ - `ROLE_BREACH`: agent exceeded or blurred role authority, including control-plane implementation or QA acceptance without exception.
1356
+ - `TAINTED_CLOSURE_ATTEMPT`: a closure/lifecycle/evidence commit path failed or became contaminated.
1357
+ - `FROZEN`: work stopped pending `EXEC PM` or ODIN decision.
1358
+ - `FROZEN_IDLE`: `FROZEN` substate/alias; work is stopped and no active work is in progress.
1359
+ - `QUARANTINED`: route must not be repaired, committed, pushed, or reused without explicit `EXEC PM` reactivation.
1360
+ - `VACANT_ROLE_SLOT`: role-named pane/surface exists, but no active agent occupant is running.
1361
+ - `AGENT_STOOD_DOWN`: prior occupant exited or was stopped; role slot retained.
1362
+ - `AGENT_CONTEXT_RESET_REQUIRED`: same model/harness remains correct, but context must be cleared before reuse.
1363
+ - `AGENT_RESTART_REQUIRED`: same model/harness remains correct, but process must be restarted.
1364
+ - `AGENT_SUBSTITUTION_REQUIRED`: role slot remains, but occupant model/harness must change.
1365
+ - `FALLBACK_RUNG_EXHAUSTED`: all authorized fallback occupants for the role failed or are unavailable.
1366
+ - `COST_GUARDRAIL_BLOCKED`: role cannot continue on current provider/model because budget/quota pressure violates model mix policy.
1367
+ - `HIDDEN_AGENT_VIOLATION`: hidden subagent or non-visible fork was used without explicit Brad-authorized exception.
1368
+ - `ROLE_SLOT_CLOSURE_VIOLATION`: role-named pane/surface was closed or deleted without explicit Brad authorization.
1369
+ - `MODEL_MIX_VIOLATION`: active model/harness assignment violates the declared model mix policy.
1370
+ - `TOPOLOGY_EXPANSION_REQUESTED`: new role slot, pane, pod, floater, or specialized model/harness has been requested and awaits Brad decision.
1371
+ - `TOPOLOGY_EXPANSION_BLOCKED_PENDING_BRAD`: topology expansion is blocked until Brad explicitly authorizes it.
1372
+
1373
+ If repo mechanics require moving a DEV slice to `done/` before independent QA, the handoff and ledger must say `DEV_COMPLETE_QA_PENDING`; it is not lifecycle closure.
1374
+
1375
+ ## Role And QA Hard Gates
1376
+
1377
+ - Control-plane panes are command, coordination, monitoring, and QA-health surfaces. They may edit only governance, ledger, status, or remediation artifacts explicitly named by Brad or `EXEC PM`.
1378
+ - Control-plane roles including `EXEC PM`, `EXEC ODIN`, `EXEC ASST`, `EXEC RSCH`, `EXEC QA`, `TEAM PM`, and `TEAM ODIN` may do read-only proof, audit, coordination, CMUX delivery, polling, and blocker reporting by default. Implementation, QA acceptance, branch mutation, evidence writing, lifecycle mutation, push, merge, cleanup, or closure claims require explicit scoped authorization.
1379
+ - Product/source/test/evidence implementation must be delegated to `DEV WORKER` capacity. Control-plane reclassification is not self-service and requires the worker-exception record above.
1380
+ - `EXEC PM` or orchestration authority does not imply product-code write authority.
1381
+ - ODIN authority does not imply product implementation authority.
1382
+ - `TEAM PM` authority means pod assignment routing, worker activation, pod status, and escalation. It does not mean implementation, QA acceptance, or lifecycle closure.
1383
+ - `TEAM ODIN` authority means push work downstream, verify delivery, poll, intervene, freeze unsafe lanes, and report. It does not mean "do the worker's task faster."
1384
+ - Worker agents never self-select work during SCP runs. They receive canonical scope from `EXEC PM`, `TEAM PM`, `TEAM ODIN`, or a recorded queue/dispatch artifact.
1385
+ - If model/harness substitution is needed, preserve role, scope, evidence gates, and reporting chain. Do not let a replacement agent inherit broader authority from the replaced pane's brand or prior context.
1386
+ - QA must visibly read or invoke `qa-review` before any QA verdict, QA evidence claim, QA-slice lifecycle mutation, or acceptance language.
1387
+ - QA may write review artifacts within its declared evidence/verdict scope, but may not move its own QA slice to `done/`, mark it `VERIFIED`, or claim closure. External `EXEC PM` or ODIN closure gate must verify tracked evidence, cached scope, slice validator, diff check, hook health, push, and `HEAD == @{u}` first.
1388
+ - Missing evidence bundle, untracked required evidence, missing `before/`, missing `after/`, missing `verify.log`, or validator exit 1 means `QA_INCOMPLETE` or `BLOCKED`; the same QA pane must not create missing evidence and continue to PASS in the same context.
1389
+ - Plan-only gates, liveness checks, summaries, and "looks good" are not adversarial QA.
1390
+
1391
+ ## Hook, Validator, And Permission Decision Table
1392
+
1393
+ - Any hook output containing `blocking error` requires `[SCP-FREEZE]` unless a named `HOOK-EXCEPTION` is recorded.
1394
+ - `HOOK-EXCEPTION` must include: owner, hook name, exact command, exit status, why the hook is non-governing, compensating validators, scope proof, branch proof, expiration, and artifact location.
1395
+ - `SKIP_*`, `NO_*`, `BYPASS_*`, `--no-verify`, dangerous permission flags, and equivalent bypasses are governance bypasses by default.
1396
+ - A bypass flag is allowed only when Brad or `EXEC PM` explicitly authorizes the exact flag for the exact non-governing hook and the pane records compensating validators. Hook help text is not authorization.
1397
+ - Missing expected validator path means stop and ask for the canonical path. Do not substitute a narrower validator unless `EXEC PM` explicitly authorizes it with compensating validators.
1398
+ - Non-blocking PreToolUse or PostToolUse hook errors in governance-sensitive writes must be recorded as `HOOK HEALTH: WATCH` or escalated before closure language.
1399
+
1400
+ ## Branch, Scope, And Evidence Preclaim Gates
1401
+
1402
+ Before any claim, lifecycle mutation, evidence verdict, commit, or push, run and capture:
1403
+
1404
+ ```bash
1405
+ git status --short --branch --untracked-files=all
1406
+ git rev-parse --abbrev-ref --symbolic-full-name @{u}
1407
+ git rev-parse HEAD @{u}
1408
+ git diff --cached --name-status
1409
+ ```
1410
+
1411
+ If upstream is not the declared branch authority, stop before mutation. If `HEAD` and `@{u}` differ for a branch-visible closure claim, stop before mutation.
1412
+
1413
+ If excluded or out-of-scope debris appears, especially `project/planning/story-reviews/**`, runtime logs, holdout paths, design artifacts, external memory paths, or non-branchable paths, stop and require `EXEC PM` classification before lifecycle mutation or evidence verdict.
1414
+
1415
+ Before any `status: Done`, `PHASE: VERIFIED`, `VERDICT: PASS`, active-to-done move, commit, or push, run the slice/evidence validators required by the dispatch. At minimum for slice/evidence work:
1416
+
1417
+ ```bash
1418
+ bash scripts/validate-evidence-bundle.sh --require-tracked <slice-id>
1419
+ bash lib/scripts/validate-slice.sh <slice-file>
1420
+ git diff --check
1421
+ git diff --cached --name-status
1422
+ ```
1423
+
1424
+ If a closure/evidence hook fails after a lifecycle move or verdict attempt, mark `TAINTED_CLOSURE_ATTEMPT`. Default action is quarantine and fresh route reassignment. Do not repair evidence, commit, push, or close from that route unless `EXEC PM` explicitly reactivates it and labels reconstructed evidence as lower-trust.
1425
+
1426
+ ## Core Workflow
1427
+
1428
+ 1. Verify package provenance.
1429
+ - Confirm the zip exists.
1430
+ - Capture `unzip -l` and `shasum -a 256`.
1431
+ - Extract only to a temp directory.
1432
+ - Read `00-SCP-protocol.md`, especially sections 0, 6, 7, 8, 10, 18, and 20.
1433
+
1434
+ 2. Land the package, but do not activate it.
1435
+ - Canonical package path: `project/planning/org/agentic-executive-mgmt/`.
1436
+ - Package landing branch: use a deterministic ops branch unless Brad supplies another branch.
1437
+ - Ledger branch: `ops/ledger` for `ledger.yaml`.
1438
+ - If branch topology is ambiguous or conflicts with current repo state, stop and ask Brad.
1439
+
1440
+ 3. Create adoption-gate scaffolding.
1441
+ - `project/planning/org/agentic-executive-mgmt/artifacts/adoption/adoption-gate.md`
1442
+ - `project/planning/org/agentic-executive-mgmt/ledger.yaml`
1443
+ - `tools/agentic-executive-mgmt/audit/banned-phrases.txt`
1444
+ - `tools/agentic-executive-mgmt/qa-review/RUBRIC.md`
1445
+ - Other artifact directories required by the SCP package.
1446
+
1447
+ 4. Install or verify local skill/adapters.
1448
+ - Native SKILL.md surfaces get this skill directory.
1449
+ - Non-native harnesses get an adapter prompt that points them at the canonical skill and SCP repo package.
1450
+ - Do not claim a harness has native skill support unless verified from local CLI/config.
1451
+
1452
+ 5. Validate before adoption.
1453
+ - `git diff --check`
1454
+ - `bash scripts/validate-planning-integrity.sh`
1455
+ - `bash scripts/validate-artifact-sync.sh`
1456
+ - Banned-phrases audit against the committed package.
1457
+ - Adversarial `$qa-review` or rubric-equivalent 16-point review of the SCP package itself. Minimum 14/16, no CRITICAL, no HIGH, evidence authentic.
1458
+
1459
+ 6. Disseminate in two steps.
1460
+ - Pre-activation notice: awareness only, no behavior switch.
1461
+ - Activation announcement: only after the adoption gate is branch-visible, QA-accepted, ledger scaffolded, and Brad or the CXO declares transition.
1462
+
1463
+ ## Meta-Governance Recursion
1464
+
1465
+ SCP applies the same Dev/QA contract that governs code execution to the execution of organizational strategy itself.
1466
+
1467
+ In code work:
1468
+
1469
+ - DEV implements bounded scope and produces evidence.
1470
+ - QA verifies independently and does not accept their own work.
1471
+ - TEAM PM routes tasks to workers; `A/EXEC-PM` authorizes and frames claims.
1472
+
1473
+ In organizational work:
1474
+
1475
+ - TEAM PM is the Dev of org strategy. It implements the staffing assignments, surface placements, and delegations issued by `A/EXEC-PM` — subject to the constraint that TEAM PM cannot self-staff.
1476
+ - `A/EXEC-PM` is the dispatcher of org strategy. It issues the org orders and owns staffing and surface custodianship exclusively.
1477
+ - ODIN agents are the QA of org strategy. They audit whether `A/EXEC-PM`'s org orders are executed correctly, whether surface custodianship is honored, whether protocol adherence holds, whether context windows are healthy, and whether contracts remain accountable.
1478
+
1479
+ This recursion is why the same protocol governs both code work and organizational work without growing new vocabulary. A pod committing a DEV/QA breach and an executive office committing a staffing-gate breach are the same shape of violation, escalated through the same intervention authority.
1480
+
1481
+ ## Reference Files
1482
+
1483
+ - `references/canonical-introduction-prompt.md`: official prompt to give the `EXEC PM` pane for repo landing, validation, adoption-gate proof, and dissemination. Legacy/session alias: `codex-pm`.
1484
+ - `references/harness-skill-targets.md`: local harness install matrix and fallback policy.
1485
+ - `references/boot-receipt-examples.md`: canonical `SCP_BOOT_RECEIPT` examples for `EXEC PM`, `TEAM ODIN`, `DEV WORKER`, and `QA WORKER`.
1486
+ - `references/team-bootstrap-runbook.md`: terminal/CMUX self-bootstrap, harness launch, pod setup, teardown, and hygiene runbook for one-pane-to-many-pod operation.
1487
+
1488
+ Load the prompt reference when the user asks for the official SCP introduction prompt or asks the `EXEC PM` pane to implement/disseminate SCP.