@azure-id/orc 0.56.1 → 1.1.0

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 (162) hide show
  1. package/CHANGELOG.md +219 -0
  2. package/README-id.md +49 -107
  3. package/README.md +694 -719
  4. package/bin/build-agents.js +18 -11
  5. package/bin/cli.js +33699 -29855
  6. package/bin/onboarding-content.js +0 -3
  7. package/bin/test-run.js +491 -0
  8. package/bin/verify-contracts.js +4330 -3277
  9. package/bin/verify-package.js +76 -6
  10. package/bin/webui/api.js +1201 -1163
  11. package/bin/webui/app.html +210 -198
  12. package/bin/webui/css/06-responsive.css +120 -108
  13. package/bin/webui/css/panels/extra.css +29 -0
  14. package/bin/webui/css/panels/lanes.css +134 -0
  15. package/bin/webui/css/panels/settings.css +79 -3
  16. package/bin/webui/css/panels/wait.css +123 -0
  17. package/bin/webui/fixtures/extra.js +2036 -1934
  18. package/bin/webui/fixtures/flow.js +2 -2
  19. package/bin/webui/fixtures/index.js +510 -486
  20. package/bin/webui/fixtures/lanes.js +218 -0
  21. package/bin/webui/fixtures/settings.js +261 -34
  22. package/bin/webui/fixtures/stats.js +3 -3
  23. package/bin/webui/fixtures/wait.js +97 -0
  24. package/bin/webui/i18n/TERMS.md +135 -134
  25. package/bin/webui/i18n/en/extra.json +345 -313
  26. package/bin/webui/i18n/en/lanes.json +29 -0
  27. package/bin/webui/i18n/en/nav.json +21 -19
  28. package/bin/webui/i18n/en/overview.json +2 -0
  29. package/bin/webui/i18n/en/settings.json +16 -5
  30. package/bin/webui/i18n/en/wait.json +41 -0
  31. package/bin/webui/i18n/id/extra.json +345 -313
  32. package/bin/webui/i18n/id/lanes.json +29 -0
  33. package/bin/webui/i18n/id/nav.json +21 -19
  34. package/bin/webui/i18n/id/overview.json +2 -0
  35. package/bin/webui/i18n/id/settings.json +15 -4
  36. package/bin/webui/i18n/id/wait.json +41 -0
  37. package/bin/webui/js/01-i18n.js +151 -149
  38. package/bin/webui/js/panels/extra.js +3199 -3011
  39. package/bin/webui/js/panels/lanes.js +259 -0
  40. package/bin/webui/js/panels/overview.js +10 -0
  41. package/bin/webui/js/panels/settings.js +149 -3
  42. package/bin/webui/js/panels/wait.js +253 -0
  43. package/package.json +39 -39
  44. package/templates/agents/MODEL-MAPPING.md +23 -35
  45. package/templates/agents/orc-executor-opus-4-7-high.md +1 -1
  46. package/templates/agents/orc-executor-opus-4-7-med.md +1 -1
  47. package/templates/agents/orc-executor-opus-4-8-high.md +1 -1
  48. package/templates/agents/orc-executor-opus-5-high.md +1 -1
  49. package/templates/agents/orc-executor-opus-5-low.md +1 -1
  50. package/templates/agents/orc-executor-opus-5-med.md +1 -1
  51. package/templates/agents/orc-retro-opus-5-med.md +73 -73
  52. package/templates/agents/orc-retro-sonnet-5-high.md +72 -72
  53. package/templates/agents/orc-trace-writer-haiku-4-5.md +107 -107
  54. package/templates/commands/orc-route.md +1 -1
  55. package/templates/commands/orc-wait.md +19 -0
  56. package/templates/commands/orc.md +1 -1
  57. package/templates/hooks/orc-statusline.js +39 -0
  58. package/templates/skills/_shared/README.md +7 -3
  59. package/templates/skills/_shared/config-precedence.md +198 -0
  60. package/templates/skills/_shared/drift-recovery.md +1 -1
  61. package/templates/skills/_shared/extra-dispatch.md +159 -7
  62. package/templates/skills/_shared/interview.md +1 -1
  63. package/templates/skills/_shared/opus5-only.md +9 -7
  64. package/templates/skills/_shared/phases/README.md +82 -0
  65. package/templates/skills/{orc/references → _shared/phases}/analyst-gates.md +15 -3
  66. package/templates/skills/_shared/phases/execution.md +143 -0
  67. package/templates/skills/{orc/references → _shared/phases}/house-rules.md +13 -1
  68. package/templates/skills/{orc/references → _shared/phases}/intake.md +15 -2
  69. package/templates/skills/_shared/phases/mock-example.md +56 -0
  70. package/templates/skills/{orc/references → _shared/phases}/plan-handoff.md +16 -3
  71. package/templates/skills/_shared/phases/planning.md +135 -0
  72. package/templates/skills/_shared/phases/preflight.md +98 -0
  73. package/templates/skills/_shared/phases/review.md +53 -0
  74. package/templates/skills/_shared/phases/scoring.md +65 -0
  75. package/templates/skills/{orc/references → _shared/phases}/security-checklist.md +12 -1
  76. package/templates/skills/_shared/phases/security.md +55 -0
  77. package/templates/skills/_shared/phases/ship.md +88 -0
  78. package/templates/skills/{orc/references/stop-and-resume.md → _shared/phases/stop-resume.md} +169 -160
  79. package/templates/skills/_shared/phases/summary.md +48 -0
  80. package/templates/skills/_shared/phases/testgen.md +51 -0
  81. package/templates/skills/{orc/references/trace-protocol.md → _shared/phases/trace.md} +49 -6
  82. package/templates/skills/_shared/phases/verify.md +70 -0
  83. package/templates/skills/{orc/references → _shared/phases}/wave-grouping.md +14 -2
  84. package/templates/skills/{orc/references → _shared/phases}/wiki-consult.md +13 -1
  85. package/templates/skills/_shared/read-ladder.md +48 -0
  86. package/templates/skills/_shared/wait.md +240 -0
  87. package/templates/skills/context-combiner/SKILL.md +214 -187
  88. package/templates/skills/orc/README.md +148 -150
  89. package/templates/skills/orc/SKILL.md +75 -358
  90. package/templates/skills/orc/config.md +137 -389
  91. package/templates/skills/orc/examples/full-run-mock.md +1 -1
  92. package/templates/skills/orc/references/effort-and-mode.md +16 -18
  93. package/templates/skills/orc/references/phases/intake.md +47 -0
  94. package/templates/skills/orc/references/phases/integration.md +19 -0
  95. package/templates/skills/orc/references/preflight-report.md +4 -4
  96. package/templates/skills/orc/references/ultra-mode.md +117 -123
  97. package/templates/skills/orc/schemas/planning-output.md +279 -279
  98. package/templates/skills/orc/subskills/orc-planner/SKILL.md +260 -264
  99. package/templates/skills/orc/subskills/orc-pr/stack-gate.md +4 -1
  100. package/templates/skills/orc-aftermath/SKILL.md +158 -136
  101. package/templates/skills/orc-analyze/SKILL.md +252 -220
  102. package/templates/skills/orc-analyze/references/branching.md +51 -51
  103. package/templates/skills/orc-analyze/references/thin-input.md +1 -1
  104. package/templates/skills/orc-analyze-mini/SKILL.md +128 -112
  105. package/templates/skills/orc-boundary/SKILL.md +249 -208
  106. package/templates/skills/orc-brainstorm/SKILL.md +377 -339
  107. package/templates/skills/orc-budget/SKILL.md +248 -225
  108. package/templates/skills/orc-challenge/README.md +1 -1
  109. package/templates/skills/orc-challenge/SKILL.md +298 -255
  110. package/templates/skills/orc-challenge/examples/council-full-roster.md +1 -1
  111. package/templates/skills/orc-claude/SKILL.md +221 -199
  112. package/templates/skills/orc-diy/README.md +2 -1
  113. package/templates/skills/orc-diy/SKILL.md +132 -68
  114. package/templates/skills/orc-diy/references/blocks/analyze.md +1 -1
  115. package/templates/skills/orc-diy/references/compile.md +21 -7
  116. package/templates/skills/orc-diy/references/flow-schema.md +2 -2
  117. package/templates/skills/orc-doc/SKILL.md +49 -7
  118. package/templates/skills/orc-explain/SKILL.md +24 -0
  119. package/templates/skills/orc-export/SKILL.md +31 -5
  120. package/templates/skills/orc-fast/SKILL.md +218 -185
  121. package/templates/skills/orc-grill/SKILL.md +238 -207
  122. package/templates/skills/orc-handoff/SKILL.md +223 -204
  123. package/templates/skills/orc-learn/SKILL.md +181 -156
  124. package/templates/skills/orc-mini/SKILL.md +47 -24
  125. package/templates/skills/orc-pact/SKILL.md +255 -218
  126. package/templates/skills/orc-pattern/SKILL.md +154 -124
  127. package/templates/skills/orc-poly/SKILL.md +242 -216
  128. package/templates/skills/orc-poly/references/gather.md +1 -1
  129. package/templates/skills/orc-pr-driver/SKILL.md +196 -167
  130. package/templates/skills/orc-pr-driver/references/orc-run-split.md +1 -1
  131. package/templates/skills/orc-pr-setup/SKILL.md +212 -184
  132. package/templates/skills/orc-quick/README.md +2 -2
  133. package/templates/skills/orc-quick/SKILL.md +51 -13
  134. package/templates/skills/orc-quick/references/dispatch-gate.md +2 -3
  135. package/templates/skills/orc-retro/SKILL.md +249 -222
  136. package/templates/skills/orc-retro/examples/retro-mock.md +171 -171
  137. package/templates/skills/orc-route/SKILL.md +188 -165
  138. package/templates/skills/orc-verify/SKILL.md +103 -84
  139. package/templates/skills/orc-wait/SKILL.md +163 -0
  140. package/templates/skills/orc-wiki/SKILL.md +60 -206
  141. package/templates/skills/orc-wiki/references/phases/phase-0.md +71 -0
  142. package/templates/skills/orc-wiki/references/phases/phase-1.md +35 -0
  143. package/templates/skills/orc-wiki/references/phases/phase-2.md +52 -0
  144. package/templates/skills/orc-wiki/references/phases/phase-3.md +57 -0
  145. package/templates/skills/orc-wiki/references/phases/phase-3c.md +36 -0
  146. package/templates/agents/orc-advisor-fable-5.md +0 -50
  147. package/templates/agents/orc-analyst-fable-5.md +0 -115
  148. package/templates/agents/orc-judge-fable-5.md +0 -79
  149. package/templates/agents/orc-planner-fable-5.md +0 -152
  150. package/templates/agents/orc-reviewer-fable-5.md +0 -57
  151. package/templates/skills/_shared/fable5-override.md +0 -56
  152. package/templates/skills/orc-diy/references/blocks/execution.md +0 -42
  153. package/templates/skills/orc-diy/references/blocks/mock-example.md +0 -22
  154. package/templates/skills/orc-diy/references/blocks/planning.md +0 -34
  155. package/templates/skills/orc-diy/references/blocks/review.md +0 -18
  156. package/templates/skills/orc-diy/references/blocks/scoring.md +0 -16
  157. package/templates/skills/orc-diy/references/blocks/security.md +0 -25
  158. package/templates/skills/orc-diy/references/blocks/ship.md +0 -25
  159. package/templates/skills/orc-diy/references/blocks/summary.md +0 -18
  160. package/templates/skills/orc-diy/references/blocks/testgen.md +0 -17
  161. package/templates/skills/orc-diy/references/blocks/trace.md +0 -28
  162. package/templates/skills/orc-diy/references/blocks/verify.md +0 -25
@@ -1,4 +1,14 @@
1
- # Reference — Behavior-Trace Protocol
1
+ # Phase — Behavior trace (id: `trace`)
2
+
3
+ > **Library file.** Canonical since v1.0.0 W11; it was
4
+ > the `orc` skill's own `trace-protocol` reference, and 26 lanes reached
5
+ > across into one lane's private folder to read it. Layers declared: `core` only — the protocol
6
+ > is identical in every lane that traces, and this phase's per-lane variation is
7
+ > the TIER TABLE below, which is DATA, not a layer. `orc lane phases <lane>
8
+ > --json` names the file and the layers to read; `README.md` in this folder
9
+ > holds the closed layer set.
10
+
11
+ <!-- orc:layer core -->
2
12
 
3
13
  How ORC records its own behavior for later review. **Behavior-trace logging is
4
14
  PERMANENT (always on) — there is no config toggle.** Every ORC run traces.
@@ -88,7 +98,7 @@ decisions: > # free text — the WHY layer
88
98
  | Multi-dispatch | `orc-wiki`, `orc-pr-driver` (lane `prdriver`) | orc-wiki: one per scan-batch boundary (the points that already run the registration sync / offer the pause) + the end-of-run packet. orc-pr-driver: one per LAYER boundary (each layer's green gate closes) + the end-of-run packet |
89
99
  | Composed | `orc-diy` | one packet per ENABLED phase group, **minimum 2** — the flow shape is user-composed, so the count is too (the compiled flow carries this block automatically) |
90
100
  | Iterative | `orc-quick`, `orc-challenge` (lane `challenge`), `orc-doc` (lane `doc`) | **one packet per completed numbered entry** + the end-of-run `FINISH` packet — the lane loops on user requests, so the count follows entries, not phases. For `orc-challenge` the unit is one completed ITERATION (C2→C8), and the packet goes out at the stop; on a PASS it is the `FINISH` packet. **Several trace files for one cycle is CORRECT** — several sessions ran, and `orc stats` counts several. For `orc-doc` the unit is one completed WAVE, and the packet is the LAST step of the stop sequence |
91
- | Single-dispatch | `orc-claude`, `orc-plan`, `orc-analyze` (+ mini), `orc-pattern`, `orc-verify`, `orc-learn`, `orc-poly`, `orc-pr-setup` (lane `prsetup`), `orc-grill`, `orc-route`, `orc-brainstorm` (lane `brainstorm`), `orc-pact` (lane `pact`), `orc-boundary` (lane `boundary`), `orc-handoff` (lane `handoff`), `orc-budget` (lane `budget`), `orc-aftermath` (lane `aftermath`), `orc-export` (lane `export`) | **exactly ONE mandatory end-of-run packet** |
101
+ | Single-dispatch | `orc-claude`, `orc-plan`, `orc-analyze` + `orc-analyze-mini` (both lane token `analyze`), `orc-pattern`, `orc-verify`, `orc-learn`, `orc-poly`, `orc-pr-setup` (lane `prsetup`), `orc-grill`, `orc-route`, `orc-brainstorm` (lane `brainstorm`), `orc-pact` (lane `pact`), `orc-boundary` (lane `boundary`), `orc-handoff` (lane `handoff`), `orc-budget` (lane `budget`), `orc-aftermath` (lane `aftermath`), `orc-export` (lane `export`) | **exactly ONE mandatory end-of-run packet** |
92
102
 
93
103
  **`context-combiner` is NOT a lane — it is a PHASE inside the analyze run.** It
94
104
  has no slash command and no entry point of its own: `orc-analyze` Phase F
@@ -218,9 +228,9 @@ supplies the fact in a packet, the writer writes the line. `SPAWN`, `RETURN` and
218
228
  |------|-----------|---------|
219
229
  | `PHASE <name> start\|end` | orc → writer | phase transition |
220
230
  | `PHASE-EDGE <role-family> :: first=<agent>` | hook | **deterministic phase inference.** ORC agent names encode their role, so when a SPAWN's role family differs from the previous SPAWN's, the hook segments the run itself — families: `analyst\|scout → analysis`, `planner → planning`, `executor → execution`, `reviewer → review`, `verifier → verify`, `test-author → testgen`, `advisor\|judge → ultra-gate` (the trace writer never opens an edge). Zero model dependence: even a run where every writer dispatch was forgotten still reads planning → execution → review → verify, and `/orc-retro` computes NARRATION COVERAGE from edges with vs without a writer `SPAWN` between them |
221
- | `CONFIG <key=value …>` | orc → writer | Phase 1 — the resolved config values this run will consume (incl. `fable5_*` when enabled, and ALWAYS `opus5_only` — it selects the executor table AND every fixed role, so retro can segment outcomes by dispatch mode). Runtime proof that the run honored the config; `/orc-retro` audits it against behavior |
231
+ | `CONFIG <key=value …>` | orc → writer | Phase 1 — the resolved config values this run will consume (ALWAYS `opus5_only` — it selects the executor table AND every fixed role, so retro can segment outcomes by dispatch mode). Runtime proof that the run honored the config; `/orc-retro` audits it against behavior |
222
232
  | `WIKI-CONSULT <tier> :: docs=<list>` | orc → writer | project wiki consulted for grounding (full/mini at planning; fast at slice-build) — tier ∈ `fresh` \| `aging` \| `stale` \| `absent` \| `empty`; `docs=` the pages pulled/handed to the executor (comma list) or `none`. Records whether the run grounded in the wiki and whether it was stale (surfaces grounding + staleness for later audit) |
223
- | `CROSSLINK <state> :: boundaries=<n> peers=<names>` | orc → writer | cross-repo peer-knowledge state at the consult point — state ∈ `cached` (peer cache present) \| `configured-no-cache` (crosslink configured but the cache is not built) \| `none`. Per-task `CROSSLINK inject task=<id> :: <boundary>` when a slice receives a linked contract. Records whether peer contracts were injected this run (full orc consumes only the pre-built crosslink cache — it never reads peer source live; mechanism in `references/wiki-consult.md`) |
233
+ | `CROSSLINK <state> :: boundaries=<n> peers=<names>` | orc → writer | cross-repo peer-knowledge state at the consult point — state ∈ `cached` (peer cache present) \| `configured-no-cache` (crosslink configured but the cache is not built) \| `none`. Per-task `CROSSLINK inject task=<id> :: <boundary>` when a slice receives a linked contract. Records whether peer contracts were injected this run (full orc consumes only the pre-built crosslink cache — it never reads peer source live; mechanism in `wiki-consult.md`) |
224
234
  | `SPAWN <agent>` | hook | an agent dispatch was observed (skeleton) |
225
235
  | `RETURN <agent> :: <desc> dur=<m>m<s>s [model=<id>]` | hook | a subagent finished (skeleton). The hook attributes the RETURN to the finishing agent from the SubagentStop payload (`~<agent>` = approximate FIFO match on older Claude Code that omits `agent_type`; `~agent :: unattributed` = ≥2 agents in flight, so it deliberately claimed NO pending record rather than starve the right one), echoes the SPAWN's desc + wall-clock duration, and appends `model=<id>` when the return's `actual_model` is visible in the last message. A duplicate stop for an agent whose record was already consumed is DROPPED, never written as a desc-less RETURN. Still hook-written skeleton — NOT an orchestrator obligation; the authoritative model check is the `VERIFY` line |
226
236
  | `DISPATCH <agent> :: <task> expect=<model>/<effort>` | orc → writer | orchestrator dispatched a named agent (the claim). **A FOREIGN dispatch appends `via=extra:<profile>`** and its `expect=` names the profile's model rather than a Claude tier — additive, the way `/orc-doc`'s `sections=` was. A foreign worker is not a Claude subagent, so the hook emits NO `SPAWN` and NO `RETURN` for it (P7, the `/orc-quick` ad-hoc-recon precedent): this line and `EXTRA` are the whole record, which is why neither is optional. **The `/orc-doc` lane's tail NAMES ITS SECTIONS** (v0.49.2) — `doc write sections=03-scope,04-risks part=sections/03-scope.md`, `doc check sections=03-goals`, `doc digest source=<path>` — which is the only thing that makes `orc doc cost`'s per-section attribution honest rather than a guess. It is additive: the tail was already captured whole |
@@ -243,7 +253,7 @@ supplies the fact in a packet, the writer writes the line. `SPAWN`, `RETURN` and
243
253
  | `PACT <state> :: <ids>` | orc → writer | invariant-ledger state at the Phase-1 probe (`pact_gate`), and `PACT inject task=<id> :: <PACT-id>` when a DRIFTED/BROKEN promise is appended to a task's `constraints[]`. `PACT recheck pass\|fail :: <ids>` at Phase 6. Records whether last month's decisions constrained this month's plan |
244
254
  | `BOUNDARY <verdict> task=<id> :: <area>` | orc → writer | per-task boundary verdict (verdict ∈ `EXECUTE` \| `ESCALATE` \| `REFUSE` \| `unknown` — an uncarded area is UNKNOWN, never REFUSE), plus `BOUNDARY lift task=<id> :: <area>` when `boundary_gate: block` removes ONE task from a wave (the wave still runs). `/orc-retro` reads these to answer the question the lane exists for: how much work did we stop attempting, and was that right |
245
255
  | `CHALLENGE iter=<n> findings=P0:<n>/P1:<n>/P2:<n> coverage=<n>% verdict=PASS\|FAIL` | orc → writer | one line per completed `/orc-challenge` iteration boundary. **Copy `orc challenge record`'s `trace_line` verbatim** — the CLI assembles it so the lane never composes a second wording for the same number. Plus `CHALLENGE accept :: <id>` and `CHALLENGE rebut :: <id>` when an escape valve is used, and `CHALLENGE regoal\|retemplate :: v<n>` on a re-freeze. `/orc-retro` reads the sequence to answer whether a cycle converged or stalled |
246
- | `EXTRA <profile>/<model> engine=<api\|claude-shim\|cli> task=<id> band=[lo,hi) tok=in/cw/cr/out outcome=<done\|partial\|failed\|fallback> dur=<m>m<s>s` | orc → writer | one line per FOREIGN dispatch — a slice that executed on a non-Claude worker (`_shared/extra-dispatch.md`). **Copy `orc extra dispatch`'s `trace_line` verbatim** — the CLI assembles it, exactly as `orc challenge record` does, so the lane never composes a second wording for the same numbers. Plus `EXTRA fallback task=<id> :: <reason> → <agent>` when a failed foreign dispatch re-dispatches to Claude (P6), `EXTRA substitution task=<id> :: requested=<m> reported=<m>` / `EXTRA reroute task=<id> :: <providers>` when the endpoint answered with a different model, or the same model served by a different company, and — v0.54.0 — `EXTRA resume task=<id> attempt=<n> :: from=<reason> attribution=<verdict> target=<extra:profile\|agent> files_preexisting=<n>` when a dispatch CONTINUES a position an earlier attempt left on disk, plus `EXTRA orphan task=<id> :: attempt=<n> lease-expired files_changed=<n> state=<state>` when preflight reports a dispatch that never reported back. **A resume that leaves no line cannot be counted** — neither `orc extra stats` nor `/orc-retro` can then learn whether resuming works, or which providers ignore the resume preamble. `EXTRA resume` rides in the resumed dispatch's own `trace_extras[]`; `EXTRA orphan` is the LANE's to emit after it reports, the same ownership rule as `EXTRA fallback`. **`tok=none` is a real value** and the ONLY correct one when the worker reported no counts (engine `cli` often does not): `tok=0/0/0/0` would tell `/orc-budget` the run was free, while a measured zero — engine `api`'s `cw`, always — is a different fact. **On a lane with no score `band=` carries `slot:<slot>`** (v0.55.0 — `slot:doc-writer`, `slot:wiki-scanner-light`): the field NAME is unchanged, so this parser, the eight-field dedupe and the ` :: ` tolerance are untouched, and `orc extra stats` gives each POSITION its own row for free. This is the verb `/orc-retro` reads to answer the only question that matters: is the cheap model actually cheaper once you count the repairs |
256
+ | `EXTRA <profile>/<model> engine=<api\|claude-shim\|cli> task=<id> band=[lo,hi) tok=in/cw/cr/out outcome=<done\|partial\|failed\|fallback> dur=<m>m<s>s` | orc → writer | one line per FOREIGN dispatch — a slice that executed on a non-Claude worker (`_shared/extra-dispatch.md`). **Copy `orc extra dispatch`'s `trace_line` verbatim** — the CLI assembles it, exactly as `orc challenge record` does, so the lane never composes a second wording for the same numbers. Plus `EXTRA fallback task=<id> :: <reason> → <agent>` when a failed foreign dispatch re-dispatches to Claude (P6), `EXTRA substitution task=<id> :: requested=<m> reported=<m>` / `EXTRA reroute task=<id> :: <providers>` when the endpoint answered with a different model, or the same model served by a different company, and — v0.54.0 — `EXTRA resume task=<id> attempt=<n> :: from=<reason> attribution=<verdict> target=<extra:profile\|agent> files_preexisting=<n>` when a dispatch CONTINUES a position an earlier attempt left on disk, plus `EXTRA orphan task=<id> :: attempt=<n> lease-expired files_changed=<n> state=<state>` when preflight reports a dispatch that never reported back, and — v1.0.0 — `EXTRA demote run=<slug> :: profile=<p> reason=<consecutive-stall\|stale-live-attempt\|manual> n=<k> → <ladder>` when this run DROPS a foreign profile to the bottom of the ladder after two consecutive stalls, a stale live attempt, or `orc extra demote`. **A demotion that leaves no line cannot be counted** either — copy `orc extra demotion`’s `trace_line` VERBATIM and emit it before the next dispatch, beside the mandatory announce line. A demotion is RUN state: it never writes the config and it is never promoted back on its own. **A resume that leaves no line cannot be counted** — neither `orc extra stats` nor `/orc-retro` can then learn whether resuming works, or which providers ignore the resume preamble. `EXTRA resume` rides in the resumed dispatch's own `trace_extras[]`; `EXTRA orphan` is the LANE's to emit after it reports, the same ownership rule as `EXTRA fallback`. **`tok=none` is a real value** and the ONLY correct one when the worker reported no counts (engine `cli` often does not): `tok=0/0/0/0` would tell `/orc-budget` the run was free, while a measured zero — engine `api`'s `cw`, always — is a different fact. **On a lane with no score `band=` carries `slot:<slot>`** (v0.55.0 — `slot:doc-writer`, `slot:wiki-scanner-light`): the field NAME is unchanged, so this parser, the eight-field dedupe and the ` :: ` tolerance are untouched, and `orc extra stats` gives each POSITION its own row for free. This is the verb `/orc-retro` reads to answer the only question that matters: is the cheap model actually cheaper once you count the repairs |
247
257
  | `FINISH :: <detail>` | orc → writer | run ended |
248
258
 
249
259
  `SPAWN`/`RETURN`/`PHASE-EDGE` come from the hook automatically. Every other verb
@@ -294,7 +304,7 @@ For each spawn the orchestrator:
294
304
  ## Announce-on-spawn
295
305
 
296
306
  When dispatching, announce the model to the user, derived from the agent NAME
297
- (e.g. "Spawning orc-executor-opus-4-7-high → claude-opus-4-7 / high"). Derive it
307
+ (e.g. "Spawning orc-executor-opus-5-low → claude-opus-5 / low"). Derive it
298
308
  from the name — do NOT pass the coarse `sonnet|opus|haiku` dispatch arg, which
299
309
  cannot express 4-7 vs 4-8 and would override the frontmatter pin.
300
310
 
@@ -312,3 +322,36 @@ orc's plus the U0/judge ones.
312
322
  - Append-only; one whole block per append (never edit prior lines).
313
323
  - The trace records behavior faithfully — including the ugly bits (over-asking,
314
324
  downgrades, failed waves). That honesty is the whole value.
325
+
326
+ <!-- /orc:layer -->
327
+
328
+ <!-- orc:layer composed -->
329
+
330
+ ## Behavior trace (PERMANENT — always on, no flow key)
331
+
332
+ Tracing is NOT composable: every ORC run traces, this one included. Follow
333
+ `.claude/skills/_shared/phases/trace.md` (load it at run start) — this
334
+ block is stitched into every compiled flow so a user-composed pipeline can never
335
+ be the one lane that runs blind.
336
+
337
+ **Run start:** create `log_dir`, write `log_dir/.current` =
338
+ `run-diy-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
339
+ in the SAME step (a pointer naming a file that does not exist reads as dangling —
340
+ the hook rotates away from it and the run splits across two files), then store
341
+ `trace_path` in the checkpoint. The lane token is `diy`, whatever the flow is
342
+ named.
343
+
344
+ **Narration is dispatched, never remembered:** record each event with its REAL
345
+ timestamp into a phase packet (`PHASE`, `DISPATCH`/`VERIFY` per spawn —
346
+ `actual_model`/`actual_effort` vs expected, surface any ⛔ DOWNGRADE to the user
347
+ — `SCORE`, `OUTCOME`, `GATE`, `FINDING`/`VERDICT` for whichever gates this flow
348
+ enabled, `FINISH`, plus `decisions` = the WHY), then dispatch
349
+ `orc-trace-writer-haiku-4-5` with it, PAIRED with the next phase's first
350
+ dispatch. **One packet per ENABLED phase group, minimum 2** — the flow shape is
351
+ composed, so the packet count is too; a phase this flow turned OFF owes nothing.
352
+ A phase ending with `zero new trace lines is a protocol violation`.
353
+
354
+ **Run end:** the `FINISH` packet goes out and RETURNS, then delete
355
+ `log_dir/.current`.
356
+
357
+ <!-- /orc:layer -->
@@ -0,0 +1,70 @@
1
+ # Phase — Verify — TDD gate + adversarial review (id: `verify`)
2
+
3
+ > **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
4
+ > this library at W13 when `orc-diy` became its second reader. A spine is loaded
5
+ > IN FULL when its skill activates; this is loaded when the phase fires, and most
6
+ > runs skip most phases.
7
+ >
8
+ > **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
9
+ > `composed` is what `orc diy compile` stitches — the same phase expressed as
10
+ > `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
11
+ > procedure. Reading the wrong one is the failure `README.md` names: a lane
12
+ > doing a phase its product promise says it does differently.
13
+ > `orc lane phases <lane> --json` names the layer for each lane.
14
+
15
+ <!-- orc:layer full -->
16
+
17
+ ## Verify: TDD gate + adversarial review (same subskill, phase=verify)
18
+
19
+ Emit `PHASE verify start`. TWO halves in the SAME dispatched verifier slot
20
+ (../../orc/subskills/orc-review-verify/ — Phase 5's reviewer stays separate):
21
+ **1) TDD gate (deterministic):** run the plan's TDD suite — green IS the
22
+ definition-of-done for non-exempt requirements; red → repair loop (implement→
23
+ test→repair, cap `tdd_loop_max`; cap hit → STOP SEQUENCE + honest red report).
24
+ **2) Adversarial review:** attack the green implementation — edge cases the
25
+ spec missed, error paths, contract violations, race/ordering, workflow breaks
26
+ (dead wiring, broken commands) — findings on the existing P0–P3 ladder. The
27
+ verifier also checks the intent-spec's
28
+ definition-of-done PLUS the pattern's `validation_gate[]` lines (each a
29
+ criterion; unmet = P0). The return carries `criteria[]` {criterion, pass|fail,
30
+ evidence} — every criterion needs evidence. Quote spot-check P0/P1 first, then:
31
+ P0 → auto-fix once → re-verify once → second failure STOPS; P1 → ask before the
32
+ one fix attempt, then re-verify (same single-retry cap).
33
+ **Pact recheck (`pact_recheck_on_verify`, default true; emit `PACT recheck`):**
34
+ after GREEN, run `orc pact check` scoped to the promises whose anchors intersect
35
+ this run's CHANGED files. A promise that flips to BROKEN is a **P1 finding with its
36
+ check output** — reported, never an automatic abort: the ledger may simply have
37
+ outgrown the code, and that is the user's call. Emit
38
+ `VERDICT pass|fail :: <detail>`, then `PHASE verify end`.
39
+
40
+ <!-- /orc:layer -->
41
+
42
+ <!-- orc:layer composed -->
43
+
44
+ ## Phase: Verify
45
+
46
+ <!-- diy:when verify=off -->
47
+ Verification is DISABLED in this flow. The build+test evidence in each
48
+ executor return is the only green signal; say "verify skipped by flow
49
+ config" in the summary. Never claim criteria were verified.
50
+ <!-- /diy:when -->
51
+ <!-- diy:when verify=smoke -->
52
+ Run a SMOKE verify only: dispatch the verifier
53
+ (`orc-verifier-opus-5-med`) with an explicitly narrowed scope — build +
54
+ full test suite, red/green verdict, NO per-criterion definition-of-done
55
+ sweep. Red blocks ship exactly as a full verify would.
56
+ <!-- /diy:when -->
57
+ <!-- diy:when verify=full -->
58
+ Dispatch verification exactly as the full lane does — follow the verify half
59
+ of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md` (build + tests +
60
+ every acceptance criterion checked against the definition of done).
61
+ <!-- /diy:when -->
62
+ <!-- diy:when tdd=on -->
63
+ TDD gate (rides the verify slot): the verifier slice carries the plan's
64
+ `tdd_suite[]`; green is the definition-of-done for non-exempt requirements,
65
+ red → the repair loop capped at `tdd_loop_max` (cap hit → STOP + honest red
66
+ report). The adversarial half of the verify pass applies as the full lane
67
+ defines it.
68
+ <!-- /diy:when -->
69
+
70
+ <!-- /orc:layer -->
@@ -1,4 +1,14 @@
1
- # Reference — Wave Grouping & Conflict Graph
1
+ # Phase — Wave grouping (id: `wave-grouping`)
2
+
3
+ > **Library file.** Canonical since v1.0.0 W12; it was under the `orc` skill's
4
+ > private `references/`, and another lane already reached across into it. Read
5
+ > by `orc`, `orc-diy`. Layers declared: `core` only — single-layer because the
6
+ > conflict graph is arithmetic, and a lane that groups waves at all groups
7
+ > them this way. `orc lane phases <lane> --json` names the file and the layers
8
+ > to read.
9
+
10
+ <!-- orc:layer core -->
11
+ ## Reference — Wave Grouping & Conflict Graph
2
12
 
3
13
  Turn the tagged task list into conflict-free waves. Load during Phase 3.
4
14
 
@@ -41,7 +51,7 @@ negotiated at runtime.
41
51
  answer — mark `is_batch_pause: true` on wave W when `W % N == 0` AND a later
42
52
  wave exists (`W < total_waves`); the last wave is NEVER a pause (nothing
43
53
  remains to gate). The resulting wave indices are the `pause_schedule` stored
44
- in the checkpoint. A pause so marked is a HARD gate (stop-and-resume.md), not
54
+ in the checkpoint. A pause so marked is a HARD gate (stop-resume.md), not
45
55
  an orchestrator judgment call.
46
56
 
47
57
  ## Same-feature collision
@@ -119,3 +129,5 @@ after every task returns, then diff the two:
119
129
  `git status` is the AUDIT — same instruction → contract → attestation →
120
130
  spot-check pattern the plan applies to `grounding[]`.
121
131
  - Canonical cross-lane wording: `_shared/return-validation.md` §6.
132
+
133
+ <!-- /orc:layer -->
@@ -1,4 +1,14 @@
1
- # Reference — Wiki Consult (shared by orc / orc-mini / orc-fast)
1
+ # Phase — Wiki consult (id: `wiki-consult`)
2
+
3
+ > **Library file.** Canonical since v1.0.0 W12; it was under the `orc` skill's
4
+ > private `references/`, and other lanes already reached across into it. Read
5
+ > by `orc`, `orc-mini`, `orc-fast`, `orc-wiki`. Layers declared: `core` only —
6
+ > single-layer because the precedence ladder (`code > fresh wiki > stale wiki
7
+ > > model priors`) does not bend for a faster lane. `orc lane phases <lane>
8
+ > --json` names the file and the layers to read.
9
+
10
+ <!-- orc:layer core -->
11
+ ## Reference — Wiki Consult (shared by orc / orc-mini / orc-fast)
2
12
 
3
13
  The ONE canonical description of how a lane grounds itself in the project wiki.
4
14
  Load at the consult point (full/mini: Phase 1 planning; fast: F0 gate + F2
@@ -175,3 +185,5 @@ After a run that changed code, flag (do NOT re-scan) any wiki docs whose
175
185
  covered files this run changed and point the user at `/orc-wiki`. Mini/fast
176
186
  keep this passive note only; the full/ultra post-ship refresh ASK is defined in
177
187
  `../../orc-wiki/references/staleness.md`.
188
+
189
+ <!-- /orc:layer -->
@@ -47,8 +47,56 @@ is a `needs_context` return, not permission to keep going.
47
47
  lint results — the smoke gate, the TDD gate, the verifier and orc-quick's
48
48
  build loop decide red vs green from those exact bytes. Read them whole.
49
49
 
50
+ ## Reading ORC's own payload — the partial-read discipline (v1.0.0 W10)
51
+
52
+ Everything above is about reading the PROJECT. It applies unchanged to reading
53
+ ORC's own files, and it has to: a lane manifest of pointers that every lane
54
+ dutifully reads whole is MORE round-trips than the prose it replaced, for the
55
+ same bytes. Centralizing prose and then reading all of it is a slower payload,
56
+ not a smaller one.
57
+
58
+ So every pointer a lane carries declares three things.
59
+
60
+ | Declaration | Values | Means |
61
+ |---|---|---|
62
+ | `when` | `always` · `on-phase` · `on-state` · `on-demand` · `compile-time` | WHETHER to open it at all |
63
+ | `read` | `layer` · `section` · `whole` | HOW MUCH to open |
64
+ | `layers` | `core` · `full` · `trim` · `composed` | WHICH part, when `read: layer` |
65
+
66
+ ### The four rules that make it honest
67
+
68
+ 1. **`on-phase` is the default, and `always` must be justified.** A file every
69
+ lane always loads has saved nothing by moving. Each `always` pointer is
70
+ named in the wave that adds it.
71
+ 2. **`read: section` names a HEADING, never a line number.** A stored line
72
+ number is a wrong line number one edit later; a heading anchor survives an
73
+ edit above it. This is why a shared file's headings are part of its
74
+ contract — renaming one breaks every pointer into it.
75
+ 3. **A trimmed lane reads `core` plus its OWN layer, and never the `full`
76
+ layer.** Reading a neighbouring layer "for context" is the bleed this rule
77
+ exists to stop: the layer boundary is the product promise, not a suggestion.
78
+ 4. **The two exceptions above carry over unchanged.** A file you will EDIT is
79
+ read in full, first, always; and output a gate parses is read whole.
80
+ 5. **`compile-time` is not a run-time read at all.** `orc-diy` is a declared
81
+ reader of ten shared phases and opens none of them during a run: the `orc
82
+ diy compile` CLI reads their `composed` layer once and stitches it into
83
+ `FLOW-COMPILED.md`, which is the only spine that run then follows. Saying
84
+ `on-phase` there would describe a read that never happens, and a manifest
85
+ that describes a run nobody performs is the drift it exists to prevent
86
+ (v1.0.0 W13).
87
+
88
+ ### The honest limit
89
+
90
+ A partial read saves round-trips and bytes for the lanes that SKIP a phase. It
91
+ does **not** make a phase cheaper for the lane that runs it — that lane reads
92
+ its layers whole. Any claim otherwise has to show the measurement.
93
+
50
94
  ## Handoff
51
95
 
52
96
  The ladder governs HOW MUCH to read. It never decides WHETHER knowledge exists —
53
97
  that is `detecting-artifacts.md` — and it never overrides precedence:
54
98
  `code > fresh wiki > stale wiki (hints) > model priors`.
99
+
100
+ What a lane INVOKES, and what each exit code means, is not here either: that is
101
+ `orc lane calls <lane> --json`, whose catalogue is the one copy of every call
102
+ two or more lanes share.
@@ -0,0 +1,240 @@
1
+ # Shared contract — the WAIT (`/orc-wait`, and the computed gate)
2
+
3
+ Canonical file: `_shared/wait.md`. THE canonical mechanic for a lane that must
4
+ **stop where it stands, wait for wall-clock time to pass, and carry on from the
5
+ same place**. Load it wherever a lane can be interrupted by a wait — which,
6
+ since v1.1.0, is every lane in the table below.
7
+
8
+ ## Why a wait is not a suspend and not a fallback
9
+
10
+ ORC already has two shapes for leaving a run. This is a third, and conflating
11
+ them loses work.
12
+
13
+ | | `FALLBACK-FROM` | `RETURN-TO` | **WAIT** |
14
+ |---|---|---|---|
15
+ | Why it leaves | it cannot proceed | another lane must settle something | **wall-clock time must pass** |
16
+ | Who finishes | the receiver | the sender, after coming back | **the same lane, same run** |
17
+ | Another lane runs | yes | yes | **no — nothing runs** |
18
+ | Traces | one | two | **one** |
19
+
20
+ A wait dispatches nothing and decides nothing. It is the only ORC mechanic
21
+ whose entire purpose is that **no model is running**.
22
+
23
+ ## The one rule
24
+
25
+ > **`a lane that waits without a hand-back` has broken this contract.**
26
+
27
+ A wait is a stop. Every stop in ORC writes its hand-back before it ends, because
28
+ the thing that resumes the run may not be this session — the user can close the
29
+ terminal, the machine can sleep, and the wake-up message is a Claude Code
30
+ behaviour ORC cannot promise. `RESUME.md` on disk is what makes a lost wake-up
31
+ cost nothing.
32
+
33
+ This is `_shared/phases/stop-resume.md` applied to a stop nobody asked a
34
+ question about. It does not replace that phase; it scales it.
35
+
36
+ ## The three modes
37
+
38
+ A wait is requested with a mode. The modes differ in ONE thing: how much the
39
+ lane finishes before it stops.
40
+
41
+ | Mode | Stops at | Hand-back | Dispatches | Can lose |
42
+ |---|---|---|---|---|
43
+ | `safe` | the next **safe point** | full stop sequence | yes (checkpoint) | nothing |
44
+ | `soft` | the next **model turn** | full stop sequence, **forced** | yes (checkpoint) | an in-flight return |
45
+ | `hard` | the next **model turn** | `RESUME.md` only, best effort | **no** | an in-flight return, the checkpoint, the phase's trace packet |
46
+
47
+ **`soft` is forced.** On a lane the table below marks as checkpointing, `soft`
48
+ does not merely attempt the hand-back: if the checkpoint write fails, **`soft`
49
+ does not stop**. It reports the failure and stays in the run. That is
50
+ `stop-resume.md` step 2 unchanged — *stopping without a good checkpoint is the
51
+ one thing that loses work* — and it is the whole reason the mode exists.
52
+
53
+ **`hard` is the dispatch-free stop.** It writes only what ORC can write with its
54
+ own hand (`RESUME.md`, per stop-resume step 3b — never a dispatched agent). It
55
+ is fast BECAUSE it dispatches nothing, not in spite of it. It is the one mode
56
+ that can lose work, and it says so every time it runs.
57
+
58
+ ### "the next model turn" is the honest promise
59
+
60
+ A typed message reaches ORC at a turn boundary. `hard` therefore **cannot**
61
+ interrupt a dispatch that is already in flight. What it promises is:
62
+
63
+ > stop at the first moment ORC can act, and do not wait for the current wave,
64
+ > phase or gate to finish.
65
+
66
+ Never write "immediately". A user who reads "immediately" and sees a wave finish
67
+ believes the command failed.
68
+
69
+ ## Safe points
70
+
71
+ A safe point is a place where the run can stop with no loss. `safe` waits for
72
+ one. `soft` and `hard` do not — that is what they are for, and what they risk.
73
+
74
+ **Never begin a wait at any of these, in any mode:**
75
+
76
+ - between a dispatch and its validated return
77
+ - inside the stop sequence itself
78
+ - during a file write, a `splice`, or a wiki registration write
79
+ - before the smoke gate has reported
80
+
81
+ These are not a style preference. Each one leaves an artifact that no resume can
82
+ reconstruct.
83
+
84
+ ## Which lanes support a wait
85
+
86
+ The machine-readable copy of this table is `WAIT_LANE_SHAPES` in `bin/cli.js`,
87
+ rendered by `orc wait lanes`. A golden test compares the two IN BOTH DIRECTIONS
88
+ — the `EXTRA_LANE_SHAPES` / `DIY_STEPS` precedent. A lane added to one and not
89
+ the other fails the suite.
90
+
91
+ | Lane | Checkpoint | Safe point |
92
+ |---|---|---|
93
+ | `/orc` | full | wave or phase edge |
94
+ | `/orc-ultra` | full | wave or judge gate |
95
+ | `/orc-mini` | full | after the executor returns |
96
+ | `/orc-fast` | full | after the executor returns |
97
+ | `/orc-diy` | full | compiled phase edge |
98
+ | `/orc-doc` | full | wave edge |
99
+ | `/orc-wiki` | full | scan-task boundary |
100
+ | `/orc-analyze` | full | after the analyst returns |
101
+ | `/orc-poly` | docset | after a per-repo plan is written |
102
+ | `/orc-quick` | entry | after an entry closes |
103
+ | `/orc-challenge` | cycle | after a cycle records |
104
+ | `/orc-brainstorm` | snapshot | phase edge |
105
+ | `/orc-grill` | snapshot | round edge |
106
+ | `/orc-learn` | none | single dispatch |
107
+ | `/orc-plan` | none | single dispatch |
108
+ | `/orc-verify` | none | single dispatch |
109
+ | `/orc-pattern` | none | single dispatch |
110
+ | `/orc-claude` | none | single dispatch |
111
+ | `/orc-explain` | none | read-only, seconds long |
112
+ | `/orc-route` | none | read-only, seconds long |
113
+ | `/orc-boundary` | none | read-only, seconds long |
114
+ | `/orc-budget` | none | read-only, seconds long |
115
+ | `/orc-aftermath` | none | read-only, seconds long |
116
+ | `/orc-export` | none | read-only, seconds long |
117
+ | `/orc-retro` | none | read-only, seconds long |
118
+ | `/orc-pact` | none | read-only, seconds long |
119
+
120
+ **`checkpoint: none` is an ANSWER, not a gap.** A single-dispatch lane has
121
+ nothing to checkpoint, so a wait there is a plain wait and the message says so.
122
+ On such a lane `safe`, `soft` and `hard` are the SAME thing, and
123
+ `orc wait lanes` states that rather than pretending to a distinction. A row that
124
+ reads `none` must never render like a row that is missing.
125
+
126
+ ## The hop loop
127
+
128
+ The lane does not sleep. A **detached** command sleeps. It costs zero tokens and
129
+ no model runs during it.
130
+
131
+ ```
132
+ 1. Write the hand-back for the mode (above).
133
+ 2. remaining = the requested time, or resets_at - now
134
+ 3. hop = min(wait_hop_minutes, remaining)
135
+ 4. Run a DETACHED command that waits hop seconds.
136
+ 5. On wake: `orc usage check --json`
137
+ 6. Exit 0, or the requested time has elapsed → continue. Else go to 3.
138
+ 7. wait_max_hops reached → stop, keep the hand-back, say why.
139
+ ```
140
+
141
+ **A hop is short on purpose.** Each wake-up is session activity, and session
142
+ activity is the only thing that makes the statusline run again — so each hop
143
+ buys a fresh reading. A single long sleep wakes into a reading as stale as the
144
+ sleep was long.
145
+
146
+ ## After the wait — ORC does not drag a large context forward
147
+
148
+ `stop-resume.md` step 6 already requires offering both continue paths. This
149
+ decides which one ORC takes without asking:
150
+
151
+ - **context small** → continue here, and say so in one line.
152
+ - **context large** → STOP and offer both paths, recommending the fresh session.
153
+
154
+ A wait longer than one hour has already expired the prompt cache, so continuing
155
+ in-session re-reads the whole context at full input price — exactly when quota
156
+ is lowest. Auto-continuing into a bloated context is the cost the wait existed
157
+ to avoid.
158
+
159
+ **ORC cannot clear its own context.** `/clear` is the user's action. The wait
160
+ offers the swap; it never performs it.
161
+
162
+ ## The computed gate (`usage_gate`)
163
+
164
+ The same engine, triggered by the CLI instead of by a typed command. It is
165
+ **`off` by default** — nothing below happens until the user turns it on.
166
+
167
+ Check **before a wave, never during one**: `orc usage check --json`.
168
+
169
+ | exit | state | `warn` | `stop` | `wait` |
170
+ |---|---|---|---|---|
171
+ | 0 | ok | continue | continue | continue |
172
+ | 1 | low | print and continue | hand back and stop | hand back, hop, come back |
173
+ | 2 | unknown | print and continue | print and continue | print and continue |
174
+
175
+ **Exit 2 never stops a run**, in any mode. An absent reading is absent, not low:
176
+ older Claude Code sends no usage headers, and a long dispatch leaves the reading
177
+ stale by exactly its own length. A gate that blocks on a missing number is a
178
+ gate people switch off.
179
+
180
+ **The worst window decides.** `orc usage check` already resolves that; never
181
+ re-derive it from one window.
182
+
183
+ A computed stop offers the cheaper answers before the expensive one — a lower
184
+ band for this wave, or `orc extra` if a profile is ready — because a wait is the
185
+ only one of them that costs wall-clock time.
186
+
187
+ **A typed `/orc-wait` is never suppressed by any of this**, and a computed wait
188
+ is suppressed entirely while a block is active.
189
+
190
+ ## The block — the user's veto
191
+
192
+ `/orc-wait block <reason>` suppresses every COMPUTED wait for the rest of the
193
+ run. It is for the case where stopping costs more than continuing: the window
194
+ resets in five minutes and the task needs ten.
195
+
196
+ 1. **The reason is REQUIRED.** A block with no reason is refused by name. The
197
+ recorded reason is what makes the risk demonstrably the user's — the same
198
+ `--reason` rule the run-close and doc-ship writers already use.
199
+ 2. **Run-scoped. It NEVER writes the user's config.** The same rule the ultra
200
+ lane's forced run-scoped mode already follows. A veto set today must not
201
+ apply to a run started next month.
202
+ 3. **It is ANNOUNCED at every gate it suppresses, with its age.** A shadowed
203
+ setting must never be silent. There is no auto-expiry — ORC does not decide
204
+ that a user's reason stopped being true — so the age is what keeps an old
205
+ block from applying invisibly.
206
+ 4. **It blocks what ORC COMPUTES, never what the user TYPES.** A typed
207
+ `/orc-wait 30 hard` still waits while a block is active. `/orc-boundary`'s
208
+ rule, unchanged: a gate constrains ORC's own dispatch, never an explicit
209
+ instruction.
210
+ 5. It survives a resume, and is re-announced on the first gate after it.
211
+
212
+ `orc wait cancel` is a DIFFERENT command: it ends a wait that is already
213
+ running. Block is before, cancel is during. Never conflate them in prose or in a
214
+ menu.
215
+
216
+ ## What a wait never does
217
+
218
+ - It never dispatches an agent to do the waiting. An agent runs on the same
219
+ account and consumes the same window the wait exists to protect.
220
+ - It never runs another lane.
221
+ - It never writes the user's config.
222
+ - It never widens or narrows the work: the same tasks, the same slice, the same
223
+ agent resolve after the wait as before it.
224
+ - It never decides on its own that a user's block has expired.
225
+
226
+ ## Trace
227
+
228
+ The wait writes CLI-composed lines into the trace that is ALREADY open, and
229
+ nothing when no run is active. `/orc-wait` opens no run, so it is **not a lane**
230
+ in the trace enum and has no `run-<lane>-<slug>` pointer — the `/orc-explain`
231
+ precedent, a stated blind spot rather than an oversight.
232
+
233
+ ```
234
+ WAIT mode=hard requested=30m start=18:44 end=19:14 hops=1/4 trigger=user
235
+ WAIT block reason="window resets in 5m, task needs 10" by=user
236
+ WAIT unblock
237
+ ```
238
+
239
+ A wait that leaves no line cannot be counted, and a block that leaves no line
240
+ hides the fact that a run continued through a gate on the user's authority.