@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
@@ -1,389 +1,137 @@
1
- # ORC — Config
2
-
3
- This file is the **shipped defaults**. Central knobs the orchestrator reads at
4
- run start. Override any value for a single run without editing the file.
5
-
6
- ## Config resolution (defaults ← override file)
7
-
8
- At run start, resolve **each key independently** as: **default (this file), then
9
- the user override on top.** The override lives at `.claude/orc.config.yaml`
10
- (project `.claude/` root), holds ONLY the keys the user changed, and is written
11
- exclusively by the **`orc config`** CLI. It sits OUTSIDE `templates/`, so `orc
12
- update` never clobbers it.
13
-
14
- Per-key means: a key present in `orc.config.yaml` uses the override value; a key
15
- NOT present there falls back to this file's default independently, key by key.
16
- Example: if the override contains only `max_wave_tasks: 5`, then `max_wave_tasks`
17
- is 5 and every other key (`batch_pause_every`, `rubric_bands`, `max_scouts`,
18
- `default_analysis_depth`, …) still comes from this file's defaults. If the
19
- override file is absent entirely, use these defaults unchanged. A per-run inline
20
- override still wins over both.
21
-
22
- > Config editing is a CLI concern, not a slash command — it's pure file I/O, so
23
- > it runs deterministically with zero model tokens. Users run **`orc config`**
24
- > (interactive menu) or `orc config set <key> <value>` in their terminal; this
25
- > skill only READS the resolved values at run start.
26
-
27
- ```yaml
28
- # --- Wave grouping ---
29
- max_wave_tasks: 3 # max parallel tasks per wave (hard cap; overflow → next wave).
30
- # Waves are computed for EVERY run (sequential too)
31
- # dispatch style is intra-wave concurrency only.
32
-
33
- # --- Batch pausing ---
34
- batch_pause_every: 2 # waves between MANDATORY stop-and-continue pauses.
35
- # After wave W, if W % N == 0 AND a later wave exists,
36
- # the stop is a HARD gate (not orchestrator judgment) —
37
- # see references/stop-and-resume.md. The exact schedule
38
- # is confirmed at intake (Phase 2) and stored as
39
- # pause_schedule in the checkpoint.
40
-
41
- # --- Rubric width (the "metrix") ---
42
- rubric_bands: 5 # how many scoring bands the rubric REPORTS. Range 2–8.
43
- # Granularity only it no longer selects a preset.
44
- # The score→model mapping is the SINGLE 8-band table
45
- # below, used regardless of this value.
46
-
47
- # --- Analysis (System Analyst) ---
48
- max_scouts: 3 # max parallel read-only code scouts in DEEP analysis mode
49
- default_analysis_depth: standard # standard | deep depth gate default (run still confirms)
50
-
51
- # --- Test authoring (opt-in Phase 6.5; ORC writes test cases, never runs them) ---
52
- generate_tests: false # author test cases before ship? (run confirms at intake)
53
-
54
- # --- Code-pattern findings (make executors match the project's house style) ---
55
- pattern_findings: ask # ask | on | off — on an FE/BE cache miss during /orc:
56
- # ask P0 prompt (learn via orc-pattern, or agnostic)
57
- # on → auto-codify on miss, no prompt
58
- # off always agnostic (invariants only), never ask
59
- orc_wiki_pattern_findings: false # orc-wiki also codifies ALL detected langs during
60
- # its scan (rides under the wiki's scan-consent)
61
-
62
- # --- Repair memory (gotchas what this project has already gotten wrong) ---
63
- gotchas: on # on | off record a gotcha when a repair loop goes
64
- # red → green, and inject the SCOPE-MATCHING ones
65
- # into executor slices. Lives at
66
- # .claude/orc/gotchas.md outside templates/, never
67
- # in the install manifest, so update/prune can never
68
- # touch it. NEVER injected unfiltered.
69
- gotchas_max: 40 # live entries before the lowest-value tail is archived
70
- # to gotchas-archive.md (archived, never deleted).
71
-
72
- # --- Mock example + drift recovery (Phase 6.7 implementation lanes only) ---
73
- mock_example: ask # ask | on | off post-verify mocked runnable example
74
- # (mock-examples/<change-slug>/ at project root; NEVER
75
- # committed ship never stages it, no .gitignore edit):
76
- # ask → MANDATORY offer after a green verify/smoke gate
77
- # on → always build; off never. Drift answer
78
- # DRIFT-FROM recovery (_shared/drift-recovery.md, cap 2).
79
-
80
- # --- TDD anchor (plan-time acceptance tests; full orc + ultra ALWAYS on) ---
81
- # SCOPED (v0.41.0): each tdd_spec entry carries a `disposition` derived from the
82
- # planner's facets — new-surface | behavior-change get tests; covered-by-existing
83
- # (cites an existing test) and no-behavior (constants, translation strings, docs,
84
- # config) get NONE; no-runner is the whole-run exemption. A task with a cited
85
- # facets.risk[] can NEVER be scoped out. There is no key for this: a switch here
86
- # would just restore the tautological tests it removes.
87
- tdd_loop_max: 3 # max implement→test→repair iterations per task in the
88
- # TDD gate; cap hit → STOP SEQUENCE + honest red report.
89
- # Lane policy (fixed, not configurable): full orc +
90
- # ultra always on · orc-mini ONE intake question ·
91
- # orc-fast off (no planner) · orc-diy `tdd` flow key ·
92
- # standalone /orc-plan ON (a saved plan's only consumers
93
- # are the TDD-always build lanes, so a plan with no
94
- # tdd_spec is unusable by the lane that runs it).
95
-
96
- # --- Stacked PRs (Phase 8 gate; full /orc + /orc-ultra only) ---
97
- stacked_pr: ask # ask | on | off what happens when the change is too
98
- # big for one PR (threshold below):
99
- # ask → ONE P0 question (stack it, or one regular PR)
100
- # on → take "yes" without asking
101
- # off → never offer; always one regular PR
102
- # Never fires in orc-mini / orc-fast (the fast lane
103
- # never stops the chat) or orc-diy (compile-owned).
104
- stacked_pr_loc: 1000 # change LoC (additions+deletions, exclusions applied)
105
- # >= this stack candidate. SAME number is the
106
- # per-layer LoC ceiling: a change that cannot fit in
107
- # one layer's budget is what is worth stacking.
108
- stacked_pr_files: 20 # changed files >= this stack candidate; also the
109
- # per-layer hard max (soft target = half of it).
110
- stacked_pr_max_layers: 6 # soft layer cap: <= cap proceed · cap+1..cap+2 warn +
111
- # explicit override · beyond STOP (multiple stacks
112
- # or a phased release). N layers = N full CI runs.
113
-
114
- # --- Security pass (opt-in Phase 5.5; OFF by default) ---
115
- security_review: off # off | ask | onfires only on runs where a task
116
- # scored ≥ 70 (the existing risk floor):
117
- # off skip silently (default)
118
- # ask one prompt after review, user decides
119
- # on → dispatch the security pass without asking
120
-
121
- # --- Run cost budget (opt-in hard stop; OFF by default) ---
122
- run_budget_dispatches: 0 # 0 = off. Above 0, the Phase-1 `forecast:` block
123
- # estimates how many subagents this run will
124
- # dispatch; exceeding this number STOPS the run
125
- # before wave 1 — a hard gate with the batch
126
- # pause's discipline, never a hint and offers
127
- # proceed / a cheaper lane / re-plan smaller.
128
-
129
- # --- Opus-5-only dispatch (HARD-GATED, FORCING default off) ---
130
- opus5_only: false # true EVERY dispatched role resolves to a claude-opus-5
131
- # agent, effort as the only cost dial. Outranks BOTH
132
- # rubric_bands_override and the whole fable5_* block.
133
- # Never forced: the Haiku trace writer, orc-diy (compile-
134
- # owned). Needs an Opus 5 main session or every dispatch
135
- # downgrades. See _shared/opus5-only.md.
136
-
137
- # --- Fable 5 role override (HARD-GATED — nothing changes unless enabled) ---
138
- # (entirely INERT while opus5_only: true)
139
- fable5_enabled: false # master gate. false = inert (this whole block does nothing).
140
- fable5_effort: medium # medium | high | xhigh | max — effort for the Fable 5 role agents.
141
- # The `orc config set fable5_effort` CLI rewrites the effort:
142
- # line in the installed orc-<role>-fable-5 agents.
143
- fable5_roles: [] # subset of [analyze, plan, advisor, judge, review]. Each listed
144
- # role dispatches its orc-<role>-fable-5 variant instead of the
145
- # default. advisor/judge are ultra-lane only. Empty = no effect.
146
-
147
- # --- Artifact locations (internal by default) ---
148
- run_dir: .claude/orc/run # run folders (checkpoint, state-of-play,
149
- # intent-spec). Lives OUTSIDE the payload
150
- # trees `orc update` replaces, so an
151
- # update/doctor --fix can never destroy a
152
- # mid-run checkpoint. Pre-0.34.1 state at
153
- # .claude/skills/orc/run/ is migrated once.
154
- analyzer_dir: .claude/skills/orc/analyzer
155
- planner_dir: .claude/skills/orc/planner
156
- report_out_dir: analyst_report # project-root copy target on report-only
157
-
158
- orchestrator_model: claude-opus-4-8 # main session; high effort (never downgraded)
159
-
160
- # --- Retro delivery (/orc-retro files its report upstream; PR preferred, issue fallback) ---
161
- retro_repo: azure-id/orc # GitHub owner/repo that receives retro reports.
162
- # /orc-retro REQUIRES a delivery channel (authed gh
163
- # CLI or a GitHub MCP) and refuses to run without one.
164
-
165
- # --- Behavior trace logging (PERMANENT — always on, not a toggle) ---
166
- # Every ORC run writes a persistent behavior trace; there is no on/off key.
167
- log_dir: .claude/orc/logs # persistent trace folder — NEVER deleted on completion
168
-
169
- # --- Wiki freshness (COVERAGE-RELATIVE, computed on read by `orc wiki status`) ---
170
- wiki_fresh_max: 10 # per-doc commit distance < this → FRESH (silent)
171
- wiki_aging_max: 30 # distance ≤ this → AGING (notice); beyond → STALE
172
- wiki_refresh_ask_tasks: 3 # post-ship refresh ask fires when tasks ≥ this…
173
- wiki_refresh_ask_files: 10 # …or the run's touched files exceed this (full/ultra lanes)
174
-
175
- # --- Cross-repo crosslink snapshot freshness (Signal-B; DAY-based, computed on read) ---
176
- crosslink_fresh_days: 10 # days since sync ≤ this → FRESH cross-repo hint
177
- crosslink_aging_days: 15 # ≤ this → AGING; beyond → STALE (advisory only, never blocks)
178
-
179
- # --- Wiki delta refresh (`orc wiki impact` — the default refresh path) ---
180
- wiki_delta_full_threshold: 30 # TOUCHED docs above this % of registered docs →
181
- # impact recommends a FULL refresh (user decides;
182
- # never silently full)
183
- ```
184
-
185
- ## Score → model table (executor agent dispatched by name)
186
-
187
- The orchestrator scores each task 0–100, then maps to a model via this SINGLE
188
- canonical 8-band table, and dispatches the matching **executor agent**. There is
189
- no longer a narrow/wide preset choice — `rubric_bands` sets scoring granularity
190
- only, never which table is used.
191
-
192
- | Score | Model | Effort | Executor agent |
193
- |-------|-------|--------|----------------|
194
- | [0,30) | claude-haiku-4-5 | — | orc-executor-haiku-4-5 |
195
- | [30,40) | claude-sonnet-4-6 | medium | orc-executor-sonnet-4-6-med |
196
- | [40,55) | claude-sonnet-4-6 | high | orc-executor-sonnet-4-6-high |
197
- | [55,65) | claude-sonnet-5 | high | orc-executor-sonnet-5-high |
198
- | [65,70) | claude-opus-4-7 | medium | orc-executor-opus-4-7-med |
199
- | [70,80) | claude-opus-4-7 | high | orc-executor-opus-4-7-high |
200
- | [80,90) | claude-opus-4-8 | high | orc-executor-opus-4-8-high |
201
- | [90,100] | claude-opus-5 | high | orc-executor-opus-5-high |
202
-
203
- (Haiku has no effort ladder — that agent carries no `effort:` field.) The risk
204
- floor (≥70) lands `orc-executor-opus-4-7-high` at minimum in THIS table — under
205
- the Opus-5-only preset below it lands `orc-executor-opus-5-med` instead. The top
206
- band dispatches **Opus 5 high** — it needs an Opus 5 MAIN session or it silently
207
- falls back to the session model (the tier-honesty rule reports the downgrade).
208
-
209
- ### The Opus-5-only ladder (`opus5_only`, default **false**)
210
-
211
- One model, EFFORT as the cost dial. Off by default; nothing changes until set.
212
-
213
- | Score | Model | Effort | Executor agent |
214
- |-------|-------|--------|----------------|
215
- | [0,40) | claude-opus-5 | low | orc-executor-opus-5-low |
216
- | [40,80) | claude-opus-5 | medium | orc-executor-opus-5-med |
217
- | [80,100] | claude-opus-5 | high | orc-executor-opus-5-high |
218
-
219
- Rationale (why the key exists): deep SWE-benchmark work on cost vs efficiency
220
- across Claude models finds a single Opus 5 agent with the effort ladder the
221
- most efficient setup — model-class variety traded for effort variety.
222
- **Tier cost:** today ONE band in eight needs an Opus 5 main session; with this
223
- on, EVERY dispatch does, so a lower session downgrades every task (warn-only —
224
- a hook can gate effort, never model). **Scope:** this key is NOT executor-only.
225
- It also forces every fixed role (see below) across every lane. orc-diy's table
226
- stays compile-owned and reads only `orc-diy.config.yaml`, never this file.
227
-
228
- ### Resolution — highest wins
229
-
230
- 1. `opus5_only: true` — the 3-band preset above, and every fixed role forced to
231
- its Opus 5 variant. It FORCES: while on, it outranks BOTH a hand-written
232
- `rubric_bands_override` and the whole Fable 5 role override.
233
- 2. `rubric_bands_override` — hand-written `{min, max, agent}` rows (hand-edit
234
- only; deliberately not a CLI key). Wins over the default table.
235
- 3. the default 8-band table.
236
-
237
- `rubric_bands` sets scoring GRANULARITY only, in every case — it never selects a
238
- table. Whichever table resolves, **show it** with the Phase 2 scoring table and
239
- record the mode in the `CONFIG` trace line: an un-shown table is as unaccountable
240
- as an un-shown number.
241
-
242
- ### Override
243
- To use custom band edges/models, set `rubric_bands_override:` with your own
244
- list of `{min, max, agent}` rows; the orchestrator uses it instead of the table.
245
-
246
- ## Fixed-role agents (not score-mapped)
247
- | Role | Agent |
248
- |------|-------|
249
- | System Analyst | orc-system-analyst-opus-5-high |
250
- | Requirement Planner | orc-planner-opus-5-med |
251
- | Reviewer | orc-reviewer-opus-5-med |
252
- | Verifier | orc-verifier-opus-5-med |
253
- | Mini analyst | orc-analyze-mini-sonnet-5-high |
254
- | Mini planner | orc-planner-mini-sonnet-5-high |
255
- | Mini executor | orc-executor-sonnet-5-high (reused) |
256
- | Pattern codifier | orc-pattern-codifier-sonnet-5-high |
257
- | Ultra advisor (/orc-ultra only) | orc-advisor-opus-5-xhigh |
258
- | Ultra judge (/orc-ultra only) | orc-judge-opus-5-xhigh |
259
-
260
- **Opus-5-only override (forcing):** when `opus5_only: true`, every role above
261
- that is not already `claude-opus-5` dispatches its Opus 5 variant instead —
262
- mini analyst → `orc-analyze-mini-opus-5-med`, mini planner →
263
- `orc-planner-mini-opus-5-med`, mini executor → `orc-executor-opus-5-low`,
264
- pattern codifier → `orc-pattern-codifier-opus-5-med` — plus the roles owned by
265
- other lanes (scout, wiki scanner, CLAUDE.md writer, retro miner, fast
266
- executor). The full mapping, the two exclusions (the Haiku trace writer and
267
- orc-diy) and the tier consequence are in `../_shared/opus5-only.md`. It
268
- outranks the Fable 5 override below.
269
-
270
- **Fable 5 role override:** (INERT while `opus5_only: true`) when
271
- `fable5_enabled: true`, each role in
272
- `fable5_roles` dispatches its `orc-<role>-fable-5` variant INSTEAD of the default
273
- above (`analyze`→`orc-analyst-fable-5`, `plan`→`orc-planner-fable-5`,
274
- `advisor`→`orc-advisor-fable-5`, `judge`→`orc-judge-fable-5`,
275
- `review`→`orc-reviewer-fable-5`). Same slice, same contract. See
276
- `../_shared/fable5-override.md`.
277
-
278
- ## Rules
279
- - Read at run start via the resolution rule above (defaults ← `orc.config.yaml`
280
- override). Missing values use defaults (max_wave_tasks 3, batch_pause_every 2,
281
- rubric_bands 5, max_scouts 3, default_analysis_depth standard,
282
- generate_tests false, pattern_findings ask, security_review off).
283
- Behavior-trace logging is not listed here — it is PERMANENT (always on).
284
- - `generate_tests` gates the opt-in Phase 6.5 (Test Authoring, default OFF). When
285
- on, after Verify the orchestrator dispatches `orc-test-author-opus-5-med` to
286
- WRITE test cases (automated files + `TEST-PLAN.md` + a curl bundle for HTTP
287
- APIs) — it never runs them; the user tests manually. The manual deliverables
288
- are pinned to a visible **`test-generator/<change-slug>/`** folder at the
289
- project root (not `.claude/`, not the run folder) and are committed on ship.
290
- Full lane runs it as Phase 6.5; orc-mini also offers it (opt-in end-of-run ask
291
- on a GREEN smoke gate).
292
- - `max_scouts` caps the parallel scouts fanned out in the analyst's DEEP mode
293
- (never exceeds it, same as max_wave_tasks caps a wave).
294
- - `default_analysis_depth` only presets the analyst's standard/deep gate — the
295
- run still confirms; deep never auto-escalates without consent.
296
- - `rubric_bands` sets HOW MANY bands the rubric REPORTS (finer or coarser score
297
- granularity) — it no longer selects a preset. The score→model mapping is the
298
- single 8-band table above, used regardless of `rubric_bands`.
299
- - max_wave_tasks is a hard cap in wave-grouping.
300
- - `batch_pause_every` is a DETERMINISTIC hard gate, not a cadence hint: after
301
- wave W, `W % N == 0` with a later wave remaining forces the stop sequence
302
- (references/stop-and-resume.md). The schedule is computed and confirmed at
303
- Phase 2 intake and persisted as `pause_schedule` so resumes enforce it too.
304
- - Behavior-trace logging is PERMANENT (always on) — there is no `logging` key.
305
- Every run, the orchestrator follows `references/trace-protocol.md` and the
306
- `orc-trace.js` hook writes a persistent `.txt` under `log_dir`. The hook is the
307
- deterministic guarantee: it bootstraps `log_dir` + the run pointer itself and
308
- segments the run with `PHASE-EDGE` lines, so a usable trace exists even if the
309
- orchestrator never narrates. The RICH narration is dispatched per phase to the
310
- pinned Haiku trace writer — never appended from memory.
311
- - `log_dir` is the persistent trace folder; its top level holds the run `.txt`
312
- plus its sidecars (`.pending.json`, `.jsonl`). Unlike the decision log
313
- (`run/…md`, deleted on success) traces are NEVER auto-deleted — post-hoc
314
- review is the point.
315
- - `retro_repo` is where `/orc-retro` files its calibration report (PR preferred,
316
- issue fallback, AI-readable markdown). The retro hard-gates on a delivery
317
- channel — an authed gh CLI or a GitHub MCP server — and does not run at all
318
- when neither exists. See the `orc-retro` skill.
319
- - `pattern_findings` gates the code-pattern subsystem (default `ask`). On an FE/BE
320
- cache MISS during Phase 3 dispatch: `ask` → P0 prompt (learn conventions via the
321
- `orc-pattern` skill, or proceed language-agnostic); `on` → auto-codify, no prompt;
322
- `off` → always agnostic (invariants enforced, conventions imitate neighbor files),
323
- never ask. A cache HIT is used silently regardless. The codifier
324
- (`orc-pattern-codifier-sonnet-5-high`) writes `.claude/orc/patterns/<lang>-pattern.md`,
325
- reused by future runs. See the `orc-pattern` skill.
326
- - `orc_wiki_pattern_findings` (default `false`, on/off only — no `ask`, because the
327
- wiki's scan already has consent) makes `orc-wiki` codify ALL detected languages as
328
- a byproduct of its full scan, pre-warming the pattern cache so later `/orc` runs
329
- never hit the `pattern_findings` prompt.
330
- - `fable5_enabled` / `fable5_effort` / `fable5_roles` gate the **Fable 5 role
331
- override** (default OFF — a hard P0 gate). Nothing changes unless
332
- `fable5_enabled: true`. Then each role in `fable5_roles` (subset of
333
- `analyze, plan, advisor, judge, review`) dispatches its `orc-<role>-fable-5`
334
- agent instead of the default; `advisor`/`judge` apply only under `/orc-ultra`.
335
- `fable5_effort` (medium default) sets those agents' effort — the CLI rewrites
336
- their frontmatter on set. Enabled with empty `fable5_roles` = no effect (the
337
- CLI warns). The whole block is INERT while `opus5_only: true`. See
338
- `../_shared/fable5-override.md`.
339
- - `opus5_only` (default `false`) is a **forcing** dispatch mode: every scored
340
- executor AND every fixed role resolves to a `claude-opus-5` agent, with effort
341
- as the only cost dial. While on it outranks `rubric_bands_override` and the
342
- entire `fable5_*` block. Two things are never forced: the pinned Haiku trace
343
- writer, and orc-diy (compile-owned). Every dispatch then needs an Opus 5 main
344
- session — including `/orc-fast`, whose Sonnet-medium session premise holds
345
- only while this is off. See `../_shared/opus5-only.md`.
346
- - **Ultra lane has no config key** — `/orc-ultra` forces its overrides
347
- run-scoped (deep analyze, `pattern_findings` on, `generate_tests` on,
348
- `security_review` on, executor tier floor) and NEVER writes them to
349
- `orc.config.yaml`. See the orc skill's `references/ultra-mode.md`.
350
- - `wiki_fresh_max` / `wiki_aging_max` set the wiki freshness tier edges. The
351
- tier is ALWAYS computed on read, and **`orc wiki status` is the only thing
352
- that computes it** (v0.41.0 — `--json` for a machine-readable `.tier`): never
353
- hand-run a `git rev-list` against `.claude/orc/wiki-meta.json`. Freshness is
354
- **coverage-relative** — a doc is stale only when commits since ITS OWN
355
- `scanned_commit` touched files IT covers, and the wiki's tier is its worst
356
- doc. (Measuring from the manifest's `scan_commit` — the OLDEST doc's anchor,
357
- which a delta refresh deliberately leaves frozen — reported the same hash and
358
- a growing distance forever, so the wiki read STALE no matter how often it was
359
- refreshed.) A STRUCTURAL blind spot degrades the tier ONE step, never past
360
- AGING: that is a coverage gap, not doc rot. FRESH → silent, AGING → notice,
361
- STALE → warn (full/mini lanes) or the orc-fast user gate. See
362
- `../orc-wiki/references/staleness.md`.
363
- - `wiki_refresh_ask_tasks` / `wiki_refresh_ask_files` set the BIG-run trigger
364
- for the post-ship wiki refresh ask (full + ultra lanes only; guarded on a
365
- non-empty wiki). Judged by FINAL counts at ship time.
366
- - `crosslink_fresh_days` / `crosslink_aging_days` set the day edges for the
367
- cross-repo crosslink snapshot age (Signal B — the only day-based tier in the
368
- constellation; two repos share no commit axis). The effective cross-repo tier
369
- is `min(Signal-A provider-wiki-tier, Signal-B snapshot-age)`, computed on read,
370
- advisory only — a stale crosslink warns, never blocks. See
371
- `../orc-wiki/references/crosslink.md` + `../orc-wiki/references/staleness.md`.
372
- - `run_budget_dispatches` (default `0` = off) is the only cost gate ORC has that
373
- fires BEFORE money is spent. The Phase-1 `forecast:` block already estimates
374
- the run's subagent count from the plan (`references/preflight-report.md`); this
375
- key turns that estimate into a **hard stop before wave 1** when it is exceeded
376
- — same discipline as `batch_pause_every`, so a run never dispatches past an
377
- unacknowledged budget stop. It offers proceed · switch to a cheaper lane ·
378
- re-plan smaller, and emits `GATE budget stop|pass :: forecast=<n> limit=<m>`.
379
- At `0` the gate never fires and no `GATE budget` line is emitted at all.
380
- The estimate is a floor: repairs and requeues push the real count up, never
381
- down — so set the budget as a "stop and make me think" line, not a quota.
382
- - `security_review` gates the opt-in Phase 5.5 security pass (default `off`).
383
- The trigger is the EXISTING risk floor: it can only fire on a run where at
384
- least one task scored ≥ 70 (security/money/migrations/auth). `ask` → one
385
- prompt after review; `on` → dispatch without asking; `off` → skip silently.
386
- The pass reuses the reviewer (`phase=security`) with the checklist from
387
- `references/security-checklist.md`, sweeping only the run's changed files
388
- (wraps Semgrep if installed, never installs tooling). Findings use the same
389
- P0–P3 ladder + hard-rule-5 handling.
1
+ # ORC — Config
2
+
3
+ The **values** are not here any more. `bin/cli.js`'s registry holds every key,
4
+ its default, its validator, its family and its rank, and `orc lane config orc
5
+ --json` resolves them for a run. Restating them here produced a second table
6
+ that drifted from the first.
7
+
8
+ What stays here is the part the CLI cannot hand you: the score→model table, the
9
+ fixed-role pins, and where each subsystem's own rule is written down.
10
+
11
+ ## Resolution
12
+
13
+ **ONE resolver, and it is not you:** `orc lane config orc --json`. Obey
14
+ `effective`, print every line in `announce[]` VERBATIM at preflight, and honour
15
+ `stops[]` before wave 1. Never re-derive a value, a precedence or an inertness
16
+ from `.claude/orc.config.yaml` a key this lane does not read is not in the
17
+ answer, and a key another key shadows comes back already marked. Exit ≠ 0 → say
18
+ the CLI is unavailable and fall back to `../_shared/config-precedence.md`'s
19
+ documented defaults, out loud.
20
+
21
+ Read a family top-down and **stop at the first rank that resolves**; a rank
22
+ compares only INSIDE its family. Ranks, families, gates, lane-level inertness,
23
+ the `announce[]` boundary and the CLI-absent floor:
24
+ **`../_shared/config-precedence.md`.**
25
+
26
+ ## Score → model table (executor agent dispatched by name)
27
+
28
+ The orchestrator scores each task 0–100, then maps to a model via this SINGLE
29
+ canonical 6-band table, and dispatches the matching **executor agent**.
30
+ `rubric_bands` sets scoring granularity only it never selects a table.
31
+
32
+ | Score | Model | Effort | Executor agent |
33
+ |-------|-------|--------|----------------|
34
+ | [0,30) | claude-haiku-4-5 | — | orc-executor-haiku-4-5 |
35
+ | [30,40) | claude-sonnet-4-6 | medium | orc-executor-sonnet-4-6-med |
36
+ | [40,55) | claude-sonnet-4-6 | high | orc-executor-sonnet-4-6-high |
37
+ | [55,65) | claude-sonnet-5 | high | orc-executor-sonnet-5-high |
38
+ | [65,90) | claude-opus-5 | low | orc-executor-opus-5-low |
39
+ | [90,100] | claude-opus-5 | medium | orc-executor-opus-5-med |
40
+
41
+ (Haiku has no effort ladder — that agent carries no `effort:` field.) The risk
42
+ floor (≥70) lands `orc-executor-opus-5-low` at minimum in THIS table. Above ~65
43
+ the useful dial stopped being the model GENERATION and became the EFFORT, which
44
+ is why the old four Opus rows are two. **Every band from 65 needs an Opus 5 MAIN
45
+ session** or it silently falls back to the session model (the tier-honesty rule
46
+ reports the downgrade) — two bands where it used to be one, and that is the cost
47
+ of this table.
48
+
49
+ **Four executors are named by NO band** `orc-executor-opus-4-7-med`,
50
+ `orc-executor-opus-4-7-high`, `orc-executor-opus-4-8-high` and
51
+ `orc-executor-opus-5-high`. They still ship, reachable through
52
+ `rubric_bands_override`, `orc diy`'s `fixed_executor` and `extra_fallback_agent`.
53
+ Not deleted, because this is a TABLE change and not a model change — and an
54
+ agent's model change is always a rename.
55
+
56
+ ### The Opus-5-only ladder (`opus5_only`, default **false**)
57
+
58
+ One model, EFFORT as the cost dial. Off by default; nothing changes until set.
59
+
60
+ | Score | Model | Effort | Executor agent |
61
+ |-------|-------|--------|----------------|
62
+ | [0,90) | claude-opus-5 | low | orc-executor-opus-5-low |
63
+ | [90,100] | claude-opus-5 | medium | orc-executor-opus-5-med |
64
+
65
+ Two bands, sharing the 90 edge with the default table's top two rows. That
66
+ symmetry is the point: once the default table's high end is already Opus 5 with
67
+ effort as the dial, this mode differs from it only BELOW 65, so a third band
68
+ would be a distinction the default table stopped making.
69
+
70
+ **Tier cost:** today TWO bands in six need an Opus 5 main session; with this on,
71
+ EVERY dispatch does, so a lower session downgrades every task (warn-only — a
72
+ hook can gate effort, never model). **Scope:** it is NOT executor-only it also
73
+ forces every fixed role below, across every lane. orc-diy's table
74
+ stays compile-owned and reads only `orc-diy.config.yaml`, never this file.
75
+ Full mapping and the two exclusions: `../_shared/opus5-only.md`.
76
+
77
+ Whichever table resolves, **show it** with the Phase 2 scoring table and record
78
+ the mode in the `CONFIG` trace line: an un-shown table is as unaccountable as an
79
+ un-shown number.
80
+
81
+ ## Fixed-role agents (not score-mapped)
82
+
83
+ | Role | Agent |
84
+ |------|-------|
85
+ | System Analyst | orc-system-analyst-opus-5-high |
86
+ | Requirement Planner | orc-planner-opus-5-med |
87
+ | Reviewer | orc-reviewer-opus-5-med |
88
+ | Verifier | orc-verifier-opus-5-med |
89
+ | Mini analyst | orc-analyze-mini-sonnet-5-high |
90
+ | Mini planner | orc-planner-mini-sonnet-5-high |
91
+ | Mini executor | orc-executor-sonnet-5-high (reused) |
92
+ | Pattern codifier | orc-pattern-codifier-sonnet-5-high |
93
+ | Ultra advisor (/orc-ultra only) | orc-advisor-opus-5-xhigh |
94
+ | Ultra judge (/orc-ultra only) | orc-judge-opus-5-xhigh |
95
+
96
+ Under `opus5_only`, every role above that is not already `claude-opus-5`
97
+ dispatches its Opus 5 variant insteadplus the roles owned by other lanes
98
+ (scout, wiki scanner, CLAUDE.md writer, retro miner, fast executor).
99
+
100
+ ## Where each subsystem's rule is written down
101
+
102
+ A key's default and validator come from the resolver. These are the RULES the
103
+ value participates in, and each has exactly one canonical copy.
104
+
105
+ | Subsystem | The rule, in one line | Canonical prose |
106
+ |---|---|---|
107
+ | Wave grouping | `max_wave_tasks` is a hard cap, never a target | `../_shared/phases/wave-grouping.md` |
108
+ | Batch pause | `batch_pause_every` is a DETERMINISTIC hard gate, not a cadence hint: after wave W, `W % N == 0` with a later wave remaining forces the stop sequence. Computed and confirmed at Phase 2 intake, persisted as `pause_schedule` so a resume enforces it too | `../_shared/phases/stop-resume.md` |
109
+ | Run budget | `run_budget_dispatches` turns the Phase-1 forecast into a hard stop BEFORE wave 1 and emits `` `GATE budget stop\|pass ``. At `0` no line is emitted at all. The estimate is a FLOOR — repairs push the real count up, never down | `references/preflight-report.md` |
110
+ | Analysis depth | `default_analysis_depth` only presets the standard/deep gate; the run still confirms, and deep never auto-escalates without consent. `max_scouts` caps the parallel scouts the same way a wave is capped | `../orc-analyze/SKILL.md` |
111
+ | TDD | every plan carries `tdd_spec`; each entry's `disposition` is DERIVED from the planner's `facets`, and a task with a cited `facets.risk[]` can never be scoped out. `tdd_loop_max` caps the repair loop, then STOP + an honest red report. There is deliberately no key for the scoping — one would restore the tautological tests it removes | `SKILL.md` Phase 6 · `schemas/planning-output.md` |
112
+ | Test authoring | `generate_tests` gates the opt-in Phase 6.5: it WRITES cases and never runs them, pinned to a visible `test-generator/<change-slug>/` at the project root | `../orc-verify/SKILL.md` |
113
+ | Mock example | `mock_example` gates the post-verify runnable example under `mock-examples/`, which is NEVER committed; on drift, `drift-recovery.md` (`DRIFT-FROM`) is capped at 2 loops | `../_shared/drift-recovery.md` |
114
+ | Code patterns | `pattern_findings` gates the codifier on an FE/BE cache MISS; a cache HIT is used silently regardless. `orc_wiki_pattern_findings` pre-warms the cache during a wiki scan | `../orc-pattern/SKILL.md` |
115
+ | Repair memory | `gotchas` / `gotchas_max` govern `.claude/orc/gotchas.md` recorded only on a red green repair, injected scope-matched, never unfiltered | `../_shared/gotchas.md` |
116
+ | Security | `security_review` gates the opt-in Phase 5.5, and can only fire on a run with a task scored ≥ 70 | `../_shared/phases/security-checklist.md` |
117
+ | Wiki freshness | `wiki_fresh_max` / `wiki_aging_max` set the tier edges. The tier is COVERAGE-RELATIVE and computed on read, and `orc wiki status` is the only thing that computes it — never hand-run a `git rev-list` against `wiki-meta.json`. A STRUCTURAL blind spot degrades ONE step and never past `AGING` | `../orc-wiki/references/staleness.md` |
118
+ | Wiki refresh | `wiki_refresh_ask_tasks` / `wiki_refresh_ask_files` set the big-run post-ship ask, judged by FINAL counts. `orc wiki impact` decides delta vs full, and `wiki_delta_full_threshold` is when a FULL refresh is recommended — never silent | `../orc-wiki/references/staleness.md` |
119
+ | Crosslink | `crosslink_fresh_days` / `crosslink_aging_days` are DAY-based (two repos share no commit axis); the effective tier is `min(provider-wiki tier, snapshot age)`, advisory only — a stale crosslink warns, never blocks | `../orc-wiki/references/crosslink.md` |
120
+ | Foreign dispatch | `extra_enabled` and the `extra_*` block; every armed run prints its `extra:` line at Phase 1 | `../_shared/extra-dispatch.md` |
121
+ | Stacked PRs | the `stacked_pr*` keys gate the Phase 8 stack (full `/orc` + `/orc-ultra` only) | `../orc-pr-setup/SKILL.md` |
122
+ | Retro | `retro_repo` is where `/orc-retro` files its report; it hard-gates on a delivery channel and does not run at all without one | `../orc-retro/SKILL.md` |
123
+ | Paths | `log_dir` (traces, NEVER auto-deleted), `run_dir` (`.claude/orc/run` — outside the installer's blast radius), and the analyst/planner/report dirs | `../_shared/config-precedence.md` |
124
+ | Ultra | **no config key at all** — `/orc-ultra` forces its overrides RUN-SCOPED and never writes them to `orc.config.yaml` | `references/ultra-mode.md` |
125
+
126
+ **TDD — Lane policy (fixed, not configurable).** Full orc + ultra always on ·
127
+ orc-mini asks ONE intake question · orc-fast off (no planner) · orc-diy composes
128
+ it as the `tdd` flow key · standalone `/orc-plan` ON, because a saved plan's only
129
+ consumers are the TDD-always build lanes, so a plan with no `tdd_spec` is
130
+ unusable by the lane that runs it.
131
+
132
+ **Behavior-trace logging is PERMANENT there is no key.** Every run writes a
133
+ persistent trace under `log_dir`; the `orc-trace.js` hook is the deterministic
134
+ guarantee, bootstrapping the pointer itself and segmenting the run with
135
+ `PHASE-EDGE` lines, so a usable trace exists even if the orchestrator never
136
+ narrates. The rich narration is DISPATCHED per phase to the pinned Haiku trace
137
+ writer never appended from memory. See `../_shared/phases/trace.md`.
@@ -66,7 +66,7 @@ O: ✓ committed → pushed → run/merchant-notifications/DRP-482-add-merchant-
66
66
  Log deleted · checkpoint + dispatch log KEPT · completion dispatch report shown → "Run /usage to see your remaining limits."
67
67
 
68
68
  ## What this exercises
69
- always-spawn (even cheap tasks get a subagent) · facet-scored arithmetic · 8-band ladder ·
69
+ always-spawn (even cheap tasks get a subagent) · facet-scored arithmetic · 6-band ladder ·
70
70
  per-run folder run/merchant-notifications/ · usage reminder (no programmatic /usage) ·
71
71
  planner grounding spot-check catching a hallucinated path · executor evidence (verbatim
72
72
  build/test proof) · reviewer quote spot-check before any P0/P1 action ·