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,203 @@
1
+ # Records, generations and freshness
2
+
3
+ ## Contents
4
+
5
+ - [Run area](#run-area)
6
+ - [Canonical records](#canonical-records)
7
+ - [Publishing a generation](#publishing-a-generation)
8
+ - [Finding lifecycle](#finding-lifecycle)
9
+ - [Enforced versus review-only](#enforced-versus-review-only)
10
+ - [Validator tool](#validator-tool)
11
+ - [Dispatch packet schema](#dispatch-packet-schema)
12
+
13
+ ## Run area
14
+
15
+ JSON is canonical for every machine decision; Markdown and HTML are projections
16
+ rendered from it. The coordinator is the only writer of canonical records.
17
+
18
+ ```text
19
+ <run>/ # <repo>/.devrites/overhaul/<run-id>/ from `records init`, mode 0700, git-ignored
20
+ CURRENT # name of the active generation, replaced last and atomically
21
+ g0007/ # one coherent generation of mutable records + manifest.json + views/
22
+ revisions/ # immutable plan-r<N>.json, rubric-r<N>.json, profile-<id>-r<N>.json, bench-<id>-r<N>.json
23
+ packets/ # dispatch packets, one per attempt
24
+ receipts/ proposals/ # immutable worker outputs, named <run>__<task>__<attempt>__<role>.json
25
+ evidence/ # sanitized logs, samples, traces, screenshots, red/green output
26
+ baseline/ # snapshot from `devrites-engine overhaul snapshot capture`
27
+ ```
28
+
29
+ Placement rules: [`scope-and-safety.md`](scope-and-safety.md#run-area-and-checkpoints).
30
+
31
+ ## Canonical records
32
+
33
+ | File (in a generation) | Role and key fields |
34
+ | --- | --- |
35
+ | `run.json` | `run_id`, `repo_root`, `mode` (`full`/`pr`/`branch`), `assessment_only`, `phase`, `readiness_verdict`, `execution_outcome`, `identities` (comparison, baseline, candidate), `capabilities` (tools + digests, concurrency, isolation, browser), `budget`, `revisions.plan`/`revisions.rubric` (`rev`, `file`), `degradation`, `questions[]`, `stop`, `task_outcomes` |
36
+ | `coverage.json` | `files[]`: `path`, `sha256`, `lines`, `component`, `lanes`, `eligible`, `exclusion.reason`, `binary`, `ranges[]` (`start`, `end`, `lanes`, `profiles`, `receipts{lane: [...]}`, `tools[]`, `state`); `applicability[]`: `domain`, `component`, `lane`, `state` (`applicable`/`not-applicable`/`blocked`), `reason`, `receipts[]` ([matrix](audit-domains.md#applicability-matrix)) |
37
+ | `stack-profiles.json` | `components[]` (B6 component record), `profiles[]` (`id`, `rev`, `file`, `sha256`, `status`), `dependencies[]` (dependency decisions) |
38
+ | `dispatch.json` | `attempts[]`: `task_id`, `attempt_id`, `wave`, `role`, `lane`, `profiles`, `snapshot`, `write_paths`, `authorized_by`, `status`, `dispatched_at`, `started_at`, `finished_at`, `receipt`, `changed_paths` |
39
+ | `contracts.json` | `contracts[]`: producer/consumer graph, schema/version, journeys, both-side evidence, open compatibility questions |
40
+ | `findings.json` | `findings[]` with the fields in [`orchestration.md`](orchestration.md#finding-proposals) (including `domain` and `controls`) plus `status`, `severity`, `verified_by`, `history[]` |
41
+ | `evidence.json` | `items[]`: `id`, `kind`, `path`, `sha256`, `command`, `exit`, `fingerprint`, `inputs`, `limitations`, `by`; benchmarks add `measurement` |
42
+ | `approval.json` | append-only `events[]` ([fields](lifecycle.md#the-approval-gate)) |
43
+ | `results-baseline.json`, `results-candidate.json`, `gates.json`, `scorecard*.json` | scoring inputs and calculator output ([`scoring.md`](scoring.md)) |
44
+ | `cycles.json` | append-only `cycles[]` ([`lifecycle.md`](lifecycle.md#cycle-records)) |
45
+ | `views/` | `review.*`, `report.*`, `plan.md`, each carrying the generation stamp. `publish` requires `report.{md,html}` once `execution_outcome` leaves `RUNNING`, and `review.{md,html}` plus (with a plan) `plan.md` while `phase` is `AWAITING_APPROVAL` |
46
+
47
+ `null` means "not applicable by design"; a missing value means "not recorded" —
48
+ never "passed". Worker receipts become canonical only after admission
49
+ ([`orchestration.md`](orchestration.md#receipts)). An unreadable or missing record
50
+ blocks the run; it never reads as zero findings.
51
+
52
+ ## Publishing a generation
53
+
54
+ Keep one staged generation open as the working generation of a phase and publish
55
+ it at the phase boundary, not after every shard: after preflight, after the audit
56
+ waves are admitted (coverage and findings), after verification and reconciliation,
57
+ at the approval gate, after each completed repair cycle, and at every stop. Record
58
+ dispatches and admissions in the working generation as they happen; `admit receipt`
59
+ checks attempts there when a staged generation based on `CURRENT` exists. Receipts,
60
+ proposals, packets, evidence and the staged generation are durable files, so a
61
+ resume loses no worker output: it continues an open stage based on `CURRENT`, or
62
+ re-admits the receipts into a new one. A writer attempt is still published as
63
+ `dispatched` before it launches, so an interruption always shows the live writer,
64
+ and every admission and settlement is recorded before the run leaves `RUNNING`
65
+ ([`orchestration.md`](orchestration.md#receipts)).
66
+
67
+ 1. `devrites-engine overhaul records stage <run>` copies the current generation to
68
+ `g<N+1>.tmp` (views and manifest excluded).
69
+ 2. Edit only the staged JSON. Write any new plan, rubric, profile or benchmark
70
+ revision as a new file under `revisions/`; never rewrite an existing one.
71
+ 3. Render views into the staged generation with `devrites-engine overhaul render`.
72
+ 4. `devrites-engine overhaul records publish <run>` validates the staged generation
73
+ against the previous one, writes `manifest.json` (SHA-256 of every generation file
74
+ and every revision), renames the directory, then replaces `CURRENT` last.
75
+ 5. Any reader runs `validate <run>` first. A mismatch between `CURRENT`, the manifest
76
+ and file bytes is a mixed generation: stop applying and republish.
77
+
78
+ A crash leaves an incomplete `g<N+1>.tmp` or a complete `g<N+1>` not yet current:
79
+ `validate` reports both, `stage` refuses until you inspect it, and the previous
80
+ generation stays intact. One atomic rename is not a transaction; readers verify
81
+ digests.
82
+ Give run files restrictive permissions, redact secrets before storing evidence, and
83
+ never store credentials, tokens or private keys.
84
+
85
+ ## Finding lifecycle
86
+
87
+ | From | Allowed next statuses |
88
+ | --- | --- |
89
+ | `candidate` | `needs-validation`, `confirmed`, `rejected` |
90
+ | `needs-validation` | `confirmed`, `rejected` |
91
+ | `confirmed` | `approved-for-fix`, `deferred`, `accepted-risk`, `rejected` (only after disproof) |
92
+ | `approved-for-fix` | `in-progress`, `deferred` |
93
+ | `in-progress` | `fixed-unverified`, `approved-for-fix` (attempt failed) |
94
+ | `fixed-unverified` | `verified`, `in-progress` (verification failed) |
95
+ | `verified` | `confirmed` (regressed or evidence invalidated) |
96
+ | `deferred`, `accepted-risk` | `approved-for-fix`, `confirmed` |
97
+ | `rejected` | `candidate` (new evidence) |
98
+
99
+ Each finding carries a `fingerprint`: its root-cause identity (component, symbol,
100
+ contract and failure class — never line numbers, agent, wave, severity or verdict),
101
+ unique across the record so one root cause keeps one record across cycles.
102
+ `needs-validation` names its missing fact in `blockers` and carries no severity.
103
+ Locations are repository-relative (`external: true` marks a label such as
104
+ `mobile-app:src/api.ts` for code outside the repository); a host path is rejected. A rejection
105
+ suppresses re-raising only while the cited files keep the hashes it was judged on.
106
+
107
+ Severity exists only once impact is established (`confirmed` onward). `rejected`
108
+ with reason `false_positive` requires disproving evidence. A user-declined confirmed
109
+ defect keeps `confirmed` impact and moves to `deferred` or `accepted-risk`; its
110
+ control still fails. `not reproducible yet`, `environment unavailable`,
111
+ `requirement disputed` and `proven unreachable under the approved scope` are distinct
112
+ recorded reasons, and none means safe. History is append-only: a finding never
113
+ disappears between generations.
114
+
115
+ ## Enforced versus review-only
116
+
117
+ `validate`/`publish` enforce: schema tags, enums and unique IDs and fingerprints;
118
+ evidence inside the run area with a matching `sha256`; finding history that starts at
119
+ `candidate`, legal transitions (a same-status entry needs a `reason`), severity only
120
+ from `confirmed` onward, a history entry for any severity or kind change, blockers
121
+ for needs-validation, evidence for decided findings, `verified_by` naming an admitted
122
+ verifier attempt, repository-relative locations (external ones are labels, never
123
+ host paths); `revisions.plan.file` equal to `revisions/plan-r<rev>.json`, required
124
+ once approvals or writers exist; plan digest pins; known, acyclic dependencies;
125
+ allowed paths that are exact files inside the repository (no `*` or `?`, no
126
+ directories, no `.git` component or run-area path in any letter case or through a
127
+ symlink, no symlink or traversal escape); a separate verifier role;
128
+ approval and `accept-degradation` events with quote and trusted channel, approvals
129
+ matching the plan digest, closure and current revision, none active after a later
130
+ stop; a scorecard only with `revisions.rubric` and the same verdict as `run.json`;
131
+ `READY_FOR_USER_REVIEW` only with a scorecard whose verdict is `MEETS_TARGETS`, and
132
+ `COMPLETED_WITH_APPROVED_DEGRADATION` only with `MEETS_TARGETS_WITH_APPROVED_DEGRADATION`,
133
+ each listing every audit gate (plus every repair gate outside assessment-only runs) as
134
+ `PASS` or `NOT_APPLICABLE` (`G-CONCURRENCY` may be `WAIVED_OPERATIONAL` for the degraded outcome);
135
+ no approval or writer in an assessment-only run; unchanged `run_id`, `repo_root`,
136
+ `mode` and `assessment_only`; writers authorized for their task; one live writer
137
+ per path (case-folded, symlink-resolved); every attempt `admitted`, `rejected` or
138
+ `cancelled` once the outcome leaves `RUNNING` (`timed-out` and `unknown` are not settled); one outcome per approved task at the end;
139
+ a coverage denominator that never shrinks; append-only cycles, findings history and
140
+ approval events; immutable revisions; view stamps; manifest integrity; stale stages
141
+ and interrupted publishes. Across records: every finding's `domain` is a score key;
142
+ once a rubric is frozen every confirmed finding names known `controls`, and none of
143
+ an open finding's controls is PASS in the current results; applicability cells use a
144
+ score key, a known state, a reason unless `applicable`, unique keys and receipts
145
+ inside the run; coverage ranges use the seven coverage states; a scorecard's
146
+ `G-NO-CRITICAL-HIGH` PASS needs no open critical or high finding,
147
+ `G-NO-OPEN-SERIOUS-LEAD` PASS no open lead with critical or high potential impact,
148
+ and `G-COVERAGE` PASS a non-empty matrix with no blocked cell, every applicable cell
149
+ closed by an admitted, non-gap receipt whose `domains_checked` lists its domain, and every range of
150
+ every eligible file reviewed or excluded.
151
+
152
+ Receipt admission and quote anchoring live in `devrites-engine overhaul admit`
153
+ ([`orchestration.md`](orchestration.md#admission-tool)).
154
+
155
+ Review-only (the coordinator and verifiers must judge): whether evidence is
156
+ sufficient, whether a finding is real, whether coverage receipts reflect genuine
157
+ semantic review, catalog adequacy, benchmark comparability, and whether a quote in
158
+ `approval.json` really came from the user. JSON Schema tooling may add structural
159
+ checks when installed; its absence is a recorded limitation, not a pass.
160
+
161
+ ## Validator tool
162
+
163
+ `devrites-engine overhaul records digest <file>` prints the SHA-256 of exact bytes; `stage <run>`,
164
+ `publish <run>` and `validate <run>` implement the generation protocol above. Exit
165
+ codes: 0 ok, 1 violations (each printed as `VIOLATION: …`), 2 usage or I/O error.
166
+
167
+ ## Dispatch packet schema
168
+
169
+ `devrites-engine overhaul packet write <run> <task> <attempt> <role> [--from <fields.json>]
170
+ [--phase P] [--wave W] [--lane L] [--snapshot S] [--authorized-by A] [--brief PATH]
171
+ [--write-path PATH]...` creates `<run>/packets/<run>__<task>__<attempt>__<role>.json`
172
+ (mode 0600; `packets/` is created with mode 0700 when absent) and prints its path. `<run>` is the run-area path;
173
+ `run_id` is its last component. `--from` supplies any further fields; flags override
174
+ it. Exit codes: 0 written, 1 invalid packet or the packet already exists (never
175
+ overwritten), 2 usage or I/O error, including an extra positional argument or a
176
+ run area or `packets/` directory that is a symlink.
177
+
178
+ | Field | Rule |
179
+ | --- | --- |
180
+ | `run_id`, `task_id`, `attempt_id`, `role` | required plain names: no path separators, `.`/`..` or `__`; the tool does not check that `role` is unprefixed (`implementer`, not `overhaul-implementer`), so callers keep it so |
181
+ | `phase`, `lane`, `snapshot`, `authorized_by`, `brief` | required non-empty strings |
182
+ | `receipt_path` | must resolve, in clean form (relative or absolute), to `<run>/receipts/<run>__<task>__<attempt>__<role>.json`; a value naming any other location is rejected; an absent, empty or non-string value is replaced by that default |
183
+ | `write_paths` | array of exact paths; empty for read-only roles |
184
+ | `plan` | optional object; when present it needs `file`; `rev` and `digest` are carried through unchecked |
185
+ | `wave` and anything else in `--from` | optional, not validated, carried through unchanged (task definition, read paths, budgets, stop conditions) |
186
+
187
+ The Go package `engine/internal/overhaul/packet` exports `Validate(run, packet)` and `Load(path)`
188
+ (which also checks that the file name matches the packet's identifiers) for tools
189
+ that read packets.
190
+
191
+ `devrites-engine overhaul admit packet <run> <packet.json>` admits a packet before its worker
192
+ starts. It runs `packet.Validate` with the explicit `<run>`, then requires that the file is a
193
+ plain (not symlinked) file named `<run_id>__<task_id>__<attempt_id>__<role>.json` directly in
194
+ `<run>/packets/`, that `run_id` equals the working generation's `run.json` `run_id`, and that a
195
+ `dispatch.json` attempt in the working generation has the same `task_id` and `attempt_id` and
196
+ agrees on `role`, on `snapshot` when the attempt records one, and on `receipt` and `packet`
197
+ (run-relative) when it records them. A relative `receipt_path` is resolved from the working directory,
198
+ exactly as `packet write` resolves it, so a bare file name or `receipts/<name>.json` is rejected
199
+ unless the working directory makes it name the run's receipt file; a packet carrying an absolute
200
+ `receipt_path` is admitted from any working directory. Output and exit codes match `admit receipt`: 0
201
+ `ADMISSIBLE`, 1 `REJECT` with the reasons, 2 usage or I/O error (including a missing or
202
+ unparsable packet), 3 `DUPLICATE_OR_LATE` when the attempt is already admitted, rejected or
203
+ cancelled.
@@ -0,0 +1,310 @@
1
+ # Repair and measurement
2
+
3
+ ## Contents
4
+
5
+ - [One approved repair slice](#one-approved-repair-slice)
6
+ - [Simplification repairs](#simplification-repairs)
7
+ - [Oracles by finding kind](#oracles-by-finding-kind)
8
+ - [Comments in repairs](#comments-in-repairs)
9
+ - [Oracles by lane](#oracles-by-lane)
10
+ - [Never do this to get green](#never-do-this-to-get-green)
11
+ - [False-green defenses](#false-green-defenses)
12
+ - [The assembled candidate](#the-assembled-candidate)
13
+ - [Performance measurement](#performance-measurement)
14
+ - [Measurement windows](#measurement-windows)
15
+ - [Benchmark tool](#benchmark-tool)
16
+
17
+ ## One approved repair slice
18
+
19
+ Only an `implementer` context writes, only inside one approved task's exact paths,
20
+ and only after the coordinator recorded the approval.
21
+
22
+ 1. Recheck the task's input file hashes, ownership, requirement, baseline failures
23
+ and approval; re-read the code to edit.
24
+ 2. Write the smallest meaningful failing regression test or other falsifiable oracle
25
+ for the confirmed defect and run it against the unfixed code. Classify the first
26
+ run: **good red** (fails at the named assertion for the expected reason — quote the
27
+ failing line), **broken test** (setup, import or compile error — not a valid red
28
+ for a logic defect), **false pass** (passes on the unfixed code — the oracle does
29
+ not reach the defect), or **not run** (not discovered, filtered or skipped). Only a
30
+ good red continues; a repair other than a defect fix gets its red from
31
+ [Oracles by finding kind](#oracles-by-finding-kind).
32
+ 3. Implement the smallest coherent fix. Keep supported contracts and UX unchanged
33
+ except for the exact approved change. No formatting sweep, no speculative
34
+ abstraction. Add comments only as [Comments in repairs](#comments-in-repairs)
35
+ allows.
36
+ 4. Run the same oracle to green, then the relevant unit, integration, contract,
37
+ end-to-end, static and security checks plus the impact cascade on dependents.
38
+ Capture commands, exit codes and output as evidence.
39
+ 5. Refactor only while the meaningful tests stay green. Update affected docs,
40
+ schemas, contracts, migrations and lockfiles inside the approved scope through the
41
+ project's canonical generators, never by hand-editing generated output.
42
+ 6. A fresh `verifier` context verifies the fix and its neighboring failure modes and
43
+ runs the new test against the old implementation in a disposable baseline copy
44
+ (apply the recorded baseline patches) to prove it still catches the original
45
+ defect.
46
+ 7. Remeasure approved performance targets; compare guardrails and side effects. If
47
+ the slice fails, revert only the agent-owned hunks (preserving user work), record
48
+ the failed attempt, and revise or re-approve material plan changes.
49
+
50
+ Workers never run git write commands (stage, commit, stash, checkout, reset) and
51
+ never leave unaccounted changes; the coordinator compares observed changed paths with
52
+ the contract before admitting a patch.
53
+
54
+ A pure refactor starts with characterization or contract tests and strengthens weak
55
+ oracles; never damage correct code just to see red. A simplification follows
56
+ [Simplification repairs](#simplification-repairs). Performance work starts with a
57
+ reproducible benchmark or query-budget oracle; ordinary unit tests do not assert
58
+ flaky wall-clock times — use controlled benchmarks plus deterministic query counts or
59
+ complexity bounds. When a bug cannot be reproduced safely, record the exact missing
60
+ fact, propose a safe alternative and obtain a documented exception where needed; a
61
+ waived verification stays a visible gap and may block readiness.
62
+
63
+ ## Simplification repairs
64
+
65
+ A confirmed [over-engineering](audit-domains.md#over-engineering-and-dead-weight)
66
+ finding — delete, inline, reuse, replace with standard library, platform or installed
67
+ dependency, remove a dependency, shrink — preserves behavior, so its oracle proves
68
+ preservation instead of a defect:
69
+
70
+ 1. **Population evidence**, rerun on the current fingerprint: the search that shows
71
+ the removed element is unused, single-implementation or never varied, with the
72
+ same scope rules as the finding.
73
+ 2. **Reach:** characterization or contract tests over the behavior that stays. Show
74
+ they reach it: a seeded mutant in the affected code turns them red on a disposable
75
+ baseline copy (this is the good red; quote it). Code with zero references has no
76
+ behavior to reach; the population evidence stands in for the red.
77
+ 3. **Green on the candidate:** the same tests, the full relevant suite, build,
78
+ typecheck and lint, with discovered and executed counts; for a dependency removal
79
+ also a clean install from the lockfile.
80
+ 4. **Result:** lines, files and dependencies removed, recorded as evidence. A
81
+ simplification that changes a public, persisted or wire contract is not a
82
+ simplification: it needs its own approved contract task.
83
+
84
+ ## Oracles by finding kind
85
+
86
+ Every approved task needs a check that fails before the repair and passes after
87
+ it. When correct code has no natural red, seed a known fault on a disposable
88
+ baseline copy and show the new artifact catches it; when neither exists, the
89
+ finding stays audit-only. A zero-mutant, zero-test or zero-link run is never a
90
+ pass.
91
+
92
+ | Repair | Red on the baseline | Green on the candidate |
93
+ | --- | --- | --- |
94
+ | Defect | Regression test fails at the named assertion | Same test passes |
95
+ | Missing or weak test | A seeded mutant (or reverted behavior) in the covered lines survives the old suite; name the mutation tool and version | The new test kills it; diff-scoped mutation score recorded |
96
+ | Simplification | [Simplification repairs](#simplification-repairs) | |
97
+ | Documentation | The documented command, example, generated reference or link check fails, or `git diff --exit-code` shows drift after regeneration | It runs, compiles or regenerates without a diff |
98
+ | Observability | A test with an in-memory log, metric or trace sink finds no record with the required keys (trace ID, stable semantic-convention names) | The record is present; deleting the new line turns it red again |
99
+ | CI, build, IaC or container config | The linter or policy tool reports the named rule ID (actionlint, zizmor, hadolint, Checkov, conftest) | That ID is gone and nothing new appears |
100
+ | Dependency | The advisory scanner reports the advisory against a pinned database snapshot | Same scanner and snapshot report nothing new; lockfile diff limited to the approved package and its required closure |
101
+ | Contract or public API | The compatibility or schema diff (oasdiff, buf breaking, cargo-semver-checks, gorelease, griffe, api-extractor) or a consumer contract test fails | Zero breaking findings, or the approved version bump |
102
+ | Operations | A fault test fails: a hanging dependency, SIGTERM during a request, a stopped database, a missing required setting | The call fails within its timeout, the request drains, readiness goes unready while liveness stays up, startup names the setting |
103
+ | Flaky test | At least one failure in N ≥ 10 shuffled runs of the unchanged code | Zero failures in the same N runs |
104
+ | Performance | [Benchmark tool](#benchmark-tool) verdict or a deterministic budget | |
105
+
106
+ ## Comments in repairs
107
+
108
+ Default to no new comments: names, types and the regression test carry the meaning.
109
+ Add one only when the code cannot show why it is written this way: an invariant, an
110
+ ordering, locking or security trap, a workaround for a named external bug (link it),
111
+ a measured performance trade-off, or a compatibility constraint. Doc comments on a
112
+ public API are the exception when the project's convention requires them (for
113
+ example Go exported identifiers); match the neighboring style.
114
+
115
+ Never write in target code:
116
+
117
+ - finding, task, run or plan IDs, or the word "overhaul": they belong in the receipt;
118
+ - comments that restate the code, or test comments that restate the test name or
119
+ label Arrange/Act/Assert;
120
+ - edit narration ("Fixed", "Added to handle", "Now correctly") or what the code did
121
+ before the change; history belongs in the commit, not the source;
122
+ - chat residue, guesses stated as fact, stacked hedges, or sales words ("robust",
123
+ "seamless", "comprehensive").
124
+
125
+ Put the constraint first, in literal words, in one sentence where possible. Keep a
126
+ hedge only when it names a real, specific uncertainty ("unverified on Windows").
127
+ Leave existing comments alone unless the change makes one false; then correct it.
128
+
129
+ ## Oracles by lane
130
+
131
+ - **Frontend:** reproduce the behavior — stale or out-of-order responses,
132
+ cancellation, state transitions, optimistic failure and rollback, focus loss, the
133
+ broken keyboard path — not "the component renders". A DOM-only unit test does not
134
+ prove real browser or native-engine behavior.
135
+ - **Backend:** the native service, data or concurrency oracle: deterministic
136
+ interleavings, transaction outcomes, idempotent replays, query counts.
137
+ - **Boundary:** producer and consumer evidence plus the integrated journey; a mock
138
+ client never proves server compatibility, and separately green sides with
139
+ incompatible mocks prove nothing about the real contract.
140
+ - **UI or contract-changing repairs:** compare against baseline journeys, the
141
+ relevant UI states and every compatible consumer; backend unit tests alone never
142
+ approve them.
143
+
144
+ ## Never do this to get green
145
+
146
+ Delete or skip failing tests; weaken assertions; update snapshots blindly; suppress
147
+ diagnostics; reduce workloads; loosen quality gates, retries, timeouts, tolerances or
148
+ statistical thresholds; mock away the failure; change expected outcomes to match the
149
+ patch. Quarantine an unrelated flaky test only with baseline evidence and explicit
150
+ user authorization. A justified correction to a test or harness needs independent
151
+ evidence that the old oracle was wrong, a versioned explanation, baseline and
152
+ candidate re-evaluation, and approval when the acceptance meaning changes.
153
+
154
+ ## False-green defenses
155
+
156
+ Record test discovery and selection as well as the exit status. None of these can
157
+ satisfy a required oracle:
158
+
159
+ - zero tests discovered or executed; an unintended filter, shard or "only changed"
160
+ mode that silences "no tests found";
161
+ - skipped, pending or expected-failure cases counted as passes; a runner summary that
162
+ counts flaky or skipped tests as success;
163
+ - cached output from different inputs, or reused output where fresh execution is
164
+ required;
165
+ - a subprocess failure swallowed by a wrapper, or a pipeline that masks the exit
166
+ status (`cmd | tail` without `pipefail`);
167
+ - a snapshot run that only created missing baselines; a replay command that exits 0
168
+ with nothing to replay;
169
+ - an unsupported platform or a test that matches implementation details without
170
+ exercising the contract.
171
+
172
+ Confirm that a seeded failing example actually reaches the assertion, and keep both
173
+ the observed failure and the candidate's observed pass. For flaky checks, record
174
+ every attempt, its environment and reset conditions, and the first-run outcome: a
175
+ pass only after retry is a flaky observation, not proof that the defect is gone.
176
+
177
+ ## The assembled candidate
178
+
179
+ Test the integrated candidate, never only each worker's isolated result. Before
180
+ combining patches, check they apply cleanly together (for example `git apply --check`
181
+ or `git merge-tree` on copies). When individually green patches fail together, bisect
182
+ the combination to find the interacting pair; fix the interaction under existing task
183
+ authority when covered, otherwise propose a plan amendment. Keep the last
184
+ independently verified candidate reference and a per-slice patch and evidence history
185
+ in the run area — never as commits in the user's repository. Roll back only
186
+ attributable changes whose ownership is verified; never jump back to an earlier high
187
+ score or erase a failed experiment. An edit after final verification invalidates the
188
+ affected final evidence.
189
+
190
+ ## Performance measurement
191
+
192
+ The goal is substantial wins on genuine bottlenecks — preferably at least 2×, ideally
193
+ 3× or more — never a promise for every path. First establish the baseline and the
194
+ bottleneck's share of the user-visible outcome. If profiling does not support the
195
+ requested gain, or it would break correctness or UX, or exceed the approved risk, show
196
+ the evidence and ask the user to approve an alternative target, a broader intervention
197
+ or no change; never lower the target quietly. A correctness or security fix needs no
198
+ speedup to be valuable, and a trivial absolute gain is never sold as transformational
199
+ through a flattering percentage.
200
+
201
+ A versioned benchmark contract (`revisions/bench-<id>-r<N>.json`) fixes, before any
202
+ comparison: baseline and candidate fingerprints; one harness revision for both; build
203
+ mode, flags and compiler/runtime/database versions; hardware, OS, resources,
204
+ background load, network, browser and device; datasets with cardinality, skew, seeds
205
+ and correctness checksums; scenario, concurrency and arrival model (open or closed),
206
+ warm/cold cache policy and reset procedure; primary metric and direction, percentiles
207
+ or throughput criterion, absolute user or SLO targets, the 2× minimum and 3× stretch
208
+ where justified, materiality threshold and regression tolerances; warmup, repetitions
209
+ and the statistical method; raw-sample location; error and timeout treatment; stop
210
+ conditions.
211
+
212
+ Run arms interleaved (ABAB or randomized blocks) on the same host, never all
213
+ baseline runs under one system state and all candidate runs under another. Warm JIT
214
+ runtimes fairly and measure cold start separately when it matters. Use production
215
+ builds for production-facing claims. Profile during benchmarking to confirm what is
216
+ measured. Include realistic service, database and network work; never drop failures
217
+ or slow requests to improve an average. Choose the load model on purpose, account for
218
+ coordinated omission and dropped work, and report offered versus completed load; a
219
+ result at lower load or a higher error rate is not an equivalent speedup.
220
+
221
+ ```text
222
+ lower is better: speedup = baseline / candidate reduction% = 100 × (baseline − candidate) / baseline
223
+ higher is better: gain = candidate / baseline increase% = 100 × (candidate − baseline) / baseline
224
+ ```
225
+
226
+ A 2× latency speedup is a 50% reduction, not 200%. Report absolute values and
227
+ uncertainty with every ratio. Zero or near-zero baselines, or values at the timer's
228
+ resolution, get no ratio. Never average unlike ratios into an "overall speedup"; a
229
+ workload-weighted aggregate needs predeclared weights. The resampling unit is one
230
+ independent invocation — never inner iterations. Use at least 10 invocations per
231
+ arm and more when the interval is wide. The benchmark tool below reports the ratio of
232
+ medians with a seeded 95% bootstrap interval: claim "at least k×" only when the
233
+ interval's lower bound is at least k; an interval spanning 1 or k is inconclusive
234
+ and is never rounded up. Confirm a selected win on fresh runs; do not try variants
235
+ until one lucky sample passes. An unmeasured change earns no credit, and an
236
+ optimization with no measurable benefit is reverted (agent-owned hunks only) and
237
+ logged so it is not retried.
238
+
239
+ For databases keep query counts, plans where safe, rows scanned and returned, buffer
240
+ and IO behavior, and write, storage and lock costs. For UI keep critical journeys,
241
+ render and interaction traces and metrics under matched fixtures and devices, and
242
+ label every number:
243
+
244
+ | Signal | Measures | Does not establish |
245
+ | --- | --- | --- |
246
+ | Field p75 (CrUX or first-party RUM) | Real users over a window, by route and device | Effect of an undeployed change; routes without data (unavailable ≠ pass) |
247
+ | Lab trace | One session under stated conditions; LCP parts, INP phases, long tasks | How common the problem is in the field |
248
+ | Lighthouse score | One synthetic navigation, version-weighted | User experience, INP, cross-version comparison |
249
+ | TBT | Lab main-thread blocking during load | Field INP or post-load responsiveness |
250
+ | CLS | Unexpected layout-shift clusters | Latency; the shift initiator |
251
+ | Bundle size | Bytes per route | Runtime cost unless runtime metrics move |
252
+ | Automated a11y scan | A subset of criteria (`incomplete` is not a pass) | Conformance, keyboard or screen-reader usability |
253
+ | Static inspection | A hypothesis | Any metric value |
254
+
255
+ Never deploy to obtain measurements. Keep frontend, backend and boundary benchmark
256
+ views tied to one workload graph: a 3× faster query is not a 3× faster page until the
257
+ page is measured; a faster server never excuses a slower client or a broken keyboard
258
+ journey; CLS never gets a latency ratio. Track guardrails for correctness, security,
259
+ stale-data behavior, memory, CPU, write latency, tail latency, errors, accessibility
260
+ and visual or interaction stability; surface any trade-off and get approval. Explain
261
+ a smaller end-to-end gain with the bottleneck analysis.
262
+
263
+ ## Measurement windows
264
+
265
+ Review agents may run concurrently; measurements may not share CPU, browser,
266
+ database, network or caches with other tests or agents. Record the isolation evidence
267
+ (what else was running, load average, governor). When isolation is unavailable,
268
+ disclose the contamination, mark the comparison inconclusive and rerun in a
269
+ controlled window; a contaminated ratio never passes a gate.
270
+
271
+ ## Benchmark tool
272
+
273
+ `devrites-engine overhaul bench <result.json>` prints the comparison. Input: `direction` (exactly
274
+ `lower_is_better` or `higher_is_better`; anything else is rejected, never guessed),
275
+ raw per-invocation `baseline` and `candidate` samples, the recorded run `order`, the
276
+ `target` ratio, `materiality`, optional `resolution`, `resamples` and `seed`.
277
+ Verdicts: `SUPPORTS_TARGET`, `IMPROVEMENT_BELOW_TARGET`, `IMPROVEMENT`,
278
+ `INCONCLUSIVE`, `REGRESSION`, `NO_RATIO`. Fewer than 10 samples per arm, arms not
279
+ recorded as interleaved, or a missing interval cap any improvement at
280
+ `INCONCLUSIVE`.
281
+
282
+ The ratio carries two 95% intervals: the seeded bootstrap of the median ratio
283
+ (`ci95`) and the distribution-free Hodges–Lehmann ratio bounds (`hodges_lehmann`),
284
+ exact from the Mann–Whitney distribution and needing no seed. A claim uses the
285
+ smaller lower bound; either upper bound below 1 is `REGRESSION`. A zero or negative
286
+ sample, or more than four million baseline × candidate pairs, leaves no
287
+ Hodges–Lehmann bounds and caps the verdict. Optional inputs:
288
+
289
+ - `quantile` (for example `0.99`) compares a tail. Give each invocation as its raw
290
+ request latencies (the tool takes their quantile) or as its own quantile with
291
+ `requests_per_invocation`, never both in one arm. Fewer than `10 / (1 − quantile)`
292
+ requests per invocation (1000 for p99) caps the verdict and any budget PASS. Never pool requests across invocations: the
293
+ invocation stays the resampling unit.
294
+ - `tolerance` (for example `0.05`) adds a `guardrail` for metrics that must not get
295
+ worse: `NON_INFERIOR` when the lower bound is at least `1 / (1 + tolerance)`,
296
+ `REGRESSION` when the upper bound is below it, otherwise `INCONCLUSIVE`. "Not
297
+ significant" is never "no regression".
298
+ - `budget` (`value`, `quantile` default `0.5`, `deterministic`) tests the candidate
299
+ against an absolute target with one-sided 95% order-statistic bounds: `PASS` only
300
+ when the bound clears the target, `FAIL` when the opposite bound misses it,
301
+ `INSUFFICIENT_DATA` when there are too few invocations for that quantile (p75 needs
302
+ 11, p95 59, p99 299). `deterministic: true` (bytes, query or request counts) needs
303
+ every invocation to agree, else `NONDETERMINISTIC`.
304
+ - `error_rates` (`baseline`, `candidate` per-invocation rates, absolute `tolerance`,
305
+ optional `requests` totals) guards failures: the candidate-minus-baseline interval
306
+ is the wider of an invocation bootstrap and the Newcombe score interval; `PASS`
307
+ only when its upper bound is within tolerance. Pair every latency claim under load
308
+ with it: fast failures flatter latency.
309
+ - `load` (`offered` and `completed` per arm) marks a run where either arm completed
310
+ under 98% of offered load as saturated and caps every verdict.
@@ -0,0 +1,139 @@
1
+ # Review page, report and terminal summary
2
+
3
+ ## Contents
4
+
5
+ - [Views are projections](#views-are-projections)
6
+ - [The review page](#the-review-page)
7
+ - [Decisions and the approval message](#decisions-and-the-approval-message)
8
+ - [The end-of-run report](#the-end-of-run-report)
9
+ - [Terminal summary](#terminal-summary)
10
+ - [Renderer tool](#renderer-tool)
11
+
12
+ ## Views are projections
13
+
14
+ `review.html`/`.md`, `report.html`/`.md` and `plan.md` (the task table and approval
15
+ message, written with a review) are rendered by the renderer tool
16
+ below from one generation's canonical JSON; never hand-write or hand-edit them. Each
17
+ carries the stamp `overhaul-stamp run=… generation=… plan=r<N>:<sha256>`, and the
18
+ validator rejects a view whose stamp does not match its generation, so a stale page
19
+ can never be applied. Human feedback on a view becomes a proposed change that the
20
+ coordinator reconciles into a new plan revision; views are then re-rendered — there
21
+ are never three competing versions of the plan.
22
+
23
+ ## The review page
24
+
25
+ The page opens as a local file and works offline: one self-contained document, no
26
+ scripts, no CDNs, no remote fonts or analytics, a hash-pinned stylesheet under a
27
+ restrictive Content-Security-Policy, system font stacks, explicit light and dark
28
+ backgrounds, visible `:focus-visible` outlines, semantic tables with captions and
29
+ column headers inside keyboard-focusable scroll regions, no horizontal page scroll at
30
+ phone width, text as well as color for every status, and a print-friendly layout.
31
+ Every repository-derived string — filenames, snippets, finding titles, comments, JSON
32
+ — is HTML-escaped before formatting and never interpolated as markup or script;
33
+ absolute home paths are redacted to `~`. Never publish the page or serve it beyond
34
+ loopback without a separate user decision.
35
+
36
+ Order: summary and decision first, then evidence. Sections, each with a stable
37
+ anchor, and rows anchored by their IDs (`#F-012`, `#T-003`, `#C-040`) so feedback can
38
+ cite them:
39
+
40
+ - scope, baseline, candidate and comparison identities, capabilities, known limits,
41
+ open questions;
42
+ - one section per lane — frontend, backend, boundary, other — with actual attempts,
43
+ profiles, timings and receipts (no duplicate independent plans);
44
+ - the coverage ledger and stack profiles; contracts and boundaries;
45
+ - confirmed findings (location, failing case, impact, evidence, uncertainty, proposed
46
+ action), then unvalidated leads without severity, then rejected candidates with
47
+ reasons; opportunities stay separate from defects;
48
+ - before-state measurements with benchmark conditions, proposed minimum and stretch
49
+ targets and regression guardrails;
50
+ - the repair plan: tasks with dependencies, exact allowed paths, oracles, migration
51
+ and rollback needs, expected benefits, costs and alternatives, and the continuation
52
+ envelope ([`lifecycle.md`](lifecycle.md#what-one-approval-permits));
53
+ - the rubric controls with lane membership and shared-control marking, the baseline
54
+ global, lane and domain scorecards, hard blockers and why readiness does or does
55
+ not qualify; frontend engineering evidence, interaction/accessibility proof and
56
+ optional aesthetic proposals visibly separate;
57
+ - approvals and decisions as recorded events, never as page state.
58
+
59
+ The renderer derives the report tables below from the records: lane coverage
60
+ (admitted reviewers with their windows, profiles, reviewed versus eligible ranges,
61
+ open ranges, lane score), findings and repairs (finding and task, severity, previous
62
+ failure, changed paths, oracle, verification, remaining risk), and the transparent
63
+ scorecard (baseline versus candidate per scope, applicable control weight, evidence
64
+ gaps, hard blockers). Columns it cannot fill from records render as "not recorded".
65
+
66
+ When a diagram clarifies architecture, trust boundaries, data flow or the task DAG,
67
+ add a textual equivalent (a dependency table or indented list); an image never
68
+ carries information the text lacks.
69
+
70
+ ## Decisions and the approval message
71
+
72
+ The user decides per item — approve, reject, defer, ask for explanation or change —
73
+ and approves one complete plan revision. The page never contains an "Approve" button:
74
+ nothing a page can do (a checkbox, localStorage, a form, an edited file, a local
75
+ server request) authenticates the user, and a script or any local process can forge
76
+ such signals. Instead the page shows a read-only, copyable message:
77
+
78
+ ```text
79
+ Approve overhaul <run-id> plan revision <N>, digest <sha256>, tasks T-001 T-002 T-005.
80
+ Keep all listed constraints and exclusions.
81
+ ```
82
+
83
+ The approval exists only when the user sends such a decision in the active trusted
84
+ conversation (or a genuinely authenticated host action), and the coordinator
85
+ re-hashes the plan revision and matches the digest before recording it
86
+ ([`lifecycle.md`](lifecycle.md#the-approval-gate)).
87
+
88
+ ## The end-of-run report
89
+
90
+ Produce `report.{md,html}` from the same generation for every ending —
91
+ interim, blocked, stopped, audit-only or final. Use real measurements only; a missing
92
+ value renders as "not recorded", never as a sample number. Zero findings is a valid
93
+ result; report counts always equal record counts.
94
+
95
+ State separately: mode, lifecycle phase, readiness verdict and execution outcome
96
+ (`AUDIT_COMPLETE`, `AUDIT_INCOMPLETE`, `AWAITING_APPROVAL`, `READY_FOR_USER_REVIEW`,
97
+ `COMPLETED_WITH_APPROVED_DEGRADATION`, `STOPPED_BY_USER`, or the exact blocked state).
98
+ `AUDIT_COMPLETE` never means the target passed. Include revisions, coverage and
99
+ exclusions, applicable stacks, authentic approvals and actual changes, the three
100
+ identities, environment limitations and remaining unknowns. Never write "every bug is
101
+ fixed", "cannot break" or "fully secure".
102
+
103
+ Required tables (column order fixed):
104
+
105
+ | Table | Columns |
106
+ | --- | --- |
107
+ | Lane, stack and boundary coverage | Lane/component · actual reviewer and overlap evidence · language/runtime/framework versions · active profile/rule revisions · reviewed vs eligible ranges · mandatory proof gaps · verdict/evidence |
108
+ | Findings and repairs | Finding/task · severity and evidence confidence · previous failure · change made · regression proof · independent result · remaining risk |
109
+ | Performance before/after (grouped frontend, backend, end-to-end) | Scenario and workload · metric/direction · before · after · absolute delta · relative change/speedup · uncertainty/repetitions · approved target · guardrails · verdict/evidence |
110
+ | Transparent scorecard | Global or lane/domain · weight · unique applicable control weight · baseline · candidate · evidence/profile gaps · hard blockers · evidence |
111
+ | Iteration history | Cycle · starting deficient lanes/controls · hypothesis or proof gap · approved tasks/agents · code changes vs evidence-only work · tests/benchmarks/independent outcome · global and affected lane/domain scores · gate changes/remaining gaps · next action or stop reason |
112
+ | Dependency decisions | Dependency · resolved before · resolved after/unchanged · keep/patch/upgrade/replace/remove · official evidence date · reason and alternatives · migration/compatibility proof · risk |
113
+
114
+ Show lanes separately — never one "full-stack checked" row — plus justified absent or
115
+ not-impacted lanes, inaccessible external components, embedded-language and
116
+ generated-source boundaries, actual scanner coverage and manual review gaps. Keep
117
+ candidate, rejected, deferred and accepted-risk counts apart from confirmed, fixed and
118
+ verified. Show full-precision global and lane results, domain floors, rubric and
119
+ profile revisions, shared-control accounting, N/A decisions, accepted risks and a
120
+ separate hard-gate verdict, and explain score deltas by control transitions (fix,
121
+ evidence-only, regression, invalidated evidence, rubric correction). Include original
122
+ versus revised performance targets with the user's recorded decision, checks run and
123
+ not run, failures proven pre-existing versus introduced, questions and decisions,
124
+ resource and cost totals (estimates labeled), rollback and deploy-order notes (without
125
+ deploying), the final changed-path summary, and remaining work.
126
+
127
+ ## Terminal summary
128
+
129
+ First line: outcome, verdict and the one next action. Then the full-precision global
130
+ and lane scores, open gates, counts, the report path and the approval message when
131
+ awaiting approval. Last line: the next action again. No praise, no preamble, no
132
+ estimates presented as measurements.
133
+
134
+ ## Renderer tool
135
+
136
+ `devrites-engine overhaul render <run> <staged-generation> review|report` writes the views into
137
+ `<staged-generation>/views/`, before `publish`. After publishing at a stop, open the
138
+ main view with `devrites-engine open-visual <run>/<generation>/views/<review|report>.html`,
139
+ using the published generation named in `CURRENT`, not the `.tmp` stage.