@deftai/directive-runtime 0.129.4 → 0.129.6

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 (303) hide show
  1. package/Taskfile.yml +235 -0
  2. package/UPGRADING.md +1 -0
  3. package/contracts/design-critique.md +1 -1
  4. package/contracts/path-write-fence.md +6 -0
  5. package/dist/applying-host-release.d.ts +16 -0
  6. package/dist/applying-host-release.js +98 -0
  7. package/dist/authz.d.ts +1 -1
  8. package/dist/authz.js +1 -1
  9. package/dist/check.d.ts +1 -0
  10. package/dist/check.js +27 -4
  11. package/dist/design-critique-ensure-arc-dest.d.ts +16 -0
  12. package/dist/design-critique-ensure-arc-dest.js +168 -0
  13. package/dist/dispatch.d.ts +1 -1
  14. package/dist/dispatch.js +8 -0
  15. package/dist/hook-dispatch.js +11 -5
  16. package/dist/human-presence-mint.d.ts +6 -1
  17. package/dist/human-presence-mint.js +20 -6
  18. package/dist/pre-pr-run.d.ts +7 -1
  19. package/dist/pre-pr-run.js +25 -1
  20. package/dist/session-start.js +40 -6
  21. package/dist/setup-wiring.d.ts +36 -0
  22. package/dist/setup-wiring.js +169 -14
  23. package/dist/verify-ac.d.ts +7 -2
  24. package/dist/verify-ac.js +13 -5
  25. package/dist/verify-source-cli/verify-deposit-closure.js +5 -5
  26. package/dist/windows-bin-ps1.d.ts +2 -2
  27. package/dist/windows-bin-ps1.js +5 -11
  28. package/docs/deft-directive-disable.md +3 -3
  29. package/docs/scope-provenance.md +4 -0
  30. package/package.json +2 -3
  31. package/packs/lessons/lessons-pack-0.1.json +15 -0
  32. package/packs/skills/skills-pack-0.1.json +2 -2
  33. package/skills/deft-directive-design-critique/SKILL.md +1 -1
  34. package/skills/deft-directive-release/SKILL.md +54 -1
  35. package/tasks/materialize.cjs +106 -5
  36. package/tasks/materialize.test.cjs +108 -0
  37. package/tasks/materialize.yml +14 -2
  38. package/vendor/directive-content/Taskfile.yml +235 -0
  39. package/vendor/directive-content/UPGRADING.md +1 -0
  40. package/vendor/directive-content/contracts/design-critique.md +1 -1
  41. package/vendor/directive-content/contracts/path-write-fence.md +6 -0
  42. package/vendor/directive-content/docs/deft-directive-disable.md +3 -3
  43. package/vendor/directive-content/docs/scope-provenance.md +4 -0
  44. package/vendor/directive-content/packs/lessons/lessons-pack-0.1.json +15 -0
  45. package/vendor/directive-content/packs/skills/skills-pack-0.1.json +2 -2
  46. package/vendor/directive-content/skills/deft-directive-design-critique/SKILL.md +1 -1
  47. package/vendor/directive-content/skills/deft-directive-release/SKILL.md +54 -1
  48. package/vendor/directive-content/tasks/materialize.cjs +106 -5
  49. package/vendor/directive-content/tasks/materialize.test.cjs +108 -0
  50. package/vendor/directive-content/tasks/materialize.yml +14 -2
  51. package/vendor/directive-core/dist/.tsbuildinfo +1 -1
  52. package/vendor/directive-core/dist/authz/classify.d.ts +18 -0
  53. package/vendor/directive-core/dist/authz/classify.d.ts.map +1 -1
  54. package/vendor/directive-core/dist/authz/classify.js +196 -14
  55. package/vendor/directive-core/dist/authz/classify.js.map +1 -1
  56. package/vendor/directive-core/dist/authz/evaluate.d.ts +5 -0
  57. package/vendor/directive-core/dist/authz/evaluate.d.ts.map +1 -1
  58. package/vendor/directive-core/dist/authz/evaluate.js +15 -5
  59. package/vendor/directive-core/dist/authz/evaluate.js.map +1 -1
  60. package/vendor/directive-core/dist/authz/templates.d.ts +2 -2
  61. package/vendor/directive-core/dist/authz/templates.d.ts.map +1 -1
  62. package/vendor/directive-core/dist/authz/templates.js +1 -0
  63. package/vendor/directive-core/dist/authz/templates.js.map +1 -1
  64. package/vendor/directive-core/dist/authz/types.d.ts +1 -1
  65. package/vendor/directive-core/dist/authz/types.d.ts.map +1 -1
  66. package/vendor/directive-core/dist/authz/types.js +2 -0
  67. package/vendor/directive-core/dist/authz/types.js.map +1 -1
  68. package/vendor/directive-core/dist/authz/verb-classification.d.ts.map +1 -1
  69. package/vendor/directive-core/dist/authz/verb-classification.js +30 -3
  70. package/vendor/directive-core/dist/authz/verb-classification.js.map +1 -1
  71. package/vendor/directive-core/dist/cache/fetch.d.ts.map +1 -1
  72. package/vendor/directive-core/dist/cache/fetch.js +50 -4
  73. package/vendor/directive-core/dist/cache/fetch.js.map +1 -1
  74. package/vendor/directive-core/dist/check/cached-orchestrator.d.ts.map +1 -1
  75. package/vendor/directive-core/dist/check/cached-orchestrator.js +101 -2
  76. package/vendor/directive-core/dist/check/cached-orchestrator.js.map +1 -1
  77. package/vendor/directive-core/dist/check/context.d.ts +199 -0
  78. package/vendor/directive-core/dist/check/context.d.ts.map +1 -1
  79. package/vendor/directive-core/dist/check/context.js +417 -2
  80. package/vendor/directive-core/dist/check/context.js.map +1 -1
  81. package/vendor/directive-core/dist/check/gate-lists.d.ts +42 -0
  82. package/vendor/directive-core/dist/check/gate-lists.d.ts.map +1 -1
  83. package/vendor/directive-core/dist/check/gate-lists.js +226 -0
  84. package/vendor/directive-core/dist/check/gate-lists.js.map +1 -1
  85. package/vendor/directive-core/dist/check/index.d.ts +1 -0
  86. package/vendor/directive-core/dist/check/index.d.ts.map +1 -1
  87. package/vendor/directive-core/dist/check/index.js +1 -0
  88. package/vendor/directive-core/dist/check/index.js.map +1 -1
  89. package/vendor/directive-core/dist/check/named-cause.d.ts.map +1 -1
  90. package/vendor/directive-core/dist/check/named-cause.js +1 -0
  91. package/vendor/directive-core/dist/check/named-cause.js.map +1 -1
  92. package/vendor/directive-core/dist/check/orchestrator.d.ts +1 -0
  93. package/vendor/directive-core/dist/check/orchestrator.d.ts.map +1 -1
  94. package/vendor/directive-core/dist/check/orchestrator.js +69 -4
  95. package/vendor/directive-core/dist/check/orchestrator.js.map +1 -1
  96. package/vendor/directive-core/dist/design-critique/arc-dest.d.ts +22 -5
  97. package/vendor/directive-core/dist/design-critique/arc-dest.d.ts.map +1 -1
  98. package/vendor/directive-core/dist/design-critique/arc-dest.js +61 -0
  99. package/vendor/directive-core/dist/design-critique/arc-dest.js.map +1 -1
  100. package/vendor/directive-core/dist/design-critique/run-posture.d.ts +7 -2
  101. package/vendor/directive-core/dist/design-critique/run-posture.d.ts.map +1 -1
  102. package/vendor/directive-core/dist/design-critique/run-posture.js +6 -1
  103. package/vendor/directive-core/dist/design-critique/run-posture.js.map +1 -1
  104. package/vendor/directive-core/dist/finish-loop/pr-finish-loop.d.ts +7 -0
  105. package/vendor/directive-core/dist/finish-loop/pr-finish-loop.d.ts.map +1 -1
  106. package/vendor/directive-core/dist/finish-loop/pr-finish-loop.js +42 -0
  107. package/vendor/directive-core/dist/finish-loop/pr-finish-loop.js.map +1 -1
  108. package/vendor/directive-core/dist/hooks/classify/host-session-identity.d.ts +15 -2
  109. package/vendor/directive-core/dist/hooks/classify/host-session-identity.d.ts.map +1 -1
  110. package/vendor/directive-core/dist/hooks/classify/host-session-identity.js +46 -5
  111. package/vendor/directive-core/dist/hooks/classify/host-session-identity.js.map +1 -1
  112. package/vendor/directive-core/dist/hooks/dispatcher.d.ts.map +1 -1
  113. package/vendor/directive-core/dist/hooks/dispatcher.js +235 -22
  114. package/vendor/directive-core/dist/hooks/dispatcher.js.map +1 -1
  115. package/vendor/directive-core/dist/hooks/scope.d.ts +38 -9
  116. package/vendor/directive-core/dist/hooks/scope.d.ts.map +1 -1
  117. package/vendor/directive-core/dist/hooks/scope.js +102 -16
  118. package/vendor/directive-core/dist/hooks/scope.js.map +1 -1
  119. package/vendor/directive-core/dist/hooks/shell-write-targets.d.ts +5 -0
  120. package/vendor/directive-core/dist/hooks/shell-write-targets.d.ts.map +1 -1
  121. package/vendor/directive-core/dist/hooks/shell-write-targets.js +18 -1
  122. package/vendor/directive-core/dist/hooks/shell-write-targets.js.map +1 -1
  123. package/vendor/directive-core/dist/init-deposit/host-hook-outer.d.ts +5 -0
  124. package/vendor/directive-core/dist/init-deposit/host-hook-outer.d.ts.map +1 -1
  125. package/vendor/directive-core/dist/init-deposit/host-hook-outer.js +22 -9
  126. package/vendor/directive-core/dist/init-deposit/host-hook-outer.js.map +1 -1
  127. package/vendor/directive-core/dist/init-deposit/scaffold.d.ts +8 -1
  128. package/vendor/directive-core/dist/init-deposit/scaffold.d.ts.map +1 -1
  129. package/vendor/directive-core/dist/init-deposit/scaffold.js +38 -4
  130. package/vendor/directive-core/dist/init-deposit/scaffold.js.map +1 -1
  131. package/vendor/directive-core/dist/install-health/cheap.d.ts +13 -1
  132. package/vendor/directive-core/dist/install-health/cheap.d.ts.map +1 -1
  133. package/vendor/directive-core/dist/install-health/cheap.js +39 -4
  134. package/vendor/directive-core/dist/install-health/cheap.js.map +1 -1
  135. package/vendor/directive-core/dist/install-health/constants.d.ts +18 -2
  136. package/vendor/directive-core/dist/install-health/constants.d.ts.map +1 -1
  137. package/vendor/directive-core/dist/install-health/constants.js +18 -2
  138. package/vendor/directive-core/dist/install-health/constants.js.map +1 -1
  139. package/vendor/directive-core/dist/install-health/index.d.ts +1 -1
  140. package/vendor/directive-core/dist/install-health/index.d.ts.map +1 -1
  141. package/vendor/directive-core/dist/install-health/index.js +1 -1
  142. package/vendor/directive-core/dist/install-health/index.js.map +1 -1
  143. package/vendor/directive-core/dist/policy/deft-directive-disable.d.ts +42 -5
  144. package/vendor/directive-core/dist/policy/deft-directive-disable.d.ts.map +1 -1
  145. package/vendor/directive-core/dist/policy/deft-directive-disable.js +71 -41
  146. package/vendor/directive-core/dist/policy/deft-directive-disable.js.map +1 -1
  147. package/vendor/directive-core/dist/policy/write-fence.d.ts +7 -0
  148. package/vendor/directive-core/dist/policy/write-fence.d.ts.map +1 -1
  149. package/vendor/directive-core/dist/policy/write-fence.js +81 -14
  150. package/vendor/directive-core/dist/policy/write-fence.js.map +1 -1
  151. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.d.ts +6 -1
  152. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.d.ts.map +1 -1
  153. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.js +24 -12
  154. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.js.map +1 -1
  155. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.d.ts +68 -14
  156. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.d.ts.map +1 -1
  157. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.js +278 -47
  158. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.js.map +1 -1
  159. package/vendor/directive-core/dist/pr-closing-keywords/main.d.ts +19 -0
  160. package/vendor/directive-core/dist/pr-closing-keywords/main.d.ts.map +1 -1
  161. package/vendor/directive-core/dist/pr-closing-keywords/main.js +31 -16
  162. package/vendor/directive-core/dist/pr-closing-keywords/main.js.map +1 -1
  163. package/vendor/directive-core/dist/pr-merge-readiness/compute.d.ts +8 -0
  164. package/vendor/directive-core/dist/pr-merge-readiness/compute.d.ts.map +1 -1
  165. package/vendor/directive-core/dist/pr-merge-readiness/compute.js +54 -2
  166. package/vendor/directive-core/dist/pr-merge-readiness/compute.js.map +1 -1
  167. package/vendor/directive-core/dist/pr-merge-readiness/gh.d.ts +7 -0
  168. package/vendor/directive-core/dist/pr-merge-readiness/gh.d.ts.map +1 -1
  169. package/vendor/directive-core/dist/pr-merge-readiness/gh.js +180 -49
  170. package/vendor/directive-core/dist/pr-merge-readiness/gh.js.map +1 -1
  171. package/vendor/directive-core/dist/pr-merge-readiness/main.d.ts +2 -0
  172. package/vendor/directive-core/dist/pr-merge-readiness/main.d.ts.map +1 -1
  173. package/vendor/directive-core/dist/pr-merge-readiness/main.js +1 -0
  174. package/vendor/directive-core/dist/pr-merge-readiness/main.js.map +1 -1
  175. package/vendor/directive-core/dist/pr-monitor/monitor.d.ts.map +1 -1
  176. package/vendor/directive-core/dist/pr-monitor/monitor.js +1 -0
  177. package/vendor/directive-core/dist/pr-monitor/monitor.js.map +1 -1
  178. package/vendor/directive-core/dist/pr-monitor/readiness.d.ts.map +1 -1
  179. package/vendor/directive-core/dist/pr-monitor/readiness.js +1 -0
  180. package/vendor/directive-core/dist/pr-monitor/readiness.js.map +1 -1
  181. package/vendor/directive-core/dist/pr-monitor/types.d.ts +2 -0
  182. package/vendor/directive-core/dist/pr-monitor/types.d.ts.map +1 -1
  183. package/vendor/directive-core/dist/pr-wait-mergeable/cascade.d.ts +6 -0
  184. package/vendor/directive-core/dist/pr-wait-mergeable/cascade.d.ts.map +1 -1
  185. package/vendor/directive-core/dist/pr-wait-mergeable/cascade.js +27 -0
  186. package/vendor/directive-core/dist/pr-wait-mergeable/cascade.js.map +1 -1
  187. package/vendor/directive-core/dist/pr-wait-mergeable/constants.d.ts +15 -0
  188. package/vendor/directive-core/dist/pr-wait-mergeable/constants.d.ts.map +1 -1
  189. package/vendor/directive-core/dist/pr-wait-mergeable/constants.js +18 -0
  190. package/vendor/directive-core/dist/pr-wait-mergeable/constants.js.map +1 -1
  191. package/vendor/directive-core/dist/pr-wait-mergeable/index.d.ts +2 -1
  192. package/vendor/directive-core/dist/pr-wait-mergeable/index.d.ts.map +1 -1
  193. package/vendor/directive-core/dist/pr-wait-mergeable/index.js +2 -1
  194. package/vendor/directive-core/dist/pr-wait-mergeable/index.js.map +1 -1
  195. package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.d.ts +81 -0
  196. package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.d.ts.map +1 -1
  197. package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.js +687 -3
  198. package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.js.map +1 -1
  199. package/vendor/directive-core/dist/pre-pr-controller/controller.d.ts +59 -1
  200. package/vendor/directive-core/dist/pre-pr-controller/controller.d.ts.map +1 -1
  201. package/vendor/directive-core/dist/pre-pr-controller/controller.js +155 -2
  202. package/vendor/directive-core/dist/pre-pr-controller/controller.js.map +1 -1
  203. package/vendor/directive-core/dist/pre-pr-controller/index.d.ts +1 -1
  204. package/vendor/directive-core/dist/pre-pr-controller/index.d.ts.map +1 -1
  205. package/vendor/directive-core/dist/pre-pr-controller/index.js +1 -1
  206. package/vendor/directive-core/dist/pre-pr-controller/index.js.map +1 -1
  207. package/vendor/directive-core/dist/pre-pr-controller/phases.d.ts +7 -0
  208. package/vendor/directive-core/dist/pre-pr-controller/phases.d.ts.map +1 -1
  209. package/vendor/directive-core/dist/pre-pr-controller/phases.js +11 -0
  210. package/vendor/directive-core/dist/pre-pr-controller/phases.js.map +1 -1
  211. package/vendor/directive-core/dist/pre-pr-controller/types.d.ts +1 -1
  212. package/vendor/directive-core/dist/pre-pr-controller/types.d.ts.map +1 -1
  213. package/vendor/directive-core/dist/pre-pr-controller/types.js.map +1 -1
  214. package/vendor/directive-core/dist/preflight-gh/pre-push.d.ts.map +1 -1
  215. package/vendor/directive-core/dist/preflight-gh/pre-push.js +58 -2
  216. package/vendor/directive-core/dist/preflight-gh/pre-push.js.map +1 -1
  217. package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.d.ts +1 -1
  218. package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.d.ts.map +1 -1
  219. package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.js +1 -1
  220. package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.js.map +1 -1
  221. package/vendor/directive-core/dist/product-first-done-gate/index.d.ts +1 -1
  222. package/vendor/directive-core/dist/product-first-done-gate/index.d.ts.map +1 -1
  223. package/vendor/directive-core/dist/product-first-done-gate/index.js +1 -1
  224. package/vendor/directive-core/dist/product-first-done-gate/index.js.map +1 -1
  225. package/vendor/directive-core/dist/release/gh.d.ts.map +1 -1
  226. package/vendor/directive-core/dist/release/gh.js +2 -1
  227. package/vendor/directive-core/dist/release/gh.js.map +1 -1
  228. package/vendor/directive-core/dist/release/pipeline.d.ts.map +1 -1
  229. package/vendor/directive-core/dist/release/pipeline.js +13 -1
  230. package/vendor/directive-core/dist/release/pipeline.js.map +1 -1
  231. package/vendor/directive-core/dist/release/preflight.d.ts +11 -0
  232. package/vendor/directive-core/dist/release/preflight.d.ts.map +1 -1
  233. package/vendor/directive-core/dist/release/preflight.js +65 -0
  234. package/vendor/directive-core/dist/release/preflight.js.map +1 -1
  235. package/vendor/directive-core/dist/release/types.d.ts +4 -0
  236. package/vendor/directive-core/dist/release/types.d.ts.map +1 -1
  237. package/vendor/directive-core/dist/release/version.d.ts +4 -2
  238. package/vendor/directive-core/dist/release/version.d.ts.map +1 -1
  239. package/vendor/directive-core/dist/release/version.js +4 -2
  240. package/vendor/directive-core/dist/release/version.js.map +1 -1
  241. package/vendor/directive-core/dist/release-publish/gh-api.d.ts.map +1 -1
  242. package/vendor/directive-core/dist/release-publish/gh-api.js +4 -2
  243. package/vendor/directive-core/dist/release-publish/gh-api.js.map +1 -1
  244. package/vendor/directive-core/dist/release-publish/main.d.ts.map +1 -1
  245. package/vendor/directive-core/dist/release-publish/main.js +15 -4
  246. package/vendor/directive-core/dist/release-publish/main.js.map +1 -1
  247. package/vendor/directive-core/dist/release-publish/pipeline.d.ts +11 -0
  248. package/vendor/directive-core/dist/release-publish/pipeline.d.ts.map +1 -1
  249. package/vendor/directive-core/dist/release-publish/pipeline.js +143 -2
  250. package/vendor/directive-core/dist/release-publish/pipeline.js.map +1 -1
  251. package/vendor/directive-core/dist/release-rollback/gh.d.ts.map +1 -1
  252. package/vendor/directive-core/dist/release-rollback/gh.js +2 -1
  253. package/vendor/directive-core/dist/release-rollback/gh.js.map +1 -1
  254. package/vendor/directive-core/dist/scope/delivery-evidence.d.ts +37 -0
  255. package/vendor/directive-core/dist/scope/delivery-evidence.d.ts.map +1 -1
  256. package/vendor/directive-core/dist/scope/delivery-evidence.js +106 -6
  257. package/vendor/directive-core/dist/scope/delivery-evidence.js.map +1 -1
  258. package/vendor/directive-core/dist/scope/transition.d.ts +3 -1
  259. package/vendor/directive-core/dist/scope/transition.d.ts.map +1 -1
  260. package/vendor/directive-core/dist/scope/transition.js +4 -0
  261. package/vendor/directive-core/dist/scope/transition.js.map +1 -1
  262. package/vendor/directive-core/dist/session/git.d.ts +21 -2
  263. package/vendor/directive-core/dist/session/git.d.ts.map +1 -1
  264. package/vendor/directive-core/dist/session/git.js +21 -4
  265. package/vendor/directive-core/dist/session/git.js.map +1 -1
  266. package/vendor/directive-core/dist/session/occupancy.d.ts +93 -6
  267. package/vendor/directive-core/dist/session/occupancy.d.ts.map +1 -1
  268. package/vendor/directive-core/dist/session/occupancy.js +215 -52
  269. package/vendor/directive-core/dist/session/occupancy.js.map +1 -1
  270. package/vendor/directive-core/dist/session/session-start.d.ts.map +1 -1
  271. package/vendor/directive-core/dist/session/session-start.js +5 -2
  272. package/vendor/directive-core/dist/session/session-start.js.map +1 -1
  273. package/vendor/directive-core/dist/swarm/dest-place.d.ts +1 -1
  274. package/vendor/directive-core/dist/swarm/dest-place.d.ts.map +1 -1
  275. package/vendor/directive-core/dist/swarm/dest-place.js +36 -41
  276. package/vendor/directive-core/dist/swarm/dest-place.js.map +1 -1
  277. package/vendor/directive-core/dist/swarm/finalize-owed.d.ts +14 -0
  278. package/vendor/directive-core/dist/swarm/finalize-owed.d.ts.map +1 -1
  279. package/vendor/directive-core/dist/swarm/finalize-owed.js +214 -48
  280. package/vendor/directive-core/dist/swarm/finalize-owed.js.map +1 -1
  281. package/vendor/directive-core/dist/swarm/launch.d.ts.map +1 -1
  282. package/vendor/directive-core/dist/swarm/launch.js +15 -4
  283. package/vendor/directive-core/dist/swarm/launch.js.map +1 -1
  284. package/vendor/directive-core/dist/swarm/worktree-pm-install.d.ts +49 -2
  285. package/vendor/directive-core/dist/swarm/worktree-pm-install.d.ts.map +1 -1
  286. package/vendor/directive-core/dist/swarm/worktree-pm-install.js +207 -12
  287. package/vendor/directive-core/dist/swarm/worktree-pm-install.js.map +1 -1
  288. package/vendor/directive-core/dist/swarm/worktrees-cli.d.ts +6 -0
  289. package/vendor/directive-core/dist/swarm/worktrees-cli.d.ts.map +1 -1
  290. package/vendor/directive-core/dist/swarm/worktrees-cli.js +79 -2
  291. package/vendor/directive-core/dist/swarm/worktrees-cli.js.map +1 -1
  292. package/vendor/directive-core/dist/swarm/worktrees.d.ts +12 -1
  293. package/vendor/directive-core/dist/swarm/worktrees.d.ts.map +1 -1
  294. package/vendor/directive-core/dist/swarm/worktrees.js +34 -26
  295. package/vendor/directive-core/dist/swarm/worktrees.js.map +1 -1
  296. package/vendor/directive-core/dist/verify-ac/evaluate.d.ts +52 -0
  297. package/vendor/directive-core/dist/verify-ac/evaluate.d.ts.map +1 -1
  298. package/vendor/directive-core/dist/verify-ac/evaluate.js +361 -1
  299. package/vendor/directive-core/dist/verify-ac/evaluate.js.map +1 -1
  300. package/vendor/directive-core/dist/verify-ac/index.d.ts +1 -1
  301. package/vendor/directive-core/dist/verify-ac/index.d.ts.map +1 -1
  302. package/vendor/directive-core/dist/verify-ac/index.js +1 -1
  303. package/vendor/directive-core/dist/verify-ac/index.js.map +1 -1
@@ -20,7 +20,14 @@ const {
20
20
  isCheckoutOwnedDir,
21
21
  movePath,
22
22
  materialize,
23
+ writeReleaseCutContext,
24
+ clearReleaseCutContext,
25
+ isCutContextActive,
26
+ retireMaterializeOverlay,
23
27
  LOCK_REL,
28
+ OVERLAY_REL,
29
+ CUT_CONTEXT_REL,
30
+ PIN_PKG,
24
31
  } = require("./materialize.cjs");
25
32
 
26
33
  const roots = [];
@@ -101,3 +108,104 @@ describe("materialize isolation (#5805 P4)", () => {
101
108
  releaseLock(lock);
102
109
  });
103
110
  });
111
+
112
+ describe("release cut-context refuse (#5910 P1/P4)", () => {
113
+ function seedPublishedPin(root, version = "0.129.0") {
114
+ const pinDir = join(root, PIN_PKG);
115
+ mkdirSync(join(pinDir, "dist"), { recursive: true });
116
+ writeFileSync(
117
+ join(pinDir, "package.json"),
118
+ `${JSON.stringify({ name: "@deftai/directive-runtime", version }, null, 2)}\n`,
119
+ );
120
+ writeFileSync(join(pinDir, "dist", "bin.js"), "console.log('pin');\n");
121
+ writeFileSync(
122
+ join(root, "package.json"),
123
+ `${JSON.stringify(
124
+ { private: true, devDependencies: { "@deftai/directive-runtime": version } },
125
+ null,
126
+ 2,
127
+ )}\n`,
128
+ );
129
+ return pinDir;
130
+ }
131
+
132
+ it("cut-context producer writes marker; materialize refuses before replace with prior pin intact", () => {
133
+ const root = tempRoot();
134
+ const pinDir = seedPublishedPin(root);
135
+ const priorPkg = readFileSync(join(pinDir, "package.json"), "utf8");
136
+ const body = writeReleaseCutContext(root, { phase: "release-entry" });
137
+ assert.equal(body.schema, "deft.release.cut-context.v1");
138
+ assert.equal(isCutContextActive(root), true);
139
+ assert.ok(existsSync(join(root, CUT_CONTEXT_REL)));
140
+
141
+ assert.throws(
142
+ () => materialize(root),
143
+ /refusing materialize:runtime while release cut-context is active|cut-context/i,
144
+ );
145
+ // Prior pin untouched — refuse happened before move/replace.
146
+ assert.equal(readFileSync(join(pinDir, "package.json"), "utf8"), priorPkg);
147
+ assert.equal(JSON.parse(priorPkg).version, "0.129.0");
148
+ assert.equal(existsSync(join(root, LOCK_REL)), false);
149
+ assert.equal(existsSync(join(root, OVERLAY_REL)), false);
150
+ });
151
+
152
+ it("cut entry shares the materialize lock (refuses while materialize holds it)", () => {
153
+ const root = tempRoot();
154
+ seedPublishedPin(root);
155
+ const lock = acquireLock(root);
156
+ assert.throws(
157
+ () => writeReleaseCutContext(root, { phase: "release-entry" }),
158
+ /another materialize|second writer|EEXIST|in progress/i,
159
+ );
160
+ assert.equal(isCutContextActive(root), false);
161
+ releaseLock(lock);
162
+ const body = writeReleaseCutContext(root, { phase: "release-entry" });
163
+ assert.equal(body.schema, "deft.release.cut-context.v1");
164
+ assert.equal(existsSync(join(root, LOCK_REL)), false);
165
+ });
166
+
167
+ it("without cut-context, missing stage scripts still fail after the cut guard", () => {
168
+ const root = tempRoot();
169
+ seedPublishedPin(root);
170
+ assert.equal(isCutContextActive(root), false);
171
+ assert.throws(() => materialize(root), /stage-bundle|pack-staged|missing/i);
172
+ });
173
+
174
+ it("clearReleaseCutContext retires the marker so materialize can proceed past the cut guard", () => {
175
+ const root = tempRoot();
176
+ seedPublishedPin(root);
177
+ writeReleaseCutContext(root);
178
+ assert.equal(clearReleaseCutContext(root), true);
179
+ assert.equal(isCutContextActive(root), false);
180
+ assert.throws(() => materialize(root), /stage-bundle|pack-staged|missing/i);
181
+ });
182
+
183
+ it("retireMaterializeOverlay removes the overlay marker after restore", () => {
184
+ const root = tempRoot();
185
+ mkdirSync(join(root, ".deft-scratch"), { recursive: true });
186
+ writeFileSync(join(root, OVERLAY_REL), `${JSON.stringify({ schema: "overlay" })}\n`);
187
+ assert.equal(retireMaterializeOverlay(root), true);
188
+ assert.equal(existsSync(join(root, OVERLAY_REL)), false);
189
+ assert.equal(retireMaterializeOverlay(root), false);
190
+ });
191
+
192
+ it("cut-context keeps published pin intact (bump-gate preconditions; not a full release run)", () => {
193
+ // Narrow pin-preservation proof (#5910 P4 / Greptile P2): cut-context at entry,
194
+ // materialize refuses, published pin + pin declaration stay aligned, no overlay.
195
+ // Full release-to-bump coverage stays on task release:e2e / release skill path.
196
+ const root = tempRoot();
197
+ const pinDir = seedPublishedPin(root, "0.129.0");
198
+ writeReleaseCutContext(root, { phase: "release-entry" });
199
+
200
+ assert.throws(() => materialize(root), /cut-context/i);
201
+ const installed = JSON.parse(readFileSync(join(pinDir, "package.json"), "utf8"));
202
+ assert.equal(installed.version, "0.129.0");
203
+ assert.equal(existsSync(join(root, OVERLAY_REL)), false);
204
+
205
+ // Version-bump gate preconditions only (not an executed bump).
206
+ const rootPkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
207
+ assert.equal(rootPkg.devDependencies["@deftai/directive-runtime"], "0.129.0");
208
+ assert.equal(installed.version, rootPkg.devDependencies["@deftai/directive-runtime"]);
209
+ assert.equal(isCutContextActive(root), true);
210
+ });
211
+ });
@@ -5,9 +5,21 @@ vars:
5
5
 
6
6
  tasks:
7
7
  runtime:
8
- desc: "Build tip staged-runtime and replace this checkout node_modules/@deftai/directive-runtime only (#5805). No lockfile/location-spec mutation."
8
+ desc: "Build tip staged-runtime and replace this checkout node_modules/@deftai/directive-runtime only (#5805). No lockfile/location-spec mutation. Refuses while release cut-context is active (#5910)."
9
9
  dir: "{{.USER_WORKING_DIR}}"
10
10
  deps:
11
11
  - task: :engine:_ts-build
12
12
  cmds:
13
- - node "{{.TASKFILE_DIR}}/materialize.cjs" "{{.USER_WORKING_DIR}}"
13
+ - node "{{.TASKFILE_DIR}}/materialize.cjs" "{{.USER_WORKING_DIR}}"
14
+
15
+ cut-context:
16
+ desc: "Write release cut-context marker (#5910). materialize:runtime refuses pin replace while active (entry through version bump/tag)."
17
+ dir: "{{.USER_WORKING_DIR}}"
18
+ cmds:
19
+ - node "{{.TASKFILE_DIR}}/materialize.cjs" --write-cut-context "{{.USER_WORKING_DIR}}"
20
+
21
+ clear-cut-context:
22
+ desc: "Clear release cut-context marker after version bump/tag (#5910)."
23
+ dir: "{{.USER_WORKING_DIR}}"
24
+ cmds:
25
+ - node "{{.TASKFILE_DIR}}/materialize.cjs" --clear-cut-context "{{.USER_WORKING_DIR}}"
@@ -845,6 +845,241 @@ tasks:
845
845
  vars:
846
846
  ENGINE_CMD: 'release-wait-npm {{.CLI_ARGS}}'
847
847
 
848
+ # Phase 7 maintainer primary checkout closeout (#5953 Prefer-A Bound 6430511888).
849
+ # Inline cmds only — no engine:invoke / no deps:[ts:build] so the post-install
850
+ # payload can replace the N-1 runtime the cut was using. Never reset/force-push/
851
+ # commit / npm i -g.
852
+ release:local-update:
853
+ desc: "Phase 7 fail-closed maintainer checkout update (#5953) -- task release:local-update -- <version> --checkout <primary-occupancy-root>"
854
+ dir: '{{.USER_WORKING_DIR}}'
855
+ env:
856
+ PYTHONUTF8: "1"
857
+ cmds:
858
+ - |
859
+ set -e
860
+ # node -e bodies use shell single quotes + JS double quotes only (no apostrophes).
861
+ PARSE_OUT="$(node -e '
862
+ const raw = process.argv[1] || "";
863
+ const tokens = [];
864
+ let cur = "";
865
+ let q = null;
866
+ const DQ = String.fromCharCode(34);
867
+ const SQ = String.fromCharCode(39);
868
+ for (let i = 0; i < raw.length; i++) {
869
+ const ch = raw[i];
870
+ if (q) {
871
+ if (ch === q) { q = null; continue; }
872
+ cur += ch;
873
+ continue;
874
+ }
875
+ if (ch === DQ || ch === SQ) { q = ch; continue; }
876
+ if (/\s/.test(ch)) {
877
+ if (cur.length) { tokens.push(cur); cur = ""; }
878
+ continue;
879
+ }
880
+ cur += ch;
881
+ }
882
+ if (q) { console.error("release:local-update: unmatched quote in args"); process.exit(2); }
883
+ if (cur.length) tokens.push(cur);
884
+ let version = "";
885
+ let checkout = "";
886
+ for (let i = 0; i < tokens.length; i++) {
887
+ const t = tokens[i];
888
+ if (t === "--checkout") {
889
+ const v = tokens[++i];
890
+ if (!v) { console.error("release:local-update: --checkout requires a path"); process.exit(2); }
891
+ checkout = v;
892
+ continue;
893
+ }
894
+ if (t.startsWith("--")) {
895
+ console.error("release:local-update: unknown flag " + t);
896
+ console.error("Usage: task release:local-update -- <version> --checkout <maintainer-primary-occupancy-root>");
897
+ process.exit(2);
898
+ }
899
+ if (!version) { version = t; continue; }
900
+ console.error("release:local-update: unexpected arg " + t);
901
+ process.exit(2);
902
+ }
903
+ if (!version) {
904
+ console.error("release:local-update: missing <version>");
905
+ console.error("Usage: task release:local-update -- <version> --checkout <maintainer-primary-occupancy-root>");
906
+ process.exit(2);
907
+ }
908
+ if (!checkout) {
909
+ console.error("release:local-update: refuse ambient release-worktree-only success; require --checkout naming the maintainer primary occupancy root (#5953)");
910
+ process.exit(1);
911
+ }
912
+ process.stdout.write(JSON.stringify({ version, checkout }));
913
+ ' "{{.CLI_ARGS}}")"
914
+ VERSION="$(node -e 'const j=JSON.parse(process.argv[1]); process.stdout.write(j.version);' "$PARSE_OUT")"
915
+ CHECKOUT="$(node -e 'const j=JSON.parse(process.argv[1]); process.stdout.write(j.checkout);' "$PARSE_OUT")"
916
+ case "$CHECKOUT" in
917
+ /*|[A-Za-z]:*) ;;
918
+ *) CHECKOUT="$(pwd)/$CHECKOUT" ;;
919
+ esac
920
+ CHECKOUT="$(node -e 'const fs=require("fs"); const path=require("path"); const inPath=process.argv[1]; try { process.stdout.write(fs.realpathSync(inPath)); } catch { process.stdout.write(path.resolve(inPath)); }' "$CHECKOUT")"
921
+ if [ ! -d "$CHECKOUT/.git" ] && [ ! -f "$CHECKOUT/.git" ]; then
922
+ echo "release:local-update: --checkout is not a git checkout: $CHECKOUT" >&2
923
+ exit 1
924
+ fi
925
+ COMMON_DIR="$(git -C "$CHECKOUT" rev-parse --git-common-dir 2>/dev/null || true)"
926
+ if [ -z "$COMMON_DIR" ]; then
927
+ echo "release:local-update: cannot resolve git-common-dir for $CHECKOUT" >&2
928
+ exit 1
929
+ fi
930
+ case "$COMMON_DIR" in
931
+ /*|[A-Za-z]:*) ;;
932
+ *) COMMON_DIR="$CHECKOUT/$COMMON_DIR" ;;
933
+ esac
934
+ MAIN_ROOT="$(node -e 'const path=require("path"); process.stdout.write(path.resolve(path.dirname(process.argv[1])));' "$COMMON_DIR")"
935
+ SAME_MAIN="$(node -e 'const a=process.argv[1]; const b=process.argv[2]; const norm=s => process.platform==="win32" ? s.split(String.fromCharCode(92)).join("/").toLowerCase() : s.split(String.fromCharCode(92)).join("/"); process.stdout.write(norm(a)===norm(b)?"1":"0");' "$CHECKOUT" "$MAIN_ROOT")"
936
+ if [ "$SAME_MAIN" != "1" ]; then
937
+ echo "release:local-update: refuse ambient release-worktree-only success; --checkout must name the maintainer primary occupancy root (dirname git-common-dir=$MAIN_ROOT), not $CHECKOUT (#5953)" >&2
938
+ exit 1
939
+ fi
940
+ CHECKOUT_NORM="$(node -e 'process.stdout.write(String(process.argv[1]||"").split(String.fromCharCode(92)).join("/"));' "$CHECKOUT")"
941
+ case "$CHECKOUT_NORM" in
942
+ */.deft-scratch/worktrees/*)
943
+ echo "release:local-update: refuse ambient release-worktree-only success; --checkout must name the maintainer primary occupancy root, not $CHECKOUT (#5953)" >&2
944
+ exit 1
945
+ ;;
946
+ esac
947
+ print_deposit_recovery() {
948
+ echo "Phase 7 local closeout INCOMPLETE (#5953)." >&2
949
+ echo "Recovery: merge the version-matched agent-hook deposit for $VERSION onto tip, then re-run:" >&2
950
+ echo " task release:local-update -- $VERSION --checkout $CHECKOUT" >&2
951
+ echo "Expected managed deposit paths include: .grok/hooks/ .cursor/hooks.json .claude/settings.json .codex/ (and related deposit files)." >&2
952
+ echo "Do not auto-commit deposit bytes inside the release flow; do not npm i -g." >&2
953
+ }
954
+ OCC_FILE="$CHECKOUT/.deft/occupancy.json"
955
+ if [ -f "$OCC_FILE" ]; then
956
+ node -e '
957
+ const fs = require("fs");
958
+ const path = process.argv[1];
959
+ const checkout = process.argv[2];
960
+ const raw = fs.readFileSync(path, "utf8");
961
+ let rec;
962
+ try { rec = JSON.parse(raw); } catch { process.exit(0); }
963
+ const sid = String(rec.session_id || rec.sessionId || "");
964
+ const hb = Date.parse(rec.heartbeat_at || rec.heartbeatAt || "");
965
+ const claimed = Date.parse(rec.claimed_at || rec.claimedAt || "");
966
+ const now = Date.now();
967
+ const TTL = 20 * 60 * 1000;
968
+ const MAX = 24 * 60 * 60 * 1000;
969
+ if (!Number.isFinite(hb) || !Number.isFinite(claimed)) process.exit(0);
970
+ if (now - claimed > MAX || now - hb > TTL) process.exit(0);
971
+ const providers = ["grok", "claude", "cursor", "codex", "openclaw"];
972
+ const rawPresenters = [
973
+ process.env.DEFT_SESSION_ID,
974
+ process.env.GROK_SESSION_ID,
975
+ process.env.CLAUDE_SESSION_ID,
976
+ process.env.CURSOR_SESSION_ID,
977
+ process.env.CODEX_SESSION_ID,
978
+ ].filter((v) => typeof v === "string" && v.trim().length > 0).map((v) => v.trim());
979
+ const presenters = new Set(rawPresenters);
980
+ for (const p of rawPresenters) {
981
+ if (p.startsWith("host:")) continue;
982
+ for (const provider of providers) {
983
+ presenters.add("host:" + provider + ":v1:" + Buffer.from(p, "utf8").toString("base64url"));
984
+ }
985
+ }
986
+ let sidRaw = null;
987
+ const m = /^host:([a-z]+):v1:([A-Za-z0-9_-]+)$/.exec(sid);
988
+ if (m) {
989
+ try { sidRaw = Buffer.from(m[2], "base64url").toString("utf8"); } catch { sidRaw = null; }
990
+ }
991
+ const grants = Array.isArray(rec.grants) ? rec.grants : [];
992
+ const grantIds = grants
993
+ .filter((g) => Date.parse(g.expires_at || g.expiresAt || 0) > now)
994
+ .map((g) => g.session_id || g.sessionId || g.child_session_id || g.childSessionId)
995
+ .filter(Boolean)
996
+ .map(String);
997
+ const admitted = [...presenters].some((p) => p === sid || grantIds.includes(p) || (sidRaw && p === sidRaw));
998
+ if (!admitted && presenters.size > 0) {
999
+ console.error("release:local-update: refuse live foreign occupancy lease on " + checkout + " (occupant=" + sid + ") before any write (#5953)");
1000
+ process.exit(1);
1001
+ }
1002
+ if (!admitted && presenters.size === 0 && sid) {
1003
+ console.error("release:local-update: refuse live occupancy lease on " + checkout + " (occupant=" + sid + "); no presenter session id in env (#5953)");
1004
+ process.exit(1);
1005
+ }
1006
+ ' "$OCC_FILE" "$CHECKOUT"
1007
+ fi
1008
+ cd "$CHECKOUT"
1009
+ if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
1010
+ echo "release:local-update: not a git work tree: $CHECKOUT" >&2
1011
+ exit 1
1012
+ fi
1013
+ if [ -n "$(git status --porcelain)" ]; then
1014
+ echo "release:local-update: refuse dirty tree at $CHECKOUT" >&2
1015
+ git status --short >&2
1016
+ exit 1
1017
+ fi
1018
+ DEFAULT_BRANCH="$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed "s@^refs/remotes/origin/@@" || true)"
1019
+ if [ -z "$DEFAULT_BRANCH" ]; then DEFAULT_BRANCH=master; fi
1020
+ CURRENT="$(git rev-parse --abbrev-ref HEAD)"
1021
+ if [ "$CURRENT" != "$DEFAULT_BRANCH" ]; then
1022
+ echo "release:local-update: refuse; checkout must be on default branch $DEFAULT_BRANCH (on $CURRENT)" >&2
1023
+ exit 1
1024
+ fi
1025
+ echo "release:local-update: ff-only pull on $DEFAULT_BRANCH at $CHECKOUT"
1026
+ git pull --ff-only
1027
+ if [ -f pnpm-workspace.yaml ]; then
1028
+ if grep -q "minimumReleaseAgeExclude" pnpm-workspace.yaml; then
1029
+ if ! grep -q "@deftai/directive-runtime@$VERSION" pnpm-workspace.yaml; then
1030
+ echo "release:local-update: AgeExclude missing @deftai/directive-runtime@$VERSION before frozen install (#5953 footnote)" >&2
1031
+ exit 1
1032
+ fi
1033
+ fi
1034
+ fi
1035
+ echo "release:local-update: pnpm install --frozen-lockfile"
1036
+ pnpm install --frozen-lockfile
1037
+ PIN_PKG="$(node -e 'const fs=require("fs"); const p=JSON.parse(fs.readFileSync("package.json","utf8")); const v=(p.dependencies||{})["@deftai/directive-runtime"]||(p.devDependencies||{})["@deftai/directive-runtime"]||""; console.log(String(v).replace(/^[^0-9]*/, ""));')"
1038
+ INST_PKG="$(node -e 'const fs=require("fs"); const p=JSON.parse(fs.readFileSync("node_modules/@deftai/directive-runtime/package.json","utf8")); console.log(p.version);')"
1039
+ if [ "$PIN_PKG" != "$VERSION" ] || [ "$INST_PKG" != "$VERSION" ]; then
1040
+ echo "release:local-update: tip-pin-equals-released FAILED; want $VERSION; package.json pin=$PIN_PKG installed=$INST_PKG" >&2
1041
+ exit 1
1042
+ fi
1043
+ echo "release:local-update: tip-pin-equals-released ok ($VERSION)"
1044
+ RUNTIME_BIN="node_modules/@deftai/directive-runtime/dist/bin.js"
1045
+ if [ ! -f "$RUNTIME_BIN" ]; then
1046
+ echo "release:local-update: missing checkout runtime bin $RUNTIME_BIN" >&2
1047
+ exit 1
1048
+ fi
1049
+ echo "release:local-update: require version-matched agent-hook deposit already on tip"
1050
+ if ! DEFT_DOCTOR_HOOK_DIAGNOSTIC=1 node "$RUNTIME_BIN" verify:hooks-installed --project-root "$CHECKOUT" --scope=agent; then
1051
+ print_deposit_recovery
1052
+ exit 1
1053
+ fi
1054
+ UPGRADE_BIN=""
1055
+ if [ -x "node_modules/.bin/directive" ]; then
1056
+ UPGRADE_BIN="node_modules/.bin/directive"
1057
+ elif [ -f "node_modules/@deftai/directive/dist/bin.js" ]; then
1058
+ UPGRADE_BIN="node node_modules/@deftai/directive/dist/bin.js"
1059
+ elif command -v directive >/dev/null 2>&1; then
1060
+ UPGRADE_BIN="directive"
1061
+ else
1062
+ echo "release:local-update: cannot resolve directive upgrade binary after frozen install" >&2
1063
+ exit 1
1064
+ fi
1065
+ echo "release:local-update: $UPGRADE_BIN upgrade --target-version $VERSION --yes --root $CHECKOUT"
1066
+ $UPGRADE_BIN upgrade --target-version "$VERSION" --yes --root "$CHECKOUT"
1067
+ if [ -n "$(git status --porcelain)" ]; then
1068
+ echo "release:local-update: tracked-file diff after upgrade; closeout non-zero/incomplete (#5953)" >&2
1069
+ git status --short >&2
1070
+ print_deposit_recovery
1071
+ exit 1
1072
+ fi
1073
+ echo "release:local-update: verify:hooks-installed --project-root --scope=all"
1074
+ DEFT_DOCTOR_HOOK_DIAGNOSTIC=1 node "$RUNTIME_BIN" verify:hooks-installed --project-root "$CHECKOUT" --scope=all
1075
+ INST_PKG2="$(node -e 'const fs=require("fs"); const p=JSON.parse(fs.readFileSync("node_modules/@deftai/directive-runtime/package.json","utf8")); console.log(p.version);')"
1076
+ if [ "$INST_PKG2" != "$VERSION" ]; then
1077
+ echo "release:local-update: post-upgrade runtime $INST_PKG2 != $VERSION" >&2
1078
+ exit 1
1079
+ fi
1080
+ echo "release:local-update COMPLETE; checkout=$CHECKOUT version=$INST_PKG2 hooks=verify:hooks-installed --scope=all green"
1081
+ echo "global npm i -g was NOT run (report-only drift remains Phase 7 step 2)."
1082
+
848
1083
 
849
1084
  # ------------------------------------------------------------------
850
1085
  # Triage v1 user-facing alias tasks (#845, #913).
@@ -949,6 +949,7 @@ Every **real** policy write (Phase 2 / Phase 4, and every other `meta/policy-cha
949
949
  - **On-disk layout changed.** Old: `.deft-cache/issues/<owner>-<repo>/<N>.{json,md}` (flat sidecar). New: `.deft-cache/<source>/<key>/{raw.json,content.md,meta.json}` (per-entry directory; schema-validated meta envelope). `cache:get` validates `meta.json` against `vbrief/schemas/cache-meta.schema.json` on every read so a corrupt or version-incompatible file fails closed.
950
950
  - **Audit log UNCHANGED.** `vbrief/.eval/candidates.jsonl` preserves accept / reject / defer / needs-ac / mark-duplicate / reset records across the migration. The Story 3 Tier-2 short-circuit (terminal-decision skip on bulk-* re-runs) operates on the same file.
951
951
  - **All other `triage:*` actions UNCHANGED.** `triage:accept` / `triage:reject` / `triage:defer` / `triage:needs-ac` / `triage:mark-duplicate` / `triage:bulk-accept` / `triage:bulk-reject` / `triage:bulk-defer` / `triage:bulk-needs-ac` / `triage:status` / `triage:reset` / `triage:history` / `triage:refresh-active` keep their v0.25.x surface byte-for-byte (13 aliases). The rebind onto `cache:get` is internal. `triage:bootstrap` keeps its v0.25.x command surface but its on-disk output is the new `.deft-cache/<source>/<key>/` per-entry layout (now delegates to `cache:fetch-all`); see the Commands list above.
952
+ - **Gitcrawl fallback semantics no longer apply.** After this cache rebind, the old `docs/gitcrawl-fallback.md` gh-only install/recovery path is withdrawn. Do not follow that doc for v0.26+ triage/cache; use `cache:*` and this migration section instead (#1092).
952
953
 
953
954
  ### Rollback
954
955
 
@@ -65,7 +65,7 @@ Record `arc-mode: no-ingest` or `arc-mode: checkout` on the Stop 1 write-back. `
65
65
  - ! Parent-unclaimed is its own MUST: `session:start --read-only`, or an explicit occupancy release if a mutation lease is already held. Dest create does not clear occupancy.
66
66
  - ! Recognition of `no-ingest` happens before mutation initialization. Refuse github-only when mutation `session:start` has already occurred, unless the lease is released first.
67
67
  - ! Posting path that survives a foreign lease: `gh issue comment --body-file -` (stdin). Least-authority envelope: bounded GitHub reads and one comment post.
68
- - ! Parent fetches, then creates or verifies one dest at origin/<default> tip (`ensureArcDest`). dispatch-sha equals that tip. Against-implementation dest is the fetched PR head SHA, recorded on Stop 1. ⊗ Pin dest to local HEAD.
68
+ - ! Parent fetches, then creates or verifies one dest at origin/<default> tip via the sanctioned pin-bin verb `deft design-critique:ensure-arc-dest` (library `ensureArcDest`; guarded-prep default, or explicit `process-only-no-install`). When guarded-prep is selected, success requires the outer-visible runtime pin. dispatch-sha equals that tip. Against-implementation dest is the fetched PR head SHA, recorded on Stop 1. ⊗ Pin dest to local HEAD. ⊗ Treat gitignored `packages/core/dist` as SoT for `ensureArcDest` on framework-source.
69
69
  - ! N>1 process-only critics share that dest with cwd-without-occupy. They are not swarm Phase 2 and not a #4066 mutating worker. Unique dest-lock stays for implement-class. Skip class is a host-visible Grok stdin marker (`subagent_type` `plan` or `process_only`), not dest-path. That marker is the process-only skip class, not an implementation-gate bypass: implement-class never sets `process_only`. ⊗ Skip #2885 on destProven. Keep #4066 primary-path deny. ⊗ Pin dest / process_only skip-class rules into `templates/agents-entry.md`.
70
70
  - ! Pin reads to `git show <dispatch-sha>:` against the recorded SHA. ⊗ A moving branch ref.
71
71
  - ! Before panel-deposit on a process-only dest, record a closed `verification-path:` line that either (a) names the read-only pin-read path (`git show <dispatch-sha>:`, dest cwd-without-occupy for on-pin file reads), or (b) records a provisioned runnable path when a specific check requires executing fixtures/tests. Default to (a). Keep N≥3 launch-probe (`evaluateN3LaunchProbe`) as launchability, separate from method-verification. `verificationPathRecordLine` / `evaluateVerificationPathBeforePanelDeposit` are the fixtures. ⊗ Mandate full install-on-dest for every panel.
@@ -195,6 +195,12 @@ OS-temp dests and commands with no recognized dest (`git status`,
195
195
  remains **escape** polarity (in-tree dest whose realpath leaves the tree) and is
196
196
  not this check. The hook still runs before the shell, so a link created between
197
197
  check and write is TOCTOU.
198
+ - **Kill-switch / permanent opt-out plant (#6136):** Shell write reissue checks
199
+ `.deft-directive-disable` / `.no-deft-directive` basenames **before** the
200
+ `isInRepoShellWritePath` skip, so an out-of-tree plant cannot fail-open. Agent
201
+ Write/Edit/Shell of those basenames is always-on deny without a human-origin
202
+ settings grant (docs: `deft-directive-disable.md`). General protected-target /
203
+ out-of-tree floor work stays on #6138; deny wording on #6139.
198
204
 
199
205
  Fail-open at this predicate is the bound posture (#3997). Inverting it to
200
206
  fail-closed on dests the parser cannot prove external is that issue's refuted
@@ -82,11 +82,11 @@ rm .deft-directive-disable
82
82
  # Start a NEW agent session
83
83
  ```
84
84
 
85
- ## Agent self-serve ban under UAT (#3186)
85
+ ## Agent self-serve ban (always-on, grant-gated) (#3186 / #6136)
86
86
 
87
- Operators plant and remove this flag **outside** an agent session (or with a prior human-origin grant). Under **active UAT**, PreToolUse classifies Shell writes that create `.deft-directive-disable` (and permanent opt-out `.no-deft-directive`) as **settings** and **denies** them without a human grant — same posture as `authz:grant` (#3110). Agents must not self-serve the kill-switch to bypass Write / push / PR / merge gates.
87
+ Operators plant and remove this flag **outside** an agent session (or with a prior human-origin grant covering **settings**). PreToolUse **always** denies agent Write / Edit / Shell that creates or renames-to `.deft-directive-disable` (and permanent opt-out `.no-deft-directive`) without that grant — not only under active UAT. Shell write reissue checks the protected basename **before** skipping out-of-tree dests, so a plant outside the repo tree cannot fail-open. Agents must not self-serve the kill-switch to bypass Write / push / PR / merge gates.
88
88
 
89
- Related: `policy:allow-bot-merge`, `policy:allow-direct-commits`, and `policy:disable-directive` (peers) are also settings under UAT and require a human grant.
89
+ Related: `policy:allow-bot-merge`, `policy:allow-direct-commits`, and `policy:disable-directive` (peers) are settings under UAT and require a human grant.
90
90
 
91
91
  ## Non-goals (v1)
92
92
 
@@ -73,6 +73,10 @@ When an active implementation brief is **outside** the change set, membership is
73
73
 
74
74
  Membership-land (Path B activation) PRs that only touch nonterminal `xbrief|vbrief` under `proposed|pending|active` plus optional root `CHANGELOG.md` leave `metadata.productPullRequest` **unset**. Closing-keywords admits that brief-land shape when body has `deft-story: N` covering each changed nonterminal (`isBriefLandShapedDiff` + early return in `evaluateFullStoryMarkAdmission`). Optional `metadata.activationPullRequest` is provenance only — delivery readers ignore it. The stacked product PR stamps virgin `productPullRequest` on the existing null path; leftover keeps the original product stamp. ⊗ Write the activation PR number into `productPullRequest`. Legacy stamped activations unstamp once, then product stamps. Depth: `packages/core/src/pr-closing-keywords/main.ts`.
75
75
 
76
+ ### Path B activation vs product `verify:ac` (#5792)
77
+
78
+ Scope-only Path B activation must be able to clear `deft check` before merge-base write authority exists. Check inventories the complete local change set (merge-base..HEAD ∪ dirty ∪ cached ∪ untracked, with rename origins) into `PrDiffPath`, then reuses the Path B witness (`evaluatePathBActivationAdmit`). Inventory base prefers typed `plan.policy.deliveryBranch` / remote default before `master`|`main`, and git-toplevel paths are remapped to `projectRoot` so nested consumers keep brief-land shape. When the inventory is brief-land shaped and the witness admits, check records one named disposition `path_b_activation_deferred` and **defers** product acceptance commands and artifact-clause execution — it does not selectively forgive opaque npm failures and does not bank as a later product verified-pass. Local check without a PR body uses inventory brief issue-ref identity instead of `deft-story` marks; when a PR body is present, mark coverage still applies. Any product path in the inventory, or `productPullRequest` set, restores full `verify:ac`. Write authority stays merge-base-only (`loadStoryWriteFenceFromMergeBase` unchanged). Depth: `packages/core/src/verify-ac/evaluate.ts`, `packages/core/src/check/cached-orchestrator.ts`.
79
+
76
80
 
77
81
  ## Historical ship-closeout for stale merged actives (#5403)
78
82
 
@@ -711,6 +711,21 @@
711
711
  ],
712
712
  "source": "Issue #4888 Prefer-A Bound 6050812821 (parent #964). conflict_group mergeable-state-semantic-policy-invisibility.",
713
713
  "body": "**Source:** Issue #4888 Prefer-A Bound 6050812821 (split from parent #964).\n\n**Failure mode:** GitHub `mergeable_state` / `mergeable` report only textual (axis-1) conflicts. After a PR opens, behavioral (CI/test) and policy (`task check` / required contexts) gates can land on the base without a textual conflict. Agents read dirty/clean as readiness or gap-size and miss the invisible policy miss until `task check` runs on the merge result.\n\n**Rule:** Use the three-axis model (textual / behavioral / policy). On conflict-resolve and behind-rebase (PR open; local HEAD matches live remote PR head), require machine-checkable candidate validation keyed to `(pr_head_sha, target_head_sha)` via `evaluateNonCascadeCandidateGreen` / `evaluateSemanticGreen({ requireCandidateValidation: true })`. Attestation is a named allowlisted probe exit 0 (typically pre-pr `task check` / `deft check`); prose stamps are not success. On pre-push, run that local merge-chokepoint gate before push; require the SHA-pair attestation only after push when local HEAD matches the live remote PR head. Do not weaken `--cascade` absolute stale-base refusal. Keep #4889 out; do not satisfy with a withdrawn Python semantic-drift script SoT. Forge supersession is #633/#1517 required Merge gate aggregator + up-to-date-required; local probe is interim.\n\n**Canonical encoding (strongest-applicable layer):** probe in `packages/core/src/pr-wait-mergeable/semantic-green.ts` (`requireCandidateValidation` / `validateCandidateAttestation`); operative MUST in `content/scm/github.md` § Cascade / Three-axis (#4888) and `skills/deft-directive-pre-pr/SKILL.md` merge-chokepoint attach; forge supersession in `content/scm/github.md` § Merge-gate aggregator (#633). AGENTS/agents-entry pointer only.\n\n**Cross-references:** #4888, #964, #2385, #1369, #633, #1517, #4883 (CLEAN = axis-1 necessity), #4889 (kept out)."
714
+ },
715
+ {
716
+ "id": "edit-files-search-strings-must-capture-full-units-not-substrings-2026-05",
717
+ "title": "edit_files search strings MUST capture full units, not substrings (2026-05)",
718
+ "date": "2026-05",
719
+ "issue_refs": [
720
+ "#1037"
721
+ ],
722
+ "tags": [
723
+ "debugging",
724
+ "agent-orchestration",
725
+ "github"
726
+ ],
727
+ "source": "Issue #1037 Prefer-A Bound 6689115138. Recurrence: PR #1034 (2026-05-11); #911 cascade (2026-05-04).",
728
+ "body": "**Source:** Issue #1037 Prefer-A Bound 6689115138. Recurrence: PR #1034 (2026-05-11) Greptile P1 on truncated CHANGELOG #441 close-out bullet; sibling outcome class in the #911 cascade (2026-05-04).\n\n**Failure mode:** Exact-string replace tools (`edit_files` / StrReplace-class) replace only the matched `search` bytes. When the agent anchors on a substring of a longer single-line or multi-line entry (CHANGELOG bullet, ROADMAP list item, section body), the unmatched overflow past the search anchor is deleted with the match. The tool did what it was asked; the agent chose too short a search.\n\n**Rule:** When using exact-string-match replacement to modify a single-line or multi-line entry, the `search` value MUST match the FULL line / FULL entry being targeted, including any trailing prose / continuation the agent intends to preserve.\n\n**Anti-pattern:** Pick the first N words of a long bullet as the search anchor; the replacement silently truncates the bullet at the end of the matched substring.\n\n**Mitigation:**\n- ! When targeting a markdown bullet, the `search` value MUST extend to the next blank line or the next top-level list marker, whichever comes first. Re-read the file and capture ALL bytes that belong to the targeted entry.\n- ! When adding a new bullet ABOVE an existing one, an even safer pattern is to anchor `search` on the section heading (e.g. `### Refinement`) and re-emit the heading in `replace` followed by the new bullet and the existing first bullet -- but you MUST still capture every byte of that existing first bullet.\n- ! After every exact-string replace that touches CHANGELOG.md, ROADMAP.md, or any other append-only narrative file, re-read the surrounding 20 lines of the edited region and verify nothing was truncated. This is part of the standard pre-commit file review.\n\n**Recurrence record:**\n- PR #1034 (2026-05-11) -- CHANGELOG.md `### Refinement` first bullet truncated when adding a new bullet above it; Greptile caught it as a P1 in review-cycle.\n- PR #911 cascade (2026-05-04) -- different mechanism (HEAD-only slice resolution), same outcome class: CHANGELOG `[Unreleased]` branch entries dropped on conflict resolution.\n\n**Canonical encoding:** lessons-pack-0.1 entry (this body); projected via `task packs:render` into `meta/lessons.md`. Lesson-tier only -- no new AGENTS.md always-pin; optional `verify:changelog-bullets` stays out of Bound (#1037 Prefer-A Reject).\n\n**Cross-references:** Issue #1037, Prefer-A Bound 6689115138, PR #1034, PR #911 cascade, `skills/deft-directive-build/SKILL.md` / `skills/deft-directive-refinement/SKILL.md` pre-commit file review."
714
729
  }
715
730
  ]
716
731
  }