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
@@ -223,8 +223,9 @@ project/decision docs, and authoritative dependency sources; make and record rev
223
223
  implementation/test choices. Ask only about product, scope, acceptance, architecture policy,
224
224
  irreversible risk, or human-only access/action.
225
225
 
226
- Objective test/build/tool failure runs bounded `devrites-debug-recovery`; fix it or record a
227
- technical blocker. Never ask permission for another attempt, test, parser repair, or probe.
226
+ Objective test/build/tool failure runs bounded `devrites-debug-recovery`; fix it, or escalate and
227
+ park it under the [retry contract](#retry-cap-no-progress-loops-and-self-resolve). Never ask
228
+ permission for another attempt, test, parser repair, or probe.
228
229
  Close decisions at the earliest informed phase: product in spec, coverage in clarify,
229
230
  scope/risk in temper, architecture/dependencies in define, and proof/toolchain in vet. Build
230
231
  keeps only unavailable-pre-code or mandatory action-time checkpoints.
@@ -375,6 +376,14 @@ access, safety and irreversible-action boundaries independently stop work.
375
376
  closes every deferred row with a labeled verdict; Seal blocks on any without one.
376
377
  **Failing case:** round 4 finds three Important items on clauses untouched since
377
378
  round 1 and dispatches another repair.
379
+ - **Recovery findings need a discriminator; recovery scope stays frozen.** While a
380
+ fingerprint is in recovery, a new Important finding keeps it open or opens another
381
+ only with an executed reproduction or a quoted AC/INV/PROH/accepted-DEC line whose
382
+ observable outcome fails; root turns it into a control the next wright must pass.
383
+ A static counterexample against plan-invented hardening goes to the Review trail or
384
+ `## Deferred findings` (Review gives it a verdict; Seal blocks without one). A
385
+ Critical with a concrete failure path always opens a fingerprint. A correction adds
386
+ no proof site or mechanism its fingerprint's closure does not need. No reviewer is skipped.
378
387
  - **Separate consumptive authority from recovery.** Spent one-shot authorization
379
388
  blocks another execution, not offline recovery. Retained evidence starts caller-owned
380
389
  diagnosis/correction immediately; the next consumptive execution needs fresh authority.
@@ -388,13 +397,19 @@ access, safety and irreversible-action boundaries independently stop work.
388
397
  the fingerprint's current *strategy*, not the work. Record that strategy and its
389
398
  attempts under `## Dead ends`, then the controlling caller escalates inline in the
390
399
  same invocation: re-diagnose from the reproduction and dead ends, take the first
391
- class below that still has an untried strategy, run `/rite-plan repair` plus
392
- narrow Vet for it, and resume with a fresh three-attempt budget. Classes, in order:
393
- (1) **shared root cause**: fix the owner every failing path routes through and
394
- enforce it across all callers instead of another local guard; (2) **boundary
395
- redesign**: acceptance-preserving reslice or redesign of the failing seam;
396
- (3) **diagnostic amplification**: add discriminating probes or fixtures, then
397
- correct from that evidence. A recorded strategy, or a rewording of one, never
400
+ class below that still has an untried strategy, and resume with a fresh
401
+ three-attempt budget. Re-plan only when the strategy must change a planning
402
+ input (writer allowlist, interface or contract, slice topology, or a
403
+ `test-plan.md` proof row): run `/rite-plan repair` plus narrow Vet for it. A
404
+ strategy that fits the vetted plan, with `devrites-engine check readiness <slug>`
405
+ still passing, goes straight to the wright with the dead ends in its contract;
406
+ Build's review and proof still gate it. Classes, in order, cheapest evidence
407
+ before costliest change: (1) **shared root cause**: fix the owner every failing
408
+ path routes through and enforce it across all callers instead of another local
409
+ guard; (2) **diagnostic amplification**: add discriminating probes or fixtures,
410
+ then correct from that evidence (last for a consumptive action, whose attempt
411
+ needs fresh authorization); (3) **boundary redesign**: acceptance-preserving
412
+ reslice or redesign of the failing seam, built on that evidence. A recorded strategy, or a rewording of one, never
398
413
  repeats. Escalation never weakens tests, validators or acceptance. Each
399
414
  fingerprint gets at most three escalations per activation; record each in
400
415
  `drift.md` with its class and strategy.
@@ -62,7 +62,9 @@ a human plus an agent) can share one working tree. Before a same-tree writer
62
62
  starts, it records an advisory claim — `devrites-engine claim add --session
63
63
  <id> <paths>` — retains the returned `<claim-id>`, then checks the same paths
64
64
  with `devrites-engine claim check --session <id> <paths>`; a held claim from a
65
- live foreign session is a stop-and-report, not a merge-later problem. On every
65
+ live foreign session is never merged later or overridden. Unattended, skip only
66
+ work that needs those paths, run independent work, and re-check `claim list --all`
67
+ before stopping; stop and report the holder only when nothing independent remains. On every
66
68
  host-confirmed terminal path after `add` ([unknown outcomes keep it](skill://devrites-lib/reference/parallel-dispatch.md#cancellation-and-terminal-reconciliation)) — return,
67
69
  rejected result, stop, or a launch refused with no handle — run
68
70
  `devrites-engine claim release --session <id> --id <claim-id>`. Claims expire
@@ -73,7 +75,9 @@ Claims cover product paths only; root-authored `.devrites/**` files use
73
75
  Expiry is not proof the holder stopped: size `claim add --ttl <minutes>` to the
74
76
  expected write (engine max 240) and re-add before it lapses; before writing, also
75
77
  read `claim list --all` — a foreign `expired` claim on overlapping paths whose
76
- session is not proven terminal counts as held (stop and report). **Failing case:**
78
+ session is not proven terminal counts as held (stop and report). `dead` (engine-proven
79
+ exited holder) or `released` is terminal: reconcile per
80
+ [§ Cancellation](skill://devrites-lib/reference/parallel-dispatch.md#cancellation-and-terminal-reconciliation). **Failing case:**
77
81
  session B's `claim check` passes at minute 35 over session A's still-running wright.
78
82
 
79
83
  ## Independence
@@ -163,6 +163,9 @@ A skill that stops without doing this leaves the workspace incomplete.
163
163
 
164
164
  Long contexts degrade reasoning quality. Act on context at **50-70% used, not 95%**.
165
165
 
166
+ Read the engine `context` bundle once per phase instead of re-reading the files it
167
+ contains; after compaction re-read the bundle, not its sources.
168
+
166
169
  Every rite names the single resume command on its action line; a `↻ Hygiene:` footer
167
170
  advises `/clear`, `/compact`, or `/rite-handoff` and never a competing command. Full phase-by-phase guidance:
168
171
  [`context-hygiene.md`](context-hygiene.md).
@@ -124,6 +124,9 @@ an error because the runner can never execute it.
124
124
  (an invariant the output must always satisfy) over example (one concrete
125
125
  input/output case). An example-shaped oracle on a property-shaped outcome is
126
126
  a weak gate — reviewers flag it even when it passes.
127
+ - One CHECK, one oracle: never chain another artifact's self-test before the
128
+ AC's oracle with `&&` — give the self-test its own gate, so a red self-test
129
+ never hides the AC's own result.
127
130
  - When an outcome becomes impossible, `gates abandon` it and route the
128
131
  handoff — never delete the row to make the ledger pass.
129
132
  - The gate set is the coverage denominator: it never shrinks to reach
@@ -250,6 +250,13 @@ Dismiss an irrelevant case with a reason; silently omitting an applicable case i
250
250
  - A flaky test is a broken test. Isolate and fix it immediately; don't paper over it with
251
251
  retries or `sleep`. **Failing case:** a known-flaky test is left with retries so the
252
252
  suite is paper-green at Prove/Seal → NO-GO.
253
+ - **A diagnostic rerun is allowed, never proof.** Rerun a timing-shaped failure on
254
+ the unchanged candidate to classify it flaky or deterministic before a repair;
255
+ record it as diagnostic, never as a pass.
256
+ - **Attributable RED.** A negative control or mutant counts RED only on a positive
257
+ marker from the targeted assertion; a setup, construction, or observation failure
258
+ is never credited as RED. Prove the classifier with an injected setup failure
259
+ that must stay uncredited.
253
260
  - **A retry-only pass is `flaky`, never green.** A pass earned by rerun on an unchanged
254
261
  candidate digest (no admitted correction between attempts), or by a runner retry
255
262
  setting, is `flaky`: record every attempt with the first attempt's outcome. It never
@@ -326,12 +326,16 @@ Epoch starts 1. `FAILED` records preimages/cleanup/epoch/fingerprint/reason/
326
326
  boundary/route/no-progress count. Resolved fingerprints close; a different
327
327
  invariant gets a distinct fingerprint. Handoff death resumes its retry epoch with
328
328
  prior rows immutable. `WA-OP-011/012` enforce independent fingerprint/epoch caps
329
- and terminal source cleanup. Exhaustion records:
329
+ and terminal source cleanup. Exhaustion closes this admission, not the work:
330
+ the controlling caller escalates it under the
331
+ [retry contract](afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve)
332
+ through `PLAN_VET_REPAIR`, and a re-vetted changed design re-admits under a new
333
+ identity with fresh epochs. A fully escalated fingerprint parks. Exhaustion records:
330
334
 
331
335
  ```text
332
- status=blocked
336
+ status=running
333
337
  exhaustion_cause=<same-fingerprint-count|total-epoch-limit>
334
- next_action=none — technical recovery exhausted; requires new evidence or changed failure conditions
338
+ next_action=/rite-plan repair <slug> — escalate exhausted workflow attempt
335
339
  ```
336
340
 
337
341
  The journal, evidence section, and observer retain that cause; epoch exhaustion
@@ -343,7 +347,7 @@ Precedence: busy owner; safety/access/approval gate; completed historical; activ
343
347
  journal; `CLEANED`; missing/stale authority; stale writer evidence; current
344
348
  admission. `PROVED|CLEANING` resumes cleanup; install-through-`PROVING`, rollback,
345
349
  or failure cleanup routes offline; retryable `FAILED` routes correction/retry;
346
- `EXHAUSTED` blocks; `PREPARING|PREPARED` resumes only with current authority.
350
+ `EXHAUSTED` escalates; `PREPARING|PREPARED` resumes only with current authority.
347
351
  There is no actor-history migration or backfill.
348
352
 
349
353
  |Route|Owner|Exact action|Durable state/status/next action|Cursor/output|
@@ -356,7 +360,7 @@ There is no actor-history migration or backfill.
356
360
  | `VERIFY_EXISTING`|controlling root|verify `CLEANED`, targets, proof, and product separation; do not reinstall|restore saved return phase/action|no retry/slice/action budget|
357
361
  | `NO_BACKFILL`|controlling root|no action|completed state unchanged|no new output|
358
362
  | `WAIT_ACTIVE_OWNER`|non-owner|no write; stop invocation|shared state unchanged|fixed owner-busy diagnostic|
359
- | `BLOCKED_EXHAUSTED`|controlling root|no attempt 4|blocked with exact exhausted next action|fixed exhausted diagnostic|
363
+ | `BLOCKED_EXHAUSTED`|controlling root|no attempt 4 on this admission; escalate through `PLAN_VET_REPAIR` or park per retry contract|`status=running`, exact exhausted `next_action`; parked keeps the parked-recovery action|fixed exhausted diagnostic; no intermediate reply|
360
364
  | `BLOCKED_GATE`|controlling root|follow existing safety/access/approval gate|gate-owned state|gate output; never reinterpret as retry|
361
365
 
362
366
  |Scenario ID|Trigger|Exact route / action|Durable consequence|Forbidden behavior|
@@ -422,7 +426,7 @@ pairs remain injective for actionable seams.
422
426
  | `devrites-debug-recovery/SKILL.md`|durable active failure or ambiguous admitted state|`OFFLINE_RECOVERY`; correct offline, re-preflight, narrow Vet, retry only under cap|saved caller or exact Plan/Vet route|
423
427
  | `rite-autocomplete/SKILL.md`|lifecycle cursor encounters admitted set or resumable journal|invoke classifier; execute returned route internally|saved phase/action; zero intermediate reply|
424
428
  | `rite-autocomplete/reference/loop.md`|loop tick sees Workflow Artifact trigger/state|invoke classifier once under owner lock; no actor-history migration|same loop cursor; no budget charge for verify/rerun|
425
- | `rite-autocomplete/reference/stop-conditions.md`|classifier returns owner-busy, exhausted, or existing hard gate|stop on exact `WAIT_ACTIVE_OWNER`, `BLOCKED_EXHAUSTED`, or `BLOCKED_GATE` result|unchanged cursor plus fixed route-owned output|
429
+ | `rite-autocomplete/reference/stop-conditions.md`|classifier returns owner-busy, exhausted, or existing hard gate|escalate `BLOCKED_EXHAUSTED`; on `WAIT_ACTIVE_OWNER` run independent work and recheck; stop on exact `BLOCKED_GATE` result|unchanged cursor plus fixed route-owned output|
426
430
  | `rite-build/SKILL.md`|Vet-ready admitted bytes require root authorship outside product wright|`ROOT_TRANSACTION`; root writes only admitted `.devrites/**` targets|saved Build slice cursor; wright product allowlist unchanged|
427
431
  | `rite-build/reference/phase-contract.md`|Build gate enters or resumes transaction|invoke canonical operation table; reconcile exact result|same slice/checkpoint cursor or Plan/Vet route|
428
432
  | `rite-prove/SKILL.md`|Prove consumes installed Workflow Artifact or `CLEANED` rerun|`VERIFY_EXISTING` or admitted proof path ending `PROVE_AND_RETURN`|saved Prove cursor; stop before real action|
@@ -237,7 +237,7 @@ slices; use `none` when they do not apply. Complexity above 3 triggers reslicing
237
237
  unless the stated reason makes the boundary irreducible. A Writer allowlist of 12+
238
238
  files prints an engine `ADVISORY size:` line (`check task-graph`, `check slice`;
239
239
  never blocking): split it acceptance-preserving, or add `Size rationale:` naming
240
- the inseparable capability.
240
+ the inseparable capability; `ADVISORY hub:` takes a seam slice or `Serial rationale:`.
241
241
 
242
242
  ## Read next by phase
243
243
 
@@ -108,8 +108,8 @@ executable controller/harness/bundle bytes or a missing writer, read
108
108
  `/rite-review` → `/rite-seal`. Read and execute each skill; durable files, not
109
109
  chat, carry state. Apply the mutable post-vet budget before first Build.
110
110
  Build runs the largest eligible path-disjoint batch (cap: this invocation's
111
- `--parallel N`, else sentinel `max_parallel`, else 10) and recomputes after
112
- every completed round until no pending slice remains; a one-slice round is serial for that round only, then
111
+ `--parallel N`, else sentinel `max_parallel`, else 10) and refills a slot
112
+ per landing until no pending slice remains; a one-slice round is serial for that round only, then
113
113
  selection runs again (host isolation still forces serial when concurrent writers
114
114
  cannot be separated). When `--parallel N`
115
115
  is present, pass it into `/rite-build` and do not consult leftover sentinel
@@ -67,7 +67,7 @@ Workspace files carry state; chat does not. Read and execute each phase skill:
67
67
  | 3 | `/rite-temper` | harden or reduce; `expand` and extra acceptance stop for a human; irreversible risk still pauses |
68
68
  | 4 | `/rite-define` | approved plan/tasks/traceability |
69
69
  | 5 | `/rite-vet` | every plan; derive mutable budget after READY |
70
- | 6 | `/rite-build` batch loop | largest eligible path-disjoint set (cap: this invocation's `--parallel N`, else sentinel `max_parallel`, else 10; one-slice round when <2 eligible); recompute after each round; charge once per green built slice |
70
+ | 6 | `/rite-build` batch loop | largest eligible path-disjoint set (cap: this invocation's `--parallel N`, else sentinel `max_parallel`, else 10; one-slice round when <2 eligible); refill per landing; charge once per landed slice |
71
71
  | 7 | `/rite-prove` | all slices built; approved proof; recovery on red |
72
72
  | 8 | `/rite-polish` | re-prove after code edits |
73
73
  | 9 | `/rite-review` | in-scope correction then fresh proof |
@@ -38,7 +38,7 @@ Agent-owned backtracking is not a stop condition while the exact causal
38
38
  fingerprint has budget. Invoke the earlier phase, affected Vet, remediation, and
39
39
  proof; then resume the origin. Three no-progress corrections of that exact
40
40
  fingerprint spend only its current strategy: escalate to the next correction
41
- class inline (shared root cause, boundary redesign, diagnostic amplification)
41
+ class inline (shared root cause, diagnostic amplification, boundary redesign)
42
42
  with a fresh budget, never asking permission. After three escalations in this
43
43
  activation the fingerprint parks; finish all independent work, then stop once.
44
44
  Preserve reproduction, attempts, and dead ends; never offer `/rite-plan unblock`
@@ -58,7 +58,7 @@ amplification Plan repair and narrow Vet inline, then pause for fresh GO before
58
58
  one evidence-acquisition attempt. Without a safe seam, escalate to the next
59
59
  class or park; only a real human/risk/scope gate stops for a human.
60
60
 
61
- <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"classifier returns owner-busy, exhausted, or existing hard gate","action":"stop on exact WAIT_ACTIVE_OWNER, BLOCKED_EXHAUSTED, or BLOCKED_GATE result","return":"unchanged cursor plus fixed route-owned output"} -->
61
+ <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"classifier returns owner-busy, exhausted, or existing hard gate","action":"escalate BLOCKED_EXHAUSTED; on WAIT_ACTIVE_OWNER run independent work and recheck; stop on exact BLOCKED_GATE result","return":"unchanged cursor plus fixed route-owned output"} -->
62
62
  ## Other stop classes
63
63
 
64
64
  - **Gate severity:** escalating always stops. Blocking with a ranked recommended
@@ -85,6 +85,10 @@ class or park; only a real human/risk/scope gate stops for a human.
85
85
  pre-existing remaining value, explicit flag, sentinel cap, or post-vet pending count
86
86
  does not stop. Zero with no pending slices is normal completion.
87
87
  Malformed flag stops before any write.
88
+ - **Foreign writer:** a `live`/`expired` claim or `WAIT_ACTIVE_OWNER` held by
89
+ another session blocks only work on those paths; run independent work, re-check,
90
+ and stop only when nothing independent remains. `released`/`dead` claims are
91
+ reconciled per [§ Cancellation](skill://devrites-lib/reference/parallel-dispatch.md#cancellation-and-terminal-reconciliation).
88
92
  - **Resource envelope:** overlapping run or missing AFK after arm still stops.
89
93
  Do not stop on `--max-slices`, `max_agents`, `max_minutes`, or `max_review_queue`.
90
94
  - **Confidence:** intent still cannot become testable acceptance after interview.
@@ -75,15 +75,15 @@ Wright applies anti-slop; root verifies returns and never patches source. Refuse
75
75
 
76
76
  Omitted/`1` ≡ serial; `2`–`10` is a **cap** — the root runs the largest eligible
77
77
  path-disjoint set it can start now (`N_eff`), takes fewer when the cap cannot be
78
- filled, and recomputes after every completed round (serial slice or parallel
79
- integrate) until no pending slice remains
78
+ filled, and refills a slot per landing (serial slice or one sibling) until
79
+ no pending slice remains
80
80
  ([`parallel-batch.md` § Dynamic selection](reference/parallel-batch.md#dynamic-selection-and-re-batching)).
81
- Unattended runs (`/rite-autocomplete`, `.devrites/AFK` `max_parallel`) repeat batches
82
- inside the same run; HITL stops after each batch. This invocation's `--parallel N`
81
+ Unattended runs (`/rite-autocomplete`, `.devrites/AFK` `max_parallel`) refill
82
+ inside the same run; HITL stops after each landing. This invocation's `--parallel N`
83
83
  is the cap: leftover sentinel `max_parallel` is not consulted. Autocomplete with
84
84
  that flag also writes or replaces only `max_parallel: N`. Non-integer/`N≤0`/`N>10` hard refuse.
85
- All-green (independent review + proof) then integrate as one local `WIP(<slug>):`
86
- commit per sibling onto the current control branch (never pushed). Do not
85
+ Each sibling lands alone when its review + proof are green (`integrate --slice`):
86
+ one local `WIP(<slug>):` commit onto the control branch (never pushed). Do not
87
87
  integrate a sibling because the wright returned. A red/gap sibling gets a bounded repair
88
88
  round in its own worktree — never rebuilt from scratch while budget remains.
89
89
  Post-writer inventory and affected rechecks follow `phase-contract.md` § Independent
@@ -94,7 +94,7 @@ a human `Fix`. Exhausted repair blocks and preserves everything;
94
94
  `cleanup --force` salvages slice branches before removing worktrees —
95
95
  human-gated to abandon a batch, orchestrator-emitted only as the salvage
96
96
  step of an automatic frozen-lease re-batch.
97
- AFK charges after integrate only. Running lease blocks another
97
+ AFK charges per landed sibling only. Running lease blocks another
98
98
  `/rite-build`. Details: `parallel-batch.md`.
99
99
 
100
100
  ## Execute and reply
@@ -44,8 +44,8 @@ The controlling root owns the cap:
44
44
  before the next dispatch.
45
45
  - **Serial:** charge when fail-on-red is green and the built record is written
46
46
  (same rewrite as step 2).
47
- - **Parallel `--parallel`:** charge only after **successful serial integrate**
48
- — once per integrated green sibling. Abort / integrate-failed → charge **0**.
47
+ - **Parallel `--parallel`:** charge only after **successful integrate**
48
+ — once per landed green sibling. Abort / integrate-failed → charge **0**.
49
49
  Do not charge on worktree-green before integrate. See
50
50
  [`parallel-batch.md`](parallel-batch.md).
51
51
 
@@ -18,7 +18,7 @@ the orchestrator pauses for approval before landing it.
18
18
  and fail-on-red proof are green, with no open Critical/Important and no repair
19
19
  wright still in flight. Serial: git recipe below (skip empty index) or isolated
20
20
  FF of a matching `transfer_commit`. Parallel: `devrites-engine parallel
21
- integrate --apply-to-control` (no second control `git commit`).
21
+ integrate --slice <id> --apply-to-control` (no second control `git commit`).
22
22
  - **Do not:** when a wright returns; before review/proof; with red/gap findings;
23
23
  fast-forward an isolated transfer onto control before those checks.
24
24
 
@@ -22,13 +22,14 @@ DISPATCH → hand the slice contract to devrites-slice-wright (fresh context).
22
22
  — dispatch the initial read-only reviews of distinct decisions in parallel
23
23
  (independent claims, fresh contexts); wright fixes stay serial — writers share files
24
24
  PROVE → root, concurrent with the reviews on the same frozen candidate:
25
- required build/browser/E2E, then returned-diff/path recheck; fail-on-red
25
+ required build/browser/E2E (narrow self-check/smoke first, full gate only
26
+ after it is green, long runs in the background), then returned-diff/path recheck; fail-on-red
26
27
  (red/gap → repair wright, then re-review and re-prove; do not commit yet)
27
28
  RECORD → orchestrator: after green verification, update state.md/evidence.md and
28
29
  upsert the authoritative candidate manifest from the actual scoped diff
29
30
  (CHECKPOINT) → only now, with review+proof green: local WIP(<slug>): <imperative summary>
30
31
  on the control branch (no slice id) → checkpoint.md
31
- NEXT → HITL root reports and stops. AFK with parallel cap>1: return to parallel-batch selection and run the new N_eff; otherwise repeat under afk-discipline.md
32
+ NEXT → HITL root reports and stops. AFK with parallel cap>1: return to parallel-batch selection to refill; otherwise repeat under afk-discipline.md
32
33
  ```
33
34
 
34
35
  ## Why the boundary matters
@@ -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](skill://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](skill://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 --skills-root .omp/skills <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 `.omp/skills/devrites-lib/reference/standar
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 `.omp/skills/devrites-lib/reference/standar
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 --skills-root .omp/skills <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).