@azure-id/orc 1.9.1 → 2.0.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 (224) hide show
  1. package/CHANGELOG.md +390 -0
  2. package/README-id.md +20 -36
  3. package/README.md +24 -34
  4. package/bin/build-agents.js +206 -109
  5. package/bin/cli.js +760 -62
  6. package/bin/gotcha-import.js +1081 -0
  7. package/bin/gotcha.js +1286 -0
  8. package/bin/graph-query.js +1 -1
  9. package/bin/graph.js +717 -717
  10. package/bin/habit.js +1453 -0
  11. package/bin/mockrun-catalog.js +281 -276
  12. package/bin/onboarding-content.js +4 -4
  13. package/bin/pricing.json +207 -200
  14. package/bin/run-undo.js +398 -0
  15. package/bin/trace-write.js +657 -0
  16. package/bin/verify-contracts.js +527 -81
  17. package/bin/verify-package.js +58 -11
  18. package/bin/webui/api.js +26 -0
  19. package/bin/webui/app.html +239 -232
  20. package/bin/webui/css/00-tokens.css +110 -92
  21. package/bin/webui/css/04-motion.css +249 -152
  22. package/bin/webui/css/06-responsive.css +203 -178
  23. package/bin/webui/css/panels/behaviour.css +205 -0
  24. package/bin/webui/css/panels/knowledge.css +563 -116
  25. package/bin/webui/fixtures/behaviour.js +532 -0
  26. package/bin/webui/fixtures/extra.js +2036 -2036
  27. package/bin/webui/fixtures/hookui.js +5 -5
  28. package/bin/webui/fixtures/index.js +34 -0
  29. package/bin/webui/fixtures/knowledge.js +7 -1
  30. package/bin/webui/fixtures/settings.js +305 -305
  31. package/bin/webui/fixtures/stats.js +16 -0
  32. package/bin/webui/i18n/en/behaviour.json +143 -0
  33. package/bin/webui/i18n/en/knowledge.json +117 -2
  34. package/bin/webui/i18n/en/nav.json +25 -24
  35. package/bin/webui/i18n/en/tour.json +37 -35
  36. package/bin/webui/i18n/id/behaviour.json +143 -0
  37. package/bin/webui/i18n/id/knowledge.json +117 -2
  38. package/bin/webui/i18n/id/nav.json +25 -24
  39. package/bin/webui/i18n/id/tour.json +37 -35
  40. package/bin/webui/js/01-i18n.js +155 -154
  41. package/bin/webui/js/90-tour.js +498 -494
  42. package/bin/webui/js/91-shortcuts.js +126 -126
  43. package/bin/webui/js/99-boot.js +121 -118
  44. package/bin/webui/js/panels/behaviour.js +1022 -0
  45. package/bin/webui/js/panels/knowledge.js +552 -7
  46. package/bin/webui/js/panels/overview.js +13 -4
  47. package/mock-run/INDEX.md +109 -107
  48. package/mock-run/context-combiner.md +100 -100
  49. package/mock-run/gotcha-import.md +118 -0
  50. package/mock-run/habits.md +129 -0
  51. package/mock-run/orc-budget.md +534 -534
  52. package/mock-run/orc-challenge-council.md +262 -262
  53. package/mock-run/orc-quick.md +6 -1
  54. package/mock-run/orc-ultra.md +103 -103
  55. package/package.json +1 -1
  56. package/templates/agents/MODEL-MAPPING.md +49 -49
  57. package/templates/agents/orc-advisor-opus-5-xhigh.md +50 -56
  58. package/templates/agents/orc-analyze-mini-opus-5-med.md +55 -60
  59. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +55 -58
  60. package/templates/agents/orc-challenge-advisor-opus-5-med.md +75 -75
  61. package/templates/agents/orc-challenge-contrarian-opus-5-high.md +110 -110
  62. package/templates/agents/orc-challenge-executor-opus-5-med.md +114 -114
  63. package/templates/agents/orc-challenge-expansionist-opus-5-med.md +112 -112
  64. package/templates/agents/orc-challenge-judge-opus-5-high.md +132 -132
  65. package/templates/agents/orc-challenge-outsider-opus-5-low.md +109 -109
  66. package/templates/agents/orc-challenge-principles-opus-5-high.md +109 -109
  67. package/templates/agents/orc-challenge-reader-opus-5-low.md +90 -90
  68. package/templates/agents/orc-claude-writer-opus-4-8-high.md +48 -53
  69. package/templates/agents/orc-claude-writer-opus-5-med.md +48 -55
  70. package/templates/agents/orc-context-combiner-opus-5-high.md +78 -88
  71. package/templates/agents/orc-doc-checker-opus-5-low.md +108 -108
  72. package/templates/agents/orc-doc-writer-opus-5-med.md +134 -134
  73. package/templates/agents/orc-executor-haiku-4-5.md +14 -6
  74. package/templates/agents/orc-executor-opus-4-7-high.md +14 -6
  75. package/templates/agents/orc-executor-opus-4-7-med.md +14 -6
  76. package/templates/agents/orc-executor-opus-4-8-high.md +14 -6
  77. package/templates/agents/orc-executor-opus-5-high.md +15 -7
  78. package/templates/agents/orc-executor-opus-5-low.md +15 -7
  79. package/templates/agents/orc-executor-opus-5-med.md +15 -7
  80. package/templates/agents/orc-executor-sonnet-4-6-high.md +14 -6
  81. package/templates/agents/orc-executor-sonnet-4-6-med.md +14 -6
  82. package/templates/agents/orc-executor-sonnet-5-high.md +14 -6
  83. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
  84. package/templates/agents/orc-judge-opus-5-xhigh.md +81 -85
  85. package/templates/agents/orc-learn-writer-opus-5-low.md +67 -73
  86. package/templates/agents/orc-pattern-codifier-opus-5-med.md +58 -65
  87. package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
  88. package/templates/agents/orc-planner-mini-opus-5-med.md +4 -7
  89. package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -3
  90. package/templates/agents/orc-planner-opus-5-med.md +157 -160
  91. package/templates/agents/orc-recon-opus-5-low.md +3 -10
  92. package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
  93. package/templates/agents/orc-retro-opus-5-med.md +8 -10
  94. package/templates/agents/orc-retro-sonnet-5-high.md +6 -7
  95. package/templates/agents/orc-reviewer-opus-5-med.md +96 -60
  96. package/templates/agents/orc-scout-opus-5-low.md +35 -40
  97. package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
  98. package/templates/agents/orc-system-analyst-opus-5-high.md +115 -120
  99. package/templates/agents/orc-test-author-opus-5-med.md +70 -71
  100. package/templates/agents/orc-test-designer-opus-5-high.md +158 -158
  101. package/templates/agents/orc-test-interpreter-opus-5-low.md +130 -130
  102. package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
  103. package/templates/agents/orc-verifier-opus-5-med.md +77 -69
  104. package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +74 -79
  105. package/templates/agents/orc-wiki-scanner-opus-5-med.md +74 -81
  106. package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +97 -106
  107. package/templates/commands/orc-analyze.md +13 -21
  108. package/templates/commands/orc-fast.md +10 -15
  109. package/templates/commands/orc-poly.md +12 -21
  110. package/templates/commands/orc-pr-driver.md +11 -30
  111. package/templates/commands/orc-pr-setup.md +10 -31
  112. package/templates/commands/orc-route.md +11 -41
  113. package/templates/commands/orc-test.md +5 -60
  114. package/templates/commands/orc-ultra.md +17 -17
  115. package/templates/commands/orc-verify.md +11 -11
  116. package/templates/hooks/README.md +36 -2
  117. package/templates/hooks/orc-effort-guard.js +178 -178
  118. package/templates/hooks/orc-session-hook.js +264 -0
  119. package/templates/hooks/orc-statusline.js +9 -7
  120. package/templates/skills/_shared/README.md +9 -0
  121. package/templates/skills/_shared/code-graph.md +48 -56
  122. package/templates/skills/_shared/config-precedence.md +200 -198
  123. package/templates/skills/_shared/extra-dispatch.md +1331 -1346
  124. package/templates/skills/_shared/gotchas.md +228 -177
  125. package/templates/skills/_shared/habits.md +101 -0
  126. package/templates/skills/_shared/lane-contract.md +84 -0
  127. package/templates/skills/_shared/opus5-only.md +8 -8
  128. package/templates/skills/_shared/phases/README.md +142 -83
  129. package/templates/skills/_shared/phases/analyst-gates.md +125 -136
  130. package/templates/skills/_shared/phases/execution.md +8 -14
  131. package/templates/skills/_shared/phases/house-rules.md +27 -32
  132. package/templates/skills/_shared/phases/intake.md +127 -133
  133. package/templates/skills/_shared/phases/mock-example.md +46 -56
  134. package/templates/skills/_shared/phases/plan-handoff.md +91 -97
  135. package/templates/skills/_shared/phases/planning.md +7 -17
  136. package/templates/skills/_shared/phases/preflight.md +19 -42
  137. package/templates/skills/_shared/phases/review.md +23 -27
  138. package/templates/skills/_shared/phases/rules.md +18 -42
  139. package/templates/skills/_shared/phases/scoring.md +55 -65
  140. package/templates/skills/_shared/phases/security-checklist.md +46 -50
  141. package/templates/skills/_shared/phases/security.md +45 -55
  142. package/templates/skills/_shared/phases/ship.md +6 -15
  143. package/templates/skills/_shared/phases/stop-resume.md +2 -5
  144. package/templates/skills/_shared/phases/summary.md +73 -48
  145. package/templates/skills/_shared/phases/testgen.md +41 -51
  146. package/templates/skills/_shared/phases/trace-verbs.md +433 -0
  147. package/templates/skills/_shared/phases/trace.md +136 -367
  148. package/templates/skills/_shared/phases/verify.md +62 -70
  149. package/templates/skills/_shared/phases/wave-grouping.md +128 -133
  150. package/templates/skills/_shared/phases/wiki-consult.md +10 -6
  151. package/templates/skills/_shared/read-ladder.md +2 -55
  152. package/templates/skills/_shared/return-validation.md +17 -70
  153. package/templates/skills/_shared/review-slice.md +79 -0
  154. package/templates/skills/_shared/smoke-gate.md +46 -28
  155. package/templates/skills/context-combiner/SKILL.md +16 -45
  156. package/templates/skills/context-combiner/schemas/combined-report.md +78 -78
  157. package/templates/skills/orc/README.md +2 -2
  158. package/templates/skills/orc/SKILL.md +41 -69
  159. package/templates/skills/orc/config.md +9 -9
  160. package/templates/skills/orc/examples/full-run-mock.md +73 -73
  161. package/templates/skills/orc/references/effort-and-mode.md +222 -222
  162. package/templates/skills/orc/references/pattern-gate.md +89 -89
  163. package/templates/skills/orc/references/phases/intake.md +41 -47
  164. package/templates/skills/orc/references/phases/integration.md +13 -19
  165. package/templates/skills/orc/references/preflight-report.md +10 -11
  166. package/templates/skills/orc/references/ultra-mode.md +11 -9
  167. package/templates/skills/orc/subskills/orc-execution/SKILL.md +27 -73
  168. package/templates/skills/orc/subskills/orc-execution/core.md +12 -99
  169. package/templates/skills/orc/subskills/orc-execution/subagent.md +14 -13
  170. package/templates/skills/orc/subskills/orc-planner/SKILL.md +2 -2
  171. package/templates/skills/orc/subskills/orc-planner-mini/SKILL.md +121 -121
  172. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +35 -76
  173. package/templates/skills/orc/subskills/orc-review-verify/core.md +52 -135
  174. package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -7
  175. package/templates/skills/orc/subskills/orc-testgen/SKILL.md +34 -45
  176. package/templates/skills/orc/subskills/orc-testgen/core.md +20 -59
  177. package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -7
  178. package/templates/skills/orc-advisor/SKILL.md +56 -60
  179. package/templates/skills/orc-analyze/SKILL.md +32 -68
  180. package/templates/skills/orc-analyze/examples/analyze-mock.md +42 -42
  181. package/templates/skills/orc-analyze/schemas/report-audit.md +84 -83
  182. package/templates/skills/orc-analyze/schemas/report-prose.md +64 -63
  183. package/templates/skills/orc-analyze/schemas/report-requirement.md +78 -78
  184. package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
  185. package/templates/skills/orc-challenge/README.md +142 -142
  186. package/templates/skills/orc-challenge/examples/council-full-roster.md +273 -273
  187. package/templates/skills/orc-challenge/references/council.md +315 -315
  188. package/templates/skills/orc-challenge/references/intake.md +171 -171
  189. package/templates/skills/orc-claude/SKILL.md +14 -14
  190. package/templates/skills/orc-diy/README.md +174 -143
  191. package/templates/skills/orc-diy/SKILL.md +23 -74
  192. package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
  193. package/templates/skills/orc-diy/references/flow-schema.md +1 -1
  194. package/templates/skills/orc-doc/README.md +229 -229
  195. package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +325 -325
  196. package/templates/skills/orc-doc/references/chunking.md +527 -527
  197. package/templates/skills/orc-fast/SKILL.md +45 -73
  198. package/templates/skills/orc-judge/SKILL.md +77 -82
  199. package/templates/skills/orc-learn/SKILL.md +14 -14
  200. package/templates/skills/orc-learn/examples/learn-run-mock.md +61 -61
  201. package/templates/skills/orc-mini/SKILL.md +65 -113
  202. package/templates/skills/orc-pattern/SKILL.md +27 -48
  203. package/templates/skills/orc-poly/SKILL.md +32 -61
  204. package/templates/skills/orc-pr-driver/SKILL.md +25 -51
  205. package/templates/skills/orc-pr-driver/references/green-gate.md +113 -105
  206. package/templates/skills/orc-pr-setup/SKILL.md +20 -45
  207. package/templates/skills/orc-quick/README.md +43 -2
  208. package/templates/skills/orc-quick/SKILL.md +76 -107
  209. package/templates/skills/orc-quick/references/dispatch-gate.md +16 -5
  210. package/templates/skills/orc-quick/references/gh-mode.md +48 -1
  211. package/templates/skills/orc-quick/references/look.md +3 -1
  212. package/templates/skills/orc-retro/SKILL.md +19 -18
  213. package/templates/skills/orc-retro/examples/retro-mock.md +1 -1
  214. package/templates/skills/orc-route/SKILL.md +25 -45
  215. package/templates/skills/orc-test/SKILL.md +16 -37
  216. package/templates/skills/orc-verify/SKILL.md +21 -39
  217. package/templates/skills/orc-verify/examples/verify-mock.md +33 -33
  218. package/templates/skills/orc-wait/SKILL.md +156 -163
  219. package/templates/skills/orc-wiki/references/extra.md +1 -1
  220. package/templates/skills/orc-wiki/references/phases/phase-0.md +1 -6
  221. package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
  222. package/templates/skills/orc-wiki/references/phases/phase-2.md +1 -6
  223. package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
  224. package/templates/skills/orc-wiki/references/phases/phase-3c.md +1 -6
@@ -1,143 +1,174 @@
1
- # ORC-DIY — Build your own ORC flow
2
-
3
- > This guide is intentionally separate from the main project README. The root
4
- > README covers installing and using the shipped lanes; **everything about
5
- > composing your own lane lives here.**
6
-
7
- ORC-DIY lets you assemble a custom orchestrator pipeline from ORC's real
8
- parts — keep the phases you want, drop the ones you don't, pick the session
9
- tier, and decide how autonomous the run is. The shape is chosen entirely in
10
- your **terminal** (deterministic, zero model tokens); Claude only ever runs
11
- the flow you compiled.
12
-
13
- ```
14
- orc diy init → orc diy set … (repeat) → orc diy compile → /orc-diy <request>
15
- (config created) (shape your flow) (build the flow) (run it)
16
- ```
17
-
18
- ## 1. Bootstrap
19
-
20
- **Easiest path — the interactive composer.** Run bare `orc diy` in a real
21
- terminal: it creates the flow if none exists (pick full-lane defaults or a
22
- preset from a numbered list), then lets you shape every key with numbered
23
- pick-lists, shows the live gate status and validation issues as you go, and
24
- offers to compile on exit. Everything below is the same thing, non-interactive:
25
-
26
- ```bash
27
- orc diy # interactive composer (create + shape + compile)
28
- orc diy init # scriptable: create the default config (full-lane shape)
29
- orc diy init --preset lean # or start from a preset: lean | paranoid | solo-fast
30
- ```
31
-
32
- This writes three project-scoped files (there is no global variant — `orc
33
- diy` rejects `--global`; one flow per project):
34
-
35
- | File | What it is | Who writes it |
36
- |---|---|---|
37
- | `.claude/orc-diy.config.yaml` | your flow choices | the CLI only |
38
- | `.claude/orc/diy/flow.md` | human-readable flow spec (regenerated on every change) | the CLI only |
39
- | `.claude/orc/diy/flow.lock.json` | hashes + compile stamp — the gate's state | the CLI only |
40
-
41
- ## 2. Shape the flow
42
-
43
- ```bash
44
- orc diy show # current flow + gate status (READY / STALE / UNCONFIGURED)
45
- orc diy set review blocking-only
46
- orc diy set verify smoke
47
- orc diy set scoring off
48
- orc diy set fixed_executor orc-executor-sonnet-5-high
49
- orc diy set session_tier opus-4-7-med
50
- orc diy set autonomy semi
51
- orc diy validate # re-check cross-key rules any time
52
- ```
53
-
54
- **`opus5_only` does not reach this lane.** That config forces every other
55
- lane's roles to Opus 5, but a DIY flow's executors come from `flow.lock.json`,
56
- which only `orc diy compile` writes. To run this lane on Opus 5, set
57
- `fixed_executor`/`session_tier` here and re-compile.
58
-
59
- The full key table lives in `references/flow-schema.md`. Highlights:
60
-
61
- - **Phases** — `analyze`, `review`, `security`, `verify`, `testgen`,
62
- `summary`, `wiki_gate`: each phase has off/on/strictness values. Order is
63
- fixed; you choose presence and strictness.
64
- - **Scoring** — `scoring on` keeps the per-task rubric; `scoring off` skips
65
- it and sends every task to your `fixed_executor`.
66
- - **Session tier** — `session_tier` is the model+effort the compiled flow
67
- requires. DIY is SEPARATE from the baseline /orc rule — pick any tier from the
68
- full grid: `sonnet-4-6-{med,high}`, `opus-4-7-{med,high}`,
69
- `opus-4-8-{med,high,xhigh,max}`, `opus-5-{med,high,xhigh,max}`,
70
- `fable-5-{med,high,xhigh,max}` (default
71
- `opus-5-high` — D29 moved it there at v1.0.0 so the wizard's own default
72
- does not clip the two Opus 5 bands the score table ships). The effort guard enforces the effort half deterministically
73
- (the compiled effort OR higher on the ladder); the statusline warns on the
74
- model half. Executor choices above the tier are rejected at validate time; the
75
- score table is clipped to the tier at compile time.
76
- - **Autonomy** — `interactive` (all asks), `semi` (routine asks
77
- auto-accepted), `hands-off` (only hard stops + ship). Locked safety rules
78
- are never overridden — see `references/locked-blocks.md` for what you can
79
- NEVER configure away.
80
- - **Ship** — `ship_mode`: `ask`, `commit`, `pr`, or `report-only`.
81
-
82
- ## 3. Compile
83
-
84
- ```bash
85
- orc diy compile # deterministic stitch — no model, no tokens
86
- ```
87
-
88
- The compiler validates, cherry-picks the needed references from your
89
- installed orc skill, stitches `.claude/orc/diy/FLOW-COMPILED.md`, and stamps
90
- `flow.lock.json`. Details: `references/compile.md`.
91
-
92
- **Every change requires a recompile.** The gate flips to STALE whenever:
93
- - you change any key (`orc diy set` …),
94
- - you update orc (`orc update` / `orc upgrade`),
95
- - the compiled file is edited or deleted.
96
-
97
- `/orc-diy` will not run a stale flow — it names the reason, tells you to run
98
- `orc diy compile`, and offers the regular `/orc` lane for the request at
99
- hand. `/orc-diy compile` in a session just runs the same CLI compiler.
100
-
101
- ## 4. Run
102
-
103
- ```
104
- /orc-diy implement the CSV export endpoint
105
- ```
106
-
107
- The stub skill checks the gate, then follows your compiled flow: same run
108
- folders, checkpoints, subagents, and evidence rules as the full lane — minus
109
- the phases you removed, plus the strictness you chose.
110
-
111
- ## Presets
112
-
113
- | Preset | Shape |
114
- |---|---|
115
- | `lean` | analyze off, review blocking-only, verify smoke, summary short |
116
- | `paranoid` | analyze full, security always, testgen on, verify full |
117
- | `solo-fast` | scoring off → one Sonnet 5 high executor, review off, verify smoke, autonomy semi |
118
-
119
- Presets are just config bundles — inspect with `orc diy show`, tweak with
120
- `set`, and compile like any other flow.
121
-
122
- ## Command reference
123
-
124
- ```
125
- orc diy INTERACTIVE composer (create/shape/compile in one menu)
126
- orc diy init [--preset <name>] [--force] create (or overwrite) the config
127
- orc diy show flow table + gate status
128
- orc diy status [--json] gate status only (used by the skill/hooks)
129
- orc diy set <key> <value> change one key (invalidates the compile)
130
- orc diy validate run cross-key validation
131
- orc diy compile build FLOW-COMPILED.md + stamp the lock
132
- orc diy reset delete config, flow, lock, and compiled file
133
- ```
134
-
135
- ## Boundaries (read before getting creative)
136
-
137
- - The CLI is the only writer. Never hand-edit the config, the lock, or the
138
- compiled flow — and never ask Claude to; the skill refuses by contract.
139
- - `references/locked-blocks.md` is compiled into every flow verbatim: the
140
- orchestrator never implements, checkpoint discipline, wave conflict rules,
141
- the severity ladder, and red-build ship blocking are not yours to remove.
142
- - orc-diy needs the orc skill installed next to it (it cherry-picks by
143
- reference); `orc init` installs both.
1
+ # ORC-DIY — Build your own ORC flow
2
+
3
+ > This guide is intentionally separate from the main project README. The root
4
+ > README covers installing and using the shipped lanes; **everything about
5
+ > composing your own lane lives here.**
6
+
7
+ ORC-DIY lets you assemble a custom orchestrator pipeline from ORC's real
8
+ parts — keep the phases you want, drop the ones you don't, pick the session
9
+ tier, and decide how autonomous the run is. The shape is chosen entirely in
10
+ your **terminal** (deterministic, zero model tokens); Claude only ever runs
11
+ the flow you compiled.
12
+
13
+ ```
14
+ orc diy init → orc diy set … (repeat) → orc diy compile → /orc-diy <request>
15
+ (config created) (shape your flow) (build the flow) (run it)
16
+ ```
17
+
18
+ ## 1. Bootstrap
19
+
20
+ **Easiest path — the interactive composer.** Run bare `orc diy` in a real
21
+ terminal: it creates the flow if none exists (pick full-lane defaults or a
22
+ preset from a numbered list), then lets you shape every key with numbered
23
+ pick-lists, shows the live gate status and validation issues as you go, and
24
+ offers to compile on exit. Everything below is the same thing, non-interactive:
25
+
26
+ ```bash
27
+ orc diy # interactive composer (create + shape + compile)
28
+ orc diy init # scriptable: create the default config (full-lane shape)
29
+ orc diy init --preset lean # or start from a preset: lean | paranoid | solo-fast
30
+ ```
31
+
32
+ This writes three project-scoped files (there is no global variant — `orc
33
+ diy` rejects `--global`; one flow per project):
34
+
35
+ | File | What it is | Who writes it |
36
+ |---|---|---|
37
+ | `.claude/orc-diy.config.yaml` | your flow choices | the CLI only |
38
+ | `.claude/orc/diy/flow.md` | human-readable flow spec (regenerated on every change) | the CLI only |
39
+ | `.claude/orc/diy/flow.lock.json` | hashes + compile stamp — the gate's state | the CLI only |
40
+
41
+ ## 2. Shape the flow
42
+
43
+ ```bash
44
+ orc diy show # current flow + gate status (READY / STALE / UNCONFIGURED)
45
+ orc diy set review blocking-only
46
+ orc diy set verify smoke
47
+ orc diy set scoring off
48
+ orc diy set fixed_executor orc-executor-sonnet-5-high
49
+ orc diy set session_tier opus-4-7-med
50
+ orc diy set autonomy semi
51
+ orc diy validate # re-check cross-key rules any time
52
+ ```
53
+
54
+ **`opus5_only` does not reach this lane.** That config forces every other
55
+ lane's roles to Opus 5.5, but a DIY flow's executors come from `flow.lock.json`,
56
+ which only `orc diy compile` writes. To run this lane on Opus 5.5, set
57
+ `fixed_executor`/`session_tier` here and re-compile.
58
+
59
+ The full key table lives in `references/flow-schema.md`. Highlights:
60
+
61
+ - **Phases** — `analyze`, `review`, `security`, `verify`, `testgen`,
62
+ `summary`, `wiki_gate`: each phase has off/on/strictness values. Order is
63
+ fixed; you choose presence and strictness.
64
+ - **Scoring** — `scoring on` keeps the per-task rubric; `scoring off` skips
65
+ it and sends every task to your `fixed_executor`.
66
+ - **Session tier** — `session_tier` is the model+effort the compiled flow
67
+ requires. DIY is SEPARATE from the baseline /orc rule — pick any tier from the
68
+ full grid: `sonnet-4-6-{med,high}`, `opus-4-7-{med,high}`,
69
+ `opus-4-8-{med,high,xhigh,max}`, `opus-5-{med,high,xhigh,max}`,
70
+ `fable-5-{med,high,xhigh,max}` (default
71
+ `opus-5-high` — D29 moved it there at v1.0.0 so the wizard's own default
72
+ does not clip the two Opus 5.5 bands the score table ships). The effort guard enforces the effort half deterministically
73
+ (the compiled effort OR higher on the ladder); the statusline warns on the
74
+ model half. Executor choices above the tier are rejected at validate time; the
75
+ score table is clipped to the tier at compile time.
76
+ - **Autonomy** — `interactive` (all asks), `semi` (routine asks
77
+ auto-accepted), `hands-off` (only hard stops + ship). Locked safety rules
78
+ are never overridden — see `references/locked-blocks.md` for what you can
79
+ NEVER configure away.
80
+ - **Ship** — `ship_mode`: `ask`, `commit`, `pr`, or `report-only`.
81
+
82
+ ## 3. Compile
83
+
84
+ ```bash
85
+ orc diy compile # deterministic stitch — no model, no tokens
86
+ ```
87
+
88
+ The compiler validates, cherry-picks the needed references from your
89
+ installed orc skill, stitches `.claude/orc/diy/FLOW-COMPILED.md`, and stamps
90
+ `flow.lock.json`. Details: `references/compile.md`.
91
+
92
+ **Every change requires a recompile.** The gate flips to STALE whenever:
93
+ - you change any key (`orc diy set` …),
94
+ - you update orc (`orc update` / `orc upgrade`),
95
+ - the compiled file is edited or deleted.
96
+
97
+ `/orc-diy` will not run a stale flow — it names the reason, tells you to run
98
+ `orc diy compile`, and offers the regular `/orc` lane for the request at
99
+ hand. `/orc-diy compile` in a session just runs the same CLI compiler.
100
+
101
+ ### Where the compiled flow comes from (maintainer view)
102
+
103
+ You never read these; `orc diy compile` does, once, and stitches the result
104
+ into `FLOW-COMPILED.md`. The table is here so a maintainer can see the
105
+ provenance of a compiled phase without reading the compiler — `orc lane phases
106
+ orc-diy --json` is the authoritative version and marks every row below
107
+ `when: compile-time`.
108
+
109
+ Eleven phases come from the shared library, as that file's `composed` LAYER —
110
+ NOT its `full` layer, which is `/orc`'s procedure for the same phase:
111
+ `../_shared/phases/trace.md` · `../_shared/phases/planning.md` ·
112
+ `../_shared/phases/scoring.md` · `../_shared/phases/execution.md` ·
113
+ `../_shared/phases/review.md` · `../_shared/phases/security.md` ·
114
+ `../_shared/phases/verify.md` · `../_shared/phases/testgen.md` ·
115
+ `../_shared/phases/mock-example.md` · `../_shared/phases/ship.md` ·
116
+ `../_shared/phases/summary.md`.
117
+
118
+ Five have no counterpart anywhere else in the payload and stay this lane's own:
119
+ `references/blocks/header.md` (the tier self-gate), `wiki.md`, `analyze.md`,
120
+ `pattern.md` and `extra.md`. They are composition prose about a decision only a
121
+ composed flow makes, so there is nothing to share them WITH.
122
+
123
+ Four more are pointed at from inside those stitched layers rather than stitched
124
+ themselves: `../_shared/phases/intake.md`,
125
+ `../_shared/phases/wave-grouping.md`,
126
+ `../_shared/phases/security-checklist.md` and
127
+ `../_shared/phases/stop-resume.md`.
128
+
129
+ The stitch ORDER is the compiler's `order` array and is documented in
130
+ `references/compile.md`; a golden test holds the three lists together.
131
+
132
+ ## 4. Run
133
+
134
+ ```
135
+ /orc-diy implement the CSV export endpoint
136
+ ```
137
+
138
+ The stub skill checks the gate, then follows your compiled flow: same run
139
+ folders, checkpoints, subagents, and evidence rules as the full lane — minus
140
+ the phases you removed, plus the strictness you chose.
141
+
142
+ ## Presets
143
+
144
+ | Preset | Shape |
145
+ |---|---|
146
+ | `lean` | analyze off, review blocking-only, verify smoke, summary short |
147
+ | `paranoid` | analyze full, security always, testgen on, verify full |
148
+ | `solo-fast` | scoring off → one Sonnet 5 high executor, review off, verify smoke, autonomy semi |
149
+
150
+ Presets are just config bundles — inspect with `orc diy show`, tweak with
151
+ `set`, and compile like any other flow.
152
+
153
+ ## Command reference
154
+
155
+ ```
156
+ orc diy INTERACTIVE composer (create/shape/compile in one menu)
157
+ orc diy init [--preset <name>] [--force] create (or overwrite) the config
158
+ orc diy show flow table + gate status
159
+ orc diy status [--json] gate status only (used by the skill/hooks)
160
+ orc diy set <key> <value> change one key (invalidates the compile)
161
+ orc diy validate run cross-key validation
162
+ orc diy compile build FLOW-COMPILED.md + stamp the lock
163
+ orc diy reset delete config, flow, lock, and compiled file
164
+ ```
165
+
166
+ ## Boundaries (read before getting creative)
167
+
168
+ - The CLI is the only writer. Never hand-edit the config, the lock, or the
169
+ compiled flow — and never ask Claude to; the skill refuses by contract.
170
+ - `references/locked-blocks.md` is compiled into every flow verbatim: the
171
+ orchestrator never implements, checkpoint discipline, wave conflict rules,
172
+ the severity ladder, and red-build ship blocking are not yours to remove.
173
+ - orc-diy needs the orc skill installed next to it (it cherry-picks by
174
+ reference); `orc init` installs both.
@@ -1,14 +1,12 @@
1
1
  ---
2
2
  name: orc-diy
3
3
  description: >
4
- User-composable ORC lane. Use for "/orc-diy" or "run my custom orc flow".
5
- The pipeline shape (analyze/review/verify/security/testgen on-off, scoring
6
- or a fixed executor, autonomy, ship mode, session tier) is configured
7
- ENTIRELY through the `orc diy` CLI and compiled into a flow file —
8
- never configured in-session. HARD-GATED: no config or a stale compile →
9
- this skill never runs the custom flow; it explains the CLI steps and offers
10
- plain /orc instead. "/orc-diy compile" re-runs the deterministic CLI
11
- compiler. See references/flow-schema.md and references/compile.md.
4
+ User-composable ORC lane. Use for "/orc-diy" or "run my custom orc flow". The
5
+ pipeline shape is configured ENTIRELY through the `orc diy` CLI and compiled
6
+ into a flow file — never configured in-session. HARD-GATED: no config or a
7
+ stale compile → this skill never runs the custom flow; it explains the CLI
8
+ steps and offers plain /orc instead. "/orc-diy compile" re-runs the
9
+ deterministic CLI compiler.
12
10
  ---
13
11
 
14
12
  # ORC-DIY (stub — gate + dispatcher)
@@ -59,65 +57,23 @@ as it says. Do not consult this stub again for the rest of the run, and do
59
57
  not load orc's SKILL.md as a spine (the compiled flow already references the
60
58
  exact orc subskills and schemas it needs).
61
59
 
62
- ## Where the compiled flow comes from
63
-
64
- You never read these; `orc diy compile` does, once, and stitches the result
65
- into `FLOW-COMPILED.md`. The table is here so a maintainer can see the
66
- provenance of a compiled phase without reading the compiler — `orc lane phases
67
- orc-diy --json` is the authoritative version and marks every row below
68
- `when: compile-time`.
69
-
70
- Eleven phases come from the shared library, as that file's `composed` LAYER —
71
- NOT its `full` layer, which is `/orc`'s procedure for the same phase:
72
- `../_shared/phases/trace.md` · `../_shared/phases/planning.md` ·
73
- `../_shared/phases/scoring.md` · `../_shared/phases/execution.md` ·
74
- `../_shared/phases/review.md` · `../_shared/phases/security.md` ·
75
- `../_shared/phases/verify.md` · `../_shared/phases/testgen.md` ·
76
- `../_shared/phases/mock-example.md` · `../_shared/phases/ship.md` ·
77
- `../_shared/phases/summary.md`.
78
-
79
- Five have no counterpart anywhere else in the payload and stay this lane's own:
80
- `references/blocks/header.md` (the tier self-gate), `wiki.md`, `analyze.md`,
81
- `pattern.md` and `extra.md`. They are composition prose about a decision only a
82
- composed flow makes, so there is nothing to share them WITH.
83
-
84
- Four more are pointed at from inside those stitched layers rather than stitched
85
- themselves: `../_shared/phases/intake.md`,
86
- `../_shared/phases/wave-grouping.md`,
87
- `../_shared/phases/security-checklist.md` and
88
- `../_shared/phases/stop-resume.md`.
89
-
90
- The stitch ORDER is the compiler's `order` array and is documented in
91
- `references/compile.md`; a golden test holds the three lists together.
92
-
93
-
94
- ## Config
95
-
96
- **ONE resolver, and it is not you:** `orc lane config orc-diy --json`. Obey
97
- `effective`, print every line in `announce[]` VERBATIM at preflight, and honour
98
- `stops[]` before wave 1. Never re-derive a value, a precedence or an inertness
99
- from `.claude/orc.config.yaml` — a key this lane does not read is not in the
100
- answer, and a key another key shadows comes back already marked. Exit ≠ 0 → say
101
- the CLI is unavailable and fall back to `../_shared/config-precedence.md`'s
102
- documented defaults, out loud. Priorities and families:
103
- `../_shared/config-precedence.md`.
60
+ ## Lane contract (`../_shared/lane-contract.md` — read it ONLY when a call exits ≠ 0)
61
+
62
+ - **Calls:** `orc lane calls orc-diy --json` names every call and its exit codes.
63
+ **An exit code is an ANSWER where it says so, not a failure.** Make no other call.
64
+ - **Config:** `orc lane config orc-diy --json`. Obey `effective`, print every line
65
+ in `announce[]` VERBATIM at preflight, and honour `stops[]` before wave 1.
66
+ Never merge `.claude/orc.config.yaml` yourself (`../_shared/config-precedence.md`).
67
+ - **Habits:** `habits{}` in the config answer → read `../_shared/habits.md`. No
68
+ `habits{}` → ignore every `(H …)` mark.
69
+ - **Rules:** `orc rules slice --lane orc-diy --json` is the ONLY assembler
70
+ (`../_shared/phases/rules.md`). Its `line` prints VERBATIM at preflight.
104
71
 
105
72
  The flow SHAPE is not in that answer: it is compile-owned and lives in
106
73
  `flow.lock.json`. The resolver answers for everything else this lane still
107
74
  reads, and `extra` is the same split — the flow decides WHETHER, the resolver
108
75
  still decides WHERE.
109
76
 
110
- ## Calls
111
-
112
- **ONE catalogue, and it is not you:** `orc lane calls orc-diy --json` names every
113
- CLI call this lane makes, each with its exit-code contract, its cost, when to run
114
- it, and what an EMPTY answer means. Never invent a spelling, never re-word an
115
- exit code, and never re-derive a state word — the CLI's state words are the only
116
- state words, and **an exit code is an ANSWER wherever that contract says so, not
117
- a failure**. A call the answer does not name is a call this lane does not make.
118
- Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
119
- command you are about to run, out loud, before running it.
120
-
121
77
  ## Hard rules
122
78
 
123
79
  1. The compiled flow is a build artifact — NEVER edit
@@ -126,16 +82,9 @@ command you are about to run, out loud, before running it.
126
82
  `orc diy set` + `orc diy compile`, both run by the user.
127
83
  2. Fail closed: any gate ambiguity = STALE, with the reason shown.
128
84
  3. The fallback ask is ONE question with two outcomes (`/orc` or stop) —
129
- never a menu, never a silent fallback.
130
-
131
- ## Rules — the anti-slop card (`../_shared/phases/rules.md`)
132
-
133
- `orc rules slice --lane orc-diy --json` is the ONLY assembler; never build
134
- the card here. It rides under the house rules and above the task —
135
- **house rules > your project's rules > ORC's own packs** — and its `line` prints
136
- VERBATIM at preflight. Returns gain `rules_applied[]`, `rules_conflicts[]` (a gap,
137
- never a silent choice) and `rules_overridden[]`.
138
- ## Waiting mid-run (`/orc-wait`)
139
-
140
- Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
141
- Checkpoint **full** · safe point **compiled phase edge**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
85
+ never a menu, never a silent fallback.
86
+
87
+ ## Waiting mid-run (`/orc-wait`)
88
+
89
+ Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
90
+ Checkpoint **full** · safe point **compiled phase edge**.
@@ -1,18 +1,18 @@
1
- ## Phase: Code-pattern findings
2
-
3
- <!-- diy:when pattern=off -->
4
- Code-pattern codification is OFF: executors run language-agnostic (security/
5
- correctness invariants still enforced; conventions imitate neighbor files).
6
- Never prompt about patterns. A cached pattern under `.claude/orc/patterns/`
7
- is still injected if present — cache hits are always silent.
8
- <!-- /diy:when -->
9
- <!-- diy:when pattern=ask -->
10
- On an FE/BE pattern-cache miss at dispatch time, ask the user once: learn the
11
- house style via the `.claude/skills/orc-pattern/SKILL.md` flow, or proceed
12
- language-agnostic. Cache hits are used silently.
13
- <!-- /diy:when -->
14
- <!-- diy:when pattern=on -->
15
- On an FE/BE pattern-cache miss at dispatch time, auto-codify without asking:
16
- run the `.claude/skills/orc-pattern/SKILL.md` flow, then inject the cached
17
- pattern literally into executor slices. Cache hits are used silently.
18
- <!-- /diy:when -->
1
+ ## Phase: Code-pattern findings
2
+
3
+ <!-- diy:when pattern=off -->
4
+ Code-pattern codification is OFF: executors run language-agnostic (security/
5
+ correctness invariants still enforced; conventions imitate neighbor files).
6
+ Never prompt about patterns. A cached pattern under `.claude/orc/patterns/`
7
+ is still injected if present — cache hits are always silent.
8
+ <!-- /diy:when -->
9
+ <!-- diy:when pattern=ask -->
10
+ On an FE/BE pattern-cache miss at dispatch time, ask the user once (H `orc.phase-3.pattern`): learn the
11
+ house style via the `.claude/skills/orc-pattern/SKILL.md` flow, or proceed
12
+ language-agnostic. Cache hits are used silently.
13
+ <!-- /diy:when -->
14
+ <!-- diy:when pattern=on -->
15
+ On an FE/BE pattern-cache miss at dispatch time, auto-codify without asking:
16
+ run the `.claude/skills/orc-pattern/SKILL.md` flow, then inject the cached
17
+ pattern literally into executor slices. Cache hits are used silently.
18
+ <!-- /diy:when -->
@@ -60,7 +60,7 @@ Warnings (written, reported):
60
60
  - `autonomy: hands-off` with `ship_mode: commit` or `pr` (fully unattended
61
61
  git actions).
62
62
  - `session_tier` below `opus-5-med` with `review`/`verify` on: the pinned
63
- Opus 5 reviewer/verifier agents will silently run at the session's model —
63
+ Opus 5.5 reviewer/verifier agents will silently run at the session's model —
64
64
  the flow still works, honesty-checked by the tier-honesty locked rule.
65
65
 
66
66
  ## `flow.lock.json` (machine state — written by the CLI only)