@warpgogol/forge 9.1.0 → 9.2.3

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 (380) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +15 -8
  3. package/README.uk.md +15 -8
  4. package/bin/cli.ts +3 -2
  5. package/dist/bin/cli.js +3 -2
  6. package/dist/bin/cli.js.map +1 -1
  7. package/dist/os/core/core.module.d.ts.map +1 -1
  8. package/dist/os/core/core.module.js +6 -4
  9. package/dist/os/core/core.module.js.map +1 -1
  10. package/dist/os/flow/branch-name.d.ts +56 -0
  11. package/dist/os/flow/branch-name.d.ts.map +1 -0
  12. package/dist/os/flow/branch-name.js +108 -0
  13. package/dist/os/flow/branch-name.js.map +1 -0
  14. package/dist/os/flow/digest.d.ts +73 -0
  15. package/dist/os/flow/digest.d.ts.map +1 -0
  16. package/dist/os/flow/digest.js +634 -0
  17. package/dist/os/flow/digest.js.map +1 -0
  18. package/dist/os/flow/flow.module.d.ts +3 -0
  19. package/dist/os/flow/flow.module.d.ts.map +1 -0
  20. package/dist/os/flow/flow.module.js +716 -0
  21. package/dist/os/flow/flow.module.js.map +1 -0
  22. package/dist/os/flow/git.d.ts +68 -0
  23. package/dist/os/flow/git.d.ts.map +1 -0
  24. package/dist/os/flow/git.js +257 -0
  25. package/dist/os/flow/git.js.map +1 -0
  26. package/dist/os/flow/guard-files.d.ts +50 -0
  27. package/dist/os/flow/guard-files.d.ts.map +1 -0
  28. package/dist/os/flow/guard-files.js +147 -0
  29. package/dist/os/flow/guard-files.js.map +1 -0
  30. package/dist/os/flow/handlers/flow-backmerge.d.ts +27 -0
  31. package/dist/os/flow/handlers/flow-backmerge.d.ts.map +1 -0
  32. package/dist/os/flow/handlers/flow-backmerge.js +332 -0
  33. package/dist/os/flow/handlers/flow-backmerge.js.map +1 -0
  34. package/dist/os/flow/handlers/flow-check.d.ts +42 -0
  35. package/dist/os/flow/handlers/flow-check.d.ts.map +1 -0
  36. package/dist/os/flow/handlers/flow-check.js +347 -0
  37. package/dist/os/flow/handlers/flow-check.js.map +1 -0
  38. package/dist/os/flow/handlers/flow-cut.d.ts +63 -0
  39. package/dist/os/flow/handlers/flow-cut.d.ts.map +1 -0
  40. package/dist/os/flow/handlers/flow-cut.js +636 -0
  41. package/dist/os/flow/handlers/flow-cut.js.map +1 -0
  42. package/dist/os/flow/handlers/flow-digest.d.ts +5 -0
  43. package/dist/os/flow/handlers/flow-digest.d.ts.map +1 -0
  44. package/dist/os/flow/handlers/flow-digest.js +110 -0
  45. package/dist/os/flow/handlers/flow-digest.js.map +1 -0
  46. package/dist/os/flow/handlers/flow-discard.d.ts +22 -0
  47. package/dist/os/flow/handlers/flow-discard.d.ts.map +1 -0
  48. package/dist/os/flow/handlers/flow-discard.js +200 -0
  49. package/dist/os/flow/handlers/flow-discard.js.map +1 -0
  50. package/dist/os/flow/handlers/flow-fix.d.ts +47 -0
  51. package/dist/os/flow/handlers/flow-fix.d.ts.map +1 -0
  52. package/dist/os/flow/handlers/flow-fix.js +443 -0
  53. package/dist/os/flow/handlers/flow-fix.js.map +1 -0
  54. package/dist/os/flow/handlers/flow-hold.d.ts +32 -0
  55. package/dist/os/flow/handlers/flow-hold.d.ts.map +1 -0
  56. package/dist/os/flow/handlers/flow-hold.js +359 -0
  57. package/dist/os/flow/handlers/flow-hold.js.map +1 -0
  58. package/dist/os/flow/handlers/flow-install.d.ts +92 -0
  59. package/dist/os/flow/handlers/flow-install.d.ts.map +1 -0
  60. package/dist/os/flow/handlers/flow-install.js +883 -0
  61. package/dist/os/flow/handlers/flow-install.js.map +1 -0
  62. package/dist/os/flow/handlers/flow-integrate.d.ts +35 -0
  63. package/dist/os/flow/handlers/flow-integrate.d.ts.map +1 -0
  64. package/dist/os/flow/handlers/flow-integrate.js +419 -0
  65. package/dist/os/flow/handlers/flow-integrate.js.map +1 -0
  66. package/dist/os/flow/handlers/flow-open.d.ts +63 -0
  67. package/dist/os/flow/handlers/flow-open.d.ts.map +1 -0
  68. package/dist/os/flow/handlers/flow-open.js +294 -0
  69. package/dist/os/flow/handlers/flow-open.js.map +1 -0
  70. package/dist/os/flow/handlers/flow-push.d.ts +22 -0
  71. package/dist/os/flow/handlers/flow-push.d.ts.map +1 -0
  72. package/dist/os/flow/handlers/flow-push.js +306 -0
  73. package/dist/os/flow/handlers/flow-push.js.map +1 -0
  74. package/dist/os/flow/handlers/flow-status.d.ts +65 -0
  75. package/dist/os/flow/handlers/flow-status.d.ts.map +1 -0
  76. package/dist/os/flow/handlers/flow-status.js +193 -0
  77. package/dist/os/flow/handlers/flow-status.js.map +1 -0
  78. package/dist/os/flow/handlers/flow-unhold.d.ts +20 -0
  79. package/dist/os/flow/handlers/flow-unhold.d.ts.map +1 -0
  80. package/dist/os/flow/handlers/flow-unhold.js +158 -0
  81. package/dist/os/flow/handlers/flow-unhold.js.map +1 -0
  82. package/dist/os/flow/handlers/flow-version.d.ts +39 -0
  83. package/dist/os/flow/handlers/flow-version.d.ts.map +1 -0
  84. package/dist/os/flow/handlers/flow-version.js +122 -0
  85. package/dist/os/flow/handlers/flow-version.js.map +1 -0
  86. package/dist/os/flow/index.d.ts +30 -0
  87. package/dist/os/flow/index.d.ts.map +1 -0
  88. package/dist/os/flow/index.js +83 -0
  89. package/dist/os/flow/index.js.map +1 -0
  90. package/dist/os/flow/line-version.d.ts +23 -0
  91. package/dist/os/flow/line-version.d.ts.map +1 -0
  92. package/dist/os/flow/line-version.js +83 -0
  93. package/dist/os/flow/line-version.js.map +1 -0
  94. package/dist/os/flow/locks.d.ts +34 -0
  95. package/dist/os/flow/locks.d.ts.map +1 -0
  96. package/dist/os/flow/locks.js +147 -0
  97. package/dist/os/flow/locks.js.map +1 -0
  98. package/dist/os/flow/markers.d.ts +49 -0
  99. package/dist/os/flow/markers.d.ts.map +1 -0
  100. package/dist/os/flow/markers.js +112 -0
  101. package/dist/os/flow/markers.js.map +1 -0
  102. package/dist/os/flow/publish.d.ts +28 -0
  103. package/dist/os/flow/publish.d.ts.map +1 -0
  104. package/dist/os/flow/publish.js +153 -0
  105. package/dist/os/flow/publish.js.map +1 -0
  106. package/dist/os/flow/registry.d.ts +142 -0
  107. package/dist/os/flow/registry.d.ts.map +1 -0
  108. package/dist/os/flow/registry.js +198 -0
  109. package/dist/os/flow/registry.js.map +1 -0
  110. package/dist/os/flow/release-level.d.ts +23 -0
  111. package/dist/os/flow/release-level.d.ts.map +1 -0
  112. package/dist/os/flow/release-level.js +102 -0
  113. package/dist/os/flow/release-level.js.map +1 -0
  114. package/dist/os/flow/release-lines.d.ts +25 -0
  115. package/dist/os/flow/release-lines.d.ts.map +1 -0
  116. package/dist/os/flow/release-lines.js +172 -0
  117. package/dist/os/flow/release-lines.js.map +1 -0
  118. package/dist/os/flow/release-tags.d.ts +72 -0
  119. package/dist/os/flow/release-tags.d.ts.map +1 -0
  120. package/dist/os/flow/release-tags.js +166 -0
  121. package/dist/os/flow/release-tags.js.map +1 -0
  122. package/dist/os/flow/repo-kind.d.ts +41 -0
  123. package/dist/os/flow/repo-kind.d.ts.map +1 -0
  124. package/dist/os/flow/repo-kind.js +92 -0
  125. package/dist/os/flow/repo-kind.js.map +1 -0
  126. package/dist/os/flow/scripts.d.ts +20 -0
  127. package/dist/os/flow/scripts.d.ts.map +1 -0
  128. package/dist/os/flow/scripts.js +49 -0
  129. package/dist/os/flow/scripts.js.map +1 -0
  130. package/dist/os/flow/semver.d.ts +21 -0
  131. package/dist/os/flow/semver.d.ts.map +1 -0
  132. package/dist/os/flow/semver.js +73 -0
  133. package/dist/os/flow/semver.js.map +1 -0
  134. package/dist/os/flow/tests/helpers.d.ts +52 -0
  135. package/dist/os/flow/tests/helpers.d.ts.map +1 -0
  136. package/dist/os/flow/tests/helpers.js +189 -0
  137. package/dist/os/flow/tests/helpers.js.map +1 -0
  138. package/dist/os/flow/version-files.d.ts +21 -0
  139. package/dist/os/flow/version-files.d.ts.map +1 -0
  140. package/dist/os/flow/version-files.js +94 -0
  141. package/dist/os/flow/version-files.js.map +1 -0
  142. package/dist/os/flow/worktree-path.d.ts +31 -0
  143. package/dist/os/flow/worktree-path.d.ts.map +1 -0
  144. package/dist/os/flow/worktree-path.js +80 -0
  145. package/dist/os/flow/worktree-path.js.map +1 -0
  146. package/dist/os/mission/handlers/archive.d.ts.map +1 -1
  147. package/dist/os/mission/handlers/archive.js +43 -6
  148. package/dist/os/mission/handlers/archive.js.map +1 -1
  149. package/dist/os/program/handlers/seal.d.ts.map +1 -1
  150. package/dist/os/program/handlers/seal.js +1 -1
  151. package/dist/os/program/handlers/seal.js.map +1 -1
  152. package/dist/os/program/handlers/validate.d.ts.map +1 -1
  153. package/dist/os/program/handlers/validate.js +1 -1
  154. package/dist/os/program/handlers/validate.js.map +1 -1
  155. package/dist/os/program/program.module.d.ts.map +1 -1
  156. package/dist/os/program/program.module.js +2 -1
  157. package/dist/os/program/program.module.js.map +1 -1
  158. package/dist/os/program/schemas.d.ts +4 -6
  159. package/dist/os/program/schemas.d.ts.map +1 -1
  160. package/dist/os/program/schemas.js +16 -6
  161. package/dist/os/program/schemas.js.map +1 -1
  162. package/dist/os/program/state.d.ts +0 -1
  163. package/dist/os/program/state.d.ts.map +1 -1
  164. package/dist/os/program/state.js +1 -7
  165. package/dist/os/program/state.js.map +1 -1
  166. package/dist/os/rfc/acceptance.d.ts +21 -0
  167. package/dist/os/rfc/acceptance.d.ts.map +1 -1
  168. package/dist/os/rfc/acceptance.js +62 -13
  169. package/dist/os/rfc/acceptance.js.map +1 -1
  170. package/dist/os/rfc/frontmatter-io.d.ts +19 -0
  171. package/dist/os/rfc/frontmatter-io.d.ts.map +1 -1
  172. package/dist/os/rfc/frontmatter-io.js +65 -12
  173. package/dist/os/rfc/frontmatter-io.js.map +1 -1
  174. package/dist/os/rfc/handlers/validate-rules.d.ts +2 -5
  175. package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
  176. package/dist/os/rfc/handlers/validate-rules.js +10 -8
  177. package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
  178. package/dist/os/rfc/handlers/validate.d.ts.map +1 -1
  179. package/dist/os/rfc/handlers/validate.js +15 -5
  180. package/dist/os/rfc/handlers/validate.js.map +1 -1
  181. package/dist/os/rfc/index.d.ts +2 -2
  182. package/dist/os/rfc/index.d.ts.map +1 -1
  183. package/dist/os/rfc/index.js +5 -2
  184. package/dist/os/rfc/index.js.map +1 -1
  185. package/dist/os/rfc/probe-batch.d.ts +71 -0
  186. package/dist/os/rfc/probe-batch.d.ts.map +1 -0
  187. package/dist/os/rfc/probe-batch.js +251 -0
  188. package/dist/os/rfc/probe-batch.js.map +1 -0
  189. package/dist/os/rfc/rfc.module.d.ts.map +1 -1
  190. package/dist/os/rfc/rfc.module.js +16 -2
  191. package/dist/os/rfc/rfc.module.js.map +1 -1
  192. package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
  193. package/dist/os/rfc/verification-evidence.js +21 -10
  194. package/dist/os/rfc/verification-evidence.js.map +1 -1
  195. package/dist/os/rfc/verification-refresh.d.ts.map +1 -1
  196. package/dist/os/rfc/verification-refresh.js +20 -13
  197. package/dist/os/rfc/verification-refresh.js.map +1 -1
  198. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +1 -1
  199. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +21 -7
  200. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +1 -1
  201. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts.map +1 -1
  202. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js +1 -1
  203. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js.map +1 -1
  204. package/dist/os/werkstatt/werkstatt.module.d.ts.map +1 -1
  205. package/dist/os/werkstatt/werkstatt.module.js +2 -82
  206. package/dist/os/werkstatt/werkstatt.module.js.map +1 -1
  207. package/dist/src/config/forge-config.d.ts +0 -3
  208. package/dist/src/config/forge-config.d.ts.map +1 -1
  209. package/dist/src/config/forge-config.js +2 -4
  210. package/dist/src/config/forge-config.js.map +1 -1
  211. package/dist/src/index.d.ts +3 -0
  212. package/dist/src/index.d.ts.map +1 -1
  213. package/dist/src/index.js +2 -0
  214. package/dist/src/index.js.map +1 -1
  215. package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
  216. package/dist/src/onboarding/agents-generate.js +49 -4
  217. package/dist/src/onboarding/agents-generate.js.map +1 -1
  218. package/dist/src/onboarding/create.d.ts +13 -0
  219. package/dist/src/onboarding/create.d.ts.map +1 -1
  220. package/dist/src/onboarding/create.js +95 -9
  221. package/dist/src/onboarding/create.js.map +1 -1
  222. package/dist/src/onboarding/doctor.d.ts.map +1 -1
  223. package/dist/src/onboarding/doctor.js +2 -47
  224. package/dist/src/onboarding/doctor.js.map +1 -1
  225. package/dist/src/onboarding/upgrade.d.ts +5 -0
  226. package/dist/src/onboarding/upgrade.d.ts.map +1 -1
  227. package/dist/src/onboarding/upgrade.js +70 -1
  228. package/dist/src/onboarding/upgrade.js.map +1 -1
  229. package/dist/src/types.d.ts +9 -0
  230. package/dist/src/types.d.ts.map +1 -1
  231. package/dist/src/types.js +2 -2
  232. package/docs/branch-model.md +98 -0
  233. package/docs/maintainers/publishing.md +14 -6
  234. package/docs/reference/cli.md +125 -0
  235. package/docs/reference/profiles.md +1 -0
  236. package/os/core/core.module.ts +7 -4
  237. package/os/flow/assets/flow-guard.sh +176 -0
  238. package/os/flow/branch-name.ts +139 -0
  239. package/os/flow/digest.ts +761 -0
  240. package/os/flow/flow.module.ts +740 -0
  241. package/os/flow/git.ts +342 -0
  242. package/os/flow/guard-files.ts +172 -0
  243. package/os/flow/handlers/flow-backmerge.ts +488 -0
  244. package/os/flow/handlers/flow-check.ts +450 -0
  245. package/os/flow/handlers/flow-cut.ts +912 -0
  246. package/os/flow/handlers/flow-digest.ts +124 -0
  247. package/os/flow/handlers/flow-discard.ts +301 -0
  248. package/os/flow/handlers/flow-fix.ts +597 -0
  249. package/os/flow/handlers/flow-hold.ts +500 -0
  250. package/os/flow/handlers/flow-install.ts +1185 -0
  251. package/os/flow/handlers/flow-integrate.ts +607 -0
  252. package/os/flow/handlers/flow-open.ts +447 -0
  253. package/os/flow/handlers/flow-push.ts +373 -0
  254. package/os/flow/handlers/flow-status.ts +283 -0
  255. package/os/flow/handlers/flow-unhold.ts +220 -0
  256. package/os/flow/handlers/flow-version.ts +196 -0
  257. package/os/flow/index.ts +102 -0
  258. package/os/flow/line-version.ts +113 -0
  259. package/os/flow/locks.ts +177 -0
  260. package/os/flow/markers.ts +135 -0
  261. package/os/flow/publish.ts +201 -0
  262. package/os/flow/registry.ts +266 -0
  263. package/os/flow/release-level.ts +139 -0
  264. package/os/flow/release-lines.ts +208 -0
  265. package/os/flow/release-tags.ts +231 -0
  266. package/os/flow/repo-kind.ts +117 -0
  267. package/os/flow/scripts.ts +73 -0
  268. package/os/flow/semver.ts +82 -0
  269. package/os/flow/tests/branch-name.test.ts +136 -0
  270. package/os/flow/tests/fixtures/branch-names.yaml +56 -0
  271. package/os/flow/tests/flow-backmerge.test.ts +267 -0
  272. package/os/flow/tests/flow-check-version.test.ts +138 -0
  273. package/os/flow/tests/flow-check.test.ts +213 -0
  274. package/os/flow/tests/flow-cut.rerun.test.ts +95 -0
  275. package/os/flow/tests/flow-cut.test.ts +319 -0
  276. package/os/flow/tests/flow-digest.test.ts +313 -0
  277. package/os/flow/tests/flow-discard.test.ts +220 -0
  278. package/os/flow/tests/flow-fix.test.ts +359 -0
  279. package/os/flow/tests/flow-guard-merge.test.ts +100 -0
  280. package/os/flow/tests/flow-guard-parity.test.ts +115 -0
  281. package/os/flow/tests/flow-guard-push.test.ts +100 -0
  282. package/os/flow/tests/flow-guard.test.ts +135 -0
  283. package/os/flow/tests/flow-hold.test.ts +465 -0
  284. package/os/flow/tests/flow-install-baseline.rerun.test.ts +73 -0
  285. package/os/flow/tests/flow-install-baseline.test.ts +164 -0
  286. package/os/flow/tests/flow-install-markers.test.ts +161 -0
  287. package/os/flow/tests/flow-install.rerun.test.ts +212 -0
  288. package/os/flow/tests/flow-install.test.ts +330 -0
  289. package/os/flow/tests/flow-integrate.rerun.test.ts +92 -0
  290. package/os/flow/tests/flow-integrate.test.ts +229 -0
  291. package/os/flow/tests/flow-open.test.ts +200 -0
  292. package/os/flow/tests/flow-push-publish.test.ts +282 -0
  293. package/os/flow/tests/flow-push.test.ts +160 -0
  294. package/os/flow/tests/flow-stale.test.ts +136 -0
  295. package/os/flow/tests/flow-status.test.ts +93 -0
  296. package/os/flow/tests/flow-version-level.test.ts +116 -0
  297. package/os/flow/tests/flow-version.test.ts +169 -0
  298. package/os/flow/tests/helpers.ts +235 -0
  299. package/os/flow/tests/is-flow-adopted.test.ts +71 -0
  300. package/os/flow/tests/registry.test.ts +150 -0
  301. package/os/flow/tests/repository-line-version.test.ts +100 -0
  302. package/os/flow/tests/scripts.test.ts +97 -0
  303. package/os/flow/tests/state-roots.test.ts +127 -0
  304. package/os/flow/tests/version-files.test.ts +145 -0
  305. package/os/flow/version-files.ts +115 -0
  306. package/os/flow/worktree-path.ts +107 -0
  307. package/os/mission/handlers/archive.test.ts +27 -0
  308. package/os/mission/handlers/archive.ts +46 -6
  309. package/os/program/handlers/seal.ts +1 -1
  310. package/os/program/handlers/validate.ts +1 -1
  311. package/os/program/program.module.ts +2 -1
  312. package/os/program/schemas.ts +51 -34
  313. package/os/program/state.ts +1 -9
  314. package/os/rfc/acceptance.ts +84 -19
  315. package/os/rfc/frontmatter-io.ts +78 -12
  316. package/os/rfc/handlers/implement-stamp-stale.test.ts +22 -0
  317. package/os/rfc/handlers/validate-rules.test.ts +9 -6
  318. package/os/rfc/handlers/validate-rules.ts +12 -10
  319. package/os/rfc/handlers/validate.ts +17 -5
  320. package/os/rfc/index.ts +13 -1
  321. package/os/rfc/probe-batch.ts +329 -0
  322. package/os/rfc/rfc.module.ts +19 -2
  323. package/os/rfc/verification-emit-check.test.ts +22 -0
  324. package/os/rfc/verification-emit-freshness.test.ts +22 -0
  325. package/os/rfc/verification-emit.test.ts +22 -0
  326. package/os/rfc/verification-evidence.ts +21 -16
  327. package/os/rfc/verification-refresh.test.ts +22 -0
  328. package/os/rfc/verification-refresh.ts +20 -18
  329. package/os/rfc/verifier/rfc-1333/imp12-binding.acceptance.test.ts +9 -0
  330. package/os/werkstatt/handlers/werkstatt-lock-recover.ts +22 -5
  331. package/os/werkstatt/handlers/werkstatt-operation-validate.ts +1 -1
  332. package/os/werkstatt/werkstatt.module.ts +2 -85
  333. package/package.json +17 -1
  334. package/profiles/forge-shell.yaml +22 -10
  335. package/profiles/godot-game.yaml +24 -13
  336. package/profiles/knowledge.yaml +19 -0
  337. package/profiles/phaser-game.yaml +25 -13
  338. package/profiles/site-workshop.yaml +27 -10
  339. package/profiles/typescript.yaml +26 -9
  340. package/skills/fo/fo-session-retro/SKILL.md +18 -7
  341. package/skills/fo/fo-step-commit/SKILL.md +2 -1
  342. package/src/config/forge-config.ts +2 -6
  343. package/src/index.ts +8 -0
  344. package/src/onboarding/agents-generate.ts +49 -5
  345. package/src/onboarding/create.ts +101 -9
  346. package/src/onboarding/doctor.ts +2 -51
  347. package/src/onboarding/upgrade.ts +86 -1
  348. package/src/tests/agents-generate-flow.test.ts +132 -0
  349. package/src/tests/create-flow.test.ts +114 -0
  350. package/src/tests/create.test.ts +22 -21
  351. package/src/tests/doctor-autonomy.test.ts +2 -1
  352. package/src/tests/implement-stamp.test.ts +26 -3
  353. package/src/tests/profile-flow-hooks.test.ts +77 -0
  354. package/src/tests/program-schemas.test.ts +66 -6
  355. package/src/tests/program-spec-node.test.ts +1 -5
  356. package/src/tests/rfc-evidence-sync.test.ts +22 -0
  357. package/src/tests/rfc-implement-stamp-governance.test.ts +25 -1
  358. package/src/tests/rfc-verification-verdict-ingest.test.ts +22 -0
  359. package/src/tests/upgrade-flow.test.ts +174 -0
  360. package/src/types.ts +11 -2
  361. package/dist/os/werkstatt/handlers/session-close.d.ts +0 -13
  362. package/dist/os/werkstatt/handlers/session-close.d.ts.map +0 -1
  363. package/dist/os/werkstatt/handlers/session-close.js +0 -56
  364. package/dist/os/werkstatt/handlers/session-close.js.map +0 -1
  365. package/dist/os/werkstatt/handlers/session-engine.d.ts +0 -3
  366. package/dist/os/werkstatt/handlers/session-engine.d.ts.map +0 -1
  367. package/dist/os/werkstatt/handlers/session-engine.js +0 -28
  368. package/dist/os/werkstatt/handlers/session-engine.js.map +0 -1
  369. package/dist/os/werkstatt/handlers/session-open.d.ts +0 -10
  370. package/dist/os/werkstatt/handlers/session-open.d.ts.map +0 -1
  371. package/dist/os/werkstatt/handlers/session-open.js +0 -46
  372. package/dist/os/werkstatt/handlers/session-open.js.map +0 -1
  373. package/dist/os/werkstatt/handlers/session-status.d.ts +0 -9
  374. package/dist/os/werkstatt/handlers/session-status.d.ts.map +0 -1
  375. package/dist/os/werkstatt/handlers/session-status.js +0 -34
  376. package/dist/os/werkstatt/handlers/session-status.js.map +0 -1
  377. package/os/werkstatt/handlers/session-close.ts +0 -82
  378. package/os/werkstatt/handlers/session-engine.ts +0 -34
  379. package/os/werkstatt/handlers/session-open.ts +0 -68
  380. package/os/werkstatt/handlers/session-status.ts +0 -55
@@ -12,7 +12,6 @@ a JSON evidence envelope to docs/rfcs/verification/<slug>.generated.yaml.
12
12
  </non-goals>
13
13
  </MODULE_CONTRACT>
14
14
  <CHANGE_SUMMARY>
15
- <item>RFC-1391: make the formal verification tier checker-bound (RFC-1391)</item>
16
15
  <item>RFC-1391: unblock evidence emission for proof-probe RFCs (RFC-1391)
17
16
 
18
17
  probeArtifactCandidates lacked a `proof` branch — the default threw
@@ -32,7 +31,10 @@ workspace; the exhaustive entry dispatches per packageManager; proved runs
32
31
  record log, counterexample stays the refuted-path record.</item>
33
32
  <item>RFC-1453: executed outcome probes, IMP-14 surface gate, outcome.serve + V-47/V-48</item>
34
33
  <item>RFC-1458: emit requirement-mapped verdict events from deploy.smoke.run</item>
35
- <history>RFC-0330, RFC-0999, RFC-1237, RFC-1249, RFC-1271, RFC-1320, RFC-1330, RFC-1334, RFC-1372</history>
34
+ <item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
35
+
36
+ runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
37
+ <history>RFC-0330, RFC-0999, RFC-1237, RFC-1249, RFC-1271, RFC-1320, RFC-1330, RFC-1334, RFC-1372, RFC-1391</history>
36
38
  </CHANGE_SUMMARY>
37
39
  */
38
40
 
@@ -40,15 +42,14 @@ import { execFile } from "../../src/utils/sync-fs.ts";
40
42
  import { ambientIo, resolveIo } from "../../src/utils/io.ts";
41
43
 
42
44
  import { join, relative } from "node:path";
43
- import { performance } from "node:perf_hooks";
44
45
  import { byteHash } from "../../src/utils/hash.ts";
45
46
 
46
- import { runProbe } from "./acceptance.ts";
47
+ import { runProbeSet } from "./acceptance.ts";
47
48
  import { createOutcomeSession } from "./outcome-probe.ts";
48
49
  import { attachProbeOrigins } from "./verification-origin.ts";
49
50
  import { attachVerdictEvidence } from "./verification-verdicts.ts";
50
51
  import { EVIDENCE_SYNC_STEPS } from "./handlers/rfc-evidence-sync.ts";
51
- import { listRfcFiles, readAndParseRfc } from "./frontmatter-io.ts";
52
+ import { listRfcFiles, readRfcFrontmatter } from "./frontmatter-io.ts";
52
53
  import { generatedHeaderFields } from "../../src/utils/generated-marker.ts";
53
54
  import { parse as yamlParse, stringify as yamlStringify } from "yaml";
54
55
  import { RFC_DIR } from "./types.ts";
@@ -514,7 +515,9 @@ export async function runRfcVerificationEmit(
514
515
  checkEntry?: NonNullable<RfcVerificationEmitResult["check"]>[number];
515
516
  diagnostic?: Diagnostic;
516
517
  }> => {
517
- const parsedFile = await readAndParseRfc(rfcDirPath, fileName);
518
+ // RFC-1489: emit reads frontmatter only — the body is re-read separately
519
+ // below for freshness/artifact checks, never through this scan.
520
+ const parsedFile = await readRfcFrontmatter(rfcDirPath, fileName);
518
521
  if (!parsedFile) return {};
519
522
  if ("error" in parsedFile) return {};
520
523
  const fm = parsedFile.parsed.frontmatter;
@@ -554,16 +557,18 @@ export async function runRfcVerificationEmit(
554
557
  const rfcMarkdown = await io.readFile(rfcFilePath);
555
558
  const emittedAt = new Date().toISOString();
556
559
 
557
- for (const probe of probes) {
558
- const start = performance.now();
559
- const result = await runProbe(
560
- probe,
561
- workspaceRoot,
562
- context.commandRegistry,
563
- context.forgeRoot,
564
- outcomeSession,
565
- );
566
- const durationMs = Math.round(performance.now() - start);
560
+ // RFC-1489: batch-compatible test probes share one Vitest run via
561
+ // runProbeSet; `--no-batch` forces the legacy per-probe path.
562
+ const { results: setResults, durationsMs } = await runProbeSet(probes, {
563
+ workspaceRoot,
564
+ commandRegistry: context.commandRegistry,
565
+ forgeRoot: context.forgeRoot,
566
+ outcomeSession,
567
+ noBatch: input.flags["no-batch"] === true,
568
+ });
569
+ for (const [probeIndex, probe] of probes.entries()) {
570
+ const result = setResults[probeIndex]!;
571
+ const durationMs = durationsMs[probeIndex]!;
567
572
  probeRecords.push({
568
573
  probe,
569
574
  ok: result.ok,
@@ -17,6 +17,9 @@ without verdict/hashes and trip RFC-IMP-13 on next stamp; mirrored the emit
17
17
  spread and pinned it with a regression test. proof.check pretty output now
18
18
  prints the persisted log; every exhaustive verdict path carries vitest
19
19
  output as log.</item>
20
+ <item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
21
+
22
+ runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
20
23
  </CHANGE_SUMMARY>
21
24
  */
22
25
 
@@ -38,6 +41,25 @@ const { mockRunProbe, mockCaptureGitContext, mockGetKernelVersion } = vi.hoisted
38
41
 
39
42
  vi.mock("./acceptance.ts", () => ({
40
43
  runProbe: mockRunProbe,
44
+ // RFC-1489: refresh drives runProbeSet — the shim preserves the per-probe
45
+ // mock contract so these tests observe the same probe calls as before.
46
+ runProbeSet: async (probes: unknown[], opts: Record<string, unknown>) => {
47
+ const results = [];
48
+ const durationsMs = [];
49
+ for (const p of probes) {
50
+ results.push(
51
+ await mockRunProbe(
52
+ p,
53
+ opts.workspaceRoot,
54
+ opts.commandRegistry,
55
+ opts.forgeRoot,
56
+ opts.outcomeSession,
57
+ ),
58
+ );
59
+ durationsMs.push(0);
60
+ }
61
+ return { results, durationsMs };
62
+ },
41
63
  }));
42
64
 
43
65
  vi.mock("./verification-evidence.ts", async (importOriginal) => {
@@ -13,10 +13,6 @@ lastRefreshedAt, replaces probes[] with fresh results. Supports --id,
13
13
  </non-goals>
14
14
  </MODULE_CONTRACT>
15
15
  <CHANGE_SUMMARY>
16
- <item>RFC-1237: dual-read dry-run (context.dryRun || flags["dry-run"]),
17
- io.writeFile port routing, emit-canonical generated header — refresh owns
18
- content freshness, never envelope identity (ownerCommand stays
19
- rfc.verification.emit).</item>
20
16
  <item>RFC-1249: wire werkstatt.commands.validate into packages.check + retire CMD-OUTPUT debt</item>
21
17
  <item>RFC-1330: refresh attaches git-derived origin like emit.</item>
22
18
  <item>RFC-1391: close RFC-1391 review r1 findings — evidence freshness, config classification, contract guards
@@ -35,18 +31,20 @@ without verdict/hashes and trip RFC-IMP-13 on next stamp; mirrored the emit
35
31
  spread and pinned it with a regression test. proof.check pretty output now
36
32
  prints the persisted log; every exhaustive verdict path carries vitest
37
33
  output as log.</item>
38
- <history>RFC-0999</history>
34
+ <item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
35
+
36
+ runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
37
+ <history>RFC-0999, RFC-1237</history>
39
38
  </CHANGE_SUMMARY>
40
39
  */
41
40
 
42
41
  import { join, relative } from "node:path";
43
42
  import { resolveIo } from "../../src/utils/io.ts";
44
- import { performance } from "node:perf_hooks";
45
43
  import { parse as yamlParse } from "yaml";
46
44
 
47
- import { runProbe } from "./acceptance.ts";
45
+ import { runProbeSet } from "./acceptance.ts";
48
46
  import { attachProbeOrigins } from "./verification-origin.ts";
49
- import { listRfcFiles, readAndParseRfc } from "./frontmatter-io.ts";
47
+ import { listRfcFiles, readRfcFrontmatter } from "./frontmatter-io.ts";
50
48
  import {
51
49
  captureGitContext,
52
50
  getKernelVersion,
@@ -115,7 +113,9 @@ export async function runRfcVerificationRefresh(
115
113
  skippedEntry?: NonNullable<RfcVerificationRefreshResult["skipped"]>[number];
116
114
  diagnostic?: Diagnostic;
117
115
  }> => {
118
- const parsedFile = await readAndParseRfc(rfcDirPath, fileName);
116
+ // RFC-1489: refresh needs frontmatter only (id/status/acceptance); the
117
+ // evidence envelope and RFC bytes are read separately below.
118
+ const parsedFile = await readRfcFrontmatter(rfcDirPath, fileName);
119
119
  if (!parsedFile) return {};
120
120
  if ("error" in parsedFile) return {};
121
121
  const fm = parsedFile.parsed.frontmatter;
@@ -155,15 +155,17 @@ export async function runRfcVerificationRefresh(
155
155
  const rfcMarkdown = await io.readFile(rfcFilePath);
156
156
  const now = new Date().toISOString();
157
157
 
158
- for (const probe of probes) {
159
- const start = performance.now();
160
- const result = await runProbe(
161
- probe,
162
- workspaceRoot,
163
- context.commandRegistry,
164
- context.forgeRoot,
165
- );
166
- const durationMs = Math.round(performance.now() - start);
158
+ // RFC-1489: batch-compatible test probes share one Vitest run via
159
+ // runProbeSet; `--no-batch` forces the legacy per-probe path.
160
+ const { results: setResults, durationsMs } = await runProbeSet(probes, {
161
+ workspaceRoot,
162
+ commandRegistry: context.commandRegistry,
163
+ forgeRoot: context.forgeRoot,
164
+ noBatch: input.flags["no-batch"] === true,
165
+ });
166
+ for (const [probeIndex, probe] of probes.entries()) {
167
+ const result = setResults[probeIndex]!;
168
+ const durationMs = durationsMs[probeIndex]!;
167
169
  probeRecords.push({
168
170
  probe,
169
171
  ok: result.ok,
@@ -7,6 +7,9 @@
7
7
  </MODULE_CONTRACT>
8
8
  <CHANGE_SUMMARY>
9
9
  <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
10
+ <item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
11
+
12
+ runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
10
13
  </CHANGE_SUMMARY>
11
14
  */
12
15
 
@@ -25,6 +28,12 @@ import type { ForgeCommandInput, ForgeRuntimeContext } from "../../../../src/typ
25
28
 
26
29
  vi.mock("../../acceptance.ts", () => ({
27
30
  runProbe: vi.fn(async (probe: unknown) => ({ probe, ok: true, detail: "ok" })),
31
+ // RFC-1489: emit (which stamp composes) drives runProbeSet — the shim
32
+ // preserves the per-probe mock contract.
33
+ runProbeSet: vi.fn(async (probes: unknown[]) => ({
34
+ results: probes.map((probe) => ({ probe, ok: true, detail: "ok" })),
35
+ durationsMs: probes.map(() => 0),
36
+ })),
28
37
  }));
29
38
 
30
39
  const git = (dir: string, args: string[]) =>
@@ -16,19 +16,22 @@ Mechanical v1 to v2 header migration across the workspace: 942 files rewritten
16
16
  <item>RFC-1097: sweep — werkstatt-engine clean
17
17
 
18
18
  Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
19
+ <item>RFC-1495: step 1 - forge state roots</item>
19
20
  </CHANGE_SUMMARY>
20
21
  */
21
22
 
22
- import { ambientIo as fs } from "../../../src/utils/io.ts";
23
+ import { ambientIo as fs, resolveIo } from "../../../src/utils/io.ts";
23
24
  import { existsSync } from "../../../src/utils/sync-fs.ts";
24
25
  import path from "node:path";
25
26
  import type {
26
27
  ForgeCommandInput,
27
28
  ForgeCommandResult,
28
29
  ForgeRuntimeContext,
30
+ WorkspaceIO,
29
31
  } from "../../../src/types.ts";
30
32
  import { trashPath } from "../../../src/utils/fs-trash.ts";
31
33
  import { readAllLocks, removeStaleLock, acquireLock, releaseLock } from "./lock.ts";
34
+ import { resolveStateRoots } from "../../flow/worktree-path.ts";
32
35
 
33
36
  export interface WerkstattLockRecoverData {
34
37
  recovered: Array<{ scope?: string; artifact?: string; action: string }>;
@@ -43,6 +46,7 @@ function flagString(input: ForgeCommandInput, key: string): string | undefined {
43
46
  async function classifyArtifacts(
44
47
  workspaceRoot: string,
45
48
  purge: boolean,
49
+ io: WorkspaceIO,
46
50
  ): Promise<{
47
51
  recovered: Array<{ artifact: string; action: string }>;
48
52
  failed: Array<{ artifact: string; error: string }>;
@@ -50,9 +54,21 @@ async function classifyArtifacts(
50
54
  const recovered: Array<{ artifact: string; action: string }> = [];
51
55
  const failed: Array<{ artifact: string; error: string }> = [];
52
56
 
53
- const scanRoots = ["systems", "missions", "releases"];
54
- for (const root of scanRoots) {
55
- const rootPath = path.join(workspaceRoot, root);
57
+ // RFC-1495: releases/ is durable state — it lives in the primary checkout;
58
+ // missions/ (open missions) and systems/ stay per-worktree. In a
59
+ // single-worktree repo the roots coincide and the scan is unchanged.
60
+ const stateRoots = await resolveStateRoots(workspaceRoot, io).catch(() => ({
61
+ worktreeRoot: workspaceRoot,
62
+ primaryRoot: workspaceRoot,
63
+ isPrimary: true,
64
+ }));
65
+ const scanRoots: Array<{ name: string; root: string }> = [
66
+ { name: "systems", root: stateRoots.worktreeRoot },
67
+ { name: "missions", root: stateRoots.worktreeRoot },
68
+ { name: "releases", root: stateRoots.primaryRoot },
69
+ ];
70
+ for (const { name: root, root: scanRoot } of scanRoots) {
71
+ const rootPath = path.join(scanRoot, root);
56
72
  if (!existsSync(rootPath)) continue;
57
73
 
58
74
  let entries: string[];
@@ -64,7 +80,7 @@ async function classifyArtifacts(
64
80
 
65
81
  for (const entry of entries) {
66
82
  const entryPath = path.join(rootPath, entry);
67
- const relPath = path.relative(workspaceRoot, entryPath).replace(/\\/g, "/");
83
+ const relPath = `${root}/${entry}`;
68
84
 
69
85
  if (entry.endsWith(".tmp")) {
70
86
  if (purge) {
@@ -154,6 +170,7 @@ export async function runWerkstattLockRecover(
154
170
  const { recovered: artifactRecovered, failed: artifactFailed } = await classifyArtifacts(
155
171
  workspaceRoot,
156
172
  purge,
173
+ resolveIo(context.io),
157
174
  );
158
175
  for (const r of artifactRecovered) {
159
176
  recovered.push({ artifact: r.artifact, action: r.action });
@@ -13,6 +13,7 @@ helper module (RFC-0362 §6).</purpose>
13
13
  <item>RFC-0362: initial operation.validate command handler.</item>
14
14
  <item>RFC-0556: moved from @warpgogol/site-kernel-checks to @warpgogol/forge for autonomous mode. Uses node:fs/promises directly instead of context.io.</item>
15
15
  <item>RFC-1248: VITE-CLIENT-DEP-02 lazy-import gate + SCAN-02 validator reads-root existence check (RFC-1248)</item>
16
+ <item>RFC-1493: step 4 — remove per-commit version bump, PC-01..04, version log; one commit path with universal X-RFC/X-ADR trailers</item>
16
17
  </CHANGE_SUMMARY>
17
18
  */
18
19
 
@@ -61,7 +62,6 @@ export async function runWerkstattOperationValidate(
61
62
  "handoff-pack.ts",
62
63
  "materialize.ts",
63
64
  "bundle-io.ts",
64
- "platform-consistency.ts",
65
65
  ]);
66
66
 
67
67
  for (const filePath of files) {
@@ -6,7 +6,6 @@
6
6
  </non-goals>
7
7
  </MODULE_CONTRACT>
8
8
  <CHANGE_SUMMARY>
9
- <item>RFC-1173: declare mutatesState on all kernel commands — collectDeclarationDiagnostics emits error-severity MUTATES-STATE-DECLARED, command.manifest.validate is the blocking consumer in packages.check, sweep declares the flag on every command definition (factories hardcode false for read-only check specs)</item>
10
9
  <item>RFC-1231: step 1 — rename supportsAllSites to acceptsAllFlag
11
10
 
12
11
  Mechanical sweep: the field only ever gated --all argv acceptance; fan-out
@@ -16,7 +15,8 @@ surfaces (KernelCommandMetadata, ForgeCommandMetadata) in one atomic pass.</item
16
15
  <item>RFC-1248: VITE-CLIENT-DEP-02 lazy-import gate + SCAN-02 validator reads-root existence check (RFC-1248)</item>
17
16
  <item>RFC-1462: isolate parallel agent sessions in per-session git worktrees — session.open/close/status, registry, commit overlap warning</item>
18
17
  <item>RFC-1462: repair RFC-1462 session-worktree r1 findings — last-commit status, real inside-worktree skip, loud residue commit</item>
19
- <history>RFC-0374, RFC-0556, RFC-1360</history>
18
+ <item>RFC-1487: step 7 — remove RFC-1462 session-worktree paths, COMMIT-FGN-01 guard, and .sessions model; document flow lifecycle</item>
19
+ <history>RFC-0374, RFC-0556, RFC-1173, RFC-1360</history>
20
20
  </CHANGE_SUMMARY>
21
21
  */
22
22
 
@@ -24,9 +24,6 @@ import type { ForgeModule } from "../../src/forge-module.ts";
24
24
  import { runWerkstattLockStatus } from "./handlers/werkstatt-lock-status.ts";
25
25
  import { runWerkstattLockRecover } from "./handlers/werkstatt-lock-recover.ts";
26
26
  import { runWerkstattOperationValidate } from "./handlers/werkstatt-operation-validate.ts";
27
- import { runSessionOpen } from "./handlers/session-open.ts";
28
- import { runSessionClose } from "./handlers/session-close.ts";
29
- import { runSessionStatus } from "./handlers/session-status.ts";
30
27
 
31
28
  export const forgeWerkstattModule: ForgeModule = {
32
29
  name: "forge-werkstatt",
@@ -93,86 +90,6 @@ export const forgeWerkstattModule: ForgeModule = {
93
90
  reads: ["packages/werkstatt-engine/src/handoff/**/*.ts"],
94
91
  execute: runWerkstattOperationValidate,
95
92
  },
96
- {
97
- name: "werkstatt.session.open",
98
- coverage: "operator" as const,
99
- mutatesState: true,
100
- description:
101
- "RFC-1462: open an isolated per-session git worktree at .sessions/<id> on branch session/<id> and register it in the shared gitdir. Flags: --agent <id> (required), --brief, --resume (re-adopt a live session).",
102
- scope: "workspace",
103
- acceptsAllFlag: false,
104
- flags: {
105
- agent: {
106
- kind: "string",
107
- required: true,
108
- description: "Session/agent id — becomes .sessions/<id> and session/<id>.",
109
- },
110
- brief: { kind: "string", description: "Short description of the session's purpose." },
111
- resume: {
112
- kind: "boolean",
113
- description: "Re-adopt an existing live session for the same agent id.",
114
- },
115
- },
116
- writes: [".sessions/**", ".git/**"],
117
- generates: [],
118
- reads: [".git/**"],
119
- cacheable: false,
120
- execute: runSessionOpen,
121
- },
122
- {
123
- name: "werkstatt.session.close",
124
- coverage: "operator" as const,
125
- mutatesState: true,
126
- description:
127
- "RFC-1462: close a session — merge session/<id> into its base branch (default, refuses dirty worktrees and branch retargeting without --allow-dirty/--into) or --discard it. Rerun-safe on an already-closed session.",
128
- scope: "workspace",
129
- acceptsAllFlag: false,
130
- flags: {
131
- session: {
132
- kind: "string",
133
- required: true,
134
- description: "Session id to close.",
135
- },
136
- discard: {
137
- kind: "boolean",
138
- description: "Remove the worktree and delete the branch instead of merging.",
139
- },
140
- merge: {
141
- kind: "boolean",
142
- description: "Merge the session branch (default behavior).",
143
- },
144
- "allow-dirty": {
145
- kind: "boolean",
146
- description: "Sweep a dirty worktree into a 'chore: session residue' commit before merging.",
147
- },
148
- into: {
149
- kind: "string",
150
- description: "Retarget the merge to a different base branch.",
151
- },
152
- },
153
- writes: [".sessions/**", ".git/**", "**"],
154
- generates: [],
155
- reads: [".git/**"],
156
- cacheable: false,
157
- execute: runSessionClose,
158
- },
159
- {
160
- name: "werkstatt.session.status",
161
- coverage: "operator" as const,
162
- mutatesState: false,
163
- description:
164
- "RFC-1462: list registered sessions — worktree presence, dirty counts, staleness (default 24h, --stale-after <minutes>). All state is filesystem/gitdir — survives a dead agent.",
165
- scope: "workspace",
166
- acceptsAllFlag: false,
167
- flags: {
168
- "stale-after": {
169
- kind: "string",
170
- description: "Minutes before an open session is marked stale (default 1440).",
171
- },
172
- },
173
- reads: [".git/**", ".sessions/**"],
174
- execute: runSessionStatus,
175
- },
176
93
  ],
177
94
  pipelines: [],
178
95
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warpgogol/forge",
3
- "version": "9.1.0",
3
+ "version": "9.2.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -196,6 +196,14 @@
196
196
  "types": "./os/conformance/conformance.module.ts",
197
197
  "default": "./os/conformance/conformance.module.ts"
198
198
  },
199
+ "./os/flow": {
200
+ "types": "./os/flow/index.ts",
201
+ "default": "./os/flow/index.ts"
202
+ },
203
+ "./os/flow-module": {
204
+ "types": "./os/flow/flow.module.ts",
205
+ "default": "./os/flow/flow.module.ts"
206
+ },
199
207
  "./os/formal": {
200
208
  "types": "./os/formal/index.ts",
201
209
  "default": "./os/formal/index.ts"
@@ -482,6 +490,14 @@
482
490
  "types": "./dist/os/conformance/conformance.module.d.ts",
483
491
  "default": "./dist/os/conformance/conformance.module.js"
484
492
  },
493
+ "./os/flow": {
494
+ "types": "./dist/os/flow/index.d.ts",
495
+ "default": "./dist/os/flow/index.js"
496
+ },
497
+ "./os/flow-module": {
498
+ "types": "./dist/os/flow/flow.module.d.ts",
499
+ "default": "./dist/os/flow/flow.module.js"
500
+ },
485
501
  "./os/formal": {
486
502
  "types": "./dist/os/formal/index.d.ts",
487
503
  "default": "./dist/os/formal/index.js"
@@ -71,7 +71,7 @@ workspace:
71
71
  run: pnpm install --frozen-lockfile
72
72
 
73
73
  - name: Forge doctor
74
- run: pnpm exec forge run forge.doctor
74
+ run: pnpm exec forge doctor
75
75
 
76
76
  - name: Format check
77
77
  run: pnpm format:check
@@ -207,13 +207,6 @@ workspace:
207
207
  - path: .gitattributes
208
208
  content: |
209
209
  # No LFS patterns for this stack
210
- - path: hooks/pre-commit
211
- content: |
212
- #!/bin/sh
213
- # Platform-scope pre-commit guard
214
- # Runs forge validation before commits
215
- echo "Pre-commit: running platform checks..."
216
- pnpm exec forge run forge.validate || exit 1
217
210
  - path: scripts/git-guard.sh
218
211
  content: |
219
212
  #!/bin/bash
@@ -599,13 +592,32 @@ workspace:
599
592
  ### 4. Verify the workshop
600
593
 
601
594
  ```sh
602
- pnpm exec forge run forge.doctor
603
- pnpm exec forge run forge.validate
595
+ pnpm exec forge doctor
596
+ pnpm exec forge validate
604
597
  ```
605
598
 
606
599
  ## Stack
607
600
 
608
601
  - Engine: @warpgogol/forge
609
602
  - Stack profile: forge-shell
603
+ - path: hooks/worktree-setup.sh
604
+ content: |
605
+ #!/bin/sh
606
+ # worktree-setup for a flow session worktree (RFC-1487, RFC-1500).
607
+ # Nothing to prepare in this stack — sessions reuse the primary's tooling.
608
+ set -eu
609
+ exit 0
610
+ - path: hooks/integration-gate.sh
611
+ content: |
612
+ #!/bin/sh
613
+ # Integration gate for flow.integrate (RFC-1487, RFC-1500).
614
+ # cwd: the worktree under judgment; non-zero exit refuses.
615
+ set -eu
616
+ if [ -e node_modules/.bin/forge ]; then
617
+ pnpm exec forge validate
618
+ else
619
+ echo "integration-gate: forge is not installed — skipping validation" >&2
620
+ exit 0
621
+ fi
610
622
  install:
611
623
  - pnpm add -wD @warpgogol/forge prettier vitest
@@ -293,7 +293,7 @@ workspace:
293
293
  run: pnpm install --frozen-lockfile
294
294
 
295
295
  - name: Forge doctor
296
- run: pnpm exec forge run forge.doctor
296
+ run: pnpm exec forge doctor
297
297
 
298
298
  - name: Format check
299
299
  run: pnpm format:check
@@ -679,18 +679,6 @@ workspace:
679
679
  - path: .gitattributes
680
680
  content: |
681
681
  # No LFS patterns for this stack
682
- - path: hooks/pre-commit
683
- content: |
684
- #!/bin/sh
685
- # Platform-scope pre-commit guard
686
- # Runs werkstatt autonomy and plugin validation before commits
687
- # Note: compass.validate reads all source files and may add a few seconds
688
- # to commit time for large projects. Remove the line below if this is
689
- # too slow during iterative development.
690
- echo "Pre-commit: running platform checks..."
691
- pnpm exec werkstatt run werkstatt.autonomy.validate || exit 1
692
- pnpm exec werkstatt run werkstatt.plugin.validate || exit 1
693
- pnpm exec werkstatt run compass.validate || exit 1
694
682
  - path: scripts/git-guard.sh
695
683
  content: |
696
684
  #!/bin/bash
@@ -1120,6 +1108,29 @@ workspace:
1120
1108
  - Engine: @warpgogol/werkstatt-engine
1121
1109
  - Plugin: @warpgogol/werkstatt-godot-game
1122
1110
  - Stack profile: godot-game
1111
+ - path: hooks/worktree-setup.sh
1112
+ content: |
1113
+ #!/bin/sh
1114
+ # worktree-setup for a flow session worktree (RFC-1487, RFC-1500).
1115
+ # cwd: the new worktree; FLOW_PRIMARY is the primary checkout.
1116
+ set -eu
1117
+ for env_file in "$FLOW_PRIMARY"/.env "$FLOW_PRIMARY"/.env.*; do
1118
+ case "$env_file" in *.example) continue ;; esac
1119
+ [ -f "$env_file" ] || continue
1120
+ cp "$env_file" "./$(basename "$env_file")"
1121
+ done
1122
+ - path: hooks/integration-gate.sh
1123
+ content: |
1124
+ #!/bin/sh
1125
+ # Integration gate for flow.integrate (RFC-1487, RFC-1500).
1126
+ # cwd: the worktree under judgment; non-zero exit refuses.
1127
+ set -eu
1128
+ if [ -e node_modules/.bin/forge ]; then
1129
+ pnpm exec forge validate
1130
+ else
1131
+ echo "integration-gate: forge is not installed — skipping validation" >&2
1132
+ exit 0
1133
+ fi
1123
1134
  install:
1124
1135
  - pnpm install
1125
1136
  firstWorkspace:
@@ -423,6 +423,25 @@ workspace:
423
423
  path: apps/web
424
424
  - name: mcp
425
425
  path: apps/mcp
426
+ - path: hooks/worktree-setup.sh
427
+ content: |
428
+ #!/bin/sh
429
+ # worktree-setup for a flow session worktree (RFC-1487, RFC-1500).
430
+ # Nothing to prepare in this stack — sessions reuse the primary's tooling.
431
+ set -eu
432
+ exit 0
433
+ - path: hooks/integration-gate.sh
434
+ content: |
435
+ #!/bin/sh
436
+ # Integration gate for flow.integrate (RFC-1487, RFC-1500).
437
+ # cwd: the worktree under judgment; non-zero exit refuses.
438
+ set -eu
439
+ if [ -e node_modules/.bin/forge ]; then
440
+ pnpm exec forge validate
441
+ else
442
+ echo "integration-gate: forge is not installed — skipping validation" >&2
443
+ exit 0
444
+ fi
426
445
  plugin:
427
446
  id: werkstatt-knowledge
428
447
  package: "@warpgogol/werkstatt-knowledge"
@@ -119,7 +119,7 @@ workspace:
119
119
  run: pnpm install --frozen-lockfile
120
120
 
121
121
  - name: Forge doctor
122
- run: pnpm exec forge run forge.doctor
122
+ run: pnpm exec forge doctor
123
123
 
124
124
  - name: Format check
125
125
  run: pnpm format:check
@@ -282,18 +282,6 @@ workspace:
282
282
  - path: .gitattributes
283
283
  content: |
284
284
  # No LFS patterns for this stack
285
- - path: hooks/pre-commit
286
- content: |
287
- #!/bin/sh
288
- # Platform-scope pre-commit guard
289
- # Runs werkstatt autonomy and plugin validation before commits
290
- # Note: compass.validate reads all source files and may add a few seconds
291
- # to commit time for large projects. Remove the line below if this is
292
- # too slow during iterative development.
293
- echo "Pre-commit: running platform checks..."
294
- pnpm exec werkstatt run werkstatt.autonomy.validate || exit 1
295
- pnpm exec werkstatt run werkstatt.plugin.validate || exit 1
296
- pnpm exec werkstatt run compass.validate || exit 1
297
285
  - path: scripts/git-guard.sh
298
286
  content: |
299
287
  #!/bin/bash
@@ -689,6 +677,30 @@ workspace:
689
677
  - Engine: @warpgogol/werkstatt-engine
690
678
  - Plugin: @warpgogol/werkstatt-phaser-game
691
679
  - Stack profile: phaser-game
680
+ - path: hooks/worktree-setup.sh
681
+ content: |
682
+ #!/bin/sh
683
+ # worktree-setup for a flow session worktree (RFC-1487, RFC-1500).
684
+ # cwd: the new worktree; FLOW_PRIMARY is the primary checkout.
685
+ set -eu
686
+ for env_file in "$FLOW_PRIMARY"/.env "$FLOW_PRIMARY"/.env.*; do
687
+ case "$env_file" in *.example) continue ;; esac
688
+ [ -f "$env_file" ] || continue
689
+ cp "$env_file" "./$(basename "$env_file")"
690
+ done
691
+ pnpm install --frozen-lockfile
692
+ - path: hooks/integration-gate.sh
693
+ content: |
694
+ #!/bin/sh
695
+ # Integration gate for flow.integrate (RFC-1487, RFC-1500).
696
+ # cwd: the worktree under judgment; non-zero exit refuses.
697
+ set -eu
698
+ pnpm install --frozen-lockfile
699
+ for script in typecheck lint test; do
700
+ if node -e "process.exit((require('./package.json').scripts||{})['$script'] ? 0 : 1)" 2>/dev/null; then
701
+ pnpm run "$script"
702
+ fi
703
+ done
692
704
  install:
693
705
  - pnpm add -wD typescript turbo @warpgogol/forge @warpgogol/werkstatt-engine @warpgogol/werkstatt-shared @warpgogol/werkstatt-phaser-game prettier
694
706
  firstWorkspace: