devrites 4.0.5 → 4.0.7

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 (52) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +4 -2
  3. package/docs/skills.md +2 -2
  4. package/pack/.claude/agents/devrites-plan-reviewer.md +7 -2
  5. package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +19 -7
  6. package/pack/.claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +6 -2
  7. package/pack/.claude/skills/devrites-lib/reference/reply-contract.md +5 -1
  8. package/pack/.claude/skills/devrites-lib/reference/standards/README.md +1 -0
  9. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +10 -0
  10. package/pack/.claude/skills/devrites-lib/reference/standards/core.md +4 -0
  11. package/pack/.claude/skills/devrites-lib/reference/standards/one-shot-actions.md +66 -0
  12. package/pack/.claude/skills/rite-autocomplete/SKILL.md +20 -3
  13. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +11 -0
  14. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +10 -0
  15. package/pack/.claude/skills/rite-prove/SKILL.md +20 -1
  16. package/pack/.claude/skills/rite-prove/reference/failure-triage.md +12 -3
  17. package/pack/.claude/skills/rite-spec/reference/state-workspace.md +7 -0
  18. package/pack/.claude/skills/rite-vet/SKILL.md +7 -1
  19. package/pack/.claude/skills/rite-vet/reference/artifacts.md +6 -0
  20. package/pack/generated/claude/agents/devrites-plan-reviewer.md +7 -2
  21. package/pack/generated/claude/skills/devrites-debug-recovery/SKILL.md +19 -7
  22. package/pack/generated/claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +6 -2
  23. package/pack/generated/claude/skills/devrites-lib/reference/reply-contract.md +5 -1
  24. package/pack/generated/claude/skills/devrites-lib/reference/standards/README.md +1 -0
  25. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +10 -0
  26. package/pack/generated/claude/skills/devrites-lib/reference/standards/core.md +4 -0
  27. package/pack/generated/claude/skills/devrites-lib/reference/standards/one-shot-actions.md +66 -0
  28. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +20 -3
  29. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +11 -0
  30. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +10 -0
  31. package/pack/generated/claude/skills/rite-prove/SKILL.md +20 -1
  32. package/pack/generated/claude/skills/rite-prove/reference/failure-triage.md +12 -3
  33. package/pack/generated/claude/skills/rite-spec/reference/state-workspace.md +7 -0
  34. package/pack/generated/claude/skills/rite-vet/SKILL.md +7 -1
  35. package/pack/generated/claude/skills/rite-vet/reference/artifacts.md +6 -0
  36. package/pack/generated/codex/agents/devrites-plan-reviewer.toml +7 -2
  37. package/pack/generated/codex/skills/devrites-debug-recovery/SKILL.md +19 -7
  38. package/pack/generated/codex/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +6 -2
  39. package/pack/generated/codex/skills/devrites-lib/reference/reply-contract.md +5 -1
  40. package/pack/generated/codex/skills/devrites-lib/reference/standards/README.md +1 -0
  41. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +10 -0
  42. package/pack/generated/codex/skills/devrites-lib/reference/standards/core.md +4 -0
  43. package/pack/generated/codex/skills/devrites-lib/reference/standards/one-shot-actions.md +66 -0
  44. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +20 -3
  45. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +11 -0
  46. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +10 -0
  47. package/pack/generated/codex/skills/rite-prove/SKILL.md +20 -1
  48. package/pack/generated/codex/skills/rite-prove/reference/failure-triage.md +12 -3
  49. package/pack/generated/codex/skills/rite-spec/reference/state-workspace.md +7 -0
  50. package/pack/generated/codex/skills/rite-vet/SKILL.md +7 -1
  51. package/pack/generated/codex/skills/rite-vet/reference/artifacts.md +6 -0
  52. package/package.json +1 -1
@@ -15,6 +15,9 @@ default and **Full** for high-risk scope or explicit `--full`; profiles are defi
15
15
 
16
16
  ## Rules consulted (read on demand from `.agents/skills/devrites-lib/reference/standards/`)
17
17
  **Step 0:** Read `.agents/skills/devrites-lib/reference/standards/core.md` and `.agents/skills/devrites-lib/reference/standards/afk-hitl.md` first.
18
+ When the cursor or approved plan contains a consumptive action, also read
19
+ `.agents/skills/devrites-lib/reference/standards/one-shot-actions.md` before any
20
+ stop/continue or execution decision.
18
21
 
19
22
  ## Operating rules
20
23
  - **Use one initial human window.** Run spec and topology-first clarify; arm AFK
@@ -29,6 +32,11 @@ default and **Full** for high-risk scope or explicit `--full`; profiles are defi
29
32
  through repair, Vet, bounded implementation correction, and re-proof inside
30
33
  the active run. A nested phase `STOP` or intermediate `Next step` is not a
31
34
  user handoff; pause only on the shared real stop conditions.
35
+ - **Do not confuse an action budget with recovery exhaustion.** After a failed
36
+ consumptive action, zero remaining real attempts blocks only another execution.
37
+ New retained Critical/Important evidence starts offline repair and narrow Vet
38
+ inside this Autocomplete invocation. Stop for a fresh GO only after that repair
39
+ changes the failure condition and Vet is READY.
32
40
  - **Budget from the post-vet slice count.** Vet may split/add slices.
33
41
  `--max-slices N` may lower the cap for a partial run; otherwise build all.
34
42
  - **Parse flags only from this invocation.** `--ship`, `--yolo`, `--max-slices`,
@@ -55,7 +63,12 @@ default and **Full** for high-risk scope or explicit `--full`; profiles are defi
55
63
 
56
64
  ## Workflow
57
65
  1. **Orient + parse args.** Resolve the explicit or active slug, require its
58
- `state.md`, and read the cursor directly.
66
+ `state.md`, and read the cursor directly. Before honoring `blocked` with a
67
+ terminal `next_action`, reconcile retained consumptive-action artifacts and
68
+ per-fingerprint attempts from `drift.md` / `evidence.md`. A distinct retained
69
+ fingerprint below its no-progress cap reopens caller-owned offline recovery;
70
+ reconstruct any missing return cursor only from the current phase plus the
71
+ exact approved action in `test-plan.md` / evidence, never from chat or guesswork.
59
72
  The idea + flags: `--ship` / `--yolo` (continue through ship preflight, then stop
60
73
  for literal-GO and native approval), `--max-slices N` (optional lower safety cap for a partial run; default =
61
74
  the plan's slice count, i.e. run all planned slices). Parse only the current
@@ -90,7 +103,9 @@ default and **Full** for high-risk scope or explicit `--full`; profiles are defi
90
103
  before any later phase runs; the cursor names the last completed phase and the
91
104
  effective remaining budget.
92
105
  5. **Apply stop conditions at every gate** ([reference/stop-conditions.md](reference/stop-conditions.md)):
93
- on hard-risk / blocking / escalating / NO-GO / budget-exhausted / still-low-confidence
106
+ first route an agent-owned red technical result through the loop's bounded
107
+ recovery; its `blocked` label alone is not a stop condition. After that, on
108
+ hard-risk / human-owned blocking / escalating / NO-GO / budget-exhausted / still-low-confidence
94
109
  → write `state.md` (`Status`, `Next step`), surface *why*, and **STOP**.
95
110
  Exhausted agent-owned technical recovery uses the terminal `Next step: none`
96
111
  marker and never hands the user `$rite-plan unblock` or another routine
@@ -120,7 +135,9 @@ Do not write a narrative recap.
120
135
  ## Clean baseline and checkpoint mode
121
136
  - Before autonomy, require a clean or accepted baseline; refuse unrelated dirty work and record plan artifacts.
122
137
  - Arm `.devrites/CHECKPOINT`; `$rite-ship` collapses its local-only proven-slice checkpoints.
123
- - Stop on risky steps, red gates, NO-GO, stale evidence, or exhausted budget.
138
+ - Red gates block forward advancement and enter caller-owned bounded recovery.
139
+ Stop only when the shared stop contract classifies risk/HITL or the exact
140
+ fingerprint's recovery budget is exhausted.
124
141
  - One autocomplete pass spans the lifecycle. Each wright returns after one slice;
125
142
  explicit `.devrites/AFK` lets the Build root chain green slices under cap/pause rules;
126
143
  otherwise HITL stops.
@@ -57,6 +57,13 @@ Read each phase's `SKILL.md` and execute that workflow. Workspace files such as
57
57
  When a later phase finds an agent-owned technical gap in an earlier phase, the
58
58
  Autocomplete root remains the caller:
59
59
 
60
+ On cold resume, reconcile the terminal cursor against durable fingerprint
61
+ accounting first. A retained distinct fingerprint with fewer than three
62
+ no-progress corrections is unfinished recovery, not an unchanged terminal stop.
63
+ Restore `return_phase` from the current phase and `return_next_action` only from
64
+ the exact approved action recorded in `test-plan.md` / evidence; ambiguity returns
65
+ to the applicable Vet contract and never licenses execution.
66
+
60
67
  1. Save the originating phase/action in the native return cursor unless a valid
61
68
  one already exists.
62
69
  2. Invoke the required repair, Vet, remediation, and proof skills inline. After
@@ -71,6 +78,10 @@ Autocomplete root remains the caller:
71
78
  a genuinely new Critical/Important fingerprint. Charge only a no-progress
72
79
  outcome against the same fingerprint; lower-severity novelty cannot prolong
73
80
  the chain.
81
+ For a failed consumptive action, its spent authorization blocks only another
82
+ real execution. A retained artifact that identifies a new fingerprint is the
83
+ offline reproduction input: diagnose, repair, and narrow-Vet it now, then pause
84
+ for fresh authorization before any next consumptive execution.
74
85
  5. When the prerequisite chain is green, restore and consume the return cursor,
75
86
  resume the originating phase, and continue the forward table.
76
87
 
@@ -9,6 +9,12 @@ Closure of a prior fingerprint is progress, not exhaustion. A separately evidenc
9
9
  Critical/Important failed invariant starts its own bounded fingerprint; it never
10
10
  resets or extends the budget of the one just closed.
11
11
 
12
+ An exhausted consumptive-action authorization is not technical-recovery
13
+ exhaustion. It blocks another real action, but retained evidence of a new
14
+ Critical/Important fingerprint must enter offline caller-owned recovery while its
15
+ own no-progress budget remains. After affected Vet is READY, pause for fresh action
16
+ authorization; never execute from the old GO.
17
+
12
18
  ## Always stop (irreversible-risk list: from `afk-hitl.md`)
13
19
 
14
20
  Regardless of `allow_gates` or `--ship`:
@@ -35,6 +41,10 @@ the remaining choice is a real human/safety/access gate.
35
41
  On technical exhaustion, preserve the fingerprint, reproduction, attempts, and
36
42
  dead ends, then stop without `$rite-plan unblock` or another phase command.
37
43
  Reinvocation with unchanged evidence remains blocked and does not reset the cap.
44
+ Here `unchanged` means the same fingerprint already has three recorded
45
+ no-progress corrections. A retained fingerprint with remaining offline budget is
46
+ not terminal merely because `state.md` was written by the failed action or a prior
47
+ session ended.
38
48
 
39
49
  ## Stop on gate severity
40
50
 
@@ -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
@@ -84,7 +86,10 @@ failure is a blocker; this Upgrade admission never authorizes source or test cha
84
86
 
85
87
  ## Workflow
86
88
  0. Read core, load relevant rules above, then resolve the active slug,
87
- require its `state.md`, and read the cursor directly.
89
+ require its `state.md`, and read the cursor directly. On a blocked Prove cold
90
+ resume, reconcile any retained consumptive-action artifact against recorded
91
+ no-progress corrections before accepting `next_action: none`; a distinct
92
+ fingerprint below its cap resumes offline triage without another real action.
88
93
  1. **Confirm all slices built.** Read `spec.md`, `tasks.md`, `state.md`,
89
94
  `test-plan.md`, and the full diff.
90
95
  A missing `test-plan.md` enters caller-owned Vet backtracking; invoke Vet
@@ -107,6 +112,16 @@ failure is a blocker; this Upgrade admission never authorizes source or test cha
107
112
  substituted commands, malformed manifests, zero-test/skipped/filtered results used as
108
113
  behavioral proof, success inferred only from exit status, and any source drift. Static
109
114
  gates prove only their named static criterion.
115
+ Immediately before any consumptive action, apply `one-shot-actions.md` to the
116
+ live candidate: require the vetted retained-artifact identity, bounds,
117
+ sanitization, terminal-path fixtures, and cleanup-survival proof. A missing,
118
+ stale, or disposable-only evidence surface returns to Vet inline and consumes
119
+ no attempt. Record the admitted artifact identity before execution. After a
120
+ failed consumptive action, triage from that artifact; never reproduce it by
121
+ rerunning the action. Consuming its authorization blocks only another real
122
+ execution. If the artifact identifies a new Critical/Important fingerprint,
123
+ continue offline recovery inside this Prove invocation; do not label the new
124
+ fingerprint exhausted because the action budget is zero.
110
125
  4. **UI feature?** The root applies the browser proof ladder with
111
126
  `design-brief.md`, `references.md`, the requested routes, browser harness, and
112
127
  allowed scratch path:
@@ -136,6 +151,10 @@ failure is a blocker; this Upgrade admission never authorizes source or test cha
136
151
  Vet inside this invocation, and resume the exact failed proof rung. Ask only
137
152
  for a human-owned decision; causal-fingerprint exhaustion stops once with a
138
153
  technical blocker rather than another phase command.
154
+ For a consumptive-action failure, use fixtures or another non-consumptive
155
+ reproduction to fix and re-vet the retained fingerprint. Once the failure
156
+ condition is demonstrably changed, stop at the fresh-authorization boundary;
157
+ only a new human GO may admit the next real attempt.
139
158
  8. The root updates `evidence.md`, `browser-evidence.md` (when present),
140
159
  `traceability.md`, and `state.md`. Record exactly one binding for the observed
141
160
  digest in evidence and browser evidence. New proof goes to canonical
@@ -4,17 +4,26 @@ 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).
11
- - environment/setup (missing dep, wrong node/ruby) → fix setup or record blocker.
14
+ - environment/setup (missing dep, wrong node/ruby) → fix it when agent-owned;
15
+ record a blocker only for human/access ownership, scope overflow, or exhausted
16
+ fingerprint recovery.
12
17
  - flaky (passes on re-run, timing/order) → note it; don't paper over with retries.
13
18
  - external dependency down → record blocker; don't fake the result.
14
19
  3. **Isolate:** minimize to the smallest failing case; bisect the diff if needed.
15
20
  4. **Fix within scope:** the current slice/feature only. If the fix reaches outside
16
21
  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`.
22
+ 5. **Re-run** the same command when it is repeatable; confirm green and record both
23
+ attempts in `evidence.md`. A consumptive action needs re-vetted evidence
24
+ completeness and any fresh authorization before a new attempt. Its spent
25
+ action authorization does not stop offline recovery: a retained new fingerprint
26
+ enters caller-owned diagnosis, correction, fixtures, and narrow Vet immediately.
18
27
 
19
28
  ## Rules
20
29
  - Quote the real error text; don't paraphrase it away.
@@ -131,6 +131,13 @@ resume. Never overwrite an existing valid return cursor, and preserve every
131
131
  unrelated Markdown byte. `$rite-clarify` applies its stricter native cursor
132
132
  protocol below.
133
133
 
134
+ On cold resume, a terminal `next_action` is a claim to verify, not a counter.
135
+ Reconcile the exact fingerprint and its attempts in `drift.md` / `evidence.md`.
136
+ If a consumptive action retained a distinct fingerprint below the no-progress
137
+ cap, rewrite the cursor into caller-owned recovery and preserve or reconstruct
138
+ the return rows only from the current phase and approved recorded action. The
139
+ spent action authorization blocks another execution, not that rewrite.
140
+
134
141
  `afk_slices_remaining` is mutable runtime state, not `.devrites/AFK`
135
142
  configuration. Only the controlling root writes it under the shared
136
143
  [`afk-hitl.md`](../../devrites-lib/reference/standards/afk-hitl.md#the-sentinel-devritesafk)
@@ -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
@@ -97,6 +98,11 @@ Pull the standard named by the active axis: `principles.md`, `patterns.md`,
97
98
  unmeasurable conflict = gap. Record complete SHA-256 provenance inputs. Require
98
99
  every behavioral mapping to name a positive,
99
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.
100
106
  Preflight observes; it need not make future behavior pass.
101
107
  2c. **Implementation-readiness audit.** Goal-backward map every REQ/AC/NFR, interaction,
102
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devrites",
3
- "version": "4.0.5",
3
+ "version": "4.0.7",
4
4
  "description": "DevRites: a disciplined senior-engineer workflow pack for Claude Code and Codex",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://github.com/ViktorsBaikers/DevRites#readme",