@deftai/directive-content 0.66.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftai/directive-content",
3
- "version": "0.66.0",
3
+ "version": "0.66.1",
4
4
  "description": "Shippable Directive framework content in the consumer .deft/core/ layout (C1 flatten), plus the engine surfaces (.githooks/, Taskfile.yml, tasks/) the deposit wires. Python-free per #2022 Phase 3. Refs #11, #1669, #1967.",
5
5
  "type": "module",
6
6
  "files": [
package/tasks/engine.yml CHANGED
@@ -19,17 +19,19 @@ tasks:
19
19
  # `D:\a\directive\directive\D:\a\directive\directive`, #2126). Reference the
20
20
  # build root by absolute path so the guard stays cwd-independent.
21
21
  #
22
- # Guard on SOURCE presence (packages/cli/package.json), NOT the dist/
23
- # artifact: dist/ is gitignored, so a cold framework checkout (e.g. CI after
24
- # a bare `pnpm install`) has source but no dist and MUST still build. A
25
- # consumer deposit (`.deft/core` = @deftai/directive-content) ships no
26
- # packages/ tree, so the guard is false and the build is a clean no-op --
27
- # this is the #2126 fix (avoids `pnpm run build` -> Missing script: build).
22
+ # Guard on buildability, not source presence alone (#2142): a cold framework
23
+ # checkout has packages/cli/package.json AND a root `build` script, so it
24
+ # still builds when dist/ is gitignored/absent. A clean npm consumer deposit
25
+ # ships no packages/ tree (guard false -> no-op, #2126). Git-vendored-payload
26
+ # repos may carry a stray packages/ under .deft/core without a root `build`
27
+ # script source-only presence must NOT run `pnpm run build` there.
28
28
  dir: '{{.USER_WORKING_DIR}}'
29
29
  cmds:
30
30
  - |
31
31
  set -eu
32
- if [ -f "{{.DEFT_ROOT}}/packages/cli/package.json" ]; then
32
+ if [ -f "{{.DEFT_ROOT}}/packages/cli/package.json" ] \
33
+ && [ -f "{{.DEFT_ROOT}}/package.json" ] \
34
+ && node -e "const fs=require('fs');const j=JSON.parse(fs.readFileSync(process.argv[1],'utf8'));process.exit(j.scripts&&j.scripts.build?0:1)" "{{.DEFT_ROOT}}/package.json"; then
33
35
  pnpm --dir "{{.DEFT_ROOT}}" run build
34
36
  fi
35
37
 
@@ -233,19 +233,22 @@ 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 statusclaim-cites-state-surface (#2066)
236
+ ## 5.6 Issue readingbody then comments (#2143 / #2066)
237
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:
238
+ Before ingesting a GitHub issue, building a worker dispatch envelope, or concluding what an issue actually asks for, satisfy the body→comments reading discipline for **any** issue (not only umbrellas):
239
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` xBRIEF 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.
240
+ 1. ! Fetch the issue via REST: `gh api repos/<owner>/<repo>/issues/<N>` (or `ghx api ...` for cached read-only GET).
241
+ 2. ! Fetch the comment thread via REST: `gh api repos/<owner>/<repo>/issues/<N>/comments` (or `ghx api ...` for cached read-only GET). The issue-ingest path fetches `/comments` by default and folds the thread into the ingested overview (#2143).
242
+ 3. ! Read body first, then the comment thread in chronological order. Later maintainer comments may supersede the original body the #2126 recurrence shipped the wrong fix because dispatch used a body-only fetch.
243
+ 4. ! Any scope, fix, or status conclusion about the issue MUST reflect the full thread, not the body alone.
243
244
 
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
+ **Umbrellas and epics (#1152):** when the issue is an umbrella or epic, the reading order extends to body `## Current shape (as of pass-N)` comment amendment comments. Prefer `task umbrella:current-shape <N>` for the deterministic current-shape read path.
245
246
 
246
- Conclude umbrella or epic status from the issue body alone (#2066).
247
+ Anti-pattern: reading only the issue body and building a dispatch envelope from it — e.g. `gh issue view <N> --json body` or REST `repos/.../issues/<N>` body field alone when `comments` count is greater than zero.
247
248
 
248
- Reference: AGENTS.md `## Umbrella current-shape convention (#1152)`, issue #2066.
249
+ Conclude what an issue asks for, or build a dispatch envelope, from the issue body alone when the issue has comments (#2143 / #2066).
250
+
251
+ Reference: AGENTS.md `## Issue body→comments reading (#2143)`, `## Umbrella current-shape convention (#1152)`, issue #2143.
249
252
 
250
253
  ## 6. No Draft re-toggling within a single review cycle
251
254
 
@@ -96,6 +96,16 @@ Umbrella and epic issues carry a pass-1 body (plan, stale by design) and a canon
96
96
 
97
97
  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.
98
98
 
99
+ ## Issue body→comments reading (#2143)
100
+
101
+ When ingesting or dispatching against **any** GitHub issue (not only umbrellas), later maintainer comments may supersede the original body — the #2126 recurrence shipped the wrong fix from a body-only fetch.
102
+
103
+ - ! Fetch both the issue body and `repos/<owner>/<repo>/issues/<N>/comments` via REST before concluding what the issue asks for or building a worker dispatch envelope. Read body first, then the comment thread in chronological order.
104
+ - ! `deft issue:ingest` / `task issue:ingest` fetches `/comments` by default and folds the thread into the ingested overview (#2143).
105
+ - ⊗ Build a dispatch envelope from the issue body alone when the issue has comments.
106
+
107
+ Cross-references: `.deft/core/content/templates/agent-prompt-preamble.md` § 5.6. Refs #2143, #1152, #2066, #2126.
108
+
99
109
  ## Content packs
100
110
 
101
111
  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: