@deftai/directive-content 0.65.0 → 0.66.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 (74) hide show
  1. package/.githooks/pre-commit +3 -1
  2. package/QUICK-START.md +8 -4
  3. package/Taskfile.yml +31 -14
  4. package/UPGRADING.md +19 -5
  5. package/commands.md +46 -41
  6. package/conventions/rule-ownership.json +1 -1
  7. package/docs/BROWNFIELD.md +37 -33
  8. package/docs/directive-lifecycle.md +2 -2
  9. package/docs/getting-started.md +8 -8
  10. package/package.json +1 -1
  11. package/packs/skills/skills-pack-0.1.json +28 -28
  12. package/skills/deft-directive-article-review/SKILL.md +4 -4
  13. package/skills/deft-directive-build/SKILL.md +37 -37
  14. package/skills/deft-directive-cost/SKILL.md +6 -6
  15. package/skills/deft-directive-debug/SKILL.md +4 -4
  16. package/skills/deft-directive-decompose/SKILL.md +15 -15
  17. package/skills/deft-directive-gh-arch/SKILL.md +3 -3
  18. package/skills/deft-directive-gh-slice/SKILL.md +2 -2
  19. package/skills/deft-directive-interview/SKILL.md +12 -12
  20. package/skills/deft-directive-pre-pr/SKILL.md +3 -3
  21. package/skills/deft-directive-probe/SKILL.md +9 -9
  22. package/skills/deft-directive-refinement/SKILL.md +65 -65
  23. package/skills/deft-directive-release/SKILL.md +3 -3
  24. package/skills/deft-directive-review-cycle/SKILL.md +4 -4
  25. package/skills/deft-directive-setup/SKILL.md +71 -71
  26. package/skills/deft-directive-swarm/SKILL.md +94 -94
  27. package/skills/deft-directive-sync/SKILL.md +55 -55
  28. package/skills/deft-directive-triage/SKILL.md +15 -15
  29. package/tasks/architecture.yml +3 -1
  30. package/tasks/cache.yml +20 -10
  31. package/tasks/capacity.yml +8 -4
  32. package/tasks/change.yml +8 -10
  33. package/tasks/changelog.yml +3 -1
  34. package/tasks/codebase.yml +20 -10
  35. package/tasks/commit.yml +4 -8
  36. package/tasks/engine.yml +16 -4
  37. package/tasks/install.yml +4 -8
  38. package/tasks/issue.yml +8 -10
  39. package/tasks/migrate.yml +24 -8
  40. package/tasks/packs.yml +32 -16
  41. package/tasks/policy.yml +24 -12
  42. package/tasks/pr.yml +16 -8
  43. package/tasks/prd.yml +9 -12
  44. package/tasks/project.yml +14 -14
  45. package/tasks/reconcile.yml +4 -8
  46. package/tasks/roadmap.yml +9 -5
  47. package/tasks/scm.yml +36 -18
  48. package/tasks/scope-undo.yml +3 -1
  49. package/tasks/scope.yml +40 -26
  50. package/tasks/session.yml +4 -2
  51. package/tasks/slice.yml +8 -10
  52. package/tasks/spec.yml +10 -12
  53. package/tasks/swarm.yml +20 -10
  54. package/tasks/triage-actions.yml +32 -16
  55. package/tasks/triage-bootstrap.yml +4 -2
  56. package/tasks/triage-bulk.yml +20 -10
  57. package/tasks/triage-classify.yml +4 -2
  58. package/tasks/triage-queue.yml +12 -6
  59. package/tasks/triage-reconcile.yml +4 -2
  60. package/tasks/triage-scope-drift.yml +4 -2
  61. package/tasks/triage-scope.yml +4 -2
  62. package/tasks/triage-smoketest.yml +4 -2
  63. package/tasks/triage-subscribe.yml +8 -4
  64. package/tasks/triage-summary.yml +4 -2
  65. package/tasks/triage-welcome.yml +4 -2
  66. package/tasks/ts.yml +3 -1
  67. package/tasks/umbrella.yml +1 -7
  68. package/tasks/vbrief.yml +25 -17
  69. package/tasks/verify.yml +102 -50
  70. package/templates/agent-prompt-preamble.md +16 -16
  71. package/templates/agents-entry.md +23 -19
  72. package/vbrief/conformance/extensions/valid/extension-at-root.vbrief.json +31 -0
  73. package/vbrief/conformance/extensions/valid/nested-extension-value.vbrief.json +19 -0
  74. package/vbrief/schemas/xbrief-core-0.8.schema.json +786 -0
@@ -10,18 +10,12 @@ vars:
10
10
  DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
11
11
 
12
12
  tasks:
13
- _ensure-ts:
14
- internal: true
15
- desc: "Build the TS engine before umbrella gates (#2066)"
16
- dir: '{{.USER_WORKING_DIR}}'
17
- cmds:
18
- - pnpm --dir "{{.DEFT_ROOT}}" run build
19
13
 
20
14
  current-shape:
21
15
  desc: "Fetch umbrella ## Current shape comment (#1152) — task umbrella:current-shape <N> [-- --repo OWNER/REPO | --json | --strict]. Does NOT read the issue body."
22
16
  dir: '{{.USER_WORKING_DIR}}'
23
17
  deps:
24
- - _ensure-ts
18
+ - task: :engine:_ts-build
25
19
  cmds:
26
20
  - task: :engine:invoke
27
21
  vars:
package/tasks/vbrief.yml CHANGED
@@ -4,12 +4,6 @@ vars:
4
4
  DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
5
5
 
6
6
  tasks:
7
- _ts-build:
8
- internal: true
9
- desc: "Build @deftai/cli dist/ before TS-backed gates run (#1828 s2)."
10
- dir: '{{.DEFT_ROOT}}'
11
- cmds:
12
- - pnpm run build
13
7
 
14
8
  validate:
15
9
  desc: Validate vBRIEF lifecycle folder structure and cross-file consistency
@@ -17,9 +11,13 @@ tasks:
17
11
  deps:
18
12
  - task: :engine:_ts-build
19
13
  cmds:
14
+ # Layout-aware (#2109 part 2a): pass --project-root and let the engine
15
+ # resolve the lifecycle dir (xbrief when migrated, else vbrief). The prior
16
+ # hardcoded --vbrief-dir ".../vbrief" was a false-green that would validate
17
+ # zero files after the Part-2b flip.
20
18
  - task: :engine:invoke
21
19
  vars:
22
- ENGINE_CMD: 'vbrief:validate --vbrief-dir "{{.USER_WORKING_DIR}}/vbrief"'
20
+ ENGINE_CMD: 'vbrief:validate --project-root "{{.USER_WORKING_DIR}}"'
23
21
 
24
22
  preflight:
25
23
  # Implementation-intent preflight wrapper (#810 / PR #812 fixup;
@@ -73,10 +71,12 @@ tasks:
73
71
  desc: "Preflight an implementation-intent gate (#810): exits 0 only when vBRIEF is in vbrief/active/ AND plan.status == 'running'. Fails closed (#1046 PR-C / #1047) if the wrapped script cannot be resolved."
74
72
  dir: '{{.USER_WORKING_DIR}}'
75
73
  deps:
76
- - _ts-build
74
+ - task: :engine:_ts-build
77
75
  cmds:
78
76
  # Oracle/fallback (parity): scripts/preflight_implementation.py (#1828 Wave 8).
79
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" vbrief:preflight --vbrief-path {{.CLI_ARGS}}
77
+ - task: :engine:invoke
78
+ vars:
79
+ ENGINE_CMD: 'vbrief:preflight --vbrief-path {{.CLI_ARGS}}'
80
80
 
81
81
  reconcile:graph:
82
82
  # Cascade-unblock walker (#1287). Walks vbrief/proposed/, resolves each
@@ -101,10 +101,12 @@ tasks:
101
101
  desc: "Reconcile dep graph: promote proposed/ vBRIEFs whose swarm.depends_on[] all resolve to completed/ or cancelled/ (#1287). Flags: --force --dry-run --json."
102
102
  dir: '{{.USER_WORKING_DIR}}'
103
103
  deps:
104
- - _ts-build
104
+ - task: :engine:_ts-build
105
105
  cmds:
106
106
  # Oracle/fallback (parity): scripts/vbrief_reconcile_graph.py (#1828 Wave 8).
107
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" vbrief-reconcile graph --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
107
+ - task: :engine:invoke
108
+ vars:
109
+ ENGINE_CMD: 'vbrief-reconcile graph --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
108
110
 
109
111
  reconcile:labels:
110
112
  # SCM label reconciliation (#1288). Walks vbrief/proposed/ + pending/ +
@@ -132,10 +134,12 @@ tasks:
132
134
  desc: "Reconcile SCM labels to mirror vBRIEF state: status:blocked / epic+status:tracker / rfc (#1288). Routes through scripts/scm.py. Flags: --repo --dry-run --json."
133
135
  dir: '{{.USER_WORKING_DIR}}'
134
136
  deps:
135
- - _ts-build
137
+ - task: :engine:_ts-build
136
138
  cmds:
137
139
  # Oracle/fallback (parity): scripts/vbrief_reconcile_labels.py (#1828 Wave 8).
138
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" vbrief-reconcile labels --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
140
+ - task: :engine:invoke
141
+ vars:
142
+ ENGINE_CMD: 'vbrief-reconcile labels --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
139
143
 
140
144
  reconcile:umbrellas:
141
145
  # Umbrella current-shape auto-update (#1289). Walks every kind=epic
@@ -167,10 +171,12 @@ tasks:
167
171
  desc: "Reconcile epic umbrella current-shape comments to vBRIEF state per AGENTS.md #1152: edit in place (preserve permalink). Routes through scripts/scm.py. Flags: --repo --dry-run --json."
168
172
  dir: '{{.USER_WORKING_DIR}}'
169
173
  deps:
170
- - _ts-build
174
+ - task: :engine:_ts-build
171
175
  cmds:
172
176
  # Oracle/fallback (parity): scripts/vbrief_reconcile_umbrellas.py (#1828 Wave 8).
173
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" vbrief-reconcile umbrellas --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
177
+ - task: :engine:invoke
178
+ vars:
179
+ ENGINE_CMD: 'vbrief-reconcile umbrellas --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
174
180
 
175
181
  activate:
176
182
  # Implementation-intent activation gate companion (#810). Idempotent:
@@ -201,7 +207,9 @@ tasks:
201
207
  desc: "Activate a vBRIEF: pending/ -> active/ (status: running). Idempotent. (#810)"
202
208
  dir: '{{.USER_WORKING_DIR}}'
203
209
  deps:
204
- - _ts-build
210
+ - task: :engine:_ts-build
205
211
  cmds:
206
212
  # Oracle/fallback (parity): scripts/vbrief_activate.py (#1828 Wave 8).
207
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" vbrief:activate {{.CLI_ARGS}}
213
+ - task: :engine:invoke
214
+ vars:
215
+ ENGINE_CMD: 'vbrief:activate {{.CLI_ARGS}}'
package/tasks/verify.yml CHANGED
@@ -4,85 +4,95 @@ vars:
4
4
  DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
5
5
 
6
6
  tasks:
7
- _ts-build:
8
- internal: true
9
- desc: "Build @deftai/cli dist/ before TS-backed gates run (#1828 s2)."
10
- dir: '{{.DEFT_ROOT}}'
11
- cmds:
12
- - pnpm run build
13
7
 
14
8
  stubs:
15
9
  desc: Scan source files for stub patterns (TODO, FIXME, HACK, return null, bare pass)
16
10
  deps:
17
- - _ts-build
11
+ - task: :engine:_ts-build
18
12
  cmds:
19
13
  # Oracle/fallback (parity): scripts/verify-stubs.py (#1828 Wave 8 / #1854 s3).
20
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify-stubs
14
+ - task: :engine:invoke
15
+ vars:
16
+ ENGINE_CMD: 'verify-stubs'
21
17
 
22
18
  links:
23
19
  desc: Validate internal links in markdown files
24
20
  deps:
25
- - _ts-build
21
+ - task: :engine:_ts-build
26
22
  cmds:
27
23
  # Oracle/fallback (parity): scripts/validate-links.py (#1828 Wave 8 / #1854 s3).
28
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" validate-links
24
+ - task: :engine:invoke
25
+ vars:
26
+ ENGINE_CMD: 'validate-links'
29
27
 
30
28
  rule-ownership:
31
29
  desc: "Verify the Rule Ownership Map (conventions/rule-ownership.json) is in sync with its owner files (#635)"
32
30
  deps:
33
- - _ts-build
31
+ - task: :engine:_ts-build
34
32
  cmds:
35
33
  # Oracle/fallback (parity): scripts/rule_ownership_lint.py (#1828 Wave 8 / #1854 s3).
36
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" rule-ownership-lint --root "{{.DEFT_ROOT}}"
34
+ - task: :engine:invoke
35
+ vars:
36
+ ENGINE_CMD: 'rule-ownership-lint --root "{{.DEFT_ROOT}}"'
37
37
 
38
38
  content-manifest:
39
39
  desc: "Verify the Content Manifest (conventions/content-manifest.json) classifies every git-tracked top-level entry (#1821). Fails on an unclassified entry, a stale classified path, an invalid bucket, or a duplicate path. Wave-1 shippability audit for the engine/content split (#1669)."
40
40
  deps:
41
- - _ts-build
41
+ - task: :engine:_ts-build
42
42
  # Framework-source-only gate: it classifies THIS repo's top-level tree, so it
43
43
  # targets DEFT_ROOT (not USER_WORKING_DIR) -- a consumer install has no
44
44
  # content/ + engine/ top-level split to audit. Mirrors verify:rule-ownership.
45
45
  cmds:
46
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify-content-manifest --project-root "{{.DEFT_ROOT}}"
46
+ - task: :engine:invoke
47
+ vars:
48
+ ENGINE_CMD: 'verify-content-manifest --project-root "{{.DEFT_ROOT}}"'
47
49
 
48
50
  contract-drift:
49
51
  desc: "Drift gate for the public contract layer (#1799). Asserts packages/types/schemas/vbrief-core-0.6.schema.json matches content/vbrief/schemas/vbrief-core.schema.json and that @deftai/directive-types Status/version constants align with the schema. Three-state exit (0 clean / 1 drift / 2 config error)."
50
52
  deps:
51
- - _ts-build
53
+ - task: :engine:_ts-build
52
54
  cmds:
53
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify-contract-drift --project-root "{{.DEFT_ROOT}}"
55
+ - task: :engine:invoke
56
+ vars:
57
+ ENGINE_CMD: 'verify-contract-drift --project-root "{{.DEFT_ROOT}}"'
54
58
 
55
59
  cursor-tier1:
56
60
  desc: "Framework-source content gate (#1877): assert Cursor (cursor-composer / cursor-cloud-agent, Task-tool primitive) is enumerated as a Tier-1 descriptor in the swarm Phase 3 capability matrix AND the review-cycle monitoring tier table. Fails when a doc edit drops the Cursor descriptor and silently re-opens the Tier-3 blocking-poll misclassification. Three-state exit (0 clean / 1 missing marker / 2 config error)."
57
61
  deps:
58
- - _ts-build
62
+ - task: :engine:_ts-build
59
63
  # Framework-source-only gate: it scans THIS repo's two skill docs, so it
60
64
  # targets DEFT_ROOT (not USER_WORKING_DIR) -- a consumer install renders
61
65
  # these skills under .deft/core and does not author them. Mirrors
62
66
  # verify:content-manifest / verify:rule-ownership.
63
67
  cmds:
64
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify-cursor-tier1 --project-root "{{.DEFT_ROOT}}"
68
+ - task: :engine:invoke
69
+ vars:
70
+ ENGINE_CMD: 'verify-cursor-tier1 --project-root "{{.DEFT_ROOT}}"'
65
71
 
66
72
  go-freeze:
67
73
  desc: "Tier-1 freeze gate for the legacy Go-installer bridge (#1912). Advisory while the Tier-0 SoT (lastGoInstaller) is null; once the operator pins it, fails when cmd/deft-install is bumped above the frozen tag. Three-state exit (0 ok / 1 violation / 2 config error). Emergency bypass: DEFT_ALLOW_GO_INSTALLER_BUMP=1."
68
74
  deps:
69
- - _ts-build
75
+ - task: :engine:_ts-build
70
76
  # Framework-source-only gate: it inspects THIS repo's cmd/deft-install
71
77
  # version constant + the Tier-0 SoT, so it targets DEFT_ROOT (not
72
78
  # USER_WORKING_DIR) -- a consumer install has no Go-installer source to
73
79
  # freeze. Mirrors verify:content-manifest.
74
80
  cmds:
75
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify-go-freeze --project-root "{{.DEFT_ROOT}}"
81
+ - task: :engine:invoke
82
+ vars:
83
+ ENGINE_CMD: 'verify-go-freeze --project-root "{{.DEFT_ROOT}}"'
76
84
 
77
85
  bridge-drift:
78
86
  desc: "Tier-1 cross-surface drift gate for the legacy Go-installer bridge (#1912). Asserts no surface marked with the bridge sentinel hardcodes a Go-installer version instead of reading the Tier-0 SoT (lastGoInstaller). Three-state exit (0 clean / 1 drift / 2 config error). Passes whether or not the UPGRADING/doctor surfaces exist yet."
79
87
  deps:
80
- - _ts-build
88
+ - task: :engine:_ts-build
81
89
  # Framework-source-only gate: it scans THIS repo's bridge-version surfaces
82
90
  # against the Tier-0 SoT, so it targets DEFT_ROOT. Mirrors
83
91
  # verify:content-manifest / verify:scm-boundary.
84
92
  cmds:
85
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify-bridge-drift --project-root "{{.DEFT_ROOT}}"
93
+ - task: :engine:invoke
94
+ vars:
95
+ ENGINE_CMD: 'verify-bridge-drift --project-root "{{.DEFT_ROOT}}"'
86
96
 
87
97
  branch:
88
98
  desc: "Detection-bound branch-protection gate (#747). Reads plan.policy.allowDirectCommitsToMaster from PROJECT-DEFINITION."
@@ -98,27 +108,31 @@ tasks:
98
108
  desc: "Operator coding sub-agent model routing gate (#1739). Pre-dispatch (default): fails when a dispatched worker role has no decision in .deft/routing.local.json. Pass --advise for the non-blocking session-start disclosure; --roles a,b to widen the gated set; --provider to override the runtime."
99
109
  dir: '{{.USER_WORKING_DIR}}'
100
110
  deps:
101
- - _ts-build
111
+ - task: :engine:_ts-build
102
112
  cmds:
103
113
  # Bare CLI_ARGS per the verify:encoding convention -- go-task shell-escapes pass-through args.
104
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" swarm-routing-verify --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
114
+ - task: :engine:invoke
115
+ vars:
116
+ ENGINE_CMD: 'swarm-routing-verify --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
105
117
 
106
118
  hooks-installed:
107
119
  desc: "Assert the deft git hooks are installed AND functional -- core.hooksPath set, hooks dir + pre-commit/pre-push present, and the gate scripts resolve in this layout (own-repo or vendored). Fails loud on the #1463 false-green (wired but non-functional). Run `task setup` / re-run the installer if this fails (#747, #1463)."
108
120
  dir: '{{.USER_WORKING_DIR}}'
109
121
  deps:
110
- - _ts-build
122
+ - task: :engine:_ts-build
111
123
  # No sources:/generates: -- a cached cmds skip would mask a hooks dir /
112
124
  # gate-script that was deleted after the last run.
113
125
  cmds:
114
126
  # Oracle/fallback (parity): scripts/verify_hooks_installed.py (#1828 Wave 8).
115
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify:hooks-installed --project-root "{{.USER_WORKING_DIR}}"
127
+ - task: :engine:invoke
128
+ vars:
129
+ ENGINE_CMD: 'verify:hooks-installed --project-root "{{.USER_WORKING_DIR}}"'
116
130
 
117
131
  encoding:
118
132
  desc: "Detect PS 5.1 non-ASCII round-trip corruption (#798). Scans tracked text files for U+FFFD, CP1252/CP437-as-UTF-8 mojibake, and unexpected BOM. Defaults to --all; pass --staged for the pre-commit invocation."
119
133
  dir: '{{.USER_WORKING_DIR}}'
120
134
  deps:
121
- - _ts-build
135
+ - task: :engine:_ts-build
122
136
  # Per `conventions/task-caching.md`: NO `sources:` / `generates:` because
123
137
  # user-facing flags (--staged / --all / --allow-list <path>) MUST NOT be
124
138
  # silently swallowed by go-task's incremental-build cache. The same
@@ -127,33 +141,39 @@ tasks:
127
141
  # layer would otherwise discard.
128
142
  cmds:
129
143
  # Oracle/fallback (parity): scripts/verify_encoding.py (#1828 Wave 8).
130
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify:encoding --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
144
+ - task: :engine:invoke
145
+ vars:
146
+ ENGINE_CMD: 'verify:encoding --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
131
147
 
132
148
  vbrief-conformance:
133
149
  desc: "Detect bare non-conformant vBRIEF keys (#1620). Scans tracked vbrief/**/*.vbrief.json and flags any document/plan/item key that is not 0.6 spec-core, x-directive/-namespaced, or x-vbrief/-namespaced. plan.policy + plan.completedNote carry a TEMPORARY allow-list pending vBRIEF #12. Defaults to --all; pass --staged for the pre-commit invocation."
134
150
  dir: '{{.USER_WORKING_DIR}}'
135
151
  deps:
136
- - _ts-build
152
+ - task: :engine:_ts-build
137
153
  # Per `conventions/task-caching.md`: NO `sources:` / `generates:` because
138
154
  # user-facing flags (--staged / --all / --allow-list <path>) MUST NOT be
139
155
  # silently swallowed by go-task's incremental-build cache (same rationale
140
156
  # as verify:encoding above).
141
157
  cmds:
142
158
  # Oracle/fallback (parity): scripts/verify_vbrief_conformance.py (#1828 Wave 8).
143
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" vbrief-validate conformance --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
159
+ - task: :engine:invoke
160
+ vars:
161
+ ENGINE_CMD: 'vbrief-validate conformance --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
144
162
 
145
163
  destructive-gh-verbs:
146
164
  desc: "Detection-bound gate for destructive gh verbs (#1019). Runs preflight-gh --self-test so the fixture-vs-classifier contract fails CI on drift. Override via DEFT_ALLOW_DESTRUCTIVE_GH_VERBS=1 (per-shell emergency bypass)."
147
165
  dir: '{{.USER_WORKING_DIR}}'
148
166
  deps:
149
- - _ts-build
167
+ - task: :engine:_ts-build
150
168
  # No sources:/generates: -- the self-test fixture table is the
151
169
  # invariant under test; we want the gate to re-run on every
152
170
  # `task check` invocation regardless of whether the classifier file
153
171
  # mtime moved. Caching here would silently mask a regression.
154
172
  cmds:
155
173
  # Oracle/fallback (parity): scripts/preflight_gh.py --self-test (#1854 s5).
156
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" preflight-gh --self-test {{.CLI_ARGS}}
174
+ - task: :engine:invoke
175
+ vars:
176
+ ENGINE_CMD: 'preflight-gh --self-test {{.CLI_ARGS}}'
157
177
 
158
178
  cache-fresh:
159
179
  desc: "Pre-`start_agent` cache-freshness gate (#1127). Refuses implementation dispatch when the triage cache is stale, missing, or the target issue's latest decision is not `accept`. Subscription-aware via plan.policy.triageScope[] (D12 / #1131). Flags: --for-issue N / --max-age-hours N / --allow-stale / --repo OWNER/NAME / --allow-missing-bootstrap (consumed by the framework's own `task check` so a fresh checkout passes -- consumers leave it OFF)."
@@ -177,49 +197,71 @@ tasks:
177
197
  desc: "Drift gate for the generated .planning/codebase/MAP.md projection (#1595 PR4)."
178
198
  dir: '{{.USER_WORKING_DIR}}'
179
199
  deps:
180
- - _ts-build
200
+ - task: :engine:_ts-build
181
201
  # Per conventions/task-caching.md: no sources/generates because this gate
182
202
  # forwards output/artifact overrides through CLI_ARGS.
183
203
  cmds:
184
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" codebase-map-fresh --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
204
+ - task: :engine:invoke
205
+ vars:
206
+ ENGINE_CMD: 'codebase-map-fresh --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
185
207
 
186
208
  session-ritual:
187
209
  desc: "Fail-closed session ritual verifier (#1348). Flags: --tier quick|gated / --json. Set DEFT_SESSION_RITUAL_SKIP=1 for headless workers and CI."
188
210
  dir: '{{.USER_WORKING_DIR}}'
189
211
  deps:
190
- - _ts-build
212
+ - task: :engine:_ts-build
191
213
  # No sources/generates: this gate is time-, HEAD-, and worktree-sensitive.
192
214
  cmds:
193
215
  # Oracle/fallback (parity): scripts/verify_session_ritual.py (#1828 Wave 8 / #1854 s3).
194
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify-session-ritual --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
216
+ - task: :engine:invoke
217
+ vars:
218
+ ENGINE_CMD: 'verify-session-ritual --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
195
219
 
196
220
  tools:
197
221
  desc: "Detect required Deft host tools and print install or manual guidance (#1187). Flags: --install / --yes / --json"
198
222
  dir: '{{.USER_WORKING_DIR}}'
199
223
  deps:
200
- - _ts-build
224
+ - task: :engine:_ts-build
201
225
  cmds:
202
226
  # Oracle/fallback (parity): scripts/verify_tools.py (#1828 Wave 8).
203
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify:tools {{.CLI_ARGS}}
227
+ - task: :engine:invoke
228
+ vars:
229
+ ENGINE_CMD: 'verify:tools {{.CLI_ARGS}}'
204
230
 
205
231
  scm-boundary:
206
232
  desc: "Detection-bound gate against raw `gh` / `ghx` subprocess calls outside `scripts/scm.py` (#1145 / N5). Scans verb-layer Python files (`scripts/triage_*.py`, `scripts/scope_*.py`, `scripts/slice_*.py`, `scripts/_triage_*.py`, `scripts/_scope_*.py`, `scripts/resume_conditions.py`, `scripts/issue_ingest.py`) and fails loud when any of them invoke `gh` directly instead of going through `scm.call(source, verb, args)`. Three-state exit (0 clean / 1 violations / 2 config error). Document an exception via `--allow-list <path>` (file with newline-separated glob patterns)."
207
233
  dir: '{{.USER_WORKING_DIR}}'
208
234
  deps:
209
- - _ts-build
235
+ - task: :engine:_ts-build
210
236
  # Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
211
237
  # because the gate forwards user-facing flags via {{.CLI_ARGS}}
212
238
  # (`--allow-list <path>` / `--quiet`) that go-task's incremental-build
213
239
  # cache would silently swallow.
214
240
  cmds:
215
241
  # Oracle/fallback (parity): scripts/verify_scm_boundary.py (#1828 Wave 8 / #1854 s3).
216
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify-scm-boundary --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
242
+ - task: :engine:invoke
243
+ vars:
244
+ ENGINE_CMD: 'verify-scm-boundary --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
245
+
246
+ xbrief-drift:
247
+ desc: "Data-plane drift gate for the #2109 vbrief->xbrief rename. FAILS when a NEW legacy-layout token is reintroduced: a tracked `*.vbrief.json` artifact, a tracked file under a top-level `vbrief/` lifecycle dir, or a bare `x-vbrief/` reference type inside a canonical `xbrief/**/*.xbrief.json` corpus artifact. Sanctioned back-compat shims (the Part 1 layout-resolver fallback, the EXTENSION_PREFIXES legacy entry, the #2110 migrate path, the #1650 policy fallback) are TS source -- outside the scanned data plane -- and the legacy fixture trees (tests/, content/vbrief/, docs/, history/, xbrief/migration/) are allowlisted. Three-state exit (0 clean / 1 drift / 2 config error). Document an exception via `--allow-list <path>`."
248
+ dir: '{{.USER_WORKING_DIR}}'
249
+ deps:
250
+ - task: :engine:_ts-build
251
+ # Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
252
+ # because the gate forwards user-facing flags via {{.CLI_ARGS}}
253
+ # (`--allow-list <path>` / `--staged` / `--quiet`) that go-task's
254
+ # incremental-build cache would silently swallow.
255
+ cmds:
256
+ - task: :engine:invoke
257
+ vars:
258
+ ENGINE_CMD: 'verify:xbrief-drift --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
217
259
 
218
260
  story-ready:
219
261
  desc: "Deterministic story-start Gate 0 (#1378 Story C). Inspects working-tree cleanliness, the target vBRIEF lifecycle (active/ + plan.status==running), and the dispatch envelope's `## Allocation context` consent token (Story A schema). Three-state exit (0 ready / 1 not ready / 2 config error). -- task verify:story-ready -- --vbrief-path <active-story-path> [--allocation-context <dispatch-envelope-file>] [--allow-dirty] [--json]"
220
262
  dir: '{{.USER_WORKING_DIR}}'
221
263
  deps:
222
- - _ts-build
264
+ - task: :engine:_ts-build
223
265
  # Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
224
266
  # because the gate forwards user-facing flags via {{.CLI_ARGS}}
225
267
  # (--vbrief-path / --allocation-context / --allow-dirty / --json) that
@@ -229,37 +271,43 @@ tasks:
229
271
  # `task check` run has no way to supply.
230
272
  cmds:
231
273
  # Oracle/fallback (parity): scripts/preflight_story_start.py (#1828 Wave 8).
232
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify:story-ready --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
274
+ - task: :engine:invoke
275
+ vars:
276
+ ENGINE_CMD: 'verify:story-ready --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
233
277
 
234
278
  investigation:
235
279
  desc: "Validate a forensic investigation ledger (#1621). Promotes the forensic-research validator into a deterministic gate: the close check before Wave 5 / any causal chat. Three-state exit (0 close-ready / 1 hard failures / 2 config error). Intentionally NOT in the `task check` aggregate -- it requires a concrete --ledger path. -- task verify:investigation -- --ledger .tmp/investigations/<id>/investigation.vbrief.json [--json]"
236
280
  dir: '{{.USER_WORKING_DIR}}'
237
281
  deps:
238
- - _ts-build
282
+ - task: :engine:_ts-build
239
283
  # Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
240
284
  # because the gate forwards user-facing flags via {{.CLI_ARGS}}
241
285
  # (--ledger / --json) that go-task's incremental-build cache would
242
286
  # silently swallow.
243
287
  cmds:
244
288
  # Oracle/fallback (parity): scripts/verify_investigation.py (#1828 Wave 8).
245
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify:investigation --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
289
+ - task: :engine:invoke
290
+ vars:
291
+ ENGINE_CMD: 'verify:investigation --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
246
292
 
247
293
  architecture-sor:
248
294
  desc: "Diff-time system-of-record architecture gate. Scans stateful persistence signals and requires a matching architecture.systemOfRecord record. Example: task verify:architecture-sor -- --base-ref origin/main [--story-path <path>]"
249
295
  dir: '{{.USER_WORKING_DIR}}'
250
296
  deps:
251
- - _ts-build
297
+ - task: :engine:_ts-build
252
298
  # Per conventions/task-caching.md: no sources/generates because this gate
253
299
  # forwards --base-ref, --story-path, and --json through CLI_ARGS.
254
300
  cmds:
255
301
  # Oracle/fallback (parity): scripts/preflight_architecture_sor.py (#1854 s5).
256
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" architecture-preflight-sor --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
302
+ - task: :engine:invoke
303
+ vars:
304
+ ENGINE_CMD: 'architecture-preflight-sor --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
257
305
 
258
306
  capacity:
259
307
  desc: "Three-state ADVISORY capacity gate (#1419 Slice 4). Reports trailing-window target-vs-actual bucket mix from plan.policy.capacityAllocation; exits 0 in the default advise posture (and on insufficient sample / unconfigured policy), 1 only under an explicit enforce posture with a sampled deficit, 2 on config error. DELIBERATELY NOT in the `task check` aggregate -- capacity must never fail-closed on the framework tree."
260
308
  dir: '{{.USER_WORKING_DIR}}'
261
309
  deps:
262
- - _ts-build
310
+ - task: :engine:_ts-build
263
311
  # Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
264
312
  # because the gate forwards user-facing flags via {{.CLI_ARGS}}
265
313
  # (--project-root / --quiet) that go-task's incremental-build cache would
@@ -268,13 +316,15 @@ tasks:
268
316
  # framework's own self-check (advise-mode discipline, #1419).
269
317
  cmds:
270
318
  # Oracle/fallback (parity): scripts/verify_capacity.py (#1828 Wave 8 / #1854 s3).
271
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify-capacity --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
319
+ - task: :engine:invoke
320
+ vars:
321
+ ENGINE_CMD: 'verify-capacity --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
272
322
 
273
323
  judgment-gates:
274
324
  desc: "Three-state ADVISORY judgment-gate engine (#1419 Slice 3). Evaluates a candidate change (diff paths / labels / body) against plan.policy.judgmentGates + four default-on universal safety gates (secrets / infra / AGENTS.md+skills / installer). Advisory by default (always exits 0); opt-in --enforce fails closed (exit 1) when a mechanical block-tier gate fires without a recorded clearance; exit 2 on config error. -- task verify:judgment-gates [-- --base-ref <ref>] [--path P] [--label L] [--enforce] [--json]. DELIBERATELY NOT in the `task check` aggregate -- judgment gates must never fail-closed on the framework tree (advise -> observe -> block rollout, #1419)."
275
325
  dir: '{{.USER_WORKING_DIR}}'
276
326
  deps:
277
- - _ts-build
327
+ - task: :engine:_ts-build
278
328
  # Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
279
329
  # because the gate forwards user-facing flags via {{.CLI_ARGS}}
280
330
  # (--base-ref / --path / --label / --body / --state / --enforce / --json /
@@ -285,7 +335,9 @@ tasks:
285
335
  # advisory on the framework's own tree (advise-mode discipline, #1419).
286
336
  cmds:
287
337
  # Oracle/fallback (parity): scripts/verify_judgment_gates.py (#1828 Wave 8).
288
- - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify:judgment-gates --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
338
+ - task: :engine:invoke
339
+ vars:
340
+ ENGINE_CMD: 'verify:judgment-gates --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
289
341
 
290
342
  wip-cap:
291
343
  desc: "Pre-merge re-validation that pending/+active/ count is within plan.policy.wipCap (#1124 / D4 of #1119). Catches stale-branch merges + --force overrides. Default cap is 10 per umbrella #1119 Current Shape v3. The framework's own task check passes --allow-over-cap during landing-day overage; consumer projects MUST NOT pass that flag."
@@ -2,7 +2,7 @@
2
2
 
3
3
  This is the canonical preamble that orchestrators (this conversation, swarm-skill dispatchers, monitor agents, scheduled / cloud agents) MUST include verbatim or by reference in any implementation sub-agent's dispatch envelope. It encodes the rules learned from prior recurrence patterns so each fresh dispatch starts with the institutional memory already loaded.
4
4
 
5
- The orchestrator copies the section bodies into the worker prompt; the worker reads them as binding rules. Orchestrators MAY trim sections that are demonstrably out of scope (e.g. a docs-only worker may skip the rate-limit-throttle section), but MUST NOT silently drop the AGENTS.md read mandate, the #810 vBRIEF gate, the #1378 allocation-context token, the #1531 worker-metadata section when backend routing applies, or the PowerShell 5.1 non-ASCII rule.
5
+ The orchestrator copies the section bodies into the worker prompt; the worker reads them as binding rules. Orchestrators MAY trim sections that are demonstrably out of scope (e.g. a docs-only worker may skip the rate-limit-throttle section), but MUST NOT silently drop the AGENTS.md read mandate, the #810 xBRIEF gate, the #1378 allocation-context token, the #1531 worker-metadata section when backend routing applies, or the PowerShell 5.1 non-ASCII rule.
6
6
 
7
7
  ## 1. Read AGENTS.md before any other tool call
8
8
 
@@ -10,27 +10,27 @@ The first action in your tool loop MUST be reading `AGENTS.md` at the project ro
10
10
 
11
11
  Anti-pattern: skimming AGENTS.md via `head` or `wc -l` and proceeding. Read the full file.
12
12
 
13
- ## 2. #810 vBRIEF Implementation Intent Gate
13
+ ## 2. #810 xBRIEF Implementation Intent Gate
14
14
 
15
15
  Before any code-writing tool call (or before dispatching a sub-agent that will write code), satisfy the gate:
16
16
 
17
- 1. Locate (or create) a scope vBRIEF for the work. If none exists in `vbrief/proposed/`, `vbrief/pending/`, or `vbrief/active/`, create one in `vbrief/proposed/` first.
18
- 2. Promote the vBRIEF to `vbrief/pending/` via `task scope:promote -- <path>` (idempotent; lifecycle requires proposed -> pending -> active).
19
- 3. Activate it: `task vbrief:activate -- <path>`. This moves the file to `vbrief/active/` and flips `plan.status` to `running`.
20
- 4. Run the gate: `task vbrief:preflight -- vbrief/active/<file>.vbrief.json`. Exit 0 means you are clear to write code.
17
+ 1. Locate (or create) a scope xBRIEF for the work. If none exists in `xbrief/proposed/`, `xbrief/pending/`, or `xbrief/active/`, create one in `xbrief/proposed/` first.
18
+ 2. Promote the xBRIEF to `xbrief/pending/` via `task scope:promote -- <path>` (idempotent; lifecycle requires proposed -> pending -> active).
19
+ 3. Activate it: `task xbrief:activate -- <path>`. This moves the file to `xbrief/active/` and flips `plan.status` to `running`.
20
+ 4. Run the gate: `task xbrief:preflight -- xbrief/active/<file>.xbrief.json`. Exit 0 means you are clear to write code.
21
21
 
22
- Anti-pattern: editing files before activating the vBRIEF, then activating "to make the gate pass" retroactively. The gate is the contract; satisfy it first.
22
+ Anti-pattern: editing files before activating the xBRIEF, then activating "to make the gate pass" retroactively. The gate is the contract; satisfy it first.
23
23
 
24
24
  The gate also requires an explicit action-verb directive from the user (`build`, `implement`, `ship`, `swarm`, `run agents`, `start agent`). Affirmative continuation phrases ("yes", "go", "proceed") are NOT authorisation unless the prior turn explicitly proposed implementation.
25
25
 
26
26
  ## 2.5 Allocation context -- swarm-cohort consent token (#1378)
27
27
 
28
- Every dispatch envelope MUST carry a `## Allocation context` section so any downstream skill (the build SKILL Story Start Gate, the `task vbrief:preflight` gate) or deterministic gate can decide whether batched work was operator-approved by reading structured fields instead of pattern-matching free-form prose. The section has exactly five fields, in this order:
28
+ Every dispatch envelope MUST carry a `## Allocation context` section so any downstream skill (the build SKILL Story Start Gate, the `task xbrief:preflight` gate) or deterministic gate can decide whether batched work was operator-approved by reading structured fields instead of pattern-matching free-form prose. The section has exactly five fields, in this order:
29
29
 
30
30
  - `dispatch_kind`: `solo` | `swarm-cohort` -- whether this worker is a lone dispatch or one member of an operator-approved swarm cohort.
31
31
  - `allocation_plan_id`: <swarm-monitor session id, or path to the Phase 5 allocation-plan snapshot> | null -- the stable handle for the allocation plan that authorized this dispatch.
32
32
  - `batching_rationale`: <one-line rationale from the Phase 5 allocation plan> | null -- the one-line reason the cohort was batched together.
33
- - `cohort_vbriefs`: [<vbrief-path>, ...] -- the full cohort vBRIEF list; a `solo` dispatch lists just its one vBRIEF.
33
+ - `cohort_vbriefs`: [<xbrief-path>, ...] -- the full cohort xBRIEF list; a `solo` dispatch lists just its one xBRIEF.
34
34
  - `operator_approval_evidence`: <Phase 5 approval timestamp or session reference> -- the audit handle proving the operator approved the allocation plan (advisory / audit-only -- it is NOT part of the recognition-contract gate below).
35
35
 
36
36
  **Recognition contract:** a section reporting `dispatch_kind: swarm-cohort` with a NON-NULL `allocation_plan_id` AND a NON-NULL `batching_rationale` satisfies the Story Start Gate consent-token requirement (the #1371 carve-out) -- the worker does NOT re-prompt the operator for batching approval mid-cohort. When the `## Allocation context` section is ABSENT (pre-#1378 dispatches, solo-interactive sessions), fall back to the #1371 prose carve-out in the Story Start Gate.
@@ -43,11 +43,11 @@ Worked example (a swarm-cohort member):
43
43
  - dispatch_kind: swarm-cohort
44
44
  - allocation_plan_id: orchestrator-run-019e80bd-7328-7636-b283-a2f818243dd9
45
45
  - batching_rationale: Three disjoint-file-scope stories from #1378; Story A freezes the schema, Stories B and C build against it in parallel.
46
- - cohort_vbriefs: [vbrief/active/2026-06-01-1378a-allocation-context-schema.vbrief.json, vbrief/active/2026-06-01-1378b-skill-allocation-context-recognition.vbrief.json, vbrief/active/2026-06-01-1378c-preflight-story-start-gate.vbrief.json]
46
+ - cohort_vbriefs: [xbrief/active/2026-06-01-1378a-allocation-context-schema.xbrief.json, xbrief/active/2026-06-01-1378b-skill-allocation-context-recognition.xbrief.json, xbrief/active/2026-06-01-1378c-preflight-story-start-gate.xbrief.json]
47
47
  - operator_approval_evidence: user directive "swarm 1378 per option a" 2026-06-01T02:26Z
48
48
  ```
49
49
 
50
- A `solo` dispatch sets `dispatch_kind: solo`, MAY leave `allocation_plan_id` / `batching_rationale` null, and lists only its own vBRIEF in `cohort_vbriefs`; such a section does NOT by itself satisfy the consent token, so the Story Start Gate falls through to the #1371 prose carve-out for a lone interactive dispatch.
50
+ A `solo` dispatch sets `dispatch_kind: solo`, MAY leave `allocation_plan_id` / `batching_rationale` null, and lists only its own xBRIEF in `cohort_vbriefs`; such a section does NOT by itself satisfy the consent token, so the Story Start Gate falls through to the #1371 prose carve-out for a lone interactive dispatch.
51
51
 
52
52
  ## 2.6 Provider-neutral worker metadata (#1531)
53
53
 
@@ -74,7 +74,7 @@ Populate `selected_backend` OR `routing_policy` (or both when the operator sets
74
74
 
75
75
  **Role-boundary expectations (all providers):** the same boundaries apply whether the worker runs on Composer, Grok Build, Cursor/cloud, or a future adapter:
76
76
 
77
- - ! `leaf-implementation` workers implement scoped vBRIEF work in their assigned worktree only -- gates (`task check`, file-scope audit, Greptile review cycle) are model-agnostic and MUST still pass.
77
+ - ! `leaf-implementation` workers implement scoped xBRIEF work in their assigned worktree only -- gates (`task check`, file-scope audit, Greptile review cycle) are model-agnostic and MUST still pass.
78
78
  - ! `orchestrator`, `review-monitor`, and `merge-release` roles MUST run on strong or review-capable agents; dispatchers MUST NOT route these roles to cheap leaf backends.
79
79
  - ⊗ Route a cheap leaf backend onto the merge cascade, Phase 5->6 release gate, conflict-resolution rebase, or review-cycle merge-ready decision -- these are irreversible-damage surfaces that stay on the strong tier regardless of provider.
80
80
 
@@ -238,7 +238,7 @@ The wrapper reads UTF-8 body text from a file or stdin, sends JSON to `gh api --
238
238
  Before stating an umbrella or epic's current status (what is done, what blocks, wave order), satisfy the claim-cites-state-surface rule:
239
239
 
240
240
  1. ! Fetch issue comments via REST: `gh api repos/<owner>/<repo>/issues/<N>/comments` (or `ghx api ...` for cached read-only GET).
241
- 2. ! Read the `## Current shape (as of pass-N)` comment and any linked context or `LockedDecisions` vBRIEF referenced there. Follow the AGENTS.md #1152 reading order: body -> current-shape comment -> amendment comments.
241
+ 2. ! Read the `## Current shape (as of pass-N)` comment and any linked context or `LockedDecisions` xBRIEF referenced there. Follow the AGENTS.md #1152 reading order: body -> current-shape comment -> amendment comments.
242
242
  3. ! Any "X is done" / "X is the blocker" assertion about an umbrella MUST cite the current-shape comment or another state artifact in the same message.
243
243
 
244
244
  Anti-pattern: reading only the issue body (pass-1 plan, stale by design) and concluding umbrella status from it — e.g. `gh issue view <N> --json body` or REST `repos/.../issues/<N>` body field alone. The live recurrence on 2026-06-28 misread #2013 Wave 0 status this way despite #1152 being loaded.
@@ -305,7 +305,7 @@ This rule is complementary to §5 (REST-by-default) and §7 (rate-limit-aware th
305
305
 
306
306
  If you (the worker) need to spawn a sub-agent yourself:
307
307
 
308
- - Sub-agents MUST have non-overlapping file scopes. Use the parent vBRIEF's `files_owned` / `files_must_not_touch` to partition.
308
+ - Sub-agents MUST have non-overlapping file scopes. Use the parent xBRIEF's `files_owned` / `files_must_not_touch` to partition.
309
309
  - Destructive operations (worktree removal, branch deletion, force-push) run alone, never in parallel.
310
310
  - Each sub-agent receives its own dispatch envelope including this preamble (or a reference to it).
311
311
  - Each child dispatch MUST carry its own `## Worker metadata` section per §2.6 when backend routing applies: set `dispatch_provider` and `worker_role` for the child's actual harness and role; propagate or override `selected_backend` / `routing_policy` so audit trails remain reconstructable at every tree depth (#1531).
@@ -391,7 +391,7 @@ The gate is detection-bound and has three exit states (mirrors the #747 branch g
391
391
 
392
392
  - `0` -- cache fresh, target issue's latest decision is `accept`, and the issue is inside the active `plan.policy.triageScope[]` subscription (D12 / #1131). Proceed to `start_agent`.
393
393
  - `1` -- cache is stale OR a blocking condition was found (issue's latest decision is `defer` / `reject` / `needs-ac` / `mark-duplicate` / absent, OR the issue is outside the active subscription, OR no cached entry exists for the issue under the resolved subscription). The dispatcher MUST refuse `start_agent` and surface the printed remediation (cite `task triage:bootstrap` / `task cache:fetch-all` for staleness, `task triage:accept` / `task triage:scope --list` for the gating decision).
394
- - `2` -- config error: `.deft-cache/` is absent or `vbrief/.eval/candidates.jsonl` is missing. The dispatcher MUST refuse `start_agent` and surface the bootstrap recovery line (`task triage:bootstrap`). This is the never-bootstrapped case and is distinct from the stale-cache case so the operator sees the right action.
394
+ - `2` -- config error: `.deft-cache/` is absent or `xbrief/.eval/candidates.jsonl` is missing. The dispatcher MUST refuse `start_agent` and surface the bootstrap recovery line (`task triage:bootstrap`). This is the never-bootstrapped case and is distinct from the stale-cache case so the operator sees the right action.
395
395
 
396
396
  The `--allow-stale` override is per-shell and audited: the dispatcher MAY pass it after operator approval when the upstream issue body is known to be stable across the freshness window, but the override is logged to stderr and SHOULD be cited in the dispatch envelope so a downstream reviewer can audit the decision. Never silently strip the `--for-issue` arg to clear a failing gate; that defeats the contract.
397
397
 
@@ -420,4 +420,4 @@ Forbidden phrasing without direct user-side evidence: `you cancelled`, `you stop
420
420
 
421
421
  If any rule above conflicts with the user's explicit in-conversation directive, ASK rather than improvise. Rules represent the project's institutional memory; the user can override on a case-by-case basis but the dispatcher should surface the conflict, not silently bypass.
422
422
 
423
- This template is owned by `vbrief/active/2026-05-07-954-orchestrator-agents-md-preamble-template.vbrief.json` (lifecycle-moves to `vbrief/completed/` on PR merge) and may be revised via a #954-tagged PR.
423
+ This template is owned by `xbrief/active/2026-05-07-954-orchestrator-agents-md-preamble-template.xbrief.json` (lifecycle-moves to `xbrief/completed/` on PR merge) and may be revised via a #954-tagged PR.