@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,220 @@
1
+ # Reference — Phase-1 Preflight Report
2
+
3
+ One compact, user-visible block printed ONCE at Phase 1, after the planning
4
+ input is settled (wiki consulted, crosslink probed, waves computed at Phase 2 —
5
+ so print it at the point all inputs exist, typically end of Phase 1 / start of
6
+ Phase 3). This is **presentation only** — no new probes; every value is already
7
+ computed by the wiki consult (Change 3), the crosslink probe (Change 5), the
8
+ pattern resolve gate (Change 4), and wave grouping.
9
+
10
+ The point is that the four knowledge gates the run used to keep silent are now
11
+ always surfaced: the user always knows whether the run is grounded (wiki),
12
+ whose house style is in force (pattern), whether peer contracts are in play
13
+ (crosslink), where the trace is, and when the run will pause.
14
+
15
+ ## Template
16
+
17
+ ```
18
+ ── run preflight ──
19
+ wiki: FRESH — 12 docs consulted · 4 docs pending refresh, 335k tok / $0.94
20
+ pattern: js cached · ts cached
21
+ gotchas: 12 known · 3 match this change's files
22
+ pact: 11 holding · 2 drifted · 3 uncheckable
23
+ bound: 9 execute · 2 escalate · 1 refuse (2 stale)
24
+ after: src/payments — 2 shipped files rewritten within 30 days of run store-credit
25
+ crosslink: 2 boundaries (payments-api) — advisory
26
+ extra: ON — 4 of 9 tasks foreign · deepseek/deepseek-v4-flash via api [0,30)
27
+ · glm/glm-4.7 via cli [30,70) · 2 held back (risk: auth, money)
28
+ scoring: 8-band default table
29
+ tdd: 3 tasks with tests (T3, T6, T9) · 2 covered-by-existing · 2 no-behavior
30
+ skipped: R4 translation strings (no-behavior) · R7 file split
31
+ (covered-by-existing → test/api/health.test.js:41)
32
+ trace: .claude/orc/logs/run-orc-<slug>-210726-154500.txt
33
+ waves: 3 planned — will pause after wave 2 (batch_pause_every=2)
34
+ ```
35
+
36
+ ## Line rules
37
+
38
+ - **wiki:** the exact tier line from `wiki-consult.md` Step 1 (one of the four
39
+ freshness tiers, `absent` included). Never omit — `absent` still prints.
40
+ - **pattern:** one token per resolved language (`<lang> cached` /
41
+ `<lang> codifying` / `<lang> agnostic`), joined by ` · `. No FE/BE language
42
+ in the run → `none (no FE/BE work)`.
43
+ - **gotchas:** ALWAYS printed — repair memory is knowledge like the wiki and the
44
+ pattern, and a silent one is the same defect. Exactly one of
45
+ `<n> known · <m> match this change's files` (from `orc gotcha status` +
46
+ the scope-glob count against the plan's `declared_files`) ·
47
+ `none yet` · `off`. `off` still prints: a user who turned it off should see
48
+ that the run is not learning from its own repairs, and a user who did not should
49
+ see that it is. Canonical: `../../_shared/gotchas.md`. `.claude/orc/gotchas.md`
50
+ is where the entries live.
51
+ - **wiki, the debt tail (v0.46.0):** append `· <n> docs pending refresh, <tok> /
52
+ <$>` from `orc wiki debt --json` **only when debt exists** (exit 1). Exit 0
53
+ appends nothing — a tail that says "no debt" on every run is a tail people stop
54
+ reading, and this one has to be legible the time it matters.
55
+ - **pact:** the `line` field from `orc pact status --json`, VERBATIM — never
56
+ re-worded, never recounted here (`pact_gate: off` omits the line entirely; no
57
+ ledger prints `none — /orc-pact harvests one from this run's
58
+ spec_invariants[]`). Canonical: `../../orc-pact/references/gate.md`.
59
+ - **bound:** the `line` field from `orc boundary status --json`, VERBATIM, and the
60
+ ACTIVE mode is named whenever a verdict is later printed (`boundary_gate: off`
61
+ omits the line). Uncarded areas are `unknown`, never REFUSE. Canonical:
62
+ `../../orc-boundary/references/gate.md`.
63
+ - **after:** printed **ONLY when the area this run is about to touch has a recent
64
+ churn signal** (`orc aftermath status --json`, exit 1 or 2, intersected with the
65
+ plan's `declared_files`). A clean run prints nothing at all — the whole value of
66
+ this line is that it is rare. Never a verdict, never a name.
67
+ - **crosslink:** the crosslink line from `wiki-consult.md` when a probe hit
68
+ (`cached` or `configured-no-cache`); omit the whole line when crosslink is
69
+ not in play (state `none`).
70
+ - **extra:** (v0.50.0) printed on **every** run where `config.extra_enabled` is
71
+ true — including a run where nothing routed foreign (`ON — 0 of 9 tasks
72
+ foreign; no route row covers this plan's scores`). This is the P0 line
73
+ (`a lane that sends work off Claude without saying so`), so unlike every other
74
+ line here it is not allowed a quiet branch. `extra_enabled: false` omits it
75
+ entirely — an off subsystem is not news.
76
+
77
+ One row per route row that MATCHED, each naming `provider/model via <engine>
78
+ [band]`, taken from `orc extra resolve --json` — never re-derived. Then, when
79
+ either applies and only then:
80
+
81
+ - `· <n> held back (risk: <the cited risks>)` — the cited-risk hold-back.
82
+ REQUIRED whenever it is non-zero, and it names the risks, because the whole
83
+ value of the count is that the user can tell it apart from a forgotten task.
84
+ - `· <profile> re-pinged: <result>` after a STALE verification was refreshed,
85
+ and `· <profile> LOCKED (vault) — falling back to <agent> for [band]` when a
86
+ vaulted key could not be opened at dispatch time. A locked vault is a cost
87
+ event, not just a routing one.
88
+
89
+ - `· <n> foreign dispatch(es) from an earlier run never reported back` —
90
+ the ORPHAN line, printed whenever `orc extra preflight --json` returns a
91
+ non-empty `orphans[]`, each row ending in its own `orc extra reconcile
92
+ <task>`. Render them VERBATIM: the CLI composes them, this
93
+ report renders them. It is a FINDING, never a stop — preflight's exit code
94
+ does not move — and ORC never resumes one on its own. Emit the pre-composed
95
+ `EXTRA orphan` line from `trace_extras[]` once you have reported it.
96
+
97
+ Canonical: `../../_shared/extra-dispatch.md`.
98
+ - **scoring:** which executor table RESOLVED for this run — `8-band default
99
+ table` · `Opus-5-only ladder (opus5_only)` · `custom
100
+ (rubric_bands_override, <n> rows)`. An un-shown table is as unaccountable as
101
+ an un-shown number, and the Opus-5-only ladder in particular means EVERY
102
+ dispatch needs an Opus 5 main session — the user should see that before the
103
+ first dispatch, not in a trace full of downgrades. When `opus5_only` is on,
104
+ append ` · all fixed roles forced to Opus 5` and name any selector it
105
+ shadowed (`rubric_bands_override` / `fable5_*` present but INERT) — a setting
106
+ the user tuned and the run then ignored has to be said out loud. With Extra in
107
+ play the table is a COMPOSITE and reads as one (`8-band default table + extra
108
+ rows [0,30) [30,70)`) — Extra is an overlay, so naming only one of the two would
109
+ be naming the wrong half for every covered score.
110
+ - **tdd:** ALWAYS printed on a lane whose TDD policy is on — BOTH branches, not
111
+ only the exemption. Counted straight from the plan's `tdd_spec`, broken down
112
+ by `disposition` so the user sees **what got no test and why** (v0.41.0):
113
+
114
+ ```
115
+ tdd: 3 tasks with tests (T3, T6, T9) · 2 covered-by-existing · 2 no-behavior
116
+ skipped: R4 translation strings (no-behavior) · R7 file split
117
+ (covered-by-existing → test/api/health.test.js:41)
118
+ ```
119
+
120
+ The `skipped:` continuation is REQUIRED whenever any entry is
121
+ `covered-by-existing` or `no-behavior`, one line per entry, each naming its
122
+ `reason` (or its `covered_by` path). Scoping TDD down is only safe if the
123
+ scoping is visible: a silently skipped test is indistinguishable from a
124
+ forgotten one, and this is the line that keeps the token saving honest.
125
+
126
+ Whole-run exemption →
127
+ `EXEMPT (whole run) — no test runner detected in this project`, which is the
128
+ ONE line `SKILL.md` mandates for that case. A plan where NO task needed a test
129
+ → `no tasks required tests (all covered-by-existing / no-behavior)` plus the
130
+ same `skipped:` breakdown — never silence. A lane whose policy is off
131
+ (orc-fast, or orc-mini when the user declined) prints `off (<lane> policy)`.
132
+ This line is the producer the mandate previously lacked — without it an
133
+ orchestrator that prints only what the payload compels prints nothing at all
134
+ about TDD on a normal run.
135
+ - **trace:** the run's `trace_path`.
136
+ - **waves:** `K planned — will pause after wave(s) [list] (batch_pause_every=N)`,
137
+ or `K planned — no pause (run straight through)` when the user chose to run
138
+ through / the schedule is empty.
139
+
140
+ The pattern and crosslink lines reuse Changes 4/5's already-emitted content — do
141
+ NOT recompute. If the pattern resolve gate has not run yet when the block is
142
+ printed, show the tagged languages as `pending resolve` rather than delaying the
143
+ block.
144
+
145
+ ---
146
+
147
+ # The `forecast:` block (v0.42.0) — printed EARLIER, and separately
148
+
149
+ A second, shorter block. It is NOT part of the preflight block above and does not
150
+ change it. It answers the one question ORC never answered: **what will this run
151
+ cost me in time, before it starts?**
152
+
153
+ ## When
154
+
155
+ **The moment the Phase 1 exit gate passes**, and *before* the pause-schedule
156
+ question, and long before the first executor dispatch.
157
+
158
+ That timing is the whole design. It is the EARLIEST point where every number is
159
+ real — the plan exists, so tasks, dependencies and facets are all in hand, which
160
+ makes waves and scores computable. It is also the LAST cheap moment to walk away:
161
+ nothing dispatched, nothing written, nothing wasted. Printed any later it would
162
+ still be honest and would be useless.
163
+
164
+ On a `/orc-plan` **Save & stop** it prints alongside the routing question
165
+ (`../../orc-route/SKILL.md`), so price and recommended lane arrive together.
166
+
167
+ ## Template
168
+
169
+ ```
170
+ ── forecast ──
171
+ tasks: 7 · waves: 3 · subagents: about 17
172
+ models: 2 high · 3 medium · 1 low
173
+ time: about 45-80 minutes in this lane
174
+ cheaper: /orc-mini would be about 15 minutes with 3 subagents
175
+ (it skips full review and verification)
176
+ ```
177
+
178
+ ## Line rules
179
+
180
+ - **Presentation only — NO new probes.** Every value is already in hand at this
181
+ instant: `tasks` and `waves` from the plan and the wave grouping, `subagents`
182
+ from the dispatch count the lane's phases imply, `models` from the score→model
183
+ table that was already resolved for the `scoring:` line above.
184
+ - **`subagents` is an estimate and says so** (`about N`). The honest floor is
185
+ one per task plus the lane's fixed roles plus one trace-writer per phase; a
186
+ repair round or a requeue makes the real number higher, never lower.
187
+ - **`time:` is a RANGE, calibrated from measured runs, never invented.** The
188
+ corpus behind the current ranges: `/orc-fast` ≈ 9 min / 3 dispatches ·
189
+ `/orc-mini` ≈ 15 min / 3 · `/orc` 48–84 min / 15–23. Scale within the lane's
190
+ range by task count. If a lane has no measured corpus, print
191
+ `time: not measured for this lane` rather than a guess — a fabricated number
192
+ here is worse than no number, because it looks computed.
193
+ - **`cheaper:` names ONE alternative and what it costs you**, never a bare
194
+ "X is faster". Omit the line when no cheaper lane can run this plan (say why in
195
+ one clause instead — e.g. `cheaper: none — /orc-fast needs a fresh wiki`).
196
+ - **The full lane can cost six times more than the fast lane.** That ratio is the
197
+ reason this block exists; do not bury it in prose.
198
+
199
+ ## `run_budget_dispatches` — the optional hard stop
200
+
201
+ Config key, `common` tier, default `0` (off). When set and the forecast's
202
+ `subagents` estimate EXCEEDS it, the run **stops before wave 1** with the same
203
+ discipline as the batch pause — a gate, not a hint. Never dispatch wave 1 past
204
+ an unacknowledged budget stop.
205
+
206
+ ```
207
+ ── budget ──
208
+ This run forecasts about 17 subagents; your run_budget_dispatches is 12.
209
+
210
+ 1 proceed anyway
211
+ 2 switch to /orc-mini (about 3 subagents — skips full review and verify)
212
+ 3 stop and re-plan smaller
213
+ ```
214
+
215
+ Emit `GATE budget stop :: forecast=<n> limit=<m>` before stopping, and
216
+ `GATE budget pass :: forecast=<n> limit=<m>` when the forecast is within the
217
+ limit (so a run that silently passed is distinguishable from one where the key
218
+ was unset). `0` means the gate never fires and no `GATE budget` line is emitted
219
+ at all.
220
+
@@ -0,0 +1,39 @@
1
+ # Reference — Security-Pass Checklist (Phase 5.5, opt-in)
2
+
3
+ Loaded ONLY when the Phase 5.5 security pass fires (config `security_review`
4
+ `on`/`ask` + a task scored ≥ 70 in the run). Passed to the reviewer as
5
+ `security_checklist[]` — the worker sweeps ONLY the run's changed files against
6
+ these items, wrapping Semgrep if it is already installed (never installing it).
7
+
8
+ Severity mapping (same P0–P3 ladder): an item the DIFF makes exploitable = P0 ·
9
+ a hardening gap on a touched path = P1 · defense-in-depth suggestions = P2/P3.
10
+
11
+ ## Checklist (OWASP/STRIDE-derived, impact-ordered — the closed set; never extend ad hoc)
12
+
13
+ 1. **Injection** — SQL/NoSQL/command/LDAP built from user input without
14
+ parameterization or a safe builder anywhere in the diff.
15
+ 2. **Broken auth on new surface** — any new endpoint/route/handler reachable
16
+ without the auth check its siblings carry (spoofing).
17
+ 3. **Broken authorization** — object/record access without an ownership or role
18
+ check (IDOR); privilege boundaries crossed by the new code (elevation).
19
+ 4. **Secrets in code** — credentials, tokens, keys, or connection strings
20
+ hardcoded or logged; secrets reaching client bundles or responses
21
+ (information disclosure).
22
+ 5. **Unvalidated input** — request bodies/params/headers/files used before
23
+ schema validation; mass-assignment of writable model fields (tampering).
24
+ 6. **Injection into output** — XSS via unescaped user data in HTML/JS contexts;
25
+ unsafe redirects/headers from user input.
26
+ 7. **Insecure data handling** — sensitive data stored/transmitted unencrypted,
27
+ PII in logs, cache keys/values leaking secrets.
28
+ 8. **CSRF/replay on state changes** — new state-changing browser endpoints
29
+ without CSRF protection; missing idempotency where retries can double-apply
30
+ (repudiation/tampering).
31
+ 9. **Resource exhaustion** — new unbounded loops/queries/uploads/allocations an
32
+ attacker controls (denial of service): missing pagination, no timeout, no
33
+ size cap.
34
+ 10. **Dependency risk** — a newly added dependency that is unmaintained,
35
+ typosquat-suspicious, or pulled for something the stdlib/project already does.
36
+ 11. **Error-path leaks** — stack traces, internal paths, or raw driver errors
37
+ surfaced to callers by the new error handling.
38
+ 12. **Crypto misuse** — home-rolled hashing/encryption, weak algorithms (MD5,
39
+ SHA1 for passwords), missing salts, static IVs in the diff.
@@ -0,0 +1,160 @@
1
+ # Reference — Stop Sequence, Usage Report, and Fresh-Session Resume
2
+
3
+ The token-saving heart of ORC. Load whenever a stop fires (batch
4
+ boundary, token pressure, phase transition worth guarding, or user request).
5
+
6
+ ## When a stop is MANDATORY vs a judgment call
7
+
8
+ Most stops are yours to judge (token pressure, a phase worth guarding, a user
9
+ request). **The batch boundary is NOT a judgment call — it is a hard gate.**
10
+ Waves are computed for every run regardless of dispatch style (sequential runs
11
+ have waves too — see `wave-grouping.md`), so the boundary binds to wave numbers
12
+ in both styles. After completing wave W, if `W % batch_pause_every == 0` **and at
13
+ least one wave remains** (`W < total_waves`), the stop sequence below is MANDATORY
14
+ and deterministic: **never dispatch wave W+1 past an unacknowledged boundary.** The
15
+ boundary is computed from the answered pause schedule at intake (Phase 2) and
16
+ stored as `pause_schedule` in the checkpoint, so a resumed session enforces the
17
+ same boundaries. Emit `GATE wave-boundary :: wave=W of K → STOP (batch_pause_every=N)`
18
+ before the stop. Token pressure and user request remain judgment; the batch
19
+ boundary is not.
20
+
21
+ ## The stop sequence (order is mandatory)
22
+
23
+ 1. **Decide** to stop (your judgment for token/phase/user stops; the batch
24
+ boundary above is not a decision but a hard gate). The checkpoint skill
25
+ never decides.
26
+ 2. **Write the checkpoint** into the run subfolder via
27
+ `subskills/orc-checkpoint/SKILL.md`. VALIDATE the
28
+ return. If the write fails → DO NOT STOP; surface the write failure instead.
29
+ Stopping without a good checkpoint is the one thing that loses work.
30
+ 3. **Update `run/{run-slug}/state-of-play.md`** — the 10-line human-readable re-anchor:
31
+ current phase, wave, done/pending tasks, last decision, next action.
32
+ 3b. **Write `{run_dir}/{run-slug}/RESUME.md`** — the same breath as steps 2–3,
33
+ by YOU, never a dispatched agent. Overwrite; never append. Shape below.
34
+ 4. **Usage report** (see below).
35
+ 5. **Generate the resume block** (see below) — regenerate FRESH at every stop,
36
+ never reuse an old one. It is printed inline AND is the body of `RESUME.md`.
37
+ 6. Tell the user: what's done / remaining, then BOTH continue paths:
38
+ "Reply **continue** here, or paste the block below in a **fresh session**
39
+ (recommended if this conversation is long — cheaper and cleaner than
40
+ dragging this context forward)."
41
+ 7. End the turn.
42
+
43
+ ## Usage report (at EVERY stop and ALSO at run completion)
44
+
45
+ Do NOT attempt to invoke `/usage` — it cannot be called programmatically.
46
+ Instead, at every stop and at run completion:
47
+ 1. Report the **dispatch log** you fully control: every subagent's model,
48
+ effort, and score. At completion, show the full per-task table (task, score
49
+ + override reason, model, effort) so the user sees where tokens went.
50
+ 2. **Remind the user to run `/usage` themselves** for their 5-hour and weekly
51
+ limit numbers: "Run `/usage` to see your remaining limits."
52
+
53
+ Never skip either part.
54
+
55
+ ## The resume block — printed inline AND written to `RESUME.md`
56
+
57
+ A fresh session + disk state is cheaper AND higher-fidelity than a long compacted
58
+ session: near-empty context, perfect state. Offer it proactively at every pause
59
+ once the run is more than ~2 waves old or usage is heavy — do not wait to be
60
+ forced.
61
+
62
+ **The problem this file fixes.** ORC used to print the block and nothing else. If
63
+ the user closed the window, got distracted, or came back three days later, the
64
+ work was safe (the checkpoint is on disk) but the *way back in* was gone.
65
+
66
+ ### Where it goes, and why there
67
+
68
+ ```
69
+ {run_dir}/{run-slug}/RESUME.md
70
+ ```
71
+
72
+ Inside the run folder — with `checkpoint.json` and `state-of-play.md`, where run
73
+ state has lived safely since v0.34.1 — **never at the project root**.
74
+ `/orc-quick` and `/orc-grill` put their docs at the root because those are
75
+ deliverables a human reads later. A resume prompt is *transient run state*: dead
76
+ the moment the run finishes, and it must never be at risk of being committed.
77
+ Discovery is `orc resume`'s job, not the filesystem's.
78
+
79
+ ### Lifecycle — the file existing IS the "unfinished" flag
80
+
81
+ - **Written at EVERY stop**, as the third write in the same breath as
82
+ `checkpoint.json` and `state-of-play.md`. ORC writes it itself — no dispatch.
83
+ A dispatch inside the stop sequence would mean a stop can fail because a
84
+ subagent did, at the one step whose entire job is not losing work.
85
+ - **ONE per run slug, always overwritten, never appended.** This is already the
86
+ protocol's rule above ("regenerated FRESH at every stop, never reuse an old
87
+ one"), because a stale resume block points at a wave that is already done. This
88
+ gives that rule a place on disk.
89
+ - **Deleted at `FINISH`** — in the same Phase 8 step that deletes
90
+ `log_dir/.current`. So a `RESUME.md` existing means **this run is still waiting
91
+ for you**, with no stale entries and no separate "is this consumed?"
92
+ bookkeeping.
93
+ - **NOT deleted when a resume merely starts.** If that session then dies, the
94
+ pointer must still be there.
95
+
96
+ ### Contents (deterministic — this shape, not an improvisation)
97
+
98
+ ```
99
+ Continue ORC run `merchant-notifications`.
100
+
101
+ Read .claude/orc/run/merchant-notifications/state-of-play.md,
102
+ then .claude/orc/run/merchant-notifications/checkpoint.json.
103
+ Resume from the checkpoint's phase and wave.
104
+ The intent-spec is approved — do not re-plan. Do not redo tasks marked done.
105
+
106
+ Where it stands: /orc · phase execution · wave 2 of 4 done
107
+ Done: T1, T2, T3, T5
108
+ Left: T4 (requeued — see failure_reason), T6, T7
109
+ Watch out for: T4 failed once on a missing migration; the gotcha is recorded
110
+ Next action: dispatch wave 3 (T6, T7)
111
+ ```
112
+
113
+ Every blank is a value you hold at that instant (phase, wave, task states,
114
+ failure reasons) — which is exactly why no model is needed to fill them in.
115
+
116
+ **Keep the `Where it stands:` line in exactly that shape** — lane, then phase,
117
+ then `wave K of N`, separated by ` · `. It is the ONE line `orc resume` and
118
+ `orc run list` parse, which is how they can list every waiting run without ever
119
+ opening a `checkpoint.json`. Prose elsewhere in the file is free-form.
120
+
121
+ ### Always tell the user both paths
122
+
123
+ ```
124
+ Paused after wave 2 of 4.
125
+
126
+ To continue in a NEW session (cheaper and cleaner than this long one):
127
+ open a fresh session and paste the contents of
128
+
129
+ .claude/orc/run/merchant-notifications/RESUME.md
130
+ (or just run `orc resume` and pick it from the list)
131
+
132
+ Or reply `continue` here.
133
+ ```
134
+
135
+ Name the path AND the command. A user who lost the chat has neither the block nor
136
+ the slug in front of them.
137
+
138
+ ## Compaction-proofing (always on, not just at stops)
139
+
140
+ - **Disk is truth.** Everything needed to continue lives in `run/` files you
141
+ created: intent-spec, checkpoint, state-of-play, decision log. Conversation
142
+ is a disposable cache.
143
+ - Write the checkpoint EAGERLY: after every wave, every escalation answer,
144
+ every phase transition — so a surprise compaction never catches state that
145
+ exists only in conversation.
146
+ - On ANY suspicion of compaction (context feels summarized, details missing):
147
+ re-read state-of-play → checkpoint → re-anchor BEFORE acting.
148
+
149
+ ## Resume procedure (both paths: "continue" here, or fresh session)
150
+
151
+ 1. Read `run/{run-slug}/state-of-play.md` (one-glance orientation).
152
+ 2. Read the newest valid checkpoint (`updated_at` wins).
153
+ 3. One-line intent reconfirm (fresh session only): "Resuming: <scope>. Still
154
+ correct?"
155
+ 4. From task_state: done stays done; partial resumes from
156
+ `progress.files_written` (last milestone); pending awaits its wave;
157
+ requeued/failed re-dispatch reading `failure_reason`; stale_review gets a
158
+ review pass.
159
+ 5. Re-attach the decision log, regenerate the digest, continue from the
160
+ checkpoint's phase.