devrites 6.1.1 → 6.1.3

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 (221) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/docs/cli.md +4 -1
  4. package/docs/command-map.md +1 -1
  5. package/docs/engine/commands.md +4 -4
  6. package/docs/orchestration.md +4 -3
  7. package/docs/usage.md +1 -1
  8. package/engine/commands.go +1 -1
  9. package/engine/help.go +5 -1
  10. package/engine/internal/acceptance/cli.go +14 -5
  11. package/engine/internal/acceptance/run.go +20 -5
  12. package/engine/internal/lib/apply_bundle.go +474 -0
  13. package/engine/internal/lib/claims.go +12 -2
  14. package/engine/internal/lib/claims_holder.go +124 -0
  15. package/engine/internal/lib/cli_observe.go +14 -0
  16. package/engine/internal/lib/diffscope.go +2 -1
  17. package/engine/internal/lib/taskgraph.go +124 -0
  18. package/engine/internal/parallel/cli.go +111 -9
  19. package/engine/internal/parallel/lease.go +58 -4
  20. package/engine/internal/parallel/ops.go +244 -75
  21. package/engine/internal/parallel/select.go +31 -6
  22. package/engine/main.go +4 -0
  23. package/pack/.claude/agents/devrites-plan-drafter.md +13 -3
  24. package/pack/.claude/agents/devrites-slice-wright.md +5 -1
  25. package/pack/.claude/skills/devrites-lib/reference/parallel-dispatch.md +14 -5
  26. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +24 -9
  27. package/pack/.claude/skills/devrites-lib/reference/standards/agents.md +6 -2
  28. package/pack/.claude/skills/devrites-lib/reference/standards/core.md +3 -0
  29. package/pack/.claude/skills/devrites-lib/reference/standards/gates.md +3 -0
  30. package/pack/.claude/skills/devrites-lib/reference/standards/testing.md +7 -0
  31. package/pack/.claude/skills/devrites-lib/reference/standards/workflow-artifacts.md +10 -6
  32. package/pack/.claude/skills/devrites-lib/reference/workspace-artifact-schema.md +1 -1
  33. package/pack/.claude/skills/rite-autocomplete/SKILL.md +2 -2
  34. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +1 -1
  35. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +6 -2
  36. package/pack/.claude/skills/rite-build/SKILL.md +7 -7
  37. package/pack/.claude/skills/rite-build/reference/afk-discipline.md +2 -2
  38. package/pack/.claude/skills/rite-build/reference/checkpoint.md +1 -1
  39. package/pack/.claude/skills/rite-build/reference/one-slice-cycle.md +3 -2
  40. package/pack/.claude/skills/rite-build/reference/parallel-batch.md +28 -21
  41. package/pack/.claude/skills/rite-build/reference/phase-contract.md +10 -1
  42. package/pack/.claude/skills/rite-build/reference/spec-drift-guard.md +3 -2
  43. package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +9 -2
  44. package/pack/.claude/skills/rite-define/SKILL.md +11 -2
  45. package/pack/.claude/skills/rite-handoff/SKILL.md +1 -1
  46. package/pack/.claude/skills/rite-plan/SKILL.md +20 -9
  47. package/pack/.claude/skills/rite-plan/reference/slicing.md +5 -0
  48. package/pack/.claude/skills/rite-polish/SKILL.md +6 -4
  49. package/pack/.claude/skills/rite-prove/SKILL.md +3 -2
  50. package/pack/.claude/skills/rite-review/SKILL.md +6 -1
  51. package/pack/.claude/skills/rite-seal/SKILL.md +2 -2
  52. package/pack/.claude/skills/rite-seal/reference/phase-contract.md +7 -1
  53. package/pack/.claude/skills/rite-vet/SKILL.md +9 -5
  54. package/pack/.claude/skills/rite-vet/reference/artifacts.md +8 -0
  55. package/pack/.claude/skills/rite-vet/reference/review-axes.md +1 -1
  56. package/pack/generated/claude/agents/devrites-plan-drafter.md +13 -3
  57. package/pack/generated/claude/agents/devrites-slice-wright.md +5 -1
  58. package/pack/generated/claude/skills/devrites-lib/reference/parallel-dispatch.md +14 -5
  59. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +24 -9
  60. package/pack/generated/claude/skills/devrites-lib/reference/standards/agents.md +6 -2
  61. package/pack/generated/claude/skills/devrites-lib/reference/standards/core.md +3 -0
  62. package/pack/generated/claude/skills/devrites-lib/reference/standards/gates.md +3 -0
  63. package/pack/generated/claude/skills/devrites-lib/reference/standards/testing.md +7 -0
  64. package/pack/generated/claude/skills/devrites-lib/reference/standards/workflow-artifacts.md +10 -6
  65. package/pack/generated/claude/skills/devrites-lib/reference/workspace-artifact-schema.md +1 -1
  66. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +2 -2
  67. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +1 -1
  68. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +6 -2
  69. package/pack/generated/claude/skills/rite-build/SKILL.md +7 -7
  70. package/pack/generated/claude/skills/rite-build/reference/afk-discipline.md +2 -2
  71. package/pack/generated/claude/skills/rite-build/reference/checkpoint.md +1 -1
  72. package/pack/generated/claude/skills/rite-build/reference/one-slice-cycle.md +3 -2
  73. package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +28 -21
  74. package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +10 -1
  75. package/pack/generated/claude/skills/rite-build/reference/spec-drift-guard.md +3 -2
  76. package/pack/generated/claude/skills/rite-build/reference/wright-dispatch.md +9 -2
  77. package/pack/generated/claude/skills/rite-define/SKILL.md +11 -2
  78. package/pack/generated/claude/skills/rite-handoff/SKILL.md +1 -1
  79. package/pack/generated/claude/skills/rite-plan/SKILL.md +20 -9
  80. package/pack/generated/claude/skills/rite-plan/reference/slicing.md +5 -0
  81. package/pack/generated/claude/skills/rite-polish/SKILL.md +6 -4
  82. package/pack/generated/claude/skills/rite-prove/SKILL.md +3 -2
  83. package/pack/generated/claude/skills/rite-review/SKILL.md +6 -1
  84. package/pack/generated/claude/skills/rite-seal/SKILL.md +2 -2
  85. package/pack/generated/claude/skills/rite-seal/reference/phase-contract.md +7 -1
  86. package/pack/generated/claude/skills/rite-vet/SKILL.md +9 -5
  87. package/pack/generated/claude/skills/rite-vet/reference/artifacts.md +8 -0
  88. package/pack/generated/claude/skills/rite-vet/reference/review-axes.md +1 -1
  89. package/pack/generated/codex/agents/devrites-plan-drafter.toml +13 -3
  90. package/pack/generated/codex/agents/devrites-slice-wright.toml +5 -1
  91. package/pack/generated/codex/skills/devrites-lib/reference/parallel-dispatch.md +14 -5
  92. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +24 -9
  93. package/pack/generated/codex/skills/devrites-lib/reference/standards/agents.md +6 -2
  94. package/pack/generated/codex/skills/devrites-lib/reference/standards/core.md +3 -0
  95. package/pack/generated/codex/skills/devrites-lib/reference/standards/gates.md +3 -0
  96. package/pack/generated/codex/skills/devrites-lib/reference/standards/testing.md +7 -0
  97. package/pack/generated/codex/skills/devrites-lib/reference/standards/workflow-artifacts.md +10 -6
  98. package/pack/generated/codex/skills/devrites-lib/reference/workspace-artifact-schema.md +1 -1
  99. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +2 -2
  100. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +1 -1
  101. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +6 -2
  102. package/pack/generated/codex/skills/rite-build/SKILL.md +7 -7
  103. package/pack/generated/codex/skills/rite-build/reference/afk-discipline.md +2 -2
  104. package/pack/generated/codex/skills/rite-build/reference/checkpoint.md +1 -1
  105. package/pack/generated/codex/skills/rite-build/reference/one-slice-cycle.md +3 -2
  106. package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +28 -21
  107. package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +10 -1
  108. package/pack/generated/codex/skills/rite-build/reference/spec-drift-guard.md +3 -2
  109. package/pack/generated/codex/skills/rite-build/reference/wright-dispatch.md +9 -2
  110. package/pack/generated/codex/skills/rite-define/SKILL.md +11 -2
  111. package/pack/generated/codex/skills/rite-handoff/SKILL.md +1 -1
  112. package/pack/generated/codex/skills/rite-plan/SKILL.md +20 -9
  113. package/pack/generated/codex/skills/rite-plan/reference/slicing.md +5 -0
  114. package/pack/generated/codex/skills/rite-polish/SKILL.md +6 -4
  115. package/pack/generated/codex/skills/rite-prove/SKILL.md +3 -2
  116. package/pack/generated/codex/skills/rite-review/SKILL.md +6 -1
  117. package/pack/generated/codex/skills/rite-seal/SKILL.md +2 -2
  118. package/pack/generated/codex/skills/rite-seal/reference/phase-contract.md +7 -1
  119. package/pack/generated/codex/skills/rite-vet/SKILL.md +9 -5
  120. package/pack/generated/codex/skills/rite-vet/reference/artifacts.md +8 -0
  121. package/pack/generated/codex/skills/rite-vet/reference/review-axes.md +1 -1
  122. package/pack/generated/devin/agents/devrites-plan-drafter.md +13 -3
  123. package/pack/generated/devin/agents/devrites-slice-wright.md +5 -1
  124. package/pack/generated/devin/skills/devrites-lib/reference/parallel-dispatch.md +14 -5
  125. package/pack/generated/devin/skills/devrites-lib/reference/standards/afk-hitl.md +24 -9
  126. package/pack/generated/devin/skills/devrites-lib/reference/standards/agents.md +6 -2
  127. package/pack/generated/devin/skills/devrites-lib/reference/standards/core.md +3 -0
  128. package/pack/generated/devin/skills/devrites-lib/reference/standards/gates.md +3 -0
  129. package/pack/generated/devin/skills/devrites-lib/reference/standards/testing.md +7 -0
  130. package/pack/generated/devin/skills/devrites-lib/reference/standards/workflow-artifacts.md +10 -6
  131. package/pack/generated/devin/skills/devrites-lib/reference/workspace-artifact-schema.md +1 -1
  132. package/pack/generated/devin/skills/rite-autocomplete/SKILL.md +2 -2
  133. package/pack/generated/devin/skills/rite-autocomplete/reference/loop.md +1 -1
  134. package/pack/generated/devin/skills/rite-autocomplete/reference/stop-conditions.md +6 -2
  135. package/pack/generated/devin/skills/rite-build/SKILL.md +7 -7
  136. package/pack/generated/devin/skills/rite-build/reference/afk-discipline.md +2 -2
  137. package/pack/generated/devin/skills/rite-build/reference/checkpoint.md +1 -1
  138. package/pack/generated/devin/skills/rite-build/reference/one-slice-cycle.md +3 -2
  139. package/pack/generated/devin/skills/rite-build/reference/parallel-batch.md +28 -21
  140. package/pack/generated/devin/skills/rite-build/reference/phase-contract.md +10 -1
  141. package/pack/generated/devin/skills/rite-build/reference/spec-drift-guard.md +3 -2
  142. package/pack/generated/devin/skills/rite-build/reference/wright-dispatch.md +9 -2
  143. package/pack/generated/devin/skills/rite-define/SKILL.md +11 -2
  144. package/pack/generated/devin/skills/rite-handoff/SKILL.md +1 -1
  145. package/pack/generated/devin/skills/rite-plan/SKILL.md +20 -9
  146. package/pack/generated/devin/skills/rite-plan/reference/slicing.md +5 -0
  147. package/pack/generated/devin/skills/rite-polish/SKILL.md +6 -4
  148. package/pack/generated/devin/skills/rite-prove/SKILL.md +3 -2
  149. package/pack/generated/devin/skills/rite-review/SKILL.md +6 -1
  150. package/pack/generated/devin/skills/rite-seal/SKILL.md +2 -2
  151. package/pack/generated/devin/skills/rite-seal/reference/phase-contract.md +7 -1
  152. package/pack/generated/devin/skills/rite-vet/SKILL.md +9 -5
  153. package/pack/generated/devin/skills/rite-vet/reference/artifacts.md +8 -0
  154. package/pack/generated/devin/skills/rite-vet/reference/review-axes.md +1 -1
  155. package/pack/generated/omp/agents/devrites-plan-drafter.md +13 -3
  156. package/pack/generated/omp/agents/devrites-slice-wright.md +5 -1
  157. package/pack/generated/omp/skills/devrites-lib/reference/parallel-dispatch.md +14 -5
  158. package/pack/generated/omp/skills/devrites-lib/reference/standards/afk-hitl.md +24 -9
  159. package/pack/generated/omp/skills/devrites-lib/reference/standards/agents.md +6 -2
  160. package/pack/generated/omp/skills/devrites-lib/reference/standards/core.md +3 -0
  161. package/pack/generated/omp/skills/devrites-lib/reference/standards/gates.md +3 -0
  162. package/pack/generated/omp/skills/devrites-lib/reference/standards/testing.md +7 -0
  163. package/pack/generated/omp/skills/devrites-lib/reference/standards/workflow-artifacts.md +10 -6
  164. package/pack/generated/omp/skills/devrites-lib/reference/workspace-artifact-schema.md +1 -1
  165. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +2 -2
  166. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +1 -1
  167. package/pack/generated/omp/skills/rite-autocomplete/reference/stop-conditions.md +6 -2
  168. package/pack/generated/omp/skills/rite-build/SKILL.md +7 -7
  169. package/pack/generated/omp/skills/rite-build/reference/afk-discipline.md +2 -2
  170. package/pack/generated/omp/skills/rite-build/reference/checkpoint.md +1 -1
  171. package/pack/generated/omp/skills/rite-build/reference/one-slice-cycle.md +3 -2
  172. package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +28 -21
  173. package/pack/generated/omp/skills/rite-build/reference/phase-contract.md +10 -1
  174. package/pack/generated/omp/skills/rite-build/reference/spec-drift-guard.md +3 -2
  175. package/pack/generated/omp/skills/rite-build/reference/wright-dispatch.md +9 -2
  176. package/pack/generated/omp/skills/rite-define/SKILL.md +11 -2
  177. package/pack/generated/omp/skills/rite-handoff/SKILL.md +1 -1
  178. package/pack/generated/omp/skills/rite-plan/SKILL.md +20 -9
  179. package/pack/generated/omp/skills/rite-plan/reference/slicing.md +5 -0
  180. package/pack/generated/omp/skills/rite-polish/SKILL.md +6 -4
  181. package/pack/generated/omp/skills/rite-prove/SKILL.md +3 -2
  182. package/pack/generated/omp/skills/rite-review/SKILL.md +6 -1
  183. package/pack/generated/omp/skills/rite-seal/SKILL.md +2 -2
  184. package/pack/generated/omp/skills/rite-seal/reference/phase-contract.md +7 -1
  185. package/pack/generated/omp/skills/rite-vet/SKILL.md +9 -5
  186. package/pack/generated/omp/skills/rite-vet/reference/artifacts.md +8 -0
  187. package/pack/generated/omp/skills/rite-vet/reference/review-axes.md +1 -1
  188. package/pack/generated/pi/agents/devrites-plan-drafter.md +13 -3
  189. package/pack/generated/pi/agents/devrites-slice-wright.md +5 -1
  190. package/pack/generated/pi/skills/devrites-lib/reference/parallel-dispatch.md +14 -5
  191. package/pack/generated/pi/skills/devrites-lib/reference/standards/afk-hitl.md +24 -9
  192. package/pack/generated/pi/skills/devrites-lib/reference/standards/agents.md +6 -2
  193. package/pack/generated/pi/skills/devrites-lib/reference/standards/core.md +3 -0
  194. package/pack/generated/pi/skills/devrites-lib/reference/standards/gates.md +3 -0
  195. package/pack/generated/pi/skills/devrites-lib/reference/standards/testing.md +7 -0
  196. package/pack/generated/pi/skills/devrites-lib/reference/standards/workflow-artifacts.md +10 -6
  197. package/pack/generated/pi/skills/devrites-lib/reference/workspace-artifact-schema.md +1 -1
  198. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +2 -2
  199. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +1 -1
  200. package/pack/generated/pi/skills/rite-autocomplete/reference/stop-conditions.md +6 -2
  201. package/pack/generated/pi/skills/rite-build/SKILL.md +7 -7
  202. package/pack/generated/pi/skills/rite-build/reference/afk-discipline.md +2 -2
  203. package/pack/generated/pi/skills/rite-build/reference/checkpoint.md +1 -1
  204. package/pack/generated/pi/skills/rite-build/reference/one-slice-cycle.md +3 -2
  205. package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +28 -21
  206. package/pack/generated/pi/skills/rite-build/reference/phase-contract.md +10 -1
  207. package/pack/generated/pi/skills/rite-build/reference/spec-drift-guard.md +3 -2
  208. package/pack/generated/pi/skills/rite-build/reference/wright-dispatch.md +9 -2
  209. package/pack/generated/pi/skills/rite-define/SKILL.md +11 -2
  210. package/pack/generated/pi/skills/rite-handoff/SKILL.md +1 -1
  211. package/pack/generated/pi/skills/rite-plan/SKILL.md +20 -9
  212. package/pack/generated/pi/skills/rite-plan/reference/slicing.md +5 -0
  213. package/pack/generated/pi/skills/rite-polish/SKILL.md +6 -4
  214. package/pack/generated/pi/skills/rite-prove/SKILL.md +3 -2
  215. package/pack/generated/pi/skills/rite-review/SKILL.md +6 -1
  216. package/pack/generated/pi/skills/rite-seal/SKILL.md +2 -2
  217. package/pack/generated/pi/skills/rite-seal/reference/phase-contract.md +7 -1
  218. package/pack/generated/pi/skills/rite-vet/SKILL.md +9 -5
  219. package/pack/generated/pi/skills/rite-vet/reference/artifacts.md +8 -0
  220. package/pack/generated/pi/skills/rite-vet/reference/review-axes.md +1 -1
  221. package/package.json +1 -1
@@ -36,14 +36,14 @@ Select **greedily in plan order**: pass every currently dependency-ready pending
36
36
  `N_eff = 1` → one serial round; nothing pending → Prove. A cap that cannot be filled
37
37
  is normal: take fewer. Serial is this round's size, not the rest of the run.
38
38
 
39
- **Re-batch automatically after every completed round** (parallel integrate+cleanup or
40
- a serial slice). Re-read `state.md`, pending slices, and the tree, then run
41
- `parallel select` again: finished work leaves the pending set, and satisfied
42
- dependencies unlock new slices. Under `.devrites/AFK` and `/rite-autocomplete` the
43
- repeat is the same run — HITL stops after each batch. `--parallel 5` with one eligible
44
- slice runs that one; when two to five then become eligible, the next round takes that
45
- many. **Failing case:** the run stays one-by-one after a serial round even though more
46
- slices are now eligible under the same cap.
39
+ **Refill per landing; never wait for the batch.** Each sibling lands alone when
40
+ green ([Lifecycle](#lifecycle) step 6). Then re-read `state.md`, pending slices, and
41
+ the tree and run `parallel select --cap N --slug <slug>`: unlanded siblings hold
42
+ their slots and paths, landed ones count as built, and only new picks print;
43
+ `parallel add` starts each from the control tip and its wright dispatches at once.
44
+ No lease → plain `select` + `create`. AFK/autocomplete is one run; HITL stops after
45
+ each landing. **Failing case:** three siblings are green, one is repairing, and no
46
+ new slice starts.
47
47
 
48
48
  ## Path-disjoint
49
49
 
@@ -109,22 +109,27 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
109
109
  headroom bounds the batch size — one batch never assumes unbounded reviewers.
110
110
  5. Non-green siblings → **repair round** (below) in the same worktrees; lease
111
111
  stays `running` — no abort while repair budget remains. A green sibling →
112
- `parallel record-green`. No partial integrate. All green → integrate.
112
+ `parallel record-green`, then step 6 for it alone.
113
113
  A recoverable RED blocks integration but does not cancel independent safe running siblings.
114
114
  Expected test-first RED is not a terminal gate failure. Cancel only for a shared
115
115
  invalid foundation, safety/access failure, resource boundary, or explicit stop;
116
116
  preserve completed and in-progress recoverable work and classify each result.
117
- 6. `parallel integrate --apply-to-control` **only after steps 4–5 are green**:
118
- each `transfer_commit` descends from `B` and diffs path-exact vs
119
- `B`; apply each in plan order as its own local `WIP(<slug>):` commit
120
- (imperative summary, never a slice id). Staging branch, then FF. Conflict →
121
- reset to `B`, `integrate-failed`; classify under repair rounds (siblings stay
122
- in place). Never integrate because a wright returned.
123
- 7. Success: FF control (the branch that held `HEAD` when the batch started —
124
- often `main`/`master`, otherwise whatever the user was on) to the integrate
125
- tip: N local commits, never pushed; union `touched-files.md`; update
126
- state/evidence; AFK +1 per integrated sibling; optional `check candidate`.
127
- 8. Cleanup runs only after `integrate` marks the lease `complete` — work
117
+ 6. `parallel integrate --slice <id> --apply-to-control` **only after its steps
118
+ 4–5 are green**: `transfer_commit` descends from the sibling's base and diffs
119
+ path-exact vs it; apply as its own local `WIP(<slug>):` commit
120
+ (imperative summary, never a slice id). Staging branch, then FF; the engine
121
+ refuses (never rewinds) if anything but this lease moved control. Conflict →
122
+ `integrate-failed`; classify under repair rounds (siblings stay in place).
123
+ Never integrate because a wright returned.
124
+ 7. Each landing: FF control (the branch that held `HEAD` when the batch started —
125
+ often `main`/`master`, otherwise whatever the user was on) by one local commit,
126
+ never pushed; union that sibling's paths into `touched-files.md`; update
127
+ state/evidence; AFK +1 for that sibling; optional `check candidate`. Then
128
+ refill ([Dynamic selection](#dynamic-selection-and-re-batching)) and start the
129
+ feature gates on control
130
+ ([Proof tiers](phase-contract.md#proof-tiers)); the next landing waits for them
131
+ to pass, the refilled wrights do not.
132
+ 8. Cleanup runs only after the last landing marks the lease `complete` — work
128
133
  landed in control, so `parallel cleanup` removes worktrees/branches.
129
134
  Blocked/human-stopped batches keep lease, worktrees, branches — nothing is
130
135
  removed while the batch may resume. `parallel abort` + `cleanup --force`
@@ -191,9 +196,11 @@ Repair rejected work in place; never discard/rebuild while budget remains.
191
196
  ## Engine verbs
192
197
 
193
198
  ```text
194
- devrites-engine parallel select --cap <1-10> [--root <dir>] [<json-file>|-]
199
+ devrites-engine parallel select --cap <1-10> [--root <dir>] [--slug <slug>] [<json-file>|-]
195
200
  devrites-engine parallel create --root <repo> --slug <slug> --batch <id> --base <B> --json <file>|-
201
+ devrites-engine parallel add --root <repo> --slug <slug> --json <file>|-
196
202
  devrites-engine parallel record-green --root <repo> --slug <slug> --slice <id> --commit <sha>
203
+ devrites-engine parallel integrate --root <repo> --slug <slug> --slice <id> --apply-to-control
197
204
  devrites-engine parallel integrate --root <repo> --slug <slug> --apply-to-control
198
205
  devrites-engine parallel status --root <repo> --slug <slug>
199
206
  devrites-engine parallel lease-write|lease-read|lease-clear --root <repo> --slug <slug>
@@ -42,7 +42,8 @@ Spec Drift Guard still applies.
42
42
  6. **Prove.** Against the frozen pre-slice candidate inspect
43
43
  test hunks for deletion, skipping/focus, tautology, or weaker expectations.
44
44
  Wait for step 5's exact test-analyst account; missing/adverse criterion verdict is
45
- Critical. Run only `test-plan.md` repository/CI commands, record output, recheck
45
+ Critical. Run only `test-plan.md` repository/CI commands ([tier](#proof-tiers)),
46
+ record output, recheck
46
47
  `git diff --name-only`. Missing/weakened/red/source-mutating proof cannot pass.
47
48
  Pre-existing/environment-specific claims need a predating same-command,
48
49
  same-environment baseline; otherwise unresolved.
@@ -67,6 +68,14 @@ Spec Drift Guard still applies.
67
68
 
68
69
  One contract builds one slice: preserve TDD, exact paths and independent judgment.
69
70
 
71
+ ## Proof tiers
72
+
73
+ With a `test-plan.md` `## Feature gates` section, step 6 runs `Tests/proof` and every
74
+ other row; feature gates run once per parallel landing, on control, while worktree
75
+ wrights continue. The next landing and Prove wait for them; red is a fingerprint
76
+ against slices landed since the last green run. Serial same-worktree mode, and plans
77
+ without the section, run every row each round.
78
+
70
79
  ## Independent Build review
71
80
 
72
81
  After inspection, freeze full slice scope and cumulative baseline diff. Initial
@@ -82,5 +82,6 @@ The detecting phase owns backtracking and the batch sweep. Save
82
82
  `return_phase`/`return_next_action`; consume nested Plan/Vet `STOP` internally, complete
83
83
  vetted acceptance-preserving remediation, then restore the cursor and failed step.
84
84
  Never hand the human an intermediate command. The shared three-attempt causal-fingerprint
85
- cap still applies: exhaustion produces one technical blocker, while a genuinely
86
- human-owned decision uses the question format below.
85
+ cap still applies: a spent strategy escalates and a fully escalated fingerprint parks
86
+ under the [retry contract](../../devrites-lib/reference/standards/afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve),
87
+ while a genuinely human-owned decision uses the question format below.
@@ -76,6 +76,11 @@ worktrees stay forbidden.
76
76
  Quote every active `decisions.md` carry-forward constraint whose `Files:`
77
77
  overlap the task paths (or that names no files).
78
78
  A new path requires a new bounded contract; the wright cannot widen the task.
79
+ Name the writer-safe commands the wright must run (syntax/type/lint, unit and
80
+ self-check suites, a narrow local smoke of the changed path) and never forbid
81
+ them: a wright that cannot execute writes blind and its failures surface a
82
+ whole review round later. Only artifact-producing, consumptive, or full
83
+ canonical feature gates stay root-owned.
79
84
  3. Record `git diff --name-only` before dispatch so unrelated work remains
80
85
  distinguishable. For an isolated pilot, also record committed base SHA and exact
81
86
  baseline status before asking the host for isolation. **Failing case:** paths that
@@ -99,6 +104,8 @@ acceptance-preserving split (`root_no_change_analysis` → `FOLD` per
99
104
  [acceptance-preserving-reslice](../../devrites-lib/reference/standards/acceptance-preserving-reslice.md);
100
105
  open findings move to the new slice owning their paths), or record
101
106
  `## <DRIFT-ID> — <SLICE-ID> reslice review` with why no smaller split exists and
107
+ a spec trace of the slice's obligations (hardening no AC/INV/PROH requires moves to
108
+ a sibling slice dependents do not need, still gated before Seal), and
102
109
  reopen with `--reslice-review <DRIFT-ID>`. Use
103
110
  at most one writer across all linked worktrees for this workspace. Never run two
104
111
  writers in one worktree, run isolated and same-worktree writers concurrently, or
@@ -144,8 +151,8 @@ TTL is crash recovery, not normal cleanup.
144
151
  **Do not land on control until review and proof are both green.** Isolated
145
152
  `transfer_commit` stays on the worker branch; same-worktree diffs stay
146
153
  uncommitted. Serial: [`checkpoint.md`](checkpoint.md), then host may remove the
147
- worktree. Parallel: `record-green` only; land with `parallel integrate
148
- --apply-to-control` after the batch; `parallel cleanup` removes worktrees.
154
+ worktree. Parallel: `record-green`, then `parallel integrate
155
+ --slice <id> --apply-to-control`; `parallel cleanup` removes worktrees.
149
156
  5. Reconcile returned reuse, conventions, principles, sources, assumptions,
150
157
  decisions, dead ends, follow-ups, gates, and touched files. Persist the
151
158
  relevant facts in canonical artifacts, not the wholesale report. A plan-gap
@@ -77,6 +77,13 @@ Pull these via `Read` when shaping the plan:
77
77
  `devrites-plan-drafter` in `define` mode for one atomic candidate bundle:
78
78
  `architecture.md`, `plan.md`, `tasks.md`, and `traceability.md` with proof mapping.
79
79
  Validate its bounded result; it does not write/ask, and returns human choices to root.
80
+ In the same parallel wave, dispatch one `devrites-evidence-scout` per external
81
+ capability the plan will rest on — OS/SDK/native API, permission or sandbox,
82
+ file format, toolchain, or third-party behavior — that neither live code nor a
83
+ cited dossier already proves (at most three, as in Spec). Fold each dossier
84
+ before step 2a: cite a proven capability in `architecture.md`; an unproven or
85
+ contradicted one becomes a risk spike ordered before its dependent slices,
86
+ never an assumption the build discovers.
80
87
  2. **Reconcile architecture + approach** against live seams; root writes at step 6.
81
88
  `architecture.md` owns layers/boundaries/integrations/data/dependencies/risks/impact;
82
89
  `plan.md` owns build strategy. Use the code index for structure/impact
@@ -148,7 +155,9 @@ Pull these via `Read` when shaping the plan:
148
155
  intended, route it through the Spec Drift Guard plus a recorded decision and a scoped principle
149
156
  exception a human approves. Never ready a plan that silently violates an invariant. (Re-scored
150
157
  as a blocking gate at `/rite-vet`; no file → none declared → nothing to check.)
151
- 6. **Write** `architecture.md`, `plan.md`, `tasks.md`, and `traceability.md`; update
158
+ 6. **Write** `architecture.md`, `plan.md`, `tasks.md`, and `traceability.md` — save the
159
+ accepted bundle under `packets/` and apply it with `devrites-engine state
160
+ apply-bundle <slug> <bundle.json>` before root reconciliation edits; update
152
161
  `state.md` (phase: plan → next `/rite-vet`). When diagrams clarify, also write optional
153
162
  `flows.md` (**Mermaid-first**). If a richer reviewable visual earns it, emit
154
163
  `visual/<flow>.html` + `visual/<flow>.outline.md` after loading matching playbooks from
@@ -161,7 +170,7 @@ Pull these via `Read` when shaping the plan:
161
170
  meaning-changing mappings block. Then run
162
171
  `devrites-engine check task-graph <slug>`; a malformed dependency graph blocks
163
172
  before Vet rather than spending a reviewer context on invalid tasks. Resolve each
164
- `ADVISORY size:` line now (split, or `Size rationale:`); it never blocks.
173
+ `ADVISORY size:`/`hub:` line now (split or seam slice, or a rationale); never blocking.
165
174
  7. **Readiness gate** (`plan-template.md`): require CLEAR coverage; complete acceptance,
166
175
  wiring, shared-contract proof, applicable outputs, and rollback; risk-first acyclic order;
167
176
  justified deviations; and every horizon item present, with blockers resolved, planning
@@ -74,7 +74,7 @@ themselves. The workspace is the canonical store; the handoff is the chat-only d
74
74
  6. **In-flight work.** Every dispatch wave opened or sealed without a return (`devrites-engine
75
75
  dispatch <slug> status`), running writer handle, held claim id plus paths (`devrites-engine
76
76
  claim list --all`), and consumptive action started, each `terminal: yes|unknown` (`yes` only with
77
- an admitted return, release, or proof of stop). The live handle exists only in chat. Any
77
+ an admitted return, release, `dead` claim, or proof of stop). The live handle exists only in chat. Any
78
78
  `unknown` row makes item 1 a reconcile step (`dispatch <slug> status`, `parallel status`,
79
79
  `claim list --all`), never a writer command: otherwise the next session dispatches a second writer.
80
80
  7. **How to resume:** fixed boilerplate (see template below).
@@ -5,7 +5,7 @@ argument-hint: "[mode: decompose|reslice|repair|reorder|split|unblock|course-cor
5
5
  user-invocable: true
6
6
  ---
7
7
 
8
- <!-- loads: {"always":["devrites-lib/reference/standards/core.md","devrites-lib/reference/standards/code-navigation.md","devrites-lib/reference/standards/acceptance-preserving-reslice.md","devrites-lib/reference/standards/tooling.md","devrites-lib/reference/standards/agents.md","rite-plan/reference/slicing.md","rite-plan/reference/replan-and-repair.md","rite-plan/reference/dependency-graph.md","rite-plan/reference/task-breakdown.md","rite-plan/reference/anti-patterns.md","rite-define/reference/plan-template.md"],"triggers":{"applicability":["devrites-lib/reference/standards/repository-topology.md","devrites-lib/reference/standards/data-integrity.md","devrites-lib/reference/standards/integration-reliability.md"],"one-shot":["devrites-lib/reference/standards/one-shot-actions.md"],"assumption-delta":["devrites-lib/reference/standards/assumption-checkpoints.md"],"workflow":["devrites-lib/reference/standards/development-workflow.md"],"workflow-artifacts":["devrites-lib/reference/standards/workflow-artifacts.md"]},"workspace":["brief.md","spec.md","state.md","decisions.md","assumptions.md","questions.md","decision-coverage.md","architecture.md","plan.md","tasks.md","traceability.md","eng-review.md","test-plan.md","gates.md","drift.md"],"workspaceByRole":{"plan-drafter":["brief.md","spec.md","plan.md","tasks.md","decision-coverage.md","questions.md","decisions.md","assumptions.md","architecture.md","state.md","drift.md"]}} -->
8
+ <!-- loads: {"always":["devrites-lib/reference/standards/core.md","devrites-lib/reference/standards/code-navigation.md","devrites-lib/reference/standards/acceptance-preserving-reslice.md","devrites-lib/reference/standards/tooling.md","devrites-lib/reference/standards/agents.md","rite-plan/reference/slicing.md","rite-plan/reference/replan-and-repair.md","rite-plan/reference/dependency-graph.md","rite-plan/reference/task-breakdown.md","rite-plan/reference/anti-patterns.md","rite-define/reference/plan-template.md"],"triggers":{"applicability":["devrites-lib/reference/standards/repository-topology.md","devrites-lib/reference/standards/data-integrity.md","devrites-lib/reference/standards/integration-reliability.md"],"one-shot":["devrites-lib/reference/standards/one-shot-actions.md"],"assumption-delta":["devrites-lib/reference/standards/assumption-checkpoints.md"],"workflow":["devrites-lib/reference/standards/development-workflow.md"],"workflow-artifacts":["devrites-lib/reference/standards/workflow-artifacts.md"]},"workspace":["brief.md","spec.md","state.md","decisions.md","assumptions.md","questions.md","decision-coverage.md","architecture.md","plan.md","tasks.md","traceability.md","eng-review.md","test-plan.md","gates.md","drift.md"],"workspaceByRole":{"evidence-scout":["spec.md","architecture.md","decisions.md","state.md"],"plan-drafter":["brief.md","spec.md","plan.md","tasks.md","decision-coverage.md","questions.md","decisions.md","assumptions.md","architecture.md","state.md","drift.md"]}} -->
9
9
  > Read-set manifest: `devrites-engine context <slug> --phase plan` bundles every file named below into one deduplicated read. Trigger names map to the conditional rules in the sections that follow.
10
10
 
11
11
 
@@ -95,15 +95,21 @@ Before classifying any Reslice, read `.claude/skills/devrites-lib/reference/stan
95
95
  never re-derives them by exhaustive search. It also carries a bounded
96
96
  self-attack over the delta (`self_attack_exposures`), catching the shallow
97
97
  next-round findings before Vet's dispatch rather than after a full loop.
98
- Root dispositions every exposure — fold as a finding, accept as a declared
98
+ During recovery, a non-Critical exposure off the failing fingerprint's causal
99
+ path goes to `eng-review.md` `## Deferred findings` (Review gives it a verdict;
100
+ Seal blocks without one), so a repair never widens past its fingerprint.
101
+ Root dispositions every other exposure — fold as a finding, accept as a declared
99
102
  residual, or reject with reason; none silently drops.
100
103
  Packet mechanics: dedupe at assembly — findings with an identical
101
104
  required-fix and site set merge into one entry that closes all their
102
105
  fingerprints. The packet may carry digest-pinned site excerpts so the
103
- drafter spot-verifies anchors instead of re-scanning whole files, and root
104
- may partition findings into anchor-disjoint clusters with one drafter per
105
- cluster in parallel — findings sharing any anchor or mirrored clause stay
106
- in one cluster, and each bundle applies independently. A `partial`-
106
+ drafter spot-verifies anchors instead of re-scanning whole files. Root
107
+ partitions findings into anchor-disjoint clusters — findings sharing any
108
+ anchor or mirrored clause stay in one cluster — and, with two or more,
109
+ dispatches one drafter per cluster in one parallel wave within the scale
110
+ limits. Every cluster pins the same base; their bundles apply together in
111
+ one `state apply-bundle` call, and an overlap refusal merges those clusters
112
+ for the re-dispatch. A `partial`-
107
113
  continuation re-dispatch continues the same packet; it does not advance the
108
114
  same-seam counter. Count consecutive repair packets whose findings' cited clause sets overlap
109
115
  the immediately previous packet's — the overlap is the seam. Carry it as an explicit
@@ -142,9 +148,14 @@ Before classifying any Reslice, read `.claude/skills/devrites-lib/reference/stan
142
148
  4. Re-slice using vertical-slice rules: [slicing](reference/slicing.md) and
143
149
  [task-breakdown](reference/task-breakdown.md). Prefer thin, shippable, verifiable.
144
150
  **Completion:** every slice is independently shippable/provable or carries an irreducibility reason.
145
- 5. Reconcile the candidate against steps 3 and 4, then the root updates `plan.md`, `tasks.md`,
146
- `state.md`, and appends rationale to `decisions.md`. A rejected candidate
147
- (malformed bundle, stale or non-unique anchor) or a drafter `Outcome: gap`
151
+ 5. Reconcile the candidate's meaning against steps 3 and 4, save each bundle
152
+ under `packets/`, and apply its hunks with `devrites-engine state apply-bundle
153
+ <slug> <bundle.json>...` (all-or-nothing; `--dry-run` previews); never
154
+ hand-copy hunks or stage file copies. Rewrite each owning clause in place; never
155
+ append a dated delta or fold section beside the clause it supersedes (apply-bundle
156
+ refuses one). Then update `state.md` and append
157
+ rationale to `decisions.md`. A rejected candidate
158
+ (malformed bundle, stale or non-unique anchor, any apply-bundle refusal) or a drafter `Outcome: gap`
148
159
  is one no-progress outcome on every open fingerprint in the fold; the
149
160
  re-dispatch packet must name the rejection so the same hunks don't recur.
150
161
  A gap naming genuinely human-owned information routes to `/rite-clarify`.
@@ -168,3 +168,8 @@ Order by dependency, but minimize coupling. A slice that needs three other slice
168
168
  is a smell: look for a thinner cut that stands alone. An edge exists only when this slice
169
169
  reads something the other produces: write it as `SLICE-001 (via <interface>)`. If you
170
170
  cannot name what crosses, drop the edge; a shallow, wide graph runs in parallel.
171
+
172
+ Slices sharing a file never build side by side: put a hub file's shared edit
173
+ (registry, command table, test harness) in one seam slice the others depend on.
174
+ `check task-graph` prints the `schedule:` and `ADVISORY hub:` lines; inseparable
175
+ writes get `Serial rationale: <why>`. Never merge slices or drop acceptance to widen it.
@@ -77,8 +77,10 @@ Incomplete comparison is **not** agreement. Record axis deltas in `polish-report
77
77
  captures.
78
78
  3. **Always** read [`reference/code.md`](reference/code.md) and assess **Phase 1
79
79
  (code polish)**; if backend was touched, assess **Phase 2 (backend polish)** from
80
- the same file. Reconcile the findings, then send accepted corrections as one bounded
81
- wright contract: build its read-set with
80
+ the same file. Assess step 4's UI phases on the same frozen digest while the
81
+ code assessment runs, reconcile both, then send every accepted code and UI
82
+ correction as one bounded wright contract (normalize corrections before polish
83
+ ones): build its read-set with
82
84
  `devrites-engine context <slug> --phase polish --role slice-wright`, run the
83
85
  single-agent wave through `devrites-engine dispatch <slug> open|start|seal|return`
84
86
  (auto-records dispatch/return metrics), and gate returned paths
@@ -91,8 +93,8 @@ Incomplete comparison is **not** agreement. Record axis deltas in `polish-report
91
93
  its `FAIL` and `PARTIAL` rows are the normalize/quality-bar worklist**: identify the root
92
94
  cause of each (a missing state, an off-token CTA, or an anti-slop hit) rather than
93
95
  hiding it with decoration. Assess **Phase 3 (normalize)** → **Phase 4 (UI polish)**,
94
- then send accepted UI
95
- corrections to the wright (which invokes the relevant craft skill). Honor argument modes:
96
+ and fold accepted UI
97
+ corrections into step 3's single wright contract (the wright invokes the relevant craft skill). Honor argument modes:
96
98
  - `bolder | quieter | distill | harden`: passed to Phase 4 as the
97
99
  emphasis dial.
98
100
  - `normalize-only`: assess Phase 3 and stop (no Phase 4).
@@ -76,7 +76,8 @@ test changes.
76
76
  command, cwd, prerequisites, exit, and sanitized
77
77
  decisive output, plus the test selector, runner counts
78
78
  (collected/ran/passed/failed/skipped), and attempt number with first-attempt
79
- outcome; output and exit come from one execution. Run relevant suite plus build/typecheck/lint. Recheck the
79
+ outcome; output and exit come from one execution. Run relevant suite plus build/typecheck/lint,
80
+ concurrently when they share no build directory, port, or lock. Recheck the
80
81
  candidate and require identical digest/no source mutation. Reject substituted
81
82
  commands, malformed manifests, zero-test/skipped/filtered behavioral claims,
82
83
  exit-status-only claims, status-masking forms, and source drift. A retry-only
@@ -109,7 +110,7 @@ test changes.
109
110
  described screenshots, console/network, interaction, target comparisons, and
110
111
  every required state. Material mismatch fails.
111
112
  7. **Independent validation.** Fresh read-only `devrites-proof-runner` and
112
- `devrites-spec-reviewer` judge the same candidate/commands/evidence/acceptance map.
113
+ `devrites-spec-reviewer`, in one parallel wave, judge the same candidate/commands/evidence/acceptance map.
113
114
  Neither runs commands; reject missing/stale, invented-ID, label-only or self-attested reports.
114
115
  8. **Map proof.** Reconcile verdicts under [acceptance-proof.md](reference/acceptance-proof.md).
115
116
  Every criterion/scenario/interaction/key link needs discriminating evidence or a
@@ -79,7 +79,8 @@ Pull these via `Read` when the diff demands them:
79
79
  reviewer's brief without severity) and ends in `review.md` with its own label and
80
80
  action tag — never silently dropped. Hand each lane reviewer the
81
81
  `devrites-engine recall --paths <its touched paths>` pointers as prior context, not findings.
82
- 2. **Review tests first:** do they prove the acceptance criteria? Missing,
82
+ 2. **Review tests first** while the step-3 cohort runs — launch it first; this
83
+ root pass needs none of its output: do they prove the acceptance criteria? Missing,
83
84
  weak, or wrong tests are the first findings.
84
85
  **Completion:** every acceptance criterion maps to a proven test or a labeled finding.
85
86
  3. **Review spec and code separately in parallel.** A change can pass
@@ -100,6 +101,10 @@ Pull these via `Read` when the diff demands them:
100
101
  (scope creep / drift), (c) criteria implemented incorrectly. Quote the spec
101
102
  line per finding. If the spec is missing or unreadable, report `Review gap:
102
103
  missing spec` and do not infer requirements from the diff."
104
+ - **Seal roles** → `devrites-test-analyst`, plus `devrites-doubt-reviewer` per
105
+ stood decision and `devrites-devex-reviewer` when triggered, join this cohort on
106
+ the same digest. Their findings join step 7's single correction, and Seal cites
107
+ their unchanged same-candidate accounts instead of re-dispatching them.
103
108
  - **Code-review axis** → `devrites-code-reviewer`: "Apply your full documented
104
109
  discipline (tests-first, correctness, readability, architecture, maintainability,
105
110
  standards) on the feature workspace + diff. Cite file:line; skip tooling-enforced
@@ -61,8 +61,8 @@ Follow [`reference/phase-contract.md`](reference/phase-contract.md)
61
61
 
62
62
  1. read workspace and final diff;
63
63
  2. recheck the canonical candidate/bindings and approved repository/CI proof;
64
- 3. admit valid Spec/Code accounts; dispatch remaining required exact roles under
65
- `../devrites-lib/reference/parallel-dispatch.md` on the same frozen candidate,
64
+ 3. admit every valid same-candidate Review account; dispatch remaining required exact roles under
65
+ `../devrites-lib/reference/parallel-dispatch.md` in one wave, proof-runner included, on the same frozen candidate,
66
66
  code review through its § Engineering lanes;
67
67
  4. reconcile their read-only verdicts against source and immutable evidence;
68
68
  5. draft GO/NO-GO `seal.md` with acceptance, tests, decisions, and seven roster accounts plus proof-runner and doubt-reviewer
@@ -13,12 +13,18 @@
13
13
  candidate check afterward and require the identical digest and no source
14
14
  mutation. Capture command, cwd, exit, decisive output, and identity.
15
15
  Missing/red/mismatched blocks; unavailable is `cannot_verify`, never pass.
16
+ Steps 3–6 share one dispatch wave: launch every role they still need
17
+ (proof-runner, test-analyst, doubt-reviewer, roster) together, admit valid
18
+ same-candidate Review accounts instead, and do the root work of steps 4–6 while
19
+ the wave runs.
20
+
16
21
  3. **Judge acceptance.** Dispatch exact `devrites-proof-runner` on immutable
17
22
  proof; admit valid same-candidate `devrites-spec-reviewer` evidence from Review
18
23
  or dispatch that exact reviewer. Reconcile every
19
24
  AC/REQ/scenario/key link by ID and meaning; missing/stale/self-attested/mismatched is NO-GO.
20
25
  4. **Judge tests.** Diff baseline/candidate tests for deletion, skip/focus,
21
- tautology, or weakening; dispatch exact `devrites-test-analyst`. Missing or
26
+ tautology, or weakening; admit the same-candidate `devrites-test-analyst` account
27
+ from Review or dispatch that exact analyst. Missing or
22
28
  adverse account, or green tests not asserting mapped behavior, is Critical.
23
29
  5. **Resolve gates.** Open blocking/escalating/validating questions and drift
24
30
  block. Each stood decision needs a reconciled exact `devrites-doubt-reviewer` verdict.
@@ -5,7 +5,7 @@ argument-hint: "[slug] [--cross-model] [--full]"
5
5
  user-invocable: true
6
6
  ---
7
7
 
8
- <!-- loads: {"always":["devrites-lib/reference/standards/core.md","devrites-lib/reference/standards/code-navigation.md","devrites-lib/reference/orchestration-profiles.md","devrites-lib/reference/parallel-dispatch.md","devrites-lib/reference/standards/gates.md","rite-vet/reference/review-axes.md","rite-vet/reference/artifacts.md","rite-vet/reference/depth.md","rite-vet/reference/eng-lenses.md","rite-vet/reference/anti-patterns.md"],"triggers":{"afk":["devrites-lib/reference/standards/afk-hitl.md"],"applicability":["devrites-lib/reference/standards/repository-topology.md","devrites-lib/reference/standards/data-integrity.md","devrites-lib/reference/standards/integration-reliability.md"],"assumption-delta":["devrites-lib/reference/standards/assumption-checkpoints.md"],"cross-model":["rite-vet/reference/cross-model.md"],"devex":["devrites-lib/reference/standards/developer-experience.md"],"dod":["devrites-lib/reference/standards/definition-of-done.md"],"elicitation":["devrites-lib/reference/standards/elicitation.md"],"errors":["devrites-lib/reference/standards/error-handling.md"],"grammar":["devrites-lib/reference/standards/spec-grammar.md"],"one-shot":["devrites-lib/reference/standards/one-shot-actions.md"],"performance":["devrites-lib/reference/standards/performance.md"],"principles":["devrites-lib/reference/standards/principles.md"],"reslice":["devrites-lib/reference/standards/acceptance-preserving-reslice.md"],"testing":["devrites-lib/reference/standards/testing.md"],"workflow":["devrites-lib/reference/standards/development-workflow.md"],"workflow-artifacts":["devrites-lib/reference/standards/workflow-artifacts.md"],"yagni":["devrites-lib/reference/standards/patterns.md","devrites-lib/reference/standards/coding-style.md"]},"workspace":["brief.md","spec.md","state.md","decisions.md","assumptions.md","questions.md","decision-coverage.md","strategy.md","architecture.md","plan.md","tasks.md","traceability.md","eng-review.md","test-plan.md","gates.md"],"workspaceByRole":{"devex-reviewer":["spec.md","plan.md","tasks.md","decisions.md","state.md"],"plan-reviewer":["spec.md","plan.md","tasks.md","test-plan.md","decision-coverage.md","architecture.md","decisions.md","state.md"],"strategy-reviewer":["brief.md","spec.md","plan.md","decisions.md","decision-coverage.md","strategy.md","state.md"]}} -->
8
+ <!-- loads: {"always":["devrites-lib/reference/standards/core.md","devrites-lib/reference/standards/code-navigation.md","devrites-lib/reference/orchestration-profiles.md","devrites-lib/reference/parallel-dispatch.md","devrites-lib/reference/standards/gates.md","rite-vet/reference/review-axes.md","rite-vet/reference/artifacts.md","rite-vet/reference/depth.md","rite-vet/reference/eng-lenses.md","rite-vet/reference/anti-patterns.md"],"triggers":{"afk":["devrites-lib/reference/standards/afk-hitl.md"],"applicability":["devrites-lib/reference/standards/repository-topology.md","devrites-lib/reference/standards/data-integrity.md","devrites-lib/reference/standards/integration-reliability.md"],"assumption-delta":["devrites-lib/reference/standards/assumption-checkpoints.md"],"cross-model":["rite-vet/reference/cross-model.md"],"devex":["devrites-lib/reference/standards/developer-experience.md"],"dod":["devrites-lib/reference/standards/definition-of-done.md"],"elicitation":["devrites-lib/reference/standards/elicitation.md"],"errors":["devrites-lib/reference/standards/error-handling.md"],"grammar":["devrites-lib/reference/standards/spec-grammar.md"],"one-shot":["devrites-lib/reference/standards/one-shot-actions.md"],"performance":["devrites-lib/reference/standards/performance.md"],"principles":["devrites-lib/reference/standards/principles.md"],"reslice":["devrites-lib/reference/standards/acceptance-preserving-reslice.md"],"testing":["devrites-lib/reference/standards/testing.md"],"workflow":["devrites-lib/reference/standards/development-workflow.md"],"workflow-artifacts":["devrites-lib/reference/standards/workflow-artifacts.md"],"yagni":["devrites-lib/reference/standards/patterns.md","devrites-lib/reference/standards/coding-style.md"]},"workspace":["brief.md","spec.md","state.md","decisions.md","assumptions.md","questions.md","decision-coverage.md","strategy.md","architecture.md","plan.md","tasks.md","traceability.md","eng-review.md","test-plan.md","gates.md"],"rootOnly":["devrites-lib/reference/standards/afk-hitl.md","devrites-lib/reference/standards/elicitation.md"],"workspaceByRole":{"doubt-reviewer":["spec.md","architecture.md","plan.md","tasks.md","test-plan.md","decisions.md","state.md"],"devex-reviewer":["spec.md","plan.md","tasks.md","decisions.md","state.md"],"plan-reviewer":["spec.md","plan.md","tasks.md","test-plan.md","decision-coverage.md","architecture.md","decisions.md","state.md"],"strategy-reviewer":["brief.md","spec.md","plan.md","decisions.md","decision-coverage.md","strategy.md","state.md"]}} -->
9
9
  > Read-set manifest: `devrites-engine context <slug> --phase vet` bundles every file named below into one deduplicated read. Trigger names map to the conditional rules in the sections that follow.
10
10
 
11
11
 
@@ -85,7 +85,9 @@ plan declares a root-authored executable workflow file, read
85
85
  Temper — in
86
86
  parallel under `../devrites-lib/reference/parallel-dispatch.md`; they are
87
87
  independent read-only passes on one frozen candidate. Missing
88
- required account blocks.
88
+ required account blocks. Run root steps 2–4, including step 3's preflight
89
+ commands, on the same frozen candidate while the wave is out; reconcile the
90
+ accounts when they return.
89
91
  1b. **Recovery recheck.** Require valid return cursor, accepted prior finding,
90
92
  exact fingerprint/reproduction, repaired candidate identity, changed
91
93
  paths/criteria, affected drift/evidence, and the recorded delta self-check.
@@ -108,8 +110,8 @@ plan declares a root-authored executable workflow file, read
108
110
  marked as a refinement of an already-pinned clause; the recheck may re-raise
109
111
  it only by naming a concrete failure path the declaration omits. A
110
112
  `new_failure_mode` finding is never residual-eligible. A fold whose
111
- findings are all Suggestion-or-lower rechecks mechanically at the
112
- materialization gate — anchors applied, mirrors consistent, invariants
113
+ findings are all `mechanism` kind or Suggestion-or-lower rechecks mechanically at the
114
+ materialization gate — anchors applied (a clean `state apply-bundle`), mirrors consistent, invariants
113
115
  pass — without a dispatched reviewer; sub-Important findings already
114
116
  cannot keep recovery open. Reconcile
115
117
  shared artifact/readiness gates, then enter step 8 or the next repair.
@@ -142,7 +144,9 @@ plan declares a root-authored executable workflow file, read
142
144
  ownership. The plan's `Shared contract proof` names one reused boundary
143
145
  artifact plus two consuming tests for every changed API/event/schema/provider-
144
146
  consumer seam, or an explicit no-impact statement. Missing, one-sided,
145
- duplicated-contract, vague, or non-consuming proof fails closed.
147
+ duplicated-contract, vague, or non-consuming proof fails closed. Each slice
148
+ names a fast writer-safe check its wright can run; proof reachable only through
149
+ root-owned full gates is a `mechanism` finding.
146
150
 
147
151
  Technical gaps are `NEEDS REPLAN` and Plan repair — each finding marks
148
152
  itself `new_failure_mode` or names the already-pinned clause/fingerprint
@@ -103,6 +103,14 @@ From /rite-vet on <iso>. Runner + conventions: <detected framework + command>.
103
103
  Link any disposable parser fixture. Preflight values are planning evidence, not post-build proof;
104
104
  Prove recaptures the observed command, candidate identity, and result.
105
105
 
106
+ ## Feature gates
107
+ | Gate | Command | Cwd | Expected |
108
+ |---|---|---|---|
109
+ | <full suite / workspace lint / audit> | <exact command> | <path> | <exit/output> |
110
+
111
+ Whole-repository rows only: Build runs them per landing
112
+ ([tiers](../../rite-build/reference/phase-contract.md#proof-tiers)), Prove on the final candidate.
113
+
106
114
  Commands in this durable artifact are portable repository commands: no RTK or local shell
107
115
  aliases, user-specific absolute paths, or temporary proof trees. Evidence records
108
116
  the command actually executed.
@@ -30,7 +30,7 @@ Before implementation review, check for work beyond the settled spec.
30
30
  (over-budget `tasks.md`/`plan.md` from slice or AC count) is a scope finding, not a
31
31
  `Budget override`: route to `/rite-plan course-correct` (`MVP cut`) with the
32
32
  continuation sequence named; do not vet the whole epic. An `ADVISORY size:`
33
- slice without `Size rationale:` is a non-blocking Suggestion to split it.
33
+ or `hub:` line without its rationale is a non-blocking Suggestion to split or seam it.
34
34
  4. **Built-in check.** For each new pattern/infra/concurrency approach, invoke
35
35
  `devrites-source-driven` inline to verify current framework/runtime support and cite it. Custom
36
36
  work where a built-in suffices is a scope-reduction finding.
@@ -19,7 +19,8 @@ seams supplied by the orchestrator.
19
19
  planning artifacts while preserving settled intent.
20
20
 
21
21
  Reuse existing seams and dependencies before proposing new ones. Build vertical
22
- slices in dependency order. Map every REQ and AC to a slice and executable proof,
22
+ slices in dependency order; put a hub file's shared edit in one seam slice
23
+ ([slicing.md](.agents/skills/rite-plan/reference/slicing.md#slice-independence)). Map every REQ and AC to a slice and executable proof,
23
24
  name rollback and failure paths; keep acceptance-changing proposals separate. Durable
24
25
  proof commands must be portable repository commands, never host-local wrappers,
25
26
  user-specific absolute paths, or temporary proof trees.
@@ -73,10 +74,13 @@ Return this result:
73
74
 
74
75
  ```yaml
75
76
  mode: define | repair
77
+ base_hashes: {} # <path>: sha256 of the bytes you read, for every replace/patch target
76
78
  candidate_files:
77
79
  - path: <requested canonical target>
78
80
  operation: create | replace | patch
79
- content: <complete candidate or exact bounded delta>
81
+ content: <complete file; create/replace only>
82
+ hunks: [] # patch only: {id, old_text, new_text}; old_text byte-exact, unique in the pinned file
83
+ retired_ids: [] # tracked IDs (AC/REQ/HZN/SLICE/DEC/...) the delta removes on purpose
80
84
  acceptance_map: []
81
85
  dependency_order: []
82
86
  technical_decisions: []
@@ -86,7 +90,13 @@ applicability_disposition: []
86
90
  self_attack_exposures: []
87
91
  ```
88
92
 
89
- The root validates the cross-file bundle and persists accepted content.
93
+ The root saves the bundle as JSON and applies it with `devrites-engine state
94
+ apply-bundle <slug> <bundle.json>`, which refuses a stale pin, a missing,
95
+ duplicate, or overlapping `old_text`, an unlisted vanished ID, a new task-graph
96
+ problem, new budget overshoot, or a new dated delta section, and writes nothing on refusal. Pin each
97
+ `base_hashes` entry with `shasum -a 256` (or `sha256sum`) on the exact file you
98
+ read, and prefer short anchored hunks to whole-file `replace`. Patch the owning
99
+ clause in place; never add a dated delta section beside superseded text.
90
100
 
91
101
  ## Tools / read-write mode
92
102
 
@@ -101,7 +101,11 @@ unclear boundary is underspecified: return `Escalation` without proceeding.
101
101
  that source in the result. Never invent an API.
102
102
  - **No process residue.** Do not put `SLICE-###`, slice numbers, or "this slice"
103
103
  in product source, tests, comments, or filenames.
104
- 4. **VERIFY (fail-on-red).** Run writer-safe tests/types/lint. Report required
104
+ 4. **VERIFY (fail-on-red).** Run writer-safe tests/types/lint: `Tests/proof` plus
105
+ tests of changed code; `## Feature gates` rows are root-owned. Writer-safe means
106
+ local and non-consumptive — syntax/type/lint, unit and self-check suites, and a
107
+ narrow smoke of the changed path — never only a syntax check; contract text
108
+ cannot strip it. Report required
105
109
  build/browser/E2E as `not-run` (root-owned, artifact-producing gates), and only
106
110
  when the exact command, cwd, and prerequisites already appear in the unchanged
107
111
  vetted `test-plan.md`; never synthesize or rewrite a root command. Root runs
@@ -4,7 +4,9 @@ Host dispatch; DevRites governs.
4
4
 
5
5
  ## Roster
6
6
 
7
- Review: Spec/Code plus triggered frontend/security/performance; Seal: all applicable roles.
7
+ Review: Spec/Code, triggered frontend/security/performance, and the seal roles that can
8
+ judge the frozen digest (test-analyst, doubt, devex); Seal: all applicable roles, citing
9
+ same-candidate Review accounts.
8
10
 
9
11
  | Reviewer | Fires | Trigger |
10
12
  |---|---|---|
@@ -74,8 +76,10 @@ If the candidate diff has no matching surfaces, record
74
76
  and dedupe by evidence/root cause. Account for all seven (and, in `seal.md`, `devrites-proof-runner` and `devrites-doubt-reviewer`) in
75
77
  `review.md`/`seal.md`, each [engineering lane](#engineering-lanes) separately:
76
78
  `Outcome:` plus admitted account, or
77
- `Not-applicable: <inspected-scope reason>`. Spec/Code may cite valid unchanged
78
- `review.md` under [evidence validity](candidate-integrity.md#evidence-validity); persist no dispatch telemetry.
79
+ `Not-applicable: <inspected-scope reason>`. Seal cites, rather than re-dispatches, any
80
+ role `review.md` admitted on the identical candidate under
81
+ [evidence validity](candidate-integrity.md#evidence-validity); a changed digest or newly
82
+ triggered surface needs a fresh account. Persist no dispatch telemetry.
79
83
  7. Missing profile, null/failure, or malformed output is a `gap`; never
80
84
  infer approval or substitute inline review.
81
85
 
@@ -127,7 +131,8 @@ child's handle, path/resource ownership and capacity reservation until the
127
131
  native host confirms a terminal state and returned work has been reconciled.
128
132
  Query or wait on that handle; do not replace the child, release its slot, or
129
133
  reuse its resources while it may still run. If terminal state cannot be
130
- established, record a gap and retain ownership. A result classification alone
134
+ established, record a gap and retain ownership; for a child launched by an earlier
135
+ session, the claim proof below settles it. A result classification alone
131
136
  does not prove host termination.
132
137
 
133
138
  On resume (compaction or a new session), run `devrites-engine dispatch <slug>
@@ -135,7 +140,11 @@ status`, `parallel status`, and `claim list --all` before any dispatch. A read-o
135
140
  wave whose handles this session cannot query: `abandon` it, record each unreturned
136
141
  role `gap`, and re-dispatch fresh on the current digest; its late returns are
137
142
  `stale`. A writer keeps its claim and lease — no relaunch on those paths until the
138
- claim is released or its holder is proven terminal. A wright that never returned an
143
+ claim is released or its holder is proven terminal. For an unqueryable writer,
144
+ `claim list --all` showing its claim `released` or `dead` (the engine proved the
145
+ holding session exited on this host) is that proof: `abandon` the wave, record the
146
+ role `gap`, claim the paths, and re-dispatch without waiting on the launching
147
+ session. `live` or `expired` stays held. A wright that never returned an
139
148
  admitted result leaves unadmitted bytes: task-path changes since its pre-dispatch
140
149
  `git diff --name-only` baseline are never cited as built nor discarded, and are
141
150
  named in the re-dispatch contract; changes outside task paths stop for the human