@deftai/directive-content 0.61.2 → 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.
@@ -76,11 +76,11 @@ A project is **pre-cutover** if ANY of the following are true. This prose mirror
76
76
 
77
77
  ! If pre-cutover or strategy-nonconformant state is detected, **stop immediately** and display an actionable message that cites the exact validator:
78
78
 
79
- > "This project was generated with pre-v0.20 or non-conformant strategy output. Run the deterministic validator and follow its remediation: `task verify-strategy-output` (works in source and after `deft` package install) or `python .deft/core/scripts/validate_strategy_output.py --project-root .` . Then `task migrate:vbrief` / `task project:render` / strategy re-run as indicated."
79
+ > "This project was generated with pre-v0.20 or non-conformant strategy output. Run the deterministic validator and follow its remediation: `task verify-strategy-output` (works in source and after `deft` package install) or `python .deft/core/scripts/validate_strategy_output.py --project-root .`. For document-model migration, follow UPGRADING.md § Frozen pre-v0.20 document-model migration (#2068): pin v0.59.0, then run `task migrate:vbrief` from that payload. Otherwise `task project:render` / strategy re-run as indicated."
80
80
 
81
81
  ! Include specific details about what was detected (the validator output is authoritative):
82
82
 
83
- - Legacy specification.vbrief.json or missing lifecycle folders: "Run `task migrate:vbrief` to create the lifecycle folder structure and remove legacy dual-writes"
83
+ - Legacy specification.vbrief.json or missing lifecycle folders: "Follow the frozen v0.59.0 migrator path (#2068) or run `task migrate:preflight` for current-release guidance"
84
84
  - Non-date-prefixed vBRIEFs: "Re-run the emitting strategy after the v0.20 migrations (#1166 s1+s2+...) or manually rename files to `YYYY-MM-DD-<slug>.vbrief.json` and `task scope:promote`"
85
85
  - Missing `PROJECT-DEFINITION.vbrief.json`: "Run `task project:render` to generate the project definition"
86
86
  - `SPECIFICATION.md` / `PROJECT.md` without sentinel: the classic pre-cutover messages
@@ -88,7 +88,7 @@ A project is **pre-cutover** if ANY of the following are true. This prose mirror
88
88
 
89
89
  ! After the validator reports clean, re-run this guard before continuing.
90
90
 
91
- ⊗ Proceed with build when pre-cutover or strategy-nonconformant artifacts are detected -- always redirect to migration first (or run the validator) and surface the exact remediation.
91
+ ⊗ Proceed with build when pre-cutover or strategy-nonconformant artifacts are detected -- always redirect to the frozen migration path first (or run the validator) and surface the exact remediation.
92
92
  ⊗ Silently ignore these artifacts or guess at fixes -- the validator (wired into `task check` and this guard) is the deterministic gate.
93
93
 
94
94
  ## USER.md Gate
@@ -317,6 +317,8 @@ The task scans every vBRIEF with a GitHub-backed reference (whether the referenc
317
317
 
318
318
  ! When the refinement session files a new umbrella issue (or surfaces one whose current-shape comment is missing), file the umbrella then file its `## Current shape (as of pass-N)` comment per `## Umbrella current-shape convention` in `AGENTS.md` (#1152) -- the edit-in-place comment is the canonical surface every subsequent design pass updates.
319
319
 
320
+ ! Before reporting an umbrella or epic's current status to the operator (what is done, what blocks, wave order), fetch `repos/<owner>/<repo>/issues/<N>/comments` via REST, read the `## Current shape (as of pass-N)` comment and any linked context/`LockedDecisions` vBRIEF — never conclude status from the issue body alone (claim-cites-state-surface, #2066).
321
+
320
322
  ~ Issue-label hygiene for any umbrella or child issue this skill files: before creating issues, inspect the target repo's existing labels with `gh label list` or the labels API; choose one or more suitable existing labels when practical, or explicitly note that no label was applied. This is a recommendation, not a gate -- do not block issue creation solely because no label fits, and do not invent ad hoc labels outside the repo's existing label set.
321
323
 
322
324
  ! When a refinement pass produces a slicing event (rare but possible -- e.g. a design pass on an existing umbrella files N additional Wave-N child issues), record the cohort in `vbrief/.eval/slices.jsonl` via `scripts/slice_record.py::write_slice(...)` with `actor="skill:refinement"` immediately after the children are filed (#1132 / D13). Same call shape as `skills/deft-directive-gh-slice/SKILL.md` Step 6. The cohort record is what makes `task triage:audit --orphans` able to detect Wave-2+ children whose umbrella closes prematurely; without it the production-side drift this surface guards against re-fires. Skip when the pass produced no new child cohort (e.g. a pure re-prioritization).
@@ -12,12 +12,6 @@ description: >-
12
12
  <!-- Regenerate with: task packs:render -->
13
13
  <!-- Edit the source, not this file. Slice instead of loading every SKILL.md: task packs:slice skills by-trigger --trigger <kw> (or list) -->
14
14
 
15
- <!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
16
- <!-- Purpose: rendered skill -->
17
- <!-- Source of truth: packs/skills/skills-pack-0.1.json -->
18
- <!-- Regenerate with: task packs:render -->
19
- <!-- Edit the source, not this file. Slice instead of loading every SKILL.md: task packs:slice skills by-trigger --trigger <kw> (or list) -->
20
-
21
15
  # Deft Directive Setup
22
16
 
23
17
  Agent-driven alternative to `.deft/core/run bootstrap && .deft/core/run project && .deft/core/run spec`.
@@ -44,45 +38,24 @@ A project is **pre-cutover** if ANY of the following are true. This prose mirror
44
38
 
45
39
  ### Action on Detection
46
40
 
47
- ! If pre-cutover state is detected, **stop immediately** and display an actionable message:
41
+ ! If pre-cutover state is detected, **stop immediately** and display an actionable message pointing at the frozen-release migration path (#2068):
48
42
 
49
- > "This project uses the pre-v0.20 document model. Run `task migrate:vbrief` to upgrade to the vBRIEF-centric model."
43
+ > "This project uses the pre-v0.20 document model. Current npm releases no longer ship in-product `task migrate:vbrief`. Follow UPGRADING.md § Frozen pre-v0.20 document-model migration: 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."
50
44
 
51
45
  ! Include specific details about what was detected:
52
46
 
53
- - Missing lifecycle folders: "Run `task migrate:vbrief` to create the lifecycle folder structure"
54
- - `SPECIFICATION.md` with real content: "SPECIFICATION.md contains non-redirect content -- this file is deprecated; use scope vBRIEFs in `vbrief/` instead"
55
- - `PROJECT.md` with real content: "PROJECT.md contains non-redirect content -- this file is deprecated; use `PROJECT-DEFINITION.vbrief.json` instead"
56
- - Missing `PROJECT-DEFINITION.vbrief.json`: "Run `task project:render` to generate the project definition"
57
-
58
- ### Environment Preflight (before asking to run migration)
47
+ - Missing lifecycle folders: "Create lifecycle folders via the frozen-release migrator on v0.59.0, or manually add `vbrief/{proposed,pending,active,completed,cancelled}/` after migrating narratives"
48
+ - `SPECIFICATION.md` with real content: "SPECIFICATION.md contains non-redirect content migrate on pinned v0.59.0 before upgrading to current npm"
49
+ - `PROJECT.md` with real content: "PROJECT.md contains non-redirect content migrate on pinned v0.59.0 before upgrading to current npm"
50
+ - Missing `PROJECT-DEFINITION.vbrief.json`: "Run `task project:render` after document-model migration completes"
59
51
 
60
- ! Before asking the user "Would you like me to run `task migrate:vbrief` now?", run an environment preflight and report the results to the user. Do NOT ask the yes/no prompt until preflight results have been reported. Each failing check must be surfaced with a specific fix pointer so the user (or agent) can resolve the blocker before approving the run.
52
+ ### Preflight (optional diagnostic)
61
53
 
62
- Run these four checks, in order:
54
+ ~ Run `task migrate:preflight` to confirm pre-cutover state and print the frozen-release guidance. It does **not** run migration.
63
55
 
64
- 1. **Document-model confirmation** -- re-apply the Detection Criteria above (the executable source is `scripts/_precutover.py`). If `SPECIFICATION.md` is a current generated spec export from `vbrief/specification.vbrief.json` and all lifecycle folders exist, stop: migration is NOT needed and MUST NOT be run.
65
- 2. **Task resolvability** -- check whether `task migrate:vbrief` is dispatchable from the project root:
66
- - Run `task --list` (or platform-equivalent) and grep the output for a line containing `migrate:vbrief`.
67
- - If present: the primary command works from the project root -- canonical invocation is `task migrate:vbrief`.
68
- - If absent: the consumer `Taskfile.yml` does not include `deft/Taskfile.yml`. Fall back to the explicit-taskfile invocation `task -t ./deft/Taskfile.yml migrate:vbrief` and tell the user: "`task migrate:vbrief` is not resolvable from the project root. I will use the fallback invocation `task -t ./deft/Taskfile.yml migrate:vbrief`, which reads the task directly from the framework Taskfile. To make the primary command work in future, add an include for `deft/Taskfile.yml` to your project `Taskfile.yml` — see `deft/main.md` § Publishing deft tasks in your project root."
69
- 3. **`uv` on PATH** -- the migrator runs `uv run python scripts/migrate_vbrief.py`. Check `uv --version` (or equivalent): if it fails, point the user at the uv install docs (`https://docs.astral.sh/uv/`) and stop; migration cannot run without `uv`.
70
- 4. **Migration script present** -- check `deft/scripts/migrate_vbrief.py` exists on disk. If absent, the `deft/` checkout is incomplete or came from a pre-v0.20 framework version; point the user at `deft/QUICK-START.md` (framework refresh guidance) and stop.
71
-
72
- ! Report each preflight check's result to the user (e.g. "✓ task migrate:vbrief resolvable", "✗ uv not on PATH — install from https://docs.astral.sh/uv/") BEFORE prompting for yes/no approval. If any check fails, do NOT offer to run migration until it is resolved.
73
-
74
- ⊗ Skip preflight and immediately ask "Would you like me to run `task migrate:vbrief` now?" -- preflight catches preventable errors (unresolvable task, missing `uv`, missing script) before the user commits to running migration.
75
- ⊗ Propose an install-step mutation that writes `migrate:vbrief` content into the consumer Taskfile. The supported publish mechanism is the `includes: deft: deft/Taskfile.yml` pattern documented in `deft/main.md` § Publishing deft tasks in your project root; inline Taskfile mutation is explicitly out of scope (per #506 D6).
76
-
77
- ### Prompt and Run
78
-
79
- ! After preflight results are reported (and all checks pass), ask the user: "Would you like me to run `task migrate:vbrief` now?"
80
- - If yes: run the migration command (use the fallback invocation `task -t ./deft/Taskfile.yml migrate:vbrief` if the preflight resolvability check found the primary task unresolvable). Then re-run the pre-cutover detection guard to verify clean state before proceeding.
81
- - If no: stop and let the user handle migration manually.
82
-
83
- ⊗ Proceed with setup phases when pre-cutover artifacts are detected -- always redirect to migration first.
84
- ⊗ Silently ignore pre-cutover artifacts -- the user must be informed with an actionable command to fix the state.
85
- ⊗ Display the migration diagnostic without offering to run it -- always ask the user if they want the agent to handle it (after preflight has passed).
56
+ Offer to run `task migrate:vbrief` from the current npm deposit the migrator is not bundled on current releases (#2068).
57
+ Proceed with setup phases when pre-cutover artifacts are detected always redirect to the frozen migration path first.
58
+ ⊗ Silently ignore pre-cutover artifacts the user must be informed with an actionable command to fix the state.
86
59
 
87
60
  ### Greenfield Projects (No Migration Needed)
88
61
 
@@ -96,19 +69,15 @@ Run these four checks, in order:
96
69
 
97
70
  ~ This is already handled by Phase 2 Output Path (creates `./vbrief/` and lifecycle subfolders) and Phase 3 Output (creates scope vBRIEFs in lifecycle folders). The guard ensures migrating projects are redirected before reaching these phases.
98
71
 
99
- ### Migration safety flags
100
-
101
- `task migrate:vbrief` is destructive by default (it replaces `SPECIFICATION.md` and `PROJECT.md` with redirect stubs and rewrites `vbrief/`), but it carries four always-on / on-demand safety affordances so operators can preview, recover, and undo (#497, #506 D7). Agents offering to run migration MUST mention these and pick the right one for the operator's situation.
72
+ ### Migration safety flags (frozen v0.59.0 release only)
102
73
 
103
- - ! **Automatic `.premigrate.*` backups (always-on, no flag)**: before any destructive write the migrator copies every pre-cutover input to its `.premigrate` sibling -- `SPECIFICATION.md` -> `SPECIFICATION.premigrate.md`, `PROJECT.md` -> `PROJECT.premigrate.md`, `ROADMAP.md` -> `ROADMAP.premigrate.md`, `PRD.md` -> `PRD.premigrate.md` (only if present), and `vbrief/specification.vbrief.json` -> `vbrief/specification.premigrate.vbrief.json`. Each backup emits a `BACKUP <src> -> <dst> (<N> bytes)` line in the migration output. These files are `.gitignore`d by default so they do not leak into commits; operators who want them versioned can remove the patterns.
104
- - ! **`task migrate:vbrief -- --dry-run` (preview)**: prints the complete migration plan (every proposed backup, lifecycle folder, narrative ingestion, scope vBRIEF, and deprecation-redirect replacement) prefixed `DRYRUN` without writing any file. Exits 0 on success. Use this before running migration for the first time on an unfamiliar project.
105
- - ! **Dirty-tree guard (always-on)**: if `git status --porcelain` is non-empty the migrator refuses to run and points the operator at `--force`. Keeps migration output separable from in-progress edits. Bypass with `task migrate:vbrief -- --force` only after confirming the operator has accepted the risk.
106
- - ! **`task migrate:vbrief -- --rollback`**: restores every pre-cutover input from its `.premigrate.*` backup and removes the scope vBRIEFs and migration-report files a prior run created. Reads `vbrief/migration/safety-manifest.json` (written by the migrator). Refuses if any redirect stub has been edited since migration -- re-run with `--force` to overwrite those edits on purpose, or commit them before rolling back. Prompts for a yes/no confirmation unless `--force` is passed.
74
+ When guiding an operator through migration on the pinned release, mention the migrator safety affordances (#497, #506 D7):
107
75
 
108
- ! When a user declines an in-flight migration or reports an incorrect result, offer `task migrate:vbrief -- --rollback` before asking them to edit files by hand.
76
+ - **`task migrate:vbrief -- --dry-run` (preview)** on v0.59.0
77
+ - **Dirty-tree guard** — migrator refuses when the working tree is dirty unless `--force`
78
+ - **`task migrate:vbrief -- --rollback`** on v0.59.0 to restore `.premigrate.*` backups
109
79
 
110
- ⊗ Offer `task migrate:vbrief` without also telling the user about `--dry-run` when they sound hesitant -- previewing is free and catches reconciliation surprises that would otherwise land in a commit.
111
- ⊗ Suggest `git reset --hard` or manual file deletion as a recovery path when `--rollback` would do the right thing more safely.
80
+ ⊗ Offer in-product migration from a current npm deposit use the frozen path (#2068).
112
81
 
113
82
  ## Deterministic Questions Contract
114
83
 
@@ -58,11 +58,11 @@ A project is **pre-cutover** if ANY of the following are true. This prose mirror
58
58
 
59
59
  ! If pre-cutover state is detected, display the actionable migration message, then **skip Phases 1-6** and proceed directly to Phase 7 with the Document Model line set to "pre-v0.20 (legacy)":
60
60
 
61
- > "This project uses the pre-v0.20 document model. Run `task migrate:vbrief` to upgrade to the vBRIEF-centric model."
61
+ > "This 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: pin framework v0.59.0, install Python 3.11+ and uv, run `task migrate:vbrief` once from that payload, then upgrade to current npm."
62
62
 
63
63
  ! Include specific details about what was detected:
64
64
 
65
- - Missing lifecycle folders: "Run `task migrate:vbrief` to create the lifecycle folder structure"
65
+ - Missing lifecycle folders: "Create lifecycle folders via the frozen v0.59.0 migrator (#2068), or manually add `vbrief/{proposed,pending,active,completed,cancelled}/` after migrating narratives"
66
66
  - `SPECIFICATION.md` with real content: "SPECIFICATION.md contains non-redirect content -- this file is deprecated; use scope vBRIEFs in `vbrief/` instead"
67
67
  - `PROJECT.md` with real content: "PROJECT.md contains non-redirect content -- this file is deprecated; use `PROJECT-DEFINITION.vbrief.json` instead"
68
68
  - Missing `PROJECT-DEFINITION.vbrief.json`: "Run `task project:render` to generate the project definition"
@@ -72,7 +72,7 @@ A project is **pre-cutover** if ANY of the following are true. This prose mirror
72
72
 
73
73
  ! Include a **Document Model** line in the Phase 7 summary:
74
74
 
75
- - Pre-cutover detected: "**Document Model**: pre-v0.20 (legacy) -- run `task migrate:vbrief` to upgrade"
75
+ - Pre-cutover detected: "**Document Model**: pre-v0.20 (legacy) -- follow UPGRADING.md § Frozen pre-v0.20 document-model migration (#2068)"
76
76
  - Post-cutover (lifecycle folders present, no stale artifacts): "**Document Model**: v0.20+ (vBRIEF-centric) -- OK"
77
77
  - Post-cutover with tampered placeholders: "**Document Model**: v0.20+ with warnings -- SPECIFICATION.md or PROJECT.md contains non-redirect content"
78
78
 
@@ -122,7 +122,7 @@ A project is **pre-cutover** if ANY of the following are true. This prose mirror
122
122
  - `cancelled/`
123
123
  2. ! Report any missing folders with a clear warning:
124
124
  - "WARNING: vbrief/{folder}/ does not exist -- lifecycle structure is incomplete"
125
- 3. ~ If folders are missing, suggest running `task migrate:vbrief` or creating them manually
125
+ 3. ~ If folders are missing, suggest `task migrate:preflight` and the frozen v0.59.0 migrator path (#2068), or creating them manually after migration
126
126
 
127
127
  ### 3b: PROJECT-DEFINITION.vbrief.json Validation
128
128
 
@@ -102,6 +102,8 @@ What would you like to do with this candidate?
102
102
  4. ~ When the audit surfaces a stale acceptance (`accept` decision whose issue is no longer referenced by any `vbrief/active/`), surface it to the operator -- the typical fix is a fresh ingest via `task issue:ingest -- <N>` or a `task triage:reset <N>` if the acceptance was in error.
103
103
  5. ⊗ Skip the Phase 4 audit -- silent exit leaves the operator without a record of what landed in `vbrief/proposed/` this session, which is the typical recurrence vector for "what did I just accept?" confusion.
104
104
 
105
+ ! Before reporting an umbrella or epic's current status during triage (what is done, what blocks, wave order), fetch `repos/<owner>/<repo>/issues/<N>/comments` via REST, read the `## Current shape (as of pass-N)` comment and any linked context/`LockedDecisions` vBRIEF — never conclude status from the issue body alone (claim-cites-state-surface, #2066 / AGENTS.md #1152).
106
+
105
107
  ## Reversibility
106
108
 
107
109
  ! To undo a decision, run `task triage:reset <N>`. This writes a `reset` audit entry referencing the prior decision id; history is **never** deleted. `task triage:reset` is the canonical Layer 5 reversibility verb (resolves the V3 audit from 2026-05-13). After a reset, the candidate re-enters the untriaged group on the next `task triage:queue` render so it can be re-walked through Phase 3.
@@ -23,30 +23,26 @@ tasks:
23
23
  desc: "Read-only remote-version probe (#801) -- task framework:check-updates [-- --force | --json]. Honors DEFT_NO_NETWORK=1 and DEFT_REMOTE_PROBE_TIMEOUT (default 5s)."
24
24
  dir: '{{.USER_WORKING_DIR}}'
25
25
  env:
26
- PYTHONUTF8: "1"
27
26
  # When the operator passes `--force`, the task wrapper sets
28
27
  # DEFT_FORCE_REMOTE_PROBE=1 so the gate-integration helper bypasses
29
- # the 24h throttle. The `run` CLI surface (`run check-updates`) is
30
- # already idempotent (does not write to the throttle file), so this
31
- # env var only affects callers that probe through the upgrade gate.
28
+ # the 24h throttle. The deft-ts CLI surface is idempotent (does not
29
+ # write to the throttle file), so this env var only affects callers
30
+ # that probe through the upgrade gate.
32
31
  DEFT_FORCE_REMOTE_PROBE: '{{if (mustRegexMatch "(^|\\s)--force(\\s|$)" .CLI_ARGS)}}1{{else}}{{.DEFT_FORCE_REMOTE_PROBE | default ""}}{{end}}'
33
32
  cmds:
34
- # Strip our own `--force` from the args we pass through to `run` so it
35
- # does not surface as an unknown flag in the JSON / text output. Other
36
- # supported flags (e.g. `--json`) flow through unchanged.
33
+ # Strip our own `--force` from the args we pass through so it does not
34
+ # surface as an unknown flag in the JSON / text output. Other supported
35
+ # flags (e.g. `--json`) flow through unchanged.
37
36
  #
38
- # #1059: invoke Python through `uv --project "{{.DEFT_ROOT}}" run python`
39
- # rather than a bare `python3`. On Windows the bare `python3` command
40
- # resolves to the Microsoft Store app-execution-alias stub (exit 49) on
41
- # default-configured hosts where the user installed Python via the
42
- # official installer, so the wrapper aborted before `run check-updates`
43
- # ever started. The `uv` wrapper matches the canonical pattern used by
44
- # every other tasks/*.yml file (see e.g. `tasks/prd.yml`,
45
- # `tasks/vbrief.yml`) and pins the project root via #1011 so the
46
- # uv environment never walks up into a hostile ancestor pyproject.
47
- - >-
48
- uv --project "{{.DEFT_ROOT}}" run python "{{.DEFT_ROOT}}/run" check-updates
49
- {{regexReplaceAll "(^|\\s)--force(\\s|$)" .CLI_ARGS " "}}
37
+ # #2069: consumer path dispatches through the native deft-ts handler
38
+ # via engine:invoke (vendored bin.js in source checkouts, global deft
39
+ # on npm consumer deposits #2022 Phase 3).
40
+ - task: :engine:invoke
41
+ vars:
42
+ ENGINE_CMD: >-
43
+ framework:check-updates --project-root "{{.USER_WORKING_DIR}}"
44
+ --deft-root "{{.DEFT_ROOT}}"
45
+ {{regexReplaceAll "(^|\\s)--force(\\s|$)" .CLI_ARGS " "}}
50
46
 
51
47
  doctor:
52
48
  # #1272: the legacy ``task framework:doctor`` surface is REDACTED.
package/tasks/migrate.yml CHANGED
@@ -10,75 +10,18 @@ tasks:
10
10
  _ts-build:
11
11
  internal: true
12
12
  desc: "Build @deftai/cli dist/ before TS-backed gates run (#1828 s2)."
13
- # Match scope.yml _ensure-ts: run from USER_WORKING_DIR with pnpm --dir so
14
- # Windows consumer invocations via `-t <abs Taskfile>` do not double-prefix
15
- # DEFT_ROOT under go-task's dir: handling (#566 / Windows CI regression).
16
13
  dir: '{{.USER_WORKING_DIR}}'
17
14
  cmds:
18
15
  - pnpm --dir "{{.DEFT_ROOT}}" run build
19
16
 
20
17
  preflight:
21
- # Agent-side environment preflight for `task migrate:vbrief` (#793).
22
- # Reifies the prose contract documented in
23
- # `skills/deft-directive-setup/SKILL.md` § Environment Preflight as a
24
- # runnable task so consumers running `task migrate:vbrief` directly
25
- # (not via the agent-driven setup skill) get the same checks
26
- # (uv on PATH, v0.20+ layout, document model, git working tree) before
27
- # any destructive mutation runs. Three-state exit (0 ready / 1 not-ready / 2 config
28
- # error) mirrors `scripts/preflight_branch.py` (#747).
29
- #
30
- # Consumer path dispatches through the native deft-ts handler (#2022 Phase 2);
31
- # the legacy Python script remains for maintainer parity only.
32
- #
33
- # NO `sources:` / `generates:` per `conventions/task-caching.md`: the
34
- # script forwards user-facing CLI flags (`--project-root`, `--deft-root`,
35
- # `--quiet`) via `{{.CLI_ARGS}}` and a cached cmds skip would silently
36
- # swallow them.
37
- desc: "Verify environment readiness for `task migrate:vbrief` (uv on PATH, v0.20+ layout, document model, git tree). Three-state exit (#793)."
18
+ # Pre-v0.20 document-model probe (#793, #2068 cutoff). Detects legacy
19
+ # SPECIFICATION.md / PROJECT.md or missing lifecycle folders and points
20
+ # operators at the frozen-release migration path in UPGRADING.md. Does NOT
21
+ # run the in-product migrator (retired from current npm deposits).
22
+ desc: "Detect pre-v0.20 document model and report the frozen-release migration path (#2068). Three-state exit (#793)."
38
23
  dir: '{{.USER_WORKING_DIR}}'
39
24
  deps:
40
25
  - _ts-build
41
26
  cmds:
42
27
  - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" migrate-preflight --project-root "{{.USER_WORKING_DIR}}" --deft-root "{{.DEFT_ROOT}}" {{.CLI_ARGS}}
43
-
44
- vbrief:
45
- desc: >
46
- Migrate existing project files to vBRIEF-centric folder structure (RFC #309).
47
- Pass safety flags after --, e.g. `task migrate:vbrief -- --dry-run`,
48
- `task migrate:vbrief -- --force`, `task migrate:vbrief -- --rollback` (#497, #506 D7).
49
- Pass `task migrate:vbrief -- --strict` to fail the run on any SPEC/ROADMAP
50
- reconciliation conflict (#496, #506).
51
- Self-invokes `task migrate:preflight` first (#793) so a non-zero preflight
52
- exit aborts the run before any destructive mutation; pre-existing CLI
53
- flags continue to dispatch to `scripts/migrate_vbrief.py` unchanged.
54
- Emits framework events on guard trip: `dirty-tree:detected` (#497-3
55
- dirty-tree guard) and `pre-cutover:detected` (when
56
- run::_check_upgrade_gate is consulted by the CLI flow). See
57
- events/registry.json for the payload contracts and `DEFT_EVENT_LOG` for
58
- opt-in JSON-line capture (#635).
59
- #2013 HOLDOUT: `migrate:vbrief` remains the sole consumer-path Python
60
- entrypoint until the spec-authority umbrella resolves the
61
- `migrate_vbrief.py` port-vs-cutoff decision (#2022 Phase 2).
62
- deps:
63
- # #793: gate destructive migration on the environment preflight. A
64
- # non-zero exit from the preflight task aborts this task before any
65
- # `cmds:` line runs. Operator-supplied `{{.CLI_ARGS}}` (e.g.
66
- # `--dry-run`, `--force`, `--rollback`, `--strict`) belong to the
67
- # migrator and are NOT valid migrate:preflight flags. go-task
68
- # forwards parent CLI_ARGS into dependency tasks by default, so we
69
- # explicitly clear CLI_ARGS here; otherwise `task migrate:vbrief --
70
- # --dry-run` reaches the preflight argparse surface as
71
- # `migrate:preflight -- --dry-run` and exits 2 (`unrecognized
72
- # arguments: --dry-run`) before the migrator runs. This bug was
73
- # caught by the Windows task-dispatch regression job on PR #860.
74
- - task: preflight
75
- vars:
76
- CLI_ARGS: ""
77
- dir: '{{.USER_WORKING_DIR}}'
78
- env:
79
- PYTHONUTF8: "1"
80
- cmds:
81
- # #2013 holdout: migrate_vbrief.py stays on the consumer path until the
82
- # spec-authority umbrella closes the port-vs-cutoff decision (#2022).
83
- # Preflight is TS-native; the migrator body remains Python for now.
84
- - uv --project "{{.DEFT_ROOT}}" run python "{{.DEFT_ROOT}}/scripts/migrate_vbrief.py" "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
@@ -0,0 +1,30 @@
1
+ version: '3'
2
+
3
+ # tasks/umbrella.yml — umbrella issue tooling (#1152 / #2066).
4
+ #
5
+ # Hosts read-only surfaces for the canonical current-shape comment convention.
6
+ # Runs from the consumer project root so git origin and gh auth resolve against
7
+ # the operator's repo, not deftai/directive (#538 pattern).
8
+
9
+ vars:
10
+ DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
11
+
12
+ tasks:
13
+ _ensure-ts:
14
+ internal: true
15
+ desc: "Build the TS engine before umbrella gates (#2066)"
16
+ dir: '{{.USER_WORKING_DIR}}'
17
+ cmds:
18
+ - pnpm --dir "{{.DEFT_ROOT}}" run build
19
+
20
+ current-shape:
21
+ desc: "Fetch umbrella ## Current shape comment (#1152) — task umbrella:current-shape <N> [-- --repo OWNER/REPO | --json | --strict]. Does NOT read the issue body."
22
+ dir: '{{.USER_WORKING_DIR}}'
23
+ deps:
24
+ - _ensure-ts
25
+ cmds:
26
+ - task: :engine:invoke
27
+ vars:
28
+ ENGINE_CMD: >-
29
+ umbrella:current-shape --project-root "{{.USER_WORKING_DIR}}"
30
+ {{.CLI_ARGS}}
@@ -233,6 +233,20 @@ task scm:body:pr:edit -- --repo OWNER/REPO --pr 42 --body-file "$bodyFile"
233
233
 
234
234
  The wrapper reads UTF-8 body text from a file or stdin, sends JSON to `gh api --input -` via `_safe_subprocess.run_text` with `shell=False`, and prints the live post-mutation read-back object. Use live `gh` for immediate verification after mutations; do not use `ghx` for the first read-back because it may serve a cached stale GET.
235
235
 
236
+ ## 5.6 Umbrella status — claim-cites-state-surface (#2066)
237
+
238
+ Before stating an umbrella or epic's current status (what is done, what blocks, wave order), satisfy the claim-cites-state-surface rule:
239
+
240
+ 1. ! Fetch issue comments via REST: `gh api repos/<owner>/<repo>/issues/<N>/comments` (or `ghx api ...` for cached read-only GET).
241
+ 2. ! Read the `## Current shape (as of pass-N)` comment and any linked context or `LockedDecisions` vBRIEF referenced there. Follow the AGENTS.md #1152 reading order: body -> current-shape comment -> amendment comments.
242
+ 3. ! Any "X is done" / "X is the blocker" assertion about an umbrella MUST cite the current-shape comment or another state artifact in the same message.
243
+
244
+ Anti-pattern: reading only the issue body (pass-1 plan, stale by design) and concluding umbrella status from it — e.g. `gh issue view <N> --json body` or REST `repos/.../issues/<N>` body field alone. The live recurrence on 2026-06-28 misread #2013 Wave 0 status this way despite #1152 being loaded.
245
+
246
+ ⊗ Conclude umbrella or epic status from the issue body alone (#2066).
247
+
248
+ Reference: AGENTS.md `## Umbrella current-shape convention (#1152)`, issue #2066.
249
+
236
250
  ## 6. No Draft re-toggling within a single review cycle
237
251
 
238
252
  Once a PR transitions Draft -> Ready, keep it Ready unless a P0 finding requires re-Draft. Repeated Draft<->Ready toggles cost GraphQL mutations and trigger stale CheckRun states downstream (Greptile re-runs, branch-protection re-evaluations).
@@ -15,7 +15,7 @@ Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
15
15
  - ./PROJECT.md exists and is not a deprecation redirect (`<!-- deft:deprecated-redirect -->` or `<!-- Purpose: deprecation redirect -->`).
16
16
  - ./vbrief/ exists but any of the five lifecycle subfolders (proposed/, pending/, active/, completed/, cancelled/) is missing
17
17
 
18
- → On detection: read .deft/core/.agents/skills/deft-directive-setup/SKILL.md "Pre-Cutover Detection Guard" section and follow the migration path BEFORE any other action. The Migrating from pre-v0.20 section of the full guidelines has the canonical command, the "task -t ./.deft/core/Taskfile.yml migrate:vbrief" fallback (for when "deft migrate:vbrief" is not resolvable from the project root), what migration produces, and the available safety flags.
18
+ → On detection: read .deft/core/.agents/skills/deft-directive-setup/SKILL.md "Pre-Cutover Detection Guard" section and follow the frozen migration path BEFORE any other action. The Migrating from pre-v0.20 section of the full guidelines and UPGRADING.md § Frozen pre-v0.20 document-model migration (#2068) describe the pinned v0.59.0 path.
19
19
 
20
20
  ⊗ Start Phase 1, Phase 2, or a Returning-Sessions workflow while pre-cutover artifacts are present — run migration first.
21
21
 
@@ -83,6 +83,15 @@ The `plan.policy.wipCap` field caps the number of in-flight scope vBRIEFs (`vbri
83
83
 
84
84
  ⊗ Recommend a specific issue or vBRIEF without consulting `deft triage:queue` (or showing the operator the result of the consultation).
85
85
 
86
+ ## Umbrella status reading (#1152 / #2066)
87
+
88
+ Umbrella and epic issues carry a pass-1 body (plan, stale by design) and a canonical `## Current shape (as of pass-N)` comment (live state). Before reporting umbrella status:
89
+
90
+ - ! Fetch issue comments via REST (`gh api repos/<owner>/<repo>/issues/<N>/comments`), read the `## Current shape (as of pass-N)` comment, and any linked context or `LockedDecisions` vBRIEF referenced there — following the reading order body -> current-shape comment -> amendment comments (claim-cites-state-surface, #2066). Prefer the deterministic read path: `deft umbrella:current-shape <N>` (or `task umbrella:current-shape <N>`) — it locates the canonical comment, validates #1152 sections, and never falls back to the issue body.
91
+ - ⊗ Conclude umbrella or epic status from the issue body alone. Any "X is done" / "X is the blocker" assertion about an umbrella MUST cite the current-shape comment or another state artifact, not the body.
92
+
93
+ Cross-references: `.deft/core/.agents/skills/deft-directive-refinement/SKILL.md` and `.deft/core/.agents/skills/deft-directive-triage/SKILL.md` (before reporting umbrella status). Refs #1152, #2066.
94
+
86
95
  ## Content packs
87
96
 
88
97
  Deft ships versioned content packs (e.g. lessons learned from prior work) under `.deft/core/packs/`. Discover and LOAD pack content via the slice surface instead of reading whole pack files into context: