@deftai/directive-content 0.61.1 → 0.62.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-decompose/SKILL.md +9 -0
- package/.agents/skills/deft-directive-probe/SKILL.md +8 -0
- package/QUICK-START.md +12 -15
- package/Taskfile.yml +3 -0
- package/UPGRADING.md +89 -21
- package/docs/BROWNFIELD.md +7 -3
- package/package.json +1 -1
- package/packs/skills/skills-pack-0.1.json +5 -5
- package/skills/deft-directive-build/SKILL.md +3 -3
- package/skills/deft-directive-refinement/SKILL.md +2 -0
- package/skills/deft-directive-setup/SKILL.md +17 -48
- package/skills/deft-directive-sync/SKILL.md +4 -4
- package/skills/deft-directive-triage/SKILL.md +2 -0
- package/tasks/framework.yml +15 -19
- package/tasks/migrate.yml +5 -62
- package/tasks/umbrella.yml +30 -0
- package/templates/agent-prompt-preamble.md +14 -0
- package/templates/agents-entry.md +33 -24
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deft-directive-decompose
|
|
3
|
+
description: >-
|
|
4
|
+
Convert phase/epic scope vBRIEFs into swarm-ready story vBRIEFs before swarm
|
|
5
|
+
allocation. Use when the operator asks to decompose, split stories, or assess
|
|
6
|
+
swarm readiness.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Read and follow: skills/deft-directive-decompose/SKILL.md
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deft-directive-probe
|
|
3
|
+
description: >-
|
|
4
|
+
Adversarial one-question-per-turn plan stress-testing before vBRIEF or plan
|
|
5
|
+
artifacts. Use when the operator asks to run probe or stress-test a plan.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Read and follow: skills/deft-directive-probe/SKILL.md
|
package/QUICK-START.md
CHANGED
|
@@ -113,31 +113,28 @@ Pick exactly one case from Step 2 and follow its instructions. Do not mix cases.
|
|
|
113
113
|
|
|
114
114
|
### Case H — Pre-cutover migration (SPECIFICATION.md / PROJECT.md without sentinel)
|
|
115
115
|
|
|
116
|
-
1. Tell the user: "Your project uses the pre-v0.20 document model.
|
|
117
|
-
2. !
|
|
118
|
-
3.
|
|
119
|
-
4.
|
|
120
|
-
5.
|
|
121
|
-
6. See [./main.md](../main.md#migrating-from-pre-v020) for the full migration reference (what pre-cutover looks like, what the migrator produces, safety flags) and [docs/BROWNFIELD.md](./docs/BROWNFIELD.md) for the brownfield adoption guide.
|
|
122
|
-
7. After migration completes, re-run Step 2 of this QUICK-START — the project state has changed. Most likely you land in Case G (AGENTS.md still references old paths) or Case J.
|
|
123
|
-
8. When AGENTS.md is refreshed, ! instruct the user: **"Framework updated. Start a new agent session to pick up the changes. The current session has stale context."**
|
|
116
|
+
1. Tell the user: "Your project uses the pre-v0.20 document model. Current npm releases no longer ship in-product `task migrate:vbrief` (#2068). Follow [UPGRADING.md § Frozen pre-v0.20 document-model migration](./UPGRADING.md#frozen-pre-v020-document-model-migration-2068): pin framework **v0.59.0** (frozen Go installer or git tag), install Python 3.11+ and `uv`, run `task migrate:vbrief` once from that payload, then upgrade to current npm."
|
|
117
|
+
2. ! Run `task migrate:preflight` (or `task -t ./.deft/core/Taskfile.yml migrate:preflight`) to confirm pre-cutover state and print the frozen-release guidance. ⊗ Do NOT offer to run `task migrate:vbrief` from the current npm deposit — the migrator is not bundled.
|
|
118
|
+
3. See [./main.md](../main.md#migrating-from-pre-v020) for what pre-cutover looks like and what the migrator produces, and [docs/BROWNFIELD.md](./docs/BROWNFIELD.md) for the brownfield adoption guide.
|
|
119
|
+
4. After migration completes on v0.59.0 and the operator upgrades to current npm, re-run Step 2 of this QUICK-START — the project state has changed. Most likely you land in Case G (AGENTS.md still references old paths) or Case J.
|
|
120
|
+
5. When AGENTS.md is refreshed, ! instruct the user: **"Framework updated. Start a new agent session to pick up the changes. The current session has stale context."**
|
|
124
121
|
|
|
125
122
|
### Case G+H — Combined stale AGENTS.md + pre-cutover migration (big-jump, one session)
|
|
126
123
|
|
|
127
|
-
Reached only via the **Big-jump joint check** in 2b: the managed section in `../AGENTS.md` is stale (Case G) AND pre-v0.20 artifacts are present at `../` (Case H). This is the typical shape of a multi-version "big jump" that crossed both the AGENTS.md managed-section refresh and the pre-v0.20 document-model cutover.
|
|
124
|
+
Reached only via the **Big-jump joint check** in 2b: the managed section in `../AGENTS.md` is stale (Case G) AND pre-v0.20 artifacts are present at `../` (Case H). This is the typical shape of a multi-version "big jump" that crossed both the AGENTS.md managed-section refresh and the pre-v0.20 document-model cutover.
|
|
128
125
|
|
|
129
|
-
! Run the two remediations in this exact order — **AGENTS.md refresh first, migration second** — then emit a **single** restart instruction at the very end:
|
|
126
|
+
! Run the two remediations in this exact order — **AGENTS.md refresh first, frozen migration guidance second** — then emit a **single** restart instruction at the very end:
|
|
130
127
|
|
|
131
128
|
1. **Refresh AGENTS.md first (Case G work).** Perform Case G steps 1-4 verbatim: identify the managed section, append when the sentinel is absent or byte-replace it when present, and preserve everything outside the managed region. ⊗ Do NOT emit the Case G step-5 restart instruction here — the combined path defers the single restart to step 3.
|
|
132
|
-
2. **
|
|
133
|
-
3. **Single restart, exactly once.** Only after BOTH the refresh and the migration have completed, ! instruct the user EXACTLY ONCE: **"Framework updated and project migrated. Start a new agent session to pick up the changes. The current session has stale context."** ⊗ Do NOT emit a second restart instruction
|
|
129
|
+
2. **Surface frozen migration path second (Case H work).** Perform Case H steps 1-3 verbatim: explain the v0.59.0 pinned migrator path (#2068), run `task migrate:preflight`, and point at UPGRADING.md. The operator (or a machine with v0.59.0 deposited) runs `task migrate:vbrief` outside the current npm deposit. ⊗ Do NOT perform Case H steps 4-5 until migration has completed on the pinned release and the operator has upgraded to current npm.
|
|
130
|
+
3. **Single restart, exactly once.** Only after BOTH the refresh and the operator-confirmed migration + npm upgrade have completed, ! instruct the user EXACTLY ONCE: **"Framework updated and project migrated. Start a new agent session to pick up the changes. The current session has stale context."** ⊗ Do NOT emit a second restart instruction.
|
|
134
131
|
|
|
135
|
-
|
|
132
|
+
For the version-by-version context of a big jump, see the [big-jump triage entry point](./UPGRADING.md#big-jump-triage--multi-version-upgrades-start-here) in UPGRADING.md.
|
|
136
133
|
|
|
137
134
|
### Case I — Partial migration repair
|
|
138
135
|
|
|
139
|
-
1. Tell the user: "Your project has a partial vBRIEF layout. Missing lifecycle folders: <list the absent ones>.
|
|
140
|
-
2.
|
|
136
|
+
1. Tell the user: "Your project has a partial vBRIEF layout. Missing lifecycle folders: <list the absent ones>. Complete the layout via the frozen v0.59.0 migrator (see UPGRADING.md § Frozen pre-v0.20 document-model migration) or create the missing folders manually after migrating narratives."
|
|
137
|
+
2. Run `task migrate:preflight` to confirm state. If the operator has v0.59.0 deposited, they may run `task migrate:vbrief` there; otherwise point at the frozen path. Re-run Step 2 afterwards.
|
|
141
138
|
3. If the user declines, point them at [docs/BROWNFIELD.md](./docs/BROWNFIELD.md) §Troubleshooting and stop.
|
|
142
139
|
|
|
143
140
|
### Case J — Everything clean
|
package/Taskfile.yml
CHANGED
package/UPGRADING.md
CHANGED
|
@@ -10,24 +10,88 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
|
10
10
|
|
|
11
11
|
## Canonical upgrade — npm (v0.55.1+)
|
|
12
12
|
|
|
13
|
-
From v0.55.1 onwards `@deftai/directive` is published on npm. The canonical upgrade
|
|
13
|
+
From v0.55.1 onwards `@deftai/directive` is published on npm. The canonical consumer upgrade path is:
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
```
|
|
15
|
+
1. **Upgrade the global engine** (Node ≥ 20):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm i -g @deftai/directive@latest
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
2. **Refresh the project deposit** from your project root:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
deft update
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This re-copies the vendored `.deft/core/` payload and refreshes project-root `.githooks/` (#2049).
|
|
28
|
+
|
|
29
|
+
3. **Stamp npm provenance (one-time, idempotent):**
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
```bash
|
|
32
|
+
deft migrate
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Adds `managed_by: npm` to `.deft/core/VERSION` so doctor and future updates recognize the npm channel. Safe to re-run — when already hybrid, migrate is a no-op.
|
|
36
|
+
|
|
37
|
+
4. **Verify:**
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
deft doctor
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Start a **new agent session** after steps 2–3 so the refreshed AGENTS.md and skills load from a clean context.
|
|
44
|
+
|
|
45
|
+
### `deft migrate` vs pre-v0.20 document-model migration
|
|
46
|
+
|
|
47
|
+
These commands are unrelated — do not confuse them:
|
|
48
|
+
|
|
49
|
+
| Command | When to use | What it does |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| `deft migrate` / `directive migrate` | Canonical-vendored `.deft/core/` deposit after npm upgrade (#1941) | Stamps `managed_by: npm` into the install manifest. Idempotent; never downloads payload. |
|
|
52
|
+
| Pre-v0.20 document-model migration | Legacy authoritative `SPECIFICATION.md` / `PROJECT.md` only | **Not shipped on current npm releases (#2068).** Use the [frozen-release path](#frozen-pre-v020-document-model-migration-2068) below. |
|
|
53
|
+
|
|
54
|
+
### Frozen pre-v0.20 document-model migration (#2068)
|
|
55
|
+
|
|
56
|
+
Current `@deftai/directive` npm releases no longer ship `task migrate:vbrief` or `scripts/migrate_vbrief.py` on the consumer deposit path (#2022 Phase 3). If your project still uses the pre-v0.20 flat document model (authoritative root `SPECIFICATION.md` / `PROJECT.md` without vBRIEF lifecycle folders), migrate **once** on a pinned release that still bundles the Python migrator, then join the normal npm upgrade path.
|
|
57
|
+
|
|
58
|
+
**Applies when:** `deft doctor` reports `Pre-cutover: migration needed`, or `task migrate:preflight` exits non-zero with a `document-model` FAIL line.
|
|
59
|
+
|
|
60
|
+
**Pinned release:** `v0.59.0` (last release before the Python-free npm deposit; includes `scripts/migrate_vbrief.py`).
|
|
61
|
+
|
|
62
|
+
**Steps:**
|
|
63
|
+
|
|
64
|
+
1. Install **Python 3.11+** and **[uv](https://docs.astral.sh/uv/)** on the migration machine.
|
|
65
|
+
2. Deposit framework **v0.59.0** using one of:
|
|
66
|
+
- **Frozen Go installer** at [GitHub Releases tag v0.59.0](https://github.com/deftai/directive/releases/tag/v0.59.0) (layout migration + full source tarball under `.deft/core/`), or
|
|
67
|
+
- **Git submodule / clone:** `git checkout v0.59.0` in your framework checkout.
|
|
68
|
+
3. From the project root, preview then apply:
|
|
69
|
+
```bash
|
|
70
|
+
task migrate:preflight
|
|
71
|
+
task migrate:vbrief -- --dry-run
|
|
72
|
+
task migrate:vbrief
|
|
73
|
+
```
|
|
74
|
+
Fallback when the consumer Taskfile has no deft include: `task -t ./.deft/core/Taskfile.yml migrate:vbrief`.
|
|
75
|
+
4. Regenerate exports once: `task roadmap:render`, `task project:render`, and `task prd:render -- --force` when you maintain a `PRD.md`.
|
|
76
|
+
5. Upgrade to current npm: `npm i -g @deftai/directive@latest`, then `deft update`, `deft migrate`, `deft doctor`.
|
|
77
|
+
6. Start a **new agent session** so refreshed AGENTS.md and skills load from a clean context.
|
|
78
|
+
|
|
79
|
+
⊗ Run `npm i -g @deftai/directive@latest` / `deft update` on a project that still has authoritative pre-v0.20 root docs — the current deposit cannot run the migrator; follow the frozen path first.
|
|
80
|
+
|
|
81
|
+
See [docs/BROWNFIELD.md](./docs/BROWNFIELD.md) for what migration produces and how content is preserved.
|
|
20
82
|
|
|
21
83
|
### One-time migration from the Go installer (legacy → npm)
|
|
22
84
|
|
|
23
85
|
If your current install uses the frozen Go installer (`deft-install`), migrate once:
|
|
24
86
|
|
|
25
87
|
1. Install Node ≥ 20 if not already present.
|
|
26
|
-
2. Run `npm i -g @deftai/directive` to install from npm.
|
|
27
|
-
3. In your project, run `
|
|
28
|
-
4.
|
|
88
|
+
2. Run `npm i -g @deftai/directive@latest` to install the engine from npm.
|
|
89
|
+
3. In your project, run `deft update` to refresh `.deft/core/` and `.githooks/`.
|
|
90
|
+
4. Run `deft migrate` once to stamp npm provenance (idempotent).
|
|
91
|
+
5. Run `deft agents:refresh` if the AGENTS.md managed section is stale.
|
|
92
|
+
6. Verify with `deft doctor` — install integrity confirms the npm payload is current.
|
|
29
93
|
|
|
30
|
-
The frozen Go installer remains available at [GitHub Releases](https://github.com/deftai/directive/releases) as a legacy / offline bridge but receives no further updates (#1912); Node ≥ 20 is still required to run Deft afterward. After this one-time step,
|
|
94
|
+
The frozen Go installer remains available at [GitHub Releases](https://github.com/deftai/directive/releases) as a legacy / offline bridge but receives no further updates (#1912); Node ≥ 20 is still required to run Deft afterward. After this one-time step, the four-step npm path above is all you need for every future upgrade.
|
|
31
95
|
|
|
32
96
|
---
|
|
33
97
|
|
|
@@ -89,7 +153,7 @@ runs the doctor first gets pointed at this exact two-step before touching `init`
|
|
|
89
153
|
|
|
90
154
|
**Version-range buckets (apply-order, oldest applicable first):**
|
|
91
155
|
|
|
92
|
-
- **From pre-v0.20 (very old) — manual.** Run the pre-cutover migration
|
|
156
|
+
- **From pre-v0.20 (very old) — manual.** Run the pre-cutover migration on pinned **v0.59.0**, then refresh AGENTS.md: [Frozen pre-v0.20 document-model migration (#2068)](#frozen-pre-v020-document-model-migration-2068) and [From pre-#768 AGENTS.md → managed-section AGENTS.md](#from-pre-768-agentsmd--managed-section-agentsmd). Agents: when the project shows BOTH a stale AGENTS.md and pre-cutover artifacts, follow [QUICK-START.md Case G+H](./QUICK-START.md#case-gh--combined-stale-agentsmd--pre-cutover-migration-big-jump-one-session) to complete both in one session instead of two.
|
|
93
157
|
- **From v0.20–v0.24 — auto-handled (opt-in).** Triage v1 is purely additive; nothing breaks if you skip it: [Migration to triage v1](#migration-to-triage-v1).
|
|
94
158
|
- **From v0.25.x — manual (breaking).** The deft-cache on-disk layout changed: [From v0.25.x → v0.26.0](#from-v025x--v0260-deft-cache-unified-layer-breaking).
|
|
95
159
|
- **From v0.26.x — auto-handled (interactive).** Run the triage adoption ritual: [From v0.26.x → v0.27](#from-v026x---v027-triage-adoption-via-task-triagewelcome).
|
|
@@ -97,13 +161,16 @@ runs the doctor first gets pointed at this exact two-step before touching `init`
|
|
|
97
161
|
- **From v0.60.x — manual (hook refresh).** After #2049, consumer `.githooks/` dispatch through the `deft` CLI only. Run [From v0.60.0 → v0.61.x (refresh project-root git hooks, #2049)](#from-v0600--v061x-refresh-project-root-git-hooks-2049) after every framework upgrade that touches hook templates.
|
|
98
162
|
- **From v0.28–v0.36 (and the final hop to current) — auto-handled.** If still on the Go-installer layout, follow the [One-time migration from the Go installer](#one-time-migration-from-the-go-installer-legacy--npm) above, then `npm i -g @deftai/directive@latest` for all future upgrades.
|
|
99
163
|
|
|
100
|
-
**Final step for every bucket.** Finish on the canonical upgrade
|
|
164
|
+
**Final step for every bucket.** Finish on the canonical npm upgrade path, then let the doctor confirm you are current:
|
|
101
165
|
|
|
102
166
|
```bash
|
|
103
167
|
npm i -g @deftai/directive@latest
|
|
168
|
+
deft update
|
|
169
|
+
deft migrate
|
|
170
|
+
deft doctor
|
|
104
171
|
```
|
|
105
172
|
|
|
106
|
-
|
|
173
|
+
Run those from your project root after any bucket-specific hops (`deft update` refreshes `.deft/core/` and `.githooks/`; `deft migrate` stamps npm provenance once and is idempotent). If still on a Go-installer layout, follow the [One-time migration from the Go installer](#one-time-migration-from-the-go-installer-legacy--npm) first.
|
|
107
174
|
|
|
108
175
|
---
|
|
109
176
|
|
|
@@ -522,18 +589,19 @@ The contract is byte-stable by construction:
|
|
|
522
589
|
|
|
523
590
|
---
|
|
524
591
|
|
|
525
|
-
## From any pre-v0.20 version → v0.20.0
|
|
592
|
+
## From any pre-v0.20 version → v0.20.0 (historical; use frozen path)
|
|
526
593
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
- **
|
|
530
|
-
- **
|
|
531
|
-
|
|
594
|
+
> **Current releases (#2068):** follow [Frozen pre-v0.20 document-model migration](#frozen-pre-v020-document-model-migration-2068) instead of upgrading straight to latest npm. The section below documents what the v0.20 cutover changed; commands assume framework **v0.59.0** (or another pinned release that still ships `migrate_vbrief.py`).
|
|
595
|
+
|
|
596
|
+
- **Applies when:** `deft doctor` / `task migrate:preflight` reports pre-cutover state. Legacy `SPECIFICATION.md` / `PROJECT.md` without the `<!-- deft:deprecated-redirect -->` sentinel is the canonical signal.
|
|
597
|
+
- **Safe to auto-run:** No — `task migrate:vbrief` on the pinned release rewrites `SPECIFICATION.md` and `PROJECT.md` into deprecation-redirect stubs and creates lifecycle folders; review `--dry-run` first.
|
|
598
|
+
- **Restart required:** Yes — after migration completes, stop the session and start fresh so rewritten AGENTS.md and v0.20 skills load cleanly.
|
|
599
|
+
- **Commands (on pinned v0.59.0 payload):**
|
|
600
|
+
- `task migrate:vbrief -- --dry-run` (preview)
|
|
532
601
|
- `task migrate:vbrief` (apply)
|
|
533
|
-
-
|
|
534
|
-
- `.deft/core/run agents:refresh` (idempotent; runs implicitly via `.deft/core/run upgrade` -- only invoke directly if you skipped that step)
|
|
602
|
+
- `deft upgrade` or `task upgrade` (record framework version + refresh AGENTS.md managed section)
|
|
535
603
|
- `task roadmap:render` / `task project:render` / `task prd:render -- --force` (regenerate exports)
|
|
536
|
-
- `task check` (verify)
|
|
604
|
+
- `deft check` or `task check` (verify)
|
|
537
605
|
|
|
538
606
|
### Remote probe (#801)
|
|
539
607
|
|
package/docs/BROWNFIELD.md
CHANGED
|
@@ -51,15 +51,19 @@ git clone https://github.com/deftai/directive.git deft
|
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
54
|
-
## 2. Migrate Existing Docs (
|
|
54
|
+
## 2. Migrate Existing Docs (frozen-release path, #2068)
|
|
55
55
|
|
|
56
|
-
If your project already contains `SPECIFICATION.md`, `PROJECT.md`, or `
|
|
56
|
+
If your project already contains authoritative root `SPECIFICATION.md`, `PROJECT.md`, or incomplete vBRIEF lifecycle folders, **current npm releases no longer ship the in-product migrator**. Pin framework **v0.59.0**, install Python 3.11+ and `uv`, then run the one-shot migration from that payload:
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
+
task migrate:preflight
|
|
60
|
+
task migrate:vbrief -- --dry-run
|
|
59
61
|
task migrate:vbrief
|
|
60
62
|
```
|
|
61
63
|
|
|
62
|
-
|
|
64
|
+
See [UPGRADING.md § Frozen pre-v0.20 document-model migration](../UPGRADING.md#frozen-pre-v020-document-model-migration-2068) for the full frozen Go-installer / git-tag path, then upgrade to current npm with `npm i -g @deftai/directive@latest` and `deft update`.
|
|
65
|
+
|
|
66
|
+
The migration is **idempotent** on the pinned release — safe to re-run on a partially-migrated project.
|
|
63
67
|
|
|
64
68
|
### What migration does
|
|
65
69
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftai/directive-content",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.0",
|
|
4
4
|
"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.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|