@deftai/directive-content 0.92.0 → 0.94.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.agents/skills/deft-directive-xbrief/SKILL.md +11 -0
  2. package/Taskfile.yml +8 -3
  3. package/UPGRADING.md +14 -0
  4. package/ci-cd/README.md +57 -0
  5. package/ci-cd/blacksmith/README.md +32 -0
  6. package/ci-cd/blacksmith/examples/lint-vs-test-split.md +98 -0
  7. package/ci-cd/blacksmith/migration-prompt.md +80 -0
  8. package/ci-cd/blacksmith/overview.md +58 -0
  9. package/ci-cd/blacksmith/runner-tiers.md +80 -0
  10. package/coding/coding.md +7 -1
  11. package/coding/docs.md +44 -0
  12. package/coding/review.md +50 -0
  13. package/commands.md +81 -3
  14. package/conventions/content-manifest.json +6 -1
  15. package/deployments/README.md +8 -0
  16. package/docs/openclaw-agent-host.md +46 -0
  17. package/docs/skill-discovery-hosts.md +84 -0
  18. package/docs/slash-multi-host.md +241 -0
  19. package/main.md +1 -0
  20. package/package.json +1 -1
  21. package/packs/rules/rules-pack-0.1.json +137 -1
  22. package/packs/skills/skills-pack-0.1.json +22 -6
  23. package/packs/strategies/strategies-pack-0.1.json +1 -1
  24. package/skills/deft-directive-pre-pr/SKILL.md +8 -5
  25. package/skills/deft-directive-review-cycle/SKILL.md +67 -23
  26. package/skills/deft-directive-setup/SKILL.md +10 -2
  27. package/skills/deft-directive-swarm/SKILL.md +7 -0
  28. package/skills/deft-directive-swarm/references/core-ops.md +2 -0
  29. package/skills/deft-directive-swarm/references/core-phase-5-6.md +2 -0
  30. package/skills/deft-directive-xbrief/SKILL.md +77 -0
  31. package/strategies/research.md +26 -1
  32. package/tasks/verify.yml +10 -0
  33. package/templates/agent-prompt-preamble.md +33 -0
  34. package/templates/swarm-greptile-poller-prompt.md +18 -15
  35. package/tools/greptile.md +1 -1
@@ -280,7 +280,7 @@ if m is None:
280
280
  confidence = int(m.group(1)) if m else None
281
281
  ```
282
282
 
283
- The clean threshold is `confidence > 3`, i.e. 4/5 or 5/5. Lower scores indicate Greptile is uncertain -- do NOT exit clean.
283
+ The clean threshold is `confidence >= min_confidence`, where `min_confidence` is the resolved floor from `plan.policy.review.minGreptileConfidence` (#3095): typed project policy > framework dogfood detect (framework source → **5**) > consumer default (**4**, legacy `confidence > 3` / 4/5+). Inspect with `task policy:show --field=minGreptileConfidence`. Lower scores indicate Greptile is uncertain -- do NOT exit clean. Directive dogfood MUST NOT exit CLEAN on 4/5.
284
284
 
285
285
  ### Informal-clean missing canonical fields (#1543)
286
286
 
@@ -333,6 +333,7 @@ def evaluate_clean_gate(
333
333
  ci_failures,
334
334
  errored,
335
335
  terminal_check_run,
336
+ min_confidence=4,
336
337
  ):
337
338
  """Return (is_clean, clean_gate_holdout) per the (6)-condition AND gate.
338
339
 
@@ -347,21 +348,23 @@ def evaluate_clean_gate(
347
348
  non-terminal Greptile conclusion (`queued` / `in_progress` /
348
349
  `cancelled` / `timed_out` / `stale` / `action_required` / `failure`)
349
350
  is NOT clean even when the rolling summary already parses clean (SHA
350
- matches HEAD, confidence > 3, no P0/P1). This is the INCOMPLETE_BUT_RATED
351
- scenario from `skills/deft-directive-review-cycle/SKILL.md` Step 6:
352
- without (6), all five legacy conditions pass and the poller exits CLEAN
353
- prematurely. `ci_failures` (condition 4) is scoped to `CI / *` checks
354
- ONLY -- it does NOT cover the Greptile Review check-run -- so the
355
- terminal Greptile conclusion is a DISTINCT condition that `ci_failures`
356
- cannot stand in for. Mirrors the SKILL.md Step 6 fail-closed all-of's
357
- terminal-check-run field so the swarm-dispatched poller path enforces
358
- the same gate as the one-shot review-cycle entry.
351
+ matches HEAD, confidence >= min_confidence, no P0/P1). This is the
352
+ INCOMPLETE_BUT_RATED scenario from
353
+ `skills/deft-directive-review-cycle/SKILL.md` Step 6: without (6), all
354
+ five legacy conditions pass and the poller exits CLEAN prematurely.
355
+ `ci_failures` (condition 4) is scoped to `CI / *` checks ONLY -- it does
356
+ NOT cover the Greptile Review check-run -- so the terminal Greptile
357
+ conclusion is a DISTINCT condition that `ci_failures` cannot stand in
358
+ for. Mirrors the SKILL.md Step 6 fail-closed all-of's terminal-check-run
359
+ field so the swarm-dispatched poller path enforces the same gate as the
360
+ one-shot review-cycle entry. `min_confidence` defaults to the consumer
361
+ bar (4); resolve via project policy / dogfood (#3095).
359
362
  """
360
363
  if last_reviewed_sha is None or last_reviewed_sha != head_sha:
361
364
  return False, "sha_match"
362
365
  if has_blocking:
363
366
  return False, "has_blocking"
364
- if confidence is None or confidence <= 3:
367
+ if confidence is None or confidence < min_confidence:
365
368
  return False, "confidence"
366
369
  if ci_failures > 0:
367
370
  return False, "ci_failures"
@@ -417,10 +420,10 @@ When ANY of the six conditions below fires, send the corresponding message to `{
417
420
  ALL of:
418
421
  - `last_reviewed_sha` parsed and matches the current PR HEAD SHA (compare via `gh pr view {pr_number} --repo {repo} --json headRefOid --jq .headRefOid`).
419
422
  - `has_blocking` is False (no P0 / P1 findings).
420
- - `confidence > 3` (i.e. 4/5 or 5/5 -- a `confidence == 3` parse is NOT clean; the gate names `clean_gate_holdout="confidence"` and you stay in the loop, you do NOT send the CLEAN message).
423
+ - `confidence >= min_confidence` where `min_confidence` is the resolved policy floor (#3095; consumer default 4 / dogfood 5 -- a score below the floor is NOT clean; the gate names `clean_gate_holdout="confidence"` and you stay in the loop, you do NOT send the CLEAN message).
421
424
  - `gh pr checks {pr_number}` shows no `failure` status on `CI / *` checks.
422
425
  - The Greptile rolling-summary comment body does NOT equal `Greptile encountered an error while reviewing this PR` (errored sentinel; #526).
423
- - `terminal_check_run` is True: the `Greptile Review` check-run on the current HEAD is terminal -- `status == "completed"` AND `conclusion` in `{{success, neutral}}` (#1259). A non-terminal Greptile conclusion (`queued` / `in_progress` / `cancelled` / `timed_out` / `stale` / `action_required` / `failure`) is NOT clean even when the rolling summary already parses clean (the INCOMPLETE_BUT_RATED scenario -- rolling summary posted, SHA matches, confidence > 3, no P0/P1, but the check-run has not terminally landed). This is DISTINCT from the `CI / *` `failure` bullet above: `ci_failures` is scoped to `CI / *` checks only and does NOT cover the Greptile Review check-run, so a non-terminal Greptile conclusion would otherwise slip through. The gate names `clean_gate_holdout="terminal_check_run"` and you stay in the loop.
426
+ - `terminal_check_run` is True: the `Greptile Review` check-run on the current HEAD is terminal -- `status == "completed"` AND `conclusion` in `{{success, neutral}}` (#1259). A non-terminal Greptile conclusion (`queued` / `in_progress` / `cancelled` / `timed_out` / `stale` / `action_required` / `failure`) is NOT clean even when the rolling summary already parses clean (the INCOMPLETE_BUT_RATED scenario -- rolling summary posted, SHA matches, confidence meets min, no P0/P1, but the check-run has not terminally landed). This is DISTINCT from the `CI / *` `failure` bullet above: `ci_failures` is scoped to `CI / *` checks only and does NOT cover the Greptile Review check-run, so a non-terminal Greptile conclusion would otherwise slip through. The gate names `clean_gate_holdout="terminal_check_run"` and you stay in the loop.
424
427
 
425
428
  Send to parent:
426
429
 
@@ -437,7 +440,7 @@ Send to parent:
437
440
  Last reviewed commit: <sha>
438
441
  -- no more polling, exiting now
439
442
 
440
- **Swarm-orchestrated terminal contract (#1364):** when this poller is dispatched as part of a swarm cohort (parent monitor is running `skills/deft-directive-swarm/SKILL.md` Phase 6), this exact subject line -- `PR #{pr_number} CLEAN -- ready for merge` -- with `confidence > 3` recorded on the **current HEAD** is the ONLY acceptable "review complete" signal the swarm monitor accepts toward the Phase 5 -> 6 merge-gate transition. The five other terminal exits below ((2) NEW P0/P1 FINDINGS escalation, (3) ERRORED, (4) TIMEOUT, (5) STALL, (6) INFORMAL-CLEAN) are NOT "review complete" signals for swarm purposes: each one MUST force either fresh poller re-dispatch on the same PR or explicit user escalation BEFORE the monitor surfaces the Phase 5 -> 6 gate. The monitor enforces this structurally via `task swarm:verify-review-clean` (#1364); see `skills/deft-directive-swarm/SKILL.md` Phase 5 Exit Condition for the cohort verifier mandate. A poller that has terminated lifecycle-clean (i.e. the sub-agent process exited normally) but with `clean_gate_holdout != None` HAS NOT "reported review-clean" for swarm-cycle purposes -- the verifier picks the gap up and the monitor re-dispatches.
443
+ **Swarm-orchestrated terminal contract (#1364):** when this poller is dispatched as part of a swarm cohort (parent monitor is running `skills/deft-directive-swarm/SKILL.md` Phase 6), this exact subject line -- `PR #{pr_number} CLEAN -- ready for merge` -- with `confidence >= min_confidence` recorded on the **current HEAD** is the ONLY acceptable "review complete" signal the swarm monitor accepts toward the Phase 5 -> 6 merge-gate transition. The five other terminal exits below ((2) NEW P0/P1 FINDINGS escalation, (3) ERRORED, (4) TIMEOUT, (5) STALL, (6) INFORMAL-CLEAN) are NOT "review complete" signals for swarm purposes: each one MUST force either fresh poller re-dispatch on the same PR or explicit user escalation BEFORE the monitor surfaces the Phase 5 -> 6 gate. The monitor enforces this structurally via `task swarm:verify-review-clean` (#1364); see `skills/deft-directive-swarm/SKILL.md` Phase 5 Exit Condition for the cohort verifier mandate. A poller that has terminated lifecycle-clean (i.e. the sub-agent process exited normally) but with `clean_gate_holdout != None` HAS NOT "reported review-clean" for swarm-cycle purposes -- the verifier picks the gap up and the monitor re-dispatches.
441
444
 
442
445
  ### (2) NEW P0/P1 FINDINGS
443
446
 
@@ -604,5 +607,5 @@ Dogfood lessons captured during the #727 self-review cycle. The template body ab
604
607
  - `meta/lessons.md` `## Orchestrator Role Separation + Canonical Poller Template (2026-04)` -- short cross-reference; the rule body lives in the skills above (per `main.md` Rule Authority [AXIOM]).
605
608
  - #727 -- this template's acceptance issue and the full anti-pattern record (rm-chaining, parsing-bug recurrence, role-conflation in implementation-agent prompts).
606
609
  - #1039 -- (5) STALL terminal exit + Tier 1 instrumentation + Tier 3 per-condition fail-loud (`clean_gate_holdout`); the third recurrence in this template's detector-gap chain after #910 (triple-tier) and #1035 (Tier 2.5 + confidence-heading).
607
- - #1364 -- cohort-level CLEAN verification gate (`task swarm:verify-review-clean`, `scripts/swarm_verify_review_clean.py`). The (1) CLEAN section's swarm-orchestrated terminal contract block declares that only the exact `PR #{pr_number} CLEAN -- ready for merge` subject with `confidence > 3` on current HEAD is an acceptable "review complete" signal for the swarm monitor's Phase 5 -> 6 transition; the cohort verifier picks up any other terminal exit ((2) NEW P0/P1 FINDINGS escalation, (3) ERRORED, (4) TIMEOUT, (5) STALL) and holds the merge gate until fresh poller re-dispatch or explicit user escalation resolves it. Recurrence record: #1166 swarm execution where multiple pollers exited with `clean_gate_holdout=confidence` (confidence == 3) and the monitor still raised the Phase 5 -> 6 gate because the trigger keyed on "all pollers have reported back" rather than "every PR in the cohort is objectively CLEAN".
610
+ - #1364 -- cohort-level CLEAN verification gate (`task swarm:verify-review-clean`, `scripts/swarm_verify_review_clean.py`). The (1) CLEAN section's swarm-orchestrated terminal contract block declares that only the exact `PR #{pr_number} CLEAN -- ready for merge` subject with `confidence >= min_confidence` on current HEAD is an acceptable "review complete" signal for the swarm monitor's Phase 5 -> 6 transition; the cohort verifier picks up any other terminal exit ((2) NEW P0/P1 FINDINGS escalation, (3) ERRORED, (4) TIMEOUT, (5) STALL) and holds the merge gate until fresh poller re-dispatch or explicit user escalation resolves it. Recurrence record: #1166 swarm execution where multiple pollers exited with `clean_gate_holdout=confidence` (confidence == 3) and the monitor still raised the Phase 5 -> 6 gate because the trigger keyed on "all pollers have reported back" rather than "every PR in the cohort is objectively CLEAN". #3095 raises the dogfood floor to 5 via policy.
608
611
  - #2879 -- OpenClaw `sessions_spawn` + parent push/announce completion channel named in Role posture (alongside Warp `start_agent` and grok-build `spawn_subagent`); heartbeat mapping in `docs/subagent-heartbeat.md` and preamble §10.5. Epic #2874.
package/tools/greptile.md CHANGED
@@ -124,7 +124,7 @@ The check run name is `"Greptile Review"` — this must match the context name i
124
124
 
125
125
  1. Check the `deft-directive-review-cycle` skill's Pre-Flight Check section
126
126
  2. Verify `triggerOnUpdates` is enabled — without it, Greptile never produces a follow-up review
127
- 3. Verify the confidence score section is enabled in dashboard settings — the exit condition requires confidence >3
127
+ 3. Verify the confidence score section is enabled in dashboard settings — the exit condition requires confidence >= the resolved floor (`plan.policy.review.minGreptileConfidence`; consumer default 4 / legacy >3; directive dogfood 5 — `task policy:show --field=minGreptileConfidence`, #3095)
128
128
 
129
129
  ## Anti-Patterns
130
130