@azure-id/orc 0.56.1 → 1.0.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 (153) hide show
  1. package/CHANGELOG.md +2367 -2218
  2. package/README-id.md +49 -107
  3. package/README.md +45 -133
  4. package/bin/build-agents.js +18 -11
  5. package/bin/cli.js +33060 -29855
  6. package/bin/onboarding-content.js +0 -3
  7. package/bin/test-run.js +491 -0
  8. package/bin/verify-contracts.js +4256 -3277
  9. package/bin/verify-package.js +563 -498
  10. package/bin/webui/api.js +1186 -1163
  11. package/bin/webui/app.html +9 -0
  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/fixtures/extra.js +2036 -1934
  17. package/bin/webui/fixtures/flow.js +2 -2
  18. package/bin/webui/fixtures/index.js +503 -486
  19. package/bin/webui/fixtures/lanes.js +218 -0
  20. package/bin/webui/fixtures/settings.js +261 -34
  21. package/bin/webui/fixtures/stats.js +3 -3
  22. package/bin/webui/i18n/TERMS.md +135 -134
  23. package/bin/webui/i18n/en/extra.json +345 -313
  24. package/bin/webui/i18n/en/lanes.json +29 -0
  25. package/bin/webui/i18n/en/nav.json +1 -0
  26. package/bin/webui/i18n/en/overview.json +2 -0
  27. package/bin/webui/i18n/en/settings.json +16 -5
  28. package/bin/webui/i18n/id/extra.json +345 -313
  29. package/bin/webui/i18n/id/lanes.json +29 -0
  30. package/bin/webui/i18n/id/nav.json +1 -0
  31. package/bin/webui/i18n/id/overview.json +2 -0
  32. package/bin/webui/i18n/id/settings.json +15 -4
  33. package/bin/webui/js/01-i18n.js +1 -0
  34. package/bin/webui/js/panels/extra.js +3199 -3011
  35. package/bin/webui/js/panels/lanes.js +259 -0
  36. package/bin/webui/js/panels/overview.js +10 -0
  37. package/bin/webui/js/panels/settings.js +149 -3
  38. package/package.json +39 -39
  39. package/templates/agents/MODEL-MAPPING.md +23 -35
  40. package/templates/agents/orc-executor-opus-4-7-high.md +1 -1
  41. package/templates/agents/orc-executor-opus-4-7-med.md +1 -1
  42. package/templates/agents/orc-executor-opus-4-8-high.md +1 -1
  43. package/templates/agents/orc-executor-opus-5-high.md +1 -1
  44. package/templates/agents/orc-executor-opus-5-low.md +1 -1
  45. package/templates/agents/orc-executor-opus-5-med.md +1 -1
  46. package/templates/agents/orc-retro-opus-5-med.md +73 -73
  47. package/templates/agents/orc-retro-sonnet-5-high.md +72 -72
  48. package/templates/agents/orc-trace-writer-haiku-4-5.md +107 -107
  49. package/templates/commands/orc-route.md +1 -1
  50. package/templates/commands/orc.md +1 -1
  51. package/templates/skills/_shared/README.md +7 -3
  52. package/templates/skills/_shared/config-precedence.md +198 -0
  53. package/templates/skills/_shared/drift-recovery.md +1 -1
  54. package/templates/skills/_shared/extra-dispatch.md +159 -7
  55. package/templates/skills/_shared/interview.md +1 -1
  56. package/templates/skills/_shared/opus5-only.md +9 -7
  57. package/templates/skills/_shared/phases/README.md +82 -0
  58. package/templates/skills/{orc/references → _shared/phases}/analyst-gates.md +15 -3
  59. package/templates/skills/_shared/phases/execution.md +143 -0
  60. package/templates/skills/{orc/references → _shared/phases}/house-rules.md +13 -1
  61. package/templates/skills/{orc/references → _shared/phases}/intake.md +15 -2
  62. package/templates/skills/_shared/phases/mock-example.md +56 -0
  63. package/templates/skills/{orc/references → _shared/phases}/plan-handoff.md +16 -3
  64. package/templates/skills/_shared/phases/planning.md +135 -0
  65. package/templates/skills/_shared/phases/preflight.md +76 -0
  66. package/templates/skills/_shared/phases/review.md +53 -0
  67. package/templates/skills/_shared/phases/scoring.md +65 -0
  68. package/templates/skills/{orc/references → _shared/phases}/security-checklist.md +12 -1
  69. package/templates/skills/_shared/phases/security.md +55 -0
  70. package/templates/skills/_shared/phases/ship.md +88 -0
  71. package/templates/skills/{orc/references/stop-and-resume.md → _shared/phases/stop-resume.md} +169 -160
  72. package/templates/skills/_shared/phases/summary.md +48 -0
  73. package/templates/skills/_shared/phases/testgen.md +51 -0
  74. package/templates/skills/{orc/references/trace-protocol.md → _shared/phases/trace.md} +49 -6
  75. package/templates/skills/_shared/phases/verify.md +70 -0
  76. package/templates/skills/{orc/references → _shared/phases}/wave-grouping.md +14 -2
  77. package/templates/skills/{orc/references → _shared/phases}/wiki-consult.md +13 -1
  78. package/templates/skills/_shared/read-ladder.md +48 -0
  79. package/templates/skills/context-combiner/SKILL.md +214 -187
  80. package/templates/skills/orc/README.md +148 -150
  81. package/templates/skills/orc/SKILL.md +70 -358
  82. package/templates/skills/orc/config.md +137 -389
  83. package/templates/skills/orc/examples/full-run-mock.md +1 -1
  84. package/templates/skills/orc/references/effort-and-mode.md +16 -18
  85. package/templates/skills/orc/references/phases/intake.md +47 -0
  86. package/templates/skills/orc/references/phases/integration.md +19 -0
  87. package/templates/skills/orc/references/preflight-report.md +4 -4
  88. package/templates/skills/orc/references/ultra-mode.md +117 -123
  89. package/templates/skills/orc/schemas/planning-output.md +279 -279
  90. package/templates/skills/orc/subskills/orc-planner/SKILL.md +260 -264
  91. package/templates/skills/orc/subskills/orc-pr/stack-gate.md +4 -1
  92. package/templates/skills/orc-aftermath/SKILL.md +153 -136
  93. package/templates/skills/orc-analyze/SKILL.md +247 -220
  94. package/templates/skills/orc-analyze/references/branching.md +51 -51
  95. package/templates/skills/orc-analyze/references/thin-input.md +1 -1
  96. package/templates/skills/orc-analyze-mini/SKILL.md +128 -112
  97. package/templates/skills/orc-boundary/SKILL.md +244 -208
  98. package/templates/skills/orc-brainstorm/SKILL.md +372 -339
  99. package/templates/skills/orc-budget/SKILL.md +243 -225
  100. package/templates/skills/orc-challenge/README.md +1 -1
  101. package/templates/skills/orc-challenge/SKILL.md +293 -255
  102. package/templates/skills/orc-challenge/examples/council-full-roster.md +1 -1
  103. package/templates/skills/orc-claude/SKILL.md +216 -199
  104. package/templates/skills/orc-diy/README.md +2 -1
  105. package/templates/skills/orc-diy/SKILL.md +129 -70
  106. package/templates/skills/orc-diy/references/blocks/analyze.md +1 -1
  107. package/templates/skills/orc-diy/references/compile.md +21 -7
  108. package/templates/skills/orc-diy/references/flow-schema.md +2 -2
  109. package/templates/skills/orc-doc/SKILL.md +44 -7
  110. package/templates/skills/orc-explain/SKILL.md +19 -0
  111. package/templates/skills/orc-export/SKILL.md +26 -5
  112. package/templates/skills/orc-fast/SKILL.md +215 -187
  113. package/templates/skills/orc-grill/SKILL.md +233 -207
  114. package/templates/skills/orc-handoff/SKILL.md +223 -204
  115. package/templates/skills/orc-learn/SKILL.md +176 -156
  116. package/templates/skills/orc-mini/SKILL.md +41 -23
  117. package/templates/skills/orc-pact/SKILL.md +250 -218
  118. package/templates/skills/orc-pattern/SKILL.md +149 -124
  119. package/templates/skills/orc-poly/SKILL.md +237 -216
  120. package/templates/skills/orc-poly/references/gather.md +1 -1
  121. package/templates/skills/orc-pr-driver/SKILL.md +196 -167
  122. package/templates/skills/orc-pr-driver/references/orc-run-split.md +1 -1
  123. package/templates/skills/orc-pr-setup/SKILL.md +212 -184
  124. package/templates/skills/orc-quick/README.md +2 -2
  125. package/templates/skills/orc-quick/SKILL.md +45 -12
  126. package/templates/skills/orc-quick/references/dispatch-gate.md +2 -3
  127. package/templates/skills/orc-retro/SKILL.md +244 -222
  128. package/templates/skills/orc-retro/examples/retro-mock.md +171 -171
  129. package/templates/skills/orc-route/SKILL.md +183 -165
  130. package/templates/skills/orc-verify/SKILL.md +100 -86
  131. package/templates/skills/orc-wiki/SKILL.md +55 -206
  132. package/templates/skills/orc-wiki/references/phases/phase-0.md +71 -0
  133. package/templates/skills/orc-wiki/references/phases/phase-1.md +35 -0
  134. package/templates/skills/orc-wiki/references/phases/phase-2.md +52 -0
  135. package/templates/skills/orc-wiki/references/phases/phase-3.md +57 -0
  136. package/templates/skills/orc-wiki/references/phases/phase-3c.md +36 -0
  137. package/templates/agents/orc-advisor-fable-5.md +0 -50
  138. package/templates/agents/orc-analyst-fable-5.md +0 -115
  139. package/templates/agents/orc-judge-fable-5.md +0 -79
  140. package/templates/agents/orc-planner-fable-5.md +0 -152
  141. package/templates/agents/orc-reviewer-fable-5.md +0 -57
  142. package/templates/skills/_shared/fable5-override.md +0 -56
  143. package/templates/skills/orc-diy/references/blocks/execution.md +0 -42
  144. package/templates/skills/orc-diy/references/blocks/mock-example.md +0 -22
  145. package/templates/skills/orc-diy/references/blocks/planning.md +0 -34
  146. package/templates/skills/orc-diy/references/blocks/review.md +0 -18
  147. package/templates/skills/orc-diy/references/blocks/scoring.md +0 -16
  148. package/templates/skills/orc-diy/references/blocks/security.md +0 -25
  149. package/templates/skills/orc-diy/references/blocks/ship.md +0 -25
  150. package/templates/skills/orc-diy/references/blocks/summary.md +0 -18
  151. package/templates/skills/orc-diy/references/blocks/testgen.md +0 -17
  152. package/templates/skills/orc-diy/references/blocks/trace.md +0 -28
  153. package/templates/skills/orc-diy/references/blocks/verify.md +0 -25
@@ -0,0 +1,143 @@
1
+ # Phase — Execution (id: `execution`)
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
+ ## Execution (load wave-grouping.md + log-protocol.md)
18
+
19
+ Emit `PHASE execution start`. Build the conflict graph from `declared_files` →
20
+ group waves (cap `max_wave_tasks`, mark `is_batch_pause` from `pause_schedule`;
21
+ waves are computed for BOTH dispatch styles — sequential fires a wave's tasks
22
+ one at a time, parallel fires them together) → SHOW the wave plan (wave → tasks →
23
+ pause marks) to the user BEFORE wave 1 → write checkpoint + state-of-play BEFORE
24
+ dispatching. **Boundary gate, per wave (`boundary_gate`; emit `BOUNDARY`):**
25
+ `warn` prints each task's verdict; `block` additionally LIFTS a REFUSE task out of
26
+ the wave — **the wave still runs the rest** — and hands it back with its checklist
27
+ plus the "not blocked for you" line (it gates ORC's dispatch, never an explicit
28
+ instruction). ESCALATE dispatches but gates ship on the named human, riding the
29
+ EXISTING pause machinery. An uncarded area is `unknown`, never REFUSE. **Pattern-resolve gate
30
+ (once, before the first wave):** resolve each tagged language per
31
+ `../../orc/references/pattern-gate.md` and report ONE user line per language (cache hit →
32
+ apply cached; miss → codify/agnostic per `pattern_findings`; learn → dispatch
33
+ the codifier); hold resolved patterns in run state.
34
+
35
+ **TDD red proof — PAIRED TASKS, not a Wave 0 (v0.41.0):** TDD tasks are ORDINARY planner-emitted tasks the impl task `depends_on`, so they wave and score like any other (mechanics in `wave-grouping.md`); no `new-surface`/`behavior-change` entries → no TDD task at all. Each materializes its skeletons into real FAILING tests and returns the red evidence; emit `TDD-RED task=<id> iter=0` per requirement.
36
+ **Pre-implementation green is read per `disposition`:** a `new-surface` entry that PASSES is a spec bug → block that requirement's dispatch and surface it; a `behavior-change` regression-guard passing is EXPECTED and blocks nothing; anything else → adjudicate with the user, recorded in `decisions`. Then per implementation wave:
37
+ 1. Dispatch EVERY task as a spawned subagent (emit `DISPATCH <agent> :: <task>
38
+ expect=<model>/<effort>` BEFORE the Task call; subagent wrapper framing + the
39
+ task's INPUT SLICE per orc-execution/core.md + its scored model). Every
40
+ slice carries the task's `acceptance[]`, its `tdd_spec` tests (the executor
41
+ implements to green: implement→test→repair, cap `tdd_loop_max`, emitting
42
+ `TDD-RED`/`TDD-GREEN` per iteration; cap hit → STOP SEQUENCE + honest red
43
+ report) and the `house_rules` card lines
44
+ (`house-rules.md`, injected LITERALLY — read once per run, never
45
+ a pointer); FE/BE and `db:postgres` tasks get the resolved `pattern`
46
+ injected literally (pattern-gate.md), and — with `gotchas: on` — the
47
+ SCOPE-MATCHING gotchas beside it (glob vs this task's `declared_files`, cap 3,
48
+ highest `hits` first; zero matches = NO block, never an empty one — NEVER
49
+ inject unfiltered: `_shared/gotchas.md` §7).
50
+ **A FOREIGN task uses Bash, not the Task tool:** write the IDENTICAL slice to a
51
+ file and run `orc extra dispatch --task <file> --json` (exit codes + the
52
+ fallback procedure: `../extra-dispatch.md`). Append `via=extra:<profile>`
53
+ to the `DISPATCH` line and copy the return's `trace_line` + every
54
+ `trace_extras[]` entry VERBATIM into the packet — the CLI composes them, and the
55
+ hook emits NO `SPAWN`/`RETURN` for a foreign worker, so they are the whole record.
56
+ 2. Record worker milestone pings (they bound what a mid-wave stop can save).
57
+ 3. Collect returns; VALIDATE each (emit `VERIFY <task> actual=<model>/<effort>`
58
+ ✅ MATCH / ⛔ DOWNGRADE per return — surface any downgrade to the user).
59
+ **A FOREIGN return runs `_shared/return-validation.md` §2b INSTEAD of §2** — it
60
+ has no injected model-id line, so it cannot carry `actual_model` and faking one
61
+ claims evidence that does not exist; ⛔ SUBSTITUTION replaces the downgrade
62
+ check. A failure runs the fallback procedure, which BEGINS with a free
63
+ `orc extra reconcile <task>` — a worktree that moved is RESUMED, never re-done
64
+ — then re-dispatches or STOPs, announced, with the `EXTRA fallback` line.
65
+ `needs_context` → adjudicate → re-slice
66
+ (cap 2 per task, then escalate). A `pattern` task must return
67
+ `invariants_checked: true` + the matching `pattern_version`. **Evidence
68
+ check:** `status=done` on a stack with a runnable build/test REQUIRES
69
+ `evidence` {command, exit_code, tail} — a missing block or false
70
+ `no_runner_detected` is malformed (requeue); `done` with non-empty
71
+ `unmet[]` is `partial`.
72
+ 4. **Post-wave worktree audit (GATE, `_shared/return-validation.md` §6):** diff `git status --short` before/after the wave — a changed path in NO task's `declared_files`, INCLUDING one that became less modified (the revert signature), blocks the close until named and decided.
73
+ Overlap → `failure_reason: "file-collision:<file> with <agent>"`, requeue later wave.
74
+ 5. Append worker `log_entries` to the decision log; regenerate the digest.
75
+ **Gotcha capture (`gotchas: on`):** a return that CLOSED a repair loop carries
76
+ `gotcha_recorded` (`_shared/return-validation.md` §7) — dedupe on
77
+ `symptom`+`scope` (a match bumps `hits`/`last_seen` and appends nothing), else
78
+ append the block to `.claude/orc/gotchas.md`. YOU write it, never a subagent;
79
+ a capped-and-stopped loop records NOTHING.
80
+ 6. Update checkpoint + state-of-play; emit `OUTCOME task=<id> score=<n>
81
+ band=<range> model=<m> retries=<n> requeues=<n> needs_context=<n> unmet=<n>`
82
+ as each task closes.
83
+ 7. **Wave-boundary gate (deterministic — NOT judgment):** after wave W, if the
84
+ wave's `is_batch_pause` is true (W in `pause_schedule`) AND a later wave
85
+ remains, emit `GATE wave-boundary :: wave=W of K → STOP (batch_pause_every=N)`
86
+ and run the MANDATORY STOP SEQUENCE — never dispatch wave W+1 past an
87
+ unacknowledged boundary. Token pressure → same STOP SEQUENCE (judgment).
88
+ Last wave closes → emit `PHASE execution end`. (stop-resume.md)
89
+
90
+ **User escalations:** relay question → broadcast answer to log; an answer that
91
+ invalidates a DONE task → re-run once, then set every reverse-`depends_on`
92
+ consumer to `stale_review`. **Worker failure/garbage/timeout:** flag +
93
+ continue the wave; audit and re-dispatch at the next batch checkpoint
94
+ (`requeued`, retry_count++). Hard retry cap 2 → STOP and surface.
95
+
96
+ <!-- /orc:layer -->
97
+
98
+ <!-- orc:layer composed -->
99
+
100
+ ## Phase: Execution (waves)
101
+
102
+ Run execution exactly as the full lane's execution subskill defines it —
103
+ follow `.claude/skills/orc/subskills/orc-execution/SKILL.md` (slices
104
+ constructed by you, standing rules injected, evidence-bearing returns
105
+ validated against the contract) with these compiled overrides:
106
+
107
+ - Max parallel tasks per wave: **{{max_wave_tasks}}** (hard cap; overflow →
108
+ next wave; wave grouping per
109
+ `.claude/skills/_shared/phases/wave-grouping.md`).
110
+ - Stop-and-continue pause every **{{batch_pause_every}}** waves (checkpoint
111
+ confirmed BEFORE announcing any stop; resume per
112
+ `.claude/skills/_shared/phases/stop-resume.md`).
113
+ - Executor selection comes from this flow's scoring section above — never
114
+ from the shipped presets.
115
+
116
+ <!-- diy:when tdd=on -->
117
+ TDD execution: `tdd_spec` is SCOPED by each entry's `disposition` — only
118
+ `new-surface` and `behavior-change` get tests; `covered-by-existing` (cited
119
+ existing test) and `no-behavior` (constants, translation strings, docs, config)
120
+ get none, and a task with cited `risk[]` is never scoped out. A PAIRED TDD task
121
+ (never a Wave 0) materializes the remaining skeletons into real
122
+ FAILING tests (red proven before implementation; a `new-surface` pre-implementation
123
+ pass is a spec bug → block that requirement). Each implementation slice carries its
124
+ `tdd_spec`; executors implement to green (implement→test→repair, cap
125
+ `tdd_loop_max`; `TDD-RED`/`TDD-GREEN` per iteration) and return `tdd_state`
126
+ per `.claude/skills/_shared/return-validation.md` — including §6's worktree
127
+ delta: `git status --short` before/after each dispatch, any changed path
128
+ outside `declared_files` (a revert included) gates the wave close.
129
+ <!-- /diy:when -->
130
+
131
+ <!-- diy:when gotchas=on -->
132
+ Repair memory: probe `orc gotcha status` once at preflight (exit 0 = entries,
133
+ 1 = none — never a `find`) and print one line either way. Inject the
134
+ SCOPE-MATCHING entries into each slice beside `pattern` — glob vs that task's
135
+ `declared_files`, cap 3, highest `hits` first; zero matches = NO block, never an
136
+ empty one, and NEVER unfiltered. A return that CLOSED a repair loop carries
137
+ `gotcha_recorded`; dedupe it on `symptom`+`scope` (a match bumps `hits` and
138
+ `last_seen`) and append it to `.claude/orc/gotchas.md` YOURSELF — a subagent never
139
+ writes that file, and a loop that hit its cap and stopped records nothing. Full
140
+ contract: `.claude/skills/_shared/gotchas.md`.
141
+ <!-- /diy:when -->
142
+
143
+ <!-- /orc:layer -->
@@ -1,4 +1,14 @@
1
- # ORC House Rules (standing behavioral card)
1
+ # Phase House rules (id: `house-rules`)
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-quick`, `orc-doc`. Layers declared:
6
+ > `core` only — single-layer because it is a standing card injected VERBATIM
7
+ > into a slice — a layered card would be a different card. `orc lane phases
8
+ > <lane> --json` names the file and the layers to read.
9
+
10
+ <!-- orc:layer core -->
11
+ ## ORC House Rules (standing behavioral card)
2
12
 
3
13
  Injected LITERALLY into every executor slice as `house_rules` — never a file
4
14
  pointer. Keep the card ≤ 10 lines: it rides in EVERY dispatch, so every
@@ -18,3 +28,5 @@ HOUSE RULES (standing, apply to every change):
18
28
  6. An honest partial beats a false done — report what's unmet, never round up.
19
29
  7. Never revert, discard or rewrite files you did not write — `git checkout/restore/reset/stash/clean` are forbidden in your slice; an impossible assertion is `unmet`, never something to make true.
20
30
  <!-- card-end -->
31
+
32
+ <!-- /orc:layer -->
@@ -1,4 +1,15 @@
1
- # ReferencePhase 0 Intake
1
+ # PhaseIntake (id: `intake`)
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-diy`, `orc-challenge`. Layers: `core` and `full`
6
+ > — `core` is the intake procedure every lane runs; `full` is /orc's own Phase
7
+ > 0, which adds the analyst branch, the poly-spec split-and-STOP and the run-
8
+ > folder open. `orc lane phases <lane> --json` names the file and the layers
9
+ > to read.
10
+
11
+ <!-- orc:layer core -->
12
+ ## Reference — Phase 0 Intake
2
13
 
3
14
  Goal: extract just enough that the intent-spec can't be misread, then get out of
4
15
  the way. A wrong understanding parallelized is worse than a wrong understanding
@@ -7,7 +18,7 @@ done serially. Never interrogate; never ask what the repo can tell you.
7
18
  **Before anything — plan-input trigger (see `plan-handoff.md`):** if the run
8
19
  input IS a plan (pasted planning-output, a `plan-{name}.md` path, or an
9
20
  `orc/planner/{name}/` checkpoint), do NOT run intake — switch to the plan-handoff
10
- entry contract (`references/plan-handoff.md`): bootstrap the trace, schema-
21
+ entry contract (`plan-handoff.md`): bootstrap the trace, schema-
11
22
  validate, apply the `plan_head` staleness valve, re-run the full Phase 1 exit
12
23
  gate in this session, relay `open_questions[]`, then continue at Phase 2. A plain
13
24
  prose request is not a plan — run intake normally.
@@ -118,3 +129,5 @@ showing unless the user objects.
118
129
  When resuming a run in a fresh session, show a ONE-LINE reconfirm of the
119
130
  intent-spec's scope ("Resuming: <one-line scope>. Still correct?") before
120
131
  continuing. Catches requirements that changed between sessions, costs one line.
132
+
133
+ <!-- /orc:layer -->
@@ -0,0 +1,56 @@
1
+ # Phase — Mock example + drift recovery (id: `mock-example`)
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
+ ## Mock example + drift recovery (config `mock_example`)
18
+
19
+ Load `../drift-recovery.md` (canonical). Only after a GREEN Phase 6,
20
+ before ship: `ask` (default) → the offer is MANDATORY (never silently skipped,
21
+ never silently run); `on` → build; `off` → skip. Deliverable:
22
+ `mock-examples/<change-slug>/` at the project root (`EXAMPLE.md` + one minimal
23
+ runnable artifact; mocked inputs only) — **NEVER committed**. After the user
24
+ runs it, ONE question: matches expectation? [yes / drift: <describe>]. On
25
+ drift → `DRIFT-FROM` handoff → analyze-mini gap analysis → mini planner patch
26
+ plan → scored dispatch → re-verify → re-offer; **hard cap 2 loops**, then an
27
+ honest unresolved report. Emit `DRIFT loop=<n>` per loop; end-of-phase packet.
28
+
29
+ <!-- /orc:layer -->
30
+
31
+ <!-- orc:layer composed -->
32
+
33
+ ## Phase: Mock example (after a green verify, before ship)
34
+
35
+ <!-- diy:when mock_example=off -->
36
+ The mock-example phase is DISABLED in this flow. Skip silently.
37
+ <!-- /diy:when -->
38
+ <!-- diy:when mock_example=ask -->
39
+ After the verify/smoke gate is GREEN and BEFORE any ship action, the offer is
40
+ MANDATORY (never silently skipped, never silently run): follow
41
+ `.claude/skills/_shared/drift-recovery.md` — build
42
+ `mock-examples/<change-slug>/` (EXAMPLE.md + one minimal runnable mocked
43
+ artifact) only on a yes. After the user runs it, ask the one drift question;
44
+ on drift run the `DRIFT-FROM` recovery loop (hard cap 2, then an honest
45
+ unresolved report). `mock-examples/` is NEVER staged by the ship phase.
46
+ <!-- /diy:when -->
47
+ <!-- diy:when mock_example=on -->
48
+ After the verify/smoke gate is GREEN and BEFORE any ship action, build the
49
+ mocked example without asking, per
50
+ `.claude/skills/_shared/drift-recovery.md`: `mock-examples/<change-slug>/`
51
+ (EXAMPLE.md + one minimal runnable mocked artifact; mocked inputs only). Then
52
+ ask the one drift question; on drift run the `DRIFT-FROM` recovery loop (hard
53
+ cap 2). `mock-examples/` is NEVER staged by the ship phase.
54
+ <!-- /diy:when -->
55
+
56
+ <!-- /orc:layer -->
@@ -1,8 +1,19 @@
1
- # Reference — Plan Handoff (executing a plan from another session)
1
+ # Phase — Plan handoff (id: `plan-handoff`)
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-route`. Layers declared: `core` only — single-layer because
6
+ > executing a plan another session wrote is the same procedure wherever it is
7
+ > done, and /orc-route reads it to DEFINE what a plan is (v0.42.0 — a second
8
+ > definition is drift the lint cannot see). `orc lane phases <lane> --json`
9
+ > names the file and the layers to read.
10
+
11
+ <!-- orc:layer core -->
12
+ ## Reference — Plan Handoff (executing a plan from another session)
2
13
 
3
14
  The entry contract for the case ORC had no defined path for: **the run input
4
15
  IS a plan**, not a request. A plan was produced in one session (or saved to a
5
- file) and handed to a fresh session to build. Load `references/plan-handoff.md`
16
+ file) and handed to a fresh session to build. Load `plan-handoff.md`
6
17
  at Phase 0 the moment you recognise a plan input; it turns a pasted plan into a
7
18
  real ORC run instead of an ad-hoc task-by-task improvisation.
8
19
 
@@ -36,7 +47,7 @@ Do these IN ORDER before any dispatch. Skipping any step is a protocol
36
47
  violation.
37
48
 
38
49
  1. **This IS a run — bootstrap it.** Load the spine (`orc/SKILL.md`) and
39
- `references/trace-protocol.md`; create `log_dir`, write `log_dir/.current` =
50
+ `../../_shared/phases/trace.md`; create `log_dir`, write `log_dir/.current` =
40
51
  `run-orc-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
41
52
  in the SAME step (both, or neither — a pointer naming a file that does not
42
53
  exist is what splits a run across two files), store `trace_path` in the
@@ -82,3 +93,5 @@ violation.
82
93
  - **Not** a poly-spec path. A poly-spec (`orc-poly:spec`) is split-and-STOP at
83
94
  Phase 1 (see SKILL.md) — that is a different input than a per-repo
84
95
  planning-output handed here to build.
96
+
97
+ <!-- /orc:layer -->
@@ -0,0 +1,135 @@
1
+ # Phase — Planning (id: `planning`)
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
+ ## Planning
18
+
19
+ Emit `PHASE planning start`, then emit ONE `CONFIG <key=value …>` line with the
20
+ resolved values of every config key this run will consume (ALWAYS `opus5_only` — it selects the executor table AND every fixed role, so retro can segment per-band outcomes BY dispatch mode) — the runtime
21
+ proof `/orc-retro` audits that the run honored the config.
22
+ **Wiki consult (load `wiki-consult.md`;
23
+ always report — no tier is silent):** read the FRESH/AGING/STALE tier from
24
+ **`orc wiki status`** (v0.41.0 — deterministic; never hand-compute it from `wiki-meta.json`), pull the relevant pages (incl. cross-cutting maps like `orc-reference-api-surface`), apply
25
+ `code > fresh wiki > stale wiki (hints) > model priors`, emit
26
+ `WIKI-CONSULT <tier> :: docs=<pages>`, print the one-line tier report (every tier, `absent` included), and attribute per-dispatch too — `wiki:` on the `DISPATCH` line + a `wiki_used` return (wiki-consult.md Step 5). **Crosslink:** per wiki-consult.md, inject
27
+ the cached `.claude/orc/crosslink/needs.json` contract into any boundary-touching
28
+ task (advisory) and print + emit `CROSSLINK <state> :: boundaries=<n> peers=<names>`
29
+ — `configured-no-cache` prints the "cache not built" warning (full orc reads
30
+ only pre-built needs/cache, never peer source live). **Gotchas (repair memory,
31
+ config `gotchas`):** probe ONCE with `orc gotcha status` (exit 0 = entries exist,
32
+ 1 = none — never a `find`); canonical `_shared/gotchas.md`.
33
+ **Pact / boundary / aftermath / wiki debt (v0.46.0 — all CONSUMED here, never
34
+ written here):** probe `orc pact status --json` (`pact_gate`, default `warn`),
35
+ `orc boundary status --json` (`boundary_gate`, default `warn`), `orc wiki debt
36
+ --json`, and — only to decide whether the preflight's `after:` line fires at all —
37
+ `orc aftermath status --json`. Print each probe's own `line` VERBATIM; never
38
+ recount or re-word one. Gates: `../../orc-pact/references/gate.md` +
39
+ `../../orc-boundary/references/gate.md`. **Challenge (v0.47.0, `challenge_gate`,
40
+ default `warn`):** when the run's INPUT DOCUMENT has a cycle, print
41
+ `orc challenge status <slug> --json`'s `preflight_line` verbatim — building from
42
+ a document that has not passed its own review is worth one line. There is no
43
+ `block` mode (the `/orc-pact` precedent). **Extra (v0.50.0, `extra_enabled`) —
44
+ resolved HERE, announced HERE, never silent:** load `../extra-dispatch.md`;
45
+ per task run `orc extra resolve <score> --role executor --risk <n> --json`, and
46
+ before wave 1 settle its two pre-dispatch states, both PRINTED — a `needs_reping`
47
+ profile (re-ping; a STALE profile still routes) and a vaulted credential, which is
48
+ **LOCKED AT DISPATCH TIME whatever `credential.present` says** and falls back to
49
+ Claude rather than stopping the run. **Preflight:** print the compact block per
50
+ `../../orc/references/preflight-report.md` once wiki + crosslink (+ pattern/waves) resolve.
51
+
52
+ Ask which planner: **Superpowers / OpenSpec / Requirement Planner / ORC
53
+ (self)**. With an analyst requirement-spec present, the Requirement Planner
54
+ is the natural choice (consumes the spec; does NOT re-question scope); apply
55
+ the `git_head` staleness valve first (analyst-gates.md). Dispatch the planner
56
+ as a subagent — never plan yourself.
57
+
58
+ **CRITICAL — planning always hands back here.** However a plan was produced,
59
+ control returns to THIS orchestrator, which runs Phase 2 → 3 → … → 8 — never
60
+ jump from a plan straight to implementation. **ONE exception — a poly-spec
61
+ (`orc-poly:spec`, from `/orc-poly`):** the planner runs poly-split mode (one
62
+ plan per repo, each pinned to the frozen contract, each written into its own
63
+ repo); present the per-repo plans + build handoff and STOP — a poly-spec is the
64
+ only input that does NOT proceed to Phase 2 (each repo builds later, in its own
65
+ `/orc` session). The plan must satisfy
66
+ `../../orc/schemas/planning-output.md` (per-task `declared_files` incl. tests,
67
+ `grounding[]`, `acceptance[]`, `requirements[]`, `spec_invariants[]`,
68
+ `depends_on`, `owns_area`, `spec_ref`, + a `coverage` echo, + `tdd_spec` —
69
+ TDD is ALWAYS ON in full orc/ultra but **SCOPED to what can actually fail (v0.41.0)**: a `disposition` per entry (`new-surface | behavior-change | covered-by-existing | no-behavior | no-runner`) DERIVED from the planner's facets — constants/translations/file-splits get NO test, a cited `risk[]` is never scoped out, and a PAIRED task materializes it, never a Wave 0 (schema notes 7-8; gate check 5);
70
+ missing declared files → extract and confirm before leaving this phase.
71
+
72
+ **Phase 1 exit gate** (deterministic — full checks in analyst-gates.md; emit
73
+ `GATE` lines): Glob every `disposition: exists` path, recompute coverage (no
74
+ `orphan` requirements), cycle + same-file collision checks. Any miss →
75
+ bounce to the planner (one retry), then escalate. **After the gate passes,
76
+ relay the plan's `open_questions[]` in ONE batch:** blocking questions must be
77
+ answered before Phase 2; non-blocking show their `proposed_default` for tacit
78
+ approval. **Step-back valve:** `plan_confidence: low` OR >3 blocking questions →
79
+ recommend stepping back to `orc-analyze` (user may override and proceed).
80
+ **Pact injection (`pact_gate: warn`) — the payoff, and it happens HERE:** a
81
+ DRIFTED or BROKEN promise whose `anchors` intersect a task's `declared_files` is
82
+ appended VERBATIM to that task's `constraints[]` (the `spec_invariants[]`
83
+ channel — no new plumbing) and PRINTED per task. HOLDING entries are never
84
+ injected. Last month's decision constrains this month's plan, automatically. On
85
+ pass, emit `PHASE planning end`.
86
+
87
+ **Then print the `forecast:` block, BEFORE the Phase-2 pause question**
88
+ (`../../orc/references/preflight-report.md`) — tasks · waves · estimated subagents · model
89
+ mix · a measured time RANGE · one cheaper lane and what it costs. This is the
90
+ earliest instant every number is real and the last cheap moment to walk away.
91
+ Presentation only, no new probes. When `config.run_budget_dispatches` > 0 and the
92
+ forecast exceeds it, this is a **hard stop** with the batch pause's discipline
93
+ (`GATE budget stop`) offering proceed · cheaper lane · re-plan smaller — never
94
+ dispatch wave 1 past it.
95
+
96
+ <!-- /orc:layer -->
97
+
98
+ <!-- orc:layer composed -->
99
+
100
+ ## Phase: Planning
101
+
102
+ <!-- diy:when planning=auto -->
103
+ Route planning exactly as the full lane does — Superpowers plan, OpenSpec
104
+ change, or ORC's own planner, chosen by what exists in the project. Follow
105
+ `.claude/skills/orc/subskills/orc-planner/SKILL.md` for the own-planner path
106
+ and validate the planning output against
107
+ `.claude/skills/orc/schemas/planning-output.md`.
108
+ <!-- /diy:when -->
109
+ <!-- diy:when planning=own-planner -->
110
+ Always use ORC's own Requirement Planner, even when Superpowers/OpenSpec
111
+ artifacts exist: follow `.claude/skills/orc/subskills/orc-planner/SKILL.md`
112
+ and validate the planning output against
113
+ `.claude/skills/orc/schemas/planning-output.md`.
114
+ <!-- /diy:when -->
115
+ <!-- diy:when planning=superpowers -->
116
+ Plan via Superpowers: require a Superpowers-written plan as planning input
117
+ (ask the user to produce one if absent), then convert it to ORC planning
118
+ output validated against `.claude/skills/orc/schemas/planning-output.md` —
119
+ same conversion the full lane applies on its Superpowers route.
120
+ <!-- /diy:when -->
121
+ <!-- diy:when planning=openspec -->
122
+ Plan via OpenSpec: require an OpenSpec change as planning input (ask the user
123
+ to produce one if absent), then convert it to ORC planning output validated
124
+ against `.claude/skills/orc/schemas/planning-output.md` — same conversion the
125
+ full lane applies on its OpenSpec route.
126
+ <!-- /diy:when -->
127
+ <!-- diy:when tdd=on -->
128
+ TDD is ON for this flow: the plan must carry a `tdd_spec` per requirement
129
+ (given/when/then + a runnable skeleton in the project's test framework, or
130
+ `tdd: exempt — <reason>`; schema in
131
+ `.claude/skills/orc/schemas/planning-output.md`). No test runner in the
132
+ project → whole-run exemption, stated once at preflight.
133
+ <!-- /diy:when -->
134
+
135
+ <!-- /orc:layer -->
@@ -0,0 +1,76 @@
1
+ # Phase — Preflight (id: `preflight`)
2
+
3
+ > **Library file.** New at v1.0.0 W11, distilled from the eleven lane preflight
4
+ > sections that had independently converged on the same four steps in the same
5
+ > order. Layers: `core` (every lane with a silent preflight) and `full`
6
+ > (`/orc` and `/orc-ultra`, whose preflight also PRINTS a report).
7
+ >
8
+ > **What is NOT here:** the probes themselves. Which artifacts a lane probes, and
9
+ > which config keys it reads, are the lane's own — they are in the lane's spine
10
+ > and in `orc lane config <lane> --json`. This file is the SHAPE: the order, and
11
+ > the four rules that make the shape worth having.
12
+
13
+ <!-- orc:layer core -->
14
+
15
+ ## The order is the contract
16
+
17
+ Four steps, always in this order, and a lane adds its own probes to step 3 —
18
+ never a fifth step before step 2.
19
+
20
+ 1. **Config.** Resolve every key this lane reads through **one** resolver:
21
+ `orc lane config <lane> --json`. Never merge `.claude/orc.config.yaml`
22
+ yourself. Print every line of `announce[]` VERBATIM — *a shadowed setting must
23
+ never be silent*, and a lane that resolves silently cannot tell the user why
24
+ the thing they configured did not happen. Precedence, gates, inertness and the
25
+ CLI-absent floor are all in `../config-precedence.md`.
26
+
27
+ 2. **Trace.** Write `log_dir/.current` = `run-<lane>-<slug>-<DDMMYY>-<HHMMSS>.txt`
28
+ AND `touch the trace file` of that name in the SAME step. **Both, or neither.**
29
+ A pointer naming a file that does not exist is indistinguishable from a
30
+ dangling one — that split fifteen graded runs across two files each. The rest
31
+ of the protocol is `trace.md`.
32
+
33
+ 3. **Probes.** Use `../detecting-artifacts.md` — **never a raw `find`**, because
34
+ `.claude/` is hidden and a filesystem search false-negatives a real artifact
35
+ from the wrong CWD. Every probe is a documented exit-code contract, listed
36
+ once in `orc lane calls <lane>`. Treat a positive probe as the source of truth
37
+ and never second-guess it.
38
+
39
+ 4. **One line each.** Print one line per probe, per resolved gate, per tier.
40
+ **A probe whose answer is silent is a probe that gets skipped** — by the next
41
+ maintainer, and eventually by the model. An empty result is an ANSWER and
42
+ still gets its line.
43
+
44
+ ## The four rules
45
+
46
+ - **Preflight is SILENT in the sense that it asks nothing** — it prints, it never
47
+ interviews. A question in preflight is a question asked before the lane knows
48
+ enough to ask it well.
49
+ - **Nothing here stops a run unless the lane's own spine says it does.** Most
50
+ lanes treat missing knowledge as a helpful extra: it means more of the work is
51
+ a question instead of a lookup. `/orc-fast` is the exception, and it says so.
52
+ - **ONCE per run** (`/orc-quick`: once per session). A preflight that re-runs is
53
+ a preflight nobody reads.
54
+ - **An exit code is an answer, not a failure.** `orc pact status` exit 3 is "no
55
+ ledger yet, this is a first run"; `orc gotcha status` exit 1 is an empty
56
+ ledger. Say what it means, not that it failed.
57
+
58
+ <!-- /orc:layer -->
59
+
60
+ <!-- orc:layer full -->
61
+
62
+ ## `/orc` and `/orc-ultra` — preflight also REPORTS
63
+
64
+ The full lane's preflight does everything in `core` and then prints the
65
+ **preflight report**: tasks · waves · estimated subagents · model mix · the wiki
66
+ tier · the resolved pattern · crosslink state · the pause schedule · the run
67
+ budget. That format, its `GATE budget stop|pass` line and the FLOOR rule (repairs
68
+ push the real count up, never down) live in the `orc` skill's own
69
+ `references/preflight-report.md` — read it relative to that skill. It has ONE
70
+ consumer, so it stays home rather than moving here.
71
+
72
+ A trimmed lane must **not** read that file. `orc-mini` and `orc-fast` print their
73
+ resolved lines and go; there is no forecast to report because there are no waves
74
+ to forecast.
75
+
76
+ <!-- /orc:layer -->
@@ -0,0 +1,53 @@
1
+ # Phase — Review (id: `review`)
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
+ ## Review (load ../../orc/subskills/orc-review-verify/, spawned)
18
+
19
+ Emit `PHASE review start`. Superpowers path: its review skill incl. tests
20
+ (Sonnet 4.6 medium). OpenSpec/self path: review worker (Opus 5 medium). Pass the resolved
21
+ `code_pattern` + its invariants + gate lines for the re-check
22
+ (pattern-gate.md); no resolved pattern → FIRST ask for one (paste/md/none).
23
+ FE tasks in run → pass `fe_rules[]` from `../../orc-pattern/references/` fe-a11y
24
+ + fe-perf. Findings arrive on the **P0–P3 ladder** (invariant violation or
25
+ unmet gate line = P0; every P0–P2 carries `file:line` + VERBATIM `quote`;
26
+ unanchored → P3). Apply hard rule 5 INCLUDING the quote spot-check: P0 →
27
+ auto-fix once · P1 → ask, then fix once · P2/P3 → record for Phase 7. Emit
28
+ `FINDING p0=<n> p1=<n> p2=<n> p3=<n>` on the return, then `PHASE review end`.
29
+
30
+ <!-- /orc:layer -->
31
+
32
+ <!-- orc:layer composed -->
33
+
34
+ ## Phase: Review
35
+
36
+ <!-- diy:when review=off -->
37
+ Code review is DISABLED in this flow. Say so in the run summary line ("review
38
+ skipped by flow config") — never imply the work was reviewed.
39
+ <!-- /diy:when -->
40
+ <!-- diy:when review=on -->
41
+ Dispatch the reviewer exactly as the full lane does — follow the review half
42
+ of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md` (reviewer agent
43
+ `orc-reviewer-opus-5-med`; findings ride the severity ladder from the
44
+ locked rules, blocking and advisory findings both surfaced).
45
+ <!-- /diy:when -->
46
+ <!-- diy:when review=blocking-only -->
47
+ Dispatch the reviewer exactly as the full lane does — follow the review half
48
+ of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md` — but only
49
+ P0/P1 findings gate anything; P2/P3 findings are listed once in the summary
50
+ and never re-offered as fix-up tasks.
51
+ <!-- /diy:when -->
52
+
53
+ <!-- /orc:layer -->
@@ -0,0 +1,65 @@
1
+ # Phase — Effort & scoring (id: `scoring`)
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
+ ## Effort, dispatch style, scoring (load ../../orc/references/effort-and-mode.md)
18
+
19
+ Emit `PHASE scoring start`. Refine effort; recommend **sequential** vs
20
+ **parallel** dispatch (worktrees for high-effort independent features) — user
21
+ confirms. Dispatch style is **intra-wave concurrency only**: waves are computed
22
+ regardless of style (sequential runs have waves too, see wave-grouping.md), so
23
+ the batch pause always binds to wave numbers. **Batch-pause schedule (deterministic, not a cadence hint):** the plan
24
+ has K waves — ask "pause after every wave / every 2nd / run straight through?"
25
+ and SHOW the resulting stop list ("will pause after waves [list]"); a 2-wave
26
+ plan plainly offers "pause after wave 1". Store it as `pause_schedule`, recompute
27
+ each wave's `is_batch_pause` (last wave never pauses). **Facet-validation gate
28
+ (deterministic):** recompute `breadth` + `fan_in`/`fan_out` from the plan; a
29
+ mismatch or an uncited `risk` entry bounces the plan (grounding mechanics).
30
+ **Score every task** from its `facets` via the fixed formula, map to the model
31
+ ladder, show the facet vector + arithmetic table, and emit `SCORE task=<id>
32
+ score=<n> band=<band> model=<m> facets=<vector> :: <reason>` per task; a score
33
+ override needs a written reason (logged). **With `extra_enabled`** the table gains
34
+ a `via` column and its head can name TWO tables (effort-and-mode.md); a foreign
35
+ task's `SCORE` appends `via=extra:<profile>` and `model=` is the FOREIGN model id.
36
+ **Cited-risk hold-back (deterministic, beside the facet gate):** a foreign-routed
37
+ task with a non-empty `risk[]` is HELD BACK to its Claude band (`extra_risk_tasks`
38
+ defaults to `off`) and every one is LISTED with its cited risk — a silently
39
+ held-back task is indistinguishable from a forgotten one. Use the wiki's "Notes for planning" to sharpen
40
+ core/isolated + risk factors. **Tag each task's pattern domain+language**
41
+ (+ secondary `db: postgres`) per `../../orc/references/pattern-gate.md`. Ask: "Any
42
+ anticipated escalations, or run straight through?" Emit `PHASE scoring end`.
43
+
44
+ <!-- /orc:layer -->
45
+
46
+ <!-- orc:layer composed -->
47
+
48
+ ## Phase: Task scoring → executor selection
49
+
50
+ <!-- diy:when scoring=on -->
51
+ Score each task 0–100 with the full lane's rubric (see the scoring section of
52
+ `.claude/skills/orc/SKILL.md`), then dispatch the executor agent from THIS
53
+ compiled table — it is already clipped to this flow's session tier; never
54
+ substitute a preset from `config.md`:
55
+
56
+ {{score_table}}
57
+ <!-- /diy:when -->
58
+ <!-- diy:when scoring=off -->
59
+ Scoring is DISABLED in this flow. Skip the rubric entirely: EVERY execution
60
+ task dispatches to **{{fixed_executor}}**. Wave grouping, declared-files
61
+ conflict rules, and slice construction are unchanged — scoring off changes
62
+ model selection only, never scheduling.
63
+ <!-- /diy:when -->
64
+
65
+ <!-- /orc:layer -->
@@ -1,4 +1,13 @@
1
- # Reference — Security-Pass Checklist (Phase 5.5, opt-in)
1
+ # Phase — Security pass (id: `security-checklist`)
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 an
6
+ > opt-in pass either runs its checklist or does not run. `orc lane phases
7
+ > <lane> --json` names the file and the layers to read.
8
+
9
+ <!-- orc:layer core -->
10
+ ## Reference — Security-Pass Checklist (Phase 5.5, opt-in)
2
11
 
3
12
  Loaded ONLY when the Phase 5.5 security pass fires (config `security_review`
4
13
  `on`/`ask` + a task scored ≥ 70 in the run). Passed to the reviewer as
@@ -37,3 +46,5 @@ a hardening gap on a touched path = P1 · defense-in-depth suggestions = P2/P3.
37
46
  surfaced to callers by the new error handling.
38
47
  12. **Crypto misuse** — home-rolled hashing/encryption, weak algorithms (MD5,
39
48
  SHA1 for passwords), missing salts, static IVs in the diff.
49
+
50
+ <!-- /orc:layer -->