@deftai/directive-content 0.106.0 → 0.108.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/Taskfile.yml +14 -1
  2. package/UPGRADING.md +24 -5
  3. package/commands.md +29 -4
  4. package/contracts/design-critique.md +369 -14
  5. package/contracts/issue-eval.md +77 -0
  6. package/contracts/path-write-fence.md +126 -1
  7. package/contracts/runtime-authority.md +2 -0
  8. package/contracts/scm-readiness.md +2 -2
  9. package/docs/delivery-attempt.md +2 -1
  10. package/docs/freshness-contract.md +6 -1
  11. package/docs/getting-started.md +10 -11
  12. package/docs/hook-runtime-unavailable.md +54 -0
  13. package/docs/orphan-active-verdict-basis.md +166 -0
  14. package/docs/scope-provenance.md +1 -1
  15. package/package.json +1 -1
  16. package/packs/skills/skills-pack-0.1.json +24 -10
  17. package/scm/github.md +65 -2
  18. package/skills/deft-directive-build/SKILL.md +2 -2
  19. package/skills/deft-directive-cost/SKILL.md +7 -11
  20. package/skills/deft-directive-design-critique/SKILL.md +22 -6
  21. package/skills/deft-directive-design-critique/references/motion-shape.md +19 -0
  22. package/skills/deft-directive-feedback/SKILL.md +11 -2
  23. package/skills/deft-directive-interview/SKILL.md +10 -10
  24. package/skills/deft-directive-issue-eval/SKILL.md +48 -0
  25. package/skills/deft-directive-release/SKILL.md +10 -6
  26. package/skills/deft-directive-review-cycle/SKILL.md +33 -0
  27. package/skills/deft-directive-setup/SKILL.md +53 -22
  28. package/skills/deft-directive-swarm/references/core-ops.md +4 -0
  29. package/skills/deft-directive-swarm/references/core-phase-1-2.md +1 -1
  30. package/skills/deft-directive-swarm/references/core-phase-3.md +3 -1
  31. package/skills/deft-directive-swarm/references/core-phase-4.md +11 -8
  32. package/skills/deft-directive-swarm/references/host-cursor.md +1 -0
  33. package/skills/deft-directive-swarm/references/host-grok-build.md +1 -0
  34. package/skills/deft-directive-triage/SKILL.md +3 -2
  35. package/tasks/engine.yml +4 -0
  36. package/tasks/feedback.yml +1 -1
  37. package/tasks/occupancy.yml +34 -1
  38. package/tasks/prd.yml +4 -5
  39. package/tasks/scm.yml +14 -2
  40. package/tasks/session.yml +13 -2
  41. package/tasks/toolchain.yml +2 -2
  42. package/tasks/triage-evaluate.yml +22 -0
  43. package/tasks/verify.yml +21 -1
  44. package/templates/agent-prompt-preamble.md +28 -4
  45. package/templates/agents-entry.md +10 -5
  46. package/templates/design-critique-brief.md +19 -5
@@ -130,6 +130,7 @@ When present, document the fields in a separate `## Runtime and GitHub auth mode
130
130
 
131
131
  - `runtime_mode`: one of `local-unsandboxed`, `cursor-native-sandbox`, or `cloud-headless` -- the execution envelope the worker runs in (from the read-only runtime probe, #1557a).
132
132
  - `github_auth_mode`: one of `host-gh` or `injected-token` -- which GitHub credential rule applies to this worker (#1557b).
133
+ - `expected_github_login`: the bound user login when the dispatcher injected a user-bearing credential (#1351 / #3665). Login only -- never a token value. Omit when `github_auth_mode` is `host-gh` and no injection occurred.
133
134
 
134
135
  Launch-manifest entries (#1387 C2 contract) carry the same two fields at the top level alongside `allocation_context`. Workers MUST read the dispatch envelope (or launch manifest) and apply the identity-separation rules in §8 according to `github_auth_mode`, not the historical one-size-fits-all injected-token default.
135
136
 
@@ -149,10 +150,24 @@ Worked example (cloud / headless worker):
149
150
 
150
151
  - runtime_mode: cloud-headless
151
152
  - github_auth_mode: injected-token
153
+ - expected_github_login: deft-swarm-bot
152
154
  ```
153
155
 
154
156
  Reference: `packages/core/src/platform/platform-capabilities.ts` (#1557a), `packages/core/src/intake/github-auth-modes.ts` (#1557b), issue #1557.
155
157
 
158
+ ## 2.75 Identity-bound worker credential injection (#1351)
159
+
160
+ When a dispatcher holds a user-bearing worker credential, it MUST inject that credential at spawn on the grok-build and local hybrid paths. Injection binds an identity; it does not only place a token. This helper is the operator-implemented injection the §8 conjunction names -- a dispatcher-invoked function, not a prompt-embedded token.
161
+
162
+ - ! Before spawn, call `prepareWorkerCredentialInjection` (`packages/core/src/swarm/launch.ts`). It validates the held credential as a **user** principal with the existing `validateGithubAuthForWorker`. Do not write a second validator and do not invent a second approval surface.
163
+ - ! On success, apply the returned `spawnEnv` to the worker **process environment** (`GH_TOKEN` plus `DEFT_EXPECTED_GITHUB_LOGIN`) and copy `envelopeSection` into the dispatch envelope. Stamp `expected_github_login` on the launch-manifest entry when launch already validated the same credential.
164
+ - ! On no available credential and a write-requiring injected-token operation, halt `BLOCKED`, naming the missing credential (`GH_TOKEN` / `GITHUB_TOKEN` / `GH_ENTERPRISE_TOKEN`) and the dispatcher-side remedy. Do not spawn.
165
+ - ⊗ Inject an App-installation credential. Those fail closed as `installation_identity_unverifiable` (#3693).
166
+ - ⊗ Continue under a detected host or maintainer identity, or fall back to the host `gh` token (`patterns/multi-agent.md` :70-75).
167
+ - ⊗ Place a credential value in the dispatch prompt, a transcript, or a launch-manifest entry. `spawnEnv` is process-env only.
168
+
169
+ Token minting remains an operator-owned #983 non-goal. This helper delivers a credential the dispatcher already holds; it does not mint one.
170
+
156
171
  ## 3. PowerShell 5.1 non-ASCII rule (#798)
157
172
 
158
173
  If your shell is `pwsh 5.x` on Windows AND you are editing a file containing any non-ASCII glyph (em dashes, en dashes, arrows, smart quotes, ⊗, ✓, ellipses, emoji, ...), you MUST route the read AND write through Python `pathlib`:
@@ -436,7 +451,7 @@ Why: maintainer and workers sharing a single PAT couples the human review/merge
436
451
  ### injected-token mode (required for `github_auth_mode: injected-token` and always for `runtime_mode: cloud-headless`)
437
452
 
438
453
  - ! Consume the GitHub credential injected by the dispatcher (typically `GH_TOKEN` / `GITHUB_TOKEN` / `GH_ENTERPRISE_TOKEN` in the prompt-supplied env). If unset and no other dispatcher-supplied credential is present, FAIL LOUD -- do not silently run under the host's `gh auth status` token.
439
- - ~ Confirm the credential's identity matches expectation: `gh api user --jq .login` should return the bot/App login, not the maintainer login. Mismatch is `BLOCKED: identity mismatch` to the parent.
454
+ - ~ Confirm the credential is the expected worker principal before GitHub operations. For a user-bearing credential, `gh api user --jq .login` should return the expected bot/account login, not the maintainer login. For a GitHub App installation credential, `/user` is inapplicable (structural 403; no authenticated user) -- do not treat that 403 as API unreachability. Installation identity cannot be verified from the token; fail closed and point at #3693. Do not accept the credential from endpoint reachability or a declared App slug. A user-login mismatch is `BLOCKED: identity mismatch` to the parent.
440
455
  - ⊗ Inherit the maintainer's `gh auth status` token implicitly. Host `gh` fallback is forbidden in injected-token and cloud-headless modes.
441
456
 
442
457
  ### host-gh mode (permitted only when `github_auth_mode: host-gh`)
@@ -444,12 +459,14 @@ Why: maintainer and workers sharing a single PAT couples the human review/merge
444
459
  Applies to local interactive workers (`runtime_mode: local-unsandboxed` or, after validation, `cursor-native-sandbox`) where swarm launch preflight confirmed `gh auth status` and repo access from the worker environment.
445
460
 
446
461
  - ! Use the worker environment's `gh` credential store -- the dispatch envelope explicitly authorises host `gh` for this worker. Do NOT require an injected `GH_TOKEN` when host gh auth is already valid in the worker shell.
447
- - ! Still verify identity before GitHub operations: `gh auth status` must pass and `gh api user --jq .login` must return the expected account.
462
+ - ! Still verify identity before GitHub operations: `gh auth status` must pass. For a user-bearing credential, `gh api user --jq .login` must return the expected account. For a GitHub App installation credential, `/user` cannot return an account and the token cannot disclose which App it belongs to -- fail closed and point at #3693. Do not accept the credential from a declared App slug or from endpoint reachability, including a target-repo GET. User-login mismatch is `BLOCKED: identity mismatch`.
448
463
  - ⊗ Fall back to host `gh` when `github_auth_mode` is `injected-token` or `runtime_mode` is `cloud-headless` -- those modes forbid host credential store use regardless of what is available on the host.
449
464
  - ~ When `runtime_mode: cursor-native-sandbox`, host `gh` may fail inside the sandbox even when the parent session is authenticated. Fail loud with remediation (full-access execution, trusted-path allowlist, or switch to injected-token handoff) rather than assuming parent auth is visible to the worker.
450
465
 
451
466
  Dispatchers MUST inject worker credentials for injected-token / cloud-headless dispatches and MUST record the selected `github_auth_mode` in the launch manifest and dispatch envelope. v1 deliberately keeps token injection operator-implemented; mode labels make the contract explicit without placing token values in prompts or transcripts.
452
467
 
468
+ #1351 supplies the identity-bound delivery helper in §2.75. Dispatchers on grok-build and local hybrid still record the mode on **both** the launch manifest and the dispatch envelope. They apply `prepareWorkerCredentialInjection` at spawn so the worker receives the token in process env and a stamped `DEFT_EXPECTED_GITHUB_LOGIN` / `expected_github_login`, not a prompt-embedded secret.
469
+
453
470
  This rule is complementary to §5 (REST-by-default) and §7 (rate-limit-aware throttle): REST-by-default reduces GraphQL demand on whichever bucket the worker is using; rate-limit throttle keeps the worker from exhausting its own bucket; mode-aware identity separation prevents the worker bucket from being the maintainer's bucket when injected-token mode applies. All three are required for stable swarm operation.
454
471
 
455
472
  ## 9. Sub-agent spawn rules per #727
@@ -534,10 +551,17 @@ The parent monitor watches the heartbeat file directly (three-state exit 0 ok /
534
551
 
535
552
  ! **OpenClaw `sessions_spawn` / heartbeat mapping (#2879):** Same file-heartbeat contract applies to OpenClaw review-monitors and long-running leaves. OpenClaw host session liveness, Control UI presence, or gateway channel reachability does NOT replace periodic heartbeats — those signals only prove the session exists, not that the tool loop is progressing. OpenClaw pollers write `.deft-scratch/subagent-status/<agent-id>.json` so `task agent:monitor` / `task verify:subagent-alive` can detect stalled monitors; OpenClaw-native session status MAY be a *supplementary* signal only. Host "still running" + missing/STALE heartbeat authorizes the same `REDISPATCH_OK` posture as Cursor #2824.
536
553
 
537
- ! **Parent ensures scratch dir + startup grace before REDISPATCH_OK (#2879):** `task verify:subagent-alive` exits `2` (config error, no `REDISPATCH_OK`) when the scratch directory is **missing** and has no records. Parents MUST `mkdir` the worker worktree's `.deft-scratch/subagent-status/` at dispatch time so a later missing record is exit `1` + `REDISPATCH_OK`. Parents MUST ALSO wait a **startup grace** (default 3 minutes from dispatch, or until the first `phase: "starting"` heartbeat is observed) before treating a missing required-agent as takeover-eligible — probing an empty parent-created dir immediately races a healthy worker still writing its first heartbeat and can spawn a duplicate. Exit `2` remains reserved for true config errors (bad args / wrong path).
554
+ ! **Parent ensures scratch dir + startup grace before REDISPATCH_OK (#2879 / #3730):** `task verify:subagent-alive` exits `2` (config error, no `REDISPATCH_OK`) when the scratch directory is **missing** and has no records. Parents MUST `mkdir` the worker worktree's `.deft-scratch/subagent-status/` at dispatch time so a later missing record is exit `1` + `REDISPATCH_OK`. `task swarm:launch` (worktree map) and `task swarm:pre-dispatch --action begin` on a filesystem target mkdir this directory mechanically. Interactive Cursor/OpenClaw/Grok spawn without those verbs still MUST mkdir before the spawn primitive. Parents MUST ALSO wait a **startup grace** (default 3 minutes from dispatch, or until the first `phase: "starting"` heartbeat is observed) before treating a missing required-agent as takeover-eligible — probing an empty parent-created dir immediately races a healthy worker still writing its first heartbeat and can spawn a duplicate. Exit `2` remains reserved for true config errors (bad args / wrong path). ⊗ Put runtime liveness on the C2 launch manifest (written `mode: "replace"`) or in `occupancy.json`.
538
555
 
539
556
  - Monitors run `task verify:subagent-alive -- --require-agent <agent-id> [--scratch-dir <worktree>/.deft-scratch/subagent-status]` each poll iteration.
540
557
  - Workers run `task agent:monitor` (raw sweep) or the gate verb above; both wrap `subagent-monitor` (#1365).
558
+ - Workers MUST write the first heartbeat immediately (`phase: "starting"`) and keep the cadence in this section. A dispatch that never instructs the worker to heartbeat leaves the armed directory empty and a host-kill indistinguishable from "never started" until grace elapses.
559
+
560
+ ! **Commit early (#3730):** Long-running implementation workers MUST commit as soon as a coherent unit exists (source + tests that compile), then commit again at natural checkpoints. A host-kill leaves uncommitted work invisible to every gate. ⊗ Hold a complete correct diff uncommitted until PR time.
561
+
562
+ ! **Killed-worker takeover (#3730 / #3228):** `REDISPATCH_OK` does not lift `DENY_DUPLICATE_ACTIVE`. A killed worker's delivery attempt stays `running` until cancelled. Takeover is `task swarm:pre-dispatch -- --scope-id <id> --target-id <worktree> --action cancel` then the same command without `--action` (begin). Do not add a third liveness classifier.
563
+
564
+ ! **Recovery dispatch vs stale ritual (#3730 / #2992):** Before a replacement spawn, run `task verify:session-ritual -- --tier=gated`. If it fails, run `task session:start --rearm --session-id=<same>` (or the `deft` form) rather than a full cold ceremony, unless re-arm is ineligible. A ritual deny MUST name `session:start --rearm`. Do not treat a bare deny as a dead end, and do not re-arm under a new session id (that reclaims occupancy and blocks the parent's own writes).
541
565
 
542
566
  ## 10.55 Rule Authority and Thin Fail-Closed (#3313)
543
567
 
@@ -560,7 +584,7 @@ Multi-iteration implement, pre-PR, repair, and monitor loops require **two** sto
560
584
 
561
585
  ! On failure stop: halt; emit an operator-visible report (what was tried, what is missing, what human decision is needed). Prefer `BLOCKED:` over silent retry. ⊗ Thrash past the envelope. Durable delivery/acceptance mechanical enforcement is **#3143** (`packages/core/src/delivery-attempt/`; not prompt-only).
562
586
 
563
- ! **Implement-leaf pre-dispatch (#3228):** Before spawning a peer implement leaf on a unit (story/worktree), monitors/orchestrators MUST run `task swarm:pre-dispatch -- --scope-id <id> --target-id <worktree-or-branch>` (exit **0** allow / **1** active deny / **2** config). Non-zero → do not spawn. Gate is #3143 `DENY_DUPLICATE_ACTIVE`. Takeover = `--action cancel` then pre-dispatch begin again. Pointer only — skill depth: swarm `core-phase-4.md`.
587
+ ! **Implement-leaf pre-dispatch (#3228 / #3730):** Before spawning a peer implement leaf on a unit (story/worktree), monitors/orchestrators MUST run `task swarm:pre-dispatch -- --scope-id <id> --target-id <worktree-or-branch>` (exit **0** allow / **1** active deny / **2** config). Non-zero → do not spawn. Gate is #3143 `DENY_DUPLICATE_ACTIVE`. Takeover after `REDISPATCH_OK` = `--action cancel` then pre-dispatch begin again. A killed worker stays `running` until that cancel. Pointer only — skill depth: swarm `core-phase-4.md`.
564
588
 
565
589
  ## 11. Mandatory DONE message even on early exit
566
590
 
@@ -3,16 +3,21 @@
3
3
 
4
4
  Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
5
5
 
6
- ! If any .deft/core/.agents/skills/ path referenced in this file cannot be read (missing file, stale path from a previous framework version, or a deprecation redirect stub), read .deft/core/QUICK-START.md instead and follow it. QUICK-START refreshes this section idempotently for the current framework version.
6
+ ! If any .deft/core/.agents/skills/ path here cannot be read (missing, stale, or a redirect stub), read .deft/core/QUICK-START.md and follow it it refreshes this section idempotently for the current version.
7
7
 
8
8
  ## Temporary test kill-switch (#3039)
9
9
 
10
10
  ! Before further Directive process load, check root `.deft-directive-disable` (presence = flag). If present → stop DD load; recovery = delete file + NEW agent session. Deposit OK; not `.no-deft-directive` (#2926). Docs: `.deft/core/docs/deft-directive-disable.md`.
11
11
  ⊗ Claim full operation while the flag exists or after delete without a NEW agent session.
12
12
 
13
+ ## Hook runtime unavailable (#3785)
14
+
15
+ ! Opaque non-zero exit (usually 127) on every mutation = `deft-hook` is not executable on this host, not a Directive deny — no Directive code ran, and no in-session flag reaches it. Out of band: `deft policy:disable-host-hooks --host cursor --confirm`, or install the runtime (`npm i -g @deftai/directive`). Depth: `.deft/core/docs/hook-runtime-unavailable.md`.
16
+ ⊗ Hand-edit `failClosed` in `.cursor/hooks.json` — the next `deft update` rewrites it and silently re-arms the lockout.
17
+
13
18
  ## Session routing (#2176)
14
19
 
15
- ! **Read-only default** until mutation intent: load AGENTS.md / main.md / USER.md / `xbrief/PROJECT-DEFINITION.xbrief.json`; resolve USER.md via `deft session:start` (`USER.md resolved …`; win32 `%APPDATA%\deft\USER.md`; unix `~/.config/deft/USER.md`; ⊗ invent `~/.config/deft` on Windows #2544); confirm Deft alignment + addressing-name; ⊗ no mutable `deft session:start` / triage welcome / sync / branch-policy unless asked or implementation-ready (#2176) — `.deft/core/commands.md` § Session routing. Bootstrap: cold-start → README § Cold-start (#2273) ⊗ never `.deft/core/`; pre-cutover → setup Pre-Cutover (#2068); missing USER.md / PROJECT-DEFINITION → setup Phase 1/2 (#1813) ⊗ before answering; else main → USER → PROJECT-DEFINITION; ~ sync. Mutation → `deft session:start` then `deft verify:session-ritual -- --tier=gated` (#1149). Mutation ceremony claims a worktree occupancy lease (#3433; `commands.md` § Session routing). ? `deft session:start -- --read-only` (#2176).
20
+ ! **Read-only default** until mutation intent: load AGENTS.md / main.md / USER.md / `xbrief/PROJECT-DEFINITION.xbrief.json`; resolve USER.md via `deft session:start` (`USER.md resolved …`; win32 `%APPDATA%\deft\USER.md`; unix `~/.config/deft/USER.md`; ⊗ invent `~/.config/deft` on Windows #2544); confirm Deft alignment + addressing-name; ⊗ no mutable `deft session:start` / triage welcome / sync / branch-policy unless asked or implementation-ready (#2176) — `.deft/core/commands.md` § Session routing. Bootstrap: cold-start → README § Cold-start (#2273) ⊗ never `.deft/core/`; pre-cutover → setup Pre-Cutover (#2068); missing USER.md / PROJECT-DEFINITION → setup Phase 1/2 (#1813) ⊗ before answering; else main → USER → PROJECT-DEFINITION; ~ sync. Mutation → `deft session:start` then `deft verify:session-ritual -- --tier=gated` (#1149). Occupancy (#3433/#3611/#3755): bearer-id, not auth/lineage; `occupancy:grant` `commands.md`. ? `deft session:start -- --read-only` (#2176).
16
21
 
17
22
  ## Session-start ritual (#1149)
18
23
 
@@ -88,10 +93,9 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
88
93
  ## Envelope selection SLA (#3153)
89
94
 
90
95
  ! Default story / through-merge unit of work is `drive-to: merge-ready`. Deliberate `stop-at: pr-open` is allowed only when a **partner merge-path owner** is planned (review-cycle babysit / Approach 1 lease / parent-retained) for Greptile + CI + post-merge `scope:complete` — triggers: capacity stall, wall-clock budget, large multi-gate, host nest limits (swarm Phase 0 decision tree). Depth: `deft-directive-swarm` + `deft-directive-review-cycle` partner merge-path.
91
- ! Under human-merge policy, a **durable** owner (parent/monitor sticky lease or Phase 6 closer) MUST remain for post-merge `scope:complete` — CLEAN alone is not lifecycle complete.
96
+ ! Under human-merge policy, a **durable** owner (parent/monitor sticky lease or Phase 6 closer) MUST remain for post-merge `scope:complete` — CLEAN alone is not lifecycle complete; ⊗ stand down at CLEAN with no reachable owner.
92
97
  ⊗ Silent PR-open handback for a worker already scoped `drive-to: merge-ready`.
93
98
  ⊗ `stop-at: pr-open` without a named babysit / merge-path owner, or dual review-monitor leases on recovery (#3044 / #2261).
94
- ⊗ Stand down at CLEAN under human-merge with no reachable post-merge `scope:complete` owner.
95
99
  ! After merge of issue `#N`, `deft verify:orphan-active -- --issue N` MUST exit 0 before `DONE` (#3429). After `scope:complete`, `deft verify:completed-tracked -- --issue N` MUST exit 0 on `origin/<deliveryBranch>` before `DONE` (#3476). Exit 1 shipped → printed `scope:complete`; missing tracked land → `swarm:finalize-cohort` or a lifecycle PR; unresolved lookup → retry / `BLOCKED` (⊗ complete unfinished scope).
96
100
  ⊗ Emit `ISSUE: closed` while that brief is still in `active/`.
97
101
 
@@ -112,6 +116,7 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
112
116
  ## Value feedback and attribution (#1709)
113
117
 
114
118
  ! `plan.policy.valueFeedback.enabled` defaults OFF — `deft policy:show --field=valueFeedback` / `deft policy:enable-value-feedback -- --confirm`; `deft value:show`; `deft feedback:file`; `.deft/core/.agents/skills/deft-directive-feedback/SKILL.md` (#1709).
119
+ ! Consumer hard-stop (#3713): `BLOCKER` is the sole permitted title classification — `deft feedback:file --blocker`; absence is not a verdict. ⊗ Derive `adoption-blocker` from a consumer title (privileged, body-evidence gated); `.deft/core/scm/github.md`.
115
120
 
116
121
  ## Structured decision log (#1396 / #3211)
117
122
  ! Significant choices → `deft decision:write`; re-load → `deft decision:list` / `xbrief/decisions/`; depth `.deft/core/docs/decision-log.md` (not triage/ADRs/lessons).
@@ -122,7 +127,7 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
122
127
  ## Branch policy & branch verification
123
128
 
124
129
  ! Feature branches — `deft verify:branch`, `deft verify:forward-coverage` (90% warn-first changed-branch coverage, not the 75 floor, #3514), `deft coverage:hotspots`, hooks, `deft check` (#746 / #747) — `.deft/core/scm/github.md` § Branch policy.
125
- ! Test placement + scope provenance (#3145) — `deft verify:test-boundary`, `deft verify:scope-provenance`, `deft verify:consumer-check-contract` (docs: `docs/test-boundary.md`, `docs/scope-provenance.md`, `docs/consumer-check-contract.md`); defaults warn-only until authored policy.
130
+ ! Test placement + scope provenance (#3145) — `deft verify:test-boundary` (warn-only until authored policy), `deft verify:scope-provenance` (`--enforce` is empty-scope only; declared `file_scope` without base approval fails closed), `deft verify:consumer-check-contract` (check composition fails closed; CI omissions warn) (docs: `docs/test-boundary.md`, `docs/scope-provenance.md`, `docs/consumer-check-contract.md`).
126
131
 
127
132
  ## Branch Policy Disclosure (#746)
128
133
 
@@ -4,20 +4,24 @@ Dispatch envelope skeleton for one critic or synthesis pass. Fill the fields. Re
4
4
 
5
5
  ## Envelope fields
6
6
 
7
+ - Model (copy onto the first line of the posted comment as `model: <slug>`):
8
+ - Role (copy onto the second line of the posted comment as `role: triage|critic|parent`):
7
9
  - Issue:
8
- - Variant (refutation | open critique | panel) and one-line reason:
10
+ - Charter (refutation | open critique), spend (N=1 | N≥3 when panel permission is used), and one-line reason:
9
11
  - Round (1 critic | 2 reiteration | 3 synthesis | 4 Pass-4 audit):
10
12
  - Critic role (fresh | resume):
11
13
  - Id ceiling (GitHub comment id, inclusive):
12
14
  - SHA at dispatch:
13
15
  - Target (work issue or umbrella):
16
+ - Audit targets (marker ids, comma-separated, or `none`; ids only, no parent rationale):
14
17
 
15
18
  ## Forbidden inputs
16
19
 
17
20
  Do not put these in the envelope:
18
21
 
19
22
  - parent hypotheses
20
- - named refutation target (unless the recorded variant is refutation)
23
+ - parent rationale on the audit-targets field (ids only)
24
+ - named refutation target (unless the recorded charter is refutation)
21
25
  - parent-edited critic text
22
26
  - thread comments after the id ceiling
23
27
  - the superseded proposed skill outline on #3434
@@ -31,11 +35,21 @@ Read, do not restate:
31
35
  | Topic | Contract heading |
32
36
  |---|---|
33
37
  | Gate (ADR-005) | Stop 1 — Gate |
38
+ | Stop 1 `refutation-target:` | Stop 1 — Gate |
34
39
  | Variant selection | Stop 2 — Variant selection |
35
- | Charter, envelope and ceiling | Stop 3 Critic envelope |
40
+ | Parent-facing dispatch rules | Parent-facing dispatch rules |
41
+ | Critic method | Critic method |
42
+ | Envelope and ceiling | Envelope and ceiling |
43
+ | Comment lead (model then role) | Stop 3 — Critic envelope |
36
44
  | Fresh reiteration | Stop 4 — Residual reiteration |
45
+ | Operator-gated loop | Operator-gated loop |
46
+ | Successor lean | Successor lean |
47
+ | Parent-side substantiation | Parent-side substantiation |
48
+ | Operator verbs | Operator verbs |
49
+ | Dual stop | Dual stop |
50
+ | Halt line | Halt line |
37
51
  | Synthesis format | Stop 5 — Verified synthesis |
38
- | Dual stop | Failure and budget stop |
52
+ | Bind after accepted synthesis | Bind after accepted synthesis |
39
53
  | Untrusted threads | Security context (#480) |
40
54
 
41
- Operator dispatches. Auto-dispatch is deferred. The five stops live in the contract.
55
+ Operator dispatches. Auto-dispatch is deferred. Each critic dispatch EXITs after posting. The five stops and the operator-gated loop live in the contract.