@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,81 @@
1
+ "use strict";
2
+ /* fixtures/flow.js — canned data for `orc ui --fixtures`.
3
+ A compiled DIY flow with an OFF phase, so the red struck-through step is
4
+ designable.
5
+
6
+ THE RULE FOR EVERY FILE IN HERE: carry ONE OF EVERY STATE, including the
7
+ ugly ones. You cannot DESIGN a STALE chip on a fresh wiki, and a state
8
+ with no fixture is a state nobody has ever looked at. A per-state count
9
+ test asserts this, so a new state cannot ship without one.
10
+
11
+ Shapes MUST match what `bin/cli.js --json` really emits — a drifted
12
+ fixture is worse than no fixture. */
13
+
14
+ const { PROJECT } = require("./shell.js");
15
+
16
+ const diy = {
17
+ state: "STALE",
18
+ reason: "config changed since the last compile; orc updated 0.41.0 → 0.43.0 — run `orc diy compile`",
19
+ triggers: ["config changed since the last compile", "orc updated 0.41.0 → 0.43.0"],
20
+ configured: true,
21
+ paths: { config: PROJECT + "/.claude/orc-diy.config.yaml", compiled: PROJECT + "/.claude/orc/diy/FLOW-COMPILED.md", lock: PROJECT + "/.claude/orc/diy/flow.lock.json" },
22
+ // `options` is the key's closed set (v0.44.0) and the panel turns it into a
23
+ // dropdown. The fixture carries all three shapes on purpose: an ordinary
24
+ // enum, a NUMERIC set (rubric_bands — every band, not just the current one),
25
+ // `options: null` free text (flow_name), and the ugly one — `fixed_executor`
26
+ // holding the empty value, which is NOT in its own option list.
27
+ keys: [
28
+ { key: "flow_name", value: "my-lean", default: "custom", is_set: true, desc: "Name shown in the compiled flow.", options: null },
29
+ { key: "wiki_gate", value: "notice", default: "notice", is_set: false, desc: "Wiki freshness at preflight.", options: ["notice", "off", "hard"] },
30
+ { key: "analyze", value: "off", default: "full", is_set: true, desc: "Analyst phase.", options: ["auto", "off", "mini", "full"] },
31
+ { key: "planning", value: "own-planner", default: "auto", is_set: true, desc: "Planning route.", options: ["auto", "own-planner", "superpowers", "openspec"] },
32
+ { key: "pattern", value: "ask", default: "ask", is_set: false, desc: "Code-pattern gate on a cache miss.", options: ["ask", "off", "on"] },
33
+ { key: "scoring", value: "on", default: "on", is_set: false, desc: "Rubric scoring.", options: ["on", "off"] },
34
+ { key: "fixed_executor", value: "", default: "", is_set: false, desc: "Executor used for every task when scoring is off.", options: ["orc-executor-haiku-4-5", "orc-executor-sonnet-4-6-med", "orc-executor-sonnet-5-high", "orc-executor-opus-4-8-high", "orc-executor-opus-5-high"] },
35
+ { key: "review", value: "blocking-only", default: "full", is_set: true, desc: "Review phase depth.", options: ["on", "off", "blocking-only"] },
36
+ { key: "security", value: "off", default: "off", is_set: false, desc: "Security pass.", options: ["off", "ask", "on", "always"] },
37
+ { key: "verify", value: "smoke", default: "full", is_set: true, desc: "Verification depth.", options: ["full", "off", "smoke"] },
38
+ { key: "testgen", value: "off", default: "off", is_set: false, desc: "Test-authoring phase.", options: ["off", "ask", "on"] },
39
+ { key: "mock_example", value: "ask", default: "ask", is_set: false, desc: "Post-verify mocked example.", options: ["ask", "on", "off"] },
40
+ { key: "ship_mode", value: "ask", default: "ask", is_set: false, desc: "Terminal ship behavior.", options: ["ask", "commit", "pr", "report-only"] },
41
+ { key: "summary", value: "short", default: "full", is_set: true, desc: "Summary depth.", options: ["full", "off", "short"] },
42
+ { key: "tdd", value: "on", default: "on", is_set: false, desc: "TDD gate.", options: ["on", "off"] },
43
+ { key: "rubric_bands", value: 5, default: 5, is_set: false, desc: "Scoring granularity (scoring on only).", options: [2, 3, 4, 5, 6, 7, 8] },
44
+ { key: "session_tier", value: "opus-4-8-high", default: "opus-4-8-high", is_set: false, desc: "Declared main-session tier.", options: ["sonnet-4-6-high", "opus-4-7-high", "opus-4-8-high", "opus-5-high", "opus-5-max", "fable-5-high"] },
45
+ ],
46
+ // The bootstrap catalog, empty name first (= full-lane defaults, no --preset
47
+ // flag). `lean` is ACTIVE here even though this flow was renamed away from
48
+ // it — that is the state the "in use" chip exists for, and you cannot design
49
+ // it against a catalog where nothing matches.
50
+ presets: [
51
+ { name: "", changes: {}, active: false },
52
+ { name: "lean", changes: { analyze: "off", review: "blocking-only", verify: "smoke", summary: "short", flow_name: "lean" }, active: true },
53
+ { name: "paranoid", changes: { analyze: "full", security: "always", testgen: "on", verify: "full", flow_name: "paranoid" }, active: false },
54
+ { name: "solo-fast", changes: { scoring: "off", fixed_executor: "orc-executor-sonnet-5-high", review: "off", verify: "smoke", autonomy: "semi", flow_name: "solo-fast" }, active: false },
55
+ ],
56
+ errors: [],
57
+ warnings: ["tdd is on but verify is smoke — the red proof gates less than it could"],
58
+ // The stepper's data. A lean flow is the useful fixture here precisely
59
+ // because it is half switched off — you cannot design the red OFF state
60
+ // against a pipeline where every phase is on.
61
+ steps: [
62
+ { block: "header", label: "intake", key: null, value: "", on: true, note: "self-gate" },
63
+ { block: "trace", label: "trace", key: null, value: "", on: true, note: "always on" },
64
+ { block: "wiki", label: "wiki", key: "wiki_gate", value: "notice", on: true, note: "notice" },
65
+ { block: "analyze", label: "analyze", key: "analyze", value: "off", on: false, note: "off" },
66
+ { block: "planning", label: "plan", key: "planning", value: "own-planner", on: true, note: "own-planner" },
67
+ { block: "pattern", label: "pattern", key: "pattern", value: "ask", on: true, note: "ask" },
68
+ { block: "scoring", label: "score", key: "scoring", value: "on", on: true, note: "on" },
69
+ { block: "execution", label: "execute", key: null, value: "", on: true, note: "scored" },
70
+ { block: "review", label: "review", key: "review", value: "blocking-only", on: true, note: "blocking-only" },
71
+ { block: "security", label: "security", key: "security", value: "off", on: false, note: "off" },
72
+ { block: "verify", label: "verify", key: "verify", value: "smoke", on: true, note: "smoke" },
73
+ { block: "testgen", label: "testgen", key: "testgen", value: "off", on: false, note: "off" },
74
+ { block: "mock-example", label: "mock", key: "mock_example", value: "ask", on: true, note: "ask" },
75
+ { block: "ship", label: "ship", key: "ship_mode", value: "ask", on: true, note: "ask" },
76
+ { block: "summary", label: "summary", key: "summary", value: "short", on: true, note: "short" },
77
+ ],
78
+ score_table: "| Score | Executor agent |\n|-------|----------------|\n| [0,30) | orc-executor-haiku-4-5 |\n| [90,100] | orc-executor-opus-4-8-high |",
79
+ };
80
+
81
+ module.exports = { diy };
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /* fixtures/handoff.js — canned data for `orc ui --fixtures`.
3
+ Editable surfaces at all three grades. RED exists so the no-button-at-all
4
+ rule is visible rather than remembered.
5
+
6
+ THE RULE FOR EVERY FILE IN HERE: carry ONE OF EVERY STATE, including the
7
+ ugly ones. You cannot DESIGN a STALE chip on a fresh wiki, and a state
8
+ with no fixture is a state nobody has ever looked at. A per-state count
9
+ test asserts this, so a new state cannot ship without one.
10
+
11
+ Shapes MUST match what `bin/cli.js --json` really emits — a drifted
12
+ fixture is worse than no fixture. */
13
+
14
+ const { PROJECT } = require("./shell.js");
15
+
16
+ const handoff = {
17
+ ok: true,
18
+ map: PROJECT + "/orc-handoff/surfaces.md",
19
+ map_exists: true,
20
+ write_enabled: true,
21
+ counts: { green: 4, amber: 1, red: 2 },
22
+ surfaces: [
23
+ { id: "H-001", file: "web/locales/en.json", what: "Screen text", fields: {}, grade: "green", check: "npm run i18n:check", check_kind: "command", revert: "git checkout -- web/locales/en.json", reason: null, ask: null, exists: true },
24
+ { id: "H-002", file: "web/locales/id.json", what: "Screen text (Indonesian)", fields: {}, grade: "green", check: "npm run i18n:check", check_kind: "command", revert: "git checkout -- web/locales/id.json", reason: null, ask: null, exists: true },
25
+ { id: "H-003", file: "content/pricing.md", what: "The pricing page", fields: { upgrade: "a link checker would make this green" }, grade: "amber", check: "open /pricing in the app and read the page", check_kind: "manual", revert: "git checkout -- content/pricing.md", reason: null, ask: null, exists: true },
26
+ { id: "H-004", file: "config/features.yaml", what: "Feature switches", fields: {}, grade: "green", check: "npm run validate:flags", check_kind: "command", revert: "git checkout -- config/features.yaml", reason: null, ask: null, exists: true },
27
+ // A GREEN surface whose check FAILS. The panel must be able to render the
28
+ // failure and the undo command without it reading as "your edit was saved".
29
+ { id: "H-005", file: "content/faq.md", what: "The FAQ page", fields: { last_check: "fail" }, grade: "green", check: "npm run lint:content", check_kind: "command", revert: "git checkout -- content/faq.md", reason: null, ask: null, exists: true },
30
+ { id: "H-006", file: "src/config/limits.ts", what: "Looks like settings, is code", fields: {}, grade: "red", check: null, check_kind: "manual", revert: "git checkout -- src/config/limits.ts", reason: "this file decides how much a customer is charged", ask: "a backend developer", exists: true },
31
+ { id: "H-007", file: "db/seeds/tenants.sql", what: "Looks like data, is a migration input", fields: {}, grade: "red", check: null, check_kind: "manual", revert: "git checkout -- db/seeds/tenants.sql", reason: "this file is replayed into production on every deploy", ask: "the data owner", exists: true },
32
+ ],
33
+ };
34
+
35
+ module.exports = { handoff };
@@ -0,0 +1,486 @@
1
+ "use strict";
2
+ /**
3
+ * fixtures.js — canned API responses for `orc ui --fixtures`.
4
+ *
5
+ * This exists because you cannot DESIGN a state you cannot reach. On a healthy
6
+ * install with a fresh wiki and no paused runs, the STALE chip, the `waiting`
7
+ * run card, the shadowed-setting lock and the unhealthy doctor panel are
8
+ * unreachable — so they get built once, blind, and never looked at again.
9
+ *
10
+ * The rule for this file: carry ONE OF EVERY STATE, including the ugly ones.
11
+ * It also means the UI can be worked on with no ORC project at all.
12
+ *
13
+ * Shapes MUST match what `bin/cli.js --json` really emits. A fixture that has
14
+ * drifted from the CLI is worse than no fixture, so test/webui.test.js asserts
15
+ * the fixture key set against the live CLI output for the shared routes.
16
+ */
17
+
18
+
19
+ // v0.48.1 — the data lives one file per panel; this file is the ROUTER and
20
+ // nothing else. Adding a fixture is a new key in the panel's own file plus a
21
+ // case here; it is never an edit to a 1 700-line module.
22
+ const { PROJECT, doctor, where } = require("./shell.js");
23
+ const { config } = require("./settings.js");
24
+ const { wiki, wikiDocs, wikiShow, wikiCoverage, wikiCoverageFull, wikiUnregistered, wikiPlan, wikiDebt, wikiUsage, patterns, patternShow, gotchas, gotchasArchived, gotchaPrunePreview, wikiImpact } = require("./knowledge.js");
25
+ const { runs, runDetail, runDetailClosed, aftermath } = require("./runs.js");
26
+ const { stats, budgetForecast, budgetRates } = require("./stats.js");
27
+ const { pact } = require("./pact.js");
28
+ const { boundary } = require("./boundary.js");
29
+ const { handoff } = require("./handoff.js");
30
+ const { exportState, mocks } = require("./maintenance.js");
31
+ const { chGoals, chDims, challengeRoles, challengeCouncil, challengeCycles, challengeList, challengeShow, challengeDiff, challengeDiffMissing, challengeLint } = require("./challenge.js");
32
+ const { docList, docParts, docStatuses, docMapSections, docMap, docLint, docPlan, docShow, docSection, docShipped, docShippedDrifted, docNext, docAudit, docJournalRich, docJournalEmpty, docContext, docRules, docRulesFrozen, docForecast, docCost } = require("./docs.js");
33
+ const { diy } = require("./flow.js");
34
+ const { crosslink } = require("./crosslink.js");
35
+ const { mockDetail } = require("./mockrun.js");
36
+ const { extraProviders, extraList, extraListNoConnection, extraListNeverTested, extraTools, extraKeyhelp, extraModels, extraDoctor, extraRoute, extraRole, extraLanes, extraStats, extraRates, extraPingOk, extraPingBad, extraPingSaveOffer, extraJournal, extraReconcile, extraJournalPrune, extraPingLive, extraPingDeadModel, extraPingNotInstalled, extraInstall } = require("./extra.js");
37
+
38
+ module.exports.get = function get(route, q) {
39
+ switch (route) {
40
+ case "/api/doc":
41
+ return docList;
42
+ case "/api/doc/one":
43
+ // The two SHIPPED states overlay the plain ones, so `shipped`,
44
+ // `shipped-drifted` and a FORCED ship are all reachable in the panel.
45
+ return (
46
+ { [docShipped.slug]: docShipped, [docShippedDrifted.slug]: docShippedDrifted }[q && q.slug] ||
47
+ (q && docStatuses[q.slug]) ||
48
+ docStatuses["prd-checkout-refund-130826"]
49
+ );
50
+ case "/api/doc/show":
51
+ // The memory fields ride on whichever slug was asked for, so the header
52
+ // strip, the brief and the journal are all designable per state.
53
+ return {
54
+ ...docShow,
55
+ slug: (q && q.slug) || docShow.slug,
56
+ created_at: "13-08-2026 09:02:11",
57
+ last_touched_at: "15-08-2026 17:05:00",
58
+ sessions: 3,
59
+ context: (docContext[q && q.slug] || docContext["prd-checkout-refund-130826"]).context,
60
+ journal: (q && q.slug === "collab-risk-and-payments-130826" ? docJournalEmpty : docJournalRich).journal,
61
+ shipped: (docStatuses[q && q.slug] || {}).shipped || null,
62
+ ship_history: [],
63
+ };
64
+ case "/api/doc/map":
65
+ return docMap;
66
+ case "/api/doc/lint":
67
+ return docLint;
68
+ case "/api/doc/plan":
69
+ return docPlan;
70
+ case "/api/doc/section":
71
+ return docSection;
72
+ // v0.48.1. Each of these has ONE OF EVERY STATE behind it: a free next, a
73
+ // paid next, a next that is blocked on a human; a clean audit and a dirty
74
+ // one; a rich journal and one with nothing recorded at all.
75
+ case "/api/doc/parts":
76
+ return docParts[(q && q.slug) || ""] || docParts["prd-checkout-refund-130826"];
77
+ case "/api/doc/next":
78
+ return docNext[(q && q.slug) || ""] || docNext["prd-checkout-refund-130826"];
79
+ case "/api/doc/audit":
80
+ return docAudit[(q && q.slug) || ""] || docAudit["prd-checkout-refund-130826"];
81
+ case "/api/doc/journal":
82
+ return (q && q.slug) === "collab-risk-and-payments-130826" ? docJournalEmpty : docJournalRich;
83
+ // v0.52.0 (D9) — BOTH shapes: a document routed off Claude, and one that is
84
+ // not. `off` is a state with its own card, never a missing card.
85
+ case "/api/doc/extra":
86
+ return q && String(q.slug || "").indexOf("prd-") === 0
87
+ ? {
88
+ ok: true,
89
+ slug: String(q.slug),
90
+ extra: "writer",
91
+ stored: "writer",
92
+ source: "doc.json",
93
+ options: ["off", "writer", "checker", "both"],
94
+ resolve_order: ["doc.json (this document)", "config.extra_roles (the project)", "off"],
95
+ config_roles: ["executor", "doc-writer"],
96
+ shadowed_by_config: [],
97
+ why: "writer goes off Claude for this document; every other role stays on Claude.",
98
+ edges: { band: "[40,80)", edges: [40, 79], agree: true, resolved: { profile: "cheap", model: "deepseek-chat" } },
99
+ default: "off",
100
+ }
101
+ : {
102
+ ok: true,
103
+ slug: String(q && q.slug),
104
+ extra: "off",
105
+ stored: null,
106
+ source: "off",
107
+ options: ["off", "writer", "checker", "both"],
108
+ resolve_order: ["doc.json (this document)", "config.extra_roles (the project)", "off"],
109
+ config_roles: [],
110
+ shadowed_by_config: [],
111
+ why: "nothing in this document goes off Claude.",
112
+ edges: null,
113
+ default: "off",
114
+ };
115
+ case "/api/doc/context":
116
+ return docContext[(q && q.slug) || ""] || docContext["prd-checkout-refund-130826"];
117
+ // v0.49.2. One of every state behind each: a populated ledger AND an empty
118
+ // one, frozen-clean AND frozen-drifted, a real forecast AND a refusal AND a
119
+ // naive floor, a cost report joined AND one with no trace at all.
120
+ case "/api/doc/rules":
121
+ return docRules;
122
+ case "/api/doc/rules/one":
123
+ return docRulesFrozen[(q && q.slug) || ""] || docRulesFrozen["prd-checkout-refund-130826"];
124
+ case "/api/doc/forecast":
125
+ return docForecast[(q && q.slug) || ""] || docForecast["prd-checkout-refund-130826"];
126
+ case "/api/doc/cost":
127
+ return docCost[(q && q.slug) || ""] || docCost["prd-checkout-refund-130826"];
128
+ case "/api/challenge":
129
+ return challengeList;
130
+ case "/api/challenge/one":
131
+ return (q && challengeCycles[q.slug]) || challengeCycles["tsd-payments"];
132
+ case "/api/challenge/show":
133
+ // Only the rich cycle carries findings. Every other slug returns its own
134
+ // identity with an empty iteration list, which is the honest shape for a
135
+ // cycle nobody has judged yet — and stops the panel drawing one cycle's
136
+ // findings under another cycle's name.
137
+ return q && q.slug && q.slug !== challengeShow.slug
138
+ ? { ...challengeShow, slug: q.slug, iterations: [], accepted: {}, rebuttals: {}, events: [] }
139
+ : challengeShow;
140
+ case "/api/challenge/diff":
141
+ return q && q.slug === "billing-webhooks" ? challengeDiffMissing : challengeDiff;
142
+ case "/api/challenge/lint":
143
+ return challengeLint;
144
+ case "/api/challenge/roles":
145
+ return challengeRoles;
146
+ case "/api/challenge/council":
147
+ // UNSET is an ANSWER, not an error — the panel has to be designable
148
+ // against a cycle nobody has answered the roster for.
149
+ return q && q.slug === "billing-webhooks"
150
+ ? { ok: false, slug: "billing-webhooks", council: null, council_version: 1, suggested: challengeRoles.council.slice(0, 3), rows: challengeCycles["billing-webhooks"].council, lens_counts: {}, reason: "council-unset", hint: 'the roster is a decision, not a default; run `orc challenge council billing-webhooks --set <csv|all|none> --reason "…"`' }
151
+ : challengeCouncil;
152
+ case "/api/meta":
153
+ return undefined; // served for real even in fixture mode
154
+ case "/api/version":
155
+ // An update IS available here on purpose. "Up to date" is the state that
156
+ // needs no design; you cannot lay out the update chip, the rail dot or
157
+ // the upgrade row against a version that matches.
158
+ return { version: "0.43.2", latest: "0.44.0", update_available: true, install_spec: "github:azure-id/orc", checked_source: "https://raw.githubusercontent.com/azure-id/orc/main/package.json", checked_ref: "azure-id/orc@main", check_disabled: false };
159
+ case "/api/where":
160
+ return where;
161
+ case "/api/doctor":
162
+ return doctor;
163
+ case "/api/config":
164
+ return config;
165
+ case "/api/config/profiles":
166
+ return {
167
+ profiles: [
168
+ { name: "solo-fast", desc: "One person, moving fast, reads their own diffs. Fewer gates, bigger waves.", keys: { max_wave_tasks: 4, batch_pause_every: 3 }, changes: [{ key: "batch_pause_every", from: 2, to: 3 }] },
169
+ { name: "balanced", desc: "Today's defaults. Change nothing unless you know why.", keys: { max_wave_tasks: 3 }, changes: [{ key: "max_wave_tasks", from: 4, to: 3 }] },
170
+ { name: "paranoid", desc: "Shared codebase, real users. Every gate on, small waves, pause often.", keys: { max_wave_tasks: 2, security_review: "on" }, changes: [{ key: "max_wave_tasks", from: 4, to: 2 }, { key: "security_review", from: "off", to: "on" }] },
171
+ { name: "token-lean", desc: "Big repo, tight budget. Narrow scans, shallow analysis.", keys: { max_scouts: 1 }, changes: [{ key: "max_scouts", from: 3, to: 1 }] },
172
+ ],
173
+ };
174
+ case "/api/config/recommend":
175
+ return {
176
+ recommended: "paranoid",
177
+ desc: "Shared codebase, real users. Every gate on, small waves, pause often.",
178
+ reasons: ["a real `npm test` script exists — gates have something to check", "CI is configured — this repo is shared, not a scratchpad", "7 contributors in history — coordination cost is real", "a project wiki exists — grounding is already cheap"],
179
+ scores: { "solo-fast": 0, paranoid: 3, "token-lean": 0 },
180
+ };
181
+ case "/api/overview":
182
+ return { where, doctor, wiki, patterns: patterns, runs_total: runs.total, waiting: runs.runs.filter((r) => r.status === "waiting").map((r) => ({ slug: r.slug, updated_ms: r.updated_ms, lane: r.lane })), diy, pact, boundary, wiki_debt: wikiDebt, extra_journal: extraJournal };
183
+ case "/api/pact":
184
+ return pact;
185
+ case "/api/boundary":
186
+ return boundary;
187
+ case "/api/handoff":
188
+ return handoff;
189
+ case "/api/wiki/plan":
190
+ return wikiPlan;
191
+ case "/api/wiki/debt":
192
+ return wikiDebt;
193
+ case "/api/wiki/usage":
194
+ return wikiUsage;
195
+ case "/api/budget/forecast":
196
+ // No plan path → the exit-3 "no forecast possible" state, which is what a
197
+ // first-time user sees and therefore has to be designed too.
198
+ return q && q.plan
199
+ ? budgetForecast
200
+ : { ok: false, reason: "no-plan", hint: "pick a plan file — a forecast from a sentence is a guess that looks computed" };
201
+ case "/api/budget/rates":
202
+ return budgetRates;
203
+ case "/api/budget/actual":
204
+ return { ok: true, run: "store-credit", lane: "orc", trace: "run-orc-store-credit-100826-093012.txt", rows: [{ band: "[40,55)", dispatches: 3, forecast_weighted: 96000, actual_weighted: 138000, diff_pct: 44, tokens: { input: 9000, cache_write: 61000, cache_read: 121000, output: 11000 } }, { band: "[70,80)", dispatches: 1, forecast_weighted: 121000, actual_weighted: 304000, diff_pct: 151, tokens: { input: 12000, cache_write: 98000, cache_read: 240000, output: 24000 } }], actual: { tokens: { input: 21000, cache_write: 159000, cache_read: 361000, output: 35000 }, raw: 576000, weighted: 251100, usd: 7.02 }, cache_read_share: 0.71, unattributed: { blocks: 12, tokens: { input: 900, cache_write: 12000, cache_read: 24000, output: 1100 } }, joined: 17, dispatches: 19 };
205
+ case "/api/aftermath":
206
+ return aftermath;
207
+ case "/api/export":
208
+ return exportState;
209
+ case "/api/runs":
210
+ return runs;
211
+ case "/api/run": {
212
+ if (!q || !q.slug || q.slug === runDetail.slug) return runDetail;
213
+ // A closed run is its OWN detail shape — Reopen instead of Mark as done,
214
+ // and the recorded reason. Without it the closed state exists in the list
215
+ // and nowhere you can click.
216
+ if (q.slug === runDetailClosed.slug) return runDetailClosed;
217
+ const row = runs.runs.find((r) => r.slug === q.slug);
218
+ return {
219
+ ...runDetail,
220
+ slug: q.slug,
221
+ status: (row && row.status) || "done",
222
+ resume: row && row.status === "waiting" ? runDetail.resume : null,
223
+ closed: (row && row.closed) || null,
224
+ stands: { lane: (row && row.lane) || "/orc-mini", phase: (row && row.phase) || "", wave: (row && row.wave) || "" },
225
+ };
226
+ }
227
+ case "/api/wiki":
228
+ return wiki;
229
+ case "/api/wiki/impact":
230
+ return wikiImpact;
231
+ case "/api/patterns":
232
+ return patterns;
233
+ case "/api/gotchas":
234
+ return gotchas;
235
+ // v0.49.1 — the wiki's CONTENTS, the pattern's CONTENTS, and the two gotcha
236
+ // reads the panel needs to preview an eviction and reach the archive.
237
+ case "/api/wiki/docs":
238
+ return wikiDocs;
239
+ case "/api/wiki/show":
240
+ // `--body` is opt-in: the default carries no prose at all.
241
+ return q && q.body ? wikiShow : (({ body, ...rest }) => rest)(wikiShow);
242
+ case "/api/wiki/coverage":
243
+ // Two of them, so 61% AND 100% are both designable. `?full=1` picks the
244
+ // happy one; a state with no fixture is a state nobody has looked at.
245
+ return q && q.full ? wikiCoverageFull : wikiCoverage;
246
+ case "/api/pattern/show": {
247
+ const one = patternShow[(q && q.lang) || "react"] || patternShow.react;
248
+ return q && q.body ? one : (({ body, ...rest }) => rest)(one);
249
+ }
250
+ case "/api/gotchas/archived":
251
+ return gotchasArchived;
252
+ case "/api/gotcha/prune/preview":
253
+ return gotchaPrunePreview;
254
+ case "/api/stats":
255
+ return stats;
256
+ case "/api/diy":
257
+ return diy;
258
+ case "/api/crosslink":
259
+ return crosslink;
260
+ case "/api/mocks":
261
+ return mocks;
262
+ case "/api/mock":
263
+ return mockDetail;
264
+ case "/api/stack":
265
+ return { slugs: ["billing-split"], slug: "billing-split", ambiguous: false, plan: { slug: "billing-split", ready: false, exists: true, plan_path: PROJECT + "/stacked-pr/billing-split/stack-plan.md", layers: 4, ticket: "PAY-2214", problems: ["3 unfilled placeholders (e.g. <risk> <owner> <base>)"] } };
266
+ case "/api/changelog":
267
+ // Two entries, so the modal has to handle a LIST rather than one release —
268
+ // skipping a version is the normal case, not the exotic one.
269
+ return {
270
+ version: "0.43.2",
271
+ latest: "0.44.0",
272
+ update_available: true,
273
+ source: "https://raw.githubusercontent.com/azure-id/orc/main/CHANGELOG.md",
274
+ check_disabled: false,
275
+ fetched: true,
276
+ entries: [
277
+ {
278
+ version: "0.44.0",
279
+ date: "2026-08-09",
280
+ title: "`orc ui`: the guided tour, and an upgrade you can read first",
281
+ body:
282
+ "**A version number is not a reason to upgrade.** The banner now fetches the\n" +
283
+ "changelog from the same branch `orc upgrade` installs from, so what you read\n" +
284
+ "and what you get can never be different releases.\n\n" +
285
+ "- First-run tour over the key surfaces, skippable per project\n" +
286
+ "- The upgrade spotlight clears when you actually reach the preview",
287
+ },
288
+ {
289
+ version: "0.43.3",
290
+ date: "2026-08-08",
291
+ title: "settings stop being a wall",
292
+ body: "Collapsible tiers and a filter across all of them at once.",
293
+ },
294
+ ],
295
+ };
296
+ case "/api/crosslink/kinds":
297
+ // A short slice of the real catalog — enough to design the picker with,
298
+ // including the nested `auth/oidc` whose directory is sanitised to
299
+ // `auth-oidc` on disk. A picker that never sees one cannot be trusted.
300
+ return { kinds: ["grpc", "rest-endpoint", "graphql", "websocket", "message-queue", "webhook", "shared-db", "auth/oidc"] };
301
+ case "/api/experiment":
302
+ // can_launch:false is the fixture-mode state on purpose — a disabled
303
+ // launch button with a reason is a thing that needs designing.
304
+ return {
305
+ lanes: [
306
+ { id: "orc", cmd: "/orc", what: "Full pipeline: intake → plan → scored parallel waves → review → verify → ship." },
307
+ { id: "orc-quick", cmd: "/orc-quick", what: "Ask for anything. Look → ask once → do, and it always asks which agent." },
308
+ { id: "orc-mini", cmd: "/orc-mini", what: "One executor, smoke gate, ship. No full review or verify phase." },
309
+ { id: "orc-wiki", cmd: "/orc-wiki", what: "Build or refresh the project wiki. Expensive; always asks first." },
310
+ ],
311
+ project_root: "/example/project",
312
+ platform: "linux",
313
+ can_launch: false,
314
+ };
315
+ case "/api/learn":
316
+ return { sections: require("../../onboarding-content.js").SECTIONS };
317
+ // The mocked runs are package content, identical on every machine and
318
+ // needing no project — so fixture mode serves the REAL catalogue. A canned
319
+ // copy here could only ever be a worse version of a file sitting next to
320
+ // it, and it would be the one thing on this panel that could go stale.
321
+ case "/api/mockruns":
322
+ return require("../../mockrun-catalog.js").catalogue();
323
+ case "/api/mockrun": {
324
+ const doc = require("../../mockrun-catalog.js").get(String((q && q.slug) || ""));
325
+ return doc ? { ...doc, found: true } : { slug: String((q && q.slug) || ""), found: false };
326
+ }
327
+ case "/api/fs/list":
328
+ // The folder picker on canned data. It carries the states that are hard
329
+ // to reach on a tidy machine: a plain folder, a git repo WITHOUT a wiki
330
+ // (the case that saves an inert edge), a repo with one, and the project
331
+ // itself — which the picker must refuse.
332
+ return {
333
+ path: "/example",
334
+ parent: "/",
335
+ sep: "/",
336
+ home: "/home/dev",
337
+ project_root: PROJECT,
338
+ is_project_root: false,
339
+ relative: "..",
340
+ truncated: false,
341
+ dirs: [
342
+ { name: "payments-core", path: "/example/payments-core", is_repo: true, has_wiki: true },
343
+ { name: "storefront-web", path: "/example/storefront-web", is_repo: true, has_wiki: false },
344
+ { name: "ledger-batch", path: "/example/ledger-batch", is_repo: true, has_wiki: false },
345
+ { name: "project", path: PROJECT, is_repo: true, has_wiki: true },
346
+ { name: "scratch", path: "/example/scratch", is_repo: false, has_wiki: false },
347
+ ],
348
+ };
349
+ case "/api/maintenance":
350
+ return {
351
+ actions: [
352
+ { id: "update", label: "Re-copy this package's payload over the installed one", command: "orc update", network: false, names_files: false },
353
+ { id: "prune", label: "Update AND delete ORC-named orphans from a pre-manifest install", command: "orc update --prune", network: false, names_files: true },
354
+ { id: "fix", label: "Apply every fix orc doctor found (= update + prune + settings re-merge)", command: "orc doctor --fix", network: false, names_files: false },
355
+ { id: "upgrade", label: "Fetch the LATEST package from the network, then apply it", command: "orc upgrade", network: true, names_files: false },
356
+ { id: "update-global", label: "Re-copy this package's payload over the GLOBAL install in ~/.claude", command: "orc update --global", network: false, names_files: false, advanced: true },
357
+ ],
358
+ };
359
+ case "/api/maintenance/preview":
360
+ return {
361
+ action: q.action,
362
+ label: "Preview (fixtures)",
363
+ command:
364
+ "orc " +
365
+ (q.action === "prune"
366
+ ? "update --prune"
367
+ : q.action === "fix"
368
+ ? "doctor --fix"
369
+ : q.action === "upgrade"
370
+ ? "upgrade"
371
+ : q.action === "update-global"
372
+ ? "update --global"
373
+ : "update"),
374
+ network: q.action === "upgrade",
375
+ names_files: q.action === "prune",
376
+ advanced: q.action === "update-global",
377
+ preview_command: q.action === "update-global" ? "orc doctor --global" : "orc doctor",
378
+ preview: doctor,
379
+ // Derived from the SAME list the Runs panel renders, so a run closed in
380
+ // the fixture set stops blocking the preview here too — which is the
381
+ // whole point of the v0.49.2 fix.
382
+ waiting_runs: runs.runs.filter((r) => r.status === "waiting").map((r) => r.slug),
383
+ dirty_tree: true,
384
+ };
385
+ // v0.50.0 — `orc extra`. One of every state, including the ugly ones: a
386
+ // stale catalog, a vault part-way through its countdown, a vault that
387
+ // deleted itself, a missing environment key, overlapping route rows and a
388
+ // routed model the provider no longer lists.
389
+ // v0.51.0 — the SETUP GATE has three states and each is reachable here:
390
+ // `?gate=none` is nothing connected, `?gate=untested` is a connection that
391
+ // has never answered, and the default is the gate open. Without all three
392
+ // you cannot design the panel a first-time user actually sees.
393
+ case "/api/extra": {
394
+ // The panel sends no query on this read, so a query-only switch would put
395
+ // the two shut-gate states somewhere nobody could ever look at them —
396
+ // which is the exact failure --fixtures exists to prevent. `ORC_UI_FIXTURE_GATE`
397
+ // makes both reachable in the running panel:
398
+ // ORC_UI_FIXTURE_GATE=none nothing connected at all
399
+ // ORC_UI_FIXTURE_GATE=untested connected, never answered
400
+ const g = (q && q.gate) || process.env.ORC_UI_FIXTURE_GATE || "";
401
+ return g === "none" ? extraListNoConnection : g === "untested" ? extraListNeverTested : extraList;
402
+ }
403
+ // v0.51.0 — the four LOCAL TOOL states, the three credential routes, and
404
+ // both model-entry shapes.
405
+ case "/api/extra/tools":
406
+ return extraTools;
407
+ case "/api/extra/keyhelp":
408
+ return q && q.profile === "local" ? extraKeyhelp.env : extraKeyhelp.login;
409
+ case "/api/extra/models":
410
+ return q && q.profile === "custom" ? extraModels.freeText : extraModels.list;
411
+ case "/api/extra/providers":
412
+ return extraProviders;
413
+ case "/api/extra/doctor":
414
+ return extraDoctor;
415
+ case "/api/extra/route":
416
+ return extraRoute;
417
+ case "/api/extra/role":
418
+ return extraRole;
419
+ case "/api/extra/lanes":
420
+ return extraLanes;
421
+ case "/api/extra/stats":
422
+ return extraStats;
423
+ case "/api/extra/rates":
424
+ return extraRates;
425
+ // v0.54.0 — RECOVERY. One reconcile fixture per state, including the ugly
426
+ // ones: an `in-flight` REFUSAL, a `reverted` block, a `streamed-opaque`
427
+ // journal with no per-turn attribution to render, and a `no-journal` answer
428
+ // for a dispatch that predates the feature.
429
+ case "/api/extra/journal":
430
+ return extraJournal;
431
+ case "/api/extra/reconcile":
432
+ return extraReconcile[String((q && q.task) || "")] || extraReconcile["T-12"];
433
+ case "/api/extra/journal/prune/preview":
434
+ return extraJournalPrune;
435
+ case "/api/extra/show":
436
+ return {
437
+ ok: true,
438
+ profile: extraList.profiles.find((p) => p.name === (q && q.profile)) || extraList.profiles[0],
439
+ catalog: null,
440
+ history: [],
441
+ };
442
+ case "/api/job":
443
+ return { id: null, running: false };
444
+ default:
445
+ return undefined;
446
+ }
447
+ };
448
+
449
+ // ── the states below are referenced above; declared after for readability ───
450
+
451
+ // The POST half (v0.50.0). Almost every mutation in fixture mode answers "nothing
452
+ // ran" and that is the honest answer — but the CONNECTION TEST'S OUTCOME is a
453
+ // state this panel is largely about, and a state you cannot design if the wire
454
+ // never lands. So exactly one route has canned answers, chosen deterministically
455
+ // from the profile so they agree with what the list already claims.
456
+ //
457
+ // A route with no entry here still gets the ordinary "nothing ran" reply.
458
+ module.exports.post = function post(route, body) {
459
+ // `add` answers OK so the CONNECT FLOW can be walked end to end in fixture
460
+ // mode — the add is only the step before the test, and the test's outcome is
461
+ // the state worth designing. Every other write still answers "nothing ran".
462
+ if (route === "/api/extra/add") return { exit_code: 0, data: { ok: true, next: "orc extra ping" } };
463
+ // v0.51.0 — a launch that could NOT happen and one that did. Both are exit 0,
464
+ // because "no terminal here" is an ANSWER carrying the command to paste.
465
+ if (route === "/api/extra/install")
466
+ return {
467
+ exit_code: 0,
468
+ data: (body && body.provider) === "codex" ? extraInstall.refused : extraInstall.launched,
469
+ };
470
+ if (route === "/api/extra/models/test")
471
+ return { exit_code: 0, data: { ok: true, test: extraPingLive } };
472
+ if (route !== "/api/extra/ping") return undefined;
473
+ const profile = String((body && body.profile) || "");
474
+ if (body && body.key && !body.passphrase) return { exit_code: 0, data: { ...extraPingSaveOffer, profile } };
475
+ // v0.51.0 — the PAID rung has THREE outcomes worth designing and each is
476
+ // reachable: it worked and still cannot say which model answered, the model
477
+ // was LISTED and is DEAD upstream, and the tool is not installed at all.
478
+ if (route === "/api/extra/ping" && body && body.live) {
479
+ if (profile === "toolc") return { exit_code: 1, data: { ...extraPingNotInstalled, profile } };
480
+ if (String(body.model || "").indexOf("free") !== -1)
481
+ return { exit_code: 1, data: { ...extraPingDeadModel, profile } };
482
+ return { exit_code: 0, data: { ...extraPingLive, profile: profile || extraPingLive.profile } };
483
+ }
484
+ if (profile === "router" || profile === "burned") return { exit_code: 1, data: { ...extraPingBad, profile } };
485
+ return { exit_code: 0, data: { ...extraPingOk, profile: profile || extraPingOk.profile } };
486
+ };