@deftai/directive-content 0.107.0 → 0.109.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/QUICK-START.md +4 -3
- package/SKILL.md +9 -10
- package/Taskfile.yml +19 -4
- package/UPGRADING.md +29 -9
- package/coding/build-output.md +4 -3
- package/coding/coding.md +6 -5
- package/coding/security.md +3 -3
- package/coding/testing.md +2 -1
- package/commands.md +35 -15
- package/contracts/deposit-required-paths.json +26 -0
- package/contracts/design-critique.md +180 -16
- package/contracts/deterministic-questions.md +2 -1
- package/contracts/host-lifecycle-duties.md +1 -1
- package/contracts/path-write-fence.md +67 -7
- package/conventions/content-manifest.json +1 -1
- package/conventions/references.md +10 -8
- package/conventions/task-caching.md +2 -1
- package/conventions/vbrief-filenames.md +5 -4
- package/docs/consumer-check-contract.md +35 -0
- package/docs/delivery-attempt.md +4 -1
- package/docs/freshness-contract.md +6 -1
- package/docs/gate-integrity.md +17 -2
- package/docs/getting-started.md +10 -11
- package/docs/hook-runtime-unavailable.md +54 -0
- package/docs/host-surface-assumptions.md +2 -1
- package/docs/orphan-active-verdict-basis.md +199 -0
- package/docs/skill-pin-policy.md +1 -1
- package/events/README.md +12 -13
- package/glossary.md +2 -1
- package/incidents/README.md +2 -1
- package/interfaces/cli.md +2 -1
- package/languages/6502-DASM.md +2 -1
- package/languages/c.md +2 -1
- package/languages/cpp.md +2 -1
- package/languages/csharp.md +2 -1
- package/languages/dart.md +2 -1
- package/languages/delphi.md +2 -1
- package/languages/elixir.md +2 -1
- package/languages/go.md +2 -1
- package/languages/java.md +2 -1
- package/languages/javascript.md +2 -1
- package/languages/julia.md +2 -1
- package/languages/kotlin.md +2 -1
- package/languages/markdown.md +2 -1
- package/languages/mermaid.md +2 -1
- package/languages/officejs.md +2 -1
- package/languages/python.md +2 -1
- package/languages/r.md +2 -1
- package/languages/rust.md +2 -1
- package/languages/sql.md +2 -1
- package/languages/swift.md +2 -1
- package/languages/typescript.md +2 -1
- package/languages/vba.md +2 -1
- package/languages/vhdl.md +2 -1
- package/languages/visual-basic.md +2 -1
- package/languages/zig.md +2 -1
- package/main.md +47 -44
- package/meta/code-field.md +2 -1
- package/meta/morals.md +2 -1
- package/meta/philosophy.md +3 -2
- package/meta/project.md +4 -3
- package/meta/ralph.md +2 -1
- package/meta/security.md +3 -2
- package/meta/versioning.md +2 -1
- package/package.json +3 -3
- package/packs/patterns/patterns-pack-0.1.json +1 -1
- package/packs/rules/rules-pack-0.1.json +6 -6
- package/packs/skills/skills-pack-0.1.json +11 -11
- package/packs/strategies/strategies-pack-0.1.json +5 -5
- package/patterns/executor-layer-credentials.md +1 -1
- package/patterns/multi-agent.md +4 -4
- package/platforms/2600.md +2 -1
- package/platforms/unity.md +2 -1
- package/references/ip-risk.md +14 -19
- package/scm/changelog.md +1 -1
- package/scm/git.md +2 -1
- package/scm/github.md +41 -7
- package/skills/deft-directive-build/SKILL.md +8 -8
- package/skills/deft-directive-cost/SKILL.md +7 -11
- package/skills/deft-directive-design-critique/SKILL.md +8 -1
- package/skills/deft-directive-design-critique/references/motion-shape.md +19 -0
- package/skills/deft-directive-gh-slice/SKILL.md +1 -1
- package/skills/deft-directive-interview/SKILL.md +15 -15
- package/skills/deft-directive-pre-pr/SKILL.md +2 -2
- package/skills/deft-directive-refinement/SKILL.md +3 -3
- package/skills/deft-directive-release/SKILL.md +19 -15
- package/skills/deft-directive-review-cycle/SKILL.md +33 -0
- package/skills/deft-directive-setup/SKILL.md +56 -24
- package/skills/deft-directive-swarm/references/core-ops.md +4 -0
- package/skills/deft-directive-swarm/references/core-phase-1-2.md +1 -1
- package/skills/deft-directive-swarm/references/core-phase-3.md +3 -1
- package/skills/deft-directive-swarm/references/core-phase-4.md +11 -8
- package/skills/deft-directive-swarm/references/host-cursor.md +1 -0
- package/skills/deft-directive-swarm/references/host-grok-build.md +1 -0
- package/skills/deft-directive-sync/SKILL.md +7 -7
- package/stage-pack.mjs +31 -0
- package/strategies/README.md +2 -1
- package/strategies/interview.md +1 -1
- package/strategies/research.md +1 -1
- package/strategies/speckit.md +2 -2
- package/strategies/v0-20-contract.md +2 -2
- package/swarm/swarm.md +2 -1
- package/tasks/engine.yml +2 -0
- package/tasks/occupancy.yml +24 -2
- package/tasks/prd.yml +4 -5
- package/tasks/session.yml +3 -3
- package/tasks/toolchain.yml +2 -2
- package/tasks/vbrief.yml +6 -2
- package/tasks/verify.yml +50 -1
- package/templates/agent-prompt-preamble.md +11 -4
- package/templates/agents-entry.md +8 -3
- package/templates/make-spec.md +1 -1
- package/templates/swarm-greptile-poller-prompt.md +2 -2
- package/tools/package-manager-network.md +2 -1
- package/tools/taskfile-migration.md +2 -1
- package/tools/taskfile.md +2 -1
- package/tools/telemetry.md +2 -1
- package/vbrief/vbrief.md +1 -1
package/tasks/toolchain.yml
CHANGED
|
@@ -14,10 +14,10 @@ tasks:
|
|
|
14
14
|
ENGINE_CMD: 'toolchain-check'
|
|
15
15
|
|
|
16
16
|
check-consumer:
|
|
17
|
-
desc: Verify
|
|
17
|
+
desc: Verify git, gh, node, and the consumer's selected npm or pnpm; this gate does not probe go-task/Python/go/uv (#3610/#3335).
|
|
18
18
|
deps:
|
|
19
19
|
- task: :engine:_ts-build
|
|
20
20
|
cmds:
|
|
21
21
|
- task: :engine:invoke
|
|
22
22
|
vars:
|
|
23
|
-
ENGINE_CMD: 'toolchain-check --consumer'
|
|
23
|
+
ENGINE_CMD: 'toolchain-check --consumer --project-root "{{.USER_WORKING_DIR}}"'
|
package/tasks/vbrief.yml
CHANGED
|
@@ -182,8 +182,10 @@ tasks:
|
|
|
182
182
|
activate:
|
|
183
183
|
# Implementation-intent activation gate companion (#810). Idempotent:
|
|
184
184
|
# already-active vBRIEFs print a no-op message and exit 0; pending/
|
|
185
|
-
# vBRIEFs flip plan.status pending|approved -> running, stamp
|
|
186
|
-
#
|
|
185
|
+
# vBRIEFs flip plan.status pending|approved -> running, stamp the
|
|
186
|
+
# document envelope the brief already carries -- xBRIEFInfo (v0.8) or
|
|
187
|
+
# vBRIEFInfo (v0.6), never a manufactured one (#3933) -- to current
|
|
188
|
+
# ISO8601 UTC, and atomically move to
|
|
187
189
|
# vbrief/active/. Any other source folder is rejected with an
|
|
188
190
|
# actionable message. Pairs with `scripts/preflight_implementation.py`
|
|
189
191
|
# (also reachable via `task vbrief:preflight`): this task is the ONLY
|
|
@@ -211,6 +213,8 @@ tasks:
|
|
|
211
213
|
- task: :engine:_ts-build
|
|
212
214
|
cmds:
|
|
213
215
|
# Oracle/fallback (parity): scripts/vbrief_activate.py (#1828 Wave 8).
|
|
216
|
+
# #1782 byte-identical parity holds except for the oracle's
|
|
217
|
+
# create-on-absent envelope branch, dropped in #3933.
|
|
214
218
|
- task: :engine:invoke
|
|
215
219
|
vars:
|
|
216
220
|
ENGINE_CMD: 'vbrief:activate {{.CLI_ARGS}}'
|
package/tasks/verify.yml
CHANGED
|
@@ -79,6 +79,34 @@ tasks:
|
|
|
79
79
|
vars:
|
|
80
80
|
ENGINE_CMD: 'verify-content-manifest --project-root "{{.DEFT_ROOT}}"'
|
|
81
81
|
|
|
82
|
+
deposit-closure:
|
|
83
|
+
desc: "C1 declared deposit closure against a staged pack root (#3900 / #3601). Resolves contracts/deposit-required-paths.json; does not infer paths from AGENTS.md. Three-state (0 clean / 1 missing / 2 config)."
|
|
84
|
+
deps:
|
|
85
|
+
- task: :engine:_ts-build
|
|
86
|
+
cmds:
|
|
87
|
+
- task: :engine:invoke
|
|
88
|
+
vars:
|
|
89
|
+
ENGINE_CMD: 'verify-deposit-closure --project-root "{{.DEFT_ROOT}}" {{.CLI_ARGS}}'
|
|
90
|
+
|
|
91
|
+
consumer-hard-stops:
|
|
92
|
+
desc: "Enumerate open consumer hard-stops by privileged labels (adoption-blocker, blocks-release-tag) only (#3900 / #3713 / #3969). Does not read issue bodies. Fail-closed at release."
|
|
93
|
+
deps:
|
|
94
|
+
- task: :engine:_ts-build
|
|
95
|
+
cmds:
|
|
96
|
+
- task: :engine:invoke
|
|
97
|
+
vars:
|
|
98
|
+
ENGINE_CMD: 'verify-consumer-hard-stops --project-root "{{.DEFT_ROOT}}" {{.CLI_ARGS}}'
|
|
99
|
+
|
|
100
|
+
closing-keywords:
|
|
101
|
+
desc: "Wire task pr:check-closing-keywords into the check graph (#737 / #3969). FP mode against the merge-base, or --pr when GITHUB_PR_NUMBER is set."
|
|
102
|
+
deps:
|
|
103
|
+
- task: :engine:_ts-build
|
|
104
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
105
|
+
cmds:
|
|
106
|
+
- task: :engine:invoke
|
|
107
|
+
vars:
|
|
108
|
+
ENGINE_CMD: 'verify-closing-keywords {{.CLI_ARGS}}'
|
|
109
|
+
|
|
82
110
|
license-sync:
|
|
83
111
|
desc: "Drift guard for root LICENSE ↔ content/LICENSE.md and published package.json license fields (#2902). Three-state exit (0 clean / 1 drift / 2 config). Framework-source only."
|
|
84
112
|
# Framework-source-only gate: reads THIS repo's LICENSE + package manifests.
|
|
@@ -96,6 +124,17 @@ tasks:
|
|
|
96
124
|
vars:
|
|
97
125
|
ENGINE_CMD: 'verify-skill-external-fetch-gate --project-root "{{.DEFT_ROOT}}"'
|
|
98
126
|
|
|
127
|
+
semantic-single-source:
|
|
128
|
+
desc: "C2 semantic single-source conformance (#3600 / #3899): shipped authoring MUST lines name exactly one xBRIEF write version, the version setup writes. Fails on a mutated staged pack. Three-state (0 clean / 1 drift / 2 config). -- task verify:semantic-single-source [-- --project-root <pack-or-source>]"
|
|
129
|
+
deps:
|
|
130
|
+
- task: :engine:_ts-build
|
|
131
|
+
# Framework-source-only gate: scans shipped authoring surfaces in THIS repo
|
|
132
|
+
# (or a staged pack root via --project-root / --pack-root).
|
|
133
|
+
cmds:
|
|
134
|
+
- task: :engine:invoke
|
|
135
|
+
vars:
|
|
136
|
+
ENGINE_CMD: 'verify-semantic-single-source --project-root "{{.DEFT_ROOT}}" {{.CLI_ARGS}}'
|
|
137
|
+
|
|
99
138
|
contract-drift:
|
|
100
139
|
desc: "Drift gate for the public contract layer (#1799). Asserts packages/types/schemas/vbrief-core-0.6.schema.json matches content/vbrief/schemas/vbrief-core.schema.json and that @deftai/directive-types Status/version constants align with the schema. Three-state exit (0 clean / 1 drift / 2 config error)."
|
|
101
140
|
deps:
|
|
@@ -503,7 +542,7 @@ tasks:
|
|
|
503
542
|
ENGINE_CMD: 'verify:lifecycle-visible --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
|
|
504
543
|
|
|
505
544
|
orphan-active:
|
|
506
|
-
desc: "Fail-closed orphan-active guard (#2321 / #3429). Detects xbrief/active/ briefs with plan.status==running whose referenced GitHub issues are all closed and/or whose linked PR is merged — the stop-at:pr-open lifecycle leak. Confirmed shipped remediates with task scope:complete / scope:cancel or swarm finalize. Unresolved GitHub lookup still exits 1 but prints a retry, not scope:complete. Three-state exit (0 clean / 1 orphan / 2 config). Pass --issue N to scan one origin after merge; --skip-gh to rely on triage cache only."
|
|
545
|
+
desc: "Fail-closed orphan-active guard (#2321 / #3429). Detects xbrief/active/ briefs with plan.status==running whose referenced GitHub issues are all closed and/or whose linked PR is merged — the stop-at:pr-open lifecycle leak. Confirmed shipped remediates with task scope:complete / scope:cancel or swarm finalize. Unresolved GitHub lookup still exits 1 but prints a retry, not scope:complete. Three-state exit (0 clean / 1 orphan / 2 config). Pass --issue N to scan one origin after merge; --changed-only [--base-ref <ref>] for the merge-chokepoint form that evaluates only briefs the candidate's own diff touches (#3893; falls back to the repo-wide sweep at the delivery tip or on an unresolvable base ref); --skip-gh to rely on triage cache only. Issue state resolves by query shape (#3767): scoped --issue N takes an authoritative read and stays fail-closed on unknown; the unscoped sweep uses one complete open-issue inventory and stays fail-open on unknown. A cache hit counts only within 15 minutes, and every run prints the basis of its verdict — see content/docs/orphan-active-verdict-basis.md."
|
|
507
546
|
dir: '{{.USER_WORKING_DIR}}'
|
|
508
547
|
deps:
|
|
509
548
|
- task: :engine:_ts-build
|
|
@@ -512,6 +551,16 @@ tasks:
|
|
|
512
551
|
vars:
|
|
513
552
|
ENGINE_CMD: 'verify:orphan-active --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
|
|
514
553
|
|
|
554
|
+
pr-closeout-attestable:
|
|
555
|
+
desc: "Fail-closed merge-time closeout gate (#3781). Refuses a merge when the PR's structured closing references name an issue whose brief is still running in xbrief/active/ with acceptance criteria carrying neither x-directive/evidence nor x-directive/disposition. The trigger is the closing reference, not the branch diff — CI runs before the merge and the issue closes on it, so a diff-keyed gate can never fail the PR that creates the orphan. Reuses evaluateAcceptanceEvidenceGate, the same rule scope:complete enforces. A PR that leaves an unattested brief WITHOUT closing its issue is unaffected. Three-state exit (0 attestable or closes nothing / 1 unattested closeout / 2 config or closing-reference lookup error). -- task verify:pr-closeout-attestable -- --pr N [--repo OWNER/REPO]"
|
|
556
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
557
|
+
deps:
|
|
558
|
+
- task: :engine:_ts-build
|
|
559
|
+
cmds:
|
|
560
|
+
- task: :engine:invoke
|
|
561
|
+
vars:
|
|
562
|
+
ENGINE_CMD: 'verify:pr-closeout-attestable --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
|
|
563
|
+
|
|
515
564
|
completed-write-guard:
|
|
516
565
|
desc: "Fail-closed completed/ write guard (#3679). Newly added xbrief/completed/ (or vbrief/completed/) artifacts must have been written by scope:complete / scope:fail. Historical corpus is advisory via doctor. Remediation names the leftover land PR (#3476). Three-state exit (0 clean / 1 unguarded add / 2 config). Does not change verify:completed-tracked."
|
|
517
566
|
dir: '{{.USER_WORKING_DIR}}'
|
|
@@ -193,7 +193,7 @@ This rule applies to the Grok Build runtime (pwsh 7+); Warp + Claude (PTY-based)
|
|
|
193
193
|
|
|
194
194
|
## 3.6 Safe subprocess on Windows -- UTF-8 capture (#1366)
|
|
195
195
|
|
|
196
|
-
**Historical note:** The `scripts/` Python directory was removed in #2022 (TS-native migration). The `
|
|
196
|
+
**Historical note:** The `scripts/` Python directory was removed in #2022 (TS-native migration). The `explicit UTF-8 encoding on execa/spawn` helper no longer exists. The underlying risk -- locale-codepage decode failures when capturing `gh api` output on Windows -- still applies to any TS tooling that shells out.
|
|
197
197
|
|
|
198
198
|
**Directive rule for TS tooling:** Any TS script that captures `gh` output or other child-process output for parsing MUST use `execa` (preferred) or `child_process.spawn` with explicit `encoding: "utf8"`. Never use `execSync` / `spawnSync` without explicit encoding when the output may carry non-ASCII glyphs (Greptile bodies, gh REST bodies, user-authored commit messages).
|
|
199
199
|
|
|
@@ -208,7 +208,7 @@ const { stdout } = await execa("gh", ["api", "..."], { encoding: "utf8" });
|
|
|
208
208
|
|
|
209
209
|
This rule bites on Windows + Grok Build / cmd / PowerShell hosts where the default codepage is not UTF-8. Linux / macOS generally default to UTF-8 and do not reproduce the crash, but explicit encoding keeps behavior identical across platforms.
|
|
210
210
|
|
|
211
|
-
Reference: AGENTS.md `## Safe subprocess capture (#1366)`. Recurrence record: the #1166 swarm session repeatedly observed `Thread-3 (_readerthread) UnicodeDecodeError` across multiple gh-shelling tools; #1366 is the structural fix. `
|
|
211
|
+
Reference: AGENTS.md `## Safe subprocess capture (#1366)`. Recurrence record: the #1166 swarm session repeatedly observed `Thread-3 (_readerthread) UnicodeDecodeError` across multiple gh-shelling tools; #1366 is the structural fix. `explicit UTF-8 encoding on execa/spawn` was the Python-era solution; the TS-era solution is explicit encoding on every `execa`/`spawn` call.
|
|
212
212
|
|
|
213
213
|
## 3.7 Per-run unique pytest basetemp under concurrent swarm dispatch (#1681)
|
|
214
214
|
|
|
@@ -551,10 +551,17 @@ The parent monitor watches the heartbeat file directly (three-state exit 0 ok /
|
|
|
551
551
|
|
|
552
552
|
! **OpenClaw `sessions_spawn` / heartbeat mapping (#2879):** Same file-heartbeat contract applies to OpenClaw review-monitors and long-running leaves. OpenClaw host session liveness, Control UI presence, or gateway channel reachability does NOT replace periodic heartbeats — those signals only prove the session exists, not that the tool loop is progressing. OpenClaw pollers write `.deft-scratch/subagent-status/<agent-id>.json` so `task agent:monitor` / `task verify:subagent-alive` can detect stalled monitors; OpenClaw-native session status MAY be a *supplementary* signal only. Host "still running" + missing/STALE heartbeat authorizes the same `REDISPATCH_OK` posture as Cursor #2824.
|
|
553
553
|
|
|
554
|
-
! **Parent ensures scratch dir + startup grace before REDISPATCH_OK (#2879):** `task verify:subagent-alive` exits `2` (config error, no `REDISPATCH_OK`) when the scratch directory is **missing** and has no records. Parents MUST `mkdir` the worker worktree's `.deft-scratch/subagent-status/` at dispatch time so a later missing record is exit `1` + `REDISPATCH_OK`. Parents MUST ALSO wait a **startup grace** (default 3 minutes from dispatch, or until the first `phase: "starting"` heartbeat is observed) before treating a missing required-agent as takeover-eligible — probing an empty parent-created dir immediately races a healthy worker still writing its first heartbeat and can spawn a duplicate. Exit `2` remains reserved for true config errors (bad args / wrong path).
|
|
554
|
+
! **Parent ensures scratch dir + startup grace before REDISPATCH_OK (#2879 / #3730):** `task verify:subagent-alive` exits `2` (config error, no `REDISPATCH_OK`) when the scratch directory is **missing** and has no records. Parents MUST `mkdir` the worker worktree's `.deft-scratch/subagent-status/` at dispatch time so a later missing record is exit `1` + `REDISPATCH_OK`. `task swarm:launch` (worktree map) and `task swarm:pre-dispatch --action begin` on a filesystem target mkdir this directory mechanically. Interactive Cursor/OpenClaw/Grok spawn without those verbs still MUST mkdir before the spawn primitive. Parents MUST ALSO wait a **startup grace** (default 3 minutes from dispatch, or until the first `phase: "starting"` heartbeat is observed) before treating a missing required-agent as takeover-eligible — probing an empty parent-created dir immediately races a healthy worker still writing its first heartbeat and can spawn a duplicate. Exit `2` remains reserved for true config errors (bad args / wrong path). ⊗ Put runtime liveness on the C2 launch manifest (written `mode: "replace"`) or in `occupancy.json`.
|
|
555
555
|
|
|
556
556
|
- Monitors run `task verify:subagent-alive -- --require-agent <agent-id> [--scratch-dir <worktree>/.deft-scratch/subagent-status]` each poll iteration.
|
|
557
557
|
- Workers run `task agent:monitor` (raw sweep) or the gate verb above; both wrap `subagent-monitor` (#1365).
|
|
558
|
+
- Workers MUST write the first heartbeat immediately (`phase: "starting"`) and keep the cadence in this section. A dispatch that never instructs the worker to heartbeat leaves the armed directory empty and a host-kill indistinguishable from "never started" until grace elapses.
|
|
559
|
+
|
|
560
|
+
! **Commit early (#3730):** Long-running implementation workers MUST commit as soon as a coherent unit exists (source + tests that compile), then commit again at natural checkpoints. A host-kill leaves uncommitted work invisible to every gate. ⊗ Hold a complete correct diff uncommitted until PR time.
|
|
561
|
+
|
|
562
|
+
! **Killed-worker takeover (#3730 / #3228):** `REDISPATCH_OK` does not lift `DENY_DUPLICATE_ACTIVE`. A killed worker's delivery attempt stays `running` until cancelled. Takeover is `task swarm:pre-dispatch -- --scope-id <id> --target-id <worktree> --action cancel` then the same command without `--action` (begin). Do not add a third liveness classifier.
|
|
563
|
+
|
|
564
|
+
! **Recovery dispatch vs stale ritual (#3730 / #2992):** Before a replacement spawn, run `task verify:session-ritual -- --tier=gated`. If it fails, run `task session:start --rearm --session-id=<same>` (or the `deft` form) rather than a full cold ceremony, unless re-arm is ineligible. A ritual deny MUST name `session:start --rearm`. Do not treat a bare deny as a dead end, and do not re-arm under a new session id (that reclaims occupancy and blocks the parent's own writes).
|
|
558
565
|
|
|
559
566
|
## 10.55 Rule Authority and Thin Fail-Closed (#3313)
|
|
560
567
|
|
|
@@ -577,7 +584,7 @@ Multi-iteration implement, pre-PR, repair, and monitor loops require **two** sto
|
|
|
577
584
|
|
|
578
585
|
! On failure stop: halt; emit an operator-visible report (what was tried, what is missing, what human decision is needed). Prefer `BLOCKED:` over silent retry. ⊗ Thrash past the envelope. Durable delivery/acceptance mechanical enforcement is **#3143** (`packages/core/src/delivery-attempt/`; not prompt-only).
|
|
579
586
|
|
|
580
|
-
! **Implement-leaf pre-dispatch (#3228):** Before spawning a peer implement leaf on a unit (story/worktree), monitors/orchestrators MUST run `task swarm:pre-dispatch -- --scope-id <id> --target-id <worktree-or-branch>` (exit **0** allow / **1** active deny / **2** config). Non-zero → do not spawn. Gate is #3143 `DENY_DUPLICATE_ACTIVE`. Takeover = `--action cancel` then pre-dispatch begin again. Pointer only — skill depth: swarm `core-phase-4.md`.
|
|
587
|
+
! **Implement-leaf pre-dispatch (#3228 / #3730):** Before spawning a peer implement leaf on a unit (story/worktree), monitors/orchestrators MUST run `task swarm:pre-dispatch -- --scope-id <id> --target-id <worktree-or-branch>` (exit **0** allow / **1** active deny / **2** config). Non-zero → do not spawn. Gate is #3143 `DENY_DUPLICATE_ACTIVE`. Takeover after `REDISPATCH_OK` = `--action cancel` then pre-dispatch begin again. A killed worker stays `running` until that cancel. Pointer only — skill depth: swarm `core-phase-4.md`.
|
|
581
588
|
|
|
582
589
|
## 11. Mandatory DONE message even on early exit
|
|
583
590
|
|
|
@@ -10,9 +10,14 @@ Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
|
|
|
10
10
|
! Before further Directive process load, check root `.deft-directive-disable` (presence = flag). If present → stop DD load; recovery = delete file + NEW agent session. Deposit OK; not `.no-deft-directive` (#2926). Docs: `.deft/core/docs/deft-directive-disable.md`.
|
|
11
11
|
⊗ Claim full operation while the flag exists or after delete without a NEW agent session.
|
|
12
12
|
|
|
13
|
+
## Hook runtime unavailable (#3785)
|
|
14
|
+
|
|
15
|
+
! Opaque non-zero exit (usually 127) on every mutation = `deft-hook` is not executable on this host, not a Directive deny — no Directive code ran, and no in-session flag reaches it. Out of band: `deft policy:disable-host-hooks --host cursor --confirm`, or install the runtime (`npm i -g @deftai/directive`). Depth: `.deft/core/docs/hook-runtime-unavailable.md`.
|
|
16
|
+
⊗ Hand-edit `failClosed` in `.cursor/hooks.json` — the next `deft update` rewrites it and silently re-arms the lockout.
|
|
17
|
+
|
|
13
18
|
## Session routing (#2176)
|
|
14
19
|
|
|
15
|
-
! **Read-only default** until mutation intent: load AGENTS.md / main.md / USER.md / `xbrief/PROJECT-DEFINITION.xbrief.json`; resolve USER.md via `deft session:start` (`USER.md resolved …`; win32 `%APPDATA%\deft\USER.md`; unix `~/.config/deft/USER.md`; ⊗ invent `~/.config/deft` on Windows #2544); confirm Deft alignment + addressing-name; ⊗ no mutable `deft session:start` / triage welcome / sync / branch-policy unless asked or implementation-ready (#2176) — `.deft/core/commands.md` § Session routing. Bootstrap: cold-start → README § Cold-start (#2273) ⊗ never `.deft/core/`; pre-cutover → setup Pre-Cutover (#2068); missing USER.md / PROJECT-DEFINITION → setup Phase 1/2 (#1813) ⊗ before answering; else main → USER → PROJECT-DEFINITION; ~ sync. Mutation → `deft session:start` then `deft verify:session-ritual -- --tier=gated` (#1149).
|
|
20
|
+
! **Read-only default** until mutation intent: load AGENTS.md / main.md / USER.md / `xbrief/PROJECT-DEFINITION.xbrief.json`; resolve USER.md via `deft session:start` (`USER.md resolved …`; win32 `%APPDATA%\deft\USER.md`; unix `~/.config/deft/USER.md`; ⊗ invent `~/.config/deft` on Windows #2544); confirm Deft alignment + addressing-name; ⊗ no mutable `deft session:start` / triage welcome / sync / branch-policy unless asked or implementation-ready (#2176) — `.deft/core/commands.md` § Session routing. Bootstrap: cold-start → README § Cold-start (#2273) ⊗ never `.deft/core/`; pre-cutover → setup Pre-Cutover (#2068); missing USER.md / PROJECT-DEFINITION → setup Phase 1/2 (#1813) ⊗ before answering; else main → USER → PROJECT-DEFINITION; ~ sync. Mutation → `deft session:start` then `deft verify:session-ritual -- --tier=gated` (#1149). Occupancy (#3433/#3611/#3755): bearer-id, not auth/lineage; `occupancy:grant` → `commands.md`. ? `deft session:start -- --read-only` (#2176).
|
|
16
21
|
|
|
17
22
|
## Session-start ritual (#1149)
|
|
18
23
|
|
|
@@ -24,7 +29,7 @@ Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
|
|
|
24
29
|
|
|
25
30
|
## xBRIEF layout (#2034 / #2110)
|
|
26
31
|
|
|
27
|
-
Legacy `vbrief
|
|
32
|
+
Legacy `vbrief/`; `deft migrate:xbrief` (v0.6→v0.8). New writes `"version": "0.8"`. Depth: `main.md` (#3600).
|
|
28
33
|
! Completed xBRIEFs are record of *what is*, zero authority over *what to build next* (#3383). Current contract = active xBRIEF + human operator live instruction. Depth: `main.md` Persistence; build skill declare-the-contract / halt-and-ask.
|
|
29
34
|
⊗ Treat a completed xBRIEF as the next-build contract.
|
|
30
35
|
|
|
@@ -61,7 +66,7 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
|
|
|
61
66
|
|
|
62
67
|
## Skills
|
|
63
68
|
|
|
64
|
-
! **Skills Index** (Level-0)
|
|
69
|
+
! **Skills Index** (Level-0): `npx deft packs:slice skills list` (text, not `--json`; local also `.\node_modules\.bin\deft`) — scan before improvising; read `SKILL.md` on match. `welcome` / `onboard triage` → `deft triage:welcome --onboard`.
|
|
65
70
|
## Skill pin policy (#2508)
|
|
66
71
|
|
|
67
72
|
! 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).
|
package/templates/make-spec.md
CHANGED
|
@@ -64,7 +64,7 @@ DO NOT STOP until ONE of the six terminal exit conditions below fires.
|
|
|
64
64
|
- Poll interval: `{poll_interval_seconds}` seconds between checks (recommended default 90s -- Greptile reviews land in 3-7 min, so faster polling adds noise without information).
|
|
65
65
|
- Total budget: `{poll_cap_minutes}` minutes (recommended default 30 min).
|
|
66
66
|
- Use a Python script with `time.sleep(...)` driven by an internal timer -- do NOT use shell `while true; sleep`-style loops, and do NOT yield between polls (yielding ends the agent's turn with no self-wake; #195 lesson).
|
|
67
|
-
- **Heartbeat write per iteration (#1365):** every poll iteration MUST also atomically write a heartbeat record to `.deft-scratch/subagent-status/<agent-id>.json` per the contract in `docs/subagent-heartbeat.md`. The record carries `agent_id`, `parent_id` (= `{parent_agent_id}`), `last_heartbeat_at` (ISO-8601 UTC with `Z`), `last_message`, `phase = "polling"` (or `"fixing"` when addressing P0/P1 findings), and `terminal_state = null`. The terminal exit conditions ((1) CLEAN / (2) NEW P0/P1 FINDINGS escalation / (3) ERRORED / (4) TIMEOUT / (5) STALL) MUST also write ONE final heartbeat with `phase = "terminal"` and `terminal_state` set to the canonical exit name BEFORE sending the parent message and exiting. The 90s poll cadence naturally satisfies the 2-3 min cadence floor in `docs/subagent-heartbeat.md`; the per-iteration heartbeat is what lets `
|
|
67
|
+
- **Heartbeat write per iteration (#1365):** every poll iteration MUST also atomically write a heartbeat record to `.deft-scratch/subagent-status/<agent-id>.json` per the contract in `docs/subagent-heartbeat.md`. The record carries `agent_id`, `parent_id` (= `{parent_agent_id}`), `last_heartbeat_at` (ISO-8601 UTC with `Z`), `last_message`, `phase = "polling"` (or `"fixing"` when addressing P0/P1 findings), and `terminal_state = null`. The terminal exit conditions ((1) CLEAN / (2) NEW P0/P1 FINDINGS escalation / (3) ERRORED / (4) TIMEOUT / (5) STALL) MUST also write ONE final heartbeat with `phase = "terminal"` and `terminal_state` set to the canonical exit name BEFORE sending the parent message and exiting. The 90s poll cadence naturally satisfies the 2-3 min cadence floor in `docs/subagent-heartbeat.md`; the per-iteration heartbeat is what lets `task agent:monitor` detect a stalled poller within the threshold instead of waiting on the `{poll_cap_minutes}`-minute cap.
|
|
68
68
|
|
|
69
69
|
## Per-poll fetch
|
|
70
70
|
|
|
@@ -653,5 +653,5 @@ Dogfood lessons captured during the #727 self-review cycle. The template body ab
|
|
|
653
653
|
- `meta/lessons.md` `## Orchestrator Role Separation + Canonical Poller Template (2026-04)` -- short cross-reference; the rule body lives in the skills above (per `main.md` Rule Authority [AXIOM]).
|
|
654
654
|
- #727 -- this template's acceptance issue and the full anti-pattern record (rm-chaining, parsing-bug recurrence, role-conflation in implementation-agent prompts).
|
|
655
655
|
- #1039 -- (5) STALL terminal exit + Tier 1 instrumentation + Tier 3 per-condition fail-loud (`clean_gate_holdout`); the third recurrence in this template's detector-gap chain after #910 (triple-tier) and #1035 (Tier 2.5 + confidence-heading).
|
|
656
|
-
- #1364 -- cohort-level CLEAN verification gate (`task swarm:verify-review-clean`, `
|
|
656
|
+
- #1364 -- cohort-level CLEAN verification gate (`task swarm:verify-review-clean`, `task swarm:verify-review-clean`). The (1) CLEAN section's swarm-orchestrated terminal contract block declares that only the exact `PR #{pr_number} CLEAN -- ready for merge` subject with `confidence >= min_confidence` on current HEAD is an acceptable "review complete" signal for the swarm monitor's Phase 5 -> 6 transition; the cohort verifier picks up any other terminal exit ((2) NEW P0/P1 FINDINGS escalation, (3) ERRORED, (4) TIMEOUT, (5) STALL) and holds the merge gate until fresh poller re-dispatch or explicit user escalation resolves it. Recurrence record: #1166 swarm execution where multiple pollers exited with `clean_gate_holdout=confidence` (confidence == 3) and the monitor still raised the Phase 5 -> 6 gate because the trigger keyed on "all pollers have reported back" rather than "every PR in the cohort is objectively CLEAN". #3095 raises the dogfood floor to 5 via policy.
|
|
657
657
|
- #2879 -- OpenClaw `sessions_spawn` + parent push/announce completion channel named in Role posture (alongside Warp `start_agent` and grok-build `spawn_subagent`); heartbeat mapping in `docs/subagent-heartbeat.md` and preamble §10.5. Epic #2874.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
<!-- deft:deposit-link-rewrite v=1 source="content/tools/package-manager-network.md" -->
|
|
1
2
|
# Package-Manager Network Access (#2182)
|
|
2
3
|
|
|
3
4
|
Legend (from RFC2119): !=MUST, ~=SHOULD, ⊗=MUST NOT, ?=MAY.
|
|
4
5
|
|
|
5
|
-
**⚠️ See also**: [main.md](
|
|
6
|
+
**⚠️ See also**: [main.md](../main.md) | [tools/taskfile.md](./taskfile.md) | [scm/github.md](../scm/github.md)
|
|
6
7
|
|
|
7
8
|
**Scope:** How Directive's own tooling (session ritual, doctor, read-only flows) treats npm/pnpm registry access as an explicit, security-sensitive, opt-in operation. Applies to Directive's own code, not to a consumer project's own build/install scripts.
|
|
8
9
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
<!-- deft:deposit-link-rewrite v=1 source="content/tools/taskfile-migration.md" -->
|
|
1
2
|
# Taskfile Migration Guide
|
|
2
3
|
|
|
3
4
|
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
4
5
|
|
|
5
|
-
**⚠️ See also**: [taskfile.md](./taskfile.md) | [main.md](
|
|
6
|
+
**⚠️ See also**: [taskfile.md](./taskfile.md) | [main.md](../main.md)
|
|
6
7
|
|
|
7
8
|
## When to Migrate
|
|
8
9
|
|
package/tools/taskfile.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
<!-- deft:deposit-link-rewrite v=1 source="content/tools/taskfile.md" -->
|
|
1
2
|
# Taskfile Guidelines
|
|
2
3
|
|
|
3
4
|
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
4
5
|
|
|
5
|
-
**⚠️ See also**: [main.md](
|
|
6
|
+
**⚠️ See also**: [main.md](../main.md) | [taskfile-migration.md](./taskfile-migration.md)
|
|
6
7
|
|
|
7
8
|
**Scope:** Task-based build automation using [Task](https://taskfile.dev/) instead of Makefiles or shell scripts.
|
|
8
9
|
|
package/tools/telemetry.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- deft:deposit-link-rewrite v=1 source="content/tools/telemetry.md" -->
|
|
1
2
|
# Telemetry Standards
|
|
2
3
|
|
|
3
4
|
Logging, tracing, metrics, and error tracking for production systems.
|
|
@@ -6,7 +7,7 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
|
6
7
|
|
|
7
8
|
**Scope:** Observability, monitoring, and debugging across all modes.
|
|
8
9
|
|
|
9
|
-
**⚠️ See also**: [main.md](
|
|
10
|
+
**⚠️ See also**: [main.md](../main.md) | [coding.md](../coding/coding.md)
|
|
10
11
|
|
|
11
12
|
## Mode-Specific Requirements
|
|
12
13
|
|
package/vbrief/vbrief.md
CHANGED
|
@@ -24,7 +24,7 @@ Key `task` commands for working with vBRIEF files:
|
|
|
24
24
|
- `task scope:decompose -- <parent.vbrief.json> --draft vbrief/.triage-cache/decompositions/<parent-slug>.json` — Apply an approved phase/epic to story decomposition
|
|
25
25
|
- `task swarm:readiness -- vbrief/active/*.vbrief.json` — Report whether candidate stories are safe for concurrent swarm allocation
|
|
26
26
|
|
|
27
|
-
For interactive creation workflows, use `
|
|
27
|
+
For interactive creation workflows, use `skills/deft-directive-setup/SKILL.md` (`directive init` / setup Phases 1-3). See [commands.md](../commands.md) for the full command lifecycle.
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|