devrites 3.0.7 → 3.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 (484) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +82 -50
  3. package/SECURITY.md +31 -29
  4. package/docs/adr/0001-go-engine-as-control-plane.md +1 -1
  5. package/docs/adr/0002-dual-host-harness.md +1 -1
  6. package/docs/adr/0004-state-schema-phases-sections.md +1 -2
  7. package/docs/adr/0006-clock-seam-and-engine-ci-gates.md +3 -4
  8. package/docs/adr/0009-prebuild-decision-coverage-and-readiness.md +67 -0
  9. package/docs/adr/0010-agent-first-fresh-context-orchestration.md +71 -0
  10. package/docs/adr/0011-define-plan-transition-rights.md +28 -0
  11. package/docs/adr/0012-semantic-workspace-upgrades.md +77 -0
  12. package/docs/adr/README.md +4 -0
  13. package/docs/agents/triage-labels.md +7 -7
  14. package/docs/architecture.md +179 -141
  15. package/docs/cli.md +47 -12
  16. package/docs/command-map.md +61 -38
  17. package/docs/engine/agent-contract.md +92 -15
  18. package/docs/engine/commands.md +248 -72
  19. package/docs/engine/state-schema.md +52 -23
  20. package/docs/engine/workspace-schema.md +103 -15
  21. package/docs/extensions.md +1 -1
  22. package/docs/flow.md +86 -51
  23. package/docs/harness-compliance.md +29 -5
  24. package/docs/orchestration.md +107 -79
  25. package/docs/quick-reference.md +11 -3
  26. package/docs/release.md +4 -3
  27. package/docs/skills.md +67 -38
  28. package/docs/usage.md +84 -39
  29. package/engine/cmd/releasepack/main.go +219 -0
  30. package/engine/cmd/releasepack/main_test.go +170 -0
  31. package/engine/commands.go +170 -23
  32. package/engine/git_guard.go +187 -0
  33. package/engine/git_guard_test.go +283 -0
  34. package/engine/hookpolicy.go +53 -55
  35. package/engine/hookpolicy_test.go +91 -1
  36. package/engine/hooks.go +296 -75
  37. package/engine/hooks_events_test.go +276 -6
  38. package/engine/hooks_workspace.go +640 -159
  39. package/engine/internal/devritespaths/paths.go +65 -10
  40. package/engine/internal/devritespaths/paths_test.go +110 -0
  41. package/engine/internal/doctor/doctor.go +153 -23
  42. package/engine/internal/doctor/doctor_test.go +74 -0
  43. package/engine/internal/forge/forge.go +940 -0
  44. package/engine/internal/forge/forge_test.go +576 -0
  45. package/engine/internal/forge/git.go +245 -0
  46. package/engine/internal/forge/liveness_unix.go +48 -0
  47. package/engine/internal/forge/liveness_windows.go +67 -0
  48. package/engine/internal/forge/manifest.go +402 -0
  49. package/engine/internal/gate/gate.go +90 -71
  50. package/engine/internal/gate/gate_test.go +71 -2
  51. package/engine/internal/harness/compliance.go +18 -24
  52. package/engine/internal/harness/harness.go +37 -44
  53. package/engine/internal/harness/harness_test.go +21 -5
  54. package/engine/internal/install/install.go +486 -38
  55. package/engine/internal/install/install_test.go +383 -10
  56. package/engine/internal/iohooks/iohooks.go +350 -59
  57. package/engine/internal/iohooks/iohooks_test.go +421 -1
  58. package/engine/internal/lib/buildreadiness.go +43 -18
  59. package/engine/internal/lib/clarifyreturn.go +91 -0
  60. package/engine/internal/lib/clarifyreturn_test.go +123 -0
  61. package/engine/internal/lib/context.go +54 -15
  62. package/engine/internal/lib/cursor_compat_test.go +8 -0
  63. package/engine/internal/lib/extensions.go +2 -3
  64. package/engine/internal/lib/gitauthority.go +601 -0
  65. package/engine/internal/lib/gitauthority_test.go +346 -0
  66. package/engine/internal/lib/jsonout.go +25 -11
  67. package/engine/internal/lib/jsonout_test.go +16 -0
  68. package/engine/internal/lib/lanes.go +14 -8
  69. package/engine/internal/lib/observability_test.go +358 -0
  70. package/engine/internal/lib/packageexistence.go +151 -35
  71. package/engine/internal/lib/packageexistence_test.go +163 -0
  72. package/engine/internal/lib/progress.go +11 -9
  73. package/engine/internal/lib/provenance.go +462 -0
  74. package/engine/internal/lib/provenance_test.go +154 -0
  75. package/engine/internal/lib/readiness_contract.json +118 -0
  76. package/engine/internal/lib/readinessartifact.go +533 -0
  77. package/engine/internal/lib/readinessartifact_test.go +422 -0
  78. package/engine/internal/lib/reconcile.go +712 -88
  79. package/engine/internal/lib/reconcile_test.go +335 -16
  80. package/engine/internal/lib/recoveryattempts.go +298 -0
  81. package/engine/internal/lib/recoveryattempts_test.go +215 -0
  82. package/engine/internal/lib/resolve.go +23 -19
  83. package/engine/internal/lib/runbook_context_test.go +20 -0
  84. package/engine/internal/lib/session.go +701 -9
  85. package/engine/internal/lib/session_test.go +80 -13
  86. package/engine/internal/lib/testintegrity.go +33 -37
  87. package/engine/internal/lib/testintegrity_test.go +63 -1
  88. package/engine/internal/migrate/migrate.go +81 -1
  89. package/engine/internal/migrate/migrate_test.go +22 -1
  90. package/engine/internal/reason/reason.go +180 -0
  91. package/engine/internal/reason/reason_test.go +35 -0
  92. package/engine/internal/rootfacts/facts.go +466 -0
  93. package/engine/internal/rootfacts/facts_test.go +306 -0
  94. package/engine/internal/safepath/safepath.go +55 -0
  95. package/engine/internal/safepath/safepath_test.go +69 -0
  96. package/engine/internal/safepath/safepath_windows_test.go +26 -0
  97. package/engine/internal/state/clarify_transition.go +165 -0
  98. package/engine/internal/state/clarify_transition_test.go +130 -0
  99. package/engine/internal/state/cmd/workflowmanifest/main.go +12 -8
  100. package/engine/internal/state/cursor.go +58 -0
  101. package/engine/internal/state/cursor_test.go +42 -1
  102. package/engine/internal/state/feature.go +35 -48
  103. package/engine/internal/state/schema.go +90 -37
  104. package/engine/internal/state/snapshot.go +18 -2
  105. package/engine/internal/state/state_test.go +187 -7
  106. package/engine/internal/state/status.go +48 -11
  107. package/engine/internal/state/workflow_manifest.json +231 -50
  108. package/engine/internal/toolpolicy/classifier.go +533 -0
  109. package/engine/internal/toolpolicy/classifier_test.go +424 -0
  110. package/engine/internal/toolpolicy/git.go +616 -0
  111. package/engine/internal/toolpolicy/scanner.go +382 -0
  112. package/engine/main.go +160 -77
  113. package/engine/observability_cli_test.go +52 -0
  114. package/engine/root_routing_test.go +277 -0
  115. package/engine/testdata/golden/TestParityBuildReadiness/arg=approved.golden +1 -1
  116. package/engine/testdata/golden/TestParityBuildReadiness/arg=emptystatus.golden +1 -1
  117. package/engine/testdata/golden/TestParityBuildReadiness/arg=legacycontract.golden +1 -0
  118. package/engine/testdata/golden/TestParityBuildReadiness/arg=noclarify.golden +1 -0
  119. package/engine/testdata/golden/TestParityBuildReadiness/arg=novet.golden +1 -0
  120. package/engine/testdata/golden/TestParityBuildReadiness/arg=stalevet.golden +1 -0
  121. package/engine/testdata/golden/TestParityBuildReadiness/arg=trailhash.golden +1 -1
  122. package/engine/testdata/golden/TestParityBuildReadiness/arg=trailpipe.golden +1 -1
  123. package/engine/testdata/golden/TestParityBuildReadiness/arg=vetnotready.golden +1 -0
  124. package/engine/testdata/golden/TestParityProgress/arg=allbuilt.golden +1 -1
  125. package/engine/testdata/golden/TestParityProgress/arg=done.golden +1 -1
  126. package/engine/testdata/golden/TestParityProgress/arg=mid.golden +1 -1
  127. package/engine/testdata/golden/TestParityProgress/arg=nophase.golden +1 -1
  128. package/engine/testdata/golden/TestParityProgress/arg=noslice.golden +1 -1
  129. package/engine/testdata/golden/TestParityProgress/arg=plan.golden +1 -1
  130. package/engine/testdata/golden/TestParityProgress/arg=seal.golden +1 -1
  131. package/engine/testdata/golden/TestParityReconcile/check-clean.golden +1 -1
  132. package/engine/testdata/golden/TestParityReconcile/inline-fallback.golden +1 -0
  133. package/engine/testdata/golden/TestParityReconcile/snapshot-no-allowlist.golden +1 -0
  134. package/engine/testdata/golden/TestParityWrightScope/devrites-edit-denied.golden +2 -0
  135. package/engine/testdata/golden/TestParityWrightScope/out-of-scope-enforce-denies.golden +1 -1
  136. package/engine/tests/adr_0011_define_plan_test.go +30 -0
  137. package/engine/tests/budget_test.go +19 -8
  138. package/engine/tests/concurrency_cli_test.go +7 -1
  139. package/engine/tests/doctor_cli_test.go +148 -2
  140. package/engine/tests/forge_cli_test.go +463 -0
  141. package/engine/tests/gate_test.go +63 -8
  142. package/engine/tests/hook_test.go +260 -8
  143. package/engine/tests/hooks_io_test.go +94 -3
  144. package/engine/tests/json_contract_test.go +127 -2
  145. package/engine/tests/migrate_cli_test.go +2 -2
  146. package/engine/tests/parity_buildreadiness_test.go +167 -10
  147. package/engine/tests/parity_learnings_test.go +16 -17
  148. package/engine/tests/parity_reconcile_test.go +20 -17
  149. package/engine/tests/parity_resolve_test.go +12 -11
  150. package/engine/tests/parity_test.go +21 -17
  151. package/pack/.claude/agents/devrites-code-reviewer.md +62 -48
  152. package/pack/.claude/agents/devrites-devex-reviewer.md +69 -53
  153. package/pack/.claude/agents/devrites-doubt-reviewer.md +29 -22
  154. package/pack/.claude/agents/devrites-evidence-scout.md +69 -0
  155. package/pack/.claude/agents/devrites-forge-judge.md +74 -61
  156. package/pack/.claude/agents/devrites-frontend-reviewer.md +48 -39
  157. package/pack/.claude/agents/devrites-performance-reviewer.md +49 -40
  158. package/pack/.claude/agents/devrites-plan-drafter.md +73 -0
  159. package/pack/.claude/agents/devrites-plan-reviewer.md +80 -47
  160. package/pack/.claude/agents/devrites-proof-runner.md +74 -0
  161. package/pack/.claude/agents/devrites-retrospector.md +48 -45
  162. package/pack/.claude/agents/devrites-security-auditor.md +46 -36
  163. package/pack/.claude/agents/devrites-simplifier-reviewer.md +50 -46
  164. package/pack/.claude/agents/devrites-slice-wright.md +153 -165
  165. package/pack/.claude/agents/devrites-spec-reviewer.md +34 -32
  166. package/pack/.claude/agents/devrites-strategy-reviewer.md +63 -34
  167. package/pack/.claude/agents/devrites-test-analyst.md +40 -30
  168. package/pack/.claude/agents/devrites-upgrade-planner.md +100 -0
  169. package/pack/.claude/settings.json +2 -1
  170. package/pack/.claude/skills/devrites-audit/SKILL.md +40 -61
  171. package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +24 -13
  172. package/pack/.claude/skills/devrites-debug-recovery/reference/build-the-loop.md +24 -21
  173. package/pack/.claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +34 -6
  174. package/pack/.claude/skills/devrites-debug-recovery/reference/instrumentation.md +2 -2
  175. package/pack/.claude/skills/devrites-doubt/SKILL.md +25 -17
  176. package/pack/.claude/skills/devrites-interview/SKILL.md +53 -52
  177. package/pack/.claude/skills/devrites-lib/SKILL.md +12 -9
  178. package/pack/.claude/skills/devrites-lib/reference/intent-map.md +4 -2
  179. package/pack/.claude/skills/devrites-lib/reference/parallel-dispatch.md +82 -137
  180. package/pack/.claude/skills/devrites-lib/reference/reply-contract.md +8 -1
  181. package/pack/.claude/skills/devrites-lib/reference/standards/README.md +38 -55
  182. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +53 -27
  183. package/pack/.claude/skills/devrites-lib/reference/standards/agents.md +200 -190
  184. package/pack/.claude/skills/devrites-lib/reference/standards/anti-patterns.md +5 -15
  185. package/pack/.claude/skills/devrites-lib/reference/standards/ci-cd.md +27 -58
  186. package/pack/.claude/skills/devrites-lib/reference/standards/code-review.md +16 -52
  187. package/pack/.claude/skills/devrites-lib/reference/standards/coding-style.md +2 -10
  188. package/pack/.claude/skills/devrites-lib/reference/standards/context-hygiene.md +18 -61
  189. package/pack/.claude/skills/devrites-lib/reference/standards/core.md +23 -18
  190. package/pack/.claude/skills/devrites-lib/reference/standards/deprecation.md +17 -57
  191. package/pack/.claude/skills/devrites-lib/reference/standards/development-workflow.md +4 -33
  192. package/pack/.claude/skills/devrites-lib/reference/standards/git-workflow.md +4 -20
  193. package/pack/.claude/skills/devrites-lib/reference/standards/hooks.md +3 -14
  194. package/pack/.claude/skills/devrites-lib/reference/standards/patterns.md +9 -25
  195. package/pack/.claude/skills/devrites-lib/reference/standards/performance.md +0 -9
  196. package/pack/.claude/skills/devrites-lib/reference/standards/principles.md +1 -3
  197. package/pack/.claude/skills/devrites-lib/reference/standards/security.md +17 -7
  198. package/pack/.claude/skills/devrites-lib/reference/standards/testing.md +1 -27
  199. package/pack/.claude/skills/devrites-lib/reference/standards/tooling.md +46 -50
  200. package/pack/.claude/skills/devrites-lib/reference/workspace-artifact-schema.md +40 -10
  201. package/pack/.claude/skills/devrites-source-driven/SKILL.md +23 -22
  202. package/pack/.claude/skills/rite/SKILL.md +10 -6
  203. package/pack/.claude/skills/rite/reference/menu.md +13 -7
  204. package/pack/.claude/skills/rite-adopt/SKILL.md +33 -37
  205. package/pack/.claude/skills/rite-autocomplete/SKILL.md +33 -28
  206. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +21 -21
  207. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +15 -6
  208. package/pack/.claude/skills/rite-build/SKILL.md +35 -30
  209. package/pack/.claude/skills/rite-build/reference/afk-discipline.md +41 -39
  210. package/pack/.claude/skills/rite-build/reference/evidence-standard.md +10 -0
  211. package/pack/.claude/skills/rite-build/reference/forge.md +186 -156
  212. package/pack/.claude/skills/rite-build/reference/one-slice-cycle.md +4 -3
  213. package/pack/.claude/skills/rite-build/reference/phase-contract.md +96 -175
  214. package/pack/.claude/skills/rite-build/reference/spec-drift-guard.md +10 -4
  215. package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +129 -134
  216. package/pack/.claude/skills/rite-clarify/SKILL.md +90 -0
  217. package/pack/.claude/skills/rite-clarify/reference/decision-coverage.md +61 -0
  218. package/pack/.claude/skills/rite-converge/SKILL.md +35 -25
  219. package/pack/.claude/skills/rite-define/SKILL.md +58 -32
  220. package/pack/.claude/skills/rite-define/reference/gates.md +16 -15
  221. package/pack/.claude/skills/rite-define/reference/plan-template.md +18 -8
  222. package/pack/.claude/skills/rite-frame/reference/failure-modes.md +22 -24
  223. package/pack/.claude/skills/rite-plan/SKILL.md +47 -16
  224. package/pack/.claude/skills/rite-plan/reference/task-breakdown.md +4 -0
  225. package/pack/.claude/skills/rite-polish/SKILL.md +27 -23
  226. package/pack/.claude/skills/rite-prototype/SKILL.md +25 -26
  227. package/pack/.claude/skills/rite-prove/SKILL.md +27 -17
  228. package/pack/.claude/skills/rite-resolve/SKILL.md +12 -11
  229. package/pack/.claude/skills/rite-resolve/reference/answer-protocol.md +3 -0
  230. package/pack/.claude/skills/rite-review/SKILL.md +37 -28
  231. package/pack/.claude/skills/rite-seal/reference/phase-contract.md +27 -92
  232. package/pack/.claude/skills/rite-seal/reference/risk-and-rollback.md +13 -0
  233. package/pack/.claude/skills/rite-ship/reference/design-memory.md +31 -36
  234. package/pack/.claude/skills/rite-spec/SKILL.md +84 -135
  235. package/pack/.claude/skills/rite-spec/reference/investigation.md +37 -33
  236. package/pack/.claude/skills/rite-spec/reference/question-protocol.md +6 -2
  237. package/pack/.claude/skills/rite-spec/reference/spec-checklists.md +25 -24
  238. package/pack/.claude/skills/rite-spec/reference/spec-template.md +9 -2
  239. package/pack/.claude/skills/rite-spec/reference/state-workspace.md +13 -3
  240. package/pack/.claude/skills/rite-temper/SKILL.md +62 -47
  241. package/pack/.claude/skills/rite-temper/reference/review-dimensions.md +24 -22
  242. package/pack/.claude/skills/rite-upgrade/SKILL.md +125 -0
  243. package/pack/.claude/skills/rite-vet/SKILL.md +114 -113
  244. package/pack/.claude/skills/rite-vet/reference/artifacts.md +50 -9
  245. package/pack/.claude/skills/rite-vet/reference/review-axes.md +39 -37
  246. package/pack/generated/claude/agents/devrites-code-reviewer.md +62 -48
  247. package/pack/generated/claude/agents/devrites-devex-reviewer.md +69 -53
  248. package/pack/generated/claude/agents/devrites-doubt-reviewer.md +29 -22
  249. package/pack/generated/claude/agents/devrites-evidence-scout.md +69 -0
  250. package/pack/generated/claude/agents/devrites-forge-judge.md +74 -61
  251. package/pack/generated/claude/agents/devrites-frontend-reviewer.md +48 -39
  252. package/pack/generated/claude/agents/devrites-performance-reviewer.md +49 -40
  253. package/pack/generated/claude/agents/devrites-plan-drafter.md +73 -0
  254. package/pack/generated/claude/agents/devrites-plan-reviewer.md +80 -47
  255. package/pack/generated/claude/agents/devrites-proof-runner.md +74 -0
  256. package/pack/generated/claude/agents/devrites-retrospector.md +48 -45
  257. package/pack/generated/claude/agents/devrites-security-auditor.md +46 -36
  258. package/pack/generated/claude/agents/devrites-simplifier-reviewer.md +50 -46
  259. package/pack/generated/claude/agents/devrites-slice-wright.md +153 -165
  260. package/pack/generated/claude/agents/devrites-spec-reviewer.md +34 -32
  261. package/pack/generated/claude/agents/devrites-strategy-reviewer.md +63 -34
  262. package/pack/generated/claude/agents/devrites-test-analyst.md +40 -30
  263. package/pack/generated/claude/agents/devrites-upgrade-planner.md +100 -0
  264. package/pack/generated/claude/settings.json +2 -1
  265. package/pack/generated/claude/skills/devrites-audit/SKILL.md +40 -61
  266. package/pack/generated/claude/skills/devrites-debug-recovery/SKILL.md +24 -13
  267. package/pack/generated/claude/skills/devrites-debug-recovery/reference/build-the-loop.md +24 -21
  268. package/pack/generated/claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +34 -6
  269. package/pack/generated/claude/skills/devrites-debug-recovery/reference/instrumentation.md +2 -2
  270. package/pack/generated/claude/skills/devrites-doubt/SKILL.md +25 -17
  271. package/pack/generated/claude/skills/devrites-interview/SKILL.md +53 -52
  272. package/pack/generated/claude/skills/devrites-lib/SKILL.md +12 -9
  273. package/pack/generated/claude/skills/devrites-lib/reference/intent-map.md +4 -2
  274. package/pack/generated/claude/skills/devrites-lib/reference/parallel-dispatch.md +82 -137
  275. package/pack/generated/claude/skills/devrites-lib/reference/reply-contract.md +8 -1
  276. package/pack/generated/claude/skills/devrites-lib/reference/standards/README.md +38 -55
  277. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +53 -27
  278. package/pack/generated/claude/skills/devrites-lib/reference/standards/agents.md +200 -190
  279. package/pack/generated/claude/skills/devrites-lib/reference/standards/anti-patterns.md +5 -15
  280. package/pack/generated/claude/skills/devrites-lib/reference/standards/ci-cd.md +27 -58
  281. package/pack/generated/claude/skills/devrites-lib/reference/standards/code-review.md +16 -52
  282. package/pack/generated/claude/skills/devrites-lib/reference/standards/coding-style.md +2 -10
  283. package/pack/generated/claude/skills/devrites-lib/reference/standards/context-hygiene.md +18 -61
  284. package/pack/generated/claude/skills/devrites-lib/reference/standards/core.md +23 -18
  285. package/pack/generated/claude/skills/devrites-lib/reference/standards/deprecation.md +17 -57
  286. package/pack/generated/claude/skills/devrites-lib/reference/standards/development-workflow.md +4 -33
  287. package/pack/generated/claude/skills/devrites-lib/reference/standards/git-workflow.md +4 -20
  288. package/pack/generated/claude/skills/devrites-lib/reference/standards/hooks.md +3 -14
  289. package/pack/generated/claude/skills/devrites-lib/reference/standards/patterns.md +9 -25
  290. package/pack/generated/claude/skills/devrites-lib/reference/standards/performance.md +0 -9
  291. package/pack/generated/claude/skills/devrites-lib/reference/standards/principles.md +1 -3
  292. package/pack/generated/claude/skills/devrites-lib/reference/standards/security.md +17 -7
  293. package/pack/generated/claude/skills/devrites-lib/reference/standards/testing.md +1 -27
  294. package/pack/generated/claude/skills/devrites-lib/reference/standards/tooling.md +46 -50
  295. package/pack/generated/claude/skills/devrites-lib/reference/workspace-artifact-schema.md +40 -10
  296. package/pack/generated/claude/skills/devrites-source-driven/SKILL.md +23 -22
  297. package/pack/generated/claude/skills/rite/SKILL.md +10 -6
  298. package/pack/generated/claude/skills/rite/reference/menu.md +13 -7
  299. package/pack/generated/claude/skills/rite-adopt/SKILL.md +33 -37
  300. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +33 -28
  301. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +21 -21
  302. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +15 -6
  303. package/pack/generated/claude/skills/rite-build/SKILL.md +35 -30
  304. package/pack/generated/claude/skills/rite-build/reference/afk-discipline.md +41 -39
  305. package/pack/generated/claude/skills/rite-build/reference/evidence-standard.md +10 -0
  306. package/pack/generated/claude/skills/rite-build/reference/forge.md +186 -156
  307. package/pack/generated/claude/skills/rite-build/reference/one-slice-cycle.md +4 -3
  308. package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +96 -175
  309. package/pack/generated/claude/skills/rite-build/reference/spec-drift-guard.md +10 -4
  310. package/pack/generated/claude/skills/rite-build/reference/wright-dispatch.md +129 -134
  311. package/pack/generated/claude/skills/rite-clarify/SKILL.md +90 -0
  312. package/pack/generated/claude/skills/rite-clarify/reference/decision-coverage.md +61 -0
  313. package/pack/generated/claude/skills/rite-converge/SKILL.md +35 -25
  314. package/pack/generated/claude/skills/rite-define/SKILL.md +58 -32
  315. package/pack/generated/claude/skills/rite-define/reference/gates.md +16 -15
  316. package/pack/generated/claude/skills/rite-define/reference/plan-template.md +18 -8
  317. package/pack/generated/claude/skills/rite-frame/reference/failure-modes.md +22 -24
  318. package/pack/generated/claude/skills/rite-plan/SKILL.md +47 -16
  319. package/pack/generated/claude/skills/rite-plan/reference/task-breakdown.md +4 -0
  320. package/pack/generated/claude/skills/rite-polish/SKILL.md +27 -23
  321. package/pack/generated/claude/skills/rite-prototype/SKILL.md +25 -26
  322. package/pack/generated/claude/skills/rite-prove/SKILL.md +27 -17
  323. package/pack/generated/claude/skills/rite-resolve/SKILL.md +12 -11
  324. package/pack/generated/claude/skills/rite-resolve/reference/answer-protocol.md +3 -0
  325. package/pack/generated/claude/skills/rite-review/SKILL.md +37 -28
  326. package/pack/generated/claude/skills/rite-seal/reference/phase-contract.md +27 -92
  327. package/pack/generated/claude/skills/rite-seal/reference/risk-and-rollback.md +13 -0
  328. package/pack/generated/claude/skills/rite-ship/reference/design-memory.md +31 -36
  329. package/pack/generated/claude/skills/rite-spec/SKILL.md +84 -135
  330. package/pack/generated/claude/skills/rite-spec/reference/investigation.md +37 -33
  331. package/pack/generated/claude/skills/rite-spec/reference/question-protocol.md +6 -2
  332. package/pack/generated/claude/skills/rite-spec/reference/spec-checklists.md +25 -24
  333. package/pack/generated/claude/skills/rite-spec/reference/spec-template.md +9 -2
  334. package/pack/generated/claude/skills/rite-spec/reference/state-workspace.md +13 -3
  335. package/pack/generated/claude/skills/rite-temper/SKILL.md +62 -47
  336. package/pack/generated/claude/skills/rite-temper/reference/review-dimensions.md +24 -22
  337. package/pack/generated/claude/skills/rite-upgrade/SKILL.md +125 -0
  338. package/pack/generated/claude/skills/rite-vet/SKILL.md +114 -113
  339. package/pack/generated/claude/skills/rite-vet/reference/artifacts.md +50 -9
  340. package/pack/generated/claude/skills/rite-vet/reference/review-axes.md +39 -37
  341. package/pack/generated/codex/AGENTS.md +5 -2
  342. package/pack/generated/codex/agents/devrites-code-reviewer.toml +69 -47
  343. package/pack/generated/codex/agents/devrites-devex-reviewer.toml +75 -51
  344. package/pack/generated/codex/agents/devrites-doubt-reviewer.toml +35 -20
  345. package/pack/generated/codex/agents/devrites-evidence-scout.toml +75 -0
  346. package/pack/generated/codex/agents/devrites-forge-judge.toml +80 -59
  347. package/pack/generated/codex/agents/devrites-frontend-reviewer.toml +54 -37
  348. package/pack/generated/codex/agents/devrites-performance-reviewer.toml +55 -38
  349. package/pack/generated/codex/agents/devrites-plan-drafter.toml +79 -0
  350. package/pack/generated/codex/agents/devrites-plan-reviewer.toml +82 -47
  351. package/pack/generated/codex/agents/devrites-proof-runner.toml +80 -0
  352. package/pack/generated/codex/agents/devrites-retrospector.toml +54 -43
  353. package/pack/generated/codex/agents/devrites-security-auditor.toml +53 -35
  354. package/pack/generated/codex/agents/devrites-simplifier-reviewer.toml +56 -44
  355. package/pack/generated/codex/agents/devrites-slice-wright.toml +159 -163
  356. package/pack/generated/codex/agents/devrites-spec-reviewer.toml +40 -30
  357. package/pack/generated/codex/agents/devrites-strategy-reviewer.toml +65 -34
  358. package/pack/generated/codex/agents/devrites-test-analyst.toml +46 -28
  359. package/pack/generated/codex/agents/devrites-upgrade-planner.toml +106 -0
  360. package/pack/generated/codex/hooks.json +4 -14
  361. package/pack/generated/codex/skills/devrites-api-interface/SKILL.md +7 -3
  362. package/pack/generated/codex/skills/devrites-audit/SKILL.md +47 -64
  363. package/pack/generated/codex/skills/devrites-browser-proof/SKILL.md +7 -3
  364. package/pack/generated/codex/skills/devrites-debug-recovery/SKILL.md +31 -16
  365. package/pack/generated/codex/skills/devrites-debug-recovery/reference/build-the-loop.md +24 -21
  366. package/pack/generated/codex/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +34 -6
  367. package/pack/generated/codex/skills/devrites-debug-recovery/reference/instrumentation.md +2 -2
  368. package/pack/generated/codex/skills/devrites-doubt/SKILL.md +32 -20
  369. package/pack/generated/codex/skills/devrites-frontend-craft/SKILL.md +7 -3
  370. package/pack/generated/codex/skills/devrites-interview/SKILL.md +60 -55
  371. package/pack/generated/codex/skills/devrites-lib/SKILL.md +19 -12
  372. package/pack/generated/codex/skills/devrites-lib/reference/intent-map.md +4 -2
  373. package/pack/generated/codex/skills/devrites-lib/reference/parallel-dispatch.md +82 -137
  374. package/pack/generated/codex/skills/devrites-lib/reference/reply-contract.md +8 -1
  375. package/pack/generated/codex/skills/devrites-lib/reference/standards/README.md +38 -55
  376. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +53 -27
  377. package/pack/generated/codex/skills/devrites-lib/reference/standards/agents.md +200 -190
  378. package/pack/generated/codex/skills/devrites-lib/reference/standards/anti-patterns.md +5 -15
  379. package/pack/generated/codex/skills/devrites-lib/reference/standards/ci-cd.md +27 -58
  380. package/pack/generated/codex/skills/devrites-lib/reference/standards/code-review.md +16 -52
  381. package/pack/generated/codex/skills/devrites-lib/reference/standards/coding-style.md +2 -10
  382. package/pack/generated/codex/skills/devrites-lib/reference/standards/context-hygiene.md +18 -61
  383. package/pack/generated/codex/skills/devrites-lib/reference/standards/core.md +23 -18
  384. package/pack/generated/codex/skills/devrites-lib/reference/standards/deprecation.md +17 -57
  385. package/pack/generated/codex/skills/devrites-lib/reference/standards/development-workflow.md +4 -33
  386. package/pack/generated/codex/skills/devrites-lib/reference/standards/git-workflow.md +4 -20
  387. package/pack/generated/codex/skills/devrites-lib/reference/standards/hooks.md +3 -14
  388. package/pack/generated/codex/skills/devrites-lib/reference/standards/patterns.md +9 -25
  389. package/pack/generated/codex/skills/devrites-lib/reference/standards/performance.md +0 -9
  390. package/pack/generated/codex/skills/devrites-lib/reference/standards/principles.md +1 -3
  391. package/pack/generated/codex/skills/devrites-lib/reference/standards/security.md +17 -7
  392. package/pack/generated/codex/skills/devrites-lib/reference/standards/testing.md +1 -27
  393. package/pack/generated/codex/skills/devrites-lib/reference/standards/tooling.md +46 -50
  394. package/pack/generated/codex/skills/devrites-lib/reference/workspace-artifact-schema.md +40 -10
  395. package/pack/generated/codex/skills/devrites-prose-craft/SKILL.md +7 -3
  396. package/pack/generated/codex/skills/devrites-refresh-indexes/SKILL.md +7 -3
  397. package/pack/generated/codex/skills/devrites-source-driven/SKILL.md +29 -24
  398. package/pack/generated/codex/skills/devrites-ux-shape/SKILL.md +7 -3
  399. package/pack/generated/codex/skills/rite/SKILL.md +21 -13
  400. package/pack/generated/codex/skills/rite/reference/menu.md +13 -7
  401. package/pack/generated/codex/skills/rite-adopt/SKILL.md +40 -40
  402. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +40 -31
  403. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +21 -21
  404. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +15 -6
  405. package/pack/generated/codex/skills/rite-build/SKILL.md +42 -33
  406. package/pack/generated/codex/skills/rite-build/reference/afk-discipline.md +41 -39
  407. package/pack/generated/codex/skills/rite-build/reference/evidence-standard.md +10 -0
  408. package/pack/generated/codex/skills/rite-build/reference/forge.md +186 -156
  409. package/pack/generated/codex/skills/rite-build/reference/one-slice-cycle.md +4 -3
  410. package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +96 -175
  411. package/pack/generated/codex/skills/rite-build/reference/spec-drift-guard.md +10 -4
  412. package/pack/generated/codex/skills/rite-build/reference/wright-dispatch.md +129 -134
  413. package/pack/generated/codex/skills/rite-clarify/SKILL.md +106 -0
  414. package/pack/generated/codex/skills/rite-clarify/reference/decision-coverage.md +61 -0
  415. package/pack/generated/codex/skills/rite-converge/SKILL.md +42 -28
  416. package/pack/generated/codex/skills/rite-customize/SKILL.md +7 -3
  417. package/pack/generated/codex/skills/rite-define/SKILL.md +65 -35
  418. package/pack/generated/codex/skills/rite-define/reference/gates.md +16 -15
  419. package/pack/generated/codex/skills/rite-define/reference/plan-template.md +18 -8
  420. package/pack/generated/codex/skills/rite-doctor/SKILL.md +7 -3
  421. package/pack/generated/codex/skills/rite-dogfood/SKILL.md +7 -3
  422. package/pack/generated/codex/skills/rite-explain/SKILL.md +7 -3
  423. package/pack/generated/codex/skills/rite-frame/SKILL.md +7 -3
  424. package/pack/generated/codex/skills/rite-frame/reference/failure-modes.md +22 -24
  425. package/pack/generated/codex/skills/rite-handoff/SKILL.md +7 -3
  426. package/pack/generated/codex/skills/rite-learn/SKILL.md +7 -3
  427. package/pack/generated/codex/skills/rite-plan/SKILL.md +54 -19
  428. package/pack/generated/codex/skills/rite-plan/reference/task-breakdown.md +5 -1
  429. package/pack/generated/codex/skills/rite-polish/SKILL.md +34 -26
  430. package/pack/generated/codex/skills/rite-pov/SKILL.md +7 -3
  431. package/pack/generated/codex/skills/rite-pr-feedback/SKILL.md +7 -3
  432. package/pack/generated/codex/skills/rite-pressure-test/SKILL.md +7 -3
  433. package/pack/generated/codex/skills/rite-prototype/SKILL.md +32 -29
  434. package/pack/generated/codex/skills/rite-prove/SKILL.md +34 -20
  435. package/pack/generated/codex/skills/rite-quick/SKILL.md +7 -3
  436. package/pack/generated/codex/skills/rite-resolve/SKILL.md +19 -14
  437. package/pack/generated/codex/skills/rite-resolve/reference/answer-protocol.md +3 -0
  438. package/pack/generated/codex/skills/rite-review/SKILL.md +44 -31
  439. package/pack/generated/codex/skills/rite-seal/SKILL.md +7 -3
  440. package/pack/generated/codex/skills/rite-seal/reference/phase-contract.md +27 -92
  441. package/pack/generated/codex/skills/rite-seal/reference/risk-and-rollback.md +13 -0
  442. package/pack/generated/codex/skills/rite-ship/SKILL.md +7 -3
  443. package/pack/generated/codex/skills/rite-ship/reference/design-memory.md +31 -36
  444. package/pack/generated/codex/skills/rite-spec/SKILL.md +91 -138
  445. package/pack/generated/codex/skills/rite-spec/reference/investigation.md +37 -33
  446. package/pack/generated/codex/skills/rite-spec/reference/question-protocol.md +6 -2
  447. package/pack/generated/codex/skills/rite-spec/reference/spec-checklists.md +25 -24
  448. package/pack/generated/codex/skills/rite-spec/reference/spec-template.md +9 -2
  449. package/pack/generated/codex/skills/rite-spec/reference/state-workspace.md +13 -3
  450. package/pack/generated/codex/skills/rite-status/SKILL.md +7 -3
  451. package/pack/generated/codex/skills/rite-temper/SKILL.md +69 -50
  452. package/pack/generated/codex/skills/rite-temper/reference/review-dimensions.md +24 -22
  453. package/pack/generated/codex/skills/rite-upgrade/SKILL.md +141 -0
  454. package/pack/generated/codex/skills/rite-upgrade/agents/openai.yaml +2 -0
  455. package/pack/generated/codex/skills/rite-vet/SKILL.md +121 -116
  456. package/pack/generated/codex/skills/rite-vet/reference/artifacts.md +50 -9
  457. package/pack/generated/codex/skills/rite-vet/reference/review-axes.md +40 -38
  458. package/pack/generated/codex/skills/rite-zoom-out/SKILL.md +7 -3
  459. package/package.json +1 -1
  460. package/scripts/build-release-tarball.sh +32 -15
  461. package/scripts/check-authority-drift.py +125 -0
  462. package/scripts/check-instruction-size-baseline.mjs +19 -11
  463. package/scripts/check-invocation-integrity.py +2 -0
  464. package/scripts/codex-generate.sh +69 -33
  465. package/scripts/grade-feature.sh +121 -40
  466. package/scripts/live-hosts/agent-result.schema.json +230 -0
  467. package/scripts/live-hosts/claude.sh +87 -0
  468. package/scripts/live-hosts/codex.sh +81 -0
  469. package/scripts/live-hosts/common.sh +113 -0
  470. package/scripts/live-hosts/fake-host.py +264 -0
  471. package/scripts/live-hosts/host-transport.py +287 -0
  472. package/scripts/release-check.sh +5 -1
  473. package/scripts/run-agent-contract-evals.py +1380 -0
  474. package/scripts/run-behavioral-evals.sh +24 -30
  475. package/scripts/run-evals.sh +1 -5
  476. package/scripts/run-live-behavioral-evals.py +1274 -144
  477. package/scripts/run-outcome-evals.sh +445 -88
  478. package/scripts/run-tests.mjs +30 -2
  479. package/scripts/skills-inventory.mjs +1 -1
  480. package/scripts/validate-workflow-security.py +39 -20
  481. package/scripts/validate-workspace-schema.py +362 -10
  482. package/scripts/validate.sh +21 -15
  483. package/engine/testdata/golden/TestParityWrightScope/devrites-edit-allowed.golden +0 -1
  484. /package/engine/testdata/golden/{TestParityReconcile/check-no-claimed.golden → TestParityBuildReadiness/arg=clarifyopen.golden} +0 -0
@@ -7,19 +7,21 @@ user-invocable: true
7
7
 
8
8
  # /rite-polish: finish before review
9
9
 
10
- The "finish" phase. **Always** code-polishes; **and** runs UI normalize +
11
- design polish when the feature touches UI. Self-review the work to ship
12
- quality *before* handing it to `/rite-review`. The two-phase split (code,
13
- UI) lives in `reference/code.md` and `reference/ui.md`: read each on demand,
14
- don't load both up front.
10
+ Polish code for every feature. When the feature touches UI, normalize and polish the
11
+ UI as well. Complete this self-review before `/rite-review`. The code and UI phases
12
+ live in `reference/code.md` and `reference/ui.md`; read only the phase in scope.
15
13
 
16
14
  ## Operating rules
17
15
 
18
16
  - **Functionality complete first.** Polish runs after `/rite-prove` (full
19
17
  feature proven).
20
18
  - Feature scope only.
21
- - For UI: **NEVER polish without normalizing first**: decoration on drift is
22
- banned.
19
+ - For UI, **normalize before polishing**. Do not add decoration on top of drift.
20
+ - **Root selects; wright edits.** The controlling chat assesses and reconciles, but every
21
+ accepted source/test correction is dispatched to the sole writer,
22
+ `devrites-slice-wright`, through
23
+ [`agents.md`](../devrites-lib/reference/standards/agents.md). Never edit source inline or
24
+ run two correction writers concurrently.
23
25
 
24
26
  ## Orchestration
25
27
 
@@ -36,21 +38,25 @@ don't load both up front.
36
38
  `pages/`, `routes/`, `app/`, `views/`, `screens/`), Storybook stories,
37
39
  or design-token files. When in doubt, look for visual changes that need
38
40
  verification.
39
- 3. **Always** read [`reference/code.md`](reference/code.md) and run **Phase 1
40
- (code polish)**; if backend was touched, continue into **Phase 2 (backend
41
- polish)** from the same file.
41
+ 3. **Always** read [`reference/code.md`](reference/code.md) and assess **Phase 1
42
+ (code polish)**; if backend was touched, assess **Phase 2 (backend polish)** from
43
+ the same file. Reconcile the findings, then send accepted corrections as one bounded
44
+ wright contract.
42
45
  4. **If UI scope detected** read [`reference/ui.md`](reference/ui.md), and read
43
- `design-brief.md` if present (the UX/UI contract `devrites-ux-shape` shaped at spec and
44
- `devrites-frontend-craft` refined while building) so the polish honors the agreed
45
- direction + states. **Read the `## Visual Verdict` table in `browser-evidence.md` if present:
46
- its `FAIL` and `PARTIAL` rows are the normalize/quality-bar worklist**: fix the root cause of
47
- each (a missing state, an off-token CTA, an anti-slop hit), don't decorate around it. Then run
48
- **Phase 3 (normalize)** → **Phase 4 (UI polish)**. Honor argument modes:
46
+ `design-brief.md` if present so the polish follows the direction and states established
47
+ by `devrites-ux-shape` and refined by `devrites-frontend-craft`. **Read the
48
+ `## Visual Verdict` table in `browser-evidence.md` if present:
49
+ its `FAIL` and `PARTIAL` rows are the normalize/quality-bar worklist**: identify the root
50
+ cause of each (a missing state, an off-token CTA, or an anti-slop hit) rather than
51
+ hiding it with decoration. Assess **Phase 3 (normalize)** → **Phase 4 (UI polish)**,
52
+ then send accepted UI
53
+ corrections to the wright (which invokes the relevant craft skill). Honor argument modes:
49
54
  - `bolder | quieter | distill | harden`: passed to Phase 4 as the
50
55
  emphasis dial.
51
- - `normalize-only`: run Phase 3 and stop (no Phase 4).
52
- 5. **Re-verify after any code edit:** polish edits code, so the proof from
53
- `/rite-prove` no longer post-dates it. Run the relevant fast checks (the
56
+ - `normalize-only`: assess Phase 3 and stop (no Phase 4).
57
+ 5. **Re-verify after any code edit:** a wright correction invalidates prior proof, so
58
+ `/rite-prove` no longer post-dates it. Dispatch `devrites-proof-runner` for the affected
59
+ fast checks (the
54
60
  targeted tests for the touched files + typecheck/lint; browser re-check if UI
55
61
  changed) and record a **`Re-verification:`** line in `polish-report.md`. A
56
62
  polish that changed code without a green re-verification isn't finished.
@@ -58,10 +64,8 @@ don't load both up front.
58
64
 
59
65
  ## Refinement modes
60
66
 
61
- When the user (or your own assessment) names a direction the UI should move,
62
- pass it through to Phase 4. Modes don't bypass normalize + quality-bar work:
63
- they shape the polish *after* the system is aligned. See `reference/ui.md` for
64
- the mode table.
67
+ Pass the requested UI direction to Phase 4. Modes do not bypass normalization or the
68
+ quality bar; they apply after the system is aligned. See `reference/ui.md`.
65
69
 
66
70
  > **Mid-flight discipline.** When tempted to polish UI without normalize, cite
67
71
  > clean lint as proof of quality, skip Phase 2 on a backend diff, or delete a
@@ -6,10 +6,10 @@ disable-model-invocation: true
6
6
  argument-hint: "[the question the prototype is answering]"
7
7
  ---
8
8
 
9
- # /rite-prototype: throwaway code that answers ONE question
9
+ # /rite-prototype: answer one question with throwaway code
10
10
 
11
- A prototype is **throwaway code that answers exactly one question**. The question
12
- chooses the shape: get the shape wrong and the whole prototype wastes the user's time.
11
+ A prototype is throwaway code for exactly one question. Choose its shape from that
12
+ question.
13
13
 
14
14
  ## 0. Read core rules
15
15
 
@@ -25,11 +25,12 @@ down. Examples that count as "the question":
25
25
  - "Which of these three settings layouts feels right?"
26
26
  - "Will the proposed state machine deadlock when X overlaps Y?"
27
27
 
28
- A vague question ("explore this feature") is not enough: push back once to sharpen it.
28
+ A vague request such as "explore this feature" is not enough. Ask once for a specific
29
+ question.
29
30
 
30
31
  ## 2. Pick the branch
31
32
 
32
- Read the user's prompt + the surrounding code. Two branches:
33
+ Read the user's prompt and surrounding code, then choose one branch:
33
34
 
34
35
  | Question shape | Branch | Artifact |
35
36
  |---|---|---|
@@ -39,50 +40,48 @@ Read the user's prompt + the surrounding code. Two branches:
39
40
  If genuinely ambiguous and the user is AFK: pick by the surrounding code (backend module
40
41
  → Logic; page / component → UI) and state the assumption in a comment at the top.
41
42
 
42
- **Variations must differ in shape.** UI prototypes where the variations are just colour
43
- or padding tweaks teach nothing: push each variation to a different *information
44
- architecture* / *interaction model* so the user can pick a direction, not a polish.
43
+ **Variations must differ in structure.** Colour or padding changes alone do not answer
44
+ a design question. Give each variation a different information architecture or
45
+ interaction model.
45
46
 
46
47
  ## 3. Rules that apply to both branches
47
48
 
48
- 1. **Throwaway from day one, and visibly so.** Place the prototype next to where it
49
- will eventually be used (so context is obvious) but name it so a casual reader sees
50
- it's a prototype: `prototype/`, `__prototype__`, `.scratch/`, etc. Obey the project's
49
+ 1. **Mark it as throwaway.** Place the prototype near its eventual use, but use a name
50
+ that clearly identifies it: `prototype/`, `__prototype__`, `.scratch/`, etc. Obey the project's
51
51
  existing routing / module convention; don't invent a new top-level structure.
52
- 2. **One command to run.** Use whatever task runner the project already has: `pnpm
53
- <name>`, `python <path>`, `bun <path>`. The user must start it without thinking.
52
+ 2. **Provide one run command.** Use the project's existing task runner: `pnpm
53
+ <name>`, `python <path>`, or `bun <path>`.
54
54
  3. **No persistence by default.** State lives in memory. Persistence is usually the
55
55
  thing the prototype is *checking*, not a dependency. If the question explicitly
56
56
  involves a DB, hit a scratch DB or a local file with a name like
57
57
  `PROTOTYPE — wipe me`.
58
- 4. **Skip the polish.** No tests. No error handling beyond what makes it run. No
59
- abstractions. The point is learn fast, delete fast.
58
+ 4. **Skip polish.** Add no tests, abstractions, or error handling beyond what is needed
59
+ to run and answer the question.
60
60
  5. **Surface state.** After every action (Logic) or on every variant switch (UI), print
61
61
  or render the full relevant state so the user can see what changed.
62
- 6. **Delete or absorb when done.** When the question has an answer, either delete the
63
- prototype or fold the validated decision into the real code: don't leave it
64
- rotting in the repo.
62
+ 6. **Delete or absorb when done.** After answering the question, delete the prototype
63
+ or fold the validated decision into production code.
65
64
 
66
65
  ## 4. Capture the answer
67
66
 
68
- The *answer* is the only durable output. Before declaring the prototype done, write
67
+ The answer is the only durable output. Before declaring the prototype done, write
69
68
  one of:
70
69
 
71
70
  - An entry in the active feature's `decisions.md` (`.devrites/work/<slug>/decisions.md`)
72
71
  with the question and the answer.
73
72
  - A `NOTES.md` next to the prototype if no active feature exists.
74
73
 
75
- If the user is around, this is a quick conversation. If they're AFK, the prototype is
76
- complete only once the verdict is filled in: a blank `VERDICT: ___` is not an
77
- answer. Leave it marked **not yet complete** and queue the open question so a later pass
78
- fills the verdict before the prototype is deleted.
74
+ If the user is present, ask for the verdict directly. In AFK, the prototype remains
75
+ incomplete until the verdict is filled in. A blank `VERDICT: ___` is not an answer.
76
+ Mark it **not yet complete**. Queue the question and do not delete the prototype until
77
+ a later pass records the verdict.
79
78
 
80
79
  ## Where this slots in
81
80
 
82
- `/rite-prototype` is a **scoped detour**, not a phase of its own. Typical placements:
81
+ `/rite-prototype` is a scoped detour, not a separate phase. Typical uses:
83
82
 
84
- - **Between `/rite-spec` and `/rite-define`:** a design question is undecidable on
85
- paper; prototype it, capture the answer, return to `/rite-define`.
83
+ - **During `/rite-clarify` (between spec and define):** a product/constraint question is
84
+ undecidable on paper; prototype it, capture the answer, return to `/rite-clarify`.
86
85
  - **Mid-build:** `/rite-build` hit a state-model ambiguity that the spec doesn't
87
86
  resolve. Drop into a Logic prototype, capture the answer, return.
88
87
 
@@ -7,11 +7,11 @@ user-invocable: true
7
7
 
8
8
  # /rite-prove: prove the completed feature
9
9
 
10
- Turn "I think it works" into recorded evidence for the **whole feature**. Read the active
11
- workspace first; if none, run `/rite-spec <feature>`.
10
+ Record evidence for the **whole feature**. Read the active workspace first; if none,
11
+ run `/rite-spec <feature>`.
12
12
 
13
- > **Differs from built-in `/verify` and `/run`:** those prove a single change /
14
- > launch the app. `/rite-prove` is feature-scoped. It walks `spec.md` acceptance
13
+ > **Scope:** built-in `/verify` proves one change and `/run` launches the app.
14
+ > `/rite-prove` covers a feature. It walks `spec.md` acceptance
15
15
  > criteria one-by-one, runs the full relevant test suite + build/typecheck/lint,
16
16
  > ascends the browser-proof ladder (step 4),
17
17
  > and writes `evidence.md` + `browser-evidence.md` keyed to the active
@@ -21,12 +21,13 @@ workspace first; if none, run `/rite-spec <feature>`.
21
21
  Read `tasks.md` + `state.md`. **If ANY slice is still pending/unbuilt, STOP** and tell the
22
22
  user to finish it with `/rite-build`: `/rite-prove` runs once, when the full task is
23
23
  complete, not after each slice. (Each slice already got its own targeted tests during
24
- `/rite-build`; this phase is the comprehensive proof of the assembled feature.)
24
+ `/rite-build`; this phase proves the assembled feature as a whole.)
25
25
 
26
- **Never report a pass you didn't observe.** If a command couldn't run, say so and give exact manual steps.
26
+ **Never report an unobserved pass.** If a command could not run, report that and give
27
+ exact manual steps.
27
28
 
28
- **Re-runnable, scoped.** `/rite-prove` runs once when the full feature is assembled, but
29
- it can be **re-run scoped** afterwards: when `/rite-polish` or `/rite-review` edit code,
29
+ **Scoped reruns are allowed.** `/rite-prove` runs once when the full feature is assembled.
30
+ After `/rite-polish` or `/rite-review` edits code,
30
31
  the existing `evidence.md` no longer post-dates the change, so re-run `/rite-prove` over
31
32
  the affected criteria/routes to refresh proof before `/rite-seal`.
32
33
 
@@ -42,7 +43,7 @@ Pull these via `Read` when relevant:
42
43
  user flow): telemetry must be present **and observed to emit**, not assumed.
43
44
  - `developer-experience.md`: when the change ships a developer-facing surface (API / CLI / SDK /
44
45
  webhook / config / error messages / getting-started): **measure** the DX scorecard (run the flow,
45
- time time-to-hello-world, capture the verbatim error text), don't assert it.
46
+ measure time-to-hello-world, and capture verbatim error text), rather than asserting it.
46
47
  - `definition-of-done.md`: standing Done bar: acceptance mapped, fresh proof, no open hard gates, scoped edits, rollback/docs where needed.
47
48
 
48
49
 
@@ -51,6 +52,10 @@ Pull these via `Read` when relevant:
51
52
  blocker; don't refactor unrelated code.
52
53
  - Spec Drift Guard applies: if tests/evidence reveal the spec is wrong, stop and handle
53
54
  drift (`rite-build/reference/spec-drift-guard.md`).
55
+ - **Runner observes; root records; wright fixes.** Use the file-backed fresh-context
56
+ contract in [`agents.md`](../devrites-lib/reference/standards/agents.md). The root owns
57
+ the evidence verdict and canonical writes. Every accepted source/test correction is one
58
+ bounded `devrites-slice-wright` packet, never an inline edit.
54
59
 
55
60
  ## Workflow
56
61
  0. Read `.claude/skills/devrites-lib/reference/standards/core.md` first (the always-on operating rules); pull the
@@ -63,23 +68,28 @@ Pull these via `Read` when relevant:
63
68
  [test-command-discovery](reference/test-command-discovery.md): README, package
64
69
  scripts, Makefile, CI configs, Gemfile/Rakefile, pyproject, go.mod, Cargo.toml.
65
70
  **Completion:** exact runnable test/build/typecheck/lint commands are recorded or explicitly unavailable.
66
- 3. **Run the full relevant test suite** for the feature (not a single slice), then the
67
- relevant **build / typecheck / lint**.
68
- 4. **UI feature?** Read `design-brief.md` + `references.md`, then run the browser proof ladder over the feature's routes:
71
+ 3. **Run proof in fresh context.** Freeze the candidate and dispatch
72
+ `devrites-proof-runner` with the exact commands, cwd, prerequisites, acceptance map,
73
+ and scratch boundary. Await and validate its observed full relevant test suite plus
74
+ **build / typecheck / lint** report. The runner writes no canonical evidence.
75
+ 4. **UI feature?** Include `design-brief.md`, `references.md`, routes, browser harness, and
76
+ allowed scratch path in the proof packet, then have the runner apply the browser proof ladder:
69
77
  [proof-ladder](reference/proof-ladder.md) + [browser-proof](reference/browser-proof.md)
70
78
  (`devrites-browser-proof`): routes, viewports, screenshots (opened + described),
71
79
  console, network, interaction paths, and the brief's proof targets. Compare screenshots
72
- with target references, record deltas, fix/re-render, and do not pass with an unresolved
73
- material mismatch.
80
+ with target references and record deltas. An unresolved material mismatch is a failed
81
+ result; the root handles any accepted correction at step 6 before re-rendering.
74
82
  5. **Map proof completely.** Follow
75
83
  [`reference/acceptance-proof.md`](reference/acceptance-proof.md) for acceptance/scenario
76
84
  coverage and the conditional critical-path, observability, developer-surface, and wiring
77
85
  branches. Completion: every criterion, planned interaction, and declared key link has a
78
86
  proof class plus passing evidence, or is recorded as a blocker.
79
87
  6. **On failure** → [failure-triage](reference/failure-triage.md) +
80
- `devrites-debug-recovery`. Reproduce isolate fix within scope → re-run; if a fix
81
- would exceed scope, record a blocker.
82
- 7. Update `evidence.md`, `browser-evidence.md` (if UI), `traceability.md`, and
88
+ `devrites-debug-recovery`. The root reconciles the reproduction. Send an accepted,
89
+ in-scope correction to the sole writer, `devrites-slice-wright`; then freeze the new
90
+ candidate and dispatch a fresh proof runner for affected checks. If a fix would exceed
91
+ scope, record a blocker.
92
+ 7. The root updates `evidence.md`, `browser-evidence.md` (if UI), `traceability.md`, and
83
93
  `state.md`. New proof goes to `evidence.md` (`proof.md` is a read-only alias:
84
94
  see `devrites-lib/reference/workspace-artifact-schema.md`).
85
95
 
@@ -8,16 +8,16 @@ disable-model-invocation: true
8
8
 
9
9
  # /rite-resolve: answer the human gate
10
10
 
11
- `/rite-resolve` is the canonical resume verb for **async** human gates: a checkpoint that
12
- already paused and **stopped the session** (an AFK blocking/escalating/irreversible queue, or a
13
- HITL pause the human walked away from), plus `--batch`. When `/rite-build` asks a gap **inline**
11
+ `/rite-resolve` resumes an **async** human gate: a checkpoint that already paused and
12
+ **stopped the session** (an AFK blocking/escalating/irreversible queue, or a HITL pause
13
+ left unanswered), plus `--batch`. When `/rite-build` asks a question **inline**
14
14
  via `AskUserQuestion` and the human is present, that pick resolves the gate **in place** through
15
15
  the same `devrites-engine resolve` writer. You don't type `/rite-resolve` for it. For the async case this
16
16
  skill takes the human's answer (or `--drop` / `--batch`), writes it to `questions.md`, updates
17
17
  `state.md` (clears `Awaiting human`, sets `Status: running`), and recommends the next command.
18
18
 
19
- It is **deliberately small**: one verb, one source of truth (`questions.md`), one cursor
20
- (`state.md`). The full AFK / HITL contract lives in
19
+ It has one verb, one source of truth (`questions.md`), and one cursor (`state.md`). The
20
+ full AFK / HITL contract lives in
21
21
  [`afk-hitl.md`](../devrites-lib/reference/standards/afk-hitl.md).
22
22
 
23
23
  ## Rules consulted (read on demand from `.claude/skills/devrites-lib/reference/standards/`)
@@ -45,9 +45,9 @@ Pull these via `Read` when shaping the resolve:
45
45
  unblocked slice's `Slice mode` (step 4, the named exception); everything else goes through
46
46
  the script, never by hand.
47
47
  - **Human gates are for human-only decisions, not the agent's work.** A `questions.md` entry the
48
- human must answer is a genuine *decision* (a scope / design / risk call only the human can make).
49
- Not a task the agent can do itself. If a question is really agent-doable ("should I write the
50
- test?", "go implement X"), don't record a human answer that punts the agent's own job back to it:
48
+ human must answer is a genuine decision (a scope / design / risk call only the human can make),
49
+ not a task the agent can do. If a question is really agent-doable ("should I write the
50
+ test?", "go implement X"), do not record a human answer that returns the agent's work to it:
51
51
  flag the mis-tag and route it to the right skill (`/rite-build`, `/rite-plan unblock`,
52
52
  `devrites-debug-recovery`). The human resolves decisions; the agent does the work.
53
53
 
@@ -67,9 +67,10 @@ Pull these via `Read` when shaping the resolve:
67
67
  `tasks.md`. Confirm the qid is `status: open`. If `state.md` `Status` is not
68
68
  `awaiting_human` and the question's `gate` is `blocking`, surface the inconsistency
69
69
  before proceeding (don't auto-repair: flag it).
70
- 3. **Render preview.** Echo the qid, the question, the proposed answer (if any), the
71
- user's answer, and which slice unblocks. Stop here and ask `confirm? (y/N)` **unless**
72
- the answer was provided non-interactively via `--batch`.
70
+ 3. **Apply explicit consent.** Supplying `<qid> "<answer>"`, `--drop`, or `--batch` is the
71
+ user's explicit consent for this local workspace mutation. Echo the qid, answer/drop,
72
+ and slice being unblocked, then continue immediately; do not ask the user to confirm the
73
+ command they just typed.
73
74
  4. **Mutate.** Run `devrites-engine resolve` with the same
74
75
  arguments. The script:
75
76
  - flips the qid's `status` to `answered` / `dropped` and stamps `answered_at` + `answer`;
@@ -6,6 +6,9 @@ shapes, the batch file format, and the rules the underlying `devrites-engine res
6
6
 
7
7
  ## Three input shapes
8
8
 
9
+ Each form is an explicit local mutation command. Supplying it is the confirmation; the
10
+ skill applies it once after validation and reports the result instead of asking for `y` again.
11
+
9
12
  ### 1. Single answer
10
13
 
11
14
  ```
@@ -7,13 +7,13 @@ user-invocable: true
7
7
 
8
8
  # /rite-review: feature-scoped review
9
9
 
10
- Senior review of the **active feature scope only**. **Read the active workspace first**;
11
- if none, tell the user to run `/rite-spec <feature>`.
10
+ Review the **active feature scope only**. **Read the active workspace first**; if none,
11
+ tell the user to run `/rite-spec <feature>`.
12
12
 
13
- > **Differs from built-in `/code-review` in:** `/code-review` is a generic
14
- > diff review with no workspace context. `/rite-review` reads
13
+ > **Scope:** `/code-review` is a generic diff review with no workspace context.
14
+ > `/rite-review` reads
15
15
  > `.devrites/work/<slug>/spec.md` first, runs Spec ↔ Code-review axes as
16
- > parallel subagents (see [`parallel-dispatch.md`](../devrites-lib/reference/parallel-dispatch.md)), and gates feeding
16
+ > parallel fresh-context reviewers (see [`parallel-dispatch.md`](../devrites-lib/reference/parallel-dispatch.md)), and gates feeding
17
17
  > into `/rite-seal`. Use `/code-review` for a one-off diff; use
18
18
  > `/rite-review` for a DevRites feature where the spec is the contract.
19
19
 
@@ -22,7 +22,7 @@ Pull these via `Read` when the diff demands them:
22
22
  - `code-review.md`: small PRs, severity labels, tests-first review focus.
23
23
  - `review-checklist.md`: compact pass/fail sweep before reporting the verdict.
24
24
  - `principles.md`: declared project invariants (`.devrites/principles.md`); a diff that violates one with no recorded exception is a Critical, blocking finding.
25
- - `testing.md`: confirm the tests prove the spec, not just pass.
25
+ - `testing.md`: confirm that passing tests actually prove the spec.
26
26
  - `agents.md`: when to fan out to which review subagent.
27
27
  - `security.md`: when input / auth / data / integrations / secrets are in scope.
28
28
  - `security-checklist.md`: for the same security-sensitive scope, the compact trust-boundary sweep.
@@ -32,10 +32,14 @@ Pull these via `Read` when the diff demands them:
32
32
  - **Feature scope only.** Review touched files + the diff. **NO whole-project refactors,
33
33
  NO drive-by cleanup.** DO NOT delete suspected dead code outside this feature without
34
34
  asking. Spec Drift Guard applies.
35
- - **Reviews the finished product.** `/rite-polish` has already done **code simplification**
36
- + UI normalize/polish. Review judges; if it reveals a real complexity issue polish
37
- missed, flag it as a finding: don't re-run a simplification sweep here.
38
- - Findings are labeled (below). Re-prove after any change you make.
35
+ - **Review the finished product.** `/rite-polish` has already simplified code and
36
+ normalized or polished UI. If review finds a remaining complexity issue, record it as
37
+ a finding rather than rerunning a simplification pass.
38
+ - Findings are labeled (below). Re-prove after any accepted correction.
39
+ - **Reviewers judge; root reconciles; wright fixes.** Follow
40
+ [`agents.md`](../devrites-lib/reference/standards/agents.md). The root owns the verdict and
41
+ canonical writes; every accepted source/test correction routes to
42
+ `devrites-slice-wright`.
39
43
 
40
44
  ## Workflow
41
45
  0. Read `.claude/skills/devrites-lib/reference/standards/core.md` first (the always-on operating rules); pull the
@@ -52,13 +56,14 @@ Pull these via `Read` when the diff demands them:
52
56
  2. **Review tests first:** do they prove the acceptance criteria? Missing,
53
57
  weak, or wrong tests are the first findings.
54
58
  **Completion:** every acceptance criterion maps to a proven test or a labeled finding.
55
- 3. **Spec Code-review split (parallel sub-agents, fresh context).** A change can pass
59
+ 3. **Review spec and code separately in parallel.** A change can pass
56
60
  one axis and fail the other: code that follows every project standard but
57
61
  implements the wrong thing (Code-review pass, Spec fail), or code that does exactly
58
62
  what the spec asked but breaks project conventions (Spec pass, Code-review fail).
59
- Running them serially in one context lets one mask the other. So:
60
- - Dispatch **two** read-only reviewers in **parallel** via the `Task` tool, each
61
- with its own narrow brief and no cross-pollination:
63
+ Separate contexts prevent one axis from masking the other:
64
+ - Freeze the candidate and fresh-context dispatch **two** read-only reviewers in
65
+ parallel, each with its own `agent-packet/v1`, narrow brief, and no
66
+ cross-pollination:
62
67
  - **Spec axis** → `devrites-spec-reviewer`: "Apply your documented discipline on
63
68
  the active feature workspace + diff. Report (a) criteria the spec asked for that
64
69
  are missing or partial, (b) behaviour in the diff the spec did not ask for
@@ -101,15 +106,20 @@ Pull these via `Read` when the diff demands them:
101
106
  6. **Performance:** apply `devrites-audit perf`
102
107
  ([performance-review](reference/performance-review.md)) only when performance is
103
108
  relevant or a regression risk is visible (measure first).
104
- 7. Apply only in-scope fixes; **run verification after changes** (`/rite-prove` logic).
105
- 8. Update `review.md`, `evidence.md`, and `state.md`.
106
- 9. **Guard against the silent reviewer.** After `review.md` is written, run:
109
+ 7. Reconcile and accept only in-scope fixes. Consolidate them into one bounded wright
110
+ correction packet; never edit source in the reviewing context. Freeze the new candidate
111
+ and **run affected verification after changes** (`/rite-prove` logic), then perform at
112
+ most one narrow recheck of affected findings.
113
+ 8. The root updates `review.md`, `evidence.md`, and `state.md`.
114
+ **Completion:** the records name the reviewed candidate identity and every accepted
115
+ correction has affected proof plus its narrow recheck.
116
+ 9. **Require an account from every reviewer.** After `review.md` is written, run:
107
117
  ```bash
108
118
  devrites-engine review-integrity
109
119
  devrites-engine review-fingerprints --write
110
120
  ```
111
- Exit 1 means an adversarial axis reported nothing and justified nothing: a suspected
112
- rubber-stamp. Re-run that axis or add its `No-findings:` justification; do not carry a silent
121
+ Exit 1 means an adversarial axis reported neither findings nor a justification. Re-run
122
+ that axis or add its `No-findings:` justification; do not carry a silent
113
123
  axis into `/rite-seal` (where it surfaces as an Important).
114
124
 
115
125
  ## Finding labels
@@ -119,13 +129,13 @@ Pull these via `Read` when the diff demands them:
119
129
  - **Nit:** trivial/style.
120
130
  - **FYI:** context, no action implied.
121
131
 
122
- **Action decoration (orthogonal to severity).** Also tag each finding with how to act on it:
132
+ **Action tag (separate from severity).** Tag each finding with how to act on it:
123
133
  `blocking` (fix before seal), `non-blocking` (fix when convenient), or `if-minor` (fix only if the
124
134
  change is already small: a pure noise-economics lever). Only a **`blocking` Critical** gates the
125
135
  seal; a `non-blocking` / `if-minor` finding is recorded, not a stop.
126
136
 
127
- ## Confidence + signal-to-noise
128
- Borrow `/rite-vet`'s discipline so review stays **trusted, not noisy**: a reviewer that posts
137
+ ## Confidence and signal-to-noise
138
+ Apply `/rite-vet`'s confidence rules. A reviewer that posts
129
139
  18 comments per PR teaches the team to ignore every one (below ~10% false-positive rate devs
130
140
  investigate each finding; past ~30% they label the tool noisy and skip it):
131
141
  - **Confidence-band each finding** (1-10) and state the band. A low-confidence finding (≤4)
@@ -133,21 +143,20 @@ investigate each finding; past ~30% they label the tool noisy and skip it):
133
143
  (low-confidence): n` line, never raised as Critical/Important.
134
144
  - **Verify before you escalate.** Every Critical/Important quotes the spec line or cites the
135
145
  `file:line` that proves it: no unverified blockers.
136
- - **Budget the noise.** Roll up trivia ("N style nits") into a single line; tooling already
146
+ - **Limit low-value comments.** Roll up trivia ("N style nits") into a single line; tooling already
137
147
  catches style. Review's job is correctness + spec fidelity, not a lint dump.
138
148
  - **A silent axis is suspicious, not clean.** An adversarial axis that raises nothing must earn
139
149
  it: end its `## Spec` / `## Code review` section with a **`No-findings:`** line naming the
140
150
  passes it ran (missing/partial/incorrect for spec; edge cases, error paths, the riskiest
141
151
  decision, a changed behavior whose test may not cover it for code) and why each came back
142
- empty. This is the mirror of confidence-banding: banding kills the false positive, this catches
143
- the false negative ([`code-review.md` § Zero findings is suspicious](../devrites-lib/reference/standards/code-review.md)).
152
+ empty. Confidence bands suppress false positives; this requirement catches silent false
153
+ negatives ([`code-review.md` § Zero findings is suspicious](../devrites-lib/reference/standards/code-review.md)).
144
154
 
145
155
  ## Severity orientation (labels, not score)
146
156
 
147
157
  After labeling, summarize findings as `Critical / Important / Suggestion / Nit /
148
- FYI` counts. There is no composite number `/rite-seal` gates on
149
- `Critical == 0` and on acceptance + drift. Inventing a number invites gaming;
150
- the labels do the work.
158
+ FYI` counts. There is no composite number. `/rite-seal` gates on
159
+ `Critical == 0` and on acceptance plus drift. Do not invent a composite score.
151
160
 
152
161
  > **Mid-flight discipline.** When tempted to demote a Critical, hide a finding, fix without re-verification, or wander out of scope: see [`anti-patterns`](reference/anti-patterns.md). Load it the moment you reach for the excuse.
153
162