@deftai/directive-content 0.90.0 → 0.92.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 +1 -1
- package/coding/coding.md +8 -0
- package/commands.md +21 -4
- package/contracts/scm-readiness.md +78 -0
- package/docs/deft-directive-disable.md +96 -0
- package/docs/directive-lifecycle.md +16 -0
- package/docs/getting-started.md +2 -0
- package/docs/no-deft-directive.md +1 -0
- package/docs/openclaw-agent-host.md +2 -2
- package/docs/skill-pin-policy.md +7 -0
- package/package.json +1 -1
- package/packs/lessons/lessons-pack-0.1.json +85 -45
- package/packs/patterns/patterns-pack-0.1.json +13 -1
- package/packs/rules/rules-pack-0.1.json +114 -82
- package/packs/skills/skills-pack-0.1.json +8 -5
- package/patterns/in-band-signaling.md +124 -0
- package/scm/github.md +47 -0
- package/skills/deft-directive-build/SKILL.md +44 -1
- package/skills/deft-directive-pre-pr/SKILL.md +4 -2
- package/skills/deft-directive-review-cycle/SKILL.md +50 -2
- package/skills/deft-directive-setup/SKILL.md +104 -1
- package/skills/deft-directive-swarm/references/core-ops.md +1 -0
- package/skills/deft-directive-swarm/references/core-phase-0.md +6 -0
- package/skills/deft-directive-swarm/references/host-openclaw.md +10 -0
- package/tasks/pr.yml +7 -8
- package/tasks/roadmap.yml +1 -1
- package/tasks/scope.yml +4 -1
- package/tasks/spec.yml +5 -2
- package/templates/agent-prompt-preamble.md +3 -0
- package/templates/agents-entry.md +10 -0
- package/templates/swarm-greptile-poller-prompt.md +48 -5
package/QUICK-START.md
CHANGED
|
@@ -155,7 +155,7 @@ Read and follow `../AGENTS.md`. This starts the normal first-session flow (user
|
|
|
155
155
|
|
|
156
156
|
**Writing pointer:** For docs, issues, and PR prose that maintainers or agents author, follow [docs/writing-ste100.md](./docs/writing-ste100.md) (short controlled English; #2927).
|
|
157
157
|
|
|
158
|
-
**Opt-out pointer:** Projects that must not use Directive should commit root [`.no-deft-directive`](./docs/no-deft-directive.md) so session/doctor/init/setup skip install and ritual (#2926).
|
|
158
|
+
**Opt-out pointer:** Projects that must not use Directive should commit root [`.no-deft-directive`](./docs/no-deft-directive.md) so session/doctor/init/setup skip install and ritual (#2926). Temporary local kill-switch (deposit OK): [`.deft-directive-disable`](./docs/deft-directive-disable.md) (#3039).
|
|
159
159
|
|
|
160
160
|
**Contributor pointer (non-blocking):** Working on Deft itself (a `deftai/directive` source checkout)? See [CONTRIBUTING.md](../CONTRIBUTING.md) and use the maintainer install path (`deft-install --yes --upgrade --maintainer --repo-root . --json`). The repo's root `AGENTS.md` has contributor instructions — you do not need the consumer first-session flow above.
|
|
161
161
|
|
package/coding/coding.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
<!-- Regenerate with: task packs:render -->
|
|
5
5
|
<!-- Edit the source, not this file. Slice instead of loading every coding doc: task packs:slice rules by-tier --tier <TIER> (or by-domain, list) -->
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
# Coding Guidelines
|
|
8
9
|
|
|
9
10
|
Software development specific guidelines for AI agents.
|
|
@@ -83,6 +84,13 @@ See [../scm/git.md](../scm/git.md) for:
|
|
|
83
84
|
- ! Comments explain **why**, code shows **what**
|
|
84
85
|
- ⊗ Clever code over clear code
|
|
85
86
|
|
|
87
|
+
**State & Data Modeling (#1695):**
|
|
88
|
+
- ! A field MUST encode exactly one fact. Do NOT overload a field's value — or its presence/absence — to also signal a second orthogonal concern. Smuggling decision-, config-, lifecycle-, or control-state through a data field is *in-band signaling*; give that signal its own out-of-band field.
|
|
89
|
+
- ! "Absence is not a decision." Distinguish "unset / never considered" from "deliberately set to the default." If a workflow must know a human made a choice, record the choice explicitly — never infer it from whether a value-field is present.
|
|
90
|
+
- ~ Orthogonality test: if two facts can vary independently (e.g. value==default while decided ∈ {true,false}), they MUST live in separate slots. If one fact strictly implies the other (true Optional<T>, tombstones), sharing a slot is fine.
|
|
91
|
+
- ⊗ Infer decision / onboarding / configuration state from the presence of a value field. Use an explicit out-of-band marker — cf. the resolver `source` provenance pattern (typed | default | default-on-error) directive already uses for *value*-provenance.
|
|
92
|
+
- See [../patterns/in-band-signaling.md](../patterns/in-band-signaling.md) for the full model, orthogonality procedure, and the wipCap worked example (#1694).
|
|
93
|
+
|
|
86
94
|
## Quality Standards
|
|
87
95
|
|
|
88
96
|
**General:**
|
package/commands.md
CHANGED
|
@@ -90,6 +90,7 @@ Scope xBRIEFs live under `xbrief/{proposed,pending,active,completed,cancelled}/`
|
|
|
90
90
|
Common commands:
|
|
91
91
|
|
|
92
92
|
- `task scope:promote -- xbrief/proposed/<file>.xbrief.json` -- move proposed work to `pending/` and set status to `pending`.
|
|
93
|
+
- `task scope:promote -- --batch` -- batch-promote **all** `xbrief/proposed/` scopes to `pending/` in one command (#3011 / epic #3009). Optional: `--batch <path>…` for an explicit list; `--force` overrides WIP cap (logged). Does **not** activate; implement remains one `scope:activate` at a time.
|
|
93
94
|
- `task scope:activate -- xbrief/pending/<file>.xbrief.json` -- move accepted work to `active/` and set status to `running`.
|
|
94
95
|
- `task scope:complete -- xbrief/active/<file>.xbrief.json` -- move running work to `completed/` and set status to `completed`.
|
|
95
96
|
- `task scope:fail -- xbrief/active/<file>.xbrief.json` -- mark running work failed when the scope cannot complete.
|
|
@@ -109,7 +110,9 @@ deft xbrief:preflight -- xbrief/active/<file>.xbrief.json
|
|
|
109
110
|
|
|
110
111
|
Gate 0 `task verify:story-ready` machine-checks working-tree cleanliness (or `--allow-dirty`), the target xBRIEF in `xbrief/active/` with `plan.status == "running"`, and the dispatch envelope's `## Allocation context` consent token (#1378). A `swarm-cohort` section is ready only when `allocation_plan_id` AND `batching_rationale` are non-null. Complete stories with `task scope:complete -- <active-story-path>`.
|
|
111
112
|
|
|
112
|
-
**Story Start Gate (#1378):** Before starting any new implementation story or switching stories, run `git status --short --branch`. If the working tree is dirty, stop and summarize the current branch, modified/untracked files, and whether the changes appear related to the next story — ask the operator to choose: commit existing work, stash existing work, include existing work in the current story, or stop. ⊗ Do not begin a new story while unrelated dirty work is present without explicit operator approval. When invoked as part of a swarm cohort dispatch, the approved Phase 5 allocation plan satisfies batching consent (#954); between stories checkpoint-commit it and proceed — do not pause to ask the operator mid-cohort. Promote/activate via `task scope:promote -- <path>` / `task scope:activate -- <path>`; preflight with `deft xbrief:preflight -- <active-story-path>`.
|
|
113
|
+
**Story Start Gate (#1378):** Before starting any new implementation story or switching stories, run `git status --short --branch`. If the working tree is dirty, stop and summarize the current branch, modified/untracked files, and whether the changes appear related to the next story — ask the operator to choose: commit existing work, stash existing work, include existing work in the current story, or stop. ⊗ Do not begin a new story while unrelated dirty work is present without explicit operator approval. When invoked as part of a swarm cohort dispatch, the approved Phase 5 allocation plan satisfies batching consent (#954); between stories checkpoint-commit it and proceed — do not pause to ask the operator mid-cohort. Promote/activate via `task scope:promote -- <path>` (or `task scope:promote -- --batch` for multi-scope pins, #3011) / `task scope:activate -- <path>`; preflight with `deft xbrief:preflight -- <active-story-path>`.
|
|
114
|
+
|
|
115
|
+
**Multi-scope turn/cache budget (#3009):** After offline seed (init + pin scopes + session ritual), implement agents ⊗ re-run `directive init`, cold `session:start`, migrate, or re-copy scopes — recover with `session:ready` / re-arm only (#3010). Batch-promote the pin; activate+implement one scope at a time (#3011). Run full `task check` once at end of the multi-scope batch unless the last check failed (#3012). Init seeds a minimal render-ready `PROJECT-DEFINITION`; treat `project:render` as a one-shot lifecycle refresh, not identity research (#3013).
|
|
113
116
|
|
|
114
117
|
The implementation gate succeeds only for active scope xBRIEFs with `plan.status == "running"`. Do not infer implementation intent from lifecycle vocabulary — require explicit action-verb directives (`build`, `implement`, `ship`, `swarm`, `run agents`, `start agent`) per #810.
|
|
115
118
|
|
|
@@ -140,9 +143,11 @@ flowchart TD
|
|
|
140
143
|
|
|
141
144
|
Edit the xBRIEF source, then render the markdown view.
|
|
142
145
|
|
|
143
|
-
- `task spec:render` -- render `xbrief/specification.xbrief.json` to `SPECIFICATION.md`.
|
|
146
|
+
- `task spec:render` -- render `xbrief/specification.xbrief.json` to a **compact** `SPECIFICATION.md` by default (#1566). Defaults: no lifecycle Scope outlook, no `LegacyArtifacts`. Opt in with engine flags passed after `--`:
|
|
147
|
+
- `--include-scopes=off` (default) / `current` (pending+active) / `all` (include completed archive)
|
|
148
|
+
- `--include-legacy-artifacts=on|off` (default off)
|
|
144
149
|
- `task prd:render` -- render a stakeholder PRD view from the specification xBRIEF.
|
|
145
|
-
- `task roadmap:render` -- render `ROADMAP.md` from lifecycle scope xBRIEFs.
|
|
150
|
+
- `task roadmap:render` -- render `ROADMAP.md` from lifecycle scope xBRIEFs (`pending/` + `proposed/` + `active/` forward; `completed/` capped).
|
|
146
151
|
- `task project:render` -- refresh the `PROJECT-DEFINITION.xbrief.json` items registry from lifecycle folders.
|
|
147
152
|
- `deft xbrief:validate` -- validate xBRIEF schema, filenames, folders, statuses, and cross-file consistency.
|
|
148
153
|
- `deft migrate:xbrief` (or `task migrate:xbrief`) -- convert a legacy `vbrief/` project tree to `xbrief/` (v0.6→v0.8 semantic transforms; requires clean working tree unless `--force`). Legacy `vbrief/` and `x-vbrief/` tokens remain read-accepted until this runs.
|
|
@@ -279,6 +284,17 @@ Full always-on contract for the interactive session-start ritual and its gated v
|
|
|
279
284
|
|
|
280
285
|
Agents use this signal to prefer portable syntax and quote zsh-sensitive data such as globs, tildes, `~N`, `!`, and `#`. When a command requires Bash, zsh, PowerShell, or another shell's behavior, invoke that explicit shell rather than relying on implicit execution semantics.
|
|
281
286
|
|
|
287
|
+
### SCM readiness orientation (#2275)
|
|
288
|
+
|
|
289
|
+
`session:start` also reports whether GitHub SCM tooling is usable **in this execution env** (not the install host). Human output includes `[deft scm]` lines; `--json` includes a `scm` object (`ready`, `binary`, `auth_state`, `github_auth_mode`, `runtime_mode`, `injected_token_present`, `skipped_gates`, `detail`, ...). Cold mutation records a `scm_readiness` step in `steps[]`.
|
|
290
|
+
|
|
291
|
+
- Shallow probe (default hot path): PATH ladder `ghx` > `gh`, injected-token env presence, short `gh auth status`.
|
|
292
|
+
- Deep probe when `--with-network` / `DEFT_SESSION_START_NETWORK=1`: full `github-auth-modes` validation (API + optional repo).
|
|
293
|
+
- Session-start never hard-blocks on SCM absence (framework-local gates still run). When not ready it lists skipped SCM-dependent gates (`triage:queue`, `issue:ingest`, `pr:*`, `reconcile:issues`, `cache:fetch-all`, `scm:*`, ...).
|
|
294
|
+
- Explicit probe: `deft scm:status` (alias `scm:readiness`) -- exit `0` ready / `1` not ready / `2` config; flags `--json`, `--deep` / `--shallow`.
|
|
295
|
+
- Credential bridging: host-gh (`gh auth login` in the execution env) or injected-token (`GH_TOKEN` / `GITHUB_TOKEN` / `GH_ENTERPRISE_TOKEN`). Never put token values in prompts or transcripts.
|
|
296
|
+
- Contract: `content/contracts/scm-readiness.md`; operator docs: `content/scm/github.md` § Mismatched/headless SCM readiness.
|
|
297
|
+
|
|
282
298
|
**Pre-`start_agent` gate stack (#1149/#1348):** (0) `deft verify:session-ritual -- --tier=gated` → (1) `deft verify:story-ready` → (2) `deft xbrief:preflight` → (3) `deft verify:cache-fresh` → (4) `deft verify:branch` + hooks → (5) `start_agent`.
|
|
283
299
|
|
|
284
300
|
```mermaid
|
|
@@ -302,7 +318,7 @@ Local ceremony cost signal for WWYSYDH / weekly process rollups. Emits to `.deft
|
|
|
302
318
|
| Session start (cold) | `session:start` | Mutation `session:start` cold path finishes | `ceremony_tier=cold`, `duration_ms`, `exit_code`, `steps[]` |
|
|
303
319
|
| Session re-arm | `session:start` | `session:start --rearm` finishes | `ceremony_tier=rearm`, `duration_ms`, `exit_code`, `steps[]` |
|
|
304
320
|
| PreToolUse ritual deny | `session:ritual-blocked` | Hook blocks write/spawn because gated ritual is not ready | `tool_name`, `code=ritual-not-ready`, `recovery_tier` (`cold`\|`rearm`) |
|
|
305
|
-
| Per-step wall-clock | (field on `session:start`) | Same emit as session start | `steps[].name` + `steps[].duration_ms` (`alignment`, `branch_policy`, `verify_tools`, `triage_welcome`, `release_probe`, `ritual_write`) |
|
|
321
|
+
| Per-step wall-clock | (field on `session:start`) | Same emit as session start | `steps[].name` + `steps[].duration_ms` (`alignment`, `scm_readiness`, `branch_policy`, `verify_tools`, `triage_welcome`, `release_probe`, `ritual_write`) |
|
|
306
322
|
|
|
307
323
|
CLI mirror (no JSONL required): `deft session:start --json` already exposes the same `steps` / `duration_ms` / `ceremony_tier` fields for one-shot inspection.
|
|
308
324
|
|
|
@@ -414,6 +430,7 @@ flowchart TD
|
|
|
414
430
|
|
|
415
431
|
- `task packs:*` -- render and verify content packs.
|
|
416
432
|
- `task pr:*` -- protected issue checks, closing-keyword checks, merge readiness, and merge helpers.
|
|
433
|
+
- `task pr:check-closing-keywords` -- Layer 0 FP lint (#737) **plus intent mode** (#3015 class D). Default `--mode both`: fails on negation/quote/example/code-block hits **and** on any real `Closes|Fixes|Resolves #N` unless allowlisted via `--allow-close N,M` (CLI only; body trailers are not an authorization path). Offline: `--body-file` / `--commits-file`. Prefer `Tracking: #N` / `Refs #N` until full issue DoD.
|
|
417
434
|
- `task release:*` -- release, publish, rollback, and e2e release rehearsal.
|
|
418
435
|
- Step 3 (`Pre-flight vBRIEF lifecycle sync`) fetches GitHub issue states via REST. On HTTP 403 rate-limit exhaustion it sleeps once (capped at 120s) and retries before failing.
|
|
419
436
|
- When Step 3 still fails with rate-limit exhaustion, stderr includes a `gh api rate_limit` probe (`core.remaining`, reset time) and recovery guidance. After local `task vbrief:validate` (or `task xbrief:validate`) exits 0, operators may pass `--allow-vbrief-drift` to skip Step 3 for that cut — reserved for transient SCM bucket stalls, not unreviewed lifecycle drift.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Contract: SCM readiness in mismatched / headless envs (#2275)
|
|
2
|
+
|
|
3
|
+
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
4
|
+
|
|
5
|
+
**Parent:** issue #2275 (follow-up to #2203 Decision 7). Sibling of USER.md
|
|
6
|
+
resolution (#2271).
|
|
7
|
+
|
|
8
|
+
## Problem
|
|
9
|
+
|
|
10
|
+
In agentic sandboxes, execution-env often differs from install-env: `gh` /
|
|
11
|
+
`ghx` may be absent or unauthenticated even when the host desktop is fully
|
|
12
|
+
set up. SCM-dependent gates then fail opaquely (spawn errors, hung auth
|
|
13
|
+
prompts) while framework-local gates still work.
|
|
14
|
+
|
|
15
|
+
## Gate classes
|
|
16
|
+
|
|
17
|
+
### Framework-local (no SCM required)
|
|
18
|
+
|
|
19
|
+
`session:start`, `session:ready`, `verify:session-ritual`, `verify:tools`
|
|
20
|
+
(orientation), `verify:branch`, `xbrief:preflight`, `doctor` (offline),
|
|
21
|
+
`scope:*`, local cache-fresh / ritual state.
|
|
22
|
+
|
|
23
|
+
These ! run regardless of SCM readiness.
|
|
24
|
+
|
|
25
|
+
### SCM-dependent (require binary + auth)
|
|
26
|
+
|
|
27
|
+
At minimum: `triage:queue`, `triage:welcome` network hydrate, `issue:ingest`,
|
|
28
|
+
`reconcile:issues`, `pr:*`, `cache:fetch-all`, `scm:*` issue ops,
|
|
29
|
+
`umbrella:current-shape` live fetch, deep `github-auth-modes`.
|
|
30
|
+
|
|
31
|
+
These ! either run when ready or fail loud with a named reason. They ⊗ hang
|
|
32
|
+
on interactive auth prompts in headless envs without a clear diagnostic.
|
|
33
|
+
|
|
34
|
+
## Probe surface
|
|
35
|
+
|
|
36
|
+
| Surface | Depth | Blocks session? |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `session:start` default | shallow (PATH + token + `gh auth status`) | no |
|
|
39
|
+
| `session:start --with-network` | deep (API + optional repo) | no |
|
|
40
|
+
| `deft scm:status` | shallow default; `--deep` opt-in | n/a (exit 0/1/2) |
|
|
41
|
+
| `deft github-auth-modes` | mode validation (#1557) | n/a |
|
|
42
|
+
|
|
43
|
+
JSON field shape (`session:start --json` → `scm`, or `scm:status --json`):
|
|
44
|
+
|
|
45
|
+
- `ready` (bool)
|
|
46
|
+
- `binary` (`ghx` \| `gh` \| null)
|
|
47
|
+
- `binary_path`
|
|
48
|
+
- `auth_state` (`authenticated` \| `unauthenticated` \| `missing-token` \|
|
|
49
|
+
`binary-absent` \| `unknown`)
|
|
50
|
+
- `github_auth_mode` (`host-gh` \| `injected-token`)
|
|
51
|
+
- `runtime_mode`
|
|
52
|
+
- `injected_token_present` (bool; never the value)
|
|
53
|
+
- `depth` (`shallow` \| `deep`)
|
|
54
|
+
- `detail` (one-line human diagnostic)
|
|
55
|
+
- `remediation` (string \| null)
|
|
56
|
+
- `skipped_gates` (string[])
|
|
57
|
+
- `login` (string \| null; deep only)
|
|
58
|
+
- `failure_kind` (string \| null)
|
|
59
|
+
|
|
60
|
+
## Remediation contract
|
|
61
|
+
|
|
62
|
+
When not ready, agents ! prefer one of:
|
|
63
|
+
|
|
64
|
+
1. Install + auth in the **execution** env (`gh` / `ghx`, then
|
|
65
|
+
`gh auth login` for host-gh).
|
|
66
|
+
2. Inject `GH_TOKEN` / `GITHUB_TOKEN` / `GH_ENTERPRISE_TOKEN` for
|
|
67
|
+
injected-token / cloud-headless mode.
|
|
68
|
+
3. Run SCM-dependent gates from a matched authenticated environment.
|
|
69
|
+
|
|
70
|
+
⊗ Put token values into prompts, dispatch envelopes, or logs.
|
|
71
|
+
|
|
72
|
+
## Implementation anchors
|
|
73
|
+
|
|
74
|
+
- Probe: `packages/core/src/scm/readiness.ts`
|
|
75
|
+
- CLI: `packages/core/src/scm/readiness-cli.ts` (`scm:status`)
|
|
76
|
+
- Session orientation: `packages/core/src/session/session-start.ts`
|
|
77
|
+
- Auth modes: `packages/core/src/intake/github-auth-modes.ts` (#1557)
|
|
78
|
+
- Operator docs: `content/scm/github.md` § Mismatched/headless SCM readiness
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Temporary kill-switch: `.deft-directive-disable`
|
|
2
|
+
|
|
3
|
+
Use a **root file flag** to turn Directive **enforcement** off for local testing (A/B, DevHammer, ceremony vs loop) **without** permanent project opt-out and **without** deleting the deposit.
|
|
4
|
+
|
|
5
|
+
Tracker: [#3039](https://github.com/deftai/directive/issues/3039).
|
|
6
|
+
|
|
7
|
+
**Not** permanent opt-out — that is [`.no-deft-directive`](./no-deft-directive.md) (#2926).
|
|
8
|
+
|
|
9
|
+
## Filename and location
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
.deft-directive-disable
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- **Exact name:** lowercase `.deft-directive-disable`
|
|
16
|
+
- **Location:** project / workspace **root only**
|
|
17
|
+
- **Content:** empty file or a short `#` comment. Presence is the flag. No schema.
|
|
18
|
+
- **Git:** **Must be gitignored** (deposit baseline includes this entry). Committed / tracked flag is a misconfig: doctor **warns**, and enforcement is **not** disabled (repo-controlled content must not turn off hooks for clones).
|
|
19
|
+
|
|
20
|
+
## Distinct from permanent opt-out
|
|
21
|
+
|
|
22
|
+
| File | Intent |
|
|
23
|
+
|------|--------|
|
|
24
|
+
| [`.no-deft-directive`](./no-deft-directive.md) | Permanent: project does not use Directive. Flag + deposit is **inconsistent**. |
|
|
25
|
+
| `.deft-directive-disable` | Temporary: testing kill-switch. **Deposit OK**. |
|
|
26
|
+
|
|
27
|
+
## Behavior
|
|
28
|
+
|
|
29
|
+
| Surface | When flag present |
|
|
30
|
+
|---------|-------------------|
|
|
31
|
+
| **Doctor** | Status **disabled (test kill-switch)**; **not** the #2926 flag+deposit dirty path; prints full recovery (file gone + new session). |
|
|
32
|
+
| **Agent** | Always-on AGENTS contract: stop further Directive process load; echo recovery. |
|
|
33
|
+
| **CLI** (`session:start`, ritual paths) | Disabled + recovery; no ritual write / no half-DD automation. |
|
|
34
|
+
| **Host hooks** | SessionStart / PreToolUse / compact skip ritual and enforcement. |
|
|
35
|
+
|
|
36
|
+
Deposit (`.deft/core`) **may remain**. Init/update are not blocked by this flag alone (unlike permanent opt-out).
|
|
37
|
+
|
|
38
|
+
## Recovery (hysteresis)
|
|
39
|
+
|
|
40
|
+
Directive is **fully operational** only when:
|
|
41
|
+
|
|
42
|
+
1. **`.deft-directive-disable` is absent**, and
|
|
43
|
+
2. A **new agent session** has been started after the file was removed
|
|
44
|
+
|
|
45
|
+
Canonical recovery message:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
Directive is DISABLED for this project via root `.deft-directive-disable` (test/local kill-switch).
|
|
49
|
+
Deposit may still be present; enforcement (hooks, session ritual, automation) will not run.
|
|
50
|
+
|
|
51
|
+
To fully re-enable Directive:
|
|
52
|
+
1. Delete the file: rm .deft-directive-disable (or equivalent)
|
|
53
|
+
2. Start a NEW agent session (reload AGENTS / host skills / hooks)
|
|
54
|
+
Until both are done, Directive is not fully operational.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Precedence
|
|
58
|
+
|
|
59
|
+
1. `.deft-directive-disable` → test kill-switch (deposit OK; recovery = delete + new session)
|
|
60
|
+
2. `.no-deft-directive` → permanent opt-out (#2926)
|
|
61
|
+
3. Else normal Directive
|
|
62
|
+
|
|
63
|
+
If **both** flags are present: one combined message; permanent install semantics still apply for init/update.
|
|
64
|
+
|
|
65
|
+
## Consumer note (A/B / DevHammer)
|
|
66
|
+
|
|
67
|
+
Typical arm for “without Directive enforcement”:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Ensure ignore entry exists (init/update baseline)
|
|
71
|
+
# Then:
|
|
72
|
+
touch .deft-directive-disable
|
|
73
|
+
# Start a new agent session — enforcement off; deposit may stay.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Re-enable:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
rm .deft-directive-disable
|
|
80
|
+
# Start a NEW agent session
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Non-goals (v1)
|
|
84
|
+
|
|
85
|
+
- ⊗ Auto-delete `.deft/` or uninstall deposit
|
|
86
|
+
- ⊗ Replace or weaken `.no-deft-directive`
|
|
87
|
+
- ⊗ Rewrite AGENTS to a stub on disable
|
|
88
|
+
- ⊗ Org-remote kill switch
|
|
89
|
+
- ⊗ Nested monorepo package roots
|
|
90
|
+
- ⊗ `DEFT_DISABLED=1` env (optional later)
|
|
91
|
+
|
|
92
|
+
## Related
|
|
93
|
+
|
|
94
|
+
- [no-deft-directive.md](./no-deft-directive.md) — permanent opt-out
|
|
95
|
+
- [getting-started.md](./getting-started.md) — install and first project
|
|
96
|
+
- `session:start`, `doctor`, host hooks (SessionStart / PreToolUse / compact)
|
|
@@ -65,6 +65,22 @@ framework:
|
|
|
65
65
|
| **Ship** | PR merge and release — `task pr:*` and [`deft-directive-release`](../skills/deft-directive-release/SKILL.md). |
|
|
66
66
|
| **Issues / Features** | GitHub issues and feature requests mirrored into `.deft-cache/` and surfaced as triage candidates. |
|
|
67
67
|
|
|
68
|
+
## Delivery integrity vs deploy / UAT (#3041)
|
|
69
|
+
|
|
70
|
+
`scope:complete` and swarm cohort completion mark **lifecycle bookkeeping**, not environment
|
|
71
|
+
green. For **code-bearing** scopes, delivered completion requires durable proof that the
|
|
72
|
+
implementation reached the configured **delivery branch** (`plan.policy.deliveryBranch`,
|
|
73
|
+
defaulting to the repo default branch) — typically: PR `base.ref` equals that branch, and the
|
|
74
|
+
merge commit is an ancestor of the refreshed remote delivery ref. A merge into an intermediate
|
|
75
|
+
feature/integration branch is **not** delivery.
|
|
76
|
+
|
|
77
|
+
Handoff states that Git can assert are distinct: `implemented` → `pr_open` →
|
|
78
|
+
`merged_to_integration` → `delivered`. **Deployed** and **UAT verified** are separate evidence
|
|
79
|
+
axes and are never inferred from Git alone. Explicit non-delivery dispositions
|
|
80
|
+
(`accepted_not_delivered`, `superseded`, `experiment_archived`, `cancelled`) complete the
|
|
81
|
+
lifecycle without claiming the work shipped. Legacy completed records without completion
|
|
82
|
+
provenance surface as `unknown` / `unverified`, not retroactively `delivered`.
|
|
83
|
+
|
|
68
84
|
## Why it loops
|
|
69
85
|
|
|
70
86
|
The central claim of the picture is that Directive is **reiterative**. Strategy analysis is
|
package/docs/getting-started.md
CHANGED
|
@@ -145,3 +145,5 @@ Full command reference for every triage and cache verb lives in [`commands.md`
|
|
|
145
145
|
**Writing:** For docs, issues, and PR prose, follow [writing-ste100.md](./writing-ste100.md) (short controlled English; #2927).
|
|
146
146
|
|
|
147
147
|
**Opt out:** To mark a repo as not using Directive, add root [`.no-deft-directive`](./no-deft-directive.md) (#2926). Tools skip install and session ritual when that file is present.
|
|
148
|
+
|
|
149
|
+
**Temporary test kill-switch:** For local A/B or DevHammer without permanent opt-out, use root [`.deft-directive-disable`](./deft-directive-disable.md) (#3039). Deposit may stay; re-enable by deleting the file and starting a new agent session.
|
|
@@ -82,6 +82,7 @@ When `deft-directive-setup` runs:
|
|
|
82
82
|
|
|
83
83
|
## Related
|
|
84
84
|
|
|
85
|
+
- [deft-directive-disable.md](./deft-directive-disable.md) — **temporary** test/local kill-switch (deposit OK; not this flag)
|
|
85
86
|
- [getting-started.md](./getting-started.md) — install and first project
|
|
86
87
|
- [product-signal.md](./product-signal.md) — optional partner signal (defaults off; flag still wins locally)
|
|
87
88
|
- `session:start`, `doctor`, `directive init`, `directive update`
|
|
@@ -142,9 +142,9 @@ When OpenClaw signals are present (`OPENCLAW` / `DEFT_PROBE_OPENCLAW` / `DEFT_AG
|
|
|
142
142
|
deft doctor --fix
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
Doctor
|
|
145
|
+
Doctor **copies** the four pin directories from the installed content package (`@deftai/directive-content` / `content/skills/…`) into the main OpenClaw skills root as **real directories** (#3008). It does **not** symlink into the npm tree — OpenClaw 2026.7.x skips workspace skills that resolve outside the skills root (`reason=symlink-escape`), which made pre-#3008 symlink installs look healthy in doctor while `openclaw skills list` never loaded the pins. It does **not** delete other user skills (e.g. a local `vbrief` skill stays). Divergent same-named directories **and escaping symlinks** are left alone unless you pass `--force` or confirm on a TTY (then replaced with a real copy).
|
|
146
146
|
|
|
147
|
-
After a successful wire: **restart the OpenClaw gateway or start a new session** so host `available_skills` refreshes.
|
|
147
|
+
After a successful wire: **restart the OpenClaw gateway or start a new session** so host `available_skills` refreshes. Confirm with `openclaw skills list` that the four always-pins are **ready**, not skipped.
|
|
148
148
|
|
|
149
149
|
### Multi-seat / crew workspaces
|
|
150
150
|
|
package/docs/skill-pin-policy.md
CHANGED
|
@@ -69,9 +69,16 @@ The managed AGENTS.md section `## Skill pin policy (#2508)` carries the framewor
|
|
|
69
69
|
|
|
70
70
|
Skills-pack entries (`content/packs/skills/skills-pack-0.1.json`) MAY record `"alwaysPin": true` on metadata-only rows so slice tooling and future gates can list pins without parsing AGENTS.md. The authoritative runtime list for agents remains the AGENTS.md pin section; the catalog field is advisory for tooling (#1535).
|
|
71
71
|
|
|
72
|
+
## Through-merge is false-negative sensitive (#3032)
|
|
73
|
+
|
|
74
|
+
Operator phrases such as **through merge**, **drive to merge**, **land/ship issue**, or explicit **drive-to: merge-ready** often start implementation **without** a clear `swarm` keyword. That is the same false-negative class this policy targets: the parent may code instead of loading `deft-directive-swarm` and dispatching a worker.
|
|
75
|
+
|
|
76
|
+
! AGENTS.md carries short always-on `!` / `⊗` bullets under **Through-merge worker dispatch (#3032)** (agents-entry + maintainer multi-agent doctrine). N=1 still uses the swarm/solo launch path; parent MUST NOT implement when background subagent/worktree dispatch is available. See also swarm Phase 0 `references/core-phase-0.md` and #1880 Gap C.
|
|
77
|
+
|
|
72
78
|
## Related
|
|
73
79
|
|
|
74
80
|
- Skills Index: `REFERENCES.md` § Skills Index
|
|
75
81
|
- Progressive disclosure: #2484
|
|
76
82
|
- Trigger coverage evals: #1586
|
|
77
83
|
- Review-surface precedence: #2308 / `deft-directive-review-cycle`
|
|
84
|
+
- Through-merge parent-must-dispatch: #3032 / AGENTS.md `## Through-merge worker dispatch (#3032)`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftai/directive-content",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.92.0",
|
|
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
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|