@deftai/directive-content 0.101.0 → 0.103.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
@@ -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.
@@ -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,20 @@ 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.
73
+
74
+ ## Continuous Improvement Learning (#607 / #3164)
75
+
76
+ ! After a failure: ask if it could recur with a different query or session. One-off → write and later re-read `./lessons.md` inbox (also load packs:slice; ⊗ hand-edit generated `meta/lessons.md`); recurrable structural → propose skill/directive via issue/PR under Self-Improving gates — never mid-run constitution self-edit. Depth: Continuous Improvement in main.md; stance #3164; optional #666.
71
77
 
72
78
  ## Through-merge worker dispatch (#3032)
73
79
 
@@ -93,7 +99,6 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
93
99
 
94
100
  ! 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
101
 
96
-
97
102
  ## Review-surface precedence (#2308)
98
103
 
99
104
  ! 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 +109,6 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
104
109
 
105
110
  ## Structured decision log (#1396 / #3211)
106
111
  ! 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
112
  ## Eval and framework health (#1703)
109
113
 
110
114
  ! `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).