@deftai/directive-content 0.65.0 → 0.66.1
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/.githooks/pre-commit +3 -1
- package/QUICK-START.md +8 -4
- package/Taskfile.yml +31 -14
- package/UPGRADING.md +19 -5
- package/commands.md +46 -41
- package/conventions/rule-ownership.json +1 -1
- package/docs/BROWNFIELD.md +37 -33
- package/docs/directive-lifecycle.md +2 -2
- package/docs/getting-started.md +8 -8
- package/package.json +1 -1
- package/packs/skills/skills-pack-0.1.json +28 -28
- package/skills/deft-directive-article-review/SKILL.md +4 -4
- package/skills/deft-directive-build/SKILL.md +37 -37
- package/skills/deft-directive-cost/SKILL.md +6 -6
- package/skills/deft-directive-debug/SKILL.md +4 -4
- package/skills/deft-directive-decompose/SKILL.md +15 -15
- package/skills/deft-directive-gh-arch/SKILL.md +3 -3
- package/skills/deft-directive-gh-slice/SKILL.md +2 -2
- package/skills/deft-directive-interview/SKILL.md +12 -12
- package/skills/deft-directive-pre-pr/SKILL.md +3 -3
- package/skills/deft-directive-probe/SKILL.md +9 -9
- package/skills/deft-directive-refinement/SKILL.md +65 -65
- package/skills/deft-directive-release/SKILL.md +3 -3
- package/skills/deft-directive-review-cycle/SKILL.md +4 -4
- package/skills/deft-directive-setup/SKILL.md +71 -71
- package/skills/deft-directive-swarm/SKILL.md +94 -94
- package/skills/deft-directive-sync/SKILL.md +55 -55
- package/skills/deft-directive-triage/SKILL.md +15 -15
- package/tasks/architecture.yml +3 -1
- package/tasks/cache.yml +20 -10
- package/tasks/capacity.yml +8 -4
- package/tasks/change.yml +8 -10
- package/tasks/changelog.yml +3 -1
- package/tasks/codebase.yml +20 -10
- package/tasks/commit.yml +4 -8
- package/tasks/engine.yml +18 -4
- package/tasks/install.yml +4 -8
- package/tasks/issue.yml +8 -10
- package/tasks/migrate.yml +24 -8
- package/tasks/packs.yml +32 -16
- package/tasks/policy.yml +24 -12
- package/tasks/pr.yml +16 -8
- package/tasks/prd.yml +9 -12
- package/tasks/project.yml +14 -14
- package/tasks/reconcile.yml +4 -8
- package/tasks/roadmap.yml +9 -5
- package/tasks/scm.yml +36 -18
- package/tasks/scope-undo.yml +3 -1
- package/tasks/scope.yml +40 -26
- package/tasks/session.yml +4 -2
- package/tasks/slice.yml +8 -10
- package/tasks/spec.yml +10 -12
- package/tasks/swarm.yml +20 -10
- package/tasks/triage-actions.yml +32 -16
- package/tasks/triage-bootstrap.yml +4 -2
- package/tasks/triage-bulk.yml +20 -10
- package/tasks/triage-classify.yml +4 -2
- package/tasks/triage-queue.yml +12 -6
- package/tasks/triage-reconcile.yml +4 -2
- package/tasks/triage-scope-drift.yml +4 -2
- package/tasks/triage-scope.yml +4 -2
- package/tasks/triage-smoketest.yml +4 -2
- package/tasks/triage-subscribe.yml +8 -4
- package/tasks/triage-summary.yml +4 -2
- package/tasks/triage-welcome.yml +4 -2
- package/tasks/ts.yml +3 -1
- package/tasks/umbrella.yml +1 -7
- package/tasks/vbrief.yml +25 -17
- package/tasks/verify.yml +102 -50
- package/templates/agent-prompt-preamble.md +26 -23
- package/templates/agents-entry.md +33 -19
- package/vbrief/conformance/extensions/valid/extension-at-root.vbrief.json +31 -0
- package/vbrief/conformance/extensions/valid/nested-extension-value.vbrief.json +19 -0
- package/vbrief/schemas/xbrief-core-0.8.schema.json +786 -0
|
@@ -21,7 +21,7 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
|
21
21
|
## When to Use
|
|
22
22
|
|
|
23
23
|
- User says "set up deft", "configure deft", or "bootstrap my project"
|
|
24
|
-
- User asks to create USER.md, PROJECT-DEFINITION.
|
|
24
|
+
- User asks to create USER.md, PROJECT-DEFINITION.xbrief.json, or a specification
|
|
25
25
|
- User clones a deft-enabled repo for the first time with no config
|
|
26
26
|
|
|
27
27
|
## Pre-Cutover Detection Guard
|
|
@@ -32,9 +32,9 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
|
32
32
|
|
|
33
33
|
A project is **pre-cutover** if ANY of the following are true. This prose mirrors the executable helper in `scripts/_precutover.py`; when in doubt, the helper is canonical.
|
|
34
34
|
|
|
35
|
-
1. `SPECIFICATION.md` exists 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:
|
|
35
|
+
1. `SPECIFICATION.md` exists 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: xbrief/specification.xbrief.json -->`, and `xbrief/specification.xbrief.json` plus all five lifecycle folders exist.
|
|
36
36
|
2. `PROJECT.md` exists and contains neither the legacy `<!-- deft:deprecated-redirect -->` sentinel NOR the current `Purpose: deprecation redirect` canonical-banner marker (same one-release-cycle grace window).
|
|
37
|
-
3. `
|
|
37
|
+
3. `xbrief/specification.xbrief.json` exists but the lifecycle folders (`xbrief/proposed/`, `xbrief/pending/`, `xbrief/active/`, `xbrief/completed/`, `xbrief/cancelled/`) do NOT exist
|
|
38
38
|
|
|
39
39
|
### Action on Detection
|
|
40
40
|
|
|
@@ -44,10 +44,10 @@ A project is **pre-cutover** if ANY of the following are true. This prose mirror
|
|
|
44
44
|
|
|
45
45
|
! Include specific details about what was detected:
|
|
46
46
|
|
|
47
|
-
- Missing lifecycle folders: "Create lifecycle folders via the frozen-release migrator on v0.59.0, or manually add `
|
|
47
|
+
- Missing lifecycle folders: "Create lifecycle folders via the frozen-release migrator on v0.59.0, or manually add `xbrief/{proposed,pending,active,completed,cancelled}/` after migrating narratives"
|
|
48
48
|
- `SPECIFICATION.md` with real content: "SPECIFICATION.md contains non-redirect content — migrate on pinned v0.59.0 before upgrading to current npm"
|
|
49
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.
|
|
50
|
+
- Missing `PROJECT-DEFINITION.xbrief.json`: "Run `task project:render` after document-model migration completes"
|
|
51
51
|
|
|
52
52
|
### Preflight (optional diagnostic)
|
|
53
53
|
|
|
@@ -59,15 +59,15 @@ A project is **pre-cutover** if ANY of the following are true. This prose mirror
|
|
|
59
59
|
|
|
60
60
|
### Greenfield Projects (No Migration Needed)
|
|
61
61
|
|
|
62
|
-
! For new projects (no existing `SPECIFICATION.md`, `PROJECT.md`, or `
|
|
62
|
+
! For new projects (no existing `SPECIFICATION.md`, `PROJECT.md`, or `xbrief/specification.xbrief.json`), the guard passes silently and setup proceeds normally.
|
|
63
63
|
|
|
64
|
-
! Greenfield setup creates the full
|
|
64
|
+
! Greenfield setup creates the full xBRIEF-centric structure from scratch:
|
|
65
65
|
|
|
66
|
-
1. `./
|
|
67
|
-
2. `./
|
|
68
|
-
3. First scope
|
|
66
|
+
1. `./xbrief/` directory with all 5 lifecycle subdirectories: `proposed/`, `pending/`, `active/`, `completed/`, `cancelled/`
|
|
67
|
+
2. `./xbrief/PROJECT-DEFINITION.xbrief.json` generated from Phase 2 interview results
|
|
68
|
+
3. First scope xBRIEF created in `proposed/` or `pending/` depending on Phase 3 interview outcome
|
|
69
69
|
|
|
70
|
-
~ This is already handled by Phase 2 Output Path (creates `./
|
|
70
|
+
~ This is already handled by Phase 2 Output Path (creates `./xbrief/` and lifecycle subfolders) and Phase 3 Output (creates scope xBRIEFs in lifecycle folders). The guard ensures migrating projects are redirected before reaching these phases.
|
|
71
71
|
|
|
72
72
|
### Migration safety flags (frozen v0.59.0 release only)
|
|
73
73
|
|
|
@@ -94,7 +94,7 @@ When guiding an operator through migration on the pinned release, mention the mi
|
|
|
94
94
|
|
|
95
95
|
- ! If `$DEFT_USER_PATH` is set, it takes precedence on any platform
|
|
96
96
|
- ! Create parent directories as needed when writing USER.md
|
|
97
|
-
- ~ `$DEFT_PROJECT_PATH` overrides the default project config path (`./
|
|
97
|
+
- ~ `$DEFT_PROJECT_PATH` overrides the default project config path (`./xbrief/PROJECT-DEFINITION.xbrief.json`) if set
|
|
98
98
|
|
|
99
99
|
## Agent Behavior
|
|
100
100
|
|
|
@@ -150,7 +150,7 @@ VBA (Excel macros), VHDL, Visual Basic (.NET), Zig, 6502-DASM
|
|
|
150
150
|
|
|
151
151
|
**Goal:** Personal preferences file with two sections:
|
|
152
152
|
- **Personal** — always wins over everything (name, custom rules)
|
|
153
|
-
- **Defaults** — fallback values that PROJECT-DEFINITION.
|
|
153
|
+
- **Defaults** — fallback values that PROJECT-DEFINITION.xbrief.json can override (strategy, coverage)
|
|
154
154
|
|
|
155
155
|
- ~ Skip if USER.md exists at the platform-appropriate path (see Platform Detection) and user doesn't want to overwrite
|
|
156
156
|
- ⊗ Scan filesystem beyond checking that one path
|
|
@@ -219,7 +219,7 @@ Wait for answer. Then follow the track below.
|
|
|
219
219
|
|
|
220
220
|
**Track 3 (non-technical) — 2 steps:**
|
|
221
221
|
- Step 1: Ask their name
|
|
222
|
-
- Step 2: Ask what they're building (brief description — used for PROJECT-DEFINITION.
|
|
222
|
+
- Step 2: Ask what they're building (brief description — used for PROJECT-DEFINITION.xbrief.json later)
|
|
223
223
|
- Set defaults: strategy = "interview", coverage = 85%, all meta-guidelines included
|
|
224
224
|
|
|
225
225
|
### Output Path
|
|
@@ -239,7 +239,7 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
|
239
239
|
## Personal (always wins)
|
|
240
240
|
|
|
241
241
|
Settings in this section have HIGHEST precedence — override all other deft rules,
|
|
242
|
-
including PROJECT-DEFINITION.
|
|
242
|
+
including PROJECT-DEFINITION.xbrief.json.
|
|
243
243
|
|
|
244
244
|
**Name**: Address the user as: **{name}**
|
|
245
245
|
|
|
@@ -248,7 +248,7 @@ including PROJECT-DEFINITION.vbrief.json.
|
|
|
248
248
|
|
|
249
249
|
## Defaults (fallback)
|
|
250
250
|
|
|
251
|
-
Settings in this section are fallback defaults. PROJECT-DEFINITION.
|
|
251
|
+
Settings in this section are fallback defaults. PROJECT-DEFINITION.xbrief.json overrides these
|
|
252
252
|
for project-scoped settings (strategy, coverage).
|
|
253
253
|
|
|
254
254
|
**Default Strategy**: [{strategy name}](../strategies/{strategy-file}.md)
|
|
@@ -276,14 +276,14 @@ for project-scoped settings (strategy, coverage).
|
|
|
276
276
|
|
|
277
277
|
---
|
|
278
278
|
|
|
279
|
-
## Phase 2 — Project Configuration (PROJECT-DEFINITION.
|
|
279
|
+
## Phase 2 — Project Configuration (PROJECT-DEFINITION.xbrief.json)
|
|
280
280
|
|
|
281
|
-
**Goal:** Project-specific configuration — tech stack, type, quality standards — written as a
|
|
281
|
+
**Goal:** Project-specific configuration — tech stack, type, quality standards — written as a xBRIEF file at `./xbrief/PROJECT-DEFINITION.xbrief.json`.
|
|
282
282
|
|
|
283
|
-
! **Path Resolution Anchor**: Resolve ALL paths relative to the user's working directory (pwd) at skill entry -- never relative to the skill file location, AGENTS.md location, or any framework directory (e.g. `./deft/`). When deft is cloned as a subdirectory, the skill file lives inside the clone but all project artifacts (`./
|
|
283
|
+
! **Path Resolution Anchor**: Resolve ALL paths relative to the user's working directory (pwd) at skill entry -- never relative to the skill file location, AGENTS.md location, or any framework directory (e.g. `./deft/`). When deft is cloned as a subdirectory, the skill file lives inside the clone but all project artifacts (`./xbrief/PROJECT-DEFINITION.xbrief.json`, build files, etc.) must be resolved from the user's pwd.
|
|
284
284
|
|
|
285
|
-
- ~ Skip if `./
|
|
286
|
-
- ⊗ Count `./deft/PROJECT-DEFINITION.
|
|
285
|
+
- ~ Skip if `./xbrief/PROJECT-DEFINITION.xbrief.json` exists (or `$DEFT_PROJECT_PATH` if set) and user doesn't want to replace
|
|
286
|
+
- ⊗ Count `./deft/PROJECT-DEFINITION.xbrief.json` or `./deft/core/project.md` as the user's project config — those are framework-internal
|
|
287
287
|
|
|
288
288
|
### Inference
|
|
289
289
|
|
|
@@ -365,9 +365,9 @@ apply here too. Do not combine questions. See `skills/deft-directive-interview/S
|
|
|
365
365
|
|
|
366
366
|
! Default to option 2 (enforce). Explicit affirmative on option 1 is required to opt out -- a broad `proceed` does NOT satisfy this gate. The same affirmative-only rule applies as in `/deft:change` (`yes`, `confirmed`, `approve`).
|
|
367
367
|
|
|
368
|
-
! Write the answer to `plan.policy.allowDirectCommitsToMaster` (typed boolean) on the PROJECT-DEFINITION
|
|
368
|
+
! Write the answer to `plan.policy.allowDirectCommitsToMaster` (typed boolean) on the PROJECT-DEFINITION xBRIEF. Default `false` (enforce branches) when the user picks option 2 OR omits the question entirely. Writing this typed surface is what the framework reads going forward; agents MUST NOT write the legacy free-form `Allow direct commits to master:` narrative key (#746 part A migrates the legacy narrative away).
|
|
369
369
|
|
|
370
|
-
! **Re-running the interview detects the existing flag (#746 part G2):** If `
|
|
370
|
+
! **Re-running the interview detects the existing flag (#746 part G2):** If `xbrief/PROJECT-DEFINITION.xbrief.json` already exists and has `plan.policy.allowDirectCommitsToMaster` set, the interview MUST surface the current value (e.g. "Current setting: `allowDirectCommitsToMaster=false` (branch-protection ON)") and ask whether to keep it or change it before re-prompting. Do not silently overwrite an existing typed value.
|
|
371
371
|
|
|
372
372
|
! **Slash-command alternatives (#746 part G2):** Once the project is set up, the typed flag can also be flipped via slash commands wrapping `task policy:*`:
|
|
373
373
|
- `/deft:policy:show` -- display the current resolved policy and source
|
|
@@ -389,11 +389,11 @@ apply here too. Do not combine questions. See `skills/deft-directive-interview/S
|
|
|
389
389
|
|
|
390
390
|
### Output Path
|
|
391
391
|
|
|
392
|
-
`./
|
|
392
|
+
`./xbrief/PROJECT-DEFINITION.xbrief.json` (or `$DEFT_PROJECT_PATH` if set). Create `./xbrief/` directory and lifecycle subfolders (`proposed/`, `pending/`, `active/`, `completed/`, `cancelled/`) if they don't exist.
|
|
393
393
|
|
|
394
394
|
### GitHub PR Template Scaffolding (#531)
|
|
395
395
|
|
|
396
|
-
! Before writing `PROJECT-DEFINITION.
|
|
396
|
+
! Before writing `PROJECT-DEFINITION.xbrief.json`, offer to scaffold a default GitHub PR template so downstream skills (`deft-directive-refinement` Pre-Flight, `deft-directive-pre-pr`) can satisfy their `.github/PULL_REQUEST_TEMPLATE.md` checks without blocking.
|
|
397
397
|
|
|
398
398
|
1. ! Ask the user with a deterministic numbered menu: "Create a default GitHub PR template at `.github/PULL_REQUEST_TEMPLATE.md`?" Options: `1. Yes`, `2. No`, `3. Discuss`, `4. Back`. Use a structured question tool only if those numeric labels remain visible and are returned as numeric selections or exact displayed option text.
|
|
399
399
|
2. ! If the user accepts AND `.github/PULL_REQUEST_TEMPLATE.md` does NOT already exist: copy `templates/PULL_REQUEST_TEMPLATE.md` (shipped with deft) to `./.github/PULL_REQUEST_TEMPLATE.md` in the consumer project. Create `.github/` if it does not exist.
|
|
@@ -404,7 +404,7 @@ apply here too. Do not combine questions. See `skills/deft-directive-interview/S
|
|
|
404
404
|
|
|
405
405
|
### Headless Coverage Warning — display-bound GUI entry points (#1027)
|
|
406
406
|
|
|
407
|
-
! The trigger is a **display-bound GUI event loop** (pygame, tkinter, PyQt/PySide, Kivy, Electron) that cannot run without a real display — typically a **Desktop App** project type, or a TUI that embeds such a GUI. Terminal-UI frameworks (textual, urwid, blessed, ncurses) run in the terminal and DO support headless testing (e.g. textual's `App.run_async()` + `Pilot`), so a standard TUI is NOT in scope — do not omit its coverage. The concrete commands below assume a **Python** GUI stack (pygame/tkinter); the same "omit the un-runnable loop, test the logic" principle applies to non-Python desktop stacks (Electron/JS, .NET/WPF, Qt/C++) using that language's own headless-test and coverage-exclusion tooling. When the Phase 2 project type resolves to a display-bound GUI project, warn the user BEFORE writing `PROJECT-DEFINITION.
|
|
407
|
+
! The trigger is a **display-bound GUI event loop** (pygame, tkinter, PyQt/PySide, Kivy, Electron) that cannot run without a real display — typically a **Desktop App** project type, or a TUI that embeds such a GUI. Terminal-UI frameworks (textual, urwid, blessed, ncurses) run in the terminal and DO support headless testing (e.g. textual's `App.run_async()` + `Pilot`), so a standard TUI is NOT in scope — do not omit its coverage. The concrete commands below assume a **Python** GUI stack (pygame/tkinter); the same "omit the un-runnable loop, test the logic" principle applies to non-Python desktop stacks (Electron/JS, .NET/WPF, Qt/C++) using that language's own headless-test and coverage-exclusion tooling. When the Phase 2 project type resolves to a display-bound GUI project, warn the user BEFORE writing `PROJECT-DEFINITION.xbrief.json` (adapt the wording to the project's language):
|
|
408
408
|
|
|
409
409
|
> "Heads up: pygame/tkinter event loops can't be tested headlessly, so the display-bound entry point (e.g. `src/ui.py`) reports near-zero coverage and drags the overall percentage below the 85% threshold. I recommend excluding the UI entry point from coverage measurement and keeping it thin — push testable logic (state, scoring, input handling) into separate modules."
|
|
410
410
|
|
|
@@ -427,11 +427,11 @@ omit = [
|
|
|
427
427
|
|
|
428
428
|
### Template
|
|
429
429
|
|
|
430
|
-
! The output MUST conform to the canonical
|
|
430
|
+
! The output MUST conform to the canonical xBRIEF v0.6 schema (`xbrief/schemas/xbrief-core.schema.json`, strict `const: "0.6"`). See [`../../conventions/references.md`](../../conventions/references.md).
|
|
431
431
|
|
|
432
432
|
```json
|
|
433
433
|
{
|
|
434
|
-
"
|
|
434
|
+
"xBRIEFInfo": {
|
|
435
435
|
"version": "0.6",
|
|
436
436
|
"author": "agent:deft-directive-setup",
|
|
437
437
|
"description": "Project identity gestalt",
|
|
@@ -455,7 +455,7 @@ omit = [
|
|
|
455
455
|
```
|
|
456
456
|
|
|
457
457
|
- ! All `narratives` values MUST be plain strings — never objects or arrays
|
|
458
|
-
- ! `items` starts empty — populated as scope
|
|
458
|
+
- ! `items` starts empty — populated as scope xBRIEFs are created in lifecycle folders
|
|
459
459
|
|
|
460
460
|
### Then
|
|
461
461
|
|
|
@@ -464,7 +464,7 @@ omit = [
|
|
|
464
464
|
|
|
465
465
|
### Follow-up: triage onboarding (#1143)
|
|
466
466
|
|
|
467
|
-
- ~ After Phase 2 writes `PROJECT-DEFINITION.
|
|
467
|
+
- ~ After Phase 2 writes `PROJECT-DEFINITION.xbrief.json`, recommend `task triage:welcome` to the user as the single chained command for picking up the v0.27 triage surface. The N3 ritual (#1143) is the consolidating onboarding step for the #1119 governance swarm verbs (`task triage:bootstrap` / `task triage:scope` / `plan.policy.wipCap` writes / `task scope:demote --batch` relief / `task triage:summary`); without it consumers must learn each verb individually from the v0.27 release notes.
|
|
468
468
|
- ~ `task triage:welcome` is idempotent and detection-bound -- each phase emits an informational stderr line and skips when its precondition is already satisfied, so a re-run after a partial completion resumes cleanly. The destructive phases (subscription / `wipCap` writes, optional WIP-relief invocation) are gated by numbered-menu prompts per [`../../contracts/deterministic-questions.md`](../../contracts/deterministic-questions.md). See [`../../UPGRADING.md`](../../UPGRADING.md) `## From v0.26.x -> v0.27` for the full walkthrough.
|
|
469
469
|
- ? The recommendation is informational, not a hard gate -- consumers who plan to wire triage manually MAY skip the ritual and call the individual verbs in any order; the framework defaults stay fail-open per the umbrella `#1119 §12 framework-vs-consumer-config boundary`.
|
|
470
470
|
|
|
@@ -472,12 +472,12 @@ omit = [
|
|
|
472
472
|
|
|
473
473
|
## Phase 3 — Specification
|
|
474
474
|
|
|
475
|
-
**Goal:** Generate an implementable spec using the strategy chosen in Phase 2, producing scope
|
|
475
|
+
**Goal:** Generate an implementable spec using the strategy chosen in Phase 2, producing scope xBRIEFs in `xbrief/proposed/` and PROJECT-DEFINITION narratives for human approval — greenfield v0.20 does not create `specification.xbrief.json`.
|
|
476
476
|
|
|
477
477
|
! **Path Resolution Anchor**: Same rule as Phase 2 -- resolve ALL paths relative to the user's pwd at skill entry, never relative to the skill file, AGENTS.md, or any framework directory.
|
|
478
478
|
|
|
479
|
-
- ~ Skip if user already has scope
|
|
480
|
-
- ! Check `./
|
|
479
|
+
- ~ Skip if user already has scope xBRIEFs in `./xbrief/` they're happy with
|
|
480
|
+
- ! Check `./xbrief/specification.xbrief.json` or `./xbrief/proposed/` for existing scope xBRIEFs
|
|
481
481
|
- ⊗ Count ANY file inside `./deft/` as the project's spec — those are framework-internal
|
|
482
482
|
(e.g. `deft/PROJECT.md`, `deft/specs/`, `deft/templates/`, `deft/core/project.md`
|
|
483
483
|
are all part of the framework, NOT the user's project)
|
|
@@ -487,18 +487,18 @@ omit = [
|
|
|
487
487
|
! Before proceeding with the strategy gate, ask the onboarding question:
|
|
488
488
|
|
|
489
489
|
> "Are you adding a scope to this project or starting a new specification?"
|
|
490
|
-
> 1. Adding scope to existing project [default if `./
|
|
491
|
-
> 2. Starting a new project specification [default if no specification or scope
|
|
490
|
+
> 1. Adding scope to existing project [default if `./xbrief/specification.xbrief.json` exists or scope xBRIEFs found in lifecycle folders]
|
|
491
|
+
> 2. Starting a new project specification [default if no specification or scope xBRIEFs exist]
|
|
492
492
|
|
|
493
|
-
- ! Default based on repo state: if specification.
|
|
494
|
-
- ! If adding scope: skip the full interview, create a new scope
|
|
493
|
+
- ! Default based on repo state: if specification.xbrief.json exists or any lifecycle folder has scope xBRIEFs, default to "Adding scope"; otherwise default to "Starting new"
|
|
494
|
+
- ! If adding scope: skip the full interview, create a new scope xBRIEF in `./xbrief/proposed/` with the user's description, then exit
|
|
495
495
|
- ! If starting new: proceed to the Strategy Gate below
|
|
496
496
|
|
|
497
497
|
### ⚠️ MANDATORY: Strategy Gate — Do This First
|
|
498
498
|
|
|
499
499
|
! **STOP.** You MUST determine the correct strategy before doing anything else.
|
|
500
500
|
|
|
501
|
-
1. ! Open `./
|
|
501
|
+
1. ! Open `./xbrief/PROJECT-DEFINITION.xbrief.json` (the file written in Phase 2)
|
|
502
502
|
2. ! Find the `narratives.Strategy` value
|
|
503
503
|
3. ! Extract the strategy name from the narrative
|
|
504
504
|
|
|
@@ -510,8 +510,8 @@ omit = [
|
|
|
510
510
|
2. ! Begin the strategy's workflow immediately — ask its first question
|
|
511
511
|
3. ! **STOP reading this section** — do NOT use the interview process below
|
|
512
512
|
|
|
513
|
-
- ⊗ Default to interview without reading PROJECT-DEFINITION.
|
|
514
|
-
- ⊗ Continue reading below when PROJECT-DEFINITION.
|
|
513
|
+
- ⊗ Default to interview without reading PROJECT-DEFINITION.xbrief.json
|
|
514
|
+
- ⊗ Continue reading below when PROJECT-DEFINITION.xbrief.json specifies a non-interview strategy
|
|
515
515
|
- ⊗ Assume interview because the sections below describe the interview process
|
|
516
516
|
- ⊗ Fabricate justification for using interview when the user chose a different strategy
|
|
517
517
|
- ⊗ Announce the strategy choice and then stop — you must immediately read the file and start
|
|
@@ -525,14 +525,14 @@ omit = [
|
|
|
525
525
|
! After hearing what the user wants to build and their feature list, determine
|
|
526
526
|
project complexity per [strategies/interview.md](../../strategies/interview.md#sizing-gate).
|
|
527
527
|
|
|
528
|
-
- ! Check `PROJECT-DEFINITION.
|
|
528
|
+
- ! Check `PROJECT-DEFINITION.xbrief.json` narratives for `Light` or `Full` — if declared, use that path
|
|
529
529
|
- ! If not declared, propose a size and **ask the user to confirm in a dedicated message**
|
|
530
530
|
- ! **Wait for the user's response** before asking any interview questions
|
|
531
531
|
- ⊗ Combine the sizing proposal with the first interview question
|
|
532
532
|
- ⊗ Proceed to interview questions before the user has confirmed the path
|
|
533
533
|
|
|
534
|
-
**Light** (small/medium): Interview → `specification.
|
|
535
|
-
**Full** (large/complex): Interview → rich narratives in `specification.
|
|
534
|
+
**Light** (small/medium): Interview → `specification.xbrief.json` with slim narratives (Overview + Architecture) → scope xBRIEFs in `xbrief/proposed/`.
|
|
535
|
+
**Full** (large/complex): Interview → rich narratives in `specification.xbrief.json` (user approval) → scope xBRIEFs with traceability.
|
|
536
536
|
|
|
537
537
|
### Interview Process (interview strategy)
|
|
538
538
|
|
|
@@ -564,12 +564,12 @@ Per [strategies/interview.md](../../strategies/interview.md#interview-rules-shar
|
|
|
564
564
|
|
|
565
565
|
### Output — Light Path
|
|
566
566
|
|
|
567
|
-
1. ! Write `./
|
|
567
|
+
1. ! Write `./xbrief/specification.xbrief.json` with `"xBRIEFInfo": { "version": "0.6" }`, `status: draft`, and slim narratives:
|
|
568
568
|
- `Overview`: Brief project summary
|
|
569
569
|
- `Architecture`: System design description
|
|
570
|
-
2. ! Create scope
|
|
571
|
-
- Each scope
|
|
572
|
-
- Each MUST use `"
|
|
570
|
+
2. ! Create scope xBRIEFs in `./xbrief/proposed/` for each identified work item
|
|
571
|
+
- Each scope xBRIEF follows the `YYYY-MM-DD-descriptive-slug.xbrief.json` filename convention (slug rules in [`../../conventions/vbrief-filenames.md`](../../conventions/vbrief-filenames.md))
|
|
572
|
+
- Each MUST use `"xBRIEFInfo": { "version": "0.6" }`
|
|
573
573
|
- Each MUST include embedded Requirements (FR-N, NFR-N) in its `narrative`
|
|
574
574
|
- Each task SHOULD reference which FR/NFR it implements via `narrative.Traces`
|
|
575
575
|
- When the scope originates from a GitHub issue, include a `references` entry in the canonical form (see [`../../conventions/references.md`](../../conventions/references.md)):
|
|
@@ -577,17 +577,17 @@ Per [strategies/interview.md](../../strategies/interview.md#interview-rules-shar
|
|
|
577
577
|
"references": [
|
|
578
578
|
{
|
|
579
579
|
"uri": "https://github.com/{owner}/{repo}/issues/{N}",
|
|
580
|
-
"type": "x-
|
|
580
|
+
"type": "x-xbrief/github-issue",
|
|
581
581
|
"title": "Issue #{N}: {issue title}"
|
|
582
582
|
}
|
|
583
583
|
]
|
|
584
584
|
```
|
|
585
|
-
3. ! Summarize decisions, ask user to review the
|
|
586
|
-
4. ! On approval, update `specification.
|
|
585
|
+
3. ! Summarize decisions, ask user to review the xBRIEF narratives
|
|
586
|
+
4. ! On approval, update `specification.xbrief.json` status to `approved`
|
|
587
587
|
- ⊗ Create a separate PRD.md on the Light path
|
|
588
588
|
- ⊗ Generate an authoritative PRD.md — if needed, users run `task prd:render`
|
|
589
589
|
|
|
590
|
-
! The
|
|
590
|
+
! The xBRIEF files MUST conform to `xbrief/schemas/xbrief-core.schema.json` (v0.6):
|
|
591
591
|
|
|
592
592
|
- ! All `narratives` and `narrative` values MUST be plain strings — never objects or arrays
|
|
593
593
|
- ! Nested children within a PlanItem use `items` (v0.6 preferred field); `subItems` is the deprecated legacy alias kept for backward compatibility only
|
|
@@ -595,7 +595,7 @@ Per [strategies/interview.md](../../strategies/interview.md#interview-rules-shar
|
|
|
595
595
|
|
|
596
596
|
### Output — Full Path
|
|
597
597
|
|
|
598
|
-
1. ! Write rich narratives to `./
|
|
598
|
+
1. ! Write rich narratives to `./xbrief/specification.xbrief.json` with `"xBRIEFInfo": { "version": "0.6" }`, `plan.status: draft`, and these narrative keys:
|
|
599
599
|
- `ProblemStatement`: What problem this project solves
|
|
600
600
|
- `Goals`: High-level project goals
|
|
601
601
|
- `UserStories`: User stories in standard format
|
|
@@ -603,39 +603,39 @@ Per [strategies/interview.md](../../strategies/interview.md#interview-rules-shar
|
|
|
603
603
|
- `SuccessMetrics`: Measurable success criteria
|
|
604
604
|
- `Architecture`: System design and technical architecture
|
|
605
605
|
- `Overview`: Brief project summary
|
|
606
|
-
2. ! **Human approval gate**: Present the
|
|
606
|
+
2. ! **Human approval gate**: Present the xBRIEF draft narratives to the user for review — reviewing the `specification.xbrief.json` narratives IS the approval step (replaces the former PRD.md review). The user may request changes before approving.
|
|
607
607
|
3. ! On approval, update `status` to `approved` and proceed to downstream generation
|
|
608
|
-
4. ! Create scope
|
|
609
|
-
- ! Scope
|
|
608
|
+
4. ! Create scope xBRIEFs in `./xbrief/proposed/` with traceability to requirement IDs from the narratives
|
|
609
|
+
- ! Scope xBRIEFs MUST trace tasks back to requirement IDs (FR-1, NFR-1) from the `Requirements` narrative
|
|
610
610
|
- ⊗ Generate an authoritative PRD.md — if needed, users run `task prd:render`
|
|
611
611
|
|
|
612
612
|
**Spec Structure (both paths):**
|
|
613
613
|
- ! Overview, Architecture
|
|
614
|
-
- ! Implementation Plan: scope
|
|
615
|
-
- ! Explicit dependency mapping between scopes (via
|
|
614
|
+
- ! Implementation Plan: scope xBRIEFs in `xbrief/proposed/` with phases and dependencies
|
|
615
|
+
- ! Explicit dependency mapping between scopes (via xBRIEF `edges` or `references`)
|
|
616
616
|
- ~ Scopes designed for parallel work by multiple agents
|
|
617
617
|
- ! Testing Strategy and Deployment captured in narratives
|
|
618
618
|
- ⊗ Write code — specification only
|
|
619
619
|
|
|
620
620
|
### Lifecycle Bridge to Downstream Skills (#1025)
|
|
621
621
|
|
|
622
|
-
! Scope
|
|
622
|
+
! Scope xBRIEFs created by Phase 3 (both Light and Full paths) AND by the Onboarding Question "Adding scope to existing project" branch land in `xbrief/proposed/` with `plan.status: proposed`. This is the canonical deposit point per the deft lifecycle (`proposed -> pending -> active -> completed`). The #810 implementation-intent gate (`task xbrief:preflight`) and the deft-directive-swarm Phase 0 Step 1 preflight BOTH require candidate xBRIEFs to live in `xbrief/active/` with `plan.status == "running"` before any agent can dispatch against them; setup deliberately stops at `proposed/` because the lifecycle commitment (promote + activate) belongs to the downstream skill, not the setup interview.
|
|
623
623
|
|
|
624
624
|
! Surface this bridge to the user in the Phase 3 → next-skill handoff so they are not surprised by a wholesale preflight rejection downstream:
|
|
625
625
|
|
|
626
|
-
- **If the next step is `skills/deft-directive-swarm/SKILL.md`**: the swarm skill's Phase 0 Step 0.5 (Lifecycle Bridge -- Promote and Activate Proposed Scope
|
|
627
|
-
- **If the next step is `skills/deft-directive-refinement/SKILL.md`**: the refinement skill's Phase 4 (Promote/Demote) owns the same `task scope:promote` / `task scope:activate` surface and runs the bridge as part of the refinement loop. The refinement skill MAY leave
|
|
628
|
-
- **If the user wants to invoke an implementation agent directly via `skills/deft-directive-build/SKILL.md` or `start_agent`**: the bridge MUST be run manually before dispatch -- `task scope:promote --
|
|
626
|
+
- **If the next step is `skills/deft-directive-swarm/SKILL.md`**: the swarm skill's Phase 0 Step 0.5 (Lifecycle Bridge -- Promote and Activate Proposed Scope xBRIEFs) is the canonical bridge. The monitor will scan `xbrief/proposed/` and `xbrief/pending/`, present in-scope candidates, and run `task scope:promote -- <path>` then `task scope:activate -- <path>` on explicit user approval. No manual operator action is required ahead of the swarm invocation.
|
|
627
|
+
- **If the next step is `skills/deft-directive-refinement/SKILL.md`**: the refinement skill's Phase 4 (Promote/Demote) owns the same `task scope:promote` / `task scope:activate` surface and runs the bridge as part of the refinement loop. The refinement skill MAY leave xBRIEFs in `pending/` deliberately when they are queued for prioritisation rather than immediate dispatch.
|
|
628
|
+
- **If the user wants to invoke an implementation agent directly via `skills/deft-directive-build/SKILL.md` or `start_agent`**: the bridge MUST be run manually before dispatch -- `task scope:promote -- xbrief/proposed/<file>` then `task scope:activate -- xbrief/pending/<file>`. Both commands are idempotent and exit 0 on no-op (see `scripts/scope_lifecycle.py`). The #810 preflight gate (`task xbrief:preflight -- <active-path>`) will exit 0 only after the activate step.
|
|
629
629
|
|
|
630
630
|
⊗ Auto-run `task scope:promote` or `task scope:activate` from the setup skill on the Phase 3 outputs. The lifecycle commitment belongs to the user ("I am ready to swarm/build on this scope"), not the setup interview; silent promotion would clear the #810 implementation-intent gate without explicit user authorisation and bypass the deterministic-questions contract that protects every other Phase 3 transition.
|
|
631
631
|
|
|
632
|
-
⊗ Drop the user at the end of Phase 3 with scope
|
|
632
|
+
⊗ Drop the user at the end of Phase 3 with scope xBRIEFs in `xbrief/proposed/` and no forward pointer to the bridge. Without this section the user discovers the gap at runtime when the swarm Phase 0 Step 1 preflight rejects every candidate (`Invalid transition: 'activate' requires file in pending/`), as in the originating 2026-05-10 first-session consumer tic-tac-toe swarm (issue #1025).
|
|
633
633
|
|
|
634
634
|
### End-of-Phase-3 Export Prompt (project:export-spec)
|
|
635
635
|
|
|
636
|
-
! After scope
|
|
636
|
+
! After scope xBRIEFs are written to `xbrief/proposed/` and PROJECT-DEFINITION is populated, but BEFORE handing off to `deft-directive-build` (or advancing speckit Phase 3 → Phase 4), ask the user whether to generate human-readable exports. Greenfield v0.20 projects export via `task project:export-spec` (not legacy `task spec:render`). This replaces the invisible skip-if-absent behavior of `task check` (#398), closes the greenfield gap (#433), and is the Phase 3 → Phase 4 transition gate required by [strategies/speckit.md Post-Phase 3 Transition Gate](../../strategies/speckit.md#post-phase-3-transition-gate-export-for-review) (#432 / #2013).
|
|
637
637
|
|
|
638
|
-
1. ! Prompt: "Your scope
|
|
638
|
+
1. ! Prompt: "Your scope xBRIEFs are ready. Generate a stakeholder-facing spec export and/or `PRD.md` now? (recommended for stakeholder review)"
|
|
639
639
|
1. Yes — export spec (+ PRD if selected)
|
|
640
640
|
2. Spec export only (`SPECIFICATION.md`)
|
|
641
641
|
3. `PRD.md` only
|
|
@@ -644,9 +644,9 @@ Per [strategies/interview.md](../../strategies/interview.md#interview-rules-shar
|
|
|
644
644
|
- `task project:export-spec` → writes `SPECIFICATION.md` from PROJECT-DEFINITION + lifecycle scopes (greenfield default; stakeholder audience)
|
|
645
645
|
- `task project:export-spec -- --audience=internal` → same export but includes proposed scopes under `## Scope outlook` (use for setup/speckit internal handoff when proposed scopes need visibility)
|
|
646
646
|
- `task prd:render` → writes `PRD.md` (optional stakeholder review)
|
|
647
|
-
- Legacy `task spec:render` — migrated trees only (when `
|
|
648
|
-
3. ! If the user picked a speckit-strategy project: export is **mandatory** at this boundary — invoke `task project:export-spec` (with `--audience=internal` when proposed scopes exist) even if the user declined the prompt, because speckit Phase 3 → Phase 4 is gated on **export succeeded** (exit 0), not on `specification.
|
|
649
|
-
4. ! Confirm to the user which files were written and remind them that direct edits to `SPECIFICATION.md` / `PRD.md` are overwritten on the next export — edit
|
|
647
|
+
- Legacy `task spec:render` — migrated trees only (when `xbrief/specification.xbrief.json` exists); do NOT use on greenfield v0.20 projects
|
|
648
|
+
3. ! If the user picked a speckit-strategy project: export is **mandatory** at this boundary — invoke `task project:export-spec` (with `--audience=internal` when proposed scopes exist) even if the user declined the prompt, because speckit Phase 3 → Phase 4 is gated on **export succeeded** (exit 0), not on `specification.xbrief.json` approval.
|
|
649
|
+
4. ! Confirm to the user which files were written and remind them that direct edits to `SPECIFICATION.md` / `PRD.md` are overwritten on the next export — edit xBRIEF narratives in `xbrief/proposed/` and PROJECT-DEFINITION instead.
|
|
650
650
|
5. ~ If the user skipped export and is NOT on a speckit strategy, no-op and continue.
|
|
651
651
|
|
|
652
652
|
⊗ Advance a speckit project to Phase 4 without a successful `task project:export-spec` at this gate — export must succeed (exit 0) for the Phase 3 transition criterion.
|
|
@@ -662,7 +662,7 @@ Per [strategies/interview.md](../../strategies/interview.md#interview-rules-shar
|
|
|
662
662
|
|
|
663
663
|
## Warp Auto-Approve Warning
|
|
664
664
|
|
|
665
|
-
! **Recommended Warp setting**: Before running deft-directive-setup, ensure Warp's AI autonomy is set to **"Always ask"** in **AI -> Profile Settings**. When set to a higher autonomy level (e.g. "Auto-run"), Warp may silently self-answer interview questions without user input, producing garbage USER.md/PROJECT-DEFINITION.
|
|
665
|
+
! **Recommended Warp setting**: Before running deft-directive-setup, ensure Warp's AI autonomy is set to **"Always ask"** in **AI -> Profile Settings**. When set to a higher autonomy level (e.g. "Auto-run"), Warp may silently self-answer interview questions without user input, producing garbage USER.md/PROJECT-DEFINITION.xbrief.json with no error or warning. The post-interview confirmation gate (below) is the last line of defense, but prevention is better than detection.
|
|
666
666
|
|
|
667
667
|
## Post-Interview Confirmation Gate
|
|
668
668
|
|
|
@@ -674,15 +674,15 @@ Per [strategies/interview.md](../../strategies/interview.md#interview-rules-shar
|
|
|
674
674
|
4. ! If the user says `no`: re-display the values and ask which ones to correct, then re-confirm before writing
|
|
675
675
|
5. ! If any value appears to be auto-generated filler (e.g. repeated default text, placeholder strings, or values that echo the question prompt), warn the user explicitly: "Some values look like they may have been auto-filled rather than provided by you. Please review carefully."
|
|
676
676
|
|
|
677
|
-
⊗ Write USER.md, PROJECT-DEFINITION.
|
|
677
|
+
⊗ Write USER.md, PROJECT-DEFINITION.xbrief.json, specification.xbrief.json, or any other deft-directive-setup artifact without first displaying captured values and receiving explicit user confirmation.
|
|
678
678
|
⊗ Treat a broad "proceed" or "continue" as confirmation to write files -- the user must explicitly confirm the displayed values.
|
|
679
679
|
|
|
680
680
|
? **Yolo strategy carve-out**: When the user's chosen strategy is `yolo` (auto-pilot), the confirmation gate still applies but the agent (Johnbot) may self-confirm on the user's behalf by displaying the summary and immediately proceeding -- the user has already opted into auto-pilot by selecting yolo. The summary must still be displayed so the user can interrupt if values look wrong.
|
|
681
681
|
|
|
682
682
|
## Anti-Patterns
|
|
683
683
|
|
|
684
|
-
- ! When deft-directive-setup generates or updates USER.md or PROJECT-DEFINITION.
|
|
685
|
-
- ⊗ Generate a USER.md or PROJECT-DEFINITION.
|
|
684
|
+
- ! When deft-directive-setup generates or updates USER.md or PROJECT-DEFINITION.xbrief.json, the `deft_version` field MUST be set to the current framework version
|
|
685
|
+
- ⊗ Generate a USER.md or PROJECT-DEFINITION.xbrief.json without including the `deft_version` field
|
|
686
686
|
- ⊗ Explore codebase before Phase 1 questions
|
|
687
687
|
- ⊗ Read framework files before first question
|
|
688
688
|
- ⊗ Batch multiple questions into one message — ask one at a time, interview style
|