@azure-id/orc 1.9.0 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/CHANGELOG.md +202 -0
  2. package/README-id.md +57 -59
  3. package/README.md +53 -54
  4. package/bin/build-agents.js +109 -109
  5. package/bin/cli.js +262 -58
  6. package/bin/graph-audit.js +235 -0
  7. package/bin/graph-extract.js +308 -3
  8. package/bin/graph-gain.js +23 -3
  9. package/bin/graph-map.js +9 -1
  10. package/bin/graph-query.js +152 -10
  11. package/bin/graph-shard.js +6 -1
  12. package/bin/graph-signals.js +287 -4
  13. package/bin/graph.js +717 -658
  14. package/bin/onboarding-content.js +4 -4
  15. package/bin/pricing.json +207 -200
  16. package/bin/verify-contracts.js +117 -2
  17. package/bin/verify-package.js +11 -7
  18. package/bin/webui/css/04-motion.css +162 -152
  19. package/bin/webui/css/panels/knowledge.css +563 -116
  20. package/bin/webui/fixtures/extra.js +2036 -2036
  21. package/bin/webui/fixtures/hookui.js +5 -5
  22. package/bin/webui/fixtures/knowledge.js +21 -4
  23. package/bin/webui/fixtures/settings.js +305 -305
  24. package/bin/webui/i18n/en/knowledge.json +122 -4
  25. package/bin/webui/i18n/id/knowledge.json +122 -4
  26. package/bin/webui/js/panels/knowledge.js +573 -9
  27. package/bin/webui/js/panels/overview.js +13 -4
  28. package/mock-run/context-combiner.md +100 -100
  29. package/mock-run/orc-budget.md +534 -534
  30. package/mock-run/orc-challenge-council.md +262 -262
  31. package/mock-run/orc-ultra.md +103 -103
  32. package/package.json +1 -1
  33. package/templates/agents/MODEL-MAPPING.md +43 -43
  34. package/templates/agents/orc-advisor-opus-5-xhigh.md +56 -56
  35. package/templates/agents/orc-analyze-mini-opus-5-med.md +60 -60
  36. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +58 -58
  37. package/templates/agents/orc-challenge-advisor-opus-5-med.md +75 -75
  38. package/templates/agents/orc-challenge-contrarian-opus-5-high.md +110 -110
  39. package/templates/agents/orc-challenge-executor-opus-5-med.md +114 -114
  40. package/templates/agents/orc-challenge-expansionist-opus-5-med.md +112 -112
  41. package/templates/agents/orc-challenge-judge-opus-5-high.md +132 -132
  42. package/templates/agents/orc-challenge-outsider-opus-5-low.md +109 -109
  43. package/templates/agents/orc-challenge-principles-opus-5-high.md +109 -109
  44. package/templates/agents/orc-challenge-reader-opus-5-low.md +90 -90
  45. package/templates/agents/orc-claude-writer-opus-5-med.md +55 -55
  46. package/templates/agents/orc-context-combiner-opus-5-high.md +88 -88
  47. package/templates/agents/orc-doc-checker-opus-5-low.md +108 -108
  48. package/templates/agents/orc-doc-writer-opus-5-med.md +134 -134
  49. package/templates/agents/orc-executor-haiku-4-5.md +2 -1
  50. package/templates/agents/orc-executor-opus-4-7-high.md +2 -1
  51. package/templates/agents/orc-executor-opus-4-7-med.md +2 -1
  52. package/templates/agents/orc-executor-opus-4-8-high.md +2 -1
  53. package/templates/agents/orc-executor-opus-5-high.md +4 -3
  54. package/templates/agents/orc-executor-opus-5-low.md +4 -3
  55. package/templates/agents/orc-executor-opus-5-med.md +4 -3
  56. package/templates/agents/orc-executor-sonnet-4-6-high.md +2 -1
  57. package/templates/agents/orc-executor-sonnet-4-6-med.md +2 -1
  58. package/templates/agents/orc-executor-sonnet-5-high.md +2 -1
  59. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -1
  60. package/templates/agents/orc-judge-opus-5-xhigh.md +85 -85
  61. package/templates/agents/orc-learn-writer-opus-5-low.md +73 -73
  62. package/templates/agents/orc-pattern-codifier-opus-5-med.md +65 -65
  63. package/templates/agents/orc-planner-mini-opus-5-med.md +4 -4
  64. package/templates/agents/orc-planner-mini-sonnet-5-high.md +1 -1
  65. package/templates/agents/orc-planner-opus-5-med.md +160 -160
  66. package/templates/agents/orc-recon-opus-5-low.md +18 -8
  67. package/templates/agents/orc-recon-sonnet-4-6-med.md +15 -5
  68. package/templates/agents/orc-retro-opus-5-med.md +3 -3
  69. package/templates/agents/orc-reviewer-opus-5-med.md +60 -60
  70. package/templates/agents/orc-scout-opus-5-low.md +40 -40
  71. package/templates/agents/orc-system-analyst-opus-5-high.md +120 -120
  72. package/templates/agents/orc-test-author-opus-5-med.md +71 -71
  73. package/templates/agents/orc-test-designer-opus-5-high.md +158 -158
  74. package/templates/agents/orc-test-interpreter-opus-5-low.md +130 -130
  75. package/templates/agents/orc-verifier-opus-5-med.md +69 -69
  76. package/templates/agents/orc-wiki-scanner-opus-5-med.md +81 -81
  77. package/templates/commands/orc-ultra.md +17 -17
  78. package/templates/commands/orc-verify.md +11 -11
  79. package/templates/hooks/README.md +13 -3
  80. package/templates/hooks/orc-effort-guard.js +178 -178
  81. package/templates/hooks/orc-graph-hook.js +53 -7
  82. package/templates/hooks/orc-statusline.js +6 -6
  83. package/templates/skills/_shared/code-graph.md +57 -18
  84. package/templates/skills/_shared/config-precedence.md +198 -198
  85. package/templates/skills/_shared/extra-dispatch.md +1346 -1346
  86. package/templates/skills/_shared/opus5-only.md +8 -8
  87. package/templates/skills/_shared/phases/analyst-gates.md +136 -136
  88. package/templates/skills/_shared/phases/execution.md +4 -4
  89. package/templates/skills/_shared/phases/planning.md +3 -3
  90. package/templates/skills/_shared/phases/preflight.md +1 -1
  91. package/templates/skills/_shared/phases/review.md +4 -2
  92. package/templates/skills/_shared/phases/ship.md +1 -1
  93. package/templates/skills/_shared/phases/trace.md +3 -2
  94. package/templates/skills/_shared/read-ladder.md +14 -1
  95. package/templates/skills/_shared/return-validation.md +1 -1
  96. package/templates/skills/context-combiner/SKILL.md +1 -1
  97. package/templates/skills/context-combiner/schemas/combined-report.md +78 -78
  98. package/templates/skills/orc/README.md +2 -2
  99. package/templates/skills/orc/SKILL.md +8 -8
  100. package/templates/skills/orc/config.md +9 -9
  101. package/templates/skills/orc/examples/full-run-mock.md +73 -73
  102. package/templates/skills/orc/references/effort-and-mode.md +222 -222
  103. package/templates/skills/orc/references/preflight-report.md +2 -2
  104. package/templates/skills/orc/references/ultra-mode.md +3 -3
  105. package/templates/skills/orc/subskills/orc-planner/SKILL.md +2 -2
  106. package/templates/skills/orc/subskills/orc-planner-mini/SKILL.md +121 -121
  107. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +76 -76
  108. package/templates/skills/orc/subskills/orc-testgen/SKILL.md +45 -45
  109. package/templates/skills/orc-analyze/SKILL.md +2 -2
  110. package/templates/skills/orc-analyze/examples/analyze-mock.md +42 -42
  111. package/templates/skills/orc-analyze/schemas/report-audit.md +83 -83
  112. package/templates/skills/orc-analyze/schemas/report-prose.md +63 -63
  113. package/templates/skills/orc-analyze/schemas/report-requirement.md +78 -78
  114. package/templates/skills/orc-challenge/README.md +142 -142
  115. package/templates/skills/orc-challenge/examples/council-full-roster.md +273 -273
  116. package/templates/skills/orc-challenge/references/council.md +315 -315
  117. package/templates/skills/orc-challenge/references/intake.md +171 -171
  118. package/templates/skills/orc-claude/SKILL.md +14 -14
  119. package/templates/skills/orc-diy/README.md +143 -143
  120. package/templates/skills/orc-diy/references/flow-schema.md +1 -1
  121. package/templates/skills/orc-doc/README.md +229 -229
  122. package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +325 -325
  123. package/templates/skills/orc-doc/references/chunking.md +527 -527
  124. package/templates/skills/orc-fast/SKILL.md +4 -4
  125. package/templates/skills/orc-learn/SKILL.md +14 -14
  126. package/templates/skills/orc-learn/examples/learn-run-mock.md +61 -61
  127. package/templates/skills/orc-mini/SKILL.md +16 -20
  128. package/templates/skills/orc-mini/references/complexity.md +25 -11
  129. package/templates/skills/orc-quick/SKILL.md +12 -13
  130. package/templates/skills/orc-quick/references/gh-mode.md +1 -1
  131. package/templates/skills/orc-quick/references/look.md +5 -5
  132. package/templates/skills/orc-verify/SKILL.md +15 -15
  133. package/templates/skills/orc-verify/examples/verify-mock.md +33 -33
  134. package/templates/skills/orc-wiki/references/extra.md +1 -1
@@ -1,222 +1,222 @@
1
- # Reference — Effort, Dispatch Style, and Task Scoring
2
-
3
- **Subagents ALWAYS do the work — the orchestrator never implements** (hard
4
- rule 1). The orchestrator is Opus 4.8 high: it doing implementation is the most
5
- costly way possible, and it burns the context that must survive the whole run.
6
- Spawning keeps orchestrator context lean so runs last longer before any pause.
7
-
8
- Two INDEPENDENT axes. Never conflate them:
9
- - **Run-level effort** (low/medium/high) → picks the **dispatch style**
10
- (sequential vs parallel), which controls only **intra-wave concurrency** —
11
- never WHO does the work, and never WHETHER waves exist.
12
- - **Per-task score** (0–100) → picks each **worker's model**. Always applies.
13
-
14
- A medium run can contain a 30-score task and a 95-score task in the same wave.
15
-
16
- ## Waves always exist; dispatch style is intra-wave only
17
-
18
- **Wave computation runs for every run with ≥2 tasks, sequential included**
19
- (dependency layers + conflict graph + `max_wave_tasks` cap — see
20
- `wave-grouping.md`). Dispatch style does NOT decide whether there are waves; it
21
- decides how a wave's tasks fire:
22
-
23
- - **sequential** → a wave's tasks dispatch one at a time, in order; the wave
24
- closes when all its tasks close;
25
- - **parallel** → a wave's non-conflicting tasks dispatch at once (up to
26
- `max_wave_tasks`).
27
-
28
- The **wave-boundary batch pause binds to wave numbers, identically in both
29
- styles** — a sequential run is NOT "no waves / per-task pauses". Show the wave
30
- plan (wave → tasks → pause marks) to the user BEFORE wave 1 in both styles.
31
-
32
- ## Run-level effort → dispatch style (recommend, user confirms)
33
-
34
- - **Low**, or heavy shared data/code → **sequential**: one scored subagent at a
35
- time, in dependency order (still grouped into waves). Even a single trivial
36
- task = one cheap subagent (typically Sonnet 4.6 medium), never the
37
- orchestrator itself.
38
- - **Medium** → sequential by default; **parallel** intra-wave if 3+ genuinely
39
- independent areas.
40
- - **High** with independent areas → **parallel** waves; consider worktrees for
41
- isolation (merge at end).
42
-
43
- Always RECOMMEND with a one-line why, and let the user pick. Tell them the
44
- agent/task/wave counts, each task's scored model, and where batch pauses fall
45
- BEFORE dispatching.
46
-
47
- ## Per-task scoring — facet-scored, arithmetic, two-writer
48
-
49
- The score is **not judged** from a task title. The **planner** — the one party
50
- that globbed and read every declared file — emits per-task `facets` (facts). The
51
- **orchestrator** — who never read the code — computes the number arithmetically
52
- and audits the facts. No vibes anywhere. Every task is scored, including tiny ones.
53
-
54
- **1. Planner-emitted facets** (`planning-output.md` `facets` block, filled during
55
- grounding — zero extra passes):
56
-
57
- | Facet | Values |
58
- |---|---|
59
- | `breadth` | `len(declared_files)` — computed, not judged |
60
- | `novelty` | mechanical · imitate · new-surface · novel-algorithm |
61
- | `logic` | none · branching · stateful · algorithmic |
62
- | `test_surface` | none · update-existing · new-tests |
63
- | `risk` | `[]` or `[{class, cite}]` — class ∈ auth·money·migration·security·concurrency·data-integrity; **each entry MUST cite the file/requirement** |
64
- | `uncertainty` | low · medium · high (+ one-line reason if not low) |
65
-
66
- `fan_in`/`fan_out` are NOT emitted — the orchestrator computes them from
67
- `depends_on` (forward = fan_in, reverse = fan_out).
68
-
69
- **2. Orchestrator validation gate (Phase 2, deterministic — same bounce
70
- mechanics as grounding):** emit `GATE facet pass|bounce`. Three checks:
71
-
72
- - **Recompute** `breadth` (= `len(declared_files)`) and `fan_in`/`fan_out` from
73
- the plan itself — a mismatch bounces.
74
- - **MEMBERSHIP (v0.34.4):** `novelty`, `logic`, `test_surface` and `uncertainty`
75
- must each be a member of their CLOSED set above, and every `risk[].class` must
76
- be one of the six risk classes. A set lookup, as deterministic as the grounding
77
- Glob. This is the check that was missing: the gate validated only the two
78
- facets it could recompute and TRUSTED the four it could not, so a planner that
79
- invented a `low|medium|high` scale produced an **arithmetically unscorable**
80
- plan that passed the stated gate. There is no `N("low")` — and an orchestrator
81
- applying `risk != [] -> floor 70` to prose risk strings floors EVERY task, a
82
- two-band overshoot caused by a field's shape rather than by the work.
83
- - **Cite check:** a `risk` entry with no `cite` bounces (unchanged).
84
-
85
- A facet-vocabulary miss is a **FIELD-SHAPE bounce**: hand back the miss list and
86
- say *do not re-plan* — the planner corrects only the offending `facets` blocks.
87
- (It may also legitimately DROP a risk entry on the correction pass: implementation
88
- hazards like test seeding or dependency discipline are not risk CLASSES. That
89
- judgment is the planner's to make and is worth accepting.) Without this clause a
90
- shape bounce risks costing a correct plan. A plan with no `facets` at all
91
- (pre-v0.31.0) resumes on the legacy path — never bounced for the missing block.
92
-
93
- **3. The fixed formula (the ONLY scoring text — this replaces base+adjusters):**
94
-
95
- ```
96
- score = B(breadth) + N(novelty) + L(logic) + T(test_surface)
97
- + 5*min(fan_in,3) + 3*min(fan_out,3) + U(uncertainty)
98
-
99
- B: 1f=2 2-3f=6 4-5f=10 6+f=15
100
- N: mechanical=0 imitate=8 new-surface=18 novel-algorithm=30
101
- L: none=0 branching=8 stateful=16 algorithmic=24
102
- T: none=0 update-existing=4 new-tests=8
103
- U: low=0 medium=6 high=12
104
-
105
- risk ≠ [] → floor 70 (DERIVED from a cited risk facet, never remembered).
106
- clamp 0..100 → the RESOLVED table (below).
107
- ```
108
-
109
- **Which table (highest wins):** `opus5_only: true` (the 2-band Opus-5-only
110
- preset: `[0,90)` low · `[90,100]` medium) → `rubric_bands_override`
111
- (hand-written rows) → the default 6-band table. All three are in `config.md`.
112
- The formula, the facets and the risk floor are IDENTICAL in every case — only
113
- the score→agent mapping changes. Three consequences worth stating so nobody
114
- re-derives them per run:
115
-
116
- - **The risk floor still applies** — it raises the SCORE, then the resolved table
117
- maps it. A floored task (≥70) lands `opus-5-low` in the default table and
118
- `opus-5-low` under the Opus-5-only preset too: since v1.0.0 both tables answer
119
- the floor with the same agent, and only a score of 90+ moves it to `opus-5-med`.
120
- - **`opus5_only` FORCES** — while on, a hand-written `rubric_bands_override` is
121
- ignored. It is the one selector that can shadow another; that is deliberate.
122
-
123
- Show the user the full table (task, the facet vector, the arithmetic
124
- `B+N+L+T+fan+U = raw`, any risk floor, final, override+reason if any, dispatched
125
- model) BEFORE dispatching — an un-shown number is not a scored number. **Head it
126
- with the RESOLVED table's name** (`6-band default` / `Opus-5-only ladder
127
- (opus5_only)` / `custom (rubric_bands_override)`): the same logic
128
- applies to the mapping as to the number.
129
-
130
- **Extra (v0.50.0, `extra_enabled`) adds a `via` column and can make the head a
131
- PAIR.** An Extra route row is an OVERLAY that outranks the tables above **only
132
- for the scores it covers**, so a run can genuinely be running two tables at once
133
- and the head names both (`6-band default + extra rows [0,30) [30,70)`). The
134
- column reads `claude` or `extra:<profile> (<engine>)` and comes from
135
- `orc extra resolve --json` — the formula, the facets and the risk floor are
136
- untouched, and **the score is computed before the routing, never after it**. Two
137
- consequences the table has to show rather than imply: a cited `risk[]` HOLDS THE
138
- TASK BACK to its Claude band whatever the row says (`extra_risk_tasks: off`), and
139
- the `model` for a foreign task is the FOREIGN model id, not a Claude tier.
140
- Canonical: `../../_shared/extra-dispatch.md`.
141
-
142
- **4. Consistency check:** two tasks whose facet vectors differ in **≤1 facet must
143
- land in the same band** — or the SCORE line for the outlier **cites the one
144
- differing facet**. This is the specific fix for sibling tasks in the same domain
145
- drifting into three different bands.
146
-
147
- **5. Override protocol** (unchanged): you may override the computed score. Record
148
- `{computed_score, override_score, reason}` in the dispatch log. An override
149
- without a reason is invalid.
150
-
151
- ## EVERY dispatch is scored — the fix-cycle rule
152
-
153
- Fix-cycle dispatches — review-fix, verify-fix, the Phase-7 P2-batch, and any
154
- requeue — are scored through the **same formula**, with two floors that stop a
155
- fix in a risk area from silently dropping to a cheap model:
156
-
157
- - **Inherit the ORIGINAL task's `risk` facets** when the fix touches its files —
158
- a fix in a risk-floor area keeps the ≥70 floor (a userID/context-key fix can
159
- never dispatch below `opus-5-low` again);
160
- - a **P0/P1 fix never dispatches below the band of the task that produced the
161
- finding.**
162
-
163
- Emit a `SCORE task=fix-<n> …` line for each (they appear in the dispatch log and
164
- the completion table like any task).
165
-
166
- ## Worked scoring examples (facet vectors — compare facet-by-facet, not by vibes)
167
-
168
- Each row is the facet vector run through the formula. The number is arithmetic;
169
- the band is what matters. Compare a new task to these facet-by-facet.
170
-
171
- | Task | breadth·novelty·logic·test · fan_in/out · unc | Arithmetic | Band |
172
- |---|---|---|---|
173
- | Rename a config key across 4 files + its test | 5·mechanical·none·update-existing · 0/0 · low | 10+0+0+4 = **14** | haiku [0,30) |
174
- | New CRUD endpoint following a sibling route | 3·imitate·branching·new-tests · 1/0 · low | 6+8+8+8+5 = **35** | sonnet-4-6-med [30,40) |
175
- | Bug fix across 2 files with a repro test | 3·imitate·branching·new-tests · 0/0 · medium | 6+8+8+8+6 = **36** | sonnet-4-6-med [30,40) |
176
- | Isolated component from the design system | 3·new-surface·branching·new-tests · 0/0 · low | 6+18+8+8 = **40** | sonnet-4-6-high [40,55) |
177
- | Notification model + enum other tasks consume | 3·new-surface·stateful·new-tests · 0/3 · low | 6+18+16+8+9 = **57** | sonnet-5-high [55,65) |
178
- | Service-layer refactor behind a stable interface | 5·imitate·stateful·update-existing · 0/3 · medium | 10+8+16+4+9+6 = **53** | sonnet-4-6-high [40,55) |
179
- | Add role check to payment-refund endpoint | 3·imitate·branching·new-tests · 0/0 · low · **risk=[auth,money]** | 30 raw → **floor 70** | opus-5-low [65,90) |
180
- | Migrate orders table to split-name + backfill | 6·new-surface·stateful·new-tests · 1/3 · high · **risk=[migration,data-integrity]** | 15+18+16+8+5+9+12 = 83 (floor 70) → **83** | opus-5-low [65,90) |
181
-
182
- Two disciplines the vectors encode: (1) a small diff is NOT a low score when a
183
- cited `risk` facet forces the floor (the refund row — 30 raw, floored to 70); (2)
184
- a big-looking task IS low when its facets are mechanical (the rename). The risk
185
- floor is always DERIVED from a cited facet — the SCORE line names it, never
186
- applies it silently.
187
-
188
- ## Model ladder → the single score→model table
189
-
190
- The score→model mapping is NOT hardcoded here — it lives in `config.md` as ONE
191
- canonical 6-band table (there is no longer a narrow/wide preset). Read config at
192
- run start and map each task's final score through that table (or
193
- `rubric_bands_override`). The orchestrator dispatches the executor agent BY NAME;
194
- it does not request a raw model. `rubric_bands` sets only how many bands the
195
- rubric REPORTS (score granularity), never which table is used.
196
-
197
- The 6 bands (see config.md for the exact edges): `haiku-4-5` [0,30) ·
198
- `sonnet-4-6-med` [30,40) · `sonnet-4-6-high` [40,55) · `sonnet-5-high` [55,65) ·
199
- `opus-5-low` [65,90) · `opus-5-med` [90,100]. Effort tiers rank
200
- `low < medium < high < xhigh < max`.
201
-
202
- ## Fixed model assignments (not scored)
203
-
204
- - **Orchestrator (you):** Opus 4.8 high — or Opus 5 / Fable 5 at medium+, the
205
- two models that clear the guard from medium up. Never downgrade yourself.
206
- - **Review** — Superpowers path: Sonnet 4.6, medium. OpenSpec/self path:
207
- Opus 5, medium (`orc-reviewer-opus-5-med`).
208
- - **Verify:** Opus 5, medium (`orc-verifier-opus-5-med`).
209
- - **Analyst:** Opus 5, high. **Planner:** Opus 5, medium. **Test author:**
210
- Opus 5, medium. **Combiner:** Opus 5, high. **Ultra advisor/judge:** Opus 5,
211
- xhigh — every core fixed role is pinned to Opus 5 as of v0.34.0.
212
- - **Merge-conflict resolver:** Opus 4.8, medium.
213
-
214
- Note: every band in the table above is a real dispatch target (haiku through
215
- opus-5). If a model tier is unavailable in the environment, fall back UP to the
216
- next capable tier (never silently substitute a different family/effort).
217
-
218
- ## Dispatch log (lives in the checkpoint)
219
-
220
- Every spawn records: `{task_id, computed_score, override_score|null,
221
- override_reason|null, model, effort, spawned_at}`. Feeds the usage report at
222
- every stop.
1
+ # Reference — Effort, Dispatch Style, and Task Scoring
2
+
3
+ **Subagents ALWAYS do the work — the orchestrator never implements** (hard
4
+ rule 1). The orchestrator is Opus 4.8 high: it doing implementation is the most
5
+ costly way possible, and it burns the context that must survive the whole run.
6
+ Spawning keeps orchestrator context lean so runs last longer before any pause.
7
+
8
+ Two INDEPENDENT axes. Never conflate them:
9
+ - **Run-level effort** (low/medium/high) → picks the **dispatch style**
10
+ (sequential vs parallel), which controls only **intra-wave concurrency** —
11
+ never WHO does the work, and never WHETHER waves exist.
12
+ - **Per-task score** (0–100) → picks each **worker's model**. Always applies.
13
+
14
+ A medium run can contain a 30-score task and a 95-score task in the same wave.
15
+
16
+ ## Waves always exist; dispatch style is intra-wave only
17
+
18
+ **Wave computation runs for every run with ≥2 tasks, sequential included**
19
+ (dependency layers + conflict graph + `max_wave_tasks` cap — see
20
+ `wave-grouping.md`). Dispatch style does NOT decide whether there are waves; it
21
+ decides how a wave's tasks fire:
22
+
23
+ - **sequential** → a wave's tasks dispatch one at a time, in order; the wave
24
+ closes when all its tasks close;
25
+ - **parallel** → a wave's non-conflicting tasks dispatch at once (up to
26
+ `max_wave_tasks`).
27
+
28
+ The **wave-boundary batch pause binds to wave numbers, identically in both
29
+ styles** — a sequential run is NOT "no waves / per-task pauses". Show the wave
30
+ plan (wave → tasks → pause marks) to the user BEFORE wave 1 in both styles.
31
+
32
+ ## Run-level effort → dispatch style (recommend, user confirms)
33
+
34
+ - **Low**, or heavy shared data/code → **sequential**: one scored subagent at a
35
+ time, in dependency order (still grouped into waves). Even a single trivial
36
+ task = one cheap subagent (typically Sonnet 4.6 medium), never the
37
+ orchestrator itself.
38
+ - **Medium** → sequential by default; **parallel** intra-wave if 3+ genuinely
39
+ independent areas.
40
+ - **High** with independent areas → **parallel** waves; consider worktrees for
41
+ isolation (merge at end).
42
+
43
+ Always RECOMMEND with a one-line why, and let the user pick. Tell them the
44
+ agent/task/wave counts, each task's scored model, and where batch pauses fall
45
+ BEFORE dispatching.
46
+
47
+ ## Per-task scoring — facet-scored, arithmetic, two-writer
48
+
49
+ The score is **not judged** from a task title. The **planner** — the one party
50
+ that globbed and read every declared file — emits per-task `facets` (facts). The
51
+ **orchestrator** — who never read the code — computes the number arithmetically
52
+ and audits the facts. No vibes anywhere. Every task is scored, including tiny ones.
53
+
54
+ **1. Planner-emitted facets** (`planning-output.md` `facets` block, filled during
55
+ grounding — zero extra passes):
56
+
57
+ | Facet | Values |
58
+ |---|---|
59
+ | `breadth` | `len(declared_files)` — computed, not judged |
60
+ | `novelty` | mechanical · imitate · new-surface · novel-algorithm |
61
+ | `logic` | none · branching · stateful · algorithmic |
62
+ | `test_surface` | none · update-existing · new-tests |
63
+ | `risk` | `[]` or `[{class, cite}]` — class ∈ auth·money·migration·security·concurrency·data-integrity; **each entry MUST cite the file/requirement** |
64
+ | `uncertainty` | low · medium · high (+ one-line reason if not low) |
65
+
66
+ `fan_in`/`fan_out` are NOT emitted — the orchestrator computes them from
67
+ `depends_on` (forward = fan_in, reverse = fan_out).
68
+
69
+ **2. Orchestrator validation gate (Phase 2, deterministic — same bounce
70
+ mechanics as grounding):** emit `GATE facet pass|bounce`. Three checks:
71
+
72
+ - **Recompute** `breadth` (= `len(declared_files)`) and `fan_in`/`fan_out` from
73
+ the plan itself — a mismatch bounces.
74
+ - **MEMBERSHIP (v0.34.4):** `novelty`, `logic`, `test_surface` and `uncertainty`
75
+ must each be a member of their CLOSED set above, and every `risk[].class` must
76
+ be one of the six risk classes. A set lookup, as deterministic as the grounding
77
+ Glob. This is the check that was missing: the gate validated only the two
78
+ facets it could recompute and TRUSTED the four it could not, so a planner that
79
+ invented a `low|medium|high` scale produced an **arithmetically unscorable**
80
+ plan that passed the stated gate. There is no `N("low")` — and an orchestrator
81
+ applying `risk != [] -> floor 70` to prose risk strings floors EVERY task, a
82
+ two-band overshoot caused by a field's shape rather than by the work.
83
+ - **Cite check:** a `risk` entry with no `cite` bounces (unchanged).
84
+
85
+ A facet-vocabulary miss is a **FIELD-SHAPE bounce**: hand back the miss list and
86
+ say *do not re-plan* — the planner corrects only the offending `facets` blocks.
87
+ (It may also legitimately DROP a risk entry on the correction pass: implementation
88
+ hazards like test seeding or dependency discipline are not risk CLASSES. That
89
+ judgment is the planner's to make and is worth accepting.) Without this clause a
90
+ shape bounce risks costing a correct plan. A plan with no `facets` at all
91
+ (pre-v0.31.0) resumes on the legacy path — never bounced for the missing block.
92
+
93
+ **3. The fixed formula (the ONLY scoring text — this replaces base+adjusters):**
94
+
95
+ ```
96
+ score = B(breadth) + N(novelty) + L(logic) + T(test_surface)
97
+ + 5*min(fan_in,3) + 3*min(fan_out,3) + U(uncertainty)
98
+
99
+ B: 1f=2 2-3f=6 4-5f=10 6+f=15
100
+ N: mechanical=0 imitate=8 new-surface=18 novel-algorithm=30
101
+ L: none=0 branching=8 stateful=16 algorithmic=24
102
+ T: none=0 update-existing=4 new-tests=8
103
+ U: low=0 medium=6 high=12
104
+
105
+ risk ≠ [] → floor 70 (DERIVED from a cited risk facet, never remembered).
106
+ clamp 0..100 → the RESOLVED table (below).
107
+ ```
108
+
109
+ **Which table (highest wins):** `opus5_only: true` (the 2-band Opus-5-only
110
+ preset: `[0,90)` low · `[90,100]` medium) → `rubric_bands_override`
111
+ (hand-written rows) → the default 6-band table. All three are in `config.md`.
112
+ The formula, the facets and the risk floor are IDENTICAL in every case — only
113
+ the score→agent mapping changes. Three consequences worth stating so nobody
114
+ re-derives them per run:
115
+
116
+ - **The risk floor still applies** — it raises the SCORE, then the resolved table
117
+ maps it. A floored task (≥70) lands `opus-5-low` in the default table and
118
+ `opus-5-low` under the Opus-5-only preset too: since v1.0.0 both tables answer
119
+ the floor with the same agent, and only a score of 90+ moves it to `opus-5-med`.
120
+ - **`opus5_only` FORCES** — while on, a hand-written `rubric_bands_override` is
121
+ ignored. It is the one selector that can shadow another; that is deliberate.
122
+
123
+ Show the user the full table (task, the facet vector, the arithmetic
124
+ `B+N+L+T+fan+U = raw`, any risk floor, final, override+reason if any, dispatched
125
+ model) BEFORE dispatching — an un-shown number is not a scored number. **Head it
126
+ with the RESOLVED table's name** (`6-band default` / `Opus-5-only ladder
127
+ (opus5_only)` / `custom (rubric_bands_override)`): the same logic
128
+ applies to the mapping as to the number.
129
+
130
+ **Extra (v0.50.0, `extra_enabled`) adds a `via` column and can make the head a
131
+ PAIR.** An Extra route row is an OVERLAY that outranks the tables above **only
132
+ for the scores it covers**, so a run can genuinely be running two tables at once
133
+ and the head names both (`6-band default + extra rows [0,30) [30,70)`). The
134
+ column reads `claude` or `extra:<profile> (<engine>)` and comes from
135
+ `orc extra resolve --json` — the formula, the facets and the risk floor are
136
+ untouched, and **the score is computed before the routing, never after it**. Two
137
+ consequences the table has to show rather than imply: a cited `risk[]` HOLDS THE
138
+ TASK BACK to its Claude band whatever the row says (`extra_risk_tasks: off`), and
139
+ the `model` for a foreign task is the FOREIGN model id, not a Claude tier.
140
+ Canonical: `../../_shared/extra-dispatch.md`.
141
+
142
+ **4. Consistency check:** two tasks whose facet vectors differ in **≤1 facet must
143
+ land in the same band** — or the SCORE line for the outlier **cites the one
144
+ differing facet**. This is the specific fix for sibling tasks in the same domain
145
+ drifting into three different bands.
146
+
147
+ **5. Override protocol** (unchanged): you may override the computed score. Record
148
+ `{computed_score, override_score, reason}` in the dispatch log. An override
149
+ without a reason is invalid.
150
+
151
+ ## EVERY dispatch is scored — the fix-cycle rule
152
+
153
+ Fix-cycle dispatches — review-fix, verify-fix, the Phase-7 P2-batch, and any
154
+ requeue — are scored through the **same formula**, with two floors that stop a
155
+ fix in a risk area from silently dropping to a cheap model:
156
+
157
+ - **Inherit the ORIGINAL task's `risk` facets** when the fix touches its files —
158
+ a fix in a risk-floor area keeps the ≥70 floor (a userID/context-key fix can
159
+ never dispatch below `opus-5-low` again);
160
+ - a **P0/P1 fix never dispatches below the band of the task that produced the
161
+ finding.**
162
+
163
+ Emit a `SCORE task=fix-<n> …` line for each (they appear in the dispatch log and
164
+ the completion table like any task).
165
+
166
+ ## Worked scoring examples (facet vectors — compare facet-by-facet, not by vibes)
167
+
168
+ Each row is the facet vector run through the formula. The number is arithmetic;
169
+ the band is what matters. Compare a new task to these facet-by-facet.
170
+
171
+ | Task | breadth·novelty·logic·test · fan_in/out · unc | Arithmetic | Band |
172
+ |---|---|---|---|
173
+ | Rename a config key across 4 files + its test | 5·mechanical·none·update-existing · 0/0 · low | 10+0+0+4 = **14** | haiku [0,30) |
174
+ | New CRUD endpoint following a sibling route | 3·imitate·branching·new-tests · 1/0 · low | 6+8+8+8+5 = **35** | sonnet-4-6-med [30,40) |
175
+ | Bug fix across 2 files with a repro test | 3·imitate·branching·new-tests · 0/0 · medium | 6+8+8+8+6 = **36** | sonnet-4-6-med [30,40) |
176
+ | Isolated component from the design system | 3·new-surface·branching·new-tests · 0/0 · low | 6+18+8+8 = **40** | sonnet-4-6-high [40,55) |
177
+ | Notification model + enum other tasks consume | 3·new-surface·stateful·new-tests · 0/3 · low | 6+18+16+8+9 = **57** | sonnet-5-high [55,65) |
178
+ | Service-layer refactor behind a stable interface | 5·imitate·stateful·update-existing · 0/3 · medium | 10+8+16+4+9+6 = **53** | sonnet-4-6-high [40,55) |
179
+ | Add role check to payment-refund endpoint | 3·imitate·branching·new-tests · 0/0 · low · **risk=[auth,money]** | 30 raw → **floor 70** | opus-5-low [65,90) |
180
+ | Migrate orders table to split-name + backfill | 6·new-surface·stateful·new-tests · 1/3 · high · **risk=[migration,data-integrity]** | 15+18+16+8+5+9+12 = 83 (floor 70) → **83** | opus-5-low [65,90) |
181
+
182
+ Two disciplines the vectors encode: (1) a small diff is NOT a low score when a
183
+ cited `risk` facet forces the floor (the refund row — 30 raw, floored to 70); (2)
184
+ a big-looking task IS low when its facets are mechanical (the rename). The risk
185
+ floor is always DERIVED from a cited facet — the SCORE line names it, never
186
+ applies it silently.
187
+
188
+ ## Model ladder → the single score→model table
189
+
190
+ The score→model mapping is NOT hardcoded here — it lives in `config.md` as ONE
191
+ canonical 6-band table (there is no longer a narrow/wide preset). Read config at
192
+ run start and map each task's final score through that table (or
193
+ `rubric_bands_override`). The orchestrator dispatches the executor agent BY NAME;
194
+ it does not request a raw model. `rubric_bands` sets only how many bands the
195
+ rubric REPORTS (score granularity), never which table is used.
196
+
197
+ The 6 bands (see config.md for the exact edges): `haiku-4-5` [0,30) ·
198
+ `sonnet-4-6-med` [30,40) · `sonnet-4-6-high` [40,55) · `sonnet-5-high` [55,65) ·
199
+ `opus-5-low` [65,90) · `opus-5-med` [90,100]. Effort tiers rank
200
+ `low < medium < high < xhigh < max`.
201
+
202
+ ## Fixed model assignments (not scored)
203
+
204
+ - **Orchestrator (you):** Opus 4.8 high — or Opus 5.5 / Fable 5 at medium+, the
205
+ two models that clear the guard from medium up. Never downgrade yourself.
206
+ - **Review** — Superpowers path: Sonnet 4.6, medium. OpenSpec/self path:
207
+ Opus 5.5, medium (`orc-reviewer-opus-5-med`).
208
+ - **Verify:** Opus 5.5, medium (`orc-verifier-opus-5-med`).
209
+ - **Analyst:** Opus 5.5, high. **Planner:** Opus 5.5, medium. **Test author:**
210
+ Opus 5.5, medium. **Combiner:** Opus 5.5, high. **Ultra advisor/judge:** Opus 5.5,
211
+ xhigh — every core fixed role is pinned to Opus 5.5 as of v0.34.0.
212
+ - **Merge-conflict resolver:** Opus 4.8, medium.
213
+
214
+ Note: every band in the table above is a real dispatch target (haiku through
215
+ opus-5). If a model tier is unavailable in the environment, fall back UP to the
216
+ next capable tier (never silently substitute a different family/effort).
217
+
218
+ ## Dispatch log (lives in the checkpoint)
219
+
220
+ Every spawn records: `{task_id, computed_score, override_score|null,
221
+ override_reason|null, model, effort, spawned_at}`. Feeds the usage report at
222
+ every stop.
@@ -105,9 +105,9 @@ waves: 3 planned — will pause after wave 2 (batch_pause_every=2)
105
105
  table` · `Opus-5-only ladder (opus5_only)` · `custom
106
106
  (rubric_bands_override, <n> rows)`. An un-shown table is as unaccountable as
107
107
  an un-shown number, and the Opus-5-only ladder in particular means EVERY
108
- dispatch needs an Opus 5 main session — the user should see that before the
108
+ dispatch needs an Opus 5.5 main session — the user should see that before the
109
109
  first dispatch, not in a trace full of downgrades. When `opus5_only` is on,
110
- append ` · all fixed roles forced to Opus 5` and name any selector it
110
+ append ` · all fixed roles forced to Opus 5.5` and name any selector it
111
111
  shadowed (a `rubric_bands_override` present but INERT) — a setting
112
112
  the user tuned and the run then ignored has to be said out loud. With Extra in
113
113
  play the table is a COMPOSITE and reads as one (`6-band default table + extra
@@ -6,7 +6,7 @@ the ultra deltas. Ultra exists ONLY here — never in orc-mini, never on a plain
6
6
  `/orc` run.
7
7
 
8
8
  Cost stance: ultra is costly by definition. State it once at intake
9
- ("ultra adds an Opus 5 xhigh advisor + up to 3 judge dispatches + revision
9
+ ("ultra adds an Opus 5.5 xhigh advisor + up to 3 judge dispatches + revision
10
10
  loops"), then never prompt about cost again.
11
11
 
12
12
  ## Forced overrides (run-scoped — NEVER written to the user's config file)
@@ -20,13 +20,13 @@ Apply at Phase 0, on top of the normal config resolution:
20
20
  boundary (65) rise to at least `orc-executor-opus-5-low`. The floor only ever
21
21
  raises a band, so the top `[90,100]` band keeps `orc-executor-opus-5-med`.
22
22
  **Under `opus5_only` the floor raises EFFORT, not model** (every band is
23
- already Opus 5, so there is no model left to raise): the `[0,90)` band rises
23
+ already Opus 5.5, so there is no model left to raise): the `[0,90)` band rises
24
24
  low → medium, which makes both bands medium. It is still a floor — it never
25
25
  lowers a band, and it never raises `[90,100]` past medium.
26
26
  Show the remapped table with the Phase 2 scoring table.
27
27
 
28
28
  > Opus-5-only mode: if `opus5_only`, every role this lane dispatches is already
29
- > Opus 5 (advisor and judge are pinned there by default) and the scouts rise to
29
+ > Opus 5.5 (advisor and judge are pinned there by default) and the scouts rise to
30
30
  > `orc-scout-opus-5-low`. It FORCES. See `../../_shared/opus5-only.md`.
31
31
 
32
32
  ## Phase U0 — Advisor (after intake sign-off, before the analyst)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: orc-planner
3
3
  description: >
4
- Requirement Planner for ORC (Opus 5 medium). Turns a detailed request OR a
4
+ Requirement Planner for ORC (Opus 5.5 medium). Turns a detailed request OR a
5
5
  System Analyst requirement-spec into orc's planning-output: right-sized tasks,
6
6
  each with grounded declared_files (incl. tests), explicit depends_on, owns_area,
7
7
  and spec_ref — self-checked for dependency cycles and same-file collisions. A
@@ -14,7 +14,7 @@ description: >
14
14
 
15
15
  # orc-planner (Requirement Planner)
16
16
 
17
- The orchestrator stays on top and **dispatches a planner subagent (Opus 5,
17
+ The orchestrator stays on top and **dispatches a planner subagent (Opus 5.5,
18
18
  medium)** to produce the plan. Strictly planning: it does not implement, review,
19
19
  or verify. Output contract is orc's `schemas/planning-output.md` (single-source;
20
20
  do not redefine it here).