@jtf19/vibecoding-kit 0.1.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 (619) hide show
  1. package/AGENTS.md +84 -0
  2. package/CHANGELOG.md +28 -0
  3. package/CLAUDE.md +137 -0
  4. package/CODE_OF_CONDUCT.md +30 -0
  5. package/CONTRIBUTING.md +69 -0
  6. package/LICENSE +67 -0
  7. package/README.md +162 -0
  8. package/SECURITY.md +34 -0
  9. package/adapters/claude/install.md +70 -0
  10. package/adapters/claude/plugin.json +38 -0
  11. package/adapters/claude/settings.example.json +15 -0
  12. package/adapters/codex/hooks.example.json +15 -0
  13. package/adapters/codex/install.md +72 -0
  14. package/adapters/codex/plugin.json +58 -0
  15. package/adapters/cursor/hooks.example.json +17 -0
  16. package/adapters/cursor/install.md +72 -0
  17. package/adapters/cursor/plugin.json +42 -0
  18. package/adapters/opencode/install.md +95 -0
  19. package/adapters/opencode/plugin.js +56 -0
  20. package/adapters/opencode/plugin.json +58 -0
  21. package/adapters/pi/extension.ts +56 -0
  22. package/adapters/pi/install.md +95 -0
  23. package/adapters/pi/plugin.json +58 -0
  24. package/bin/vibe-cli-usage.mjs +43 -0
  25. package/bin/vibe.mjs +120 -0
  26. package/docs/acceptance-checklist.md +1226 -0
  27. package/docs/architecture-debt-burndown.md +537 -0
  28. package/docs/architecture.md +77 -0
  29. package/docs/ci-evidence-onboarding.md +143 -0
  30. package/docs/development.md +71 -0
  31. package/docs/evidence-authoring.md +188 -0
  32. package/docs/golden-path.md +179 -0
  33. package/docs/install-acceptance-checklist.md +90 -0
  34. package/docs/install-claude.md +41 -0
  35. package/docs/install-codex.md +41 -0
  36. package/docs/install-cursor.md +41 -0
  37. package/docs/install-experience-roadmap.md +394 -0
  38. package/docs/install.md +119 -0
  39. package/docs/maintainer-guide.md +197 -0
  40. package/docs/phase-1-implementation.md +848 -0
  41. package/docs/phase-2-roadmap.md +142 -0
  42. package/docs/quick-recipes.md +115 -0
  43. package/docs/readiness-interpretation.md +105 -0
  44. package/docs/readiness-troubleshooting.md +209 -0
  45. package/docs/release-check-reference.md +63 -0
  46. package/docs/release-guide.md +481 -0
  47. package/docs/release-notes.md +75 -0
  48. package/docs/runtime-contract.md +1010 -0
  49. package/docs/runtime-maintainer-validation.md +212 -0
  50. package/docs/runtime-roadmap.md +2265 -0
  51. package/docs/skill-authoring-guide.md +150 -0
  52. package/docs/submodule-guide.md +131 -0
  53. package/docs/team-adoption.md +113 -0
  54. package/docs/user-guide.md +108 -0
  55. package/docs/vibecoding-fork-analysis.md +398 -0
  56. package/docs/workflow-chaining.md +539 -0
  57. package/examples/ci/README.md +61 -0
  58. package/examples/ci/ci-evidence-input.example.json +56 -0
  59. package/examples/ci/generate-diff-coverage.mjs +90 -0
  60. package/examples/ci/generate-test-evidence.mjs +82 -0
  61. package/examples/ci/github-actions-readiness.yml +108 -0
  62. package/examples/claude-project/README.md +57 -0
  63. package/examples/codex-project/README.md +57 -0
  64. package/examples/cursor-project/README.md +57 -0
  65. package/examples/full-chain/README.md +63 -0
  66. package/examples/full-chain/architecture-design.md +128 -0
  67. package/examples/full-chain/commit-readiness.json +31 -0
  68. package/examples/full-chain/delivery-traceability.yaml +32 -0
  69. package/examples/full-chain/diff-coverage.json +73 -0
  70. package/examples/full-chain/evidence.json +20 -0
  71. package/examples/full-chain/implementation-plan.md +54 -0
  72. package/examples/full-chain/product-acceptance.md +86 -0
  73. package/examples/full-chain/product-discovery.md +84 -0
  74. package/examples/full-chain/product-spec.md +88 -0
  75. package/examples/full-chain/scenario-acceptance.yaml +32 -0
  76. package/examples/full-chain/test-evidence.json +29 -0
  77. package/examples/full-chain/ui-design-contract.md +87 -0
  78. package/examples/golden-path/README.md +84 -0
  79. package/examples/golden-path/diff-coverage.json +66 -0
  80. package/examples/golden-path/implementation-plan.md +62 -0
  81. package/examples/golden-path/product-spec.md +96 -0
  82. package/examples/golden-path/test-evidence.json +29 -0
  83. package/examples/runtime-fixtures/architecture-design.md +128 -0
  84. package/examples/runtime-fixtures/commit-readiness.json +31 -0
  85. package/examples/runtime-fixtures/delivery-traceability.yaml +32 -0
  86. package/examples/runtime-fixtures/diff-coverage.json +73 -0
  87. package/examples/runtime-fixtures/evidence.json +20 -0
  88. package/examples/runtime-fixtures/implementation-plan.md +54 -0
  89. package/examples/runtime-fixtures/negative/commit-readiness-boundary-escalated.json +27 -0
  90. package/examples/runtime-fixtures/negative/delivery-traceability-bad-ref.yaml +32 -0
  91. package/examples/runtime-fixtures/negative/diff-coverage-changed-file-without-task-ref.json +40 -0
  92. package/examples/runtime-fixtures/negative/diff-coverage-operation-mismatch.json +38 -0
  93. package/examples/runtime-fixtures/negative/diff-coverage-required-task-missing.json +24 -0
  94. package/examples/runtime-fixtures/negative/diff-coverage-unexpected-file.json +20 -0
  95. package/examples/runtime-fixtures/negative/test-evidence-missing-output-digest.json +23 -0
  96. package/examples/runtime-fixtures/negative/test-evidence-risky-task-missing.json +29 -0
  97. package/examples/runtime-fixtures/product-acceptance.md +86 -0
  98. package/examples/runtime-fixtures/product-discovery.md +84 -0
  99. package/examples/runtime-fixtures/product-spec.md +88 -0
  100. package/examples/runtime-fixtures/scenario-acceptance.yaml +32 -0
  101. package/examples/runtime-fixtures/test-evidence.json +29 -0
  102. package/examples/runtime-fixtures/ui-design-contract.md +87 -0
  103. package/hooks/post-tool-compact/README.md +47 -0
  104. package/hooks/session-start/README.md +112 -0
  105. package/hooks/session-start/session-start-state-boundary-contract.mjs +161 -0
  106. package/hooks/session-start/session-start.md +29 -0
  107. package/hooks/session-start/session-start.mjs +49 -0
  108. package/hooks/workflow-handoff/README.md +44 -0
  109. package/hooks/workflow-handoff/workflow-handoff.md +11 -0
  110. package/package.json +72 -0
  111. package/skills/using-vibecoding/SKILL.md +396 -0
  112. package/skills/vibe-brainstorming/SKILL.md +98 -0
  113. package/skills/vibe-context-compact/SKILL.md +95 -0
  114. package/skills/vibe-debugging/SKILL.md +87 -0
  115. package/skills/vibe-dispatching-parallel-work/SKILL.md +144 -0
  116. package/skills/vibe-executing-plans/SKILL.md +114 -0
  117. package/skills/vibe-finishing-a-development-branch/SKILL.md +110 -0
  118. package/skills/vibe-implementation/SKILL.md +84 -0
  119. package/skills/vibe-planning/SKILL.md +102 -0
  120. package/skills/vibe-product-acceptance/SKILL.md +106 -0
  121. package/skills/vibe-product-discovery/SKILL.md +107 -0
  122. package/skills/vibe-product-spec/SKILL.md +105 -0
  123. package/skills/vibe-receiving-code-review/SKILL.md +110 -0
  124. package/skills/vibe-requesting-code-review/SKILL.md +106 -0
  125. package/skills/vibe-review/SKILL.md +106 -0
  126. package/skills/vibe-subagent-driven-development/SKILL.md +198 -0
  127. package/skills/vibe-systematic-debugging/SKILL.md +106 -0
  128. package/skills/vibe-test-driven-development/SKILL.md +112 -0
  129. package/skills/vibe-ui-design/SKILL.md +107 -0
  130. package/skills/vibe-verification/SKILL.md +84 -0
  131. package/skills/vibe-verification-before-completion/SKILL.md +170 -0
  132. package/skills/vibe-workspace-isolation/SKILL.md +158 -0
  133. package/skills/vibe-writing-plans/SKILL.md +137 -0
  134. package/skills/vibe-writing-skills/SKILL.md +118 -0
  135. package/templates/AGENTS.md +88 -0
  136. package/templates/CLAUDE.md +88 -0
  137. package/templates/VIBE-CODING.md +157 -0
  138. package/templates/architecture-design.md +139 -0
  139. package/templates/delivery-traceability.yaml +52 -0
  140. package/templates/evidence/README.md +117 -0
  141. package/templates/evidence/diff-coverage.json +34 -0
  142. package/templates/evidence/test-evidence.json +29 -0
  143. package/templates/implementation-plan.md +73 -0
  144. package/templates/product-acceptance.md +84 -0
  145. package/templates/product-discovery.md +81 -0
  146. package/templates/product-spec.md +84 -0
  147. package/templates/scenario-acceptance.yaml +37 -0
  148. package/templates/ui-design-contract.md +86 -0
  149. package/tools/vibe-architecture-check/README.md +66 -0
  150. package/tools/vibe-architecture-check/index.mjs +691 -0
  151. package/tools/vibe-compact/README.md +65 -0
  152. package/tools/vibe-compact/compact-contract.mjs +63 -0
  153. package/tools/vibe-compact/index.mjs +111 -0
  154. package/tools/vibe-doctor/README.md +200 -0
  155. package/tools/vibe-doctor/index.mjs +1721 -0
  156. package/tools/vibe-init/README.md +231 -0
  157. package/tools/vibe-init/index.mjs +369 -0
  158. package/tools/vibe-init/init-cli-args.mjs +100 -0
  159. package/tools/vibe-init/init-entry-merge-model.mjs +33 -0
  160. package/tools/vibe-init/init-install-manifest-model.mjs +137 -0
  161. package/tools/vibe-init/init-installed-agent-experience-contract.mjs +172 -0
  162. package/tools/vibe-init/init-platform-model.mjs +11 -0
  163. package/tools/vibe-init/init-presentation.mjs +149 -0
  164. package/tools/vibe-lifecycle/README.md +37 -0
  165. package/tools/vibe-lifecycle/index.mjs +365 -0
  166. package/tools/vibe-lifecycle/lifecycle-cli-args.mjs +104 -0
  167. package/tools/vibe-lifecycle/lifecycle-summary-model.mjs +67 -0
  168. package/tools/vibe-lifecycle/lifecycle-uninstall-plan-model.mjs +11 -0
  169. package/tools/vibe-plugin-pack/README.md +105 -0
  170. package/tools/vibe-plugin-pack/index.mjs +302 -0
  171. package/tools/vibe-plugin-pack/plugin-pack-cli.mjs +39 -0
  172. package/tools/vibe-plugin-pack/plugin-pack-manifest.mjs +37 -0
  173. package/tools/vibe-profile/index.mjs +212 -0
  174. package/tools/vibe-release-check/README.md +123 -0
  175. package/tools/vibe-release-check/command-manifest/release-check-base-commands.mjs +23 -0
  176. package/tools/vibe-release-check/command-manifest/release-check-closeout-commands.mjs +16 -0
  177. package/tools/vibe-release-check/command-manifest/release-check-command-metadata.mjs +32 -0
  178. package/tools/vibe-release-check/command-manifest/release-check-completion-commands.mjs +41 -0
  179. package/tools/vibe-release-check/command-manifest/release-check-full-chain-commands.mjs +12 -0
  180. package/tools/vibe-release-check/command-manifest/release-check-golden-path-commands.mjs +12 -0
  181. package/tools/vibe-release-check/command-manifest/release-check-install-commands.mjs +26 -0
  182. package/tools/vibe-release-check/command-manifest/release-check-learning-smoke-commands.mjs +21 -0
  183. package/tools/vibe-release-check/command-manifest/release-check-methodology-commands.mjs +27 -0
  184. package/tools/vibe-release-check/command-manifest/release-check-runtime-smoke-commands.mjs +116 -0
  185. package/tools/vibe-release-check/command-manifest/release-check-token-smoke-commands.mjs +21 -0
  186. package/tools/vibe-release-check/index.mjs +223 -0
  187. package/tools/vibe-release-check/release-check-behavior-smoke.mjs +177 -0
  188. package/tools/vibe-release-check/release-check-cli.mjs +37 -0
  189. package/tools/vibe-release-check/release-check-command-manifest.mjs +49 -0
  190. package/tools/vibe-release-check/release-check-completion-fixtures.mjs +151 -0
  191. package/tools/vibe-release-check/release-check-completion-suite.mjs +110 -0
  192. package/tools/vibe-release-check/release-check-dispatch.mjs +116 -0
  193. package/tools/vibe-release-check/release-check-full-chain-suite.mjs +55 -0
  194. package/tools/vibe-release-check/release-check-golden-path-suite.mjs +85 -0
  195. package/tools/vibe-release-check/release-check-install-marker-specs.mjs +133 -0
  196. package/tools/vibe-release-check/release-check-install-suite.mjs +112 -0
  197. package/tools/vibe-release-check/release-check-json-assertion-helpers.mjs +157 -0
  198. package/tools/vibe-release-check/release-check-json-markers.mjs +33 -0
  199. package/tools/vibe-release-check/release-check-learning-fixture-specs.mjs +199 -0
  200. package/tools/vibe-release-check/release-check-learning-suite.mjs +249 -0
  201. package/tools/vibe-release-check/release-check-live-behavior-smoke-fixture.mjs +406 -0
  202. package/tools/vibe-release-check/release-check-methodology-suite.mjs +108 -0
  203. package/tools/vibe-release-check/release-check-package-boundary-smoke.mjs +111 -0
  204. package/tools/vibe-release-check/release-check-platform-transcript-smoke-fixture.mjs +150 -0
  205. package/tools/vibe-release-check/release-check-readonly-marker-data.mjs +1 -0
  206. package/tools/vibe-release-check/release-check-readonly-marker-smoke-specs.mjs +170 -0
  207. package/tools/vibe-release-check/release-check-run-summary.mjs +67 -0
  208. package/tools/vibe-release-check/release-check-runtime-automation-fixtures.mjs +1 -0
  209. package/tools/vibe-release-check/release-check-runtime-automation-governance-reply-trace-smoke-helpers.mjs +224 -0
  210. package/tools/vibe-release-check/release-check-runtime-automation-governance-smoke-specs.mjs +215 -0
  211. package/tools/vibe-release-check/release-check-runtime-automation-governance-suite.mjs +5 -0
  212. package/tools/vibe-release-check/release-check-runtime-automation-methodology-smoke-specs.mjs +157 -0
  213. package/tools/vibe-release-check/release-check-runtime-automation-methodology-suite.mjs +130 -0
  214. package/tools/vibe-release-check/release-check-runtime-automation-platform-smoke-helpers.mjs +306 -0
  215. package/tools/vibe-release-check/release-check-runtime-automation-platform-suite.mjs +30 -0
  216. package/tools/vibe-release-check/release-check-runtime-automation-smoke-fixtures.mjs +53 -0
  217. package/tools/vibe-release-check/release-check-runtime-automation-source-candidate-smoke-helpers.mjs +506 -0
  218. package/tools/vibe-release-check/release-check-runtime-automation-source-suite.mjs +5 -0
  219. package/tools/vibe-release-check/release-check-runtime-automation-subagents-lifecycle-smoke-helpers.mjs +305 -0
  220. package/tools/vibe-release-check/release-check-runtime-automation-subagents-suite.mjs +25 -0
  221. package/tools/vibe-release-check/release-check-runtime-automation-suite.mjs +25 -0
  222. package/tools/vibe-release-check/release-check-runtime-daemon-bounded-run-smoke-helpers.mjs +243 -0
  223. package/tools/vibe-release-check/release-check-runtime-daemon-suite.mjs +5 -0
  224. package/tools/vibe-release-check/release-check-runtime-dispatch-fixtures.mjs +129 -0
  225. package/tools/vibe-release-check/release-check-runtime-dispatch-suite.mjs +5 -0
  226. package/tools/vibe-release-check/release-check-runtime-execution-approval-smoke-helpers.mjs +274 -0
  227. package/tools/vibe-release-check/release-check-runtime-execution-approval-suite.mjs +5 -0
  228. package/tools/vibe-release-check/release-check-runtime-execution-base-suite.mjs +388 -0
  229. package/tools/vibe-release-check/release-check-runtime-execution-recovery-suite.mjs +412 -0
  230. package/tools/vibe-release-check/release-check-runtime-execution-scheduler-suite.mjs +261 -0
  231. package/tools/vibe-release-check/release-check-runtime-execution-suite.mjs +11 -0
  232. package/tools/vibe-release-check/release-check-runtime-flow-smoke.mjs +347 -0
  233. package/tools/vibe-release-check/release-check-runtime-handoff-fixture-specs.mjs +211 -0
  234. package/tools/vibe-release-check/release-check-runtime-handoff-fixtures.mjs +11 -0
  235. package/tools/vibe-release-check/release-check-runtime-handoff-smoke-specs.mjs +86 -0
  236. package/tools/vibe-release-check/release-check-runtime-handoff-suite.mjs +316 -0
  237. package/tools/vibe-release-check/release-check-runtime-ledger-fixture-specs.mjs +9 -0
  238. package/tools/vibe-release-check/release-check-runtime-ledger-fixtures.mjs +51 -0
  239. package/tools/vibe-release-check/release-check-runtime-ledger-suite.mjs +24 -0
  240. package/tools/vibe-release-check/release-check-runtime-scheduler-fixture-specs.mjs +129 -0
  241. package/tools/vibe-release-check/release-check-runtime-scheduler-fixtures.mjs +10 -0
  242. package/tools/vibe-release-check/release-check-runtime-sdd-suite.mjs +535 -0
  243. package/tools/vibe-release-check/release-check-runtime-smoke-harness.mjs +140 -0
  244. package/tools/vibe-release-check/release-check-runtime-surface-expectations.mjs +106 -0
  245. package/tools/vibe-release-check/release-check-runtime-surface-smoke.mjs +112 -0
  246. package/tools/vibe-release-check/release-check-runtime-task-artifact-suite.mjs +105 -0
  247. package/tools/vibe-release-check/release-check-runtime-task-fixture-specs.mjs +270 -0
  248. package/tools/vibe-release-check/release-check-runtime-task-fixtures.mjs +19 -0
  249. package/tools/vibe-release-check/release-check-runtime.mjs +53 -0
  250. package/tools/vibe-release-check/release-check-stage103-118-fixtures.mjs +214 -0
  251. package/tools/vibe-release-check/release-check-stage103-118-smoke-specs.mjs +97 -0
  252. package/tools/vibe-release-check/release-check-stage103-118-smoke.mjs +861 -0
  253. package/tools/vibe-release-check/release-check-stage11-smoke.mjs +66 -0
  254. package/tools/vibe-release-check/release-check-stage119-120-fixture-specs.mjs +119 -0
  255. package/tools/vibe-release-check/release-check-stage119-120-smoke.mjs +325 -0
  256. package/tools/vibe-release-check/release-check-stage12-smoke.mjs +59 -0
  257. package/tools/vibe-release-check/release-check-stage121-136-fixture-specs.mjs +26 -0
  258. package/tools/vibe-release-check/release-check-stage121-136-fixtures.mjs +591 -0
  259. package/tools/vibe-release-check/release-check-stage121-136-smoke.mjs +917 -0
  260. package/tools/vibe-release-check/release-check-stage13-smoke.mjs +78 -0
  261. package/tools/vibe-release-check/release-check-stage137-140-smoke.mjs +534 -0
  262. package/tools/vibe-release-check/release-check-stage14-smoke.mjs +101 -0
  263. package/tools/vibe-release-check/release-check-stage141-148-smoke.mjs +1143 -0
  264. package/tools/vibe-release-check/release-check-stage15-smoke.mjs +132 -0
  265. package/tools/vibe-release-check/release-check-stage50-53-smoke.mjs +429 -0
  266. package/tools/vibe-release-check/release-check-subagent-adapter-bridge-smoke.mjs +162 -0
  267. package/tools/vibe-release-check/release-check-suite-plan-smoke.mjs +86 -0
  268. package/tools/vibe-release-check/release-check-suites.mjs +164 -0
  269. package/tools/vibe-release-check/release-check-test-run-smoke.mjs +59 -0
  270. package/tools/vibe-release-check/release-check-timing.mjs +98 -0
  271. package/tools/vibe-release-check/release-check-token-suite.mjs +260 -0
  272. package/tools/vibe-release-check/release-check-workflow-entry-suite.mjs +195 -0
  273. package/tools/vibe-release-check/release-check-workflow-governance-fixtures.mjs +138 -0
  274. package/tools/vibe-release-check/release-check-workflow-governance-smoke-suite.mjs +768 -0
  275. package/tools/vibe-release-check/release-check-workflow-ux-smoke.mjs +456 -0
  276. package/tools/vibe-runtime/README.md +2637 -0
  277. package/tools/vibe-runtime/index.mjs +3117 -0
  278. package/tools/vibe-runtime/runtime-adapter-bootstrap-matrix.mjs +264 -0
  279. package/tools/vibe-runtime/runtime-adapter-entry-acceptance.mjs +310 -0
  280. package/tools/vibe-runtime/runtime-adapter-packaging-consistency-command.mjs +131 -0
  281. package/tools/vibe-runtime/runtime-adapter-packaging-consistency.mjs +253 -0
  282. package/tools/vibe-runtime/runtime-advice-hub-model.mjs +175 -0
  283. package/tools/vibe-runtime/runtime-agent-session-start-contract.mjs +138 -0
  284. package/tools/vibe-runtime/runtime-artifact-ref-validation.mjs +281 -0
  285. package/tools/vibe-runtime/runtime-automatic-verification-gate-contract.mjs +134 -0
  286. package/tools/vibe-runtime/runtime-automation-boundary-text.mjs +7 -0
  287. package/tools/vibe-runtime/runtime-automation-command.mjs +367 -0
  288. package/tools/vibe-runtime/runtime-automation-plan-model.mjs +239 -0
  289. package/tools/vibe-runtime/runtime-automation-policy-model.mjs +175 -0
  290. package/tools/vibe-runtime/runtime-automation-readiness.mjs +347 -0
  291. package/tools/vibe-runtime/runtime-autopilot-lab-profile-contract.mjs +223 -0
  292. package/tools/vibe-runtime/runtime-behavioral-evaluation-contract.mjs +529 -0
  293. package/tools/vibe-runtime/runtime-behavioral-negative-gate-matrix.mjs +274 -0
  294. package/tools/vibe-runtime/runtime-bounded-attempt-policy-model.mjs +13 -0
  295. package/tools/vibe-runtime/runtime-bounded-foreground-command-executor-contract.mjs +288 -0
  296. package/tools/vibe-runtime/runtime-capability-registry.mjs +250 -0
  297. package/tools/vibe-runtime/runtime-cli-args.mjs +550 -0
  298. package/tools/vibe-runtime/runtime-cli-command-specs.mjs +63 -0
  299. package/tools/vibe-runtime/runtime-cli-dispatch.mjs +21 -0
  300. package/tools/vibe-runtime/runtime-cli-evidence-option-specs.mjs +193 -0
  301. package/tools/vibe-runtime/runtime-cli-evidence-options.mjs +28 -0
  302. package/tools/vibe-runtime/runtime-cli-from-options.mjs +222 -0
  303. package/tools/vibe-runtime/runtime-cli-low-risk-option-specs.mjs +128 -0
  304. package/tools/vibe-runtime/runtime-cli-main.mjs +32 -0
  305. package/tools/vibe-runtime/runtime-cli-option-default-families.mjs +454 -0
  306. package/tools/vibe-runtime/runtime-cli-option-defaults.mjs +33 -0
  307. package/tools/vibe-runtime/runtime-cli-option-handlers.mjs +82 -0
  308. package/tools/vibe-runtime/runtime-cli-usage.mjs +316 -0
  309. package/tools/vibe-runtime/runtime-cli-value-options.mjs +74 -0
  310. package/tools/vibe-runtime/runtime-close-loop-dashboard.mjs +283 -0
  311. package/tools/vibe-runtime/runtime-closeout-parity-contract.mjs +214 -0
  312. package/tools/vibe-runtime/runtime-command-container.mjs +26 -0
  313. package/tools/vibe-runtime/runtime-command-surface-registry.mjs +383 -0
  314. package/tools/vibe-runtime/runtime-command-wrapper-deps.mjs +13 -0
  315. package/tools/vibe-runtime/runtime-commit-readiness-envelope.mjs +281 -0
  316. package/tools/vibe-runtime/runtime-completion-boundary-text.mjs +7 -0
  317. package/tools/vibe-runtime/runtime-completion-bundle-contract.mjs +71 -0
  318. package/tools/vibe-runtime/runtime-completion-chain-assembly.mjs +48 -0
  319. package/tools/vibe-runtime/runtime-completion-command.mjs +50 -0
  320. package/tools/vibe-runtime/runtime-completion-evidence-bundle.mjs +269 -0
  321. package/tools/vibe-runtime/runtime-completion-evidence-descriptors.mjs +156 -0
  322. package/tools/vibe-runtime/runtime-completion-local-evidence-gates.mjs +164 -0
  323. package/tools/vibe-runtime/runtime-completion-presentation.mjs +71 -0
  324. package/tools/vibe-runtime/runtime-completion-readiness-summary.mjs +159 -0
  325. package/tools/vibe-runtime/runtime-confirmed-one-shot-plan.mjs +300 -0
  326. package/tools/vibe-runtime/runtime-context-budget-entry-defaults-command.mjs +77 -0
  327. package/tools/vibe-runtime/runtime-context-budget-entry-defaults.mjs +341 -0
  328. package/tools/vibe-runtime/runtime-contract-marker-registry.mjs +13 -0
  329. package/tools/vibe-runtime/runtime-contributor-guardrail-command.mjs +78 -0
  330. package/tools/vibe-runtime/runtime-contributor-guardrail-evidence.mjs +319 -0
  331. package/tools/vibe-runtime/runtime-control-plane-command.mjs +237 -0
  332. package/tools/vibe-runtime/runtime-control-plane-evals-artifacts.mjs +123 -0
  333. package/tools/vibe-runtime/runtime-control-plane-evals-boundary-model.mjs +75 -0
  334. package/tools/vibe-runtime/runtime-control-plane-evals-cases.mjs +547 -0
  335. package/tools/vibe-runtime/runtime-control-plane-evals-command.mjs +527 -0
  336. package/tools/vibe-runtime/runtime-control-plane-evals-report-validation.mjs +209 -0
  337. package/tools/vibe-runtime/runtime-control-plane-planner-artifacts.mjs +457 -0
  338. package/tools/vibe-runtime/runtime-control-plane-planning-command.mjs +563 -0
  339. package/tools/vibe-runtime/runtime-control-plane-planning-input.mjs +99 -0
  340. package/tools/vibe-runtime/runtime-control-plane-planning-listing.mjs +48 -0
  341. package/tools/vibe-runtime/runtime-control-plane-planning-presentation.mjs +246 -0
  342. package/tools/vibe-runtime/runtime-control-plane-planning-validation.mjs +529 -0
  343. package/tools/vibe-runtime/runtime-control-plane-readonly-command.mjs +537 -0
  344. package/tools/vibe-runtime/runtime-control-plane-readonly-deps.mjs +146 -0
  345. package/tools/vibe-runtime/runtime-control-plane-release-evidence.mjs +525 -0
  346. package/tools/vibe-runtime/runtime-control-plane-release-gates.mjs +369 -0
  347. package/tools/vibe-runtime/runtime-control-plane-router-planning-model.mjs +152 -0
  348. package/tools/vibe-runtime/runtime-control-plane-routing-artifacts.mjs +588 -0
  349. package/tools/vibe-runtime/runtime-controlled-change-delivery-contract.mjs +165 -0
  350. package/tools/vibe-runtime/runtime-controlled-execution-gate-contract.mjs +141 -0
  351. package/tools/vibe-runtime/runtime-controlled-long-running-automation-contract.mjs +184 -0
  352. package/tools/vibe-runtime/runtime-controlled-subagent-orchestration-contract.mjs +169 -0
  353. package/tools/vibe-runtime/runtime-daemon-command.mjs +166 -0
  354. package/tools/vibe-runtime/runtime-daemon-state-lifecycle-model.mjs +359 -0
  355. package/tools/vibe-runtime/runtime-delivery-methodology-command.mjs +17 -0
  356. package/tools/vibe-runtime/runtime-delivery-methodology-gates.mjs +277 -0
  357. package/tools/vibe-runtime/runtime-diff-coverage-envelope.mjs +301 -0
  358. package/tools/vibe-runtime/runtime-dispatch-command.mjs +484 -0
  359. package/tools/vibe-runtime/runtime-dispatch-readonly-artifacts.mjs +406 -0
  360. package/tools/vibe-runtime/runtime-dispatch-state-lifecycle-model.mjs +199 -0
  361. package/tools/vibe-runtime/runtime-durable-state-recovery-contract.mjs +172 -0
  362. package/tools/vibe-runtime/runtime-entry-advice-model.mjs +201 -0
  363. package/tools/vibe-runtime/runtime-entry-deps-builder.mjs +54 -0
  364. package/tools/vibe-runtime/runtime-entry-presentation.mjs +82 -0
  365. package/tools/vibe-runtime/runtime-entry-summary-model.mjs +343 -0
  366. package/tools/vibe-runtime/runtime-entry-trigger-discipline.mjs +341 -0
  367. package/tools/vibe-runtime/runtime-entry-trigger-tightening-command.mjs +79 -0
  368. package/tools/vibe-runtime/runtime-entry-trigger-tightening.mjs +357 -0
  369. package/tools/vibe-runtime/runtime-eval-catalog-model.mjs +101 -0
  370. package/tools/vibe-runtime/runtime-eval-transcript-fixtures.mjs +218 -0
  371. package/tools/vibe-runtime/runtime-evidence-intake-envelope.mjs +278 -0
  372. package/tools/vibe-runtime/runtime-evidence-repair-model.mjs +180 -0
  373. package/tools/vibe-runtime/runtime-executable-plan-contract.mjs +428 -0
  374. package/tools/vibe-runtime/runtime-execution-approval-lifecycle-models.mjs +278 -0
  375. package/tools/vibe-runtime/runtime-execution-candidate-approval-artifacts.mjs +227 -0
  376. package/tools/vibe-runtime/runtime-execution-command.mjs +544 -0
  377. package/tools/vibe-runtime/runtime-execution-enabled-bridge-model.mjs +113 -0
  378. package/tools/vibe-runtime/runtime-execution-enabled-closeout-boundary.mjs +89 -0
  379. package/tools/vibe-runtime/runtime-execution-enabled-preflight-model.mjs +185 -0
  380. package/tools/vibe-runtime/runtime-execution-enabled-profile-contract.mjs +127 -0
  381. package/tools/vibe-runtime/runtime-execution-enabled-run-envelope.mjs +153 -0
  382. package/tools/vibe-runtime/runtime-execution-evidence-binder.mjs +537 -0
  383. package/tools/vibe-runtime/runtime-execution-plan-artifacts.mjs +136 -0
  384. package/tools/vibe-runtime/runtime-execution-policy-artifacts.mjs +377 -0
  385. package/tools/vibe-runtime/runtime-execution-presentation.mjs +174 -0
  386. package/tools/vibe-runtime/runtime-execution-readonly-artifacts.mjs +228 -0
  387. package/tools/vibe-runtime/runtime-execution-run-preflight-artifacts.mjs +265 -0
  388. package/tools/vibe-runtime/runtime-execution-safety-artifacts.mjs +131 -0
  389. package/tools/vibe-runtime/runtime-execution-state-write-lifecycle-model.mjs +99 -0
  390. package/tools/vibe-runtime/runtime-experience-friction-matrix.mjs +395 -0
  391. package/tools/vibe-runtime/runtime-experience-learning-pattern.mjs +354 -0
  392. package/tools/vibe-runtime/runtime-experience-regression-dashboard.mjs +398 -0
  393. package/tools/vibe-runtime/runtime-experience-upgrade-command.mjs +92 -0
  394. package/tools/vibe-runtime/runtime-experience-upgrade-prioritizer.mjs +451 -0
  395. package/tools/vibe-runtime/runtime-foreground-worker-plan.mjs +275 -0
  396. package/tools/vibe-runtime/runtime-git-diff-read-model.mjs +322 -0
  397. package/tools/vibe-runtime/runtime-governance-attestation.mjs +304 -0
  398. package/tools/vibe-runtime/runtime-governance-command.mjs +609 -0
  399. package/tools/vibe-runtime/runtime-governance-convergence-reports.mjs +601 -0
  400. package/tools/vibe-runtime/runtime-governance-pr-models.mjs +551 -0
  401. package/tools/vibe-runtime/runtime-governance-presentation.mjs +67 -0
  402. package/tools/vibe-runtime/runtime-governance-route-model.mjs +194 -0
  403. package/tools/vibe-runtime/runtime-governance-surface-reports.mjs +495 -0
  404. package/tools/vibe-runtime/runtime-hooks-boundary-model.mjs +356 -0
  405. package/tools/vibe-runtime/runtime-hooks-command.mjs +286 -0
  406. package/tools/vibe-runtime/runtime-human-completion-evidence-model.mjs +220 -0
  407. package/tools/vibe-runtime/runtime-human-friendly-aliases.mjs +250 -0
  408. package/tools/vibe-runtime/runtime-implementation-methodology-command.mjs +17 -0
  409. package/tools/vibe-runtime/runtime-implementation-methodology-gates.mjs +164 -0
  410. package/tools/vibe-runtime/runtime-implementation-task-registry.mjs +334 -0
  411. package/tools/vibe-runtime/runtime-install-experience-command.mjs +120 -0
  412. package/tools/vibe-runtime/runtime-install-experience-score.mjs +334 -0
  413. package/tools/vibe-runtime/runtime-installed-multiround-ux-acceptance.mjs +149 -0
  414. package/tools/vibe-runtime/runtime-interaction-command-domain-registry.mjs +46 -0
  415. package/tools/vibe-runtime/runtime-interaction-command.mjs +648 -0
  416. package/tools/vibe-runtime/runtime-interaction-completion-command.mjs +220 -0
  417. package/tools/vibe-runtime/runtime-interaction-entry-command.mjs +130 -0
  418. package/tools/vibe-runtime/runtime-interaction-workflow-envelopes.mjs +412 -0
  419. package/tools/vibe-runtime/runtime-learning-advice-model.mjs +157 -0
  420. package/tools/vibe-runtime/runtime-learning-artifact-model.mjs +509 -0
  421. package/tools/vibe-runtime/runtime-learning-audit-model.mjs +106 -0
  422. package/tools/vibe-runtime/runtime-learning-interaction-command.mjs +220 -0
  423. package/tools/vibe-runtime/runtime-learning-observation-model.mjs +124 -0
  424. package/tools/vibe-runtime/runtime-learning-presentation.mjs +84 -0
  425. package/tools/vibe-runtime/runtime-learning-run-preview-model.mjs +184 -0
  426. package/tools/vibe-runtime/runtime-lease-command.mjs +95 -0
  427. package/tools/vibe-runtime/runtime-lease-state-lifecycle-model.mjs +247 -0
  428. package/tools/vibe-runtime/runtime-list-presentation.mjs +7 -0
  429. package/tools/vibe-runtime/runtime-live-behavior-transcript-model.mjs +164 -0
  430. package/tools/vibe-runtime/runtime-local-behavior-eval-contracts-command.mjs +76 -0
  431. package/tools/vibe-runtime/runtime-local-behavior-eval-contracts.mjs +382 -0
  432. package/tools/vibe-runtime/runtime-local-commit-automation-gate.mjs +254 -0
  433. package/tools/vibe-runtime/runtime-local-json-input.mjs +32 -0
  434. package/tools/vibe-runtime/runtime-methodology-coverage-map.mjs +398 -0
  435. package/tools/vibe-runtime/runtime-methodology-coverage-marker-specs.mjs +61 -0
  436. package/tools/vibe-runtime/runtime-methodology-coverage-presentation.mjs +26 -0
  437. package/tools/vibe-runtime/runtime-methodology-gate-model.mjs +154 -0
  438. package/tools/vibe-runtime/runtime-methodology-gate-output-envelope.mjs +4 -0
  439. package/tools/vibe-runtime/runtime-methodology-interaction-command.mjs +147 -0
  440. package/tools/vibe-runtime/runtime-methodology-presentation.mjs +76 -0
  441. package/tools/vibe-runtime/runtime-methodology-route-model.mjs +93 -0
  442. package/tools/vibe-runtime/runtime-next-action-console.mjs +388 -0
  443. package/tools/vibe-runtime/runtime-next-action-evidence-prompts-command.mjs +84 -0
  444. package/tools/vibe-runtime/runtime-next-action-evidence-prompts.mjs +327 -0
  445. package/tools/vibe-runtime/runtime-observability-command.mjs +96 -0
  446. package/tools/vibe-runtime/runtime-observability-presentation.mjs +30 -0
  447. package/tools/vibe-runtime/runtime-observability-readiness-model.mjs +204 -0
  448. package/tools/vibe-runtime/runtime-patch-queue-contract.mjs +151 -0
  449. package/tools/vibe-runtime/runtime-plan-action-manifest.mjs +334 -0
  450. package/tools/vibe-runtime/runtime-planner-route-model.mjs +75 -0
  451. package/tools/vibe-runtime/runtime-platform-acceptance-command.mjs +216 -0
  452. package/tools/vibe-runtime/runtime-platform-capability-artifacts.mjs +156 -0
  453. package/tools/vibe-runtime/runtime-platform-capability-model.mjs +105 -0
  454. package/tools/vibe-runtime/runtime-platform-command.mjs +329 -0
  455. package/tools/vibe-runtime/runtime-platform-presentation.mjs +78 -0
  456. package/tools/vibe-runtime/runtime-platform-session-artifacts.mjs +857 -0
  457. package/tools/vibe-runtime/runtime-platform-transcript-example-pack.mjs +293 -0
  458. package/tools/vibe-runtime/runtime-platform-transcript-intake-model.mjs +247 -0
  459. package/tools/vibe-runtime/runtime-platform-transcript-replay-model.mjs +371 -0
  460. package/tools/vibe-runtime/runtime-policy-catalog.mjs +54 -0
  461. package/tools/vibe-runtime/runtime-product-methodology-command.mjs +17 -0
  462. package/tools/vibe-runtime/runtime-product-methodology-gates.mjs +316 -0
  463. package/tools/vibe-runtime/runtime-progressive-entry-ux.mjs +237 -0
  464. package/tools/vibe-runtime/runtime-queue-command.mjs +98 -0
  465. package/tools/vibe-runtime/runtime-queue-state-lifecycle-model.mjs +318 -0
  466. package/tools/vibe-runtime/runtime-readiness-gate-split.mjs +196 -0
  467. package/tools/vibe-runtime/runtime-readonly-local-json-output-envelope.mjs +24 -0
  468. package/tools/vibe-runtime/runtime-recovery-classification-models.mjs +412 -0
  469. package/tools/vibe-runtime/runtime-recovery-command.mjs +107 -0
  470. package/tools/vibe-runtime/runtime-recovery-presentation.mjs +65 -0
  471. package/tools/vibe-runtime/runtime-recovery-state-lifecycle-model.mjs +419 -0
  472. package/tools/vibe-runtime/runtime-release-command-deps.mjs +4 -0
  473. package/tools/vibe-runtime/runtime-release-command.mjs +225 -0
  474. package/tools/vibe-runtime/runtime-release-state-lifecycle-model.mjs +48 -0
  475. package/tools/vibe-runtime/runtime-reply-artifact-lifecycle-model.mjs +84 -0
  476. package/tools/vibe-runtime/runtime-reply-command.mjs +488 -0
  477. package/tools/vibe-runtime/runtime-retry-command.mjs +223 -0
  478. package/tools/vibe-runtime/runtime-retry-run-gate-model.mjs +151 -0
  479. package/tools/vibe-runtime/runtime-review-envelope.mjs +449 -0
  480. package/tools/vibe-runtime/runtime-review-feedback-gate.mjs +160 -0
  481. package/tools/vibe-runtime/runtime-runbook-executor-preview-contract.mjs +361 -0
  482. package/tools/vibe-runtime/runtime-scheduler-command.mjs +8 -0
  483. package/tools/vibe-runtime/runtime-scheduler-risk-artifacts.mjs +775 -0
  484. package/tools/vibe-runtime/runtime-scheduler-state-lifecycle-model.mjs +53 -0
  485. package/tools/vibe-runtime/runtime-sdd-consumption-command.mjs +386 -0
  486. package/tools/vibe-runtime/runtime-sdd-evidence-chain-model.mjs +200 -0
  487. package/tools/vibe-runtime/runtime-sdd-handoff-chain-model.mjs +168 -0
  488. package/tools/vibe-runtime/runtime-sdd-implementer-artifact-model.mjs +90 -0
  489. package/tools/vibe-runtime/runtime-sdd-loop-command.mjs +659 -0
  490. package/tools/vibe-runtime/runtime-sdd-plan-preflight-model.mjs +121 -0
  491. package/tools/vibe-runtime/runtime-sdd-review-package-command.mjs +197 -0
  492. package/tools/vibe-runtime/runtime-sdd-review-package-model.mjs +183 -0
  493. package/tools/vibe-runtime/runtime-sdd-task-brief-model.mjs +144 -0
  494. package/tools/vibe-runtime/runtime-self-test-gate-profile.mjs +225 -0
  495. package/tools/vibe-runtime/runtime-sequential-stage-runbook.mjs +406 -0
  496. package/tools/vibe-runtime/runtime-session-checkpoint-model.mjs +217 -0
  497. package/tools/vibe-runtime/runtime-session-skill-command.mjs +241 -0
  498. package/tools/vibe-runtime/runtime-session-start-example-command.mjs +122 -0
  499. package/tools/vibe-runtime/runtime-session-start-example-pack.mjs +290 -0
  500. package/tools/vibe-runtime/runtime-session-start-shape-acceptance.mjs +344 -0
  501. package/tools/vibe-runtime/runtime-skill-contract-schema.mjs +221 -0
  502. package/tools/vibe-runtime/runtime-skill-route-registry.mjs +47 -0
  503. package/tools/vibe-runtime/runtime-skill-runtime-traceability-map.mjs +268 -0
  504. package/tools/vibe-runtime/runtime-source-merge-apply-boundary-model.mjs +130 -0
  505. package/tools/vibe-runtime/runtime-source-merge-artifacts.mjs +920 -0
  506. package/tools/vibe-runtime/runtime-source-merge-command.mjs +160 -0
  507. package/tools/vibe-runtime/runtime-source-merge-entry-command.mjs +153 -0
  508. package/tools/vibe-runtime/runtime-source-patch-plan-model.mjs +119 -0
  509. package/tools/vibe-runtime/runtime-stage-scriptlet.mjs +430 -0
  510. package/tools/vibe-runtime/runtime-staged-commit-readiness.mjs +469 -0
  511. package/tools/vibe-runtime/runtime-state-directory-model.mjs +7 -0
  512. package/tools/vibe-runtime/runtime-state-io.mjs +41 -0
  513. package/tools/vibe-runtime/runtime-state-paths.mjs +231 -0
  514. package/tools/vibe-runtime/runtime-state-presence-model.mjs +6 -0
  515. package/tools/vibe-runtime/runtime-state-risk-paths.mjs +70 -0
  516. package/tools/vibe-runtime/runtime-subagent-adapter-dispatch-command.mjs +266 -0
  517. package/tools/vibe-runtime/runtime-subagent-boundary-contracts.mjs +118 -0
  518. package/tools/vibe-runtime/runtime-subagent-permission-command.mjs +78 -0
  519. package/tools/vibe-runtime/runtime-subagent-permission-gate-model.mjs +131 -0
  520. package/tools/vibe-runtime/runtime-subagent-permission-visibility.mjs +294 -0
  521. package/tools/vibe-runtime/runtime-subagents-artifact-specs.mjs +257 -0
  522. package/tools/vibe-runtime/runtime-subagents-command.mjs +10 -0
  523. package/tools/vibe-runtime/runtime-subagents-eligibility-model.mjs +340 -0
  524. package/tools/vibe-runtime/runtime-subagents-platform-session-proxies.mjs +54 -0
  525. package/tools/vibe-runtime/runtime-subagents-presentation.mjs +91 -0
  526. package/tools/vibe-runtime/runtime-subagents-risk-artifacts.mjs +853 -0
  527. package/tools/vibe-runtime/runtime-subagents-stage-artifact-model.mjs +538 -0
  528. package/tools/vibe-runtime/runtime-subagents-tail-routing-model.mjs +48 -0
  529. package/tools/vibe-runtime/runtime-suite-plan-model.mjs +194 -0
  530. package/tools/vibe-runtime/runtime-superpowers-comparison-matrix.mjs +399 -0
  531. package/tools/vibe-runtime/runtime-superpowers-gap-matrix.mjs +307 -0
  532. package/tools/vibe-runtime/runtime-superpowers-parity-command.mjs +102 -0
  533. package/tools/vibe-runtime/runtime-superpowers-parity-profile-contract.mjs +183 -0
  534. package/tools/vibe-runtime/runtime-superpowers-parity-scorecard.mjs +460 -0
  535. package/tools/vibe-runtime/runtime-superpowers-regression-guard.mjs +270 -0
  536. package/tools/vibe-runtime/runtime-superpowers-style-eval-pack.mjs +367 -0
  537. package/tools/vibe-runtime/runtime-task-commit-gates.mjs +62 -0
  538. package/tools/vibe-runtime/runtime-task-commit-readiness.mjs +66 -0
  539. package/tools/vibe-runtime/runtime-task-commit-sidecar.mjs +65 -0
  540. package/tools/vibe-runtime/runtime-tdd-trace-contract.mjs +277 -0
  541. package/tools/vibe-runtime/runtime-test-evidence-model.mjs +196 -0
  542. package/tools/vibe-runtime/runtime-test-run-command-deps.mjs +7 -0
  543. package/tools/vibe-runtime/runtime-test-run-command.mjs +108 -0
  544. package/tools/vibe-runtime/runtime-token-economy-model.mjs +336 -0
  545. package/tools/vibe-runtime/runtime-token-interaction-command.mjs +381 -0
  546. package/tools/vibe-runtime/runtime-token-savior-budget.mjs +370 -0
  547. package/tools/vibe-runtime/runtime-tokens-command-deps.mjs +17 -0
  548. package/tools/vibe-runtime/runtime-tokens-command.mjs +117 -0
  549. package/tools/vibe-runtime/runtime-tokens-presentation.mjs +45 -0
  550. package/tools/vibe-runtime/runtime-trace-command.mjs +283 -0
  551. package/tools/vibe-runtime/runtime-trace-source-registry.mjs +132 -0
  552. package/tools/vibe-runtime/runtime-verification-gate-chain-model.mjs +131 -0
  553. package/tools/vibe-runtime/runtime-verification-repair-loop-plan.mjs +188 -0
  554. package/tools/vibe-runtime/runtime-workflow-alias-boundary-text.mjs +7 -0
  555. package/tools/vibe-runtime/runtime-workflow-alias-interaction-command.mjs +145 -0
  556. package/tools/vibe-runtime/runtime-workflow-command-deps.mjs +41 -0
  557. package/tools/vibe-runtime/runtime-workflow-command.mjs +191 -0
  558. package/tools/vibe-runtime/runtime-workflow-discipline-summary.mjs +164 -0
  559. package/tools/vibe-runtime/runtime-workflow-entry-envelopes.mjs +156 -0
  560. package/tools/vibe-runtime/runtime-workflow-ledger-command.mjs +239 -0
  561. package/tools/vibe-runtime/runtime-workflow-ledger-state-lifecycle-model.mjs +46 -0
  562. package/tools/vibe-runtime/runtime-workflow-loop-contract.mjs +259 -0
  563. package/tools/vibe-runtime/runtime-workflow-next-step-gate-model.mjs +106 -0
  564. package/tools/vibe-runtime/runtime-workflow-presentation.mjs +355 -0
  565. package/tools/vibe-runtime/runtime-workflow-readiness-model.mjs +176 -0
  566. package/tools/vibe-runtime/runtime-workflow-run-plan-model.mjs +207 -0
  567. package/tools/vibe-runtime/runtime-workflow-start-model.mjs +229 -0
  568. package/tools/vibe-runtime/runtime-workflow-state-artifacts.mjs +381 -0
  569. package/tools/vibe-runtime/runtime-workflow-state-helpers.mjs +456 -0
  570. package/tools/vibe-runtime/runtime-workflow-state-summary.mjs +65 -0
  571. package/tools/vibe-runtime/runtime-workflow-state-validation.mjs +104 -0
  572. package/tools/vibe-runtime/runtime-workflow-ux-model.mjs +205 -0
  573. package/tools/vibe-runtime/runtime-workspace-boundary-text.mjs +7 -0
  574. package/tools/vibe-runtime/runtime-workspace-isolation-command.mjs +295 -0
  575. package/tools/vibe-runtime/state-core-paths.mjs +113 -0
  576. package/tools/vibe-runtime/state-extension-paths.mjs +198 -0
  577. package/tools/vibe-runtime/state-safe-paths.mjs +2 -0
  578. package/tools/vibe-runtime-check/README.md +110 -0
  579. package/tools/vibe-runtime-check/architecture-tool-contracts.mjs +150 -0
  580. package/tools/vibe-runtime-check/index.mjs +186 -0
  581. package/tools/vibe-runtime-check/install-summary-adoption-contracts.mjs +115 -0
  582. package/tools/vibe-runtime-check/marker-contract-core.mjs +20 -0
  583. package/tools/vibe-runtime-check/product-artifact-contracts.mjs +24 -0
  584. package/tools/vibe-runtime-check/release-check-install-placement-contracts.mjs +166 -0
  585. package/tools/vibe-runtime-check/release-runtime-suite-layer-contracts.mjs +137 -0
  586. package/tools/vibe-runtime-check/runtime-architecture-manifest-drift-contracts.mjs +128 -0
  587. package/tools/vibe-runtime-check/runtime-automation-readiness-contracts.mjs +404 -0
  588. package/tools/vibe-runtime-check/runtime-capability-registry-contracts.mjs +299 -0
  589. package/tools/vibe-runtime-check/runtime-check-diagnostics-presentation.mjs +71 -0
  590. package/tools/vibe-runtime-check/runtime-cli-surface-contracts.mjs +156 -0
  591. package/tools/vibe-runtime-check/runtime-close-loop-contracts.mjs +163 -0
  592. package/tools/vibe-runtime-check/runtime-contract-delivery-registry.mjs +19 -0
  593. package/tools/vibe-runtime-check/runtime-contract-implementation-registry.mjs +23 -0
  594. package/tools/vibe-runtime-check/runtime-contract-local-evidence-registry.mjs +43 -0
  595. package/tools/vibe-runtime-check/runtime-contract-product-registry.mjs +83 -0
  596. package/tools/vibe-runtime-check/runtime-contract-registry.mjs +19 -0
  597. package/tools/vibe-runtime-check/runtime-control-plane-contracts.mjs +14 -0
  598. package/tools/vibe-runtime-check/runtime-doc-contract-marker-specs.mjs +349 -0
  599. package/tools/vibe-runtime-check/runtime-doc-contracts.mjs +24 -0
  600. package/tools/vibe-runtime-check/runtime-doc-marker-contracts.mjs +25 -0
  601. package/tools/vibe-runtime-check/runtime-entry-size-contracts.mjs +477 -0
  602. package/tools/vibe-runtime-check/runtime-experience-cli-contract-specs.mjs +98 -0
  603. package/tools/vibe-runtime-check/runtime-experience-cli-contracts.mjs +12 -0
  604. package/tools/vibe-runtime-check/runtime-experience-contracts.mjs +187 -0
  605. package/tools/vibe-runtime-check/runtime-governance-learning-token-contract-specs.mjs +92 -0
  606. package/tools/vibe-runtime-check/runtime-governance-learning-token-contracts.mjs +12 -0
  607. package/tools/vibe-runtime-check/runtime-high-risk-boundary-contracts.mjs +35 -0
  608. package/tools/vibe-runtime-check/runtime-high-risk-boundary-matrix.mjs +75 -0
  609. package/tools/vibe-runtime-check/runtime-index-import-boundary-contracts.mjs +192 -0
  610. package/tools/vibe-runtime-check/runtime-optimization-boundary-contracts.mjs +49 -0
  611. package/tools/vibe-runtime-check/runtime-pure-model-boundary-contracts.mjs +176 -0
  612. package/tools/vibe-runtime-check/runtime-release-closeout-contracts.mjs +25 -0
  613. package/tools/vibe-runtime-check/runtime-roadmap-marker-specs.mjs +559 -0
  614. package/tools/vibe-runtime-check/runtime-source-bundle.mjs +119 -0
  615. package/tools/vibe-runtime-check/runtime-tool-readme-contracts.mjs +93 -0
  616. package/tools/vibe-runtime-check/runtime-tool-readme-marker-specs.mjs +952 -0
  617. package/tools/vibe-runtime-check/workflow-skill-contracts.mjs +129 -0
  618. package/tools/vibe-runtime-check/workflow-skill-route-registry-contracts.mjs +106 -0
  619. package/tools/vibe-runtime-check/workflow-ux-contracts.mjs +46 -0
@@ -0,0 +1,3117 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from 'node:fs';
4
+ import path from 'node:path';
5
+ import process from 'node:process';
6
+ import crypto from 'node:crypto';
7
+ import { spawnSync } from 'node:child_process';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { printList } from './runtime-list-presentation.mjs';
10
+ import { validateTaskId } from './runtime-cli-args.mjs';
11
+ import { runRuntimeCli } from './runtime-cli-main.mjs';
12
+ import { createRuntimeCliHandlerDeps } from './runtime-command-container.mjs';
13
+ import {
14
+ createRuntimeGovernanceCommandDeps,
15
+ createRuntimeInteractionCommandDeps,
16
+ createRuntimeTokensCommandDeps,
17
+ createRuntimeWorkflowCommandDeps,
18
+ } from './runtime-entry-deps-builder.mjs';
19
+ import { runtimeCommandWrapperDeps } from './runtime-command-wrapper-deps.mjs';
20
+ import {
21
+ confirmedOneShotPlanEnvelope as confirmedOneShotPlanCommandEnvelope,
22
+ runAutomationCommand,
23
+ runtimeAutomationReadinessEnvelope as runtimeAutomationReadinessCommandEnvelope,
24
+ } from './runtime-automation-command.mjs';
25
+ import {
26
+ runtimeAutomationReadinessMatrix,
27
+ } from './runtime-automation-readiness.mjs';
28
+ import {
29
+ digestCloseLoopDashboard,
30
+ runtimeCloseLoopDashboard,
31
+ runtimeCloseLoopDashboardDigestPayload,
32
+ } from './runtime-close-loop-dashboard.mjs';
33
+ import {
34
+ digestEvidenceIntake,
35
+ runtimeEvidenceIntakeDigestPayload,
36
+ runtimeEvidenceIntakeEnvelope,
37
+ } from './runtime-evidence-intake-envelope.mjs';
38
+ import {
39
+ digestExecutionEvidenceBinding,
40
+ runtimeExecutionEvidenceBinder,
41
+ runtimeExecutionEvidenceDigestPayload,
42
+ } from './runtime-execution-evidence-binder.mjs';
43
+ import {
44
+ digestDiffCoverage,
45
+ runtimeDiffCoverageDigestPayload,
46
+ runtimeDiffCoverageEnvelope,
47
+ } from './runtime-diff-coverage-envelope.mjs';
48
+ import {
49
+ digestReviewEnvelope,
50
+ runtimeReviewIntakeDigestPayload,
51
+ runtimeReviewIntakeEnvelope,
52
+ runtimeReviewResolutionDigestPayload,
53
+ runtimeReviewResolutionEnvelope,
54
+ } from './runtime-review-envelope.mjs';
55
+ import {
56
+ digestHumanFriendlyAlias,
57
+ runtimeHumanFriendlyAliasDigestPayload,
58
+ runtimeHumanFriendlyCloseLoopAlias,
59
+ runtimeHumanFriendlyNextEvidenceAlias,
60
+ } from './runtime-human-friendly-aliases.mjs';
61
+ import {
62
+ digestTddTraceContract,
63
+ runtimeTddTraceContract,
64
+ runtimeTddTraceDigestPayload,
65
+ } from './runtime-tdd-trace-contract.mjs';
66
+ import {
67
+ digestExecutablePlanContract,
68
+ runtimeExecutablePlanContract,
69
+ runtimeExecutablePlanContractDigestPayload,
70
+ } from './runtime-executable-plan-contract.mjs';
71
+ import {
72
+ digestPlanActionManifest,
73
+ runtimePlanActionManifest,
74
+ runtimePlanActionManifestDigestPayload,
75
+ } from './runtime-plan-action-manifest.mjs';
76
+ import {
77
+ digestCommitReadiness,
78
+ runtimeCommitReadinessDigestPayload,
79
+ runtimeCommitReadinessEnvelope,
80
+ } from './runtime-commit-readiness-envelope.mjs';
81
+ import {
82
+ digestStagedCommitReadiness,
83
+ runtimeStagedCommitReadiness,
84
+ runtimeStagedCommitReadinessDigestPayload,
85
+ } from './runtime-staged-commit-readiness.mjs';
86
+ import {
87
+ digestSelfTestGateProfile,
88
+ runtimeSelfTestGateProfile,
89
+ runtimeSelfTestGateProfileDigestPayload,
90
+ } from './runtime-self-test-gate-profile.mjs';
91
+ import {
92
+ digestWorkflowLoopContract,
93
+ runtimeWorkflowLoopContract,
94
+ runtimeWorkflowLoopContractDigestPayload,
95
+ } from './runtime-workflow-loop-contract.mjs';
96
+ import {
97
+ digestProgressiveEntryUx,
98
+ runtimeProgressiveEntryUx,
99
+ runtimeProgressiveEntryUxDigestPayload,
100
+ } from './runtime-progressive-entry-ux.mjs';
101
+ import {
102
+ digestSuperpowersGapMatrix,
103
+ runtimeSuperpowersGapDigestPayload,
104
+ runtimeSuperpowersGapMatrix,
105
+ } from './runtime-superpowers-gap-matrix.mjs';
106
+ import {
107
+ digestSuperpowersComparison,
108
+ runtimeSuperpowersComparisonDigestPayload,
109
+ runtimeSuperpowersComparisonMatrix,
110
+ } from './runtime-superpowers-comparison-matrix.mjs';
111
+ import {
112
+ digestExperienceFriction,
113
+ runtimeExperienceFrictionDigestPayload,
114
+ runtimeExperienceFrictionMatrix,
115
+ } from './runtime-experience-friction-matrix.mjs';
116
+ import {
117
+ digestNextActionConsole,
118
+ runtimeNextActionConsole,
119
+ runtimeNextActionConsoleDigestPayload,
120
+ } from './runtime-next-action-console.mjs';
121
+ import {
122
+ digestTokenSaviorBudget,
123
+ runtimeTokenSaviorBudget,
124
+ runtimeTokenSaviorBudgetDigestPayload,
125
+ } from './runtime-token-savior-budget.mjs';
126
+ import {
127
+ digestExperienceLearningPattern,
128
+ runtimeExperienceLearningPattern,
129
+ runtimeExperienceLearningPatternDigestPayload,
130
+ } from './runtime-experience-learning-pattern.mjs';
131
+ import {
132
+ digestExperienceRegressionDashboard,
133
+ runtimeExperienceRegressionDashboard,
134
+ runtimeExperienceRegressionDashboardDigestPayload,
135
+ } from './runtime-experience-regression-dashboard.mjs';
136
+ import {
137
+ runExperienceUpgradePrioritizerCommand,
138
+ } from './runtime-experience-upgrade-command.mjs';
139
+ import {
140
+ ensureRoot,
141
+ localJsonFileWithinRoot,
142
+ } from './runtime-local-json-input.mjs';
143
+ import { stateDirectory } from './runtime-state-directory-model.mjs';
144
+ import {
145
+ runSuperpowersParityScorecardCommand,
146
+ } from './runtime-superpowers-parity-command.mjs';
147
+ import {
148
+ runContributorGuardrailCommand,
149
+ } from './runtime-contributor-guardrail-command.mjs';
150
+ import {
151
+ runSubagentPermissionCommand,
152
+ } from './runtime-subagent-permission-command.mjs';
153
+ // Stage 140: index.mjs keeps only CLI parsing/dispatch; command output boundaries live in runtime-superpowers-parity-command.mjs.
154
+ import {
155
+ runtimeSuperpowersRegressionGuard,
156
+ } from './runtime-superpowers-regression-guard.mjs';
157
+ import {
158
+ runtimeBehavioralEvaluationContract,
159
+ } from './runtime-behavioral-evaluation-contract.mjs';
160
+ import {
161
+ digestSuperpowersStyleEvalPack,
162
+ runtimeSuperpowersStyleEvalPack,
163
+ runtimeSuperpowersStyleEvalPackDigestPayload,
164
+ } from './runtime-superpowers-style-eval-pack.mjs';
165
+ import {
166
+ digestEntryTriggerDiscipline,
167
+ runtimeEntryTriggerDiscipline,
168
+ runtimeEntryTriggerDisciplineDigestPayload,
169
+ } from './runtime-entry-trigger-discipline.mjs';
170
+ import {
171
+ runEntryTriggerTighteningCommand,
172
+ } from './runtime-entry-trigger-tightening-command.mjs';
173
+ import {
174
+ runNextActionEvidencePromptsCommand,
175
+ } from './runtime-next-action-evidence-prompts-command.mjs';
176
+ import {
177
+ digestMethodologyCoverage,
178
+ runtimeMethodologyCoverageDigestPayload,
179
+ runtimeMethodologyCoverageMap,
180
+ } from './runtime-methodology-coverage-map.mjs';
181
+ import {
182
+ runtimeSkillRuntimeTraceabilityMap,
183
+ } from './runtime-skill-runtime-traceability-map.mjs';
184
+ import {
185
+ runtimeCapabilityRegistry,
186
+ runtimeCapabilityRegistryDriftGuard,
187
+ runtimeCapabilityRegistryInvariants,
188
+ } from './runtime-capability-registry.mjs';
189
+ import { createRuntimeControlPlaneCommands } from './runtime-control-plane-command.mjs';
190
+ import { createRuntimeInteractionCommands } from './runtime-interaction-command.mjs';
191
+ import { createRuntimeWorkflowStateHelpers } from './runtime-workflow-state-helpers.mjs';
192
+ import { createRuntimeWorkflowLedgerCommand } from './runtime-workflow-ledger-command.mjs';
193
+ import { createRuntimeReplyCommand } from './runtime-reply-command.mjs';
194
+ import { createRuntimeHooksCommand } from './runtime-hooks-command.mjs';
195
+ import { createRuntimePlatformCommand } from './runtime-platform-command.mjs';
196
+ import { createRuntimeSubagentsCommand } from './runtime-subagents-command.mjs';
197
+ import { createRuntimeSddLoopCommand } from './runtime-sdd-loop-command.mjs';
198
+ import { createRuntimeWorkspaceCommand } from './runtime-workspace-isolation-command.mjs';
199
+ import { createRuntimeDispatchCommand } from './runtime-dispatch-command.mjs';
200
+ import { createRuntimeExecutionCommand } from './runtime-execution-command.mjs';
201
+ import { approvalProfileBinding, approvalProfileBindingFailures, candidateProfileBinding, candidateProfileBindingFailures, orderedProfileBinding } from './runtime-execution-enabled-bridge-model.mjs';
202
+ import { controlledForegroundBinding, controlledForegroundEnvelopeFailures, foregroundEvidenceDigestPayload, foregroundPreflightFailures, foregroundPreflightGates } from './runtime-execution-enabled-run-envelope.mjs';
203
+ import { buildExecutionEnabledPreflight, buildExecutionProfilePreflightEnvelope } from './runtime-execution-enabled-preflight-model.mjs';
204
+ import { createSourcePatchPlanEnvelope } from './runtime-source-patch-plan-model.mjs';
205
+ import { createRuntimeSourceMergeArtifacts } from './runtime-source-merge-artifacts.mjs';
206
+ import { createRuntimePolicyCatalog } from './runtime-policy-catalog.mjs';
207
+ import { plannerAllowedWorkflows as plannerAllowedWorkflowsForPolicy } from './runtime-planner-route-model.mjs';
208
+ import { createRuntimeSourceMergeEntryCommands } from './runtime-source-merge-entry-command.mjs';
209
+ import { createRuntimeSourceMergeCommand } from './runtime-source-merge-command.mjs';
210
+ import { createRuntimeTraceCommand } from './runtime-trace-command.mjs';
211
+ import { createRuntimeLeaseCommand } from './runtime-lease-command.mjs';
212
+ import { createRuntimeSchedulerCommand } from './runtime-scheduler-command.mjs';
213
+ import { createRuntimeDaemonCommand } from './runtime-daemon-command.mjs';
214
+ import { createRuntimeQueueCommand } from './runtime-queue-command.mjs';
215
+ import { createRuntimeRecoveryCommand } from './runtime-recovery-command.mjs';
216
+ import { createRuntimeRetryCommand } from './runtime-retry-command.mjs';
217
+ import { runtimeTestRunProfiles } from './runtime-test-run-command.mjs';
218
+ import { createRuntimeObservabilityCommand } from './runtime-observability-command.mjs';
219
+ import { createRuntimeGovernanceCommand } from './runtime-governance-command.mjs';
220
+ import {
221
+ buildVerificationDrivenRepairLoopPlan,
222
+ printVerificationDrivenRepairLoopPlan,
223
+ } from './runtime-verification-repair-loop-plan.mjs';
224
+ import * as runtimeStatePaths from './runtime-state-paths.mjs';
225
+ import * as runtimeStateIo from './runtime-state-io.mjs';
226
+
227
+ const runtimeContractRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
228
+ const runtimeEntryContractMarkers = "Stage 45 source-sandbox-apply-only source-verification-only Stage 46 source-verification-gate merge-readiness-only verification-passed-merge-readiness-required Stage 47 merge-approval-only controlled-merge-apply-only auto_apply Stage 48 controlled-merge-apply-completed controlled-local-marker-apply Stage 49 Stage 54 workflow-route-policy platform-ranking-policy mutex-fallback-policy eval-judge-policy safety-boundary-policy Stage 57 governancePrReadinessPayload not_performed_offline_boundary human_submit_pr created_pr: false pushed: false merged: false Stage 58 governancePrReviewIntakePayload input_evidence_digest governanceRootRelativeEvidenceFilePath created_pr: false pushed: false merged: false Stage 85 mode: 'workflow-readiness-gate' Stage 87 mode: 'workflow-cockpit' Stage 90 acceptance_kind: 'workflow-bootstrap-acceptance' mode: 'workflow-bootstrap-acceptance' Stage 94 sequence_kind: 'execution-choreography' mode: 'execution-choreography' Stage 95 brief_kind: 'workflow-onboarding-brief' mode: 'workflow-onboarding-brief' Stage 100 runtimeSurfaceBoundaryAssertions runtimeSurfaceCapabilityGroups runtimeSurfaceStageInventory runtimeSurfaceCloseoutChain Stage 104 Stage 116 progressive-entry-ux-contract Stage 135 entry-trigger-discipline-contract";
229
+ if (!runtimeEntryContractMarkers.includes('Stage 54')) throw new Error('runtime entry contract markers missing');
230
+ const {
231
+ stateDirectoryName,
232
+ workflowFileName,
233
+ taskArtifactsDirectoryName,
234
+ dispatchesDirectoryName,
235
+ dispatchClaimsDirectoryName,
236
+ executionsDirectoryName,
237
+ executionCandidatesDirectoryName,
238
+ executionApprovalsDirectoryName,
239
+ autoRunLocksDirectoryName,
240
+ executionQueueDirectoryName,
241
+ recoveryPackagesDirectoryName,
242
+ recoveryClassificationsDirectoryName,
243
+ recoveryRunsDirectoryName,
244
+ retryPackagesDirectoryName,
245
+ retryRunsDirectoryName,
246
+ observabilityDirectoryName,
247
+ schedulerPlansDirectoryName,
248
+ schedulerHookPlansDirectoryName,
249
+ schedulerRunsDirectoryName,
250
+ schedulerLeasesDirectoryName,
251
+ approvalLifecycleDirectoryName,
252
+ daemonRunsDirectoryName,
253
+ daemonLoopsDirectoryName,
254
+ daemonHeartbeatsDirectoryName,
255
+ daemonStopDirectoryName,
256
+ replyDraftsDirectoryName,
257
+ replyReviewsDirectoryName,
258
+ replyApprovalsDirectoryName,
259
+ replyOutboxDirectoryName,
260
+ replySendRunsDirectoryName,
261
+ runtimeTracesDirectoryName,
262
+ governanceDirectoryName,
263
+ methodologyGatesDirectoryName,
264
+ hookIntentsDirectoryName,
265
+ subagentEligibilityDirectoryName,
266
+ subagentDispatchesDirectoryName,
267
+ subagentAdapterDispatchesDirectoryName,
268
+ subagentRunLeasesDirectoryName,
269
+ subagentRunResultsDirectoryName,
270
+ subagentResultsDirectoryName,
271
+ subagentReviewsDirectoryName,
272
+ hookRunsDirectoryName,
273
+ hookHeartbeatsDirectoryName,
274
+ platformCapabilitiesDirectoryName,
275
+ platformSessionApprovalsDirectoryName,
276
+ platformSessionsDirectoryName,
277
+ platformSessionLeasesDirectoryName,
278
+ platformSessionResultsDirectoryName,
279
+ platformSessionCancellationsDirectoryName,
280
+ platformSessionIntakeDirectoryName,
281
+ platformSessionReviewsDirectoryName,
282
+ sourceChangeCandidatesDirectoryName,
283
+ sourceSandboxRunsDirectoryName,
284
+ sourceVerificationsDirectoryName,
285
+ mergeReadinessDirectoryName,
286
+ mergeApprovalsDirectoryName,
287
+ mergeAppliesDirectoryName,
288
+ plannerRoutesDirectoryName,
289
+ plannerPlansDirectoryName,
290
+ plannerBriefsDirectoryName,
291
+ routerPlansDirectoryName,
292
+ routerApprovalsDirectoryName,
293
+ orchestratorPlansDirectoryName,
294
+ orchestratorDispatchPlansDirectoryName,
295
+ evalSuitesDirectoryName,
296
+ evalRunsDirectoryName,
297
+ evalReportsDirectoryName,
298
+ releaseGatesDirectoryName,
299
+ releaseNotesDirectoryName,
300
+ feedbackLedgersDirectoryName,
301
+ learningDirectoryName,
302
+ tokenEconomyDirectoryName,
303
+ } = runtimeStatePaths;
304
+ const {
305
+ workflowPath,
306
+ artifactPath,
307
+ taskArtifactsDirectory,
308
+ dispatchesDirectory,
309
+ dispatchClaimsDirectory,
310
+ executionsDirectory,
311
+ executionCandidatesDirectory,
312
+ executionApprovalsDirectory,
313
+ autoRunLocksDirectory,
314
+ executionQueueDirectory,
315
+ recoveryPackagesDirectory,
316
+ recoveryClassificationsDirectory,
317
+ recoveryRunsDirectory,
318
+ retryPackagesDirectory,
319
+ retryRunsDirectory,
320
+ observabilityDirectory,
321
+ schedulerPlansDirectory,
322
+ schedulerHookPlansDirectory,
323
+ schedulerRunsDirectory,
324
+ schedulerLeasesDirectory,
325
+ approvalLifecycleDirectory,
326
+ daemonLoopsDirectory,
327
+ daemonHeartbeatsDirectory,
328
+ daemonStopDirectory,
329
+ replyDraftsDirectory,
330
+ replyReviewsDirectory,
331
+ replyApprovalsDirectory,
332
+ replyOutboxDirectory,
333
+ replySendRunsDirectory,
334
+ runtimeTracesDirectory,
335
+ governanceDirectory,
336
+ methodologyGatesDirectory,
337
+ hookIntentsDirectory,
338
+ subagentEligibilityDirectory,
339
+ subagentDispatchesDirectory,
340
+ subagentAdapterDispatchesDirectory,
341
+ subagentRunLeasesDirectory,
342
+ subagentRunResultsDirectory,
343
+ subagentResultsDirectory,
344
+ subagentReviewsDirectory,
345
+ hookRunsDirectory,
346
+ hookHeartbeatsDirectory,
347
+ platformCapabilitiesDirectory,
348
+ platformSessionApprovalsDirectory,
349
+ platformSessionsDirectory,
350
+ platformSessionLeasesDirectory,
351
+ platformSessionResultsDirectory,
352
+ platformSessionCancellationsDirectory,
353
+ platformSessionIntakeDirectory,
354
+ platformSessionReviewsDirectory,
355
+ sourceChangeCandidatesDirectory,
356
+ sourceSandboxRunsDirectory,
357
+ sourceVerificationsDirectory,
358
+ mergeReadinessDirectory,
359
+ mergeApprovalsDirectory,
360
+ mergeAppliesDirectory,
361
+ plannerRoutesDirectory,
362
+ plannerPlansDirectory,
363
+ plannerBriefsDirectory,
364
+ routerPlansDirectory,
365
+ routerApprovalsDirectory,
366
+ orchestratorPlansDirectory,
367
+ orchestratorDispatchPlansDirectory,
368
+ evalSuitesDirectory,
369
+ evalRunsDirectory,
370
+ evalReportsDirectory,
371
+ releaseGatesDirectory,
372
+ releaseNotesDirectory,
373
+ feedbackLedgersDirectory,
374
+ learningDirectory,
375
+ tokenEconomyDirectory,
376
+ approvalLifecycleFileName,
377
+ approvalLifecycleFilePath,
378
+ safeStateArtifactFilePath,
379
+ candidateFilePath,
380
+ approvalFilePath,
381
+ autoRunLockFilePath,
382
+ queueFilePath,
383
+ recoveryFilePath,
384
+ recoveryClassificationFilePath,
385
+ schedulerPlanFilePath,
386
+ schedulerHookPlanFilePath,
387
+ retryPackageFilePath,
388
+ daemonLoopFilePath,
389
+ replyDraftFilePath,
390
+ replyReviewFilePath,
391
+ replyApprovalFilePath,
392
+ replyOutboxFilePath,
393
+ replySendRunFilePath,
394
+ runtimeTraceFilePath,
395
+ governanceFilePath,
396
+ governancePrReadinessFilePath,
397
+ governancePrReviewIntakeFilePath,
398
+ governanceAnyFilePath,
399
+ hookIntentFilePath,
400
+ subagentEligibilityFilePath,
401
+ subagentDispatchFilePath,
402
+ subagentAdapterDispatchFilePath,
403
+ subagentRunLeaseFilePath,
404
+ subagentRunResultFilePath,
405
+ subagentResultFilePath,
406
+ subagentReviewFilePath,
407
+ hookRunFilePath,
408
+ hookHeartbeatFilePath,
409
+ platformCapabilityFilePath,
410
+ platformSessionApprovalFilePath,
411
+ platformSessionFilePath,
412
+ platformSessionLeaseFilePath,
413
+ platformSessionResultFilePath,
414
+ platformSessionCancellationFilePath,
415
+ platformSessionIntakeFilePath,
416
+ platformSessionReviewFilePath,
417
+ sourceChangeCandidateFilePath,
418
+ sourceSandboxRunFilePath,
419
+ sourceVerificationFilePath,
420
+ mergeReadinessFilePath,
421
+ mergeApprovalFilePath,
422
+ mergeApplyFilePath,
423
+ plannerRouteFilePath,
424
+ plannerPlanFilePath,
425
+ plannerBriefsFilePath,
426
+ routerPlanFilePath,
427
+ routerApprovalFilePath,
428
+ orchestratorPlanFilePath,
429
+ orchestratorDispatchPlanFilePath,
430
+ evalSuiteFilePath,
431
+ evalRunFilePath,
432
+ evalReportFilePath,
433
+ releaseGateFilePath,
434
+ releaseNotesFilePath,
435
+ feedbackLedgerFilePath,
436
+ learningObservationFilePath,
437
+ learningCandidateInstinctFilePath,
438
+ learningPromotionFilePath,
439
+ tokenCompactionFilePath,
440
+ tokenMetricsFilePath,
441
+ plannerRouteSnapshotPath,
442
+ plannerPlanSnapshotPath,
443
+ plannerBriefsSnapshotPath,
444
+ routerPlanSnapshotPath,
445
+ routerApprovalSnapshotPath,
446
+ orchestratorPlanSnapshotPath,
447
+ orchestratorDispatchPlanSnapshotPath,
448
+ evalSuiteSnapshotPath,
449
+ evalRunSnapshotPath,
450
+ evalReportSnapshotPath,
451
+ releaseGateSnapshotPath,
452
+ releaseNotesSnapshotPath,
453
+ feedbackLedgerSnapshotPath,
454
+ } = runtimeStatePaths;
455
+ const {
456
+ readJsonArtifact,
457
+ writeStateArtifact,
458
+ fileDigest,
459
+ optionalFileDigest,
460
+ stableJson,
461
+ digestObject,
462
+ } = runtimeStateIo;
463
+
464
+ const stage11RuntimeActionName = 'generate-supervised-handoff-package';
465
+ const runtimeActionCatalogStage = 'Stage 18';
466
+ const runtimeActionCatalogVersion = 1;
467
+ const approvalLifecycleStage = 'Stage 17';
468
+ const approvalLifecycleStates = new Set(['previewed', 'requested', 'approved', 'rejected', 'expired', 'revoked', 'consumed']);
469
+ const approvalLifecycleTerminalStates = new Set(['rejected', 'expired', 'revoked', 'consumed']);
470
+ const stage11ExecutionStaleAfterMs = 30 * 60 * 1000;
471
+ const stage12CandidateStaleAfterMs = 30 * 60 * 1000;
472
+ const stage13ApprovalStaleAfterMs = 30 * 60 * 1000;
473
+ const stage11AllowedExecutionSkills = new Set([
474
+ 'vibe-verification-before-completion',
475
+ 'vibe-review',
476
+ 'vibe-requesting-code-review',
477
+ 'vibe-receiving-code-review',
478
+ 'vibe-systematic-debugging',
479
+ 'vibe-test-driven-development',
480
+ 'vibe-executing-plans',
481
+ ]);
482
+ const allowedExecutionStatuses = new Set(['planned', 'running', 'succeeded', 'failed', 'timed_out', 'cancelled']);
483
+ const stage11TerminalStatuses = new Set(['succeeded', 'failed', 'timed_out', 'cancelled']);
484
+ const forbiddenDispatchActions = [
485
+ 'git_write',
486
+ 'worktree_write',
487
+ 'subagent_dispatch',
488
+ 'daemon',
489
+ 'mcp_runtime',
490
+ 'business_source_write',
491
+ ];
492
+ // Stage 11.2 Stage 11.3 Stage 11.4 Stage 11.5 Stage 11.6 Stage 11.7 Stage 11.8 Stage 11.9 Stage 11.10
493
+ // Stage 12 Stage 13 Stage 14 Stage 15 Stage 16
494
+ const claimStaleAfterMs = 30 * 60 * 1000;
495
+ const executionPolicy = {
496
+ name: 'stage-9-supervised-executor',
497
+ version: 1,
498
+ };
499
+ const autoRunPolicyProfiles = {
500
+ strict: {
501
+ profile: 'strict',
502
+ mode: 'review-only',
503
+ default_enabled: false,
504
+ allowed_target_skills: [],
505
+ allowed_runtime_actions: [],
506
+ forbidden_actions: forbiddenDispatchActions,
507
+ expected_writes: [],
508
+ risk_ceiling: 'none',
509
+ approval: { required: true, stale_after_ms: stage13ApprovalStaleAfterMs },
510
+ limits: { max_active_runs: 0, max_queue_items: 50 },
511
+ },
512
+ 'controlled-local-runtime': {
513
+ profile: 'controlled-local-runtime',
514
+ mode: 'controlled-local-runtime',
515
+ default_enabled: false,
516
+ allowed_target_skills: [...stage11AllowedExecutionSkills].sort(),
517
+ allowed_runtime_actions: [stage11RuntimeActionName],
518
+ forbidden_actions: forbiddenDispatchActions,
519
+ expected_writes: [path.join(stateDirectoryName, executionsDirectoryName, '<timestamp>-<dispatch-hash>.execution.json').replace(/\\/g, '/')],
520
+ risk_ceiling: 'state-only-runtime-action',
521
+ approval: { required: true, stale_after_ms: stage13ApprovalStaleAfterMs },
522
+ limits: { max_active_runs: 1, max_queue_items: 50 },
523
+ },
524
+ 'review-only': {
525
+ profile: 'review-only',
526
+ mode: 'review-only',
527
+ default_enabled: false,
528
+ allowed_target_skills: ['vibe-review', 'vibe-requesting-code-review', 'vibe-receiving-code-review'].sort(),
529
+ allowed_runtime_actions: [],
530
+ forbidden_actions: forbiddenDispatchActions,
531
+ expected_writes: [],
532
+ risk_ceiling: 'no-runtime-action',
533
+ approval: { required: true, stale_after_ms: stage13ApprovalStaleAfterMs },
534
+ limits: { max_active_runs: 0, max_queue_items: 50 },
535
+ },
536
+ };
537
+ const schedulerPolicyProfiles = {
538
+ 'scheduler-dry-run': {
539
+ profile: 'scheduler-dry-run',
540
+ mode: 'plan-only',
541
+ default_enabled: false,
542
+ allowed_scheduler_actions: ['plan'],
543
+ allowed_runtime_actions: [],
544
+ auto_run_allowed: false,
545
+ recovery_apply_allowed: false,
546
+ retry_allowed: false,
547
+ },
548
+ 'single-local-auto-run': {
549
+ profile: 'single-local-auto-run',
550
+ mode: 'single-shot-local-auto-run',
551
+ default_enabled: false,
552
+ allowed_scheduler_actions: ['plan', 'once'],
553
+ allowed_runtime_actions: [stage11RuntimeActionName],
554
+ auto_run_allowed: true,
555
+ recovery_apply_allowed: false,
556
+ retry_allowed: false,
557
+ },
558
+ 'recovery-only': {
559
+ profile: 'recovery-only',
560
+ mode: 'recovery-plan-only',
561
+ default_enabled: false,
562
+ allowed_scheduler_actions: ['plan', 'recover-once'],
563
+ allowed_runtime_actions: [],
564
+ auto_run_allowed: false,
565
+ recovery_apply_allowed: false,
566
+ retry_allowed: false,
567
+ },
568
+ 'scheduler-recovery-once': {
569
+ profile: 'scheduler-recovery-once',
570
+ mode: 'single-shot-recovery-apply',
571
+ default_enabled: false,
572
+ allowed_scheduler_actions: ['plan', 'recover-once'],
573
+ allowed_runtime_actions: [],
574
+ auto_run_allowed: false,
575
+ recovery_apply_allowed: false,
576
+ retry_allowed: false,
577
+ },
578
+ };
579
+ const schedulerRuntimeBudget = {
580
+ stage: 'Stage 22',
581
+ max_runs_per_invocation: 1,
582
+ max_active_scheduler_runs: 1,
583
+ max_retry_attempts: 0,
584
+ max_consecutive_failures: 1,
585
+ max_lock_age_ms: stage11ExecutionStaleAfterMs,
586
+ kill_switch: false,
587
+ retry_allowed: false,
588
+ recovery_apply_allowed: false,
589
+ };
590
+ const recoveryClassificationPolicy = {
591
+ name: 'stage-24-recovery-classification-policy',
592
+ version: 1,
593
+ stage: 'Stage 24',
594
+ source: 'builtin-data-only',
595
+ apply_allowed: false,
596
+ };
597
+ const recoveryPolicy = {
598
+ name: 'stage-25-confirmed-recovery-policy',
599
+ version: 1,
600
+ stage: 'Stage 25',
601
+ default_enabled: false,
602
+ max_recovery_items_per_invocation: 1,
603
+ allowed_actions: ['record_recovery_decision', 'mark_scheduler_lease_failed', 'package_retry_candidate'],
604
+ source_mutation: false,
605
+ business_source_write: false,
606
+ delete_allowed: false,
607
+ retry_execute_allowed: false,
608
+ automatic_retry: false,
609
+ remote_config: false,
610
+ dynamic_code: false,
611
+ };
612
+ const boundedRetryPolicy = {
613
+ name: 'stage-27-bounded-auto-retry-policy',
614
+ version: 1,
615
+ stage: 'Stage 27',
616
+ default_enabled: false,
617
+ max_retry_attempts: 1,
618
+ transient_only: true,
619
+ approval_required: true,
620
+ allowed_runtime_actions: [stage11RuntimeActionName],
621
+ source_mutation: false,
622
+ business_source_write: false,
623
+ automatic_retry: false,
624
+ remote_config: false,
625
+ dynamic_code: false,
626
+ };
627
+ const boundedRetryBudget = {
628
+ stage: 'Stage 27',
629
+ max_retry_attempts: 1,
630
+ max_retry_runs_per_invocation: 1,
631
+ max_active_retry_runs: 0,
632
+ kill_switch: false,
633
+ transient_only: true,
634
+ approval_required: true,
635
+ default_enabled: false,
636
+ };
637
+ const replyPolicy = {
638
+ name: 'reply-a-d-local-pipeline-policy',
639
+ version: 1,
640
+ stage: 'Reply A-D',
641
+ default_enabled: false,
642
+ external_delivery: false,
643
+ send_allowed: false,
644
+ model_invocation: false,
645
+ platform_api: false,
646
+ approval_required: true,
647
+ adapters: ['local-disabled'],
648
+ };
649
+ const recoveryActionCatalog = {
650
+ stage: 'Stage 25',
651
+ version: 1,
652
+ source: 'builtin-data-only',
653
+ default_allow_unknown: false,
654
+ actions: [
655
+ {
656
+ id: 'record_recovery_decision',
657
+ categories: ['lease_stale', 'execution_failed', 'execution_timed_out', 'execution_running_stale', 'approval_missing', 'approval_blocked', 'policy_mismatch', 'catalog_mismatch', 'readiness_blocked', 'scheduler_lease_active', 'unknown'],
658
+ writes: [path.join(stateDirectoryName, recoveryRunsDirectoryName, '<timestamp>.recovery-run.json').replace(/\\/g, '/')],
659
+ idempotency: 'classification_digest:finding_digest:action',
660
+ },
661
+ {
662
+ id: 'mark_scheduler_lease_failed',
663
+ categories: ['scheduler_lease_active'],
664
+ writes: [path.join(stateDirectoryName, recoveryRunsDirectoryName, '<timestamp>.recovery-run.json').replace(/\\/g, '/')],
665
+ idempotency: 'classification_digest:finding_digest:action',
666
+ },
667
+ {
668
+ id: 'package_retry_candidate',
669
+ categories: ['execution_failed', 'execution_timed_out'],
670
+ writes: [path.join(stateDirectoryName, recoveryRunsDirectoryName, '<timestamp>.recovery-run.json').replace(/\\/g, '/'), path.join(stateDirectoryName, retryPackagesDirectoryName, '<timestamp>.retry-package.json').replace(/\\/g, '/')],
671
+ idempotency: 'classification_digest:finding_digest:action',
672
+ },
673
+ ],
674
+ };
675
+ const artifactFileNames = {
676
+ taskBrief: 'task-brief.md',
677
+ reviewGate: 'review-gate.md',
678
+ evidence: 'evidence.md',
679
+ };
680
+ const taskArtifactFileNames = {
681
+ brief: 'brief.md',
682
+ report: 'report.md',
683
+ reviewGate: 'review-gate.md',
684
+ evidence: 'evidence.md',
685
+ };
686
+ const allowedStatuses = new Set([
687
+ 'idle',
688
+ 'handoff-recorded',
689
+ 'waiting-confirmation',
690
+ 'next-suggested',
691
+ 'stopped',
692
+ ]);
693
+ const allowedTaskStatuses = new Set(['pending', 'in_progress', 'completed', 'blocked']);
694
+ const allowedReviewStatuses = new Set(['not_started', 'requested', 'clean', 'needs_fix', 'waived']);
695
+ const taskIdPattern = /^[A-Za-z0-9._-]+$/;
696
+ const windowsReservedTaskBasenames = new Set([
697
+ 'CON',
698
+ 'PRN',
699
+ 'AUX',
700
+ 'NUL',
701
+ 'COM1',
702
+ 'COM2',
703
+ 'COM3',
704
+ 'COM4',
705
+ 'COM5',
706
+ 'COM6',
707
+ 'COM7',
708
+ 'COM8',
709
+ 'COM9',
710
+ 'LPT1',
711
+ 'LPT2',
712
+ 'LPT3',
713
+ 'LPT4',
714
+ 'LPT5',
715
+ 'LPT6',
716
+ 'LPT7',
717
+ 'LPT8',
718
+ 'LPT9',
719
+ ]);
720
+ const taskIdRequirement = 'Use only letters, numbers, dot, underscore, and hyphen; path separators, traversal, Windows reserved device names, and trailing dots or spaces are not allowed.';
721
+ const jsonSchemaVersion = 1;
722
+ const adapterRuntimeBridge = {
723
+ supported: true,
724
+ mode: 'manual',
725
+ canReadDispatchIntent: true,
726
+ canAutoExecuteSkill: false,
727
+ canCallSubagent: false,
728
+ canTouchGit: false,
729
+ };
730
+ const platformCapabilities = {
731
+ claude: {
732
+ entry_file: 'CLAUDE.md',
733
+ mode: 'manual',
734
+ session_create: false,
735
+ platform_api: false,
736
+ stdin_automation: false,
737
+ adapter_dry_run: true,
738
+ },
739
+ cursor: {
740
+ entry_file: 'AGENTS.md',
741
+ mode: 'manual',
742
+ session_create: false,
743
+ platform_api: false,
744
+ stdin_automation: false,
745
+ adapter_dry_run: true,
746
+ },
747
+ codex: {
748
+ entry_file: 'AGENTS.md',
749
+ mode: 'manual',
750
+ session_create: false,
751
+ platform_api: false,
752
+ stdin_automation: false,
753
+ adapter_dry_run: true,
754
+ },
755
+ };
756
+ const platformHints = {
757
+ claude: {
758
+ entry_file: 'CLAUDE.md',
759
+ instruction: 'Load the target workflow skill from .vibecoding/skills/ and continue from the current Workflow Handoff.',
760
+ },
761
+ cursor: {
762
+ entry_file: 'AGENTS.md',
763
+ instruction: 'Continue with the target workflow skill manually using the current handoff.',
764
+ },
765
+ codex: {
766
+ entry_file: 'AGENTS.md',
767
+ instruction: 'Use the target workflow skill as the next manual step.',
768
+ },
769
+ };
770
+ const allowedTransitions = new Set([
771
+ 'using-vibecoding->vibe-brainstorming',
772
+ 'using-vibecoding->vibe-planning',
773
+ 'using-vibecoding->vibe-writing-skills',
774
+ 'using-vibecoding->vibe-writing-plans',
775
+ 'using-vibecoding->vibe-workspace-isolation',
776
+ 'using-vibecoding->vibe-dispatching-parallel-work',
777
+ 'using-vibecoding->vibe-subagent-driven-development',
778
+ 'using-vibecoding->vibe-test-driven-development',
779
+ 'using-vibecoding->vibe-implementation',
780
+ 'using-vibecoding->vibe-systematic-debugging',
781
+ 'using-vibecoding->vibe-requesting-code-review',
782
+ 'using-vibecoding->vibe-receiving-code-review',
783
+ 'using-vibecoding->vibe-verification-before-completion',
784
+ 'using-vibecoding->vibe-finishing-a-development-branch',
785
+ 'using-vibecoding->vibe-context-compact',
786
+ 'vibe-brainstorming->vibe-planning',
787
+ 'vibe-brainstorming->vibe-implementation',
788
+ 'vibe-planning->vibe-implementation',
789
+ 'vibe-planning->vibe-writing-plans',
790
+ 'vibe-writing-skills->vibe-writing-plans',
791
+ 'vibe-writing-skills->vibe-test-driven-development',
792
+ 'vibe-writing-skills->vibe-planning',
793
+ 'vibe-writing-plans->vibe-test-driven-development',
794
+ 'vibe-writing-plans->vibe-workspace-isolation',
795
+ 'vibe-writing-plans->vibe-dispatching-parallel-work',
796
+ 'vibe-writing-plans->vibe-planning',
797
+ 'vibe-workspace-isolation->vibe-writing-plans',
798
+ 'vibe-workspace-isolation->vibe-dispatching-parallel-work',
799
+ 'vibe-workspace-isolation->vibe-subagent-driven-development',
800
+ 'vibe-workspace-isolation->vibe-test-driven-development',
801
+ 'vibe-workspace-isolation->vibe-executing-plans',
802
+ 'vibe-workspace-isolation->vibe-finishing-a-development-branch',
803
+ 'vibe-dispatching-parallel-work->vibe-workspace-isolation',
804
+ 'vibe-dispatching-parallel-work->vibe-subagent-driven-development',
805
+ 'vibe-dispatching-parallel-work->vibe-test-driven-development',
806
+ 'vibe-dispatching-parallel-work->vibe-executing-plans',
807
+ 'vibe-dispatching-parallel-work->vibe-writing-plans',
808
+ 'vibe-dispatching-parallel-work->vibe-planning',
809
+ 'vibe-test-driven-development->vibe-implementation',
810
+ 'vibe-test-driven-development->vibe-executing-plans',
811
+ 'vibe-test-driven-development->vibe-planning',
812
+ 'vibe-implementation->vibe-verification-before-completion',
813
+ 'vibe-implementation->vibe-planning',
814
+ 'vibe-implementation->vibe-systematic-debugging',
815
+ 'vibe-executing-plans->vibe-verification-before-completion',
816
+ 'vibe-executing-plans->vibe-systematic-debugging',
817
+ 'vibe-executing-plans->vibe-writing-plans',
818
+ 'vibe-executing-plans->vibe-planning',
819
+ 'vibe-executing-plans->vibe-subagent-driven-development',
820
+ 'vibe-executing-plans->vibe-dispatching-parallel-work',
821
+ 'vibe-systematic-debugging->vibe-test-driven-development',
822
+ 'vibe-systematic-debugging->vibe-implementation',
823
+ 'vibe-systematic-debugging->vibe-planning',
824
+ 'vibe-debugging->vibe-systematic-debugging',
825
+ 'vibe-debugging->vibe-implementation',
826
+ 'vibe-debugging->vibe-planning',
827
+ 'vibe-verification->vibe-verification-before-completion',
828
+ 'vibe-verification->vibe-debugging',
829
+ 'vibe-verification->vibe-implementation',
830
+ 'vibe-verification->vibe-planning',
831
+ 'vibe-verification-before-completion->vibe-finishing-a-development-branch',
832
+ 'vibe-verification-before-completion->vibe-verification',
833
+ 'vibe-verification-before-completion->vibe-systematic-debugging',
834
+ 'vibe-verification-before-completion->vibe-implementation',
835
+ 'vibe-verification-before-completion->vibe-planning',
836
+ 'vibe-requesting-code-review->vibe-review',
837
+ 'vibe-requesting-code-review->vibe-verification-before-completion',
838
+ 'vibe-requesting-code-review->vibe-planning',
839
+ 'vibe-review->vibe-receiving-code-review',
840
+ 'vibe-review->vibe-test-driven-development',
841
+ 'vibe-review->vibe-verification-before-completion',
842
+ 'vibe-review->vibe-planning',
843
+ 'vibe-receiving-code-review->vibe-test-driven-development',
844
+ 'vibe-receiving-code-review->vibe-implementation',
845
+ 'vibe-receiving-code-review->vibe-systematic-debugging',
846
+ 'vibe-receiving-code-review->vibe-planning',
847
+ 'vibe-receiving-code-review->vibe-verification-before-completion',
848
+ 'vibe-subagent-driven-development->vibe-verification-before-completion',
849
+ 'vibe-subagent-driven-development->vibe-dispatching-parallel-work',
850
+ 'vibe-subagent-driven-development->vibe-writing-plans',
851
+ 'vibe-subagent-driven-development->vibe-workspace-isolation',
852
+ 'vibe-subagent-driven-development->vibe-test-driven-development',
853
+ 'vibe-subagent-driven-development->vibe-executing-plans',
854
+ 'vibe-subagent-driven-development->vibe-receiving-code-review',
855
+ 'vibe-subagent-driven-development->vibe-systematic-debugging',
856
+ 'vibe-finishing-a-development-branch->vibe-verification-before-completion',
857
+ 'vibe-finishing-a-development-branch->vibe-implementation',
858
+ 'vibe-finishing-a-development-branch->none',
859
+ 'vibe-context-compact->vibe-planning',
860
+ 'vibe-context-compact->vibe-debugging',
861
+ 'vibe-context-compact->vibe-implementation',
862
+ 'vibe-context-compact->vibe-verification',
863
+ 'vibe-context-compact->none',
864
+ ]);
865
+
866
+
867
+ let runtimeExecutionCommand;
868
+ function executionCommand() {
869
+ if (!runtimeExecutionCommand) throw new Error('runtime execution command is not initialized');
870
+ return runtimeExecutionCommand;
871
+ }
872
+ function listApprovalFiles(...args) {
873
+ return executionCommand().listApprovalFiles(...args);
874
+ }
875
+ function listApprovalLifecycleFiles(...args) {
876
+ return executionCommand().listApprovalLifecycleFiles(...args);
877
+ }
878
+ function executionFilePath(...args) {
879
+ return executionCommand().executionFilePath(...args);
880
+ }
881
+ function listExecutionFiles(...args) {
882
+ return executionCommand().listExecutionFiles(...args);
883
+ }
884
+ function readExecutionFile(...args) {
885
+ return executionCommand().readExecutionFile(...args);
886
+ }
887
+ function lifecycleSummary(...args) {
888
+ return executionCommand().lifecycleSummary(...args);
889
+ }
890
+ function executionAgeMs(...args) {
891
+ return executionCommand().executionAgeMs(...args);
892
+ }
893
+ function executionAuditState(...args) {
894
+ return executionCommand().executionAuditState(...args);
895
+ }
896
+ function executionSafety(...args) {
897
+ return executionCommand().executionSafety(...args);
898
+ }
899
+ function candidateSafety(...args) {
900
+ return executionCommand().candidateSafety(...args);
901
+ }
902
+ function approvalSafety(...args) {
903
+ return executionCommand().approvalSafety(...args);
904
+ }
905
+ function autoRunSafety(...args) {
906
+ return executionCommand().autoRunSafety(...args);
907
+ }
908
+ function validateCandidateArtifact(...args) {
909
+ return executionCommand().validateCandidateArtifact(...args);
910
+ }
911
+ function validateApprovalArtifact(...args) {
912
+ return executionCommand().validateApprovalArtifact(...args);
913
+ }
914
+ function executionIdempotencyKey(...args) {
915
+ return executionCommand().executionIdempotencyKey(...args);
916
+ }
917
+ function runtimeActionCatalogSnapshot(...args) {
918
+ return executionCommand().runtimeActionCatalogSnapshot(...args);
919
+ }
920
+ function runtimeActionCatalogDigest(...args) {
921
+ return executionCommand().runtimeActionCatalogDigest(...args);
922
+ }
923
+ function runtimeActionById(...args) {
924
+ return executionCommand().runtimeActionById(...args);
925
+ }
926
+ function evaluateRuntimeActionCatalog(...args) {
927
+ return executionCommand().evaluateRuntimeActionCatalog(...args);
928
+ }
929
+ function validateRuntimeActionCatalog(...args) {
930
+ return executionCommand().validateRuntimeActionCatalog(...args);
931
+ }
932
+ function actionCatalogEnvelope(...args) {
933
+ return executionCommand().actionCatalogEnvelope(...args);
934
+ }
935
+ function policyProfileSnapshot(...args) {
936
+ return executionCommand().policyProfileSnapshot(...args);
937
+ }
938
+ function validatePolicySnapshot(...args) {
939
+ return executionCommand().validatePolicySnapshot(...args);
940
+ }
941
+ function policyEvaluationEnvelope(...args) {
942
+ return executionCommand().policyEvaluationEnvelope(...args);
943
+ }
944
+ function executionPolicySnapshot(...args) {
945
+ return executionCommand().executionPolicySnapshot(...args);
946
+ }
947
+ function validateExecutionPolicySnapshot(...args) {
948
+ return executionCommand().validateExecutionPolicySnapshot(...args);
949
+ }
950
+ function validateRuntimeActionContract(...args) {
951
+ return executionCommand().validateRuntimeActionContract(...args);
952
+ }
953
+ function validateTerminalEvidence(...args) {
954
+ return executionCommand().validateTerminalEvidence(...args);
955
+ }
956
+ function validateExecutionEnvelope(...args) {
957
+ return executionCommand().validateExecutionEnvelope(...args);
958
+ }
959
+ function executionSummary(...args) {
960
+ return executionCommand().executionSummary(...args);
961
+ }
962
+ function executionEventPath(...args) {
963
+ return executionCommand().executionEventPath(...args);
964
+ }
965
+ function executionPlan(...args) {
966
+ return executionCommand().executionPlan(...args);
967
+ }
968
+ function findActiveExecutionByIdempotencyKey(...args) {
969
+ return executionCommand().findActiveExecutionByIdempotencyKey(...args);
970
+ }
971
+ function assertNoActiveExecution(...args) {
972
+ return executionCommand().assertNoActiveExecution(...args);
973
+ }
974
+ function executionHistorySummary(...args) {
975
+ return executionCommand().executionHistorySummary(...args);
976
+ }
977
+ function executionCandidateEnvelope(...args) {
978
+ return executionCommand().executionCandidateEnvelope(...args);
979
+ }
980
+ function candidateArtifactPath(...args) {
981
+ return executionCommand().candidateArtifactPath(...args);
982
+ }
983
+ function writeCandidateArtifact(...args) {
984
+ return executionCommand().writeCandidateArtifact(...args);
985
+ }
986
+ function approvalArtifactPath(...args) {
987
+ return executionCommand().approvalArtifactPath(...args);
988
+ }
989
+ function executionApprovalEnvelope(...args) {
990
+ return executionCommand().executionApprovalEnvelope(...args);
991
+ }
992
+ function writeApprovalArtifact(...args) {
993
+ return executionCommand().writeApprovalArtifact(...args);
994
+ }
995
+ function approvalLifecycleDigestPayload(...args) {
996
+ return executionCommand().approvalLifecycleDigestPayload(...args);
997
+ }
998
+ function approvalLifecycleEnvelope(...args) {
999
+ return executionCommand().approvalLifecycleEnvelope(...args);
1000
+ }
1001
+ function validateApprovalLifecycleArtifact(...args) {
1002
+ return executionCommand().validateApprovalLifecycleArtifact(...args);
1003
+ }
1004
+ function readApprovalLifecycle(...args) {
1005
+ return executionCommand().readApprovalLifecycle(...args);
1006
+ }
1007
+ function writeApprovalLifecycle(...args) {
1008
+ return executionCommand().writeApprovalLifecycle(...args);
1009
+ }
1010
+ function validateApprovalLifecycleBinding(...args) {
1011
+ return executionCommand().validateApprovalLifecycleBinding(...args);
1012
+ }
1013
+ function approvalLifecycleCurrentState(...args) {
1014
+ return executionCommand().approvalLifecycleCurrentState(...args);
1015
+ }
1016
+ function approvalLifecycleAuditEnvelope(...args) {
1017
+ return executionCommand().approvalLifecycleAuditEnvelope(...args);
1018
+ }
1019
+ function runApprovals(...args) {
1020
+ return executionCommand().runApprovals(...args);
1021
+ }
1022
+ function readApprovalForAutoRun(...args) {
1023
+ return executionCommand().readApprovalForAutoRun(...args);
1024
+ }
1025
+ function assertAutoRunLock(...args) {
1026
+ return executionCommand().assertAutoRunLock(...args);
1027
+ }
1028
+ function controlledAutoRunEnvelope(...args) {
1029
+ return executionCommand().controlledAutoRunEnvelope(...args);
1030
+ }
1031
+ function assertExecutionClaimReady(...args) {
1032
+ return executionCommand().assertExecutionClaimReady(...args);
1033
+ }
1034
+ function executionPreflightEnvelope(...args) {
1035
+ return executionCommand().executionPreflightEnvelope(...args);
1036
+ }
1037
+ function executionEnvelope(...args) {
1038
+ return executionCommand().executionEnvelope(...args);
1039
+ }
1040
+ function supervisedRunBaseEnvelope(...args) {
1041
+ return executionCommand().supervisedRunBaseEnvelope(...args);
1042
+ }
1043
+ function terminalSupervisedRunEnvelope(...args) {
1044
+ return executionCommand().terminalSupervisedRunEnvelope(...args);
1045
+ }
1046
+ function completeSupervisedRunEnvelope(...args) {
1047
+ return executionCommand().completeSupervisedRunEnvelope(...args);
1048
+ }
1049
+ function writeExecutionEnvelope(...args) {
1050
+ return executionCommand().writeExecutionEnvelope(...args);
1051
+ }
1052
+ function writeExecutionPayload(...args) {
1053
+ return executionCommand().writeExecutionPayload(...args);
1054
+ }
1055
+ function writeRunningThenCompleteExecution(...args) {
1056
+ return executionCommand().writeRunningThenCompleteExecution(...args);
1057
+ }
1058
+ function safetyFlag(...args) {
1059
+ return executionCommand().safetyFlag(...args);
1060
+ }
1061
+ function runExecute(...args) {
1062
+ return executionCommand().runExecute(...args);
1063
+ }
1064
+ function executionsAuditEnvelope(...args) {
1065
+ return executionCommand().executionsAuditEnvelope(...args);
1066
+ }
1067
+ function runExecutions(...args) {
1068
+ return executionCommand().runExecutions(...args);
1069
+ }
1070
+ function runActions(...args) {
1071
+ return executionCommand().runActions(...args);
1072
+ }
1073
+ function policyAuditEnvelope(...args) {
1074
+ return executionCommand().policyAuditEnvelope(...args);
1075
+ }
1076
+ function runPolicies(...args) {
1077
+ return executionCommand().runPolicies(...args);
1078
+ }
1079
+
1080
+ let runtimeLeaseCommand;
1081
+ function leaseCommand() {
1082
+ if (!runtimeLeaseCommand) throw new Error('runtime lease command is not initialized');
1083
+ return runtimeLeaseCommand;
1084
+ }
1085
+ function listSchedulerLeaseFiles(...args) {
1086
+ return leaseCommand().listSchedulerLeaseFiles(...args);
1087
+ }
1088
+ function schedulerLeasePath(...args) {
1089
+ return leaseCommand().schedulerLeasePath(...args);
1090
+ }
1091
+ function leaseSummaryFromLock(...args) {
1092
+ return leaseCommand().leaseSummaryFromLock(...args);
1093
+ }
1094
+ function leaseSummaryFromExecution(...args) {
1095
+ return leaseCommand().leaseSummaryFromExecution(...args);
1096
+ }
1097
+ function leaseAuditEnvelope(...args) {
1098
+ return leaseCommand().leaseAuditEnvelope(...args);
1099
+ }
1100
+ function validateLeaseItem(...args) {
1101
+ return leaseCommand().validateLeaseItem(...args);
1102
+ }
1103
+ function activeSchedulerLease(...args) {
1104
+ return leaseCommand().activeSchedulerLease(...args);
1105
+ }
1106
+ function writeSchedulerLease(...args) {
1107
+ return leaseCommand().writeSchedulerLease(...args);
1108
+ }
1109
+ function completeSchedulerLease(...args) {
1110
+ return leaseCommand().completeSchedulerLease(...args);
1111
+ }
1112
+ function runLeases(...args) {
1113
+ return leaseCommand().runLeases(...args);
1114
+ }
1115
+
1116
+ let runtimeQueueCommand;
1117
+ function queueCommand() {
1118
+ if (!runtimeQueueCommand) throw new Error('runtime queue command is not initialized');
1119
+ return runtimeQueueCommand;
1120
+ }
1121
+ function listQueueFiles(...args) {
1122
+ return queueCommand().listQueueFiles(...args);
1123
+ }
1124
+ function queueSnapshotPath(...args) {
1125
+ return queueCommand().queueSnapshotPath(...args);
1126
+ }
1127
+ function queueScanEnvelope(...args) {
1128
+ return queueCommand().queueScanEnvelope(...args);
1129
+ }
1130
+ function validateQueueArtifact(...args) {
1131
+ return queueCommand().validateQueueArtifact(...args);
1132
+ }
1133
+ function writeQueueSnapshot(...args) {
1134
+ return queueCommand().writeQueueSnapshot(...args);
1135
+ }
1136
+ function queueAuditEnvelope(...args) {
1137
+ return queueCommand().queueAuditEnvelope(...args);
1138
+ }
1139
+ function categorizeQueueBlockedItem(...args) {
1140
+ return queueCommand().categorizeQueueBlockedItem(...args);
1141
+ }
1142
+ function runQueue(...args) {
1143
+ return queueCommand().runQueue(...args);
1144
+ }
1145
+
1146
+ let runtimeRecoveryCommand;
1147
+ let runtimeRetryCommand;
1148
+ let runtimeObservabilityCommand;
1149
+ function recoveryCommand() {
1150
+ if (!runtimeRecoveryCommand) throw new Error('runtime recovery command is not initialized');
1151
+ return runtimeRecoveryCommand;
1152
+ }
1153
+ function listRecoveryClassificationFiles(...args) {
1154
+ return recoveryCommand().listRecoveryClassificationFiles(...args);
1155
+ }
1156
+ function listRecoveryRunFiles(...args) {
1157
+ return recoveryCommand().listRecoveryRunFiles(...args);
1158
+ }
1159
+ function recoveryPackagePath(...args) {
1160
+ return recoveryCommand().recoveryPackagePath(...args);
1161
+ }
1162
+ function recoveryEnvelope(...args) {
1163
+ return recoveryCommand().recoveryEnvelope(...args);
1164
+ }
1165
+ function validateRecoveryArtifact(...args) {
1166
+ return recoveryCommand().validateRecoveryArtifact(...args);
1167
+ }
1168
+ function writeRecoveryPackage(...args) {
1169
+ return recoveryCommand().writeRecoveryPackage(...args);
1170
+ }
1171
+ function recoveryClassificationPath(...args) {
1172
+ return recoveryCommand().recoveryClassificationPath(...args);
1173
+ }
1174
+ function recoveryRunPath(...args) {
1175
+ return recoveryCommand().recoveryRunPath(...args);
1176
+ }
1177
+ function recoveryPolicySnapshot(...args) {
1178
+ return recoveryCommand().recoveryPolicySnapshot(...args);
1179
+ }
1180
+ function recoveryActionCatalogSnapshot(...args) {
1181
+ return recoveryCommand().recoveryActionCatalogSnapshot(...args);
1182
+ }
1183
+ function recoverySafety(...args) {
1184
+ return recoveryCommand().recoverySafety(...args);
1185
+ }
1186
+ function recoveryFinding(...args) {
1187
+ return recoveryCommand().recoveryFinding(...args);
1188
+ }
1189
+ function sourcePathForRecoveryFinding(...args) {
1190
+ return recoveryCommand().sourcePathForRecoveryFinding(...args);
1191
+ }
1192
+ function schedulerLeaseFindings(...args) {
1193
+ return recoveryCommand().schedulerLeaseFindings(...args);
1194
+ }
1195
+ function recoveryClassificationEnvelope(...args) {
1196
+ return recoveryCommand().recoveryClassificationEnvelope(...args);
1197
+ }
1198
+ function validateRecoveryPolicySnapshot(...args) {
1199
+ return recoveryCommand().validateRecoveryPolicySnapshot(...args);
1200
+ }
1201
+ function validateRecoveryActionCatalogSnapshot(...args) {
1202
+ return recoveryCommand().validateRecoveryActionCatalogSnapshot(...args);
1203
+ }
1204
+ function validateRecoveryClassificationArtifact(...args) {
1205
+ return recoveryCommand().validateRecoveryClassificationArtifact(...args);
1206
+ }
1207
+ function writeRecoveryClassification(...args) {
1208
+ return recoveryCommand().writeRecoveryClassification(...args);
1209
+ }
1210
+ function recoveryClassificationAuditEnvelope(...args) {
1211
+ return recoveryCommand().recoveryClassificationAuditEnvelope(...args);
1212
+ }
1213
+ function selectRecoveryFinding(...args) {
1214
+ return recoveryCommand().selectRecoveryFinding(...args);
1215
+ }
1216
+ function recoveryRunAlreadyApplied(...args) {
1217
+ return recoveryCommand().recoveryRunAlreadyApplied(...args);
1218
+ }
1219
+ function recoveryApplyEnvelopeFromClassification(...args) {
1220
+ return recoveryCommand().recoveryApplyEnvelopeFromClassification(...args);
1221
+ }
1222
+ function recoveryApplyEnvelope(...args) {
1223
+ return recoveryCommand().recoveryApplyEnvelope(...args);
1224
+ }
1225
+ function writeRecoveryApply(...args) {
1226
+ return recoveryCommand().writeRecoveryApply(...args);
1227
+ }
1228
+ function printRecoveryClassification(...args) {
1229
+ return recoveryCommand().printRecoveryClassification(...args);
1230
+ }
1231
+ function printRecoveryClassificationAudit(...args) {
1232
+ return recoveryCommand().printRecoveryClassificationAudit(...args);
1233
+ }
1234
+ function printRecoveryApply(...args) {
1235
+ return recoveryCommand().printRecoveryApply(...args);
1236
+ }
1237
+ function printRecovery(...args) {
1238
+ return recoveryCommand().printRecovery(...args);
1239
+ }
1240
+ function recoveryAuditEnvelope(...args) {
1241
+ return recoveryCommand().recoveryAuditEnvelope(...args);
1242
+ }
1243
+ function printRecoveryAudit(...args) {
1244
+ return recoveryCommand().printRecoveryAudit(...args);
1245
+ }
1246
+ function runRecovery(...args) {
1247
+ return recoveryCommand().runRecovery(...args);
1248
+ }
1249
+
1250
+ function retryCommand() {
1251
+ if (!runtimeRetryCommand) throw new Error('runtime retry command is not initialized');
1252
+ return runtimeRetryCommand;
1253
+ }
1254
+ function listRetryPackageFiles(...args) {
1255
+ return retryCommand().listRetryPackageFiles(...args);
1256
+ }
1257
+ function listRetryRunFiles(...args) {
1258
+ return retryCommand().listRetryRunFiles(...args);
1259
+ }
1260
+ function retryHealthSummary(...args) {
1261
+ return retryCommand().retryHealthSummary(...args);
1262
+ }
1263
+ function retryPolicySnapshot(...args) {
1264
+ return retryCommand().retryPolicySnapshot(...args);
1265
+ }
1266
+ function retryBudgetSnapshot(...args) {
1267
+ return retryCommand().retryBudgetSnapshot(...args);
1268
+ }
1269
+ function retryRunPath(...args) {
1270
+ return retryCommand().retryRunPath(...args);
1271
+ }
1272
+ function retryRunAlreadyApplied(...args) {
1273
+ return retryCommand().retryRunAlreadyApplied(...args);
1274
+ }
1275
+ function validateRetryPackageArtifact(...args) {
1276
+ return retryCommand().validateRetryPackageArtifact(...args);
1277
+ }
1278
+ function retryGateEnvelope(...args) {
1279
+ return retryCommand().retryGateEnvelope(...args);
1280
+ }
1281
+ function writeRetryRun(...args) {
1282
+ return retryCommand().writeRetryRun(...args);
1283
+ }
1284
+ function retryPackageAuditEnvelope(...args) {
1285
+ return retryCommand().retryPackageAuditEnvelope(...args);
1286
+ }
1287
+ function printRetry(...args) {
1288
+ return retryCommand().printRetry(...args);
1289
+ }
1290
+ function printRetryPackageAudit(...args) {
1291
+ return retryCommand().printRetryPackageAudit(...args);
1292
+ }
1293
+ function runRetry(...args) {
1294
+ return retryCommand().runRetry(...args);
1295
+ }
1296
+
1297
+ function observabilityCommand() {
1298
+ if (!runtimeObservabilityCommand) throw new Error('runtime observability command is not initialized');
1299
+ return runtimeObservabilityCommand;
1300
+ }
1301
+ function readinessEnvelope(...args) {
1302
+ return observabilityCommand().readinessEnvelope(...args);
1303
+ }
1304
+ function loopHealthSummary(...args) {
1305
+ return observabilityCommand().loopHealthSummary(...args);
1306
+ }
1307
+ function replyHealthSummary(...args) {
1308
+ return observabilityCommand().replyHealthSummary(...args);
1309
+ }
1310
+ function traceHealthSummary(...args) {
1311
+ return observabilityCommand().traceHealthSummary(...args);
1312
+ }
1313
+ function validateObservabilityArtifact(...args) {
1314
+ return observabilityCommand().validateObservabilityArtifact(...args);
1315
+ }
1316
+ function writeObservabilitySnapshot(...args) {
1317
+ return observabilityCommand().writeObservabilitySnapshot(...args);
1318
+ }
1319
+ function printObservability(...args) {
1320
+ return observabilityCommand().printObservability(...args);
1321
+ }
1322
+ function runObservability(...args) {
1323
+ return observabilityCommand().runObservability(...args);
1324
+ }
1325
+
1326
+ let runtimeGovernanceCommand;
1327
+ function governanceCommand() {
1328
+ if (!runtimeGovernanceCommand) throw new Error('runtime governance command is not initialized');
1329
+ return runtimeGovernanceCommand;
1330
+ }
1331
+ function listGovernanceFiles(...args) {
1332
+ return governanceCommand().listGovernanceFiles(...args);
1333
+ }
1334
+ function governanceEnvelope(...args) {
1335
+ return governanceCommand().governanceEnvelope(...args);
1336
+ }
1337
+ function validateGovernanceArtifact(...args) {
1338
+ return governanceCommand().validateGovernanceArtifact(...args);
1339
+ }
1340
+ function governanceConvergenceEnvelope(...args) {
1341
+ return governanceCommand().governanceConvergenceEnvelope(...args);
1342
+ }
1343
+ function runtimeSurfaceEnvelope(...args) {
1344
+ return governanceCommand().runtimeSurfaceEnvelope(...args);
1345
+ }
1346
+ // Stage 81 contract marker: governance --advice is read-only.
1347
+ function governanceAdviceEnvelope(...args) {
1348
+ return governanceCommand().governanceAdviceEnvelope(...args);
1349
+ }
1350
+ function localDirectoryWithinRoot(...args) {
1351
+ return governanceCommand().localDirectoryWithinRoot(...args);
1352
+ }
1353
+ function sourceDescriptor(...args) {
1354
+ return governanceCommand().sourceDescriptor(...args);
1355
+ }
1356
+ function runGovernance(...args) {
1357
+ return governanceCommand().runGovernance(...args);
1358
+ }
1359
+
1360
+ function listStateFiles(root, directory, extension) {
1361
+ const resolved = directory(root);
1362
+ if (!fs.existsSync(resolved)) return [];
1363
+ return fs.readdirSync(resolved, { withFileTypes: true })
1364
+ .filter((entry) => entry.isFile())
1365
+ .map((entry) => entry.name)
1366
+ .filter((name) => name.endsWith(extension))
1367
+ .sort();
1368
+ }
1369
+
1370
+ function latestStateFile(root, directory, extension) {
1371
+ const files = listStateFiles(root, directory, extension);
1372
+ return files.length > 0 ? files[files.length - 1] : '';
1373
+ }
1374
+
1375
+
1376
+ const runtimeWorkflowStateHelpers = createRuntimeWorkflowStateHelpers({
1377
+ fs,
1378
+ path,
1379
+ process,
1380
+ ensureRoot,
1381
+ workflowPath,
1382
+ readWorkflow,
1383
+ writeWorkflow,
1384
+ writeJsonEnvelope,
1385
+ artifactFileNames,
1386
+ taskArtifactFileNames,
1387
+ stateDirectoryName,
1388
+ taskArtifactsDirectoryName,
1389
+ allowedStatuses,
1390
+ allowedTaskStatuses,
1391
+ allowedReviewStatuses,
1392
+ taskIdRequirement,
1393
+ validateTaskId,
1394
+ });
1395
+ const {
1396
+ asList,
1397
+ validateState,
1398
+ normalizeTasks,
1399
+ workflowSummary,
1400
+ tasksFromState,
1401
+ jsonTaskSummaries,
1402
+ scalarValue,
1403
+ collectList,
1404
+ readinessCounts,
1405
+ taskSummaryStatus,
1406
+ taskReadinessDetails,
1407
+ taskReadinessSummaryLine,
1408
+ taskReadinessMap,
1409
+ reviewSummaryStatus,
1410
+ reviewSummaryLine,
1411
+ parseHandoffFile,
1412
+ runStatus,
1413
+ runValidateHandoff,
1414
+ runRecordHandoff,
1415
+ printWorkflow,
1416
+ handoffQuality,
1417
+ printHandoffQuality,
1418
+ nextAdvice,
1419
+ markdownList,
1420
+ generateArtifacts,
1421
+ generateTaskArtifacts,
1422
+ filterTaskArtifacts,
1423
+ } = runtimeWorkflowStateHelpers;
1424
+
1425
+ const runtimeHooksCommand = createRuntimeHooksCommand({
1426
+ jsonSchemaVersion,
1427
+ stateDirectoryName,
1428
+ workflowFileName,
1429
+ hookRunsDirectoryName,
1430
+ hookHeartbeatsDirectoryName,
1431
+ ensureRoot,
1432
+ stateDirectory,
1433
+ workflowPath,
1434
+ fileDigest,
1435
+ digestObject,
1436
+ validateCommonArtifactSafety,
1437
+ writeStateArtifact,
1438
+ writeJsonEnvelope,
1439
+ printList,
1440
+ readJsonArtifact,
1441
+ listStateFiles,
1442
+ hookIntentsDirectory,
1443
+ hookRunsDirectory,
1444
+ hookHeartbeatsDirectory,
1445
+ hookIntentFilePath,
1446
+ hookRunFilePath,
1447
+ hookHeartbeatFilePath,
1448
+ });
1449
+ const {
1450
+ runHooks,
1451
+ listHookRunFiles,
1452
+ validateHookIntentArtifact,
1453
+ validateHookRunArtifact,
1454
+ } = runtimeHooksCommand;
1455
+
1456
+ const runtimePlatformCommand = createRuntimePlatformCommand({
1457
+ jsonSchemaVersion,
1458
+ stateDirectoryName,
1459
+ platformSessionApprovalsDirectoryName,
1460
+ platformSessionsDirectoryName,
1461
+ platformSessionLeasesDirectoryName,
1462
+ platformSessionResultsDirectoryName,
1463
+ platformSessionIntakeDirectoryName,
1464
+ platformSessionReviewsDirectoryName,
1465
+ ensureRoot,
1466
+ stateDirectory,
1467
+ workflowPath,
1468
+ fileDigest,
1469
+ digestObject,
1470
+ writeStateArtifact,
1471
+ writeJsonEnvelope,
1472
+ printList,
1473
+ readJsonArtifact,
1474
+ listStateFiles,
1475
+ platformCapabilitiesDirectory,
1476
+ platformSessionApprovalsDirectory,
1477
+ platformSessionsDirectory,
1478
+ platformSessionLeasesDirectory,
1479
+ platformSessionResultsDirectory,
1480
+ platformSessionCancellationsDirectory,
1481
+ platformSessionIntakeDirectory,
1482
+ platformSessionReviewsDirectory,
1483
+ platformCapabilityFilePath,
1484
+ platformSessionApprovalFilePath,
1485
+ platformSessionFilePath,
1486
+ platformSessionLeaseFilePath,
1487
+ platformSessionResultFilePath,
1488
+ platformSessionCancellationFilePath,
1489
+ platformSessionIntakeFilePath,
1490
+ platformSessionReviewFilePath,
1491
+ subagentDispatchFilePath,
1492
+ validateSubagentDispatchArtifact: (...args) => validateSubagentDispatchArtifact(...args),
1493
+ });
1494
+ const {
1495
+ platformCapabilityCatalog,
1496
+ validatePlatformCapabilityArtifact,
1497
+ runPlatforms,
1498
+ platformSessionApprovalSnapshotPath,
1499
+ listPlatformSessionApprovalFiles,
1500
+ platformSessionApprovalEnvelope,
1501
+ validatePlatformSessionApprovalArtifact,
1502
+ writePlatformSessionApproval,
1503
+ printPlatformSessionApproval,
1504
+ printPlatformSession,
1505
+ printPlatformSessionCancel,
1506
+ listPlatformSessionFiles,
1507
+ listPlatformSessionLeaseFiles,
1508
+ listPlatformSessionResultFiles,
1509
+ listPlatformSessionCancellationFiles,
1510
+ platformSessionEnvelope,
1511
+ validatePlatformSessionArtifact,
1512
+ writePlatformSession,
1513
+ platformSessionCancelEnvelope,
1514
+ validatePlatformSessionCancelArtifact,
1515
+ writePlatformSessionCancel,
1516
+ platformSessionIntakeSnapshotPath,
1517
+ platformSessionReviewSnapshotPath,
1518
+ listPlatformSessionIntakeFiles,
1519
+ listPlatformSessionReviewFiles,
1520
+ platformSessionResultIntakeEnvelope,
1521
+ validatePlatformSessionIntakeArtifact,
1522
+ writePlatformSessionIntake,
1523
+ platformSessionReviewEnvelope,
1524
+ validatePlatformSessionReviewArtifact,
1525
+ writePlatformSessionReview,
1526
+ printPlatformSessionResultReview,
1527
+ } = runtimePlatformCommand;
1528
+
1529
+
1530
+ const runtimeSubagentsCommand = createRuntimeSubagentsCommand({
1531
+ jsonSchemaVersion,
1532
+ stateDirectoryName,
1533
+ subagentEligibilityDirectoryName,
1534
+ subagentDispatchesDirectoryName,
1535
+ subagentAdapterDispatchesDirectoryName,
1536
+ schedulerRunsDirectoryName,
1537
+ subagentRunLeasesDirectoryName,
1538
+ subagentRunResultsDirectoryName,
1539
+ subagentResultsDirectoryName,
1540
+ subagentReviewsDirectoryName,
1541
+ ensureRoot,
1542
+ workflowPath,
1543
+ readWorkflow,
1544
+ validateState,
1545
+ tasksFromState,
1546
+ asList,
1547
+ validateTaskId,
1548
+ fileDigest,
1549
+ digestObject,
1550
+ validateCommonArtifactSafety,
1551
+ readJsonArtifact,
1552
+ writeStateArtifact,
1553
+ writeJsonEnvelope,
1554
+ listStateFiles,
1555
+ printList,
1556
+ subagentEligibilityDirectory,
1557
+ subagentDispatchesDirectory,
1558
+ subagentAdapterDispatchesDirectory,
1559
+ schedulerRunsDirectory,
1560
+ subagentRunLeasesDirectory,
1561
+ subagentRunResultsDirectory,
1562
+ subagentResultsDirectory,
1563
+ subagentReviewsDirectory,
1564
+ subagentEligibilityFilePath,
1565
+ subagentDispatchFilePath,
1566
+ subagentAdapterDispatchFilePath,
1567
+ subagentRunLeaseFilePath,
1568
+ subagentRunResultFilePath,
1569
+ subagentResultFilePath,
1570
+ subagentReviewFilePath,
1571
+ schedulerHookPlanFilePath,
1572
+ validateSchedulerHookPlanArtifact,
1573
+ safeStateArtifactFilePath,
1574
+ orchestratorDispatchPlanFilePath,
1575
+ validateOrchestratorArtifact: (...args) => validateOrchestratorArtifact(...args),
1576
+ platformCapabilityFilePath,
1577
+ validatePlatformCapabilityArtifact,
1578
+ getPlatformCommand: () => runtimePlatformCommand,
1579
+ });
1580
+ const {
1581
+ subagentEligibilityGateIds,
1582
+ subagentEligibilityRequiredEvidence,
1583
+ orchestratorDispatchTargetForTask,
1584
+ subagentEligibilityBridgeGateResults,
1585
+ listSubagentDispatchFiles,
1586
+ listSubagentResultFiles,
1587
+ listSubagentReviewFiles,
1588
+ validateSubagentDispatchArtifact,
1589
+ validateSubagentSingleShotRunArtifact,
1590
+ validateSubagentResultArtifact,
1591
+ validateSubagentReviewArtifact,
1592
+ runSubagents,
1593
+ } = runtimeSubagentsCommand;
1594
+
1595
+ const runtimeSddLoopCommand = createRuntimeSddLoopCommand({
1596
+ ensureRoot,
1597
+ writeJsonEnvelope,
1598
+ spawnSync,
1599
+ });
1600
+ const { runSdd } = runtimeSddLoopCommand;
1601
+
1602
+ const runtimeWorkspaceCommand = createRuntimeWorkspaceCommand({
1603
+ ensureRoot,
1604
+ writeJsonEnvelope,
1605
+ });
1606
+ const { runWorkspace } = runtimeWorkspaceCommand;
1607
+
1608
+ const {
1609
+ runtimePolicyCatalogSnapshot,
1610
+ runtimePolicyCatalogDigest,
1611
+ validateRuntimePolicyCatalogDigest,
1612
+ validateRuntimePolicyCatalog,
1613
+ } = createRuntimePolicyCatalog({
1614
+ digestObject,
1615
+ plannerAllowedWorkflows: plannerAllowedWorkflowsForPolicy,
1616
+ platformCapabilityCatalog,
1617
+ evalCatalogDefinition: (...args) => evalCatalogDefinition(...args),
1618
+ });
1619
+
1620
+ const runtimeControlPlane = createRuntimeControlPlaneCommands({
1621
+ jsonSchemaVersion,
1622
+ stateDirectoryName,
1623
+ plannerRoutesDirectoryName,
1624
+ plannerPlansDirectoryName,
1625
+ plannerBriefsDirectoryName,
1626
+ routerPlansDirectoryName,
1627
+ routerApprovalsDirectoryName,
1628
+ orchestratorPlansDirectoryName,
1629
+ orchestratorDispatchPlansDirectoryName,
1630
+ evalSuitesDirectoryName,
1631
+ evalRunsDirectoryName,
1632
+ evalReportsDirectoryName,
1633
+ releaseGatesDirectoryName,
1634
+ releaseNotesDirectoryName,
1635
+ feedbackLedgersDirectoryName,
1636
+ hookIntentsDirectoryName,
1637
+ runtimeTracesDirectoryName,
1638
+ governanceDirectoryName,
1639
+ methodologyGatesDirectoryName,
1640
+ orchestratorDispatchTargetForTask,
1641
+ subagentEligibilityBridgeGateResults,
1642
+ subagentEligibilityGateIds,
1643
+ subagentEligibilityRequiredEvidence,
1644
+ ensureRoot,
1645
+ localJsonFileWithinRoot,
1646
+ stateDirectory,
1647
+ workflowPath,
1648
+ readWorkflow,
1649
+ workflowSummary,
1650
+ listStateFiles,
1651
+ latestStateFile,
1652
+ fileDigest, readJsonArtifact,
1653
+ digestObject,
1654
+ validateCommonArtifactSafety,
1655
+ runtimeTraceGroup,
1656
+ validateRuntimePolicyCatalogDigest,
1657
+ runtimePolicyCatalogDigest,
1658
+ platformCapabilityCatalog, governanceConvergenceEnvelope, workflowLoopContractEnvelope: (...args) => workflowLoopContractEnvelope(...args), runtimeAutomationReadinessCommandEnvelope, runtimeCapabilityRegistry, runtimePlanActionManifest, runtimePlanActionManifestDigestPayload, digestPlanActionManifest, runtimeExecutablePlanContract, runtimeExecutablePlanContractDigestPayload, digestExecutablePlanContract, runtimeSelfTestGateProfile, runtimeSelfTestGateProfileDigestPayload, digestSelfTestGateProfile, runtimeCommitReadinessEnvelope, runtimeCommitReadinessDigestPayload, digestCommitReadiness, runtimeStagedCommitReadiness, runtimeStagedCommitReadinessDigestPayload, digestStagedCommitReadiness, runtimeEvidenceIntakeEnvelope, runtimeEvidenceIntakeDigestPayload, digestEvidenceIntake, runtimeExecutionEvidenceBinder, runtimeExecutionEvidenceDigestPayload, digestExecutionEvidenceBinding, runtimeTddTraceContract, runtimeTddTraceDigestPayload, digestTddTraceContract, buildVerificationDrivenRepairLoopPlan, printVerificationDrivenRepairLoopPlan, runtimeReviewIntakeEnvelope, runtimeReviewIntakeDigestPayload, runtimeReviewResolutionEnvelope, runtimeReviewResolutionDigestPayload, digestReviewEnvelope, runtimeDiffCoverageEnvelope, runtimeDiffCoverageDigestPayload, digestDiffCoverage,
1659
+ validateHookIntentArtifact,
1660
+ hookIntentFilePath,
1661
+ plannerRouteFilePath,
1662
+ plannerPlanFilePath,
1663
+ plannerBriefsFilePath,
1664
+ routerPlanFilePath,
1665
+ routerApprovalFilePath,
1666
+ orchestratorPlanFilePath,
1667
+ orchestratorDispatchPlanFilePath,
1668
+ evalSuiteFilePath,
1669
+ evalRunFilePath,
1670
+ evalReportFilePath,
1671
+ releaseGateFilePath,
1672
+ releaseNotesFilePath,
1673
+ feedbackLedgerFilePath, plannerRouteSnapshotPath, plannerPlanSnapshotPath, plannerBriefsSnapshotPath, routerPlanSnapshotPath, routerApprovalSnapshotPath, orchestratorPlanSnapshotPath, orchestratorDispatchPlanSnapshotPath, evalSuiteSnapshotPath, evalRunSnapshotPath, evalReportSnapshotPath, releaseGateSnapshotPath, releaseNotesSnapshotPath, feedbackLedgerSnapshotPath,
1674
+ plannerRoutesDirectory,
1675
+ plannerPlansDirectory,
1676
+ plannerBriefsDirectory,
1677
+ routerPlansDirectory,
1678
+ routerApprovalsDirectory,
1679
+ orchestratorPlansDirectory,
1680
+ orchestratorDispatchPlansDirectory,
1681
+ evalSuitesDirectory,
1682
+ evalRunsDirectory,
1683
+ evalReportsDirectory,
1684
+ releaseGatesDirectory,
1685
+ releaseNotesDirectory,
1686
+ feedbackLedgersDirectory,
1687
+ runtimeTracesDirectory,
1688
+ governanceDirectory,
1689
+ methodologyGatesDirectory,
1690
+ writeStateArtifact,
1691
+ writeJsonEnvelope,
1692
+ printList,
1693
+ runtimeBehavioralEvaluationContract,
1694
+ runtimeSuperpowersStyleEvalPack,
1695
+ runtimeSuperpowersStyleEvalPackDigestPayload,
1696
+ digestSuperpowersStyleEvalPack,
1697
+ });
1698
+ const {
1699
+ runPlanner,
1700
+ runRouter,
1701
+ runOrchestrator,
1702
+ runVerification,
1703
+ runReview,
1704
+ runRelease,
1705
+ releaseCommandDeps,
1706
+ runFeedback,
1707
+ runEvals, plannerAllowedWorkflows, evalCatalogDefinition, localTextEvidenceDescriptor, planLintEnvelope, planActionManifestEnvelope, selfTestGateProfileEnvelope, commitReadinessEnvelope, evidenceIntakeEnvelope, diffCoverageEnvelope, reviewIntakeEnvelope, tddTraceEnvelope, validateReleaseGateArtifact,
1708
+ validatePlannerArtifact,
1709
+ validateRouterArtifact,
1710
+ validateOrchestratorArtifact,
1711
+ validateEvalArtifact,
1712
+ validateFeedbackLedgerArtifact,
1713
+ } = runtimeControlPlane;
1714
+ function currentGitHead(root) {
1715
+ const headPath = path.join(root, '.git', 'HEAD');
1716
+ if (!fs.existsSync(headPath)) return 'no-git-head';
1717
+ const head = fs.readFileSync(headPath, 'utf8').trim();
1718
+ if (!head.startsWith('ref: ')) return head || 'empty-git-head';
1719
+ const refPath = path.join(root, '.git', head.slice(5).trim());
1720
+ if (!fs.existsSync(refPath)) return head;
1721
+ return fs.readFileSync(refPath, 'utf8').trim() || head;
1722
+ }
1723
+
1724
+ function parseIsoTimestamp(value) {
1725
+ if (typeof value !== 'string' || value.trim() === '') return NaN;
1726
+ const time = Date.parse(value);
1727
+ return Number.isNaN(time) ? NaN : time;
1728
+ }
1729
+
1730
+ function taskDirectory(root, taskId) {
1731
+ validateTaskId(taskId);
1732
+ return path.join(taskArtifactsDirectory(root), taskId);
1733
+ }
1734
+
1735
+ function taskArtifactPath(root, taskId, fileName) {
1736
+ return path.join(taskDirectory(root, taskId), fileName);
1737
+ }
1738
+
1739
+ function readWorkflow(root) {
1740
+ const file = workflowPath(root);
1741
+ if (!fs.existsSync(file)) return null;
1742
+ return JSON.parse(fs.readFileSync(file, 'utf8'));
1743
+ }
1744
+
1745
+ function writeWorkflow(root, state) {
1746
+ const directory = stateDirectory(root);
1747
+ fs.mkdirSync(directory, { recursive: true });
1748
+ fs.writeFileSync(workflowPath(root), `${JSON.stringify(state, null, 2)}\n`, 'utf8');
1749
+ }
1750
+
1751
+ function writeJsonEnvelope(command, payload) {
1752
+ console.log(JSON.stringify({ schema_version: jsonSchemaVersion, command, ...payload }, null, 2));
1753
+ }
1754
+
1755
+ function hasActualStopCondition(value) {
1756
+ const stopCondition = String(value || '').trim();
1757
+ return stopCondition !== '' && stopCondition.toLowerCase() !== 'none';
1758
+ }
1759
+
1760
+ function validateCommonArtifactSafety(safety, expectedStage) {
1761
+ const failures = [];
1762
+ if (safety?.stage !== expectedStage) failures.push(`safety.stage must be ${expectedStage}`);
1763
+ for (const key of ['runtime_action', 'auto_execution', 'platform_api', 'skill_execution', 'business_source_write', 'subagent', 'mcp', 'daemon', 'git', 'worktree', 'dispatch_event_modified', 'claim_modified']) {
1764
+ if (safety?.[key] !== false) failures.push(`safety.${key} must be false`);
1765
+ }
1766
+ return failures;
1767
+ }
1768
+
1769
+ function listSchedulerPlanFiles(root) {
1770
+ const directory = schedulerPlansDirectory(root);
1771
+ if (!fs.existsSync(directory)) return [];
1772
+ return fs.readdirSync(directory, { withFileTypes: true })
1773
+ .filter((entry) => entry.isFile())
1774
+ .map((entry) => entry.name)
1775
+ .filter((name) => name.endsWith('.scheduler-plan.json'))
1776
+ .sort();
1777
+ }
1778
+
1779
+ function listSchedulerHookPlanFiles(root) {
1780
+ return listStateFiles(root, schedulerHookPlansDirectory, '.scheduler-hook-plan.json');
1781
+ }
1782
+
1783
+ function listDaemonLoopFiles(root) {
1784
+ return listStateFiles(root, daemonLoopsDirectory, '.daemon-loop.json');
1785
+ }
1786
+
1787
+ function listReplyDraftFiles(root) {
1788
+ return listStateFiles(root, replyDraftsDirectory, '.reply-draft.json');
1789
+ }
1790
+
1791
+ function listReplyReviewFiles(root) {
1792
+ return listStateFiles(root, replyReviewsDirectory, '.reply-review.json');
1793
+ }
1794
+
1795
+ function listReplyApprovalFiles(root) {
1796
+ return listStateFiles(root, replyApprovalsDirectory, '.reply-approval.json');
1797
+ }
1798
+
1799
+ function listReplyOutboxFiles(root) {
1800
+ return listStateFiles(root, replyOutboxDirectory, '.reply-outbox.json');
1801
+ }
1802
+
1803
+ function listReplySendRunFiles(root) {
1804
+ return listStateFiles(root, replySendRunsDirectory, '.reply-send-run.json');
1805
+ }
1806
+
1807
+ let runtimeTraceCommand;
1808
+ function traceCommand() {
1809
+ if (!runtimeTraceCommand) throw new Error('runtime trace command is not initialized');
1810
+ return runtimeTraceCommand;
1811
+ }
1812
+ function runtimeTraceSnapshotPath(...args) {
1813
+ return traceCommand().runtimeTraceSnapshotPath(...args);
1814
+ }
1815
+ function runtimeTraceGroups(...args) {
1816
+ return traceCommand().runtimeTraceGroups(...args);
1817
+ }
1818
+ function runtimeTraceGroup(...args) {
1819
+ return traceCommand().runtimeTraceGroup(...args);
1820
+ }
1821
+ function runtimeTraceReferences(...args) {
1822
+ return traceCommand().runtimeTraceReferences(...args);
1823
+ }
1824
+ function runtimeTraceEnvelope(...args) {
1825
+ return traceCommand().runtimeTraceEnvelope(...args);
1826
+ }
1827
+ function validateRuntimeTraceArtifact(...args) {
1828
+ return traceCommand().validateRuntimeTraceArtifact(...args);
1829
+ }
1830
+ function writeRuntimeTrace(...args) {
1831
+ return traceCommand().writeRuntimeTrace(...args);
1832
+ }
1833
+ function runtimeTraceAuditEnvelope(...args) {
1834
+ return traceCommand().runtimeTraceAuditEnvelope(...args);
1835
+ }
1836
+ function printRuntimeTrace(...args) {
1837
+ return traceCommand().printRuntimeTrace(...args);
1838
+ }
1839
+ function runTraces(...args) {
1840
+ return traceCommand().runTraces(...args);
1841
+ }
1842
+
1843
+ function observabilitySnapshotPath(root) {
1844
+ const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
1845
+ return path.join(observabilityDirectory(root), `${timestamp}.observability.json`);
1846
+ }
1847
+
1848
+ function runtimeAutomationReadinessEnvelope(root) {
1849
+ return runtimeAutomationReadinessCommandEnvelope(root, { digestObject });
1850
+ }
1851
+
1852
+ function confirmedOneShotPlanEnvelope(root, planFile, { intent = 'implementation', subject = '', confirmPlan = '' } = {}) {
1853
+ return confirmedOneShotPlanCommandEnvelope(root, planFile, { intent, subject, confirmPlan }, { commitReadinessEnvelope, digestObject });
1854
+ }
1855
+
1856
+ function runAutomation(options) {
1857
+ return runAutomationCommand(options, {
1858
+ writeJsonEnvelope,
1859
+ localTextEvidenceDescriptor,
1860
+ commitReadinessEnvelope,
1861
+ workflowStartEnvelope,
1862
+ tokenSaviorBudgetEnvelope,
1863
+ learningAdviceEnvelope,
1864
+ digestObject,
1865
+ });
1866
+ }
1867
+
1868
+ function nextActionConsoleEnvelope(root, { frictionFile = '', runbookFile = '', evidenceFile = '' } = {}) {
1869
+ ensureRoot(root);
1870
+ const frictionInput = localJsonFileWithinRoot(root, frictionFile, 'workflow --next-action-console --from-friction');
1871
+ const runbookInput = runbookFile ? localJsonFileWithinRoot(root, runbookFile, 'workflow --next-action-console --from-runbook') : null;
1872
+ const evidenceInput = evidenceFile ? localJsonFileWithinRoot(root, evidenceFile, 'workflow --next-action-console --from-evidence') : null;
1873
+ const base = runtimeNextActionConsole({
1874
+ friction: frictionInput.data,
1875
+ runbook: runbookInput?.data || null,
1876
+ evidence: evidenceInput?.data || null,
1877
+ source: {
1878
+ friction_file: frictionInput.relative,
1879
+ friction_digest: frictionInput.digest,
1880
+ runbook_file: runbookInput?.relative || '',
1881
+ runbook_digest: runbookInput?.digest || '',
1882
+ evidence_file: evidenceInput?.relative || '',
1883
+ evidence_digest: evidenceInput?.digest || '',
1884
+ },
1885
+ });
1886
+ const console = {
1887
+ ...base,
1888
+ console_digest: digestNextActionConsole(runtimeNextActionConsoleDigestPayload(base)),
1889
+ };
1890
+ return {
1891
+ mode: 'one-screen-next-action-console',
1892
+ ok: console.ok,
1893
+ state_present: fs.existsSync(stateDirectory(root)),
1894
+ next_action_console: console,
1895
+ safety: { stage: 'Stage 127', ...console.boundary_assertions },
1896
+ quality: console.next_action_console_invariants.findings,
1897
+ action: 'one-screen next action console was computed read-only from local Stage 126 friction JSON plus optional local runbook and evidence JSON. It only renders preview commands and evidence needs; no state directory, sidecar, command, check, test, workflow skill execution, runtime action, evidence write, git, commit, push, PR, merge, platform API, external network, model, MCP, subagent, worktree, or business source write occurred.',
1898
+ };
1899
+ }
1900
+
1901
+ function tokenSaviorBudgetEnvelope(root, { prompt = '', frictionFile = '' } = {}) {
1902
+ ensureRoot(root);
1903
+ if (!String(prompt || '').trim()) throw new Error('tokens --savior-budget requires --prompt <text>');
1904
+ const frictionInput = frictionFile ? localJsonFileWithinRoot(root, frictionFile, 'tokens --savior-budget --from-friction') : null;
1905
+ const base = runtimeTokenSaviorBudget({
1906
+ prompt,
1907
+ friction: frictionInput?.data || null,
1908
+ source: {
1909
+ friction_file: frictionInput?.relative || '',
1910
+ friction_digest: frictionInput?.digest || '',
1911
+ },
1912
+ });
1913
+ const budget = {
1914
+ ...base,
1915
+ budget_digest: digestTokenSaviorBudget(runtimeTokenSaviorBudgetDigestPayload(base)),
1916
+ };
1917
+ return {
1918
+ mode: 'token-savior-entry-budget-contract',
1919
+ ok: budget.ok,
1920
+ state_present: fs.existsSync(stateDirectory(root)),
1921
+ token_savior_budget: budget,
1922
+ safety: { stage: 'Stage 128', ...budget.boundary_assertions },
1923
+ quality: budget.token_savior_budget_invariants.findings,
1924
+ action: 'token savior entry budget was computed read-only from an explicit prompt plus optional local Stage 126 friction JSON. It only recommends deterministic context budget, skill surfacing, deferrals, and command previews; no state directory, sidecar, command execution, dynamic tool execution, embeddings, remote config, model, platform API, git, commit, push, PR, merge, MCP, subagent, worktree, or business source write occurred.',
1925
+ };
1926
+ }
1927
+
1928
+ function printTokenSaviorBudget(envelope) {
1929
+ const budget = envelope.token_savior_budget;
1930
+ console.log('Vibecoding Runtime Token Savior Entry Budget');
1931
+ console.log(`Stage: ${budget.stage}; Kind: ${budget.budget_kind}; pass=${budget.ok}`);
1932
+ console.log(`Recommended profile: ${budget.recommended_profile}; max_context_tokens=${budget.context_budget.max_context_tokens}`);
1933
+ console.log(`Prompt: estimated_tokens=${budget.prompt_summary.estimated_tokens}; friction_score=${budget.friction_summary.friction_score}; top_friction=${budget.friction_summary.top_friction || 'none'}`);
1934
+ printList('Skills to surface', budget.skills_to_surface.map((item) => `${item.skill}: ${item.reason}`));
1935
+ printList('Skills to defer', budget.skills_to_defer.map((item) => `${item.skill}: ${item.reason}`));
1936
+ printList('Commands to surface', budget.commands_to_surface.map((item) => `${item.id}: ${item.command}`));
1937
+ printList('Token saving reasoning', budget.token_saving_reasoning);
1938
+ console.log('Boundary: writes=false; token_savior_budget_artifact=false; command_execution=false; workflow_execution=false; skill_execution=false; runtime_action=false; dynamic_tool_execution=false; embeddings=false; remote_config=false; shell_interception=false; command_mutation=false; git=false; git_write=false; commit=false; pr=false; push=false; merge=false; platform_api=false; external_network=false; model_invocation=false; subagent=false; mcp=false; business_source_write=false');
1939
+ console.log(`Token savior budget digest: ${budget.budget_digest}`);
1940
+ console.log(`Action: ${envelope.action}`);
1941
+ }
1942
+
1943
+ const {
1944
+ sourceChangeCandidateSnapshotPath, sourceSandboxRunSnapshotPath, sourceVerificationSnapshotPath,
1945
+ sourceChangeCandidateEnvelope, validateSourceChangeCandidateArtifact, writeSourceChangeCandidate,
1946
+ sourceSandboxRunEnvelope, validateSourceSandboxRunArtifact, writeSourceSandboxRun,
1947
+ sourceVerificationEnvelope, validateSourceVerificationArtifact, writeSourceVerification,
1948
+ mergeReadinessSnapshotPath, mergeApprovalSnapshotPath, mergeApplySnapshotPath,
1949
+ mergeReadinessEnvelope, validateMergeReadinessArtifact, writeMergeReadiness,
1950
+ mergeApprovalEnvelope, validateMergeApprovalArtifact, writeMergeApproval,
1951
+ mergeApplyEnvelope, validateMergeApplyArtifact, writeMergeApply,
1952
+ sourcePatchPlanEnvelope,
1953
+ } = createRuntimeSourceMergeArtifacts({ fs, path, process, spawnSync, jsonSchemaVersion, stateDirectoryName, sourceChangeCandidatesDirectoryName, sourceSandboxRunsDirectoryName, sourceVerificationsDirectoryName, mergeReadinessDirectoryName, mergeApprovalsDirectoryName, mergeAppliesDirectoryName, ensureRoot, workflowPath, fileDigest, digestObject, currentGitHead, writeStateArtifact, readJsonArtifact, latestStateFile, platformSessionReviewFilePath, validatePlatformSessionReviewArtifact, sourceChangeCandidatesDirectory, sourceSandboxRunsDirectory, sourceVerificationsDirectory, sourceChangeCandidateFilePath, sourceSandboxRunFilePath, sourceVerificationFilePath, mergeReadinessDirectory, mergeApprovalsDirectory, mergeAppliesDirectory, mergeReadinessFilePath, mergeApprovalFilePath, mergeApplyFilePath, runtimeTracesDirectory, runtimeTraceFilePath, validateRuntimeTraceArtifact, governanceDirectory, governanceFilePath, validateGovernanceArtifact, methodologyGatesDirectory, methodologyGateFilePath: (...args) => methodologyGateFilePath(...args), validateMethodologyGateArtifact: (...args) => validateMethodologyGateArtifact(...args), createSourcePatchPlanEnvelope });
1954
+
1955
+ const { runMerge, runSource } = createRuntimeSourceMergeEntryCommands({
1956
+ path,
1957
+ ensureRoot,
1958
+ writeJsonEnvelope,
1959
+ printSourceArtifact,
1960
+ printMergeArtifact,
1961
+ runtimeSourceMergeCommand: () => runtimeSourceMergeCommand,
1962
+ sourcePatchPlanEnvelope,
1963
+ sourceChangeCandidateSnapshotPath,
1964
+ sourceSandboxRunSnapshotPath,
1965
+ sourceVerificationSnapshotPath,
1966
+ sourceChangeCandidateEnvelope,
1967
+ sourceSandboxRunEnvelope,
1968
+ sourceVerificationEnvelope,
1969
+ writeSourceChangeCandidate,
1970
+ writeSourceSandboxRun,
1971
+ writeSourceVerification,
1972
+ mergeReadinessSnapshotPath,
1973
+ mergeApprovalSnapshotPath,
1974
+ mergeApplySnapshotPath,
1975
+ mergeReadinessEnvelope,
1976
+ mergeApprovalEnvelope,
1977
+ mergeApplyEnvelope,
1978
+ writeMergeReadiness,
1979
+ writeMergeApproval,
1980
+ writeMergeApply,
1981
+ });
1982
+
1983
+ const methodologyGateKinds = new Set(['spec', 'plan', 'tdd', 'debug', 'review', 'completion', 'automation']);
1984
+
1985
+ const runtimeInteraction = createRuntimeInteractionCommands(createRuntimeInteractionCommandDeps({
1986
+ core: {
1987
+ jsonSchemaVersion,
1988
+ stateDirectoryName,
1989
+ methodologyGatesDirectoryName,
1990
+ learningDirectoryName,
1991
+ tokenEconomyDirectoryName,
1992
+ methodologyGateKinds,
1993
+ ensureRoot,
1994
+ readJsonArtifact,
1995
+ writeJsonEnvelope,
1996
+ printList,
1997
+ stableStringify: stableJson,
1998
+ },
1999
+ pathSafety: {
2000
+ localJsonFileWithinRoot,
2001
+ safeStateArtifactFilePath,
2002
+ localTextEvidenceDescriptor,
2003
+ localDirectoryWithinRoot,
2004
+ sourceDescriptor,
2005
+ },
2006
+ state: {
2007
+ stateDirectory,
2008
+ workflowFileName,
2009
+ workflowPath,
2010
+ readWorkflow,
2011
+ tasksFromState,
2012
+ validateState,
2013
+ workflowSummary,
2014
+ asList,
2015
+ listStateFiles,
2016
+ fileDigest,
2017
+ digestObject,
2018
+ validateCommonArtifactSafety,
2019
+ validateRuntimePolicyCatalogDigest,
2020
+ runtimePolicyCatalogDigest,
2021
+ writeStateArtifact,
2022
+ },
2023
+ artifacts: {
2024
+ listSubagentDispatchFiles,
2025
+ listSubagentResultFiles,
2026
+ listSubagentReviewFiles,
2027
+ listHookRunFiles,
2028
+ runtimeTracesDirectory,
2029
+ listGovernanceFiles,
2030
+ governanceAdviceEnvelope,
2031
+ readinessEnvelope,
2032
+ runtimeCapabilityRegistry,
2033
+ planLintEnvelope,
2034
+ planActionManifestEnvelope,
2035
+ selfTestGateProfileEnvelope,
2036
+ commitReadinessEnvelope,
2037
+ confirmedOneShotPlanEnvelope,
2038
+ evidenceIntakeEnvelope,
2039
+ diffCoverageEnvelope,
2040
+ reviewIntakeEnvelope,
2041
+ tddTraceEnvelope,
2042
+ },
2043
+ workflow: createRuntimeWorkflowCommandDeps({
2044
+ directories: {
2045
+ methodologyGatesDirectory,
2046
+ learningDirectory,
2047
+ tokenEconomyDirectory,
2048
+ },
2049
+ automation: {
2050
+ runtimeAutomationReadinessCommandEnvelope,
2051
+ },
2052
+ dashboard: {
2053
+ nextActionConsoleEnvelope,
2054
+ digestCloseLoopDashboard,
2055
+ runtimeCloseLoopDashboard,
2056
+ runtimeCloseLoopDashboardDigestPayload,
2057
+ },
2058
+ aliases: {
2059
+ digestHumanFriendlyAlias,
2060
+ runtimeHumanFriendlyAliasDigestPayload,
2061
+ runtimeHumanFriendlyCloseLoopAlias,
2062
+ runtimeHumanFriendlyNextEvidenceAlias,
2063
+ },
2064
+ loopContract: {
2065
+ digestWorkflowLoopContract,
2066
+ runtimeWorkflowLoopContract,
2067
+ runtimeWorkflowLoopContractDigestPayload,
2068
+ },
2069
+ entryExperience: {
2070
+ digestProgressiveEntryUx,
2071
+ runtimeProgressiveEntryUx,
2072
+ runtimeProgressiveEntryUxDigestPayload,
2073
+ digestEntryTriggerDiscipline,
2074
+ runtimeEntryTriggerDiscipline,
2075
+ runtimeEntryTriggerDisciplineDigestPayload,
2076
+ },
2077
+ nextAction: {
2078
+ digestNextActionConsole,
2079
+ runtimeNextActionConsole,
2080
+ runtimeNextActionConsoleDigestPayload,
2081
+ },
2082
+ }),
2083
+ learningAndTokens: createRuntimeTokensCommandDeps({
2084
+ learningState: {
2085
+ learningObservationFilePath,
2086
+ learningCandidateInstinctFilePath,
2087
+ learningPromotionFilePath,
2088
+ },
2089
+ tokenEconomy: {
2090
+ tokenCompactionFilePath,
2091
+ tokenMetricsFilePath,
2092
+ digestTokenSaviorBudget,
2093
+ runtimeTokenSaviorBudget,
2094
+ runtimeTokenSaviorBudgetDigestPayload,
2095
+ },
2096
+ experienceLearning: {
2097
+ digestExperienceLearningPattern,
2098
+ runtimeExperienceLearningPattern,
2099
+ runtimeExperienceLearningPatternDigestPayload,
2100
+ },
2101
+ }),
2102
+ methodology: {
2103
+ digestMethodologyCoverage,
2104
+ runtimeMethodologyCoverageDigestPayload,
2105
+ runtimeMethodologyCoverageMap,
2106
+ },
2107
+ completion: {
2108
+ digestSelfTestGateProfile,
2109
+ runtimeSelfTestGateProfile,
2110
+ runtimeSelfTestGateProfileDigestPayload,
2111
+ digestCommitReadiness,
2112
+ runtimeCommitReadinessDigestPayload,
2113
+ runtimeCommitReadinessEnvelope,
2114
+ digestStagedCommitReadiness,
2115
+ runtimeStagedCommitReadiness,
2116
+ runtimeStagedCommitReadinessDigestPayload,
2117
+ digestDiffCoverage,
2118
+ runtimeDiffCoverageDigestPayload,
2119
+ runtimeDiffCoverageEnvelope,
2120
+ },
2121
+ }));
2122
+ const {
2123
+ runCompletion,
2124
+ completionEvidenceBundleEnvelope,
2125
+ runBootstrap,
2126
+ runOnboarding,
2127
+ runAdvice,
2128
+ runEntry,
2129
+ runMethodology, methodologyGateFilePath, validateMethodologyGateArtifact,
2130
+ runLearning,
2131
+ humanFriendlyCloseLoopEnvelope,
2132
+ humanFriendlyNextEvidenceEnvelope,
2133
+ workflowReadinessEnvelope,
2134
+ workflowReadinessBoundaryAssertions,
2135
+ workflowCockpitEnvelope,
2136
+ workflowReceiptEnvelope,
2137
+ workflowStartEnvelope,
2138
+ progressiveEntryUxEnvelope,
2139
+ workflowSequenceEnvelope,
2140
+ workflowLoopContractEnvelope, entryTriggerDisciplineEnvelope,
2141
+ closeLoopDashboardEnvelope,
2142
+ printHumanFriendlyAlias,
2143
+ printNextActionConsole,
2144
+ printWorkflowReadiness,
2145
+ printWorkflowCockpit,
2146
+ printWorkflowReceipt,
2147
+ printWorkflowStart,
2148
+ printSessionStart,
2149
+ printSkillSelect,
2150
+ printSessionCheckpoint,
2151
+ printSessionHandoff,
2152
+ printSessionResume,
2153
+ printSessionClose,
2154
+ printWorkflowRunPlan,
2155
+ printEntryRuntimeSummary,
2156
+ printProgressiveEntryUx,
2157
+ printWorkflowSequence,
2158
+ printWorkflowLoopContract, printEntryTriggerDiscipline,
2159
+ printCloseLoopDashboard,
2160
+ learningAdviceEnvelope,
2161
+ tokenAdviceEnvelope,
2162
+ tokenAuditEnvelope,
2163
+ tokenCompactionEnvelope,
2164
+ tokenMetricsEnvelope,
2165
+ tokenProfileEnvelope,
2166
+ tokenRewritePreviewEnvelope,
2167
+ writeTokenCompaction,
2168
+ writeTokenMetrics,
2169
+ } = runtimeInteraction;
2170
+
2171
+ let runtimeSourceMergeCommand;
2172
+ function printSourceArtifact(...args) {
2173
+ return runtimeSourceMergeCommand.printSourceArtifact(...args);
2174
+ }
2175
+ function printMergeArtifact(...args) {
2176
+ return runtimeSourceMergeCommand.printMergeArtifact(...args);
2177
+ }
2178
+
2179
+ let runtimeSchedulerCommand;
2180
+ function schedulerCommand() {
2181
+ if (!runtimeSchedulerCommand) throw new Error('runtime scheduler command is not initialized');
2182
+ return runtimeSchedulerCommand;
2183
+ }
2184
+ function schedulerPolicySnapshot(...args) {
2185
+ return schedulerCommand().schedulerPolicySnapshot(...args);
2186
+ }
2187
+ function runtimeBudgetSnapshot(...args) {
2188
+ return schedulerCommand().runtimeBudgetSnapshot(...args);
2189
+ }
2190
+ function validateSchedulerPolicySnapshot(...args) {
2191
+ return schedulerCommand().validateSchedulerPolicySnapshot(...args);
2192
+ }
2193
+ function validateRuntimeBudgetSnapshot(...args) {
2194
+ return schedulerCommand().validateRuntimeBudgetSnapshot(...args);
2195
+ }
2196
+ function schedulerSafety(...args) {
2197
+ return schedulerCommand().schedulerSafety(...args);
2198
+ }
2199
+ function schedulerPlanSnapshotPath(...args) {
2200
+ return schedulerCommand().schedulerPlanSnapshotPath(...args);
2201
+ }
2202
+ function schedulerHookPlanSnapshotPath(...args) {
2203
+ return schedulerCommand().schedulerHookPlanSnapshotPath(...args);
2204
+ }
2205
+ function schedulerRunPath(...args) {
2206
+ return schedulerCommand().schedulerRunPath(...args);
2207
+ }
2208
+ function schedulerPlanEnvelope(...args) {
2209
+ return schedulerCommand().schedulerPlanEnvelope(...args);
2210
+ }
2211
+ function validateSchedulerPlanArtifact(...args) {
2212
+ return schedulerCommand().validateSchedulerPlanArtifact(...args);
2213
+ }
2214
+ function writeSchedulerPlan(...args) {
2215
+ return schedulerCommand().writeSchedulerPlan(...args);
2216
+ }
2217
+ function schedulerHookPlanEnvelope(...args) {
2218
+ return schedulerCommand().schedulerHookPlanEnvelope(...args);
2219
+ }
2220
+ function validateSchedulerHookPlanArtifact(...args) {
2221
+ return schedulerCommand().validateSchedulerHookPlanArtifact(...args);
2222
+ }
2223
+ function writeSchedulerHookPlan(...args) {
2224
+ return schedulerCommand().writeSchedulerHookPlan(...args);
2225
+ }
2226
+ function schedulerHookPlanAuditEnvelope(...args) {
2227
+ return schedulerCommand().schedulerHookPlanAuditEnvelope(...args);
2228
+ }
2229
+ function printSchedulerHookPlan(...args) {
2230
+ return schedulerCommand().printSchedulerHookPlan(...args);
2231
+ }
2232
+ function printSchedulerHookPlanAudit(...args) {
2233
+ return schedulerCommand().printSchedulerHookPlanAudit(...args);
2234
+ }
2235
+ function schedulerPlanAuditEnvelope(...args) {
2236
+ return schedulerCommand().schedulerPlanAuditEnvelope(...args);
2237
+ }
2238
+ function printSchedulerPlan(...args) {
2239
+ return schedulerCommand().printSchedulerPlan(...args);
2240
+ }
2241
+ function printSchedulerPlanAudit(...args) {
2242
+ return schedulerCommand().printSchedulerPlanAudit(...args);
2243
+ }
2244
+ function schedulerPolicyAuditEnvelope(...args) {
2245
+ return schedulerCommand().schedulerPolicyAuditEnvelope(...args);
2246
+ }
2247
+ function printSchedulerPolicyAudit(...args) {
2248
+ return schedulerCommand().printSchedulerPolicyAudit(...args);
2249
+ }
2250
+
2251
+ let runtimeDaemonCommand;
2252
+ function daemonCommand() {
2253
+ if (!runtimeDaemonCommand) throw new Error('runtime daemon command is not initialized');
2254
+ return runtimeDaemonCommand;
2255
+ }
2256
+ function daemonEnvelope(...args) {
2257
+ return daemonCommand().daemonEnvelope(...args);
2258
+ }
2259
+ function daemonLoopAuditEnvelope(...args) {
2260
+ return daemonCommand().daemonLoopAuditEnvelope(...args);
2261
+ }
2262
+ function printDaemon(...args) {
2263
+ return daemonCommand().printDaemon(...args);
2264
+ }
2265
+ function printDaemonLoopAudit(...args) {
2266
+ return daemonCommand().printDaemonLoopAudit(...args);
2267
+ }
2268
+
2269
+
2270
+ function writeSchedulerRun(...args) {
2271
+ return schedulerCommand().writeSchedulerRun(...args);
2272
+ }
2273
+ function schedulerOncePreviewEnvelope(...args) {
2274
+ return schedulerCommand().schedulerOncePreviewEnvelope(...args);
2275
+ }
2276
+ function schedulerOnceEnvelope(...args) {
2277
+ return schedulerCommand().schedulerOnceEnvelope(...args);
2278
+ }
2279
+ function schedulerOnceRecoveryPreviewEnvelope(...args) {
2280
+ return schedulerCommand().schedulerOnceRecoveryPreviewEnvelope(...args);
2281
+ }
2282
+ function schedulerOnceRecoveryEnvelope(...args) {
2283
+ return schedulerCommand().schedulerOnceRecoveryEnvelope(...args);
2284
+ }
2285
+ function printSchedulerRecoveryOnce(...args) {
2286
+ return schedulerCommand().printSchedulerRecoveryOnce(...args);
2287
+ }
2288
+ function printSchedulerOnce(...args) {
2289
+ return schedulerCommand().printSchedulerOnce(...args);
2290
+ }
2291
+ function runSchedulerPolicies(...args) {
2292
+ return schedulerCommand().runSchedulerPolicies(...args);
2293
+ }
2294
+ function runScheduler(...args) {
2295
+ return schedulerCommand().runScheduler(...args);
2296
+ }
2297
+
2298
+ function daemonSafety(...args) {
2299
+ return daemonCommand().daemonSafety(...args);
2300
+ }
2301
+
2302
+ function schedulerScanEnvelope(...args) {
2303
+ return schedulerCommand().schedulerScanEnvelope(...args);
2304
+ }
2305
+ function printSchedulerScan(...args) {
2306
+ return schedulerCommand().printSchedulerScan(...args);
2307
+ }
2308
+
2309
+ function daemonStopFilePath(...args) {
2310
+ return daemonCommand().daemonStopFilePath(...args);
2311
+ }
2312
+ function runDaemon(...args) {
2313
+ return daemonCommand().runDaemon(...args);
2314
+ }
2315
+
2316
+ const runtimeDispatchCommand = createRuntimeDispatchCommand({
2317
+ jsonSchemaVersion,
2318
+ stateDirectoryName,
2319
+ workflowFileName,
2320
+ dispatchesDirectoryName,
2321
+ dispatchClaimsDirectoryName,
2322
+ ensureRoot,
2323
+ workflowPath,
2324
+ dispatchesDirectory,
2325
+ dispatchClaimsDirectory,
2326
+ writeJsonEnvelope,
2327
+ printList,
2328
+ taskIdPattern,
2329
+ taskIdRequirement,
2330
+ windowsReservedTaskBasenames,
2331
+ allowedTransitions,
2332
+ adapterRuntimeBridge,
2333
+ platformHints,
2334
+ platformCapabilities,
2335
+ forbiddenDispatchActions,
2336
+ claimStaleAfterMs,
2337
+ hasActualStopCondition,
2338
+ tasksFromState,
2339
+ readinessCounts,
2340
+ reviewSummaryStatus,
2341
+ jsonTaskSummaries,
2342
+ parseIsoTimestamp,
2343
+ optionalFileDigest,
2344
+ });
2345
+ const {
2346
+ runDispatches,
2347
+ validateDispatchActor,
2348
+ dispatchClaimFilePath,
2349
+ dispatchEventFilePath,
2350
+ dispatchIntentEnvelope,
2351
+ printDispatchIntent,
2352
+ confirmDispatchEnvelope,
2353
+ writeDispatchEvent,
2354
+ printConfirmDispatch,
2355
+ dispatchEventSummary,
2356
+ readDispatchEventFile,
2357
+ dispatchEventDigest,
2358
+ claimAudit,
2359
+ claimAuditQuality,
2360
+ listDispatchEvents,
2361
+ verifyDispatchEvent,
2362
+ dispatchClaimSafety,
2363
+ readDispatchClaimFile,
2364
+ listDispatchClaims,
2365
+ claimSummary,
2366
+ validateDispatchEventOrThrow,
2367
+ } = runtimeDispatchCommand;
2368
+
2369
+ runtimeExecutionCommand = createRuntimeExecutionCommand({
2370
+ fs,
2371
+ path,
2372
+ process,
2373
+ crypto,
2374
+ spawnSync,
2375
+ jsonSchemaVersion,
2376
+ stateDirectoryName,
2377
+ executionsDirectoryName,
2378
+ executionCandidatesDirectoryName,
2379
+ executionApprovalsDirectoryName,
2380
+ autoRunLocksDirectoryName,
2381
+ approvalLifecycleDirectoryName,
2382
+ stage11RuntimeActionName,
2383
+ runtimeActionCatalogStage,
2384
+ runtimeActionCatalogVersion,
2385
+ approvalLifecycleStage,
2386
+ approvalLifecycleStates,
2387
+ approvalLifecycleTerminalStates,
2388
+ stage11ExecutionStaleAfterMs,
2389
+ stage12CandidateStaleAfterMs,
2390
+ stage13ApprovalStaleAfterMs,
2391
+ stage11AllowedExecutionSkills,
2392
+ allowedExecutionStatuses,
2393
+ stage11TerminalStatuses,
2394
+ forbiddenDispatchActions,
2395
+ executionPolicy,
2396
+ autoRunPolicyProfiles,
2397
+ ensureRoot,
2398
+ workflowPath,
2399
+ readWorkflow,
2400
+ tasksFromState,
2401
+ readinessCounts,
2402
+ reviewSummaryStatus,
2403
+ hasActualStopCondition,
2404
+ writeJsonEnvelope,
2405
+ printList,
2406
+ readJsonArtifact,
2407
+ writeStateArtifact,
2408
+ fileDigest,
2409
+ digestObject,
2410
+ parseIsoTimestamp,
2411
+ validateCommonArtifactSafety,
2412
+ runtimePolicyCatalogSnapshot,
2413
+ runtimePolicyCatalogDigest,
2414
+ validateRuntimePolicyCatalog,
2415
+ executionsDirectory,
2416
+ executionCandidatesDirectory,
2417
+ executionApprovalsDirectory,
2418
+ approvalLifecycleDirectory,
2419
+ autoRunLocksDirectory,
2420
+ candidateFilePath,
2421
+ approvalFilePath,
2422
+ approvalLifecycleFilePath,
2423
+ autoRunLockFilePath,
2424
+ dispatchEventFilePath,
2425
+ dispatchClaimFilePath,
2426
+ readDispatchEventFile,
2427
+ verifyDispatchEvent,
2428
+ validateDispatchEventOrThrow,
2429
+ dispatchEventDigest,
2430
+ dispatchEventSummary,
2431
+ readDispatchClaimFile,
2432
+ validateDispatchActor,
2433
+ claimSummary,
2434
+ candidateProfileBinding,
2435
+ candidateProfileBindingFailures,
2436
+ approvalProfileBinding,
2437
+ approvalProfileBindingFailures,
2438
+ controlledForegroundBinding,
2439
+ controlledForegroundEnvelopeFailures,
2440
+ foregroundEvidenceDigestPayload,
2441
+ foregroundPreflightGates,
2442
+ foregroundPreflightFailures,
2443
+ buildExecutionEnabledPreflight,
2444
+ buildExecutionProfilePreflightEnvelope,
2445
+ runtimeTestRunProfiles,
2446
+ });
2447
+
2448
+ runtimeSourceMergeCommand = createRuntimeSourceMergeCommand({
2449
+ fs,
2450
+ path,
2451
+ process,
2452
+ ensureRoot,
2453
+ workflowPath,
2454
+ writeJsonEnvelope,
2455
+ printList,
2456
+ readJsonArtifact,
2457
+ fileDigest,
2458
+ listStateFiles,
2459
+ sourceChangeCandidatesDirectory,
2460
+ sourceSandboxRunsDirectory,
2461
+ sourceVerificationsDirectory,
2462
+ mergeReadinessDirectory,
2463
+ mergeApprovalsDirectory,
2464
+ mergeAppliesDirectory,
2465
+ sourceChangeCandidateFilePath,
2466
+ sourceSandboxRunFilePath,
2467
+ sourceVerificationFilePath,
2468
+ mergeReadinessFilePath,
2469
+ mergeApprovalFilePath,
2470
+ mergeApplyFilePath,
2471
+ sourceChangeCandidateEnvelope,
2472
+ sourceVerificationEnvelope,
2473
+ mergeReadinessEnvelope,
2474
+ validateSourceChangeCandidateArtifact,
2475
+ validateSourceSandboxRunArtifact,
2476
+ validateSourceVerificationArtifact,
2477
+ validateMergeReadinessArtifact,
2478
+ validateMergeApprovalArtifact,
2479
+ validateMergeApplyArtifact,
2480
+ });
2481
+
2482
+ runtimeLeaseCommand = createRuntimeLeaseCommand({
2483
+ fs,
2484
+ path,
2485
+ process,
2486
+ crypto,
2487
+ jsonSchemaVersion,
2488
+ stage11ExecutionStaleAfterMs,
2489
+ ensureRoot,
2490
+ workflowPath,
2491
+ writeJsonEnvelope,
2492
+ printList,
2493
+ readJsonArtifact,
2494
+ fileDigest,
2495
+ autoRunLocksDirectory,
2496
+ executionsDirectory,
2497
+ schedulerLeasesDirectory,
2498
+ listExecutionFiles,
2499
+ readExecutionFile,
2500
+ validateExecutionEnvelope,
2501
+ executionHistorySummary,
2502
+ schedulerSafety,
2503
+ });
2504
+
2505
+ runtimeQueueCommand = createRuntimeQueueCommand({
2506
+ fs,
2507
+ path,
2508
+ process,
2509
+ jsonSchemaVersion,
2510
+ stage11RuntimeActionName,
2511
+ stage11ExecutionStaleAfterMs,
2512
+ stage12CandidateStaleAfterMs,
2513
+ ensureRoot,
2514
+ workflowPath,
2515
+ writeJsonEnvelope,
2516
+ printList,
2517
+ readJsonArtifact,
2518
+ fileDigest,
2519
+ validateCommonArtifactSafety,
2520
+ executionQueueDirectory,
2521
+ executionCandidatesDirectory,
2522
+ executionApprovalsDirectory,
2523
+ autoRunLocksDirectory,
2524
+ candidateFilePath,
2525
+ autoRunLockFilePath,
2526
+ queueFilePath,
2527
+ validateCandidateArtifact,
2528
+ validateApprovalArtifact,
2529
+ approvalLifecycleCurrentState,
2530
+ executionHistorySummary,
2531
+ policyEvaluationEnvelope,
2532
+ orderedProfileBinding,
2533
+ });
2534
+
2535
+ runtimeSchedulerCommand = createRuntimeSchedulerCommand({
2536
+ fs,
2537
+ path,
2538
+ process,
2539
+ jsonSchemaVersion,
2540
+ stateDirectoryName,
2541
+ schedulerPlansDirectoryName,
2542
+ schedulerHookPlansDirectoryName,
2543
+ schedulerRunsDirectoryName,
2544
+ schedulerLeasesDirectoryName,
2545
+ stage11RuntimeActionName,
2546
+ stage11AllowedExecutionSkills,
2547
+ schedulerPolicyProfiles,
2548
+ schedulerRuntimeBudget,
2549
+ ensureRoot,
2550
+ workflowPath,
2551
+ writeJsonEnvelope,
2552
+ printList,
2553
+ readJsonArtifact,
2554
+ writeStateArtifact,
2555
+ fileDigest,
2556
+ digestObject,
2557
+ validateCommonArtifactSafety,
2558
+ schedulerPlansDirectory,
2559
+ schedulerHookPlansDirectory,
2560
+ schedulerRunsDirectory,
2561
+ schedulerPlanFilePath,
2562
+ schedulerHookPlanFilePath,
2563
+ hookIntentFilePath,
2564
+ validateHookIntentArtifact,
2565
+ listSchedulerPlanFiles,
2566
+ listSchedulerHookPlanFiles,
2567
+ queueScanEnvelope,
2568
+ recoveryClassificationEnvelope,
2569
+ executionPolicySnapshot,
2570
+ runtimeActionCatalogDigest,
2571
+ listDispatchEvents,
2572
+ listDispatchClaims,
2573
+ claimSummary,
2574
+ listExecutionFiles,
2575
+ readExecutionFile,
2576
+ executionsDirectory,
2577
+ executionSummary,
2578
+ validateExecutionEnvelope,
2579
+ dispatchesDirectory,
2580
+ readDispatchEventFile,
2581
+ verifyDispatchEvent,
2582
+ daemonSafety,
2583
+ activeSchedulerLease,
2584
+ writeSchedulerLease,
2585
+ completeSchedulerLease,
2586
+ controlledAutoRunEnvelope,
2587
+ writeRunningThenCompleteExecution,
2588
+ recoveryPolicySnapshot,
2589
+ recoveryActionCatalogSnapshot,
2590
+ validateRecoveryClassificationArtifact,
2591
+ writeRecoveryClassification,
2592
+ selectRecoveryFinding,
2593
+ recoveryApplyEnvelopeFromClassification,
2594
+ writeRecoveryApply,
2595
+ });
2596
+
2597
+ runtimeDaemonCommand = createRuntimeDaemonCommand({
2598
+ fs,
2599
+ path,
2600
+ process,
2601
+ crypto,
2602
+ jsonSchemaVersion,
2603
+ stateDirectoryName,
2604
+ daemonRunsDirectoryName,
2605
+ daemonHeartbeatsDirectoryName,
2606
+ daemonStopDirectoryName,
2607
+ forbiddenDispatchActions,
2608
+ ensureRoot,
2609
+ localJsonFileWithinRoot,
2610
+ stateDirectory,
2611
+ workflowPath,
2612
+ writeJsonEnvelope,
2613
+ writeStateArtifact,
2614
+ printList,
2615
+ readJsonArtifact,
2616
+ digestObject,
2617
+ daemonLoopsDirectory,
2618
+ daemonHeartbeatsDirectory,
2619
+ daemonStopDirectory,
2620
+ daemonLoopFilePath,
2621
+ listDaemonLoopFiles,
2622
+ schedulerScanEnvelope,
2623
+ printSchedulerScan,
2624
+ schedulerOncePreviewEnvelope,
2625
+ activeSchedulerLease,
2626
+ });
2627
+
2628
+ runtimeRecoveryCommand = createRuntimeRecoveryCommand({
2629
+ fs,
2630
+ path,
2631
+ process,
2632
+ crypto,
2633
+ jsonSchemaVersion,
2634
+ stateDirectoryName,
2635
+ recoveryRunsDirectoryName,
2636
+ retryPackagesDirectoryName,
2637
+ recoveryPolicy,
2638
+ recoveryActionCatalog,
2639
+ schedulerRuntimeBudget,
2640
+ ensureRoot,
2641
+ workflowPath,
2642
+ writeJsonEnvelope,
2643
+ printList,
2644
+ readJsonArtifact,
2645
+ writeStateArtifact,
2646
+ fileDigest,
2647
+ digestObject,
2648
+ asList,
2649
+ validateCommonArtifactSafety,
2650
+ safeStateArtifactFilePath,
2651
+ executionsDirectory,
2652
+ recoveryPackagesDirectory,
2653
+ recoveryClassificationsDirectory,
2654
+ recoveryRunsDirectory,
2655
+ retryPackagesDirectory,
2656
+ autoRunLocksDirectory,
2657
+ schedulerLeasesDirectory,
2658
+ executionFilePath,
2659
+ listExecutionFiles,
2660
+ readExecutionFile,
2661
+ approvalFilePath,
2662
+ candidateFilePath,
2663
+ autoRunLockFilePath,
2664
+ recoveryFilePath,
2665
+ recoveryClassificationFilePath,
2666
+ queueScanEnvelope,
2667
+ categorizeQueueBlockedItem,
2668
+ leaseAuditEnvelope,
2669
+ listSchedulerLeaseFiles,
2670
+ activeSchedulerLease,
2671
+ schedulerPolicySnapshot,
2672
+ runtimeBudgetSnapshot,
2673
+ validateSchedulerPolicySnapshot,
2674
+ validateRuntimeBudgetSnapshot,
2675
+ });
2676
+
2677
+ runtimeRetryCommand = createRuntimeRetryCommand({
2678
+ fs,
2679
+ path,
2680
+ process,
2681
+ jsonSchemaVersion,
2682
+ boundedRetryPolicy,
2683
+ boundedRetryBudget,
2684
+ ensureRoot,
2685
+ workflowPath,
2686
+ writeJsonEnvelope,
2687
+ printList,
2688
+ readJsonArtifact,
2689
+ writeStateArtifact,
2690
+ listStateFiles,
2691
+ fileDigest,
2692
+ digestObject,
2693
+ retryPackagesDirectory,
2694
+ retryRunsDirectory,
2695
+ retryPackageFilePath,
2696
+ executionFilePath,
2697
+ readExecutionFile,
2698
+ approvalFilePath,
2699
+ candidateFilePath,
2700
+ validateApprovalArtifact,
2701
+ validateCandidateArtifact,
2702
+ executionPolicySnapshot,
2703
+ runtimeActionCatalogDigest,
2704
+ approvalLifecycleCurrentState,
2705
+ activeSchedulerLease,
2706
+ autoRunLockFilePath,
2707
+ });
2708
+
2709
+
2710
+ const runtimeReplyCommand = createRuntimeReplyCommand({
2711
+ jsonSchemaVersion,
2712
+ replyPolicy,
2713
+ workflowFileName,
2714
+ ensureRoot,
2715
+ workflowPath,
2716
+ readWorkflow,
2717
+ listDispatchEvents,
2718
+ listExecutionFiles,
2719
+ latestStateFile,
2720
+ fileDigest,
2721
+ optionalFileDigest,
2722
+ digestObject,
2723
+ writeStateArtifact,
2724
+ writeJsonEnvelope,
2725
+ printList,
2726
+ readJsonArtifact,
2727
+ executionsDirectory,
2728
+ schedulerRunsDirectory,
2729
+ recoveryRunsDirectory,
2730
+ retryRunsDirectory,
2731
+ observabilityDirectory,
2732
+ runtimeTracesDirectory,
2733
+ replyDraftsDirectory,
2734
+ replyReviewsDirectory,
2735
+ replyApprovalsDirectory,
2736
+ replyOutboxDirectory,
2737
+ replySendRunsDirectory,
2738
+ replyDraftFilePath,
2739
+ replyReviewFilePath,
2740
+ replyApprovalFilePath,
2741
+ replyOutboxFilePath,
2742
+ replySendRunFilePath,
2743
+ listReplyDraftFiles,
2744
+ listReplyReviewFiles,
2745
+ listReplyApprovalFiles,
2746
+ listReplyOutboxFiles,
2747
+ listReplySendRunFiles,
2748
+ });
2749
+ const { validateReplyArtifact, runReply } = runtimeReplyCommand;
2750
+
2751
+ runtimeTraceCommand = createRuntimeTraceCommand({
2752
+ fs,
2753
+ path,
2754
+ process,
2755
+ jsonSchemaVersion,
2756
+ stateDirectoryName,
2757
+ ensureRoot,
2758
+ stateDirectory,
2759
+ writeJsonEnvelope,
2760
+ printList,
2761
+ readJsonArtifact,
2762
+ writeStateArtifact,
2763
+ listStateFiles,
2764
+ fileDigest,
2765
+ digestObject,
2766
+ validateCommonArtifactSafety,
2767
+ safeStateArtifactFilePath,
2768
+ runtimeTracesDirectory,
2769
+ runtimeTraceFilePath,
2770
+ schedulerPlansDirectory,
2771
+ schedulerHookPlansDirectory,
2772
+ schedulerRunsDirectory,
2773
+ recoveryClassificationsDirectory,
2774
+ recoveryRunsDirectory,
2775
+ retryPackagesDirectory,
2776
+ retryRunsDirectory,
2777
+ daemonLoopsDirectory,
2778
+ daemonHeartbeatsDirectory,
2779
+ replyDraftsDirectory,
2780
+ replyReviewsDirectory,
2781
+ replyApprovalsDirectory,
2782
+ replyOutboxDirectory,
2783
+ replySendRunsDirectory,
2784
+ observabilityDirectory,
2785
+ methodologyGatesDirectory,
2786
+ hookIntentsDirectory,
2787
+ hookRunsDirectory,
2788
+ hookHeartbeatsDirectory,
2789
+ subagentDispatchesDirectory,
2790
+ subagentRunResultsDirectory,
2791
+ subagentResultsDirectory,
2792
+ subagentReviewsDirectory,
2793
+ platformCapabilitiesDirectory,
2794
+ platformSessionApprovalsDirectory,
2795
+ platformSessionsDirectory,
2796
+ platformSessionLeasesDirectory,
2797
+ platformSessionResultsDirectory,
2798
+ platformSessionCancellationsDirectory,
2799
+ platformSessionIntakeDirectory,
2800
+ platformSessionReviewsDirectory,
2801
+ sourceChangeCandidatesDirectory,
2802
+ sourceSandboxRunsDirectory,
2803
+ sourceVerificationsDirectory,
2804
+ mergeReadinessDirectory,
2805
+ mergeApprovalsDirectory,
2806
+ mergeAppliesDirectory,
2807
+ plannerRoutesDirectory,
2808
+ plannerPlansDirectory,
2809
+ plannerBriefsDirectory,
2810
+ routerPlansDirectory,
2811
+ routerApprovalsDirectory,
2812
+ orchestratorPlansDirectory,
2813
+ orchestratorDispatchPlansDirectory,
2814
+ evalSuitesDirectory,
2815
+ evalRunsDirectory,
2816
+ evalReportsDirectory,
2817
+ releaseGatesDirectory,
2818
+ feedbackLedgersDirectory,
2819
+ validateSubagentResultArtifact,
2820
+ validateSubagentReviewArtifact,
2821
+ validateHookRunArtifact,
2822
+ validateSubagentSingleShotRunArtifact,
2823
+ validateSubagentDispatchArtifact,
2824
+ validatePlatformCapabilityArtifact,
2825
+ validatePlatformSessionApprovalArtifact,
2826
+ validatePlatformSessionArtifact,
2827
+ validatePlatformSessionCancelArtifact,
2828
+ validatePlatformSessionIntakeArtifact,
2829
+ validatePlatformSessionReviewArtifact,
2830
+ validateSourceChangeCandidateArtifact,
2831
+ validateSourceSandboxRunArtifact,
2832
+ validateSourceVerificationArtifact,
2833
+ validateMergeReadinessArtifact,
2834
+ validateMergeApprovalArtifact,
2835
+ validateMergeApplyArtifact,
2836
+ validatePlannerArtifact,
2837
+ validateRouterArtifact,
2838
+ validateOrchestratorArtifact,
2839
+ validateEvalArtifact,
2840
+ validateReleaseGateArtifact,
2841
+ validateFeedbackLedgerArtifact,
2842
+ });
2843
+
2844
+ runtimeObservabilityCommand = createRuntimeObservabilityCommand({
2845
+ fs,
2846
+ path,
2847
+ process,
2848
+ jsonSchemaVersion,
2849
+ ensureRoot,
2850
+ workflowPath,
2851
+ writeJsonEnvelope,
2852
+ printList,
2853
+ readJsonArtifact,
2854
+ writeStateArtifact,
2855
+ listStateFiles,
2856
+ fileDigest,
2857
+ digestObject,
2858
+ validateCommonArtifactSafety,
2859
+ runtimeTracesDirectory,
2860
+ observabilitySnapshotPath,
2861
+ daemonLoopsDirectory,
2862
+ daemonHeartbeatsDirectory,
2863
+ daemonStopFilePath,
2864
+ listDaemonLoopFiles,
2865
+ listReplyDraftFiles,
2866
+ listReplyApprovalFiles,
2867
+ listReplyOutboxFiles,
2868
+ listReplySendRunFiles,
2869
+ replyDraftsDirectory,
2870
+ replyApprovalsDirectory,
2871
+ replyOutboxDirectory,
2872
+ replySendRunsDirectory,
2873
+ validateReplyArtifact,
2874
+ runtimeTraceReferences,
2875
+ validateRuntimeTraceArtifact,
2876
+ queueScanEnvelope,
2877
+ leaseAuditEnvelope,
2878
+ recoveryEnvelope,
2879
+ retryHealthSummary,
2880
+ });
2881
+
2882
+
2883
+ runtimeGovernanceCommand = createRuntimeGovernanceCommand(createRuntimeGovernanceCommandDeps({
2884
+ core: {
2885
+ fs,
2886
+ path,
2887
+ process,
2888
+ crypto,
2889
+ jsonSchemaVersion,
2890
+ runtimeContractRoot,
2891
+ stateDirectoryName,
2892
+ ensureRoot,
2893
+ stateDirectory,
2894
+ writeJsonEnvelope,
2895
+ printList,
2896
+ stableStringify: stableJson,
2897
+ asList,
2898
+ localJsonFileWithinRoot,
2899
+ },
2900
+ state: {
2901
+ readJsonArtifact,
2902
+ writeStateArtifact,
2903
+ listStateFiles,
2904
+ latestStateFile,
2905
+ safeStateArtifactFilePath,
2906
+ fileDigest,
2907
+ digestObject,
2908
+ validateCommonArtifactSafety,
2909
+ },
2910
+ files: {
2911
+ runtimeTracesDirectory,
2912
+ observabilityDirectory,
2913
+ governanceDirectory,
2914
+ replyReviewsDirectory,
2915
+ subagentDispatchesDirectory,
2916
+ subagentResultsDirectory,
2917
+ subagentReviewsDirectory,
2918
+ hookRunsDirectory,
2919
+ runtimeTraceFilePath,
2920
+ governanceFilePath,
2921
+ governancePrReadinessFilePath,
2922
+ governancePrReviewIntakeFilePath,
2923
+ governanceAnyFilePath,
2924
+ replyReviewFilePath,
2925
+ subagentDispatchFilePath,
2926
+ subagentResultFilePath,
2927
+ subagentReviewFilePath,
2928
+ hookRunFilePath,
2929
+ platformSessionIntakeFilePath,
2930
+ platformSessionReviewFilePath,
2931
+ listReplyReviewFiles,
2932
+ listSubagentDispatchFiles,
2933
+ listSubagentResultFiles,
2934
+ listSubagentReviewFiles,
2935
+ listHookRunFiles,
2936
+ },
2937
+ artifactValidation: {
2938
+ validateReplyArtifact,
2939
+ validateObservabilityArtifact,
2940
+ validateRuntimeTraceArtifact,
2941
+ validateSubagentDispatchArtifact,
2942
+ validateSubagentResultArtifact,
2943
+ validateSubagentReviewArtifact,
2944
+ validateHookRunArtifact,
2945
+ validatePlatformSessionIntakeArtifact,
2946
+ validatePlatformSessionReviewArtifact,
2947
+ },
2948
+ catalogs: {
2949
+ runtimeTraceGroups,
2950
+ runtimePolicyCatalogDigest,
2951
+ runtimePolicyCatalogSnapshot,
2952
+ evalCatalogDefinition,
2953
+ runtimeCapabilityRegistry,
2954
+ runtimeCapabilityRegistryDriftGuard,
2955
+ runtimeCapabilityRegistryInvariants,
2956
+ runtimeAutomationReadinessMatrix,
2957
+ runtimeSkillRuntimeTraceabilityMap,
2958
+ },
2959
+ experience: {
2960
+ runtimeSuperpowersGapMatrix,
2961
+ runtimeSuperpowersGapDigestPayload,
2962
+ digestSuperpowersGapMatrix,
2963
+ runtimeSuperpowersComparisonMatrix,
2964
+ runtimeSuperpowersComparisonDigestPayload,
2965
+ digestSuperpowersComparison,
2966
+ runtimeSuperpowersRegressionGuard,
2967
+ runtimeExperienceFrictionMatrix,
2968
+ runtimeExperienceFrictionDigestPayload,
2969
+ digestExperienceFriction,
2970
+ runtimeExperienceRegressionDashboard,
2971
+ runtimeExperienceRegressionDashboardDigestPayload,
2972
+ digestExperienceRegressionDashboard,
2973
+ },
2974
+ commands: {
2975
+ runExperienceUpgradePrioritizerCommand,
2976
+ runSuperpowersParityScorecardCommand,
2977
+ runContributorGuardrailCommand,
2978
+ runSubagentPermissionCommand,
2979
+ },
2980
+ }));
2981
+
2982
+ const runtimeWorkflowLedgerCommand = createRuntimeWorkflowLedgerCommand({
2983
+ fs,
2984
+ path,
2985
+ process,
2986
+ ensureRoot,
2987
+ readWorkflow,
2988
+ writeJsonEnvelope,
2989
+ validateState,
2990
+ tasksFromState,
2991
+ jsonTaskSummaries,
2992
+ taskSummaryStatus,
2993
+ taskReadinessSummaryLine,
2994
+ reviewSummaryStatus,
2995
+ generateArtifacts,
2996
+ generateTaskArtifacts,
2997
+ filterTaskArtifacts,
2998
+ nextAdvice,
2999
+ stateDirectory,
3000
+ stateDirectoryName,
3001
+ taskArtifactsDirectoryName,
3002
+ artifactPath,
3003
+ taskDirectory,
3004
+ taskArtifactPath,
3005
+ confirmDispatchEnvelope,
3006
+ writeDispatchEvent,
3007
+ printConfirmDispatch,
3008
+ dispatchIntentEnvelope,
3009
+ printDispatchIntent,
3010
+ });
3011
+ const { runArtifacts, runNext, runReset, runTasks } = runtimeWorkflowLedgerCommand;
3012
+
3013
+ runRuntimeCli({
3014
+ argv: process.argv.slice(2),
3015
+ handlerDeps: createRuntimeCliHandlerDeps({
3016
+ commands: {
3017
+ runEntry,
3018
+ runAdvice,
3019
+ runStatus,
3020
+ runValidateHandoff,
3021
+ runRecordHandoff,
3022
+ runNext,
3023
+ runDispatches,
3024
+ runExecute,
3025
+ runExecutions,
3026
+ runActions,
3027
+ runApprovals,
3028
+ runPolicies,
3029
+ runQueue,
3030
+ runLeases,
3031
+ runRecovery,
3032
+ runObservability,
3033
+ runScheduler,
3034
+ runSchedulerPolicies,
3035
+ runRetry,
3036
+ runDaemon,
3037
+ runReply,
3038
+ runTraces,
3039
+ runGovernance,
3040
+ runAutomation,
3041
+ runMethodology,
3042
+ runVerification,
3043
+ runReview,
3044
+ runCompletion,
3045
+ runBootstrap,
3046
+ runOnboarding,
3047
+ runLearning,
3048
+ runHooks,
3049
+ runSubagents,
3050
+ runSdd,
3051
+ runWorkspace,
3052
+ runPlatforms,
3053
+ runSource,
3054
+ runMerge,
3055
+ runPlanner,
3056
+ runRouter,
3057
+ runOrchestrator,
3058
+ runEvals,
3059
+ runFeedback,
3060
+ runArtifacts,
3061
+ runTasks,
3062
+ runReset,
3063
+ },
3064
+ wrappers: runtimeCommandWrapperDeps({
3065
+ ensureRoot,
3066
+ humanFriendlyCloseLoopEnvelope,
3067
+ humanFriendlyNextEvidenceEnvelope,
3068
+ nextActionConsoleEnvelope,
3069
+ entryTriggerDisciplineEnvelope,
3070
+ runEntryTriggerTighteningCommand,
3071
+ runNextActionEvidencePromptsCommand,
3072
+ closeLoopDashboardEnvelope,
3073
+ workflowLoopContractEnvelope,
3074
+ workflowCockpitEnvelope,
3075
+ workflowReceiptEnvelope,
3076
+ workflowStartEnvelope,
3077
+ completionEvidenceBundleEnvelope,
3078
+ digestObject,
3079
+ tokenSaviorBudgetEnvelope,
3080
+ learningAdviceEnvelope,
3081
+ progressiveEntryUxEnvelope,
3082
+ workflowSequenceEnvelope,
3083
+ printHumanFriendlyAlias,
3084
+ printNextActionConsole,
3085
+ printEntryTriggerDiscipline,
3086
+ printCloseLoopDashboard,
3087
+ printWorkflowLoopContract,
3088
+ printWorkflowCockpit,
3089
+ printWorkflowReceipt,
3090
+ printWorkflowStart,
3091
+ printSessionStart,
3092
+ printSkillSelect,
3093
+ printSessionCheckpoint,
3094
+ printSessionHandoff,
3095
+ printSessionResume,
3096
+ printSessionClose,
3097
+ printWorkflowRunPlan,
3098
+ printEntryRuntimeSummary,
3099
+ printProgressiveEntryUx,
3100
+ printWorkflowSequence,
3101
+ printList,
3102
+ printTokenSaviorBudget,
3103
+ tokenAdviceEnvelope,
3104
+ tokenAuditEnvelope,
3105
+ tokenCompactionEnvelope,
3106
+ tokenMetricsEnvelope,
3107
+ tokenProfileEnvelope,
3108
+ tokenRewritePreviewEnvelope,
3109
+ tokenSaviorBudgetEnvelope,
3110
+ writeJsonEnvelope,
3111
+ spawnSync,
3112
+ writeTokenCompaction,
3113
+ writeTokenMetrics,
3114
+ releaseCommandDeps,
3115
+ }),
3116
+ }),
3117
+ });