@deftai/directive-runtime 0.129.3 → 0.129.4
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/Taskfile.yml +1 -1
- package/package.json +1 -1
- package/packs/skills/skills-pack-0.1.json +2 -2
- package/skills/deft-directive-pre-pr/SKILL.md +27 -33
- package/templates/agents-entry.md +1 -1
- package/vendor/directive-content/Taskfile.yml +1 -1
- package/vendor/directive-content/packs/skills/skills-pack-0.1.json +2 -2
- package/vendor/directive-content/skills/deft-directive-pre-pr/SKILL.md +27 -33
- package/vendor/directive-content/templates/agents-entry.md +1 -1
- package/vendor/directive-core/dist/.tsbuildinfo +1 -1
- package/vendor/directive-core/dist/eval/health.d.ts.map +1 -1
- package/vendor/directive-core/dist/eval/health.js +75 -6
- package/vendor/directive-core/dist/eval/health.js.map +1 -1
- package/vendor/directive-core/dist/forward-coverage/diff-coverage.d.ts +2 -1
- package/vendor/directive-core/dist/forward-coverage/diff-coverage.d.ts.map +1 -1
- package/vendor/directive-core/dist/forward-coverage/diff-coverage.js +2 -1
- package/vendor/directive-core/dist/forward-coverage/diff-coverage.js.map +1 -1
- package/vendor/directive-core/dist/forward-coverage/evaluate.d.ts +4 -2
- package/vendor/directive-core/dist/forward-coverage/evaluate.d.ts.map +1 -1
- package/vendor/directive-core/dist/forward-coverage/evaluate.js +11 -4
- package/vendor/directive-core/dist/forward-coverage/evaluate.js.map +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/controller.d.ts.map +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/controller.js +13 -3
- package/vendor/directive-core/dist/pre-pr-controller/controller.js.map +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/phases.js +3 -3
- package/vendor/directive-core/dist/pre-pr-controller/phases.js.map +1 -1
- package/vendor/directive-core/dist/release/pipeline.d.ts.map +1 -1
- package/vendor/directive-core/dist/release/pipeline.js +12 -25
- package/vendor/directive-core/dist/release/pipeline.js.map +1 -1
- package/vendor/directive-core/dist/release/preflight.d.ts.map +1 -1
- package/vendor/directive-core/dist/release/preflight.js +3 -11
- package/vendor/directive-core/dist/release/preflight.js.map +1 -1
- package/vendor/directive-core/dist/release/suite-stamp.d.ts +5 -2
- package/vendor/directive-core/dist/release/suite-stamp.d.ts.map +1 -1
- package/vendor/directive-core/dist/release/suite-stamp.js +12 -1
- package/vendor/directive-core/dist/release/suite-stamp.js.map +1 -1
- package/vendor/directive-core/dist/release/types.d.ts +6 -6
- package/vendor/directive-core/dist/ts-check-lane/run-lane.d.ts +6 -4
- package/vendor/directive-core/dist/ts-check-lane/run-lane.d.ts.map +1 -1
- package/vendor/directive-core/dist/ts-check-lane/run-lane.js +10 -6
- package/vendor/directive-core/dist/ts-check-lane/run-lane.js.map +1 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
name: deft-directive-pre-pr
|
|
3
3
|
description: >-
|
|
4
4
|
Iterative pre-PR quality improvement loop. Use before pushing a branch for
|
|
5
|
-
PR creation -- after completing implementation
|
|
6
|
-
|
|
5
|
+
PR creation -- after completing implementation. Cycles through
|
|
6
|
+
Read-Write-Lint-Diff plus verify:ac until a full pass produces zero changes.
|
|
7
7
|
---
|
|
8
8
|
<!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
|
|
9
9
|
<!-- Purpose: rendered skill -->
|
|
@@ -65,7 +65,7 @@ task verify:plan-sequence -- --target-kind <entry-kind> --target <entry-id>
|
|
|
65
65
|
GitHub `mergeable_state` is **textual only**. Post-open behavioral/policy gates stay invisible until the merge-chokepoint `task check` / `deft check` runs against the current base (#4888).
|
|
66
66
|
|
|
67
67
|
- ! On **conflict-resolve** and **behind-rebase** (PR open; local HEAD matches live remote PR head), MUST treat the merge-chokepoint full gate as candidate validation against current base — not optional polish. Prefer `deft check`; else tree-correct `task check` / `task deft:check`. Then MUST call `evaluateNonCascadeCandidateGreen` with an attestation from `buildCandidateValidationAttestationFromProbe` (allowlisted probe exit 0; blessed producer) keyed to `(pr_head_sha, target_head_sha)`. Fail closed names the probe.
|
|
68
|
-
- ! On **pre-push**,
|
|
68
|
+
- ! On **plain pre-push**, do **not** require the local merge-chokepoint full gate. Do **not** require `evaluateNonCascadeCandidateGreen` until after push when a PR exists and local HEAD matches the live remote PR head — then obtain the SHA-pair attestation. Conflict-resolve and behind-rebase keep the full-gate exception above (#4888 / #6040).
|
|
69
69
|
- ! Frame `#4883` CLEAN / forge `mergeable_state=clean` as axis-1 necessity only — never three-axis sufficiency.
|
|
70
70
|
- ⊗ Skip the merge-chokepoint `task check` after conflict-resolve or behind-rebase because GitHub shows mergeable/clean (#4888).
|
|
71
71
|
- ⊗ Call `evaluateNonCascadeCandidateGreen` as a pre-push blocker when no PR exists or local HEAD does not yet match the remote PR head (#4888).
|
|
@@ -74,19 +74,19 @@ GitHub `mergeable_state` is **textual only**. Post-open behavioral/policy gates
|
|
|
74
74
|
|
|
75
75
|
## Gate throughput — iteration fast lane vs merge chokepoint (#1704)
|
|
76
76
|
|
|
77
|
-
> **Invariant:** every change MUST pass the full gate at least once before merge.
|
|
77
|
+
> **Invariant:** every change MUST pass the full gate at least once before merge. Ordinary pre-PR is the scoped Read-Write-Lint-Diff-Loop plus `verify:ac` — not the whole-repo merge chokepoint. CI `task check:merge` (and conflict-resolve / behind-rebase locally) hold the full gate (#6040).
|
|
78
78
|
|
|
79
|
-
- ! **Iteration lane (Phases 2–3 loop):**
|
|
80
|
-
- ! **
|
|
79
|
+
- ! **Iteration lane (Phases 2–3 loop):** run only these scoped commands — the touched test files; `vitest related --run <changed source paths>` without `--coverage`; `biome check <changed-paths>`; `verify:orphan-active --changed-only`; and the existing `--base-ref` verify gates (`verify:evaluator-surface`, `verify:eval-health-relocation`, `verify:eval-triggers-relocation`). Whole-project `tsc -b` stays in CI (TypeScript lane), not in pre-PR. Phase 3 sits inside this loop.
|
|
80
|
+
- ! **Full gate (CI / exception only):** ordinary pre-PR does **not** run or require post-loop `deft check` / `task check`. Prefer `deft check` (else tree-correct `task deft:check` / `task check`) only for conflict-resolve / behind-rebase candidate validation, and rely on CI `task check:merge` otherwise (#6040 / #4379). Do not add a fourth probe (#2893).
|
|
81
81
|
- ! **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.
|
|
82
82
|
- ~ **In-engine incrementality (#1713):** content-hash cache + runner-delegated affected selection are sibling work (#1713).
|
|
83
|
-
- ⊗
|
|
84
|
-
- ⊗ Run full `task check` inside every pre-PR Phase 3 iteration — Phase 3 is
|
|
83
|
+
- ⊗ Prompt ordinary pre-PR for a post-loop full `task check` / `deft check` or a coverage run (#6040).
|
|
84
|
+
- ⊗ Run full `task check` inside every pre-PR Phase 3 iteration — Phase 3 is the scoped loop only.
|
|
85
85
|
|
|
86
86
|
## When to Use
|
|
87
87
|
|
|
88
88
|
- ! Before pushing a branch for PR creation
|
|
89
|
-
- ! After completing implementation
|
|
89
|
+
- ! After completing implementation, before push/PR — run RWDL plus `verify:ac` (#6040)
|
|
90
90
|
- ~ After addressing bot reviewer findings (run one pre-PR pass before pushing the fix batch)
|
|
91
91
|
- ? During mid-implementation checkpoints on large changes
|
|
92
92
|
|
|
@@ -142,27 +142,23 @@ Each iteration proceeds through all phases in order. Do NOT skip phases or reord
|
|
|
142
142
|
|
|
143
143
|
### Phase 3 -- Lint
|
|
144
144
|
|
|
145
|
-
! Run the iteration-lane gates and fix any failures (#
|
|
145
|
+
! Run the scoped iteration-lane gates and fix any failures (#6040). Ordinary pre-PR does not run a post-loop full `task check`.
|
|
146
146
|
|
|
147
|
-
- ! Run
|
|
148
|
-
- !
|
|
147
|
+
- ! Run only Expected-6 scoped commands (touched tests; `vitest related --run <changed sources>` without `--coverage`; `biome check <changed-paths>`; `verify:orphan-active --changed-only`; `--base-ref` verify gates named above) — not full `task check` and not coverage inside the loop
|
|
148
|
+
- ! When no linter exists for a changed path (or the toolchain is missing), note it visibly naming the path and continue — do not fail or stall on that absence alone; a linter that runs and reports errors still fails (#6040 Expected 7)
|
|
149
|
+
- ! Fix real failures before proceeding to Phase 3b
|
|
149
150
|
- ~ If a lint fix requires changing a file, that counts as a change for the Loop phase
|
|
150
151
|
|
|
151
152
|
~ **Windows + Grok Build (#1353):** Avoid `|`, `>`, or `2>&1` in `run_terminal_command` strings -- use Python `pathlib`/`subprocess` or plain task commands instead.
|
|
152
153
|
|
|
153
|
-
### Phase 3c -- Coverage headroom (
|
|
154
|
+
### Phase 3c -- Coverage headroom (optional; not prompted in ordinary pre-PR) (#6040)
|
|
154
155
|
|
|
155
|
-
|
|
156
|
+
Ordinary pre-PR does **not** run coverage or require `coverage_headroom`. The controller row stays in `PRE_PR_PHASES` as `required: false`. If an agent observes a red optional coverage row, the run still fails — so do not prompt or record that phase in ordinary pre-PR.
|
|
156
157
|
|
|
157
|
-
- !
|
|
158
|
-
- ! When
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
- ! When coverageMode is `initial` or `disabled` and no `coverage/coverage-final.json` is present: record `lint_iteration` via **exit 5 + exact skip reason** `lint_iteration coverageMode posture skip (initial|disabled)` (`LINT_ITERATION_MODE_SKIP`). This discharges the Vitest-shaped observation only — keep applicable static / `verify:*` gates in Phase 3 and the merge_chokepoint phase. Do **not** invent `vitest --coverage`. The controller re-reads coverageMode at observe and commandSatisfied; refuse the mode skip when a coverage report exists (shared report-present guard with #5791). Never exit 0 and never bare any-nonzero for this channel.
|
|
162
|
-
- ⊗ Satisfy `coverage_headroom` with an unbound exit-0 changed-file audit or any free-form exit-0 command that is not the authorized `deft coverage:hotspots` measured pass.
|
|
163
|
-
- ⊗ Invent an Istanbul report, ask the operator to waive an irrelevant metric, or treat report-missing alone as not-applicable (mode posture skip requires coverageMode initial|disabled + exit 5 token — not a free-form missing-report claim).
|
|
164
|
-
- ⊗ Soften `coverage_headroom` to optional, lower the coverage floor, or claim a general docs-only CI bypass.
|
|
165
|
-
- ! Toolchain-only N/A for executable changes on non-Istanbul projects (Coverlet adapters) remains open — do not paper over executable .NET with inert-classifier N/A.
|
|
158
|
+
- ! Leave coverage measurement to CI/release (#6041) or an explicit operator ask.
|
|
159
|
+
- ! When coverageMode is `initial` or `disabled` and no `coverage/coverage-final.json` is present: the lint_iteration Vitest-shaped observation MAY still use **exit 5 + exact skip reason** `lint_iteration coverageMode posture skip (initial|disabled)` (`LINT_ITERATION_MODE_SKIP`) — keep applicable static / `verify:*` gates in Phase 3. Do **not** invent `vitest --coverage`.
|
|
160
|
+
- ⊗ Soften fail-closed behavior for an *observed* red optional `coverage_headroom` row (optional ≠ ignore a recorded failure).
|
|
161
|
+
- ⊗ Require `task coverage:hotspots` / `vitest --coverage` as part of ordinary pre-PR (#6040).
|
|
166
162
|
|
|
167
163
|
### Phase 3b -- Auto-Render Exports
|
|
168
164
|
|
|
@@ -208,16 +204,16 @@ git --no-pager diff master
|
|
|
208
204
|
|
|
209
205
|
When session effort-budget is hard-capped (`DEFT_MAX_TURNS` / `DEFT_MAX_BUDGET` / session:start `effort_budget`):
|
|
210
206
|
|
|
211
|
-
- ! Complete the
|
|
212
|
-
- ! If remaining budget cannot fund another full Read-Write-Lint-Diff pass **and** a fix for a new finding, stop after the stated-pass
|
|
213
|
-
- ! Dual-stop pre-PR defaults (max 3 polish / 2 no-diff) still apply; under a hard cap, prefer fewer polish iterations once AC
|
|
207
|
+
- ! Complete the stated-AC path (scoped RWDL plus `verify:ac` evidence) before optional polish that only deepens beyond the bar (#6040).
|
|
208
|
+
- ! If remaining budget cannot fund another full Read-Write-Lint-Diff pass **and** a fix for a new finding, stop after the stated-pass loop and record `deepening_skipped=true` with reason (#1006).
|
|
209
|
+
- ! Dual-stop pre-PR defaults (max 3 polish / 2 no-diff) still apply; under a hard cap, prefer fewer polish iterations once AC is green.
|
|
214
210
|
- ⊗ Start an unbounded self-imposed verification suite that exceeds stated AC while the hard budget is nearly exhausted (#3266).
|
|
215
211
|
|
|
216
212
|
## Product-first done-gate (#3284) / literal AC (#3267)
|
|
217
213
|
|
|
218
214
|
- ! Before Phase 3 Lint exit / push, when the active scope xBRIEF has acceptance commands (`plan.acceptance` or #3267 metadata/narratives), run `task verify:ac -- <active-xbrief>` and fail closed on exit 1. (`verify:literal-ac` is the mechanism alias.)
|
|
219
215
|
- ! Commands must be the exact strings from the task statement — same flags and cwd. Self-chosen verification is supplementary only.
|
|
220
|
-
- !
|
|
216
|
+
- ! `verify:ac -- <active-xbrief>` stays a required local pre-PR step. CI soft-missing `verify:ac` is not a substitute (#6040).
|
|
221
217
|
- ⊗ Skip AC run on rapid/minimal ceremony dial — rapid = AC-only; AC never degrades when commands exist (#3284 / #3156).
|
|
222
218
|
|
|
223
219
|
## Product-oracle gate integrity (#3322 / #3156)
|
|
@@ -262,11 +258,9 @@ Shared retrieval tokens match article-review pre-filing (#1178): closed-PR walk
|
|
|
262
258
|
! Exit when a complete Read-Write-Lint-Diff cycle produces **zero changes** -- no file edits in Write, no lint fixes in Lint, and no scope issues in Diff.
|
|
263
259
|
|
|
264
260
|
After exiting:
|
|
265
|
-
- ! Run
|
|
266
|
-
- !
|
|
267
|
-
-
|
|
268
|
-
- ! Re-run the full gate only after a red merge chokepoint or a new commit.
|
|
269
|
-
- ~ The branch is now ready for push and PR creation
|
|
261
|
+
- ! Run `task verify:ac -- <active-xbrief>` (or `deft verify:ac`) when acceptance commands are stated; fail closed on exit 1 (#6040).
|
|
262
|
+
- ! Do **not** prompt a post-loop full `task check` / `deft check` or a coverage run for ordinary pre-PR. Conflict-resolve / behind-rebase keep the local full-gate exception in Three-axis (#4888).
|
|
263
|
+
- ~ The branch is now ready for push and PR creation; CI `task check:merge` holds the whole-repo gate.
|
|
270
264
|
|
|
271
265
|
|
|
272
266
|
## Significant decision log (#1396)
|
|
@@ -290,7 +284,7 @@ Docs: `docs/decision-log.md`.
|
|
|
290
284
|
- ⊗ Ignore the iteration count -- more than 3 iterations usually indicates oscillating fixes or an unclear spec task
|
|
291
285
|
- ⊗ Add a prohibition (`!` or `⊗`) without scanning the same file for conflicting softer-strength rules (`~`, `≉`) that reference the same term
|
|
292
286
|
- ⊗ Add a weaker rule (`~` / `≉`) beside an existing `!` / `⊗` for the same command/pattern without reconciling in the same commit
|
|
293
|
-
- ⊗ After a red
|
|
287
|
+
- ⊗ After a red conflict-resolve / behind-rebase full gate, fix files and re-run only the gate without restarting Read-Write-Lint-Diff
|
|
294
288
|
- ⊗ Skip `task pr:check-closing-keywords` (#737) before pushing a PR. Intent mode (#3015) also refuses bare/conditional real `Closes #N` without `--allow-close`. The negation-context substring match is the Layer 0 (prevention) gate that prevents the recurring auto-close of umbrella / staying-OPEN issues observed in #697 (closed #642), #401 (closed #642), #700 (closed #233), and #735 (closed #734) -- each incident required manual reopen and downstream cleanup. The lint's three-state exit (0 clean / 1 hits found / 2 config error) MUST be treated as a hard refusal: rewrite the PR body / commit messages until clean, OR pass `--allow-known-false-positives` ONLY for legitimately-quoted occurrences (test fixtures, documentation that discusses the trigger token literally). See `skills/deft-directive-swarm/SKILL.md` Phase 6 Step 1 for the corresponding Layer 3 (recovery) `pr:check-protected-issues` rule (#701)
|
|
295
289
|
- ⊗ Invent remote PR/SHA/CI/review claims in handoff evidence without same-turn probe binding — invented-done (#3120)
|
|
296
290
|
- ⊗ Fill remote ship/gate fields from memory when only local work completed; legal partial omits PR fields (#3120)
|
|
@@ -88,7 +88,7 @@ Deft runtime is pinned as `@deftai/directive-runtime`. Full guidelines: node_mod
|
|
|
88
88
|
! **Dual stop (#2442):** multi-iteration work MUST have success + failure/budget stop (max iters / no-progress / budget); single-turn exempt; halt with operator-visible report; ⊗ thrash. Defaults: build, swarm, review-cycle skills. See main.md Dual Stop Rule. Ledger #3143.
|
|
89
89
|
## Rule Authority [AXIOM]
|
|
90
90
|
! Prefer `task deft:*` over AGENTS.md prose. See main.md.
|
|
91
|
-
! Merge chokepoint (#4379 / #2893): prefer `deft check`; else `task deft:check` on include-only consumers. One gate, not two runs.
|
|
91
|
+
! Merge chokepoint (#4379 / #2893 / #6040): when the full gate runs (conflict-resolve / behind-rebase locally, or CI merge-gate (`check:merge`)), prefer `deft check`; else `task deft:check` on include-only consumers. Ordinary pre-PR is RWDL + `verify:ac` and does not require that full gate. One gate, not two runs.
|
|
92
92
|
## Thin Fail-Closed Design (#3265)
|
|
93
93
|
! One fail-closed `task deft:*` check + one remediation. See main.md.
|
|
94
94
|
## Writing bar (#3368)
|