@deftai/directive-runtime 0.129.5 → 0.129.7

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 (222) hide show
  1. package/Taskfile.yml +316 -0
  2. package/UPGRADING.md +1 -0
  3. package/commands.md +5 -3
  4. package/contracts/design-critique.md +1 -1
  5. package/contracts/path-write-fence.md +6 -0
  6. package/dist/applying-host-release.d.ts +16 -0
  7. package/dist/applying-host-release.js +98 -0
  8. package/dist/authz.d.ts +1 -1
  9. package/dist/authz.js +1 -1
  10. package/dist/check.d.ts +1 -0
  11. package/dist/check.js +27 -4
  12. package/dist/design-critique-ensure-arc-dest.d.ts +16 -0
  13. package/dist/design-critique-ensure-arc-dest.js +168 -0
  14. package/dist/dispatch.d.ts +1 -1
  15. package/dist/dispatch.js +8 -0
  16. package/dist/hook-dispatch.js +3 -2
  17. package/dist/human-presence-mint.d.ts +6 -1
  18. package/dist/human-presence-mint.js +20 -6
  19. package/dist/session-start.d.ts +8 -2
  20. package/dist/session-start.js +70 -15
  21. package/dist/setup-wiring.d.ts +36 -0
  22. package/dist/setup-wiring.js +169 -14
  23. package/dist/vbrief-preflight.d.ts +4 -0
  24. package/dist/vbrief-preflight.js +34 -0
  25. package/dist/verify-scope-provenance.d.ts +13 -1
  26. package/dist/verify-scope-provenance.js +44 -1
  27. package/dist/verify-source-cli/verify-deposit-closure.js +5 -5
  28. package/dist/windows-bin-ps1.d.ts +2 -2
  29. package/dist/windows-bin-ps1.js +5 -11
  30. package/docs/deft-directive-disable.md +3 -3
  31. package/docs/getting-started.md +2 -0
  32. package/docs/scope-provenance.md +15 -1
  33. package/package.json +2 -3
  34. package/packs/lessons/lessons-pack-0.1.json +15 -0
  35. package/packs/skills/skills-pack-0.1.json +3 -3
  36. package/skills/deft-directive-design-critique/SKILL.md +1 -1
  37. package/skills/deft-directive-release/SKILL.md +31 -1
  38. package/skills/deft-directive-review-cycle/SKILL.md +15 -6
  39. package/skills/deft-directive-swarm/references/host-grok-build.md +3 -2
  40. package/vendor/directive-content/Taskfile.yml +316 -0
  41. package/vendor/directive-content/UPGRADING.md +1 -0
  42. package/vendor/directive-content/commands.md +5 -3
  43. package/vendor/directive-content/contracts/design-critique.md +1 -1
  44. package/vendor/directive-content/contracts/path-write-fence.md +6 -0
  45. package/vendor/directive-content/docs/deft-directive-disable.md +3 -3
  46. package/vendor/directive-content/docs/getting-started.md +2 -0
  47. package/vendor/directive-content/docs/scope-provenance.md +15 -1
  48. package/vendor/directive-content/packs/lessons/lessons-pack-0.1.json +15 -0
  49. package/vendor/directive-content/packs/skills/skills-pack-0.1.json +3 -3
  50. package/vendor/directive-content/skills/deft-directive-design-critique/SKILL.md +1 -1
  51. package/vendor/directive-content/skills/deft-directive-release/SKILL.md +31 -1
  52. package/vendor/directive-content/skills/deft-directive-review-cycle/SKILL.md +15 -6
  53. package/vendor/directive-content/skills/deft-directive-swarm/references/host-grok-build.md +3 -2
  54. package/vendor/directive-core/dist/.tsbuildinfo +1 -1
  55. package/vendor/directive-core/dist/authz/classify.d.ts +12 -0
  56. package/vendor/directive-core/dist/authz/classify.d.ts.map +1 -1
  57. package/vendor/directive-core/dist/authz/classify.js +40 -12
  58. package/vendor/directive-core/dist/authz/classify.js.map +1 -1
  59. package/vendor/directive-core/dist/authz/templates.d.ts +2 -2
  60. package/vendor/directive-core/dist/authz/templates.d.ts.map +1 -1
  61. package/vendor/directive-core/dist/authz/templates.js +1 -0
  62. package/vendor/directive-core/dist/authz/templates.js.map +1 -1
  63. package/vendor/directive-core/dist/authz/types.d.ts +1 -1
  64. package/vendor/directive-core/dist/authz/types.d.ts.map +1 -1
  65. package/vendor/directive-core/dist/authz/types.js +2 -0
  66. package/vendor/directive-core/dist/authz/types.js.map +1 -1
  67. package/vendor/directive-core/dist/authz/verb-classification.d.ts.map +1 -1
  68. package/vendor/directive-core/dist/authz/verb-classification.js +30 -3
  69. package/vendor/directive-core/dist/authz/verb-classification.js.map +1 -1
  70. package/vendor/directive-core/dist/cache/fetch.d.ts.map +1 -1
  71. package/vendor/directive-core/dist/cache/fetch.js +50 -4
  72. package/vendor/directive-core/dist/cache/fetch.js.map +1 -1
  73. package/vendor/directive-core/dist/design-critique/arc-dest.d.ts +22 -5
  74. package/vendor/directive-core/dist/design-critique/arc-dest.d.ts.map +1 -1
  75. package/vendor/directive-core/dist/design-critique/arc-dest.js +61 -0
  76. package/vendor/directive-core/dist/design-critique/arc-dest.js.map +1 -1
  77. package/vendor/directive-core/dist/design-critique/run-posture.d.ts +7 -2
  78. package/vendor/directive-core/dist/design-critique/run-posture.d.ts.map +1 -1
  79. package/vendor/directive-core/dist/design-critique/run-posture.js +6 -1
  80. package/vendor/directive-core/dist/design-critique/run-posture.js.map +1 -1
  81. package/vendor/directive-core/dist/fs/contained-write.d.ts +8 -2
  82. package/vendor/directive-core/dist/fs/contained-write.d.ts.map +1 -1
  83. package/vendor/directive-core/dist/fs/contained-write.js +22 -6
  84. package/vendor/directive-core/dist/fs/contained-write.js.map +1 -1
  85. package/vendor/directive-core/dist/hooks/dispatcher.d.ts +1 -1
  86. package/vendor/directive-core/dist/hooks/dispatcher.d.ts.map +1 -1
  87. package/vendor/directive-core/dist/hooks/dispatcher.js +290 -16
  88. package/vendor/directive-core/dist/hooks/dispatcher.js.map +1 -1
  89. package/vendor/directive-core/dist/hooks/shell-write-targets.d.ts +5 -0
  90. package/vendor/directive-core/dist/hooks/shell-write-targets.d.ts.map +1 -1
  91. package/vendor/directive-core/dist/hooks/shell-write-targets.js +18 -1
  92. package/vendor/directive-core/dist/hooks/shell-write-targets.js.map +1 -1
  93. package/vendor/directive-core/dist/init-deposit/agent-hooks.d.ts +26 -1
  94. package/vendor/directive-core/dist/init-deposit/agent-hooks.d.ts.map +1 -1
  95. package/vendor/directive-core/dist/init-deposit/agent-hooks.js +52 -3
  96. package/vendor/directive-core/dist/init-deposit/agent-hooks.js.map +1 -1
  97. package/vendor/directive-core/dist/init-deposit/host-hook-outer.d.ts +48 -0
  98. package/vendor/directive-core/dist/init-deposit/host-hook-outer.d.ts.map +1 -1
  99. package/vendor/directive-core/dist/init-deposit/host-hook-outer.js +170 -9
  100. package/vendor/directive-core/dist/init-deposit/host-hook-outer.js.map +1 -1
  101. package/vendor/directive-core/dist/init-deposit/scaffold.d.ts +8 -1
  102. package/vendor/directive-core/dist/init-deposit/scaffold.d.ts.map +1 -1
  103. package/vendor/directive-core/dist/init-deposit/scaffold.js +38 -4
  104. package/vendor/directive-core/dist/init-deposit/scaffold.js.map +1 -1
  105. package/vendor/directive-core/dist/install-health/cheap.d.ts +2 -1
  106. package/vendor/directive-core/dist/install-health/cheap.d.ts.map +1 -1
  107. package/vendor/directive-core/dist/install-health/cheap.js +4 -3
  108. package/vendor/directive-core/dist/install-health/cheap.js.map +1 -1
  109. package/vendor/directive-core/dist/install-health/constants.d.ts +18 -2
  110. package/vendor/directive-core/dist/install-health/constants.d.ts.map +1 -1
  111. package/vendor/directive-core/dist/install-health/constants.js +18 -2
  112. package/vendor/directive-core/dist/install-health/constants.js.map +1 -1
  113. package/vendor/directive-core/dist/policy/deft-directive-disable.d.ts +42 -5
  114. package/vendor/directive-core/dist/policy/deft-directive-disable.d.ts.map +1 -1
  115. package/vendor/directive-core/dist/policy/deft-directive-disable.js +71 -41
  116. package/vendor/directive-core/dist/policy/deft-directive-disable.js.map +1 -1
  117. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.d.ts +6 -1
  118. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.d.ts.map +1 -1
  119. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.js +24 -12
  120. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.js.map +1 -1
  121. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.d.ts +68 -14
  122. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.d.ts.map +1 -1
  123. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.js +278 -47
  124. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.js.map +1 -1
  125. package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.d.ts +10 -5
  126. package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.d.ts.map +1 -1
  127. package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.js +41 -18
  128. package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.js.map +1 -1
  129. package/vendor/directive-core/dist/preflight-gh/pre-push.d.ts +3 -2
  130. package/vendor/directive-core/dist/preflight-gh/pre-push.d.ts.map +1 -1
  131. package/vendor/directive-core/dist/preflight-gh/pre-push.js +19 -18
  132. package/vendor/directive-core/dist/preflight-gh/pre-push.js.map +1 -1
  133. package/vendor/directive-core/dist/release/gh.d.ts.map +1 -1
  134. package/vendor/directive-core/dist/release/gh.js +2 -1
  135. package/vendor/directive-core/dist/release/gh.js.map +1 -1
  136. package/vendor/directive-core/dist/release/version.d.ts +4 -2
  137. package/vendor/directive-core/dist/release/version.d.ts.map +1 -1
  138. package/vendor/directive-core/dist/release/version.js +4 -2
  139. package/vendor/directive-core/dist/release/version.js.map +1 -1
  140. package/vendor/directive-core/dist/release-publish/gh-api.d.ts.map +1 -1
  141. package/vendor/directive-core/dist/release-publish/gh-api.js +4 -2
  142. package/vendor/directive-core/dist/release-publish/gh-api.js.map +1 -1
  143. package/vendor/directive-core/dist/release-publish/main.d.ts.map +1 -1
  144. package/vendor/directive-core/dist/release-publish/main.js +15 -4
  145. package/vendor/directive-core/dist/release-publish/main.js.map +1 -1
  146. package/vendor/directive-core/dist/release-publish/pipeline.d.ts +11 -0
  147. package/vendor/directive-core/dist/release-publish/pipeline.d.ts.map +1 -1
  148. package/vendor/directive-core/dist/release-publish/pipeline.js +143 -2
  149. package/vendor/directive-core/dist/release-publish/pipeline.js.map +1 -1
  150. package/vendor/directive-core/dist/release-rollback/gh.d.ts.map +1 -1
  151. package/vendor/directive-core/dist/release-rollback/gh.js +2 -1
  152. package/vendor/directive-core/dist/release-rollback/gh.js.map +1 -1
  153. package/vendor/directive-core/dist/scope/delivery-evidence.d.ts +202 -19
  154. package/vendor/directive-core/dist/scope/delivery-evidence.d.ts.map +1 -1
  155. package/vendor/directive-core/dist/scope/delivery-evidence.js +948 -107
  156. package/vendor/directive-core/dist/scope/delivery-evidence.js.map +1 -1
  157. package/vendor/directive-core/dist/scope/transition.d.ts +4 -1
  158. package/vendor/directive-core/dist/scope/transition.d.ts.map +1 -1
  159. package/vendor/directive-core/dist/scope/transition.js +2 -2
  160. package/vendor/directive-core/dist/scope/transition.js.map +1 -1
  161. package/vendor/directive-core/dist/scope-provenance/base-fence.d.ts +11 -2
  162. package/vendor/directive-core/dist/scope-provenance/base-fence.d.ts.map +1 -1
  163. package/vendor/directive-core/dist/scope-provenance/base-fence.js +16 -1
  164. package/vendor/directive-core/dist/scope-provenance/base-fence.js.map +1 -1
  165. package/vendor/directive-core/dist/scope-provenance/evaluate.d.ts +12 -0
  166. package/vendor/directive-core/dist/scope-provenance/evaluate.d.ts.map +1 -1
  167. package/vendor/directive-core/dist/scope-provenance/evaluate.js +41 -5
  168. package/vendor/directive-core/dist/scope-provenance/evaluate.js.map +1 -1
  169. package/vendor/directive-core/dist/scope-provenance/forge-approval.d.ts +106 -0
  170. package/vendor/directive-core/dist/scope-provenance/forge-approval.d.ts.map +1 -0
  171. package/vendor/directive-core/dist/scope-provenance/forge-approval.js +382 -0
  172. package/vendor/directive-core/dist/scope-provenance/forge-approval.js.map +1 -0
  173. package/vendor/directive-core/dist/session/git.d.ts +21 -2
  174. package/vendor/directive-core/dist/session/git.d.ts.map +1 -1
  175. package/vendor/directive-core/dist/session/git.js +21 -4
  176. package/vendor/directive-core/dist/session/git.js.map +1 -1
  177. package/vendor/directive-core/dist/session/occupancy.d.ts +93 -6
  178. package/vendor/directive-core/dist/session/occupancy.d.ts.map +1 -1
  179. package/vendor/directive-core/dist/session/occupancy.js +215 -52
  180. package/vendor/directive-core/dist/session/occupancy.js.map +1 -1
  181. package/vendor/directive-core/dist/session/orientation-compression.d.ts +18 -2
  182. package/vendor/directive-core/dist/session/orientation-compression.d.ts.map +1 -1
  183. package/vendor/directive-core/dist/session/orientation-compression.js +38 -5
  184. package/vendor/directive-core/dist/session/orientation-compression.js.map +1 -1
  185. package/vendor/directive-core/dist/session/session-start.d.ts +47 -2
  186. package/vendor/directive-core/dist/session/session-start.d.ts.map +1 -1
  187. package/vendor/directive-core/dist/session/session-start.js +154 -3
  188. package/vendor/directive-core/dist/session/session-start.js.map +1 -1
  189. package/vendor/directive-core/dist/swarm/approach1-babysitter.d.ts +18 -4
  190. package/vendor/directive-core/dist/swarm/approach1-babysitter.d.ts.map +1 -1
  191. package/vendor/directive-core/dist/swarm/approach1-babysitter.js +28 -4
  192. package/vendor/directive-core/dist/swarm/approach1-babysitter.js.map +1 -1
  193. package/vendor/directive-core/dist/swarm/dest-place.d.ts +1 -1
  194. package/vendor/directive-core/dist/swarm/dest-place.d.ts.map +1 -1
  195. package/vendor/directive-core/dist/swarm/dest-place.js +36 -41
  196. package/vendor/directive-core/dist/swarm/dest-place.js.map +1 -1
  197. package/vendor/directive-core/dist/swarm/finalize-cohort.d.ts +29 -0
  198. package/vendor/directive-core/dist/swarm/finalize-cohort.d.ts.map +1 -1
  199. package/vendor/directive-core/dist/swarm/finalize-cohort.js +122 -11
  200. package/vendor/directive-core/dist/swarm/finalize-cohort.js.map +1 -1
  201. package/vendor/directive-core/dist/swarm/finalize-owed.d.ts +14 -0
  202. package/vendor/directive-core/dist/swarm/finalize-owed.d.ts.map +1 -1
  203. package/vendor/directive-core/dist/swarm/finalize-owed.js +214 -48
  204. package/vendor/directive-core/dist/swarm/finalize-owed.js.map +1 -1
  205. package/vendor/directive-core/dist/swarm/launch.d.ts.map +1 -1
  206. package/vendor/directive-core/dist/swarm/launch.js +15 -4
  207. package/vendor/directive-core/dist/swarm/launch.js.map +1 -1
  208. package/vendor/directive-core/dist/swarm/worktree-pm-install.d.ts +49 -2
  209. package/vendor/directive-core/dist/swarm/worktree-pm-install.d.ts.map +1 -1
  210. package/vendor/directive-core/dist/swarm/worktree-pm-install.js +207 -12
  211. package/vendor/directive-core/dist/swarm/worktree-pm-install.js.map +1 -1
  212. package/vendor/directive-core/dist/swarm/worktrees-cli.d.ts +6 -0
  213. package/vendor/directive-core/dist/swarm/worktrees-cli.d.ts.map +1 -1
  214. package/vendor/directive-core/dist/swarm/worktrees-cli.js +79 -2
  215. package/vendor/directive-core/dist/swarm/worktrees-cli.js.map +1 -1
  216. package/vendor/directive-core/dist/swarm/worktrees.d.ts +12 -1
  217. package/vendor/directive-core/dist/swarm/worktrees.d.ts.map +1 -1
  218. package/vendor/directive-core/dist/swarm/worktrees.js +34 -26
  219. package/vendor/directive-core/dist/swarm/worktrees.js.map +1 -1
  220. package/vendor/directive-core/dist/triage/evaluate/worktrees.d.ts.map +1 -1
  221. package/vendor/directive-core/dist/triage/evaluate/worktrees.js +219 -60
  222. package/vendor/directive-core/dist/triage/evaluate/worktrees.js.map +1 -1
@@ -58,6 +58,8 @@ directive doctor
58
58
 
59
59
  After clone or a new worktree: run the project package manager (`npm install` / `pnpm install`), then the first eligible runtime command or registered hook completes local activation.
60
60
 
61
+ **Dependabot / pin-only bumps (AC14.10):** a PR that changes only the `@deftai/directive-runtime` pin + lockfile is valid. After `pnpm install` / `npm install` brings `node_modules` to the new pin, the first eligible skill, hook, or ordinary runtime command runs local automatic setup (wiring / `GENERATION` / readiness). `directive doctor` stays read-only — dirty doctor output before that eligible invocation is expected. CI may either rely on that first eligible command or run explicit `directive install --repair --yes`. Do not treat "deposit bytes must land in the same pin PR" as product law. Human-test mirror: HT-17 in `docs/installer-refactor-ovpr/install-ovpr-human-test-plan.md`. Schema/data behind the new pin still needs `directive upgrade` (AC14.11), not repair alone.
62
+
61
63
  **Repair (pin unchanged):** `npm i -g @deftai/directive`, then `directive install --repair`.
62
64
 
63
65
  **Upgrade version or migrate data:** `directive upgrade` (alias: `update`).
@@ -45,10 +45,24 @@ Allowance = clamp(count of **concrete** production files on the merge-base `file
45
45
  When the bound story is in the change set:
46
46
 
47
47
  1. A human-stamped merge-base mint for the **continuity-resolved** story is the allowlist when present (planId match ignores stale `xbriefRelPath`; no-`plan.id` is path-first + basename-keyed mint with matching `xbriefRelPath`).
48
- 2. Otherwise membership evaluates against the merge-base brief's **concrete** `file_scope` as agent precommitment. Head brief cannot widen.
48
+ 2. Otherwise membership evaluates against the merge-base brief's **concrete** `file_scope` as agent precommitment. Head brief cannot widen, except under a qualifying forge approval (#6203, below).
49
49
  3. Free paths: bound brief, verified peer briefs, `CHANGELOG.md`, and continuity lifecycle paths of the bound identity. An xBRIEF-only change set may omit a mint.
50
50
  4. Empty / invalid / unreadable mint records fail closed (they are not absence).
51
51
 
52
+ #### Forge-approved head brief (#6203)
53
+
54
+ A PR can carry a new or widened brief plus its code when a human approves it on GitHub. With PR context (`--pr N` / `--repo OWNER/NAME`, or `GITHUB_PR_NUMBER` / `GITHUB_REPOSITORY` in CI), a failing membership check under precommitment or missing authority consults the forge. When a qualifying approval exists, membership evaluates against the **head** brief's concrete `file_scope` instead of the merge-base brief.
55
+
56
+ - **Mint wins.** A present mint keeps the mint path. The forge is never consulted.
57
+ - **Auth-hash v1** (`sha256:` over canonical JSON; strings byte-exact, no Unicode normalization) covers `plan.id`, the xbrief path, the concrete `file_scope`, and the acceptanceCriteria array: `plan.acceptance`, `plan.narratives.AcceptanceCriteria`, and each item's `narrative.Acceptance`, in document order. `productPullRequest` and other delivery metadata stay out, so a PPR stamp keeps the approval. Any change to the covered fields drops it.
58
+ - **Qualifying approval:** the reviewer's latest deciding review (APPROVED / CHANGES_REQUESTED / DISMISSED) is APPROVED; the reviewer is a `User` (not Bot or App), not the PR author, and has `write`, `maintain` or `admin` on the repo; the repo is the checkout's `origin` (a `--repo` value may only confirm it, so a fork's approval never counts) and is the PR's base repo; the evaluated HEAD is the PR head (or GitHub's merge commit whose second parent is the PR head); and the brief at the reviewed commit hashes the same as the head brief.
59
+ - **Fallback:** missing PR context, no qualifying approval, a hash mismatch, or an unavailable forge keeps today's Path B or mint finding unchanged. The result message adds one `forge approval (#6203)` line with the reason.
60
+ - **Membership only.** The production fence still reads the merge-base brief. A widened brief can pass membership and still fail `production-scope-over-budget`. A brand-new brief has no production fence (as today).
61
+ - **Re-run after approval.** Approval does not re-trigger CI. Re-run the merge gate (or push) after the approval lands.
62
+ - **Residual (#6207):** an agent that holds a second human forge token can satisfy every predicate above. The hash binds the approved bytes; it does not prove independent human intent and does not close that confused-deputy risk. That posture stays open on #6207.
63
+
64
+ Code: `packages/core/src/scope-provenance/forge-approval.ts`.
65
+
52
66
  #### Path A planning split (#5551)
53
67
 
54
68
  When an active implementation brief is **outside** the change set, membership is a no-op for that identity (Path A). Supported planning publication is two change sets, not one:
@@ -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
  }