@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.
- package/QUICK-START.md +16 -14
- package/SKILL.md +13 -13
- package/Taskfile.yml +20 -15
- package/UPGRADING.md +64 -24
- package/commands.md +20 -18
- package/contracts/design-critique.md +36 -13
- package/conventions/machine-generated-banner.md +9 -9
- package/conventions/rule-ownership.json +3 -3
- package/docs/SUPPORT.md +43 -0
- package/docs/capabilities.md +110 -0
- package/docs/capability-overlay.json +197 -0
- package/docs/getting-started.md +131 -49
- package/docs/scope-provenance.md +2 -0
- package/main.md +22 -22
- package/package.json +1 -1
- package/packs/rules/rules-pack-0.1.json +1 -1
- package/packs/skills/skills-pack-0.1.json +9 -7
- package/scm/github.md +2 -0
- package/skills/deft-directive-design-critique/SKILL.md +10 -4
- package/skills/deft-directive-release/SKILL.md +22 -17
- package/skills/deft-directive-review-cycle/SKILL.md +52 -15
- package/skills/deft-directive-swarm/SKILL.md +8 -4
- package/skills/deft-directive-swarm/references/core-ops.md +1 -0
- package/skills/deft-directive-swarm/references/core-phase-0.md +2 -1
- package/skills/deft-directive-swarm/references/core-phase-3.md +8 -5
- package/skills/deft-directive-swarm/references/host-claude-code.md +3 -2
- package/skills/deft-directive-swarm/references/host-grok-build.md +19 -3
- package/skills/deft-directive-swarm/references/host-grokbot.md +151 -0
- package/tasks/docs.yml +19 -0
- package/tasks/migrate.yml +3 -1
- package/tasks/policy.yml +2 -2
- package/tasks/scm.yml +12 -1
- package/tasks/scope.yml +16 -25
- package/tasks/triage-actions.yml +3 -4
- package/tasks/triage-bootstrap.yml +2 -2
- package/tasks/triage-bulk.yml +6 -7
- package/tasks/triage-classify.yml +2 -2
- package/tasks/triage-queue.yml +2 -2
- package/tasks/triage-reconcile.yml +2 -2
- package/tasks/triage-scope-drift.yml +2 -2
- package/tasks/triage-scope.yml +2 -2
- package/tasks/triage-smoketest.yml +3 -3
- package/tasks/triage-subscribe.yml +2 -2
- package/tasks/triage-summary.yml +2 -2
- package/tasks/triage-welcome.yml +2 -2
- package/tasks/verify.yml +30 -1
- package/templates/PULL_REQUEST_TEMPLATE.md +12 -0
- package/templates/agent-prompt-preamble.md +6 -3
- package/templates/agents-entry.md +5 -5
- package/templates/design-critique-brief.md +2 -0
package/docs/getting-started.md
CHANGED
|
@@ -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
|
|
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**:
|
|
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
|
-
|
|
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
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
99
|
+
**Success:** `.deft/core/` and `AGENTS.md` exist. **Recovery:** `directive doctor` (one `Next command:`).
|
|
85
100
|
|
|
86
|
-
|
|
101
|
+
### 3. Doctor
|
|
87
102
|
|
|
88
103
|
```bash
|
|
89
|
-
|
|
104
|
+
directive doctor
|
|
90
105
|
```
|
|
91
106
|
|
|
92
|
-
|
|
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
|
-
|
|
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
|
-
|
|
111
|
+
### 4. USER.md and project definition
|
|
101
112
|
|
|
102
|
-
|
|
113
|
+
User preferences live outside the repo:
|
|
103
114
|
|
|
104
|
-
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
166
|
+
### 8. Story-ready and preflight
|
|
117
167
|
|
|
118
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
177
|
+
### 9. First check (terminal verb)
|
|
127
178
|
|
|
128
|
-
|
|
179
|
+
```bash
|
|
180
|
+
deft check
|
|
181
|
+
```
|
|
129
182
|
|
|
130
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
package/docs/scope-provenance.md
CHANGED
|
@@ -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.
|
|
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
|
-
- `./
|
|
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
|
-
##
|
|
194
|
+
## xBRIEF Persistence
|
|
195
195
|
|
|
196
|
-
- ! All
|
|
197
|
-
- ! Use `PROJECT-DEFINITION.
|
|
198
|
-
- ! Use `plan.
|
|
199
|
-
- ! Use `continue.
|
|
200
|
-
- ! Specifications are written as `specification.
|
|
201
|
-
- ! Scope
|
|
202
|
-
- ! Scope
|
|
203
|
-
- ! Playbooks use `playbook-{name}.
|
|
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
|
|
207
|
-
- ⊗ Write `SPECIFICATION.md` directly — it MUST be generated from `specification.
|
|
208
|
-
- ⊗ Move scope
|
|
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:
|
|
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
|
-
- `
|
|
236
|
-
- `
|
|
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 `./
|
|
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 `./
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
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
|
},
|