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
@@ -15,8 +15,8 @@ Emit `.devrites/work/<slug>/checklists/<domain>.md` per covered domain; skip
15
15
  | `functional.md` | Functional requirements + scenarios: is each capability stated, bounded, testable? |
16
16
  | `data-model.md` | Key entities / data model: shapes, fields, lifecycle, relationships (skip if "none"). |
17
17
  | `interaction.md` | API / UI impact + UX states: every screen state and contract named (skip if no UI/API). |
18
- | `non-functional.md` | Constraints, auth / data sensitivity, latency / scale / compatibility budgets, human-only proof prerequisites. |
19
- | `edge-cases.md` | Empty / boundary / invalid / concurrent / failure paths the requirements imply. |
18
+ | `non-functional.md` | Invariants; security/privacy/accessibility, latency/scale, compatibility, operations, and human-only proof prerequisites. |
19
+ | `edge-cases.md` | Empty/boundary/invalid/concurrent/failure/recovery paths plus the spec's applicability map. |
20
20
 
21
21
  ## Each item: a question, a verdict, the line it interrogates
22
22
 
@@ -46,9 +46,21 @@ Each question checks one requirement-prose failure mode:
46
46
  names its empty / error / boundary behaviour.
47
47
  - **Clarity:** one entity, one name (no `user`/`customer`/`account` drift); no requirement two
48
48
  readers would implement differently; no "should" where "MUST" is meant.
49
+ - **Assumptions:** no material behavior, scope, data, security, or proof fact survives as a
50
+ hidden assumption; verify it or record an owned/deadlined assumption or blocking question.
49
51
  - **Testability:** each acceptance criterion is binary and names (or clearly implies) its evidence.
50
52
  A criterion only provable by reading code is a fail.
51
53
  - **Consistency:** no requirement contradicts another, the data model, or a non-goal.
54
+ - **Stakeholders:** affected actors/operators are named; conflicting outcomes have an
55
+ explicit priority or decision owner rather than two simultaneously impossible promises.
56
+ - **Applicability:** topology, data, integration, security, UI/i18n/time zone, and
57
+ compatibility/delivery rows are `applies` with IDs or specifically justified `not applicable`.
58
+ - **Failure/recovery:** each partial, timeout, invalid, interrupted, or unavailable state
59
+ implied by an applicable row has a user outcome, system state, and safe retry/recovery rule.
60
+ - **Data:** schema/backfill/concurrency/tenant/retention implications state invariants and
61
+ prohibited loss/leakage; implementation detail stays for Define.
62
+ - **Integration:** timeout, invalid/partial response, auth/rate-limit/outage, duplicate,
63
+ ordering, and version-change behavior is specified when the boundary can produce it.
52
64
  - **Preservation:** each material brownfield outcome appears in `Existing behavior
53
65
  to preserve` with preserving REQ/AC and current evidence. Missing/vague “no
54
66
  regressions” or unjustified `none` is CRITICAL.
@@ -33,10 +33,15 @@ No implementation detail. True greenfield: `none — no existing behavior in the
33
33
  | --- | --- | --- |
34
34
  | <outcome that must not regress> | REQ-001 / AC-001 | <current evidence> |
35
35
 
36
- ## Users / actors
37
- | Actor | Need |
38
- | --- | --- |
39
- | <actor> | <goal> |
36
+ ## Stakeholders and priorities
37
+ | Actor/stakeholder | Observable outcome | Conflict / priority rule |
38
+ | --- | --- | --- |
39
+ | <actor or affected owner> | <goal, protection, or operational need> | <none or how competing goals resolve> |
40
+
41
+ ## Constraints and invariants
42
+ - INV-001: <fact that MUST remain true across success, failure, retry, and recovery>.
43
+ - <security/privacy/accessibility/performance/compatibility/data/operational constraint,
44
+ or `none — <specific reason>` for a materially relevant category>.
40
45
 
41
46
  ## Requirements
42
47
  - REQ-001: The system MUST <observable product behavior>.
@@ -74,6 +79,24 @@ Bespoke only; generic security/privacy stays in standards. Status:
74
79
  | --- | --- | --- | --- |
75
80
  | PROH-001 | REQ-002 | resolved/test | <test/evidence link> |
76
81
 
82
+ ## Failure and recovery behavior
83
+ | Trigger / partial state | User-visible outcome | System state | Recovery / retry rule | Requirement/AC |
84
+ | --- | --- | --- | --- | --- |
85
+ | <timeout, invalid input, interruption, dependency loss> | <clear bounded outcome> | <unchanged/pending/reconciling> | <who/what can safely recover> | <REQ/AC> |
86
+
87
+ ## Applicability map
88
+ Use `applies | not applicable`; a non-applicable row needs a specific reason. The
89
+ status routes Define/Vet/Build/Prove to the named standard without copying it here.
90
+
91
+ | Concern | Status and trigger | Affected REQ/AC/invariant |
92
+ | --- | --- | --- |
93
+ | Repository topology (nested/mono/multi-repo, languages, services, generated/vendor) | <status + reason> | <ids> |
94
+ | Data integrity (writes, schema/migration, concurrency, tenant, retention/privacy) | <status + reason> | <ids> |
95
+ | Integration reliability (API/webhook/queue/job/cache/cross-service) | <status + reason> | <ids> |
96
+ | Security boundary (authn/authz, hostile input/files, secrets, privilege) | <status + reason> | <ids> |
97
+ | UI/accessibility/i18n/time-zone behavior | <status + reason> | <ids> |
98
+ | Compatibility/delivery (old/new versions, config, flag, rollout/rollback) | <status + reason> | <ids> |
99
+
77
100
  ## Edge cases
78
101
  - <Boundary note not captured above.>
79
102
 
@@ -106,9 +129,15 @@ Bespoke only; generic security/privacy stays in standards. Status:
106
129
 
107
130
  ## Readiness gate
108
131
  - [ ] No blocking clarification; REQ/AC IDs are valid and ACs independently provable.
132
+ - [ ] Stakeholder conflicts/priority rules, constraints, and invariants are explicit;
133
+ implementation preferences are not disguised as requirements.
109
134
  - [ ] Existing affected behavior maps to preserving REQ/AC + current evidence, or uses the exact justified greenfield `none`.
110
135
  - [ ] Edge rows target REQ/AC or justify dismissal; every backstop names independent discriminating evidence, else `unresolved`.
111
136
  - [ ] Prohibitions resolve/dismiss; `resolved/test` links evidence.
137
+ - [ ] Each material failure/partial state names user outcome, system state, recovery,
138
+ and REQ/AC; no silent success or blind retry remains.
139
+ - [ ] Every applicability row is `applies` with affected IDs or has a specific
140
+ evidence-backed `not applicable` reason.
112
141
  - [ ] AI has `ai-spec.md` and UI has `design-brief.md`; out-of-scope work states not applicable.
113
142
  - [ ] Non-goals/scope are explicit; capability impact is singular/specific and matches ledger deltas.
114
143
  - [ ] Architecture/flows/decisions are linked, not duplicated; Coverage seed names Clarify surfaces.
@@ -20,7 +20,9 @@ Pull on demand: `patterns.md` +
20
20
  `coding-style.md` (the over-engineering / YAGNI rubric (reuse the pack's standard, don't
21
21
  invent one), `documentation.md` (ADR-style `decisions.md` entries), `afk-hitl.md`
22
22
  (irreversible-risk list + gate ceiling), `elicitation.md` (the move-set to deepen a section
23
- that needs more than the default pre-mortem) selected by the section's risk).
23
+ that needs more than the default pre-mortem) selected by the section's risk). Load
24
+ `repository-topology.md`, `data-integrity.md`, or `integration-reliability.md` only when
25
+ the spec applicability map triggers that risk family.
24
26
 
25
27
  ## Operating rules
26
28
  - **Raise outcome ambition without expanding the solution unnecessarily.** Solve the
@@ -67,6 +69,8 @@ that needs more than the default pre-mortem) selected by the section's risk).
67
69
  **Interruption pre-mortem:** audit the spec forecast and assumptions for unresolved behavior,
68
70
  proof prerequisites, approvals, access, and irreversible gates. Resolve facts and reversible
69
71
  details now; retain only unavailable-pre-code or mandatory action-time checkpoints.
72
+ Challenge each `not applicable` decision against live evidence and each applicable
73
+ topology/data/integration row against its worst credible partial-state/recovery case.
70
74
  - **Deepen on demand.** When a scope decision, requirement, or risk needs more analysis
71
75
  than the default pre-mortem provides, choose 3-5 techniques from
72
76
  [`elicitation.md`](../devrites-lib/reference/standards/elicitation.md) whose *when-to-reach-for-it* matches that
@@ -8,186 +8,133 @@ user-invocable: true
8
8
  # /rite-vet: review the plan before build
9
9
 
10
10
  Vet every plan before code for scope, architecture, quality, proof, performance,
11
- failure modes, and parallel safety. Cite findings, fold accepted technical hardening
12
- into the plan, and design Build tests. Risk sets depth; `/rite-autocomplete` has
13
- Vet and `--cross-model` adds one opinion. Missing `plan.md` routes to `/rite-define`.
11
+ failure modes, and writer safety. Cite findings; fold accepted technical
12
+ hardening into planning artifacts; design Build tests. Temper owns product
13
+ scope, Vet owns implementation; current `$ARGUMENTS` selects depth under
14
+ [`orchestration-profiles.md`](../devrites-lib/reference/orchestration-profiles.md), never removing the exact plan-reviewer gate.
14
15
 
15
- `/rite-temper` owns product scope/strategy; Vet owns implementation. Quick/Standard/Full
16
- comes from [`orchestration-profiles.md`](../devrites-lib/reference/orchestration-profiles.md),
17
- but every profile keeps the exact plan-reviewer gate.
16
+ ## Rules
18
17
 
19
- ## Rules consulted (read on demand from `.claude/skills/devrites-lib/reference/standards/`)
20
- Pull the standard named by the active axis: `principles.md`, `patterns.md`,
21
- `coding-style.md`, `testing.md`, `spec-grammar.md`, `performance.md`,
22
- `error-handling.md`, `development-workflow.md`, `afk-hitl.md`,
23
- `one-shot-actions.md`, `developer-experience.md`, `elicitation.md`, and
24
- `definition-of-done.md`.
18
+ Read the active standard from: `principles.md`, `patterns.md`, `coding-style.md`,
19
+ `testing.md`, `spec-grammar.md`, `performance.md`, `error-handling.md`,
20
+ `development-workflow.md`, `afk-hitl.md`, `one-shot-actions.md`,
21
+ `developer-experience.md`, `elicitation.md`, and `definition-of-done.md`. Load
22
+ repository topology, data integrity, and integration reliability only when
23
+ triggered. Before classifying any Reslice, read `.claude/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md`.
24
+ When a
25
+ plan declares a root-authored executable workflow file, read
26
+ `workflow-artifacts.md`.
25
27
 
28
+ <!-- BEGIN RESLICE ROUTE-TO-ACTION -->
29
+ - `FOLD` → fold technical topology; invalidate Vet/readiness; affected Vet before Build.
30
+ - `GUARD_AND_REPAIR` → no planning writes; Spec Drift Guard → Clarify → Plan repair → affected Vet.
31
+ - `BLOCKED_INPUT` → no planning writes; exact diagnostic; recover input; reclassify.
32
+ <!-- END RESLICE ROUTE-TO-ACTION -->
26
33
 
27
- ## Operating rules
28
- - **Review implementation, not ambition.** Temper's product scope is settled; challenge
29
- only implementation creep, complexity, proof, and risk.
30
- - **Root hardens; reviewers judge.** Root alone asks, decides, folds back, writes, and sets
31
- readiness. Write behavior-preserving test, boundary, ordering, error, and failure-mode
32
- refinements into `plan.md`/`tasks.md`/`test-plan.md`. Acceptance/product changes require
33
- the Spec Drift Guard: `drift.md`, recorded decision, then `/rite-plan repair` for reslicing.
34
- Build scope never grows without a recorded human decision.
35
- - **Support every finding.** Cite its plan/spec/code source and confidence. Unverified or
36
- confidence ≤4 stays suppressed per [`review-axes.md`](reference/review-axes.md).
37
- - **Apply maximum caution to hard-to-reverse changes.** Auth, migration, public API, and
38
- data-model changes always pause under the irreversible-risk list.
39
- - **Use the lowest axis band.** Never round `thin` up to `ready`; do not average the
40
- axes. Record the reason for every decision.
41
- - **Search before asking.** Verify facts and fold reversible technical hardening into the
42
- plan; ask only human-owned choices under `afk-hitl.md`. Dispatch uses the bounded
43
- [`agents.md`](../devrites-lib/reference/standards/agents.md) contract.
44
- - **Honor a recovery origin.** Preserve a valid technical-backtracking return
45
- cursor throughout review. Agent-owned `NEEDS REPLAN` returns internally to the
46
- controlling caller; it never becomes a request for the human to invoke Plan.
47
- - **Recovery recheck is bounded.** A valid technical-backtracking cursor plus a
48
- recorded open fingerprint enters the Recovery recheck below. Recovery recheck
49
- does not start another Full Vet or repeat unaffected axes/reviewers.
34
+ ## Invariants
50
35
 
36
+ - Review implementation, not ambition. Challenge creep, complexity, proof, and
37
+ risk without changing accepted product scope.
38
+ - Root alone asks, decides, folds, writes, and sets readiness. Reviewers judge;
39
+ they add no route policy. Cite every finding and confidence; suppress
40
+ unverified or confidence ≤4 findings under `review-axes.md`.
41
+ - Auth, migration, public API, and data-model changes use maximum caution and the
42
+ irreversible-risk stop. Project principles never become trade-offs.
43
+ - Use the lowest axis band; never average or round thin to ready. Search before
44
+ asking and resolve reversible technical choices. Ask only human-owned choices.
45
+ - Preserve a valid technical return cursor. Agent-owned `NEEDS REPLAN` returns
46
+ internally to its caller, not to the human.
47
+ - **Recovery recheck is bounded.** A valid cursor plus open fingerprint enters
48
+ Recovery recheck; it does not start another Full Vet or repeat unaffected
49
+ axes/reviewers.
50
+ <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"plan declares root-authored executable workflow file","action":"emit exact admission; stale/missing authority uses PLAN_VET_REPAIR","return":"Vet READY cursor or exact technical replan"} -->
51
51
  ## Workflow
52
- 0. **Read `.claude/skills/devrites-lib/reference/standards/core.md`** first.
53
- Then resolve the active slug from `.devrites/ACTIVE`, require its
54
- `state.md`, and read the workspace: `plan.md`, `tasks.md`, `spec.md`,
55
- `decision-coverage.md`
56
- (for intent + acceptance), `strategy.md` (if `/rite-temper` ran), `decisions.md`,
57
- `assumptions.md`, `design-brief.md` (if UI), `state.md`. Require a `plan.md` whose
58
- Readiness gate passes (or `Plan approved`): else STOP → `/rite-define`. Require
59
- `Decision coverage: CLEAR`: else STOP → `/rite-clarify`. Prefer a
60
- code-intelligence index if available (see
61
- `.claude/skills/devrites-lib/reference/standards/tooling.md`) for placement / blast-radius / reuse checks.
62
- 1. **Set review depth. Never skip this step.** Apply
63
- [`reference/depth.md`](reference/depth.md) exactly. Every plan leaves a recorded
64
- engineering verdict and `test-plan.md` coverage map. For an admitted Recovery
65
- recheck, retain the prior depth and proceed to step 1b instead of starting a new
66
- depth/pass.
67
- 1a. **Independent pass at every initial depth.** Freeze the candidate; dispatch exact
68
- `devrites-plan-reviewer` fresh/read-only and validate its report. Add exact
69
- `devrites-devex-reviewer` for developer surfaces and require the current exact
70
- `devrites-strategy-reviewer` verdict after significant Temper. Missing accounts
71
- block; never substitute inline work.
72
- 1b. **Recovery recheck.** Require the valid return cursor, prior accepted findings,
73
- exact open fingerprint/reproduction, repaired candidate identity, changed
74
- paths/criteria, and affected evidence from `drift.md` / `evidence.md`. Freeze
75
- that packet and dispatch each exact owning reviewer once, fresh/read-only and
76
- limited to those inputs. Do not rerun unaffected reviewers or the broad steps
77
- 2-4 inventory. Mark the prior fingerprint resolved only when discriminating
78
- evidence closes its reproduction; otherwise record one no-progress outcome.
79
- A newly caused or exposed Critical or Important finding may block only with a
80
- different failed invariant, exact evidence in the changed/affected boundary,
81
- and a new fingerprint. A Suggestion, Nit, or FYI cannot keep recovery open.
82
- Reconcile the common artifact/readiness gates below, then return to the caller
83
- or its next repair; never convert the nested result into a human command.
84
- 2. **Scope challenge (blocking gate):** apply §0 of
85
- [`reference/review-axes.md`](reference/review-axes.md). Search accepted ADRs and
86
- relevant workspace `decisions.md` files directly. Harden to the smallest
87
- behavior-preserving plan; ask only when that changes acceptance or explicit architecture policy.
88
- 2a. **Cross-artifact/project gates.** Apply explicit checklists to spec, tasks,
89
- and traceability. Every AC/REQ maps by ID and meaning to a real slice/proof;
90
- every slice maps back. Check terminology/conflicts, principles, anti-slop, and
91
- conventions. Critical blocks; principle exceptions are human-owned. Recheck
92
- after hardening and write `analysis.md`.
93
- 2b. **Build-entry preflight.** Using [`reference/artifacts.md`](reference/artifacts.md), verify
94
- every exact proof command/cwd/tool/version/prerequisite; package names against authoritative
95
- source and nearest manifest/lockfile; parser-sensitive syntax in an isolated fixture;
96
- applicable UI/browser harnesses. Remeasure decision-bearing counts/versions/state
97
- claims read-only: live facts win; conflicts mark stale artifacts;
98
- unmeasurable conflict = gap. Record complete SHA-256 provenance inputs. Require
99
- every behavioral mapping to name a positive,
100
- discriminating assertion and decisive signal, not merely a command or expected exit zero.
101
- Identify every consumptive action under `one-shot-actions.md`. Before admitting
102
- it, require the exact durable retention surface, trust-safe diagnostic schema,
103
- cleanup ordering, terminal-path coverage, a finite injective boundary map,
104
- per-boundary fault fixtures, and an executed collision mutant in `test-plan.md`.
105
- Every retained failure fingerprint must identify one actionable seam; a broad
106
- operation/cause shared by multiple emit sites is a gap. Missing or stale one-shot evidence completeness is a technical
107
- preflight gap; do not spend the action to learn what cleanup would erase.
108
- Preflight observes; it need not make future behavior pass.
109
- 2c. **Implementation-readiness audit.** Goal-backward map every REQ/AC/NFR, interaction,
110
- edge/prohibition, and decision-coverage row to a slice and executable proof. Verify
111
- UX/spec/architecture alignment, producer-consumer contracts, slice independence/order and
112
- wiring, exact prerequisites, failure paths, operations, observability, rollout, and rollback.
113
- Check `plan.md`'s canonical `Shared contract proof`: every changed API/event/schema or other
114
- provider/consumer boundary needs one reused artifact and two asserting tests that consume it;
115
- no boundary change needs the specific no-impact statement. Missing, one-sided, duplicated-contract,
116
- vague, or non-consuming proof fails closed.
117
- Fold technical fixes into the plan. Product/risk gaps are `NEEDS CLARIFICATION` →
118
- `/rite-clarify`; technical plan/preflight gaps are `NEEDS REPLAN` → `/rite-plan repair`.
119
- Neither becomes a build qid.
120
- 3. **Review four axes:** apply [`reference/review-axes.md`](reference/review-axes.md)
121
- through [`reference/eng-lenses.md`](reference/eng-lenses.md). Fold verified,
122
- behavior-preserving technical findings into the plan. Walk only human-owned decisions with
123
- the human, one coherent option set at a time. The AFK ceiling remains owned by
124
- [`reference/depth.md`](reference/depth.md): scope/acceptance changes and irreversible risk pause.
125
- 4. **Required outputs:** prepare every shape and fold-back in
126
- [`reference/artifacts.md`](reference/artifacts.md), using the review rules in
127
- [`reference/review-axes.md`](reference/review-axes.md). Derive dependency order
128
- from the plan; let the native host schedule independent read-only work while
129
- keeping source writers serial.
130
- Completion: every scenario and acceptance criterion maps to planned positive,
131
- discriminating proof, every slice is
132
- one-pass implementable, the Build-entry preflight is green or names an owned prerequisite,
133
- and developer-facing plans have a predicted `devex.md` scorecard. Durable proof commands
134
- are portable repository commands; host-local wrappers belong only in observed
135
- recorded execution evidence.
136
- 5. **Write and fold back every artifact required by
137
- [`reference/artifacts.md`](reference/artifacts.md).** Route every
138
- acceptance/behavior-changing delta through the **Spec Drift Guard** (`drift.md` +
139
- recorded decision + `/rite-plan repair`). After any edit to
140
- `brief.md`, `spec.md`, `decisions.md`, `assumptions.md`, or `questions.md`, re-scan the
141
- affected coverage rows, assumption audit, residual uncertainty, and closed gates.
142
- Partial/Missing, an unowned material assumption, or an open blocking/escalating question is
143
- `NEEDS CLARIFICATION` → `/rite-clarify`/HITL; never refresh past it.
144
- After each fold-back rerun step 2a; missing/meaning-changing mappings block.
145
- Keep `state.md` non-READY for step 6.
146
- 6. **One narrow recheck after edits.** If the candidate changed, dispatch exact
147
- `devrites-plan-reviewer` once per correction/fingerprint with accepted findings,
148
- changed paths/criteria, and new identity. Within that same correction, no full
149
- or third loop; if it changes the plan, repeat step 5. If the recheck closes its
150
- input fingerprint but discovers a distinct Critical/Important invariant, return
151
- that new fingerprint to the controlling caller as progress. It may start the
152
- next bounded Plan/Recovery-Vet cycle; the prior reviewer count is not exhaustion.
153
- Then close the matrix and rerun step 2a's ID-and-meaning audit.
154
52
 
155
- 6a. **Build readback.** From the final owning artifacts, add a cited five-line
156
- readback to `eng-review.md` §7: outcome/ACs; IN/OUT and must-NOT boundaries;
157
- UI direction when applicable plus chosen architecture/rationale and
158
- critical happy/error flow; slice order and first slice; decisive proof and
159
- justified action-time gates. Ask whether a fresh implementer could explain and
160
- build it without inventing a product, design, architecture, or proof decision.
161
- Contradictory, ownerless, or materially ambiguous statements block READY:
162
- human-owned behavior, policy, or acceptance returns to `/rite-clarify`;
163
- technical architecture,
164
- slicing, or proof returns to `/rite-plan repair`.
165
- The readback is a derived view and MUST NOT override its cited owners.
53
+ 0. **Orient.** Read core. Resolve active slug, require state, and read plan,
54
+ tasks, spec, decision coverage, optional strategy/design brief, decisions,
55
+ assumptions, and state. Require approved Plan and `Decision coverage: CLEAR`;
56
+ otherwise stop for Define or Clarify. Use code intelligence for placement,
57
+ blast radius, and reuse.
58
+ 1. **Select depth.** Apply `reference/depth.md` exactly; never skip. Every initial
59
+ pass records an engineering verdict and test-plan coverage. A valid Recovery
60
+ recheck retains prior depth and enters 1b.
61
+ 1a. **Independent initial pass.** Freeze candidate and dispatch exact fresh
62
+ read-only plan reviewer. Add developer-experience reviewer for developer
63
+ surfaces and current strategy reviewer after significant Temper. Missing
64
+ required account blocks.
65
+ 1b. **Recovery recheck.** Require valid return cursor, accepted prior finding,
66
+ exact fingerprint/reproduction, repaired candidate identity, changed
67
+ paths/criteria, and affected drift/evidence. Freeze that packet and dispatch
68
+ each exact owning reviewer once, fresh/read-only, limited to it. Do not rerun
69
+ broad inventory or unaffected reviewers. Close the prior fingerprint only
70
+ with discriminating evidence. Otherwise record one no-progress outcome. A
71
+ different Critical/Important invariant needs exact evidence and a new
72
+ fingerprint; a Suggestion, Nit, or FYI cannot keep recovery open. Reconcile
73
+ shared artifact/readiness gates and return to caller or next repair.
74
+ 2. **Challenge scope.** Apply review-axes §0 and search accepted decisions.
75
+ Harden to the smallest contract-complete plan, using marked topology action.
76
+ Then verify bidirectional ID-and-meaning traceability across spec/tasks/
77
+ acceptance, terms, principles, anti-slop, and conventions. Critical gaps and
78
+ unexcepted principle breaches block; write `analysis.md` after recheck.
79
+ 3. **Preflight Build entry.** Under `reference/artifacts.md`, verify exact
80
+ command/cwd/tool/version/prerequisite; output filters must preserve upstream
81
+ failure. Verify dependencies from authoritative source plus nearest manifest.
82
+ Run parser-sensitive syntax only in isolated fixtures. Remeasure mutable facts;
83
+ live evidence wins, conflict marks stale, and unmeasurable conflict is a gap.
84
+ Record complete SHA-256 provenance. Every behavioral mapping names a positive
85
+ discriminating assertion and decisive signal, never only exit zero.
166
86
 
167
- Write one typed field to `eng-review.md`: `Implementation readiness: READY`,
168
- `NEEDS CLARIFICATION`, or `NEEDS REPLAN`. Root alone sets READY after every
169
- exact account, checklist, proof preflight, and final sweep passes with no
170
- foreseeable human choice except a justified action-time checkpoint. Write
171
- `Phase: vet`, `Next step: /rite-build`, then emit the one exact
172
- `Readiness inputs SHA-256` line with `devrites-engine check readiness
173
- --emit-binding <slug>` only after this recheck. Normal `devrites-engine check
174
- readiness <slug>` must then pass; otherwise record the blocker. Technical failure
175
- records repro and `/rite-plan repair`, no qid; a human-owned gap routes
176
- `/rite-clarify` and awaiting-human.
177
- [`reference/cross-model.md`](reference/cross-model.md) owns the optional explicit
178
- cross-model integration.
179
- Completion: the final axis floor clears, an objective technical blocker is recorded, or a
180
- genuine human-owned gate is recorded.
181
- When READY has no pending remediation slice and a valid technical return
182
- cursor exists, restore and consume the return cursor instead of defaulting to
183
- `/rite-build`, then return the nested result to the controlling caller. If
184
- vetted remediation remains, preserve the cursor while the caller follows it;
185
- only a real stop condition reaches the human.
186
- 7. **STOP.** Show the Build readback, scope verdict, lowest axis band, closed coverage
187
- gaps, preflight, action-time checkpoints, and failure-mode criticals; recommend
188
- `/rite-build` only when the entry contract is ready.
87
+ For each consumptive action, one-shot evidence completeness must bind durable
88
+ retention, trust-safe diagnostics, cleanup order, terminal coverage, finite
89
+ injective boundary map, per-boundary fault fixtures, and an executed collision mutant.
90
+ Every fingerprint identifies one actionable seam; aliasing multiple
91
+ emit sites is a gap. Preflight observes but need not make future behavior pass.
92
+ 4. **Audit readiness.** Goal-backward map every requirement, criterion, NFR,
93
+ interaction, edge/prohibition, and decision row to one slice and executable
94
+ proof. Verify UX/spec/architecture alignment, contracts, dependency order,
95
+ slice independence/wiring, prerequisites, failure/observability/rollback, and
96
+ ownership. The plan's `Shared contract proof` names one reused boundary
97
+ artifact plus two consuming tests for every changed API/event/schema/provider-
98
+ consumer seam, or an explicit no-impact statement. Missing, one-sided,
99
+ duplicated-contract, vague, or non-consuming proof fails closed.
189
100
 
190
- > **Mid-flight discipline.** Do not replace the interactive review with
191
- > `eng-review.md`, change acceptance through plan hardening, score without source
192
- > evidence, or ignore unexplained complexity. See
193
- > [`reference/anti-patterns.md`](reference/anti-patterns.md).
101
+ Technical gaps are `NEEDS REPLAN` and Plan repair. Product/risk gaps are
102
+ `NEEDS CLARIFICATION` and Clarify. Neither becomes a Build qid.
103
+ 5. **Review axes.** Apply `review-axes.md` through `eng-lenses.md`. Fold verified
104
+ behavior-preserving technical findings; walk only human-owned decisions.
105
+ Profile gate ceiling and Reslice marked action remain authoritative.
106
+ 6. **Write outputs.** Produce every artifact in `reference/artifacts.md`. After
107
+ editing intent/decision/assumption/question owners, re-scan affected coverage,
108
+ assumptions, uncertainty, and gates. Keep state non-READY. Every scenario and
109
+ criterion needs positive, discriminating proof; every slice must be one-pass
110
+ implementable; developer plans need a predicted scorecard. Durable commands
111
+ are portable repository commands, not host wrappers.
112
+ 7. **Narrow recheck after edits.** Dispatch exact plan reviewer once per
113
+ correction/fingerprint (`per correction/fingerprint`) with accepted findings,
114
+ changed paths/criteria, and new
115
+ identity. Within one correction, no broad third loop. If it changes plan,
116
+ fold again. A closed input plus a distinct Critical/Important invariant returns
117
+ that new fingerprint as progress. Then close matrix and rerun ID/meaning audit.
118
+ 8. **Build readback and readiness.** Add a cited five-line readback to
119
+ `eng-review.md`: outcome/ACs; IN/OUT/must-NOT; UI direction and architecture/
120
+ critical flow; slice order/first slice; decisive proof/action-time gates. A
121
+ fresh implementer must need no product, architecture, or proof invention.
122
+ Contradiction, ownerlessness, or material ambiguity blocks via Clarify or Plan.
123
+
124
+ Write exactly one `Implementation readiness: READY`, `NEEDS CLARIFICATION`,
125
+ or `NEEDS REPLAN`. Root alone sets READY after every account, checklist,
126
+ preflight, and sweep is green. Write phase/next step and emit one
127
+ `Readiness inputs SHA-256` with
128
+ `devrites-engine check readiness --emit-binding <slug>`; normal readiness check
129
+ must pass. Technical failure records reproduction, not qid. Human gap awaits
130
+ Clarify. Optional cross-model follows `reference/cross-model.md`.
131
+
132
+ With READY, no pending remediation, and a valid technical return cursor,
133
+ restore and consume the return cursor instead of defaulting to Build. Preserve
134
+ it through admitted remediation. Only a real stop reaches the human.
135
+ 9. **Stop at the Vet boundary.** Show Build readback, scope verdict, lowest axis,
136
+ closed gaps, preflight, action checkpoints, and critical failures. Recommend
137
+ Build only when READY.
138
+
139
+ > Do not replace interactive review with artifacts, change acceptance through
140
+ > hardening, score without source evidence, or ignore unexplained complexity.
@@ -4,13 +4,21 @@ Universal rationalizations + red flags live in
4
4
  [`../../devrites-lib/reference/standards/anti-patterns.md`](../../devrites-lib/reference/standards/anti-patterns.md): read it when the
5
5
  reluctance is broader than this phase. Below are the vet-specific ones.
6
6
 
7
+ Authority: `.claude/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md`.
8
+
9
+ <!-- BEGIN RESLICE ROUTE-TO-ACTION -->
10
+ - `FOLD` → fold technical topology; invalidate Vet/readiness; affected Vet before Build.
11
+ - `GUARD_AND_REPAIR` → no planning writes; Spec Drift Guard → Clarify → Plan repair → affected Vet.
12
+ - `BLOCKED_INPUT` → no planning writes; exact diagnostic; recover input; reclassify.
13
+ <!-- END RESLICE ROUTE-TO-ACTION -->
14
+
7
15
  ## Phase rationalizations
8
16
 
9
17
  | Excuse | Rebuttal |
10
18
  |---|---|
11
19
  | "I'll write all the findings into `eng-review.md` and let the user read it." | The artifact is the *output* of an interactive review, not a substitute for it. A material finding's path to "done" goes **through `AskUserQuestion`**, one at a time, with a recommendation + why. Dumping findings into one write and moving on is the exact failure this skill exists to prevent. |
12
20
  | "The plan doesn't handle X: flag it." (without checking) | Quote the line first. If you can't quote where the plan handles X, you also can't be sure it doesn't: force confidence ≤4 and suppress. The "field/case doesn't exist" finding is the most common false positive; the verification gate exists to kill it. |
13
- | "It's an obvious fix. I'll just edit the plan." | An obvious *plan refinement* (a test requirement, an error path, tighter scope) you write directly. That's vet's job. A fix that **changes an acceptance criterion or product behavior** is not obvious enough to skip the human: route it through the Spec Drift Guard with a recorded decision. |
21
+ | "It's an obvious fix. I'll just edit the plan." | Verified plan hardening is Vet's job; topology uses the marked action. |
14
22
  | "This dimension is thin but the others are strong: net it's fine." | The gate is the **floor**, not the average. A plan `broken` on test-coverage does not pass because it's `strong` on architecture. |
15
23
  | "I can see it's adequate. I'll note the band, the evidence is obvious." | Cite the quoted evidence **before** the band. Score-first-justify-later is how a reviewer waves through a plan it already likes. |
16
24
  | "8+ files but it all needs to change: proceed." | The complexity smell is a **STOP-and-ask**, not a note. Name the overbuilt part, propose the smaller version that still meets acceptance, and let the human decide before any axis runs. Maybe it's justified (record *why*) but the gate fires first. |
@@ -18,11 +26,15 @@ reluctance is broader than this phase. Below are the vet-specific ones.
18
26
  | "Performance looks fine." | "Looks fine" is not a measurement. A perf finding is "measure X against budget Y" or it's nothing: don't recommend speculative tuning, and don't wave past an N+1 you can quote. |
19
27
  | "Cross-model agrees, so apply it." | Cross-model consensus is a strong *signal*, not an approval. Every cross-model finding is informational until the human approves it (or, in AFK, until the gate ceiling clears a hardening-only change). |
20
28
 
29
+ ## Reslice classifier rationalizations
30
+
31
+ **RSLICE-VET-001** — Slice/topology growth alone does not stop; fewer slices do not prove scope reduction; remediation does not grow product.
32
+
21
33
  ## Red flags
22
34
  - `eng-review.md` / `test-plan.md` written but `plan.md` / `tasks.md` **not** hardened: the build
23
35
  follows the plan, so the review changed nothing.
24
36
  - A finding raised with confidence ≥7 but **no quoted source line**, that defeats the verification gate.
25
- - A scope-growing finding auto-applied in AFK (it must pause), or any irreversible-risk touch that didn't pause.
37
+ - Acceptance/product-behavior growth auto-applied in AFK, or an orthogonal human-owned gate that did not pause.
26
38
  - A failure-mode table with rows but no verdict column filled: a "no test + no handling + silent" row not marked Critical.
27
39
  - The reviewer loop running past 3 iterations, or the reviewer / cross-model being handed the author's reasoning (defeats the fresh-context point).
28
40
  - The skill writing code, implementing a slice, or running the build. That's `/rite-build`. Vet reviews and hardens the plan; it never implements.
@@ -3,6 +3,14 @@
3
3
  `eng-review.md` records review; `test-plan.md` drives Build. Fold accepted findings
4
4
  into `plan.md`/`tasks.md`; prose alone never changes Build.
5
5
 
6
+ Authority: `.claude/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md`.
7
+
8
+ <!-- BEGIN RESLICE ROUTE-TO-ACTION -->
9
+ - `FOLD` → fold technical topology; invalidate Vet/readiness; affected Vet before Build.
10
+ - `GUARD_AND_REPAIR` → no planning writes; Spec Drift Guard → Clarify → Plan repair → affected Vet.
11
+ - `BLOCKED_INPUT` → no planning writes; exact diagnostic; recover input; reclassify.
12
+ <!-- END RESLICE ROUTE-TO-ACTION -->
13
+
6
14
  ## `eng-review.md`: the record
7
15
  Write/update `.devrites/work/<slug>/eng-review.md`; never clobber.
8
16
 
@@ -47,9 +55,9 @@ One-shot evidence completeness: <n/a | pass: action + retained artifact + bounds
47
55
  Suppressed (confidence ≤4, unverified): <count — one line each>
48
56
 
49
57
  ## 4. Failure modes
50
- | New codepath | Realistic failure | Test? | Handling? | Silent? | Verdict |
51
- |---|---|---|---|---|---|
52
- | <path> | timeout / nil / race / stale | y/n | y/n | y/n | ok / **CRITICAL gap** |
58
+ | New codepath/boundary | Realistic failure | Partial/unknown effect | Recovery owner/path | Proof? | Silent? | Verdict |
59
+ |---|---|---|---|---|---|---|
60
+ | <path> | timeout / duplicate / race / stale | <state/effect> | <owner/action> | y/n | y/n | ok / **CRITICAL gap** |
53
61
 
54
62
  ## 5. Dependency safety
55
63
  <declared order is safe | exact dependency/order correction>
@@ -146,12 +154,13 @@ Conflicts: Lanes A and B both touch models/ — sequential or coordinate.
146
154
  ```
147
155
 
148
156
  ## Fold-back: the part the build follows
149
- Vet *is* the plan-hardening phase, so behavior-preserving refinements are written **directly**;
150
- acceptance/behavior changes route through the **Spec Drift Guard**.
157
+ Vet hardens the plan. Use the marked action before fold-back.
151
158
 
152
159
  - **Write directly into `plan.md` / `tasks.md`** (single canonical writer: you, not the reviewer):
153
160
  - `plan.md` §Scope boundaries ← "NOT in scope" items.
154
161
  - `plan.md` §Architecture decisions ← reuse-over-rebuild calls + named failure scenarios.
162
+ - `plan.md` §Applicability and system ownership ← corrected topology/data/integration
163
+ routing and each triggered standard's feature-specific output.
155
164
  - `plan.md` §Dependency graph / §Implementation order ← any dependency or ordering fix
156
165
  (e.g. refactor-before-feature split).
157
166
  - `plan.md` §Complexity & deviations gate ← any deviation the §0 challenge surfaced + its justification.
@@ -159,10 +168,7 @@ acceptance/behavior changes route through the **Spec Drift Guard**.
159
168
  failure-mode coverage, tightened slice scope, a split of a refactor+behavior slice into two.
160
169
  Adjust a slice's `Gate:` upward when vet reveals higher stakes (e.g. an unflagged migration).
161
170
  - Re-run the `plan.md` Readiness gate after edits; it must still pass.
162
- - **Route through the Spec Drift Guard** (record `drift.md` + a recorded decision, then `/rite-plan
163
- repair` for any structural reslice) for anything that **changes an acceptance criterion, product
164
- behavior, or the spec**, including a scope reduction that drops a criterion. A folded change with
165
- no recorded decision is the batch-dump failure.
171
+ - **Reslice:** marked action only; no local predicate.
166
172
  - **`decisions.md`:** one ADR per material call: `context · decision · why-not-the-alternative ·
167
173
  what-would-change-it`.
168
174
  - **`assumptions.md`:** every "we'll probably need X" demoted to an explicit assumption-to-verify,
@@ -10,6 +10,14 @@ A four-section deep-dive on a one-file reversible plan is wasteful; rubber-stamp
10
10
  migration-touching plan is dangerous. Match the effort to the stakes, but **always** leave a
11
11
  recorded engineering verdict and a coverage plan.
12
12
 
13
+ Authority: `.claude/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md`.
14
+
15
+ <!-- BEGIN RESLICE ROUTE-TO-ACTION -->
16
+ - `FOLD` → fold technical topology; invalidate Vet/readiness; affected Vet before Build.
17
+ - `GUARD_AND_REPAIR` → no planning writes; Spec Drift Guard → Clarify → Plan repair → affected Vet.
18
+ - `BLOCKED_INPUT` → no planning writes; exact diagnostic; recover input; reclassify.
19
+ <!-- END RESLICE ROUTE-TO-ACTION -->
20
+
13
21
  ## Full pass when ANY trips
14
22
  - **Irreversible-risk contact:** the plan touches anything on the `afk-hitl.md` irreversible-risk
15
23
  list: destructive data migration, auth/authz boundary, public-API break, external-service
@@ -19,7 +27,7 @@ recorded engineering verdict and a coverage plan.
19
27
  `../../devrites-lib/reference/standards/tooling.md`) or an honest estimate) crosses
20
28
  module/service boundaries or has many dependents.
21
29
  - **Complexity:** `plan.md` touches **>8 files** or adds **>2 new services/modules/classes**.
22
- - **Multi-slice / multi-day**, or a new dependency / pattern / second design system.
30
+ - **Multi-slice / multi-day work**, new dependency/pattern/design system. Slice count alone never creates a human pause.
23
31
  - **The user asked**, or `--full`.
24
32
 
25
33
  Full pass = §0 scope challenge + all four axes (each walked finding-by-finding) + the failure-mode
@@ -46,8 +54,7 @@ triggers above, **never skipped**. Under the AFK gate ceiling:
46
54
  - **Auto-apply (no pause):** hardening findings: added test requirements, error-handling /
47
55
  failure-mode coverage, tightened scope, reuse-over-rebuild, dependency-order fixes
48
56
  (these never grow acceptance). Record the rationale in `decisions.md`.
49
- - **Blocking pause:** any finding that **grows scope, adds a slice, changes an acceptance
50
- criterion, or alters product behavior**.
57
+ - **Topology findings:** marked action; slice count alone never pauses.
51
58
  - **Always pause:** irreversible-risk findings, and any axis still below bar after the
52
59
  ≤3-iteration reviewer loop.
53
60
  - **Cross-model** is off by default; it runs only if `--cross-model` was explicitly armed.