@deftai/directive-content 0.61.2 → 0.63.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 +12 -15
- package/Taskfile.yml +6 -25
- package/UPGRADING.md +42 -12
- 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/core.yml +9 -123
- package/tasks/framework.yml +15 -19
- package/tasks/migrate.yml +5 -62
- package/tasks/ts.yml +2 -293
- package/tasks/umbrella.yml +30 -0
- package/templates/agent-prompt-preamble.md +14 -0
- package/templates/agents-entry.md +10 -1
- package/tasks/ci.yml +0 -57
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
|
@@ -144,6 +144,9 @@ includes:
|
|
|
144
144
|
framework:
|
|
145
145
|
taskfile: ./tasks/framework.yml
|
|
146
146
|
optional: true
|
|
147
|
+
umbrella:
|
|
148
|
+
taskfile: ./tasks/umbrella.yml
|
|
149
|
+
optional: true
|
|
147
150
|
session:
|
|
148
151
|
taskfile: ./tasks/session.yml
|
|
149
152
|
optional: true
|
|
@@ -310,10 +313,6 @@ includes:
|
|
|
310
313
|
taskfile: ./tasks/core.yml
|
|
311
314
|
optional: true
|
|
312
315
|
internal: true
|
|
313
|
-
ci:
|
|
314
|
-
taskfile: ./tasks/ci.yml
|
|
315
|
-
optional: true
|
|
316
|
-
internal: true
|
|
317
316
|
# npm consumer deposits resolve verbs through global `deft` when the vendored
|
|
318
317
|
# packages/cli/dist/bin.js is absent (#2022 Phase 3).
|
|
319
318
|
engine:
|
|
@@ -339,12 +338,8 @@ tasks:
|
|
|
339
338
|
ENGINE_CMD: 'check --framework-root "{{.TASKFILE_DIR}}" --project-root "{{.USER_WORKING_DIR}}"'
|
|
340
339
|
|
|
341
340
|
check:framework-source:
|
|
342
|
-
desc: "Run all framework source-repo pre-commit checks
|
|
341
|
+
desc: "Run all framework source-repo pre-commit checks (TS-only after #1860). Sole wired consumer of maintainer-only core:build / core:clean."
|
|
343
342
|
deps:
|
|
344
|
-
# Maintainer-only Python lanes (tasks/core.yml) — not on check:consumer.
|
|
345
|
-
- core:validate
|
|
346
|
-
- core:lint
|
|
347
|
-
- core:test
|
|
348
343
|
- ts:check-lane
|
|
349
344
|
- toolchain:check
|
|
350
345
|
- verify:stubs
|
|
@@ -439,22 +434,8 @@ tasks:
|
|
|
439
434
|
# Oracle/fallback (parity): scripts/verify_no_task_runtime.py (#1854 s3).
|
|
440
435
|
- node "{{.TASKFILE_DIR}}/packages/cli/dist/bin.js" verify-no-task-runtime
|
|
441
436
|
|
|
442
|
-
#
|
|
443
|
-
#
|
|
444
|
-
# triage_bootstrap watchdog regression suite (5 of the 6 marked tests),
|
|
445
|
-
# which burns ~5.85s on real time.sleep / thread joins -- the proper
|
|
446
|
-
# monkeypatch refactor is tracked as a follow-up to #975. The `-o
|
|
447
|
-
# addopts=` reset overrides the pyproject default of `-m 'not slow'`
|
|
448
|
-
# so the `-m slow` selector here actually picks up the marked tests.
|
|
449
|
-
check:slow:
|
|
450
|
-
desc: "Run the @pytest.mark.slow test lane (watchdog regression suite excluded from `task check` by default, #975). Maintainer-only Python lane — not part of `check:consumer`."
|
|
451
|
-
cmds:
|
|
452
|
-
# `--project` pins uv to the framework root so ancestor pyproject.toml
|
|
453
|
-
# files cannot hijack the resolver via uv's upward walk (#1011).
|
|
454
|
-
- uv --project "{{.TASKFILE_DIR}}" run pytest tests/ -o addopts= -m slow
|
|
455
|
-
|
|
456
|
-
# Maintainer-only packaging aliases (#2022 Phase 2). `core:*` is internal;
|
|
457
|
-
# these root aliases remain callable for release Step 6 (`task build`) and
|
|
437
|
+
# Maintainer-only packaging aliases (#1860). `core:*` is internal;
|
|
438
|
+
# these root aliases remain callable for release Step 8 (`task build`) and
|
|
458
439
|
# local maintainer workflows. Not wired into `check:consumer`.
|
|
459
440
|
build:
|
|
460
441
|
desc: Package framework for distribution (maintainer-only; alias for core:build)
|
package/UPGRADING.md
CHANGED
|
@@ -42,14 +42,43 @@ From v0.55.1 onwards `@deftai/directive` is published on npm. The canonical cons
|
|
|
42
42
|
|
|
43
43
|
Start a **new agent session** after steps 2–3 so the refreshed AGENTS.md and skills load from a clean context.
|
|
44
44
|
|
|
45
|
-
### `deft migrate` vs
|
|
45
|
+
### `deft migrate` vs pre-v0.20 document-model migration
|
|
46
46
|
|
|
47
47
|
These commands are unrelated — do not confuse them:
|
|
48
48
|
|
|
49
49
|
| Command | When to use | What it does |
|
|
50
50
|
| --- | --- | --- |
|
|
51
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
|
-
|
|
|
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.
|
|
53
82
|
|
|
54
83
|
### One-time migration from the Go installer (legacy → npm)
|
|
55
84
|
|
|
@@ -124,7 +153,7 @@ runs the doctor first gets pointed at this exact two-step before touching `init`
|
|
|
124
153
|
|
|
125
154
|
**Version-range buckets (apply-order, oldest applicable first):**
|
|
126
155
|
|
|
127
|
-
- **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.
|
|
128
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).
|
|
129
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).
|
|
130
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).
|
|
@@ -560,18 +589,19 @@ The contract is byte-stable by construction:
|
|
|
560
589
|
|
|
561
590
|
---
|
|
562
591
|
|
|
563
|
-
## From any pre-v0.20 version → v0.20.0
|
|
592
|
+
## From any pre-v0.20 version → v0.20.0 (historical; use frozen path)
|
|
564
593
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
- **
|
|
568
|
-
- **
|
|
569
|
-
|
|
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)
|
|
570
601
|
- `task migrate:vbrief` (apply)
|
|
571
|
-
-
|
|
572
|
-
- `.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)
|
|
573
603
|
- `task roadmap:render` / `task project:render` / `task prd:render -- --force` (regenerate exports)
|
|
574
|
-
- `task check` (verify)
|
|
604
|
+
- `deft check` or `task check` (verify)
|
|
575
605
|
|
|
576
606
|
### Remote probe (#801)
|
|
577
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.63.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": [
|