@deftai/directive-content 0.108.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.
Files changed (100) hide show
  1. package/QUICK-START.md +4 -3
  2. package/SKILL.md +9 -10
  3. package/Taskfile.yml +18 -3
  4. package/UPGRADING.md +7 -6
  5. package/coding/build-output.md +4 -3
  6. package/coding/coding.md +6 -5
  7. package/coding/security.md +3 -3
  8. package/coding/testing.md +2 -1
  9. package/commands.md +13 -15
  10. package/contracts/deposit-required-paths.json +26 -0
  11. package/contracts/design-critique.md +64 -1
  12. package/contracts/deterministic-questions.md +2 -1
  13. package/contracts/host-lifecycle-duties.md +1 -1
  14. package/contracts/path-write-fence.md +67 -7
  15. package/conventions/content-manifest.json +1 -1
  16. package/conventions/references.md +10 -8
  17. package/conventions/task-caching.md +2 -1
  18. package/conventions/vbrief-filenames.md +5 -4
  19. package/docs/consumer-check-contract.md +35 -0
  20. package/docs/delivery-attempt.md +2 -0
  21. package/docs/gate-integrity.md +17 -2
  22. package/docs/host-surface-assumptions.md +2 -1
  23. package/docs/orphan-active-verdict-basis.md +33 -0
  24. package/docs/skill-pin-policy.md +1 -1
  25. package/events/README.md +12 -13
  26. package/glossary.md +2 -1
  27. package/incidents/README.md +2 -1
  28. package/interfaces/cli.md +2 -1
  29. package/languages/6502-DASM.md +2 -1
  30. package/languages/c.md +2 -1
  31. package/languages/cpp.md +2 -1
  32. package/languages/csharp.md +2 -1
  33. package/languages/dart.md +2 -1
  34. package/languages/delphi.md +2 -1
  35. package/languages/elixir.md +2 -1
  36. package/languages/go.md +2 -1
  37. package/languages/java.md +2 -1
  38. package/languages/javascript.md +2 -1
  39. package/languages/julia.md +2 -1
  40. package/languages/kotlin.md +2 -1
  41. package/languages/markdown.md +2 -1
  42. package/languages/mermaid.md +2 -1
  43. package/languages/officejs.md +2 -1
  44. package/languages/python.md +2 -1
  45. package/languages/r.md +2 -1
  46. package/languages/rust.md +2 -1
  47. package/languages/sql.md +2 -1
  48. package/languages/swift.md +2 -1
  49. package/languages/typescript.md +2 -1
  50. package/languages/vba.md +2 -1
  51. package/languages/vhdl.md +2 -1
  52. package/languages/visual-basic.md +2 -1
  53. package/languages/zig.md +2 -1
  54. package/main.md +47 -44
  55. package/meta/code-field.md +2 -1
  56. package/meta/morals.md +2 -1
  57. package/meta/philosophy.md +3 -2
  58. package/meta/project.md +4 -3
  59. package/meta/ralph.md +2 -1
  60. package/meta/security.md +3 -2
  61. package/meta/versioning.md +2 -1
  62. package/package.json +3 -3
  63. package/packs/patterns/patterns-pack-0.1.json +1 -1
  64. package/packs/rules/rules-pack-0.1.json +6 -6
  65. package/packs/skills/skills-pack-0.1.json +8 -8
  66. package/packs/strategies/strategies-pack-0.1.json +5 -5
  67. package/patterns/executor-layer-credentials.md +1 -1
  68. package/patterns/multi-agent.md +4 -4
  69. package/platforms/2600.md +2 -1
  70. package/platforms/unity.md +2 -1
  71. package/references/ip-risk.md +14 -19
  72. package/scm/changelog.md +1 -1
  73. package/scm/git.md +2 -1
  74. package/scm/github.md +10 -6
  75. package/skills/deft-directive-build/SKILL.md +7 -7
  76. package/skills/deft-directive-gh-slice/SKILL.md +1 -1
  77. package/skills/deft-directive-interview/SKILL.md +5 -5
  78. package/skills/deft-directive-pre-pr/SKILL.md +2 -2
  79. package/skills/deft-directive-refinement/SKILL.md +3 -3
  80. package/skills/deft-directive-release/SKILL.md +9 -9
  81. package/skills/deft-directive-setup/SKILL.md +3 -2
  82. package/skills/deft-directive-sync/SKILL.md +7 -7
  83. package/stage-pack.mjs +31 -0
  84. package/strategies/README.md +2 -1
  85. package/strategies/interview.md +1 -1
  86. package/strategies/research.md +1 -1
  87. package/strategies/speckit.md +2 -2
  88. package/strategies/v0-20-contract.md +2 -2
  89. package/swarm/swarm.md +2 -1
  90. package/tasks/vbrief.yml +6 -2
  91. package/tasks/verify.yml +40 -1
  92. package/templates/agent-prompt-preamble.md +2 -2
  93. package/templates/agents-entry.md +2 -2
  94. package/templates/make-spec.md +1 -1
  95. package/templates/swarm-greptile-poller-prompt.md +2 -2
  96. package/tools/package-manager-network.md +2 -1
  97. package/tools/taskfile-migration.md +2 -1
  98. package/tools/taskfile.md +2 -1
  99. package/tools/telemetry.md +2 -1
  100. package/vbrief/vbrief.md +1 -1
@@ -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 `scripts/_safe_subprocess.py::run_text` 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.
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. `scripts/_safe_subprocess.py` was the Python-era solution; the TS-era solution is explicit encoding on every `execa`/`spawn` call.
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
 
@@ -29,7 +29,7 @@ Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
29
29
 
30
30
  ## xBRIEF layout (#2034 / #2110)
31
31
 
32
- Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8). `x-vbrief/` tokens read-accepted until migrated.
32
+ Legacy `vbrief/`; `deft migrate:xbrief` (v0.6→v0.8). New writes `"version": "0.8"`. Depth: `main.md` (#3600).
33
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.
34
34
  ⊗ Treat a completed xBRIEF as the next-build contract.
35
35
 
@@ -66,7 +66,7 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
66
66
 
67
67
  ## Skills
68
68
 
69
- ! **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.
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`.
70
70
  ## Skill pin policy (#2508)
71
71
 
72
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).
@@ -113,7 +113,7 @@ Any remaining decisions deferred to implementation.
113
113
 
114
114
  ```json
115
115
  {
116
- "vBRIEFInfo": { "version": "0.6" },
116
+ "xBRIEFInfo": { "version": "0.8" },
117
117
  "plan": {
118
118
  "title": "Project Name SPECIFICATION",
119
119
  "status": "proposed",
@@ -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 `scripts/subagent_monitor.py` detect a stalled poller within the threshold instead of waiting on the `{poll_cap_minutes}`-minute cap.
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`, `scripts/swarm_verify_review_clean.py`). 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.
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](../../main.md) | [tools/taskfile.md](./taskfile.md) | [scm/github.md](../scm/github.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](../../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](../../main.md) | [taskfile-migration.md](./taskfile-migration.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
 
@@ -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](../../main.md) | [coding.md](../coding/coding.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 `run` commands (`.deft/core/run bootstrap`, `.deft/core/run spec`). See [commands.md](../commands.md) for the full command lifecycle.
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