@deftai/directive-content 0.64.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 (76) hide show
  1. package/.githooks/_deft-run.sh +14 -0
  2. package/.githooks/pre-commit +9 -10
  3. package/.githooks/pre-push +4 -7
  4. package/QUICK-START.md +8 -4
  5. package/Taskfile.yml +32 -14
  6. package/UPGRADING.md +40 -0
  7. package/commands.md +46 -41
  8. package/conventions/rule-ownership.json +1 -1
  9. package/docs/BROWNFIELD.md +37 -33
  10. package/docs/directive-lifecycle.md +2 -2
  11. package/docs/getting-started.md +8 -8
  12. package/package.json +1 -1
  13. package/packs/skills/skills-pack-0.1.json +28 -28
  14. package/skills/deft-directive-article-review/SKILL.md +4 -4
  15. package/skills/deft-directive-build/SKILL.md +37 -37
  16. package/skills/deft-directive-cost/SKILL.md +6 -6
  17. package/skills/deft-directive-debug/SKILL.md +4 -4
  18. package/skills/deft-directive-decompose/SKILL.md +15 -15
  19. package/skills/deft-directive-gh-arch/SKILL.md +3 -3
  20. package/skills/deft-directive-gh-slice/SKILL.md +2 -2
  21. package/skills/deft-directive-interview/SKILL.md +12 -12
  22. package/skills/deft-directive-pre-pr/SKILL.md +3 -3
  23. package/skills/deft-directive-probe/SKILL.md +9 -9
  24. package/skills/deft-directive-refinement/SKILL.md +65 -65
  25. package/skills/deft-directive-release/SKILL.md +3 -3
  26. package/skills/deft-directive-review-cycle/SKILL.md +4 -4
  27. package/skills/deft-directive-setup/SKILL.md +71 -71
  28. package/skills/deft-directive-swarm/SKILL.md +94 -94
  29. package/skills/deft-directive-sync/SKILL.md +55 -55
  30. package/skills/deft-directive-triage/SKILL.md +15 -15
  31. package/tasks/architecture.yml +3 -1
  32. package/tasks/cache.yml +20 -10
  33. package/tasks/capacity.yml +8 -4
  34. package/tasks/change.yml +8 -10
  35. package/tasks/changelog.yml +3 -1
  36. package/tasks/codebase.yml +20 -10
  37. package/tasks/commit.yml +4 -8
  38. package/tasks/engine.yml +16 -4
  39. package/tasks/install.yml +4 -8
  40. package/tasks/issue.yml +8 -10
  41. package/tasks/migrate.yml +24 -8
  42. package/tasks/packs.yml +32 -16
  43. package/tasks/policy.yml +24 -12
  44. package/tasks/pr.yml +16 -8
  45. package/tasks/prd.yml +9 -12
  46. package/tasks/project.yml +14 -14
  47. package/tasks/reconcile.yml +4 -8
  48. package/tasks/roadmap.yml +9 -5
  49. package/tasks/scm.yml +36 -18
  50. package/tasks/scope-undo.yml +3 -1
  51. package/tasks/scope.yml +40 -26
  52. package/tasks/session.yml +4 -2
  53. package/tasks/slice.yml +8 -10
  54. package/tasks/spec.yml +10 -12
  55. package/tasks/swarm.yml +20 -10
  56. package/tasks/triage-actions.yml +32 -16
  57. package/tasks/triage-bootstrap.yml +4 -2
  58. package/tasks/triage-bulk.yml +20 -10
  59. package/tasks/triage-classify.yml +4 -2
  60. package/tasks/triage-queue.yml +12 -6
  61. package/tasks/triage-reconcile.yml +4 -2
  62. package/tasks/triage-scope-drift.yml +4 -2
  63. package/tasks/triage-scope.yml +4 -2
  64. package/tasks/triage-smoketest.yml +4 -2
  65. package/tasks/triage-subscribe.yml +8 -4
  66. package/tasks/triage-summary.yml +4 -2
  67. package/tasks/triage-welcome.yml +4 -2
  68. package/tasks/ts.yml +3 -1
  69. package/tasks/umbrella.yml +1 -7
  70. package/tasks/vbrief.yml +25 -17
  71. package/tasks/verify.yml +107 -48
  72. package/templates/agent-prompt-preamble.md +16 -16
  73. package/templates/agents-entry.md +23 -19
  74. package/vbrief/conformance/extensions/valid/extension-at-root.vbrief.json +31 -0
  75. package/vbrief/conformance/extensions/valid/nested-extension-value.vbrief.json +19 -0
  76. 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,78 +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}}"'
49
+
50
+ contract-drift:
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)."
52
+ deps:
53
+ - task: :engine:_ts-build
54
+ cmds:
55
+ - task: :engine:invoke
56
+ vars:
57
+ ENGINE_CMD: 'verify-contract-drift --project-root "{{.DEFT_ROOT}}"'
47
58
 
48
59
  cursor-tier1:
49
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)."
50
61
  deps:
51
- - _ts-build
62
+ - task: :engine:_ts-build
52
63
  # Framework-source-only gate: it scans THIS repo's two skill docs, so it
53
64
  # targets DEFT_ROOT (not USER_WORKING_DIR) -- a consumer install renders
54
65
  # these skills under .deft/core and does not author them. Mirrors
55
66
  # verify:content-manifest / verify:rule-ownership.
56
67
  cmds:
57
- - 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}}"'
58
71
 
59
72
  go-freeze:
60
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."
61
74
  deps:
62
- - _ts-build
75
+ - task: :engine:_ts-build
63
76
  # Framework-source-only gate: it inspects THIS repo's cmd/deft-install
64
77
  # version constant + the Tier-0 SoT, so it targets DEFT_ROOT (not
65
78
  # USER_WORKING_DIR) -- a consumer install has no Go-installer source to
66
79
  # freeze. Mirrors verify:content-manifest.
67
80
  cmds:
68
- - 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}}"'
69
84
 
70
85
  bridge-drift:
71
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."
72
87
  deps:
73
- - _ts-build
88
+ - task: :engine:_ts-build
74
89
  # Framework-source-only gate: it scans THIS repo's bridge-version surfaces
75
90
  # against the Tier-0 SoT, so it targets DEFT_ROOT. Mirrors
76
91
  # verify:content-manifest / verify:scm-boundary.
77
92
  cmds:
78
- - 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}}"'
79
96
 
80
97
  branch:
81
98
  desc: "Detection-bound branch-protection gate (#747). Reads plan.policy.allowDirectCommitsToMaster from PROJECT-DEFINITION."
@@ -91,27 +108,31 @@ tasks:
91
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."
92
109
  dir: '{{.USER_WORKING_DIR}}'
93
110
  deps:
94
- - _ts-build
111
+ - task: :engine:_ts-build
95
112
  cmds:
96
113
  # Bare CLI_ARGS per the verify:encoding convention -- go-task shell-escapes pass-through args.
97
- - 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}}'
98
117
 
99
118
  hooks-installed:
100
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)."
101
120
  dir: '{{.USER_WORKING_DIR}}'
102
121
  deps:
103
- - _ts-build
122
+ - task: :engine:_ts-build
104
123
  # No sources:/generates: -- a cached cmds skip would mask a hooks dir /
105
124
  # gate-script that was deleted after the last run.
106
125
  cmds:
107
126
  # Oracle/fallback (parity): scripts/verify_hooks_installed.py (#1828 Wave 8).
108
- - 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}}"'
109
130
 
110
131
  encoding:
111
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."
112
133
  dir: '{{.USER_WORKING_DIR}}'
113
134
  deps:
114
- - _ts-build
135
+ - task: :engine:_ts-build
115
136
  # Per `conventions/task-caching.md`: NO `sources:` / `generates:` because
116
137
  # user-facing flags (--staged / --all / --allow-list <path>) MUST NOT be
117
138
  # silently swallowed by go-task's incremental-build cache. The same
@@ -120,33 +141,39 @@ tasks:
120
141
  # layer would otherwise discard.
121
142
  cmds:
122
143
  # Oracle/fallback (parity): scripts/verify_encoding.py (#1828 Wave 8).
123
- - 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}}'
124
147
 
125
148
  vbrief-conformance:
126
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."
127
150
  dir: '{{.USER_WORKING_DIR}}'
128
151
  deps:
129
- - _ts-build
152
+ - task: :engine:_ts-build
130
153
  # Per `conventions/task-caching.md`: NO `sources:` / `generates:` because
131
154
  # user-facing flags (--staged / --all / --allow-list <path>) MUST NOT be
132
155
  # silently swallowed by go-task's incremental-build cache (same rationale
133
156
  # as verify:encoding above).
134
157
  cmds:
135
158
  # Oracle/fallback (parity): scripts/verify_vbrief_conformance.py (#1828 Wave 8).
136
- - 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}}'
137
162
 
138
163
  destructive-gh-verbs:
139
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)."
140
165
  dir: '{{.USER_WORKING_DIR}}'
141
166
  deps:
142
- - _ts-build
167
+ - task: :engine:_ts-build
143
168
  # No sources:/generates: -- the self-test fixture table is the
144
169
  # invariant under test; we want the gate to re-run on every
145
170
  # `task check` invocation regardless of whether the classifier file
146
171
  # mtime moved. Caching here would silently mask a regression.
147
172
  cmds:
148
173
  # Oracle/fallback (parity): scripts/preflight_gh.py --self-test (#1854 s5).
149
- - 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}}'
150
177
 
151
178
  cache-fresh:
152
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)."
@@ -170,49 +197,71 @@ tasks:
170
197
  desc: "Drift gate for the generated .planning/codebase/MAP.md projection (#1595 PR4)."
171
198
  dir: '{{.USER_WORKING_DIR}}'
172
199
  deps:
173
- - _ts-build
200
+ - task: :engine:_ts-build
174
201
  # Per conventions/task-caching.md: no sources/generates because this gate
175
202
  # forwards output/artifact overrides through CLI_ARGS.
176
203
  cmds:
177
- - 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}}'
178
207
 
179
208
  session-ritual:
180
209
  desc: "Fail-closed session ritual verifier (#1348). Flags: --tier quick|gated / --json. Set DEFT_SESSION_RITUAL_SKIP=1 for headless workers and CI."
181
210
  dir: '{{.USER_WORKING_DIR}}'
182
211
  deps:
183
- - _ts-build
212
+ - task: :engine:_ts-build
184
213
  # No sources/generates: this gate is time-, HEAD-, and worktree-sensitive.
185
214
  cmds:
186
215
  # Oracle/fallback (parity): scripts/verify_session_ritual.py (#1828 Wave 8 / #1854 s3).
187
- - 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}}'
188
219
 
189
220
  tools:
190
221
  desc: "Detect required Deft host tools and print install or manual guidance (#1187). Flags: --install / --yes / --json"
191
222
  dir: '{{.USER_WORKING_DIR}}'
192
223
  deps:
193
- - _ts-build
224
+ - task: :engine:_ts-build
194
225
  cmds:
195
226
  # Oracle/fallback (parity): scripts/verify_tools.py (#1828 Wave 8).
196
- - 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}}'
197
230
 
198
231
  scm-boundary:
199
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)."
200
233
  dir: '{{.USER_WORKING_DIR}}'
201
234
  deps:
202
- - _ts-build
235
+ - task: :engine:_ts-build
203
236
  # Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
204
237
  # because the gate forwards user-facing flags via {{.CLI_ARGS}}
205
238
  # (`--allow-list <path>` / `--quiet`) that go-task's incremental-build
206
239
  # cache would silently swallow.
207
240
  cmds:
208
241
  # Oracle/fallback (parity): scripts/verify_scm_boundary.py (#1828 Wave 8 / #1854 s3).
209
- - 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}}'
210
259
 
211
260
  story-ready:
212
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]"
213
262
  dir: '{{.USER_WORKING_DIR}}'
214
263
  deps:
215
- - _ts-build
264
+ - task: :engine:_ts-build
216
265
  # Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
217
266
  # because the gate forwards user-facing flags via {{.CLI_ARGS}}
218
267
  # (--vbrief-path / --allocation-context / --allow-dirty / --json) that
@@ -222,37 +271,43 @@ tasks:
222
271
  # `task check` run has no way to supply.
223
272
  cmds:
224
273
  # Oracle/fallback (parity): scripts/preflight_story_start.py (#1828 Wave 8).
225
- - 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}}'
226
277
 
227
278
  investigation:
228
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]"
229
280
  dir: '{{.USER_WORKING_DIR}}'
230
281
  deps:
231
- - _ts-build
282
+ - task: :engine:_ts-build
232
283
  # Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
233
284
  # because the gate forwards user-facing flags via {{.CLI_ARGS}}
234
285
  # (--ledger / --json) that go-task's incremental-build cache would
235
286
  # silently swallow.
236
287
  cmds:
237
288
  # Oracle/fallback (parity): scripts/verify_investigation.py (#1828 Wave 8).
238
- - 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}}'
239
292
 
240
293
  architecture-sor:
241
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>]"
242
295
  dir: '{{.USER_WORKING_DIR}}'
243
296
  deps:
244
- - _ts-build
297
+ - task: :engine:_ts-build
245
298
  # Per conventions/task-caching.md: no sources/generates because this gate
246
299
  # forwards --base-ref, --story-path, and --json through CLI_ARGS.
247
300
  cmds:
248
301
  # Oracle/fallback (parity): scripts/preflight_architecture_sor.py (#1854 s5).
249
- - 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}}'
250
305
 
251
306
  capacity:
252
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."
253
308
  dir: '{{.USER_WORKING_DIR}}'
254
309
  deps:
255
- - _ts-build
310
+ - task: :engine:_ts-build
256
311
  # Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
257
312
  # because the gate forwards user-facing flags via {{.CLI_ARGS}}
258
313
  # (--project-root / --quiet) that go-task's incremental-build cache would
@@ -261,13 +316,15 @@ tasks:
261
316
  # framework's own self-check (advise-mode discipline, #1419).
262
317
  cmds:
263
318
  # Oracle/fallback (parity): scripts/verify_capacity.py (#1828 Wave 8 / #1854 s3).
264
- - 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}}'
265
322
 
266
323
  judgment-gates:
267
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)."
268
325
  dir: '{{.USER_WORKING_DIR}}'
269
326
  deps:
270
- - _ts-build
327
+ - task: :engine:_ts-build
271
328
  # Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
272
329
  # because the gate forwards user-facing flags via {{.CLI_ARGS}}
273
330
  # (--base-ref / --path / --label / --body / --state / --enforce / --json /
@@ -278,7 +335,9 @@ tasks:
278
335
  # advisory on the framework's own tree (advise-mode discipline, #1419).
279
336
  cmds:
280
337
  # Oracle/fallback (parity): scripts/verify_judgment_gates.py (#1828 Wave 8).
281
- - 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}}'
282
341
 
283
342
  wip-cap:
284
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.