@deftai/directive-content 0.100.0 → 0.102.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/tasks/engine.yml CHANGED
@@ -5,6 +5,8 @@ version: '3'
5
5
  # Framework-source checkouts invoke the vendored `packages/cli/dist/bin.js`.
6
6
  # npm consumer deposits copy @deftai/directive-content only — no bundled CLI —
7
7
  # so tasks fall back to the globally installed `deft` / `directive` command.
8
+ # A deposit marker (package.json deftConsumerDeposit / .deft-consumer-deposit /
9
+ # @deftai/directive-content name) forces that fallback for every verb (#3324).
8
10
 
9
11
  vars:
10
12
  DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
@@ -24,7 +26,7 @@ tasks:
24
26
 
25
27
  _ts-build:
26
28
  internal: true
27
- desc: "Build CLI dist from the framework source checkout; no-op on npm consumer deposits that ship no packages/ source (#2022 Phase 3 / #2126)."
29
+ desc: "Build CLI dist from the framework source checkout; no-op on consumer deposits (#2022 / #2126 / #3324)."
28
30
  # Run from the operator project root (USER_WORKING_DIR), NOT an absolute
29
31
  # DEFT_ROOT: an absolute `dir:` doubles onto the invocation cwd on Windows
30
32
  # when the Taskfile is invoked via `task -t <absolute-path>` (observed as
@@ -45,9 +47,9 @@ tasks:
45
47
  cmds:
46
48
  - |
47
49
  set -eu
48
- if [ -f "{{.DEFT_ROOT}}/packages/cli/package.json" ] \
49
- && [ -f "{{.DEFT_ROOT}}/package.json" ] \
50
- && 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
50
+ # #3324: consumer-deposit marker forces a no-op even when stray
51
+ # packages/cli + scripts.build make the tree look buildable.
52
+ if node "{{.TASKFILE_DIR}}/engine-invoke.cjs" is-buildable-source "{{.DEFT_ROOT}}"; then
51
53
  if node "{{.TASKFILE_DIR}}/ts-build-fresh.cjs" "{{.DEFT_ROOT}}"; then
52
54
  exit 0
53
55
  fi
@@ -56,7 +58,7 @@ tasks:
56
58
 
57
59
  invoke:
58
60
  internal: true
59
- desc: "Run a deft-ts verb from vendored bin.js (source checkout) or global deft (npm consumer deposit / runtime fallback #2409). Runtime/session verbs must not trigger engine:_ts-build / pnpm (#2181)."
61
+ desc: "Run a deft-ts verb from vendored bin.js (source checkout) or global deft (deposit / runtime fallback #2409 / #3324). Runtime/session verbs must not trigger engine:_ts-build / pnpm (#2181)."
60
62
  # Run from the operator project root so deft verbs resolve USER_WORKING_DIR
61
63
  # correctly; without this, included engine.yml defaults cwd to tasks/ (#2022).
62
64
  dir: '{{.USER_WORKING_DIR}}'
@@ -70,10 +72,10 @@ tasks:
70
72
  set -eu
71
73
  bin="{{.DEFT_ROOT}}/packages/cli/dist/bin.js"
72
74
  root_pkg="{{.DEFT_ROOT}}/package.json"
75
+ # #3324: deposit marker (package.json field / file / content-package
76
+ # name) forces is_buildable_source=0 so every verb uses global CLI.
73
77
  is_buildable_source=0
74
- if [ -f "{{.DEFT_ROOT}}/packages/cli/package.json" ] \
75
- && [ -f "$root_pkg" ] \
76
- && 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)" "$root_pkg"; then
78
+ if node "{{.TASKFILE_DIR}}/engine-invoke.cjs" is-buildable-source "{{.DEFT_ROOT}}"; then
77
79
  is_buildable_source=1
78
80
  fi
79
81
  if [ -f "$bin" ]; then
package/tasks/verify.yml CHANGED
@@ -483,7 +483,7 @@ tasks:
483
483
  ENGINE_CMD: 'verify:completed-tracked --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
484
484
 
485
485
  literal-ac:
486
- desc: "Literal acceptance-command verification (#3267). Run stated acceptance commands from the active (or --xbrief) scope artifact VERBATIM before done — same flags/cwd. Capture-only audit: --capture-only. Three-state exit (0 pass or none stated / 1 command failed / 2 config). Extends #973; required on ceremony dial rapid/minimal (#3214)."
486
+ desc: "Literal acceptance-command verification (#3267). Run stated acceptance commands from the active (or --xbrief) scope artifact VERBATIM before done — same flags/cwd. Capture-only audit: --capture-only. Three-state exit (0 pass or none stated / 1 command failed / 2 config). Extends #973; required on ceremony dial rapid/minimal (#3214). Prefer verify:ac (#3284) as the product-first primary name."
487
487
  dir: '{{.USER_WORKING_DIR}}'
488
488
  deps:
489
489
  - task: :engine:_ts-build
@@ -492,6 +492,16 @@ tasks:
492
492
  vars:
493
493
  ENGINE_CMD: 'verify:literal-ac --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
494
494
 
495
+ ac:
496
+ desc: "Product-first acceptance gate (#3284). Runs plan.acceptance.commands (or #3267 literal ledger) FIRST and never skippable when commands exist. Check composition uses --soft-missing-xbrief. Rapid ceremony = AC-only; pressure/degraded makes hygiene advisory. Capture-only: --capture-only. Three-state exit (0 pass or none / 1 fail / 2 config). Architecture for #3267."
497
+ dir: '{{.USER_WORKING_DIR}}'
498
+ deps:
499
+ - task: :engine:_ts-build
500
+ cmds:
501
+ - task: :engine:invoke
502
+ vars:
503
+ ENGINE_CMD: 'verify:ac --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
504
+
495
505
  agents-md-budget:
496
506
  desc: "Layered AGENTS.md budget instrument (#645 + #2450). Fail-closed relative ratchet: counts the managed section and the unmanaged region separately (the #1309 propagation duplicates content across the marker) and fails when either region grows past plan.policy.agentsMdBudget. Seeded at current size, so it ships green; growth past the ratchet fails. ADVISORY absolute north-star: also reports managed-section size vs ≤8 KB / ~2k tok (#2372 layered instrument) without affecting exit codes in Wave 1. Three-state exit (0 within / 1 over ratchet / 2 config error)."
497
507
  dir: '{{.USER_WORKING_DIR}}'
@@ -530,6 +530,11 @@ The parent monitor watches the heartbeat file directly (three-state exit 0 ok /
530
530
  - Monitors run `task verify:subagent-alive -- --require-agent <agent-id> [--scratch-dir <worktree>/.deft-scratch/subagent-status]` each poll iteration.
531
531
  - Workers run `task agent:monitor` (raw sweep) or the gate verb above; both wrap `subagent-monitor` (#1365).
532
532
 
533
+ ## 10.55 Rule Authority and Thin Fail-Closed (#3313)
534
+
535
+ Principle: `main.md` `## Rule Authority [AXIOM]`.
536
+ Principle: `main.md` `## Thin Fail-Closed Design (#3265)`.
537
+
533
538
  ## 10.6 Dual stop for multi-iteration worker loops (#2442)
534
539
 
535
540
  Multi-iteration implement, pre-PR, repair, and monitor loops require **two** stops: **success** (goal / AC / checker met) and **failure or budget** (max iterations, no-progress, or time/token budget). Single-turn tasks are exempt. Principle and defaults: `main.md` `## Dual Stop Rule (#2442)`; build skill dual-stop table; swarm Phase 4 / core-ops.
@@ -16,7 +16,7 @@ Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
16
16
 
17
17
  ## Session-start ritual (#1149)
18
18
 
19
- ! On **mutation** session start, run `deft session:start`; before code-writing or `start_agent` dispatch run `deft verify:session-ritual -- --tier=gated` (stale after `plan.policy.sessionRitualStalenessHours`; records `deft verify:tools` / `deft doctor` / `deft verify:cache-fresh` / `deft agents:refresh` / `npm i -g @deftai/directive@latest`; #1149 / #1348) — `.deft/core/commands.md` § Session-start ritual.
19
+ ! On **mutation** session start, run `deft session:start`; before code-writing or `start_agent` dispatch run `deft verify:session-ritual -- --tier=gated` (stale after `plan.policy.sessionRitualStalenessHours`; records `deft verify:tools` / `deft doctor` / `deft verify:cache-fresh` / `deft agents:refresh` / `npm i -g @deftai/directive@latest`; #1149 / #1348) — `.deft/core/commands.md` § Session-start ritual. ! SCM mirror tip (#3124): restate existence + get-the-most user-visible when tip fires (depth `commands.md`). ⊗ Absorb tip without restating.
20
20
 
21
21
  ## WIP cap
22
22
 
@@ -53,7 +53,6 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
53
53
  ## Content packs
54
54
 
55
55
  ! Before improvising: `deft packs:slice --list-packs`, then `deft packs:slice <pack> --list` / `deft packs:slice <pack> <slice>` — `commands.md` (§ packs); never enumerate names here.
56
-
57
56
  ## Codebase MAP Projection (#1595 / #1498)
58
57
 
59
58
  ! `plan.architecture.codeStructure` is durable SoT; `.planning/codebase/MAP.md` is generated — `deft codebase:map` / `deft verify:codebase-map-fresh` (`commands.md`). ⊗ Do not hand-edit MAP, block on stale/absent MAP, or elevate projection above xBRIEF (#1595 / #1498).
@@ -61,13 +60,16 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
61
60
  ## Skills
62
61
 
63
62
  ! **Skills Index** (Level-0) in `.deft/core/REFERENCES.md` — scan before improvising; read `SKILL.md` only on index match. `welcome` / `onboard triage` → `deft triage:welcome --onboard` (N3 / #1143); lessons → packs:slice.
64
-
65
63
  ## Skill pin policy (#2508)
66
64
 
67
65
  ! Process-critical skills with false-negative risk MUST be named in AGENTS.md (always-pin tier) — tier definitions: `.deft/core/docs/skill-pin-policy.md` (#2508).
68
66
  ! **Default always-pins:** `deft-directive-build`, `deft-directive-pre-pr`, `deft-directive-review-cycle`, `deft-directive-swarm` — read each `SKILL.md` when that work type starts.
69
67
  ⊗ Pin entire language packs, deployment docs, or framework bulk into AGENTS.md — pins are for false-negative-sensitive process gates only (#2508).
70
68
  ! **Dual stop (#2442):** multi-iteration work MUST have success + failure/budget stop (max iters / no-progress / budget); single-turn exempt; halt with operator-visible report; ⊗ thrash. Defaults: build, swarm, review-cycle skills. See main.md Dual Stop Rule. Ledger #3143 (`packages/core/src/delivery-attempt/`).
69
+ ## Rule Authority [AXIOM]
70
+ ! Prefer `task deft:*` over AGENTS.md prose. See main.md.
71
+ ## Thin Fail-Closed Design (#3265)
72
+ ! One fail-closed `task deft:*` check + one remediation. See main.md.
71
73
 
72
74
  ## Through-merge worker dispatch (#3032)
73
75
 
@@ -93,7 +95,6 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
93
95
 
94
96
  ! Mid-scope gates: **split-dispatch** when `agent_id` is terminal; retain-capable hosts (continue-by-agent-id / message-later / steer-mid-flight) MAY re-message the live child. Retention = orchestration only — not constitution self-edit (#3164). Depth: preamble §10; `deft-directive-swarm`. Topology: #3155 nuclear-family. ⊗ Invent retain on one-shot hosts.
95
97
 
96
-
97
98
  ## Review-surface precedence (#2308)
98
99
 
99
100
  ! Route PR shepherding / review work through `deft-directive-review-cycle` — `.deft/core/.agents/skills/deft-directive-review-cycle/SKILL.md`; host `babysit` / `bugbot` / `security-review` advisory-only (#2308 / #2261).
@@ -104,7 +105,6 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
104
105
 
105
106
  ## Structured decision log (#1396 / #3211)
106
107
  ! Significant choices → `deft decision:write`; re-load → `deft decision:list` / `xbrief/decisions/`; depth `.deft/core/docs/decision-log.md` (not triage/ADRs/lessons).
107
-
108
108
  ## Eval and framework health (#1703)
109
109
 
110
110
  ! `deft eval:health` when orienting or after gate/policy changes (Tier 0; 4-hour debounce). Release: `deft eval:run` / `deft eval:report`; skill routing: `deft eval:triggers` (#1586 / #1703).