@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,1934 @@
1
+ "use strict";
2
+ /* fixtures/extra.js — canned `orc extra … --json` for `orc ui --fixtures`.
3
+
4
+ ONE OF EVERY STATE, including the ugly ones — you cannot design a `7 of 10
5
+ wrong attempts` chip on a vault nobody has ever mistyped, and you cannot
6
+ design the deleted-key card at all without deleting a key.
7
+
8
+ Covered here: no key in the environment · never tested · tested and answering
9
+ · tested too long ago · a key stored in the vault with a clean counter · the
10
+ same with the counter part-used · a key the vault DELETED · a connection whose
11
+ engine binary is missing · a stale catalog · overlapping route rows · a routed
12
+ model the provider no longer lists.
13
+
14
+ Shapes MUST match what `bin/cli.js --json` really emits. */
15
+
16
+ // `orc extra providers --json`. The catalog ships DATED and the fixture is
17
+ // deliberately past its staleness edge, because the warning banner is the half
18
+ // that needs designing — "recently dated" needs no design at all.
19
+ const extraProviders = {
20
+ ok: true,
21
+ path: "bin/providers.json",
22
+ as_of: "2026-02-11",
23
+ age_days: 192,
24
+ stale: true,
25
+ stale_after_days: 90,
26
+ models: "never shipped — `orc extra ping` reads them from the provider",
27
+ providers: [
28
+ {
29
+ id: "deepseek",
30
+ label: "DeepSeek",
31
+ engines: ["api", "claude-shim"],
32
+ api_base: "https://api.deepseek.com",
33
+ anthropic_base: "https://api.deepseek.com/anthropic",
34
+ auth_env: "ANTHROPIC_AUTH_TOKEN",
35
+ env_key_default: "DEEPSEEK_API_KEY",
36
+ models_path: "/v1/models",
37
+ context_tokens: null,
38
+ regions: [],
39
+ docs_url: "https://api-docs.deepseek.com/quick_start/agent_integrations/claude_code/",
40
+ terms_url: "https://platform.deepseek.com/downloads/DeepSeek%20Open%20Platform%20Terms%20of%20Service.html",
41
+ notes: "Peak / off-peak rates differ; the off-peak window is the cheap one.",
42
+ },
43
+ {
44
+ id: "zai",
45
+ label: "Z.ai (GLM)",
46
+ engines: ["api", "claude-shim"],
47
+ api_base: "https://api.z.ai/api/paas/v4",
48
+ anthropic_base: "https://api.z.ai/api/anthropic",
49
+ auth_env: "ANTHROPIC_AUTH_TOKEN",
50
+ env_key_default: "ZAI_API_KEY",
51
+ models_path: "/models",
52
+ context_tokens: null,
53
+ regions: [],
54
+ docs_url: "https://docs.z.ai/scenario-example/develop-tools/claude",
55
+ terms_url: "https://z.ai/terms",
56
+ notes: null,
57
+ },
58
+ {
59
+ // A provider with REGIONS, so the region line is designable.
60
+ id: "minimax",
61
+ label: "MiniMax",
62
+ engines: ["api", "claude-shim"],
63
+ api_base: "https://api.minimax.io/v1",
64
+ anthropic_base: "https://api.minimax.io/anthropic",
65
+ auth_env: "ANTHROPIC_AUTH_TOKEN",
66
+ env_key_default: "MINIMAX_API_KEY",
67
+ models_path: "/models",
68
+ context_tokens: null,
69
+ regions: [{ id: "cn", label: "mainland China" }],
70
+ docs_url: "https://platform.minimax.io/docs/token-plan/claude-code",
71
+ terms_url: "https://www.minimax.io/platform/protocol/terms-of-service",
72
+ notes: null,
73
+ },
74
+ {
75
+ // A provider with NO links at all — the tile has to survive that.
76
+ id: "ollama",
77
+ label: "Ollama (local)",
78
+ engines: ["api", "claude-shim"],
79
+ api_base: "http://localhost:11434",
80
+ anthropic_base: "http://localhost:11434",
81
+ auth_env: null,
82
+ env_key_default: null,
83
+ models_path: "/v1/models",
84
+ context_tokens: null,
85
+ regions: [],
86
+ docs_url: null,
87
+ terms_url: null,
88
+ notes: "Runs on this machine. Nothing leaves it.",
89
+ },
90
+ {
91
+ id: "custom",
92
+ label: "Custom endpoint",
93
+ engines: ["api", "claude-shim", "cli"],
94
+ api_base: null,
95
+ anthropic_base: null,
96
+ auth_env: "ANTHROPIC_AUTH_TOKEN",
97
+ env_key_default: null,
98
+ models_path: "/v1/models",
99
+ context_tokens: null,
100
+ regions: [],
101
+ docs_url: null,
102
+ terms_url: null,
103
+ notes: "Anything that speaks either protocol. You supply the base URL.",
104
+ },
105
+ ],
106
+ };
107
+
108
+ // One profile per state. `credential.vault` is null on an env-sourced profile
109
+ // and an object on a vaulted one — those are DIFFERENT facts and the panel must
110
+ // never flatten them together.
111
+ const extraProfiles = [
112
+ {
113
+ // Verified, answering, key in the environment: the healthy one.
114
+ name: "cheap",
115
+ provider: "deepseek",
116
+ engine: "api",
117
+ region: "default",
118
+ cli: null,
119
+ base_url: "https://api.deepseek.com",
120
+ anthropic_base_url: "https://api.deepseek.com/anthropic",
121
+ completions_path: null,
122
+ auth_env: "ANTHROPIC_AUTH_TOKEN",
123
+ credential: { source: "env", key_name: "DEEPSEEK_API_KEY", present: true, vault: null },
124
+ verified_at: "2026-08-21T09:14:02.881Z",
125
+ // v0.52.0 — THE PASSPHRASE DEADLINE, computed by the CLI on read. One
126
+ // fixture per state including the ugly ones: you cannot design an EXPIRED
127
+ // chip, or the "not saved" one a run STOPS on, on a connection that is fine.
128
+ session: null,
129
+ verify_method: "models",
130
+ verify_base_url: "https://api.deepseek.com",
131
+ latency_ms: 412,
132
+ models_seen: ["deepseek-chat", "deepseek-reasoner"],
133
+ model_map: null,
134
+ tool_fidelity: { streams: true, tool_round_trip: true, cache_control: false },
135
+ privacy: null,
136
+ notes: null,
137
+ },
138
+ {
139
+ // Verified once, too long ago. `extra-stale-verify` is the finding that
140
+ // makes the chip amber — the panel never computes that itself.
141
+ name: "glm",
142
+ provider: "zai",
143
+ engine: "claude-shim",
144
+ region: "default",
145
+ cli: null,
146
+ base_url: "https://api.z.ai/api/paas/v4",
147
+ anthropic_base_url: "https://api.z.ai/api/anthropic",
148
+ completions_path: null,
149
+ auth_env: "ANTHROPIC_AUTH_TOKEN",
150
+ credential: { source: "vault", key_name: "glm", present: true, vault: { state: "stored", attempts_used: 0, wiped_at: null } },
151
+ verified_at: "2026-07-30T16:41:55.002Z",
152
+ session: { state: "ACTIVE", days_left: 27, expires_at: "2026-09-18T09:14:00.000Z", ttl_days: 30, created_at: "2026-08-19T09:14:00.000Z", last_used_at: "2026-08-22T07:40:00.000Z" },
153
+ verify_method: "completion",
154
+ verify_base_url: "https://api.z.ai/api/anthropic",
155
+ latency_ms: 1980,
156
+ models_seen: ["glm-4.6", "glm-4.5-air"],
157
+ model_map: null,
158
+ tool_fidelity: null,
159
+ privacy: null,
160
+ notes: null,
161
+ },
162
+ {
163
+ // A vault the user has mistyped into. THE COUNTDOWN toward a destructive
164
+ // action is the whole reason this state has a fixture.
165
+ name: "kimi",
166
+ provider: "moonshot",
167
+ engine: "api",
168
+ region: "cn",
169
+ cli: null,
170
+ base_url: "https://api.moonshot.cn/v1",
171
+ anthropic_base_url: "https://api.moonshot.cn/anthropic",
172
+ completions_path: null,
173
+ auth_env: "ANTHROPIC_AUTH_TOKEN",
174
+ credential: { source: "vault", key_name: "kimi", present: true, vault: { state: "stored", attempts_used: 7, wiped_at: null } },
175
+ verified_at: "2026-08-20T11:02:10.114Z",
176
+ session: { state: "EXPIRING", days_left: 2, expires_at: "2026-08-24T09:14:00.000Z", ttl_days: 7, created_at: "2026-08-17T09:14:00.000Z", last_used_at: null },
177
+ verify_method: "models",
178
+ verify_base_url: "https://api.moonshot.cn/v1",
179
+ latency_ms: 733,
180
+ models_seen: ["kimi-k2-0905-preview"],
181
+ model_map: null,
182
+ tool_fidelity: null,
183
+ privacy: null,
184
+ notes: null,
185
+ },
186
+ {
187
+ // The vault DELETED this one on purpose. `present: false` and a tombstone.
188
+ name: "burned",
189
+ provider: "stepfun",
190
+ engine: "api",
191
+ region: "default",
192
+ cli: null,
193
+ base_url: "https://api.stepfun.com/v1",
194
+ anthropic_base_url: "https://api.stepfun.com/anthropic",
195
+ completions_path: null,
196
+ auth_env: "ANTHROPIC_AUTH_TOKEN",
197
+ credential: { source: "vault", key_name: "burned", present: false, vault: { state: "wiped", attempts_used: 10, wiped_at: "2026-08-18T20:55:03.900Z" } },
198
+ verified_at: "2026-08-01T08:20:00.000Z",
199
+ session: { state: "EXPIRED", days_left: 0, expires_at: "2026-08-18T09:14:00.000Z", ttl_days: 14, created_at: "2026-08-04T09:14:00.000Z", last_used_at: "2026-08-16T11:00:00.000Z" },
200
+ verify_method: "models",
201
+ verify_base_url: "https://api.stepfun.com/v1",
202
+ latency_ms: 610,
203
+ models_seen: [],
204
+ model_map: null,
205
+ tool_fidelity: null,
206
+ privacy: null,
207
+ notes: null,
208
+ },
209
+ {
210
+ // A VAULTED KEY WITH NO SAVED PASSPHRASE — verified, routed, and the state a
211
+ // run STOPS on before wave 1. This is the connection the reported failure
212
+ // was: green everywhere the panel looked, and locked the moment work
213
+ // started. `not saved` KEEPS ITS SLOT for exactly that reason.
214
+ name: "glm-air",
215
+ provider: "zai",
216
+ engine: "api",
217
+ region: "default",
218
+ cli: null,
219
+ base_url: "https://api.z.ai/api/paas/v4",
220
+ anthropic_base_url: "https://api.z.ai/api/anthropic",
221
+ completions_path: null,
222
+ auth_env: "ANTHROPIC_AUTH_TOKEN",
223
+ credential: { source: "vault", key_name: "glm-air", present: true, vault: { state: "stored", attempts_used: 0, wiped_at: null } },
224
+ verified_at: "2026-08-21T18:02:00.000Z",
225
+ verify_method: "models",
226
+ verify_base_url: "https://api.z.ai/api/paas/v4",
227
+ session: { state: "ABSENT", days_left: null, expires_at: null, ttl_days: null, created_at: null, last_used_at: null },
228
+ latency_ms: 810,
229
+ models_seen: ["glm-4.5-air"],
230
+ model_map: null,
231
+ tool_fidelity: null,
232
+ privacy: null,
233
+ notes: null,
234
+ },
235
+ {
236
+ // Never tested, and the variable it reads is not set in this environment.
237
+ // Two separate failures on one row, which is exactly how it looks in life.
238
+ name: "router",
239
+ provider: "openrouter",
240
+ engine: "api",
241
+ region: "default",
242
+ cli: null,
243
+ base_url: "https://openrouter.ai/api/v1",
244
+ anthropic_base_url: null,
245
+ completions_path: null,
246
+ auth_env: "ANTHROPIC_AUTH_TOKEN",
247
+ credential: { source: "env", key_name: "OPENROUTER_API_KEY", present: false, vault: null },
248
+ verified_at: null,
249
+ session: null,
250
+ verify_method: null,
251
+ verify_base_url: null,
252
+ latency_ms: null,
253
+ models_seen: [],
254
+ model_map: null,
255
+ // The one engine that can carry a policy at all.
256
+ privacy: { zdr: true, data_collection: "deny", allow_fallbacks: false },
257
+ notes: null,
258
+ },
259
+ {
260
+ // v0.52.0 — THE THIRD CREDENTIAL SOURCE. The tool signs itself in, so ORC
261
+ // holds no key at all: no variable to set, no vault, no passphrase and no
262
+ // deadline. This is the profile the panel could not create until the add
263
+ // form grew its third radio, and it is the one a locked run never should
264
+ // have had.
265
+ name: "oc-tool",
266
+ provider: "opencode",
267
+ engine: "cli",
268
+ region: "default",
269
+ cli: { bin: "opencode", agent: "build", attach: null, args: [] },
270
+ base_url: null,
271
+ anthropic_base_url: null,
272
+ completions_path: null,
273
+ auth_env: null,
274
+ credential: { source: "tool", key_name: null, present: true, vault: null },
275
+ verified_at: "2026-08-22T13:21:58.522Z",
276
+ session: null,
277
+ verify_method: "cli-live",
278
+ verify_base_url: "/usr/local/bin/opencode",
279
+ latency_ms: 2140,
280
+ models_seen: ["opencode/big-pickle"],
281
+ model_map: null,
282
+ tool_fidelity: null,
283
+ privacy: null,
284
+ notes: null,
285
+ },
286
+ {
287
+ // CONNECTED AND NEVER TESTED, against a tool that is installed and ready.
288
+ // The card for this is not the Connect card and it is not the verified
289
+ // card — it is the one that says "test it before ORC routes work here".
290
+ name: "toole-new",
291
+ provider: "toole",
292
+ engine: "cli",
293
+ region: "default",
294
+ cli: { bin: "toole", agent: null, attach: null, args: [] },
295
+ base_url: null,
296
+ anthropic_base_url: null,
297
+ completions_path: null,
298
+ auth_env: null,
299
+ credential: { source: "tool", key_name: null, present: true, vault: null },
300
+ verified_at: null,
301
+ session: null,
302
+ verify_method: null,
303
+ verify_base_url: null,
304
+ latency_ms: null,
305
+ models_seen: [],
306
+ model_map: null,
307
+ tool_fidelity: null,
308
+ privacy: null,
309
+ notes: null,
310
+ },
311
+ {
312
+ // Engine `cli`, whose binary is not on PATH. Verified means "the binary was
313
+ // there once", which is why the CLI gives it its own verify_method.
314
+ name: "local-cli",
315
+ provider: "custom",
316
+ engine: "cli",
317
+ region: "default",
318
+ cli: { bin: "opencode", agent: "build", attach: null, args: [] },
319
+ base_url: null,
320
+ anthropic_base_url: null,
321
+ completions_path: null,
322
+ auth_env: null,
323
+ credential: { source: "env", key_name: "OPENCODE_API_KEY", present: true, vault: null },
324
+ verified_at: "2026-08-19T07:31:44.000Z",
325
+ session: null,
326
+ verify_method: "cli-bin",
327
+ verify_base_url: "/usr/local/bin/opencode",
328
+ latency_ms: null,
329
+ models_seen: [],
330
+ model_map: null,
331
+ tool_fidelity: null,
332
+ privacy: null,
333
+ notes: null,
334
+ },
335
+ ];
336
+
337
+ // `orc extra list --json`. The routes ride along here (the resolver reads both
338
+ // halves out of one ledger), and two of them OVERLAP on purpose.
339
+ const extraList = {
340
+ ok: true,
341
+ ledger: ".claude/orc/extra.json",
342
+ exists: true,
343
+ catalog_as_of: "2026-02-11",
344
+ catalog_stale: true,
345
+ profiles: extraProfiles,
346
+ routes: [
347
+ { from: 0, to: 30, profile: "cheap", model: "deepseek-chat", small_model: null, max_turns: null },
348
+ { from: 30, to: 55, profile: "glm", model: "glm-4.6", small_model: null, max_turns: null },
349
+ // Overlaps the row above — the resolver takes the first match, which is not
350
+ // a decision anybody made.
351
+ { from: 50, to: 60, profile: "kimi", model: "kimi-k2-0905-preview", small_model: null, max_turns: 12 },
352
+ // Routed to a model the last ping did not list.
353
+ { from: 60, to: 70, profile: "cheap", model: "deepseek-coder", small_model: null, max_turns: null },
354
+ ],
355
+ counts: { profiles: 9, verified: 7, credential_present: 7 },
356
+ // v0.51.0 — THE SETUP GATE, as the CLI computes it. This fixture set has
357
+ // verified connections, so the gate is open and every card below it renders;
358
+ // `extraListUnconnected` below is the same object with the gate SHUT, which is
359
+ // the only way the two floors are designable at all.
360
+ gate: { connected: true, floor: null, profiles: 9, verified: 7, why: null, next: null },
361
+ extra_enabled: true,
362
+ };
363
+
364
+ // THE GATE, SHUT — and one fixture per FLOOR, because the two say different
365
+ // things: "nothing is connected" asks for an install or a key, and "nothing has
366
+ // answered" asks for a test. You cannot design either without reaching it.
367
+ const extraListNoConnection = {
368
+ ...extraList,
369
+ profiles: [],
370
+ routes: [],
371
+ counts: { profiles: 0, verified: 0, credential_present: 0 },
372
+ gate: {
373
+ connected: false,
374
+ floor: "no-connection",
375
+ profiles: 0,
376
+ verified: 0,
377
+ why: "no connection has been configured at all.",
378
+ next: "orc extra add <name> --provider <id> --engine api --env-key <VAR>",
379
+ },
380
+ extra_enabled: false,
381
+ };
382
+ const extraListNeverTested = {
383
+ ...extraList,
384
+ profiles: extraProfiles.filter((p) => !p.verified_at),
385
+ routes: [],
386
+ counts: { profiles: 1, verified: 0, credential_present: 0 },
387
+ gate: {
388
+ connected: false,
389
+ floor: "never-tested",
390
+ profiles: 1,
391
+ verified: 0,
392
+ why: "1 connection configured and not one of them has ever answered.",
393
+ // The command NAMES the profile this fixture actually carries. A fixture
394
+ // that disagrees with itself is worse than no fixture — it teaches the
395
+ // designer a shape the CLI never produces.
396
+ next: "orc extra ping " + extraProfiles.filter((p) => !p.verified_at)[0].name,
397
+ },
398
+ extra_enabled: false,
399
+ };
400
+
401
+ /* `orc extra tools --json` — ONE OF EVERY STATE, INCLUDING THE UGLY ONES. You
402
+ cannot design the "it is not installed" box on a machine where it is
403
+ installed, and you cannot design the two alternatives — a provider that has an
404
+ install-free route and one that has NONE — without both being on screen at
405
+ once. All four states are here for that reason, and a test asserts one fixture
406
+ per state so a new state cannot ship without one. */
407
+ const extraTools = {
408
+ ok: true,
409
+ as_of: "2026-02-11",
410
+ age_days: 192,
411
+ stale: true,
412
+ platform: "darwin",
413
+ states: ["absent", "outdated", "unauthenticated", "ready"],
414
+ ready: true,
415
+ tools: [
416
+ {
417
+ // READY, signed in, with a real model count — the only state that offers a
418
+ // Connect button.
419
+ provider: "opencode",
420
+ label: "OpenCode",
421
+ bin: "opencode",
422
+ state: "ready",
423
+ // v0.52.0 — READY IS NOT UNCONNECTED. This row is what the "connected as"
424
+ // card is designed on, and it is why there is no Connect button on it.
425
+ connected_profiles: [{ name: "oc-tool", verified_at: "2026-08-22T13:21:58.522Z", credential_source: "tool" }],
426
+ connected: true,
427
+ verified: true,
428
+ installed: true,
429
+ bin_path: "/usr/local/bin/opencode",
430
+ version: "1.17.4",
431
+ version_raw: "1.17.4",
432
+ min_version: "1.10.0",
433
+ outdated: false,
434
+ authed: true,
435
+ auth_detail: "1 credential",
436
+ models_count: 19,
437
+ models: ["opencode/big-pickle", "opencode-go/glm-5", "opencode-go/kimi-k2.6"],
438
+ probe_error: null,
439
+ no_install_alternative: "opencode-zen",
440
+ docs_url: "https://opencode.ai/docs/cli/",
441
+ install: {
442
+ docs_url: "https://opencode.ai/docs/",
443
+ bin_name: "opencode",
444
+ platform: "darwin",
445
+ cmds: [
446
+ { manager: "npm", platforms: ["win32", "darwin", "linux"], cmd: "npm i -g opencode-ai" },
447
+ { manager: "script", platforms: ["darwin", "linux"], cmd: "curl -fsSL https://opencode.ai/install | bash" },
448
+ ],
449
+ all_cmds: [
450
+ { manager: "npm", platforms: ["win32", "darwin", "linux"], cmd: "npm i -g opencode-ai" },
451
+ { manager: "script", platforms: ["darwin", "linux"], cmd: "curl -fsSL https://opencode.ai/install | bash" },
452
+ ],
453
+ },
454
+ },
455
+ {
456
+ // ABSENT, and with NO install-free alternative. `null` must render as the
457
+ // honest sentence and never as an empty slot — the two are different
458
+ // facts and this is the row that proves the renderer knows it.
459
+ provider: "codex",
460
+ connected_profiles: [],
461
+ connected: false,
462
+ verified: false,
463
+ label: "Codex",
464
+ bin: "codex",
465
+ state: "absent",
466
+ installed: false,
467
+ bin_path: null,
468
+ version: null,
469
+ version_raw: null,
470
+ min_version: null,
471
+ outdated: false,
472
+ authed: null,
473
+ auth_detail: null,
474
+ models_count: null,
475
+ models: [],
476
+ probe_error: null,
477
+ no_install_alternative: null,
478
+ docs_url: "https://developers.openai.com/codex/cli",
479
+ install: {
480
+ docs_url: "https://developers.openai.com/codex/cli",
481
+ bin_name: "codex",
482
+ platform: "darwin",
483
+ cmds: [
484
+ { manager: "npm", platforms: ["win32", "darwin", "linux"], cmd: "npm i -g @openai/codex" },
485
+ { manager: "brew", platforms: ["darwin"], cmd: "brew install --cask codex" },
486
+ ],
487
+ all_cmds: [
488
+ { manager: "npm", platforms: ["win32", "darwin", "linux"], cmd: "npm i -g @openai/codex" },
489
+ { manager: "brew", platforms: ["darwin"], cmd: "brew install --cask codex" },
490
+ { manager: "winget", platforms: ["win32"], cmd: "winget install OpenAI.Codex" },
491
+ ],
492
+ },
493
+ },
494
+ {
495
+ // OUTDATED — installed, and the two versions side by side, which is the
496
+ // whole content of that box.
497
+ provider: "toolc",
498
+ connected_profiles: [],
499
+ connected: false,
500
+ verified: false,
501
+ label: "Tool C",
502
+ bin: "toolc",
503
+ state: "outdated",
504
+ installed: true,
505
+ bin_path: "/opt/toolc/bin/toolc",
506
+ version: "0.9.1",
507
+ version_raw: "toolc version 0.9.1",
508
+ min_version: "1.4.0",
509
+ outdated: true,
510
+ authed: null,
511
+ auth_detail: null,
512
+ models_count: null,
513
+ models: [],
514
+ probe_error: null,
515
+ no_install_alternative: null,
516
+ docs_url: null,
517
+ install: {
518
+ docs_url: null,
519
+ bin_name: "toolc",
520
+ platform: "darwin",
521
+ cmds: [{ manager: "npm", platforms: ["darwin"], cmd: "npm i -g toolc@latest" }],
522
+ all_cmds: [{ manager: "npm", platforms: ["darwin"], cmd: "npm i -g toolc@latest" }],
523
+ },
524
+ },
525
+ {
526
+ // UNAUTHENTICATED, and a version ORC could not parse — which must read as
527
+ // "unknown" and never as "too old" (an unusual install method is not a
528
+ // broken one). Its model probe also timed out, so the box carries a real
529
+ // probe error.
530
+ provider: "toold",
531
+ connected_profiles: [],
532
+ connected: false,
533
+ verified: false,
534
+ label: "Tool D",
535
+ bin: "toold",
536
+ state: "unauthenticated",
537
+ installed: true,
538
+ bin_path: "/usr/bin/toold",
539
+ version: null,
540
+ version_raw: "toold (build 2026-02-01, channel stable)",
541
+ min_version: "2.0.0",
542
+ outdated: false,
543
+ authed: false,
544
+ auth_detail: "no credentials found",
545
+ models_count: null,
546
+ models: [],
547
+ probe_error: "the model list did not answer in time",
548
+ no_install_alternative: null,
549
+ docs_url: null,
550
+ install: { docs_url: null, bin_name: "toold", platform: "darwin", cmds: [], all_cmds: [] },
551
+ },
552
+ {
553
+ // READY, and CONNECTED BUT NEVER TESTED — the state between "connect me"
554
+ // and "connected as". It gets a Test button and no Connect button, because
555
+ // another connection is not what this card is missing.
556
+ provider: "toole",
557
+ label: "Tool E",
558
+ bin: "toole",
559
+ state: "ready",
560
+ connected_profiles: [{ name: "toole-new", verified_at: null, credential_source: "tool" }],
561
+ connected: true,
562
+ verified: false,
563
+ installed: true,
564
+ bin_path: "/usr/local/bin/toole",
565
+ version: "3.2.0",
566
+ version_raw: "toole 3.2.0",
567
+ min_version: "3.0.0",
568
+ outdated: false,
569
+ authed: true,
570
+ auth_detail: "1 credential",
571
+ models_count: 4,
572
+ models: ["toole/one", "toole/two"],
573
+ probe_error: null,
574
+ no_install_alternative: null,
575
+ docs_url: null,
576
+ install: { docs_url: null, bin_name: "toole", platform: "darwin", cmds: [], all_cmds: [] },
577
+ },
578
+ ],
579
+ };
580
+
581
+ // `orc extra keyhelp --json` — the three routes, so all three boxes are
582
+ // designable. `env_var` is non-null exactly on the `env` route.
583
+ const extraKeyhelp = {
584
+ env: {
585
+ ok: true,
586
+ profile: "local",
587
+ provider: "opencode",
588
+ engine: "cli",
589
+ routes: ["env", "stdin-login", "interactive-login", "none"],
590
+ route: "env",
591
+ env_var: "DEEPSEEK_API_KEY",
592
+ needs_terminal: false,
593
+ cmd: null,
594
+ why: "nothing to set up. ORC puts the key in this tool's environment for every probe and every dispatch.",
595
+ note: null,
596
+ never: "ORC never writes another tool's credential store, and never puts a key in argv.",
597
+ // v0.52.0 — the per-OS instruction, PLACEHOLDER only. You cannot design this
598
+ // box on a machine whose platform you are not on, which is why it is canned.
599
+ env_set: {
600
+ platform: "darwin",
601
+ session: 'export DEEPSEEK_API_KEY="<your key>"',
602
+ persist: "echo 'export DEEPSEEK_API_KEY=\"<your key>\"' >> ~/.zshrc",
603
+ persist_note: "a new shell picks it up; the one you are in does not. This writes the value in PLAINTEXT to ~/.zshrc.",
604
+ shell_file: "~/.zshrc",
605
+ warning: null,
606
+ },
607
+ passphrase_env: null,
608
+ key_env: null,
609
+ vault_unlock: null,
610
+ },
611
+ login: {
612
+ ok: true,
613
+ profile: "toold",
614
+ provider: "toold",
615
+ engine: "cli",
616
+ routes: ["env", "stdin-login", "interactive-login", "none"],
617
+ route: "interactive-login",
618
+ env_var: null,
619
+ needs_terminal: true,
620
+ cmd: "toold auth login",
621
+ why: "this tool's login always prompts and cannot be driven non-interactively.",
622
+ note: null,
623
+ never: "ORC never writes another tool's credential store, and never puts a key in argv.",
624
+ },
625
+ };
626
+
627
+ // `orc extra models --json` — a LIST entry with real groups, so the grouped
628
+ // dropdown is designable, plus the FREE-TEXT answer so the other shape is too.
629
+ const extraModels = {
630
+ list: {
631
+ ok: true,
632
+ profile: "local",
633
+ provider: "opencode",
634
+ engine: "cli",
635
+ entry: "list",
636
+ source: "opencode models",
637
+ refreshed_at: "2026-08-20T10:00:00.000Z",
638
+ stale_days: 2,
639
+ models: [
640
+ { id: "opencode/big-pickle", label: "big-pickle", group: "opencode", name_says_free: false },
641
+ { id: "opencode/deepseek-v4-flash-free", label: "deepseek-v4-flash-free", group: "opencode", name_says_free: true },
642
+ { id: "opencode-go/glm-5", label: "glm-5", group: "opencode-go", name_says_free: false },
643
+ { id: "opencode-go/kimi-k2.6", label: "kimi-k2.6", group: "opencode-go", name_says_free: false },
644
+ ],
645
+ model_ids: ["opencode/big-pickle", "opencode/deepseek-v4-flash-free", "opencode-go/glm-5", "opencode-go/kimi-k2.6"],
646
+ reports_model: false,
647
+ verified_at: "2026-08-20T10:00:00.000Z",
648
+ verify_method: "cli-models",
649
+ verify_state: "VERIFIED",
650
+ verify_age_days: 2,
651
+ key_error: null,
652
+ refresh: null,
653
+ test: null,
654
+ caveat: "this is what the provider OFFERS. A listed id can still be dead upstream.",
655
+ hint: null,
656
+ },
657
+ freeText: {
658
+ ok: true,
659
+ profile: "custom",
660
+ provider: "custom",
661
+ engine: "api",
662
+ entry: "free-text",
663
+ source: null,
664
+ refreshed_at: null,
665
+ stale_days: null,
666
+ models: [],
667
+ model_ids: [],
668
+ reports_model: true,
669
+ verified_at: null,
670
+ verify_method: null,
671
+ verify_state: "UNVERIFIED",
672
+ verify_age_days: null,
673
+ key_error: null,
674
+ refresh: null,
675
+ test: null,
676
+ caveat: "this is what the provider OFFERS. A listed id can still be dead upstream.",
677
+ hint: "no model has been read from this provider yet.",
678
+ },
679
+ };
680
+
681
+ // `orc extra doctor --json`. Every finding class the CLI can emit, including
682
+ // the two that are NOT fixable and must say so rather than offering a button.
683
+ const extraDoctor = {
684
+ ok: false,
685
+ findings: [
686
+ {
687
+ id: "extra-catalog-stale",
688
+ severity: "warn",
689
+ message: "the shipped provider catalog is dated 2026-02-11 (192 days) — a base URL may have moved.",
690
+ as_of: "2026-02-11",
691
+ age_days: 192,
692
+ },
693
+ {
694
+ id: "extra-stale-verify",
695
+ severity: "warn",
696
+ message: '"glm" last verified 22d ago (> extra_verify_max_days 7) — it still routes, and re-pings before wave 1.',
697
+ profile: "glm",
698
+ age_days: 22,
699
+ },
700
+ {
701
+ id: "extra-vault-attempts",
702
+ severity: "warn",
703
+ message: '"kimi" has 7 failed passphrase attempts recorded — a correct unlock resets the count.',
704
+ profile: "kimi",
705
+ attempts_used: 7,
706
+ },
707
+ {
708
+ id: "extra-vault-wiped",
709
+ severity: "warn",
710
+ message: '"burned" had its stored key deleted after 10 wrong passphrase attempts. Paste a new key from your provider.',
711
+ profile: "burned",
712
+ wiped_at: "2026-08-18T20:55:03.900Z",
713
+ },
714
+ {
715
+ id: "extra-unverified",
716
+ severity: "warn",
717
+ message: '"router" has never verified — nothing will route to it.',
718
+ profile: "router",
719
+ },
720
+ {
721
+ id: "extra-missing-key",
722
+ severity: "warn",
723
+ message: '"router" reads OPENROUTER_API_KEY, which is not set in this environment.',
724
+ profile: "router",
725
+ source: "env",
726
+ },
727
+ {
728
+ id: "extra-engine-unavailable",
729
+ severity: "warn",
730
+ message: '"local-cli" uses engine cli, but "opencode" is not on PATH.',
731
+ profile: "local-cli",
732
+ engine: "cli",
733
+ },
734
+ {
735
+ // NOT FIXABLE. The install pepper is one of the two halves of the key and
736
+ // cannot be regenerated, so the panel must say so rather than offer a fix
737
+ // that cannot work.
738
+ id: "extra-pepper-missing",
739
+ severity: "warn",
740
+ message:
741
+ '"burned" is encrypted against the install pepper at ~/.claude/orc/extra-pepper, which is gone. The stored key CANNOT be recovered — paste a new one.',
742
+ profile: "burned",
743
+ fixable: false,
744
+ },
745
+ {
746
+ id: "extra-route-overlap",
747
+ severity: "warn",
748
+ message:
749
+ "route rows 30-55 and 50-60 overlap — the resolver takes the first match, which is not a decision anybody made.",
750
+ rows: ["30-55", "50-60"],
751
+ },
752
+ {
753
+ id: "extra-model-gone",
754
+ severity: "warn",
755
+ message:
756
+ '60-70 routes to "deepseek-coder", which the last ping of "cheap" did not list. A vanished model is a 404 in the middle of a wave.',
757
+ band: "60-70",
758
+ profile: "cheap",
759
+ model: "deepseek-coder",
760
+ },
761
+ ],
762
+ };
763
+
764
+ // `orc extra route --json`. The Claude fall-through is ALWAYS carried, split at
765
+ // the resolving Claude table's own edges, so a gap renders as the agent it
766
+ // actually resolves to. `extra_enabled` is true here — an ARMED table is the
767
+ // state that needs designing, and the CLI's own inert-note is the other one.
768
+ const extraRoute = {
769
+ ok: true,
770
+ extra_enabled: true,
771
+ claude_table: "default",
772
+ rows: [
773
+ {
774
+ from: 0, to: 30, band: "[0,30)", range: "scores 0 to 29", meaning: "mechanical work in one or two files, with no new logic", via: "extra",
775
+ profile: "cheap", model: "deepseek-chat", small_model: null, max_turns: null,
776
+ engine: "api", provider: "deepseek", verify_state: "VERIFIED", model_known: true,
777
+ },
778
+ {
779
+ from: 30, to: 55, band: "[30,55)", range: "scores 30 to 54", meaning: "a few files, following a pattern this repo already has", via: "extra",
780
+ profile: "glm", model: "glm-4.6", small_model: null, max_turns: null,
781
+ engine: "claude-shim", provider: "zai", verify_state: "STALE", model_known: true,
782
+ },
783
+ { from: 55, to: 65, band: "[55,65)", range: "scores 55 to 64", meaning: "several files, or a new surface, or logic that carries state", via: "claude", agent: "orc-executor-sonnet-5-high" },
784
+ {
785
+ // A routed model the last ping did not list — the state that becomes a
786
+ // 404 in the middle of a wave if nothing shows it first.
787
+ from: 65, to: 70, band: "[65,70)", range: "scores 65 to 69", meaning: "several files, or a new surface, or logic that carries state", via: "extra",
788
+ profile: "cheap", model: "deepseek-coder", small_model: null, max_turns: null,
789
+ engine: "api", provider: "deepseek", verify_state: "VERIFIED", model_known: false,
790
+ },
791
+ { from: 70, to: 80, band: "[70,80)", range: "scores 70 to 79", meaning: "wide reach or genuinely new work (a cited risk floors a task to 70, so it lands here or above)", via: "claude", agent: "orc-executor-opus-4-7-high" },
792
+ { from: 80, to: 90, band: "[80,90)", range: "scores 80 to 89", meaning: "wide reach or genuinely new work (a cited risk floors a task to 70, so it lands here or above) — ranging up to the hardest work: a novel algorithm, or wide reach with deep logic", via: "claude", agent: "orc-executor-opus-4-8-high" },
793
+ { from: 90, to: 100, band: "[90,100]", range: "scores 90 to 100", meaning: "the hardest work: a novel algorithm, or wide reach with deep logic", via: "claude", agent: "orc-executor-opus-5-high" },
794
+ ],
795
+ foreign: [],
796
+ claude_fallthrough: [],
797
+ counts: { foreign: 3, claude: 4 },
798
+ // R17 (v0.53.0) — the anchors every row's `meaning` is built from. The CLI
799
+ // computes this; a plain-language label written in the panel would be the
800
+ // panel deciding what a score means.
801
+ band_meanings: [
802
+ { from: 0, to: 30, meaning: "mechanical work in one or two files, with no new logic" },
803
+ { from: 30, to: 55, meaning: "a few files, following a pattern this repo already has" },
804
+ { from: 55, to: 70, meaning: "several files, or a new surface, or logic that carries state" },
805
+ { from: 70, to: 85, meaning: "wide reach or genuinely new work (a cited risk floors a task to 70, so it lands here or above)" },
806
+ { from: 85, to: 100, meaning: "the hardest work: a novel algorithm, or wide reach with deep logic" },
807
+ ],
808
+ note: null,
809
+ };
810
+ extraRoute.foreign = extraRoute.rows.filter((r) => r.via === "extra");
811
+ extraRoute.claude_fallthrough = extraRoute.rows.filter((r) => r.via === "claude");
812
+
813
+ /* `orc extra role list --json` (v0.55.0) — THE POSITIONS.
814
+
815
+ ONE OF EVERY STATE, including the ugly ones, because you cannot design a
816
+ STALE chip on a fresh connection:
817
+
818
+ · routed + VERIFIED doc-writer
819
+ · routed + STALE fast-executor
820
+ · routed, profile lost verification wiki-scanner-light (held_back: unverified)
821
+ · routed, model left models_seen quick-executor (model_known: false)
822
+ · UNROUTED, keeps its slot doc-checker · wiki-scanner-deep
823
+
824
+ `quick-executor` is routed on purpose too, so the "offered, never applied"
825
+ wording is designable — that lane ASKS, and the row has to say so without
826
+ ever reading as "this is what runs". */
827
+ const extraRole = {
828
+ ok: true,
829
+ extra_enabled: true,
830
+ slots: [
831
+ {
832
+ slot: "quick-executor", lane: "/orc-quick", routed: true,
833
+ profile: "cheap", model: "deepseek-coder", small_model: null, max_turns: null,
834
+ added_at: "2026-08-20T09:12:00Z", provider: "deepseek", engine: "api",
835
+ verify_state: "VERIFIED", verify_age_days: 1, model_known: false,
836
+ meaning: "the user picks the agent for every entry anyway, so a foreign worker is one more option on a menu they already read.",
837
+ asks: true, announce_point: "the dispatch gate — offered as a third option, never a default",
838
+ claude: { via: "claude", agent: "orc-executor-sonnet-4-6-med", agents: ["orc-executor-sonnet-4-6-med", "orc-executor-opus-5-low"], table: "shipped" },
839
+ resolved: "extra", held_back: null,
840
+ why: "slot row quick-executor holds this position and outranks orc-executor-sonnet-4-6-med.",
841
+ announce: "quick-executor (/orc-quick) → deepseek/deepseek-coder via api (profile cheap) — displaces orc-executor-sonnet-4-6-med; this sends the slice to a third party.",
842
+ next: null,
843
+ },
844
+ {
845
+ slot: "fast-executor", lane: "/orc-fast", routed: true,
846
+ profile: "glm", model: "glm-4.6", small_model: null, max_turns: null,
847
+ added_at: "2026-08-11T14:02:00Z", provider: "zai", engine: "claude-shim",
848
+ verify_state: "STALE", verify_age_days: 15, model_known: true,
849
+ meaning: "one executor, one slice, a build+test smoke gate behind it — the checks that catch a bad implementation here are engine-blind.",
850
+ asks: false, announce_point: "the F0 preflight `extra:` line, before wave 1",
851
+ claude: { via: "claude", agent: "orc-executor-sonnet-4-6-high", agents: ["orc-executor-sonnet-4-6-high"], table: "shipped" },
852
+ resolved: "extra", held_back: null,
853
+ why: "slot row fast-executor holds this position and outranks orc-executor-sonnet-4-6-high; verification is 15d old (STALE — still routes, re-pinged before the wave).",
854
+ announce: "fast-executor (/orc-fast) → zai/glm-4.6 via claude-shim (profile glm) — displaces orc-executor-sonnet-4-6-high; this sends the slice to a third party.",
855
+ next: null,
856
+ },
857
+ {
858
+ slot: "doc-writer", lane: "/orc-doc", routed: true,
859
+ profile: "cheap", model: "deepseek-chat", small_model: "deepseek-chat", max_turns: 12,
860
+ added_at: "2026-08-24T08:00:00Z", provider: "deepseek", engine: "api",
861
+ verify_state: "VERIFIED", verify_age_days: 1, model_known: true,
862
+ meaning: "a writer owns ONE part file and invents no fact; its output is read by a checker and by you before it ships.",
863
+ asks: false, announce_point: "before the wave, naming the sections going off Claude",
864
+ claude: { via: "claude", agent: "orc-doc-writer-opus-5-med", agents: ["orc-doc-writer-opus-5-med"], table: "shipped" },
865
+ resolved: "extra", held_back: null,
866
+ why: "slot row doc-writer holds this position and outranks orc-doc-writer-opus-5-med.",
867
+ announce: "doc-writer (/orc-doc) → deepseek/deepseek-chat via api (profile cheap) — displaces orc-doc-writer-opus-5-med; this sends the slice to a third party.",
868
+ next: null,
869
+ },
870
+ {
871
+ // UNROUTED, AND IT KEEPS ITS SLOT. Filtering it out would make "I left the
872
+ // checker on Claude on purpose" and "there is no checker" identical.
873
+ slot: "doc-checker", lane: "/orc-doc", routed: false,
874
+ profile: null, model: null, small_model: null, max_turns: null, added_at: null,
875
+ provider: null, engine: null, verify_state: null, verify_age_days: null, model_known: null,
876
+ meaning: "the checker reads one bounded part and reports; it rewrites nothing, so a finding it makes is a finding you read.",
877
+ asks: false, announce_point: "before the wave",
878
+ claude: { via: "claude", agent: "orc-doc-checker-opus-5-low", agents: ["orc-doc-checker-opus-5-low"], table: "shipped" },
879
+ resolved: "claude", held_back: null,
880
+ why: "no slot row holds doc-checker — Extra is an OVERLAY, so an unrouted position falls straight through to orc-doc-checker-opus-5-low.",
881
+ announce: null,
882
+ next: "orc extra role set doc-checker <profile>/<model>",
883
+ },
884
+ {
885
+ slot: "wiki-scanner-deep", lane: "/orc-wiki", routed: false,
886
+ profile: null, model: null, small_model: null, max_turns: null, added_at: null,
887
+ provider: null, engine: null, verify_state: null, verify_age_days: null, model_known: null,
888
+ meaning: "a scanner returns an evidence-anchored doc body the orchestrator writes; every claim in it is anchored to a file you can open.",
889
+ asks: false, announce_point: "per scan-batch, beside the resolved tier",
890
+ claude: { via: "claude", agent: "orc-wiki-scanner-opus-4-8-high", agents: ["orc-wiki-scanner-opus-4-8-high"], table: "shipped" },
891
+ resolved: "claude", held_back: null,
892
+ why: "no slot row holds wiki-scanner-deep — Extra is an OVERLAY, so an unrouted position falls straight through to orc-wiki-scanner-opus-4-8-high.",
893
+ announce: null,
894
+ next: "orc extra role set wiki-scanner-deep <profile>/<model>",
895
+ },
896
+ {
897
+ // ROUTED AND HELD BACK: the profile lost its verification, so the position
898
+ // fell back to Claude without the user asking it to.
899
+ slot: "wiki-scanner-light", lane: "/orc-wiki", routed: true,
900
+ profile: "gone", model: "glm-4.6", small_model: null, max_turns: null,
901
+ added_at: "2026-07-30T11:30:00Z", provider: "zai", engine: "api",
902
+ verify_state: "UNVERIFIED", verify_age_days: null, model_known: true,
903
+ meaning: "the LIGHT tier is already a small no-new-surface delta on an existing doc — the cheapest work the wiki does.",
904
+ asks: false, announce_point: "per scan-batch, beside the resolved tier",
905
+ claude: { via: "claude", agent: "orc-wiki-scanner-sonnet-5-high", agents: ["orc-wiki-scanner-sonnet-5-high"], table: "shipped" },
906
+ resolved: "claude", held_back: "unverified",
907
+ why: '"gone" has never verified — nothing dispatches to an unproven endpoint.',
908
+ announce: null,
909
+ next: "orc extra ping gone",
910
+ },
911
+ ],
912
+ counts: { total: 6, routed: 4, resolving: 3 },
913
+ unreachable_roles: [
914
+ { role: "reviewer", state: "declared · no slot · nothing resolves this" },
915
+ { role: "verifier", state: "declared · no slot · nothing resolves this" },
916
+ { role: "analyst", state: "declared · no slot · nothing resolves this" },
917
+ { role: "planner", state: "declared · no slot · nothing resolves this" },
918
+ { role: "scout", state: "declared · no slot · nothing resolves this" },
919
+ { role: "test-author", state: "declared · no slot · nothing resolves this" },
920
+ ],
921
+ note: "a slot with no row KEEPS ITS SLOT and falls through to its pinned Claude agent. Absence is not a hole.",
922
+ };
923
+
924
+ /* `orc extra lanes --json` (v0.52.0, D6). ONE OF EVERY VERDICT, including the
925
+ two that are easy to forget: a fixed-executor lane whose band's two edges
926
+ DISAGREE (it stays on Claude and names the row that partially covered it),
927
+ and a fixed-role lane whose roles `extra_roles` does not name. You cannot
928
+ design "one edge went foreign and the other did not" on a config where every
929
+ band is covered. */
930
+ const extraLanes = {
931
+ ok: true,
932
+ extra_enabled: true,
933
+ roles: ["executor"],
934
+ shapes: ["scored", "fixed-executor", "slot", "gated-choice", "inert", "never"],
935
+ routes: ["per-task", "foreign", "claude", "roles", "offered", "never"],
936
+ slots: [
937
+ { slot: "quick-executor", lane: "/orc-quick", asks: true },
938
+ { slot: "fast-executor", lane: "/orc-fast", asks: false },
939
+ { slot: "doc-writer", lane: "/orc-doc", asks: false },
940
+ { slot: "doc-checker", lane: "/orc-doc", asks: false },
941
+ { slot: "wiki-scanner-deep", lane: "/orc-wiki", asks: false },
942
+ { slot: "wiki-scanner-light", lane: "/orc-wiki", asks: false },
943
+ ],
944
+ note: "A lane not in this list does not route foreign.",
945
+ lanes: [
946
+ {
947
+ lane: "/orc", shape: "scored", agent: null, routes: "per-task",
948
+ detail: "every task is scored, so the routing table below applies score by score.",
949
+ },
950
+ {
951
+ lane: "/orc-ultra", shape: "scored", agent: null, routes: "per-task",
952
+ detail: "every task is scored, so the routing table below applies score by score.",
953
+ },
954
+ {
955
+ lane: "/orc-mini", shape: "fixed-executor", agent: "orc-executor-sonnet-5-high",
956
+ band: "[55,65)", edges: [55, 64], agree: false, routes: "claude", resolved: null,
957
+ detail: "one edge routes foreign and the other does not, so the lane stays on Claude. Row [30,55) covers only part of this band.",
958
+ },
959
+ {
960
+ lane: "/orc-fast", shape: "slot", agent: null, routes: "roles",
961
+ slots: [
962
+ { slot: "fast-executor", routes: true, profile: "glm", model: "glm-4.6", claude: "orc-executor-sonnet-4-6-high", held_back: null, why: "slot row fast-executor holds this position and outranks orc-executor-sonnet-4-6-high." },
963
+ ],
964
+ detail: "fast-executor is held by a non-Claude worker; every position with no row stays on its pinned Claude agent.",
965
+ },
966
+ {
967
+ lane: "/orc-diy", shape: "scored", agent: null, routes: "per-task",
968
+ detail: "every task is scored, so the routing table below applies score by score. The flow key decides WHETHER; the resolver still decides WHERE, so route rows are never baked into flow.lock.json.",
969
+ },
970
+ {
971
+ // OFFERED, never applied. The verdict word is this lane's own, because
972
+ // "this lane routes foreign" would be a claim about a decision only the
973
+ // user gets to make, per entry.
974
+ lane: "/orc-quick", shape: "gated-choice", agent: null, routes: "offered",
975
+ slots: [
976
+ { slot: "quick-executor", routes: true, profile: "cheap", model: "deepseek-chat", claude: "orc-executor-sonnet-4-6-med", held_back: null, why: "slot row quick-executor holds this position and outranks orc-executor-sonnet-4-6-med." },
977
+ ],
978
+ detail: "quick-executor is OFFERED as one more option at the dispatch gate. It never becomes a default and never sticks — this lane asks before every dispatch.",
979
+ },
980
+ {
981
+ // ONE ROUTED, ONE NOT. This is the state that could not be designed
982
+ // before v0.55.0, because both roles resolved the WRITER's band.
983
+ lane: "/orc-doc", shape: "slot", agent: null, routes: "roles",
984
+ slots: [
985
+ { slot: "doc-writer", routes: true, profile: "cheap", model: "deepseek-chat", claude: "orc-doc-writer-opus-5-med", held_back: null, why: "slot row doc-writer holds this position and outranks orc-doc-writer-opus-5-med." },
986
+ { slot: "doc-checker", routes: false, profile: null, model: null, claude: "orc-doc-checker-opus-5-low", held_back: null, why: "no slot row holds doc-checker — Extra is an OVERLAY, so an unrouted position falls straight through to orc-doc-checker-opus-5-low." },
987
+ ],
988
+ detail: "doc-writer is held by a non-Claude worker; every position with no row stays on its pinned Claude agent.",
989
+ },
990
+ {
991
+ lane: "/orc-challenge", shape: "never", agent: null, routes: "never",
992
+ detail: "this lane measures rather than produces, so nothing it dispatches may be swapped for a different model.",
993
+ },
994
+ {
995
+ // NEITHER position held — the row that was DEAD before v0.55.0, now
996
+ // answering honestly instead of blaming a role name nobody could set.
997
+ lane: "/orc-wiki", shape: "slot", agent: null, routes: "claude",
998
+ slots: [
999
+ { slot: "wiki-scanner-deep", routes: false, profile: null, model: null, claude: "orc-wiki-scanner-opus-4-8-high", held_back: null, why: "no slot row holds wiki-scanner-deep — Extra is an OVERLAY, so an unrouted position falls straight through to orc-wiki-scanner-opus-4-8-high." },
1000
+ { slot: "wiki-scanner-light", routes: false, profile: null, model: null, claude: "orc-wiki-scanner-sonnet-5-high", held_back: null, why: "no slot row holds wiki-scanner-light — Extra is an OVERLAY, so an unrouted position falls straight through to orc-wiki-scanner-sonnet-5-high." },
1001
+ ],
1002
+ detail: "no position in this lane is held, so every one of them stays on its pinned Claude agent.",
1003
+ },
1004
+ { lane: "/orc-retro", shape: "never", agent: null, routes: "never", detail: "this lane measures rather than produces, so nothing it dispatches may be swapped for a different model." },
1005
+ { lane: "/orc-budget", shape: "never", agent: null, routes: "never", detail: "this lane measures rather than produces, so nothing it dispatches may be swapped for a different model." },
1006
+ { lane: "/orc-aftermath", shape: "never", agent: null, routes: "never", detail: "this lane measures rather than produces, so nothing it dispatches may be swapped for a different model." },
1007
+ { lane: "/orc-boundary", shape: "never", agent: null, routes: "never", detail: "this lane measures rather than produces, so nothing it dispatches may be swapped for a different model." },
1008
+ { lane: "/orc-pact", shape: "never", agent: null, routes: "never", detail: "this lane measures rather than produces, so nothing it dispatches may be swapped for a different model." },
1009
+ ],
1010
+ };
1011
+
1012
+ // `orc extra stats --json`. Joined from the EXTRA trace lines, grouped by the
1013
+ // pair a routing decision is made in — profile AND band.
1014
+ //
1015
+ // The ugly states are the point: one band whose vector is assembled from SIX of
1016
+ // ten dispatches (four reported no counts at all), one whose provider has no
1017
+ // rate at all so `usd` is null, one substitution, one reroute and one fallback.
1018
+ // The `[65,70)` row is deliberately ABSENT so a routed band that nothing has run
1019
+ // through can be designed — it must read `—`, never `0`.
1020
+ //
1021
+ // `sources` carries its ugly states too: rows from all three sources at once,
1022
+ // plus a torn log line and an undated saved return. Both of those are ABSENT
1023
+ // counts — dispatches that are real and are NOT in the totals — and you cannot
1024
+ // design the warning for a short report against a clean one.
1025
+ const extraStats = {
1026
+ log_dir: ".claude/orc/logs",
1027
+ since: null,
1028
+ files_scanned: 14,
1029
+ dispatches: 23,
1030
+ spend_log: ".claude/orc/extra-spend.jsonl",
1031
+ sources: {
1032
+ spend_log: 18,
1033
+ traces_only: 3,
1034
+ run_returns: 2,
1035
+ run_returns_undated_skipped: 1,
1036
+ unreadable_spend_lines: 1,
1037
+ },
1038
+ bands: [
1039
+ {
1040
+ profile: "cheap",
1041
+ provider: "deepseek",
1042
+ band: "[0,30)",
1043
+ engines: { api: 15 },
1044
+ models: { "deepseek-chat": 15 },
1045
+ dispatches: 15,
1046
+ outcomes: { done: 13, partial: 1, failed: 0, fallback: 1 },
1047
+ usage: { input: 214_400, cache_write: 38_100, cache_read: 1_902_300, output: 61_400 },
1048
+ usage_reported: 15,
1049
+ usage_missing: 0,
1050
+ usd: 0.41,
1051
+ },
1052
+ {
1053
+ // The honest-partial state: six of ten reported counts, and a provider the
1054
+ // price table has no rate for, so `usd` is null rather than 0.
1055
+ profile: "glm",
1056
+ provider: "zai",
1057
+ band: "[30,55)",
1058
+ engines: { "claude-shim": 8 },
1059
+ models: { "glm-4.6": 8 },
1060
+ dispatches: 8,
1061
+ outcomes: { done: 5, partial: 1, failed: 1, fallback: 1 },
1062
+ usage: { input: 96_200, cache_write: 0, cache_read: 0, output: 28_900 },
1063
+ usage_reported: 6,
1064
+ usage_missing: 2,
1065
+ usd: null,
1066
+ },
1067
+ ],
1068
+ // v0.54.0 — RELIABILITY. ONE PROFILE ABOVE THE SAMPLE FLOOR AND ONE BELOW IT,
1069
+ // because the `sample too small` chip cannot be designed against a fixture
1070
+ // set where every profile has a percentage. `flaky` is over the floor and
1071
+ // over the rate; `cheap` is four dispatches and gets no percentage at all —
1072
+ // a rate computed from four tries is noise with a percent sign on it.
1073
+ reliability: {
1074
+ sample_floor: 10,
1075
+ unreadable_journals: 1,
1076
+ journals_without_result: 2,
1077
+ profiles: [
1078
+ {
1079
+ profile: "flaky",
1080
+ dispatches: 14,
1081
+ dispatches_total: 16,
1082
+ failed: 5,
1083
+ partial: 1,
1084
+ resumed: 3,
1085
+ orphaned: 2,
1086
+ attribution: { provider: 2, network: 3, local: 0, worker: 1, orc: 0 },
1087
+ unattributed: 1,
1088
+ mean_time_to_failure_ms: 38000,
1089
+ sample_floor: 10,
1090
+ sample_too_small: false,
1091
+ failure_rate: 0.44,
1092
+ },
1093
+ {
1094
+ profile: "cheap",
1095
+ dispatches: 4,
1096
+ dispatches_total: 4,
1097
+ failed: 1,
1098
+ partial: 0,
1099
+ resumed: 0,
1100
+ orphaned: 0,
1101
+ attribution: { provider: 1, network: 0, local: 0, worker: 0, orc: 0 },
1102
+ // ALWAYS PRESENT, INCLUDING WHEN ZERO.
1103
+ unattributed: 0,
1104
+ mean_time_to_failure_ms: 12000,
1105
+ sample_floor: 10,
1106
+ sample_too_small: true,
1107
+ failure_rate: null,
1108
+ },
1109
+ ],
1110
+ },
1111
+ substitutions: [{ task: "T-07", requested: "glm-4.6", reported: "glm-4.5-air" }],
1112
+ reroutes: [{ task: "T-11", providers: ["deepseek", "novita"] }],
1113
+ fallbacks: [{ task: "T-04", reason: "timeout", agent: "orc-executor-sonnet-5-high" }],
1114
+ price_table: { as_of: "2026-05-02", age_days: 112, stale: true, path: "bin/pricing.json" },
1115
+ priced_dispatches: 15,
1116
+ unpriced_dispatches: 8,
1117
+ missing_rates: [{ pair: "zai/glm-4.6", dispatches: 8 }],
1118
+ hint: "`orc extra rates` prints the JSON to paste for every provider/model pair with no rate.",
1119
+ };
1120
+
1121
+ // `orc extra rates --json`. The paste path: `bin/pricing.json` ships every
1122
+ // models map EMPTY on purpose, because a figure that is wrong by 2x gets
1123
+ // believed — so this is the skeleton, not a guess at a price.
1124
+ const extraRates = {
1125
+ price_table: { as_of: "2026-05-02", age_days: 112, stale: true, path: "bin/pricing.json" },
1126
+ pairs: [
1127
+ { provider: "deepseek", model: "deepseek-chat", dispatches: 15, rate: { input: 0.28, cache_write: 0.28, cache_read: 0.028, output: 0.42 } },
1128
+ { provider: "zai", model: "glm-4.6", dispatches: 8, rate: null },
1129
+ ],
1130
+ missing: ["zai/glm-4.6"],
1131
+ paste: { providers: { zai: { models: { "glm-4.6": { input: 0, cache_write: 0, cache_read: 0, output: 0 } } } } },
1132
+ where: "point `orc config set budget_price_table <path>` at your own copy rather than editing the shipped file, so `orc update` never overwrites your rates",
1133
+ caveats: [{ provider: "deepseek", caveat: "peak and off-peak rates differ; this table carries the peak one." }],
1134
+ };
1135
+
1136
+ // The connection test's two outcomes. These are the ONLY canned POST answers in
1137
+ // the whole fixture set, and they exist because they are the two states this
1138
+ // panel is most about and the two you cannot otherwise design: fixture mode
1139
+ // never runs a real command, so without them the wire never lands and the result
1140
+ // box is a shape nobody has looked at.
1141
+ //
1142
+ // GREEN for a connection the fixture says has answered before, RED for the one
1143
+ // that never has — deterministic, and it matches what the list already claims.
1144
+ const extraPingOk = {
1145
+ ok: true,
1146
+ profile: "cheap",
1147
+ engine: "api",
1148
+ base_url: "https://api.deepseek.com",
1149
+ rung: "models",
1150
+ verify_method: "models",
1151
+ latency_ms: 412,
1152
+ models_seen: ["deepseek-chat", "deepseek-reasoner"],
1153
+ attempts: [{ rung: "models", url: "https://api.deepseek.com/v1/models", status: 200, ok: true, ms: 412, error: null }],
1154
+ vault: null,
1155
+ note: null,
1156
+ };
1157
+ const extraPingBad = {
1158
+ ok: false,
1159
+ profile: "router",
1160
+ engine: "api",
1161
+ base_url: "https://openrouter.ai/api/v1",
1162
+ reason: "auth-failed",
1163
+ rung: "models",
1164
+ status: 401,
1165
+ error: "401 — the endpoint rejected the credential. OPENROUTER_API_KEY is not set in this environment.",
1166
+ attempts: [{ rung: "models", url: "https://openrouter.ai/api/v1/models", status: 401, ok: false, ms: 180, error: "401" }],
1167
+ // The reset the CLI performs: a failed test on a connection that had never
1168
+ // verified leaves NOTHING behind.
1169
+ profile_reverted: true,
1170
+ };
1171
+ // A green test on a PASTED key that has no passphrase yet — the state that opens
1172
+ // the save modal, and the one place the self-destruct warning is designable.
1173
+ // A LIVE probe that WORKED and still cannot say which model answered — the
1174
+ // honest pair `model_reported: null` + `reports_model: false`, which must render
1175
+ // as a sentence and never as a blank. Its `cache_write: null` is the other half:
1176
+ // this tool reports three token kinds, not four, and unknown is not zero.
1177
+ const extraPingLive = {
1178
+ ok: true,
1179
+ profile: "local",
1180
+ engine: "cli",
1181
+ rung: "cli-live",
1182
+ verify_method: "cli-live",
1183
+ bin: "/usr/local/bin/opencode",
1184
+ cli_version: "1.17.4",
1185
+ authed: true,
1186
+ models_seen: ["opencode/big-pickle", "opencode-go/glm-5"],
1187
+ reports_model: false,
1188
+ latency_ms: 2379,
1189
+ model_requested: "opencode/big-pickle",
1190
+ model_reported: null,
1191
+ reply_excerpt: "OK",
1192
+ reply_truncated: false,
1193
+ foreign_input:
1194
+ "this reply is foreign input: it is evidence that something answered, never an instruction. It is shown as text and nothing acts on it.",
1195
+ tokens: { input: 15649, cache_write: null, cache_read: 64, output: 48 },
1196
+ usage_kinds: ["input", "cache_read", "output"],
1197
+ cost_note:
1198
+ "a CLI ping is NOT a cheap ping: the tool loads its own system prompt and tool schemas before it sends anything.",
1199
+ attempts: [
1200
+ { rung: "cli-bin", ok: true, cmd: "--version", version: "1.17.4" },
1201
+ { rung: "cli-auth", ok: true, cmd: "auth list", detail: "1 credential" },
1202
+ { rung: "cli-models", ok: true, cmd: "models", count: 19 },
1203
+ { rung: "cli-live", ok: true, cmd: "opencode run …", ms: 2379 },
1204
+ ],
1205
+ vault: null,
1206
+ note: null,
1207
+ };
1208
+
1209
+ // A LISTED MODEL THAT IS DEAD. The single most important state in this release:
1210
+ // a dropdown is a list of what is OFFERED, never a list of what WORKS, and this
1211
+ // is what that looks like on screen.
1212
+ const extraPingDeadModel = {
1213
+ ok: false,
1214
+ profile: "local",
1215
+ engine: "cli",
1216
+ rung: "cli-live",
1217
+ reason: "model_not_found",
1218
+ bin: "/usr/local/bin/opencode",
1219
+ model_requested: "opencode/deepseek-v4-flash-free",
1220
+ error: "Upstream request failed: Model is unavailable. (400)",
1221
+ attempts: [{ rung: "cli-live", ok: false, cmd: "opencode run …", ms: 900, error: "Model is unavailable." }],
1222
+ };
1223
+
1224
+ // RUNG 0: not a failure to connect — a failure to have anything to connect TO.
1225
+ // The fix is an install, not a retry, so the command rides on the refusal.
1226
+ const extraPingNotInstalled = {
1227
+ ok: false,
1228
+ profile: "toolc",
1229
+ engine: "cli",
1230
+ reason: "not-installed",
1231
+ rung: "cli-bin",
1232
+ bin: "codex",
1233
+ error: '"codex" is not on PATH — engine `cli` dispatches by running it.',
1234
+ install_cmd: "npm i -g @openai/codex",
1235
+ install_cmds: [{ manager: "npm", platforms: ["darwin"], cmd: "npm i -g @openai/codex" }],
1236
+ no_install_alternative: null,
1237
+ attempts: [{ rung: "cli-bin", ok: false, error: "not on PATH" }],
1238
+ };
1239
+
1240
+ // `orc extra install --json`. A launch that could NOT happen is exit 0 with the
1241
+ // command still on the card — you cannot design that box on a machine where the
1242
+ // terminal opens.
1243
+ const extraInstall = {
1244
+ launched: {
1245
+ ok: true,
1246
+ provider: "opencode",
1247
+ launched: true,
1248
+ launcher: "Terminal",
1249
+ attempts: [{ launcher: "Terminal", ok: true }],
1250
+ dry_run: false,
1251
+ script: ".claude/orc/tmp/install-opencode-20260822120000.sh",
1252
+ cmd: "npm i -g opencode-ai",
1253
+ manager: "npm",
1254
+ verify_cmd: "opencode --version",
1255
+ fallback_cmd: "npm i -g opencode-ai",
1256
+ docs_url: "https://opencode.ai/docs/",
1257
+ elevation: "never — ORC does not elevate.",
1258
+ note: "a terminal window opened — come back and press Re-check when it finishes",
1259
+ },
1260
+ refused: {
1261
+ ok: true,
1262
+ provider: "codex",
1263
+ launched: false,
1264
+ launcher: null,
1265
+ attempts: [{ launcher: "x-terminal-emulator", ok: false, error: "not on PATH" }],
1266
+ dry_run: false,
1267
+ script: ".claude/orc/tmp/install-codex-20260822120000.sh",
1268
+ cmd: "npm i -g @openai/codex",
1269
+ manager: "npm",
1270
+ verify_cmd: "codex --version",
1271
+ fallback_cmd: "npm i -g @openai/codex",
1272
+ docs_url: "https://developers.openai.com/codex/cli",
1273
+ elevation: "never — ORC does not elevate.",
1274
+ note: "no terminal could be opened here. Run the command yourself; nothing about this is different if you do.",
1275
+ },
1276
+ };
1277
+
1278
+ const extraPingSaveOffer = {
1279
+ ...extraPingOk,
1280
+ profile: "pasted",
1281
+ vault: {
1282
+ stored: false,
1283
+ reason: "no-passphrase",
1284
+ error:
1285
+ "connection verified, but the key was NOT stored: a passphrase is required and none was given. " +
1286
+ "Re-run at a terminal, or pipe the key and the passphrase as two lines.",
1287
+ },
1288
+ };
1289
+
1290
+ // ── v0.54.0 — RECOVERY. ONE OF EVERY STATE, INCLUDING THE UGLY ONES ────────
1291
+ //
1292
+ // You cannot design an `in-flight` REFUSAL against a fixture set that only has
1293
+ // clean rows, and you cannot design a `streamed-opaque` row — one with no
1294
+ // per-turn tool attribution to render — on a journal that always has one. Every
1295
+ // reconcile state the CLI can return is reachable here:
1296
+ //
1297
+ // T-2 resumable, attribution `network` the row this release is for
1298
+ // T-5 resumable, `provider`, engine cli streamed-opaque, nothing to attribute per turn
1299
+ // T-7 nothing-to-resume a row that keeps its slot with nothing in it
1300
+ // T-8 in-flight a REFUSAL with a live pid and a lease
1301
+ // T-9 resumable + reverted the blocked resume, naming the paths
1302
+ // T-11 complete a clean close, and prune-eligible
1303
+ // T-12 no-journal a pre-0.54.0 task somebody asks about
1304
+ const extraJournal = {
1305
+ ok: true,
1306
+ root: "/repo/.claude/orc/extra-journal",
1307
+ entries: 6,
1308
+ orphans: 1,
1309
+ in_flight: 1,
1310
+ prunable: 1,
1311
+ retention_days: 30,
1312
+ journals: [
1313
+ {
1314
+ task_id: "T-2",
1315
+ dir: "/repo/.claude/orc/extra-journal/T-2",
1316
+ attempts: 1,
1317
+ attempt: 1,
1318
+ profile: "dipkshit",
1319
+ provider: "deepseek",
1320
+ engine: "api",
1321
+ model_requested: "deepseek-v4-flash",
1322
+ started_at: "2026-08-24T19:31:27.401Z",
1323
+ journal_fidelity: "per-turn",
1324
+ declared_files: ["src/routes/health.js", "src/app.js"],
1325
+ outcome: "failed",
1326
+ reason: "connection-lost-local",
1327
+ reported_back: true,
1328
+ live: false,
1329
+ orphan: false,
1330
+ prunable: false,
1331
+ prunable_why: "attempt 1 closed `failed`, not `done`",
1332
+ },
1333
+ {
1334
+ task_id: "T-5",
1335
+ dir: "/repo/.claude/orc/extra-journal/T-5",
1336
+ attempts: 2,
1337
+ attempt: 2,
1338
+ profile: "local-opencode",
1339
+ provider: "custom",
1340
+ engine: "cli",
1341
+ model_requested: "deepseek/deepseek-chat",
1342
+ started_at: "2026-08-24T18:02:11.902Z",
1343
+ journal_fidelity: "streamed-opaque",
1344
+ declared_files: ["src/lib/cart.ts"],
1345
+ outcome: "partial",
1346
+ reason: "wall-clock",
1347
+ reported_back: true,
1348
+ live: false,
1349
+ orphan: false,
1350
+ prunable: false,
1351
+ prunable_why: "attempt 2 closed `partial`, not `done`",
1352
+ },
1353
+ {
1354
+ task_id: "T-7",
1355
+ dir: "/repo/.claude/orc/extra-journal/T-7",
1356
+ attempts: 1,
1357
+ attempt: 1,
1358
+ profile: "dipkshit",
1359
+ provider: "deepseek",
1360
+ engine: "api",
1361
+ model_requested: "deepseek-v4-flash",
1362
+ started_at: "2026-08-24T17:40:00.000Z",
1363
+ journal_fidelity: "per-turn",
1364
+ declared_files: ["README.md"],
1365
+ outcome: "failed",
1366
+ reason: "rate_limit",
1367
+ reported_back: true,
1368
+ live: false,
1369
+ orphan: false,
1370
+ prunable: false,
1371
+ prunable_why: "attempt 1 closed `failed`, not `done`",
1372
+ },
1373
+ {
1374
+ task_id: "T-8",
1375
+ dir: "/repo/.claude/orc/extra-journal/T-8",
1376
+ attempts: 1,
1377
+ attempt: 1,
1378
+ profile: "dipkshit",
1379
+ provider: "deepseek",
1380
+ engine: "api",
1381
+ model_requested: "deepseek-v4-flash",
1382
+ started_at: "2026-08-24T19:58:04.117Z",
1383
+ journal_fidelity: "per-turn",
1384
+ declared_files: ["src/pay/refund.ts"],
1385
+ outcome: null,
1386
+ reason: null,
1387
+ reported_back: false,
1388
+ live: true,
1389
+ orphan: false,
1390
+ prunable: false,
1391
+ prunable_why: "attempt 1 never reported back — an orphan is never swept",
1392
+ },
1393
+ {
1394
+ task_id: "T-9",
1395
+ dir: "/repo/.claude/orc/extra-journal/T-9",
1396
+ attempts: 1,
1397
+ attempt: 1,
1398
+ profile: "local-opencode",
1399
+ provider: "custom",
1400
+ engine: "cli",
1401
+ model_requested: "deepseek/deepseek-chat",
1402
+ started_at: "2026-08-23T11:15:42.000Z",
1403
+ journal_fidelity: "streamed-opaque",
1404
+ declared_files: ["src/db/schema.sql"],
1405
+ outcome: null,
1406
+ reason: null,
1407
+ reported_back: false,
1408
+ live: false,
1409
+ // THE ONE STATE THIS LISTING EXISTS TO MAKE VISIBLE.
1410
+ orphan: true,
1411
+ prunable: false,
1412
+ prunable_why: "attempt 1 never reported back — an orphan is never swept",
1413
+ },
1414
+ {
1415
+ task_id: "T-11",
1416
+ dir: "/repo/.claude/orc/extra-journal/T-11",
1417
+ attempts: 1,
1418
+ attempt: 1,
1419
+ profile: "dipkshit",
1420
+ provider: "deepseek",
1421
+ engine: "api",
1422
+ model_requested: "deepseek-v4-flash",
1423
+ started_at: "2026-06-30T09:00:00.000Z",
1424
+ journal_fidelity: "per-turn",
1425
+ declared_files: ["src/util/slug.ts"],
1426
+ outcome: "done",
1427
+ reason: null,
1428
+ reported_back: true,
1429
+ live: false,
1430
+ orphan: false,
1431
+ prunable: true,
1432
+ prunable_why: "every attempt closed `done` and nothing here has changed in 30+ days",
1433
+ },
1434
+ ],
1435
+ };
1436
+
1437
+ // `orc extra reconcile <task> --json`, one per state. The panel renders these
1438
+ // and computes NOTHING — not the state word, not the line counts, not the
1439
+ // verdict, and above all not the prose beside the verdict.
1440
+ const extraReconcile = {
1441
+ // THE USER'S OWN SCENARIO. Six of seven lines written, then the wire died,
1442
+ // and the unauthenticated probe failed too — so a Claude fallback would fail
1443
+ // as well and the wave HOLDS.
1444
+ "T-2": {
1445
+ ok: true,
1446
+ state: "resumable",
1447
+ task_id: "T-2",
1448
+ attempt: 1,
1449
+ attempts_total: 1,
1450
+ profile: "dipkshit",
1451
+ provider: "deepseek",
1452
+ engine: "api",
1453
+ model_requested: "deepseek-v4-flash",
1454
+ band: "[0,40)",
1455
+ score: 22,
1456
+ journal: "/repo/.claude/orc/extra-journal/T-2/attempt-01.json",
1457
+ journal_fidelity: "per-turn",
1458
+ journal_fidelity_note: "every turn and every tool call was recorded as it happened.",
1459
+ resumed_from: null,
1460
+ slice_path: "/repo/.claude/orc/run/health/T-2.slice.json",
1461
+ slice_sha256: "9f2c1ab4d7e05f38c6b1a2d9e4f70b83c5a6d1e2f3049b7c8d5e6f1a2b3c4d5e",
1462
+ started_at: "2026-08-24T19:31:27.401Z",
1463
+ ended_at: "2026-08-24T19:32:08.601Z",
1464
+ duration_ms: 41200,
1465
+ outcome: "failed",
1466
+ reason: "connection-lost-local",
1467
+ retryable: true,
1468
+ reported_back: true,
1469
+ orphan: false,
1470
+ liveness: {
1471
+ live: false,
1472
+ pid: 24188,
1473
+ pid_alive: false,
1474
+ lease_expires_at: "2026-08-24T19:47:27.401Z",
1475
+ lease_expired: true,
1476
+ note: "the lease has expired, so a live pid here is treated as SOMEBODY ELSE'S process. Pid reuse is real; this is an honest bound, not a proof.",
1477
+ },
1478
+ attribution: {
1479
+ verdict: "network",
1480
+ why: "the connection to deepseek failed, and an UNAUTHENTICATED probe of https://api.deepseek.com/v1/models also failed inside 3s. That points at this machine's network, not at the provider.",
1481
+ evidence: ["3 turn(s) completed", "1 file(s) were written before it stopped", "network probe: ECONNREFUSED after 3000ms"],
1482
+ fallback_would_also_fail: true,
1483
+ probe: { ran: true, reachable: false, url: "https://api.deepseek.com/v1/models", status: null, ms: 3000 },
1484
+ },
1485
+ files: [
1486
+ {
1487
+ path: "src/routes/health.js",
1488
+ state: "created",
1489
+ baseline: { exists: false, sha256: null, lines: 0 },
1490
+ now: { exists: true, sha256: "aa11bb22cc33dd44ee55ff6607182930a1b2c3d4e5f60718293a4b5c6d7e8f90", lines: 7 },
1491
+ numstat: { added: 7, removed: 0, source: "the file did not exist at baseline, so every line in it is new" },
1492
+ },
1493
+ {
1494
+ path: "src/app.js",
1495
+ state: "untouched",
1496
+ baseline: { exists: true, sha256: "bb22cc33dd44ee55ff6607182930a1b2c3d4e5f60718293a4b5c6d7e8f90aa11", lines: 41 },
1497
+ now: { exists: true, sha256: "bb22cc33dd44ee55ff6607182930a1b2c3d4e5f60718293a4b5c6d7e8f90aa11", lines: 41 },
1498
+ numstat: { added: 0, removed: 0, source: "the file is byte-identical to the baseline" },
1499
+ },
1500
+ ],
1501
+ touched_undeclared: [],
1502
+ reverted: [],
1503
+ git: true,
1504
+ git_note: null,
1505
+ last_action: "turn 4 of 12 · Write src/routes/health.js · ok",
1506
+ progress_lines: 9,
1507
+ unreadable_progress_lines: 0,
1508
+ turns_used: 4,
1509
+ max_turns: 12,
1510
+ partial_usage: { input: 8140, cache_write: 0, cache_read: 0, output: 512 },
1511
+ partial_usage_note:
1512
+ "read from the journal's per-turn vector. It is a FLOOR — the true total may be higher, because the dispatch died before it could report.",
1513
+ acceptance: ["GET /health returns 200 {status:'ok'}"],
1514
+ acceptance_note: "carried forward unevaluated — whether these are met is not a question this command can answer.",
1515
+ resume_target: {
1516
+ kind: "hold",
1517
+ profile: null,
1518
+ agent: null,
1519
+ why: "attributed to this machine's NETWORK. A Claude fallback would fail too, so hold the wave and say why — do not spend a second failure finding that out.",
1520
+ resumes_so_far: 0,
1521
+ resume_max: 2,
1522
+ },
1523
+ next: null,
1524
+ spend_recovered: null,
1525
+ blocked_by: null,
1526
+ },
1527
+
1528
+ // ENGINE `cli`: the bytes are on disk and ORC did not interpret them. Nothing
1529
+ // may render this as if it had per-turn tool attribution.
1530
+ "T-5": {
1531
+ ok: true,
1532
+ state: "resumable",
1533
+ task_id: "T-5",
1534
+ attempt: 2,
1535
+ attempts_total: 2,
1536
+ profile: "local-opencode",
1537
+ provider: "custom",
1538
+ engine: "cli",
1539
+ model_requested: "deepseek/deepseek-chat",
1540
+ band: "[40,80)",
1541
+ score: 55,
1542
+ journal: "/repo/.claude/orc/extra-journal/T-5/attempt-02.json",
1543
+ journal_fidelity: "streamed-opaque",
1544
+ journal_fidelity_note:
1545
+ "the child's own output was captured verbatim; ORC did not interpret it, so there is NO per-turn tool attribution here — only bytes.",
1546
+ resumed_from: { attempt: 1, reason: "timeout", attribution: "provider", at: "2026-08-24T17:44:00.000Z" },
1547
+ slice_path: "/repo/.claude/orc/run/cart/T-5.resume.json",
1548
+ slice_sha256: "1122334455667788990011223344556677889900112233445566778899001122",
1549
+ started_at: "2026-08-24T18:02:11.902Z",
1550
+ ended_at: "2026-08-24T18:17:12.902Z",
1551
+ duration_ms: 901000,
1552
+ outcome: "partial",
1553
+ reason: "wall-clock",
1554
+ retryable: true,
1555
+ reported_back: true,
1556
+ orphan: false,
1557
+ liveness: { live: false, pid: 30112, pid_alive: false, lease_expires_at: "2026-08-24T18:33:11.902Z", lease_expired: true, note: null },
1558
+ attribution: {
1559
+ verdict: "worker",
1560
+ why: "the dispatch was capped rather than broken (wall-clock): the conversation worked and the work did not finish inside it.",
1561
+ evidence: ["2 file(s) were written before it stopped"],
1562
+ fallback_would_also_fail: false,
1563
+ probe: null,
1564
+ },
1565
+ files: [
1566
+ {
1567
+ path: "src/lib/cart.ts",
1568
+ state: "modified",
1569
+ baseline: { exists: true, sha256: "cc33dd44ee55ff6607182930a1b2c3d4e5f60718293a4b5c6d7e8f90aa11bb22", lines: 210 },
1570
+ now: { exists: true, sha256: "dd44ee55ff6607182930a1b2c3d4e5f60718293a4b5c6d7e8f90aa11bb22cc33", lines: 236 },
1571
+ // UNKNOWN IS NOT ZERO. The file already differed from HEAD before the
1572
+ // dispatch started, so a line count here would mix two people's changes.
1573
+ numstat: {
1574
+ added: null,
1575
+ removed: null,
1576
+ source:
1577
+ "the file already differed from HEAD before this dispatch started, so a line count here would mix this dispatch's change with somebody else's uncommitted one. UNKNOWN, and unknown is not zero.",
1578
+ },
1579
+ },
1580
+ ],
1581
+ touched_undeclared: [{ path: "src/lib/cart.test.ts", status_line: "?? src/lib/cart.test.ts" }],
1582
+ reverted: [],
1583
+ git: true,
1584
+ git_note: null,
1585
+ last_action: "nothing was captured — this engine records BYTES, and none arrived.",
1586
+ progress_lines: 41,
1587
+ unreadable_progress_lines: 1,
1588
+ turns_used: 0,
1589
+ max_turns: null,
1590
+ partial_usage: null,
1591
+ partial_usage_note: "the journal recorded no usage vector, so there is NO figure here — not a zero one.",
1592
+ acceptance: ["the cart total excludes removed lines"],
1593
+ acceptance_note: "carried forward unevaluated — whether these are met is not a question this command can answer.",
1594
+ resume_target: {
1595
+ kind: "extra",
1596
+ profile: "local-opencode",
1597
+ agent: null,
1598
+ why: "`wall-clock` is retryable, so the same profile gets it again in a NEW session — carrying the position it left behind.",
1599
+ resumes_so_far: 1,
1600
+ resume_max: 2,
1601
+ },
1602
+ next: "orc extra resume-slice T-5 --out <file>",
1603
+ spend_recovered: null,
1604
+ blocked_by: null,
1605
+ },
1606
+
1607
+ // A ROW THAT KEEPS ITS SLOT WITH NOTHING IN IT. Filtering this out would make
1608
+ // "there was nothing to resume" and "ORC did not look" identical.
1609
+ "T-7": {
1610
+ ok: true,
1611
+ state: "nothing-to-resume",
1612
+ task_id: "T-7",
1613
+ attempt: 1,
1614
+ attempts_total: 1,
1615
+ profile: "dipkshit",
1616
+ provider: "deepseek",
1617
+ engine: "api",
1618
+ model_requested: "deepseek-v4-flash",
1619
+ band: "[0,40)",
1620
+ score: 12,
1621
+ journal: "/repo/.claude/orc/extra-journal/T-7/attempt-01.json",
1622
+ journal_fidelity: "per-turn",
1623
+ journal_fidelity_note: "every turn and every tool call was recorded as it happened.",
1624
+ resumed_from: null,
1625
+ slice_path: "/repo/.claude/orc/run/readme/T-7.slice.json",
1626
+ slice_sha256: "3344556677889900112233445566778899001122334455667788990011223344",
1627
+ started_at: "2026-08-24T17:40:00.000Z",
1628
+ ended_at: "2026-08-24T17:40:03.100Z",
1629
+ duration_ms: 3100,
1630
+ outcome: "failed",
1631
+ reason: "rate_limit",
1632
+ retryable: true,
1633
+ reported_back: true,
1634
+ orphan: false,
1635
+ liveness: { live: false, pid: 21000, pid_alive: false, lease_expires_at: "2026-08-24T17:56:00.000Z", lease_expired: true, note: null },
1636
+ attribution: {
1637
+ verdict: "provider",
1638
+ why: "the provider rate-limited this key — the endpoint answered, and what it answered was a refusal.",
1639
+ evidence: ["the endpoint answered HTTP 429", "1 turn(s) completed"],
1640
+ fallback_would_also_fail: false,
1641
+ probe: null,
1642
+ },
1643
+ files: [
1644
+ {
1645
+ path: "README.md",
1646
+ state: "untouched",
1647
+ baseline: { exists: true, sha256: "ee55ff6607182930a1b2c3d4e5f60718293a4b5c6d7e8f90aa11bb22cc33dd44", lines: 88 },
1648
+ now: { exists: true, sha256: "ee55ff6607182930a1b2c3d4e5f60718293a4b5c6d7e8f90aa11bb22cc33dd44", lines: 88 },
1649
+ numstat: { added: 0, removed: 0, source: "the file is byte-identical to the baseline" },
1650
+ },
1651
+ ],
1652
+ touched_undeclared: [],
1653
+ reverted: [],
1654
+ git: true,
1655
+ git_note: null,
1656
+ last_action: "no tool call was ever recorded.",
1657
+ progress_lines: 2,
1658
+ unreadable_progress_lines: 0,
1659
+ turns_used: 1,
1660
+ max_turns: 12,
1661
+ partial_usage: { input: 940, cache_write: 0, cache_read: 0, output: 0 },
1662
+ partial_usage_note:
1663
+ "read from the journal's per-turn vector. It is a FLOOR — the true total may be higher, because the dispatch died before it could report.",
1664
+ acceptance: ["the install section names the new flag"],
1665
+ acceptance_note: "carried forward unevaluated — whether these are met is not a question this command can answer.",
1666
+ resume_target: null,
1667
+ next: "nothing was written — re-dispatch the ORIGINAL slice (the existing fallback procedure).",
1668
+ spend_recovered: null,
1669
+ blocked_by: null,
1670
+ },
1671
+
1672
+ // A REFUSAL, rendered as one, naming the pid and the lease.
1673
+ "T-8": {
1674
+ ok: true,
1675
+ state: "in-flight",
1676
+ task_id: "T-8",
1677
+ attempt: 1,
1678
+ attempts_total: 1,
1679
+ profile: "dipkshit",
1680
+ provider: "deepseek",
1681
+ engine: "api",
1682
+ model_requested: "deepseek-v4-flash",
1683
+ band: "[0,40)",
1684
+ score: 31,
1685
+ journal: "/repo/.claude/orc/extra-journal/T-8/attempt-01.json",
1686
+ journal_fidelity: "per-turn",
1687
+ journal_fidelity_note: "every turn and every tool call was recorded as it happened.",
1688
+ resumed_from: null,
1689
+ slice_path: "/repo/.claude/orc/run/refund/T-8.slice.json",
1690
+ slice_sha256: "5566778899001122334455667788990011223344556677889900112233445566",
1691
+ started_at: "2026-08-24T19:58:04.117Z",
1692
+ ended_at: null,
1693
+ duration_ms: null,
1694
+ outcome: null,
1695
+ reason: null,
1696
+ retryable: null,
1697
+ reported_back: false,
1698
+ orphan: false,
1699
+ liveness: {
1700
+ live: true,
1701
+ pid: 31882,
1702
+ pid_alive: true,
1703
+ lease_expires_at: "2026-08-24T20:14:04.117Z",
1704
+ lease_expired: false,
1705
+ note: null,
1706
+ },
1707
+ attribution: null,
1708
+ files: [
1709
+ {
1710
+ path: "src/pay/refund.ts",
1711
+ state: "modified",
1712
+ baseline: { exists: true, sha256: "ff6607182930a1b2c3d4e5f60718293a4b5c6d7e8f90aa11bb22cc33dd44ee55", lines: 120 },
1713
+ now: { exists: true, sha256: "07182930a1b2c3d4e5f60718293a4b5c6d7e8f90aa11bb22cc33dd44ee55ff66", lines: 131 },
1714
+ numstat: { added: 11, removed: 0, source: "the baseline WAS the committed blob, so `git diff --numstat HEAD` describes exactly this dispatch's change" },
1715
+ },
1716
+ ],
1717
+ touched_undeclared: [],
1718
+ reverted: [],
1719
+ git: true,
1720
+ git_note: null,
1721
+ last_action: "turn 2 of 12 · Edit src/pay/refund.ts · ok",
1722
+ progress_lines: 4,
1723
+ unreadable_progress_lines: 0,
1724
+ turns_used: 2,
1725
+ max_turns: 12,
1726
+ partial_usage: { input: 3020, cache_write: 0, cache_read: 0, output: 288 },
1727
+ partial_usage_note:
1728
+ "read from the journal's per-turn vector. It is a FLOOR — the true total may be higher, because the dispatch died before it could report.",
1729
+ acceptance: ["a partial refund never exceeds the captured amount"],
1730
+ acceptance_note: "carried forward unevaluated — whether these are met is not a question this command can answer.",
1731
+ resume_target: null,
1732
+ next: null,
1733
+ spend_recovered: null,
1734
+ blocked_by:
1735
+ "pid 31882 is still alive and its lease does not expire until 2026-08-24T20:14:04.117Z. A human decides whether that process is really working: two writers on one file is worse than a lost dispatch.",
1736
+ },
1737
+
1738
+ // THE BLOCKED RESUME. A declared file came back CLOSER TO HEAD than the
1739
+ // baseline — how a destructive git command inside a slice disguises itself.
1740
+ "T-9": {
1741
+ ok: true,
1742
+ state: "resumable",
1743
+ task_id: "T-9",
1744
+ attempt: 1,
1745
+ attempts_total: 1,
1746
+ profile: "local-opencode",
1747
+ provider: "custom",
1748
+ engine: "cli",
1749
+ model_requested: "deepseek/deepseek-chat",
1750
+ band: "[40,80)",
1751
+ score: 61,
1752
+ journal: "/repo/.claude/orc/extra-journal/T-9/attempt-01.json",
1753
+ journal_fidelity: "streamed-opaque",
1754
+ journal_fidelity_note:
1755
+ "the child's own output was captured verbatim; ORC did not interpret it, so there is NO per-turn tool attribution here — only bytes.",
1756
+ resumed_from: null,
1757
+ slice_path: "/repo/.claude/orc/run/schema/T-9.slice.json",
1758
+ slice_sha256: "7788990011223344556677889900112233445566778899001122334455667788",
1759
+ started_at: "2026-08-23T11:15:42.000Z",
1760
+ ended_at: null,
1761
+ duration_ms: null,
1762
+ outcome: null,
1763
+ reason: null,
1764
+ retryable: null,
1765
+ // NEVER REPORTED BACK, and the lease has expired — so it is an orphan AND
1766
+ // the worktree moved.
1767
+ reported_back: false,
1768
+ orphan: true,
1769
+ liveness: { live: false, pid: 9001, pid_alive: false, lease_expires_at: "2026-08-23T11:31:42.000Z", lease_expired: true, note: "the lease has expired, so a live pid here is treated as SOMEBODY ELSE'S process. Pid reuse is real; this is an honest bound, not a proof." },
1770
+ attribution: null,
1771
+ files: [
1772
+ {
1773
+ path: "src/db/schema.sql",
1774
+ state: "reverted",
1775
+ baseline: { exists: true, sha256: "182930a1b2c3d4e5f60718293a4b5c6d7e8f90aa11bb22cc33dd44ee55ff6607", lines: 302 },
1776
+ now: { exists: true, sha256: "2930a1b2c3d4e5f60718293a4b5c6d7e8f90aa11bb22cc33dd44ee55ff660718", lines: 288 },
1777
+ numstat: { added: null, removed: null, source: "the file already differed from HEAD before this dispatch started, so a line count here would mix this dispatch's change with somebody else's uncommitted one. UNKNOWN, and unknown is not zero." },
1778
+ },
1779
+ ],
1780
+ touched_undeclared: [],
1781
+ reverted: ["src/db/schema.sql"],
1782
+ git: true,
1783
+ git_note: null,
1784
+ last_action: "nothing was captured — this engine records BYTES, and none arrived.",
1785
+ progress_lines: 0,
1786
+ unreadable_progress_lines: 0,
1787
+ turns_used: 0,
1788
+ max_turns: null,
1789
+ partial_usage: null,
1790
+ partial_usage_note: "the journal recorded no usage vector, so there is NO figure here — not a zero one.",
1791
+ acceptance: ["the migration is reversible"],
1792
+ acceptance_note: "carried forward unevaluated — whether these are met is not a question this command can answer.",
1793
+ resume_target: {
1794
+ kind: "extra",
1795
+ profile: "local-opencode",
1796
+ agent: null,
1797
+ why: "`the failure` is retryable, so the same profile gets it again in a NEW session — carrying the position it left behind.",
1798
+ resumes_so_far: 0,
1799
+ resume_max: 2,
1800
+ },
1801
+ next: null,
1802
+ spend_recovered: { already: false, marker: "/repo/.claude/orc/extra-journal/T-9/attempt-01.recovered" },
1803
+ blocked_by:
1804
+ "src/db/schema.sql came back CLOSER TO HEAD than the baseline — the §6 revert signature. A human decides whether to restore first: resuming on top of a possible destructive action is the one case where continuing is worse than starting over.",
1805
+ },
1806
+
1807
+ // A CLEAN CLOSE. Resuming would duplicate work that is already done.
1808
+ "T-11": {
1809
+ ok: true,
1810
+ state: "complete",
1811
+ task_id: "T-11",
1812
+ attempt: 1,
1813
+ attempts_total: 1,
1814
+ profile: "dipkshit",
1815
+ provider: "deepseek",
1816
+ engine: "api",
1817
+ model_requested: "deepseek-v4-flash",
1818
+ band: "[0,40)",
1819
+ score: 9,
1820
+ journal: "/repo/.claude/orc/extra-journal/T-11/attempt-01.json",
1821
+ journal_fidelity: "per-turn",
1822
+ journal_fidelity_note: "every turn and every tool call was recorded as it happened.",
1823
+ resumed_from: null,
1824
+ slice_path: "/repo/.claude/orc/run/slug/T-11.slice.json",
1825
+ slice_sha256: "9900112233445566778899001122334455667788990011223344556677889900",
1826
+ started_at: "2026-06-30T09:00:00.000Z",
1827
+ ended_at: "2026-06-30T09:00:28.000Z",
1828
+ duration_ms: 28000,
1829
+ outcome: "done",
1830
+ reason: null,
1831
+ retryable: false,
1832
+ reported_back: true,
1833
+ orphan: false,
1834
+ liveness: { live: false, pid: 4410, pid_alive: false, lease_expires_at: "2026-06-30T09:16:00.000Z", lease_expired: true, note: "the lease has expired, so a live pid here is treated as SOMEBODY ELSE'S process. Pid reuse is real; this is an honest bound, not a proof." },
1835
+ attribution: {
1836
+ verdict: null,
1837
+ why: "this attempt finished. There is nothing to attribute.",
1838
+ evidence: [],
1839
+ fallback_would_also_fail: false,
1840
+ probe: null,
1841
+ },
1842
+ files: [
1843
+ {
1844
+ path: "src/util/slug.ts",
1845
+ state: "modified",
1846
+ baseline: { exists: true, sha256: "a1b2c3d4e5f60718293a4b5c6d7e8f90aa11bb22cc33dd44ee55ff6607182930", lines: 34 },
1847
+ now: { exists: true, sha256: "b2c3d4e5f60718293a4b5c6d7e8f90aa11bb22cc33dd44ee55ff6607182930a1", lines: 39 },
1848
+ numstat: { added: 5, removed: 0, source: "the baseline WAS the committed blob, so `git diff --numstat HEAD` describes exactly this dispatch's change" },
1849
+ },
1850
+ ],
1851
+ touched_undeclared: [],
1852
+ reverted: [],
1853
+ git: true,
1854
+ git_note: null,
1855
+ last_action: "turn 3 of 12 · Write src/util/slug.ts · ok",
1856
+ progress_lines: 7,
1857
+ unreadable_progress_lines: 0,
1858
+ turns_used: 3,
1859
+ max_turns: 12,
1860
+ partial_usage: { input: 5100, cache_write: 0, cache_read: 0, output: 410 },
1861
+ partial_usage_note:
1862
+ "read from the journal's per-turn vector. It is a FLOOR — the true total may be higher, because the dispatch died before it could report.",
1863
+ acceptance: ["a slug never contains two dashes in a row"],
1864
+ acceptance_note: "carried forward unevaluated — whether these are met is not a question this command can answer.",
1865
+ resume_target: null,
1866
+ next: null,
1867
+ spend_recovered: null,
1868
+ blocked_by: null,
1869
+ },
1870
+
1871
+ // A PRE-0.54.0 DISPATCH somebody asks about. Exit 2, and the message says so
1872
+ // rather than pretending the task never existed.
1873
+ "T-12": {
1874
+ ok: false,
1875
+ state: "no-journal",
1876
+ task_id: "T-12",
1877
+ attempt: null,
1878
+ attempts_total: 0,
1879
+ error:
1880
+ "no journal for task `T-12`. Either the id is wrong, or this dispatch predates the journal (orc 0.54.0) — in which case there is no baseline and today's fallback procedure is the whole of the answer.",
1881
+ blocked_by: null,
1882
+ },
1883
+ };
1884
+
1885
+ // The prune preview. It NAMES EVERY DIRECTORY — a count is not consent — and it
1886
+ // names why each kept one is kept, which is as much of the answer.
1887
+ const extraJournalPrune = {
1888
+ ok: true,
1889
+ root: "/repo/.claude/orc/extra-journal",
1890
+ dry_run: true,
1891
+ retention_days: 30,
1892
+ candidates: [
1893
+ {
1894
+ task_id: "T-11",
1895
+ dir: "/repo/.claude/orc/extra-journal/T-11",
1896
+ attempts: 1,
1897
+ why: "every attempt closed `done` and nothing here has changed in 30+ days",
1898
+ },
1899
+ ],
1900
+ kept: [
1901
+ { task_id: "T-2", why: "attempt 1 closed `failed`, not `done`" },
1902
+ { task_id: "T-5", why: "attempt 2 closed `partial`, not `done`" },
1903
+ { task_id: "T-7", why: "attempt 1 closed `failed`, not `done`" },
1904
+ { task_id: "T-8", why: "attempt 1 never reported back — an orphan is never swept" },
1905
+ { task_id: "T-9", why: "attempt 1 never reported back — an orphan is never swept" },
1906
+ ],
1907
+ removed: [],
1908
+ };
1909
+
1910
+ module.exports = {
1911
+ extraProviders,
1912
+ extraList,
1913
+ extraListNoConnection,
1914
+ extraListNeverTested,
1915
+ extraTools,
1916
+ extraKeyhelp,
1917
+ extraModels,
1918
+ extraPingLive,
1919
+ extraPingDeadModel,
1920
+ extraPingNotInstalled,
1921
+ extraInstall,
1922
+ extraDoctor,
1923
+ extraRoute,
1924
+ extraRole,
1925
+ extraLanes,
1926
+ extraStats,
1927
+ extraRates,
1928
+ extraPingOk,
1929
+ extraPingBad,
1930
+ extraPingSaveOffer,
1931
+ extraJournal,
1932
+ extraReconcile,
1933
+ extraJournalPrune,
1934
+ };