@deftai/directive-content 0.109.1 → 0.111.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/.agents/skills/deft-directive-triage/SKILL.md +3 -3
- package/SKILL.md +13 -13
- package/Taskfile.yml +24 -16
- package/commands.md +15 -13
- package/contracts/design-critique.md +56 -10
- package/contracts/path-write-fence.md +27 -6
- package/conventions/machine-generated-banner.md +9 -9
- package/conventions/rule-ownership.json +3 -3
- package/docs/consumer-issue-label-kit.md +6 -19
- package/docs/getting-started.md +1 -1
- package/docs/grok-build-subscription-setup.md +146 -0
- package/docs/scope-provenance.md +28 -0
- package/docs/test-boundary.md +3 -1
- 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 +30 -30
- package/scm/github.md +1 -1
- package/skills/deft-directive-design-critique/SKILL.md +7 -3
- package/skills/deft-directive-design-critique/references/motion-shape.md +1 -1
- package/skills/deft-directive-portfolio-priority/SKILL.md +2 -2
- package/skills/deft-directive-refinement/SKILL.md +3 -3
- package/skills/deft-directive-release/SKILL.md +22 -17
- package/skills/deft-directive-review-cycle/SKILL.md +45 -12
- package/skills/deft-directive-swarm/references/core-phase-0.md +2 -1
- package/skills/deft-directive-swarm/references/core-phase-3.md +1 -1
- package/skills/deft-directive-swarm/references/host-grok-build.md +17 -1
- package/skills/deft-directive-triage/SKILL.md +13 -115
- package/tasks/policy.yml +2 -2
- 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 +13 -3
- 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 +14 -1
- package/templates/agent-prompt-preamble.md +4 -1
- package/templates/agents-entry.md +7 -7
- package/templates/design-critique-brief.md +5 -0
|
@@ -10,7 +10,7 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
|
10
10
|
## Why
|
|
11
11
|
|
|
12
12
|
Before this contract, deft had four machine-managed file writers
|
|
13
|
-
(`task migrate:vbrief` deprecation redirects, `task spec:render`,
|
|
13
|
+
(frozen `task migrate:vbrief` deprecation redirects (v0.59.0; historical), `task spec:render`,
|
|
14
14
|
`task prd:render`, `task roadmap:render`) and each used a different
|
|
15
15
|
(or no) banner convention. Downstream heuristics that distinguish
|
|
16
16
|
"is this file user-customized" from "is this machine-managed" were
|
|
@@ -34,7 +34,7 @@ of the file:
|
|
|
34
34
|
- `{purpose}` — one of the enumerated per-writer purposes below; fixed
|
|
35
35
|
string values so downstream detectors can match on a stable token.
|
|
36
36
|
- `{source}` — the source-of-truth path the writer consumed
|
|
37
|
-
(typically `
|
|
37
|
+
(typically `xbrief/specification.xbrief.json`), or `n/a` when the
|
|
38
38
|
writer has no single source-of-truth file (e.g. the migrator
|
|
39
39
|
deprecation redirect, which is driven by the migration flow).
|
|
40
40
|
- `{command}` — the canonical `task *` invocation that regenerates
|
|
@@ -49,10 +49,10 @@ of the file:
|
|
|
49
49
|
The `Purpose:` value is a small fixed enum so detectors can match on a
|
|
50
50
|
stable token. Writers MUST use exactly one of these values:
|
|
51
51
|
|
|
52
|
-
- `rendered specification` -- `
|
|
53
|
-
- `rendered PRD` -- `
|
|
54
|
-
- `rendered roadmap` -- `
|
|
55
|
-
- `deprecation redirect` -- `
|
|
52
|
+
- `rendered specification` -- `task spec:render` -> `SPECIFICATION.md`
|
|
53
|
+
- `rendered PRD` -- `task prd:render` -> `PRD.md`
|
|
54
|
+
- `rendered roadmap` -- `task roadmap:render` -> `ROADMAP.md`
|
|
55
|
+
- `deprecation redirect` -- frozen `task migrate:vbrief` (v0.59.0; historical)
|
|
56
56
|
-> replaced `SPECIFICATION.md` / `PROJECT.md`
|
|
57
57
|
|
|
58
58
|
? Future render tasks added under `tasks/` MUST extend this list before
|
|
@@ -61,7 +61,7 @@ contract violation.
|
|
|
61
61
|
|
|
62
62
|
## Detection heuristic (for user-customization guards)
|
|
63
63
|
|
|
64
|
-
! `
|
|
64
|
+
! Frozen `task migrate:vbrief` (v0.59.0) `_is_user_customized()` consults the
|
|
65
65
|
`_SPEC_AUTO_MARKERS` and `_PROJECT_AUTO_MARKERS` tuples. Both MUST
|
|
66
66
|
include `"AUTO-GENERATED by"` and the FULL HTML-comment prefix
|
|
67
67
|
`"<!-- Purpose:"` so any file carrying this banner is recognised as
|
|
@@ -83,13 +83,13 @@ incorrectly re-flagged as pre-cutover on rc.3.
|
|
|
83
83
|
```
|
|
84
84
|
<!-- AUTO-GENERATED by task spec:render -- DO NOT EDIT MANUALLY -->
|
|
85
85
|
<!-- Purpose: rendered specification -->
|
|
86
|
-
<!-- Source of truth:
|
|
86
|
+
<!-- Source of truth: xbrief/specification.xbrief.json -->
|
|
87
87
|
<!-- Regenerate with: task spec:render -->
|
|
88
88
|
# My Project
|
|
89
89
|
...
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
## Example (migrator deprecation redirect)
|
|
92
|
+
## Example (frozen migrator deprecation redirect, v0.59.0; historical)
|
|
93
93
|
|
|
94
94
|
```
|
|
95
95
|
<!-- AUTO-GENERATED by task migrate:vbrief -- DO NOT EDIT MANUALLY -->
|
|
@@ -252,11 +252,11 @@
|
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
254
|
"id": "main-vbrief-persistence",
|
|
255
|
-
"text": "All
|
|
255
|
+
"text": "All xBRIEF files MUST be stored in `./xbrief/` or its lifecycle subfolders",
|
|
256
256
|
"owner_file": "main.md",
|
|
257
|
-
"owner_section": "##
|
|
257
|
+
"owner_section": "## xBRIEF Persistence",
|
|
258
258
|
"authority": "MUST",
|
|
259
|
-
"last_verified": "2026-
|
|
259
|
+
"last_verified": "2026-09-02"
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
"id": "agents-deft-alignment-confirmation",
|
|
@@ -109,10 +109,9 @@ https://github.com/deftai/directive/blob/master/content/docs/consumer-issue-labe
|
|
|
109
109
|
- epic (rare multi-ship product root)
|
|
110
110
|
- status:tracker, status:child
|
|
111
111
|
|
|
112
|
-
## Mirror (
|
|
113
|
-
- triaged
|
|
114
|
-
-
|
|
115
|
-
(only if plan.policy.triageLabelMirror.actionLabels maps them)
|
|
112
|
+
## Mirror (withdrawn #4070)
|
|
113
|
+
- `triage:classify -- --mirror` is withdrawn. Do not stamp `triaged` / `triage:*` from classify.
|
|
114
|
+
- Replacement sieve is #4071. Leave these names unused until the replacement recuts the catalog.
|
|
116
115
|
|
|
117
116
|
## Optional project routing (only if used)
|
|
118
117
|
- security (advisory security review routing; not a merge gate)
|
|
@@ -126,16 +125,7 @@ Do not invent labels outside this file. Prefer existing names over twins.
|
|
|
126
125
|
|
|
127
126
|
## Optional: label mirror appendix
|
|
128
127
|
|
|
129
|
-
After SCM label mirror Waves 1–2 (#1423 / #3125):
|
|
130
|
-
|
|
131
|
-
| Topic | Guidance |
|
|
132
|
-
|-------|----------|
|
|
133
|
-
| Defaults | Mirror is available; on match it stamps **`triaged`** (idempotency). Action chips only when configured. |
|
|
134
|
-
| Dry-run | `deft triage:classify -- --mirror` (open-only default). Review the digest before `--apply`. |
|
|
135
|
-
| Apply | `deft triage:classify -- --mirror --apply` writes labels in batches; re-run is a no-op for already-`triaged` issues. |
|
|
136
|
-
| More matches | Add rules under `plan.policy.triageAutoClassify` in `xbrief/PROJECT-DEFINITION.xbrief.json`. |
|
|
137
|
-
| Richer chips | Set `plan.policy.triageLabelMirror.actionLabels` **and** create those GitHub labels first. |
|
|
138
|
-
| Accept path | ⊗ Never auto-`triage:accept` / never auto-write `proposed/` from mirror. Accept stays an operator decision. |
|
|
128
|
+
After #4070, SCM label mirror Waves 1–2 (#1423 / #3125) are unusable. `deft triage:classify -- --mirror` (dry-run and `--apply`) fail closed. Strip leftover chips with `deft triage:strip-withdrawn-chips`. Replacement sieve is #4071. #2611 stays open. Accept stays an operator decision (`triage:accept` / ingest unchanged).
|
|
139
129
|
|
|
140
130
|
Minimal policy sketch (clone and edit; broader triage field examples live in the framework repo at [`docs/example-project-definition.md`](https://github.com/deftai/directive/blob/master/docs/example-project-definition.md) — not deposited under `.deft/core/`):
|
|
141
131
|
|
|
@@ -166,13 +156,10 @@ Minimal policy sketch (clone and edit; broader triage field examples live in the
|
|
|
166
156
|
}
|
|
167
157
|
```
|
|
168
158
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
Validate with:
|
|
159
|
+
`triage:classify -- --mirror` is withdrawn (#4070). Do not add `triageLabelMirror` to stamp `triaged` / `triage:*`. Validate remaining classify rules with:
|
|
172
160
|
|
|
173
161
|
```bash
|
|
174
162
|
deft triage:classify -- --validate
|
|
175
|
-
deft triage:classify -- --mirror
|
|
176
163
|
```
|
|
177
164
|
|
|
178
165
|
---
|
|
@@ -221,5 +208,5 @@ Framework source / GitHub (browse when not in a deposit):
|
|
|
221
208
|
## Related reading
|
|
222
209
|
|
|
223
210
|
- Maintainer taxonomy (do not import wholesale): [`.github/ISSUE_LABELS.md`](https://github.com/deftai/directive/blob/master/.github/ISSUE_LABELS.md) (#2609)
|
|
224
|
-
- Label mirror
|
|
211
|
+
- Label mirror withdrawn: deposit `.deft/core/commands.md` (or framework `content/commands.md`) / #4070 (do not run `deft triage:classify -- --mirror`)
|
|
225
212
|
- Example PROJECT-DEFINITION triage fields: [`docs/example-project-definition.md`](https://github.com/deftai/directive/blob/master/docs/example-project-definition.md) (#1186; framework repo only, not deposited)
|
package/docs/getting-started.md
CHANGED
|
@@ -79,7 +79,7 @@ checks tools without rewriting consumer-managed files.
|
|
|
79
79
|
|
|
80
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"**.
|
|
81
81
|
|
|
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
|
|
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).
|
|
83
83
|
|
|
84
84
|
### Step 1 — Scoped first populate
|
|
85
85
|
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Grok Build subscription-only setup
|
|
2
|
+
|
|
3
|
+
Agent-facing playbook for a new maintainer. Paste this file (or issue [#4035](https://github.com/deftai/directive/issues/4035)) and say: follow this playbook. The human completes browser logins when the agent stops.
|
|
4
|
+
|
|
5
|
+
This is **host auth**, not Directive `session:start` and not product work in `deftai/directive`.
|
|
6
|
+
|
|
7
|
+
Legend (RFC2119): `!`=MUST, `~`=SHOULD, `⊗`=MUST NOT.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Goal
|
|
12
|
+
|
|
13
|
+
Grok Build is the parent on SuperGrok (`grok login` / grok.com). Claude Code and Codex run only through their CLIs on subscriptions. Console API keys may still exist at User scope for other tools. Grok must not use those keys.
|
|
14
|
+
|
|
15
|
+
## Target shape
|
|
16
|
+
|
|
17
|
+
Verified 2026-08-31 on win32 (Grok 4.6 parent). Org names differ per maintainer. The auth *methods* must match.
|
|
18
|
+
|
|
19
|
+
| Surface | Required auth | Must not use |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Grok Build parent | grok.com / `auth.x.ai` OIDC session (`grok login`) | `XAI_API_KEY`, `GROK_CODE_XAI_API_KEY`, Console BYOK `[model.*]` |
|
|
22
|
+
| Claude Code CLI | `claude.ai` team subscription (`claude auth login --claudeai`) | `ANTHROPIC_API_KEY` / `apiKeySource=ANTHROPIC_API_KEY` |
|
|
23
|
+
| Codex CLI | ChatGPT (`codex login status` → ChatGPT) | `OPENAI_API_KEY` |
|
|
24
|
+
|
|
25
|
+
Grok catalog (`grok models`) is only `grok-4.6` / `grok-4.5`. Default is `grok-4.6`.
|
|
26
|
+
|
|
27
|
+
User-scope `ANTHROPIC_API_KEY` and `OPENAI_API_KEY` may remain for non-Grok tools. Leave them set.
|
|
28
|
+
|
|
29
|
+
## Hard stops
|
|
30
|
+
|
|
31
|
+
The agent MUST NOT:
|
|
32
|
+
|
|
33
|
+
- implement product code while running this playbook
|
|
34
|
+
- unset User-scope or Machine-scope `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `XAI_API_KEY`
|
|
35
|
+
- run `claude logout`, `codex logout`, or `grok logout`
|
|
36
|
+
- add or restore BYOK `[model.*]` blocks in `~/.grok/config.toml` (opus / sonnet / fable / gpt-5.6 Console ids)
|
|
37
|
+
- print secret values (print only `set=$true` / `set=$false`)
|
|
38
|
+
- invent `~/.config/deft` on Windows (#2544)
|
|
39
|
+
|
|
40
|
+
Config is read at Grok session start. After any `config.toml` edit, start a **new** Grok session. Mid-session children will not pick up `shell_environment_policy`.
|
|
41
|
+
|
|
42
|
+
Close stdin on CLI spawns: Windows `cmd /c "… <nul"`; Unix `… </dev/null`.
|
|
43
|
+
|
|
44
|
+
## Playbook
|
|
45
|
+
|
|
46
|
+
### 1. Grok Build
|
|
47
|
+
|
|
48
|
+
Install the Grok CLI. Put it on PATH.
|
|
49
|
+
|
|
50
|
+
Human (browser): `grok login` (grok.com / SpaceXAI OAuth at `auth.x.ai`).
|
|
51
|
+
|
|
52
|
+
Confirm: `grok models` prints `You are logged in with grok.com.` and lists only `grok-4.6` / `grok-4.5`.
|
|
53
|
+
|
|
54
|
+
### 2. `~/.grok/config.toml`
|
|
55
|
+
|
|
56
|
+
Path: `~/.grok/config.toml` (Windows: `%USERPROFILE%\.grok\config.toml`).
|
|
57
|
+
|
|
58
|
+
Set:
|
|
59
|
+
|
|
60
|
+
```toml
|
|
61
|
+
[models]
|
|
62
|
+
default = "grok-4.6"
|
|
63
|
+
default_reasoning_effort = "high"
|
|
64
|
+
web_search = "grok-4.6"
|
|
65
|
+
|
|
66
|
+
# Grok Build must not meter Anthropic/OpenAI/xAI Console API.
|
|
67
|
+
# Claude/Codex go through their CLIs (subscription).
|
|
68
|
+
# User/Machine env keys stay for other tools; Grok shells do not inherit them.
|
|
69
|
+
[shell_environment_policy]
|
|
70
|
+
exclude = [
|
|
71
|
+
"ANTHROPIC_API_KEY",
|
|
72
|
+
"OPENAI_API_KEY",
|
|
73
|
+
"XAI_API_KEY",
|
|
74
|
+
"GROK_CODE_XAI_API_KEY",
|
|
75
|
+
]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Remove every `[model.<id>]` table that points at Anthropic or OpenAI Console (typical leftovers: `opus-5-high-fast`, `sonnet-5`, `fable-5`, `gpt-5.6-*`). Do not add new ones.
|
|
79
|
+
|
|
80
|
+
Do not copy unrelated `[ui]` personal settings from another maintainer.
|
|
81
|
+
|
|
82
|
+
Then start a **new** Grok session before the probes.
|
|
83
|
+
|
|
84
|
+
### 3. Claude Code CLI
|
|
85
|
+
|
|
86
|
+
Install current Claude Code. On Windows a working layout is `~\.local\bin\claude.exe` plus shims (`~\.local\bin` and `%AppData%\npm` on PATH).
|
|
87
|
+
|
|
88
|
+
Human (browser): `claude auth login --claudeai`. Use the team org the operator names.
|
|
89
|
+
|
|
90
|
+
Confirm: `claude auth status` shows `loggedIn=true`, `authMethod=claude.ai`, `subscriptionType=team`, and **no** `apiKeySource=ANTHROPIC_API_KEY`.
|
|
91
|
+
|
|
92
|
+
### 4. Codex CLI
|
|
93
|
+
|
|
94
|
+
Install Codex. On Windows the hashed binary may live under `%LOCALAPPDATA%\OpenAI\Codex\bin\`; keep a `codex` shim on PATH.
|
|
95
|
+
|
|
96
|
+
Human (browser): `codex login` (ChatGPT).
|
|
97
|
+
|
|
98
|
+
Confirm: `codex login status` prints `Logged in using ChatGPT`.
|
|
99
|
+
|
|
100
|
+
### 5. PATH
|
|
101
|
+
|
|
102
|
+
User PATH includes `~/.local/bin` (Windows: `%USERPROFILE%\.local\bin`) so Grok children find `claude` and `codex` without extra env surgery.
|
|
103
|
+
|
|
104
|
+
## Verification (report pass/fail with evidence)
|
|
105
|
+
|
|
106
|
+
Run from a **Grok** `run_terminal_command` child after the new session. Close stdin. Never print key values.
|
|
107
|
+
|
|
108
|
+
1. **Catalog.** `grok models` → only `grok-4.6` / `grok-4.5`. Fail if opus / sonnet / fable / gpt-5.6 appear in *this* catalog (Codex may still say `gpt-5.6-*` as *its* ChatGPT model; that is not Grok BYOK).
|
|
109
|
+
|
|
110
|
+
2. **Env policy.** This process may still have User keys. Print only `set=$true/$false` for User / Machine / Process scope of `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `XAI_API_KEY`, `GROK_CODE_XAI_API_KEY`. The Grok child Process-scope for `ANTHROPIC_API_KEY` and `OPENAI_API_KEY` MUST be `$false`. Fail if the child still has them — policy did not apply (old session, or config not loaded). Do not delete User keys.
|
|
111
|
+
|
|
112
|
+
3. **Claude from Grok, no extra unset.** `claude auth status` as above. Then:
|
|
113
|
+
|
|
114
|
+
`claude -p "Do not use tools. Reply with the single word: pong" --output-format text`
|
|
115
|
+
|
|
116
|
+
Fail on an API-key warning or not-logged-in.
|
|
117
|
+
|
|
118
|
+
4. **Codex from Grok.** `codex login status` → ChatGPT. Then:
|
|
119
|
+
|
|
120
|
+
`codex exec --ephemeral --skip-git-repo-check --sandbox read-only "Do not use tools. Reply with the single word: pong"`
|
|
121
|
+
|
|
122
|
+
Fail if it demands `OPENAI_API_KEY`.
|
|
123
|
+
|
|
124
|
+
5. **Grok itself.** The session model is `grok-4.6` (or `grok-4.5`), not a Claude id. `XAI_API_KEY` unset. Auth is grok.com session (`grok models` / `~/.grok/auth.json` `auth_mode=oidc` at `auth.x.ai`). Do not dump tokens from `auth.json`.
|
|
125
|
+
|
|
126
|
+
**Pass.** All five true. Grok Build is subscription-only: xAI login + Claude team + Codex ChatGPT. Keys may remain in User env for non-Grok tools.
|
|
127
|
+
|
|
128
|
+
**Fail.** Child shells still inherit `ANTHROPIC_API_KEY` (old session / policy not loaded) or Claude reports `apiKeySource=ANTHROPIC_API_KEY`. Do not delete User keys. Report and stop.
|
|
129
|
+
|
|
130
|
+
## Design-critique dispatch
|
|
131
|
+
|
|
132
|
+
When a Grok Build parent runs an N≥3 design-critique panel, this playbook's CLIs are the other-family launchers. Probe `claude` / `codex` on PATH and CLI-spawn those seats. Paste-ready is the fallback when a CLI is absent, not the default recovery. Normative stop: [`contracts/design-critique.md`](../contracts/design-critique.md) Envelope and ceiling (#4067).
|
|
133
|
+
|
|
134
|
+
## Out of scope
|
|
135
|
+
|
|
136
|
+
- [#4027](https://github.com/deftai/directive/issues/4027) — N≥3 design-critique lean-timing. This playbook is host auth. Do not launch a 3-panel unless the operator asks.
|
|
137
|
+
- [#2520](https://github.com/deftai/directive/issues/2520) — multi-engine least-privilege *pattern*. Related theme, different artifact.
|
|
138
|
+
- Unsetting User keys that other tools still need.
|
|
139
|
+
- Product code in `deftai/directive`.
|
|
140
|
+
|
|
141
|
+
## Related Grok docs (local, after install)
|
|
142
|
+
|
|
143
|
+
- `~/.grok/docs/user-guide/02-authentication.md` — grok.com session vs `XAI_API_KEY` fallback
|
|
144
|
+
- `~/.grok/docs/user-guide/05-configuration.md` — `config.toml` precedence
|
|
145
|
+
- `~/.grok/docs/user-guide/11-custom-models.md` — BYOK `[model.*]` (do not add these)
|
|
146
|
+
- `~/.grok/docs/user-guide/18-sandbox.md` — `[shell_environment_policy]`
|
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)
|
|
@@ -156,3 +158,29 @@ git add .deft/approved-scope/<plan-id>.json .deft/approved-scope/<plan-id>.inten
|
|
|
156
158
|
```
|
|
157
159
|
|
|
158
160
|
Editing the xBRIEF alone does not authorize new implementation paths.
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
## Cohort-created scope (operator mint at allocation) (#3874)
|
|
164
|
+
|
|
165
|
+
If a swarm cohort brief should declare `file_scope`, the operator who approved
|
|
166
|
+
the cohort mints the digest on a real TTY at allocation time and lands
|
|
167
|
+
`.deft/approved-scope/<plan-id>.json` on the merge base before workers activate.
|
|
168
|
+
|
|
169
|
+
- Allocation-context tokens (#1378) are **not** provenance.
|
|
170
|
+
- Swarm briefs are **not** exempt from this gate.
|
|
171
|
+
- `#3110` human-presence mint and merge-base layering are unchanged.
|
|
172
|
+
|
|
173
|
+
If the operator does not mint, omit `file_scope` when authoring the cohort brief.
|
|
174
|
+
Undeclared cohort briefs are then a deliberate outcome, not a post-failure
|
|
175
|
+
workaround. Do not undeclare a declared `file_scope` to pass the gate.
|
|
176
|
+
|
|
177
|
+
## Working-tree / untracked files
|
|
178
|
+
|
|
179
|
+
`verify:scope-provenance` unions:
|
|
180
|
+
|
|
181
|
+
1. `git diff --name-only <base>...HEAD`
|
|
182
|
+
2. `git diff --name-only HEAD`
|
|
183
|
+
3. `git ls-files --others --exclude-standard`
|
|
184
|
+
|
|
185
|
+
and lists on-disk `xbrief/active/` files. Presence in the working tree is what
|
|
186
|
+
matters. Committing or not committing the brief does not hide it from the gate.
|
package/docs/test-boundary.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Test / source boundary (`verify:test-boundary`)
|
|
2
2
|
|
|
3
|
-
Refs: #3145 · Related: #1310 forward-coverage, testing layout guidance
|
|
3
|
+
Refs: #3145 · Related: #1310 / #4009 forward-coverage, testing layout guidance
|
|
4
|
+
|
|
5
|
+
`verify:forward-coverage` reuses this policy for source-to-test correspondence. It does not add a second testRoots config.
|
|
4
6
|
|
|
5
7
|
## Problem
|
|
6
8
|
|
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.111.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
|
},
|