@deftai/directive-content 0.106.0 → 0.108.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.
Files changed (46) hide show
  1. package/Taskfile.yml +14 -1
  2. package/UPGRADING.md +24 -5
  3. package/commands.md +29 -4
  4. package/contracts/design-critique.md +369 -14
  5. package/contracts/issue-eval.md +77 -0
  6. package/contracts/path-write-fence.md +126 -1
  7. package/contracts/runtime-authority.md +2 -0
  8. package/contracts/scm-readiness.md +2 -2
  9. package/docs/delivery-attempt.md +2 -1
  10. package/docs/freshness-contract.md +6 -1
  11. package/docs/getting-started.md +10 -11
  12. package/docs/hook-runtime-unavailable.md +54 -0
  13. package/docs/orphan-active-verdict-basis.md +166 -0
  14. package/docs/scope-provenance.md +1 -1
  15. package/package.json +1 -1
  16. package/packs/skills/skills-pack-0.1.json +24 -10
  17. package/scm/github.md +65 -2
  18. package/skills/deft-directive-build/SKILL.md +2 -2
  19. package/skills/deft-directive-cost/SKILL.md +7 -11
  20. package/skills/deft-directive-design-critique/SKILL.md +22 -6
  21. package/skills/deft-directive-design-critique/references/motion-shape.md +19 -0
  22. package/skills/deft-directive-feedback/SKILL.md +11 -2
  23. package/skills/deft-directive-interview/SKILL.md +10 -10
  24. package/skills/deft-directive-issue-eval/SKILL.md +48 -0
  25. package/skills/deft-directive-release/SKILL.md +10 -6
  26. package/skills/deft-directive-review-cycle/SKILL.md +33 -0
  27. package/skills/deft-directive-setup/SKILL.md +53 -22
  28. package/skills/deft-directive-swarm/references/core-ops.md +4 -0
  29. package/skills/deft-directive-swarm/references/core-phase-1-2.md +1 -1
  30. package/skills/deft-directive-swarm/references/core-phase-3.md +3 -1
  31. package/skills/deft-directive-swarm/references/core-phase-4.md +11 -8
  32. package/skills/deft-directive-swarm/references/host-cursor.md +1 -0
  33. package/skills/deft-directive-swarm/references/host-grok-build.md +1 -0
  34. package/skills/deft-directive-triage/SKILL.md +3 -2
  35. package/tasks/engine.yml +4 -0
  36. package/tasks/feedback.yml +1 -1
  37. package/tasks/occupancy.yml +34 -1
  38. package/tasks/prd.yml +4 -5
  39. package/tasks/scm.yml +14 -2
  40. package/tasks/session.yml +13 -2
  41. package/tasks/toolchain.yml +2 -2
  42. package/tasks/triage-evaluate.yml +22 -0
  43. package/tasks/verify.yml +21 -1
  44. package/templates/agent-prompt-preamble.md +28 -4
  45. package/templates/agents-entry.md +10 -5
  46. package/templates/design-critique-brief.md +19 -5
package/scm/github.md CHANGED
@@ -306,7 +306,11 @@ auth.
306
306
  `--with-network` / `DEFT_SESSION_START_NETWORK=1`.
307
307
  - ! `deft scm:status` (alias `scm:readiness`) is the explicit probe verb:
308
308
  exit `0` ready / `1` not ready / `2` config. Flags: `--json`,
309
- `--deep` / `--shallow` / `--depth shallow|deep`.
309
+ `--deep` / `--shallow` / `--depth shallow|deep`, `--repo OWNER/REPO`,
310
+ `--expected-login`.
311
+ Deep validation derives the target repository and compares an expected
312
+ user login when one is supplied (#3665). GitHub App installation identity
313
+ is deferred to #3693.
310
314
  - ! When not ready, diagnostics MUST name the reason
311
315
  (`binary-absent` | `missing-token` | `unauthenticated` | ...) and list
312
316
  skipped gates (`triage:queue`, `issue:ingest`, `pr:*`, `reconcile:issues`,
@@ -334,8 +338,38 @@ auth.
334
338
  `deft github-auth-modes --json` validates API reachability and optional
335
339
  repo access.
336
340
 
341
+ ### Ambiguous Cursor runtime and the host-gh opt-in (#3859)
342
+
343
+ `CURSOR_AGENT` is set by local desktop Cursor, by Cursor-managed cloud VMs, and
344
+ by Windows "My Machines" workers, so it cannot decide the runtime by itself.
345
+
346
+ - ! Cursor-managed VMs serve a metadata API on `CURSOR_AGENT_SOCKET` whose
347
+ `agent/runtime` is `managed`. A positive read classifies `cloud-headless` at
348
+ higher precedence than any other Cursor signal **and** than the opt-in below.
349
+ - ⊗ Treat absence of that socket as proof of local desktop. Absence means "not
350
+ managed, or unreachable" and MUST NOT select host credentials -- that is the
351
+ marker-absence grant this rule exists to prevent.
352
+ - ! When `CURSOR_AGENT` is set and the probe does not report `managed`, the
353
+ runtime is **ambiguous**. Deft does not guess from `process.platform`. Host
354
+ credentials then require an explicit selection:
355
+ `DEFT_GITHUB_AUTH_MODE=host-gh`, set in the execution environment on a
356
+ machine you control. Dispatchers should export the same `github_auth_mode`
357
+ label they already record in the dispatch envelope.
358
+ - ! Absent that selection, behaviour is unchanged: the runtime stays
359
+ `cloud-headless` and SCM-dependent gates are skipped. The skip names its
360
+ reason (`runtime_mode_reason` in `scm:status --json`, and in the `[deft scm]`
361
+ session-start lines) and points at this opt-in.
362
+ - ⊗ Use an OS predicate (`process.platform === "win32"`) as a cloud
363
+ discriminator. Cursor's managed fleet being Ubuntu is a versioned fact about
364
+ a third party's infrastructure, not a runtime invariant.
365
+
366
+ Reason ids: `cursor-managed-runtime-probe`, `cursor-marker-runtime-ambiguous`,
367
+ `explicit-host-gh-selection`, `ci-marker`, `cursor-sandbox-marker`,
368
+ `no-runtime-marker`.
369
+
337
370
  Contract file: `content/contracts/scm-readiness.md`. Implementation:
338
- `packages/core/src/scm/readiness.ts`.
371
+ `packages/core/src/scm/readiness.ts`,
372
+ `packages/core/src/platform/cursor-managed-runtime.ts`.
339
373
 
340
374
  ## Windows / ASCII Conventions for Machine-Editable Sections
341
375
 
@@ -373,6 +407,35 @@ Agent `edit_files` operations can fail when structured file sections contain Uni
373
407
 
374
408
  **Mirror** (if using `triage:classify -- --mirror`): at least `triaged`; optional `triage:deferred` / `triage:archived` when `actionLabels` maps them
375
409
 
410
+ ### Consumer hard-blocker (`adoption-blocker`)
411
+
412
+ **Framework source (`deftai/directive` only).** Consumer kits do not ship this label; see `.github/ISSUE_LABELS.md`.
413
+
414
+ **Positive-only:** the `adoption-blocker` label means the issue is *classified as a blocker*. Its absence means *not classified*. Absence never means a workaround exists.
415
+
416
+ This is the canonical ranking label for **a Directive consumer cannot complete an intended flow and has no reasonable workaround**. The range is install, first session, update, `task check`, and ship -- not onboarding alone. Do not invent a second ranking label for that class.
417
+
418
+ **Title classification (the one sanctioned exception, #3713):** `BLOCKER` in the title is permitted for this class, and is the **only** classification allowed in an issue title. Every other classification stays label-only. Reason: the filing population cannot apply labels -- GitHub requires push access to set them at issue creation. The token is an inbound flare; it never writes `adoption-blocker`. A privileged actor applies the label after the body-evidence test below. Absence of the token does not mean "not a blocker." `task feedback:file --blocker` is the consumer filing path that carries the token and this evidence.
419
+
420
+ **Classification test** (all must hold, and a second person must be able to check them from the body):
421
+
422
+ 1. An intended consumer flow at a named version does not complete.
423
+ 2. Documented alternatives were tried and failed, or are not a reasonable workaround.
424
+ 3. Recovery cost is observed (time, lost work, or a stuck session), not inferred.
425
+
426
+ **Required body evidence** -- apply the label only when all four are present:
427
+
428
+ - affected consumer flow and version
429
+ - documented alternatives attempted, or why the documented alternatives are not a reasonable workaround
430
+ - observed recovery cost
431
+ - triage owner and date
432
+
433
+ **Upgrade path:** a hard stop on the upgrade flow is still a consumer hard stop. Apply `adoption-blocker` so it ranks. Also apply `Upgrade Blocker` as the upgrade-specific adjacent signal. `Upgrade Blocker` alone does not rank. A hard stop at `task check` or ship is `adoption-blocker` only.
434
+
435
+ **Not this label:** `status:blocked` means *this issue* waits on something else. `urgent` is priority; an issue may be `urgent` and still not a consumer hard stop.
436
+
437
+ **Ranking / display:** `plan.policy.triageRankingLabels` already lists `adoption-blocker` (after `blocks-merge` and `blocks-release-tag`). `triage:queue` prints `(label: adoption-blocker)` on matched rows. Confirm participation; do not add ranking code.
438
+
376
439
  ### Post-1.0.0 Issue Linking
377
440
 
378
441
  Following a v1.0.0 release, commits:
@@ -107,7 +107,7 @@ The gate exits 0 only when the candidate xBRIEF lives in `xbrief/active/` AND `p
107
107
 
108
108
  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.
109
109
 
110
- 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.
110
+ 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 -->`, all five lifecycle folders exist, and its `<!-- Source of truth: ... -->` marker names an authority artifact that exists: either `xbrief/specification.xbrief.json` for full-spec compatibility or `xbrief/PROJECT-DEFINITION.xbrief.json` for greenfield authority (legacy `vbrief/...` aliases remain read-compatible).
111
111
  2. `PROJECT.md` exists and contains neither the legacy `<!-- deft:deprecated-redirect -->` sentinel NOR the current `Purpose: deprecation redirect` canonical-banner marker (real content, not a deprecation redirect)
112
112
  3. `xbrief/specification.xbrief.json` exists but the lifecycle folders (`xbrief/proposed/`, `xbrief/pending/`, `xbrief/active/`, `xbrief/completed/`, `xbrief/cancelled/`) do NOT exist
113
113
  4. Strategy output shape violations (run `task verify-strategy-output` -- the canonical gate -- or the direct form `python .deft/core/scripts/validate_strategy_output.py --project-root <path>` after `deft` install):
@@ -494,7 +494,7 @@ feat(phase-2): add REST API endpoints with integration tests
494
494
 
495
495
  ## Completion
496
496
 
497
- - ! When all phases pass and `task check` is green, complete each implemented story via `task scope:complete -- <active-story-path>` before final PR handoff.
497
+ - ! When all phases pass and `task check` is green, run `task scope:complete -- <active-story-path>` only as the post-merge scope lifecycle in `templates/agent-prompt-preamble.md` §9 (AGENTS.md `#2321`) specifies for `drive-to: merge-ready` versus `stop-at: pr-open`. That section is the single statement of the ordering; this skill does not restate it.
498
498
 
499
499
  > "The project is built and all quality checks pass. Describe any new features you'd like to add — I'll follow the deft standards we've set up."
500
500
 
@@ -24,8 +24,7 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
24
24
 
25
25
  ## When to Use
26
26
 
27
- - After `skills/deft-directive-setup/SKILL.md` Phase 3 has produced an
28
- approved `xbrief/specification.xbrief.json` (status `approved`)
27
+ - After `skills/deft-directive-setup/SKILL.md` Phase 3 has produced either greenfield authority (`xbrief/PROJECT-DEFINITION.xbrief.json` plus lifecycle scopes) or an approved full-spec compatibility artifact
29
28
  - Before `skills/deft-directive-build/SKILL.md` kicks off
30
29
  - When the user says "cost", "budget", "pre-build cost", "how much will
31
30
  this cost", or asks to estimate cost before building
@@ -60,12 +59,9 @@ two skills agree on the user's preferences file.
60
59
 
61
60
  ## Inputs
62
61
 
63
- - ! `xbrief/specification.xbrief.json` MUST exist with `plan.status =
64
- "approved"`. If the spec is not yet approved, stop and redirect to
65
- `skills/deft-directive-setup/SKILL.md` Phase 3 / the spec approval
66
- gate.
67
- - ~ `xbrief/PROJECT-DEFINITION.xbrief.json` (for tech-stack and
68
- architecture narratives). Optional but improves the estimate.
62
+ - ! Resolve the same two-path authority used by `task project:export-spec`: prefer an existing full-spec artifact, otherwise use `xbrief/PROJECT-DEFINITION.xbrief.json` plus lifecycle scopes.
63
+ - ! For full-spec authority, require its existing approval contract. For greenfield authority, require the setup approval decision and at least one lifecycle scope; do not require `plan.status = "approved"` on PROJECT-DEFINITION.
64
+ - ⊗ Require or create `xbrief/specification.xbrief.json` solely to estimate a greenfield project.
69
65
  - ~ `templates/COST-ESTIMATE.md` (canonical artifact body).
70
66
  - ~ `references/cost-models.md` (methodology).
71
67
 
@@ -73,8 +69,8 @@ two skills agree on the user's preferences file.
73
69
 
74
70
  ### Phase 1 -- Read the spec & detect categories
75
71
 
76
- - ! Read the approved spec and the project definition.
77
- - ! Walk the spec and identify which cost categories apply for this
72
+ - ! Read the resolved authority: the full-spec artifact when present, otherwise PROJECT-DEFINITION plus relevant lifecycle scopes.
73
+ - ! Walk the resolved narratives and scope requirements to identify which cost categories apply for this
78
74
  project: hosting / infrastructure, API / third-party fees, pre-flight
79
75
  account sign-ups, build & maintenance time. Drop categories that do
80
76
  not apply.
@@ -139,7 +135,7 @@ This is your project's cost estimate. Pick one.
139
135
  `skills/deft-directive-refinement/SKILL.md` to pull spec scope back,
140
136
  or the interview), then re-run this skill from Phase 1.
141
137
  - ! On `No-build`, write the decision to `COST-ESTIMATE.md`, mark the
142
- spec scope xBRIEF accordingly, exit, and do NOT chain into the build
138
+ applicable lifecycle scope xBRIEFs accordingly, exit, and do NOT chain into the build
143
139
  skill.
144
140
  - ! On `Skip`, write the decision and skip reason to `COST-ESTIMATE.md`
145
141
  and proceed to the build kickoff.
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: deft-directive-design-critique
3
3
  description: >-
4
- Thin router for the design-critique motion: triggers and five pointer stops
5
- into the contract. Use when the operator asks for a design critique,
6
- design-critique, critique panel, or mechanism-shaped triage. Do NOT trigger
7
- on ordinary implement, build, or swarm work.
4
+ Thin router for the design-critique motion: triggers and pointer stops into
5
+ the contract, including the operator-gated loop. Use when the operator asks
6
+ for a design critique, design-critique, critique panel, or mechanism-shaped
7
+ triage. Do NOT trigger on ordinary implement, build, or swarm work.
8
8
  triggers:
9
9
  - design critique
10
10
  - design-critique
@@ -30,7 +30,7 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
30
30
 
31
31
  ## Stops
32
32
 
33
- Normative rules live in [`contracts/design-critique.md`](../../contracts/design-critique.md). Fill [`templates/design-critique-brief.md`](../../templates/design-critique-brief.md) and dispatch from there. Phase 1 gate: [`docs/decisions/ADR-005-design-critique-judgment-gate.md`](../../../docs/decisions/ADR-005-design-critique-judgment-gate.md).
33
+ Normative rules live in [`contracts/design-critique.md`](../../contracts/design-critique.md). Fill [`templates/design-critique-brief.md`](../../templates/design-critique-brief.md) and dispatch from there. Phase 1 gate: [`docs/decisions/ADR-005-design-critique-judgment-gate.md`](../../../docs/decisions/ADR-005-design-critique-judgment-gate.md). Parent-audit principle: [`docs/decisions/ADR-006-parent-side-substantiation.md`](../../../docs/decisions/ADR-006-parent-side-substantiation.md).
34
34
 
35
35
  1. Stop 1 — Gate
36
36
  2. Stop 2 — Variant selection
@@ -38,9 +38,25 @@ Normative rules live in [`contracts/design-critique.md`](../../contracts/design-
38
38
  4. Stop 4 — Residual reiteration
39
39
  5. Stop 5 — Verified synthesis
40
40
 
41
+ Comment lead (model then role): Stop 3 — Critic envelope.
42
+ Operator-gated loop. Successor lean. Parent-side substantiation. Operator verbs. Dual stop. Halt line. Bind after accepted synthesis.
43
+ After critic post: posted successor lean, then verbs.
44
+ Auto-stamp after operator confirm; not while same-round siblings outstanding.
45
+ Walk / walk all. Auto-stamp when agents agree: Operator verbs.
46
+ Parent chip write: scm:issue:design-critique-chip.
47
+ Chip apply miss is non-blocking convenience; do not halt. Ingest waits on the completed-arc record, not a catalog chip.
48
+
49
+ Each critic dispatch EXITs after posting.
50
+
51
+ ## Motion shape
52
+
53
+ Not sequential review. Same-round critics are isolated: each reads one fixed input ceiling and cannot read other siblings' posts through the thread. More: [`references/motion-shape.md`](references/motion-shape.md).
54
+
55
+ After each critic EXIT, the parent posts the successor lean; the operator confirms or amends before bind or stamp.
56
+
41
57
  ⊗ Auto-dispatch critics from this skill.
42
58
  ⊗ Copy the variant table, synthesis rules, or other contract bodies into this skill.
43
59
 
44
60
  ## EXIT
45
61
 
46
- deft-directive-design-critique complete -- exiting skill. Next: fill the brief template and dispatch.
62
+ deft-directive-design-critique complete -- exiting skill. Next: operator fills the brief template and dispatches the next envelope.
@@ -0,0 +1,19 @@
1
+ # Design critique — motion shape
2
+
3
+ Orientation only. Normative rules: [`contracts/design-critique.md`](../../../contracts/design-critique.md).
4
+
5
+ ## Same-round critics
6
+
7
+ - Parallel, not sequential. Each critic in a round reads one fixed input ceiling set before any sibling dispatch.
8
+ - A sibling's post is out of envelope for every other sibling in that round — they cannot read each other through the issue thread.
9
+ - Serial dispatch (critic B after critic A posts) destroys isolation even when bind guards still pass.
10
+
11
+ ## Who adjudicates
12
+
13
+ | Step | Actor | Action |
14
+ |------|-------|--------|
15
+ | After critic EXIT | Parent | Post successor lean with proposed per-heading takes |
16
+ | Before bind/stamp | Operator | Confirm or amend that lean |
17
+ | Next envelope | Operator (or parent after operator verb) | Fill brief template and dispatch |
18
+
19
+ Comment-lead chips (model then role) govern comment signing — see brief template and Stop 3.
@@ -37,12 +37,19 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
37
37
  - ! Batch multiple friction items into one upstream issue when they share a root cause; otherwise prepare separate drafts
38
38
  - ~ Prefer attributed phrasing ("encoding gate blocked a valid file") over vague quality claims
39
39
 
40
+ ## Phase 1.5 -- Adoption-blocker judgment
41
+
42
+ - ! Ask whether the gap blocks adoption. A gap blocks adoption when the consumer cannot complete an intended Directive flow and has no reasonable workaround.
43
+ - ! When the answer is yes, collect the body evidence a privileged actor needs before applying `adoption-blocker`: affected consumer flow and version; documented alternatives attempted, or why they are not a reasonable workaround; observed recovery cost. Pass `--blocker` (and `--flow`, `--alternatives`, `--recovery-cost` when known) so the title carries `BLOCKER` and the body carries those sections.
44
+ - ! When the answer is no or unknown, omit `--blocker`. Absence of the token does not mean "not a blocker" -- it means not classified.
45
+ - ⊗ Apply or request the `adoption-blocker` ranking label from a consumer-authored title. The label is a privileged write after the body-evidence test.
46
+
40
47
  ## Phase 2 -- Draft + dedup
41
48
 
42
49
  - ! For each candidate report, run a dry draft:
43
50
 
44
51
  ```bash
45
- task feedback:file -- --summary "<one-line summary>" --context "<session context>" --expected "<expected>" --actual "<actual>" --notes "<optional>"
52
+ task feedback:file -- --summary "<one-line summary>" --context "<session context>" --expected "<expected>" --actual "<actual>" --notes "<optional>" [--blocker --flow "<flow and version>" --alternatives "<alts>" --recovery-cost "<cost>"]
46
53
  ```
47
54
 
48
55
  - ! Read the printed draft title/body with the operator before proceeding
@@ -55,7 +62,7 @@ task feedback:file -- --summary "<one-line summary>" --context "<session context
55
62
  - ! Only after approval, re-run with `--confirm`:
56
63
 
57
64
  ```bash
58
- task feedback:file -- --summary "<one-line summary>" --context "<session context>" --expected "<expected>" --actual "<actual>" --confirm
65
+ task feedback:file -- --summary "<one-line summary>" --context "<session context>" --expected "<expected>" --actual "<actual>" --confirm [--blocker]
59
66
  ```
60
67
 
61
68
  - ! Print the filed issue URL to the operator
@@ -71,3 +78,5 @@ task feedback:file -- --summary "<one-line summary>" --context "<session context
71
78
  - ⊗ Filing from the maintainer framework repo (consumer-only guard)
72
79
  - ⊗ Skipping dedup review when the command reports an existing open issue
73
80
  - ⊗ Treating `--confirm` as implicit from broad session approval -- require an explicit filing confirmation step
81
+ - ⊗ Infer "not a blocker" from an unmarked report -- absence of `BLOCKER` means not classified
82
+ - ⊗ Auto-apply `adoption-blocker` from a consumer-authored title
@@ -196,7 +196,7 @@ The answers map format:
196
196
 
197
197
  ## Output Targets
198
198
 
199
- Interview output writes to `specification.xbrief.json` `plan.narratives` the xBRIEF draft is the sole authoritative output. PRD.md is never generated. All xBRIEFs target the canonical v0.6 schema (`xbrief/schemas/xbrief-core.schema.json`, strict `const: "0.6"`); see [`../../conventions/references.md`](../../conventions/references.md).
199
+ Interview output writes to the authority selected by the calling skill. Greenfield setup writes project-level narratives to `xbrief/PROJECT-DEFINITION.xbrief.json` and implementation requirements to lifecycle scope xBRIEFs in `xbrief/proposed/`; it does not create `xbrief/specification.xbrief.json`. A caller that explicitly owns a full-spec workflow may target the compatibility specification artifact. PRD.md is never authoritative. New xBRIEFs target the current v0.8 schema; see [`../../conventions/references.md`](../../conventions/references.md).
200
200
 
201
201
  When the interview captures origin provenance (e.g. the user links to a GitHub issue or Jira ticket), include a `references` entry in the canonical form documented in [`../../conventions/references.md`](../../conventions/references.md):
202
202
 
@@ -212,7 +212,7 @@ When the interview captures origin provenance (e.g. the user links to a GitHub i
212
212
 
213
213
  ### Full Path Output
214
214
 
215
- ! On the Full path, the interview populates `specification.xbrief.json` `plan.narratives` with `xBRIEFInfo.version: "0.6"`, `status: draft`, and rich keys:
215
+ ! On the greenfield Full path, the calling setup skill merges these rich keys into `PROJECT-DEFINITION.xbrief.json` and creates traceable proposed scope xBRIEFs:
216
216
 
217
217
  - `ProblemStatement`: What problem this project solves
218
218
  - `Goals`: High-level project goals
@@ -224,23 +224,23 @@ When the interview captures origin provenance (e.g. the user links to a GitHub i
224
224
 
225
225
  ! All narrative values MUST be plain strings — never objects or arrays.
226
226
 
227
- ! The human approval gate reviews the xBRIEF draft narratives directly reviewing the narratives IS the approval step. On approval, update `status` to `approved` and generate downstream scope xBRIEFs.
227
+ ! The human approval gate reviews the PROJECT-DEFINITION narratives and proposed scope plan directly. On approval, the calling setup skill records the decision and generates downstream scope xBRIEFs without manufacturing a specification artifact.
228
228
 
229
229
  ### Light Path Output
230
230
 
231
- ! On the Light path, the interview populates `specification.xbrief.json` with `status: draft` and slim narratives:
231
+ ! On the greenfield Light path, the calling setup skill merges these slim narratives into `PROJECT-DEFINITION.xbrief.json`:
232
232
 
233
233
  - `Overview`: Brief project summary
234
234
  - `Architecture`: System design description
235
235
 
236
- ! On approval, update `status` to `approved`. Scope xBRIEFs are then created in `xbrief/proposed/` for each identified work item.
236
+ ! On approval, the calling setup skill creates scope xBRIEFs in `xbrief/proposed/` for each identified work item; it does not create `specification.xbrief.json`.
237
237
 
238
238
  ### PRD.md (deprecated — never authoritative)
239
239
 
240
- PRD.md is not generated as part of the interview workflow on either path. The `specification.xbrief.json` xBRIEF draft is the sole source of truth.
240
+ PRD.md is not generated as part of the interview workflow on either path. It is a read-only export from the resolved authority.
241
241
 
242
- - ? If stakeholders require a traditional PRD document, run `task prd:render` to export a read-only `PRD.md` from `plan.narratives`
243
- - ! PRD.md is never authoritative — `specification.xbrief.json` is the source of truth
242
+ - ? If stakeholders require a traditional PRD document, run `task prd:render` to export a read-only `PRD.md` from the resolved project narratives
243
+ - ! PRD.md is never authoritative — greenfield authority is PROJECT-DEFINITION plus lifecycle scopes; full-spec compatibility authority remains supported when present
244
244
  - ⊗ Generate an authoritative PRD.md during the interview process
245
245
  - ⊗ Treat PRD.md as a source of truth — it is a generated export artifact
246
246
 
@@ -375,7 +375,7 @@ Tatooine), branded characters (Mickey Mouse, Spider-Man), sports leagues
375
375
  2. ! Emit the plain-English risk summary from
376
376
  `scripts/ip_risk.py:plain_risk_summary(hits, intent)` into the
377
377
  interview output AND into an `IPRisk` narrative on the
378
- `specification.xbrief.json` draft. The summary opens with `not legal
378
+ authoritative interview output selected by the calling skill. The summary opens with `not legal
379
379
  advice`, names the detected categories, and (for commercial intent)
380
380
  states explicitly that lawyer consultation is **not optional output**
381
381
  from this interview.
@@ -513,7 +513,7 @@ for it.
513
513
  - ⊗ Skip the depth gate and generate artifacts with known ambiguity remaining
514
514
  - ⊗ Exit the interview without producing a structured answers map for the calling skill
515
515
  - ⊗ Combine interview questions with artifact generation in the same message
516
- - ⊗ Generate an authoritative PRD.md — interview output targets `specification.xbrief.json` narratives only
516
+ - ⊗ Generate an authoritative PRD.md — interview output targets the calling skill's resolved xBRIEF authority
517
517
  - ⊗ Treat PRD.md as a source of truth — it is a read-only export via `task prd:render`
518
518
  - ⊗ Auto-advance to the next question on number press without echoing the selection and waiting for confirmation
519
519
  - ⊗ Refuse backward navigation during the interview -- the user must be able to revisit previous answers
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: deft-directive-issue-eval
3
+ description: >-
4
+ Thin router for Stage A issue evaluation: isolated origin/master validity,
5
+ parent WIP census, named gitignored sink. Use when the operator asks to
6
+ evaluate issues, run issue-eval, or triage:evaluate. Do NOT trigger on
7
+ ordinary implement, build, swarm, or design-critique dispatch.
8
+ triggers:
9
+ - issue-eval
10
+ - issue eval
11
+ - triage:evaluate
12
+ - evaluate issues
13
+ ---
14
+ <!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
15
+ <!-- Purpose: rendered skill -->
16
+ <!-- Source of truth: packs/skills/skills-pack-0.1.json -->
17
+ <!-- Regenerate with: task packs:render -->
18
+ <!-- Edit the source, not this file. Slice instead of loading every SKILL.md: task packs:slice skills by-trigger --trigger <kw> (or list) -->
19
+
20
+ # Issue Eval
21
+
22
+ Thin router into the issue-eval contract. Operator runs `task triage:evaluate`.
23
+
24
+ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
25
+
26
+ ## When to Use
27
+
28
+ - Operator asks to evaluate issues, run issue-eval, or `triage:evaluate`
29
+ - ⊗ Ordinary implement, build, swarm, or design-critique dispatch
30
+
31
+ ## Stops
32
+
33
+ Normative rules live in [`contracts/issue-eval.md`](../../contracts/issue-eval.md).
34
+
35
+ 1. Split read sources
36
+ 2. Verdict sink
37
+ 3. Evaluator worktrees
38
+ 4. Value advice grammar
39
+ 5. No GitHub writes
40
+ 6. Fan-out
41
+
42
+ ⊗ Emit `design-critique: warranted | not warranted, because` from evaluation.
43
+ ⊗ Reuse `swarm:launch` until #3649.
44
+ ⊗ Write `xbrief/proposed/` or GitHub from this skill.
45
+
46
+ ## EXIT
47
+
48
+ deft-directive-issue-eval complete -- exiting skill. Next: run `task triage:evaluate`, then decide with existing `triage:*` verbs.
@@ -321,12 +321,13 @@ Race-condition mitigation: `download_count` is double-read with a 5s sleep betwe
321
321
 
322
322
  ! Only enter Phase 7 if Phase 6 took the Publish branch (rollback branch ends here with the unwind log).
323
323
 
324
- 1. ! **Re-verify npm publish landed (#1910, #1909, #2002).** Phase 5 checked workflow status before the GitHub publish flip; Phase 7 confirms registry truth AFTER `task release:publish`. For each of `@deftai/directive-types`, `@deftai/directive-core`, `@deftai/directive-content`, and `@deftai/directive`, run `npm view <pkg>@<version> version` (expect `<version>`) and confirm provenance on the npm page. A green GitHub release with missing npm packages means consumers cannot `npm i -g @deftai/directive@<version>` -- escalate immediately. (Real-registry verification depends on #1909's credential; until then verify workflow-run status and flag credential gaps.)
325
- 2. ! Verify GitHub auto-closed the discrete-task issue(s) referenced via `Closes #N` in the release notes (mirrors `skills/deft-directive-swarm/SKILL.md` Phase 6 Step 2)
326
- 3. ! Run `gh issue view <N> --json state --jq .state` for each closed issue. If any didn't auto-close, manually close with `gh issue close <N> --comment "Closed by release v<version> (squash auto-close did not trigger)"` (Layer 1, #167)
327
- 4. ! Verify ROADMAP.md correctness via `task roadmap:render` (the release pipeline already invoked this; Phase 7 is the second-pass sanity check)
328
- 5. ! Verify binaries are downloadable from the public release URL: `gh release view v<version> --json assets --jq '.assets[].url'` and curl one to confirm 200 OK
329
- 6. ! For any umbrella / staying-OPEN issue (`Refs #N`) referenced in the release notes, run the Layer 3 reopen sweep from `skills/deft-directive-swarm/SKILL.md` Phase 6 Step 1: any protected issue that auto-closed MUST be reopened with a comment citing #701
324
+ 1. ! **Re-verify npm publish landed (#1910, #1909, #2002).** Phase 5 checked workflow status before the GitHub publish flip; Phase 7 confirms registry truth AFTER `task release:publish`. For each of `@deftai/directive-types`, `@deftai/directive-core`, `@deftai/directive-content`, and `@deftai/directive`, run `npm view <pkg>@<version> version --prefer-online` (expect `<version>`) and confirm provenance on the npm page. A green GitHub release with missing npm packages means consumers cannot `npm i -g @deftai/directive@<version>` -- escalate immediately. (Real-registry verification depends on #1909's credential; until then verify workflow-run status and flag credential gaps.) Reading one package is not sufficient — sibling publish is not atomic.
325
+ 2. ! **Report local-vs-released CLI drift (#3753).** After the all-four registry check, print the local global CLI version, the released version, whether they match, and the exact remediation `npm i -g @deftai/directive@<version> --prefer-online`. Compare versions with `checkActiveCliAgainstTarget` (not bare `deft --version`) so a PATH-shadowed install cannot report success (#3233). If some siblings are visible and others are not, report **still propagating**. If none are visible after this wait, report **publish incomplete**. `task release` already emitted a non-blocking snapshot of the same report at pipeline completion (single probe, no wait — Step 13 returns before `npm-publish.yml` is green). Phase 7 is the bounded wait. ⊗ Run `npm i -g`. The report must not fail the release.
326
+ 3. ! Verify GitHub auto-closed the discrete-task issue(s) referenced via `Closes #N` in the release notes (mirrors `skills/deft-directive-swarm/SKILL.md` Phase 6 Step 2)
327
+ 4. ! Run `gh issue view <N> --json state --jq .state` for each closed issue. If any didn't auto-close, manually close with `gh issue close <N> --comment "Closed by release v<version> (squash auto-close did not trigger)"` (Layer 1, #167)
328
+ 5. ! Verify ROADMAP.md correctness via `task roadmap:render` (the release pipeline already invoked this; Phase 7 is the second-pass sanity check)
329
+ 6. ! Verify binaries are downloadable from the public release URL: `gh release view v<version> --json assets --jq '.assets[].url'` and curl one to confirm 200 OK
330
+ 7. ! For any umbrella / staying-OPEN issue (`Refs #N`) referenced in the release notes, run the Layer 3 reopen sweep from `skills/deft-directive-swarm/SKILL.md` Phase 6 Step 1: any protected issue that auto-closed MUST be reopened with a comment citing #701
330
331
 
331
332
  ⊗ Skip the post-publish verification. The closing-keyword false-positive (Layer 1 / Layer 2 / Layer 3) and the incremental-renderer-drift (#641, #614) are exactly the kind of issues that surface only AFTER a release is public.
332
333
 
@@ -384,6 +385,9 @@ Where `<one-line guidance>` is one of:
384
385
  - ⊗ Run `task release:rollback` against a release that has > 30 minutes of consumer-driven downloads without first weighing the hot-fix path -- a withdrawal note in the next patch is almost always less disruptive than deleting a public artifact
385
386
  - ⊗ Use `--allow-data-loss` without first reading the script docstring's hot-fix-path recommendation -- the flag is an explicit acknowledgment of consumer impact, not a default
386
387
  - ⊗ Skip the Phase 7 Layer 3 reopen sweep -- protected umbrellas can auto-close on a release-merge squash even when the release notes use `Refs #N` only
388
+ - ⊗ Run `npm i -g` from the release pipeline or Phase 7 (#3753) -- report local-vs-released drift only; no global mutation
389
+ - ⊗ Trust bare `deft --version` after a cut -- use `checkActiveCliAgainstTarget` so a PATH-shadowed install cannot report success (#3233 / #3753)
390
+ - ⊗ Treat a missing sibling package as a failed publish without distinguishing still-propagating from publish-incomplete (#3753)
387
391
  - ⊗ Post the Phase 8 Slack announcement directly from this skill -- the user owns the broadcast; the skill only generates the template
388
392
  - ⊗ Hardcode `master` as the base branch -- delegate to the configured base branch from `task release --base-branch <branch>`
389
393
  - ⊗ Skip the post-create verify-isDraft gate (#724) -- a successful `gh release create` exit code does NOT prove the release actually landed in draft state; the 5-second poll-and-flip gate in `scripts/release.py` Step 11 is the only safety net against operator-error variants and partial-success races, and any manual recovery path that bypasses `scripts/release.py` MUST run `gh release view --json isDraft` followed by `gh release edit --draft=true` on `isDraft=false` before handing off to Phase 5
@@ -624,6 +624,39 @@ Cross-links: swarm decision tree `skills/deft-directive-swarm/references/core-ph
624
624
  6. ! On register conflict when the prior owner is **still alive**: attach to the existing owner or stop — do not parallel-fix.
625
625
  7. ⊗ Refuse replacement of a dead owner solely because the 30-minute lease has not expired without attempting force takeover (#3044).
626
626
 
627
+ ### Advisory pass-open mark on issue threads (#3607)
628
+
629
+ ! **Advisory, not a lock.** On an **issue** thread the same `<!-- deft:review-owner -->` marker carries `kind: pass` to say a structured pass (triage, design-critique, review-response) is open: pass kind, owner, declared ceiling, and `expires_at`. An arriving agent **reads and is informed**; nothing is held and no write is blocked. A pass has N+1 writers by construction (parent plus panel), so an exclusive hold names no actual actor — blocking was refuted 3/3 by the #3607 panel.
630
+
631
+ ! **Read before writing into an open pass.** Fetch the mark (`fetchActivePassMarker`, or `gh api repos/<owner>/<repo>/issues/<N>/comments` filtered on the marker). When a mark is open, prefer flagging your comment as post-ceiling, or hold voluntarily — your call, not a gate.
632
+
633
+ ! **The lifecycle runs on the issue thread itself — there is no separate verb.** Open the mark by posting a comment whose body is the marker block; clear it at synthesis by editing that same comment to carry `ended_at`. Engine callers use `openPassMarker` / `closePassMarker` / `fetchActivePassMarker` (`packages/core/src/review-monitor/github-lease.ts`); an agent without those bindings posts the identical block through the safe-body verbs, exactly as the #2878 gh-only lease fallback does.
634
+
635
+ ```text
636
+ <!-- deft:review-owner -->
637
+ kind: pass
638
+ pass_kind: design-critique
639
+ owner: <github-login>
640
+ agent_id: <pass owner agent id>
641
+ ceiling: <declared ceiling comment id>
642
+ started_at: 2026-08-28T19:48:24Z
643
+ expires_at: 2026-08-28T20:48:24Z
644
+ <!-- /deft:review-owner -->
645
+ ```
646
+
647
+ 1. ! **Open** at pass start with a **new** comment, and keep the comment id it returns: `task scm:body:comment:create -- --repo <owner>/<repo> --issue <N> --body-file <file>`.
648
+ 2. ! **Read** on arrival: `gh api repos/<owner>/<repo>/issues/<N>/comments`, then take the **oldest unexpired** `kind: pass` block. A mark already open means you were informed, not stopped.
649
+ 3. ! **Refresh or clear** only the comment id your own open returned: `task scm:body:comment:edit -- --repo <owner>/<repo> --comment <id> --body-file <file>`, adding `ended_at: <now>` at synthesis.
650
+
651
+ ⊗ Edit a marker comment you did not open, including one carrying your own login from another pass — a comment belongs to the pass that created it. Editing another author's comment is also a 403 for a non-maintainer. Open your own and let oldest-comment-id-wins settle which mark arrivals honour.
652
+
653
+ ! **Expiry is the release.** A mark self-clears on read once `expires_at` passes, and the owner clears it at synthesis (`ended_at`), so an abandoned pass never marks a thread forever and no heartbeat is needed. Concurrent marks resolve **oldest comment id wins**, matching the lease; the later mark is removed and its author is told which mark stands.
654
+
655
+ ! **Trust boundary.** Pass marks are read from **any** author association, including `CONTRIBUTOR`, because they inform rather than gate. Ownership leases stay maintainer-authored (`OWNER` / `MEMBER` / `COLLABORATOR`, #2307) because `verify:review-monitor` / `verify:l4-owner` exit 0 on a live lease.
656
+
657
+ ⊗ Treat a pass mark as permission to hold, block, or gate another actor's write.
658
+ ⊗ Read a `kind: pass` mark as a review-owner lease — a pass mark never satisfies `verify:review-monitor` / `verify:l4-owner`.
659
+
627
660
  ### Required non-empty monitor handback (#3044)
628
661
 
629
662
  ! Approach 1 review-monitor prompts (including `templates/swarm-greptile-poller-prompt.md` and any host-filled spawn prompt) MUST require a **non-empty** final handback with these fields: