@deftai/directive-content 0.92.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.
@@ -1,11 +1,10 @@
1
1
  ---
2
2
  name: deft-directive-review-cycle
3
3
  description: >-
4
- Greptile / bot reviewer response and PR-shepherding workflow. Use when
5
- running a review cycle or babysitting a PR to merge-ready -- audit process
6
- prerequisites, fetch bot findings, fix all issues in a single batch commit,
7
- and exit cleanly when no P0 or P1 issues remain. Supersedes Cursor global
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`.
@@ -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 RWLDL cycle. If not, run it now before proceeding.
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
- ! Before making any changes:
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 ALL fixes across all files before committing:
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
- Push any additional commits including unrelated fixes, doc updates, or lessons — while waiting for the bot to finish reviewing the current head. Every push re-triggers Greptile and resets the review clock. If you discover additional work while waiting, stage it locally but do NOT push until the current review completes.
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
 
@@ -564,6 +568,8 @@ task lifecycle:event -- emit plan:approved \
564
568
 
565
569
  ## Post-Merge Verification
566
570
 
571
+ ! Apply [`coding/review.md`](../../coding/review.md) post-merge closing-keyword verification. Adapter HOW for GitHub:
572
+
567
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).
568
574
 
569
575
  1. ! For each issue referenced with a closing keyword in the PR body, run:
@@ -579,6 +585,7 @@ task lifecycle:event -- emit plan:approved \
579
585
 
580
586
  ## Anti-Patterns
581
587
 
588
+ - ⊗ Ignore [`coding/review.md`](../../coding/review.md) while running this adapter — universal batch/severity/exit/post-merge rules live there
582
589
  - ⊗ Route PR shepherding to Cursor global `babysit` on Deft-managed repos when `.deft/core/` is installed -- use this review-cycle skill instead (#2261)
583
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)
584
591
  - ⊗ Treat OpenClaw `cron` alone as Approach 1 — cron/timer is Approach 2 only if spawn is unavailable (#2876)
@@ -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.