@azure-id/orc 0.56.0 → 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 +228 -0
  2. package/README-id.md +143 -53
  3. package/README.md +124 -103
  4. package/bin/build-agents.js +18 -11
  5. package/bin/cli.js +4139 -315
  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 +3 -3
  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 +292 -6
  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 +346 -313
  126. package/templates/skills/orc-quick/references/dispatch-gate.md +12 -4
  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,165 +1,183 @@
1
- ---
2
- name: orc-route
3
- description: >
4
- Plan-only lane router — you have a plan, this tells you which lane should build
5
- it. Use for "/orc-route", "which lane for this plan?", "is this worth the full
6
- orc run?". It reads the plan's own numbers (tasks, waves, files, top score,
7
- risk) plus ORC's deterministic knowledge probes, then names ONE recommended
8
- lane, the runners-up with the reason each lost, and any lane that is not
9
- possible with the blocking condition named. It routes a PLAN and nothing else —
10
- given a request in words it refuses and says why, because routing from a
11
- sentence is guessing. Zero agents, user-invoked only, nothing is built.
12
- ---
13
-
14
- # ORC-ROUTE
15
-
16
- **This is not a general "which command should I use" helper.** It only works on a
17
- plan, on purpose.
18
-
19
- A plan contains real numbers — tasks, the files each task touches, dependencies,
20
- facets, scores. A sentence like *"add notifications"* contains none of them.
21
- Routing from a plan is arithmetic. Routing from a sentence is guessing, and a
22
- guess that looks like a calculation is worse than no answer.
23
-
24
- The newcomer's "which of these commands do I type?" is answered by
25
- `orc onboarding first-run`, not here. That is the trade: a narrow tool that is
26
- always right, instead of a broad one that is sometimes wrong.
27
-
28
- ## Input contract — reuse, never reinvent
29
-
30
- A valid input is **exactly** what `../orc/references/plan-handoff.md` already
31
- defines as a plan input:
32
-
33
- - pasted planning-output (a block matching `../orc/schemas/planning-output.md` —
34
- a `tasks:` list with `declared_files`, `depends_on`, `grounding[]`);
35
- - a `plan-{name}.md` path the user points at;
36
- - an `orc/planner/{name}/` checkpoint (the planner's "Save & stop" artifact).
37
-
38
- Load that reference and use its definition — do NOT write a second one here. A
39
- second definition of "what counts as a plan" is drift the contract lint cannot
40
- see, and the two would eventually disagree about the same file.
41
-
42
- Schema-validate against `../orc/schemas/planning-output.md`. A structurally
43
- malformed plan is not a routing question: say which field is missing and point at
44
- `/orc-plan`.
45
-
46
- ## Refusal — anything that is not a plan
47
-
48
- Do not guess. Do not quietly downgrade into a general suggestion box.
49
-
50
- ```
51
- This is not a plan, so I cannot route it.
52
-
53
- I can only route a plan — a pasted ORC plan, a plan-<name>.md file, or a saved
54
- planner checkpoint. What you gave me is a request in words.
55
-
56
- Make a plan first with /orc-plan, then come back here.
57
- ```
58
-
59
- If the input is a plain request AND the user seems unsure what they even want,
60
- you may add ONE line offering `/orc-grill` first. Offer it; never run it.
61
-
62
- ## What it reads
63
-
64
- Only the plan, plus the deterministic probes ORC already ships — **never an
65
- ad-hoc `find`**, per `../_shared/detecting-artifacts.md`:
66
-
67
- | Probe | Tells you |
68
- |---|---|
69
- | `orc wiki status` | wiki tier — the `/orc-fast` prerequisite |
70
- | `orc pattern status <lang>` | cached code-pattern — the other `/orc-fast` prerequisite |
71
- | `orc gotcha status` | whether this project has repair memory for the area |
72
- | `orc diy status` | exit 0 = a compiled custom flow exists and is READY |
73
-
74
- Signals taken from the plan itself: task count, wave count, total distinct files
75
- in `declared_files`, the top facet score, whether any task carries a **cited**
76
- `risk[]`, and whether `plan_confidence` is low.
77
-
78
- Read nothing else. This lane opens no source file.
79
-
80
- ## How it decides
81
-
82
- Not a formula to hide behind — these are the real discriminators, in order:
83
-
84
- 1. **Hard gates first.** A lane whose prerequisites fail is `not possible`, not
85
- "runner-up". `/orc-fast` needs a FRESH or AGING wiki **and** a cached pattern
86
- **and** a single-task plan — it runs ONE task, **and (v0.46.0) a plan carrying
87
- any boundary REFUSE can never route there**: fast has one executor and no wave
88
- to lift the refused task out of, so the gate has nowhere to act. `/orc-diy`
89
- needs `orc diy status` to exit 0.
90
- 2. **Risk beats size.** Any task with a cited `risk[]`, or `plan_confidence:
91
- low`, recommends `/orc` — review and verify are what you are paying for, and
92
- a small risky change is exactly the case that earns them.
93
- 3. **Then size.** Roughly: 1 task with both `/orc-fast` gates green → `/orc-fast`;
94
- 1–3 tasks, no risk, one wave → `/orc-mini`; anything multi-wave, or a top
95
- score in the high bands, or more than a handful of files → `/orc`.
96
- 4. **`/orc-ultra` is never a default.** Name it only when the plan itself
97
- justifies maximum rigor (cited risk on more than one task, or a security-
98
- surface plan), and say plainly that it costs the most.
99
-
100
- State the numbers you decided from. A recommendation without its evidence cannot
101
- be argued with, and the user is the one who knows whether the risk is real.
102
-
103
- **Cost, when it is knowable (v0.46.0).** Run `orc budget forecast <plan> --json`
104
- and add ONE cost column per lane, in the primary unit `budget_units` resolves to.
105
- Routing stops being qualitative the moment "about 3x faster" becomes "1.23M vs
106
- 0.41M raw, 18% vs 6% of a 5-hour window". Two rules ride with it: a band below
107
- `budget_min_samples` makes the number a FLOOR and the column says so, and **exit 3
108
- (no history) means the column is simply absent** — never a guessed figure, and
109
- never a reason to withhold the recommendation itself, which does not depend on
110
- cost.
111
-
112
- ## Output shape
113
-
114
- ```
115
- Plan: merchant-notifications — 7 tasks, 3 waves, 14 files touched
116
- top score 78, two tasks marked risky
117
-
118
- → /orc the plan has risky tasks and a task above 70;
119
- review and verify are worth paying for here
120
- 1.23M raw · 18% of a 5-hour window on Max 20x
121
- runner-up /orc-mini — about 3x faster and 0.41M raw (6% of a window),
122
- but it skips full review and verification. Fine only if you
123
- will read the diff yourself.
124
- not possible /orc-fast — needs a fresh wiki (yours is STALE) and this plan
125
- is 7 tasks; that lane runs ONE task. It also carries 1 boundary
126
- REFUSE, which fast has no wave to lift out.
127
-
128
- Start /orc now? [yes / no]
129
- ```
130
-
131
- Rules for that block:
132
-
133
- - **Every runner-up names what it costs you**, not just that it is cheaper.
134
- - **Every `not possible` names the blocking condition AND its fix** ("run
135
- `/orc-wiki` to refresh"). A blocked lane with no stated fix is a dead end.
136
- - **The final offer starts the recommended lane.** `no` ends the run cleanly.
137
-
138
- ## Second entry point — one question after "Save & stop"
139
-
140
- `../orc/subskills/orc-planner/SKILL.md` ends in a three-way branch. On **Save &
141
- stop** ONLY, it asks:
142
-
143
- > Want a lane recommendation for building this? [yes / no]
144
-
145
- *Take into build* never asks — the lane is already chosen and running. *Poly
146
- split & stop* never asks — it has its own per-repo handoff. One question, in
147
- exactly one branch.
148
-
149
- ## Behavior trace (always on — same as every lane)
150
-
151
- Follow `../orc/references/trace-protocol.md`. Lane name `route`. Single-dispatch
152
- tier: **exactly ONE end-of-run packet** to `orc-trace-writer-haiku-4-5`, solo,
153
- after the offer is answered and BEFORE `log_dir/.current` is deleted. Run start
154
- writes `log_dir/.current` = `run-route-<slug>-<DDMMYY>-<HHMMSS>.txt` AND
155
- `touch the trace file` of that name in the SAME step. The packet carries the
156
- probe results, the signals read from the plan, the recommendation, and — as
157
- `decisions` why the runners-up lost. A run that ends with
158
- `zero new trace lines is a protocol violation`.
159
-
160
- ## Rules this lane always keeps
161
-
162
- Routes a plan, refuses anything else · zero agents, nothing dispatched · reuses
163
- `plan-handoff.md`'s plan definition, never a second one · deterministic probes
164
- only, never an ad-hoc `find` · reads no source file · never starts a lane the
165
- user did not accept · never edits config or any project file.
1
+ ---
2
+ name: orc-route
3
+ description: >
4
+ Plan-only lane router — you have a plan, this tells you which lane should build
5
+ it. Use for "/orc-route", "which lane for this plan?", "is this worth the full
6
+ orc run?". It reads the plan's own numbers (tasks, waves, files, top score,
7
+ risk) plus ORC's deterministic knowledge probes, then names ONE recommended
8
+ lane, the runners-up with the reason each lost, and any lane that is not
9
+ possible with the blocking condition named. It routes a PLAN and nothing else —
10
+ given a request in words it refuses and says why, because routing from a
11
+ sentence is guessing. Zero agents, user-invoked only, nothing is built.
12
+ ---
13
+
14
+ # ORC-ROUTE
15
+
16
+ **This is not a general "which command should I use" helper.** It only works on a
17
+ plan, on purpose.
18
+
19
+ A plan contains real numbers — tasks, the files each task touches, dependencies,
20
+ facets, scores. A sentence like *"add notifications"* contains none of them.
21
+ Routing from a plan is arithmetic. Routing from a sentence is guessing, and a
22
+ guess that looks like a calculation is worse than no answer.
23
+
24
+ The newcomer's "which of these commands do I type?" is answered by
25
+ `orc onboarding first-run`, not here. That is the trade: a narrow tool that is
26
+ always right, instead of a broad one that is sometimes wrong.
27
+
28
+ ## Input contract — reuse, never reinvent
29
+
30
+ A valid input is **exactly** what `../_shared/phases/plan-handoff.md` already
31
+ defines as a plan input:
32
+
33
+ - pasted planning-output (a block matching `../orc/schemas/planning-output.md` —
34
+ a `tasks:` list with `declared_files`, `depends_on`, `grounding[]`);
35
+ - a `plan-{name}.md` path the user points at;
36
+ - an `orc/planner/{name}/` checkpoint (the planner's "Save & stop" artifact).
37
+
38
+ Load that reference and use its definition — do NOT write a second one here. A
39
+ second definition of "what counts as a plan" is drift the contract lint cannot
40
+ see, and the two would eventually disagree about the same file.
41
+
42
+ Schema-validate against `../orc/schemas/planning-output.md`. A structurally
43
+ malformed plan is not a routing question: say which field is missing and point at
44
+ `/orc-plan`.
45
+
46
+ ## Refusal — anything that is not a plan
47
+
48
+ Do not guess. Do not quietly downgrade into a general suggestion box.
49
+
50
+ ```
51
+ This is not a plan, so I cannot route it.
52
+
53
+ I can only route a plan — a pasted ORC plan, a plan-<name>.md file, or a saved
54
+ planner checkpoint. What you gave me is a request in words.
55
+
56
+ Make a plan first with /orc-plan, then come back here.
57
+ ```
58
+
59
+ If the input is a plain request AND the user seems unsure what they even want,
60
+ you may add ONE line offering `/orc-grill` first. Offer it; never run it.
61
+
62
+ ## What it reads
63
+
64
+ Only the plan, plus the deterministic probes ORC already ships — **never an
65
+ ad-hoc `find`**, per `../_shared/detecting-artifacts.md`:
66
+
67
+ | Probe | Tells you |
68
+ |---|---|
69
+ | `orc wiki status` | wiki tier — the `/orc-fast` prerequisite |
70
+ | `orc pattern status <lang>` | cached code-pattern — the other `/orc-fast` prerequisite |
71
+ | `orc gotcha status` | whether this project has repair memory for the area |
72
+ | `orc diy status` | exit 0 = a compiled custom flow exists and is READY |
73
+
74
+ Signals taken from the plan itself: task count, wave count, total distinct files
75
+ in `declared_files`, the top facet score, whether any task carries a **cited**
76
+ `risk[]`, and whether `plan_confidence` is low.
77
+
78
+ Read nothing else. This lane opens no source file.
79
+
80
+ ## How it decides
81
+
82
+ Not a formula to hide behind — these are the real discriminators, in order:
83
+
84
+ 1. **Hard gates first.** A lane whose prerequisites fail is `not possible`, not
85
+ "runner-up". `/orc-fast` needs a FRESH or AGING wiki **and** a cached pattern
86
+ **and** a single-task plan — it runs ONE task, **and (v0.46.0) a plan carrying
87
+ any boundary REFUSE can never route there**: fast has one executor and no wave
88
+ to lift the refused task out of, so the gate has nowhere to act. `/orc-diy`
89
+ needs `orc diy status` to exit 0.
90
+ 2. **Risk beats size.** Any task with a cited `risk[]`, or `plan_confidence:
91
+ low`, recommends `/orc` — review and verify are what you are paying for, and
92
+ a small risky change is exactly the case that earns them.
93
+ 3. **Then size.** Roughly: 1 task with both `/orc-fast` gates green → `/orc-fast`;
94
+ 1–3 tasks, no risk, one wave → `/orc-mini`; anything multi-wave, or a top
95
+ score in the high bands, or more than a handful of files → `/orc`.
96
+ 4. **`/orc-ultra` is never a default.** Name it only when the plan itself
97
+ justifies maximum rigor (cited risk on more than one task, or a security-
98
+ surface plan), and say plainly that it costs the most.
99
+
100
+ State the numbers you decided from. A recommendation without its evidence cannot
101
+ be argued with, and the user is the one who knows whether the risk is real.
102
+
103
+ **Cost, when it is knowable (v0.46.0).** Run `orc budget forecast <plan> --json`
104
+ and add ONE cost column per lane, in the primary unit `budget_units` resolves to.
105
+ Routing stops being qualitative the moment "about 3x faster" becomes "1.23M vs
106
+ 0.41M raw, 18% vs 6% of a 5-hour window". Two rules ride with it: a band below
107
+ `budget_min_samples` makes the number a FLOOR and the column says so, and **exit 3
108
+ (no history) means the column is simply absent** — never a guessed figure, and
109
+ never a reason to withhold the recommendation itself, which does not depend on
110
+ cost.
111
+
112
+ ## Output shape
113
+
114
+ ```
115
+ Plan: merchant-notifications — 7 tasks, 3 waves, 14 files touched
116
+ top score 78, two tasks marked risky
117
+
118
+ → /orc the plan has risky tasks and a task above 70;
119
+ review and verify are worth paying for here
120
+ 1.23M raw · 18% of a 5-hour window on Max 20x
121
+ runner-up /orc-mini — about 3x faster and 0.41M raw (6% of a window),
122
+ but it skips full review and verification. Fine only if you
123
+ will read the diff yourself.
124
+ not possible /orc-fast — needs a fresh wiki (yours is STALE) and this plan
125
+ is 7 tasks; that lane runs ONE task. It also carries 1 boundary
126
+ REFUSE, which fast has no wave to lift out.
127
+
128
+ Start /orc now? [yes / no]
129
+ ```
130
+
131
+ Rules for that block:
132
+
133
+ - **Every runner-up names what it costs you**, not just that it is cheaper.
134
+ - **Every `not possible` names the blocking condition AND its fix** ("run
135
+ `/orc-wiki` to refresh"). A blocked lane with no stated fix is a dead end.
136
+ - **The final offer starts the recommended lane.** `no` ends the run cleanly.
137
+
138
+ ## Second entry point — one question after "Save & stop"
139
+
140
+ `../orc/subskills/orc-planner/SKILL.md` ends in a three-way branch. On **Save &
141
+ stop** ONLY, it asks:
142
+
143
+ > Want a lane recommendation for building this? [yes / no]
144
+
145
+ *Take into build* never asks — the lane is already chosen and running. *Poly
146
+ split & stop* never asks — it has its own per-repo handoff. One question, in
147
+ exactly one branch.
148
+
149
+ ## Behavior trace (always on)
150
+
151
+ `../_shared/phases/trace.md` (`core`, at run start; `orc lane phases` names
152
+ the file and the layers). Lane token `route`, tier **Single-dispatch** —
153
+ exactly ONE end-of-run packet, dispatched solo before `.current` is deleted.
154
+ At run start write `log_dir/.current` = `run-route-<slug>-<DDMMYY>-<HHMMSS>.txt` AND
155
+ `touch the trace file` of that name in the SAME step.
156
+ Nothing else about the protocol is restated here; a phase that ends with
157
+ `zero new trace lines is a protocol violation`.
158
+
159
+ ## Rules this lane always keeps
160
+
161
+ Routes a plan, refuses anything else · zero agents, nothing dispatched · reuses
162
+ `plan-handoff.md`'s plan definition, never a second one · deterministic probes
163
+ only, never an ad-hoc `find` · reads no source file · never starts a lane the
164
+ user did not accept · never edits config or any project file.
165
+
166
+ ## Config
167
+
168
+ Resolve with `orc lane config orc-route --json` and obey `effective`. Never merge
169
+ `.claude/orc.config.yaml` yourself, and never re-derive a precedence. Exit ≠ 0 →
170
+ say so and use `../_shared/config-precedence.md`'s documented defaults, out
171
+ loud. Nothing this lane reads is contested, gated or a stop, so it owes no
172
+ preflight line and has no gate to honour.
173
+
174
+ ## Calls
175
+
176
+ **ONE catalogue, and it is not you:** `orc lane calls orc-route --json` names every
177
+ CLI call this lane makes, each with its exit-code contract, its cost, when to run
178
+ it, and what an EMPTY answer means. Never invent a spelling, never re-word an
179
+ exit code, and never re-derive a state word — the CLI's state words are the only
180
+ state words, and **an exit code is an ANSWER wherever that contract says so, not
181
+ a failure**. A call the answer does not name is a call this lane does not make.
182
+ Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
183
+ command you are about to run, out loud, before running it.
@@ -1,86 +1,100 @@
1
- ---
2
- name: orc-verify
3
- description: >
4
- Standalone verification for ORC. Use for "verify my changes",
5
- "/orc-verify", or "check the modified files". Runs INDEPENDENTLY —
6
- no orchestrator, no planning, no run folder required. Verifies only the
7
- git-modified changes in the working tree and shows a summary of results. Uses
8
- Opus 5 medium effort. Read-only: it reports, it does not fix or commit.
9
- ---
10
-
11
- # ORC-VERIFY (standalone)
12
-
13
- A focused, dependency-free verify pass. No intake, no planning, no checkpoint —
14
- you point it at your uncommitted work and it tells you what's wrong.
15
-
16
- Run as Opus 5, medium effort.
17
-
18
- **Worked example** (orient only — never execute from it): `examples/verify-mock.md`.
19
-
20
- ## Procedure
21
-
22
- 1. **Gather the change surface** from git: `git diff --name-only` (unstaged +
23
- staged) and, if useful, `git diff` for the actual hunks. Scope is ONLY the
24
- modified/added files — do not review the whole repo.
25
- 2. **Detect the stack** (package manager, test runner) from the repo.
26
- If a cached pattern exists for a changed file's language — test it with the
27
- deterministic probe `orc pattern status <lang>` (exit 0 = cached; see
28
- `../_shared/detecting-artifacts.md`, never an ad-hoc `find` for
29
- `.claude/orc/patterns/<lang>-pattern.md`) — read its Invariants +
30
- Validation-gate sections and check the diff against them too (an invariant
31
- violation or unmet enforceable gate line is P0). No cached pattern → skip
32
- silently, never codify from here.
33
- 3. **Verify the changes:**
34
- - Run the build if one exists; capture failures.
35
- - Run the tests that cover the changed files (or the full suite if scoping
36
- isn't clean); capture failures.
37
- - Check the diff for obvious breakage: broken imports, references to removed
38
- symbols, unhandled errors introduced, type errors.
39
- - **Adversarial pass (v0.33.0):** attack the diff the way the pipeline's
40
- Phase 6 does — edge cases the change ignores (empty/zero/max, unicode),
41
- error paths (each external call's failure), contract violations (response
42
- shapes/status codes vs consumers), race/ordering on shared state, and
43
- workflow breaks (dead wiring, broken commands). Same evidence rule.
44
- 4. **Classify findings** on the P0–P3 severity ladder (same rule as the full
45
- skill: P0 = failing build/tests, broken references, runtime errors ·
46
- P1 = correctness/security risk · P2 = maintainability · P3 = cosmetic).
47
- P0/P1 mean NOT ready to commit; P2/P3 are advisory. **Evidence-or-advisory
48
- (same rule as the full pipeline):** every P0–P2 finding carries `file:line`
49
- + the offending line(s) quoted VERBATIM from a file read this session; a
50
- finding that can't be anchored is AUTO-P3 and never gates the verdict.
51
- 5. **Show a summary** and STOP. This skill does not fix, stage, or commit.
52
-
53
- ## Output (summary)
54
-
55
- ```
56
- ORC-VERIFY — <n> files changed
57
- Build: <pass/fail/none> Tests: <x/y passing>
58
- P0/P1 (gate — fix before commit):
59
- - <P0|P1> <file:loc> <issue>
60
- P2/P3 (advisory):
61
- - <P2|P3> <file:loc> <issue>
62
- Verdict: <READY / NEEDS FIXES>
63
- ```
64
-
65
- ## Behavior trace (PERMANENT — every ORC entry point traces; always on)
66
-
67
- Standalone verify traces too appended as each event happens, never batched
68
- at the end (a phase ending with
69
- `zero new trace lines is a protocol violation`). Resolve `log_dir`
70
- (`../orc/config.md` default + `.claude/orc.config.yaml`) at start and follow
71
- `../orc/references/trace-protocol.md`: write
72
- `log_dir/.current` = `run-verify-<slug>-<DDMMYY>-<HHMMSS>.txt` and
73
- `touch the trace file` of that name in the SAME step, first. Narration
74
- is dispatched, not remembered: collect `PHASE` lines, `FINDING p0=… p1=… p2=…
75
- p3=…`, `VERDICT pass|fail` and `FINISH` with their REAL timestamps plus
76
- `decisions` (the WHY), dispatch the trace writer ONCE at run end (the
77
- single-dispatch-lane packet), then delete `.current` (the hook bootstraps
78
- `.current` + the skeleton on dispatch regardless).
79
-
80
- ## Boundaries
81
-
82
- - **Read-only.** Never edit, stage, commit, or push. Report only.
83
- - **Independent.** Requires no orchestrator, no run folder, no intent-spec.
84
- - If there are no git changes, say so and stop.
85
- - Reminder: to see usage limits, tell the user to run `/usage` (never invoke it
86
- programmatically).
1
+ ---
2
+ name: orc-verify
3
+ description: >
4
+ Standalone verification for ORC. Use for "verify my changes",
5
+ "/orc-verify", or "check the modified files". Runs INDEPENDENTLY —
6
+ no orchestrator, no planning, no run folder required. Verifies only the
7
+ git-modified changes in the working tree and shows a summary of results. Uses
8
+ Opus 5 medium effort. Read-only: it reports, it does not fix or commit.
9
+ ---
10
+
11
+ # ORC-VERIFY (standalone)
12
+
13
+ A focused, dependency-free verify pass. No intake, no planning, no checkpoint —
14
+ you point it at your uncommitted work and it tells you what's wrong.
15
+
16
+ Run as Opus 5, medium effort.
17
+
18
+ **Worked example** (orient only — never execute from it): `examples/verify-mock.md`.
19
+
20
+ ## Procedure
21
+
22
+ 1. **Gather the change surface** from git: `git diff --name-only` (unstaged +
23
+ staged) and, if useful, `git diff` for the actual hunks. Scope is ONLY the
24
+ modified/added files — do not review the whole repo.
25
+ 2. **Detect the stack** (package manager, test runner) from the repo.
26
+ If a cached pattern exists for a changed file's language — test it with the
27
+ deterministic probe `orc pattern status <lang>` (exit 0 = cached; see
28
+ `../_shared/detecting-artifacts.md`, never an ad-hoc `find` for
29
+ `.claude/orc/patterns/<lang>-pattern.md`) — read its Invariants +
30
+ Validation-gate sections and check the diff against them too (an invariant
31
+ violation or unmet enforceable gate line is P0). No cached pattern → skip
32
+ silently, never codify from here.
33
+ 3. **Verify the changes:**
34
+ - Run the build if one exists; capture failures.
35
+ - Run the tests that cover the changed files (or the full suite if scoping
36
+ isn't clean); capture failures.
37
+ - Check the diff for obvious breakage: broken imports, references to removed
38
+ symbols, unhandled errors introduced, type errors.
39
+ - **Adversarial pass (v0.33.0):** attack the diff the way the pipeline's
40
+ Phase 6 does — edge cases the change ignores (empty/zero/max, unicode),
41
+ error paths (each external call's failure), contract violations (response
42
+ shapes/status codes vs consumers), race/ordering on shared state, and
43
+ workflow breaks (dead wiring, broken commands). Same evidence rule.
44
+ 4. **Classify findings** on the P0–P3 severity ladder (same rule as the full
45
+ skill: P0 = failing build/tests, broken references, runtime errors ·
46
+ P1 = correctness/security risk · P2 = maintainability · P3 = cosmetic).
47
+ P0/P1 mean NOT ready to commit; P2/P3 are advisory. **Evidence-or-advisory
48
+ (same rule as the full pipeline):** every P0–P2 finding carries `file:line`
49
+ + the offending line(s) quoted VERBATIM from a file read this session; a
50
+ finding that can't be anchored is AUTO-P3 and never gates the verdict.
51
+ 5. **Show a summary** and STOP. This skill does not fix, stage, or commit.
52
+
53
+ ## Output (summary)
54
+
55
+ ```
56
+ ORC-VERIFY — <n> files changed
57
+ Build: <pass/fail/none> Tests: <x/y passing>
58
+ P0/P1 (gate — fix before commit):
59
+ - <P0|P1> <file:loc> <issue>
60
+ P2/P3 (advisory):
61
+ - <P2|P3> <file:loc> <issue>
62
+ Verdict: <READY / NEEDS FIXES>
63
+ ```
64
+
65
+ ## Behavior trace (always on)
66
+
67
+ `../_shared/phases/trace.md` (`core`, at run start; `orc lane phases` names
68
+ the file and the layers). Lane token `verify`, tier **Single-dispatch** —
69
+ exactly ONE end-of-run packet, dispatched solo before `.current` is deleted.
70
+ At run start write `log_dir/.current` = `run-verify-<slug>-<DDMMYY>-<HHMMSS>.txt` AND
71
+ `touch the trace file` of that name in the SAME step.
72
+ Nothing else about the protocol is restated here; a phase that ends with
73
+ `zero new trace lines is a protocol violation`.
74
+
75
+ ## Boundaries
76
+
77
+ - **Read-only.** Never edit, stage, commit, or push. Report only.
78
+ - **Independent.** Requires no orchestrator, no run folder, no intent-spec.
79
+ - If there are no git changes, say so and stop.
80
+ - Reminder: to see usage limits, tell the user to run `/usage` (never invoke it
81
+ programmatically).
82
+
83
+ ## Config
84
+
85
+ Resolve with `orc lane config orc-verify --json` and obey `effective`. Never merge
86
+ `.claude/orc.config.yaml` yourself, and never re-derive a precedence. Exit ≠ 0 →
87
+ say so and use `../_shared/config-precedence.md`'s documented defaults, out
88
+ loud. Nothing this lane reads is contested, gated or a stop, so it owes no
89
+ preflight line and has no gate to honour.
90
+
91
+ ## Calls
92
+
93
+ **ONE catalogue, and it is not you:** `orc lane calls orc-verify --json` names every
94
+ CLI call this lane makes, each with its exit-code contract, its cost, when to run
95
+ it, and what an EMPTY answer means. Never invent a spelling, never re-word an
96
+ exit code, and never re-derive a state word — the CLI's state words are the only
97
+ state words, and **an exit code is an ANSWER wherever that contract says so, not
98
+ a failure**. A call the answer does not name is a call this lane does not make.
99
+ Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
100
+ command you are about to run, out loud, before running it.