devrites 5.4.0 → 5.6.0

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 (490) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +8 -6
  3. package/docs/command-map.md +2 -2
  4. package/docs/engine/state-schema.md +12 -0
  5. package/docs/flow.md +4 -0
  6. package/docs/orchestration.md +5 -2
  7. package/engine/commands.go +2 -2
  8. package/engine/internal/devritespaths/paths.go +18 -0
  9. package/engine/internal/gate/gate.go +78 -0
  10. package/engine/internal/gate/gate_test.go +118 -0
  11. package/engine/internal/hostpack/hostpack.go +45 -6
  12. package/engine/internal/hostpack/hostpack_test.go +29 -13
  13. package/engine/internal/install/apply.go +14 -5
  14. package/engine/internal/install/install.go +8 -2
  15. package/engine/internal/install/install_test.go +12 -5
  16. package/engine/internal/install/merge.go +5 -0
  17. package/engine/internal/install/preflight.go +20 -2
  18. package/engine/internal/install/uninstall.go +5 -0
  19. package/engine/internal/install/update.go +1 -1
  20. package/engine/internal/lib/candidate.go +7 -3
  21. package/engine/internal/lib/manifest_union.go +326 -0
  22. package/engine/internal/lib/manifest_union_test.go +214 -0
  23. package/engine/internal/lib/observe_budgets.go +73 -0
  24. package/engine/internal/lib/observe_budgets_test.go +142 -0
  25. package/engine/internal/lib/observe_summary.go +74 -13
  26. package/engine/internal/lib/workspace_read.go +11 -6
  27. package/engine/internal/state/budgets.go +163 -0
  28. package/engine/internal/state/budgets_test.go +42 -0
  29. package/engine/internal/state/cursor.go +16 -10
  30. package/engine/internal/state/observation.go +50 -4
  31. package/engine/internal/state/status.go +38 -26
  32. package/engine/internal/state/taskgraph.go +23 -0
  33. package/engine/main.go +32 -13
  34. package/engine/root_routing_test.go +3 -1
  35. package/install.sh +4 -1
  36. package/pack/.claude/agents/devrites-code-reviewer.md +9 -6
  37. package/pack/.claude/agents/devrites-doubt-reviewer.md +6 -0
  38. package/pack/.claude/agents/devrites-plan-reviewer.md +7 -1
  39. package/pack/.claude/agents/devrites-slice-wright.md +42 -46
  40. package/pack/.claude/agents/devrites-test-analyst.md +9 -4
  41. package/pack/.claude/agents/devrites-upgrade-planner.md +9 -1
  42. package/pack/.claude/settings.json +17 -0
  43. package/pack/.claude/skills/devrites-api-interface/SKILL.md +2 -2
  44. package/pack/.claude/skills/devrites-doubt/SKILL.md +9 -17
  45. package/pack/.claude/skills/devrites-lib/reference/candidate-integrity.md +34 -35
  46. package/pack/.claude/skills/devrites-lib/reference/parallel-dispatch.md +11 -12
  47. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +104 -51
  48. package/pack/.claude/skills/devrites-lib/reference/standards/agents.md +1 -0
  49. package/pack/.claude/skills/devrites-lib/reference/standards/context-hygiene.md +45 -25
  50. package/pack/.claude/skills/devrites-lib/reference/standards/core.md +1 -1
  51. package/pack/.claude/skills/devrites-lib/reference/workspace-artifact-schema.md +80 -41
  52. package/pack/.claude/skills/rite-autocomplete/SKILL.md +19 -8
  53. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +33 -1
  54. package/pack/.claude/skills/rite-build/SKILL.md +26 -19
  55. package/pack/.claude/skills/rite-build/reference/afk-discipline.md +1 -1
  56. package/pack/.claude/skills/rite-build/reference/parallel-batch.md +90 -40
  57. package/pack/.claude/skills/rite-build/reference/phase-contract.md +79 -59
  58. package/pack/.claude/skills/rite-build/reference/spec-drift-guard.md +14 -15
  59. package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +8 -8
  60. package/pack/.claude/skills/rite-define/SKILL.md +4 -1
  61. package/pack/.claude/skills/rite-plan/SKILL.md +4 -1
  62. package/pack/.claude/skills/rite-plan/reference/replan-and-repair.md +21 -0
  63. package/pack/.claude/skills/rite-plan/reference/slicing.md +117 -15
  64. package/pack/.claude/skills/rite-prove/SKILL.md +20 -22
  65. package/pack/.claude/skills/rite-review/SKILL.md +23 -16
  66. package/pack/.claude/skills/rite-seal/SKILL.md +8 -8
  67. package/pack/.claude/skills/rite-seal/reference/final-evidence.md +6 -5
  68. package/pack/.claude/skills/rite-seal/reference/phase-contract.md +13 -13
  69. package/pack/.claude/skills/rite-ship/SKILL.md +3 -0
  70. package/pack/.claude/skills/rite-ship/reference/close-out.md +16 -2
  71. package/pack/.claude/skills/rite-ship/reference/git-ship.md +14 -5
  72. package/pack/.claude/skills/rite-spec/SKILL.md +6 -0
  73. package/pack/.claude/skills/rite-spec/reference/state-workspace.md +6 -0
  74. package/pack/.claude/skills/rite-status/SKILL.md +4 -1
  75. package/pack/.claude/skills/rite-temper/SKILL.md +14 -11
  76. package/pack/.claude/skills/rite-temper/reference/anti-patterns.md +14 -13
  77. package/pack/.claude/skills/rite-temper/reference/review-dimensions.md +3 -4
  78. package/pack/.claude/skills/rite-upgrade/SKILL.md +11 -2
  79. package/pack/.claude/skills/rite-vet/SKILL.md +22 -15
  80. package/pack/.claude/skills/rite-vet/reference/anti-patterns.md +11 -9
  81. package/pack/.claude/skills/rite-vet/reference/depth.md +6 -7
  82. package/pack/.claude/skills/rite-vet/reference/review-axes.md +39 -14
  83. package/pack/generated/README.md +5 -1
  84. package/pack/generated/claude/agents/devrites-code-reviewer.md +9 -6
  85. package/pack/generated/claude/agents/devrites-doubt-reviewer.md +6 -0
  86. package/pack/generated/claude/agents/devrites-plan-reviewer.md +7 -1
  87. package/pack/generated/claude/agents/devrites-slice-wright.md +42 -46
  88. package/pack/generated/claude/agents/devrites-test-analyst.md +9 -4
  89. package/pack/generated/claude/agents/devrites-upgrade-planner.md +9 -1
  90. package/pack/generated/claude/settings.json +17 -0
  91. package/pack/generated/claude/skills/devrites-api-interface/SKILL.md +2 -2
  92. package/pack/generated/claude/skills/devrites-doubt/SKILL.md +9 -17
  93. package/pack/generated/claude/skills/devrites-lib/reference/candidate-integrity.md +34 -35
  94. package/pack/generated/claude/skills/devrites-lib/reference/parallel-dispatch.md +11 -12
  95. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +104 -51
  96. package/pack/generated/claude/skills/devrites-lib/reference/standards/agents.md +1 -0
  97. package/pack/generated/claude/skills/devrites-lib/reference/standards/context-hygiene.md +45 -25
  98. package/pack/generated/claude/skills/devrites-lib/reference/standards/core.md +1 -1
  99. package/pack/generated/claude/skills/devrites-lib/reference/workspace-artifact-schema.md +80 -41
  100. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +19 -8
  101. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +33 -1
  102. package/pack/generated/claude/skills/rite-build/SKILL.md +26 -19
  103. package/pack/generated/claude/skills/rite-build/reference/afk-discipline.md +1 -1
  104. package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +90 -40
  105. package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +79 -59
  106. package/pack/generated/claude/skills/rite-build/reference/spec-drift-guard.md +14 -15
  107. package/pack/generated/claude/skills/rite-build/reference/wright-dispatch.md +8 -8
  108. package/pack/generated/claude/skills/rite-define/SKILL.md +4 -1
  109. package/pack/generated/claude/skills/rite-plan/SKILL.md +4 -1
  110. package/pack/generated/claude/skills/rite-plan/reference/replan-and-repair.md +21 -0
  111. package/pack/generated/claude/skills/rite-plan/reference/slicing.md +117 -15
  112. package/pack/generated/claude/skills/rite-prove/SKILL.md +20 -22
  113. package/pack/generated/claude/skills/rite-review/SKILL.md +23 -16
  114. package/pack/generated/claude/skills/rite-seal/SKILL.md +8 -8
  115. package/pack/generated/claude/skills/rite-seal/reference/final-evidence.md +6 -5
  116. package/pack/generated/claude/skills/rite-seal/reference/phase-contract.md +13 -13
  117. package/pack/generated/claude/skills/rite-ship/SKILL.md +3 -0
  118. package/pack/generated/claude/skills/rite-ship/reference/close-out.md +16 -2
  119. package/pack/generated/claude/skills/rite-ship/reference/git-ship.md +14 -5
  120. package/pack/generated/claude/skills/rite-spec/SKILL.md +6 -0
  121. package/pack/generated/claude/skills/rite-spec/reference/state-workspace.md +6 -0
  122. package/pack/generated/claude/skills/rite-status/SKILL.md +4 -1
  123. package/pack/generated/claude/skills/rite-temper/SKILL.md +14 -11
  124. package/pack/generated/claude/skills/rite-temper/reference/anti-patterns.md +14 -13
  125. package/pack/generated/claude/skills/rite-temper/reference/review-dimensions.md +3 -4
  126. package/pack/generated/claude/skills/rite-upgrade/SKILL.md +11 -2
  127. package/pack/generated/claude/skills/rite-vet/SKILL.md +22 -15
  128. package/pack/generated/claude/skills/rite-vet/reference/anti-patterns.md +11 -9
  129. package/pack/generated/claude/skills/rite-vet/reference/depth.md +6 -7
  130. package/pack/generated/claude/skills/rite-vet/reference/review-axes.md +39 -14
  131. package/pack/generated/codex/agents/devrites-code-reviewer.toml +9 -6
  132. package/pack/generated/codex/agents/devrites-doubt-reviewer.toml +6 -0
  133. package/pack/generated/codex/agents/devrites-plan-reviewer.toml +7 -1
  134. package/pack/generated/codex/agents/devrites-slice-wright.toml +42 -46
  135. package/pack/generated/codex/agents/devrites-test-analyst.toml +9 -4
  136. package/pack/generated/codex/agents/devrites-upgrade-planner.toml +9 -1
  137. package/pack/generated/codex/skills/devrites-api-interface/SKILL.md +2 -2
  138. package/pack/generated/codex/skills/devrites-doubt/SKILL.md +9 -17
  139. package/pack/generated/codex/skills/devrites-lib/reference/candidate-integrity.md +34 -35
  140. package/pack/generated/codex/skills/devrites-lib/reference/parallel-dispatch.md +11 -12
  141. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +104 -51
  142. package/pack/generated/codex/skills/devrites-lib/reference/standards/agents.md +1 -0
  143. package/pack/generated/codex/skills/devrites-lib/reference/standards/context-hygiene.md +45 -25
  144. package/pack/generated/codex/skills/devrites-lib/reference/standards/core.md +1 -1
  145. package/pack/generated/codex/skills/devrites-lib/reference/workspace-artifact-schema.md +80 -41
  146. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +19 -8
  147. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +33 -1
  148. package/pack/generated/codex/skills/rite-build/SKILL.md +26 -19
  149. package/pack/generated/codex/skills/rite-build/reference/afk-discipline.md +1 -1
  150. package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +90 -40
  151. package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +79 -59
  152. package/pack/generated/codex/skills/rite-build/reference/spec-drift-guard.md +14 -15
  153. package/pack/generated/codex/skills/rite-build/reference/wright-dispatch.md +8 -8
  154. package/pack/generated/codex/skills/rite-define/SKILL.md +4 -1
  155. package/pack/generated/codex/skills/rite-plan/SKILL.md +4 -1
  156. package/pack/generated/codex/skills/rite-plan/reference/replan-and-repair.md +21 -0
  157. package/pack/generated/codex/skills/rite-plan/reference/slicing.md +117 -15
  158. package/pack/generated/codex/skills/rite-prove/SKILL.md +20 -22
  159. package/pack/generated/codex/skills/rite-review/SKILL.md +23 -16
  160. package/pack/generated/codex/skills/rite-seal/SKILL.md +8 -8
  161. package/pack/generated/codex/skills/rite-seal/reference/final-evidence.md +6 -5
  162. package/pack/generated/codex/skills/rite-seal/reference/phase-contract.md +13 -13
  163. package/pack/generated/codex/skills/rite-ship/SKILL.md +3 -0
  164. package/pack/generated/codex/skills/rite-ship/reference/close-out.md +16 -2
  165. package/pack/generated/codex/skills/rite-ship/reference/git-ship.md +14 -5
  166. package/pack/generated/codex/skills/rite-spec/SKILL.md +6 -0
  167. package/pack/generated/codex/skills/rite-spec/reference/state-workspace.md +6 -0
  168. package/pack/generated/codex/skills/rite-status/SKILL.md +4 -1
  169. package/pack/generated/codex/skills/rite-temper/SKILL.md +14 -11
  170. package/pack/generated/codex/skills/rite-temper/reference/anti-patterns.md +14 -13
  171. package/pack/generated/codex/skills/rite-temper/reference/review-dimensions.md +3 -4
  172. package/pack/generated/codex/skills/rite-upgrade/SKILL.md +11 -2
  173. package/pack/generated/codex/skills/rite-vet/SKILL.md +22 -15
  174. package/pack/generated/codex/skills/rite-vet/reference/anti-patterns.md +11 -9
  175. package/pack/generated/codex/skills/rite-vet/reference/depth.md +6 -7
  176. package/pack/generated/codex/skills/rite-vet/reference/review-axes.md +39 -14
  177. package/pack/generated/omp/agents/devrites-code-reviewer.md +9 -6
  178. package/pack/generated/omp/agents/devrites-doubt-reviewer.md +6 -0
  179. package/pack/generated/omp/agents/devrites-plan-reviewer.md +7 -1
  180. package/pack/generated/omp/agents/devrites-slice-wright.md +42 -46
  181. package/pack/generated/omp/agents/devrites-test-analyst.md +9 -4
  182. package/pack/generated/omp/agents/devrites-upgrade-planner.md +9 -1
  183. package/pack/generated/omp/skills/devrites-api-interface/SKILL.md +2 -2
  184. package/pack/generated/omp/skills/devrites-doubt/SKILL.md +9 -17
  185. package/pack/generated/omp/skills/devrites-lib/reference/candidate-integrity.md +34 -35
  186. package/pack/generated/omp/skills/devrites-lib/reference/parallel-dispatch.md +11 -12
  187. package/pack/generated/omp/skills/devrites-lib/reference/standards/afk-hitl.md +104 -51
  188. package/pack/generated/omp/skills/devrites-lib/reference/standards/agents.md +1 -0
  189. package/pack/generated/omp/skills/devrites-lib/reference/standards/context-hygiene.md +45 -25
  190. package/pack/generated/omp/skills/devrites-lib/reference/standards/core.md +1 -1
  191. package/pack/generated/omp/skills/devrites-lib/reference/workspace-artifact-schema.md +80 -41
  192. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +19 -8
  193. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +33 -1
  194. package/pack/generated/omp/skills/rite-build/SKILL.md +26 -19
  195. package/pack/generated/omp/skills/rite-build/reference/afk-discipline.md +1 -1
  196. package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +90 -40
  197. package/pack/generated/omp/skills/rite-build/reference/phase-contract.md +79 -59
  198. package/pack/generated/omp/skills/rite-build/reference/spec-drift-guard.md +14 -15
  199. package/pack/generated/omp/skills/rite-build/reference/wright-dispatch.md +8 -8
  200. package/pack/generated/omp/skills/rite-define/SKILL.md +4 -1
  201. package/pack/generated/omp/skills/rite-plan/SKILL.md +4 -1
  202. package/pack/generated/omp/skills/rite-plan/reference/replan-and-repair.md +21 -0
  203. package/pack/generated/omp/skills/rite-plan/reference/slicing.md +117 -15
  204. package/pack/generated/omp/skills/rite-prove/SKILL.md +20 -22
  205. package/pack/generated/omp/skills/rite-review/SKILL.md +23 -16
  206. package/pack/generated/omp/skills/rite-seal/SKILL.md +8 -8
  207. package/pack/generated/omp/skills/rite-seal/reference/final-evidence.md +6 -5
  208. package/pack/generated/omp/skills/rite-seal/reference/phase-contract.md +13 -13
  209. package/pack/generated/omp/skills/rite-ship/SKILL.md +3 -0
  210. package/pack/generated/omp/skills/rite-ship/reference/close-out.md +16 -2
  211. package/pack/generated/omp/skills/rite-ship/reference/git-ship.md +14 -5
  212. package/pack/generated/omp/skills/rite-spec/SKILL.md +6 -0
  213. package/pack/generated/omp/skills/rite-spec/reference/state-workspace.md +6 -0
  214. package/pack/generated/omp/skills/rite-status/SKILL.md +4 -1
  215. package/pack/generated/omp/skills/rite-temper/SKILL.md +14 -11
  216. package/pack/generated/omp/skills/rite-temper/reference/anti-patterns.md +14 -13
  217. package/pack/generated/omp/skills/rite-temper/reference/review-dimensions.md +3 -4
  218. package/pack/generated/omp/skills/rite-upgrade/SKILL.md +11 -2
  219. package/pack/generated/omp/skills/rite-vet/SKILL.md +22 -15
  220. package/pack/generated/omp/skills/rite-vet/reference/anti-patterns.md +11 -9
  221. package/pack/generated/omp/skills/rite-vet/reference/depth.md +6 -7
  222. package/pack/generated/omp/skills/rite-vet/reference/review-axes.md +39 -14
  223. package/pack/generated/pi/AGENTS.md +22 -0
  224. package/pack/generated/pi/agents/devrites-code-reviewer.md +142 -0
  225. package/pack/generated/pi/agents/devrites-devex-reviewer.md +124 -0
  226. package/pack/generated/pi/agents/devrites-doubt-reviewer.md +88 -0
  227. package/pack/generated/pi/agents/devrites-evidence-scout.md +72 -0
  228. package/pack/generated/pi/agents/devrites-frontend-reviewer.md +116 -0
  229. package/pack/generated/pi/agents/devrites-performance-reviewer.md +115 -0
  230. package/pack/generated/pi/agents/devrites-plan-drafter.md +99 -0
  231. package/pack/generated/pi/agents/devrites-plan-reviewer.md +142 -0
  232. package/pack/generated/pi/agents/devrites-proof-runner.md +74 -0
  233. package/pack/generated/pi/agents/devrites-retrospector.md +61 -0
  234. package/pack/generated/pi/agents/devrites-security-auditor.md +109 -0
  235. package/pack/generated/pi/agents/devrites-simplifier-reviewer.md +94 -0
  236. package/pack/generated/pi/agents/devrites-slice-wright.md +204 -0
  237. package/pack/generated/pi/agents/devrites-spec-reviewer.md +96 -0
  238. package/pack/generated/pi/agents/devrites-strategy-reviewer.md +100 -0
  239. package/pack/generated/pi/agents/devrites-test-analyst.md +94 -0
  240. package/pack/generated/pi/agents/devrites-upgrade-planner.md +89 -0
  241. package/pack/generated/pi/prompts/rite-adopt.md +5 -0
  242. package/pack/generated/pi/prompts/rite-autocomplete.md +5 -0
  243. package/pack/generated/pi/prompts/rite-build.md +5 -0
  244. package/pack/generated/pi/prompts/rite-clarify.md +5 -0
  245. package/pack/generated/pi/prompts/rite-converge.md +5 -0
  246. package/pack/generated/pi/prompts/rite-customize.md +5 -0
  247. package/pack/generated/pi/prompts/rite-define.md +5 -0
  248. package/pack/generated/pi/prompts/rite-doctor.md +5 -0
  249. package/pack/generated/pi/prompts/rite-dogfood.md +5 -0
  250. package/pack/generated/pi/prompts/rite-explain.md +5 -0
  251. package/pack/generated/pi/prompts/rite-frame.md +5 -0
  252. package/pack/generated/pi/prompts/rite-handoff.md +5 -0
  253. package/pack/generated/pi/prompts/rite-learn.md +5 -0
  254. package/pack/generated/pi/prompts/rite-plan.md +5 -0
  255. package/pack/generated/pi/prompts/rite-polish.md +5 -0
  256. package/pack/generated/pi/prompts/rite-pov.md +5 -0
  257. package/pack/generated/pi/prompts/rite-pr-feedback.md +5 -0
  258. package/pack/generated/pi/prompts/rite-pressure-test.md +5 -0
  259. package/pack/generated/pi/prompts/rite-prototype.md +5 -0
  260. package/pack/generated/pi/prompts/rite-prove.md +5 -0
  261. package/pack/generated/pi/prompts/rite-quick.md +5 -0
  262. package/pack/generated/pi/prompts/rite-resolve.md +5 -0
  263. package/pack/generated/pi/prompts/rite-review.md +5 -0
  264. package/pack/generated/pi/prompts/rite-seal.md +5 -0
  265. package/pack/generated/pi/prompts/rite-ship.md +5 -0
  266. package/pack/generated/pi/prompts/rite-spec.md +5 -0
  267. package/pack/generated/pi/prompts/rite-status.md +5 -0
  268. package/pack/generated/pi/prompts/rite-temper.md +5 -0
  269. package/pack/generated/pi/prompts/rite-upgrade.md +5 -0
  270. package/pack/generated/pi/prompts/rite-vet.md +5 -0
  271. package/pack/generated/pi/prompts/rite-watch-pr.md +5 -0
  272. package/pack/generated/pi/prompts/rite-zoom-out.md +5 -0
  273. package/pack/generated/pi/prompts/rite.md +5 -0
  274. package/pack/generated/pi/skills/devrites-api-interface/SKILL.md +63 -0
  275. package/pack/generated/pi/skills/devrites-audit/SKILL.md +50 -0
  276. package/pack/generated/pi/skills/devrites-browser-proof/SKILL.md +76 -0
  277. package/pack/generated/pi/skills/devrites-browser-proof/reference/browser-performance.md +15 -0
  278. package/pack/generated/pi/skills/devrites-browser-proof/reference/visual-verdict.md +34 -0
  279. package/pack/generated/pi/skills/devrites-debug-recovery/SKILL.md +96 -0
  280. package/pack/generated/pi/skills/devrites-debug-recovery/reference/build-the-loop.md +58 -0
  281. package/pack/generated/pi/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +34 -0
  282. package/pack/generated/pi/skills/devrites-debug-recovery/reference/hypotheses.md +17 -0
  283. package/pack/generated/pi/skills/devrites-debug-recovery/reference/instrumentation.md +21 -0
  284. package/pack/generated/pi/skills/devrites-debug-recovery/reference/regression-test.md +30 -0
  285. package/pack/generated/pi/skills/devrites-debug-recovery/reference/trace.md +25 -0
  286. package/pack/generated/pi/skills/devrites-doubt/SKILL.md +79 -0
  287. package/pack/generated/pi/skills/devrites-frontend-craft/SKILL.md +86 -0
  288. package/pack/generated/pi/skills/devrites-frontend-craft/reference/craft.md +63 -0
  289. package/pack/generated/pi/skills/devrites-frontend-craft/reference/design-references.md +116 -0
  290. package/pack/generated/pi/skills/devrites-frontend-craft/reference/fullstack.md +46 -0
  291. package/pack/generated/pi/skills/devrites-frontend-craft/reference/quality-standards.md +294 -0
  292. package/pack/generated/pi/skills/devrites-frontend-craft/reference/reuse-first.md +53 -0
  293. package/pack/generated/pi/skills/devrites-frontend-craft/reference/shape.md +56 -0
  294. package/pack/generated/pi/skills/devrites-interview/SKILL.md +102 -0
  295. package/pack/generated/pi/skills/devrites-lib/SKILL.md +58 -0
  296. package/pack/generated/pi/skills/devrites-lib/reference/candidate-integrity.md +42 -0
  297. package/pack/generated/pi/skills/devrites-lib/reference/intent-map.md +64 -0
  298. package/pack/generated/pi/skills/devrites-lib/reference/orchestration-profiles.md +27 -0
  299. package/pack/generated/pi/skills/devrites-lib/reference/parallel-dispatch.md +73 -0
  300. package/pack/generated/pi/skills/devrites-lib/reference/reply-contract.md +88 -0
  301. package/pack/generated/pi/skills/devrites-lib/reference/standards/README.md +60 -0
  302. package/pack/generated/pi/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md +30 -0
  303. package/pack/generated/pi/skills/devrites-lib/reference/standards/afk-hitl.md +398 -0
  304. package/pack/generated/pi/skills/devrites-lib/reference/standards/agents.md +99 -0
  305. package/pack/generated/pi/skills/devrites-lib/reference/standards/anti-patterns.md +48 -0
  306. package/pack/generated/pi/skills/devrites-lib/reference/standards/browser-proof-checklist.md +24 -0
  307. package/pack/generated/pi/skills/devrites-lib/reference/standards/ci-cd.md +50 -0
  308. package/pack/generated/pi/skills/devrites-lib/reference/standards/code-navigation.md +43 -0
  309. package/pack/generated/pi/skills/devrites-lib/reference/standards/code-review.md +108 -0
  310. package/pack/generated/pi/skills/devrites-lib/reference/standards/coding-style.md +48 -0
  311. package/pack/generated/pi/skills/devrites-lib/reference/standards/context-hygiene.md +109 -0
  312. package/pack/generated/pi/skills/devrites-lib/reference/standards/core.md +167 -0
  313. package/pack/generated/pi/skills/devrites-lib/reference/standards/data-integrity.md +118 -0
  314. package/pack/generated/pi/skills/devrites-lib/reference/standards/debug-recovery.md +28 -0
  315. package/pack/generated/pi/skills/devrites-lib/reference/standards/definition-of-done.md +19 -0
  316. package/pack/generated/pi/skills/devrites-lib/reference/standards/deprecation.md +31 -0
  317. package/pack/generated/pi/skills/devrites-lib/reference/standards/developer-experience.md +119 -0
  318. package/pack/generated/pi/skills/devrites-lib/reference/standards/development-workflow.md +29 -0
  319. package/pack/generated/pi/skills/devrites-lib/reference/standards/documentation.md +43 -0
  320. package/pack/generated/pi/skills/devrites-lib/reference/standards/edge-case-trace.md +92 -0
  321. package/pack/generated/pi/skills/devrites-lib/reference/standards/elicitation.md +85 -0
  322. package/pack/generated/pi/skills/devrites-lib/reference/standards/error-handling.md +47 -0
  323. package/pack/generated/pi/skills/devrites-lib/reference/standards/git-workflow.md +49 -0
  324. package/pack/generated/pi/skills/devrites-lib/reference/standards/hooks.md +25 -0
  325. package/pack/generated/pi/skills/devrites-lib/reference/standards/integration-reliability.md +102 -0
  326. package/pack/generated/pi/skills/devrites-lib/reference/standards/loop-operations.md +85 -0
  327. package/pack/generated/pi/skills/devrites-lib/reference/standards/observability.md +88 -0
  328. package/pack/generated/pi/skills/devrites-lib/reference/standards/one-shot-actions.md +97 -0
  329. package/pack/generated/pi/skills/devrites-lib/reference/standards/patterns.md +68 -0
  330. package/pack/generated/pi/skills/devrites-lib/reference/standards/performance.md +51 -0
  331. package/pack/generated/pi/skills/devrites-lib/reference/standards/principles.md +42 -0
  332. package/pack/generated/pi/skills/devrites-lib/reference/standards/prose-style.md +123 -0
  333. package/pack/generated/pi/skills/devrites-lib/reference/standards/release/ship-checklist.md +8 -0
  334. package/pack/generated/pi/skills/devrites-lib/reference/standards/repository-topology.md +80 -0
  335. package/pack/generated/pi/skills/devrites-lib/reference/standards/review-checklist.md +12 -0
  336. package/pack/generated/pi/skills/devrites-lib/reference/standards/security-checklist.md +25 -0
  337. package/pack/generated/pi/skills/devrites-lib/reference/standards/security.md +202 -0
  338. package/pack/generated/pi/skills/devrites-lib/reference/standards/skill-authoring.md +209 -0
  339. package/pack/generated/pi/skills/devrites-lib/reference/standards/spec-grammar.md +197 -0
  340. package/pack/generated/pi/skills/devrites-lib/reference/standards/test-proof-checklist.md +13 -0
  341. package/pack/generated/pi/skills/devrites-lib/reference/standards/testing.md +212 -0
  342. package/pack/generated/pi/skills/devrites-lib/reference/standards/tooling.md +92 -0
  343. package/pack/generated/pi/skills/devrites-lib/reference/standards/workflow-artifacts.md +427 -0
  344. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/code.md +44 -0
  345. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/comparison.md +42 -0
  346. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/diagram.md +51 -0
  347. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/index.md +66 -0
  348. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/input.md +46 -0
  349. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/outline-template.md +106 -0
  350. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/plan.md +48 -0
  351. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/slides.md +40 -0
  352. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/table.md +42 -0
  353. package/pack/generated/pi/skills/devrites-lib/reference/workspace-artifact-schema.md +267 -0
  354. package/pack/generated/pi/skills/devrites-prose-craft/SKILL.md +73 -0
  355. package/pack/generated/pi/skills/devrites-prose-craft/reference/banned-phrases.md +132 -0
  356. package/pack/generated/pi/skills/devrites-prose-craft/reference/examples.md +131 -0
  357. package/pack/generated/pi/skills/devrites-prose-craft/reference/structures.md +196 -0
  358. package/pack/generated/pi/skills/devrites-source-driven/SKILL.md +52 -0
  359. package/pack/generated/pi/skills/devrites-ux-shape/SKILL.md +134 -0
  360. package/pack/generated/pi/skills/devrites-ux-shape/reference/brief-template.md +108 -0
  361. package/pack/generated/pi/skills/devrites-ux-shape/reference/visual-direction-probe.md +48 -0
  362. package/pack/generated/pi/skills/rite/SKILL.md +148 -0
  363. package/pack/generated/pi/skills/rite/reference/menu.md +48 -0
  364. package/pack/generated/pi/skills/rite-adopt/SKILL.md +52 -0
  365. package/pack/generated/pi/skills/rite-adopt/reference/adoption.md +19 -0
  366. package/pack/generated/pi/skills/rite-adopt/reference/anti-patterns.md +19 -0
  367. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +132 -0
  368. package/pack/generated/pi/skills/rite-autocomplete/reference/decision-policy.md +41 -0
  369. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +148 -0
  370. package/pack/generated/pi/skills/rite-autocomplete/reference/stop-conditions.md +92 -0
  371. package/pack/generated/pi/skills/rite-build/SKILL.md +96 -0
  372. package/pack/generated/pi/skills/rite-build/reference/afk-discipline.md +145 -0
  373. package/pack/generated/pi/skills/rite-build/reference/anti-patterns.md +23 -0
  374. package/pack/generated/pi/skills/rite-build/reference/checkpoint-protocol.md +120 -0
  375. package/pack/generated/pi/skills/rite-build/reference/checkpoint.md +44 -0
  376. package/pack/generated/pi/skills/rite-build/reference/frontend-trigger.md +39 -0
  377. package/pack/generated/pi/skills/rite-build/reference/one-slice-cycle.md +50 -0
  378. package/pack/generated/pi/skills/rite-build/reference/output.md +33 -0
  379. package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +205 -0
  380. package/pack/generated/pi/skills/rite-build/reference/phase-contract.md +87 -0
  381. package/pack/generated/pi/skills/rite-build/reference/spec-drift-guard.md +84 -0
  382. package/pack/generated/pi/skills/rite-build/reference/tdd.md +27 -0
  383. package/pack/generated/pi/skills/rite-build/reference/wright-dispatch.md +89 -0
  384. package/pack/generated/pi/skills/rite-clarify/SKILL.md +99 -0
  385. package/pack/generated/pi/skills/rite-clarify/reference/anti-patterns.md +24 -0
  386. package/pack/generated/pi/skills/rite-clarify/reference/decision-coverage.md +55 -0
  387. package/pack/generated/pi/skills/rite-converge/SKILL.md +145 -0
  388. package/pack/generated/pi/skills/rite-converge/reference/anti-patterns.md +35 -0
  389. package/pack/generated/pi/skills/rite-converge/reference/convergence-assessment.md +65 -0
  390. package/pack/generated/pi/skills/rite-customize/SKILL.md +60 -0
  391. package/pack/generated/pi/skills/rite-define/SKILL.md +169 -0
  392. package/pack/generated/pi/skills/rite-define/reference/anti-patterns.md +26 -0
  393. package/pack/generated/pi/skills/rite-define/reference/gates.md +154 -0
  394. package/pack/generated/pi/skills/rite-define/reference/plan-template.md +149 -0
  395. package/pack/generated/pi/skills/rite-doctor/SKILL.md +69 -0
  396. package/pack/generated/pi/skills/rite-dogfood/SKILL.md +55 -0
  397. package/pack/generated/pi/skills/rite-explain/SKILL.md +152 -0
  398. package/pack/generated/pi/skills/rite-explain/reference/intake.md +89 -0
  399. package/pack/generated/pi/skills/rite-frame/SKILL.md +115 -0
  400. package/pack/generated/pi/skills/rite-frame/reference/failure-modes.md +66 -0
  401. package/pack/generated/pi/skills/rite-handoff/SKILL.md +97 -0
  402. package/pack/generated/pi/skills/rite-handoff/reference/handoff-template.md +44 -0
  403. package/pack/generated/pi/skills/rite-learn/SKILL.md +72 -0
  404. package/pack/generated/pi/skills/rite-plan/SKILL.md +186 -0
  405. package/pack/generated/pi/skills/rite-plan/reference/anti-patterns.md +34 -0
  406. package/pack/generated/pi/skills/rite-plan/reference/dependency-graph.md +48 -0
  407. package/pack/generated/pi/skills/rite-plan/reference/replan-and-repair.md +105 -0
  408. package/pack/generated/pi/skills/rite-plan/reference/slicing.md +167 -0
  409. package/pack/generated/pi/skills/rite-plan/reference/task-breakdown.md +42 -0
  410. package/pack/generated/pi/skills/rite-polish/SKILL.md +104 -0
  411. package/pack/generated/pi/skills/rite-polish/reference/adr-promotion.md +11 -0
  412. package/pack/generated/pi/skills/rite-polish/reference/anti-ai-slop.md +187 -0
  413. package/pack/generated/pi/skills/rite-polish/reference/anti-patterns.md +30 -0
  414. package/pack/generated/pi/skills/rite-polish/reference/backend-polish.md +80 -0
  415. package/pack/generated/pi/skills/rite-polish/reference/browser-polish-evidence.md +33 -0
  416. package/pack/generated/pi/skills/rite-polish/reference/code.md +82 -0
  417. package/pack/generated/pi/skills/rite-polish/reference/design-memory.md +117 -0
  418. package/pack/generated/pi/skills/rite-polish/reference/design-system-discovery.md +8 -0
  419. package/pack/generated/pi/skills/rite-polish/reference/harden-checklist.md +109 -0
  420. package/pack/generated/pi/skills/rite-polish/reference/ledger.md +65 -0
  421. package/pack/generated/pi/skills/rite-polish/reference/ui.md +137 -0
  422. package/pack/generated/pi/skills/rite-pov/SKILL.md +58 -0
  423. package/pack/generated/pi/skills/rite-pr-feedback/SKILL.md +54 -0
  424. package/pack/generated/pi/skills/rite-pressure-test/SKILL.md +67 -0
  425. package/pack/generated/pi/skills/rite-prototype/SKILL.md +104 -0
  426. package/pack/generated/pi/skills/rite-prove/SKILL.md +120 -0
  427. package/pack/generated/pi/skills/rite-prove/reference/acceptance-proof.md +88 -0
  428. package/pack/generated/pi/skills/rite-prove/reference/anti-patterns.md +25 -0
  429. package/pack/generated/pi/skills/rite-prove/reference/browser-proof.md +51 -0
  430. package/pack/generated/pi/skills/rite-prove/reference/failure-triage.md +43 -0
  431. package/pack/generated/pi/skills/rite-prove/reference/proof-ladder.md +28 -0
  432. package/pack/generated/pi/skills/rite-prove/reference/test-command-discovery.md +30 -0
  433. package/pack/generated/pi/skills/rite-quick/SKILL.md +82 -0
  434. package/pack/generated/pi/skills/rite-resolve/SKILL.md +95 -0
  435. package/pack/generated/pi/skills/rite-resolve/reference/answer-protocol.md +118 -0
  436. package/pack/generated/pi/skills/rite-review/SKILL.md +170 -0
  437. package/pack/generated/pi/skills/rite-review/reference/anti-patterns.md +32 -0
  438. package/pack/generated/pi/skills/rite-review/reference/cognitive-load.md +90 -0
  439. package/pack/generated/pi/skills/rite-review/reference/feature-scoped-review.md +26 -0
  440. package/pack/generated/pi/skills/rite-review/reference/five-axis-review.md +66 -0
  441. package/pack/generated/pi/skills/rite-review/reference/nielsen-heuristics.md +126 -0
  442. package/pack/generated/pi/skills/rite-review/reference/performance-checklist.md +80 -0
  443. package/pack/generated/pi/skills/rite-review/reference/performance-review.md +14 -0
  444. package/pack/generated/pi/skills/rite-review/reference/security-review.md +42 -0
  445. package/pack/generated/pi/skills/rite-seal/SKILL.md +75 -0
  446. package/pack/generated/pi/skills/rite-seal/reference/anti-patterns.md +29 -0
  447. package/pack/generated/pi/skills/rite-seal/reference/final-evidence.md +41 -0
  448. package/pack/generated/pi/skills/rite-seal/reference/go-no-go.md +29 -0
  449. package/pack/generated/pi/skills/rite-seal/reference/output.md +5 -0
  450. package/pack/generated/pi/skills/rite-seal/reference/phase-contract.md +47 -0
  451. package/pack/generated/pi/skills/rite-seal/reference/risk-and-rollback.md +56 -0
  452. package/pack/generated/pi/skills/rite-seal/reference/seal-template.md +27 -0
  453. package/pack/generated/pi/skills/rite-ship/SKILL.md +88 -0
  454. package/pack/generated/pi/skills/rite-ship/reference/anti-patterns.md +28 -0
  455. package/pack/generated/pi/skills/rite-ship/reference/close-out.md +68 -0
  456. package/pack/generated/pi/skills/rite-ship/reference/git-ship.md +120 -0
  457. package/pack/generated/pi/skills/rite-ship/reference/rollout.md +62 -0
  458. package/pack/generated/pi/skills/rite-ship/reference/ship-template.md +39 -0
  459. package/pack/generated/pi/skills/rite-spec/SKILL.md +150 -0
  460. package/pack/generated/pi/skills/rite-spec/reference/acceptance-criteria.md +31 -0
  461. package/pack/generated/pi/skills/rite-spec/reference/ai-spec-template.md +40 -0
  462. package/pack/generated/pi/skills/rite-spec/reference/anti-patterns.md +27 -0
  463. package/pack/generated/pi/skills/rite-spec/reference/interview-patterns.md +56 -0
  464. package/pack/generated/pi/skills/rite-spec/reference/investigation.md +83 -0
  465. package/pack/generated/pi/skills/rite-spec/reference/question-protocol.md +36 -0
  466. package/pack/generated/pi/skills/rite-spec/reference/references-intake.md +62 -0
  467. package/pack/generated/pi/skills/rite-spec/reference/spec-checklists.md +89 -0
  468. package/pack/generated/pi/skills/rite-spec/reference/spec-template.md +154 -0
  469. package/pack/generated/pi/skills/rite-spec/reference/state-workspace.md +227 -0
  470. package/pack/generated/pi/skills/rite-status/SKILL.md +57 -0
  471. package/pack/generated/pi/skills/rite-temper/SKILL.md +130 -0
  472. package/pack/generated/pi/skills/rite-temper/reference/anti-patterns.md +30 -0
  473. package/pack/generated/pi/skills/rite-temper/reference/review-dimensions.md +66 -0
  474. package/pack/generated/pi/skills/rite-temper/reference/scope-modes.md +53 -0
  475. package/pack/generated/pi/skills/rite-temper/reference/significance.md +46 -0
  476. package/pack/generated/pi/skills/rite-temper/reference/strategy-template.md +90 -0
  477. package/pack/generated/pi/skills/rite-upgrade/SKILL.md +121 -0
  478. package/pack/generated/pi/skills/rite-vet/SKILL.md +193 -0
  479. package/pack/generated/pi/skills/rite-vet/reference/anti-patterns.md +43 -0
  480. package/pack/generated/pi/skills/rite-vet/reference/artifacts.md +202 -0
  481. package/pack/generated/pi/skills/rite-vet/reference/cross-model.md +19 -0
  482. package/pack/generated/pi/skills/rite-vet/reference/depth.md +59 -0
  483. package/pack/generated/pi/skills/rite-vet/reference/eng-lenses.md +48 -0
  484. package/pack/generated/pi/skills/rite-vet/reference/review-axes.md +201 -0
  485. package/pack/generated/pi/skills/rite-watch-pr/SKILL.md +85 -0
  486. package/pack/generated/pi/skills/rite-zoom-out/SKILL.md +69 -0
  487. package/package.json +3 -2
  488. package/scripts/build-host-artifacts.sh +54 -4
  489. package/scripts/codex-generate.sh +6 -0
  490. package/scripts/pi-generate.sh +198 -0
@@ -19,6 +19,9 @@ max_agents: 32
19
19
  max_minutes: 120
20
20
  max_review_queue: 8
21
21
  expires_at: "<now + 4 hours>"
22
+ # continue_sequence: true # opt-in: chain recorded continuations after Seal GO
23
+ # max_workspaces: 5 # sequence budget when chaining
24
+ # max_parallel: 10 # Build batch cap; 1 = serial (default: eligible, cap 10)
22
25
  # max_tokens: <N>
23
26
  # max_cost_usd: <amount>
24
27
  # notify: "<cmd>"
@@ -63,7 +66,7 @@ Workspace files carry state; chat does not. Read and execute each phase skill:
63
66
  | 3 | `$rite-temper` | harden or reduce; expansion and irreversible risk pause |
64
67
  | 4 | `$rite-define` | approved plan/tasks/traceability |
65
68
  | 5 | `$rite-vet` | every plan; derive mutable budget after READY |
66
- | 6 | `$rite-build` ×N | one pending slice per wright; charge once only after green built state |
69
+ | 6 | `$rite-build` batch loop | largest eligible path-disjoint set (cap 10; serial when <2 eligible); recompute after each integrate; charge once per green built slice |
67
70
  | 7 | `$rite-prove` | all slices built; approved proof; recovery on red |
68
71
  | 8 | `$rite-polish` | re-prove after code edits |
69
72
  | 9 | `$rite-review` | in-scope correction then fresh proof |
@@ -74,6 +77,35 @@ Before advancing, check resource admission and
74
77
  [stop-conditions.md](stop-conditions.md). After source edits, discard stale pass
75
78
  evidence. Re-read the active workspace before each phase.
76
79
 
80
+ ## Sequence continuation
81
+
82
+ With `continue_sequence: true` and sequence budget remaining
83
+ ([sentinel](../../devrites-lib/reference/standards/afk-hitl.md#sequence-continuation-continue_sequence-max_workspaces)),
84
+ step 10 does not end the run: leave the sealed workspace unshipped with its
85
+ `Next step: $rite-ship`, then invoke the next recorded continuation
86
+ (`$rite-spec <parent>-<n> "<objective>"` from the parent's `decisions.md` sequence)
87
+ and re-enter step 1. Spend one workspace per opened continuation.
88
+
89
+ Spend accounting is durable in `state.md` cursors, not chat. Before invoking the
90
+ continuation, ensure the current workspace's `sequence_workspaces_remaining` is
91
+ set — absent, write `max_workspaces - 1` and `sequence_position: 1` first — and
92
+ `> 0`. `$rite-spec` seeds the child's sequence cursor at creation per the
93
+ [continuation contract](../../rite-plan/reference/slicing.md#continuation-workspaces);
94
+ after the child's `state.md` exists, verify it — `sequence_parent` = the current
95
+ slug, `sequence_position` = parent position + 1,
96
+ `sequence_workspaces_remaining` = parent remaining − 1, and — when the recorded
97
+ entry is the sequence's release milestone — `sequence_role: release` (gates then
98
+ require the union manifest). On resume, a child whose
99
+ fields are missing is re-seeded from its `brief.md` parent/position and the
100
+ parent's counter (same values, never a second charge); a child with no recorded
101
+ parent/position is not a sequence member and the chain stops.
102
+
103
+ Stop instead when: no recorded next entry; the cap, expiry, or review-queue bound is
104
+ reached; a human-owned, safety, access, or exhaustion condition fires; or Seal returns
105
+ `NO-GO`. On stop, report the sequence position, the sealed-but-unshipped workspaces, and
106
+ the single release command (`$rite-autocomplete <release milestone> --ship`, or
107
+ `$rite-ship` for the current sealed workspace when the sequence is complete).
108
+
77
109
  ## Backtrack without handing off
78
110
 
79
111
  The active Autocomplete root remains caller whenever a later phase exposes an
@@ -1,22 +1,22 @@
1
1
  ---
2
2
  name: rite-build
3
- description: Build the next approved vertical slice with evidence. HITL one-slice default; AFK may chain serially; opt-in `--parallel N` (2≤N≤10) for path-disjoint worktrees.
3
+ description: Build the next approved vertical slice with evidence. HITL one-slice default; AFK/autocomplete chain serially or in eligible path-disjoint batches (dynamic size, cap 10); `--parallel N` caps a batch.
4
4
  argument-hint: "[--parallel N] [slice number or name]"
5
5
  user-invocable: true
6
6
  ---
7
7
 
8
8
  # $rite-build: one verified slice
9
9
 
10
- Build and prove one slice. HITL stops; a later user invocation starts the next.
11
- Explicit `.devrites/AFK` alone lets the controlling root chain pending slices
12
- serially under green proof, caps, and pause rules. Every wright returns after one slice.
10
+ HITL stops; a later user invocation starts the next slice.
11
+ Explicit `.devrites/AFK` alone lets the controlling root chain under green proof,
12
+ caps and pause rules. Every wright returns after one slice.
13
13
  **Opt-in:** `$rite-build --parallel N` (2≤N≤10; N=1≡serial) follows
14
14
  [`reference/parallel-batch.md`](reference/parallel-batch.md)
15
15
  ([`one-slice-cycle.md`](reference/one-slice-cycle.md)).
16
16
 
17
- Root owns gates/bookkeeping. Fresh
18
- [`devrites-slice-wright`](.codex/agents/devrites-slice-wright.toml) writes product
19
- source/tests. Workflow Artifact paths use
17
+ Root owns gates/bookkeeping; fresh
18
+ [`devrites-slice-wright`](.codex/agents/devrites-slice-wright.toml) writes source/tests.
19
+ Workflow Artifacts use
20
20
  [`workflow-artifacts.md`](../devrites-lib/reference/standards/workflow-artifacts.md).
21
21
  Execute [`reference/phase-contract.md`](reference/phase-contract.md)
22
22
  ([`one-slice-cycle.md`](reference/one-slice-cycle.md),
@@ -37,7 +37,8 @@ Wright applies anti-slop; root verifies returns and never patches source.
37
37
  multi-writer / root-emulated concurrency forbidden. Native-worktree pilot =
38
38
  single-slice isolation when `wright-dispatch.md` preflight + reconcile hold.
39
39
  - Exact feature scope only; reject out-of-allowlist diffs; record adjacent issues.
40
- - Never rerun an unchanged check; re-prove after edits.
40
+ - Re-prove affected behavior after edits; reuse observations only under
41
+ [evidence validity](../devrites-lib/reference/candidate-integrity.md#evidence-validity).
41
42
  - Unplanned dependency/design-system/gap/repair → Vet/Spec Drift Guard batch
42
43
  sweep: every contract-assumption violation recorded before one folded
43
44
  repair+vet. Ask only for licensing/cost/security/product or explicit
@@ -57,29 +58,35 @@ Wright applies anti-slop; root verifies returns and never patches source.
57
58
  <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"Vet-ready admitted bytes require root authorship outside product wright","action":"ROOT_TRANSACTION; root writes only admitted .devrites/** targets","return":"saved Build slice cursor; wright product allowlist unchanged"} -->
58
59
  ## `--parallel N` (opt-in)
59
60
 
60
- Omitted/`1` ≡ serial; `2`–`10` path-disjoint fan-out when eligible; else hard refuse.
61
+ Omitted/`1` ≡ serial; `2`–`10` is a **cap** the root runs the largest eligible
62
+ path-disjoint set it can start now (`N_eff`), takes fewer when the cap cannot be
63
+ filled, and recomputes after every integrate until no pending slice remains
64
+ ([`parallel-batch.md` § Dynamic selection](reference/parallel-batch.md#dynamic-selection-and-re-batching)).
65
+ Unattended runs (`$rite-autocomplete`, `.devrites/AFK` `max_parallel`) repeat batches
66
+ inside the same run; HITL stops after each batch. Non-integer/`N≤0`/`N>10` hard refuse.
61
67
  All-green serial integrate; a red/gap sibling gets a bounded repair round in
62
68
  its own worktree — never rebuilt from scratch while budget remains.
63
- Plan-owned gaps still route through Spec Drift Guard (batch sweep, one folded
64
- plan repair + one vet recheck inline); do not emit a human `Fix`. Exhausted
65
- repair blocks and preserves everything; `cleanup --force` salvages slice
66
- branches before removing worktrees human-gated to abandon a batch,
67
- orchestrator-emitted only as the salvage step of an automatic frozen-lease
68
- re-batch.
69
+ Post-writer inventory and affected rechecks follow `phase-contract.md` § Independent
70
+ Build review; fold accounts before one repair-all wright.
71
+ Plan-owned gaps still route through Spec Drift Guard
72
+ (batch sweep, one folded plan repair + one vet recheck inline); do not emit
73
+ a human `Fix`. Exhausted repair blocks and preserves everything;
74
+ `cleanup --force` salvages slice branches before removing worktrees —
75
+ human-gated to abandon a batch, orchestrator-emitted only as the salvage
76
+ step of an automatic frozen-lease re-batch.
69
77
  AFK charges after integrate only. Running lease blocks another
70
78
  `$rite-build`. Details: `parallel-batch.md`.
71
79
 
72
80
  ## Execute and reply
73
81
 
74
82
  Run every step in `reference/phase-contract.md`: readiness, one target, dispatch
75
- or canonical transaction, return inspection, independent doubt/test analysis,
83
+ or canonical transaction, return inspection, independent code/doubt/test analysis,
76
84
  approved fail-on-red proof, record, AFK accounting, and stop. Use
77
85
  [`reference/output.md`](reference/output.md) plus the shared
78
86
  [`reply contract`](../devrites-lib/reference/reply-contract.md). HITL never starts
79
- the next slice automatically; AFK chains only within its durable remaining
80
- budget; Prove starts only after all slices are built.
87
+ the next slice automatically; AFK obeys remaining budget; Prove requires all slices built.
81
88
 
82
- ## Phase exit (observable)
89
+ ## Phase exit
83
90
 
84
91
  **Complete when:** the dispatched wright returns green proof for the slice,
85
92
  `git diff --name-only` ⊆ allowlist, independent test analysis admits no Critical
@@ -87,7 +87,7 @@ any of:
87
87
  - External-service contract change (webhook payload, partner-facing schema).
88
88
  - Filesystem destructive operation outside the workspace (`rm -rf` of project paths,
89
89
  rewriting `.gitignore`-listed paths, deleting fixtures).
90
- - Anything the slice's `Gate: blocking` plus `tasks.md` `Why HITL:` flags as irreversible.
90
+ - Anything the slice's `Gate: blocking` plus its `Checkpoint:` line in `tasks.md` flags as irreversible.
91
91
 
92
92
  This is the Claude Code auto-mode transcript classifier list adapted to the DevRites
93
93
  workspace.
@@ -7,13 +7,39 @@ Opt-in only. Default `$rite-build` stays [`one-slice-cycle.md`](one-slice-cycle.
7
7
  | Input | Behavior |
8
8
  | --- | --- |
9
9
  | omitted / `--parallel 1` | Serial one-slice |
10
- | `--parallel N` (**2≤N≤10**) | Parallel when eligible + host pass |
10
+ | `--parallel N` (**2≤N≤10**) | N is a **cap**, not a quota: run the largest eligible set N |
11
11
  | non-integer / `N≤0` / `N>10` | Hard refuse (no silent clamp) |
12
+ | Autocomplete, no flag | Same path, cap from sentinel `max_parallel` else 10; serial only when ineligible |
12
13
 
13
- AFK caps `N` by remaining budget. Charge **only after successful integrate**
14
- (once per integrated green sibling). Abort / integrate-failed → **0**. A
15
- present lease is resumable: `$rite-build` continues it (repair rounds or the
16
- blocked verdict); `parallel create` refuses until cleanup.
14
+ AFK caps `N`. Charge green siblings once after integrate; abort /
15
+ integrate-failed → **0**. `parallel create` refuses while a lease exists.
16
+ Reconcile retained repair-round artifacts by exact causal fingerprint before honoring a stored blocked status/verdict. Blocked status, round count, or distinct finding alone cannot stop cold resume: establish missing or stale review coverage under step 4; repair unless a stop condition remains evidenced.
17
+
18
+ ## Dynamic selection and re-batching
19
+
20
+ Size each batch by what is runnable **now**, never by the requested number:
21
+
22
+ ```text
23
+ N_eff = min(
24
+ cap -- --parallel N | sentinel max_parallel | 10 (autocomplete default)
25
+ eligible set -- dependency-satisfied pending slices, pairwise path-disjoint
26
+ AFK headroom -- remaining max_slices, max_agents, max_minutes, review queue
27
+ host capacity -- concurrent worktree writers + the runtime isolation table
28
+ )
29
+ ```
30
+
31
+ Select **greedily in plan order**: walk pending slices whose `depends_on` are built and
32
+ add each one while it stays pairwise disjoint with the selected set and the cap is not
33
+ reached. Then `N_eff ≥ 2` → parallel batch; `N_eff = 1` → the serial one-slice cycle;
34
+ nothing pending → Prove. A cap that cannot be filled is normal: take fewer.
35
+
36
+ **Re-batch automatically.** After integrate + cleanup are green, re-read `state.md`,
37
+ the pending slices (`observe slice`), and the updated tree, then recompute: integrated
38
+ siblings leave the pending set and free their paths, and satisfied dependencies unlock
39
+ new slices. Repeat until no pending slice remains. Under `.devrites/AFK` and
40
+ `$rite-autocomplete` the repeat is part of the same run — a new batch is another
41
+ `$rite-build --parallel` round inside it, not a new user invocation; HITL stops after
42
+ each batch. A batch of three followed by one of four and then two is the expected shape.
17
43
 
18
44
  ## Path-disjoint
19
45
 
@@ -21,7 +47,9 @@ Exact project-relative source/test paths only. Normalize `\`→`/`. Reject `..`,
21
47
  duplicates, absolutes, `.devrites/**`. Empty pairwise intersection required.
22
48
 
23
49
  **SSOT:** `devrites-engine check path-disjoint [--root <dir>] [<json-file>|-]`
24
- (N≥2 only; pass `--root`). Exit `0` → fan-out; else force serial. Inspect-time
50
+ (N≥2 only; pass `--root`). Input is `{"slices":[{"id":"SLICE-002","paths":["src/policy.rs","src/policy/mod.rs"]}]}`
51
+ (or a top-level array) built from each candidate's `Files likely touched`.
52
+ Exit `0` → fan-out; else force serial. Inspect-time
25
53
  overlap → sibling **gap** (a shared path is a contract defect). **Failing
26
54
  case:** two parallel wrights share a path and fan-out proceeds without that
27
55
  check.
@@ -40,14 +68,29 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
40
68
 
41
69
  ## Lifecycle
42
70
 
43
- 1. Orient/gate; parse N; select ≤N path-disjoint pending slices.
71
+ 1. Orient/gate; parse the cap; compute `N_eff` and select the eligible set
72
+ ([Dynamic selection and re-batching](#dynamic-selection-and-re-batching)) —
73
+ candidates from `orient` `task_graph.slices` + built list, each candidate's
74
+ `Files likely touched` via `observe slice`, disjointness via `check path-disjoint`.
44
75
  2. Write lease; freeze `B=HEAD`; `parallel create` worktrees.
45
76
  3. Dispatch ≤10 wrights in parallel (cwd=worktree; allowlist; prove `HEAD==B`).
46
- 4. Inspect + fail-on-red `green|red|gap`. Independent-review Critical is `gap`
47
- even when targeted tests are green.
77
+ 4. Inspect each returned path list, cumulative diff from `B`, transfer identity,
78
+ and required result fields against the immutable contract. Reject malformed,
79
+ stale, or out-of-scope work. Apply
80
+ [independent Build review](phase-contract.md#independent-build-review): first
81
+ full inventory, then bounded owning-role rechecks after repairs. Gap or
82
+ Critical/Important → `gap`; else approved proof → `green|red|gap`.
83
+ Reviewer fan-out for a batch is itself batched under
84
+ [`parallel-dispatch.md`](../../devrites-lib/reference/parallel-dispatch.md#scale-limits)
85
+ (≈4 concurrent read-only reviewers, 8 only with disjoint paths), and `max_agents`
86
+ headroom bounds the batch size — one batch never assumes unbounded reviewers.
48
87
  5. Non-green siblings → **repair round** (below) in the same worktrees; lease
49
88
  stays `running` — no abort while repair budget remains. A green sibling →
50
89
  `parallel record-green`. No partial integrate. All green → integrate.
90
+ A recoverable RED blocks integration but does not cancel independent safe running siblings.
91
+ Expected test-first RED is not a terminal gate failure. Cancel only for a shared
92
+ invalid foundation, safety/access failure, resource boundary, or explicit stop;
93
+ preserve completed and in-progress recoverable work and classify each result.
51
94
  6. Integrate: each `transfer_commit` descends from `B` and diffs path-exact vs
52
95
  `B`; squash-apply all in plan order into one `WIP(<slug>):` commit on the
53
96
  staging branch (Ship collapses it). Conflict → reset to `B`,
@@ -69,46 +112,53 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
69
112
 
70
113
  ## Repair rounds
71
114
 
72
- Rejected work is repaired in place never discarded and rebuilt from scratch
73
- while budget remains.
115
+ Repair rejected work in place; never discard/rebuild while budget remains.
74
116
 
75
- - Record each round as `build-parallel-<batch>-repair-<round>.json`: per
76
- non-green sibling status, verbatim findings, transfer_commit or null.
77
- - Classify first: **implementation defect** (review Critical on the diff, red
78
- wright/proof) repair wright in the same worktree. **Durable-plan defect**
117
+ - Record each round as `build-parallel-<batch>-repair-<round>.json`: each
118
+ non-green sibling's status, verbatim findings, transfer_commit/null.
119
+ - Use step 4's initial inventory or affected recheck as appropriate; never start
120
+ a correction from an early reviewer result while required accounts are pending.
121
+ - Classify the complete inventory: **implementation defect** (review
122
+ Critical/Important on the diff, red wright/proof) → one repair-all wright in
123
+ the same worktree with the full inventory. **Durable-plan defect**
79
124
  (falsified contract assumption, AC unchanged) →
80
125
  [`spec-drift-guard.md`](spec-drift-guard.md): batch-sweep contract
81
126
  assumptions, one folded `$rite-plan repair` + one `$rite-vet` recheck
82
127
  inline, resume repair in the same worktrees under the amended contract;
83
- never emit `Fix:`. **Frozen-lease scope defect** the amended contract or
84
- a review requirement needs paths outside a slice's allowlist, or re-slices
85
- the plan (a lease is immutable once written: its allowlists are the
86
- disjointness guarantee) **automatic re-batch, no human gate**:
87
- `parallel cleanup --force` as the salvage step, record the retained refs in
88
- the repair-round artifact, `parallel create` a fresh batch from control
89
- `HEAD` under the corrected decomposition. Prior attempts stay reachable —
90
- hand each new wright the salvaged branch ref
91
- (`devrites/parallel/<slug>/<old-batch>/<slice>`) so it builds on what worked
92
- instead of starting blind. If no corrected decomposition exists, that is
93
- exhaustion → blocked, preserve, STOP. **Reviewer stall/cancel or missing
128
+ never emit `Fix:`. **Frozen-lease scope defect** (correction needs
129
+ out-of-allowlist paths or re-slicing; lease allowlists are immutable)
130
+ **automatic re-batch, no human gate**: `parallel cleanup --force` salvages
131
+ and records refs; `parallel create` starts from control `HEAD` under the
132
+ corrected decomposition. Give each new wright its salvaged
133
+ `devrites/parallel/<slug>/<old-batch>/<slice>` ref. If the inventory proves the accepted
134
+ approach unsound and no corrected decomposition exists, that is exhaustion
135
+ blocked, preserve, STOP. **Reviewer stall/cancel or missing
94
136
  verdict** → re-dispatch the reviewer, not the wright. **Product/policy/
95
137
  irreversible** → stops for the human.
96
- - Dispatch a fresh `devrites-slice-wright` (cwd = the sibling's worktree, same
97
- allowlist and host rules as step 3 siblings may repair in parallel) with
98
- the original contract + verbatim findings + "preserve what works; fix the
99
- named findings; return a new `transfer_commit`". Never reset the worktree
138
+ - Dispatch one fresh repair-all `devrites-slice-wright` (cwd=worktree; step 3
139
+ rules) with the original contract + complete inventory +
140
+ "preserve what works; fix every finding; **then attack your own correction**
141
+ probe the changed hunks for defects the fix itself introduced (adjacent cases of
142
+ the same rule, new observation/ordering windows, alias or boundary escapes) and
143
+ fold them in before returning; return a new `transfer_commit`". A correction whose
144
+ own diff is unexamined is not ready: a green writer gate plus an unexamined fix is
145
+ how the same defect family reappears one case deeper each round. Never reset
100
146
  to `B` — that destroys the work under repair. The commit must still descend
101
147
  from `B` and diff path-exact vs `B`.
102
- - Each repair return re-runs the full gate chain: inspect, fresh doubt +
103
- test-analysis, approved proof.
104
- - Budget: the shared causal-fingerprint cap three total failed attempts per
105
- sibling per fingerprint (build + repairs count together); a distinct
106
- Critical is a new fingerprint. Exhaustion is not abort: record one
107
- technical blocker (`Status: blocked`; `Next step: none technical recovery
108
- exhausted for <fingerprint>; requires new evidence or changed failure
109
- conditions`), preserve lease/worktrees/branches, STOP same fingerprint
110
- stays blocked on reinvoke; new evidence resumes repair in place. Human-
111
- owned decisions use the drift-guard question and wait.
148
+ - Budget and exhaustion follow only
149
+ [the canonical retry contract](../../devrites-lib/reference/standards/afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve).
150
+ Record one failed invariant, mechanism, reproduction, correction, and decisive
151
+ recheck per fingerprint; never use an umbrella like "covering" or "review is red again".
152
+ - A distinct post-repair Critical/Important gets a new fingerprint: refresh the
153
+ inventory and affected owning-role rechecks. It proves neither plan defect nor
154
+ exhaustion. Use plan path only if inventory proves the approach unsound.
155
+ - Stop under the canonical retry/authority/resource conditions, or when evidence
156
+ proves the approach unsound and no in-scope corrected decomposition exists.
157
+ - Exhaustion is not abort: record one technical blocker (`Status: blocked`;
158
+ `Next step: none — technical recovery exhausted; requires new evidence or changed failure conditions`), preserve
159
+ lease/worktrees/branches, STOP — same fingerprint stays blocked on
160
+ reinvoke; new evidence resumes repair in place. Human-owned decisions use
161
+ the drift-guard question and wait.
112
162
 
113
163
  ## Engine verbs
114
164
 
@@ -1,67 +1,87 @@
1
1
  # rite-build phase contract
2
2
 
3
- See [`one-slice-cycle.md`](one-slice-cycle.md); candidate lifecycle is
3
+ Apply [`one-slice-cycle.md`](one-slice-cycle.md) and
4
4
  [`candidate-integrity.md`](../../devrites-lib/reference/candidate-integrity.md).
5
- Opt-in `--parallel N` uses [`parallel-batch.md`](parallel-batch.md) instead of steps 2–8.
6
- Spec Drift Guard still applies on abort or plan-gap.
5
+ Opt-in `--parallel N` replaces steps 2–8 with [`parallel-batch.md`](parallel-batch.md);
6
+ Spec Drift Guard still applies.
7
7
 
8
- 1. **Orient and gate.** Read core, `.devrites/ACTIVE`, `state.md`, and required
9
- slice artifacts. Require `Implementation readiness: READY`, its current
10
- `Readiness inputs SHA-256`, all applicable exact reviewer accounts,
11
- ID-and-meaning traceability, and green proof preflight; run
12
- `devrites-engine check readiness <slug>`. Any miss/nonzero stops.
13
- 2. **Select one target.** Restate goal, acceptance criteria, exclusions, and exact
14
- source/test paths. Reconcile the spec/plan applicability map and include only the
15
- triggered topology/data/integration standards plus their named failure/recovery/proof
16
- cases in the writer contract. Before dispatch, validate relevant `assumptions.md` rows
17
- against live evidence. If one is disproved and changes acceptance, architecture,
18
- scope, or proof, use the Spec Drift Guard/plan recovery; a human-owned unknown
19
- stops. Resolve HITL before source work. AFK answers only permitted gates;
20
- human-owned or irreversible risk persists a question and stops for `$rite-resolve`.
21
- If the target is an exact Vet-ready Workflow Artifact set, apply
22
- [`workflow-artifacts.md`](../../devrites-lib/reference/standards/workflow-artifacts.md)
23
- instead of treating it as a product slice.
24
- 3. **Dispatch or transact.** Product source/tests apply [`wright-dispatch.md`](wright-dispatch.md).
25
- Put the smallest exact project-relative source/test path list directly in the task;
26
- dispatch the exact `devrites-slice-wright` fresh. Root never writes those product
27
- paths, wright never widens, and a missing profile stops.
8
+ 1. **Gate.** Read core, `.devrites/ACTIVE`, then `devrites-engine orient <slug>`
9
+ and the Build read-next in
10
+ [`workspace-artifact-schema.md`](../../devrites-lib/reference/workspace-artifact-schema.md#read-next-by-phase):
11
+ the selected slice via `devrites-engine observe slice <slug> <SLICE-ID>`, not whole
12
+ `tasks.md`; over-budget or `bulk_files` artifacts are read by anchor only. Require
13
+ `Implementation readiness: READY`, current `Readiness inputs SHA-256`, exact
14
+ required accounts, ID/meaning traceability and green proof preflight.
15
+ Run `devrites-engine check readiness <slug>`; any miss/nonzero blocks.
16
+ 2. **Select.** Pick the lowest pending slice whose `depends_on` are all built, using
17
+ `orient` `task_graph.slices` plus the `state.md` built list never by scanning
18
+ `tasks.md`; then `observe slice` it. Restate its goal, ACs, exclusions and exact paths. Include
19
+ applicable topology/data/integration invariants and failure/recovery/proof cases.
20
+ Verify relevant assumptions live; falsified acceptance/architecture/scope/proof
21
+ routes through Spec Drift Guard. Resolve human-owned/irreversible gates before
22
+ source work; AFK follows its ceiling. Vet-ready Workflow Artifacts use
23
+ [`workflow-artifacts.md`](../../devrites-lib/reference/standards/workflow-artifacts.md).
24
+ 3. **Dispatch.** Apply [`wright-dispatch.md`](wright-dispatch.md). Put the smallest
25
+ exact project-relative source/test path list directly in the task;
26
+ dispatch the exact `devrites-slice-wright` fresh. Root never writes product
27
+ paths; wright cannot widen scope; missing profile blocks.
28
28
  <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"Build gate enters or resumes transaction","action":"invoke canonical operation table; reconcile exact result","return":"same slice/checkpoint cursor or Plan/Vet route"} -->
29
- 4. **Inspect the return.** Wait; compare its file list and `git diff --name-only`
30
- with the contract. Reject stale, partial, malformed, or out-of-scope work.
31
- Preserve user work; source restoration uses the same bounded wright.
32
- 5. **Challenge stood decisions.** For each stood decision, run exact
33
- `devrites-doubt-reviewer` fresh/read-only and record accepted or resolved-rejected
34
- in `decisions.md`. A missing verdict, principle breach, scope change, or
35
- irreversible risk blocks.
36
- 6. **Prove without guessing.** Against the frozen pre-slice candidate, inspect
37
- test hunks for deletion, skipping/focus, tautology, or weaker expectations. Dispatch exact
38
- `devrites-test-analyst` on that immutable diff; missing account or adverse criterion
39
- verdict is Critical. Run only `test-plan.md` repository/CI commands, capture output,
40
- and recheck `git diff --name-only`. Missing, weakened, red, or source-mutating proof
41
- is not success.
29
+ 4. **Inspect.** Wait; compare returned paths and `git diff --name-only` with the
30
+ contract. Reject stale/partial/malformed/out-of-scope work; preserve user work.
31
+ Restoration uses the bounded wright.
32
+ 5. **Review.** Apply [Independent Build review](#independent-build-review).
33
+ Missing verdicts, principle breaches and open Critical/Important block acceptance.
34
+ 6. **Prove.** Against the frozen pre-slice candidate inspect
35
+ test hunks for deletion, skipping/focus, tautology, or weaker expectations.
36
+ Use step 5's exact test-analyst account; missing/adverse criterion verdict is
37
+ Critical. Run only `test-plan.md` repository/CI commands, record output, recheck
38
+ `git diff --name-only`. Missing/weakened/red/source-mutating proof cannot pass.
39
+ Pre-existing/environment-specific claims need a predating same-command,
40
+ same-environment baseline; otherwise unresolved.
42
41
 
43
- A failure is `pre-existing` or environment-specific only with a same-command,
44
- same-environment baseline predating the candidate; otherwise it remains unresolved.
42
+ Technical failure uses `devrites-debug-recovery` and
43
+ [canonical recovery](../../devrites-lib/reference/standards/afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve).
44
+ Reapply host admission before correction; affected proof/evidence follows candidate
45
+ integrity. Human gates remain product/irreversible/access decisions.
46
+ 7. **Record green.** Upsert actual scoped `present`/`deleted` rows in `touched-files.md`;
47
+ update state, evidence and applicable UI/browser proof. Manifest stays mutable
48
+ until Polish. For a release milestone, after the last slice's rows run
49
+ `devrites-engine state merge-manifest <slug>` to fold the recorded
50
+ predecessor chain into the union manifest before Prove. Record stood
51
+ decisions/dead ends; refresh verified/falsified
52
+ assumptions. Propose reviewed durable project rules in the nearest guidance.
53
+ 8. **Account/reply.** Apply `afk-discipline.md`: charge
54
+ exactly once after each green built slice; never negative, stop at zero,
55
+ malformed budget fails closed. Reply names next pending slice or `$rite-prove`
56
+ only when all built; no decorative renderer/dispatch telemetry.
45
57
 
46
- Technical failure uses bounded `devrites-debug-recovery`: reapply the host gate
47
- before an accepted in-slice correction, keep one exact fingerprint/three
48
- no-progress attempts, and never rerun an unchanged check. A closed reproduction
49
- is progress; a different Critical/Important invariant gets its own fingerprint.
50
- Ask humans only for product decisions,
51
- irreversible risk, or genuinely human-only access.
52
- 7. **Record.** After green proof, upsert `touched-files.md`'s authoritative candidate
53
- manifest from the actual scoped diff with explicit `present`/`deleted` rows;
54
- update `state.md`, `evidence.md`, and applicable UI/browser evidence. The manifest
55
- stays mutable until Polish closes it.
56
- Record stood decisions/dead ends in `decisions.md`; update checked assumptions'
57
- status/evidence, never leaving a disproved row live. If code reveals a durable
58
- project rule, propose a reviewed `AGENTS.md`/nearest-doc update, not a scored ledger.
59
- 8. **AFK and reply.** Under `afk-discipline.md`, root charges
60
- exactly once after each green built slice, never below zero; stop before another dispatch at zero, and fail closed
61
- on malformed budget. Use the reply contract; name the next pending slice or, only
62
- when all slices are built, `$rite-prove`. Emit no decorative progress renderer or
63
- dispatch telemetry.
58
+ One contract builds one slice: preserve TDD, exact paths and independent judgment.
64
59
 
65
- > **Mid-flight discipline.** One writer contract builds one slice. Do not skip
66
- > TDD, widen paths, fold in a second slice, or accept the writer's judgment as
67
- > independent review.
60
+ ## Independent Build review
61
+
62
+ After inspection, freeze full slice scope and cumulative baseline diff. Initial
63
+ inventory: one full-diff `devrites-code-reviewer`, one `devrites-test-analyst`,
64
+ and one exact `devrites-doubt-reviewer` per stood decision that meets
65
+ `devrites-doubt` § When to use (boundary, data model, auth, public API, migration,
66
+ user flow, assumption tests cannot prove); other stood decisions are recorded in
67
+ `decisions.md` without dispatch. Dispatch fresh,
68
+ read-only under [`parallel-dispatch.md`](../../devrites-lib/reference/parallel-dispatch.md).
69
+ Wait for every required account to become terminal; missing/gap needs a valid result.
70
+ Fold supported in-scope Critical/Important findings by cause into one inventory.
71
+ Dispatch one repair-all wright instructed to fix every finding, then attack its own
72
+ correction for fix-introduced defects before returning; durable contract defects use Spec
73
+ Drift Guard.
74
+ Suggestion/Nit/FYI cannot prolong recovery.
75
+
76
+ Rechecks use Vet's bounded pattern: each exact responsible reviewer checks
77
+ all open findings owned by that role and affected dependency/regression closure
78
+ in one fresh dispatch. Supply new candidate, inventory, correction diff, tests
79
+ and unchanged-coverage evidence under candidate integrity; include newly triggered
80
+ roles. A changed contract or uncertain impact requires the full inventory.
81
+ Collect all required rechecks before another folded correction. Canonical recovery
82
+ owns fingerprints/budget and the
83
+ [late-finding rule](../../devrites-lib/reference/standards/afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve):
84
+ a recheck's `Late:` rows on hunks unchanged since that role's previous pass go to
85
+ `touched-files.md` `## Review trail` for `$rite-review`, not into another slice
86
+ repair, unless Critical with a failure path. Evidenced scope coverage never
87
+ guarantees no later defect; the feature-level Review and Seal gates still run.
@@ -1,8 +1,7 @@
1
1
  # Spec Drift Guard (build phase)
2
2
 
3
- Active throughout `$rite-build`. The spec is living, not sacred, but you may not
4
- silently code against a plan you know is wrong. This is the canonical Spec Drift Guard;
5
- other phases reference it here.
3
+ Canonical Spec Drift Guard, active in `$rite-build` and referenced by other
4
+ phases. Never silently code against a known-wrong plan.
6
5
 
7
6
  ## Drift has occurred when
8
7
  - the spec says X but the code makes X impossible/wrong;
@@ -16,7 +15,7 @@ other phases reference it here.
16
15
  ## Workflow
17
16
  ```
18
17
  1. STOP coding.
19
- 2. Record in drift.md (assumed vs observed, when).
18
+ 2. Record drift.md (assumed vs observed, when).
20
19
  3. Classify: requirement ambiguity | implementation-plan error | codebase reality
21
20
  mismatch | design-system mismatch | test/evidence mismatch | external-doc mismatch
22
21
  | user-decision required.
@@ -35,12 +34,14 @@ other phases reference it here.
35
34
 
36
35
  ## Batch sweep (before repair)
37
36
 
38
- A durable-plan drift abort never repairs the first gap alone:
37
+ Repair durable-plan drift as a folded set:
39
38
 
40
- 1. Verify every remaining statically-checkable contract assumption against the
41
- live repo named paths, symbols/APIs/signatures, routes, commands, dependency
42
- versions, contract artifacts. The wright's return names what it falsified;
43
- check the rest yourself existence checks are deterministic, no dispatch.
39
+ 1. Trace the falsified assumption's full dependency/consumer closure and affected
40
+ frontier, including dependent future slices. Verify unchecked paths, symbols/APIs/
41
+ signatures, routes, commands, versions, and artifacts there against live source.
42
+ Reuse the wright inventory and unchanged evidence; deterministic existence checks
43
+ need no dispatch. Do not rescan unrelated slices. Broaden unknown closure or shared
44
+ contract changes until coverage is justified; retain every known gap.
44
45
  2. Record each violation as its own `drift.md` entry/fingerprint; one folded
45
46
  repair + one batched recheck resolves the set.
46
47
  3. A recheck-surfaced gap is a new fingerprint with its own budget — loop
@@ -75,11 +76,9 @@ human permission question. Re-plan only when the durable plan changed.
75
76
 
76
77
  ## Inline return contract
77
78
 
78
- The phase that detected agent-owned drift owns the whole backtrack, batch sweep
79
- included. Preserve it
80
- as `return_phase`/`return_next_action`; consume Plan and Vet's nested `STOP`
81
- boundaries internally; follow any vetted remediation required by the settled
82
- acceptance; then restore the cursor and resume the failed step. Do not hand an
83
- intermediate command to the human. The shared three-attempt causal-fingerprint
79
+ The detecting phase owns backtracking and the batch sweep. Save
80
+ `return_phase`/`return_next_action`; consume nested Plan/Vet `STOP` internally, complete
81
+ vetted acceptance-preserving remediation, then restore the cursor and failed step.
82
+ Never hand the human an intermediate command. The shared three-attempt causal-fingerprint
84
83
  cap still applies: exhaustion produces one technical blocker, while a genuinely
85
84
  human-owned decision uses the question format below.
@@ -1,12 +1,12 @@
1
1
  # Slice-wright dispatch
2
2
 
3
3
  `$rite-build` gives one bounded task to exact `devrites-slice-wright`.
4
- Root owns scope, artifacts, inspection, and routing but never writes source/tests; only
5
- the wright writes them and invokes no agent.
4
+ Root owns scope/artifacts/inspection; never writes source/tests.
5
+ Wright alone writes; no agents.
6
6
 
7
7
  ## Host gate
8
8
 
9
- Follow the canonical [source-writing boundary](../../devrites-lib/reference/standards/agents.md#source-writing-boundary):
9
+ Apply [source-writing boundary](../../devrites-lib/reference/standards/agents.md#source-writing-boundary):
10
10
  Claude grants only the exact wright `acceptEdits`; Codex uses its workspace root,
11
11
  the exact `:workspace` wright, and read-only specialists. Never bypass/substitute
12
12
  the wright or recreate an engine bridge.
@@ -47,7 +47,7 @@ worktrees stay forbidden.
47
47
  controlling root under
48
48
  [`workflow-artifacts.md`](../../devrites-lib/reference/standards/workflow-artifacts.md);
49
49
  its rejection here is not a blocker.
50
- 2. Put it in the task with goal, verbatim acceptance, exclusions, context,
50
+ 2. Include goal, verbatim acceptance, exclusions, context,
51
51
  `test-plan.md` proof commands, and applicable standards. For each triggered
52
52
  topology/data/integration standard, include only the feature-specific owner/invariant,
53
53
  failure or partial-state case, recovery rule, and required proof from the vetted plan.
@@ -77,10 +77,10 @@ Opt-in `$rite-build --parallel N` fans out only under [`parallel-batch.md`](para
77
77
  mocks that erase it and one-root proof offered for another root are unproven.
78
78
  3. Run only repository proof already approved by `test-plan.md`, then inspect
79
79
  `git diff --name-only` again in case a proof tool changed source.
80
- 4. Challenge decisions. Human choices return; native diagnosis routes failures.
81
- The root counts the wright plus recovery failures by causal fingerprint from
82
- the current context and recorded Dead ends/evidence. Three total failed
83
- attempts is the limit; persist each and never dispatch a fourth related try.
80
+ 4. Apply [independent Build review](phase-contract.md#independent-build-review) before
81
+ proof acceptance. Human choices return; technical failures follow
82
+ [the canonical retry contract](../../devrites-lib/reference/standards/afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve).
83
+ Derive accounting from recorded reproductions, corrections, and decisive rechecks.
84
84
  5. Reconcile returned reuse, conventions, principles, sources, assumptions,
85
85
  decisions, dead ends, follow-ups, gates, and touched files. Persist the
86
86
  relevant facts in canonical artifacts, not the wholesale report. A plan-gap
@@ -33,7 +33,10 @@ Pull these via `Read` when shaping the plan:
33
33
  - **Derive the slice count from the work.**
34
34
  One per independently-shippable increment, sized by `slicing.md`; map every acceptance
35
35
  criterion. User counts are hints: explain honest differences, never pad/compress.
36
- `.devrites/AFK` `max_slices` is an iteration budget, not decomposition.
36
+ `.devrites/AFK` `max_slices` is an iteration budget, not decomposition. A derivation
37
+ over the [feature ceiling](../rite-plan/reference/slicing.md#feature-ceiling-split-an-epic-never-override-the-budget)
38
+ is a split signal, never a `Budget override`: keep the thinnest shippable subset
39
+ here and route the rest to Non-goals + continuation workspaces via the Drift Guard.
37
40
  - **Complexity does not shrink scope.** Split/reorder; never drop/defer approved REQ/AC.
38
41
  Reduction needs Drift Guard + human decision; hard/large means decompose.
39
42
  - **Wide refactors use expand → migrate → contract.** Add compatibility, migrate green
@@ -97,7 +97,10 @@ Before classifying any Reslice, read `.agents/skills/devrites-lib/reference/stan
97
97
  in one cluster, and each bundle applies independently. A `partial`-
98
98
  continuation re-dispatch continues the same packet; it does not advance the
99
99
  same-seam counter. Count consecutive repair packets whose findings' cited clause sets overlap
100
- the immediately previous packet's — the overlap is the seam. At the third
100
+ the immediately previous packet's — the overlap is the seam. Carry it as an explicit
101
+ integer `same_seam_count` in every packet (previous value + 1 when the seam repeats,
102
+ else 1) so the threshold is counted rather than judged; a packet that reports the same
103
+ seam without the counter is malformed. At the third
101
104
  same-seam packet, mark it `convergence_pressure: true` with the seam named.
102
105
  Under pressure the drafter may close a finding marked as a refinement of an
103
106
  already-pinned clause by folding an explicit, bounded declared