@azure-id/orc 0.55.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 (449) hide show
  1. package/CHANGELOG.md +2017 -0
  2. package/README-id.md +521 -0
  3. package/README.md +485 -0
  4. package/bin/build-agents.js +86 -0
  5. package/bin/cli.js +29050 -0
  6. package/bin/mockrun-catalog.js +267 -0
  7. package/bin/onboarding-content.js +172 -0
  8. package/bin/pricing.json +200 -0
  9. package/bin/providers.json +437 -0
  10. package/bin/ui.js +95 -0
  11. package/bin/verify-contracts.js +3277 -0
  12. package/bin/verify-package.js +498 -0
  13. package/bin/webui/api.js +1163 -0
  14. package/bin/webui/app.html +198 -0
  15. package/bin/webui/css/00-tokens.css +92 -0
  16. package/bin/webui/css/01-base.css +42 -0
  17. package/bin/webui/css/02-shell.css +103 -0
  18. package/bin/webui/css/03-components.css +462 -0
  19. package/bin/webui/css/04-motion.css +91 -0
  20. package/bin/webui/css/05-tour.css +100 -0
  21. package/bin/webui/css/06-responsive.css +108 -0
  22. package/bin/webui/css/panels/boundary.css +26 -0
  23. package/bin/webui/css/panels/challenge.css +151 -0
  24. package/bin/webui/css/panels/crosslink.css +194 -0
  25. package/bin/webui/css/panels/docs.css +254 -0
  26. package/bin/webui/css/panels/experiment.css +23 -0
  27. package/bin/webui/css/panels/extra.css +536 -0
  28. package/bin/webui/css/panels/flow.css +177 -0
  29. package/bin/webui/css/panels/handoff.css +67 -0
  30. package/bin/webui/css/panels/knowledge.css +86 -0
  31. package/bin/webui/css/panels/learn.css +154 -0
  32. package/bin/webui/css/panels/maintenance.css +55 -0
  33. package/bin/webui/css/panels/mockrun.css +268 -0
  34. package/bin/webui/css/panels/overview.css +100 -0
  35. package/bin/webui/css/panels/pact.css +43 -0
  36. package/bin/webui/css/panels/runs.css +105 -0
  37. package/bin/webui/css/panels/settings.css +227 -0
  38. package/bin/webui/css/panels/stats.css +87 -0
  39. package/bin/webui/fixtures/boundary.js +92 -0
  40. package/bin/webui/fixtures/challenge.js +825 -0
  41. package/bin/webui/fixtures/crosslink.js +31 -0
  42. package/bin/webui/fixtures/docs.js +982 -0
  43. package/bin/webui/fixtures/extra.js +1934 -0
  44. package/bin/webui/fixtures/flow.js +81 -0
  45. package/bin/webui/fixtures/handoff.js +35 -0
  46. package/bin/webui/fixtures/index.js +486 -0
  47. package/bin/webui/fixtures/knowledge.js +291 -0
  48. package/bin/webui/fixtures/maintenance.js +42 -0
  49. package/bin/webui/fixtures/mockrun.js +36 -0
  50. package/bin/webui/fixtures/pact.js +111 -0
  51. package/bin/webui/fixtures/runs.js +109 -0
  52. package/bin/webui/fixtures/settings.js +78 -0
  53. package/bin/webui/fixtures/shell.js +48 -0
  54. package/bin/webui/fixtures/stats.js +104 -0
  55. package/bin/webui/i18n/TERMS.md +134 -0
  56. package/bin/webui/i18n/en/banner.json +29 -0
  57. package/bin/webui/i18n/en/boundary.json +20 -0
  58. package/bin/webui/i18n/en/challenge.json +106 -0
  59. package/bin/webui/i18n/en/common.json +69 -0
  60. package/bin/webui/i18n/en/crosslink.json +69 -0
  61. package/bin/webui/i18n/en/docs.json +175 -0
  62. package/bin/webui/i18n/en/experiment.json +17 -0
  63. package/bin/webui/i18n/en/extra.json +313 -0
  64. package/bin/webui/i18n/en/flow.json +30 -0
  65. package/bin/webui/i18n/en/handoff.json +37 -0
  66. package/bin/webui/i18n/en/knowledge.json +141 -0
  67. package/bin/webui/i18n/en/learn.json +16 -0
  68. package/bin/webui/i18n/en/maintenance.json +52 -0
  69. package/bin/webui/i18n/en/mockrun.json +19 -0
  70. package/bin/webui/i18n/en/nav.json +19 -0
  71. package/bin/webui/i18n/en/overview.json +89 -0
  72. package/bin/webui/i18n/en/pact.json +36 -0
  73. package/bin/webui/i18n/en/runs.json +51 -0
  74. package/bin/webui/i18n/en/settings.json +49 -0
  75. package/bin/webui/i18n/en/stats.json +69 -0
  76. package/bin/webui/i18n/en/tour.json +33 -0
  77. package/bin/webui/i18n/id/banner.json +29 -0
  78. package/bin/webui/i18n/id/boundary.json +20 -0
  79. package/bin/webui/i18n/id/challenge.json +106 -0
  80. package/bin/webui/i18n/id/common.json +70 -0
  81. package/bin/webui/i18n/id/crosslink.json +69 -0
  82. package/bin/webui/i18n/id/docs.json +175 -0
  83. package/bin/webui/i18n/id/experiment.json +17 -0
  84. package/bin/webui/i18n/id/extra.json +313 -0
  85. package/bin/webui/i18n/id/flow.json +30 -0
  86. package/bin/webui/i18n/id/handoff.json +37 -0
  87. package/bin/webui/i18n/id/knowledge.json +141 -0
  88. package/bin/webui/i18n/id/learn.json +16 -0
  89. package/bin/webui/i18n/id/maintenance.json +52 -0
  90. package/bin/webui/i18n/id/mockrun.json +19 -0
  91. package/bin/webui/i18n/id/nav.json +19 -0
  92. package/bin/webui/i18n/id/overview.json +89 -0
  93. package/bin/webui/i18n/id/pact.json +36 -0
  94. package/bin/webui/i18n/id/runs.json +51 -0
  95. package/bin/webui/i18n/id/settings.json +49 -0
  96. package/bin/webui/i18n/id/stats.json +69 -0
  97. package/bin/webui/i18n/id/tour.json +33 -0
  98. package/bin/webui/js/00-core.js +115 -0
  99. package/bin/webui/js/01-i18n.js +149 -0
  100. package/bin/webui/js/02-ui.js +211 -0
  101. package/bin/webui/js/03-md.js +286 -0
  102. package/bin/webui/js/04-router.js +51 -0
  103. package/bin/webui/js/05-banners.js +172 -0
  104. package/bin/webui/js/06-edit.js +183 -0
  105. package/bin/webui/js/90-tour.js +488 -0
  106. package/bin/webui/js/91-shortcuts.js +126 -0
  107. package/bin/webui/js/99-boot.js +118 -0
  108. package/bin/webui/js/panels/boundary.js +104 -0
  109. package/bin/webui/js/panels/challenge.js +781 -0
  110. package/bin/webui/js/panels/crosslink.js +654 -0
  111. package/bin/webui/js/panels/docs.js +1338 -0
  112. package/bin/webui/js/panels/experiment.js +98 -0
  113. package/bin/webui/js/panels/extra.js +3011 -0
  114. package/bin/webui/js/panels/flow.js +297 -0
  115. package/bin/webui/js/panels/handoff.js +169 -0
  116. package/bin/webui/js/panels/knowledge.js +890 -0
  117. package/bin/webui/js/panels/learn.js +220 -0
  118. package/bin/webui/js/panels/maintenance.js +235 -0
  119. package/bin/webui/js/panels/mockrun.js +227 -0
  120. package/bin/webui/js/panels/overview.js +447 -0
  121. package/bin/webui/js/panels/pact.js +189 -0
  122. package/bin/webui/js/panels/runs.js +416 -0
  123. package/bin/webui/js/panels/settings.js +573 -0
  124. package/bin/webui/js/panels/stats.js +378 -0
  125. package/bin/webui/serve.js +557 -0
  126. package/mock-run/INDEX.md +106 -0
  127. package/mock-run/a-normal-day.md +587 -0
  128. package/mock-run/context-combiner.md +100 -0
  129. package/mock-run/extra-recovery.md +330 -0
  130. package/mock-run/extra-slots.md +177 -0
  131. package/mock-run/media/README.md +43 -0
  132. package/mock-run/orc-aftermath.md +392 -0
  133. package/mock-run/orc-boundary.md +356 -0
  134. package/mock-run/orc-brainstorm.md +177 -0
  135. package/mock-run/orc-budget.md +534 -0
  136. package/mock-run/orc-challenge-council.md +262 -0
  137. package/mock-run/orc-challenge.md +416 -0
  138. package/mock-run/orc-cli.md +200 -0
  139. package/mock-run/orc-diy.md +129 -0
  140. package/mock-run/orc-doc.md +448 -0
  141. package/mock-run/orc-explain.md +86 -0
  142. package/mock-run/orc-export.md +423 -0
  143. package/mock-run/orc-extra.md +392 -0
  144. package/mock-run/orc-fast.md +106 -0
  145. package/mock-run/orc-grill.md +151 -0
  146. package/mock-run/orc-handoff.md +480 -0
  147. package/mock-run/orc-pact.md +421 -0
  148. package/mock-run/orc-pattern.md +112 -0
  149. package/mock-run/orc-plan.md +108 -0
  150. package/mock-run/orc-pr-setup.md +126 -0
  151. package/mock-run/orc-quick.md +113 -0
  152. package/mock-run/orc-route.md +93 -0
  153. package/mock-run/orc-ui.md +125 -0
  154. package/mock-run/orc-ultra.md +103 -0
  155. package/mock-run/orc.md +157 -0
  156. package/mock-run/the-example-project.md +55 -0
  157. package/package.json +39 -0
  158. package/templates/agents/MODEL-MAPPING.md +168 -0
  159. package/templates/agents/orc-advisor-fable-5.md +50 -0
  160. package/templates/agents/orc-advisor-opus-5-xhigh.md +56 -0
  161. package/templates/agents/orc-analyst-fable-5.md +115 -0
  162. package/templates/agents/orc-analyze-mini-opus-5-med.md +60 -0
  163. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +58 -0
  164. package/templates/agents/orc-challenge-advisor-opus-5-med.md +75 -0
  165. package/templates/agents/orc-challenge-contrarian-opus-5-high.md +110 -0
  166. package/templates/agents/orc-challenge-executor-opus-5-med.md +114 -0
  167. package/templates/agents/orc-challenge-expansionist-opus-5-med.md +112 -0
  168. package/templates/agents/orc-challenge-judge-opus-5-high.md +132 -0
  169. package/templates/agents/orc-challenge-outsider-opus-5-low.md +109 -0
  170. package/templates/agents/orc-challenge-principles-opus-5-high.md +109 -0
  171. package/templates/agents/orc-challenge-reader-opus-5-low.md +90 -0
  172. package/templates/agents/orc-claude-writer-opus-4-8-high.md +53 -0
  173. package/templates/agents/orc-claude-writer-opus-5-med.md +55 -0
  174. package/templates/agents/orc-context-combiner-opus-5-high.md +88 -0
  175. package/templates/agents/orc-doc-checker-opus-5-low.md +108 -0
  176. package/templates/agents/orc-doc-writer-opus-5-med.md +134 -0
  177. package/templates/agents/orc-executor-haiku-4-5.md +113 -0
  178. package/templates/agents/orc-executor-opus-4-7-high.md +114 -0
  179. package/templates/agents/orc-executor-opus-4-7-med.md +114 -0
  180. package/templates/agents/orc-executor-opus-4-8-high.md +114 -0
  181. package/templates/agents/orc-executor-opus-5-high.md +114 -0
  182. package/templates/agents/orc-executor-opus-5-low.md +114 -0
  183. package/templates/agents/orc-executor-opus-5-med.md +114 -0
  184. package/templates/agents/orc-executor-sonnet-4-6-high.md +114 -0
  185. package/templates/agents/orc-executor-sonnet-4-6-med.md +114 -0
  186. package/templates/agents/orc-executor-sonnet-5-high.md +114 -0
  187. package/templates/agents/orc-judge-fable-5.md +79 -0
  188. package/templates/agents/orc-judge-opus-5-xhigh.md +85 -0
  189. package/templates/agents/orc-learn-writer-opus-5-low.md +73 -0
  190. package/templates/agents/orc-pattern-codifier-opus-5-med.md +65 -0
  191. package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +63 -0
  192. package/templates/agents/orc-planner-fable-5.md +152 -0
  193. package/templates/agents/orc-planner-mini-opus-5-med.md +69 -0
  194. package/templates/agents/orc-planner-mini-sonnet-5-high.md +67 -0
  195. package/templates/agents/orc-planner-opus-5-med.md +160 -0
  196. package/templates/agents/orc-retro-opus-5-med.md +73 -0
  197. package/templates/agents/orc-retro-sonnet-5-high.md +72 -0
  198. package/templates/agents/orc-reviewer-fable-5.md +57 -0
  199. package/templates/agents/orc-reviewer-opus-5-med.md +60 -0
  200. package/templates/agents/orc-scout-opus-5-low.md +40 -0
  201. package/templates/agents/orc-scout-sonnet-4-6-high.md +39 -0
  202. package/templates/agents/orc-system-analyst-opus-5-high.md +120 -0
  203. package/templates/agents/orc-test-author-opus-5-med.md +71 -0
  204. package/templates/agents/orc-trace-writer-haiku-4-5.md +107 -0
  205. package/templates/agents/orc-verifier-opus-5-med.md +69 -0
  206. package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +79 -0
  207. package/templates/agents/orc-wiki-scanner-opus-5-med.md +81 -0
  208. package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +106 -0
  209. package/templates/commands/orc-aftermath.md +49 -0
  210. package/templates/commands/orc-analyze.md +21 -0
  211. package/templates/commands/orc-boundary.md +46 -0
  212. package/templates/commands/orc-brainstorm.md +51 -0
  213. package/templates/commands/orc-budget.md +54 -0
  214. package/templates/commands/orc-challenge.md +58 -0
  215. package/templates/commands/orc-claude.md +14 -0
  216. package/templates/commands/orc-diy.md +13 -0
  217. package/templates/commands/orc-doc.md +128 -0
  218. package/templates/commands/orc-explain.md +20 -0
  219. package/templates/commands/orc-export.md +46 -0
  220. package/templates/commands/orc-fast.md +15 -0
  221. package/templates/commands/orc-grill.md +40 -0
  222. package/templates/commands/orc-handoff.md +52 -0
  223. package/templates/commands/orc-learn.md +17 -0
  224. package/templates/commands/orc-mini.md +12 -0
  225. package/templates/commands/orc-pact.md +44 -0
  226. package/templates/commands/orc-pattern.md +15 -0
  227. package/templates/commands/orc-plan.md +22 -0
  228. package/templates/commands/orc-poly.md +21 -0
  229. package/templates/commands/orc-pr-driver.md +30 -0
  230. package/templates/commands/orc-pr-setup.md +31 -0
  231. package/templates/commands/orc-quick.md +33 -0
  232. package/templates/commands/orc-retro.md +17 -0
  233. package/templates/commands/orc-route.md +41 -0
  234. package/templates/commands/orc-ultra.md +17 -0
  235. package/templates/commands/orc-verify.md +11 -0
  236. package/templates/commands/orc-wiki.md +42 -0
  237. package/templates/commands/orc.md +16 -0
  238. package/templates/hooks/orc-effort-guard.js +178 -0
  239. package/templates/hooks/orc-statusline.js +305 -0
  240. package/templates/hooks/orc-trace.js +471 -0
  241. package/templates/hooks/orc-update-lib.js +125 -0
  242. package/templates/skills/_shared/README.md +50 -0
  243. package/templates/skills/_shared/detecting-artifacts.md +90 -0
  244. package/templates/skills/_shared/drift-recovery.md +98 -0
  245. package/templates/skills/_shared/extra-dispatch.md +1051 -0
  246. package/templates/skills/_shared/fable5-override.md +56 -0
  247. package/templates/skills/_shared/fallback-handoff.md +42 -0
  248. package/templates/skills/_shared/gh-stack-commands.md +65 -0
  249. package/templates/skills/_shared/gotchas.md +177 -0
  250. package/templates/skills/_shared/interview.md +144 -0
  251. package/templates/skills/_shared/lane-suspend.md +82 -0
  252. package/templates/skills/_shared/opus5-only.md +131 -0
  253. package/templates/skills/_shared/pr-templates.md +106 -0
  254. package/templates/skills/_shared/read-ladder.md +54 -0
  255. package/templates/skills/_shared/return-validation.md +145 -0
  256. package/templates/skills/_shared/smoke-gate.md +28 -0
  257. package/templates/skills/_shared/stack-plan.md +135 -0
  258. package/templates/skills/_shared/untrusted-input.md +63 -0
  259. package/templates/skills/context-combiner/SKILL.md +187 -0
  260. package/templates/skills/context-combiner/schemas/combined-report.md +78 -0
  261. package/templates/skills/context-combiner/schemas/combined-requirement-spec.md +87 -0
  262. package/templates/skills/orc/README.md +150 -0
  263. package/templates/skills/orc/SKILL.md +526 -0
  264. package/templates/skills/orc/config.md +389 -0
  265. package/templates/skills/orc/examples/full-run-mock.md +73 -0
  266. package/templates/skills/orc/references/analyst-gates.md +124 -0
  267. package/templates/skills/orc/references/effort-and-mode.md +224 -0
  268. package/templates/skills/orc/references/house-rules.md +20 -0
  269. package/templates/skills/orc/references/intake.md +120 -0
  270. package/templates/skills/orc/references/log-protocol.md +39 -0
  271. package/templates/skills/orc/references/pattern-gate.md +89 -0
  272. package/templates/skills/orc/references/plan-handoff.md +84 -0
  273. package/templates/skills/orc/references/preflight-report.md +220 -0
  274. package/templates/skills/orc/references/security-checklist.md +39 -0
  275. package/templates/skills/orc/references/stop-and-resume.md +160 -0
  276. package/templates/skills/orc/references/trace-protocol.md +314 -0
  277. package/templates/skills/orc/references/ultra-mode.md +123 -0
  278. package/templates/skills/orc/references/wave-grouping.md +121 -0
  279. package/templates/skills/orc/references/wiki-consult.md +177 -0
  280. package/templates/skills/orc/schemas/checkpoint.md +122 -0
  281. package/templates/skills/orc/schemas/intent-spec.md +42 -0
  282. package/templates/skills/orc/schemas/planning-output.md +279 -0
  283. package/templates/skills/orc/subskills/orc-checkpoint/SKILL.md +55 -0
  284. package/templates/skills/orc/subskills/orc-execution/SKILL.md +72 -0
  285. package/templates/skills/orc/subskills/orc-execution/core.md +151 -0
  286. package/templates/skills/orc/subskills/orc-execution/subagent.md +13 -0
  287. package/templates/skills/orc/subskills/orc-planner/SKILL.md +264 -0
  288. package/templates/skills/orc/subskills/orc-planner-mini/SKILL.md +121 -0
  289. package/templates/skills/orc/subskills/orc-pr/SKILL.md +51 -0
  290. package/templates/skills/orc/subskills/orc-pr/pr.md +22 -0
  291. package/templates/skills/orc/subskills/orc-pr/stack-gate.md +108 -0
  292. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +76 -0
  293. package/templates/skills/orc/subskills/orc-review-verify/core.md +135 -0
  294. package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -0
  295. package/templates/skills/orc/subskills/orc-testgen/SKILL.md +45 -0
  296. package/templates/skills/orc/subskills/orc-testgen/core.md +59 -0
  297. package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -0
  298. package/templates/skills/orc-advisor/SKILL.md +60 -0
  299. package/templates/skills/orc-aftermath/SKILL.md +136 -0
  300. package/templates/skills/orc-aftermath/references/report.md +95 -0
  301. package/templates/skills/orc-analyze/SKILL.md +220 -0
  302. package/templates/skills/orc-analyze/examples/analyze-mock.md +42 -0
  303. package/templates/skills/orc-analyze/references/branching.md +51 -0
  304. package/templates/skills/orc-analyze/references/deep-mode.md +27 -0
  305. package/templates/skills/orc-analyze/references/thin-input.md +77 -0
  306. package/templates/skills/orc-analyze/schemas/report-audit.md +83 -0
  307. package/templates/skills/orc-analyze/schemas/report-prose.md +63 -0
  308. package/templates/skills/orc-analyze/schemas/report-requirement.md +78 -0
  309. package/templates/skills/orc-analyze/schemas/requirement-spec.md +77 -0
  310. package/templates/skills/orc-analyze-mini/SKILL.md +112 -0
  311. package/templates/skills/orc-analyze-mini/examples/quick-analysis-mock.md +31 -0
  312. package/templates/skills/orc-boundary/SKILL.md +208 -0
  313. package/templates/skills/orc-boundary/references/card.md +78 -0
  314. package/templates/skills/orc-boundary/references/gate.md +113 -0
  315. package/templates/skills/orc-brainstorm/SKILL.md +339 -0
  316. package/templates/skills/orc-brainstorm/references/brainstorm-doc.md +133 -0
  317. package/templates/skills/orc-brainstorm/references/lenses.md +152 -0
  318. package/templates/skills/orc-budget/SKILL.md +225 -0
  319. package/templates/skills/orc-budget/references/corpus.md +87 -0
  320. package/templates/skills/orc-challenge/README.md +142 -0
  321. package/templates/skills/orc-challenge/SKILL.md +255 -0
  322. package/templates/skills/orc-challenge/examples/code-module.md +110 -0
  323. package/templates/skills/orc-challenge/examples/council-full-roster.md +273 -0
  324. package/templates/skills/orc-challenge/examples/tsd-two-iterations.md +213 -0
  325. package/templates/skills/orc-challenge/references/conservation.md +107 -0
  326. package/templates/skills/orc-challenge/references/council.md +315 -0
  327. package/templates/skills/orc-challenge/references/cycle-state.md +185 -0
  328. package/templates/skills/orc-challenge/references/dimensions.md +121 -0
  329. package/templates/skills/orc-challenge/references/fix-brief.md +130 -0
  330. package/templates/skills/orc-challenge/references/intake.md +171 -0
  331. package/templates/skills/orc-challenge/references/kinds.md +44 -0
  332. package/templates/skills/orc-challenge/references/plain-english.md +98 -0
  333. package/templates/skills/orc-challenge/references/rubric.md +109 -0
  334. package/templates/skills/orc-challenge/references/sealed-slice.md +97 -0
  335. package/templates/skills/orc-challenge/references/verdict-doc.md +154 -0
  336. package/templates/skills/orc-claude/SKILL.md +199 -0
  337. package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -0
  338. package/templates/skills/orc-claude/references/refresh.md +76 -0
  339. package/templates/skills/orc-claude/references/template.md +109 -0
  340. package/templates/skills/orc-diy/README.md +142 -0
  341. package/templates/skills/orc-diy/SKILL.md +70 -0
  342. package/templates/skills/orc-diy/references/blocks/analyze.md +24 -0
  343. package/templates/skills/orc-diy/references/blocks/execution.md +42 -0
  344. package/templates/skills/orc-diy/references/blocks/extra.md +55 -0
  345. package/templates/skills/orc-diy/references/blocks/header.md +55 -0
  346. package/templates/skills/orc-diy/references/blocks/mock-example.md +22 -0
  347. package/templates/skills/orc-diy/references/blocks/pattern.md +18 -0
  348. package/templates/skills/orc-diy/references/blocks/planning.md +34 -0
  349. package/templates/skills/orc-diy/references/blocks/review.md +18 -0
  350. package/templates/skills/orc-diy/references/blocks/scoring.md +16 -0
  351. package/templates/skills/orc-diy/references/blocks/security.md +25 -0
  352. package/templates/skills/orc-diy/references/blocks/ship.md +25 -0
  353. package/templates/skills/orc-diy/references/blocks/summary.md +18 -0
  354. package/templates/skills/orc-diy/references/blocks/testgen.md +17 -0
  355. package/templates/skills/orc-diy/references/blocks/trace.md +28 -0
  356. package/templates/skills/orc-diy/references/blocks/verify.md +25 -0
  357. package/templates/skills/orc-diy/references/blocks/wiki.md +26 -0
  358. package/templates/skills/orc-diy/references/compile.md +59 -0
  359. package/templates/skills/orc-diy/references/flow-schema.md +100 -0
  360. package/templates/skills/orc-diy/references/locked-blocks.md +37 -0
  361. package/templates/skills/orc-doc/README.md +229 -0
  362. package/templates/skills/orc-doc/SKILL.md +444 -0
  363. package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +325 -0
  364. package/templates/skills/orc-doc/references/chunking.md +527 -0
  365. package/templates/skills/orc-doc/references/gates.md +311 -0
  366. package/templates/skills/orc-doc/references/generation-rules.md +122 -0
  367. package/templates/skills/orc-doc/references/house-rules.md +170 -0
  368. package/templates/skills/orc-doc/references/import-targets.md +40 -0
  369. package/templates/skills/orc-doc/references/plain-language.md +66 -0
  370. package/templates/skills/orc-doc/references/portable-markdown.md +74 -0
  371. package/templates/skills/orc-doc/references/resume-protocol.md +228 -0
  372. package/templates/skills/orc-doc/references/templates/collaboration.md +118 -0
  373. package/templates/skills/orc-doc/references/templates/prd.md +133 -0
  374. package/templates/skills/orc-doc/references/templates/report.md +102 -0
  375. package/templates/skills/orc-doc/references/templates/tsd.md +122 -0
  376. package/templates/skills/orc-doc/references/templates/workflow.md +112 -0
  377. package/templates/skills/orc-explain/SKILL.md +57 -0
  378. package/templates/skills/orc-export/SKILL.md +154 -0
  379. package/templates/skills/orc-fast/SKILL.md +188 -0
  380. package/templates/skills/orc-grill/SKILL.md +207 -0
  381. package/templates/skills/orc-grill/references/grill-doc.md +105 -0
  382. package/templates/skills/orc-handoff/SKILL.md +204 -0
  383. package/templates/skills/orc-handoff/references/handoff-log.md +67 -0
  384. package/templates/skills/orc-handoff/references/surfaces.md +88 -0
  385. package/templates/skills/orc-judge/SKILL.md +82 -0
  386. package/templates/skills/orc-learn/SKILL.md +156 -0
  387. package/templates/skills/orc-learn/examples/learn-run-mock.md +61 -0
  388. package/templates/skills/orc-learn/references/deepen.md +70 -0
  389. package/templates/skills/orc-learn/references/refresh.md +65 -0
  390. package/templates/skills/orc-learn/references/template-knowledge.md +83 -0
  391. package/templates/skills/orc-learn/references/template-learning.md +67 -0
  392. package/templates/skills/orc-mini/SKILL.md +226 -0
  393. package/templates/skills/orc-mini/examples/mini-run-mock.md +50 -0
  394. package/templates/skills/orc-pact/SKILL.md +218 -0
  395. package/templates/skills/orc-pact/references/gate.md +70 -0
  396. package/templates/skills/orc-pact/references/ledger.md +99 -0
  397. package/templates/skills/orc-pattern/SKILL.md +124 -0
  398. package/templates/skills/orc-pattern/references/INDEX.md +73 -0
  399. package/templates/skills/orc-pattern/references/be-django.md +80 -0
  400. package/templates/skills/orc-pattern/references/be-express.md +82 -0
  401. package/templates/skills/orc-pattern/references/be-fastapi.md +107 -0
  402. package/templates/skills/orc-pattern/references/be-go.md +96 -0
  403. package/templates/skills/orc-pattern/references/be-nestjs.md +86 -0
  404. package/templates/skills/orc-pattern/references/be-postgres.md +98 -0
  405. package/templates/skills/orc-pattern/references/fe-a11y.md +36 -0
  406. package/templates/skills/orc-pattern/references/fe-angular.md +87 -0
  407. package/templates/skills/orc-pattern/references/fe-nextjs.md +65 -0
  408. package/templates/skills/orc-pattern/references/fe-perf.md +39 -0
  409. package/templates/skills/orc-pattern/references/fe-react.md +83 -0
  410. package/templates/skills/orc-pattern/references/fe-vue.md +75 -0
  411. package/templates/skills/orc-pattern/schemas/pattern-doc.md +62 -0
  412. package/templates/skills/orc-poly/SKILL.md +216 -0
  413. package/templates/skills/orc-poly/examples/poly-run-mock.md +51 -0
  414. package/templates/skills/orc-poly/references/gather.md +70 -0
  415. package/templates/skills/orc-poly/references/poly-spec.md +84 -0
  416. package/templates/skills/orc-pr-driver/README.md +349 -0
  417. package/templates/skills/orc-pr-driver/SKILL.md +167 -0
  418. package/templates/skills/orc-pr-driver/references/conflict-playbook.md +78 -0
  419. package/templates/skills/orc-pr-driver/references/green-gate.md +105 -0
  420. package/templates/skills/orc-pr-driver/references/orc-run-split.md +99 -0
  421. package/templates/skills/orc-pr-setup/README.md +436 -0
  422. package/templates/skills/orc-pr-setup/SKILL.md +184 -0
  423. package/templates/skills/orc-pr-setup/references/certainty-gate.md +66 -0
  424. package/templates/skills/orc-pr-setup/references/layer-taxonomy.md +67 -0
  425. package/templates/skills/orc-quick/README.md +423 -0
  426. package/templates/skills/orc-quick/SKILL.md +306 -0
  427. package/templates/skills/orc-quick/references/context-doc.md +114 -0
  428. package/templates/skills/orc-quick/references/dispatch-gate.md +163 -0
  429. package/templates/skills/orc-quick/references/gh-mode.md +127 -0
  430. package/templates/skills/orc-retro/SKILL.md +222 -0
  431. package/templates/skills/orc-retro/examples/retro-mock.md +171 -0
  432. package/templates/skills/orc-route/SKILL.md +165 -0
  433. package/templates/skills/orc-verify/SKILL.md +86 -0
  434. package/templates/skills/orc-verify/examples/verify-mock.md +33 -0
  435. package/templates/skills/orc-wiki/README.md +325 -0
  436. package/templates/skills/orc-wiki/SKILL.md +322 -0
  437. package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -0
  438. package/templates/skills/orc-wiki/references/claude-md-injection.md +61 -0
  439. package/templates/skills/orc-wiki/references/crosslink-compile.md +39 -0
  440. package/templates/skills/orc-wiki/references/crosslink-kinds.md +57 -0
  441. package/templates/skills/orc-wiki/references/crosslink.md +284 -0
  442. package/templates/skills/orc-wiki/references/extra.md +79 -0
  443. package/templates/skills/orc-wiki/references/integrity-check.md +86 -0
  444. package/templates/skills/orc-wiki/references/orientation.md +51 -0
  445. package/templates/skills/orc-wiki/references/partial-refresh.md +203 -0
  446. package/templates/skills/orc-wiki/references/pattern-prewarm.md +19 -0
  447. package/templates/skills/orc-wiki/references/staleness.md +288 -0
  448. package/templates/skills/orc-wiki/schemas/crosslink-tag.md +166 -0
  449. package/templates/skills/orc-wiki/schemas/wiki-doc.md +120 -0
@@ -0,0 +1,389 @@
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 | on — fires 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.
@@ -0,0 +1,73 @@
1
+ # Example — Annotated Full Run (v2.2, dry run)
2
+
3
+ O: = orchestrator (Opus 4.8 high, always) · U: = user. Nothing real. The
4
+ orchestrator NEVER implements — it always spawns scored subagents.
5
+
6
+ U: Orchestrate: merchant notification system — in-app, email digest, prefs page.
7
+
8
+ ## Phase 0 — Intake
9
+ O: Creates run folder run/merchant-notifications/ FIRST.
10
+ [reads repo: TS/yarn/jest — asks nothing about stack] Rough size: medium+ → 4-question tier (one batched round):
11
+ 1) What should exist when done? 2) Out of scope? 3) How do we know it's done? 4) Patterns/files to avoid?
12
+ U: [answers] no push, no admin; bell count + both digest schedules + prefs persist; follow services/ pattern, don't touch auth_service.
13
+ O: [drafts run/merchant-notifications/intent-spec.md] Sign-off: gate or soft? (default gate)
14
+ U: gate → approved
15
+
16
+ ## Phase 1 — Planning
17
+ O: Planner? U: OpenSpec
18
+ O: [6 tasks with declared_files incl. tests + per-file grounding attestations + sliced acceptance[], depends_on, spec_ref] ⚠ T1/T2 share models/notification.ts → scheduling separates them.
19
+ Grounding spot-check (Phase 1 exit): globs all `exists` paths — 13/14 present, models/notifcation.ts MISSING (typo) → plan bounced to planner with the miss list → corrected to models/notification.ts ✓.
20
+
21
+ ## Phase 2 — Effort, dispatch style, scoring
22
+ O: Refined: medium, partially dependent. Recommend PARALLEL waves. Confirm? U: yes. Batch pause? U: every 2 waves.
23
+ O: Facet scoring (planner facets → formula → band; facet gate: breadth + fan recomputed, risk cites checked):
24
+ T1 3·new-surface·stateful·new-tests·fan0/3·low = 6+18+16+8+9 = 57 → sonnet-5-high (keystone — every later task imports its enum)
25
+ T2 3·imitate·branching·new-tests·fan1/0·low = 6+8+8+8+5 = 35 → sonnet-4-6-med
26
+ T3 3·imitate·branching·update-existing·fan1/0·low = 6+8+8+4+5 = 31 → sonnet-4-6-med
27
+ T4 2·imitate·branching·update-existing·fan1/0·low = 6+8+8+4+5 = 31 → sonnet-4-6-med
28
+ T5 1·mechanical·none·update-existing·fan0/0·low = 2+0+0+4 = 6 → haiku-4-5
29
+ T6 1·mechanical·none·none·fan0/0·low = 2+0+0+0 = 2 → haiku-4-5
30
+ Plan: 6 tasks, 3 waves W1{T1} W2{T2,T3,T4} W3{T5,T6}, all spawned. Anticipated escalations? U: none, go.
31
+
32
+ ## Phase 3 — Execution (ALL spawned; orchestrator coordinates only)
33
+ O: [checkpoint + state-of-play written into run/merchant-notifications/ BEFORE dispatch]
34
+ ▶ W1: spawn Agent-A(T1, sonnet-5-high) — milestones 40%→100% — return validated ✓ (evidence: `yarn jest models/` exit 0, tail quoted; unmet[] empty) — log: DECISION type enum.
35
+ ▶ W2: spawn 3 agents (sonnet-4-6-med each).
36
+ Agent-C needs_context (1/2): "needs T1's enum interface" → O adjudicates in-scope → re-slices → resumes. (User never bothered.)
37
+ Agent-C user escalation: "digest send time?" → U: 07:00 fixed → ANSWER broadcast to log.
38
+ Returns validated ✓ · collision audit clean.
39
+ ⏸ BATCH PAUSE (stop sequence):
40
+ checkpoint ✓ → state-of-play ✓ → dispatch report shown (models/scores) → "Run /usage to see your remaining limits."
41
+ → resume block:
42
+ | Continue ORC run `merchant-notifications`.
43
+ | Read run/merchant-notifications/state-of-play.md, then run/merchant-notifications/checkpoint.json.
44
+ | Resume from checkpoint phase/wave. Intent-spec approved — do not re-plan. Do not redo done tasks.
45
+ "Reply continue here, or paste in a fresh session (recommended if long)."
46
+
47
+ U: [next day, FRESH session, pastes block]
48
+ O: [state-of-play → checkpoint → re-anchored] "Resuming: merchant notifications (in-app+digest+prefs). Still correct?" U: yes.
49
+ ▶ W3: spawn T5+T6 (haiku-4-5) → done. All 6 complete.
50
+
51
+ ## Phase 5 — Review (spawned worker, Opus 5 medium)
52
+ O: Code pattern? U: none. Findings (P0–P3 ladder, each P0–P2 anchored file:line + verbatim quote):
53
+ P1 T2 no pagination — services/notification_list.ts:88 — O spot-checks: Reads line 88, quote matches ✓ → asks user, U: fix it
54
+ · P3 email_digest naming ×2 · 12 tests added. (An unanchored finding would be auto-P3 — never fixed unasked.)
55
+
56
+ ## Phase 6 — Verify (spawned worker, Opus 5 medium; criteria = definition-of-done)
57
+ criteria[] with per-line evidence: bell ✓ (test name) · both schedules ✗ (weekly cron missing = P0, unmet criterion, evidence: no cron entry in scheduler.ts) · prefs ✓ → FAILED → quote spot-check ✓ → P0 auto-fix (single attempt, no ask) → re-verify → PASSED. 14/14.
58
+
59
+ ## Phase 7 — Summary
60
+ O: 6 tasks/3 waves/6 spawns/1 pause/1 fresh-session resume · 1 needs_context · 1 escalation · verify fixed_then_passed · branch green. P2 fix-batch: none · Apply the 2 P3 cosmetics? U: no.
61
+
62
+ ## Phase 8 — Ship (orc-pr, reads pr.md)
63
+ O: Branch: feat/notifications. Commit? Push? PR? U: yes all.
64
+ O: Ticket/title/target? U: DRP-482 / Add merchant notification system / develop
65
+ O: ✓ committed → pushed → run/merchant-notifications/DRP-482-add-merchant-notification-system.md from pr.md (base develop).
66
+ Log deleted · checkpoint + dispatch log KEPT · completion dispatch report shown → "Run /usage to see your remaining limits."
67
+
68
+ ## What this exercises
69
+ always-spawn (even cheap tasks get a subagent) · facet-scored arithmetic · 8-band ladder ·
70
+ per-run folder run/merchant-notifications/ · usage reminder (no programmatic /usage) ·
71
+ planner grounding spot-check catching a hallucinated path · executor evidence (verbatim
72
+ build/test proof) · reviewer quote spot-check before any P0/P1 action ·
73
+ definition-of-done catching the weekly-cron gap · needs_context resolved internally · fresh-session resume.
@@ -0,0 +1,124 @@
1
+ # Reference — Analyst, Combiner & Plan Gates (orchestrator side)
2
+
3
+ The orchestrator's deterministic gates around the analyst, the
4
+ context-combiner, and the planner. The roles themselves are defined in
5
+ `../../orc-analyze/SKILL.md`, `../../context-combiner/SKILL.md`, and
6
+ `../subskills/orc-planner/SKILL.md` — this file is what YOU do around their
7
+ dispatches and returns. Load at Phase 0 (analyst dispatch) and Phase 1
8
+ (planner return). Emit a `GATE` trace line (pass|bounce) per check when
9
+ logging.
10
+
11
+ ## Deep-mode scout dispatch (yours)
12
+
13
+ When the analyst runs in deep mode it returns a `scout_plan` (pass 1). You then
14
+ dispatch ≤ `config.max_scouts` (default 3) parallel
15
+ `orc-scout-sonnet-4-6-high` agents (`orc-scout-opus-5-low` when `opus5_only`
16
+ — `../../_shared/opus5-only.md`; scouts fan out in PARALLEL, so this is the
17
+ mode's largest single cost multiplier) — one coverage area each, read-only — and
18
+ re-dispatch the analyst WITH their evidence bundles for pass 2. Same "return a
19
+ request → you re-slice → re-dispatch" shape as `needs_context`. You never
20
+ analyze; you only dispatch and relay.
21
+
22
+ ## Analyst-return gates (deterministic, before any build option)
23
+
24
+ 1. **Evidence spot-check:** Glob every `files[]` path in the spec +
25
+ Grep-verify the quoted snippet on **EVERY quote-anchored ref, whatever its
26
+ `status`** (v0.34.6). It used to check only `exists|conflict` — but the two
27
+ statuses a GOOD audit most often produces are `resolved` (a challenged row
28
+ the user decided) and `buildable` (the actual work), so a correctly-triaged
29
+ analysis was the one the gate barely checked: a real spec had zero
30
+ `exists|conflict` rows, so the mandated verification covered 0 of 5 refs and
31
+ a `file:5` citing a quote that lives at `file:4` went through. It is one
32
+ Grep per ref, and it is the ONLY mechanical defence against a wrong line
33
+ number reaching the planner. Note the causal shape: that ref started as a
34
+ line RANGE with no quote (auto-UNVERIFIED per hard rule 2); narrowing it to
35
+ one line + quote was the CORRECT fix and is what introduced the off-by-one —
36
+ tightening evidence granularity is itself an error surface, so the gate has
37
+ to be what catches it.
38
+ 2. **Derivation lint:** R# ids, statuses, and context-anchor set must match
39
+ between report.md and requirement-spec.md.
40
+
41
+ Any miss → bounce to the analyst with the miss list (one retry, then escalate
42
+ to the user). Refuse take-into-build when the spec has open `UNVERIFIED` or
43
+ lacks `scope_closed: true` (a one-Grep check).
44
+
45
+ ## Combiner tracking (yours; full lane only)
46
+
47
+ `context-combiner` (`orc-context-combiner-opus-5-high` — Opus 5 high, v0.34.0)
48
+ merges 2+ RELATED, already-confirmed
49
+ analyses from the same run into ONE combined requirement-spec before build.
50
+
51
+ - **Track the analysis set:** hold the confirmed spec paths of every analysis
52
+ this run in run state (survives checkpoint/resume).
53
+ - When the user picks "pass to context-combiner" at orc-analyze's Phase F
54
+ branch menu (offered only once 2+ analyses exist), dispatch
55
+ `orc-context-combiner-opus-5-high` with that list.
56
+ - The return carries `combined_spec_path` + `coverage_pct` (conservation
57
+ proof — every source requirement accounted for; must be 100) + `dropped[]` +
58
+ `stale_evidence[]` + `handoff_ready` — or `combined: false` if the user chose
59
+ keep-separate at the combiner's relatedness challenge (then fall back to
60
+ per-analysis stop/build).
61
+ - Offer the build option ONLY when `handoff_ready` is true (the combiner sets
62
+ it false when `coverage_pct` < 100 OR a conflict is open). On build, continue
63
+ at Phase 1 with the combined spec exactly like a single requirement-spec.
64
+
65
+ You never combine; you only track, dispatch, and relay.
66
+
67
+ ## Spec staleness valve (Phase 1, before dispatching the planner)
68
+
69
+ If the requirement-spec's `git_head` ≠ current HEAD (analysis and build in
70
+ different sessions), re-run the analyst evidence spot-check (paths + quotes)
71
+ BEFORE dispatching the planner; on misses offer re-analyze vs
72
+ proceed-with-flagged.
73
+
74
+ ## Phase 1 exit gate (deterministic, before scoring)
75
+
76
+ 1. **Grounding spot-check:** Glob every path the plan marks
77
+ `disposition: exists`. A task whose declared paths lack `grounding[]`
78
+ entries counts as a miss.
79
+ 2. **Coverage check:** recompute the planner's coverage echo — every in-scope
80
+ spec R# / intent-spec DoD line must appear in ≥ 1 task's `requirements[]`;
81
+ an `orphan` requirement is a miss (the user may explicitly descope instead).
82
+ 3. **Graph checks:** cycle detection over `depends_on` + same-file collision
83
+ over `declared_files` (two tasks sharing a file need a serializing dep or a
84
+ merge). Both trivial at ≤ 20 tasks — never trust the planner's self-check
85
+ alone.
86
+ 4. **TDD/test-task collision (v0.34.4):** a `tdd_spec` entry whose target file
87
+ is in the `declared_files` of a task whose `facets.test_surface` is
88
+ `new-tests` is a miss. The paired TDD task materializes `tdd_spec` BEFORE the
89
+ task it guards, so that task's planned work is already on disk and
90
+ green by the time its wave opens — leaving only bad options (dispatch a
91
+ no-op, silently drop promised coverage, or re-slice mid-run). The planner
92
+ authored both mechanisms and folds them together itself: extend the
93
+ materialized file, never re-author it.
94
+ 5. **TDD disposition gate (v0.41.0)** — this gate is what lets TDD be skipped
95
+ safely. Skipping a test is cheap to claim and expensive to get wrong, so
96
+ every skip must be checkable, and it is checked in BOTH directions: a rule
97
+ that only ever prevents tests is a rule that deletes coverage.
98
+ - `disposition` outside the closed set
99
+ `new-surface | behavior-change | covered-by-existing | no-behavior | no-runner`
100
+ → miss. (Absent on a pre-v0.41.0 plan → derive from `kind`; never bounce an
101
+ old plan — see the legacy exception below.)
102
+ - `covered-by-existing` **without a resolvable `covered_by`** → miss. Glob the
103
+ cited `path` exactly as check 1 does for `disposition: exists`. "A test
104
+ already covers this" is the one claim that, if false, silently removes
105
+ coverage the run promised.
106
+ - `no-behavior` whose task has `facets.test_surface != none` → miss
107
+ (self-contradiction: the planner said the surface is testable and that it
108
+ isn't).
109
+ - **Safety floor:** any entry that is `covered-by-existing` or `no-behavior`
110
+ on a task with non-empty `facets.risk[]` → miss, no exceptions. Auth,
111
+ money, migration, security, concurrency and data-integrity requirements do
112
+ not ride on another test's coincidence.
113
+ - `new-surface` / `behavior-change` missing `skeleton` or `given_when_then`
114
+ → miss.
115
+ - A disposition that DEVIATES from the derivation table in
116
+ `../schemas/planning-output.md` without a `reason` → miss. The derivation
117
+ is the default; departing from it is the thing that needs justifying.
118
+
119
+ Any miss → the plan is malformed: bounce it back to the planner WITH the miss
120
+ list (one retry), then escalate to the user. **Legacy exception:** a
121
+ pre-v0.7.0 plan resumed from an old checkpoint has no `grounding[]`
122
+ (pre-v0.9.0: no `requirements[]`/`spec_invariants[]`; pre-v0.41.0: no
123
+ `disposition`) — resume it without the
124
+ missing checks; never bounce an old plan.