@deftai/directive-content 0.110.0 → 0.112.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 (50) hide show
  1. package/QUICK-START.md +16 -14
  2. package/SKILL.md +13 -13
  3. package/Taskfile.yml +20 -15
  4. package/UPGRADING.md +64 -24
  5. package/commands.md +20 -18
  6. package/contracts/design-critique.md +36 -13
  7. package/conventions/machine-generated-banner.md +9 -9
  8. package/conventions/rule-ownership.json +3 -3
  9. package/docs/SUPPORT.md +43 -0
  10. package/docs/capabilities.md +110 -0
  11. package/docs/capability-overlay.json +197 -0
  12. package/docs/getting-started.md +131 -49
  13. package/docs/scope-provenance.md +2 -0
  14. package/main.md +22 -22
  15. package/package.json +1 -1
  16. package/packs/rules/rules-pack-0.1.json +1 -1
  17. package/packs/skills/skills-pack-0.1.json +9 -7
  18. package/scm/github.md +2 -0
  19. package/skills/deft-directive-design-critique/SKILL.md +10 -4
  20. package/skills/deft-directive-release/SKILL.md +22 -17
  21. package/skills/deft-directive-review-cycle/SKILL.md +52 -15
  22. package/skills/deft-directive-swarm/SKILL.md +8 -4
  23. package/skills/deft-directive-swarm/references/core-ops.md +1 -0
  24. package/skills/deft-directive-swarm/references/core-phase-0.md +2 -1
  25. package/skills/deft-directive-swarm/references/core-phase-3.md +8 -5
  26. package/skills/deft-directive-swarm/references/host-claude-code.md +3 -2
  27. package/skills/deft-directive-swarm/references/host-grok-build.md +19 -3
  28. package/skills/deft-directive-swarm/references/host-grokbot.md +151 -0
  29. package/tasks/docs.yml +19 -0
  30. package/tasks/migrate.yml +3 -1
  31. package/tasks/policy.yml +2 -2
  32. package/tasks/scm.yml +12 -1
  33. package/tasks/scope.yml +16 -25
  34. package/tasks/triage-actions.yml +3 -4
  35. package/tasks/triage-bootstrap.yml +2 -2
  36. package/tasks/triage-bulk.yml +6 -7
  37. package/tasks/triage-classify.yml +2 -2
  38. package/tasks/triage-queue.yml +2 -2
  39. package/tasks/triage-reconcile.yml +2 -2
  40. package/tasks/triage-scope-drift.yml +2 -2
  41. package/tasks/triage-scope.yml +2 -2
  42. package/tasks/triage-smoketest.yml +3 -3
  43. package/tasks/triage-subscribe.yml +2 -2
  44. package/tasks/triage-summary.yml +2 -2
  45. package/tasks/triage-welcome.yml +2 -2
  46. package/tasks/verify.yml +30 -1
  47. package/templates/PULL_REQUEST_TEMPLATE.md +12 -0
  48. package/templates/agent-prompt-preamble.md +6 -3
  49. package/templates/agents-entry.md +5 -5
  50. package/templates/design-critique-brief.md +2 -0
@@ -1,25 +1,28 @@
1
1
  # Getting Started with Deft Directive
2
2
 
3
- Deft Directive is a Taskfile-first framework for AI-assisted software work. It combines agent guidance, deterministic gates, xBRIEF lifecycle metadata, installer/doctor handoff, and cache-backed backlog workflows. This guide walks through installation, preferences, project setup, and the first scope workflow.
3
+ Deft Directive is a Taskfile-first framework for AI-assisted software work. It combines agent guidance, deterministic gates, xBRIEF lifecycle metadata, installer/doctor handoff, and cache-backed backlog workflows. This guide is the **first-project long form**: one path from install through a green Directive check.
4
4
 
5
- > **Note**: This guide is an orientation layer. For a single-picture mental model of how Directive turns an idea into shipped work, see [the Directive lifecycle](./directive-lifecycle.md); for command behavior, see [commands.md](../commands.md); for current architecture details, see [ARCHITECTURE.md](../../docs/ARCHITECTURE.md).
5
+ > **Note**: For a single-picture mental model of how Directive turns an idea into shipped work, see [the Directive lifecycle](./directive-lifecycle.md). For command behavior, see [commands.md](../commands.md). Agent detect-state and recovery live in [QUICK-START.md](../QUICK-START.md). This page is that path's long form, not a second install sequence.
6
6
 
7
7
  ## The shape of the workflow
8
8
 
9
- Before the mechanics below, it helps to see the whole loop. Directive is two connected phases that repeat: an **inception** phase (Concept → Strategy Analysis → Specification + Artifacts) that feeds a recurring **per-session** phase (Session Start → Triage/Refine → Slice → Swarm → Review/Fix → Ship), where shipping surfaces new issues and features that flow back into the queue. The full picture, with a stage-to-real-command mapping table, lives in [the Directive lifecycle overview](./directive-lifecycle.md).
9
+ Directive is two connected phases that repeat: an **inception** phase (Concept → Strategy Analysis → Specification + Artifacts) that feeds a recurring **per-session** phase (Session Start → Triage/Refine → Slice → Swarm → Review/Fix → Ship). Shipping surfaces new issues that flow back into the queue. The stage-to-command mapping lives in [the Directive lifecycle overview](./directive-lifecycle.md).
10
10
 
11
11
  ## Deft & Directive (naming)
12
12
 
13
13
  **Deft is the company; Directive is the product.** *Deft* names the organization and the on-disk footprint (`.deft/`, `@deftai/*` npm scope, user config under `~/.config/deft/`). *Directive* names the framework you install and run: the npm package is `@deftai/directive`, and the primary CLI is `directive` (`deft` is an alias). Legacy `deft-install` / `deft` paths in this guide refer to the same product during the staged transition ([#423](https://github.com/deftai/directive/issues/423)).
14
14
 
15
+ Public consumer commands on this page use `directive` / `deft`. After `directive init`, the root Taskfile is include-only, so `task deft:<verb>` is the namespaced Task equivalent. Do not copy bare `task <verb>` from the framework source tree into a new project.
16
+
15
17
  ---
16
18
 
17
19
  ## Prerequisites
18
20
 
19
- - **Node 20+** and the package manager declared by the project (`npm` or `pnpm`) for live consumer gates and the npm distribution channel (see `.nvmrc` in the framework payload). npm is bundled with Node; a pnpm-pinned project enables pnpm through Corepack.
20
- - **Git** and **GitHub CLI (`gh`)** are also checked by the consumer toolchain gate.
21
- - **Go 1.22+** only if you use the bootstrap Go installer or build from source.
22
- - **Python 3.11+**, **uv**, and **task** for the framework-maintainer and session workflows that name them. The consumer toolchain probe itself does not check those tools. Run `directive toolchain:check --consumer --project-root .` after install.
21
+ - **Node 20+**, **Git**, and **GitHub CLI (`gh`)**.
22
+ - The package manager you use to install Directive (`npm` is bundled with Node; pnpm is an alternative).
23
+ - After install, confirm with `directive toolchain:check --consumer`. That probe checks Node, git, gh, and the selected manager. It does not require Python, uv, Go, or Task.
24
+
25
+ **Go 1.22+** is only for the frozen Go installer or a source build. Framework maintainers of this repository use a separate Node 24 pin; see [CONTRIBUTING.md](../../CONTRIBUTING.md).
23
26
 
24
27
  ---
25
28
 
@@ -27,7 +30,7 @@ Before the mechanics below, it helps to see the whole loop. Directive is two con
27
30
 
28
31
  ### npm (canonical)
29
32
 
30
- With Node already available, install Directive globally from npm:
33
+ Install Directive globally from npm:
31
34
 
32
35
  ```bash
33
36
  npm i -g @deftai/directive
@@ -44,6 +47,8 @@ npx @deftai/directive session:start
44
47
 
45
48
  This npm path has been the canonical distribution channel since v0.55.1. A pnpm-managed repository can install the same package with `pnpm add -g @deftai/directive` or project-locally with `pnpm add -D @deftai/directive`.
46
49
 
50
+ **Success:** `directive --version` prints a version. **Recovery:** run `directive doctor` and follow its one `Next command:`. Agent detect-state cases live in [QUICK-START.md](../QUICK-START.md).
51
+
47
52
  ### Go installer (legacy bridge)
48
53
 
49
54
  The Go installer is a frozen legacy bridge for older installs and source-oriented recovery. New consumer installs should use npm above; see [UPGRADING.md](../UPGRADING.md#one-time-migration-from-the-go-installer-legacy--npm) when migrating an existing Go-installer layout.
@@ -60,86 +65,163 @@ For existing consumer projects, the headless upgrade path is:
60
65
  deft-install --yes --upgrade --repo-root . --json
61
66
  ```
62
67
 
63
- Those consumer flows intentionally project Deft-managed files into your project
64
- root (`AGENTS.md`, skills pointers, gitignore entries, xbrief scaffolding, and
65
- related guard configuration). Framework maintainers working inside a
66
- `deftai/directive` checkout should instead follow
67
- [`CONTRIBUTING.md`](../../CONTRIBUTING.md) and use `--maintainer`; maintainer setup
68
- checks tools without rewriting consumer-managed files.
68
+ Those consumer flows project Deft-managed files into your project root (`AGENTS.md`, skills pointers, gitignore entries, xbrief scaffolding, and related guard configuration). Framework maintainers working inside a `deftai/directive` checkout should instead follow [`CONTRIBUTING.md`](../../CONTRIBUTING.md) and use `--maintainer`; maintainer setup checks tools without rewriting consumer-managed files.
69
69
 
70
70
  ---
71
71
 
72
72
  ## First Project
73
73
 
74
- <!-- TODO: Walk through deft-setup phases: USER.md, PROJECT.md, SPECIFICATION.md -->
74
+ This is one executable journey. It is a human projection of the setup skill plus the lifecycle bridge. Agents still follow `skills/deft-directive-setup/SKILL.md`. Do not treat this list as a third procedure beside QUICK-START.
75
75
 
76
- ---
76
+ The endpoint is **Directive control plane ready**: an active scope passes story-ready and preflight, and `deft check` exits 0. Product implementation comes next. This page does not build a sample app.
77
77
 
78
- ## Working an existing backlog
78
+ ### 1. Install the CLI
79
+
80
+ ```bash
81
+ npm i -g @deftai/directive
82
+ directive --version
83
+ ```
84
+
85
+ **Success:** a version string. **Recovery:** `directive doctor`.
86
+
87
+ ### 2. Create a Git repository, then init
79
88
 
80
- If you are adopting Deft on a project that already has an issue tracker (existing repo, brownfield migration, an upstream bug list that has been accumulating), you do not have to start from an empty `xbrief/proposed/`. The refinement skill's **Phase 0 triage workflow** lets you walk an existing backlog locally, decide what to keep, and let only the **accepted** items land in `xbrief/proposed/`. Trigger words: **"triage"**, **"work the cache"**, **"pre-ingest"**, **"action menu"**.
89
+ `directive init` deposits files. It does not create a Git repository. `deft verify:story-ready` and `deft check` both require a Git worktree. Start in an empty project directory:
90
+
91
+ ```bash
92
+ mkdir my-project && cd my-project
93
+ git init
94
+ directive init
95
+ ```
81
96
 
82
- **Labels first:** capacity and triage matchers only help when labels exist. For a bare or thin label set, adopt the [consumer issue-label kit](./consumer-issue-label-kit.md) (#2611) before you rely on ranking. `triage:classify -- --mirror` is withdrawn (#4070).
97
+ `init` writes the vendored deposit into gitignored `.deft/core/`, renders `AGENTS.md`, scaffolds `xbrief/` lifecycle folders, and adds an include-only root `Taskfile.yml`. Tracked vs ignored: the reconstitutable deposit and session cache are ignored; your `package.json` pin stays tracked.
83
98
 
84
- ### Step 1 Scoped first populate
99
+ **Success:** `.deft/core/` and `AGENTS.md` exist. **Recovery:** `directive doctor` (one `Next command:`).
85
100
 
86
- A real-sized backlog can drain the shared GitHub GraphQL bucket if you fetch everything at once (see [#976](https://github.com/deftai/directive/issues/976) for the recurring symptom). Scope the first populate so it lands in seconds rather than minutes:
101
+ ### 3. Doctor
87
102
 
88
103
  ```bash
89
- task triage:bootstrap -- --limit 50 --state open
104
+ directive doctor
90
105
  ```
91
106
 
92
- Flag surface (shared by `task triage:bootstrap` and `task cache:fetch-all`):
107
+ Doctor is read-only. When the install is healthy it prints `System check passed!`. When action is required it prints exactly one `Next command:` with a root-cause line.
93
108
 
94
- - `--limit <N>` caps the number of issues fetched (start with `50` and widen as needed).
95
- - `--state {open|closed|all}` selects the issue state (default `open`).
96
- - `--batch-size <N>` caps the per-page fetch (default `10`).
97
- - `--delay-ms <N>` inserts a sleep between batches so a populate against a large repo does not trip the rate limiter (default `500`; a `429` retries automatically using the upstream `Retry-After` header).
98
- - `--repo OWNER/NAME` is optional; when omitted, the bootstrap infers the slug from `git remote get-url origin`.
109
+ **Success:** `System check passed!` **Recovery:** run the printed `Next command:`. Detect-state ladders stay in [QUICK-START.md](../QUICK-START.md).
99
110
 
100
- The unbounded no-flag form remains the default for small backlogs. For real-sized repos, prefer the scoped first run; you can always re-enter triage later to widen the slice.
111
+ ### 4. USER.md and project definition
101
112
 
102
- ### Step 2 Walk the action menu
113
+ User preferences live outside the repo:
103
114
 
104
- After the cache is populated, ask your agent to triage. For each cached candidate the agent presents a numbered action menu and waits for your decision:
115
+ - Unix / macOS: `~/.config/deft/USER.md`
116
+ - Windows: `%APPDATA%\deft\USER.md`
117
+ - Override: `DEFT_USER_PATH`
105
118
 
119
+ Project identity lives in `xbrief/PROJECT-DEFINITION.xbrief.json`. Greenfield setup does not create `specification.xbrief.json`.
120
+
121
+ Tell your agent to follow `AGENTS.md`, or run `directive bootstrap`. That hands off to the setup skill. The skill asks one question at a time and **must not write files until you confirm** the captured values (`yes` / `confirmed` / `approve`). Promotion and activation are later commitments, not automatic setup continuation.
122
+
123
+ **Success:** `USER.md` exists at the platform path and `xbrief/PROJECT-DEFINITION.xbrief.json` exists. **Recovery:** `directive doctor`, then re-enter setup. Do not skip the confirmation gate.
124
+
125
+ ### 5. First proposed scope
126
+
127
+ Setup Phase 3 writes the first scope xBRIEF to `xbrief/proposed/` with `plan.status: proposed`. Filename shape: `YYYY-MM-DD-descriptive-slug.xbrief.json`. New writes use `"xBRIEFInfo": { "version": "0.8" }`.
128
+
129
+ **Success:** one file in `xbrief/proposed/`. **Recovery:** `directive doctor`. If setup stopped early, resume the setup skill; do not hand-copy a completed xBRIEF as the next-build contract.
130
+
131
+ ### 6. Git: feature branch and a clean tree
132
+
133
+ Story-ready fails when the tree is not Git, when it is dirty, or when you are on the default branch under the default branch policy. Commit the generated setup artifacts, then leave `master` / `main`:
134
+
135
+ ```bash
136
+ git add AGENTS.md Taskfile.yml xbrief .gitignore
137
+ git commit -m "chore: deposit Directive and first proposed scope"
138
+ git switch -c feat/first-project
139
+ deft verify:branch
106
140
  ```
107
- 1. Accept -- task triage:accept <issue> (writes proposed/ xBRIEF + audit-log entry)
108
- 2. Reject -- task triage:reject <issue> (audit-log entry only; closes the upstream issue)
109
- 3. Defer -- task triage:defer <issue> (non-terminal; resurfaces on the next pass)
110
- 4. Needs-AC -- task triage:needs-ac <issue> (non-terminal; flags missing acceptance criteria)
111
- 5. Mark duplicate -- task triage:mark-duplicate <a> <b> (terminal; cross-links the duplicate target)
112
- 6. Discuss
113
- 7. Back
141
+
142
+ `--allow-dirty` on story-ready is an intentional exception, not the happy path.
143
+
144
+ **Success:** `deft verify:branch` exits 0 on the feature branch. **Recovery:** create a feature branch; commit or stash leftover files; then `directive doctor`.
145
+
146
+ ### 7. Promote, then activate
147
+
148
+ These are two separate user commitments. Setup does not auto-run them.
149
+
150
+ ```bash
151
+ deft scope:promote -- xbrief/proposed/<file>.xbrief.json
152
+ deft scope:activate -- xbrief/pending/<file>.xbrief.json
153
+ ```
154
+
155
+ Promote moves proposed → pending. Activate moves pending → `xbrief/active/` and sets `plan.status` to `running`. Both commands are idempotent.
156
+
157
+ **Success:** the file is in `xbrief/active/` with `plan.status` `running`. **Recovery:** `directive doctor`. If activate says the file must be in `pending/`, run promote first.
158
+
159
+ Promote and activate move a tracked xBRIEF. Commit that change before story-ready. A dirty tree fails the next gate.
160
+
161
+ ```bash
162
+ git add xbrief
163
+ git commit -m "chore: activate first scope"
114
164
  ```
115
165
 
116
- Only **accepted** items become scope xBRIEFs in `xbrief/proposed/`. Rejected, deferred, and duplicate decisions are recorded in the audit log so the backlog stays focused. Bulk verbs (`task triage:bulk-accept` / `bulk-reject` / `bulk-defer` / `bulk-needs-ac`) handle predictable patterns (e.g. "reject every `wontfix`-labelled candidate") without walking the menu N times.
166
+ ### 8. Story-ready and preflight
117
167
 
118
- ### Step 3 — Understand the three-tier model
168
+ ```bash
169
+ deft verify:story-ready --vbrief-path xbrief/active/<file>.xbrief.json
170
+ deft xbrief:preflight -- xbrief/active/<file>.xbrief.json
171
+ ```
119
172
 
120
- Phase 0 reads and writes three distinct stores; they never collapse into one:
173
+ `--vbrief-path` is the shipped story-ready flag (the file is still a `.xbrief.json`). Preflight exits 0 only when the candidate lives in `xbrief/active/` and `plan.status` is `running`.
121
174
 
122
- - **Cache** `.deft-cache/github-issue/<owner>/<repo>/<N>/` is the local mirror of fetched issue bodies, labels, and state. Populated by `task cache:fetch-all`; read via `task cache:get -- github-issue OWNER/NAME/<N>`. The directory is gitignored — your local mirror is private to your machine. The cache is the **read** surface for triage so decisions are reproducible across re-runs (no live `gh issue view` per decision).
123
- - **Audit log** — `xbrief/.eval/candidates.jsonl` is an append-only JSONL recording every candidate you have ever seen plus the action taken (`accept | reject | defer | needs-ac | mark-duplicate`) and a timestamp. Re-running triage against the same cache short-circuits items that already have a terminal entry, so deferred / Needs-AC items resurface and rejected ones do not.
124
- - **Accepted backlog** — `xbrief/proposed/` is the standard scope-xBRIEF lifecycle folder. **Writes flow only through `task triage:accept`**, which delegates the actual xBRIEF authoring to `task issue:ingest` so slug, reference, and schema rules stay in one place. Hand-authored proposed/ xBRIEFs are still allowed; what changed is that triage no longer writes there silently.
175
+ **Success:** both commands exit 0. **Recovery:** fix Git state (step 6), then `directive doctor`. Do not start implementation until preflight is green.
125
176
 
126
- ### Step 4 Why this avoids the GraphQL drain
177
+ ### 9. First check (terminal verb)
127
178
 
128
- The shared GitHub GraphQL bucket (5000 points/hour per identity) is the operational bottleneck under multi-agent / shared-identity workflows, not the REST `core` bucket. The triage cache is **REST-backed** (`gh api` reads, not `gh issue view --json`), and the populate uses **batched delays** plus automatic 429 retries with the upstream `Retry-After` header. There is no live `gh issue view` per accept / reject / defer decision — every decision reads from the local cache. This is why the scoped flags exist: they let you keep the populate inside the REST budget and well clear of the GraphQL bottleneck (see [#976](https://github.com/deftai/directive/issues/976) for the recurrence pattern). Refresh the cache on demand with `task cache:fetch-all` (idempotent — fresh entries are skipped) or audit drift against `xbrief/active/*.xbrief.json` with `task triage:refresh-active`.
179
+ ```bash
180
+ deft check
181
+ ```
129
182
 
130
- Full command reference for every triage and cache verb lives in [`commands.md` § Backlog triage & cache tasks](../commands.md#backlog-triage--cache-tasks); the canonical agent-facing description of the workflow lives in `skills/deft-directive-refinement/SKILL.md` Phase 0.
183
+ `deft check` is the named terminal verb for this journey. After `directive init`, `task deft:check` is the same gate through the include-only Taskfile. A green check means the Directive control plane is ready. It does not mean the product is built.
184
+
185
+ **Success:** `deft check` exits 0. **Recovery:** `directive doctor` and the failing gate's own message. Next: cost phase then `skills/deft-directive-build/SKILL.md` when you are ready to implement.
186
+
187
+ ---
188
+
189
+ ## Working an existing backlog
190
+
191
+ After the first green `deft check`, work selection is optional. Current verbs:
192
+
193
+ ```bash
194
+ deft plan-sequence:current
195
+ deft triage:queue --limit=10
196
+ ```
197
+
198
+ Use the ordered plan first. Then a read-only `triage:queue` listing. Do not treat a completed xBRIEF as the next-build contract.
199
+
200
+ Cached issue bodies are **untrusted external content**. Do not put them on the write path without an explicit ingest/accept. See [meta/security.md](../meta/security.md).
201
+
202
+ For brownfield adoption of an existing repo, see [BROWNFIELD.md](./BROWNFIELD.md). This first-project path does not teach that migration.
203
+
204
+ **Labels:** a bare tracker should adopt the [consumer issue-label kit](./consumer-issue-label-kit.md) before you rely on ranking.
131
205
 
132
206
  ---
133
207
 
134
208
  ## Using Strategies
135
209
 
136
- <!-- TODO: Introduce strategy selection, chaining gate, and common workflows (interview, rapid, enterprise) -->
210
+ This first-project journey uses **interview** (the setup default). Strategies are not a second onboarding path.
211
+
212
+ The catalog, chaining gate, and interview / rapid / enterprise workflows live in [strategies/README.md](../strategies/README.md). Pick a strategy in USER.md or `xbrief/PROJECT-DEFINITION.xbrief.json`. Do not paste a strategy chapter into this page.
137
213
 
138
214
  ---
139
215
 
140
216
  ## Agent Configuration
141
217
 
142
- <!-- TODO: Cover AGENTS.md, skill routing, Warp Drive integration, and cloud agent dispatch -->
218
+ Authority on this journey is:
219
+
220
+ 1. `USER.md` Personal (always wins)
221
+ 2. `xbrief/PROJECT-DEFINITION.xbrief.json` (project)
222
+ 3. `AGENTS.md` (session routing; managed section is installer-owned)
223
+
224
+ Quality notes for `AGENTS.md` live in [good-agents-md.md](./good-agents-md.md). Process-critical skill pins live in [skill-pin-policy.md](./skill-pin-policy.md). Host-specific dispatch (OpenClaw, cloud spawn, Warp auto-approve) is **not** this tutorial. Setup already warns that Warp auto-approve can silently answer interview questions.
143
225
 
144
226
  **OpenClaw:** If your agent host is OpenClaw (persistent-memory agents, Control UI, `sessions_spawn`), read [openclaw-agent-host.md](./openclaw-agent-host.md) for the host mental model, executable babysit path (installed skills), and the epic babysit → `sessions_spawn` Approach 1 expectation. Skill gate text remains in `deft-directive-review-cycle` / `deft-directive-swarm` — the host doc only points.
145
227
 
@@ -90,6 +90,8 @@ Flags:
90
90
  | `--xbrief-rel-path` | no | override path binding; default maps `pending/` → `active/` |
91
91
  | `--repo` | no | `owner/name` seed for preimage `approvedRepos` (same source as `issue:emit`) |
92
92
 
93
+ Those two record kinds are **tracked provenance**, not local cache. Canonical `deft init` / `deft update` gitignore must not ignore the `.deft/approved-scope/` directory. Crash-journal, lock, and `.next` sidecars in that directory stay ignored. `git add` of the two record files must work without `-f`. Leftover directory ignore lines (both slash spellings) are healed off on update.
94
+
93
95
  Commit **both** `.deft/approved-scope/<plan-id>.json` and `<plan-id>.intent.json` on the **merge base** (or a prior PR) before the implementation PR activates or expands the scoped xBRIEF. Read the preimage before you commit — that file is the approved intent.
94
96
 
95
97
  ## Three layers (do not mix)
package/main.md CHANGED
@@ -10,7 +10,7 @@ Foundational guidelines for AI agent behavior in the Deft framework.
10
10
 
11
11
  Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
12
12
 
13
- **⚠️ Rule Precedence**: USER.md has two sections: `Personal` (always wins — name, custom rules) and `Defaults` (fallback — strategy, coverage, languages; PROJECT-DEFINITION.vbrief.json overrides these). (Override path via `DEFT_USER_PATH` env var; )
13
+ **⚠️ Rule Precedence**: USER.md has two sections: `Personal` (always wins — name, custom rules) and `Defaults` (fallback — strategy, coverage, languages; PROJECT-DEFINITION.xbrief.json overrides these). (Override path via `DEFT_USER_PATH` env var; )
14
14
 
15
15
  **📋 Lazy Loading**: See `npx deft packs:slice skills list` (Skills Index; `REFERENCES.md` is maintainer-only and does not ship) for guidance on when to load which files.
16
16
 
@@ -26,7 +26,7 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
26
26
  - `main.md` - General AI behavior (this document)
27
27
  - [coding/coding.md](./coding/coding.md) - Software development guidelines
28
28
  - `~/.config/deft/USER.md` - Personal preferences (highest precedence)
29
- - `./vbrief/PROJECT-DEFINITION.vbrief.json` - Project identity gestalt and scope registry
29
+ - `./xbrief/PROJECT-DEFINITION.xbrief.json` - Project identity gestalt and scope registry
30
30
 
31
31
  **Coding-Specific:**
32
32
  - Languages: [languages/cpp.md](./languages/cpp.md), [languages/go.md](./languages/go.md), [languages/officejs.md](./languages/officejs.md), [languages/python.md](./languages/python.md), [languages/typescript.md](./languages/typescript.md), [languages/vba.md](./languages/vba.md)
@@ -191,21 +191,21 @@ Source material: AI Agent Traps paper (`docs/ssrn-6372438.pdf`, Franklin et al.,
191
191
 
192
192
  Propagation: the canonical orchestrator preamble at [templates/agent-prompt-preamble.md](./templates/agent-prompt-preamble.md) carries the same rule so dispatched workers inherit the behavior. This is the same class as the approval-fatigue defense above (`## Agent Trap Defenses`) applied to a different surface -- "you cancelled" is a buried mis-attribution that the rule corrects with the same fail-loud / surface-the-anomaly discipline.
193
193
 
194
- ## vBRIEF Persistence
194
+ ## xBRIEF Persistence
195
195
 
196
- - ! All vBRIEF files MUST be stored in `./vbrief/` or its lifecycle subfolders — never in workspace root
197
- - ! Use `PROJECT-DEFINITION.vbrief.json` (singular) as the project identity gestalt — narratives for identity, items as scope registry
198
- - ! Use `plan.vbrief.json` (singular) for session-level tactical plans and progress tracking
199
- - ! Use `continue.vbrief.json` (singular) for interruption recovery checkpoints
200
- - ! Specifications are written as `specification.vbrief.json`, then rendered to `.md`
201
- - ! Scope vBRIEFs live in lifecycle folders: `proposed/`, `pending/`, `active/`, `completed/`, `cancelled/`
202
- - ! Scope vBRIEF filenames MUST follow: `YYYY-MM-DD-descriptive-slug.vbrief.json` (slug rules: [`conventions/vbrief-filenames.md`](./conventions/vbrief-filenames.md))
203
- - ! Playbooks use `playbook-{name}.vbrief.json` (named, not ULID-suffixed)
196
+ - ! All xBRIEF files MUST be stored in `./xbrief/` or its lifecycle subfolders — never in workspace root
197
+ - ! Use `PROJECT-DEFINITION.xbrief.json` (singular) as the project identity gestalt — narratives for identity, items as scope registry
198
+ - ! Use `plan.xbrief.json` (singular) for session-level tactical plans and progress tracking
199
+ - ! Use `continue.xbrief.json` (singular) for interruption recovery checkpoints
200
+ - ! Specifications are written as `specification.xbrief.json`, then rendered to `.md`
201
+ - ! Scope xBRIEFs live in lifecycle folders: `proposed/`, `pending/`, `active/`, `completed/`, `cancelled/`
202
+ - ! Scope xBRIEF filenames MUST follow: `YYYY-MM-DD-descriptive-slug.xbrief.json` (slug rules: [`conventions/vbrief-filenames.md`](./conventions/vbrief-filenames.md))
203
+ - ! Playbooks use `playbook-{name}.xbrief.json` (named, not ULID-suffixed)
204
204
  - ! Completed xBRIEFs are evidence of what was built — full standing as a record of *what is*, zero authority over *what to build next* (#3383). The current contract is the active xBRIEF plus the human operator's live instruction. Both halves are required.
205
205
  - ⊗ Use ULID-suffixed filenames for plan, todo, or continue files
206
- - ⊗ Place vBRIEF files at workspace root
207
- - ⊗ Write `SPECIFICATION.md` directly — it MUST be generated from `specification.vbrief.json`
208
- - ⊗ Move scope vBRIEFs between lifecycle folders without updating `plan.status`
206
+ - ⊗ Place xBRIEF files at workspace root
207
+ - ⊗ Write `SPECIFICATION.md` directly — it MUST be generated from `specification.xbrief.json`
208
+ - ⊗ Move scope xBRIEFs between lifecycle folders without updating `plan.status`
209
209
  - ⊗ Treat a completed xBRIEF as the next-build contract, or let it override the active story or the live human instruction
210
210
 
211
211
  ### Schema version: v0.8 (canonical write)
@@ -230,10 +230,10 @@ Projects that pre-date v0.20 (pre-vBRIEF-centric model) must migrate on a **pinn
230
230
 
231
231
  A consumer project is **pre-cutover** if ANY of these hold:
232
232
 
233
- - `SPECIFICATION.md` exists at the project root and is neither a deprecation redirect nor a current generated spec export. A current generated spec export contains `<!-- Purpose: rendered specification -->` and `<!-- Source of truth: vbrief/specification.vbrief.json -->`, and `vbrief/specification.vbrief.json` plus all five lifecycle folders exist.
233
+ - `SPECIFICATION.md` exists at the project root and is neither a deprecation redirect nor a current generated spec export. A current generated spec export contains `<!-- Purpose: rendered specification -->` and a layout-resolved `<!-- Source of truth: ... -->` line for the specification artifact (`xbrief/specification.xbrief.json` on a migrated tree), and that artifact plus all five lifecycle folders exist.
234
234
  - `PROJECT.md` exists at the project root and is not a deprecation redirect (`<!-- deft:deprecated-redirect -->` or `<!-- Purpose: deprecation redirect -->`)
235
- - `vbrief/` exists but one or more of the five lifecycle subfolders (`proposed/`, `pending/`, `active/`, `completed/`, `cancelled/`) is missing
236
- - `vbrief/PROJECT-DEFINITION.vbrief.json` is absent on a project that otherwise looks set up
235
+ - `xbrief/` exists but one or more of the five lifecycle subfolders (`proposed/`, `pending/`, `active/`, `completed/`, `cancelled/`) is missing
236
+ - `xbrief/PROJECT-DEFINITION.xbrief.json` is absent on a project that otherwise looks set up
237
237
 
238
238
  The executable detection helper is `task migrate:preflight`. The full agent-facing flow lives in [QUICK-START.md](./QUICK-START.md) Step 2 and in [skills/deft-directive-setup/SKILL.md](./skills/deft-directive-setup/SKILL.md) (Pre-Cutover Detection Guard).
239
239
 
@@ -275,7 +275,7 @@ After migration completes, upgrade to current npm per [UPGRADING.md](./UPGRADING
275
275
 
276
276
  ### What migration produces
277
277
 
278
- The migrator replaces `SPECIFICATION.md` and `PROJECT.md` with deprecation-redirect stubs (both carry the `<!-- deft:deprecated-redirect -->` sentinel) and writes:
278
+ **Legacy (frozen v0.59.0 `task migrate:vbrief` only — not a current write path; do not reverse #2907).** The migrator replaces `SPECIFICATION.md` and `PROJECT.md` with deprecation-redirect stubs (both carry the `<!-- deft:deprecated-redirect -->` sentinel) and writes:
279
279
 
280
280
  - `vbrief/PROJECT-DEFINITION.vbrief.json` — project identity gestalt (narratives + items registry)
281
281
  - `vbrief/specification.vbrief.json` — design narratives and requirements
@@ -366,18 +366,18 @@ See [commands.md](./commands.md) for full workflow details.
366
366
  ### Session
367
367
 
368
368
  - `/deft:continue` — Resume from continue checkpoint ([resilience/continue-here.md](./resilience/continue-here.md))
369
- - `/deft:checkpoint` — Save session state to `./vbrief/continue.vbrief.json`
369
+ - `/deft:checkpoint` — Save session state to `./xbrief/continue.xbrief.json`
370
370
 
371
371
  ## Context Awareness
372
372
 
373
373
  **Project Context:**
374
- - ! Check `./vbrief/PROJECT-DEFINITION.vbrief.json` (in your consumer project) for project-specific rules and scope registry
374
+ - ! Check `./xbrief/PROJECT-DEFINITION.xbrief.json` (in your consumer project) for project-specific rules and scope registry
375
375
  - ! Follow project-specific patterns and conventions
376
376
  - ~ Note which rules/patterns are being applied
377
377
 
378
378
  **User Context:**
379
379
  - ! Respect `~/.config/deft/USER.md` Personal section (highest precedence)
380
- - ! For project-scoped settings, PROJECT-DEFINITION.vbrief.json overrides USER.md Defaults
380
+ - ! For project-scoped settings, PROJECT-DEFINITION.xbrief.json overrides USER.md Defaults
381
381
  - ! Remember user's maintained projects and their purposes
382
382
  - ~ Adapt communication style to user's expertise level
383
383
 
@@ -389,4 +389,4 @@ See [commands.md](./commands.md) for full workflow details.
389
389
 
390
390
  **Context Engineering:**
391
391
  - ~ See [context/context.md](./context/context.md) for strategies on managing context budget
392
- - ~ Use vBRIEF ([vbrief.org](https://vbrief.org)) for structured task plans, scratchpads, and checkpoints
392
+ - ~ Use xBRIEF for structured task plans, scratchpads, and checkpoints
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftai/directive-content",
3
- "version": "0.110.0",
3
+ "version": "0.112.0",
4
4
  "deftConsumerDeposit": true,
5
5
  "description": "Shippable Directive framework content in the consumer .deft/core/ layout (C1 flatten), plus the engine surfaces (.githooks/, Taskfile.yml, tasks/) the deposit wires. Python-free per #2022 Phase 3. Refs #11, #1669, #1967.",
6
6
  "license": "MIT",
@@ -3839,7 +3839,7 @@
3839
3839
  "id": "agents-029",
3840
3840
  "tier": "MUST",
3841
3841
  "domain": "agents",
3842
- "text": "**Worker-owns-lifecycle (Gap C):** When dispatching an implementation worker, the envelope MUST declare `stop-at: pr-open` OR `drive-to: merge-ready` (default for story work). Workers scoped `drive-to: merge-ready` own PR + review cycle + fix batches through merge-ready as ONE unit of work \u2014 they spawn their own review poller per review-cycle monitoring tiers; the orchestrator MUST NOT hand back at PR-open and re-dispatch separate leaf agents for review/fixes.",
3842
+ "text": "**Worker-owns-lifecycle (Gap C):** When dispatching an implementation worker, the envelope MUST declare `stop-at: pr-open` OR `drive-to: merge-ready` (default for story work). Workers scoped `drive-to: merge-ready` own PR + review cycle + fix batches through merge-ready as ONE unit of work \u2014 following review-cycle monitoring tiers (Grok Build / Cursor / Claude Code leaves that cannot nest block on `pr:watch` in-process and MUST NOT spawn a child poller) (#4130); the orchestrator MUST NOT hand back at PR-open and re-dispatch separate leaf agents for review/fixes.",
3843
3843
  "path": "AGENTS.md",
3844
3844
  "body": null
3845
3845
  },