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
@@ -7,47 +7,37 @@ user-invocable: true
7
7
 
8
8
  # /rite-define: plan from the spec
9
9
 
10
- Turn the active feature's `spec.md` into a buildable workspace with architecture, an
11
- implementation approach, dependency-ordered **vertical slices**, traceability, and a
12
- state cursor. The spec defines what and why; this phase defines how. Keep spec,
13
- architecture, plan, tasks, and traceability in their phase-owned files. **Do not write
14
- code here.**
10
+ Turn `spec.md` into architecture, vertical slices, traceability, and state. Spec owns
11
+ what/why; Define owns how. **Do not write code.**
15
12
 
16
13
  ## Rules consulted (read on demand from `.claude/skills/devrites-lib/reference/standards/`)
17
14
  Pull these via `Read` when shaping the plan:
18
15
  - `development-workflow.md`: small batches, trunk-always-green, definition of done.
19
16
  - `principles.md`: the project invariants (`.devrites/principles.md`) the chosen approach must conform to.
20
17
  - `documentation.md`: record plan-time decisions and rationale.
18
+ - `repository-topology.md`, `data-integrity.md`, and `integration-reliability.md`:
19
+ load only for matching `spec.md` applicability rows; each applicable owner is mandatory.
21
20
  - `../workspace-artifact-schema.md`: artifact purposes, budgets, IDs, and read triggers.
22
21
 
23
22
  ## Operating rules
24
- - **Requires a readied spec.** Read the active workspace first; if `.devrites/ACTIVE` is empty,
25
- the workspace has no `spec.md`, its readiness gate hasn't passed, or any spec-quality
26
- `checklists/<domain>.md` has an open CRITICAL **STOP** and tell the user to run
27
- `/rite-spec <feature>` first. A missing or non-`CLEAR` `decision-coverage.md` routes to
28
- `/rite-clarify`. **DO NOT plan from a missing, unreadied, or unclarified spec.**
29
- - Apply `afk-hitl.md` decision ownership. Prefer conventions; source-check new dependencies or
30
- design systems, asking only about licensing/cost/security or explicit policy.
31
- - **Author one section at a time.** Write `architecture.md` and `plan.md` section by
32
- section, pausing after each. For an open design choice or uncertain estimate, use a
33
- relevant technique from
34
- [`elicitation.md`](../devrites-lib/reference/standards/elicitation.md) (Tournament for two viable
35
- designs, Delphi for the estimate) before it hardens into slices.
23
+ - **Requires a readied spec.** Missing workspace/spec/readiness or open CRITICAL checklist
24
+ `/rite-spec`; missing/non-`CLEAR` decision coverage `/rite-clarify`. Never plan it.
25
+ - Apply `afk-hitl.md` ownership. Prefer conventions; source-check new dependencies/design
26
+ systems, asking only about licensing, cost, security, or policy.
27
+ - Author one `architecture.md`/`plan.md` section at a time. Before slicing, use
28
+ [`elicitation.md`](../devrites-lib/reference/standards/elicitation.md) Tournament for open
29
+ designs and Delphi for uncertain estimates.
36
30
  - **Derive the slice count from the work.**
37
- One per independently-shippable increment, sized by `slicing.md`, every acceptance
38
- criterion mapped to ≥1 slice. A user-named count is a hint at most: slice logically and,
39
- if your honest count differs, present it and why. Never pad or compress to hit a figure.
40
- (`.devrites/AFK` `max_slices` is a separate AFK iteration budget, not the decomposition.)
41
- - **Complexity does not shrink accepted scope.** Split/reorder for context, size,
42
- or dependencies; MUST NOT drop/defer approved REQ/AC. Reduction requires Spec
43
- Drift Guard + recorded human decision; hard/large is a decomposition signal.
44
- - **Wide mechanical refactors slice expand → migrate → contract.** If one repeated change
45
- crosses many files, don't fake vertical slices. Add a compatibility/adapter slice, migrate
46
- small green batches, then remove the old path. If a batch cannot stay green, use an
47
- integration branch plus a final verify slice.
48
- - **Root writes; drafter proposes.** Use the native bounded fresh-context contract in
49
- [`agents.md`](../devrites-lib/reference/standards/agents.md). The root owns architecture
50
- decisions, human questions, approval, and every canonical artifact write.
31
+ One per independently-shippable increment, sized by `slicing.md`; map every acceptance
32
+ criterion. User counts are hints: explain honest differences, never pad/compress.
33
+ `.devrites/AFK` `max_slices` is an iteration budget, not decomposition.
34
+ - **Complexity does not shrink scope.** Split/reorder; never drop/defer approved REQ/AC.
35
+ Reduction needs Drift Guard + human decision; hard/large means decompose.
36
+ - **Wide refactors use expand migrate contract.** Add compatibility, migrate green
37
+ batches, then remove the old path; if batches cannot stay green, use an integration branch
38
+ plus final verify.
39
+ - **Root writes; drafter proposes** under bounded fresh context
40
+ ([`agents.md`](../devrites-lib/reference/standards/agents.md)); root owns choices and canonical files.
51
41
 
52
42
  ## Workflow
53
43
  0. **Read `.claude/skills/devrites-lib/reference/standards/core.md`:** the always-on operating rules and anti-rationalizations.
@@ -66,39 +56,41 @@ Pull these via `Read` when shaping the plan:
66
56
  **`design-brief.md` if the feature touches UI** (the UX/UI contract `/rite-spec` shaped:
67
57
  its key states, interaction model, and proof targets drive how UI slices are cut). If a blocking
68
58
  `[NEEDS CLARIFICATION]` remains, stop → `/rite-clarify`.
59
+ Reconcile every `Applicability map` row against live repository evidence. Load each
60
+ applicable standard; a false `not applicable` is a blocking spec gap, not a planning
61
+ shortcut.
69
62
  1a. **Draft from fresh context.** Freeze the planning inputs and dispatch
70
63
  `devrites-plan-drafter` in `define` mode for one atomic candidate bundle:
71
- `architecture.md`, `plan.md`, `tasks.md`, and `traceability.md`, including proof mapping.
72
- Wait for and validate its bounded result. The drafter does not write or ask; any human-owned
73
- choice returns to this root context.
74
- 2. **Reconcile and decide the architecture + approach** (the HOW the spec deliberately
75
- omitted). Validate the candidate against live seams and the following rules; the root writes
76
- accepted content at step 6. Shape
77
- `architecture.md` for owning layer, boundaries, integration points, data/API/events,
78
- dependencies, risks, and affected areas; write only the build strategy in `plan.md`.
79
- Use a
80
- code-intelligence index if available (see
81
- `.claude/skills/devrites-lib/reference/standards/tooling.md`) for structure/impact; for the current API or behaviour of
82
- an external library/framework the architecture will rely on, consult context7 if available.
83
- Record significant options as `DEC-###`. For high-cost/hard-to-reverse boundaries, data
84
- models, public contracts, or dependencies, compare ≥2 viable approaches by drivers,
85
- trade-offs, and consequences. Specify cross-boundary interfaces for independent work:
64
+ `architecture.md`, `plan.md`, `tasks.md`, and `traceability.md` with proof mapping.
65
+ Validate its bounded result; it does not write/ask, and returns human choices to root.
66
+ 2. **Reconcile architecture + approach** against live seams; root writes at step 6.
67
+ `architecture.md` owns layers/boundaries/integrations/data/dependencies/risks/impact;
68
+ `plan.md` owns build strategy. Use the code index for structure/impact
69
+ ([`tooling.md`](../devrites-lib/reference/standards/tooling.md)) and source-check external behavior.
70
+ Record significant options as `DEC-###` only for non-obvious real trade-offs where
71
+ independently built lower units could choose incompatibly; leave other details to convention/
72
+ slice. Compare ≥2 viable approaches for hard-to-reverse boundaries, models, contracts, or
73
+ dependencies by drivers, trade-offs, and consequences. Specify cross-boundary interfaces for independent work:
86
74
  invariants, I/O, ordering/idempotency, errors, versioning, config, and relevant budgets.
75
+ Establish repository/deployable roots, state and contract ownership, shared mutable
76
+ resources, and deployment order under `repository-topology.md`. For applicable durable
77
+ data or integration rows, include the exact required plan table from `data-integrity.md`
78
+ or `integration-reliability.md`; do not replace it with "handle retries/migration" prose.
87
79
  For any changed provider/consumer boundary, complete `plan.md`'s canonical
88
80
  `Shared contract proof` table with one reused contract artifact and provider- and
89
81
  consumer-side asserting tests that both consume it. Otherwise record the exact justified
90
82
  no-impact statement. Missing, one-sided, duplicated-contract, vague, or non-consuming proof blocks.
91
- **Deep-module check:** while sketching the major modules, look for opportunities
92
- to extract a **deep module**: a small, stable interface that hides a meaningful chunk
93
- of behavior and is independently testable. A *shallow* module whose interface is
94
- nearly as complex as its implementation adds no value; deepen it or delete
95
- it. Put independently testable deep-module behavior in the slice's `Tests/proof`;
96
- `/rite-vet` confirms the level.
97
- 2a. **Foreseeable-decision sweep.** Inspect questions, assumptions, architecture, dependencies,
98
- proof prerequisites, and proposed checkpoints. Search facts and decide reversible technical
99
- calls. New product/acceptance/policy/irreversible-risk gaps return to `/rite-clarify`; a build
100
- checkpoint survives only for unavailable pre-code evidence or mandatory action-time approval.
101
- **Completion:** no known implementation choice is postponed for build to ask later.
83
+ **Deep-module check:** prefer small, stable interfaces hiding meaningful, testable
84
+ behavior. Deepen/delete shallow modules whose interface matches implementation
85
+ complexity. Put their independent behavior in `Tests/proof`; `/rite-vet` confirms.
86
+ 2a. **Decision-horizon sweep.** Apply `reference/plan-template.md`'s classification to every
87
+ question, assumption, architecture/dependency/proof choice, and checkpoint. Resolve
88
+ planning items from source; only necessary executable evidence warrants a risk spike with
89
+ discriminating criteria/fallback branches. Human blockers route to `/rite-clarify`.
90
+ Implementation-local deferral needs owner slice, observable trigger, bounds/fallback,
91
+ and resolution proof; action checkpoints name their signal. Preserve entries until
92
+ evidence resolves/supersedes them. **Completion:** no blocker or unowned/unsupported
93
+ deferral; deferral is not ask later.”
102
94
  3. **Create vertical tasks:** each delivers one independently verifiable, observable
103
95
  capability end to end; first is the thinnest useful path, ordered by dependency then
104
96
  risk. Apply the slice-count and broad-refactor rules above plus
@@ -113,12 +105,17 @@ Pull these via `Read` when shaping the plan:
113
105
  provenance inputs; `/rite-vet` preflights them. Write the portable repository command,
114
106
  never RTK/local wrappers, user-specific absolute paths, or temporary proof trees. When a
115
107
  shared contract changes, order its canonical artifact before both asserting tests and make
116
- the provider/consumer slice dependencies explicit.
108
+ provider/consumer dependencies explicit. Each exact `Characterization:
109
+ characterize-before-modify` row is the first touching slice's prerequisite: observe and test
110
+ unchanged baseline green, perturb realistic behavior red, restore green, then modify. Never
111
+ expand this into repository-wide coverage.
117
112
  4. **Map coverage and wiring:** every `AC-###` spec acceptance criterion maps to ≥1 `SLICE-###`
118
113
  (`rite-spec/reference/acceptance-criteria.md`); no orphaned criteria, no slice without a
119
114
  criterion. Lift covered/backstop `Edge Coverage` rows and resolved `Prohibitions (must-NOT)`
120
115
  rows into `traceability.md` and `test-plan.md`; unresolved rows get a gate/owner. Each
121
116
  cross-slice boundary names producer, consumer, invariant, integration step, and proof.
117
+ Map each applicable topology/data/integration risk to a slice, failure/recovery path,
118
+ and discriminating proof; a risk cannot live only in the architecture narrative.
122
119
  4a. **Persist traceability natively.** The drafter proposes and root writes
123
120
  `traceability.md` (`AC/REQ ID → slice → proof → evidence ID → files → status`).
124
121
  Re-read spec, tasks, and proof fields: every ID must exist and every mapping
@@ -140,10 +137,11 @@ Pull these via `Read` when shaping the plan:
140
137
  buildable AC/REQ maps to an existing slice/proof, every slice maps to real
141
138
  acceptance, and names/prose agree. Missing, duplicate, contradictory, or
142
139
  meaning-changing mappings block.
143
- 7. **Readiness gate** (plan-template): require CLEAR coverage, complete acceptance and
144
- cross-slice wiring/proof, complete `Shared contract proof`, risk-first acyclic order,
145
- justified deviations, rollback, and a
146
- closed decision sweep. **Stop and confirm** before code. Render the review-before-code
140
+ 7. **Readiness gate** (`plan-template.md`): require CLEAR coverage; complete acceptance,
141
+ wiring, shared-contract proof, applicable outputs, and rollback; risk-first acyclic order;
142
+ justified deviations; and every horizon item present, with blockers resolved, planning
143
+ items resolved/validly spiked, and local/action entries bounded and owned.
144
+ **Stop and confirm** before code. Render the review-before-code
147
145
  digest first: `Intent` (one sentence from the spec), `Done means` (acceptance coverage x/y),
148
146
  `Plan sanity` (slice count + riskiest boundary/gate), `Expected build interruptions`
149
147
  (`none` or only justified action-time gates), and `Build exactly this?` (yes → approve;
@@ -1,119 +1,136 @@
1
1
  # `plan.md` template
2
2
 
3
- Write **how** to build what `spec.md` defines. Use `/rite-plan` when evidence requires
4
- an update. Technology choices belong here, not in the spec.
3
+ Build plan for `spec.md`; tech choices live here, not in spec. `/rite-plan` revises on
4
+ new evidence.
5
5
 
6
6
  ```markdown
7
7
  # Plan: <Feature>
8
8
  Spec: ./spec.md Decision coverage: ./decision-coverage.md Date: <date>
9
9
 
10
10
  ## Summary
11
- 1–2 sentences: the primary requirement + the chosen approach.
11
+ <primary requirement + chosen approach, 1–2 sentences>
12
12
 
13
13
  ## Technical context
14
- - Language / runtime + version: <e.g. TypeScript 5, Node 20>
15
- - Frameworks / libraries in play: <...>
16
- - Storage / data: <...>
17
- - Testing tools + commands: <from spec "Commands discovered">
18
- - Target / platform / constraints: <...>
19
- - Any product/constraint unknown that affects the approach routes to `/rite-clarify`;
20
- do not carry `[NEEDS CLARIFICATION]` into an approvable plan.
14
+ - Language/runtime/version: <...>
15
+ - Frameworks/libraries: <...>
16
+ - Storage/data: <...>
17
+ - Test commands: <from spec Commands discovered>
18
+ - Target/platform/constraints: <...>
19
+ - Approach-affecting product/constraint unknowns route to `/rite-clarify`;
20
+ `[NEEDS CLARIFICATION]` blocks approval.
21
+
22
+ ## Applicability and system ownership
23
+
24
+ Validate `spec.md` applicability against live evidence. Each `applies` row includes its
25
+ owner's **Required plan output** here or in architecture:
26
+
27
+ - topology → root/deployable/owner table;
28
+ - data/migration/tenant/retention → invariant/recovery table;
29
+ - API/webhook/queue/job/cache/service → boundary table;
30
+ - security/UI/delivery → focused standard + proof owner.
31
+
32
+ Record feature owner, failure/recovery, slice, and evidence. Changed `not applicable`
33
+ uses Spec Drift Guard.
21
34
 
22
35
  ## Global constraints
23
- Project-wide requirements from the spec that every slice implicitly includes — version
24
- floors, dependency limits, naming/copy rules, platform requirements. One line each, exact
25
- values **verbatim from spec.md** (a paraphrased constraint drifts by the time slice 4 builds).
36
+ Exact `spec.md` requirements inherited by every slice.
26
37
 
27
38
  ## Approach
28
- The strategy in a few sentences. Why this over the alternatives considered.
29
- For high-cost/hard-to-reverse boundaries, models, contracts, or dependencies compare ≥2
30
- viable `Option · Drivers · Trade-offs · Consequence`; skip theater for routine choices.
39
+ State strategy and rationale. For costly/hard-to-reverse boundaries, models, contracts,
40
+ or dependencies compare ≥2 `Option · Drivers · Trade-offs · Consequence`.
31
41
 
32
42
  ## Slice strategy
33
- How the feature is split into vertical `SLICE-###` increments, why the order is
34
- risk-first within dependency tiers, and which acceptance criteria each slice covers. For a
35
- wide mechanical refactor, use expand → migrate batches → contract; keep every migrate batch
36
- green, or name the integration branch + final verify slice.
43
+ List vertical `SLICE-###` increments, AC coverage, and risk-first order within dependency
44
+ tiers. Wide refactors use expand green migrate batches contract, or an integration
45
+ branch + final verify slice.
37
46
 
38
47
  ## Architecture decisions
39
- Key decisions + rationale (mirror into decisions.md). New pattern vs reuse — prefer
40
- reuse of existing project conventions. Record architecture as invariants, not scaffolding:
41
- include a decision only when slices could choose incompatibly. Medium+ decisions include
42
- `Binds:` and `Prevents:`. Cross-boundary interfaces name invariants, I/O, ordering/idempotency,
43
- errors, versioning, config, and relevant budgets.
48
+ Decisions + rationale (mirror to `decisions.md`). Prefer reuse and invariants over
49
+ scaffolding. Medium+ entries add `Binds:`/`Prevents:`. Interfaces name invariants, I/O,
50
+ ordering/idempotency, errors, versioning, config, and budgets.
51
+
52
+ ## Decision horizons
53
+
54
+ Classify every known unresolved/action item. Keep `HZN-###` across replans; never delete
55
+ silently. Resolution/supersession needs evidence.
56
+
57
+ | Horizon | Includes | Required disposition |
58
+ |---|---|---|
59
+ | Human-owned blocker | Product, acceptance, policy, irreversible risk | `/rite-clarify`; unresolved blocks approval/readiness. |
60
+ | Planning-owned | Architecture, boundary, dependency, sequence, proof | Resolve from source. If executable evidence is necessary, plan a bounded risk spike with discriminating criteria + fallback branches. |
61
+ | Implementation-local | Reversible detail unknowable before code/tests: exact helper name, final query shape after live evidence, or a refactor that may disappear | Owner slice + observable trigger + bounds/fallback + resolution proof; never “ask later.” |
62
+ | Action-time checkpoint | Approval/evidence mandatory when acting | Owner + gate/signal + bounds/fallback + proof; cannot hide an earlier decision. |
63
+
64
+ Never local: public contracts, security/data invariants, acceptance, migration/rollback,
65
+ dependency choice, cross-slice interfaces. Output per item: `HZN-### · item · horizon ·
66
+ owner/slice · evidence · trigger/checkpoint · bounds/fallback/branches · resolution proof ·
67
+ status`. Only a complete sweep may write `Decision horizons: none — <evidence>`.
44
68
 
45
69
  ## Shared contract proof
46
- When this feature changes an API, event, schema, or other provider/consumer boundary,
47
- include exactly one table and omit the no-impact statement:
70
+ Changed provider/consumer boundary: one table:
48
71
 
49
72
  | Boundary | Canonical contract artifact | Provider-side asserting test | Consumer-side asserting test |
50
73
  |---|---|---|---|
51
74
  | <provider → consumer surface> | <existing schema/type/fixture path> | <test path + assertion> | <test path + assertion> |
52
75
 
53
- Both tests must consume the same artifact. Reuse an existing canonical schema, type, or
54
- fixture when one exists; do not create one for ceremony. If no provider/consumer boundary
55
- changes, omit the table and write exactly:
76
+ Tests consume the same artifact. Reuse an existing canonical artifact; no ceremony-only
77
+ artifact. Without boundary change write exactly:
56
78
 
57
79
  Shared contract impact: none — <specific justification>
58
80
 
59
81
  ## Dependency graph
60
- What must exist before what (text is fine):
61
- - SLICE-001 (no deps)SLICE-002 (needs SLICE-001)SLICE-004 (needs SLICE-002, SLICE-003)
62
- - SLICE-003 (independent / parallelizable)
82
+ List slice prerequisites, non-code prerequisites, and deployable order:
83
+ contract/schema/config old/new app/workermigration/backfill exposureremoval.
84
+ Name shared mutable resources that force serialization.
63
85
 
64
86
  ## Implementation order
65
- Ordered slice list + the reason for the order (risk-first within a dependency tier).
66
- `MVP cut: after SLICE-00N — <what ships if we stop here>` — the earliest prefix of the order
67
- that is a coherent, shippable feature on its own. This is the pre-agreed retreat position when
68
- the feature stalls or `/rite-plan` pivots: every acceptance criterion above the cut is proven by
69
- slices above the cut, and no slice above it depends on one below.
87
+ Ordered slices + rationale (risk-first within dependency tiers).
88
+ `MVP cut: after SLICE-00N — <what ships if we stop here>` — the earliest coherent,
89
+ shippable prefix. Every acceptance criterion above it is proven there, with no dependency
90
+ below it.
70
91
 
71
92
  ## Validation strategy
72
- After which slices to run tests / build / browser proof. For UI slices, name the visual
73
- acceptance targets from `design-brief.md`, not a generic "looks good" check.
74
- Each proof names exact command/cwd/signal, prerequisites, and mutable provenance inputs.
75
- Use portable repository commands; runtime wrappers and local absolute/temp paths do not
76
- belong in a durable plan.
77
-
78
- **Key links** — the wiring the assembled feature must exhibit, one row each:
79
- `<from> → <to> via <mechanism>` (route → handler via registration; producer → consumer via
80
- event). List only cross-slice links whose absence no single
81
- slice's tests would catch — `/rite-prove` walks each (step 5d). `Key links: none` is a
82
- deliberate single-slice call.
93
+ Name test/build/browser proof points. UI uses `design-brief.md` targets. Each proof names
94
+ portable command/cwd/signal, prerequisites, and mutable provenance inputs.
95
+
96
+ **Key links** assembled wiring, one row each:
97
+ `<from> <to> via <mechanism>`. List wiring no slice test catches; `/rite-prove` walks it.
98
+ `Key links: none` is deliberate.
83
99
 
84
100
  ## Complexity & deviations gate
85
- List anything that deviates from DevRites defaults (prefer existing conventions, the
86
- simplest approach, feature scope only, no new deps/design system) and **justify it**.
87
- If you can't justify a deviation, simplify instead of recording it.
101
+ Justify deviations from reuse, simplicity, scope, dependency/design-system rules;
102
+ otherwise simplify.
88
103
  | Deviation | Why needed | Simpler option rejected because |
89
104
  |-----------|-----------|---------------------------------|
90
105
  | <e.g. new dependency X> | <reason> | <why the in-repo option won't work> |
91
106
 
92
107
  ## Rollback
93
- How to back out each risky step (migration down, feature flag, revert boundary, backup).
108
+ Risky-step backout: migration/flag/revert/backup.
94
109
 
95
110
  ## Scope boundaries
96
- What this plan will NOT touch. Restate "Ask first" / "Never do" from the spec.
111
+ Untouched scope; copy spec Ask first”/“Never do.”
97
112
 
98
113
  ## Source docs needed
99
- Framework/library docs to consult (triggers devrites-source-driven). Record URLs in
100
- decisions.md / evidence.md when used.
114
+ Framework/library sources (triggers source-driven).
101
115
 
102
116
  ## Readiness gate *(must pass before /rite-build)*
103
117
  - [ ] `decision-coverage.md` says `Decision coverage: CLEAR`
104
- - [ ] Every spec acceptance criterion is covered by a slice
105
- - [ ] Dependency order is acyclic and risk-first
106
- - [ ] An `MVP cut` is named, self-contained (ACs above the cut proven above the cut, no dependency reaching below), and marks a genuinely shippable scope
107
- - [ ] No unjustified deviation remains in the complexity gate
108
- - [ ] Rollback exists for every destructive / migration step
109
- - [ ] Every `Mode: HITL` slice has `Gate`, `SLA`, and `Checkpoint` populated
110
- - [ ] Human-owned choices are resolved; surviving checkpoints need unavailable pre-code
111
- evidence or action-time approval
112
- - [ ] Slice proof commands, cwd, prerequisites, and provenance inputs are portable and preflightable
113
- - [ ] Every UI slice names `Design brief states` and binary `Visual acceptance`
114
- - [ ] `Key links` rows cover every cross-slice wiring (or state `none`)
115
- - [ ] Cross-boundary contracts name producer, consumer, invariants/errors/order, and proof
116
- - [ ] `Shared contract proof` contains one complete, consuming provider/consumer table, or one specific no-impact statement
117
- - [ ] Any wide mechanical refactor is sliced expand → migrate batches → contract, with green migrate batches or an integration branch + final verify slice
118
- - [ ] No `Gate: blocking` slice is implicitly chained behind an AFK slice without surfacing the dependency
118
+ - [ ] Every AC maps to a slice
119
+ - [ ] Dependencies are acyclic/risk-first
120
+ - [ ] Applicability matches live evidence; outputs name owner, recovery, slice, proof
121
+ - [ ] `MVP cut` is shippable/self-contained: ACs proven, no dependency below
122
+ - [ ] Deviations are justified
123
+ - [ ] Destructive/migration steps have rollback
124
+ - [ ] Each `Mode: HITL` slice has `Gate`, `SLA`, `Checkpoint`
125
+ - [ ] Human choices resolved; checkpoints need unavailable pre-code evidence/action approval
126
+ - [ ] All horizon items remain; blockers/planning items resolved or validly spiked;
127
+ local/checkpoint register fields fully populated
128
+ - [ ] Proof command/cwd/prereqs/provenance portable + preflightable
129
+ - [ ] UI slices name `Design brief states` + binary `Visual acceptance`
130
+ - [ ] `Key links` cover cross-slice wiring (or `none`)
131
+ - [ ] Contracts name producer, consumer, invariants/errors/order, proof
132
+ - [ ] Deploy/config/schema/app/worker/flag order is safe across old/new or N/A
133
+ - [ ] `Shared contract proof` has one consuming table or specific no-impact
134
+ - [ ] Wide refactor is expand → green migrate batches → contract, or branch + final verify
135
+ - [ ] No hidden `Gate: blocking` dependency behind an AFK slice
119
136
  ```
@@ -57,7 +57,8 @@ free: prefer it over re-deriving:
57
57
 
58
58
  - A **diff** or **recap** → the workspace and archive: `seal.md`, `evidence.md`, `decisions.md`,
59
59
  `traceability.md`, the shipped `.devrites/archive/<slug>/`, and `git log` / `git diff`.
60
- - A **concept** with footprint in this repo → the live code (codegraph / graphify first), plus any
60
+ - A **concept** with footprint in this repo → live code through the primary index selected by
61
+ `standards/tooling.md` (one named-predicate cross-check only when needed), plus any
61
62
  `.devrites/principles.md` or ADRs that already take a position on it.
62
63
  - An **idea** or a concept with no repo footprint → the user's framing plus, only if it sharpens
63
64
  the teaching, current external sources (weight by date; the year is 2026).
@@ -8,51 +8,47 @@ disable-model-invocation: true
8
8
 
9
9
  # /rite-learn: review durable lessons
10
10
 
11
- Use native session memory and reviewed project Markdown instead of an engine
12
- miner, score, nudge, or convention registry. This command proposes durable
13
- guidance; it never turns an inferred pattern into a rule on its own.
11
+ Use reviewed Markdown/native memory, not miners or registries. This proposes maintenance
12
+ of one authority; it cannot promote a rule alone.
14
13
 
15
14
  ## Modes
16
15
 
17
16
  - `/rite-learn` reviews recurring evidence across shipped work.
18
- - `/rite-learn "<lesson>"` evaluates one proposed lesson or rejected direction.
17
+ - `/rite-learn "<lesson>"` evaluates one lesson or rejected direction.
19
18
 
20
19
  ## Workflow
21
20
 
22
- 1. Read the applicable `AGENTS.md` or `CLAUDE.md`, accepted ADRs, and relevant
23
- `.devrites/archive/*/{decisions,drift,review,seal}.md` files. Use native host
24
- memory or session history when available, but verify every durable claim
25
- against repository evidence.
26
- 2. For a broad review, ask the exact `devrites-retrospector` agent to inspect the
27
- bounded archive in a fresh read-only context. Wait for its result and
28
- reconcile it against the cited files.
29
- 3. Keep a candidate only when it is specific and supported by either:
30
- - the same correction in at least two distinct features; or
31
- - one explicit, durable product/architecture decision with its rationale.
32
- 4. Choose the smallest authoritative home:
33
- - `AGENTS.md`, `CLAUDE.md`, or a scoped standards document for an operating
34
- rule;
35
- - an ADR for a significant durable architecture decision;
36
- - the active feature's `decisions.md` for a feature-scoped decision;
37
- - no change for a one-off, stale, or generic observation.
38
- 5. Show the evidence and exact proposed edit. Apply it only after the user
39
- approves the durable rule or decision.
21
+ 1. Read [durable promotion](../devrites-lib/reference/standards/documentation.md#promote-durable-guidance).
22
+ Bound the archive; inspect applicable
23
+ `AGENTS.md`/`CLAUDE.md`, accepted ADRs, and relevant
24
+ `.devrites/archive/*/{decisions,drift,review,seal}.md` files.
25
+ 2. In broad mode, dispatch exact `devrites-retrospector` fresh/read-only; reconcile its
26
+ claims against cited files.
27
+ 3. Keep a correction repeated in two features or one explicit durable product/architecture
28
+ decision with rationale. Drop one-off, generic, or stale items.
29
+ 4. Verify claims against live authoritative repository sources. State the currentness signal,
30
+ applies/does-not-apply scope, and `unknown` where unverifiable.
31
+ 5. Search guidance for the same/contrary rule. Choose one existing canonical owner: nearest
32
+ instruction/standard, architecture ADR, or feature `decisions.md`; name discovery.
33
+ 6. Show the exact edit and duplicate/conflict/supersession disposition. Update, narrow,
34
+ replace, or retire contradictions; apply only after user approval of the exact edits.
40
35
 
41
36
  ## Rules
42
37
 
43
- - Live repository evidence outranks memory.
44
- - Do not maintain a parallel learning ledger, convention score, health score,
45
- timeline, fingerprint index, or promotion queue.
46
- - Do not duplicate guidance already stated by a higher or nearer authority.
47
- - A rejected direction returns only when new evidence changes its recorded
48
- rationale.
38
+ - Live repository evidence outranks memory; unverifiable is unknown, not false.
39
+ - Never create a learning ledger/index/queue, score, timeline, or parallel authority.
40
+ - Rejected directions return only when evidence changes their rationale.
49
41
 
50
42
  ## Output
51
43
 
52
44
  ```text
53
45
  Done: reviewed <scope>.
54
- Candidates: <specific proposals or none>.
55
- Evidence: <feature/file references>.
56
- Awaiting: <approval for exact edits | none>.
57
- Next: <single action>.
46
+ Candidate: <specific proposal or none>
47
+ Currentness: <live source + signal | unknown>
48
+ Scope: applies <trigger>; does not apply <boundary>
49
+ Authority: existing <path|none>; canonical <path>; consumers/discovery <route>
50
+ Disposition: <no conflict | update/narrow/replace/retire path + reason>
51
+ Evidence: <feature/file references>
52
+ Awaiting: <approval for exact edits | none>
53
+ Next: <single action>
58
54
  ```