devrites 4.0.4 → 4.0.6

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 (48) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/pack/.claude/agents/devrites-plan-reviewer.md +7 -2
  4. package/pack/.claude/agents/devrites-slice-wright.md +5 -4
  5. package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +23 -13
  6. package/pack/.claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +13 -8
  7. package/pack/.claude/skills/devrites-lib/reference/standards/README.md +1 -0
  8. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +16 -6
  9. package/pack/.claude/skills/devrites-lib/reference/standards/one-shot-actions.md +46 -0
  10. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +10 -2
  11. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +7 -2
  12. package/pack/.claude/skills/rite-build/reference/afk-discipline.md +3 -1
  13. package/pack/.claude/skills/rite-build/reference/phase-contract.md +4 -2
  14. package/pack/.claude/skills/rite-prove/SKILL.md +13 -1
  15. package/pack/.claude/skills/rite-prove/reference/failure-triage.md +12 -5
  16. package/pack/.claude/skills/rite-vet/SKILL.md +26 -3
  17. package/pack/.claude/skills/rite-vet/reference/artifacts.md +6 -0
  18. package/pack/generated/claude/agents/devrites-plan-reviewer.md +7 -2
  19. package/pack/generated/claude/agents/devrites-slice-wright.md +5 -4
  20. package/pack/generated/claude/skills/devrites-debug-recovery/SKILL.md +23 -13
  21. package/pack/generated/claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +13 -8
  22. package/pack/generated/claude/skills/devrites-lib/reference/standards/README.md +1 -0
  23. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +16 -6
  24. package/pack/generated/claude/skills/devrites-lib/reference/standards/one-shot-actions.md +46 -0
  25. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +10 -2
  26. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +7 -2
  27. package/pack/generated/claude/skills/rite-build/reference/afk-discipline.md +3 -1
  28. package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +4 -2
  29. package/pack/generated/claude/skills/rite-prove/SKILL.md +13 -1
  30. package/pack/generated/claude/skills/rite-prove/reference/failure-triage.md +12 -5
  31. package/pack/generated/claude/skills/rite-vet/SKILL.md +26 -3
  32. package/pack/generated/claude/skills/rite-vet/reference/artifacts.md +6 -0
  33. package/pack/generated/codex/agents/devrites-plan-reviewer.toml +7 -2
  34. package/pack/generated/codex/agents/devrites-slice-wright.toml +5 -4
  35. package/pack/generated/codex/skills/devrites-debug-recovery/SKILL.md +23 -13
  36. package/pack/generated/codex/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +13 -8
  37. package/pack/generated/codex/skills/devrites-lib/reference/standards/README.md +1 -0
  38. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +16 -6
  39. package/pack/generated/codex/skills/devrites-lib/reference/standards/one-shot-actions.md +46 -0
  40. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +10 -2
  41. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +7 -2
  42. package/pack/generated/codex/skills/rite-build/reference/afk-discipline.md +3 -1
  43. package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +4 -2
  44. package/pack/generated/codex/skills/rite-prove/SKILL.md +13 -1
  45. package/pack/generated/codex/skills/rite-prove/reference/failure-triage.md +12 -5
  46. package/pack/generated/codex/skills/rite-vet/SKILL.md +26 -3
  47. package/pack/generated/codex/skills/rite-vet/reference/artifacts.md +6 -0
  48. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to DevRites are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and DevRites adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Releases are generated automatically by [semantic-release](https://semantic-release.gitbook.io/) from Conventional Commits on `main`.
4
4
 
5
+ ## [4.0.6](https://github.com/ViktorsBaikers/DevRites/compare/v4.0.5...v4.0.6) (2026-08-07)
6
+
7
+ ### Fixed
8
+
9
+ * **rite:** gate one-shot evidence retention ([621a549](https://github.com/ViktorsBaikers/DevRites/commit/621a549acdf9ec2a0d427b829b0df8852502380d))
10
+
11
+ ## [4.0.5](https://github.com/ViktorsBaikers/DevRites/compare/v4.0.4...v4.0.5) (2026-08-07)
12
+
13
+ ### Fixed
14
+
15
+ * **rite:** make recovery progress-aware ([87ecd07](https://github.com/ViktorsBaikers/DevRites/commit/87ecd07d406d8c9eed97f2d41ec3449b408e75bd))
16
+
5
17
  ## [4.0.4](https://github.com/ViktorsBaikers/DevRites/compare/v4.0.3...v4.0.4) (2026-08-07)
6
18
 
7
19
  ### Fixed
package/README.md CHANGED
@@ -28,7 +28,7 @@ project-conventional push, tag, or PR action, and archive the workspace.
28
28
  Unattended runs may create local WIP checkpoint commits along the way, but they
29
29
  remain local unless Ship's disclosed plan includes an approved remote action.
30
30
 
31
- **Status:** [`v4.0.4`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v4.0.4): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
31
+ **Status:** [`v4.0.6`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v4.0.6): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
32
32
 
33
33
  This is the latest published release; `main` may contain unreleased work.
34
34
 
@@ -55,7 +55,11 @@ line, and then assign the band. Do not choose a score and justify it afterward:
55
55
  model changes conservatively. Every destructive step needs a rollback.
56
56
  7. **Failure-mode coverage:** for each new codepath, find a realistic failure such
57
57
  as a timeout, nil value, race, or stale state. A silent failure with **no test AND
58
- no error handling** is a critical gap.
58
+ no error handling** is a critical gap. For every consumptive action under
59
+ `one-shot-actions.md`, require durable bounded trust-safe evidence for every
60
+ terminal path plus unknown-well-formed, malformed/hostile, and cleanup-survival
61
+ fixtures. Missing evidence completeness is `broken`: the plan must not consume
62
+ the action to discover diagnostics that cleanup can erase.
59
63
 
60
64
  ## Confidence calibration + verification gate (mandatory)
61
65
  Give every finding a **confidence score from 1 to 10** and a quoted source:
@@ -73,7 +77,8 @@ Band each dimension `strong` / `adequate` / `thin` / `broken` (`broken` means
73
77
  Critical; `thin` means Important). For a borderline dimension, sample twice and
74
78
  take the **lower** band. The verdict uses the weakest dimension, not an average.
75
79
  Pass only when every dimension is at least `adequate`, no critical failure-mode gap
76
- remains, the shared-contract check passes, and the ID-and-meaning map contains no orphaned
80
+ remains, every consumptive action passes one-shot evidence completeness, the
81
+ shared-contract check passes, and the ID-and-meaning map contains no orphaned
77
82
  criterion, slice, or proof.
78
83
 
79
84
  ## Rules
@@ -97,10 +97,11 @@ an escalation and do not proceed.**
97
97
  not a quiet edit. The root inspects the returned diff and dedicated test
98
98
  analysis treats a weakened test as a Critical STOP.
99
99
  For non-trivial failure, invoke `devrites-debug-recovery` with the exact error,
100
- hypotheses, and dead ends. Caller and recovery share three total failed attempts per
101
- causal fingerprint. Count attempts supplied in the task/current context, include each
102
- failure in `dead_ends`, and never make a fourth related attempt. At the limit return the
103
- gate and repro. `Escalation` is only for product/irreversible choices
100
+ hypotheses, and dead ends. Caller and recovery share three no-progress attempts per
101
+ exact causal fingerprint. Count only corrections whose recheck preserves the same
102
+ decisive failure, using attempts supplied in the task/current context; include each in
103
+ `dead_ends`. Resolution is progress, while a different cause returns to the caller as a
104
+ new fingerprint. At the limit return the gate and repro. `Escalation` is only for product/irreversible choices
104
105
  or human-only access; technical failure is a blocker.
105
106
  5. **RETURN** the structured artifact (below) and stop. Do not start the next slice.
106
107
 
@@ -18,10 +18,14 @@ has no clear next move.
18
18
  1. **Build the feedback loop:** create a fast, deterministic, agent-runnable pass/fail
19
19
  signal. Spend most of the investigation here.
20
20
  See [build-the-loop.md](reference/build-the-loop.md).
21
- 2. **Reproduce:** run the loop. Confirm the failure matches the user's report
22
- (not a nearby failure); capture the **exact error text**; confirm
23
- reproducibility (or a high enough repro rate for flaky bugs). Do not proceed
24
- without reproduction.
21
+ 2. **Reproduce:** run the loop for a repeatable action. Confirm the failure matches
22
+ the user's report (not a nearby failure); capture the **exact error text**;
23
+ confirm reproducibility (or a high enough repro rate for flaky bugs). For a
24
+ consumptive action under
25
+ [`one-shot-actions.md`](../devrites-lib/reference/standards/one-shot-actions.md),
26
+ the retained bounded artifact
27
+ is the reproduction input and the action MUST NOT be rerun during diagnosis.
28
+ Do not proceed without one of those reproduction inputs.
25
29
  3. **Ranked hypotheses (3-5, falsifiable):** generate the list before testing
26
30
  any of them. Each must state a prediction.
27
31
  **Completion:** 3-5 distinct hypotheses each state an observable prediction.
@@ -51,21 +55,27 @@ has no clear next move.
51
55
  - **Do NOT loosen / delete a failing assertion** to get green: check whether
52
56
  it's drift first (route via `/rite-plan repair`).
53
57
  - **Do NOT hide flakiness** with sleeps / retries: characterize it.
54
- - **Re-run the original loop after the fix.** The minimized regression test is not
55
- enough; prove the user-visible failure no longer reproduces.
58
+ - **Re-run the original loop after the fix when it is repeatable.** For a
59
+ consumptive action, first re-vet evidence completeness and obtain any required
60
+ fresh authorization; offline fixtures remain mandatory but cannot authorize the
61
+ real attempt.
56
62
  - **Classify before routing** with
57
63
  [cleanup-and-classify.md](reference/cleanup-and-classify.md).
58
64
  - **Durably record class and rationale** in `decisions.md` and the applicable
59
65
  `evidence.md` or `## Dead ends` entry.
60
66
  - **One causal fingerprint, counted by the caller.** Normalize the root cause as
61
- `<affected boundary>: <failure mechanism>` rather than hashing symptom text.
67
+ `<affected boundary>: <failed invariant/failure mechanism>` and bind its minimal
68
+ reproduction plus decisive signal rather than hashing symptom text.
62
69
  The caller and recovery attempts share one count: read the current context and
63
- recorded `## Dead ends` / `evidence.md`, then include every failed attempt
70
+ recorded `## Dead ends` / `evidence.md`, then include every no-progress attempt
64
71
  with that fingerprint. Reclassify only on new causal evidence.
65
- - **A maximum of three total failed attempts per causal fingerprint stops the loop.** Record
66
- attempt number, exact failure, hypothesis, probe, and failed idea after each
67
- failure, and never make a fourth related attempt. There is no JSONL ledger,
72
+ - **A maximum of three no-progress attempts per exact causal fingerprint stops the loop.**
73
+ Count an attempt only when its recheck preserves the same decisive failure.
74
+ Record attempt number, exact failure, hypothesis, probe, and failed idea after
75
+ each; closure is progress and a different Critical/Important invariant is a new
76
+ fingerprint. There is no JSONL ledger,
68
77
  counter command, or reset-on-green operation. Product/acceptance ambiguity, irreversible risk, or
69
78
  human-only access becomes a human gate; otherwise return reproducible `blocked` with
70
- `Next: /rite-plan unblock`, never request attempt four. Coupled failure requiring behavior
71
- change routes `/rite-plan repair`; behavior-neutral rerouting uses `unblock`.
79
+ `Next: none technical recovery exhausted for <causal fingerprint>`, never request
80
+ attempt four. While budget remains, coupled failure requiring behavior change routes
81
+ `/rite-plan repair` inline; behavior-neutral rerouting uses `unblock` inline.
@@ -14,20 +14,25 @@ record the dead end and classify anew. Failure alone never resets the budget.
14
14
  - `preexisting`: the same failure exists outside the candidate delta. Record the baseline and fix it only when it blocks acceptance.
15
15
  - `not_a_defect`: the observation matches current accepted authority. Record that authority and continue.
16
16
 
17
- Only human credentials/quotas/actions or irreversible work pause; never ask to retry.
17
+ Only human credentials/quotas/actions, irreversible work, or fresh authorization
18
+ required by a consumptive action pause; never ask for a blind retry.
18
19
 
19
20
  Record class/routing in `decisions.md` and each failed attempt in `evidence.md`
20
21
  or `## Dead ends`. Use one stable causal fingerprint shaped as `<affected
21
- boundary>: <failure mechanism>`, not a hash of the symptom. Before retrying,
22
- count matching caller and recovery failures in the current context and those
23
- records. The maximum is three total failed attempts; never run a fourth related
24
- attempt. Also record baseline, exact failure, hypothesis/probe, attempt number,
25
- and any human predicate. Green evidence records the resolution but does not
26
- erase prior failures. There is no recovery counter file or command.
22
+ boundary>: <failed invariant/failure mechanism>` and bind its minimal
23
+ reproduction plus decisive signal, not a hash of the symptom. Before retrying,
24
+ count matching caller and recovery no-progress attempts in the current context
25
+ and those records. The maximum is three per exact fingerprint; count only a
26
+ recheck that preserves the same decisive failure. Also record baseline, exact
27
+ failure, hypothesis/probe, attempt number, and any human predicate. Green evidence
28
+ records progress and resolution but does not erase prior failures. A different
29
+ Critical/Important invariant is a new fingerprint. There is no recovery counter
30
+ file or command.
27
31
 
28
32
  ## Cleanup checklist: required before declaring done
29
33
 
30
- - [ ] Original repro no longer reproduces (re-run the Phase 1 loop).
34
+ - [ ] Original repeatable repro no longer reproduces, or the consumptive action's
35
+ offline regression and evidence-completeness fixtures pass without a rerun.
31
36
  - [ ] Regression test passes (or absence of seam is documented).
32
37
  - [ ] All `[DEBUG-...]` instrumentation removed (`grep` the prefix).
33
38
  - [ ] Throwaway harnesses deleted (or moved to a clearly marked debug location).
@@ -36,6 +36,7 @@ topic's owner.
36
36
  | `context-hygiene.md` | Choosing `/clear`, `/compact`, or a handoff. |
37
37
  | `anti-patterns.md` | A pack-wide rationalization or red flag appears. |
38
38
  | `afk-hitl.md` | A pause, question, resume, or AFK decision is possible. |
39
+ | `one-shot-actions.md` | A proof/action may be attempted once, needs fresh retry authorization, consumes external state/quota, or can delete its own failure evidence. |
39
40
  | `tooling.md` | Structural lookup, current external facts, or architecture memory is needed. |
40
41
  | `skill-authoring.md` | Creating, editing, routing, evaluating, or pruning a DevRites skill. |
41
42
  | `definition-of-done.md` | Prove, Seal, Ship, or Quick must decide whether work is finished. |
@@ -233,12 +233,22 @@ changes, not a request for permission to retry.
233
233
 
234
234
  ## Retry cap, no-progress loops, and self-resolve
235
235
 
236
- - **Cap retries:** three total attempts per root cause across wright and recovery is a hard
237
- cap. The caller and recovery loop count every failed attempt with the same
238
- causal fingerprint from the current context and recorded `## Dead ends` /
239
- `evidence.md`. Persist the exact failure and attempted idea after each; never
240
- make a fourth unchanged or related attempt for the same root cause. There is
241
- no recovery counter file or command.
236
+ - **Fingerprint the failed invariant, not the review round.** An exact causal
237
+ fingerprint is the owning gate/invariant plus its minimal reproduction and
238
+ decisive failure signal. A new DEC/DRIFT number, changed line number, reviewer
239
+ wording, or splitting one finding does not create a new fingerprint.
240
+ - **Cap no-progress retries:** three no-progress attempts per exact causal fingerprint
241
+ across wright and recovery is a hard cap. Only a repair whose narrow recheck
242
+ leaves that fingerprint open or reproduces the same decisive failure consumes
243
+ an attempt. Closing a prior finding with discriminating evidence is progress:
244
+ mark that fingerprint resolved and do not charge it as no-progress. A genuinely
245
+ new Critical or Important finding with a different failed invariant and exact
246
+ evidence gets its own fingerprint and budget; Suggestion, Nit, FYI, or renamed
247
+ evidence cannot open, reset, or extend recovery.
248
+ - **Persist accounting in existing records.** Record each fingerprint,
249
+ reproduction, attempted correction, `progress: resolved|no-progress`, and
250
+ decisive result in `drift.md` and `evidence.md`. Cold resume derives the count
251
+ from those records. There is no recovery counter file or command.
242
252
  - **Classify exhaustion:** human-owned contract/risk/access gaps open their gate. Otherwise
243
253
  preserve reproduction/dead ends, set `Status: blocked` and `Next step: none — technical recovery exhausted for <causal fingerprint>; requires new evidence or changed failure conditions`.
244
254
  Do not emit `/rite-plan unblock`, another phase command, a question, or
@@ -0,0 +1,46 @@
1
+ # One-shot evidence completeness
2
+
3
+ An action is **consumptive** when a failed attempt is not safely equivalent to a
4
+ normal rerun. This includes commands limited to one attempt, commands whose retry
5
+ needs fresh human authorization, actions that spend external quota or mutate
6
+ privileged/external state so a rerun is not equivalent, and actions whose cleanup
7
+ can destroy the failure state needed for diagnosis. Successful cleanup does not
8
+ make a consumptive action repeatable.
9
+
10
+ ## Pre-attempt gate
11
+
12
+ Before Vet can emit READY, and again immediately before Prove executes the action,
13
+ the approved `test-plan.md` must bind all of the following:
14
+
15
+ 1. **Durable retention:** an operator-controlled evidence artifact outside the
16
+ disposable runtime/cleanup tree, created before the first side effect, written
17
+ durably before cleanup, least-privilege, and bounded by schema, size, and
18
+ cardinality.
19
+ 2. **Trust-safe diagnostics:** known semantic values use the normal validator;
20
+ unknown but lexically well-formed non-secret values survive in bounded sanitized
21
+ fields; malformed, hostile, or secret-bearing values become fixed reason codes
22
+ rather than retained raw input.
23
+ 3. **Terminal completeness:** every success, nonzero exit, rejection, timeout,
24
+ signal, and cleanup failure either names the retained artifact or proves that
25
+ no diagnostic state exists. Failure retention preserves the original safe
26
+ failure family and cause through clean convergence.
27
+ 4. **Discriminating proof:** fixtures cover success, a known failure, an unknown
28
+ well-formed failure, malformed/hostile input, and cleanup after failure. They
29
+ prove cleanup cannot delete or overwrite the retained failure evidence.
30
+ 5. **Recovery sufficiency:** the retained bounded evidence is enough to choose an
31
+ offline correction or a truthful terminal classification without consuming
32
+ another attempt.
33
+
34
+ Missing or stale evidence is an agent-owned technical plan gap: Vet returns
35
+ `NEEDS REPLAN`, and Prove returns to Vet inline without executing the action. Never
36
+ weaken the trust validator or spend the attempt merely to discover what the
37
+ retention design should have preserved.
38
+
39
+ ## Failure handling
40
+
41
+ After a consumptive action fails, its retained artifact is the reproduction input.
42
+ Do not rerun the action during triage. A new attempt is admissible only after the
43
+ evidence identifies a changed invariant or external condition, the affected plan
44
+ and fixtures are re-vetted, and any required fresh authorization is obtained. If
45
+ the attempt ran without complete retention, stop with the observed technical
46
+ blocker; a blind retry cannot manufacture the destroyed evidence.
@@ -59,11 +59,19 @@ Autocomplete root remains the caller:
59
59
 
60
60
  1. Save the originating phase/action in the native return cursor unless a valid
61
61
  one already exists.
62
- 2. Invoke the required repair, Vet, remediation, and proof skills inline. Their
62
+ 2. Invoke the required repair, Vet, remediation, and proof skills inline. After
63
+ Plan repair, run Vet in its recovery mode as a narrow Vet recheck of the prior
64
+ findings, changed paths/criteria, and affected evidence; do not restart a Full
65
+ Vet over unchanged axes. Their
63
66
  `STOP` instructions end only those nested phases.
64
67
  3. Re-read `state.md` after each nested phase and follow its intermediate
65
68
  `next_action`; do not hand the intermediate command to the user.
66
- 4. When the prerequisite chain is green, restore and consume the return cursor,
69
+ 4. Reconcile each exact causal fingerprint from `drift.md` and `evidence.md`.
70
+ Continue automatically when the recheck closes a prior fingerprint or admits
71
+ a genuinely new Critical/Important fingerprint. Charge only a no-progress
72
+ outcome against the same fingerprint; lower-severity novelty cannot prolong
73
+ the chain.
74
+ 5. When the prerequisite chain is green, restore and consume the return cursor,
67
75
  resume the originating phase, and continue the forward table.
68
76
 
69
77
  Count failed corrections by causal fingerprint under `afk-hitl.md`. Ask only
@@ -5,6 +5,9 @@ the reason and one resume command when an actual human/safety/access action can
5
5
  change the state, notify if configured, and stop. Exhausted agent-owned
6
6
  technical recovery is terminal for its unchanged causal fingerprint: record
7
7
  `Next step: none` and no runnable recovery command. `--ship` cannot bypass them.
8
+ Closure of a prior fingerprint is progress, not exhaustion. A separately evidenced
9
+ Critical/Important failed invariant starts its own bounded fingerprint; it never
10
+ resets or extends the budget of the one just closed.
8
11
 
9
12
  ## Always stop (irreversible-risk list: from `afk-hitl.md`)
10
13
 
@@ -24,8 +27,10 @@ Agent-owned backtracking is not a stop condition while its causal-fingerprint
24
27
  budget remains. The active caller invokes the earlier phase inline, follows Vet
25
28
  and any bounded remediation, then resumes the originating phase. Persist
26
29
  `Next step` for crash recovery, but do not surface it as a command the human must
27
- submit. Stop only when recovery is exhausted or the remaining choice is a real
28
- human/safety/access gate.
30
+ submit. Use the repaired finding's narrow Vet recheck to distinguish resolution,
31
+ the same decisive failure, and a genuinely new Critical/Important invariant.
32
+ Stop only after three no-progress attempts on the exact same fingerprint or when
33
+ the remaining choice is a real human/safety/access gate.
29
34
 
30
35
  On technical exhaustion, preserve the fingerprint, reproduction, attempts, and
31
36
  dead ends, then stop without `/rite-plan unblock` or another phase command.
@@ -71,7 +71,9 @@ tests, types, or lint are red:
71
71
  The fail-on-red path:
72
72
 
73
73
  1. Continue the same wright under `devrites-debug-recovery`, carrying exact output and dead
74
- ends; cap writer + recovery at three total attempts per root cause.
74
+ ends; cap writer + recovery at three no-progress attempts per exact causal fingerprint.
75
+ A correction that closes the reproduction is progress; a different evidenced
76
+ Critical/Important invariant starts a separate fingerprint.
75
77
  2. Green → record the slice. Product-contract/irreversible ambiguity → write the genuine
76
78
  human gate. Missing human-only credential/permission → write a human-intervention gate.
77
79
  3. Any other exhausted objective failure → set `Status: blocked`, preserve the reproduction,
@@ -33,8 +33,10 @@ See [`one-slice-cycle.md`](one-slice-cycle.md); candidate lifecycle is
33
33
  is not success.
34
34
 
35
35
  Technical failure uses bounded `devrites-debug-recovery`: reapply the host gate
36
- before an accepted in-slice correction, keep one root cause/three total attempts,
37
- and never rerun an unchanged check. Ask humans only for product decisions,
36
+ before an accepted in-slice correction, keep one exact fingerprint/three
37
+ no-progress attempts, and never rerun an unchanged check. A closed reproduction
38
+ is progress; a different Critical/Important invariant gets its own fingerprint.
39
+ Ask humans only for product decisions,
38
40
  irreversible risk, or genuinely human-only access.
39
41
  7. **Record.** After green proof, upsert `touched-files.md`'s authoritative candidate
40
42
  manifest from the actual scoped diff with explicit `present`/`deleted` rows;
@@ -38,6 +38,8 @@ Pull these via `Read` when relevant:
38
38
  webhook / config / error messages / getting-started): **measure** the DX scorecard (run the flow,
39
39
  measure time-to-hello-world, and capture verbatim error text), rather than asserting it.
40
40
  - `definition-of-done.md`: acceptance, proof, gates, scope, rollback/docs.
41
+ - `one-shot-actions.md`: pre-attempt evidence completeness and no-rerun handling for
42
+ consumptive proof actions.
41
43
 
42
44
 
43
45
  ## Operating rules
@@ -60,7 +62,10 @@ Pull these via `Read` when relevant:
60
62
  - **Prove remains the controlling caller during technical backtracking.** Save
61
63
  its return cursor, invoke Plan/Vet or bounded remediation inline, consume each
62
64
  nested phase boundary, then resume the failed Prove step. Never make the human
63
- submit an agent-owned repair, re-vet, or proof-rerun command.
65
+ submit an agent-owned repair, re-vet, or proof-rerun command. Apply `afk-hitl.md`
66
+ progress accounting: only three no-progress attempts on the exact same fingerprint
67
+ exhaust recovery; a closed prior finding or a genuinely new
68
+ Critical/Important fingerprint continues inside this invocation.
64
69
 
65
70
  ## Released-workspace refresh entry
66
71
 
@@ -104,6 +109,13 @@ failure is a blocker; this Upgrade admission never authorizes source or test cha
104
109
  substituted commands, malformed manifests, zero-test/skipped/filtered results used as
105
110
  behavioral proof, success inferred only from exit status, and any source drift. Static
106
111
  gates prove only their named static criterion.
112
+ Immediately before any consumptive action, apply `one-shot-actions.md` to the
113
+ live candidate: require the vetted retained-artifact identity, bounds,
114
+ sanitization, terminal-path fixtures, and cleanup-survival proof. A missing,
115
+ stale, or disposable-only evidence surface returns to Vet inline and consumes
116
+ no attempt. Record the admitted artifact identity before execution. After a
117
+ failed consumptive action, triage from that artifact; never reproduce it by
118
+ rerunning the action.
107
119
  4. **UI feature?** The root applies the browser proof ladder with
108
120
  `design-brief.md`, `references.md`, the requested routes, browser harness, and
109
121
  allowed scratch path:
@@ -4,7 +4,10 @@ When a test/build/runtime/browser check fails, triage before fixing. Delegates t
4
4
  loop to `devrites-debug-recovery`.
5
5
 
6
6
  ## Triage ladder
7
- 1. **Reproduce:** run the failing command again; capture the exact error (quote it).
7
+ 1. **Reproduce:** for a repeatable command, run it again and capture the exact
8
+ error (quote it). For a consumptive action under
9
+ [`one-shot-actions.md`](../../devrites-lib/reference/standards/one-shot-actions.md),
10
+ never rerun it: use the retained bounded artifact as the reproduction input.
8
11
  2. **Classify** the failure:
9
12
  - test is right, code is wrong → fix the code (in scope).
10
13
  - test is wrong/outdated → that may be **spec drift** (acceptance criteria wrong).
@@ -14,13 +17,17 @@ loop to `devrites-debug-recovery`.
14
17
  3. **Isolate:** minimize to the smallest failing case; bisect the diff if needed.
15
18
  4. **Fix within scope:** the current slice/feature only. If the fix reaches outside
16
19
  scope, stop and record a blocker in `state.md` (then `/rite-plan unblock`).
17
- 5. **Re-run** the same command; confirm green; record both attempts in `evidence.md`.
20
+ 5. **Re-run** the same command when it is repeatable; confirm green and record both
21
+ attempts in `evidence.md`. A consumptive action needs re-vetted evidence
22
+ completeness and any fresh authorization before a new attempt.
18
23
 
19
24
  ## Rules
20
25
  - Quote the real error text; don't paraphrase it away.
21
26
  - Don't loosen/delete a failing assertion to get green: investigate whether it's drift.
22
27
  - Don't add blanket retries/sleeps to hide flakiness.
23
- - Three failed fix attempts on the same root cause consume the shared recovery
24
- cap: preserve the reproduction and dead ends, then stop once as a technical
25
- blocker. Ask only when the remaining decision is human-owned.
28
+ - Three no-progress attempts on the exact same causal fingerprint consume the
29
+ shared recovery cap. A recheck that closes the reproduction is progress; a
30
+ different evidenced Critical/Important invariant gets its own fingerprint.
31
+ Preserve the reproduction and dead ends, then stop once as a technical blocker.
32
+ Ask only when the remaining decision is human-owned.
26
33
  - A failure you can't fix in scope is a recorded **blocker**, not a silent skip.
@@ -20,7 +20,8 @@ but every profile keeps the exact plan-reviewer gate.
20
20
  Pull the standard named by the active axis: `principles.md`, `patterns.md`,
21
21
  `coding-style.md`, `testing.md`, `spec-grammar.md`, `performance.md`,
22
22
  `error-handling.md`, `development-workflow.md`, `afk-hitl.md`,
23
- `developer-experience.md`, `elicitation.md`, and `definition-of-done.md`.
23
+ `one-shot-actions.md`, `developer-experience.md`, `elicitation.md`, and
24
+ `definition-of-done.md`.
24
25
 
25
26
 
26
27
  ## Operating rules
@@ -43,6 +44,9 @@ Pull the standard named by the active axis: `principles.md`, `patterns.md`,
43
44
  - **Honor a recovery origin.** Preserve a valid technical-backtracking return
44
45
  cursor throughout review. Agent-owned `NEEDS REPLAN` returns internally to the
45
46
  controlling caller; it never becomes a request for the human to invoke Plan.
47
+ - **Recovery recheck is bounded.** A valid technical-backtracking cursor plus a
48
+ recorded open fingerprint enters the Recovery recheck below. Recovery recheck
49
+ does not start another Full Vet or repeat unaffected axes/reviewers.
46
50
 
47
51
  ## Workflow
48
52
  0. **Read `.claude/skills/devrites-lib/reference/standards/core.md`** first.
@@ -57,12 +61,26 @@ Pull the standard named by the active axis: `principles.md`, `patterns.md`,
57
61
  `.claude/skills/devrites-lib/reference/standards/tooling.md`) for placement / blast-radius / reuse checks.
58
62
  1. **Set review depth. Never skip this step.** Apply
59
63
  [`reference/depth.md`](reference/depth.md) exactly. Every plan leaves a recorded
60
- engineering verdict and `test-plan.md` coverage map.
61
- 1a. **Independent pass at every depth.** Freeze the candidate; dispatch exact
64
+ engineering verdict and `test-plan.md` coverage map. For an admitted Recovery
65
+ recheck, retain the prior depth and proceed to step 1b instead of starting a new
66
+ depth/pass.
67
+ 1a. **Independent pass at every initial depth.** Freeze the candidate; dispatch exact
62
68
  `devrites-plan-reviewer` fresh/read-only and validate its report. Add exact
63
69
  `devrites-devex-reviewer` for developer surfaces and require the current exact
64
70
  `devrites-strategy-reviewer` verdict after significant Temper. Missing accounts
65
71
  block; never substitute inline work.
72
+ 1b. **Recovery recheck.** Require the valid return cursor, prior accepted findings,
73
+ exact open fingerprint/reproduction, repaired candidate identity, changed
74
+ paths/criteria, and affected evidence from `drift.md` / `evidence.md`. Freeze
75
+ that packet and dispatch each exact owning reviewer once, fresh/read-only and
76
+ limited to those inputs. Do not rerun unaffected reviewers or the broad steps
77
+ 2-4 inventory. Mark the prior fingerprint resolved only when discriminating
78
+ evidence closes its reproduction; otherwise record one no-progress outcome.
79
+ A newly caused or exposed Critical or Important finding may block only with a
80
+ different failed invariant, exact evidence in the changed/affected boundary,
81
+ and a new fingerprint. A Suggestion, Nit, or FYI cannot keep recovery open.
82
+ Reconcile the common artifact/readiness gates below, then return to the caller
83
+ or its next repair; never convert the nested result into a human command.
66
84
  2. **Scope challenge (blocking gate):** apply §0 of
67
85
  [`reference/review-axes.md`](reference/review-axes.md). Search accepted ADRs and
68
86
  relevant workspace `decisions.md` files directly. Harden to the smallest
@@ -80,6 +98,11 @@ Pull the standard named by the active axis: `principles.md`, `patterns.md`,
80
98
  unmeasurable conflict = gap. Record complete SHA-256 provenance inputs. Require
81
99
  every behavioral mapping to name a positive,
82
100
  discriminating assertion and decisive signal, not merely a command or expected exit zero.
101
+ Identify every consumptive action under `one-shot-actions.md`. Before admitting
102
+ it, require the exact durable retention surface, trust-safe diagnostic schema,
103
+ cleanup ordering, terminal-path coverage, and discriminating fixtures in
104
+ `test-plan.md`. Missing or stale one-shot evidence completeness is a technical
105
+ preflight gap; do not spend the action to learn what cleanup would erase.
83
106
  Preflight observes; it need not make future behavior pass.
84
107
  2c. **Implementation-readiness audit.** Goal-backward map every REQ/AC/NFR, interaction,
85
108
  edge/prohibition, and decision-coverage row to a slice and executable proof. Verify
@@ -35,6 +35,7 @@ Inventory/currentness: <pass/gaps> · slice order/independence: <pass/gaps> ·
35
35
  UX/spec/architecture: <pass/n-a/gaps> · operations/rollout/rollback: <pass/n-a/gaps>
36
36
 
37
37
  Shared contract proof: <pass | gap: missing/one-sided/duplicated-contract/vague/non-consuming>
38
+ One-shot evidence completeness: <n/a | pass: action + retained artifact + bounds/sanitization + cleanup-survival fixtures | gap: exact missing proof>
38
39
 
39
40
  ## 3. Axis findings (floor-gated)
40
41
  | Axis | Floor band | Findings (sev · confidence) |
@@ -94,6 +95,11 @@ Commands in this durable artifact are portable repository commands: no RTK or lo
94
95
  aliases, user-specific absolute paths, or temporary proof trees. Evidence records
95
96
  the command actually executed.
96
97
 
98
+ ## Consumptive action gates
99
+ | Action | Why one-shot/consumptive | Retained artifact | Bounds + sanitization | Terminal-path fixtures | Cleanup survival | Retry authority |
100
+ |---|---|---|---|---|---|---|
101
+ | <exact approved action or n/a> | <one attempt/quota/state/evidence deletion> | <durable operator-controlled path/schema> | <size/cardinality + known/unknown/malformed handling> | <success/known/unknown/hostile> | <assertion> | <none/fresh human authorization> |
102
+
97
103
  Every behavioral row names a positive, discriminating assertion and the decisive output it
98
104
  produces. A command or expected exit zero alone is not a behavioral assertion; static gates
99
105
  prove only their named static criterion.
@@ -55,7 +55,11 @@ line, and then assign the band. Do not choose a score and justify it afterward:
55
55
  model changes conservatively. Every destructive step needs a rollback.
56
56
  7. **Failure-mode coverage:** for each new codepath, find a realistic failure such
57
57
  as a timeout, nil value, race, or stale state. A silent failure with **no test AND
58
- no error handling** is a critical gap.
58
+ no error handling** is a critical gap. For every consumptive action under
59
+ `one-shot-actions.md`, require durable bounded trust-safe evidence for every
60
+ terminal path plus unknown-well-formed, malformed/hostile, and cleanup-survival
61
+ fixtures. Missing evidence completeness is `broken`: the plan must not consume
62
+ the action to discover diagnostics that cleanup can erase.
59
63
 
60
64
  ## Confidence calibration + verification gate (mandatory)
61
65
  Give every finding a **confidence score from 1 to 10** and a quoted source:
@@ -73,7 +77,8 @@ Band each dimension `strong` / `adequate` / `thin` / `broken` (`broken` means
73
77
  Critical; `thin` means Important). For a borderline dimension, sample twice and
74
78
  take the **lower** band. The verdict uses the weakest dimension, not an average.
75
79
  Pass only when every dimension is at least `adequate`, no critical failure-mode gap
76
- remains, the shared-contract check passes, and the ID-and-meaning map contains no orphaned
80
+ remains, every consumptive action passes one-shot evidence completeness, the
81
+ shared-contract check passes, and the ID-and-meaning map contains no orphaned
77
82
  criterion, slice, or proof.
78
83
 
79
84
  ## Rules
@@ -97,10 +97,11 @@ an escalation and do not proceed.**
97
97
  not a quiet edit. The root inspects the returned diff and dedicated test
98
98
  analysis treats a weakened test as a Critical STOP.
99
99
  For non-trivial failure, invoke `devrites-debug-recovery` with the exact error,
100
- hypotheses, and dead ends. Caller and recovery share three total failed attempts per
101
- causal fingerprint. Count attempts supplied in the task/current context, include each
102
- failure in `dead_ends`, and never make a fourth related attempt. At the limit return the
103
- gate and repro. `Escalation` is only for product/irreversible choices
100
+ hypotheses, and dead ends. Caller and recovery share three no-progress attempts per
101
+ exact causal fingerprint. Count only corrections whose recheck preserves the same
102
+ decisive failure, using attempts supplied in the task/current context; include each in
103
+ `dead_ends`. Resolution is progress, while a different cause returns to the caller as a
104
+ new fingerprint. At the limit return the gate and repro. `Escalation` is only for product/irreversible choices
104
105
  or human-only access; technical failure is a blocker.
105
106
  5. **RETURN** the structured artifact (below) and stop. Do not start the next slice.
106
107
 
@@ -18,10 +18,14 @@ has no clear next move.
18
18
  1. **Build the feedback loop:** create a fast, deterministic, agent-runnable pass/fail
19
19
  signal. Spend most of the investigation here.
20
20
  See [build-the-loop.md](reference/build-the-loop.md).
21
- 2. **Reproduce:** run the loop. Confirm the failure matches the user's report
22
- (not a nearby failure); capture the **exact error text**; confirm
23
- reproducibility (or a high enough repro rate for flaky bugs). Do not proceed
24
- without reproduction.
21
+ 2. **Reproduce:** run the loop for a repeatable action. Confirm the failure matches
22
+ the user's report (not a nearby failure); capture the **exact error text**;
23
+ confirm reproducibility (or a high enough repro rate for flaky bugs). For a
24
+ consumptive action under
25
+ [`one-shot-actions.md`](../devrites-lib/reference/standards/one-shot-actions.md),
26
+ the retained bounded artifact
27
+ is the reproduction input and the action MUST NOT be rerun during diagnosis.
28
+ Do not proceed without one of those reproduction inputs.
25
29
  3. **Ranked hypotheses (3-5, falsifiable):** generate the list before testing
26
30
  any of them. Each must state a prediction.
27
31
  **Completion:** 3-5 distinct hypotheses each state an observable prediction.
@@ -51,21 +55,27 @@ has no clear next move.
51
55
  - **Do NOT loosen / delete a failing assertion** to get green: check whether
52
56
  it's drift first (route via `/rite-plan repair`).
53
57
  - **Do NOT hide flakiness** with sleeps / retries: characterize it.
54
- - **Re-run the original loop after the fix.** The minimized regression test is not
55
- enough; prove the user-visible failure no longer reproduces.
58
+ - **Re-run the original loop after the fix when it is repeatable.** For a
59
+ consumptive action, first re-vet evidence completeness and obtain any required
60
+ fresh authorization; offline fixtures remain mandatory but cannot authorize the
61
+ real attempt.
56
62
  - **Classify before routing** with
57
63
  [cleanup-and-classify.md](reference/cleanup-and-classify.md).
58
64
  - **Durably record class and rationale** in `decisions.md` and the applicable
59
65
  `evidence.md` or `## Dead ends` entry.
60
66
  - **One causal fingerprint, counted by the caller.** Normalize the root cause as
61
- `<affected boundary>: <failure mechanism>` rather than hashing symptom text.
67
+ `<affected boundary>: <failed invariant/failure mechanism>` and bind its minimal
68
+ reproduction plus decisive signal rather than hashing symptom text.
62
69
  The caller and recovery attempts share one count: read the current context and
63
- recorded `## Dead ends` / `evidence.md`, then include every failed attempt
70
+ recorded `## Dead ends` / `evidence.md`, then include every no-progress attempt
64
71
  with that fingerprint. Reclassify only on new causal evidence.
65
- - **A maximum of three total failed attempts per causal fingerprint stops the loop.** Record
66
- attempt number, exact failure, hypothesis, probe, and failed idea after each
67
- failure, and never make a fourth related attempt. There is no JSONL ledger,
72
+ - **A maximum of three no-progress attempts per exact causal fingerprint stops the loop.**
73
+ Count an attempt only when its recheck preserves the same decisive failure.
74
+ Record attempt number, exact failure, hypothesis, probe, and failed idea after
75
+ each; closure is progress and a different Critical/Important invariant is a new
76
+ fingerprint. There is no JSONL ledger,
68
77
  counter command, or reset-on-green operation. Product/acceptance ambiguity, irreversible risk, or
69
78
  human-only access becomes a human gate; otherwise return reproducible `blocked` with
70
- `Next: /rite-plan unblock`, never request attempt four. Coupled failure requiring behavior
71
- change routes `/rite-plan repair`; behavior-neutral rerouting uses `unblock`.
79
+ `Next: none technical recovery exhausted for <causal fingerprint>`, never request
80
+ attempt four. While budget remains, coupled failure requiring behavior change routes
81
+ `/rite-plan repair` inline; behavior-neutral rerouting uses `unblock` inline.