devrites 7.1.1 → 7.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 (440) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +9 -4
  3. package/docs/dsh.md +46 -0
  4. package/engine/internal/devritespaths/paths.go +2 -0
  5. package/engine/internal/hostpack/hostpack.go +29 -5
  6. package/engine/internal/install/apply.go +14 -2
  7. package/engine/internal/install/install.go +7 -3
  8. package/engine/internal/install/merge.go +1 -0
  9. package/engine/internal/install/preflight.go +9 -2
  10. package/engine/internal/install/update.go +1 -1
  11. package/engine/internal/lib/dispatch_packet.go +1 -1
  12. package/pack/.claude/agents/devrites-upgrade-planner.md +12 -4
  13. package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +21 -4
  14. package/pack/.claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +10 -3
  15. package/pack/.claude/skills/devrites-debug-recovery/reference/regression-test.md +7 -4
  16. package/pack/.claude/skills/devrites-lib/reference/reply-contract.md +11 -11
  17. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +52 -56
  18. package/pack/.claude/skills/devrites-lib/reference/standards/agents.md +11 -1
  19. package/pack/.claude/skills/devrites-lib/reference/standards/core.md +41 -40
  20. package/pack/.claude/skills/rite-autocomplete/SKILL.md +12 -14
  21. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +34 -38
  22. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +38 -39
  23. package/pack/.claude/skills/rite-define/SKILL.md +28 -27
  24. package/pack/.claude/skills/rite-plan/SKILL.md +7 -2
  25. package/pack/.claude/skills/rite-plan/reference/replan-and-repair.md +5 -2
  26. package/pack/.claude/skills/rite-resolve/SKILL.md +17 -10
  27. package/pack/.claude/skills/rite-resolve/reference/answer-protocol.md +18 -6
  28. package/pack/.claude/skills/rite-review/SKILL.md +4 -4
  29. package/pack/.claude/skills/rite-review/reference/security-review.md +4 -2
  30. package/pack/.claude/skills/rite-seal/SKILL.md +28 -33
  31. package/pack/.claude/skills/rite-ship/SKILL.md +14 -7
  32. package/pack/.claude/skills/rite-temper/SKILL.md +18 -18
  33. package/pack/.claude/skills/rite-temper/reference/scope-modes.md +6 -7
  34. package/pack/.claude/skills/rite-upgrade/SKILL.md +7 -2
  35. package/pack/.claude/skills/rite-vet/SKILL.md +33 -34
  36. package/pack/generated/README.md +3 -1
  37. package/pack/generated/claude/agents/devrites-upgrade-planner.md +12 -4
  38. package/pack/generated/claude/skills/devrites-debug-recovery/SKILL.md +21 -4
  39. package/pack/generated/claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +10 -3
  40. package/pack/generated/claude/skills/devrites-debug-recovery/reference/regression-test.md +7 -4
  41. package/pack/generated/claude/skills/devrites-lib/reference/reply-contract.md +11 -11
  42. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +52 -56
  43. package/pack/generated/claude/skills/devrites-lib/reference/standards/agents.md +11 -1
  44. package/pack/generated/claude/skills/devrites-lib/reference/standards/core.md +41 -40
  45. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +12 -14
  46. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +34 -38
  47. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +38 -39
  48. package/pack/generated/claude/skills/rite-define/SKILL.md +28 -27
  49. package/pack/generated/claude/skills/rite-plan/SKILL.md +7 -2
  50. package/pack/generated/claude/skills/rite-plan/reference/replan-and-repair.md +5 -2
  51. package/pack/generated/claude/skills/rite-resolve/SKILL.md +17 -10
  52. package/pack/generated/claude/skills/rite-resolve/reference/answer-protocol.md +18 -6
  53. package/pack/generated/claude/skills/rite-review/SKILL.md +4 -4
  54. package/pack/generated/claude/skills/rite-review/reference/security-review.md +4 -2
  55. package/pack/generated/claude/skills/rite-seal/SKILL.md +28 -33
  56. package/pack/generated/claude/skills/rite-ship/SKILL.md +14 -7
  57. package/pack/generated/claude/skills/rite-temper/SKILL.md +18 -18
  58. package/pack/generated/claude/skills/rite-temper/reference/scope-modes.md +6 -7
  59. package/pack/generated/claude/skills/rite-upgrade/SKILL.md +7 -2
  60. package/pack/generated/claude/skills/rite-vet/SKILL.md +33 -34
  61. package/pack/generated/codex/agents/devrites-upgrade-planner.toml +12 -4
  62. package/pack/generated/codex/skills/devrites-debug-recovery/SKILL.md +21 -4
  63. package/pack/generated/codex/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +10 -3
  64. package/pack/generated/codex/skills/devrites-debug-recovery/reference/regression-test.md +7 -4
  65. package/pack/generated/codex/skills/devrites-lib/reference/reply-contract.md +11 -11
  66. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +52 -56
  67. package/pack/generated/codex/skills/devrites-lib/reference/standards/agents.md +11 -1
  68. package/pack/generated/codex/skills/devrites-lib/reference/standards/core.md +41 -40
  69. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +12 -14
  70. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +34 -38
  71. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +38 -39
  72. package/pack/generated/codex/skills/rite-define/SKILL.md +28 -27
  73. package/pack/generated/codex/skills/rite-plan/SKILL.md +7 -2
  74. package/pack/generated/codex/skills/rite-plan/reference/replan-and-repair.md +5 -2
  75. package/pack/generated/codex/skills/rite-resolve/SKILL.md +17 -10
  76. package/pack/generated/codex/skills/rite-resolve/reference/answer-protocol.md +18 -6
  77. package/pack/generated/codex/skills/rite-review/SKILL.md +4 -4
  78. package/pack/generated/codex/skills/rite-review/reference/security-review.md +4 -2
  79. package/pack/generated/codex/skills/rite-seal/SKILL.md +28 -33
  80. package/pack/generated/codex/skills/rite-ship/SKILL.md +14 -7
  81. package/pack/generated/codex/skills/rite-temper/SKILL.md +18 -18
  82. package/pack/generated/codex/skills/rite-temper/reference/scope-modes.md +6 -7
  83. package/pack/generated/codex/skills/rite-upgrade/SKILL.md +7 -2
  84. package/pack/generated/codex/skills/rite-vet/SKILL.md +33 -34
  85. package/pack/generated/devin/agents/devrites-upgrade-planner.md +12 -4
  86. package/pack/generated/devin/skills/devrites-debug-recovery/SKILL.md +21 -4
  87. package/pack/generated/devin/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +10 -3
  88. package/pack/generated/devin/skills/devrites-debug-recovery/reference/regression-test.md +7 -4
  89. package/pack/generated/devin/skills/devrites-lib/reference/reply-contract.md +11 -11
  90. package/pack/generated/devin/skills/devrites-lib/reference/standards/afk-hitl.md +52 -56
  91. package/pack/generated/devin/skills/devrites-lib/reference/standards/agents.md +11 -1
  92. package/pack/generated/devin/skills/devrites-lib/reference/standards/core.md +41 -40
  93. package/pack/generated/devin/skills/rite-autocomplete/SKILL.md +12 -14
  94. package/pack/generated/devin/skills/rite-autocomplete/reference/loop.md +34 -38
  95. package/pack/generated/devin/skills/rite-autocomplete/reference/stop-conditions.md +38 -39
  96. package/pack/generated/devin/skills/rite-define/SKILL.md +28 -27
  97. package/pack/generated/devin/skills/rite-plan/SKILL.md +7 -2
  98. package/pack/generated/devin/skills/rite-plan/reference/replan-and-repair.md +5 -2
  99. package/pack/generated/devin/skills/rite-resolve/SKILL.md +17 -10
  100. package/pack/generated/devin/skills/rite-resolve/reference/answer-protocol.md +18 -6
  101. package/pack/generated/devin/skills/rite-review/SKILL.md +4 -4
  102. package/pack/generated/devin/skills/rite-review/reference/security-review.md +4 -2
  103. package/pack/generated/devin/skills/rite-seal/SKILL.md +28 -33
  104. package/pack/generated/devin/skills/rite-ship/SKILL.md +14 -7
  105. package/pack/generated/devin/skills/rite-temper/SKILL.md +18 -18
  106. package/pack/generated/devin/skills/rite-temper/reference/scope-modes.md +6 -7
  107. package/pack/generated/devin/skills/rite-upgrade/SKILL.md +7 -2
  108. package/pack/generated/devin/skills/rite-vet/SKILL.md +33 -34
  109. package/pack/generated/dsh/AGENTS.md +20 -0
  110. package/pack/generated/dsh/agents/devrites-code-reviewer.md +180 -0
  111. package/pack/generated/dsh/agents/devrites-devex-reviewer.md +137 -0
  112. package/pack/generated/dsh/agents/devrites-doubt-reviewer.md +100 -0
  113. package/pack/generated/dsh/agents/devrites-evidence-scout.md +93 -0
  114. package/pack/generated/dsh/agents/devrites-frontend-reviewer.md +139 -0
  115. package/pack/generated/dsh/agents/devrites-performance-reviewer.md +142 -0
  116. package/pack/generated/dsh/agents/devrites-plan-drafter.md +113 -0
  117. package/pack/generated/dsh/agents/devrites-plan-reviewer.md +167 -0
  118. package/pack/generated/dsh/agents/devrites-proof-runner.md +101 -0
  119. package/pack/generated/dsh/agents/devrites-retrospector.md +82 -0
  120. package/pack/generated/dsh/agents/devrites-security-auditor.md +146 -0
  121. package/pack/generated/dsh/agents/devrites-simplifier-reviewer.md +113 -0
  122. package/pack/generated/dsh/agents/devrites-slice-wright.md +240 -0
  123. package/pack/generated/dsh/agents/devrites-spec-reviewer.md +105 -0
  124. package/pack/generated/dsh/agents/devrites-strategy-reviewer.md +109 -0
  125. package/pack/generated/dsh/agents/devrites-test-analyst.md +110 -0
  126. package/pack/generated/dsh/agents/devrites-upgrade-planner.md +107 -0
  127. package/pack/generated/dsh/agents/fast-builder.md +92 -0
  128. package/pack/generated/dsh/agents/fast-checker.md +61 -0
  129. package/pack/generated/dsh/agents/fast-critic.md +71 -0
  130. package/pack/generated/dsh/agents/fast-planner.md +95 -0
  131. package/pack/generated/dsh/agents/overhaul-backend-engineer.md +70 -0
  132. package/pack/generated/dsh/agents/overhaul-boundary.md +64 -0
  133. package/pack/generated/dsh/agents/overhaul-craft.md +85 -0
  134. package/pack/generated/dsh/agents/overhaul-frontend-engineer.md +73 -0
  135. package/pack/generated/dsh/agents/overhaul-implementer.md +72 -0
  136. package/pack/generated/dsh/agents/overhaul-recon.md +77 -0
  137. package/pack/generated/dsh/agents/overhaul-specialist.md +67 -0
  138. package/pack/generated/dsh/agents/overhaul-verifier.md +73 -0
  139. package/pack/generated/dsh/runtime/cordis.patch.yml +1450 -0
  140. package/pack/generated/dsh/runtime/specialist.mjs +62 -0
  141. package/pack/generated/dsh/skills/devrites-api-interface/SKILL.md +65 -0
  142. package/pack/generated/dsh/skills/devrites-audit/SKILL.md +60 -0
  143. package/pack/generated/dsh/skills/devrites-browser-proof/SKILL.md +109 -0
  144. package/pack/generated/dsh/skills/devrites-browser-proof/reference/browser-performance.md +19 -0
  145. package/pack/generated/dsh/skills/devrites-browser-proof/reference/visual-verdict.md +38 -0
  146. package/pack/generated/dsh/skills/devrites-debug-recovery/SKILL.md +119 -0
  147. package/pack/generated/dsh/skills/devrites-debug-recovery/reference/build-the-loop.md +58 -0
  148. package/pack/generated/dsh/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +41 -0
  149. package/pack/generated/dsh/skills/devrites-debug-recovery/reference/hypotheses.md +23 -0
  150. package/pack/generated/dsh/skills/devrites-debug-recovery/reference/instrumentation.md +21 -0
  151. package/pack/generated/dsh/skills/devrites-debug-recovery/reference/regression-test.md +33 -0
  152. package/pack/generated/dsh/skills/devrites-debug-recovery/reference/trace.md +25 -0
  153. package/pack/generated/dsh/skills/devrites-doubt/SKILL.md +83 -0
  154. package/pack/generated/dsh/skills/devrites-frontend-craft/SKILL.md +89 -0
  155. package/pack/generated/dsh/skills/devrites-frontend-craft/reference/craft.md +63 -0
  156. package/pack/generated/dsh/skills/devrites-frontend-craft/reference/design-references.md +120 -0
  157. package/pack/generated/dsh/skills/devrites-frontend-craft/reference/fullstack.md +46 -0
  158. package/pack/generated/dsh/skills/devrites-frontend-craft/reference/quality-standards.md +286 -0
  159. package/pack/generated/dsh/skills/devrites-frontend-craft/reference/reuse-first.md +53 -0
  160. package/pack/generated/dsh/skills/devrites-frontend-craft/reference/shape.md +61 -0
  161. package/pack/generated/dsh/skills/devrites-interview/SKILL.md +107 -0
  162. package/pack/generated/dsh/skills/devrites-lib/SKILL.md +98 -0
  163. package/pack/generated/dsh/skills/devrites-lib/reference/candidate-integrity.md +59 -0
  164. package/pack/generated/dsh/skills/devrites-lib/reference/intent-map.md +86 -0
  165. package/pack/generated/dsh/skills/devrites-lib/reference/orchestration-profiles.md +48 -0
  166. package/pack/generated/dsh/skills/devrites-lib/reference/parallel-dispatch.md +184 -0
  167. package/pack/generated/dsh/skills/devrites-lib/reference/reply-contract.md +123 -0
  168. package/pack/generated/dsh/skills/devrites-lib/reference/standards/README.md +70 -0
  169. package/pack/generated/dsh/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md +32 -0
  170. package/pack/generated/dsh/skills/devrites-lib/reference/standards/afk-hitl.md +467 -0
  171. package/pack/generated/dsh/skills/devrites-lib/reference/standards/agents.md +231 -0
  172. package/pack/generated/dsh/skills/devrites-lib/reference/standards/anti-patterns.md +50 -0
  173. package/pack/generated/dsh/skills/devrites-lib/reference/standards/architecture-health.md +64 -0
  174. package/pack/generated/dsh/skills/devrites-lib/reference/standards/assumption-checkpoints.md +42 -0
  175. package/pack/generated/dsh/skills/devrites-lib/reference/standards/audit-coverage.md +107 -0
  176. package/pack/generated/dsh/skills/devrites-lib/reference/standards/browser-proof-checklist.md +37 -0
  177. package/pack/generated/dsh/skills/devrites-lib/reference/standards/ci-cd.md +62 -0
  178. package/pack/generated/dsh/skills/devrites-lib/reference/standards/code-index.md +111 -0
  179. package/pack/generated/dsh/skills/devrites-lib/reference/standards/code-navigation.md +69 -0
  180. package/pack/generated/dsh/skills/devrites-lib/reference/standards/code-review.md +178 -0
  181. package/pack/generated/dsh/skills/devrites-lib/reference/standards/coding-style.md +53 -0
  182. package/pack/generated/dsh/skills/devrites-lib/reference/standards/context-hygiene.md +136 -0
  183. package/pack/generated/dsh/skills/devrites-lib/reference/standards/core.md +202 -0
  184. package/pack/generated/dsh/skills/devrites-lib/reference/standards/data-integrity.md +144 -0
  185. package/pack/generated/dsh/skills/devrites-lib/reference/standards/debug-recovery.md +42 -0
  186. package/pack/generated/dsh/skills/devrites-lib/reference/standards/definition-of-done.md +25 -0
  187. package/pack/generated/dsh/skills/devrites-lib/reference/standards/deprecation.md +49 -0
  188. package/pack/generated/dsh/skills/devrites-lib/reference/standards/developer-experience.md +128 -0
  189. package/pack/generated/dsh/skills/devrites-lib/reference/standards/development-workflow.md +31 -0
  190. package/pack/generated/dsh/skills/devrites-lib/reference/standards/documentation.md +55 -0
  191. package/pack/generated/dsh/skills/devrites-lib/reference/standards/duplicate-code.md +129 -0
  192. package/pack/generated/dsh/skills/devrites-lib/reference/standards/edge-case-trace.md +94 -0
  193. package/pack/generated/dsh/skills/devrites-lib/reference/standards/elicitation.md +114 -0
  194. package/pack/generated/dsh/skills/devrites-lib/reference/standards/error-handling.md +49 -0
  195. package/pack/generated/dsh/skills/devrites-lib/reference/standards/gates.md +159 -0
  196. package/pack/generated/dsh/skills/devrites-lib/reference/standards/git-workflow.md +51 -0
  197. package/pack/generated/dsh/skills/devrites-lib/reference/standards/glossary.md +40 -0
  198. package/pack/generated/dsh/skills/devrites-lib/reference/standards/hooks.md +41 -0
  199. package/pack/generated/dsh/skills/devrites-lib/reference/standards/integration-reliability.md +121 -0
  200. package/pack/generated/dsh/skills/devrites-lib/reference/standards/loop-operations.md +123 -0
  201. package/pack/generated/dsh/skills/devrites-lib/reference/standards/observability.md +90 -0
  202. package/pack/generated/dsh/skills/devrites-lib/reference/standards/one-shot-actions.md +105 -0
  203. package/pack/generated/dsh/skills/devrites-lib/reference/standards/patterns.md +70 -0
  204. package/pack/generated/dsh/skills/devrites-lib/reference/standards/performance.md +88 -0
  205. package/pack/generated/dsh/skills/devrites-lib/reference/standards/principles.md +56 -0
  206. package/pack/generated/dsh/skills/devrites-lib/reference/standards/prose-style.md +127 -0
  207. package/pack/generated/dsh/skills/devrites-lib/reference/standards/release/ship-checklist.md +12 -0
  208. package/pack/generated/dsh/skills/devrites-lib/reference/standards/repository-topology.md +82 -0
  209. package/pack/generated/dsh/skills/devrites-lib/reference/standards/review/README.md +28 -0
  210. package/pack/generated/dsh/skills/devrites-lib/reference/standards/review/ci-workflows.md +50 -0
  211. package/pack/generated/dsh/skills/devrites-lib/reference/standards/review/default.md +42 -0
  212. package/pack/generated/dsh/skills/devrites-lib/reference/standards/review/go.md +47 -0
  213. package/pack/generated/dsh/skills/devrites-lib/reference/standards/review/python.md +46 -0
  214. package/pack/generated/dsh/skills/devrites-lib/reference/standards/review/react.md +55 -0
  215. package/pack/generated/dsh/skills/devrites-lib/reference/standards/review/shell.md +40 -0
  216. package/pack/generated/dsh/skills/devrites-lib/reference/standards/review/stack-profile.md +155 -0
  217. package/pack/generated/dsh/skills/devrites-lib/reference/standards/review/ts-js.md +74 -0
  218. package/pack/generated/dsh/skills/devrites-lib/reference/standards/review-checklist.md +14 -0
  219. package/pack/generated/dsh/skills/devrites-lib/reference/standards/security-checklist.md +30 -0
  220. package/pack/generated/dsh/skills/devrites-lib/reference/standards/security.md +283 -0
  221. package/pack/generated/dsh/skills/devrites-lib/reference/standards/skill-authoring.md +269 -0
  222. package/pack/generated/dsh/skills/devrites-lib/reference/standards/spec-grammar.md +214 -0
  223. package/pack/generated/dsh/skills/devrites-lib/reference/standards/test-proof-checklist.md +18 -0
  224. package/pack/generated/dsh/skills/devrites-lib/reference/standards/testing.md +295 -0
  225. package/pack/generated/dsh/skills/devrites-lib/reference/standards/tooling.md +125 -0
  226. package/pack/generated/dsh/skills/devrites-lib/reference/standards/verification-methods.md +143 -0
  227. package/pack/generated/dsh/skills/devrites-lib/reference/standards/windows.md +60 -0
  228. package/pack/generated/dsh/skills/devrites-lib/reference/standards/workflow-artifacts.md +435 -0
  229. package/pack/generated/dsh/skills/devrites-lib/reference/visual-playbooks/code.md +44 -0
  230. package/pack/generated/dsh/skills/devrites-lib/reference/visual-playbooks/comparison.md +42 -0
  231. package/pack/generated/dsh/skills/devrites-lib/reference/visual-playbooks/diagram.md +51 -0
  232. package/pack/generated/dsh/skills/devrites-lib/reference/visual-playbooks/index.md +66 -0
  233. package/pack/generated/dsh/skills/devrites-lib/reference/visual-playbooks/input.md +46 -0
  234. package/pack/generated/dsh/skills/devrites-lib/reference/visual-playbooks/outline-template.md +106 -0
  235. package/pack/generated/dsh/skills/devrites-lib/reference/visual-playbooks/plan.md +48 -0
  236. package/pack/generated/dsh/skills/devrites-lib/reference/visual-playbooks/slides.md +40 -0
  237. package/pack/generated/dsh/skills/devrites-lib/reference/visual-playbooks/table.md +42 -0
  238. package/pack/generated/dsh/skills/devrites-lib/reference/workspace-artifact-schema.md +312 -0
  239. package/pack/generated/dsh/skills/devrites-prose-craft/SKILL.md +81 -0
  240. package/pack/generated/dsh/skills/devrites-prose-craft/reference/banned-phrases.md +132 -0
  241. package/pack/generated/dsh/skills/devrites-prose-craft/reference/examples.md +136 -0
  242. package/pack/generated/dsh/skills/devrites-prose-craft/reference/structures.md +196 -0
  243. package/pack/generated/dsh/skills/devrites-source-driven/SKILL.md +54 -0
  244. package/pack/generated/dsh/skills/devrites-ux-shape/SKILL.md +135 -0
  245. package/pack/generated/dsh/skills/devrites-ux-shape/reference/brief-template.md +108 -0
  246. package/pack/generated/dsh/skills/devrites-ux-shape/reference/visual-direction-probe.md +50 -0
  247. package/pack/generated/dsh/skills/overhaul/SKILL.md +221 -0
  248. package/pack/generated/dsh/skills/overhaul/references/audit-domains.md +390 -0
  249. package/pack/generated/dsh/skills/overhaul/references/lifecycle.md +314 -0
  250. package/pack/generated/dsh/skills/overhaul/references/orchestration.md +291 -0
  251. package/pack/generated/dsh/skills/overhaul/references/records.md +203 -0
  252. package/pack/generated/dsh/skills/overhaul/references/repair-and-measurement.md +310 -0
  253. package/pack/generated/dsh/skills/overhaul/references/review-and-report.md +139 -0
  254. package/pack/generated/dsh/skills/overhaul/references/scope-and-safety.md +233 -0
  255. package/pack/generated/dsh/skills/overhaul/references/scoring.md +261 -0
  256. package/pack/generated/dsh/skills/overhaul/references/stack-profiles.md +316 -0
  257. package/pack/generated/dsh/skills/rite/SKILL.md +157 -0
  258. package/pack/generated/dsh/skills/rite/reference/menu.md +49 -0
  259. package/pack/generated/dsh/skills/rite-adopt/SKILL.md +64 -0
  260. package/pack/generated/dsh/skills/rite-adopt/reference/adoption.md +25 -0
  261. package/pack/generated/dsh/skills/rite-adopt/reference/anti-patterns.md +19 -0
  262. package/pack/generated/dsh/skills/rite-autocomplete/SKILL.md +167 -0
  263. package/pack/generated/dsh/skills/rite-autocomplete/reference/decision-policy.md +44 -0
  264. package/pack/generated/dsh/skills/rite-autocomplete/reference/lookahead.md +50 -0
  265. package/pack/generated/dsh/skills/rite-autocomplete/reference/loop.md +164 -0
  266. package/pack/generated/dsh/skills/rite-autocomplete/reference/stop-conditions.md +118 -0
  267. package/pack/generated/dsh/skills/rite-build/SKILL.md +126 -0
  268. package/pack/generated/dsh/skills/rite-build/reference/afk-discipline.md +153 -0
  269. package/pack/generated/dsh/skills/rite-build/reference/anti-patterns.md +27 -0
  270. package/pack/generated/dsh/skills/rite-build/reference/checkpoint-protocol.md +115 -0
  271. package/pack/generated/dsh/skills/rite-build/reference/checkpoint.md +79 -0
  272. package/pack/generated/dsh/skills/rite-build/reference/frontend-trigger.md +39 -0
  273. package/pack/generated/dsh/skills/rite-build/reference/one-slice-cycle.md +57 -0
  274. package/pack/generated/dsh/skills/rite-build/reference/output.md +29 -0
  275. package/pack/generated/dsh/skills/rite-build/reference/parallel-batch.md +260 -0
  276. package/pack/generated/dsh/skills/rite-build/reference/phase-contract.md +130 -0
  277. package/pack/generated/dsh/skills/rite-build/reference/spec-drift-guard.md +91 -0
  278. package/pack/generated/dsh/skills/rite-build/reference/tdd.md +27 -0
  279. package/pack/generated/dsh/skills/rite-build/reference/wright-dispatch.md +198 -0
  280. package/pack/generated/dsh/skills/rite-clarify/SKILL.md +104 -0
  281. package/pack/generated/dsh/skills/rite-clarify/reference/anti-patterns.md +24 -0
  282. package/pack/generated/dsh/skills/rite-clarify/reference/decision-coverage.md +56 -0
  283. package/pack/generated/dsh/skills/rite-converge/SKILL.md +167 -0
  284. package/pack/generated/dsh/skills/rite-converge/reference/anti-patterns.md +35 -0
  285. package/pack/generated/dsh/skills/rite-converge/reference/convergence-assessment.md +70 -0
  286. package/pack/generated/dsh/skills/rite-customize/SKILL.md +64 -0
  287. package/pack/generated/dsh/skills/rite-define/SKILL.md +203 -0
  288. package/pack/generated/dsh/skills/rite-define/reference/anti-patterns.md +26 -0
  289. package/pack/generated/dsh/skills/rite-define/reference/gates.md +160 -0
  290. package/pack/generated/dsh/skills/rite-define/reference/plan-template.md +153 -0
  291. package/pack/generated/dsh/skills/rite-doctor/SKILL.md +107 -0
  292. package/pack/generated/dsh/skills/rite-dogfood/SKILL.md +57 -0
  293. package/pack/generated/dsh/skills/rite-explain/SKILL.md +154 -0
  294. package/pack/generated/dsh/skills/rite-explain/reference/intake.md +89 -0
  295. package/pack/generated/dsh/skills/rite-fast/SKILL.md +185 -0
  296. package/pack/generated/dsh/skills/rite-fast/reference/artifacts.md +107 -0
  297. package/pack/generated/dsh/skills/rite-fast/reference/check-and-triage.md +51 -0
  298. package/pack/generated/dsh/skills/rite-frame/SKILL.md +119 -0
  299. package/pack/generated/dsh/skills/rite-frame/reference/failure-modes.md +66 -0
  300. package/pack/generated/dsh/skills/rite-handoff/SKILL.md +117 -0
  301. package/pack/generated/dsh/skills/rite-handoff/reference/handoff-template.md +56 -0
  302. package/pack/generated/dsh/skills/rite-harness/SKILL.md +76 -0
  303. package/pack/generated/dsh/skills/rite-harness/reference/feature-map.md +60 -0
  304. package/pack/generated/dsh/skills/rite-learn/SKILL.md +107 -0
  305. package/pack/generated/dsh/skills/rite-plan/SKILL.md +215 -0
  306. package/pack/generated/dsh/skills/rite-plan/reference/anti-patterns.md +34 -0
  307. package/pack/generated/dsh/skills/rite-plan/reference/dependency-graph.md +48 -0
  308. package/pack/generated/dsh/skills/rite-plan/reference/replan-and-repair.md +114 -0
  309. package/pack/generated/dsh/skills/rite-plan/reference/slicing.md +187 -0
  310. package/pack/generated/dsh/skills/rite-plan/reference/task-breakdown.md +50 -0
  311. package/pack/generated/dsh/skills/rite-polish/SKILL.md +128 -0
  312. package/pack/generated/dsh/skills/rite-polish/reference/adr-promotion.md +11 -0
  313. package/pack/generated/dsh/skills/rite-polish/reference/anti-ai-slop.md +210 -0
  314. package/pack/generated/dsh/skills/rite-polish/reference/anti-patterns.md +30 -0
  315. package/pack/generated/dsh/skills/rite-polish/reference/backend-polish.md +80 -0
  316. package/pack/generated/dsh/skills/rite-polish/reference/browser-polish-evidence.md +33 -0
  317. package/pack/generated/dsh/skills/rite-polish/reference/code.md +87 -0
  318. package/pack/generated/dsh/skills/rite-polish/reference/design-memory.md +117 -0
  319. package/pack/generated/dsh/skills/rite-polish/reference/design-system-discovery.md +8 -0
  320. package/pack/generated/dsh/skills/rite-polish/reference/harden-checklist.md +110 -0
  321. package/pack/generated/dsh/skills/rite-polish/reference/ledger.md +67 -0
  322. package/pack/generated/dsh/skills/rite-polish/reference/ui.md +146 -0
  323. package/pack/generated/dsh/skills/rite-pov/SKILL.md +71 -0
  324. package/pack/generated/dsh/skills/rite-pr-feedback/SKILL.md +61 -0
  325. package/pack/generated/dsh/skills/rite-pressure-test/SKILL.md +76 -0
  326. package/pack/generated/dsh/skills/rite-prototype/SKILL.md +106 -0
  327. package/pack/generated/dsh/skills/rite-prove/SKILL.md +151 -0
  328. package/pack/generated/dsh/skills/rite-prove/reference/acceptance-proof.md +88 -0
  329. package/pack/generated/dsh/skills/rite-prove/reference/anti-patterns.md +25 -0
  330. package/pack/generated/dsh/skills/rite-prove/reference/browser-proof.md +51 -0
  331. package/pack/generated/dsh/skills/rite-prove/reference/failure-triage.md +53 -0
  332. package/pack/generated/dsh/skills/rite-prove/reference/proof-ladder.md +39 -0
  333. package/pack/generated/dsh/skills/rite-prove/reference/test-command-discovery.md +36 -0
  334. package/pack/generated/dsh/skills/rite-quick/SKILL.md +97 -0
  335. package/pack/generated/dsh/skills/rite-resolve/SKILL.md +113 -0
  336. package/pack/generated/dsh/skills/rite-resolve/reference/answer-protocol.md +129 -0
  337. package/pack/generated/dsh/skills/rite-review/SKILL.md +190 -0
  338. package/pack/generated/dsh/skills/rite-review/reference/anti-patterns.md +32 -0
  339. package/pack/generated/dsh/skills/rite-review/reference/cognitive-load.md +90 -0
  340. package/pack/generated/dsh/skills/rite-review/reference/feature-scoped-review.md +26 -0
  341. package/pack/generated/dsh/skills/rite-review/reference/five-axis-review.md +66 -0
  342. package/pack/generated/dsh/skills/rite-review/reference/nielsen-heuristics.md +126 -0
  343. package/pack/generated/dsh/skills/rite-review/reference/performance-checklist.md +99 -0
  344. package/pack/generated/dsh/skills/rite-review/reference/performance-review.md +14 -0
  345. package/pack/generated/dsh/skills/rite-review/reference/security-review.md +44 -0
  346. package/pack/generated/dsh/skills/rite-seal/SKILL.md +99 -0
  347. package/pack/generated/dsh/skills/rite-seal/reference/anti-patterns.md +29 -0
  348. package/pack/generated/dsh/skills/rite-seal/reference/final-evidence.md +41 -0
  349. package/pack/generated/dsh/skills/rite-seal/reference/go-no-go.md +32 -0
  350. package/pack/generated/dsh/skills/rite-seal/reference/output.md +5 -0
  351. package/pack/generated/dsh/skills/rite-seal/reference/phase-contract.md +56 -0
  352. package/pack/generated/dsh/skills/rite-seal/reference/risk-and-rollback.md +56 -0
  353. package/pack/generated/dsh/skills/rite-seal/reference/seal-template.md +32 -0
  354. package/pack/generated/dsh/skills/rite-ship/SKILL.md +101 -0
  355. package/pack/generated/dsh/skills/rite-ship/reference/anti-patterns.md +28 -0
  356. package/pack/generated/dsh/skills/rite-ship/reference/close-out.md +69 -0
  357. package/pack/generated/dsh/skills/rite-ship/reference/git-ship.md +128 -0
  358. package/pack/generated/dsh/skills/rite-ship/reference/rollout.md +62 -0
  359. package/pack/generated/dsh/skills/rite-ship/reference/ship-template.md +40 -0
  360. package/pack/generated/dsh/skills/rite-spec/SKILL.md +169 -0
  361. package/pack/generated/dsh/skills/rite-spec/reference/acceptance-criteria.md +31 -0
  362. package/pack/generated/dsh/skills/rite-spec/reference/ai-spec-template.md +40 -0
  363. package/pack/generated/dsh/skills/rite-spec/reference/anti-patterns.md +27 -0
  364. package/pack/generated/dsh/skills/rite-spec/reference/interview-patterns.md +56 -0
  365. package/pack/generated/dsh/skills/rite-spec/reference/investigation.md +83 -0
  366. package/pack/generated/dsh/skills/rite-spec/reference/question-protocol.md +36 -0
  367. package/pack/generated/dsh/skills/rite-spec/reference/references-intake.md +62 -0
  368. package/pack/generated/dsh/skills/rite-spec/reference/spec-checklists.md +89 -0
  369. package/pack/generated/dsh/skills/rite-spec/reference/spec-template.md +160 -0
  370. package/pack/generated/dsh/skills/rite-spec/reference/state-workspace.md +240 -0
  371. package/pack/generated/dsh/skills/rite-status/SKILL.md +74 -0
  372. package/pack/generated/dsh/skills/rite-temper/SKILL.md +137 -0
  373. package/pack/generated/dsh/skills/rite-temper/reference/anti-patterns.md +30 -0
  374. package/pack/generated/dsh/skills/rite-temper/reference/review-dimensions.md +66 -0
  375. package/pack/generated/dsh/skills/rite-temper/reference/scope-modes.md +52 -0
  376. package/pack/generated/dsh/skills/rite-temper/reference/significance.md +55 -0
  377. package/pack/generated/dsh/skills/rite-temper/reference/strategy-template.md +101 -0
  378. package/pack/generated/dsh/skills/rite-upgrade/SKILL.md +142 -0
  379. package/pack/generated/dsh/skills/rite-vet/SKILL.md +242 -0
  380. package/pack/generated/dsh/skills/rite-vet/reference/anti-patterns.md +43 -0
  381. package/pack/generated/dsh/skills/rite-vet/reference/artifacts.md +248 -0
  382. package/pack/generated/dsh/skills/rite-vet/reference/cross-model.md +19 -0
  383. package/pack/generated/dsh/skills/rite-vet/reference/depth.md +59 -0
  384. package/pack/generated/dsh/skills/rite-vet/reference/eng-lenses.md +48 -0
  385. package/pack/generated/dsh/skills/rite-vet/reference/review-axes.md +210 -0
  386. package/pack/generated/dsh/skills/rite-watch-pr/SKILL.md +87 -0
  387. package/pack/generated/dsh/skills/rite-zoom-out/SKILL.md +76 -0
  388. package/pack/generated/omp/agents/devrites-upgrade-planner.md +12 -4
  389. package/pack/generated/omp/skills/devrites-debug-recovery/SKILL.md +21 -4
  390. package/pack/generated/omp/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +10 -3
  391. package/pack/generated/omp/skills/devrites-debug-recovery/reference/regression-test.md +7 -4
  392. package/pack/generated/omp/skills/devrites-lib/reference/reply-contract.md +11 -11
  393. package/pack/generated/omp/skills/devrites-lib/reference/standards/afk-hitl.md +52 -56
  394. package/pack/generated/omp/skills/devrites-lib/reference/standards/agents.md +11 -1
  395. package/pack/generated/omp/skills/devrites-lib/reference/standards/core.md +41 -40
  396. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +12 -14
  397. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +34 -38
  398. package/pack/generated/omp/skills/rite-autocomplete/reference/stop-conditions.md +38 -39
  399. package/pack/generated/omp/skills/rite-define/SKILL.md +28 -27
  400. package/pack/generated/omp/skills/rite-plan/SKILL.md +7 -2
  401. package/pack/generated/omp/skills/rite-plan/reference/replan-and-repair.md +5 -2
  402. package/pack/generated/omp/skills/rite-resolve/SKILL.md +17 -10
  403. package/pack/generated/omp/skills/rite-resolve/reference/answer-protocol.md +18 -6
  404. package/pack/generated/omp/skills/rite-review/SKILL.md +4 -4
  405. package/pack/generated/omp/skills/rite-review/reference/security-review.md +4 -2
  406. package/pack/generated/omp/skills/rite-seal/SKILL.md +28 -33
  407. package/pack/generated/omp/skills/rite-ship/SKILL.md +14 -7
  408. package/pack/generated/omp/skills/rite-temper/SKILL.md +18 -18
  409. package/pack/generated/omp/skills/rite-temper/reference/scope-modes.md +6 -7
  410. package/pack/generated/omp/skills/rite-upgrade/SKILL.md +7 -2
  411. package/pack/generated/omp/skills/rite-vet/SKILL.md +33 -34
  412. package/pack/generated/pi/agents/devrites-upgrade-planner.md +12 -4
  413. package/pack/generated/pi/skills/devrites-debug-recovery/SKILL.md +21 -4
  414. package/pack/generated/pi/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +10 -3
  415. package/pack/generated/pi/skills/devrites-debug-recovery/reference/regression-test.md +7 -4
  416. package/pack/generated/pi/skills/devrites-lib/reference/reply-contract.md +11 -11
  417. package/pack/generated/pi/skills/devrites-lib/reference/standards/afk-hitl.md +52 -56
  418. package/pack/generated/pi/skills/devrites-lib/reference/standards/agents.md +11 -1
  419. package/pack/generated/pi/skills/devrites-lib/reference/standards/core.md +41 -40
  420. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +12 -14
  421. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +34 -38
  422. package/pack/generated/pi/skills/rite-autocomplete/reference/stop-conditions.md +38 -39
  423. package/pack/generated/pi/skills/rite-define/SKILL.md +28 -27
  424. package/pack/generated/pi/skills/rite-plan/SKILL.md +7 -2
  425. package/pack/generated/pi/skills/rite-plan/reference/replan-and-repair.md +5 -2
  426. package/pack/generated/pi/skills/rite-resolve/SKILL.md +17 -10
  427. package/pack/generated/pi/skills/rite-resolve/reference/answer-protocol.md +18 -6
  428. package/pack/generated/pi/skills/rite-review/SKILL.md +4 -4
  429. package/pack/generated/pi/skills/rite-review/reference/security-review.md +4 -2
  430. package/pack/generated/pi/skills/rite-seal/SKILL.md +28 -33
  431. package/pack/generated/pi/skills/rite-ship/SKILL.md +14 -7
  432. package/pack/generated/pi/skills/rite-temper/SKILL.md +18 -18
  433. package/pack/generated/pi/skills/rite-temper/reference/scope-modes.md +6 -7
  434. package/pack/generated/pi/skills/rite-upgrade/SKILL.md +7 -2
  435. package/pack/generated/pi/skills/rite-vet/SKILL.md +33 -34
  436. package/package.json +3 -1
  437. package/scripts/build-host-artifacts.sh +6 -2
  438. package/scripts/dsh-generate.py +135 -0
  439. package/scripts/dsh-specialist.mjs +62 -0
  440. package/scripts/install-lib.sh +3 -1
@@ -0,0 +1,55 @@
1
+ # Documentation
2
+
3
+ > Applies when: writing docs, comments, READMEs; recording decisions.
4
+
5
+ Document intent/decisions; public inputs, outputs, errors, and gotchas; non-obvious
6
+ constraints; and real build/test/run commands. Update with behavior; prefer one runnable
7
+ example. Do not restate code or types.
8
+
9
+ ## Drift check (docs describe what runs)
10
+
11
+ A documented command/example that no longer runs is a **documentation-drift finding** at
12
+ review/polish: run it — failure plus output is the evidence. A behavior change updates the
13
+ doc or records the divergence; doc and code never hold contradictory "truths".
14
+
15
+ ## Record decisions
16
+
17
+ - Capture significant context, decision, consequences, accepted trade-off, change trigger,
18
+ and why viable alternatives lost. DevRites uses `decisions.md` for feature decisions.
19
+ - ADRs move `PROPOSED → ACCEPTED → SUPERSEDED / DEPRECATED`. Preserve accepted history;
20
+ a replacement ADR cites and supersedes the old one rather than rewriting it.
21
+
22
+ ## Promote durable guidance
23
+
24
+ Promotion is maintenance of an existing authority, not a new memory system.
25
+
26
+ 1. **Trigger:** the same reviewed correction appears in at least two distinct features, or
27
+ one explicit product/architecture decision has durable rationale. A one-off, generic,
28
+ stale, or merely inferred observation does not trigger promotion.
29
+ 2. **Ground:** verify each current claim against live authoritative repository sources.
30
+ Report the source and currentness signal. Unverifiable means `unknown`, not false.
31
+ 3. **Scope:** state when the guidance applies and does not apply. Reject a candidate whose
32
+ observable trigger cannot be named. If final code/tests/docs already recover the
33
+ reasoning, reject or consolidate the lesson; promote only the missing durable constraint.
34
+ **Failing case:** a regression test already explains input rejection, yet a second
35
+ generic "validate input" rule is added with no lost reasoning identified.
36
+ 4. **Own and expose:** choose one existing canonical owner (`AGENTS.md`/`CLAUDE.md`, a scoped
37
+ standard, or an ADR) and name the phases, agents, or contributors that discover it and
38
+ how (direct read, index link, or existing on-demand route).
39
+ 5. **Reconcile:** search current guidance for duplicates, contradictions, and supersession.
40
+ Update, narrow, replace, or retire contradicted guidance at its owner; do not append a
41
+ competing rule. Record the conflict/retirement disposition.
42
+ 6. **Approve:** show evidence and the exact durable edit before writing; user approval is
43
+ required. Never create a learning ledger, index, queue, score, or parallel authority.
44
+
45
+ Long reference material stays behind its existing on-demand route.
46
+
47
+ ## Living documents
48
+
49
+ Canonical documents are updated, not appended to. When truth changes, rewrite the
50
+ owning section in the present tense; sealed artifacts take dated deltas through the
51
+ owning rite instead ([`core.md`](core.md) #4). Pick a steering verb deliberately —
52
+ `create`, `consolidate`, `split`, `trim`, `retire` — rather than letting the last-opened
53
+ file absorb every new topic. Document what code cannot own (contracts, invariants,
54
+ decisions, rationale); a doc that restates implementation drifts the day it lands.
55
+ Sparse is correct — never pad a document to look complete.
@@ -0,0 +1,129 @@
1
+ # Duplicate code
2
+
3
+ > Applies when: a review or polish pass needs near-duplicate leads that survive
4
+ > renaming, or a dup finding needs a dismissal that persists.
5
+
6
+ `devrites-engine check dup` is the deterministic scanner. It normalizes source
7
+ (strips comments, collapses strings, canonicalizes identifiers and literals),
8
+ matches token shingles between files, clusters overlapping matches, and prints
9
+ advisory clusters — **leads**, not findings. The engine never judges whether a
10
+ cluster is worth merging; that decision is semantic and belongs to the
11
+ reviewer. Successful scans exit 0 even with clusters; usage and operational
12
+ errors, including incomplete scans, exit 2.
13
+
14
+ ## Running it
15
+
16
+ ```text
17
+ devrites-engine check dup [slug] --worktree|--staged|--base <ref>|--all
18
+ [--min-lines n] [--threshold f] [--ignore-file <path>]
19
+ [--limit n] [--exclude <csv>]
20
+ ```
21
+
22
+ - `--staged` / `--worktree` / `--base <ref>`: scan the repo, then print only
23
+ clusters with a unit overlapping the diff's changed hunks, marked `*`. Pick
24
+ the mode matching the diff under review: `--base <ref>` when the feature's
25
+ commits are landed (the common `/rite-review` case), `--staged`/`--worktree`
26
+ for uncommitted diffs. `--staged` reads index blobs for every comparator and
27
+ excludes untracked files, regardless of working-tree edits or deletions.
28
+ Keep the index stable during the scan. Other modes read working-tree bytes.
29
+ - `--all`: whole-repo triage, includes untracked source files. Use in
30
+ `/rite-polish` or `/devrites-audit` passes.
31
+ - `--min-lines` (default 8): minimum meaningful overlap. Lower it for tiny
32
+ helper-heavy languages, raise it to cut boilerplate noise.
33
+ - `--threshold` (default 0.6): minimum similarity score per reported pair.
34
+ - `--exclude`: extra path prefixes to skip (fixtures, generated code).
35
+ - `dup: scanned … units` in the header is the coverage line — a scan of 3
36
+ files in a 300-file repo proves nothing.
37
+
38
+ ## Evidence limits
39
+
40
+ This is a bounded heuristic, not exhaustive duplicate detection. The scanner
41
+ limits eligible files (8,192), source bytes (64 MiB total, 1 MiB per file),
42
+ Git listing/diff output (16 MiB), repeated-shingle postings, pair anchors, and
43
+ reported clusters. Normalization loses language semantics; a successful scan
44
+ with no leads does not prove the repository has no duplication.
45
+
46
+ No eligible input and intentional generated exclusions are reported explicitly
47
+ with exit 0, without claiming a successful source scan. Unreadable/non-regular
48
+ source, unresolved index entries, Git failures, and input resource limits exit 2.
49
+ A partial scan may print available leads, but never an `ok` verdict or a success
50
+ metric. Generated exclusions are counted separately from unavailable input.
51
+ Repeated options, conflicting modes, missing/flag-like values, and nonfinite
52
+ thresholds fail before scanning or metrics. Diff helpers and text conversion
53
+ are disabled so configured executables cannot change the inspected evidence.
54
+
55
+ ## Output shape
56
+
57
+ ```text
58
+ dup: scanned 42 files (2 skipped), 17 units; ignore-file .devrites/dup-ignore
59
+ dup: 2 cluster(s) (1 ignored)
60
+ cluster 1 (a1b2c3d4e5f6) score 0.93:
61
+ * engine/a.go:10-58
62
+ engine/b.go:120-168
63
+ cluster 2 (f6e5d4c3b2a1) score 0.81:
64
+ pkg/x/util.py:30-70
65
+ pkg/y/util.py:14-54
66
+ ```
67
+
68
+ `*` marks a unit that overlaps the diff's changed lines. The hex after
69
+ `cluster N` is the cluster's stable hash.
70
+
71
+ ## Triage each cluster
72
+
73
+ For every reported cluster a reviewer returns exactly one verdict:
74
+
75
+ | Verdict | When | Action |
76
+ |---|---|---|
77
+ | **merge** | Same logic, same contract, no behavioral reason to differ | Finding: extract a shared helper or call the canonical implementation. Name which unit survives. |
78
+ | **keep** | Convergent code (test scaffolding, protocol mirrors, intentional fork points) | Record the cluster hash in the ignore ledger with a one-line reason. |
79
+ | **watch** | Similar now, likely to diverge — copied seed that is about to change | FYI finding noting the drift risk; do not ignore. |
80
+
81
+ Ranking boosts distant matches across directories or far apart within one file.
82
+ Distance is a triage hint, not proof that two contracts are interchangeable.
83
+ Check whether fixes to one copy should also apply to the other.
84
+
85
+ A `merge` verdict (cluster or reimplemented-elsewhere twin) states the compared contract
86
+ (inputs, outputs, errors, side effects, ordering), each unit's callers, and the tests
87
+ protecting each copy. Any contract difference is `keep` or `watch`, not merge. When the
88
+ survivor's tests miss the removed copy's callers, the finding adds a characterize-first
89
+ step. A merge without the comparison is admitted only as an FYI lead. **Failing case:** two
90
+ parsers score 0.9; one errors on empty input, the other returns a default; "merge" is wrong.
91
+
92
+ ## Ignore ledger
93
+
94
+ `.devrites/dup-ignore` (project-root default; `--ignore-file` overrides) holds
95
+ one cluster hash per line, `#` comments allowed:
96
+
97
+ ```text
98
+ a1b2c3d4e5f6 # test scaffolding mirrors on purpose — do not merge
99
+ ```
100
+
101
+ The hash derives from normalized code *content*, not line numbers. It survives
102
+ renames, comment churn, literal tweaks, and line moves, but **changes when the
103
+ code's structure changes** — a dismissed cluster that gets edited resurfaces
104
+ for re-triage. This is intentional: a ledger entry must never permanently
105
+ blind the scan.
106
+
107
+ Rules:
108
+
109
+ - Never add a hash without reading both units — an unread dismissal is a gap.
110
+ - Judge member pairs, not the cluster: a hash is ignored only when every pair is `keep` and
111
+ one line explains it. A mixed or uncertain cluster gets a finding or `watch`, never an
112
+ ignore line, whatever the report volume. **Failing case:** A~B is a real copy, B~C is
113
+ coincidental, and the A~B~C hash lands in the ledger.
114
+ - Write the reason on the same line after `#`; a bare hash is an unexplained
115
+ dismissal and counts as a skipped check.
116
+ - Do not commit-ignore clusters introduced by the *current* diff — a `*` unit
117
+ needs a verdict (merge/keep/watch), not suppression.
118
+
119
+ ## Reporting dup findings
120
+
121
+ Dup findings use the C2 shape like any other finding, plus the cluster hash so
122
+ the dismissal ledger can reference it:
123
+
124
+ ```text
125
+ Finding: Suggestion | engine/a.go:10 | cluster a1b2c3d4e5f6 duplicates engine/b.go:120 (score 0.93) | fixes to one will drift from the other | extract shared helper `dupNormalize` into engine/internal/lib
126
+ ```
127
+
128
+ A reviewer that ran `check dup` and found nothing reports it under
129
+ `No-findings:` / `Basis:` (`dup: 0 clusters over 42 files`) — not by silence.
@@ -0,0 +1,94 @@
1
+ # Edge-case trace
2
+
3
+ > Applies when: a boundary, branch, or failure mode changes in spec, plan, diff, or proof.
4
+
5
+ Use this when requirements, plans, diffs, or proof change a boundary, branch,
6
+ validation rule, deletion contract, retryable action, or claim that a path is safe.
7
+ The trace finds relevant cases, records why irrelevant ones were dismissed, and prevents
8
+ confidence from turning an untested negative claim into a pass.
9
+
10
+ ## Scope before enumeration
11
+
12
+ Name the observable surface, caller/actor, state or data it owns, external boundaries,
13
+ and the must-NOT outcome the author would reject even if the happy path worked. Do not
14
+ expand into a whole-system checklist: a class applies only when the changed surface can
15
+ reach it.
16
+
17
+ ## Closed probe classes
18
+
19
+ Probe each relevant class once:
20
+
21
+ | Class | Questions |
22
+ | --- | --- |
23
+ | Boundary | Empty/missing, minimum/maximum, off-by-one, oversized, invalid encoding/shape. |
24
+ | State | Initial, repeated, stale, terminal, illegal transition, interruption and resume. |
25
+ | Ordering | Duplicate, out-of-order, retry, partial completion, clock/time-zone boundary. |
26
+ | Concurrency | Competing writer, lost update, cancellation, race, deadlock or resource exhaustion. |
27
+ | Authority | Unauthenticated, unauthorized, wrong tenant, forged identity, privilege increase. |
28
+ | Dependency | Timeout, partial/invalid response, rate limit, outage, version/config mismatch. |
29
+ | Persistence | Transaction split, crash, migration/backfill restart, rollback, retention/deletion. |
30
+ | Compatibility | Old/new reader or writer, caller not updated, feature-flag off/on, environment difference. |
31
+ | Wiring | Code exists but is not registered, called, awaited, persisted, emitted, or consumed with real data. |
32
+ | Removal | Deleted behavior, caller, data, telemetry, docs, or fallback has no surviving owner. |
33
+
34
+ Route detailed applicable cases to
35
+ [`repository-topology.md`](repository-topology.md),
36
+ [`data-integrity.md`](data-integrity.md),
37
+ [`integration-reliability.md`](integration-reliability.md), or
38
+ [`security.md`](security.md); do not repeat those standards here.
39
+
40
+ ## Trace procedure
41
+
42
+ 1. **Walk explicit paths.** Follow every changed condition, loop exit, error, and
43
+ boundary value to the nearest observable outcome.
44
+ 2. **Walk fixed-set siblings.** A special case for one enum/status/role/mode implies
45
+ every untouched sibling is a path to check.
46
+ 3. **Follow real wiring.** Verify existence, substance, registration/call path, and
47
+ real data flow. A complete-looking implementation can still be hollow, orphaned,
48
+ or a stub.
49
+ 4. **Check negative intent.** Ask what silently permitted outcome would violate a
50
+ requirement, invariant, non-goal, or security boundary. Add a prohibition only
51
+ when bespoke intent is not already owned by a standard.
52
+ 5. **Check removal.** Name the contract removed code carried and its surviving owner,
53
+ or cite the accepted decision that retires it.
54
+
55
+ ## Disposition and evidence
56
+
57
+ Every applicable case receives one status:
58
+
59
+ - `covered`: mapped to a REQ/AC and positive discriminating test or observed runtime proof;
60
+ - `backstop`: an independent held-out, property/metamorphic, or direct behavioral check
61
+ names the wrong outcome it would detect — and is **exogenous**: not produced or
62
+ executed by the same code path it validates (a check the changed code also controls is
63
+ `covered` evidence, not a backstop);
64
+ - `dismissed`: unreachable or irrelevant with a concrete reason and supporting evidence;
65
+ - `unresolved`: a material case lacks a fact or proof surface and blocks the owning gate.
66
+
67
+ Judgment may dismiss a demonstrably irrelevant case; it cannot prove behavior. When a
68
+ case is not inferable from available evidence, say `unresolved`/`cannot_verify` rather
69
+ than estimating confidence upward.
70
+
71
+ ## Backstop honesty (fail-closed)
72
+
73
+ A row marked `covered` or `backstop` **must** name an evidence class: test path,
74
+ command output, observed runtime, or an independent held-out/property check. A row
75
+ with disposition but **no** evidence class is **`cannot_verify`** at Prove/Seal — not
76
+ a pass.
77
+
78
+ **Failing case:** the happy-path suite is green, the trace lists "error path handled"
79
+ with no test or runtime proof → Prove blocks until the row gains a discriminating
80
+ surface or moves to `unresolved`.
81
+
82
+ ## Outputs
83
+
84
+ Spec records relevant cases in **Edge Coverage** and bespoke negative intent in
85
+ **Prohibitions**. Plan/Vet maps applicable cases to a slice, recovery, and proof. Review
86
+ reports only reachable gaps:
87
+
88
+ ```md
89
+ Finding: <severity> | path:line | <trigger> reaches <unhandled outcome> | <observable harm> |
90
+ <minimal handling>; missing proof: <test/signal>.
91
+ ```
92
+
93
+ Use the caller's severity scale. Do not create a separate edge score, pad rows with
94
+ irrelevant classes, or report a case already handled and proven.
@@ -0,0 +1,114 @@
1
+ # Elicitation: a move-set for the thinking phases
2
+
3
+ > Applies when: a thinking phase needs more than the default review shape for a section.
4
+
5
+ The thinking phases (`/rite-temper` on the spec, `/rite-vet` on the plan) default to one shape each.
6
+ A pre-mortem, a plan review. That's a floor, not a ceiling. When a section needs deeper thought,
7
+ this is the menu you reach into: named reasoning techniques, each with the shape it produces, so
8
+ "make this stronger" becomes a concrete move instead of a vibe.
9
+
10
+ ## How to use it (progressive: no ceremony by default)
11
+ 1. Look at the **one section** in front of you (a requirement, a risk, an estimate, a boundary).
12
+ 2. Read its **risk**, then pull the 3-5 techniques below whose *When to reach for it* matches.
13
+ 3. Present them as a short numbered menu; the human picks one (or `skip`).
14
+ 4. Run that technique on that section, apply the result, move on.
15
+ 5. **No-yield exit:** when the technique surfaces nothing that changes the section — no
16
+ new requirement, mitigation, estimate change, or blocking question — record
17
+ `elicitation: <technique> — no yield` in the phase artifact and stop offering menus
18
+ for that section. **Failing case:** repeated technique menus on a settled section are
19
+ ceremony, not diligence; a second menu without new section input is a process defect.
20
+
21
+ Selection is by the section's risk, not taste. Reach for the row that fits:
22
+
23
+ | The section is… | Reach for |
24
+ |---|---|
25
+ | an irreversible / boundary / auth / data-model decision | Red-Team vs Blue-Team · Assumption Audit · Pre-Mortem |
26
+ | a vague or contested requirement | Steelman-then-Attack · Devil's Advocate · Five Whys |
27
+ | an estimate, sizing, or a "how long / how risky" | Delphi · Reference-Class Forecast |
28
+ | a design with more than one plausible shape | Tournament (A vs B) · Inversion · Analogy Mapping |
29
+ | a plan or patch that may be solving the wrong problem | Backward Chain |
30
+ | a spec that feels *too* big or *too* small | Scope Extremes (MVP vs Gold-plate) · YAGNI Pass |
31
+ | a risk surface you suspect is under-explored | Chaos Scenarios · Edge-Case Hunt · Second-Order Effects |
32
+
33
+ ## The techniques
34
+
35
+ Each entry is **name (when to reach for it) the shape it produces** (`→` reads "then").
36
+
37
+ ### Sharpening a claim
38
+ - **Steelman-then-Attack:** a requirement or approach you're inclined to accept. Build the
39
+ *strongest* case for it → then attack that strongest form. Survives → keep; falls → revise.
40
+ - **Devil's Advocate:** consensus formed too fast. One voice argues the opposite in good faith →
41
+ surface the objection the room skipped.
42
+ - **Assumption Audit:** a plan resting on unstated beliefs. List every assumption the section
43
+ makes → mark each *load-bearing / verified / unverified* → the unverified load-bearing ones are
44
+ the work.
45
+ - **Five Whys:** a stated requirement whose *reason* is fuzzy. Ask "why" five times down from the
46
+ ask → reach the root need (often narrower or different than the surface ask).
47
+
48
+ ### Stress-testing a decision
49
+ - **Pre-Mortem:** before committing an irreversible choice. Assume it's six months later and this
50
+ failed → write the failure story → each cause becomes a mitigation or a blocking question. (This
51
+ is `/rite-temper`'s default; the others deepen it.)
52
+ - **Red-Team vs Blue-Team:** a security, trust-boundary, or adversarial-input surface.
53
+ `defense → attack → hardening`: state the defense, attack it as a hostile party, harden the gap.
54
+ - **Inversion:** "how do we make X good?" stalls. Ask instead "how would we *guarantee X fails*?"
55
+ → invert each failure into a requirement.
56
+ - **Second-Order Effects:** a change that touches shared surface. For each first-order effect ask
57
+ "and then what?" twice → surface the downstream consequence the diff hides.
58
+ - **Backward Chain:** a plan or patch that may be solving the wrong problem. Write the desired end
59
+ state as one checkable sentence → ask "what must be true immediately before it?" → recurse to the
60
+ current state → any planned step that does not land on the chain is wrong-direction work; name the
61
+ tempting one explicitly.
62
+
63
+ ### Sizing and estimating
64
+ - **Delphi:** an estimate one person is anchoring. Gather independent estimates *without* seeing
65
+ each other → reveal → discuss the spread → re-estimate → converge. Kills anchoring.
66
+ - **Reference-Class Forecast:** "this'll be quick." Find 3 past changes of the same *class* → use
67
+ their actual cost as the base rate, not the inside view.
68
+
69
+ ### Widening the option space
70
+ - **Tournament (A vs B):** two plausible designs. Put them head-to-head on the *decision hinge*
71
+ (the one axis that differs) → pick on that axis, not on a feature checklist.
72
+ - **Analogy Mapping:** a novel problem. "What is this *like* that's already solved?" → borrow the
73
+ solved structure, note where the analogy breaks.
74
+ - **Scope Extremes:** a spec of uncertain size. Describe the *MVP* (smallest thing that ships
75
+ value) and the *gold-plated* version → the right scope is usually named by the gap between them.
76
+ - **YAGNI Pass:** a plan carrying "might need it later." For each speculative piece, demand a
77
+ *current* acceptance criterion → no criterion, cut it to a follow-up.
78
+
79
+ ### Finding what's missing
80
+ - **Edge-Case Hunt:** a happy-path-shaped spec. Walk empty / boundary / invalid / concurrent /
81
+ huge-or-weird input for each element → each uncovered case is a missing criterion.
82
+ - **Chaos Scenarios:** a system with external dependencies. "What if the DB is down / the API
83
+ times out / the clock jumps / the input is hostile?" → each becomes a failure-mode requirement.
84
+ - **Completeness Critic:** end of a section. Ask only "what's *missing*: a modality not covered, a
85
+ claim not verified, a flow with no path?" → the answer is the next round of work.
86
+
87
+ ## The one rule
88
+ Run the technique on the **section in front of you**, not the whole document: a move applied to
89
+ everything is a move applied to nothing. Record what it changed in the phase artifact (a new
90
+ requirement, a mitigation, a blocking question), not just that you ran it.
91
+
92
+ ## Asking mechanics
93
+
94
+ - **Batch 2–4 independent questions;** ask serially when one answer determines the next
95
+ question or the question is an approval gate.
96
+ - **Never ask for the discoverable** — repo, docs, prior artifacts, and conversation
97
+ first; a question whose answer sits in a file is a stall dressed as diligence.
98
+ - **One decision per question** with enough context to answer without reopening files;
99
+ recommend a path and name its trade-off — never raw unevaluated options.
100
+ - **At an approval gate, state the defaults you chose** so a wrong assumption gets
101
+ corrected before it ships.
102
+ - **Never continue past a question by inventing the answer** — headless sessions report
103
+ the unresolved decision instead of assuming it.
104
+ - **A skipped, declined, or timed-out answer is `unanswered`, not approval.** A
105
+ proposal, silence, or timeout never becomes a decision. Continue only work the
106
+ open decision cannot affect; when the unanswered question blocks scope,
107
+ spending, publication, or anything irreversible, stop and name the specific
108
+ unresolved choice — do not reissue the same question as if nonresponse were an
109
+ error.
110
+ - **No question tool → numbered text fallback.** Two to four concrete options,
111
+ each with its trade-off, one marked as the recommendation, and a free-text
112
+ escape. A recommendation is labeled, never pre-selected.
113
+
114
+ A project can append its own house techniques to this file: same entry shape — **name (when to reach for it)** → the shape it produces.
@@ -0,0 +1,49 @@
1
+ # Error handling
2
+
3
+ > Applies when: code can fail; error paths, messages, retries, partial state.
4
+
5
+ Errors are part of the contract, not an afterthought. Make failure loud, local, and
6
+ recoverable.
7
+
8
+ ## Fail fast
9
+ - Validate preconditions at the top; stop the moment state is invalid, close to the root
10
+ cause. Don't let bad data propagate and surface as a confusing failure three layers
11
+ later.
12
+
13
+ ## No silent catches
14
+ - Never swallow an error to make a problem "go away", that hides bugs and corrupts
15
+ state silently.
16
+ - Catch the **narrowest** error you can handle, not a blanket catch-all. A
17
+ bare/broad catch masks unrelated failures.
18
+ - If you catch, either recover meaningfully, or rethrow/wrap with added context. Don't
19
+ log-and-continue past an error you didn't handle.
20
+
21
+ ## Classify the outcome before retrying
22
+
23
+ Never retry blind — match the outcome first:
24
+
25
+ - **Rejected** (refused: validation/authz/conflict): fix input; unchanged retry fails again.
26
+ - **Unknown** (timed out mid-call): check state at the source before any retry.
27
+ - **Partial** (half-committed): [`data-integrity.md`](data-integrity.md) (see `Writes, retries, and concurrency`) — reconcile or roll back, never resume blind.
28
+ - **Clean failure** (not started / fully rolled back): safe to retry after fixing the cause.
29
+
30
+ **Failing case:** an **Unknown** outcome retried unchanged double-applies (duplicate charge). Idempotency: [`data-integrity.md`](data-integrity.md); outcome taxonomies: [`integration-reliability.md`](integration-reliability.md). Not provable → `cannot_verify` and stop.
31
+
32
+ ## Meaningful messages
33
+ - Error messages state what failed, the relevant context (ids, inputs, not secrets),
34
+ and ideally how to recover. Cryptic messages cost hours.
35
+ - Distinguish *expected* failures (validation, not-found) from *unexpected* (bugs);
36
+ handle the first as flow, surface the second.
37
+ - Structured error surfaces carry one consistent envelope — **severity, stable code,
38
+ human message, fix** — so callers and logs can act programmatically; a bare string that
39
+ forces callers to parse prose is a contract gap.
40
+
41
+ ## Fail closed (security-relevant paths)
42
+ - On error in an auth/permission/transaction path, **deny and roll back**: never
43
+ default to granting access or committing partial state.
44
+
45
+ ## Logging
46
+ - Log key events (failures, access violations, validation errors) with enough context to
47
+ debug. Prefer structured logs (key/value or JSON).
48
+ - **Never log secrets, credentials, tokens, or personal data.** Show users a clear,
49
+ non-revealing message; keep the detail in the logs for the team.
@@ -0,0 +1,159 @@
1
+ # Gates — the machine-checked acceptance ledger
2
+
3
+ > Applies when: authoring or checking the machine-verified acceptance ledger (gates.md).
4
+
5
+ `gates.md` is the acceptance ledger: every required outcome becomes one
6
+ independently checkable gate, and the engine — not reviewer prose — decides
7
+ whether each gate ran and produced its declared signal. It is the structural
8
+ answer to partial compliance: a feature cannot report "done" while a required
9
+ outcome is unchecked, stale, or abandoned.
10
+
11
+ Written at Vet alongside `test-plan.md`, executed at Prove, required all-met at
12
+ Seal. Like every required artifact it is phase-bound: vet/build/converge and
13
+ every later phase requires its presence; proof phases require every gate met.
14
+
15
+ ## Grammar
16
+
17
+ ```markdown
18
+ - [ ] AC-001: <observable outcome>
19
+ CHECK: <exact command from test-plan.md Build-entry preflight>
20
+ EXPECT: <substring | /regex/flags>
21
+ CWD: <repository-relative path; omit for repo root>
22
+ INPUTS: <optional project-relative paths, directories or globs>
23
+ RUN: <optional writer; default root>
24
+ EVIDENCE: pending
25
+
26
+ - [x] AC-002: <human-judged outcome>
27
+ EVIDENCE: <human attestation, one line>
28
+
29
+ ABANDON: AC-003 <why the outcome can never be met>
30
+ ```
31
+
32
+ - One `- [ ]`/`- [x]` row per gate; `ID:` ends at the first colon, max 64 chars.
33
+ - `CHECK` and `EXPECT` are a pair: both present (runnable gate) or both absent
34
+ (manual gate). A partial pair is a parse error.
35
+ - Attributes are indented beneath their gate. Fenced code examples never parse.
36
+ - `EXPECT` is a substring, or `/pattern/flags` with `i`, `m`, `s` flags.
37
+ - `CWD` is repository-relative; absolute paths and `..` segments are rejected.
38
+ - `INPUTS` (optional) lists every file the gate's result depends on: sources,
39
+ tests, fixtures, build and lock files, and the gate's own scripts. Each pattern
40
+ must match a file. A gate whose verdict depends on state that no file
41
+ captures (network, wall clock, live host load) takes no `INPUTS`.
42
+ - `RUN: writer` (optional) lets the wright pre-run a runnable gate with `gates
43
+ precheck` before returning; that is never evidence and the root still runs the
44
+ gate. `gates lint` refuses it on a manual gate or with a value other than
45
+ writer/root.
46
+ - `ABANDON:` starts at column 1, names a known gate, and requires a reason.
47
+ An abandoned gate blocks completion and demands a handoff — it can never
48
+ read as a pass.
49
+ - An empty ledger (no gates) is malformed.
50
+ - A `scripts/` test driver (whole `test`/`tests` word) in a Writer allowlist
51
+ or a `present` touched-files.md row blocks readiness/seal unless a CHECK
52
+ runs it or `Driver waiver: <path> — DEC-### <reason>` cites a decisions.md heading.
53
+
54
+ ## Runnable gates and the approval boundary
55
+
56
+ A runnable gate executes only when its exact `(CHECK, CWD)` pair matches a row
57
+ of `test-plan.md`'s `## Build-entry preflight` table (`Command` + `Cwd`
58
+ columns). Approval is exact-text equality after whitespace/cwd normalization —
59
+ a differently spelled command or different directory is a different oracle and
60
+ needs its own vetted row. This is the DevRites approval boundary: the vetted
61
+ test plan is the sole list of commands the engine may run, so gates can never
62
+ execute unreviewed code. `check preconditions` runs those same rows, selected by
63
+ their optional `Run at` cell, writing the same transcripts.
64
+
65
+ Execution contract: the command runs through the platform shell in the named
66
+ directory with a bounded timeout; pass requires exit 0 **and** output matching
67
+ EXPECT. Without `--transcripts`, output is captured but never persisted, only its
68
+ digest. `--transcripts` writes one file per executed or reused gate under
69
+ `references/gates/<gate-id>/`. Each file holds the command, cwd, attempt, times,
70
+ exit, EXPECT verdict, the candidate digest read before and after the run, and the
71
+ output with known credential shapes masked and capped at 1 MiB. Its
72
+ `OUTPUT_SHA256` equals the ledger evidence digest.
73
+
74
+ After Vet READY the runnable set is fixed: converting a runnable gate to manual,
75
+ loosening EXPECT, changing CHECK or CWD, adding or narrowing INPUTS, or removing
76
+ a row is Plan repair plus re-Vet, never a Prove or Seal edit. A runnable gate that cannot execute stays unmet
77
+ with `unavailable: <reason>`. Prove attests only gates that were manual at Vet,
78
+ checked by diffing `gates.md` against the Vet record. **Failing case:** AC-003's
79
+ runnable gate fails at Prove, the root deletes CHECK/EXPECT and attests "verified
80
+ manually", and `gates status` reads `all-met`.
81
+
82
+ ## Evidence binding
83
+
84
+ A successful run writes `EVIDENCE: automatic-evidence=v1; def=<sha256>; …`
85
+ where `def` binds the exact CHECK/EXPECT/CWD (and INPUTS, when declared) the run
86
+ executed. Editing any of them renders prior evidence `stale-unmet` — a stale pass
87
+ cannot hide behind an edited oracle. A gate with `INPUTS` also records
88
+ `inputs=<sha256>` of those files' content. `gates run` and `gates reverify`
89
+ both reuse such a gate while the files are byte-identical, and re-execute it
90
+ when any of them changes. A gate without `INPUTS` keeps the plain rule:
91
+ `run` skips it once met, and `reverify` re-executes it. Prose evidence on a runnable gate is also stale:
92
+ only automatic evidence bound to the current definition counts.
93
+
94
+ Manual gates are met when checked with non-placeholder human evidence;
95
+ `gates attest` refuses a placeholder note, and one hand-written into the ledger
96
+ stays unmet. A note is a placeholder when every word is a placeholder word
97
+ (`n/a`, `tbd`, `ok`, `done`, `yes`, `pending`, …), the gate ID, or a title word;
98
+ a trailing `(…)` with no nested parentheses is ignored when text precedes it. Honesty of that evidence stays with the Prove/Seal
99
+ reviewers. The engine cannot see who attests, so the note must cite the human's
100
+ own words or source (a `q-…` id the human resolved, or their message in this
101
+ session) and name what was observed and where. An agent's own inspection, or a
102
+ question resolved by AFK or autocomplete auto-pick, is not human evidence: an AFK
103
+ run leaves the gate unmet behind an open `gate: validating` question and never
104
+ self-attests.
105
+
106
+ ## Commands
107
+
108
+ ```text
109
+ devrites-engine gates scaffold <slug> create gates.md from spec.md AC ids
110
+ devrites-engine gates status <slug> reduce without executing; all-met/handoff/not-met/malformed
111
+ devrites-engine gates run <slug> execute unmet runnable gates (and INPUTS gates whose files changed)
112
+ devrites-engine gates reverify <slug> re-execute every runnable gate except INPUTS gates with unchanged files
113
+ devrites-engine gates lint <slug> audit oracle quality without executing
114
+ devrites-engine gates attest <slug> <id> <note> record human evidence on a manual gate
115
+ devrites-engine gates abandon <slug> <id> <why> record a terminal ABANDON handoff
116
+ ```
117
+
118
+ Run/reverify hold the feature lock, re-read the ledger before writeback, and
119
+ discard a result whose gate definition moved mid-run. Reverify is the
120
+ suspicion-killer: when any doubt exists about prior passes, rerun it rather
121
+ than trusting recorded evidence.
122
+
123
+ ## Oracle quality (`gates lint`)
124
+
125
+ Lint audits signs an oracle cannot fail honestly — fixed-output CHECKs
126
+ (`echo done`), EXPECT values that also appear in failure output (`pass`,
127
+ `ok`, `0`), path-shaped regexes, activity titles instead of outcomes
128
+ ("Improve coverage"), unmeasured numbers in manual titles, unvetted CHECKs,
129
+ and mostly-manual ledgers. Warnings prompt sharpening; an unvetted CHECK is
130
+ an error because the runner can never execute it.
131
+
132
+ ## Authoring guidance
133
+
134
+ - One gate per observable outcome; gate ids should reuse canonical `AC-###`
135
+ ids so `check readiness` coverage and the ledger name the same set.
136
+ - Write oracles a stranger could judge: EXPECT a line only success can print,
137
+ never a word failure output also contains.
138
+ - Source `CHECK` text from the repository's own wiring:
139
+ `devrites-engine detect commands` resolves test/lint/vet/build commands from
140
+ the Makefile, `package.json` scripts, and language manifests without
141
+ executing them. Cite the resolved command verbatim in the preflight row;
142
+ an `unresolved` slot means Vet must name the concrete command, never guess.
143
+ - Prefer runnable gates; reserve manual gates for genuinely judgment-bound
144
+ outcomes and make the title's claim inspectable.
145
+ - Pick the strongest oracle the outcome admits: differential (output compared
146
+ against a recorded baseline or the pre-change behavior) over property
147
+ (an invariant the output must always satisfy) over example (one concrete
148
+ input/output case). An example-shaped oracle on a property-shaped outcome is
149
+ a weak gate — reviewers flag it even when it passes.
150
+ - One CHECK, one oracle: never chain another artifact's self-test before the
151
+ AC's oracle with `&&` — give the self-test its own gate, so a red self-test
152
+ never hides the AC's own result.
153
+ - When an outcome becomes impossible, `gates abandon` it and route the
154
+ handoff — never delete the row to make the ledger pass.
155
+ - The gate set is the coverage denominator: it never shrinks to reach
156
+ `all-met`. Two gates sharing one normalized CHECK+EXPECT+CWD are one oracle
157
+ counted twice — `gates lint` flags them as `duplicate-oracle`. Distinct
158
+ methods and denominator rules live in
159
+ [`verification-methods.md`](verification-methods.md).
@@ -0,0 +1,51 @@
1
+ # Git workflow
2
+
3
+ > Applies when: committing, branching, writing history.
4
+
5
+ History is documentation. Keep it clean, atomic, and readable.
6
+
7
+ ## Conventional Commits
8
+ Format: `type(scope): subject`
9
+ - **type**: `feat fix docs style refactor perf test build ci chore revert` (lower-case).
10
+ - **scope**: the area changed (lower-case).
11
+ - **subject**: imperative mood, no leading capital, no trailing period
12
+ ("add export endpoint", not "Added export endpoint.").
13
+ - Keep the header short (~50, hard cap ~72). Put the *why* in the body, wrapped, after a
14
+ blank line. Reference issues in the footer.
15
+
16
+ ## Atomic commits
17
+ - One logical change per commit; it should build and pass tests on its own.
18
+ - Don't mix refactor + behavior change in one commit: split them so each is reviewable
19
+ and revertible.
20
+
21
+ ## Small, focused branches/PRs
22
+ - One concern per branch. Short-lived; rebase/merge per the project's convention.
23
+ - Keep PRs small (see `code-review.md`) so they get a real review.
24
+
25
+ ## Change summary: prove the scope
26
+ When you hand back a change, state what you deliberately left alone as well as what you touched.
27
+ A **"Things I didn't touch (intentionally)"** line (the adjacent smells you noticed and declined
28
+ to fix) proves the diff is feature-scoped ([`core.md`](core.md) rule 7) and matches
29
+ `touched-files.md`, rather than an unsolicited renovation the reviewer has to untangle from the
30
+ real change. Noticed-but-not-fixed becomes an FYI follow-up, never a silent addition to this diff.
31
+
32
+ ## Merge conflict recovery
33
+ When git is mid-merge or mid-rebase, recover before other workflow work:
34
+
35
+ 1. Inspect state: `git status --short --branch`, then note whether this is a merge or rebase.
36
+ 2. For each conflicted file, identify **our intent** and **their intent** before editing.
37
+ 3. Resolve each hunk by preserving both intents when possible; if intents conflict, pick one and
38
+ record the trade-off in the commit/PR body.
39
+ 4. `git add` the resolved files, then run the smallest relevant checks.
40
+ 5. Finish with `git merge --continue` or `git rebase --continue`; abort only when the chosen
41
+ branch direction is wrong, not because a hunk is annoying.
42
+
43
+ ## Versioning & changelog
44
+ - Semver describes what consumers may rely on. Treat an observable breaking change as major.
45
+ - Derive the version from the tag; do not maintain competing manual copies.
46
+ - Curate changelog entries by user impact in the change that earns them; a changelog is not a git log.
47
+
48
+ ## Never commit
49
+ - Secrets, credentials, tokens, or `.env` files. If one lands in history, rotate it and
50
+ scrub it: deleting the file in a later commit is not enough.
51
+ - Generated artifacts, dependencies, or large binaries that belong in ignore rules.