@deftai/directive-runtime 0.129.6 → 0.129.8

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 (149) hide show
  1. package/Taskfile.yml +103 -16
  2. package/commands.md +8 -3
  3. package/dist/session-start.d.ts +8 -2
  4. package/dist/session-start.js +33 -12
  5. package/dist/vbrief-preflight.d.ts +4 -0
  6. package/dist/vbrief-preflight.js +34 -0
  7. package/dist/verify-scope-provenance.d.ts +13 -1
  8. package/dist/verify-scope-provenance.js +44 -1
  9. package/docs/getting-started.md +2 -0
  10. package/docs/scope-provenance.md +15 -1
  11. package/package.json +1 -1
  12. package/packs/skills/skills-pack-0.1.json +1 -1
  13. package/scm/github.md +5 -0
  14. package/skills/deft-directive-review-cycle/SKILL.md +15 -6
  15. package/skills/deft-directive-swarm/references/host-claude-code.md +11 -1
  16. package/skills/deft-directive-swarm/references/host-grok-build.md +3 -2
  17. package/vendor/directive-content/Taskfile.yml +103 -16
  18. package/vendor/directive-content/commands.md +8 -3
  19. package/vendor/directive-content/docs/getting-started.md +2 -0
  20. package/vendor/directive-content/docs/scope-provenance.md +15 -1
  21. package/vendor/directive-content/packs/skills/skills-pack-0.1.json +1 -1
  22. package/vendor/directive-content/scm/github.md +5 -0
  23. package/vendor/directive-content/skills/deft-directive-review-cycle/SKILL.md +15 -6
  24. package/vendor/directive-content/skills/deft-directive-swarm/references/host-claude-code.md +11 -1
  25. package/vendor/directive-content/skills/deft-directive-swarm/references/host-grok-build.md +3 -2
  26. package/vendor/directive-core/dist/.tsbuildinfo +1 -1
  27. package/vendor/directive-core/dist/check/context.d.ts.map +1 -1
  28. package/vendor/directive-core/dist/check/context.js +3 -31
  29. package/vendor/directive-core/dist/check/context.js.map +1 -1
  30. package/vendor/directive-core/dist/check/gate-lists.d.ts.map +1 -1
  31. package/vendor/directive-core/dist/check/gate-lists.js +4 -32
  32. package/vendor/directive-core/dist/check/gate-lists.js.map +1 -1
  33. package/vendor/directive-core/dist/check/walk-test-files.d.ts +3 -0
  34. package/vendor/directive-core/dist/check/walk-test-files.d.ts.map +1 -0
  35. package/vendor/directive-core/dist/check/walk-test-files.js +67 -0
  36. package/vendor/directive-core/dist/check/walk-test-files.js.map +1 -0
  37. package/vendor/directive-core/dist/fs/contained-write.d.ts +8 -2
  38. package/vendor/directive-core/dist/fs/contained-write.d.ts.map +1 -1
  39. package/vendor/directive-core/dist/fs/contained-write.js +22 -6
  40. package/vendor/directive-core/dist/fs/contained-write.js.map +1 -1
  41. package/vendor/directive-core/dist/hooks/dispatcher.d.ts +7 -1
  42. package/vendor/directive-core/dist/hooks/dispatcher.d.ts.map +1 -1
  43. package/vendor/directive-core/dist/hooks/dispatcher.js +180 -10
  44. package/vendor/directive-core/dist/hooks/dispatcher.js.map +1 -1
  45. package/vendor/directive-core/dist/hooks/scope.d.ts +54 -0
  46. package/vendor/directive-core/dist/hooks/scope.d.ts.map +1 -1
  47. package/vendor/directive-core/dist/hooks/scope.js +83 -2
  48. package/vendor/directive-core/dist/hooks/scope.js.map +1 -1
  49. package/vendor/directive-core/dist/init-deposit/agent-hooks.d.ts +26 -1
  50. package/vendor/directive-core/dist/init-deposit/agent-hooks.d.ts.map +1 -1
  51. package/vendor/directive-core/dist/init-deposit/agent-hooks.js +52 -3
  52. package/vendor/directive-core/dist/init-deposit/agent-hooks.js.map +1 -1
  53. package/vendor/directive-core/dist/init-deposit/host-hook-outer.d.ts +43 -0
  54. package/vendor/directive-core/dist/init-deposit/host-hook-outer.d.ts.map +1 -1
  55. package/vendor/directive-core/dist/init-deposit/host-hook-outer.js +148 -0
  56. package/vendor/directive-core/dist/init-deposit/host-hook-outer.js.map +1 -1
  57. package/vendor/directive-core/dist/intake/reconcile-issues.d.ts +33 -1
  58. package/vendor/directive-core/dist/intake/reconcile-issues.d.ts.map +1 -1
  59. package/vendor/directive-core/dist/intake/reconcile-issues.js +288 -12
  60. package/vendor/directive-core/dist/intake/reconcile-issues.js.map +1 -1
  61. package/vendor/directive-core/dist/intake/thin-brief.d.ts +78 -0
  62. package/vendor/directive-core/dist/intake/thin-brief.d.ts.map +1 -0
  63. package/vendor/directive-core/dist/intake/thin-brief.js +224 -0
  64. package/vendor/directive-core/dist/intake/thin-brief.js.map +1 -0
  65. package/vendor/directive-core/dist/policy/ceremony-dial.d.ts.map +1 -1
  66. package/vendor/directive-core/dist/policy/ceremony-dial.js +2 -1
  67. package/vendor/directive-core/dist/policy/ceremony-dial.js.map +1 -1
  68. package/vendor/directive-core/dist/policy/small-change-lane.d.ts +193 -0
  69. package/vendor/directive-core/dist/policy/small-change-lane.d.ts.map +1 -0
  70. package/vendor/directive-core/dist/policy/small-change-lane.js +690 -0
  71. package/vendor/directive-core/dist/policy/small-change-lane.js.map +1 -0
  72. package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.d.ts +10 -5
  73. package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.d.ts.map +1 -1
  74. package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.js +41 -18
  75. package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.js.map +1 -1
  76. package/vendor/directive-core/dist/preflight/evaluate.d.ts +3 -0
  77. package/vendor/directive-core/dist/preflight/evaluate.d.ts.map +1 -1
  78. package/vendor/directive-core/dist/preflight/evaluate.js +15 -0
  79. package/vendor/directive-core/dist/preflight/evaluate.js.map +1 -1
  80. package/vendor/directive-core/dist/preflight-gh/pre-push.d.ts +3 -2
  81. package/vendor/directive-core/dist/preflight-gh/pre-push.d.ts.map +1 -1
  82. package/vendor/directive-core/dist/preflight-gh/pre-push.js +19 -18
  83. package/vendor/directive-core/dist/preflight-gh/pre-push.js.map +1 -1
  84. package/vendor/directive-core/dist/product-first-done-gate/evaluate.d.ts +6 -0
  85. package/vendor/directive-core/dist/product-first-done-gate/evaluate.d.ts.map +1 -1
  86. package/vendor/directive-core/dist/product-first-done-gate/evaluate.js +26 -0
  87. package/vendor/directive-core/dist/product-first-done-gate/evaluate.js.map +1 -1
  88. package/vendor/directive-core/dist/scope/decomposed-refs.d.ts +7 -0
  89. package/vendor/directive-core/dist/scope/decomposed-refs.d.ts.map +1 -1
  90. package/vendor/directive-core/dist/scope/decomposed-refs.js +27 -10
  91. package/vendor/directive-core/dist/scope/decomposed-refs.js.map +1 -1
  92. package/vendor/directive-core/dist/scope/delivery-evidence.d.ts +218 -19
  93. package/vendor/directive-core/dist/scope/delivery-evidence.d.ts.map +1 -1
  94. package/vendor/directive-core/dist/scope/delivery-evidence.js +973 -107
  95. package/vendor/directive-core/dist/scope/delivery-evidence.js.map +1 -1
  96. package/vendor/directive-core/dist/scope/transition.d.ts +7 -1
  97. package/vendor/directive-core/dist/scope/transition.d.ts.map +1 -1
  98. package/vendor/directive-core/dist/scope/transition.js +45 -5
  99. package/vendor/directive-core/dist/scope/transition.js.map +1 -1
  100. package/vendor/directive-core/dist/scope-provenance/base-fence.d.ts +13 -3
  101. package/vendor/directive-core/dist/scope-provenance/base-fence.d.ts.map +1 -1
  102. package/vendor/directive-core/dist/scope-provenance/base-fence.js +25 -2
  103. package/vendor/directive-core/dist/scope-provenance/base-fence.js.map +1 -1
  104. package/vendor/directive-core/dist/scope-provenance/evaluate.d.ts +12 -0
  105. package/vendor/directive-core/dist/scope-provenance/evaluate.d.ts.map +1 -1
  106. package/vendor/directive-core/dist/scope-provenance/evaluate.js +41 -5
  107. package/vendor/directive-core/dist/scope-provenance/evaluate.js.map +1 -1
  108. package/vendor/directive-core/dist/scope-provenance/forge-approval.d.ts +106 -0
  109. package/vendor/directive-core/dist/scope-provenance/forge-approval.d.ts.map +1 -0
  110. package/vendor/directive-core/dist/scope-provenance/forge-approval.js +382 -0
  111. package/vendor/directive-core/dist/scope-provenance/forge-approval.js.map +1 -0
  112. package/vendor/directive-core/dist/session/orientation-compression.d.ts +18 -2
  113. package/vendor/directive-core/dist/session/orientation-compression.d.ts.map +1 -1
  114. package/vendor/directive-core/dist/session/orientation-compression.js +38 -5
  115. package/vendor/directive-core/dist/session/orientation-compression.js.map +1 -1
  116. package/vendor/directive-core/dist/session/session-start.d.ts +47 -2
  117. package/vendor/directive-core/dist/session/session-start.d.ts.map +1 -1
  118. package/vendor/directive-core/dist/session/session-start.js +149 -1
  119. package/vendor/directive-core/dist/session/session-start.js.map +1 -1
  120. package/vendor/directive-core/dist/swarm/approach1-babysitter.d.ts +18 -4
  121. package/vendor/directive-core/dist/swarm/approach1-babysitter.d.ts.map +1 -1
  122. package/vendor/directive-core/dist/swarm/approach1-babysitter.js +28 -4
  123. package/vendor/directive-core/dist/swarm/approach1-babysitter.js.map +1 -1
  124. package/vendor/directive-core/dist/swarm/finalize-cohort.d.ts +48 -0
  125. package/vendor/directive-core/dist/swarm/finalize-cohort.d.ts.map +1 -1
  126. package/vendor/directive-core/dist/swarm/finalize-cohort.js +175 -19
  127. package/vendor/directive-core/dist/swarm/finalize-cohort.js.map +1 -1
  128. package/vendor/directive-core/dist/swarm/finalize-owed.d.ts +18 -3
  129. package/vendor/directive-core/dist/swarm/finalize-owed.d.ts.map +1 -1
  130. package/vendor/directive-core/dist/swarm/finalize-owed.js +139 -32
  131. package/vendor/directive-core/dist/swarm/finalize-owed.js.map +1 -1
  132. package/vendor/directive-core/dist/swarm/launch.d.ts.map +1 -1
  133. package/vendor/directive-core/dist/swarm/launch.js +4 -8
  134. package/vendor/directive-core/dist/swarm/launch.js.map +1 -1
  135. package/vendor/directive-core/dist/swarm/worker-auth-assignment.d.ts +7 -0
  136. package/vendor/directive-core/dist/swarm/worker-auth-assignment.d.ts.map +1 -1
  137. package/vendor/directive-core/dist/swarm/worker-auth-assignment.js +16 -1
  138. package/vendor/directive-core/dist/swarm/worker-auth-assignment.js.map +1 -1
  139. package/vendor/directive-core/dist/task-surface/index.d.ts.map +1 -1
  140. package/vendor/directive-core/dist/task-surface/index.js +41 -0
  141. package/vendor/directive-core/dist/task-surface/index.js.map +1 -1
  142. package/vendor/directive-core/dist/triage/evaluate/worktrees.d.ts.map +1 -1
  143. package/vendor/directive-core/dist/triage/evaluate/worktrees.js +219 -60
  144. package/vendor/directive-core/dist/triage/evaluate/worktrees.js.map +1 -1
  145. package/vendor/directive-core/dist/vbrief-reconcile/types.d.ts +5 -1
  146. package/vendor/directive-core/dist/vbrief-reconcile/types.d.ts.map +1 -1
  147. package/vendor/directive-core/dist/vbrief-reconcile/umbrellas.d.ts.map +1 -1
  148. package/vendor/directive-core/dist/vbrief-reconcile/umbrellas.js +19 -7
  149. package/vendor/directive-core/dist/vbrief-reconcile/umbrellas.js.map +1 -1
@@ -722,6 +722,11 @@ Up-to-date-required branch protection plus a required `Merge gate (task check)`
722
722
 
723
723
  ⊗ Mutate GitHub `mergeable_state` to encode semantic/policy readiness — forge enrollment + local probe are the dispositioned alternatives (#4888 Prefer-A Bound Reject E).
724
724
 
725
+ ### Lifecycle PRs: CHANGELOG and spec-drift ledger (#680)
726
+
727
+ - `verify:changelog-unreleased` skips the new-entry compare when the change set versus merge-base (`git diff --name-only --no-renames`) is non-empty and every path is a lifecycle brief (`xbrief|vbrief/<lifecycle>/`), `CHANGELOG.md`, or `xbrief/.audit/spec-drift-ledger.json`. Activation and completion PRs need no operator CHANGELOG line. Product changes and an empty change set keep the requirement.
728
+ - `scope:complete` writes the spec-drift ledger; `swarm:finalize-cohort` commits it with the completed briefs. Membership admits exactly that ledger path only when the whole change set is a completion move. The verbs own these writes, so agents do not hand-write CHANGELOG or ledger lines on a lifecycle PR.
729
+
725
730
  ### Before flipping (operator)
726
731
 
727
732
  1. Confirm the required context name is exactly `Merge gate (task check)` (the aggregator). Do not require primary or failover lane names.
@@ -536,13 +536,21 @@ REDISPATCH_OK: yes|no
536
536
  ⊗ Treat `ci_never_scheduled` as ordinary Greptile latency (`sha_match` / `terminal_check_run` only).
537
537
  ⊗ Silent `--skip-ci` / admin merge without the outage playbook audit trail below.
538
538
 
539
- ### SLizard advisory-only for merge-ready wait (#3167)
539
+ ### SLizard advisory-only for merge-ready wait (#3167) — weather vs residual (#5102 / #4387)
540
540
 
541
- ! Required bot for **merge-ready wait** / Step 6 exit ownership is **Greptile**. SLizard (Gemini Verify) is **advisory only**: timeouts, retries, missing check, or flaky SLizard conclusions MUST NOT gate the review-cycle wait loop or authorize unbounded re-push.
541
+ ! SLizard is advisory only for the Greptile merge-ready confidence floor; parseable blocking tip fingerprints are unfinished residual (#5102 / #3167).
542
542
 
543
- ! `task pr:merge-ready` may still surface SLizard structure when present (#2189); agents MUST NOT idle-poll or thrash solely for SLizard when Greptile Step 6 is clean. Prefer continue / BLOCKED on CI weather / human decision.
543
+ ! Required bot for **merge-ready wait** / Step 6 exit ownership is **Greptile**. SLizard is **advisory only** for weather (timeout / cancelled / unparseable / zero-finding / missing-check): those MUST NOT gate the review-cycle wait loop (#3167). Parseable blocking tip fingerprints are unfinished residual (#5102).
544
544
 
545
- ⊗ Block merge-ready babysit on SLizard alone when Greptile Step 6 all-of is satisfied on HEAD.
545
+ ! When `pr:merge-ready` / wait-mergeable reports **SLizard blocked** (parseable `request_changes` or `merge_impact=blocking` with non-zero findings) — especially Greptile CLEAN + SLizard blocked — before re-arming merge-ready wait or `pr:wait-mergeable-and-merge` the owner MUST read the tip SLizard **review body** in full, enumerate new and Previously mentioned fingerprints / deterministic tool names, and for each open P0/P1 falsify with `git show <head>:<path>` (slizard#2694) or fix in one residual batch. Do not idle-poll. Keep `pr:watch` Greptile ownership unchanged (#5102 / #2189 / #4387).
546
+
547
+ ! Compose existing head-blob check, same-fingerprint stop (#3448), and `--skip-slizard` override. Do not invent a third poller. `--skip-slizard` is explicit override only — not the default babysit escape.
548
+
549
+ ! Parseable blocking findings with open tip fingerprints are **unfinished residual**, not weather. Cross-link: `packages/core/src/pr-merge-readiness/slizard-gate.ts` (`evaluateSlizardGate`).
550
+
551
+ ⊗ Re-arm wait-mergeable / idle-poll while SLizard still has parseable blocking findings with open tip fingerprints (#5102).
552
+ ⊗ Treat parseable blocking SLizard findings as #3167 weather when Greptile Step 6 is clean (#5102 / #4387).
553
+ ⊗ Default to `--skip-slizard` to clear a merge-ready SLizard block (#5102).
546
554
 
547
555
  ### Outage admin-merge playbook (opt-in / human, #3167)
548
556
 
@@ -725,7 +733,7 @@ Cross-links: swarm decision tree `skills/deft-directive-swarm/references/core-ph
725
733
 
726
734
  ! When the platform descriptor indicates Tier 1 (sub-agent support) **and this agent owns the primitive as parent/orchestrator**, spawn a review-monitor sub-agent using the primitive matching the descriptor. ⊗ A grok-build / grok-bot / Cursor / Claude Code implementation leaf MUST NOT run these spawn steps.
727
735
 
728
- 1. ! Launch via the matching primitive: `start_agent` (Warp), `spawn_subagent` (grok-build / TUI / non-Warp **parent**), the Cursor `Task` tool with `run_in_background: true` (`cursor-composer` / `cursor-cloud-agent`, #1877), the Claude Code `Agent` tool with `run_in_background: true` (`claude-code` / register `claude-agent`, #3134), OpenClaw `sessions_spawn` (`openclaw`, #2876), **or Grok Bot Task/executor/CloudAgent (`grok-bot` / register `grok-bot-executor`, #4201)** with a prompt that instructs it to poll for Greptile completion. For `spawn_subagent`, Cursor `Task`, Claude Code `Agent`, OpenClaw `sessions_spawn`, and Grok Bot executor the prompt MUST reference the canonical poller template `templates/swarm-greptile-poller-prompt.md` (with placeholders filled) plus the agent preamble; the working directory / context must be the PR branch (worktree or equivalent for hybrid).
736
+ 1. ! Launch via the matching primitive: `start_agent` (Warp), `spawn_subagent` (grok-build / TUI / non-Warp **parent**), the Cursor `Task` tool with `run_in_background: true` (`cursor-composer` / `cursor-cloud-agent`, #1877), the Claude Code `Agent` tool with `run_in_background: true` (`claude-code` / register `claude-agent`, #3134), OpenClaw `sessions_spawn` (`openclaw`, #2876), **or Grok Bot Task/executor/CloudAgent (`grok-bot` / register `grok-bot-executor`, #4201)** with a prompt that instructs it to poll for Greptile completion. For `spawn_subagent`, Cursor `Task`, Claude Code `Agent`, OpenClaw `sessions_spawn`, and Grok Bot executor the prompt MUST reference the canonical poller template `templates/swarm-greptile-poller-prompt.md` (with placeholders filled) plus the agent preamble; the working directory / context must be the PR branch (worktree or equivalent for hybrid). **Grok Approach 1 watch/report (#4781):** before `review-monitor:register` / child `pr:watch`, spawn with advertised `process_only: true` + dest `cwd` for `stop-at: pr-open` + `worker_role: review-monitor` seats only (`formatApproach1ProcessOnlySpawnShape` / `approach1BabysitterCommands`). Implement-class never sets `process_only`; dest-path is not the skip class; do not blanket-flag the fix-capable greptile poller.
729
737
  2. ! The sub-agent polls using the mechanism for its primitive: for `spawn_subagent` the **child** owns `pr:watch` / gh poll in its own process (adaptive cadence: ~20-30s first check after push, ~60s second, ~90s thereafter; Greptile typically lands in 3-7 min) — the user-facing parent MUST NOT enter `get_command_or_subagent_output`; a named durable-owner session MAY pull-wait (`host-grok-build.md` Gap D); for `start_agent` the native messaging path; for the Cursor `Task` tool the backgrounded-task completion-notification path; for Claude Code `Agent` the backgrounded-agent completion-notification path; for OpenClaw `sessions_spawn` the host session completion / messaging channel (prefer `task pr:watch` inside the child when available). Front-load the first check to catch fast reviews.
730
738
  3. ! When the exit condition is met (Greptile review current on the HEAD commit SHA, confidence meets resolved min (policy/dogfood/default; see Step 6 #3095), no P0/P1 remaining), the sub-agent reports completion back to the parent (via `send_message_to_agent`, the spawn_subagent result channel, or the OpenClaw sessions completion channel).
731
739
  4. ! The main conversation pane stays fully interactive during monitoring -- the user (or parent monitor) can continue other work. On Grok Build this is conditional until a measured completion-notify exists: it holds when the parent returns the turn after background spawn, not when the parent pull-waits (`host-grok-build.md` Gap D / #4796).
@@ -1029,7 +1037,8 @@ task lifecycle:event -- emit plan:approved \
1029
1037
  - ⊗ Workflow thrash or empty-commit spam during attributed platform outage without status-page probe (#3180)
1030
1038
  - ⊗ Tight forge-outage retry / empty-commit thrash without a one-shot human report (#3422)
1031
1039
  - ⊗ Merge or `--skip-ci` solely because a status page is red without check-run evidence (#3180)
1032
- - ⊗ Block merge-ready wait on SLizard alone when Greptile Step 6 is clean (#3167)
1040
+ - ⊗ Re-arm wait-mergeable or treat parseable blocking SLizard tip fingerprints as #3167 weather when Greptile Step 6 is clean (#5102 / #3167)
1041
+ - ⊗ Idle-poll / skip reading tip SLizard review body while open Previously mentioned fingerprints remain (#5102)
1033
1042
  - ⊗ Silent admin / `--skip-ci` merge under Actions outage without audit comment and opt-in authority (#3167)
1034
1043
  - ⊗ Leave a deliberate `stop-at: pr-open` (or thin-DONE recovery) open PR without spawning/retaining one review-cycle babysit owner + lease continuity and post-merge `scope:complete` plan (#3153)
1035
1044
  - ⊗ Stand down at CLEAN under human-merge policy without a durable owner (sticky lease + live parent/monitor/Phase 6 closer) **and** a post-CLEAN observe path (poller / parent wake / Phase 6 re-poll) for post-merge `scope:complete` (#3153 / #1193 / #2321)
@@ -46,7 +46,17 @@ Probe order (must match engine `probeMonitoringTier` / `resolveDispatchProvider`
46
46
 
47
47
  1. The canonical `templates/agent-prompt-preamble.md` content as the preamble (AGENTS.md read mandate, #810 xBRIEF gate, #798 PowerShell UTF-8, pre-PR + review-cycle mandates).
48
48
  2. The standard worktree prompt (STEP 1-6 from the Prompt Template in `references/core-ops.md`).
49
- 3. The worktree path set to the agent's isolated git worktree.
49
+ 3. ! **Per-worktree story binding (#6233).** Claude Code sub-agents share the parent's hook environment, so a per-worker `DEFT_ACTIVE_SCOPE` pin is not possible. Use this in-session sequence:
50
+ 1. The parent launches the cohort through `deft swarm:launch`, so dispatch PREP registers each worker worktree with its story in the worker-auth assignment record.
51
+ 2. The parent starts the session ritual in each worker worktree (`deft session:start`, then `deft verify:session-ritual -- --tier=gated`).
52
+ 3. The parent holds no `DEFT_ACTIVE_SCOPE` pin. A pin that names a different story than the worktree's assignment is refused.
53
+ 4. The parent gives each sub-agent the absolute path of its worktree, and the sub-agent writes only inside it.
54
+
55
+ The write fence then reads the story for a registered linked worktree from its assignment record. A reader failure, or an assigned story that is missing, ineligible or ambiguous, refuses the write with the failure kind and one repair step. An unregistered linked worktree and the main worktree keep the earlier selection.
56
+
57
+ ! **Fallback:** one headless Claude Code process per story, each with its own `DEFT_ACTIVE_SCOPE`, until the live two-story run in #6242 passes.
58
+
59
+ ! **Guarantee and limits:** this is destination-scoped cooperative fencing. The trusted writer is dispatch PREP (`swarm:launch`). It is not worker isolation: a worker process can still change the record. Coverage is Write/Edit, plus recognized shell destination forms when that policy is set to `enforce`. Other shell writes are not covered.
50
60
  4. ! **`run_in_background: true` (or host equivalent)** for any worker or poller whose loop runs longer than a short task (~3 min) — implementation, fix, and review-cycle workers — so the monitor conversation pane stays interactive (#1880 Gap D). The parent is notified on completion.
51
61
  5. ! **Deliberate model routing (#1739):** resolve `(dispatch_provider=claude, worker_role)` via `task verify:routing` / `task swarm:routing-set` and pass `resolved_model` into the spawn when non-null — stamping the C2 manifest is prep; the recorded model MUST reach the actual spawn call.
52
62
 
@@ -92,14 +92,15 @@ Until a measured callback exists, Grok wording is conditional: background `spawn
92
92
 
93
93
  ! **Grok through-merge (#4529 / #4821 / #5219):** implement MUST use (b) `stop-at: pr-open`. Path (a) is for non-through-merge Grok leaves only. Named leftover (class A) requires a dest-cwd one-shot residual, stop-at after the push; then Approach 1 wait owner is a **`spawn_subagent` review-monitor sibling** whose `monitor_agent_id` is registered (`review-monitor:register --platform-primitive spawn_subagent`) and whose child-bound `pr:watch --monitor-agent-id <id>` satisfies `verify:review-monitor --merge-path-arm --live-wait`; then Phase 6 / parent-retained squash-merges via `pr:wait-mergeable-and-merge` only after CLEAN. Pass a declared wait budget when the envelope states one (#3984). Parent-retained is the **closer after CLEAN**, not the pre-CLEAN poller/fixer. Dest spawn deny is `BLOCKED` or dest-cwd residual via native implementation-capable spawn (#4215) — not parent-primary. ⊗ Send class-A residual through process-only CLI `grok --cwd`. ⊗ Choose Approach 1 sibling or parent-retained as the first partner without dest residual. ⊗ Dispatch a Grok through-merge implement as (a). ⊗ Harvest a Grok `drive-to: merge-ready` continuation as this closer. ⊗ Treat a parent-owned shell/`bash` `pr:watch` (heartbeat `parent_id=pr-watch`) as Approach 1 babysit when `spawn_subagent` is available (#5219).
94
94
 
95
- ! **Exclusive lawful waits / cheapest admitted Approach 1 (#5219 P3 / #5229 / #5727):** after `pr-open`, when Tier-1 `spawn_subagent` is available, the **only lawful** pre-CLEAN wait is Approach 1 child `pr:watch --monitor-agent-id` after `review-monitor:register --platform-primitive spawn_subagent` with `verify:review-monitor --merge-path-arm --live-wait` green; after CLEAN, parent-retained `pr:wait-mergeable-and-merge`. Approach 1 is also the **cheapest admitted** path vs parent shell `pr:watch`, host `monitor`, forge-poll, or bespoke `%TEMP%` pollers. Prefer one background `spawn_subagent` babysitter that owns watch → class A residual handoff → re-watch until CLEAN, then hand CLEAN to the parent closer. Child register + watch first (heartbeat live); parent verify after:
95
+ ! **Exclusive lawful waits / cheapest admitted Approach 1 (#5219 P3 / #5229 / #5727 / #4781):** after `pr-open`, when Tier-1 `spawn_subagent` is available, the **only lawful** pre-CLEAN wait is Approach 1 child `pr:watch --monitor-agent-id` after `review-monitor:register --platform-primitive spawn_subagent` with `verify:review-monitor --merge-path-arm --live-wait` green; after CLEAN, parent-retained `pr:wait-mergeable-and-merge`. Approach 1 is also the **cheapest admitted** path vs parent shell `pr:watch`, host `monitor`, forge-poll, or bespoke `%TEMP%` pollers. Prefer one background `spawn_subagent` babysitter that owns watch → class A residual handoff → re-watch until CLEAN, then hand CLEAN to the parent closer. **Spawn shape before register/pr:watch (#4781):** for monitor-only seats (`stop-at: pr-open` + `worker_role: review-monitor` watch/report), pass advertised `process_only: true` with dest `cwd` (`formatApproach1ProcessOnlySpawnShape` / `approach1BabysitterCommands`). Implement-class never sets `process_only`; dest-path is not the skip class; do not blanket-flag the fix-capable greptile poller. Dest convention by write need: shared cwd-without-occupy for non-writing monitor/critic seats; one dest per validation seat that writes a report root. Specs/report writes stay on requirements posture (#4444) — do not fold report roots into the spawn skip class. Child register + watch first (heartbeat live); parent verify after:
96
96
  ```
97
+ # process_only+cwd spawn (monitor-only), then:
97
98
  task review-monitor:register -- --pr <N> --monitor-agent-id <id> --platform-primitive spawn_subagent
98
99
  DEFT_MONITOR_AGENT_ID=<id> task pr:watch -- <N> --monitor-agent-id <id>
99
100
  # parent after child watch is live:
100
101
  task verify:review-monitor -- --pr <N> --merge-path-arm --live-wait
101
102
  ```
102
- Core helper: `formatApproach1BabysitterOneLiner` / `formatApproach1CheapestAdmissionCard` / `admitClaimedBabysitPath` (`packages/core/src/swarm/approach1-babysitter.ts`). Bounded-form deny: `evaluateBoundedPrWatchDeny` refuses Directive `pr:watch` / `task deft:pr:watch` without `--monitor-agent-id` when Tier 1 is provable. Claimed-wait deny: `evaluateClaimedBabysitPathDeny` / `admitClaimedBabysitPath` refuse `BabysitPathKind` forge-poll / bespoke-temp-poller / host-monitor / directive-pr-watch-bare and Approach 1 without bound evidence / different-PR arm. ⊗ Parent forge-poll / `gh` check-runs+mergeable_state sleep / bespoke `%TEMP%` PowerShell watchers as pre-CLEAN babysit (#5727). ⊗ Parent-shell `pr:watch --monitor-agent-id <leased id>` without spawn-injected `DEFT_MONITOR_AGENT_ID` (or CLI matching `GROK_SESSION_ID`) — that impersonation does not arm. ⊗ Start `pr:wait-mergeable-and-merge` before CLEAN (#4822). ⊗ Treat host `monitor` or bare shell `pr:watch` as the sole babysit when `spawn_subagent` is available (#5229).
103
+ Core helper: `formatApproach1BabysitterOneLiner` / `formatApproach1CheapestAdmissionCard` / `formatApproach1ProcessOnlySpawnShape` / `admitClaimedBabysitPath` (`packages/core/src/swarm/approach1-babysitter.ts`). Bounded-form deny: `evaluateBoundedPrWatchDeny` refuses Directive `pr:watch` / `task deft:pr:watch` without `--monitor-agent-id` when Tier 1 is provable. Claimed-wait deny: `evaluateClaimedBabysitPathDeny` / `admitClaimedBabysitPath` refuse `BabysitPathKind` forge-poll / bespoke-temp-poller / host-monitor / directive-pr-watch-bare and Approach 1 without bound evidence / different-PR arm. ⊗ Parent forge-poll / `gh` check-runs+mergeable_state sleep / bespoke `%TEMP%` PowerShell watchers as pre-CLEAN babysit (#5727). ⊗ Parent-shell `pr:watch --monitor-agent-id <leased id>` without spawn-injected `DEFT_MONITOR_AGENT_ID` (or CLI matching `GROK_SESSION_ID`) — that impersonation does not arm. ⊗ Start `pr:wait-mergeable-and-merge` before CLEAN (#4822). ⊗ Treat host `monitor` or bare shell `pr:watch` as the sole babysit when `spawn_subagent` is available (#5229).
103
104
 
104
105
  ! **Durable host→CLI capability stamp (#5229):** Before any CLI `verify:review-monitor` / `pr:watch` subprocess, write `.deft-scratch/host-capability-stamp.json` via `writeHostCapabilityStamp(projectRoot)` / `ensureHostCapabilityStampForBabysit` (and prefer exporting `GROK_BUILD=1` / `DEFT_HAS_SPAWN_SUBAGENT=1` into that subprocess). `review-monitor:register` also writes the stamp on successful claim/renew. Stamps older than 8h or bound to a different `host_session_id` are ignored so a later plain-terminal session cannot inherit Tier 1. Without a fresh stamp, bare `node … verify:review-monitor` can mis-detect Tier 3 / `generic-terminal` and fail-open with "no active review-monitor required" even though this parent owns `spawn_subagent`. `probeMonitoringTier` merges the stamp; `DEFT_MONITOR_TIER=3` is labeled `override-tier3` (not honest `generic-terminal`) and refused when stamp/env already proves Tier 1. `evaluateReviewMonitorGate` consults sticky lease `platform_primitive` before Approach 3 READY and before `!isTier1` READY. Bounded `pr:watch` without `--monitor-agent-id` is refused at the watch entry when Tier 1 is provable.
105
106