devrites 4.0.9 → 4.0.11

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 (28) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +6 -3
  3. package/docs/skills.md +2 -2
  4. package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +5 -1
  5. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +8 -0
  6. package/pack/.claude/skills/devrites-lib/reference/standards/one-shot-actions.md +7 -0
  7. package/pack/.claude/skills/devrites-lib/reference/standards/workflow-artifacts.md +45 -0
  8. package/pack/.claude/skills/rite-autocomplete/SKILL.md +9 -0
  9. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +14 -0
  10. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +13 -0
  11. package/pack/.claude/skills/rite-build/reference/phase-contract.md +5 -1
  12. package/pack/generated/claude/skills/devrites-debug-recovery/SKILL.md +5 -1
  13. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +8 -0
  14. package/pack/generated/claude/skills/devrites-lib/reference/standards/one-shot-actions.md +7 -0
  15. package/pack/generated/claude/skills/devrites-lib/reference/standards/workflow-artifacts.md +45 -0
  16. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +9 -0
  17. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +14 -0
  18. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +13 -0
  19. package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +5 -1
  20. package/pack/generated/codex/skills/devrites-debug-recovery/SKILL.md +5 -1
  21. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +8 -0
  22. package/pack/generated/codex/skills/devrites-lib/reference/standards/one-shot-actions.md +7 -0
  23. package/pack/generated/codex/skills/devrites-lib/reference/standards/workflow-artifacts.md +45 -0
  24. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +9 -0
  25. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +14 -0
  26. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +13 -0
  27. package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +5 -1
  28. 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.11](https://github.com/ViktorsBaikers/DevRites/compare/v4.0.10...v4.0.11) (2026-08-08)
6
+
7
+ ### Fixed
8
+
9
+ * **rite:** recover workflow materializer failures ([4ab042b](https://github.com/ViktorsBaikers/DevRites/commit/4ab042b269c90ce7133bb425d3db15469035255e))
10
+
11
+ ## [4.0.10](https://github.com/ViktorsBaikers/DevRites/compare/v4.0.9...v4.0.10) (2026-08-08)
12
+
13
+ ### Fixed
14
+
15
+ * **rite:** reopen stale writer stops ([aebb7fb](https://github.com/ViktorsBaikers/DevRites/commit/aebb7fb5b3510d068172aa1ec9f654063f39d545))
16
+
5
17
  ## [4.0.9](https://github.com/ViktorsBaikers/DevRites/compare/v4.0.8...v4.0.9) (2026-08-08)
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.9`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v4.0.9): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
31
+ **Status:** [`v4.0.11`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v4.0.11): 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
 
@@ -83,7 +83,7 @@ the same skill.
83
83
  | 3 | Temper | [`/rite-temper`](pack/.claude/skills/rite-temper/SKILL.md) | Challenges scope and failure modes before Define. It is optional for small work and always runs in `/rite-autocomplete`. |
84
84
  | 4 | Define | [`/rite-define`](pack/.claude/skills/rite-define/SKILL.md) | Turns the approved spec into architecture, a plan, traceability, and vertical task slices; changed provider/consumer boundaries name one shared contract and consuming tests on both sides. |
85
85
  | 5 | Vet | [`/rite-vet`](pack/.claude/skills/rite-vet/SKILL.md) | Reviews every plan before implementation. The review depth scales with the risk. |
86
- | 6 | Build | [`/rite-build`](pack/.claude/skills/rite-build/SKILL.md) | In HITL, implements and verifies one product slice, then stops. Run it again for each remaining slice. An explicit `.devrites/AFK` sentinel permits bounded low-risk slice chaining under its cap and pause rules. Exact Vet-ready executable workflow artifacts under the active feature workspace are root-materialized and excluded from product slice accounting. |
86
+ | 6 | Build | [`/rite-build`](pack/.claude/skills/rite-build/SKILL.md) | In HITL, implements and verifies one product slice, then stops. Run it again for each remaining slice. An explicit `.devrites/AFK` sentinel permits bounded low-risk slice chaining under its cap and pause rules. Exact Vet-ready executable workflow artifacts under the active feature workspace are root-materialized and excluded from product slice accounting; their transaction code is proved in a disposable same-layout fixture before active writes and uses normal bounded recovery rather than a one-shot budget. |
87
87
  | 7 | Converge | [`/rite-converge`](pack/.claude/skills/rite-converge/SKILL.md) | Runs only when recovery is needed. It compares the code with the recorded intent, adds missing slices, and sends the changed plan back to Vet. |
88
88
  | 8 | Prove | [`/rite-prove`](pack/.claude/skills/rite-prove/SKILL.md) | Runs positive, discriminating tests, build/runtime checks, and UI proof, then binds the evidence to the exact candidate digest. |
89
89
  | 9 | Polish | [`/rite-polish`](pack/.claude/skills/rite-polish/SKILL.md) | Cleans up the candidate, normalizes UI when needed, performs durable capability/design/ADR rollups, and refreshes affected proof before closing it. |
@@ -103,7 +103,10 @@ Some work needs a different route:
103
103
  consumptive proof action never retries blindly: retained evidence drives
104
104
  offline repair and re-vetting. Ambiguous retained evidence first drives a vetted
105
105
  boundary-discriminating diagnostic design; only its next real acquisition attempt
106
- needs a new GO.
106
+ needs a new GO. After an upgrade introduces a supported workflow-artifact writer,
107
+ Autocomplete reopens a stale missing-writer stop once instead of preserving the
108
+ obsolete recovery count. The first real root-materializer failure then counts as
109
+ attempt one under normal fingerprint recovery; it is not terminal by itself.
107
110
  - [`/rite-upgrade [slug]`](pack/.claude/skills/rite-upgrade/SKILL.md) is a
108
111
  compatibility route for an older active workspace that cannot resume. Age or
109
112
  cursor form alone never triggers repair; it is not a lifecycle phase.
package/docs/skills.md CHANGED
@@ -178,7 +178,7 @@ and `Shipped`. Utility commands keep the same compact labels and one-next-action
178
178
 
179
179
  | Skill | What It Does | Use When |
180
180
  |---|---|---|
181
- | [`rite-build`](../pack/.claude/skills/rite-build/SKILL.md) | In HITL, orchestrates one vertical product slice through the sole wright; an explicit `.devrites/AFK` sentinel may chain bounded low-risk slices. Exact Vet-ready executable proof artifacts under the active `.devrites/work/<slug>/` are instead materialized atomically by the controlling root and remain outside product candidate/slice accounting. | A plan exists, native semantic `CLEAR` and `READY` review passes, `test-plan.md` is complete, and the content-bound engine check passes. |
181
+ | [`rite-build`](../pack/.claude/skills/rite-build/SKILL.md) | In HITL, orchestrates one vertical product slice through the sole wright; an explicit `.devrites/AFK` sentinel may chain bounded low-risk slices. Exact Vet-ready executable proof artifacts under the active `.devrites/work/<slug>/` are instead materialized atomically by the controlling root and remain outside product candidate/slice accounting. The materializer transaction is proved first in a disposable same-layout fixture; its failures use normal three-attempt fingerprint recovery, not consumptive one-shot authority. | A plan exists, native semantic `CLEAR` and `READY` review passes, `test-plan.md` is complete, and the content-bound engine check passes. |
182
182
  | [`devrites-source-driven`](../pack/.claude/skills/devrites-source-driven/SKILL.md) | Consult official docs / source before relying on framework behavior; record the source. | API, config, or framework behavior is assumed rather than known. |
183
183
  | [`devrites-api-interface`](../pack/.claude/skills/devrites-api-interface/SKILL.md) | Design stable API / interface contracts: REST/GraphQL, module boundaries, type contracts, FE/BE split. | A slice crosses a boundary or defines a public interface. |
184
184
  | [`devrites-debug-recovery`](../pack/.claude/skills/devrites-debug-recovery/SKILL.md) | Reproduce → ranked hypotheses → instrument → fix in scope → regression-test. Caller and recovery count at most three failures per causal fingerprint from context and Dead ends/evidence. | Tests, builds, or runtime checks fail. |
@@ -222,7 +222,7 @@ and `Shipped`. Utility commands keep the same compact labels and one-next-action
222
222
 
223
223
  | Skill | What It Does | Use When |
224
224
  |---|---|---|
225
- | [`rite-autocomplete`](../pack/.claude/skills/rite-autocomplete/SKILL.md) | Runs the whole lifecycle unattended (spec → clarify → … → seal → ship), choosing the recommended option at each soft gate and recording the rationale in `decisions.md`. A vague prompt triggers one up-front spec/clarify window; after decision coverage is CLEAR it runs without per-phase iteration, pausing only for genuine product/scope/policy decisions, irreversible risk, human-only access/actions, NO-GO, or budget exhaustion. Objective red checks use bounded technical recovery, including cold-resume recovery from retained one-shot evidence; spending an action authorization blocks only another real execution, not offline repair. Default stops at Seal GO; `--ship` (alias `--yolo`) reaches Ship preflight but still requires a fresh literal `GO` and native approval. | "Autocomplete", "do the whole thing", "run the full cycle", "one-shot this feature". |
225
+ | [`rite-autocomplete`](../pack/.claude/skills/rite-autocomplete/SKILL.md) | Runs the whole lifecycle unattended (spec → clarify → … → seal → ship), choosing the recommended option at each soft gate and recording the rationale in `decisions.md`. A vague prompt triggers one up-front spec/clarify window; after decision coverage is CLEAR it runs without per-phase iteration, pausing only for genuine product/scope/policy decisions, irreversible risk, human-only access/actions, NO-GO, or budget exhaustion. Objective red checks use bounded technical recovery, including cold-resume recovery from retained one-shot evidence and one-time migration of stale missing-writer stops when an upgraded contract supplies the first supported workflow-artifact writer. That migration applies once, but the first real materializer failure is only attempt one under normal bounded recovery. Spending an action authorization blocks only another real execution, not offline repair. Default stops at Seal GO; `--ship` (alias `--yolo`) reaches Ship preflight but still requires a fresh literal `GO` and native approval. | "Autocomplete", "do the whole thing", "run the full cycle", "one-shot this feature". |
226
226
  | [`rite-zoom-out`](../pack/.claude/skills/rite-zoom-out/SKILL.md) | Map the modules, callers, callees, and decisions in an unfamiliar area using the project's domain glossary. | Explicit-only: `/rite-zoom-out` / `/rite zoom-out`. |
227
227
  | [`rite-prototype`](../pack/.claude/skills/rite-prototype/SKILL.md) | Throwaway code answering ONE design question: logic harness OR 2 to 4 UI variations on one route. | Explicit-only: `/rite-prototype` / `/rite prototype`. |
228
228
  | [`rite-handoff`](../pack/.claude/skills/rite-handoff/SKILL.md) | Compact chat session → handoff doc. References existing `.devrites/work/<slug>/` artifacts by path. | Explicit-only: `/rite-handoff` / `/rite handoff`. |
@@ -73,7 +73,11 @@ has no clear next move.
73
73
  workspace follow
74
74
  [`workflow-artifacts.md`](../devrites-lib/reference/standards/workflow-artifacts.md)
75
75
  and are materialized by the controlling root. Never ask a read-only planner or
76
- reviewer to return implementation bodies.
76
+ reviewer to return implementation bodies. Materializer failures are reversible
77
+ offline recovery, not consumptive one-shot execution: preserve the transaction
78
+ journal, preimage hashes, and bound temporaries, preflight the corrected
79
+ transaction in a disposable same-layout fixture, then retry only within the
80
+ existing materializer fingerprint budget.
77
81
  - **Classify before routing** with
78
82
  [cleanup-and-classify.md](reference/cleanup-and-classify.md).
79
83
  - **Durably record class and rationale** in `decisions.md` and the applicable
@@ -259,6 +259,14 @@ changes, not a request for permission to retry.
259
259
  recorded no-progress corrections still has recovery budget, even when an older
260
260
  `state.md` says `Next step: none`. Resume it; do not treat session age or the
261
261
  prior action's spent authorization as exhaustion.
262
+ - **Treat a newly supported writer route as progress once.** For exact Vet-ready
263
+ workflow artifacts, apply `workflow-artifacts.md` when prior attempts only asked
264
+ a read-only role or product wright for implementation and evidence records
265
+ **no controlling-root materialization attempt**. Preserve the old attempts, but
266
+ do not count them against the new root-materialization fingerprint. Record the
267
+ migration; after a root attempt exists, normal fingerprint accounting applies:
268
+ the first root failure is attempt one, not a new one-shot terminal, and the
269
+ shared cap remains three no-progress corrections.
262
270
  - **Classify exhaustion:** human-owned contract/risk/access gaps open their gate. Otherwise
263
271
  preserve reproduction/dead ends, set `Status: blocked` and `Next step: none — technical recovery exhausted for <causal fingerprint>; requires new evidence or changed failure conditions`.
264
272
  Do not emit `/rite-plan unblock`, another phase command, a question, or
@@ -7,6 +7,13 @@ privileged/external state so a rerun is not equivalent, and actions whose cleanu
7
7
  can destroy the failure state needed for diagnosis. Successful cleanup does not
8
8
  make a consumptive action repeatable.
9
9
 
10
+ Workflow-artifact materialization is reversible offline work when every admitted
11
+ target has a bound preimage or absence marker, rollback is local to the active
12
+ feature workspace, and no privileged/external real action executes. It is not a
13
+ consumptive action and must not receive a one-shot authorization budget. Failures
14
+ of its materializer, atomic replacement, rollback, or offline proof use the normal
15
+ causal-fingerprint recovery cap in `afk-hitl.md`.
16
+
10
17
  ## Pre-attempt gate
11
18
 
12
19
  Before Vet can emit READY, and again immediately before Prove executes the action,
@@ -20,6 +20,27 @@ technical-recovery exhaustion, while the vetted behavior and exact paths are
20
20
  complete. The root may not invent unresolved protocol choices; those return to
21
21
  Plan/Vet.
22
22
 
23
+ ## Cold-resume migration
24
+
25
+ A **stale writer-exhaustion cursor** must reopen when all of these are durable:
26
+
27
+ - Vet accepted the exact workflow-artifact paths and complete executable contract;
28
+ - the recorded blocker is only missing implementation bodies or a writable actor;
29
+ - prior no-progress attempts asked a read-only drafter/reviewer for bodies or sent
30
+ `.devrites/**` paths toward the product wright; and
31
+ - evidence records **no controlling-root materialization attempt** for that exact set.
32
+
33
+ This is a changed routing condition, not another correction attempt against the
34
+ old unsupported-writer fingerprint. Preserve that history, close or supersede its
35
+ terminal claim, record one new root-materialization fingerprint, and materialize
36
+ directly even when all product slices are built or the AFK slice budget is zero.
37
+ Do not consume product-slice budget, reopen an answered human gate, or require GO
38
+ for this offline work. After any controlling-root attempt is recorded, this
39
+ migration cannot apply again; route its observed atomic/proof failure under the
40
+ new fingerprint instead. Applying the migration once does not make the first root
41
+ attempt terminal: normal fingerprint accounting starts with that attempt and
42
+ allows up to three no-progress corrections under `afk-hitl.md`.
43
+
23
44
  ## Admission
24
45
 
25
46
  Before writing:
@@ -33,15 +54,39 @@ Before writing:
33
54
  or a request that a drafter supply code is a Plan gap, not implementation input.
34
55
  3. Record preimages or absence for every target plus protected product manifests
35
56
  and the current candidate digest. Resolve every parent no-follow before mutation.
57
+ 4. Before creating an active transaction, **preflight the materializer itself**.
58
+ Do this before any journal or admitted-target mutation. Compile/static-check
59
+ it, then run its
60
+ complete transaction machinery in a disposable same-layout fixture. Cover an
61
+ existing target, an absent target, full success, injected replacement failure,
62
+ rollback cleanup, retained-temporary cleanup, and idempotent rerun. Require the
63
+ fixture to prove that failures leave every simulated target at its bound
64
+ preimage and that no same-parent temporary escapes its admitted directory. Run
65
+ with the working directory outside the admitted parent, and execute negative
66
+ mutants where relative replacement omits either directory handle; both mutants
67
+ must fail before the active transaction is eligible.
36
68
 
37
69
  ## Materialize
38
70
 
39
71
  The root authors the smallest complete bytes for all admitted targets. Write each
40
72
  through a same-parent private temporary file, set the planned mode, flush it, and
41
73
  atomically replace the target; settle the whole set or roll back partial output.
74
+ Anchor every relative rename/replace operand to its source and destination directory handles.
75
+ For Python `os.replace`, pass both `src_dir_fd`
76
+ and `dst_dir_fd`; a basename plus only the destination handle is not admitted.
42
77
  Do not install dependencies, touch Git, use the network, mutate product paths, or
43
78
  execute the consumptive action.
44
79
 
80
+ Workflow-artifact materialization is not a consumptive action. Its active
81
+ transaction may begin only after the disposable preflight is green. If an active
82
+ attempt fails, preserve its journal, exact hashes, and decisive boundary before
83
+ cleanup. When all targets remain at their recorded preimages and only bound
84
+ same-parent temporaries remain, perform exact fail-closed cleanup, repair and
85
+ preflight the materializer offline, then retry under the same causal fingerprint.
86
+ The first controlling-root failure is attempt one of the shared cap, not terminal
87
+ exhaustion; stop only after three no-progress corrections or a genuine
88
+ human/safety/access gate.
89
+
45
90
  ## Verify and return
46
91
 
47
92
  Read back the exact path set, modes, and SHA-256 identities. Run only the vetted
@@ -18,6 +18,10 @@ default and **Full** for high-risk scope or explicit `--full`; profiles are defi
18
18
  When the cursor or approved plan contains a consumptive action, also read
19
19
  `.claude/skills/devrites-lib/reference/standards/one-shot-actions.md` before any
20
20
  stop/continue or execution decision.
21
+ When a blocked cursor names missing executable controller/harness/bundle bytes or
22
+ a missing writer under the active feature workspace, read
23
+ `.claude/skills/devrites-lib/reference/standards/workflow-artifacts.md` before honoring
24
+ the terminal cursor or its recovery count.
21
25
 
22
26
  ## Operating rules
23
27
  - **Use one initial human window.** Run spec and topology-first clarify; arm AFK
@@ -67,6 +71,11 @@ stop/continue or execution decision.
67
71
  terminal `next_action`, reconcile retained consumptive-action artifacts and
68
72
  per-fingerprint attempts from `drift.md` / `evidence.md`. A distinct retained
69
73
  fingerprint below its no-progress cap reopens caller-owned offline recovery;
74
+ a stale pre-ownership workflow-artifact writer stop reopens under
75
+ `workflow-artifacts.md` when no controlling-root materialization attempt exists.
76
+ That materialization runs directly as non-consumptive prerequisite recovery,
77
+ even with no pending product slice or AFK budget; it does not re-ask an answered
78
+ human gate.
70
79
  reconstruct any missing return cursor only from the current phase plus the
71
80
  exact approved action in `test-plan.md` / evidence, never from chat or guesswork.
72
81
  The idea + flags: `--ship` / `--yolo` (continue through ship preflight, then stop
@@ -64,6 +64,20 @@ Restore `return_phase` from the current phase and `return_next_action` only from
64
64
  the exact approved action recorded in `test-plan.md` / evidence; ambiguity returns
65
65
  to the applicable Vet contract and never licenses execution.
66
66
 
67
+ Also reconcile a **stale writer-exhaustion cursor** against
68
+ `workflow-artifacts.md`. When exact Vet-ready workflow-artifact paths and behavior
69
+ exist, the old attempts only targeted the read-only drafter/reviewer or product
70
+ wright, and there is **no controlling-root materialization attempt**, supported
71
+ root ownership is a changed routing condition. Preserve the old fingerprint,
72
+ record the new materialization fingerprint, and run that offline branch directly;
73
+ do not charge or require product-slice/AFK budget, re-ask a resolved question, or
74
+ request GO. Once a root materialization attempt exists, never apply this migration
75
+ again—route its observed failure normally. That one-time migration
76
+ does not make the first root attempt terminal: record it as attempt one under the new
77
+ materializer fingerprint and continue bounded offline correction while fewer than
78
+ three no-progress corrections exist. This reconciliation runs even when all
79
+ product slices are already built, before selecting the next forward phase.
80
+
67
81
  1. Save the originating phase/action in the native return cursor unless a valid
68
82
  one already exists.
69
83
  2. Invoke the required repair, Vet, remediation, and proof skills inline. After
@@ -46,6 +46,19 @@ no-progress corrections. A retained fingerprint with remaining offline budget is
46
46
  not terminal merely because `state.md` was written by the failed action or a prior
47
47
  session ended.
48
48
 
49
+ A pre-ownership workflow-artifact writer stop is not unchanged evidence when the
50
+ current contract supplies controlling-root materialization. Prior drafter/wright refusals do not count
51
+ as root materialization attempts. Reopen only when exact paths and executable
52
+ behavior passed Vet and there is **no controlling-root materialization attempt**;
53
+ record the routing migration so it cannot reset again. Missing product slices,
54
+ unresolved protocol choices, or a recorded root attempt remain under their normal
55
+ gate/fingerprint rules. The first controlling-root failure is not exhaustion: it
56
+ is the first no-progress result for the materializer fingerprint. If all targets
57
+ still equal their recorded preimages, no real action ran, and only admitted bound
58
+ temporaries remain, reopen an incorrectly persisted one-shot `1/1` terminal,
59
+ preserve its evidence as attempt one, clean/repair/preflight offline, and continue
60
+ within the shared three-attempt cap.
61
+
49
62
  Past evidence being irretrievable is not by itself terminal. When an in-scope
50
63
  trusted diagnostic seam can make the next retained fingerprint uniquely
51
64
  actionable, Autocomplete must run diagnostic-amplification Plan repair and narrow
@@ -23,7 +23,11 @@ See [`one-slice-cycle.md`](one-slice-cycle.md); candidate lifecycle is
23
23
  dispatch the exact `devrites-slice-wright` fresh. Root never writes those product
24
24
  paths, wright never widens, and a missing profile stops.
25
25
  For the workflow-artifact branch, the controlling root writes only the admitted
26
- `.devrites/work/<slug>/` paths, proves the complete atomic set, rechecks an
26
+ `.devrites/work/<slug>/` paths. Before an active journal or target write, it
27
+ compiles the materializer and runs the exact transaction implementation in a
28
+ disposable same-layout fixture covering success, replacement failure, rollback,
29
+ retained-temporary cleanup, and rerun. It then proves the complete atomic set,
30
+ rechecks an
27
31
  identical product candidate, records hashes/evidence, and runs narrow Vet. Do not
28
32
  dispatch any agent as a substitute writer and do not charge a product slice.
29
33
 
@@ -73,7 +73,11 @@ has no clear next move.
73
73
  workspace follow
74
74
  [`workflow-artifacts.md`](../devrites-lib/reference/standards/workflow-artifacts.md)
75
75
  and are materialized by the controlling root. Never ask a read-only planner or
76
- reviewer to return implementation bodies.
76
+ reviewer to return implementation bodies. Materializer failures are reversible
77
+ offline recovery, not consumptive one-shot execution: preserve the transaction
78
+ journal, preimage hashes, and bound temporaries, preflight the corrected
79
+ transaction in a disposable same-layout fixture, then retry only within the
80
+ existing materializer fingerprint budget.
77
81
  - **Classify before routing** with
78
82
  [cleanup-and-classify.md](reference/cleanup-and-classify.md).
79
83
  - **Durably record class and rationale** in `decisions.md` and the applicable
@@ -259,6 +259,14 @@ changes, not a request for permission to retry.
259
259
  recorded no-progress corrections still has recovery budget, even when an older
260
260
  `state.md` says `Next step: none`. Resume it; do not treat session age or the
261
261
  prior action's spent authorization as exhaustion.
262
+ - **Treat a newly supported writer route as progress once.** For exact Vet-ready
263
+ workflow artifacts, apply `workflow-artifacts.md` when prior attempts only asked
264
+ a read-only role or product wright for implementation and evidence records
265
+ **no controlling-root materialization attempt**. Preserve the old attempts, but
266
+ do not count them against the new root-materialization fingerprint. Record the
267
+ migration; after a root attempt exists, normal fingerprint accounting applies:
268
+ the first root failure is attempt one, not a new one-shot terminal, and the
269
+ shared cap remains three no-progress corrections.
262
270
  - **Classify exhaustion:** human-owned contract/risk/access gaps open their gate. Otherwise
263
271
  preserve reproduction/dead ends, set `Status: blocked` and `Next step: none — technical recovery exhausted for <causal fingerprint>; requires new evidence or changed failure conditions`.
264
272
  Do not emit `/rite-plan unblock`, another phase command, a question, or
@@ -7,6 +7,13 @@ privileged/external state so a rerun is not equivalent, and actions whose cleanu
7
7
  can destroy the failure state needed for diagnosis. Successful cleanup does not
8
8
  make a consumptive action repeatable.
9
9
 
10
+ Workflow-artifact materialization is reversible offline work when every admitted
11
+ target has a bound preimage or absence marker, rollback is local to the active
12
+ feature workspace, and no privileged/external real action executes. It is not a
13
+ consumptive action and must not receive a one-shot authorization budget. Failures
14
+ of its materializer, atomic replacement, rollback, or offline proof use the normal
15
+ causal-fingerprint recovery cap in `afk-hitl.md`.
16
+
10
17
  ## Pre-attempt gate
11
18
 
12
19
  Before Vet can emit READY, and again immediately before Prove executes the action,
@@ -20,6 +20,27 @@ technical-recovery exhaustion, while the vetted behavior and exact paths are
20
20
  complete. The root may not invent unresolved protocol choices; those return to
21
21
  Plan/Vet.
22
22
 
23
+ ## Cold-resume migration
24
+
25
+ A **stale writer-exhaustion cursor** must reopen when all of these are durable:
26
+
27
+ - Vet accepted the exact workflow-artifact paths and complete executable contract;
28
+ - the recorded blocker is only missing implementation bodies or a writable actor;
29
+ - prior no-progress attempts asked a read-only drafter/reviewer for bodies or sent
30
+ `.devrites/**` paths toward the product wright; and
31
+ - evidence records **no controlling-root materialization attempt** for that exact set.
32
+
33
+ This is a changed routing condition, not another correction attempt against the
34
+ old unsupported-writer fingerprint. Preserve that history, close or supersede its
35
+ terminal claim, record one new root-materialization fingerprint, and materialize
36
+ directly even when all product slices are built or the AFK slice budget is zero.
37
+ Do not consume product-slice budget, reopen an answered human gate, or require GO
38
+ for this offline work. After any controlling-root attempt is recorded, this
39
+ migration cannot apply again; route its observed atomic/proof failure under the
40
+ new fingerprint instead. Applying the migration once does not make the first root
41
+ attempt terminal: normal fingerprint accounting starts with that attempt and
42
+ allows up to three no-progress corrections under `afk-hitl.md`.
43
+
23
44
  ## Admission
24
45
 
25
46
  Before writing:
@@ -33,15 +54,39 @@ Before writing:
33
54
  or a request that a drafter supply code is a Plan gap, not implementation input.
34
55
  3. Record preimages or absence for every target plus protected product manifests
35
56
  and the current candidate digest. Resolve every parent no-follow before mutation.
57
+ 4. Before creating an active transaction, **preflight the materializer itself**.
58
+ Do this before any journal or admitted-target mutation. Compile/static-check
59
+ it, then run its
60
+ complete transaction machinery in a disposable same-layout fixture. Cover an
61
+ existing target, an absent target, full success, injected replacement failure,
62
+ rollback cleanup, retained-temporary cleanup, and idempotent rerun. Require the
63
+ fixture to prove that failures leave every simulated target at its bound
64
+ preimage and that no same-parent temporary escapes its admitted directory. Run
65
+ with the working directory outside the admitted parent, and execute negative
66
+ mutants where relative replacement omits either directory handle; both mutants
67
+ must fail before the active transaction is eligible.
36
68
 
37
69
  ## Materialize
38
70
 
39
71
  The root authors the smallest complete bytes for all admitted targets. Write each
40
72
  through a same-parent private temporary file, set the planned mode, flush it, and
41
73
  atomically replace the target; settle the whole set or roll back partial output.
74
+ Anchor every relative rename/replace operand to its source and destination directory handles.
75
+ For Python `os.replace`, pass both `src_dir_fd`
76
+ and `dst_dir_fd`; a basename plus only the destination handle is not admitted.
42
77
  Do not install dependencies, touch Git, use the network, mutate product paths, or
43
78
  execute the consumptive action.
44
79
 
80
+ Workflow-artifact materialization is not a consumptive action. Its active
81
+ transaction may begin only after the disposable preflight is green. If an active
82
+ attempt fails, preserve its journal, exact hashes, and decisive boundary before
83
+ cleanup. When all targets remain at their recorded preimages and only bound
84
+ same-parent temporaries remain, perform exact fail-closed cleanup, repair and
85
+ preflight the materializer offline, then retry under the same causal fingerprint.
86
+ The first controlling-root failure is attempt one of the shared cap, not terminal
87
+ exhaustion; stop only after three no-progress corrections or a genuine
88
+ human/safety/access gate.
89
+
45
90
  ## Verify and return
46
91
 
47
92
  Read back the exact path set, modes, and SHA-256 identities. Run only the vetted
@@ -18,6 +18,10 @@ default and **Full** for high-risk scope or explicit `--full`; profiles are defi
18
18
  When the cursor or approved plan contains a consumptive action, also read
19
19
  `.claude/skills/devrites-lib/reference/standards/one-shot-actions.md` before any
20
20
  stop/continue or execution decision.
21
+ When a blocked cursor names missing executable controller/harness/bundle bytes or
22
+ a missing writer under the active feature workspace, read
23
+ `.claude/skills/devrites-lib/reference/standards/workflow-artifacts.md` before honoring
24
+ the terminal cursor or its recovery count.
21
25
 
22
26
  ## Operating rules
23
27
  - **Use one initial human window.** Run spec and topology-first clarify; arm AFK
@@ -67,6 +71,11 @@ stop/continue or execution decision.
67
71
  terminal `next_action`, reconcile retained consumptive-action artifacts and
68
72
  per-fingerprint attempts from `drift.md` / `evidence.md`. A distinct retained
69
73
  fingerprint below its no-progress cap reopens caller-owned offline recovery;
74
+ a stale pre-ownership workflow-artifact writer stop reopens under
75
+ `workflow-artifacts.md` when no controlling-root materialization attempt exists.
76
+ That materialization runs directly as non-consumptive prerequisite recovery,
77
+ even with no pending product slice or AFK budget; it does not re-ask an answered
78
+ human gate.
70
79
  reconstruct any missing return cursor only from the current phase plus the
71
80
  exact approved action in `test-plan.md` / evidence, never from chat or guesswork.
72
81
  The idea + flags: `--ship` / `--yolo` (continue through ship preflight, then stop
@@ -64,6 +64,20 @@ Restore `return_phase` from the current phase and `return_next_action` only from
64
64
  the exact approved action recorded in `test-plan.md` / evidence; ambiguity returns
65
65
  to the applicable Vet contract and never licenses execution.
66
66
 
67
+ Also reconcile a **stale writer-exhaustion cursor** against
68
+ `workflow-artifacts.md`. When exact Vet-ready workflow-artifact paths and behavior
69
+ exist, the old attempts only targeted the read-only drafter/reviewer or product
70
+ wright, and there is **no controlling-root materialization attempt**, supported
71
+ root ownership is a changed routing condition. Preserve the old fingerprint,
72
+ record the new materialization fingerprint, and run that offline branch directly;
73
+ do not charge or require product-slice/AFK budget, re-ask a resolved question, or
74
+ request GO. Once a root materialization attempt exists, never apply this migration
75
+ again—route its observed failure normally. That one-time migration
76
+ does not make the first root attempt terminal: record it as attempt one under the new
77
+ materializer fingerprint and continue bounded offline correction while fewer than
78
+ three no-progress corrections exist. This reconciliation runs even when all
79
+ product slices are already built, before selecting the next forward phase.
80
+
67
81
  1. Save the originating phase/action in the native return cursor unless a valid
68
82
  one already exists.
69
83
  2. Invoke the required repair, Vet, remediation, and proof skills inline. After
@@ -46,6 +46,19 @@ no-progress corrections. A retained fingerprint with remaining offline budget is
46
46
  not terminal merely because `state.md` was written by the failed action or a prior
47
47
  session ended.
48
48
 
49
+ A pre-ownership workflow-artifact writer stop is not unchanged evidence when the
50
+ current contract supplies controlling-root materialization. Prior drafter/wright refusals do not count
51
+ as root materialization attempts. Reopen only when exact paths and executable
52
+ behavior passed Vet and there is **no controlling-root materialization attempt**;
53
+ record the routing migration so it cannot reset again. Missing product slices,
54
+ unresolved protocol choices, or a recorded root attempt remain under their normal
55
+ gate/fingerprint rules. The first controlling-root failure is not exhaustion: it
56
+ is the first no-progress result for the materializer fingerprint. If all targets
57
+ still equal their recorded preimages, no real action ran, and only admitted bound
58
+ temporaries remain, reopen an incorrectly persisted one-shot `1/1` terminal,
59
+ preserve its evidence as attempt one, clean/repair/preflight offline, and continue
60
+ within the shared three-attempt cap.
61
+
49
62
  Past evidence being irretrievable is not by itself terminal. When an in-scope
50
63
  trusted diagnostic seam can make the next retained fingerprint uniquely
51
64
  actionable, Autocomplete must run diagnostic-amplification Plan repair and narrow
@@ -23,7 +23,11 @@ See [`one-slice-cycle.md`](one-slice-cycle.md); candidate lifecycle is
23
23
  dispatch the exact `devrites-slice-wright` fresh. Root never writes those product
24
24
  paths, wright never widens, and a missing profile stops.
25
25
  For the workflow-artifact branch, the controlling root writes only the admitted
26
- `.devrites/work/<slug>/` paths, proves the complete atomic set, rechecks an
26
+ `.devrites/work/<slug>/` paths. Before an active journal or target write, it
27
+ compiles the materializer and runs the exact transaction implementation in a
28
+ disposable same-layout fixture covering success, replacement failure, rollback,
29
+ retained-temporary cleanup, and rerun. It then proves the complete atomic set,
30
+ rechecks an
27
31
  identical product candidate, records hashes/evidence, and runs narrow Vet. Do not
28
32
  dispatch any agent as a substitute writer and do not charge a product slice.
29
33
 
@@ -73,7 +73,11 @@ has no clear next move.
73
73
  workspace follow
74
74
  [`workflow-artifacts.md`](../devrites-lib/reference/standards/workflow-artifacts.md)
75
75
  and are materialized by the controlling root. Never ask a read-only planner or
76
- reviewer to return implementation bodies.
76
+ reviewer to return implementation bodies. Materializer failures are reversible
77
+ offline recovery, not consumptive one-shot execution: preserve the transaction
78
+ journal, preimage hashes, and bound temporaries, preflight the corrected
79
+ transaction in a disposable same-layout fixture, then retry only within the
80
+ existing materializer fingerprint budget.
77
81
  - **Classify before routing** with
78
82
  [cleanup-and-classify.md](reference/cleanup-and-classify.md).
79
83
  - **Durably record class and rationale** in `decisions.md` and the applicable
@@ -259,6 +259,14 @@ changes, not a request for permission to retry.
259
259
  recorded no-progress corrections still has recovery budget, even when an older
260
260
  `state.md` says `Next step: none`. Resume it; do not treat session age or the
261
261
  prior action's spent authorization as exhaustion.
262
+ - **Treat a newly supported writer route as progress once.** For exact Vet-ready
263
+ workflow artifacts, apply `workflow-artifacts.md` when prior attempts only asked
264
+ a read-only role or product wright for implementation and evidence records
265
+ **no controlling-root materialization attempt**. Preserve the old attempts, but
266
+ do not count them against the new root-materialization fingerprint. Record the
267
+ migration; after a root attempt exists, normal fingerprint accounting applies:
268
+ the first root failure is attempt one, not a new one-shot terminal, and the
269
+ shared cap remains three no-progress corrections.
262
270
  - **Classify exhaustion:** human-owned contract/risk/access gaps open their gate. Otherwise
263
271
  preserve reproduction/dead ends, set `Status: blocked` and `Next step: none — technical recovery exhausted for <causal fingerprint>; requires new evidence or changed failure conditions`.
264
272
  Do not emit `$rite-plan unblock`, another phase command, a question, or
@@ -7,6 +7,13 @@ privileged/external state so a rerun is not equivalent, and actions whose cleanu
7
7
  can destroy the failure state needed for diagnosis. Successful cleanup does not
8
8
  make a consumptive action repeatable.
9
9
 
10
+ Workflow-artifact materialization is reversible offline work when every admitted
11
+ target has a bound preimage or absence marker, rollback is local to the active
12
+ feature workspace, and no privileged/external real action executes. It is not a
13
+ consumptive action and must not receive a one-shot authorization budget. Failures
14
+ of its materializer, atomic replacement, rollback, or offline proof use the normal
15
+ causal-fingerprint recovery cap in `afk-hitl.md`.
16
+
10
17
  ## Pre-attempt gate
11
18
 
12
19
  Before Vet can emit READY, and again immediately before Prove executes the action,
@@ -20,6 +20,27 @@ technical-recovery exhaustion, while the vetted behavior and exact paths are
20
20
  complete. The root may not invent unresolved protocol choices; those return to
21
21
  Plan/Vet.
22
22
 
23
+ ## Cold-resume migration
24
+
25
+ A **stale writer-exhaustion cursor** must reopen when all of these are durable:
26
+
27
+ - Vet accepted the exact workflow-artifact paths and complete executable contract;
28
+ - the recorded blocker is only missing implementation bodies or a writable actor;
29
+ - prior no-progress attempts asked a read-only drafter/reviewer for bodies or sent
30
+ `.devrites/**` paths toward the product wright; and
31
+ - evidence records **no controlling-root materialization attempt** for that exact set.
32
+
33
+ This is a changed routing condition, not another correction attempt against the
34
+ old unsupported-writer fingerprint. Preserve that history, close or supersede its
35
+ terminal claim, record one new root-materialization fingerprint, and materialize
36
+ directly even when all product slices are built or the AFK slice budget is zero.
37
+ Do not consume product-slice budget, reopen an answered human gate, or require GO
38
+ for this offline work. After any controlling-root attempt is recorded, this
39
+ migration cannot apply again; route its observed atomic/proof failure under the
40
+ new fingerprint instead. Applying the migration once does not make the first root
41
+ attempt terminal: normal fingerprint accounting starts with that attempt and
42
+ allows up to three no-progress corrections under `afk-hitl.md`.
43
+
23
44
  ## Admission
24
45
 
25
46
  Before writing:
@@ -33,15 +54,39 @@ Before writing:
33
54
  or a request that a drafter supply code is a Plan gap, not implementation input.
34
55
  3. Record preimages or absence for every target plus protected product manifests
35
56
  and the current candidate digest. Resolve every parent no-follow before mutation.
57
+ 4. Before creating an active transaction, **preflight the materializer itself**.
58
+ Do this before any journal or admitted-target mutation. Compile/static-check
59
+ it, then run its
60
+ complete transaction machinery in a disposable same-layout fixture. Cover an
61
+ existing target, an absent target, full success, injected replacement failure,
62
+ rollback cleanup, retained-temporary cleanup, and idempotent rerun. Require the
63
+ fixture to prove that failures leave every simulated target at its bound
64
+ preimage and that no same-parent temporary escapes its admitted directory. Run
65
+ with the working directory outside the admitted parent, and execute negative
66
+ mutants where relative replacement omits either directory handle; both mutants
67
+ must fail before the active transaction is eligible.
36
68
 
37
69
  ## Materialize
38
70
 
39
71
  The root authors the smallest complete bytes for all admitted targets. Write each
40
72
  through a same-parent private temporary file, set the planned mode, flush it, and
41
73
  atomically replace the target; settle the whole set or roll back partial output.
74
+ Anchor every relative rename/replace operand to its source and destination directory handles.
75
+ For Python `os.replace`, pass both `src_dir_fd`
76
+ and `dst_dir_fd`; a basename plus only the destination handle is not admitted.
42
77
  Do not install dependencies, touch Git, use the network, mutate product paths, or
43
78
  execute the consumptive action.
44
79
 
80
+ Workflow-artifact materialization is not a consumptive action. Its active
81
+ transaction may begin only after the disposable preflight is green. If an active
82
+ attempt fails, preserve its journal, exact hashes, and decisive boundary before
83
+ cleanup. When all targets remain at their recorded preimages and only bound
84
+ same-parent temporaries remain, perform exact fail-closed cleanup, repair and
85
+ preflight the materializer offline, then retry under the same causal fingerprint.
86
+ The first controlling-root failure is attempt one of the shared cap, not terminal
87
+ exhaustion; stop only after three no-progress corrections or a genuine
88
+ human/safety/access gate.
89
+
45
90
  ## Verify and return
46
91
 
47
92
  Read back the exact path set, modes, and SHA-256 identities. Run only the vetted
@@ -18,6 +18,10 @@ default and **Full** for high-risk scope or explicit `--full`; profiles are defi
18
18
  When the cursor or approved plan contains a consumptive action, also read
19
19
  `.agents/skills/devrites-lib/reference/standards/one-shot-actions.md` before any
20
20
  stop/continue or execution decision.
21
+ When a blocked cursor names missing executable controller/harness/bundle bytes or
22
+ a missing writer under the active feature workspace, read
23
+ `.agents/skills/devrites-lib/reference/standards/workflow-artifacts.md` before honoring
24
+ the terminal cursor or its recovery count.
21
25
 
22
26
  ## Operating rules
23
27
  - **Use one initial human window.** Run spec and topology-first clarify; arm AFK
@@ -67,6 +71,11 @@ stop/continue or execution decision.
67
71
  terminal `next_action`, reconcile retained consumptive-action artifacts and
68
72
  per-fingerprint attempts from `drift.md` / `evidence.md`. A distinct retained
69
73
  fingerprint below its no-progress cap reopens caller-owned offline recovery;
74
+ a stale pre-ownership workflow-artifact writer stop reopens under
75
+ `workflow-artifacts.md` when no controlling-root materialization attempt exists.
76
+ That materialization runs directly as non-consumptive prerequisite recovery,
77
+ even with no pending product slice or AFK budget; it does not re-ask an answered
78
+ human gate.
70
79
  reconstruct any missing return cursor only from the current phase plus the
71
80
  exact approved action in `test-plan.md` / evidence, never from chat or guesswork.
72
81
  The idea + flags: `--ship` / `--yolo` (continue through ship preflight, then stop
@@ -64,6 +64,20 @@ Restore `return_phase` from the current phase and `return_next_action` only from
64
64
  the exact approved action recorded in `test-plan.md` / evidence; ambiguity returns
65
65
  to the applicable Vet contract and never licenses execution.
66
66
 
67
+ Also reconcile a **stale writer-exhaustion cursor** against
68
+ `workflow-artifacts.md`. When exact Vet-ready workflow-artifact paths and behavior
69
+ exist, the old attempts only targeted the read-only drafter/reviewer or product
70
+ wright, and there is **no controlling-root materialization attempt**, supported
71
+ root ownership is a changed routing condition. Preserve the old fingerprint,
72
+ record the new materialization fingerprint, and run that offline branch directly;
73
+ do not charge or require product-slice/AFK budget, re-ask a resolved question, or
74
+ request GO. Once a root materialization attempt exists, never apply this migration
75
+ again—route its observed failure normally. That one-time migration
76
+ does not make the first root attempt terminal: record it as attempt one under the new
77
+ materializer fingerprint and continue bounded offline correction while fewer than
78
+ three no-progress corrections exist. This reconciliation runs even when all
79
+ product slices are already built, before selecting the next forward phase.
80
+
67
81
  1. Save the originating phase/action in the native return cursor unless a valid
68
82
  one already exists.
69
83
  2. Invoke the required repair, Vet, remediation, and proof skills inline. After
@@ -46,6 +46,19 @@ no-progress corrections. A retained fingerprint with remaining offline budget is
46
46
  not terminal merely because `state.md` was written by the failed action or a prior
47
47
  session ended.
48
48
 
49
+ A pre-ownership workflow-artifact writer stop is not unchanged evidence when the
50
+ current contract supplies controlling-root materialization. Prior drafter/wright refusals do not count
51
+ as root materialization attempts. Reopen only when exact paths and executable
52
+ behavior passed Vet and there is **no controlling-root materialization attempt**;
53
+ record the routing migration so it cannot reset again. Missing product slices,
54
+ unresolved protocol choices, or a recorded root attempt remain under their normal
55
+ gate/fingerprint rules. The first controlling-root failure is not exhaustion: it
56
+ is the first no-progress result for the materializer fingerprint. If all targets
57
+ still equal their recorded preimages, no real action ran, and only admitted bound
58
+ temporaries remain, reopen an incorrectly persisted one-shot `1/1` terminal,
59
+ preserve its evidence as attempt one, clean/repair/preflight offline, and continue
60
+ within the shared three-attempt cap.
61
+
49
62
  Past evidence being irretrievable is not by itself terminal. When an in-scope
50
63
  trusted diagnostic seam can make the next retained fingerprint uniquely
51
64
  actionable, Autocomplete must run diagnostic-amplification Plan repair and narrow
@@ -23,7 +23,11 @@ See [`one-slice-cycle.md`](one-slice-cycle.md); candidate lifecycle is
23
23
  dispatch the exact `devrites-slice-wright` fresh. Root never writes those product
24
24
  paths, wright never widens, and a missing profile stops.
25
25
  For the workflow-artifact branch, the controlling root writes only the admitted
26
- `.devrites/work/<slug>/` paths, proves the complete atomic set, rechecks an
26
+ `.devrites/work/<slug>/` paths. Before an active journal or target write, it
27
+ compiles the materializer and runs the exact transaction implementation in a
28
+ disposable same-layout fixture covering success, replacement failure, rollback,
29
+ retained-temporary cleanup, and rerun. It then proves the complete atomic set,
30
+ rechecks an
27
31
  identical product candidate, records hashes/evidence, and runs narrow Vet. Do not
28
32
  dispatch any agent as a substitute writer and do not charge a product slice.
29
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devrites",
3
- "version": "4.0.9",
3
+ "version": "4.0.11",
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",