@deftai/directive-content 0.91.0 → 0.93.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/.agents/skills/deft-directive-xbrief/SKILL.md +11 -0
- package/QUICK-START.md +1 -1
- package/UPGRADING.md +14 -0
- package/ci-cd/README.md +57 -0
- package/ci-cd/blacksmith/README.md +32 -0
- package/ci-cd/blacksmith/examples/lint-vs-test-split.md +98 -0
- package/ci-cd/blacksmith/migration-prompt.md +80 -0
- package/ci-cd/blacksmith/overview.md +58 -0
- package/ci-cd/blacksmith/runner-tiers.md +80 -0
- package/coding/coding.md +7 -1
- package/coding/docs.md +44 -0
- package/coding/review.md +50 -0
- package/commands.md +43 -0
- package/conventions/content-manifest.json +6 -1
- package/deployments/README.md +8 -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 +46 -0
- package/docs/skill-discovery-hosts.md +84 -0
- package/docs/skill-pin-policy.md +7 -0
- package/docs/slash-multi-host.md +241 -0
- package/main.md +1 -0
- package/package.json +1 -1
- package/packs/lessons/lessons-pack-0.1.json +85 -45
- package/packs/rules/rules-pack-0.1.json +137 -1
- package/packs/skills/skills-pack-0.1.json +25 -6
- package/skills/deft-directive-pre-pr/SKILL.md +8 -5
- package/skills/deft-directive-review-cycle/SKILL.md +75 -20
- 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/skills/deft-directive-xbrief/SKILL.md +77 -0
- package/templates/agent-prompt-preamble.md +3 -0
- package/templates/agents-entry.md +10 -0
- package/templates/swarm-greptile-poller-prompt.md +48 -5
|
@@ -19,7 +19,7 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
|
19
19
|
|
|
20
20
|
**See also**: [deft-directive-review-cycle](../deft-directive-review-cycle/SKILL.md) | [deft-directive-build](../deft-directive-build/SKILL.md) | [RWLDL tool](../../tools/RWLDL.md)
|
|
21
21
|
|
|
22
|
-
> **Formerly `deft-rwldl`** -- renamed to
|
|
22
|
+
> **Formerly `deft-rwldl`** -- renamed and scoped to PR readiness. For the broader iterative quality improvement loop (micro/macro review), see [tools/RWLDL.md](../../tools/RWLDL.md).
|
|
23
23
|
|
|
24
24
|
## Branch-Protection Policy Guard
|
|
25
25
|
|
|
@@ -64,7 +64,7 @@ task verify:plan-sequence -- --target-kind <entry-kind> --target <entry-id>
|
|
|
64
64
|
|
|
65
65
|
> **Invariant:** every change MUST pass the full gate at least once before merge. Pre-PR is the merge chokepoint — NOT every iteration commit.
|
|
66
66
|
|
|
67
|
-
- ! **Iteration lane (Phases 2–3 loop):** use affected/static gates on changed paths — `vitest run --coverage <paths>`, relevant `verify:*` on touched files, `task coverage:hotspots` — instead of full `task check` on every
|
|
67
|
+
- ! **Iteration lane (Phases 2–3 loop):** use affected/static gates on changed paths — `vitest run --coverage <paths>`, relevant `verify:*` on touched files, `task coverage:hotspots` — instead of full `task check` on every pre-PR iteration.
|
|
68
68
|
- ! **Merge chokepoint (Phase 3 Lint exit + final confirm):** run full `task check` once before push/PR; Phase 3c targeted coverage precedes but does not replace the full gate.
|
|
69
69
|
- ! **Escape-rate safety (#1703 Tier-1):** before recommending fleet-wide fast-lane tightening, cite `#1703` Tier-1 telemetry (`helped/crud-metrics.jsonl`) and `task eval:health` — do NOT invent a separate escape-rate surface.
|
|
70
70
|
- ~ **In-engine incrementality (#1713):** content-hash cache + runner-delegated affected selection are sibling work (#1713).
|
|
@@ -74,7 +74,7 @@ task verify:plan-sequence -- --target-kind <entry-kind> --target <entry-id>
|
|
|
74
74
|
|
|
75
75
|
- ! Before pushing a branch for PR creation
|
|
76
76
|
- ! After completing implementation but before the final merge-chokepoint `task check` (#1704)
|
|
77
|
-
- ~ After addressing bot reviewer findings (run one
|
|
77
|
+
- ~ After addressing bot reviewer findings (run one pre-PR pass before pushing the fix batch)
|
|
78
78
|
- ? During mid-implementation checkpoints on large changes
|
|
79
79
|
|
|
80
80
|
## Loop Phases
|
|
@@ -92,6 +92,9 @@ Each iteration proceeds through all phases in order. Do NOT skip phases or reord
|
|
|
92
92
|
- ! When strengthening a rule (e.g. upgrading `~` to `!`), grep for the term in the full file and verify no weaker-strength duplicate remains
|
|
93
93
|
- ~ Note any inconsistencies, missing RFC2119 markers, stale cross-references, or incomplete sections
|
|
94
94
|
- ~ Check that CHANGELOG.md entries match the actual changes made
|
|
95
|
+
- ! If the change alters **user-visible behavior**, apply [coding/docs.md](../../coding/docs.md) (#447): update the matching user-facing surface (CHANGELOG when user/operator-visible, CLI help / commands.md for new or changed verbs/flags, README/getting-started for install/first-run, skill/strategy triggers when entry points change) in this PR
|
|
96
|
+
- ⊗ Claim documentation was updated without those files in the diff
|
|
97
|
+
- ~ Pure internal refactors with no user-visible behavior change do not require user-facing doc updates
|
|
95
98
|
|
|
96
99
|
### Phase 2 -- Write
|
|
97
100
|
|
|
@@ -107,7 +110,7 @@ Each iteration proceeds through all phases in order. Do NOT skip phases or reord
|
|
|
107
110
|
|
|
108
111
|
! Run the merge-chokepoint gate and fix any failures (#1704).
|
|
109
112
|
|
|
110
|
-
- ! Run full `task check` (fmt + lint + typecheck + tests + coverage + verify:*) — the merge chokepoint, not every
|
|
113
|
+
- ! Run full `task check` (fmt + lint + typecheck + tests + coverage + verify:*) — the merge chokepoint, not every pre-PR iteration
|
|
111
114
|
- ! Fix all failures before proceeding to Phase 3b
|
|
112
115
|
- ~ If a lint fix requires changing a file, that counts as a change for the Loop phase
|
|
113
116
|
|
|
@@ -169,7 +172,7 @@ After exiting:
|
|
|
169
172
|
|
|
170
173
|
## Anti-Patterns
|
|
171
174
|
|
|
172
|
-
- ⊗ Submit a PR without running
|
|
175
|
+
- ⊗ Submit a PR without running this pre-PR loop (Read-Write-Lint-Diff) -- every PR branch should pass at least one full cycle
|
|
173
176
|
- ⊗ Exit the loop after the Lint phase without completing the Diff phase -- Diff catches scope creep and unintended changes that Lint cannot detect
|
|
174
177
|
- ⊗ Skip the Read phase and jump directly to Lint -- Read catches semantic issues (missing content, wrong RFC2119 markers, incomplete acceptance criteria) that linters do not check
|
|
175
178
|
- ⊗ Make out-of-scope fixes during Write -- this introduces scope creep that Diff will flag, forcing another iteration
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deft-directive-review-cycle
|
|
3
3
|
description: >-
|
|
4
|
-
Greptile /
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
babysit on Deft-managed repos (#2261).
|
|
4
|
+
Greptile / GitHub adapter for coding/review.md: babysit a PR to merge-ready
|
|
5
|
+
— audit process prerequisites, fetch bot findings, fix in one batch commit,
|
|
6
|
+
exit when no P0/P1 remain. Supersedes Cursor global babysit on Deft-managed
|
|
7
|
+
repos (#2261 / #1471).
|
|
9
8
|
---
|
|
10
9
|
<!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
|
|
11
10
|
<!-- Purpose: rendered skill -->
|
|
@@ -19,6 +18,14 @@ Structured workflow for responding to bot reviewer (Greptile) findings on a PR.
|
|
|
19
18
|
|
|
20
19
|
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
21
20
|
|
|
21
|
+
## Principle Authority (#1471 / #212)
|
|
22
|
+
|
|
23
|
+
! Universal review-cycle principles live in [`coding/review.md`](../../coding/review.md) (RFC2119): read-all-findings, severity P0/P1/P2 + merge-blocking semantics, single batch commit, cross-file grep of changed terms, local structured-data validation (SHOULD), no push mid-review, exit when no P0/P1 remain (P2 non-blocking), and post-merge closing-keyword verification.
|
|
24
|
+
|
|
25
|
+
! This skill is the **Greptile + GitHub adapter** only: polling cadence, confidence-score thresholds, check-run detection, dual-source fetch (`gh` + MCP) for Comments Outside Diff, fail-closed Step 6 `ReviewerStatus`, review-monitor lease, and merge gates. Apply `coding/review.md` for the process; do not restate that principle list inline.
|
|
26
|
+
|
|
27
|
+
~ Future adapters (CodeRabbit, Codacy, host babysit) SHOULD implement the same `coding/review.md` principles with their own mechanics.
|
|
28
|
+
|
|
22
29
|
## Platform Requirements
|
|
23
30
|
|
|
24
31
|
! This skill requires **GitHub** as the SCM platform and the **GitHub CLI (`gh`)** to be installed and authenticated. PR comment fetching, check-run queries, and review submission all depend on `gh`.
|
|
@@ -55,7 +62,7 @@ On repos with `.deft/core/` installed, **PR shepherding intent** routes here --
|
|
|
55
62
|
On OpenClaw hosts with Directive installed (`.deft/core/` or equivalent content deposit), **babysit / shepherd / watch** intent likewise routes here -- not host-local freestyle poll loops and not OpenClaw `cron` alone.
|
|
56
63
|
|
|
57
64
|
- ! When the OpenClaw tool surface exposes `sessions_spawn`, Approach 1 is the **default** babysit path: spawn a background review-monitor via `sessions_spawn` (register with `--platform-primitive sessions_spawn` or the alias `openclaw-sessions-spawn`).
|
|
58
|
-
- ! Prefer a **visible** Control UI subagent when OpenClaw Control UI is the operator control plane so humans can inspect the monitor.
|
|
65
|
+
- ! Prefer a **visible** Control UI subagent (`visible:true` when the tool surface allows) when OpenClaw Control UI is the operator control plane so humans can inspect the monitor (#3044; invisible empty settles are higher FC04 residual risk).
|
|
59
66
|
- ! Long review-monitor ownership (>~3 min) MUST NOT block the parent OpenClaw session — background `sessions_spawn` + parent yield; same Gap D rule as Cursor/Grok Build (#1880).
|
|
60
67
|
- ! Prefer deep-think gates inside the monitor via the dual-invoke probe order (#2893): `deft pr:watch` / `deft pr:merge-ready` first, then `task deft:pr:watch` when the Taskfile include is present, then the #2878 gh-only fallback — bare `task pr:watch` is not the consumer form.
|
|
61
68
|
- ⊗ Treat OpenClaw `cron` (or any host scheduler alone) as Approach 1. Cron/timer re-invocation is Approach 2 only when `sessions_spawn` is unavailable.
|
|
@@ -97,7 +104,7 @@ gh api repos/<owner>/<repo>/commits/<sha>/check-runs --jq '.check_runs[] | selec
|
|
|
97
104
|
|
|
98
105
|
! Before touching code, verify ALL prerequisites are satisfied. Fix any gaps first:
|
|
99
106
|
|
|
100
|
-
1. ! Verify `skills/deft-directive-pre-pr/SKILL.md` was run before PR creation -- the PR branch should have passed at least one full
|
|
107
|
+
1. ! Verify `skills/deft-directive-pre-pr/SKILL.md` was run before PR creation -- the PR branch should have passed at least one full pre-PR cycle (Read-Write-Lint-Diff). If not, run it now before proceeding.
|
|
101
108
|
2. ! `PROJECT-DEFINITION.xbrief.json` and `xbrief/` lifecycle folders have scope xBRIEF coverage for all changes in the PR
|
|
102
109
|
3. ! `CHANGELOG.md` has entries under `[Unreleased]` for the PR's changes
|
|
103
110
|
4. ! `task check` passes fully (fmt + lint + typecheck + tests + coverage ≥75%)
|
|
@@ -147,16 +154,13 @@ Both commands extract the "Comments Outside Diff" section with surrounding conte
|
|
|
147
154
|
|
|
148
155
|
### Step 2: Analyze ALL findings before changing anything
|
|
149
156
|
|
|
150
|
-
!
|
|
157
|
+
! Apply [`coding/review.md`](../../coding/review.md) before any code change: read **all** findings, classify P0/P1/P2, and plan **one** batch. Do not start per-finding fixes mid-read.
|
|
158
|
+
|
|
159
|
+
Greptile adapter analysis extras:
|
|
151
160
|
|
|
152
|
-
- Read every finding across all files
|
|
153
161
|
- Identify cross-file dependencies (a term, value, or field mentioned in multiple files)
|
|
154
|
-
- Categorize by severity (P0, P1, P2 — where P0 is critical/blocking, P1 is a real defect, P2 is a style or non-blocking suggestion)
|
|
155
|
-
- Plan a single coherent batch of fixes
|
|
156
162
|
- ! **Scope-check each finding against the active story xBRIEF** (`plan.items[].narrative.Acceptance`) before coding — see Out-of-AC gate (#2881) below
|
|
157
163
|
|
|
158
|
-
⊗ Start fixing individual findings as you encounter them.
|
|
159
|
-
|
|
160
164
|
### Out-of-AC findings / active-story scope gate (#2881)
|
|
161
165
|
|
|
162
166
|
Babysit and review-cycle are **not** a second unbounded implementation mandate. When Greptile (or another reviewer) raises design-adjacent work outside the active story's acceptance criteria, default to follow-up — not silent redesign mid-babysit (PR #2871 / #2869 → #2880 recurrence).
|
|
@@ -188,10 +192,10 @@ Babysit and review-cycle are **not** a second unbounded implementation mandate.
|
|
|
188
192
|
|
|
189
193
|
### Step 3: Fix all findings in ONE batch commit
|
|
190
194
|
|
|
191
|
-
! Apply
|
|
195
|
+
! Apply [`coding/review.md`](../../coding/review.md) single-batch, cross-file grep, and local structured-data validation rules. Land **all** in-scope fixes in one commit (or one intentional batch), never per-finding pushes.
|
|
196
|
+
|
|
197
|
+
Greptile adapter pre-commit gate:
|
|
192
198
|
|
|
193
|
-
- ! For any fix that touches a value, term, or field appearing in multiple files: grep for it across the full PR file set and update every occurrence in the same commit
|
|
194
|
-
- ! Validate structured data files locally before committing (e.g. `python3 -m json.tool` for JSON, YAML lint for YAML) — do not rely on the bot to catch syntax errors
|
|
195
199
|
- ! Before committing any Greptile fix, re-read the FULL current Greptile review and confirm all P0/P1 issues are addressed in the staged changes — this is the pre-commit gate that prevents per-finding fix commits
|
|
196
200
|
- ! Run `task check` before committing
|
|
197
201
|
- ! **Fail-loud completion claim (#1006)**: when reporting fix-batch completion (to the user, in the commit message, in a PR comment, or in a status message to a parent agent), MUST surface the OUTCOMES not the intent -- name the P0/P1 finding count addressed ("addressed 3/3 P0 findings, 2/2 P1 findings, 0 deferred" -- NOT "all findings addressed"), report the `task check` result with the test-collection counts ("task check: 412 collected, 412 passed, 0 skipped, 0 xfailed" -- NOT "task check passed"), and explicitly call out any finding intentionally deferred with the reason. Apply `coding/coding.md` `## Fail Loud: Completion Claims Require Outcome Verification (#1006)` to every claim emitted during the review cycle
|
|
@@ -200,8 +204,6 @@ Babysit and review-cycle are **not** a second unbounded implementation mandate.
|
|
|
200
204
|
- ? **Pre-existing failure carve-out**: If `task check` fails due to a pre-existing issue unrelated to the PR's changes, a partial test suite run is acceptable ONLY if BOTH conditions are met: (a) the `task check` failure is pre-existing with an open GitHub issue number tracking it, AND (b) the PR description explicitly notes the failure and includes the issue reference (e.g. "task check: test_foo fails due to #NNN (pre-existing)"). Without both conditions, the full `task check` pass remains mandatory.
|
|
201
205
|
- ~ Commit message: `fix: address Greptile review findings (batch)`
|
|
202
206
|
|
|
203
|
-
⊗ Push individual fix commits per finding — always batch.
|
|
204
|
-
|
|
205
207
|
### Step 3b: Proactive test coverage scan
|
|
206
208
|
|
|
207
209
|
! After committing the fix batch but before pushing, scan the changed lines for untested code paths:
|
|
@@ -221,7 +223,9 @@ Babysit and review-cycle are **not** a second unbounded implementation mandate.
|
|
|
221
223
|
|
|
222
224
|
! After pushing, the agent MUST autonomously poll for review updates and continue the review cycle without stopping to ask the user. Do not pause for confirmation, do not ask "should I continue?", do not wait for user input between push and review completion. The review/fix loop is designed to run to the exit condition without human intervention.
|
|
223
225
|
|
|
224
|
-
|
|
226
|
+
! Mid-review push rule: see [`coding/review.md`](../../coding/review.md) (no push while review in progress). Adapter rationale: every push re-triggers Greptile and resets the review clock.
|
|
227
|
+
|
|
228
|
+
⊗ Push any additional commits — including unrelated fixes, doc updates, or lessons — while waiting for the bot to finish reviewing the current head. If you discover additional work while waiting, stage it locally but do NOT push until the current review completes.
|
|
225
229
|
|
|
226
230
|
|
|
227
231
|
|
|
@@ -362,7 +366,7 @@ Remediation:
|
|
|
362
366
|
|
|
363
367
|
! **Heartbeat contract for Cursor pollers (#1877 / #1166 / #2876):** OpenClaw sessions_spawn pollers share this contract. A Cursor `Task` or OpenClaw `sessions_spawn` review-monitor poller whose loop runs > ~3 min MUST honour the sub-agent heartbeat contract (`docs/subagent-heartbeat.md`), same as the `spawn_subagent` path — emit periodic progress so the parent can distinguish a live poller from a hung one.
|
|
364
368
|
|
|
365
|
-
~ **Visible Control UI (OpenClaw):** When OpenClaw Control UI is the operator control plane, SHOULD spawn the review-monitor
|
|
369
|
+
~ **Visible Control UI (OpenClaw / #3044):** When OpenClaw Control UI is the operator control plane, SHOULD spawn the review-monitor with `visible:true` when the tool surface allows so humans can inspect progress without attaching to the parent session; invisible empty settles are higher FC04 residual risk.
|
|
366
370
|
|
|
367
371
|
! When the platform descriptor indicates Tier 1 (sub-agent support), spawn a review-monitor sub-agent using the primitive matching the descriptor:
|
|
368
372
|
|
|
@@ -374,6 +378,51 @@ Remediation:
|
|
|
374
378
|
|
|
375
379
|
⊗ Use OpenClaw `cron` alone as Approach 1 when `sessions_spawn` is available — cron is Approach 2 scheduler fallback only (#2876).
|
|
376
380
|
|
|
381
|
+
### Empty announce ≠ done (parent DoD) (#3044 / FC04 residual)
|
|
382
|
+
|
|
383
|
+
! When a review-monitor settle arrives with **empty body**, **missing `STATUS:` line**, or **status unknown** (including host `(no output)` / empty `subagent_announce`):
|
|
384
|
+
|
|
385
|
+
1. ! The parent MUST run **same-turn ground truth** before any DONE / CLEAN / merge-ready claim: at least `gh pr view <N>` (or REST `pulls/<N>`), `gh pr checks <N>`, and current HEAD SHA (`gh api repos/<owner>/<repo>/pulls/<N> -q .head.sha`).
|
|
386
|
+
2. ! Classify the settle as **FC04 residual** (empty babysit ≠ done) until ground truth shows a terminal merge/close outcome **or** an explicit structured `BLOCKED` / `FAILED` handback.
|
|
387
|
+
3. ⊗ Treat empty / unknown settle as `DONE`, `CLEAN`, merge-ready, or batch-complete.
|
|
388
|
+
4. ⊗ Spawn a second review-monitor solely because the first settle was empty/unknown without completing the ground-truth batch first (#3044 dual-lease recurrence).
|
|
389
|
+
|
|
390
|
+
~ Recurrence: enterprize PR #43 (2026-08-02) — first monitor polled live, host settled empty/unknown; parent spawned a second same-`taskName` monitor; dual lease collision while PR stayed open. See also `meta/lessons.md` and FC04 / growth friction R1 + R10.
|
|
391
|
+
|
|
392
|
+
### Single review-monitor lease (#3044 / #2814)
|
|
393
|
+
|
|
394
|
+
! **One sticky lease per PR:** ownership is the single sticky GitHub PR comment `<!-- deft:review-owner -->` (or the dual-invoke `review-monitor:register` form that writes it). Parallel ownership is forbidden.
|
|
395
|
+
|
|
396
|
+
! **Pre-spawn check:** before launching another Approach 1 review-monitor (`sessions_spawn`, `spawn_subagent`, Cursor `Task`, `start_agent`):
|
|
397
|
+
|
|
398
|
+
1. ! Read the sticky lease (dual-invoke `verify:review-monitor` when available, else `gh api` issues comments for `<!-- deft:review-owner -->`).
|
|
399
|
+
2. ! List active same-PR / same-`taskName` subagents when the host exposes that surface (OpenClaw `subagents list` or equivalent).
|
|
400
|
+
3. ⊗ Spawn a second monitor while a prior owner is **running**.
|
|
401
|
+
4. ⊗ Spawn a second monitor when the last settle was **empty/unknown** and ground truth has **not** shown a terminal merge/close (or explicit structured handback that releases ownership).
|
|
402
|
+
5. ! If the prior owner is **dead** (liveness fail / `REDISPATCH_OK` / `verify:subagent-alive` exit 1) and the PR is still open: spawn **one** replacement monitor and re-claim the lease with **`--force`** (CLI: `deft review-monitor:register --pr <N> --monitor-agent-id <id> --force` / task: `task review-monitor:register -- --pr <N> --monitor-agent-id <id> --force`, or host equivalent force takeover) so a non-expired foreign lease does not block replacement — then **update** the sticky lease comment to the new owner. Never silent dual ownership.
|
|
403
|
+
6. ! On register conflict when the prior owner is **still alive**: attach to the existing owner or stop — do not parallel-fix.
|
|
404
|
+
7. ⊗ Refuse replacement of a dead owner solely because the 30-minute lease has not expired without attempting force takeover (#3044).
|
|
405
|
+
|
|
406
|
+
### Required non-empty monitor handback (#3044)
|
|
407
|
+
|
|
408
|
+
! Approach 1 review-monitor prompts (including `templates/swarm-greptile-poller-prompt.md` and any host-filled spawn prompt) MUST require a **non-empty** final handback with these fields:
|
|
409
|
+
|
|
410
|
+
```text
|
|
411
|
+
STATUS: DONE|BLOCKED|FAILED
|
|
412
|
+
HEAD: <sha>
|
|
413
|
+
CHECKS: <summary>
|
|
414
|
+
MERGE: <url|error|n/a>
|
|
415
|
+
ISSUE: <closed|open|n/a>
|
|
416
|
+
NOTES: <short>
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
⊗ Empty final assistant message from a review-monitor.
|
|
420
|
+
⊗ Parent treating a settle that lacks `STATUS:` as success.
|
|
421
|
+
|
|
422
|
+
~ **Visible Control UI risk (#3044):** When OpenClaw Control UI is the operator plane, prefer `visible:true` on the review-monitor spawn; invisible empty settles are higher risk for FC04 misclassification. Cross-link: `skills/deft-directive-swarm/references/host-openclaw.md` Babysit / review-monitor residual.
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
377
426
|
**Approach 2 (fallback -- no sub-agent primitive for the descriptor):**
|
|
378
427
|
|
|
379
428
|
! When the platform descriptor indicates no sub-agent orchestration (or the primitive is unavailable), use discrete tool calls with a yield between checks. For `grok-build` / spawn_subagent descriptor this path is normally avoided in favor of Approach 1; it exists for pure interactive or limited runtimes.
|
|
@@ -519,6 +568,8 @@ task lifecycle:event -- emit plan:approved \
|
|
|
519
568
|
|
|
520
569
|
## Post-Merge Verification
|
|
521
570
|
|
|
571
|
+
! Apply [`coding/review.md`](../../coding/review.md) post-merge closing-keyword verification. Adapter HOW for GitHub:
|
|
572
|
+
|
|
522
573
|
! After a PR is squash-merged, verify that all referenced issues were actually closed. Squash merges can silently fail to process closing keywords (`Closes #N`, `Fixes #N`) from the PR body (#167).
|
|
523
574
|
|
|
524
575
|
1. ! For each issue referenced with a closing keyword in the PR body, run:
|
|
@@ -534,6 +585,7 @@ task lifecycle:event -- emit plan:approved \
|
|
|
534
585
|
|
|
535
586
|
## Anti-Patterns
|
|
536
587
|
|
|
588
|
+
- ⊗ Ignore [`coding/review.md`](../../coding/review.md) while running this adapter — universal batch/severity/exit/post-merge rules live there
|
|
537
589
|
- ⊗ Route PR shepherding to Cursor global `babysit` on Deft-managed repos when `.deft/core/` is installed -- use this review-cycle skill instead (#2261)
|
|
538
590
|
- ⊗ Route OpenClaw babysit/shepherd/watch to main-session gh poll + cron when `sessions_spawn` is available -- use Approach 1 with `sessions_spawn` (#2876 / #2261)
|
|
539
591
|
- ⊗ Treat OpenClaw `cron` alone as Approach 1 — cron/timer is Approach 2 only if spawn is unavailable (#2876)
|
|
@@ -566,3 +618,6 @@ task lifecycle:event -- emit plan:approved \
|
|
|
566
618
|
- ⊗ Activate Approach 3 (blocking `Start-Sleep` loop) without first warning the user that it will lock the conversation pane and receiving confirmation
|
|
567
619
|
- ⊗ Exit the review loop on a Greptile confidence number alone while the check run is non-terminal -- a confidence score is NOT a verdict without a terminal check-run (`completed` + `{success, neutral}`) AND a HEAD-matching `Last reviewed commit:` completion marker (#1259)
|
|
568
620
|
- ⊗ Call `gh pr merge` on cached/earlier review state without an immediately-preceding pre-merge re-poll that re-satisfies the Step 6 fail-closed all-of (#1259)
|
|
621
|
+
- ⊗ Treat empty/unknown review-monitor settle as DONE/CLEAN/merge-ready without same-turn ground truth (#3044 / FC04 residual)
|
|
622
|
+
- ⊗ Spawn a second review-monitor while prior owner is running or last settle was empty/unknown without terminal ground truth (#3044)
|
|
623
|
+
- ⊗ Accept empty review-monitor final message missing STATUS/HEAD/CHECKS/MERGE handback (#3044)
|
|
@@ -23,6 +23,7 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
|
23
23
|
- User says "set up deft", "configure deft", or "bootstrap my project"
|
|
24
24
|
- User asks to create USER.md, PROJECT-DEFINITION.xbrief.json, or a specification
|
|
25
25
|
- User clones a deft-enabled repo for the first time with no config
|
|
26
|
+
- User says "revisit experimental rules", "toggle experimental meta", "enable SOUL", "disable morals", or wants to change Experimental Rules after bootstrap (#46)
|
|
26
27
|
|
|
27
28
|
## Opt-out flag (`.no-deft-directive`) (#2926)
|
|
28
29
|
|
|
@@ -194,12 +195,28 @@ VBA (Excel macros), VHDL, Visual Basic (.NET), Zig, 6502-DASM
|
|
|
194
195
|
2. ! If `deft_version` is present but **differs from the current framework version** (0.20.0): check whether any expected fields are missing from the USER.md
|
|
195
196
|
3. ! If fields are missing: query the user for each missing field individually -- do NOT re-run the full Phase 1 interview
|
|
196
197
|
4. ! After completing any field queries (even if none were needed), write the current `deft_version` (0.20.0) to USER.md
|
|
197
|
-
5. ~ If `deft_version` matches the current version and all expected fields are present:
|
|
198
|
+
5. ~ If `deft_version` matches the current version and all expected fields are present: USER.md is fresh — do **not** re-run Phase 1. ! Still offer the **Returning-user re-entry** menu below so the operator can revisit Experimental Rules or continue to Phase 2 without a full re-interview (#46).
|
|
198
199
|
|
|
199
200
|
Expected USER.md fields: **Name**, **Custom Rules**, **Default Strategy**, and optionally **Coverage** and **Experimental Rules**.
|
|
200
201
|
|
|
201
202
|
⊗ Re-run the full Phase 1 interview when only individual fields are missing from a stale USER.md -- query missing fields individually instead.
|
|
202
203
|
|
|
204
|
+
### Returning-user re-entry (#46)
|
|
205
|
+
|
|
206
|
+
! When USER.md already exists (fresh or after individual missing-field fill), present a deterministic numbered menu before assuming Phase 1 is "done and silent":
|
|
207
|
+
|
|
208
|
+
> "USER.md is in place. What next?"
|
|
209
|
+
> 1. Continue to Phase 2 (project configuration) ★ (recommended when project config is still missing)
|
|
210
|
+
> 2. **Revisit experimental rules** — enable/disable SOUL / morals / code-field without hand-editing schema
|
|
211
|
+
> 3. Not now (exit setup)
|
|
212
|
+
> 4. Discuss
|
|
213
|
+
> 5. Back
|
|
214
|
+
|
|
215
|
+
- ! Final two numbered options MUST be `Discuss` and `Back` per [`../../contracts/deterministic-questions.md`](../../contracts/deterministic-questions.md)
|
|
216
|
+
- ! On option 2, enter **Revisit experimental rules** (next section) — not a full Phase 1 re-interview
|
|
217
|
+
- ⊗ Silently skip past a complete USER.md with no re-entry offer when the operator entered setup (or asked to configure preferences)
|
|
218
|
+
- ⊗ Invent a `deft config` / `task config:*` verb family for this slice — setup skill re-entry is the product surface (#46)
|
|
219
|
+
|
|
203
220
|
### Interview Rules
|
|
204
221
|
|
|
205
222
|
! This phase follows the deterministic interview loop defined in `skills/deft-directive-interview/SKILL.md`. The core rules (one question per turn, numbered options with stated default, explicit "other" escape, depth gate, default acceptance, confirmation gate, structured handoff) apply here. Key points repeated for emphasis:
|
|
@@ -307,6 +324,89 @@ for project-scoped settings (strategy, coverage).
|
|
|
307
324
|
|
|
308
325
|
---
|
|
309
326
|
|
|
327
|
+
## Revisit experimental rules (#46)
|
|
328
|
+
|
|
329
|
+
**Goal:** Guided enable/disable of USER.md **Experimental Rules** entries that *reference* framework deposit meta files (`meta/SOUL.md`, `meta/morals.md`, `meta/code-field.md`). This is a post-bootstrap return path — not Phase 1 bootstrap, not a general preferences UI, and not an editor for framework meta file bodies.
|
|
330
|
+
|
|
331
|
+
### When to enter
|
|
332
|
+
|
|
333
|
+
- Returning-user re-entry option **Revisit experimental rules**
|
|
334
|
+
- Direct user ask: "revisit experimental rules", "toggle experimental meta", "turn on SOUL", "disable code-field", etc.
|
|
335
|
+
- USER.md exists and is complete enough to edit (Name present); missing non-meta fields still use Freshness Detection individual queries first
|
|
336
|
+
|
|
337
|
+
### Out of scope
|
|
338
|
+
|
|
339
|
+
- ⊗ General preferences UI / rewriting Personal or Defaults sections as part of this path
|
|
340
|
+
- ⊗ Editing framework `meta/*.md` content (deposit owns SOUL / morals / code-field bodies; `directive update` refreshes deposit)
|
|
341
|
+
- ⊗ Deposit layout changes
|
|
342
|
+
- ⊗ Inventing a full `deft config` mega-surface or new `task config:*` verb family for this slice
|
|
343
|
+
- ⊗ Re-building USER.md bootstrap / non-overwrite semantics
|
|
344
|
+
- ⊗ Treating Experimental Rules lines as project-local copies of meta files — they are **references** only
|
|
345
|
+
|
|
346
|
+
### Flow
|
|
347
|
+
|
|
348
|
+
! **Each message MUST contain exactly ONE question** (same interview rule as Phase 1).
|
|
349
|
+
|
|
350
|
+
1. ! Resolve USER.md via Platform Detection (`$DEFT_USER_PATH` → platform path). Read the file as **UTF-8**.
|
|
351
|
+
2. ! Parse current Experimental Rules state (on/off) for the three paths:
|
|
352
|
+
- `meta/SOUL.md`
|
|
353
|
+
- `meta/morals.md`
|
|
354
|
+
- `meta/code-field.md`
|
|
355
|
+
- Detection: any line containing that path counts as **on** (custom wording still counts).
|
|
356
|
+
3. ! Show a **current state** summary (table or short list), for example:
|
|
357
|
+
|
|
358
|
+
| Entry | State | Role |
|
|
359
|
+
|-------|-------|------|
|
|
360
|
+
| SOUL.md | on/off | Results-first agent persona |
|
|
361
|
+
| morals.md | on/off | Epistemic honesty |
|
|
362
|
+
| code-field.md | on/off | Pre-code assumption protocol |
|
|
363
|
+
|
|
364
|
+
4. ! Ask which entry to change with a deterministic numbered menu (one question). Options MUST include each of the three entries as toggle targets, plus **Done (save)** / **Done (discard)**, and final two options `Discuss` and `Back`:
|
|
365
|
+
|
|
366
|
+
> "Toggle which experimental meta entry? (current state shown above)"
|
|
367
|
+
> 1. SOUL.md — currently {on|off}
|
|
368
|
+
> 2. morals.md — currently {on|off}
|
|
369
|
+
> 3. code-field.md — currently {on|off}
|
|
370
|
+
> 4. Done — save changes
|
|
371
|
+
> 5. Done — discard changes
|
|
372
|
+
> 6. Discuss
|
|
373
|
+
> 7. Back
|
|
374
|
+
|
|
375
|
+
5. ! When the user picks an entry (1–3), optionally show the short Phase 1 explainer (steps **5a–5c** copy below), then confirm the new on/off value with a Y/n or numbered keep/flip menu. Update the **in-memory** desired state; do not write yet. Return to the toggle menu (step 4) until Done.
|
|
376
|
+
6. ! On **Done — save**: show a confirmation summary of the three final on/off values and require explicit affirmative (`yes` / `confirmed` / `approve`) before write — same Post-Interview Confirmation Gate strictness.
|
|
377
|
+
7. ! On **Done — discard** or **Back** without save: leave USER.md unchanged and return to the Returning-user re-entry menu (or exit if invoked directly).
|
|
378
|
+
|
|
379
|
+
### Explainers (reuse Phase 1 steps 5a–5c)
|
|
380
|
+
|
|
381
|
+
- **SOUL.md** — Results-first agent persona (inspired by Winston Wolf). Enforces assess-before-acting, finish-what-you-start, right-tool-for-the-job, and play-the-long-game. Keeps the AI decisive and concise. Includes a named persona ('Vinston') — drop if you prefer to define your own agent personality.
|
|
382
|
+
- **morals.md** — Epistemic honesty rules. No presenting speculation as fact, label unverified claims, self-correct when wrong. Foundational trust rules for any AI agent. Strongly recommended.
|
|
383
|
+
- **code-field.md** — Pre-code assumption protocol. Requires stating assumptions and naming failure modes before writing a single line. Fights the 'it compiles, ship it' instinct. Based on NeoVertex1 context-field.
|
|
384
|
+
|
|
385
|
+
### Safe write rules (non-clobber)
|
|
386
|
+
|
|
387
|
+
! When persisting toggles to USER.md:
|
|
388
|
+
|
|
389
|
+
1. ! Write **UTF-8** (no BOM). Create parent directories only if the resolved path's parent is missing — never relocate USER.md.
|
|
390
|
+
2. ! Change **only** the `## Experimental Rules` section (add the section if enabling when absent; remove the section when all three are off and no custom bullets remain).
|
|
391
|
+
3. ! Canonical enable lines (match Phase 1 template):
|
|
392
|
+
- `- ! Use meta/SOUL.md for strategic context and purpose-driven guidance`
|
|
393
|
+
- `- ! Use meta/morals.md for ethical AI development principles`
|
|
394
|
+
- `- ~ Use meta/code-field.md for advanced architecture patterns`
|
|
395
|
+
4. ! Disable = remove lines that mention that path. Preserve any **custom** non-meta bullets under Experimental Rules.
|
|
396
|
+
5. ! **Personal** and **Defaults** section bodies MUST remain byte-identical to the pre-write file (non-clobber).
|
|
397
|
+
6. ~ Prefer the pure helper `applyExperimentalRulesState` / `setExperimentalRule` from `@deftai/directive-core` `userConfig` (`packages/core/src/user-config/experimental-rules.ts`) when the package is importable (framework checkout, tests, or a thin local script). When editing by hand as an agent, apply the same rules: section-only edit, UTF-8, path-based match, canonical enable lines.
|
|
398
|
+
7. ! After write, re-read USER.md and show the final on/off state to the user.
|
|
399
|
+
|
|
400
|
+
⊗ Rewrite the whole USER.md from the Phase 1 template when only Experimental Rules changed
|
|
401
|
+
⊗ Clobber or reformat **Personal** / **Defaults** content while toggling experimental meta
|
|
402
|
+
⊗ Hand-edit framework `meta/SOUL.md`, `meta/morals.md`, or `meta/code-field.md` bodies as part of this path
|
|
403
|
+
⊗ Invent `deft config` / `task config:experimental-*` for this product slice when setup re-entry suffices
|
|
404
|
+
|
|
405
|
+
### Then
|
|
406
|
+
|
|
407
|
+
- ! After a successful save (or discard), re-offer the Returning-user re-entry menu (Continue to Phase 2 / Revisit again / Exit / Discuss / Back) unless the user asked only for the toggle and is done.
|
|
408
|
+
- ~ If Phase 2 is already complete, prefer Exit over Continue unless the user wants project reconfiguration.
|
|
409
|
+
|
|
310
410
|
## Phase 2 — Project Configuration (PROJECT-DEFINITION.xbrief.json)
|
|
311
411
|
|
|
312
412
|
**Goal:** Project-specific configuration — tech stack, type, quality standards — written as a xBRIEF file at `./xbrief/PROJECT-DEFINITION.xbrief.json`.
|
|
@@ -741,3 +841,6 @@ Per [strategies/interview.md](../../strategies/interview.md#interview-rules-shar
|
|
|
741
841
|
- ⊗ Present choices through a host UI that replaces the canonical numbers with alphabetic affordances or unlabeled buttons
|
|
742
842
|
- ⊗ Resolve paths relative to the skill file, AGENTS.md, or framework directory instead of the user's pwd at skill entry
|
|
743
843
|
- ⊗ Generate an authoritative PRD.md — PRD.md is a read-only export via `task prd:render`, never a source of truth
|
|
844
|
+
- ⊗ Skip the Returning-user re-entry / Revisit experimental rules path when USER.md exists and the operator entered setup to change experimental meta (#46)
|
|
845
|
+
- ⊗ Clobber Personal or Defaults while toggling Experimental Rules (#46)
|
|
846
|
+
- ⊗ Invent a full `deft config` verb family for experimental meta when setup re-entry suffices (#46)
|
|
@@ -92,6 +92,7 @@ CONSTRAINTS:
|
|
|
92
92
|
|
|
93
93
|
## Anti-Patterns
|
|
94
94
|
|
|
95
|
+
- ⊗ Parent conversation implements or babysits product fix/CI loops for **through merge** / **drive-to: merge-ready** story work when background subagent/worktree dispatch is available — even if cohort size is 1; use the swarm/solo-worker launch path (#3032 / #1880 Gap C)
|
|
95
96
|
- ⊗ Start prompts with context or description instead of an imperative TASK directive
|
|
96
97
|
- ⊗ Use `--mcp` with Warp MCP server UUIDs from standalone (non-Warp) terminals
|
|
97
98
|
- ⊗ Assign overlapping files to multiple agents
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
! Before assigning work to agents, build the cohort from the triage queue (queue-driven per #1142 / N2; see Step 0 below), then read project state and plan allocation against the activated cohort.
|
|
6
6
|
|
|
7
|
+
### Through-merge / N=1 still uses the launch path (#3032)
|
|
8
|
+
|
|
9
|
+
! When operator intent is **through merge**, **drive to merge**, **land/ship issue**, or explicit **drive-to: merge-ready** for story work, the parent (monitor) conversation MUST NOT implement product code or own the implementation PR as the leaf. Parent MUST run this skill's launch path: worktree isolation when available, worker envelope with `drive-to: merge-ready`, xBRIEF preflight, pre-pr + review-cycle, then merge/`scope:complete` per #1880 Gap C.
|
|
10
|
+
! **Cohort size N=1 is still a cohort for dispatch.** Solo through-merge uses the same swarm/solo-worker launch path as multi-story (`dispatch_kind: solo` or a one-story swarm-cohort). Do not treat "only one issue" as permission for the parent to code.
|
|
11
|
+
⊗ Parent implements, babysits product fix loops, or skips worktree + worker dispatch for through-merge / drive-to:merge-ready work when background subagent/worktree dispatch is available (#3032).
|
|
12
|
+
|
|
7
13
|
### Headless cohort fast-path: low-ceremony launch (C1 / #1387)
|
|
8
14
|
|
|
9
15
|
! When the operator supplies a **pre-approved cohort** via the **C1** `task swarm:launch` CLI, Phase 0 runs in headless / low-ceremony mode: the per-phase interactive approval gates (the Step 0c promote-fill prompts, the Step 0.5 lifecycle-bridge approval, and the Step 4/5 allocation approval) collapse into a SINGLE consent -- the `## Allocation context` token (#1378) carried in the dispatch envelope. The interactive promote-fill loop (Step 0a -- 0d below) is SKIPPED.
|
|
@@ -73,6 +73,16 @@ Package install alone does not put always-pins into `~/.openclaw/workspace/skill
|
|
|
73
73
|
! Babysit / PR shepherd on OpenClaw remains **Approach 1** via `sessions_spawn` (`skills/deft-directive-review-cycle/SKILL.md`). Cron alone is not Approach 1 (#2874 / #2876).
|
|
74
74
|
⊗ Regress babysit to main-session `gh` poll + cron when `sessions_spawn` is available.
|
|
75
75
|
|
|
76
|
+
### Empty announce ≠ done + single lease residual (#3044)
|
|
77
|
+
|
|
78
|
+
Skill residual of #2874 / #2876 (spawn routing fixed; post-spawn ownership still thrashed). Canonical MUST language lives in `skills/deft-directive-review-cycle/SKILL.md` (`### Empty announce ≠ done`, `### Single review-monitor lease`, `### Required non-empty monitor handback`).
|
|
79
|
+
|
|
80
|
+
! On empty body / missing `STATUS:` / status-unknown review-monitor settle (`subagent_announce` with `(no output)` included): parent MUST same-turn ground truth (`gh pr view` + `gh pr checks` + HEAD) and MUST NOT treat the settle as DONE/CLEAN/merge-ready — **FC04 residual**.
|
|
81
|
+
! One sticky `<!-- deft:review-owner -->` lease per PR. Pre-spawn: list active same-`taskName` / lease holder. ⊗ Second monitor while prior owner is running **or** last settle was empty/unknown without terminal ground truth. Dead owner + open PR → one replacement + lease update only.
|
|
82
|
+
! Monitor handback MUST be non-empty with `STATUS` / `HEAD` / `CHECKS` / `MERGE` (see review-cycle skill + `templates/swarm-greptile-poller-prompt.md`).
|
|
83
|
+
~ Prefer `visible:true` when Control UI is the operator plane; invisible empty settles raise FC04 misclassification risk.
|
|
84
|
+
~ Recurrence: enterprize PR #43 (2026-08-02) dual-monitor + empty settle.
|
|
85
|
+
|
|
76
86
|
## Monitor / completion channel
|
|
77
87
|
|
|
78
88
|
! Completion is parent push / announce. Do not poll via Grok Build `get_command_or_subagent_output` or Cursor Task-complete semantics.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deft-directive-xbrief
|
|
3
|
+
description: >-
|
|
4
|
+
Create and verify dense xBRIEF artifacts (json|md|both) at an explicit --out
|
|
5
|
+
path. On-demand pack templates for scope/playbook/mission/project styles.
|
|
6
|
+
Use when compressing SoT into xBRIEF or running xbrief:create /
|
|
7
|
+
xbrief:verify. Do NOT trigger on scope lifecycle
|
|
8
|
+
(promote/activate/complete).
|
|
9
|
+
triggers:
|
|
10
|
+
- xbrief create
|
|
11
|
+
- xbrief verify
|
|
12
|
+
- create xbrief
|
|
13
|
+
- verify xbrief
|
|
14
|
+
- compress into xbrief
|
|
15
|
+
- xbrief:create
|
|
16
|
+
- xbrief:verify
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
<!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
|
|
20
|
+
<!-- Purpose: rendered skill -->
|
|
21
|
+
<!-- Source of truth: packs/skills/skills-pack-0.1.json -->
|
|
22
|
+
<!-- Regenerate with: task packs:render -->
|
|
23
|
+
<!-- Edit the source, not this file. Slice instead of loading every SKILL.md: task packs:slice skills by-trigger --trigger <kw> (or list) -->
|
|
24
|
+
|
|
25
|
+
# Deft Directive xBRIEF — on-demand create/verify
|
|
26
|
+
|
|
27
|
+
Create and verify dense xBRIEF artifacts (json|md|both) at an explicit path. Pack templates load on use — not an always-on novel.
|
|
28
|
+
|
|
29
|
+
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
30
|
+
|
|
31
|
+
## When to Use
|
|
32
|
+
|
|
33
|
+
- Need a dense SoT brief (scope, playbook, mission, project) without freestyling long prose
|
|
34
|
+
- Operator or agent says `xbrief create`, `xbrief verify`, or `compress into xbrief`
|
|
35
|
+
- ⊗ Scope lifecycle work (promote / activate / complete) — use scope:* / intake instead
|
|
36
|
+
|
|
37
|
+
## How (CLI)
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
deft xbrief:create -- --format <json|md|both> --out <path> [--style scope|playbook|mission|project] [--title T] [--id ID] [--force]
|
|
41
|
+
deft xbrief:verify -- --format <json|md|both> --out <path> [--style scope|playbook|mission|project]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- ! `--format` and `--out` are **required**
|
|
45
|
+
- ! `both` writes a stem pair: `*.xbrief.json` + `*.xbrief.md`
|
|
46
|
+
- ! Paths expand portably (`~`, `%USERPROFILE%`); writes stay under project root (fail closed)
|
|
47
|
+
- ! create/verify **do not** move lifecycle folders
|
|
48
|
+
|
|
49
|
+
## Pack on use
|
|
50
|
+
|
|
51
|
+
- ~ Full grammar + templates: `task packs:slice skills by-trigger --trigger xbrief` (or this skill path)
|
|
52
|
+
- ~ Schema spine: `content/vbrief/schemas/xbrief-core-0.8.schema.json`
|
|
53
|
+
- ⊗ Dump pack novels into always-on bootstrap or into SoT artifacts
|
|
54
|
+
|
|
55
|
+
## Create vs lifecycle
|
|
56
|
+
|
|
57
|
+
| Verb | Meaning |
|
|
58
|
+
|------|---------|
|
|
59
|
+
| `xbrief:create` / `xbrief:verify` | Write or check an artifact at `--out` |
|
|
60
|
+
| `scope:*` / intake | Lifecycle birth and folder/status transitions |
|
|
61
|
+
| `xbrief:preflight` | Implementation-intent gate (unchanged) |
|
|
62
|
+
|
|
63
|
+
## Token budget
|
|
64
|
+
|
|
65
|
+
- ! Keep this skill postcard-sized; load pack/CLI help only when creating or verifying
|
|
66
|
+
- ⊗ Inline full schema manuals or multi-style novels into the always-on body
|
|
67
|
+
|
|
68
|
+
## Anti-Patterns
|
|
69
|
+
|
|
70
|
+
- ⊗ Overload `scope:promote` (or any lifecycle verb) to mean "compress text"
|
|
71
|
+
- ⊗ Invent `xbrief:promote` for create
|
|
72
|
+
- ⊗ Escape project root with `--out`
|
|
73
|
+
- ⊗ Auto-write to personal memory stores from this skill
|
|
74
|
+
|
|
75
|
+
## Exit
|
|
76
|
+
|
|
77
|
+
deft-directive-xbrief complete — create/verify done; chain to scope:* only when lifecycle is intended.
|
|
@@ -543,9 +543,12 @@ Every worker MUST send a final status message before exiting its tool loop, rega
|
|
|
543
543
|
|
|
544
544
|
! **Thin DONE is not success (#2943):** A terminal message that lacks PR URL / merge evidence (no `PR #N`, no PR URL, no merge confirmation) is a **thin DONE** / failed-leaf signal for the parent monitor — re-dispatch or take over after ground truth. Prefer structured completion fields when the host supplies them (`prUrl`, `mergeStatus`, `emptyDiff`). Workers MUST NOT exit with mid-edit prose and call it `DONE` when the envelope required a PR or merge-ready outcome.
|
|
545
545
|
|
|
546
|
+
! **Empty announce ≠ done / single review-monitor lease (#3044 / FC04 residual):** An empty settle, missing `STATUS:` line, or `status: unknown` from a review-monitor (`subagent_announce` with `(no output)` included) is **not** DONE/CLEAN/merge-ready. Parent MUST same-turn ground truth (`gh pr view` + checks + HEAD) and MUST NOT spawn a second monitor while the prior owner is running or only falsely settled. Prefer one sticky `<!-- deft:review-owner -->` lease and a non-empty `STATUS`/`HEAD`/`CHECKS`/`MERGE` handback. Full MUST language: `skills/deft-directive-review-cycle/SKILL.md` + OpenClaw host adapter residual.
|
|
547
|
+
|
|
546
548
|
! **Parent tool-first after leaf completion (#2943):** When a parent / monitor receives a leaf completion event (`subagent_announce`, parent-push, or host completion notify), its **first response** MUST be a **tool-first** ground-truth batch (`gh` / `git` / worktree or file status) **or** a host **yield** (`sessions_yield` on OpenClaw, or equivalent). ⊗ Multi-sentence progress-only first response with zero tools / yield — the OpenClaw text-repetition hang class (#2943).
|
|
547
549
|
|
|
548
550
|
⊗ Treat thin DONE (no PR URL / merge evidence) as success (#2943).
|
|
551
|
+
⊗ Treat empty/unknown review-monitor settle as DONE without same-turn ground truth, or dual-spawn a second monitor while the first lease is live (#3044).
|
|
549
552
|
|
|
550
553
|
Per-step acks during the run are noise. ONE start message, ONE final message; intermediate messages only on `BLOCKED` / `FAILED`. The final message lets the dispatcher distinguish a clean exit from a silent timeout when the lifecycle event arrives.
|
|
551
554
|
|
|
@@ -5,6 +5,11 @@ Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
|
|
|
5
5
|
|
|
6
6
|
! If any .deft/core/.agents/skills/ path referenced in this file cannot be read (missing file, stale path from a previous framework version, or a deprecation redirect stub), read .deft/core/QUICK-START.md instead and follow it. QUICK-START refreshes this section idempotently for the current framework version.
|
|
7
7
|
|
|
8
|
+
## Temporary test kill-switch (#3039)
|
|
9
|
+
|
|
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
|
+
⊗ Claim full operation while the flag exists or after delete without a NEW agent session.
|
|
12
|
+
|
|
8
13
|
## Session routing (#2176)
|
|
9
14
|
|
|
10
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). ? `deft session:start -- --read-only` (#2176).
|
|
@@ -63,6 +68,11 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
|
|
|
63
68
|
! **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.
|
|
64
69
|
⊗ Pin entire language packs, deployment docs, or framework bulk into AGENTS.md — pins are for false-negative-sensitive process gates only (#2508).
|
|
65
70
|
|
|
71
|
+
## Through-merge worker dispatch (#3032)
|
|
72
|
+
|
|
73
|
+
! On **through merge** / **drive to merge** / land-ship / **drive-to: merge-ready** story intent: parent MUST dispatch a `drive-to: merge-ready` worker (worktree, preflight, pre-pr, review-cycle, merge/`scope:complete`) via the **swarm/solo-worker launch path** even if **cohort size is 1** — parent MUST NOT implement as the leaf. Depth: swarm Phase 0 + skill-pin-policy (#3032 / #1880 Gap C).
|
|
74
|
+
⊗ Parent conversation implements or babysits product fix/CI loops for drive-to:merge-ready work when background subagent/worktree dispatch is available (#3032).
|
|
75
|
+
|
|
66
76
|
## Review-surface precedence (#2308)
|
|
67
77
|
|
|
68
78
|
! 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).
|