devrites 4.0.12 → 4.2.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 (283) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +3 -3
  3. package/docs/architecture.md +4 -4
  4. package/docs/command-map.md +4 -3
  5. package/docs/engine/commands.md +65 -6
  6. package/docs/flow.md +2 -1
  7. package/docs/orchestration.md +45 -4
  8. package/docs/skills.md +4 -3
  9. package/engine/go.mod +1 -1
  10. package/engine/internal/devritespaths/paths.go +5 -4
  11. package/engine/internal/gate/gate.go +154 -46
  12. package/engine/internal/gate/gate_test.go +290 -2
  13. package/engine/internal/gate/readiness_binding.go +66 -100
  14. package/engine/internal/gate/readiness_binding_test.go +126 -3
  15. package/engine/internal/hostpack/hostpack.go +9 -4
  16. package/engine/internal/hostpack/hostpack_test.go +16 -7
  17. package/engine/internal/install/install_test.go +5 -0
  18. package/engine/internal/lib/resolve.go +6 -6
  19. package/engine/internal/state/cmd/workflowmanifest/main.go +32 -3
  20. package/engine/internal/state/feature.go +1 -100
  21. package/engine/internal/state/observation.go +584 -0
  22. package/engine/internal/state/observation_open_other.go +9 -0
  23. package/engine/internal/state/observation_open_unix.go +12 -0
  24. package/engine/internal/state/observation_test.go +960 -0
  25. package/engine/internal/state/observation_unix_test.go +68 -0
  26. package/engine/internal/state/schema.go +60 -160
  27. package/engine/internal/state/state_test.go +489 -101
  28. package/engine/internal/state/status.go +67 -48
  29. package/engine/tests/adr_0004_required_by_phase_test.go +16 -13
  30. package/engine/tests/adr_0011_define_plan_test.go +14 -12
  31. package/engine/tests/gate_test.go +403 -28
  32. package/engine/tests/workspace_observation_migration_test.go +1065 -0
  33. package/pack/.claude/agents/devrites-code-reviewer.md +6 -1
  34. package/pack/.claude/agents/devrites-plan-drafter.md +5 -0
  35. package/pack/.claude/agents/devrites-plan-reviewer.md +6 -0
  36. package/pack/.claude/agents/devrites-proof-runner.md +7 -1
  37. package/pack/.claude/agents/devrites-retrospector.md +21 -25
  38. package/pack/.claude/agents/devrites-security-auditor.md +7 -3
  39. package/pack/.claude/agents/devrites-slice-wright.md +30 -4
  40. package/pack/.claude/agents/devrites-spec-reviewer.md +5 -0
  41. package/pack/.claude/agents/devrites-strategy-reviewer.md +3 -4
  42. package/pack/.claude/agents/devrites-test-analyst.md +5 -0
  43. package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +13 -26
  44. package/pack/.claude/skills/devrites-debug-recovery/reference/build-the-loop.md +11 -14
  45. package/pack/.claude/skills/devrites-doubt/SKILL.md +3 -4
  46. package/pack/.claude/skills/devrites-frontend-craft/reference/reuse-first.md +3 -4
  47. package/pack/.claude/skills/devrites-lib/reference/standards/README.md +5 -1
  48. package/pack/.claude/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md +30 -0
  49. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +35 -17
  50. package/pack/.claude/skills/devrites-lib/reference/standards/agents.md +11 -3
  51. package/pack/.claude/skills/devrites-lib/reference/standards/ci-cd.md +19 -0
  52. package/pack/.claude/skills/devrites-lib/reference/standards/code-review.md +1 -1
  53. package/pack/.claude/skills/devrites-lib/reference/standards/core.md +5 -0
  54. package/pack/.claude/skills/devrites-lib/reference/standards/data-integrity.md +95 -0
  55. package/pack/.claude/skills/devrites-lib/reference/standards/developer-experience.md +5 -5
  56. package/pack/.claude/skills/devrites-lib/reference/standards/documentation.md +28 -29
  57. package/pack/.claude/skills/devrites-lib/reference/standards/edge-case-trace.md +70 -10
  58. package/pack/.claude/skills/devrites-lib/reference/standards/integration-reliability.md +79 -0
  59. package/pack/.claude/skills/devrites-lib/reference/standards/loop-operations.md +85 -0
  60. package/pack/.claude/skills/devrites-lib/reference/standards/observability.md +10 -0
  61. package/pack/.claude/skills/devrites-lib/reference/standards/one-shot-actions.md +1 -6
  62. package/pack/.claude/skills/devrites-lib/reference/standards/patterns.md +20 -0
  63. package/pack/.claude/skills/devrites-lib/reference/standards/repository-topology.md +73 -0
  64. package/pack/.claude/skills/devrites-lib/reference/standards/security-checklist.md +6 -2
  65. package/pack/.claude/skills/devrites-lib/reference/standards/security.md +51 -16
  66. package/pack/.claude/skills/devrites-lib/reference/standards/skill-authoring.md +35 -40
  67. package/pack/.claude/skills/devrites-lib/reference/standards/test-proof-checklist.md +4 -0
  68. package/pack/.claude/skills/devrites-lib/reference/standards/testing.md +51 -6
  69. package/pack/.claude/skills/devrites-lib/reference/standards/workflow-artifacts.md +411 -102
  70. package/pack/.claude/skills/rite/SKILL.md +2 -0
  71. package/pack/.claude/skills/rite-adopt/SKILL.md +8 -10
  72. package/pack/.claude/skills/rite-adopt/reference/adoption.md +13 -15
  73. package/pack/.claude/skills/rite-autocomplete/SKILL.md +98 -139
  74. package/pack/.claude/skills/rite-autocomplete/reference/decision-policy.md +11 -5
  75. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +99 -114
  76. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +92 -124
  77. package/pack/.claude/skills/rite-build/SKILL.md +51 -73
  78. package/pack/.claude/skills/rite-build/reference/phase-contract.md +9 -18
  79. package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +37 -4
  80. package/pack/.claude/skills/rite-clarify/SKILL.md +3 -2
  81. package/pack/.claude/skills/rite-converge/SKILL.md +4 -2
  82. package/pack/.claude/skills/rite-converge/reference/convergence-assessment.md +8 -4
  83. package/pack/.claude/skills/rite-customize/SKILL.md +16 -18
  84. package/pack/.claude/skills/rite-define/SKILL.md +60 -62
  85. package/pack/.claude/skills/rite-define/reference/plan-template.md +88 -71
  86. package/pack/.claude/skills/rite-explain/SKILL.md +2 -1
  87. package/pack/.claude/skills/rite-learn/SKILL.md +28 -32
  88. package/pack/.claude/skills/rite-plan/SKILL.md +53 -56
  89. package/pack/.claude/skills/rite-plan/reference/anti-patterns.md +11 -1
  90. package/pack/.claude/skills/rite-plan/reference/dependency-graph.md +11 -2
  91. package/pack/.claude/skills/rite-plan/reference/replan-and-repair.md +10 -3
  92. package/pack/.claude/skills/rite-plan/reference/task-breakdown.md +2 -0
  93. package/pack/.claude/skills/rite-polish/reference/adr-promotion.md +7 -7
  94. package/pack/.claude/skills/rite-pressure-test/SKILL.md +24 -31
  95. package/pack/.claude/skills/rite-prove/SKILL.md +95 -156
  96. package/pack/.claude/skills/rite-prove/reference/acceptance-proof.md +28 -0
  97. package/pack/.claude/skills/rite-review/SKILL.md +5 -4
  98. package/pack/.claude/skills/rite-review/reference/five-axis-review.md +6 -0
  99. package/pack/.claude/skills/rite-review/reference/security-review.md +7 -2
  100. package/pack/.claude/skills/rite-seal/reference/final-evidence.md +3 -0
  101. package/pack/.claude/skills/rite-seal/reference/risk-and-rollback.md +19 -4
  102. package/pack/.claude/skills/rite-ship/reference/rollout.md +62 -43
  103. package/pack/.claude/skills/rite-spec/SKILL.md +8 -1
  104. package/pack/.claude/skills/rite-spec/reference/ai-spec-template.md +13 -6
  105. package/pack/.claude/skills/rite-spec/reference/spec-checklists.md +14 -2
  106. package/pack/.claude/skills/rite-spec/reference/spec-template.md +33 -4
  107. package/pack/.claude/skills/rite-temper/SKILL.md +5 -1
  108. package/pack/.claude/skills/rite-vet/SKILL.md +121 -174
  109. package/pack/.claude/skills/rite-vet/reference/anti-patterns.md +14 -2
  110. package/pack/.claude/skills/rite-vet/reference/artifacts.md +15 -9
  111. package/pack/.claude/skills/rite-vet/reference/depth.md +10 -3
  112. package/pack/.claude/skills/rite-vet/reference/review-axes.md +75 -77
  113. package/pack/.claude/skills/rite-watch-pr/SKILL.md +85 -0
  114. package/pack/.claude/skills/rite-zoom-out/SKILL.md +4 -5
  115. package/pack/.claude/workflows/devrites-readonly-review.js +194 -0
  116. package/pack/generated/README.md +1 -1
  117. package/pack/generated/claude/agents/devrites-code-reviewer.md +6 -1
  118. package/pack/generated/claude/agents/devrites-plan-drafter.md +5 -0
  119. package/pack/generated/claude/agents/devrites-plan-reviewer.md +6 -0
  120. package/pack/generated/claude/agents/devrites-proof-runner.md +7 -1
  121. package/pack/generated/claude/agents/devrites-retrospector.md +21 -25
  122. package/pack/generated/claude/agents/devrites-security-auditor.md +7 -3
  123. package/pack/generated/claude/agents/devrites-slice-wright.md +30 -4
  124. package/pack/generated/claude/agents/devrites-spec-reviewer.md +5 -0
  125. package/pack/generated/claude/agents/devrites-strategy-reviewer.md +3 -4
  126. package/pack/generated/claude/agents/devrites-test-analyst.md +5 -0
  127. package/pack/generated/claude/skills/devrites-debug-recovery/SKILL.md +13 -26
  128. package/pack/generated/claude/skills/devrites-debug-recovery/reference/build-the-loop.md +11 -14
  129. package/pack/generated/claude/skills/devrites-doubt/SKILL.md +3 -4
  130. package/pack/generated/claude/skills/devrites-frontend-craft/reference/reuse-first.md +3 -4
  131. package/pack/generated/claude/skills/devrites-lib/reference/standards/README.md +5 -1
  132. package/pack/generated/claude/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md +30 -0
  133. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +35 -17
  134. package/pack/generated/claude/skills/devrites-lib/reference/standards/agents.md +11 -3
  135. package/pack/generated/claude/skills/devrites-lib/reference/standards/ci-cd.md +19 -0
  136. package/pack/generated/claude/skills/devrites-lib/reference/standards/code-review.md +1 -1
  137. package/pack/generated/claude/skills/devrites-lib/reference/standards/core.md +5 -0
  138. package/pack/generated/claude/skills/devrites-lib/reference/standards/data-integrity.md +95 -0
  139. package/pack/generated/claude/skills/devrites-lib/reference/standards/developer-experience.md +5 -5
  140. package/pack/generated/claude/skills/devrites-lib/reference/standards/documentation.md +28 -29
  141. package/pack/generated/claude/skills/devrites-lib/reference/standards/edge-case-trace.md +70 -10
  142. package/pack/generated/claude/skills/devrites-lib/reference/standards/integration-reliability.md +79 -0
  143. package/pack/generated/claude/skills/devrites-lib/reference/standards/loop-operations.md +85 -0
  144. package/pack/generated/claude/skills/devrites-lib/reference/standards/observability.md +10 -0
  145. package/pack/generated/claude/skills/devrites-lib/reference/standards/one-shot-actions.md +1 -6
  146. package/pack/generated/claude/skills/devrites-lib/reference/standards/patterns.md +20 -0
  147. package/pack/generated/claude/skills/devrites-lib/reference/standards/repository-topology.md +73 -0
  148. package/pack/generated/claude/skills/devrites-lib/reference/standards/security-checklist.md +6 -2
  149. package/pack/generated/claude/skills/devrites-lib/reference/standards/security.md +51 -16
  150. package/pack/generated/claude/skills/devrites-lib/reference/standards/skill-authoring.md +35 -40
  151. package/pack/generated/claude/skills/devrites-lib/reference/standards/test-proof-checklist.md +4 -0
  152. package/pack/generated/claude/skills/devrites-lib/reference/standards/testing.md +51 -6
  153. package/pack/generated/claude/skills/devrites-lib/reference/standards/workflow-artifacts.md +411 -102
  154. package/pack/generated/claude/skills/rite/SKILL.md +2 -0
  155. package/pack/generated/claude/skills/rite-adopt/SKILL.md +8 -10
  156. package/pack/generated/claude/skills/rite-adopt/reference/adoption.md +13 -15
  157. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +98 -139
  158. package/pack/generated/claude/skills/rite-autocomplete/reference/decision-policy.md +11 -5
  159. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +99 -114
  160. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +92 -124
  161. package/pack/generated/claude/skills/rite-build/SKILL.md +51 -73
  162. package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +9 -18
  163. package/pack/generated/claude/skills/rite-build/reference/wright-dispatch.md +37 -4
  164. package/pack/generated/claude/skills/rite-clarify/SKILL.md +3 -2
  165. package/pack/generated/claude/skills/rite-converge/SKILL.md +4 -2
  166. package/pack/generated/claude/skills/rite-converge/reference/convergence-assessment.md +8 -4
  167. package/pack/generated/claude/skills/rite-customize/SKILL.md +16 -18
  168. package/pack/generated/claude/skills/rite-define/SKILL.md +60 -62
  169. package/pack/generated/claude/skills/rite-define/reference/plan-template.md +88 -71
  170. package/pack/generated/claude/skills/rite-explain/SKILL.md +2 -1
  171. package/pack/generated/claude/skills/rite-learn/SKILL.md +28 -32
  172. package/pack/generated/claude/skills/rite-plan/SKILL.md +53 -56
  173. package/pack/generated/claude/skills/rite-plan/reference/anti-patterns.md +11 -1
  174. package/pack/generated/claude/skills/rite-plan/reference/dependency-graph.md +11 -2
  175. package/pack/generated/claude/skills/rite-plan/reference/replan-and-repair.md +10 -3
  176. package/pack/generated/claude/skills/rite-plan/reference/task-breakdown.md +2 -0
  177. package/pack/generated/claude/skills/rite-polish/reference/adr-promotion.md +7 -7
  178. package/pack/generated/claude/skills/rite-pressure-test/SKILL.md +24 -31
  179. package/pack/generated/claude/skills/rite-prove/SKILL.md +95 -156
  180. package/pack/generated/claude/skills/rite-prove/reference/acceptance-proof.md +28 -0
  181. package/pack/generated/claude/skills/rite-review/SKILL.md +5 -4
  182. package/pack/generated/claude/skills/rite-review/reference/five-axis-review.md +6 -0
  183. package/pack/generated/claude/skills/rite-review/reference/security-review.md +7 -2
  184. package/pack/generated/claude/skills/rite-seal/reference/final-evidence.md +3 -0
  185. package/pack/generated/claude/skills/rite-seal/reference/risk-and-rollback.md +19 -4
  186. package/pack/generated/claude/skills/rite-ship/reference/rollout.md +62 -43
  187. package/pack/generated/claude/skills/rite-spec/SKILL.md +8 -1
  188. package/pack/generated/claude/skills/rite-spec/reference/ai-spec-template.md +13 -6
  189. package/pack/generated/claude/skills/rite-spec/reference/spec-checklists.md +14 -2
  190. package/pack/generated/claude/skills/rite-spec/reference/spec-template.md +33 -4
  191. package/pack/generated/claude/skills/rite-temper/SKILL.md +5 -1
  192. package/pack/generated/claude/skills/rite-vet/SKILL.md +121 -174
  193. package/pack/generated/claude/skills/rite-vet/reference/anti-patterns.md +14 -2
  194. package/pack/generated/claude/skills/rite-vet/reference/artifacts.md +15 -9
  195. package/pack/generated/claude/skills/rite-vet/reference/depth.md +10 -3
  196. package/pack/generated/claude/skills/rite-vet/reference/review-axes.md +75 -77
  197. package/pack/generated/claude/skills/rite-watch-pr/SKILL.md +85 -0
  198. package/pack/generated/claude/skills/rite-zoom-out/SKILL.md +4 -5
  199. package/pack/generated/claude/workflows/devrites-readonly-review.js +194 -0
  200. package/pack/generated/codex/agents/devrites-code-reviewer.toml +6 -1
  201. package/pack/generated/codex/agents/devrites-plan-drafter.toml +5 -0
  202. package/pack/generated/codex/agents/devrites-plan-reviewer.toml +6 -0
  203. package/pack/generated/codex/agents/devrites-proof-runner.toml +7 -1
  204. package/pack/generated/codex/agents/devrites-retrospector.toml +21 -25
  205. package/pack/generated/codex/agents/devrites-security-auditor.toml +7 -3
  206. package/pack/generated/codex/agents/devrites-slice-wright.toml +30 -4
  207. package/pack/generated/codex/agents/devrites-spec-reviewer.toml +5 -0
  208. package/pack/generated/codex/agents/devrites-strategy-reviewer.toml +3 -4
  209. package/pack/generated/codex/agents/devrites-test-analyst.toml +5 -0
  210. package/pack/generated/codex/skills/devrites-debug-recovery/SKILL.md +13 -26
  211. package/pack/generated/codex/skills/devrites-debug-recovery/reference/build-the-loop.md +11 -14
  212. package/pack/generated/codex/skills/devrites-doubt/SKILL.md +3 -4
  213. package/pack/generated/codex/skills/devrites-frontend-craft/reference/reuse-first.md +3 -4
  214. package/pack/generated/codex/skills/devrites-lib/reference/standards/README.md +5 -1
  215. package/pack/generated/codex/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md +30 -0
  216. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +35 -17
  217. package/pack/generated/codex/skills/devrites-lib/reference/standards/agents.md +11 -3
  218. package/pack/generated/codex/skills/devrites-lib/reference/standards/ci-cd.md +19 -0
  219. package/pack/generated/codex/skills/devrites-lib/reference/standards/code-review.md +1 -1
  220. package/pack/generated/codex/skills/devrites-lib/reference/standards/core.md +5 -0
  221. package/pack/generated/codex/skills/devrites-lib/reference/standards/data-integrity.md +95 -0
  222. package/pack/generated/codex/skills/devrites-lib/reference/standards/developer-experience.md +5 -5
  223. package/pack/generated/codex/skills/devrites-lib/reference/standards/documentation.md +28 -29
  224. package/pack/generated/codex/skills/devrites-lib/reference/standards/edge-case-trace.md +70 -10
  225. package/pack/generated/codex/skills/devrites-lib/reference/standards/integration-reliability.md +79 -0
  226. package/pack/generated/codex/skills/devrites-lib/reference/standards/loop-operations.md +85 -0
  227. package/pack/generated/codex/skills/devrites-lib/reference/standards/observability.md +10 -0
  228. package/pack/generated/codex/skills/devrites-lib/reference/standards/one-shot-actions.md +1 -6
  229. package/pack/generated/codex/skills/devrites-lib/reference/standards/patterns.md +20 -0
  230. package/pack/generated/codex/skills/devrites-lib/reference/standards/repository-topology.md +73 -0
  231. package/pack/generated/codex/skills/devrites-lib/reference/standards/security-checklist.md +6 -2
  232. package/pack/generated/codex/skills/devrites-lib/reference/standards/security.md +51 -16
  233. package/pack/generated/codex/skills/devrites-lib/reference/standards/skill-authoring.md +35 -40
  234. package/pack/generated/codex/skills/devrites-lib/reference/standards/test-proof-checklist.md +4 -0
  235. package/pack/generated/codex/skills/devrites-lib/reference/standards/testing.md +51 -6
  236. package/pack/generated/codex/skills/devrites-lib/reference/standards/workflow-artifacts.md +411 -102
  237. package/pack/generated/codex/skills/rite/SKILL.md +2 -0
  238. package/pack/generated/codex/skills/rite-adopt/SKILL.md +8 -10
  239. package/pack/generated/codex/skills/rite-adopt/reference/adoption.md +13 -15
  240. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +98 -139
  241. package/pack/generated/codex/skills/rite-autocomplete/reference/decision-policy.md +11 -5
  242. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +99 -114
  243. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +92 -124
  244. package/pack/generated/codex/skills/rite-build/SKILL.md +51 -73
  245. package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +9 -18
  246. package/pack/generated/codex/skills/rite-build/reference/wright-dispatch.md +37 -4
  247. package/pack/generated/codex/skills/rite-clarify/SKILL.md +3 -2
  248. package/pack/generated/codex/skills/rite-converge/SKILL.md +4 -2
  249. package/pack/generated/codex/skills/rite-converge/reference/convergence-assessment.md +8 -4
  250. package/pack/generated/codex/skills/rite-customize/SKILL.md +16 -18
  251. package/pack/generated/codex/skills/rite-define/SKILL.md +60 -62
  252. package/pack/generated/codex/skills/rite-define/reference/plan-template.md +88 -71
  253. package/pack/generated/codex/skills/rite-explain/SKILL.md +2 -1
  254. package/pack/generated/codex/skills/rite-learn/SKILL.md +28 -32
  255. package/pack/generated/codex/skills/rite-plan/SKILL.md +53 -56
  256. package/pack/generated/codex/skills/rite-plan/reference/anti-patterns.md +11 -1
  257. package/pack/generated/codex/skills/rite-plan/reference/dependency-graph.md +11 -2
  258. package/pack/generated/codex/skills/rite-plan/reference/replan-and-repair.md +10 -3
  259. package/pack/generated/codex/skills/rite-plan/reference/task-breakdown.md +2 -0
  260. package/pack/generated/codex/skills/rite-polish/reference/adr-promotion.md +7 -7
  261. package/pack/generated/codex/skills/rite-pressure-test/SKILL.md +24 -31
  262. package/pack/generated/codex/skills/rite-prove/SKILL.md +95 -156
  263. package/pack/generated/codex/skills/rite-prove/reference/acceptance-proof.md +28 -0
  264. package/pack/generated/codex/skills/rite-review/SKILL.md +5 -4
  265. package/pack/generated/codex/skills/rite-review/reference/five-axis-review.md +6 -0
  266. package/pack/generated/codex/skills/rite-review/reference/security-review.md +7 -2
  267. package/pack/generated/codex/skills/rite-seal/reference/final-evidence.md +3 -0
  268. package/pack/generated/codex/skills/rite-seal/reference/risk-and-rollback.md +19 -4
  269. package/pack/generated/codex/skills/rite-ship/reference/rollout.md +62 -43
  270. package/pack/generated/codex/skills/rite-spec/SKILL.md +8 -1
  271. package/pack/generated/codex/skills/rite-spec/reference/ai-spec-template.md +13 -6
  272. package/pack/generated/codex/skills/rite-spec/reference/spec-checklists.md +14 -2
  273. package/pack/generated/codex/skills/rite-spec/reference/spec-template.md +33 -4
  274. package/pack/generated/codex/skills/rite-temper/SKILL.md +5 -1
  275. package/pack/generated/codex/skills/rite-vet/SKILL.md +121 -174
  276. package/pack/generated/codex/skills/rite-vet/reference/anti-patterns.md +14 -2
  277. package/pack/generated/codex/skills/rite-vet/reference/artifacts.md +15 -9
  278. package/pack/generated/codex/skills/rite-vet/reference/depth.md +10 -3
  279. package/pack/generated/codex/skills/rite-vet/reference/review-axes.md +75 -77
  280. package/pack/generated/codex/skills/rite-watch-pr/SKILL.md +85 -0
  281. package/pack/generated/codex/skills/rite-zoom-out/SKILL.md +4 -5
  282. package/package.json +1 -1
  283. package/scripts/build-host-artifacts.sh +3 -1
@@ -1,124 +1,92 @@
1
- # Stop conditions: when autocomplete must pause for a human
2
-
3
- On these conditions, write `state.md` (`awaiting_human` or `blocked`), report
4
- the reason and one resume command when an actual human/safety/access action can
5
- change the state, notify if configured, and stop. Exhausted agent-owned
6
- technical recovery is terminal for its unchanged causal fingerprint: record
7
- `Next step: none` and no runnable recovery command. `--ship` cannot bypass them.
8
- Closure of a prior fingerprint is progress, not exhaustion. A separately evidenced
9
- Critical/Important failed invariant starts its own bounded fingerprint; it never
10
- resets or extends the budget of the one just closed.
11
-
12
- An exhausted consumptive-action authorization is not technical-recovery
13
- exhaustion. It blocks another real action, but retained evidence of a new
14
- Critical/Important fingerprint must enter offline caller-owned recovery while its
15
- own no-progress budget remains. After affected Vet is READY, pause for fresh action
16
- authorization; never execute from the old GO.
17
-
18
- ## Always stop (irreversible-risk list: from `afk-hitl.md`)
19
-
20
- Regardless of `allow_gates` or `--ship`:
21
- - Destructive data migration (drop column/table, irreversible backfill).
22
- - Auth / authz boundary change.
23
- - Public-API break (response shape, removed endpoint, changed status semantics).
24
- - External-service contract change.
25
- - Filesystem destruction outside the workspace.
26
-
27
- Red checks are hard non-advance gates. Run bounded `devrites-debug-recovery`;
28
- on exhaustion, stop as a technical blocker unless human-owned.
29
-
30
- ## Not a stop: agent-owned backtracking
31
-
32
- `NEEDS_REPLAN` is not a stop condition under an active Autocomplete caller. It
33
- blocks forward advancement, persists the return cursor, and immediately routes
34
- Plan repair plus Recovery Vet. The same applies to any intermediate nested
35
- `STOP`/`Next step` whose underlying decision is agent-owned.
36
-
37
- Agent-owned backtracking is not a stop condition while its causal-fingerprint
38
- budget remains. The active caller invokes the earlier phase inline, follows Vet
39
- and any bounded remediation, then resumes the originating phase. Persist
40
- `Next step` for crash recovery, but do not surface it as a command the human must
41
- submit. Use the repaired finding's narrow Vet recheck to distinguish resolution,
42
- the same decisive failure, and a genuinely new Critical/Important invariant.
43
- Stop only after three no-progress attempts on the exact same fingerprint or when
44
- the remaining choice is a real human/safety/access gate.
45
-
46
- On technical exhaustion, preserve the fingerprint, reproduction, attempts, and
47
- dead ends, then stop without `/rite-plan unblock` or another phase command.
48
- Reinvocation with unchanged evidence remains blocked and does not reset the cap.
49
- Here `unchanged` means the same fingerprint already has three recorded
50
- no-progress corrections. A retained fingerprint with remaining offline budget is
51
- not terminal merely because `state.md` was written by the failed action or a prior
52
- session ended.
53
-
54
- A pre-ownership workflow-artifact writer stop is not unchanged evidence when the
55
- current contract supplies controlling-root materialization. Prior drafter/wright refusals do not count
56
- as root materialization attempts. Reopen only when exact paths and executable
57
- behavior passed Vet and there is **no controlling-root materialization attempt**;
58
- record the routing migration so it cannot reset again. Missing product slices,
59
- unresolved protocol choices, or a recorded root attempt remain under their normal
60
- gate/fingerprint rules. The first controlling-root failure is not exhaustion: it
61
- is the first no-progress result for the materializer fingerprint. If all targets
62
- still equal their recorded preimages, no real action ran, and only admitted bound
63
- temporaries remain, reopen an incorrectly persisted one-shot `1/1` terminal,
64
- preserve its evidence as attempt one, clean/repair/preflight offline, and continue
65
- within the shared three-attempt cap.
66
-
67
- Past evidence being irretrievable is not by itself terminal. When an in-scope
68
- trusted diagnostic seam can make the next retained fingerprint uniquely
69
- actionable, Autocomplete must run diagnostic-amplification Plan repair and narrow
70
- Vet inline, then pause for a fresh GO before the single evidence-acquisition
71
- attempt. Use `Next: none` only after proving no safe in-scope amplification seam
72
- exists, a real human/risk/scope gate owns it, or bounded recovery is exhausted.
73
-
74
- ## Stop on gate severity
75
-
76
- - `blocking` gate fires synchronous pause.
77
- - `escalating` gate fires pause, route to the specialist tag.
78
- - Any `questions.md` entry with `gate: validating` and `status: open` → pause (it is a
79
- seal NO-GO by definition; stop before reaching seal).
80
-
81
- ## Stop on strategic-review scope expansion (`/rite-temper`)
82
-
83
- - Any `expand` or added acceptance criterion pauses regardless of
84
- `allow_gates`/`--ship`. Only `hold-rigor` and `reduce-to-MVP` auto-apply;
85
- skipped low-stakes specs and those two modes do not pause.
86
-
87
- ## Stop on incomplete decision coverage (`/rite-clarify`)
88
-
89
- - Stop on any material Partial/Missing/unowned row or low-confidence, high-consequence
90
- assumption. Continue the up-front window with the next genuine decision packet; never arm
91
- AFK or carry it into build. Resolve facts and reversible choices automatically.
92
-
93
- ## Stop on workflow state
94
-
95
- - **NO-GO at seal** → stop; surface every blocker with `file:line` and the fix
96
- direction. Do not round NO-GO up to GO.
97
- - **Spec Drift Guard fires** (`/rite-build` finds the plan is wrong and the change
98
- alters product behaviour) → stop; route through `/rite-plan repair`.
99
- - **Budget exhausted with slices still pending:** any validated root-owned remaining
100
- value of zero stops before the next dispatch. Report which bound won (pre-existing
101
- remaining value, explicit flag, sentinel cap, or post-vet pending count) and the
102
- unbuilt slices. A malformed value also fails closed. Zero with no pending slices is
103
- normal completion → continue to `/rite-prove` without pausing.
104
- - **Still low-confidence after the interview:** the idea can't be pinned to testable
105
- acceptance criteria → stop and ask, rather than guessing the product.
106
- - **Repeated failure:** bounded recovery exhausts → stop with reproduction.
107
-
108
- ## The final type-GO
109
-
110
- - `--ship` / `--yolo` never authorizes Git. Continue through ship preflight,
111
- disclose the exact plan, then stop for literal `GO` and native approval.
112
- - Without either flag, stop at seal GO with `/rite-ship` as the resume command.
113
- Seal GO, AFK, prior approval, and flags never satisfy ship approval.
114
-
115
- ## How to stop well
116
-
117
- State must be enough for a fresh agent to resume cold:
118
- - `state.md`: `Status`, the blocking reason, and either a single actionable
119
- `Next step` command or the terminal `none — technical recovery exhausted`
120
- marker.
121
- - The relevant `questions.md` / `drift.md` / `seal.md` entry that explains the pause.
122
- - A one-line user-facing message: *what* stopped it and, only when one exists,
123
- *what human-owned action* resumes. A terminal technical blocker names no
124
- routine Plan/Vet/retry command.
1
+ # Stop conditions: when autocomplete pauses
2
+
3
+ On a real stop, write `state.md` as `awaiting_human` or `blocked`, persist the
4
+ reason, and include one resume command only when an actual human/safety/access
5
+ action can change it. Exhausted agent-owned recovery records terminal
6
+ `Next step: none` and no runnable recovery command. `--ship` never bypasses a
7
+ stop.
8
+
9
+ Authority: `.claude/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md`.
10
+
11
+ <!-- BEGIN RESLICE ROUTE-TO-ACTION -->
12
+ - `FOLD` keep Plan repair/affected Vet internal; no stop solely for topology/count.
13
+ - `GUARD_AND_REPAIR` enter Spec Drift Guard/Clarify; pause only at an existing human-owned gate; resume Plan/Vet internally.
14
+ - `BLOCKED_INPUT` no planning writes; stop internal branch; exact diagnostic; recover authority; reclassify.
15
+ <!-- END RESLICE ROUTE-TO-ACTION -->
16
+
17
+ ## Always stop
18
+
19
+ Regardless of flags or AFK ceiling:
20
+
21
+ - destructive data migration;
22
+ - auth/authz boundary change;
23
+ - public API break;
24
+ - external-service contract change; or
25
+ - filesystem destruction outside the workspace.
26
+
27
+ Red proof cannot advance. Run bounded Debug Recovery; stop after proven
28
+ exhaustion unless the remaining owner is human.
29
+
30
+ ## Not stops: internal technical routing
31
+
32
+ `NEEDS_REPLAN` is not a stop condition under active Autocomplete. It blocks
33
+ forward work, persists the return cursor, and invokes Plan repair plus Recovery
34
+ Vet inline. The same applies to nested `STOP`/`Next step` when its decision is
35
+ agent-owned.
36
+
37
+ Agent-owned backtracking is not a stop condition while the exact causal
38
+ fingerprint has budget. Invoke the earlier phase, affected Vet, remediation, and
39
+ proof; then resume the origin. Stop only after three no-progress corrections of
40
+ that exact fingerprint or a real human/safety/access gate. Preserve reproduction,
41
+ attempts, and dead ends; never offer `/rite-plan unblock` or another routine
42
+ phase command. Reinvocation with unchanged evidence does not reset the cap.
43
+ `unchanged` means the same fingerprint already has three recorded no-progress
44
+ corrections. Closure is progress; a separately evidenced Critical/Important
45
+ invariant starts its own cap and cannot extend the closed one.
46
+
47
+ Spent consumptive-action authorization is not technical-recovery exhaustion.
48
+ It blocks another execution; retained new Critical/Important evidence still
49
+ enters offline recovery. After affected Vet is READY, pause for fresh action
50
+ authorization and never reuse old GO.
51
+
52
+ Past evidence being irretrievable is not by itself terminal. If an in-scope
53
+ trusted seam can uniquely discriminate the next failure, run diagnostic-
54
+ amplification Plan repair and narrow Vet inline, then pause for fresh GO before
55
+ one evidence-acquisition attempt. Use terminal none only when no safe in-scope
56
+ seam exists, a real human/risk/scope gate owns it, or bounded recovery is
57
+ exhausted.
58
+
59
+ <!-- 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"} -->
60
+ ## Other stop classes
61
+
62
+ - **Gate severity:** blocking or escalating gate; any open validating question.
63
+ - **Temper:** any `expand` or added acceptance criterion. `hold-rigor`,
64
+ `reduce-to-MVP`, and a justified skip do not pause.
65
+ - **Clarify:** material Partial/Missing/unowned decision coverage or a
66
+ low-confidence high-consequence assumption. Continue the initial interview;
67
+ never arm AFK early.
68
+ - **Seal:** NO-GO, with every blocker and fix direction. Never round up to GO.
69
+ - **Reslice:** execute its marked action before deciding continue/stop.
70
+ - **Slice budget:** any validated root-owned remaining value of zero stops before the next dispatch
71
+ when slices remain; malformed state also stops. Report whether the winning
72
+ bound was the pre-existing remaining value, explicit flag, sentinel cap, or post-vet pending count.
73
+ Zero with no pending slices is normal completion and proceeds to Prove.
74
+ - **Resource envelope:** missing/malformed/expired AFK, overlapping run,
75
+ exhausted/unobservable declared agent/token/cost/time headroom, or review queue
76
+ above cap. At cap, only queue-reducing reconciliation may run. Persist winning
77
+ bound and observed usage; a new activation does not reset durable budgets or
78
+ expiry.
79
+ - **Confidence:** intent still cannot become testable acceptance after interview.
80
+ - **Repeated failure:** the exact fingerprint's bounded recovery is exhausted.
81
+
82
+ ## Final GO and durable stop
83
+
84
+ `--ship`/`--yolo` never authorizes Git. With a flag, complete Ship preflight,
85
+ disclose the exact plan, and stop for literal `GO` plus native approval. Without
86
+ one, stop at Seal GO with `/rite-ship`. Seal GO, AFK, prior approval, and flags
87
+ never satisfy Ship approval.
88
+
89
+ A cold-resumable stop records `state.md` status, exact reason, and either one
90
+ human-owned resume action or `none technical recovery exhausted`; the owning
91
+ question/drift/seal entry explains it. The user-facing line says what stopped
92
+ and, only when applicable, what human action resumes it.
@@ -8,86 +8,64 @@ user-invocable: true
8
8
  # /rite-build: one verified slice
9
9
 
10
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
- only under existing green-proof, cap, and pause rules. **Read the active workspace
13
- first**; if none, tell the user to run `/rite-spec <feature>`.
11
+ Explicit `.devrites/AFK` alone lets the controlling root chain pending slices
12
+ under green proof, caps, and pause rules. Every wright returns after it. Read the
13
+ active workspace first; without one, route `/rite-spec <feature>`.
14
14
 
15
- The root owns gates/workspace; a
16
- fresh-context [`devrites-slice-wright`](../../agents/devrites-slice-wright.md)
17
- writes product source and tests. Exact Vet-ready executable workflow artifacts use
15
+ Root owns gates/bookkeeping. Fresh
16
+ [`devrites-slice-wright`](../../agents/devrites-slice-wright.md) writes product
17
+ source/tests. Workflow Artifact paths use
18
18
  [`workflow-artifacts.md`](../devrites-lib/reference/standards/workflow-artifacts.md).
19
- Apply the readiness, selection, host, HITL/AFK,
20
- dispatch, doubt, fail-on-red, record, and stop checks. See
19
+ Execute [`reference/phase-contract.md`](reference/phase-contract.md); dispatch uses
21
20
  [`reference/wright-dispatch.md`](reference/wright-dispatch.md).
22
21
 
23
- ## Rules consulted (read on demand from `.claude/skills/devrites-lib/reference/standards/`)
24
- Read `.claude/skills/devrites-lib/reference/standards/core.md` first. The wright
25
- reads named on-demand rules while writing; root reads them for doubt/record gates:
26
- - `coding-style.md`: naming, function shape, guard clauses, comments, reuse-first.
27
- - `error-handling.md`: fail fast, no silent catches, fail closed.
28
- - `testing.md`: pyramid, behaviour over implementation, see-it-fail-first.
29
- - [`reference/tdd.md`](reference/tdd.md): the slice-level Red → Green → Refactor
30
- and Prove-It contract.
31
- - `patterns.md`: composition over inheritance, avoid premature abstraction.
32
- - `principles.md`: the project invariants (`.devrites/principles.md`) the slice must honor; the wright reads them as **binding**, not priors.
33
- - `security.md`: when the slice touches user input, auth, data, or external integrations.
34
- - `definition-of-done.md`: standing Done bar: acceptance mapped, fresh proof, no open hard gates, scoped edits, rollback/docs where needed.
22
+ ## Required rules
35
23
 
24
+ Read `.claude/skills/devrites-lib/reference/standards/core.md` first. Load only
25
+ rules triggered by the slice:
36
26
 
37
- ## Operating rules
38
- - **One slice per wright dispatch.** Every wright returns after it. The controlling
39
- root applies the mode rule above before another dispatch.
40
- - Evidence over confidence. Prefer existing conventions. Feature scope only: no
41
- drive-by refactors.
42
- - **Record adjacent issues; do not edit them.** An issue outside the exact paths
43
- stated in the dispatch task becomes an FYI follow-up in `decisions.md`. The slice summary states
44
- what it deliberately left alone ([`git-workflow.md`](../devrites-lib/reference/standards/git-workflow.md)
45
- "Things I didn't touch"). The root rejects a returned diff outside this boundary.
46
- - **Don't re-run an unchanged check.** The same build or test on unchanged code provides
47
- no new evidence. Re-verify after an edit.
48
- - Surface material assumptions. Do not introduce an unplanned dependency or second design
49
- system: route the objective plan gap to `/rite-vet` (or bounded recovery), not to a human.
50
- Ask only if the newly exposed choice changes licensing/cost/security, product behavior,
51
- or an explicit architecture policy. The
52
- [Spec Drift Guard](reference/spec-drift-guard.md) is active throughout.
53
- - **Avoid AI slop while writing.** `devrites-slice-wright` applies the anti-slop charter
54
- while writing. The canonical list is `rite-polish/reference/anti-ai-slop.md`; do not
55
- duplicate it here. The wright follows project idioms and reuses existing code first.
56
- **Verify the charter on return.** Do not correct source from the orchestrator.
57
- The **prose you write yourself** (`evidence.md`, `decisions.md`, the slice report) follows
58
- the human-voice charter (`.claude/skills/devrites-lib/reference/standards/prose-style.md`; depth in `devrites-prose-craft`): no
59
- filler openers or marketing adjectives; preserve exact commands and identifiers.
60
- - **Honor declared project principles.** The wright reads `.devrites/principles.md` and treats
61
- each invariant as **binding** (not a prior to weigh like a convention): a slice it cannot build
62
- without breaking one is an **Escalation**, not a silent violation. On return **you verify no
63
- principle was broken**; a fresh violation is handled like any irreversible-risk item: a
64
- human-approved, scoped exception in the register or a stop, never folded into the slice. No
65
- `.devrites/principles.md` → none declared → nothing to honor.
66
- - **You never edit product source/tests.** You write `.devrites/` bookkeeping and,
67
- only through `workflow-artifacts.md`, an exact Vet-ready executable workflow-artifact set.
68
- Follow the
69
- host gate in `wright-dispatch.md` before every build or recovery dispatch. On a
70
- supported host, the wright is the only writer of code and tests. Codex gives
71
- the root workspace permission only so that native writer dispatch can execute;
72
- never patch code from the root. Put the exact project-relative source/test path
73
- list directly in the task, dispatch the exact `devrites-slice-wright`, then
74
- compare `git diff --name-only` with those task paths. Any extra source file is
75
- a hard STOP.
76
- - **Executable workflow-artifact branch.** If every implementation target is an
77
- exact admitted path under the active `.devrites/work/<slug>/`, the controlling
78
- root materializes and proves that atomic set itself. It does not dispatch the wright,
79
- decrement/count a product slice, update the candidate manifest, or execute the
80
- consumptive action. After narrow Vet, restore the caller cursor.
27
+ - coding style, error handling, testing, [`reference/tdd.md`](reference/tdd.md),
28
+ patterns, and definition of done;
29
+ - binding `.devrites/principles.md` invariants when present;
30
+ - security for input/auth/data/integrations;
31
+ - repository topology for multiple roots/languages or generated/vendor surfaces;
32
+ - data integrity for durable state, migration, concurrency, tenancy, or retention;
33
+ - integration reliability for API/webhook/queue/job/cache/service boundaries.
81
34
 
82
- ## Workflow
35
+ The wright also applies the canonical anti-slop list. Root verifies its return;
36
+ it never patches source itself.
83
37
 
84
- Run the full execution contract in
85
- [`reference/phase-contract.md`](reference/phase-contract.md). It is not optional:
86
- it contains the gated one-slice workflow, including readiness, HITL/AFK handling,
87
- wright dispatch, doubt, fail-on-red, record gates, and stop behavior.
38
+ ## Invariants
88
39
 
89
- ## Output
40
+ - One slice per wright dispatch; writers are serial. Use the native-worktree pilot
41
+ only when `wright-dispatch.md`'s clean preflight and reconciliation both hold,
42
+ otherwise serial same-worktree writing.
43
+ - Exact feature scope only. Record adjacent issues and Things I didn't touch;
44
+ reject any returned diff outside the task's explicit source/test paths.
45
+ - Never rerun an unchanged check. Re-prove after edits.
46
+ - Unplanned dependency, design system, objective technical gap, or repair stays
47
+ inside Vet/Spec Drift Guard. Ask only for licensing/cost/security/product or
48
+ explicit architecture-policy decisions.
49
+ - Root never edits product source/tests. It writes canonical `.devrites/`
50
+ bookkeeping and applies the Workflow Artifact route only. The supported host's
51
+ wright is sole product writer. Put exact project-relative paths directly in the
52
+ task; compare returned file list and `git diff --name-only`; extras hard-stop.
53
+ - Project principles are binding. An unavoidable conflict or irreversible risk
54
+ needs a human-approved scoped exception or stop, never silent balancing.
55
+ - Evidence beats confidence. Never weaken a failing test, skip TDD, widen a
56
+ writer, or self-approve a wright return. Route drift through
57
+ [`reference/spec-drift-guard.md`](reference/spec-drift-guard.md); checkpoint
58
+ mode follows [`reference/checkpoint.md`](reference/checkpoint.md).
90
59
 
91
- Use [`reference/output.md`](reference/output.md) and the shared
92
- [`reply contract`](../devrites-lib/reference/reply-contract.md). They keep the
93
- HITL stop, bounded AFK chaining, and no-automatic-`/rite-prove` boundary explicit.
60
+ ## Workflow Artifact branch
61
+
62
+ <!-- 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"} -->
63
+ ## Execute and reply
64
+
65
+ Run every step in `reference/phase-contract.md`: readiness, one target, dispatch
66
+ or canonical transaction, return inspection, independent doubt/test analysis,
67
+ approved fail-on-red proof, record, AFK accounting, and stop. Use
68
+ [`reference/output.md`](reference/output.md) plus the shared
69
+ [`reply contract`](../devrites-lib/reference/reply-contract.md). HITL never starts
70
+ the next slice automatically; AFK chains only within its durable remaining
71
+ budget; Prove starts only after all slices are built.
@@ -9,33 +9,21 @@ See [`one-slice-cycle.md`](one-slice-cycle.md); candidate lifecycle is
9
9
  ID-and-meaning traceability, and green proof preflight; run
10
10
  `devrites-engine check readiness <slug>`. Any miss/nonzero stops.
11
11
  2. **Select one target.** Restate goal, acceptance criteria, exclusions, and exact
12
- source/test paths. Before dispatch, validate relevant `assumptions.md` rows
12
+ source/test paths. Reconcile the spec/plan applicability map and include only the
13
+ triggered topology/data/integration standards plus their named failure/recovery/proof
14
+ cases in the writer contract. Before dispatch, validate relevant `assumptions.md` rows
13
15
  against live evidence. If one is disproved and changes acceptance, architecture,
14
16
  scope, or proof, use the Spec Drift Guard/plan recovery; a human-owned unknown
15
17
  stops. Resolve HITL before source work. AFK answers only permitted gates;
16
18
  human-owned or irreversible risk persists a question and stops for `/rite-resolve`.
17
- If the target is only an exact Vet-ready executable workflow-artifact set under
18
- the active feature workspace, apply
19
+ If the target is an exact Vet-ready Workflow Artifact set, apply
19
20
  [`workflow-artifacts.md`](../../devrites-lib/reference/standards/workflow-artifacts.md)
20
21
  instead of treating it as a product slice.
21
- 3. **Dispatch or materialize.** Product source/tests apply [`wright-dispatch.md`](wright-dispatch.md).
22
+ 3. **Dispatch or transact.** Product source/tests apply [`wright-dispatch.md`](wright-dispatch.md).
22
23
  Put the smallest exact project-relative source/test path list directly in the task;
23
24
  dispatch the exact `devrites-slice-wright` fresh. Root never writes those product
24
25
  paths, wright never widens, and a missing profile stops.
25
- For the workflow-artifact branch, the controlling root writes only the admitted
26
- `.devrites/work/<slug>/` paths. Before an active journal or target write, it
27
- compiles the materializer and runs the exact transaction implementation in a
28
- disposable same-layout fixture covering success, replacement failure, rollback,
29
- retained-temporary cleanup, and rerun. It then proves the complete atomic set,
30
- rechecks an
31
- identical product candidate, records hashes/evidence, and runs narrow Vet. Do not
32
- dispatch any agent as a substitute writer and do not charge a product slice.
33
-
34
- ### Executable workflow-artifact branch
35
-
36
- The controlling root materializes the exact admitted workflow-artifact set and
37
- **does not dispatch the wright**. This branch never changes product slice state or
38
- the candidate manifest; it returns through narrow Vet before any consumptive action.
26
+ <!-- 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"} -->
39
27
  4. **Inspect the return.** Wait; compare its file list and `git diff --name-only`
40
28
  with the contract. Reject stale, partial, malformed, or out-of-scope work.
41
29
  Preserve user work; source restoration uses the same bounded wright.
@@ -50,6 +38,9 @@ the candidate manifest; it returns through narrow Vet before any consumptive act
50
38
  and recheck `git diff --name-only`. Missing, weakened, red, or source-mutating proof
51
39
  is not success.
52
40
 
41
+ A failure is `pre-existing` or environment-specific only with a same-command,
42
+ same-environment baseline predating the candidate; otherwise it remains unresolved.
43
+
53
44
  Technical failure uses bounded `devrites-debug-recovery`: reapply the host gate
54
45
  before an accepted in-slice correction, keep one exact fingerprint/three
55
46
  no-progress attempts, and never rerun an unchanged check. A closed reproduction
@@ -11,6 +11,32 @@ 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.
13
13
 
14
+ ## Isolated writer-worktree pilot
15
+
16
+ Use native isolation only when the current host exposes an explicit named-writer
17
+ worktree plus result reconciliation; separate agent threads or inherited sandboxes do
18
+ not qualify. Codex CLI custom subagents therefore use `same-worktree` unless a future
19
+ supported interface passes this capability gate—never create a manual worktree from the
20
+ read-only root to imitate it. Also require `git rev-parse
21
+ --show-superproject-working-tree` to be empty; resolved git/common dirs; committed,
22
+ clean candidate/index; all inputs at `HEAD`; no other writer; and green cheap isolated
23
+ baseline proof. Otherwise use serial same-worktree dispatch—never stash, commit, or
24
+ discard user work to qualify. Ask host for an explicit current-`HEAD` base when
25
+ supported. Regardless of host defaults, the wright's first command must prove actual `git rev-parse HEAD` equals supplied
26
+ `worktree_base`. Mismatch returns a gap with no write before project reads or baseline proof.
27
+
28
+ The isolated wright returns one local unpushed `transfer_commit`, its `worktree_base`,
29
+ and exact files. Root proves descendant base, exact `git diff --name-only
30
+ <base>..<transfer>`, no `.devrites/**`/submodule/symlink/unrelated delta, unchanged
31
+ source base, and no user-work overwrite. Use only host-native explicit reconciliation;
32
+ never ad hoc copy, cherry-pick, or merge from read-only root. Compare transferred bytes,
33
+ run approved proof, record evidence, then let host remove worktree.
34
+
35
+ Conflict, extra/missing commit, moved base, or cleanup failure is `gap`/STOP:
36
+ preserve the worktree and commit. Without explicit reconciliation, use same-worktree serial.
37
+ Parallel writer work remains forbidden until this serial pilot measures transfer,
38
+ conflict, proof, and review outcomes on both hosts.
39
+
14
40
  ## Prepare
15
41
 
16
42
  1. Derive the smallest exact project-relative source/test path list; reject
@@ -20,15 +46,20 @@ the wright or recreate an engine bridge.
20
46
  [`workflow-artifacts.md`](../../devrites-lib/reference/standards/workflow-artifacts.md);
21
47
  its rejection here is not a blocker.
22
48
  2. Put it in the task with goal, verbatim acceptance, exclusions, context,
23
- `test-plan.md` proof commands, and applicable standards.
49
+ `test-plan.md` proof commands, and applicable standards. For each triggered
50
+ topology/data/integration standard, include only the feature-specific owner/invariant,
51
+ failure or partial-state case, recovery rule, and required proof from the vetted plan.
52
+ Do not paste the whole standard or silently omit an applicable risk.
24
53
  A new path requires a new bounded contract; the wright cannot widen the task.
25
54
  3. Record `git diff --name-only` before dispatch so unrelated work remains
26
- distinguishable.
55
+ distinguishable. For an isolated pilot, also record committed base SHA and exact
56
+ baseline status before asking the host for isolation.
27
57
 
28
58
  ## Run
29
59
 
30
- Ask the host for the exact writer in fresh context and wait. Never run two
31
- writers in one worktree or substitute a generic agent.
60
+ Ask the host for the exact writer in fresh context and wait. Use at most one writer
61
+ across all linked worktrees for this workspace. Never run two writers in one worktree,
62
+ run isolated and same-worktree writers concurrently, or substitute a generic agent.
32
63
 
33
64
  ## Inspect and prove
34
65
 
@@ -38,6 +69,8 @@ writers in one worktree or substitute a generic agent.
38
69
  wright; root never widens scope or edits source.
39
70
  2. Inspect the test diff for deletion, skipping, focus markers, or loosened
40
71
  assertions. Dedicated test analysis treats weakening as Critical.
72
+ Confirm a test for a data/integration/topology risk can actually exhibit that risk;
73
+ mocks that erase it and one-root proof offered for another root are unproven.
41
74
  3. Run only repository proof already approved by `test-plan.md`, then inspect
42
75
  `git diff --name-only` again in case a proof tool changed source.
43
76
  4. Challenge decisions. Human choices return; native diagnosis routes failures.
@@ -39,8 +39,9 @@ dispatch uses
39
39
  `Spec gate: passed`; otherwise stop at `/rite-spec`. Apply the native cursor
40
40
  protocol below before changing workspace artifacts.
41
41
  2. **Enumerate the topology.** From the spec, live code, contracts, references,
42
- and recorded decisions, list every material actor, journey/component, state,
43
- data lifecycle, integration, operation, proof surface, and must-NOT boundary.
42
+ and recorded decisions, list every material stakeholder/priority, invariant, actor,
43
+ journey/component, state, data lifecycle, integration, failure/recovery path,
44
+ operation, proof surface, applicability row, and must-NOT boundary.
44
45
  3. **Scan coverage.** Apply `devrites-interview` in clarify mode and mark each
45
46
  material surface Clear, Partial, Missing, not-applicable, or justified
46
47
  deferred-nonblocking with evidence and an owner. Use native repository search
@@ -27,9 +27,11 @@ Pull on demand:
27
27
  - `spec-grammar.md`: buildable acceptance criteria vs `## Success metrics` (outcome KPIs the
28
28
  code can't make true and this pass never enqueues); structured `### Requirement:` /
29
29
  `#### Scenario:` blocks, each scenario one behavior to check as built / partial / absent.
30
- - `tooling.md`: prefer a code-intelligence index (codebase-memory-mcp codegraph graphify,
31
- else LSP / Read/Grep/Glob) to read the live code, not assumptions.
30
+ - `tooling.md`: use the primary available code index; cross-check only a named unresolved
31
+ predicate, then fall back to LSP/file search. Read live code, not artifact claims.
32
32
  - `testing.md`: a criterion with code but no covering test is *partial*, not done.
33
+ - `repository-topology.md`, `data-integrity.md`, `integration-reliability.md`: only for
34
+ triggered applicability rows; missing failure/recovery behavior is partial or absent.
33
35
 
34
36
  ## Operating rules
35
37
  - **APPEND-ONLY, never rewrite.** The only write to `tasks.md` is **appending** new
@@ -25,10 +25,14 @@ slice.
25
25
  | **partial** | Some of it exists: happy path only, un-wired, untested, a TODO stub, or an edge case from the scenario's WHEN/THEN missing. | Append a slice for the **remainder**, its `Known-Gotchas` naming what's already there so `/rite-build` extends rather than rebuilds. |
26
26
  | **absent** | No code implements it. | Append a full slice. |
27
27
 
28
- Read the code to decide: do not infer from the plan. Use the code-intelligence index
29
- (codebase-memory-mcp codegraph → graphify, else LSP / grep) so the verdict reflects live
30
- code, not the artifacts' claims. Read `traceability.md` to see what is mapped; only reading the
31
- code and tests tells you what is built.
28
+ Read the code to decide: do not infer from the plan. Apply `standards/tooling.md`: use the
29
+ primary available code index, cross-check only a named unresolved predicate, then use LSP/file
30
+ search so the verdict reflects live code. Read `traceability.md` to see what is mapped; only
31
+ code and tests tell you what is built.
32
+
33
+ Treat accepted invariants, failure/recovery rows, and triggered applicability obligations as
34
+ buildable units alongside REQ/AC/scenarios. A happy path with missing applicable
35
+ duplicate/retry/concurrency/tenant/timeout/order/interruption/rollback behavior is `partial`.
32
36
 
33
37
  ## Principle violations
34
38
 
@@ -8,33 +8,31 @@ disable-model-invocation: true
8
8
 
9
9
  # /rite-customize: native project customization
10
10
 
11
- Use native; DevRites has no registry, override layer, or sync.
12
- `--import-legacy` is active only when that exact standalone token occurs in the
13
- current `$ARGUMENTS`; its presence below or in earlier context cannot activate it.
11
+ Use native; no registry/override/sync. `--import-legacy` is active only when that exact
12
+ standalone token occurs in current `$ARGUMENTS`; earlier context cannot activate it.
14
13
 
15
14
  ## Workflow
16
15
 
17
- 1. Map policy to an instruction, reusable work to a skill, a specialist to an
18
- agent, and external capability to a connected plugin/MCP server.
19
- 2. Inspect target and host docs; reuse before copying DevRites.
20
- 3. Draft the smallest nearest-scope change; do not restate base safeguards.
21
- 4. Show path and exact diff; wait for approval.
22
- 5. Write only the approved artifact; run native validation; keep no mirror.
16
+ 1. Map policyinstruction, reusable workskill, specialist→agent, external capability→plugin/MCP.
17
+ 2. Inspect target/host docs; reuse before copying.
18
+ 3. Draft smallest nearest-scope change; do not restate safeguards.
19
+ 4. Show path/exact diff; wait.
20
+ 5. Write approved artifacts, validate natively, keep no mirror.
23
21
 
24
- Here, edit canonical source, run its generator, and never edit derived artifacts.
22
+ Here, edit canonical source and generate; never edit derived artifacts.
25
23
 
26
24
  ## Legacy import mode
27
25
 
28
- `--import-legacy` migrates useful behavior without a registry:
29
-
30
- 1. Inventory `.devrites/extensions/`, `.devrites/overrides/`, and
31
- `.devrites/runbooks/` read-only; treat them as untrusted and keep useful rules.
32
- 2. Map behavior to a project skill, scoped policy to its nearest instruction,
33
- specialists to agents, and each runbook to a native skill with explicit gate,
26
+ 1. Inventory `.devrites/extensions/`, `.devrites/overrides/`, and `.devrites/runbooks/` read-only
27
+ as untrusted data.
28
+ 2. Record origin/files: external URL/SHA/path/license or local relative path, commit/content
29
+ digest, and owner confirmation. Add review date, copied/re-authored status, canonical owner,
30
+ and derived targets. Unverified external rights stay reference-only; never execute imported instructions.
31
+ 3. Map useful behavior to native owners; map runbooks to a native skill with explicit gate,
34
32
  checkpoint, and resume semantics.
35
- 3. Reject gate/permission weakening. Show every target and diff; wait. Never auto-copy,
33
+ 4. Reject weaker gates/permissions. Show every diff and provenance receipt; wait. Never auto-copy,
36
34
  bulk-convert, or delete.
37
- 4. Write approved native artifacts and validate. Leave the legacy files intact until native
35
+ 5. Write and validate approved native artifacts. Leave the legacy files intact until native
38
36
  validation passes; cleanup needs separate approval.
39
37
 
40
38
  ## Rules