devrites 3.0.7 → 3.1.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 (472) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +67 -47
  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/README.md +3 -0
  12. package/docs/agents/triage-labels.md +7 -7
  13. package/docs/architecture.md +157 -140
  14. package/docs/cli.md +41 -12
  15. package/docs/command-map.md +49 -35
  16. package/docs/engine/agent-contract.md +92 -15
  17. package/docs/engine/commands.md +242 -72
  18. package/docs/engine/state-schema.md +52 -23
  19. package/docs/engine/workspace-schema.md +94 -15
  20. package/docs/extensions.md +1 -1
  21. package/docs/flow.md +80 -50
  22. package/docs/harness-compliance.md +29 -5
  23. package/docs/orchestration.md +107 -79
  24. package/docs/quick-reference.md +7 -3
  25. package/docs/release.md +4 -3
  26. package/docs/skills.md +64 -38
  27. package/docs/usage.md +57 -38
  28. package/engine/cmd/releasepack/main.go +219 -0
  29. package/engine/cmd/releasepack/main_test.go +170 -0
  30. package/engine/commands.go +170 -23
  31. package/engine/git_guard.go +187 -0
  32. package/engine/git_guard_test.go +283 -0
  33. package/engine/hookpolicy.go +53 -55
  34. package/engine/hookpolicy_test.go +91 -1
  35. package/engine/hooks.go +296 -75
  36. package/engine/hooks_events_test.go +276 -6
  37. package/engine/hooks_workspace.go +640 -159
  38. package/engine/internal/devritespaths/paths.go +65 -10
  39. package/engine/internal/devritespaths/paths_test.go +110 -0
  40. package/engine/internal/doctor/doctor.go +153 -23
  41. package/engine/internal/doctor/doctor_test.go +74 -0
  42. package/engine/internal/forge/forge.go +940 -0
  43. package/engine/internal/forge/forge_test.go +576 -0
  44. package/engine/internal/forge/git.go +245 -0
  45. package/engine/internal/forge/liveness_unix.go +48 -0
  46. package/engine/internal/forge/liveness_windows.go +67 -0
  47. package/engine/internal/forge/manifest.go +402 -0
  48. package/engine/internal/gate/gate.go +90 -71
  49. package/engine/internal/gate/gate_test.go +71 -2
  50. package/engine/internal/harness/compliance.go +18 -24
  51. package/engine/internal/harness/harness.go +37 -44
  52. package/engine/internal/harness/harness_test.go +21 -5
  53. package/engine/internal/install/install.go +486 -38
  54. package/engine/internal/install/install_test.go +383 -10
  55. package/engine/internal/iohooks/iohooks.go +350 -59
  56. package/engine/internal/iohooks/iohooks_test.go +421 -1
  57. package/engine/internal/lib/buildreadiness.go +35 -18
  58. package/engine/internal/lib/clarifyreturn.go +91 -0
  59. package/engine/internal/lib/clarifyreturn_test.go +123 -0
  60. package/engine/internal/lib/context.go +54 -15
  61. package/engine/internal/lib/cursor_compat_test.go +8 -0
  62. package/engine/internal/lib/extensions.go +2 -3
  63. package/engine/internal/lib/gitauthority.go +601 -0
  64. package/engine/internal/lib/gitauthority_test.go +346 -0
  65. package/engine/internal/lib/jsonout.go +25 -11
  66. package/engine/internal/lib/jsonout_test.go +16 -0
  67. package/engine/internal/lib/lanes.go +14 -8
  68. package/engine/internal/lib/observability_test.go +358 -0
  69. package/engine/internal/lib/packageexistence.go +151 -35
  70. package/engine/internal/lib/packageexistence_test.go +163 -0
  71. package/engine/internal/lib/progress.go +11 -9
  72. package/engine/internal/lib/provenance.go +462 -0
  73. package/engine/internal/lib/provenance_test.go +154 -0
  74. package/engine/internal/lib/readiness_contract.json +111 -0
  75. package/engine/internal/lib/readinessartifact.go +510 -0
  76. package/engine/internal/lib/readinessartifact_test.go +321 -0
  77. package/engine/internal/lib/reconcile.go +712 -88
  78. package/engine/internal/lib/reconcile_test.go +335 -16
  79. package/engine/internal/lib/recoveryattempts.go +298 -0
  80. package/engine/internal/lib/recoveryattempts_test.go +215 -0
  81. package/engine/internal/lib/resolve.go +23 -19
  82. package/engine/internal/lib/runbook_context_test.go +20 -0
  83. package/engine/internal/lib/session.go +701 -9
  84. package/engine/internal/lib/session_test.go +80 -13
  85. package/engine/internal/lib/testintegrity.go +33 -37
  86. package/engine/internal/lib/testintegrity_test.go +63 -1
  87. package/engine/internal/migrate/migrate.go +81 -1
  88. package/engine/internal/migrate/migrate_test.go +22 -1
  89. package/engine/internal/reason/reason.go +180 -0
  90. package/engine/internal/reason/reason_test.go +35 -0
  91. package/engine/internal/rootfacts/facts.go +466 -0
  92. package/engine/internal/rootfacts/facts_test.go +306 -0
  93. package/engine/internal/safepath/safepath.go +55 -0
  94. package/engine/internal/safepath/safepath_test.go +69 -0
  95. package/engine/internal/safepath/safepath_windows_test.go +26 -0
  96. package/engine/internal/state/clarify_transition.go +165 -0
  97. package/engine/internal/state/clarify_transition_test.go +130 -0
  98. package/engine/internal/state/cmd/workflowmanifest/main.go +12 -8
  99. package/engine/internal/state/cursor.go +58 -0
  100. package/engine/internal/state/cursor_test.go +42 -1
  101. package/engine/internal/state/feature.go +35 -48
  102. package/engine/internal/state/schema.go +90 -37
  103. package/engine/internal/state/snapshot.go +18 -2
  104. package/engine/internal/state/state_test.go +187 -7
  105. package/engine/internal/state/status.go +48 -11
  106. package/engine/internal/state/workflow_manifest.json +231 -50
  107. package/engine/internal/toolpolicy/classifier.go +533 -0
  108. package/engine/internal/toolpolicy/classifier_test.go +424 -0
  109. package/engine/internal/toolpolicy/git.go +616 -0
  110. package/engine/internal/toolpolicy/scanner.go +382 -0
  111. package/engine/main.go +160 -77
  112. package/engine/observability_cli_test.go +52 -0
  113. package/engine/root_routing_test.go +277 -0
  114. package/engine/testdata/golden/TestParityBuildReadiness/arg=approved.golden +1 -1
  115. package/engine/testdata/golden/TestParityBuildReadiness/arg=emptystatus.golden +1 -1
  116. package/engine/testdata/golden/TestParityBuildReadiness/arg=noclarify.golden +1 -0
  117. package/engine/testdata/golden/TestParityBuildReadiness/arg=novet.golden +1 -0
  118. package/engine/testdata/golden/TestParityBuildReadiness/arg=stalevet.golden +1 -0
  119. package/engine/testdata/golden/TestParityBuildReadiness/arg=trailhash.golden +1 -1
  120. package/engine/testdata/golden/TestParityBuildReadiness/arg=trailpipe.golden +1 -1
  121. package/engine/testdata/golden/TestParityBuildReadiness/arg=vetnotready.golden +1 -0
  122. package/engine/testdata/golden/TestParityProgress/arg=allbuilt.golden +1 -1
  123. package/engine/testdata/golden/TestParityProgress/arg=done.golden +1 -1
  124. package/engine/testdata/golden/TestParityProgress/arg=mid.golden +1 -1
  125. package/engine/testdata/golden/TestParityProgress/arg=nophase.golden +1 -1
  126. package/engine/testdata/golden/TestParityProgress/arg=noslice.golden +1 -1
  127. package/engine/testdata/golden/TestParityProgress/arg=plan.golden +1 -1
  128. package/engine/testdata/golden/TestParityProgress/arg=seal.golden +1 -1
  129. package/engine/testdata/golden/TestParityReconcile/check-clean.golden +1 -1
  130. package/engine/testdata/golden/TestParityReconcile/inline-fallback.golden +1 -0
  131. package/engine/testdata/golden/TestParityReconcile/snapshot-no-allowlist.golden +1 -0
  132. package/engine/testdata/golden/TestParityWrightScope/devrites-edit-denied.golden +2 -0
  133. package/engine/testdata/golden/TestParityWrightScope/out-of-scope-enforce-denies.golden +1 -1
  134. package/engine/tests/adr_0011_define_plan_test.go +30 -0
  135. package/engine/tests/budget_test.go +19 -8
  136. package/engine/tests/concurrency_cli_test.go +7 -1
  137. package/engine/tests/doctor_cli_test.go +148 -2
  138. package/engine/tests/forge_cli_test.go +463 -0
  139. package/engine/tests/gate_test.go +63 -8
  140. package/engine/tests/hook_test.go +260 -8
  141. package/engine/tests/hooks_io_test.go +94 -3
  142. package/engine/tests/json_contract_test.go +127 -2
  143. package/engine/tests/migrate_cli_test.go +2 -2
  144. package/engine/tests/parity_buildreadiness_test.go +141 -10
  145. package/engine/tests/parity_learnings_test.go +16 -17
  146. package/engine/tests/parity_reconcile_test.go +20 -17
  147. package/engine/tests/parity_resolve_test.go +12 -11
  148. package/engine/tests/parity_test.go +21 -17
  149. package/pack/.claude/agents/devrites-code-reviewer.md +62 -48
  150. package/pack/.claude/agents/devrites-devex-reviewer.md +69 -53
  151. package/pack/.claude/agents/devrites-doubt-reviewer.md +29 -22
  152. package/pack/.claude/agents/devrites-evidence-scout.md +69 -0
  153. package/pack/.claude/agents/devrites-forge-judge.md +74 -61
  154. package/pack/.claude/agents/devrites-frontend-reviewer.md +48 -39
  155. package/pack/.claude/agents/devrites-performance-reviewer.md +49 -40
  156. package/pack/.claude/agents/devrites-plan-drafter.md +71 -0
  157. package/pack/.claude/agents/devrites-plan-reviewer.md +80 -47
  158. package/pack/.claude/agents/devrites-proof-runner.md +74 -0
  159. package/pack/.claude/agents/devrites-retrospector.md +48 -45
  160. package/pack/.claude/agents/devrites-security-auditor.md +46 -36
  161. package/pack/.claude/agents/devrites-simplifier-reviewer.md +50 -46
  162. package/pack/.claude/agents/devrites-slice-wright.md +153 -165
  163. package/pack/.claude/agents/devrites-spec-reviewer.md +34 -32
  164. package/pack/.claude/agents/devrites-strategy-reviewer.md +63 -34
  165. package/pack/.claude/agents/devrites-test-analyst.md +40 -30
  166. package/pack/.claude/settings.json +2 -1
  167. package/pack/.claude/skills/devrites-audit/SKILL.md +40 -61
  168. package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +24 -13
  169. package/pack/.claude/skills/devrites-debug-recovery/reference/build-the-loop.md +24 -21
  170. package/pack/.claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +34 -6
  171. package/pack/.claude/skills/devrites-debug-recovery/reference/instrumentation.md +2 -2
  172. package/pack/.claude/skills/devrites-doubt/SKILL.md +25 -17
  173. package/pack/.claude/skills/devrites-interview/SKILL.md +53 -52
  174. package/pack/.claude/skills/devrites-lib/SKILL.md +11 -9
  175. package/pack/.claude/skills/devrites-lib/reference/intent-map.md +3 -2
  176. package/pack/.claude/skills/devrites-lib/reference/parallel-dispatch.md +82 -137
  177. package/pack/.claude/skills/devrites-lib/reference/reply-contract.md +8 -1
  178. package/pack/.claude/skills/devrites-lib/reference/standards/README.md +38 -55
  179. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +53 -27
  180. package/pack/.claude/skills/devrites-lib/reference/standards/agents.md +198 -190
  181. package/pack/.claude/skills/devrites-lib/reference/standards/anti-patterns.md +5 -15
  182. package/pack/.claude/skills/devrites-lib/reference/standards/ci-cd.md +27 -58
  183. package/pack/.claude/skills/devrites-lib/reference/standards/code-review.md +16 -52
  184. package/pack/.claude/skills/devrites-lib/reference/standards/coding-style.md +2 -10
  185. package/pack/.claude/skills/devrites-lib/reference/standards/context-hygiene.md +18 -61
  186. package/pack/.claude/skills/devrites-lib/reference/standards/core.md +23 -18
  187. package/pack/.claude/skills/devrites-lib/reference/standards/deprecation.md +17 -57
  188. package/pack/.claude/skills/devrites-lib/reference/standards/development-workflow.md +4 -33
  189. package/pack/.claude/skills/devrites-lib/reference/standards/git-workflow.md +4 -20
  190. package/pack/.claude/skills/devrites-lib/reference/standards/hooks.md +3 -14
  191. package/pack/.claude/skills/devrites-lib/reference/standards/patterns.md +9 -25
  192. package/pack/.claude/skills/devrites-lib/reference/standards/performance.md +0 -9
  193. package/pack/.claude/skills/devrites-lib/reference/standards/principles.md +1 -3
  194. package/pack/.claude/skills/devrites-lib/reference/standards/security.md +17 -7
  195. package/pack/.claude/skills/devrites-lib/reference/standards/testing.md +1 -27
  196. package/pack/.claude/skills/devrites-lib/reference/standards/tooling.md +46 -50
  197. package/pack/.claude/skills/devrites-lib/reference/workspace-artifact-schema.md +23 -10
  198. package/pack/.claude/skills/devrites-source-driven/SKILL.md +23 -22
  199. package/pack/.claude/skills/rite/SKILL.md +8 -6
  200. package/pack/.claude/skills/rite/reference/menu.md +8 -6
  201. package/pack/.claude/skills/rite-adopt/SKILL.md +33 -37
  202. package/pack/.claude/skills/rite-autocomplete/SKILL.md +33 -28
  203. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +21 -21
  204. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +15 -6
  205. package/pack/.claude/skills/rite-build/SKILL.md +35 -30
  206. package/pack/.claude/skills/rite-build/reference/afk-discipline.md +38 -38
  207. package/pack/.claude/skills/rite-build/reference/evidence-standard.md +10 -0
  208. package/pack/.claude/skills/rite-build/reference/forge.md +186 -156
  209. package/pack/.claude/skills/rite-build/reference/one-slice-cycle.md +4 -3
  210. package/pack/.claude/skills/rite-build/reference/phase-contract.md +96 -175
  211. package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +129 -134
  212. package/pack/.claude/skills/rite-clarify/SKILL.md +89 -0
  213. package/pack/.claude/skills/rite-clarify/reference/decision-coverage.md +59 -0
  214. package/pack/.claude/skills/rite-converge/SKILL.md +35 -25
  215. package/pack/.claude/skills/rite-define/SKILL.md +57 -32
  216. package/pack/.claude/skills/rite-define/reference/gates.md +16 -15
  217. package/pack/.claude/skills/rite-define/reference/plan-template.md +16 -8
  218. package/pack/.claude/skills/rite-frame/reference/failure-modes.md +22 -24
  219. package/pack/.claude/skills/rite-plan/SKILL.md +44 -16
  220. package/pack/.claude/skills/rite-plan/reference/task-breakdown.md +4 -0
  221. package/pack/.claude/skills/rite-polish/SKILL.md +27 -23
  222. package/pack/.claude/skills/rite-prototype/SKILL.md +25 -26
  223. package/pack/.claude/skills/rite-prove/SKILL.md +27 -17
  224. package/pack/.claude/skills/rite-resolve/SKILL.md +12 -11
  225. package/pack/.claude/skills/rite-resolve/reference/answer-protocol.md +3 -0
  226. package/pack/.claude/skills/rite-review/SKILL.md +37 -28
  227. package/pack/.claude/skills/rite-seal/reference/phase-contract.md +27 -92
  228. package/pack/.claude/skills/rite-seal/reference/risk-and-rollback.md +13 -0
  229. package/pack/.claude/skills/rite-ship/reference/design-memory.md +31 -36
  230. package/pack/.claude/skills/rite-spec/SKILL.md +84 -135
  231. package/pack/.claude/skills/rite-spec/reference/investigation.md +37 -33
  232. package/pack/.claude/skills/rite-spec/reference/question-protocol.md +6 -2
  233. package/pack/.claude/skills/rite-spec/reference/spec-checklists.md +25 -24
  234. package/pack/.claude/skills/rite-spec/reference/spec-template.md +9 -2
  235. package/pack/.claude/skills/rite-spec/reference/state-workspace.md +13 -3
  236. package/pack/.claude/skills/rite-temper/SKILL.md +62 -47
  237. package/pack/.claude/skills/rite-temper/reference/review-dimensions.md +24 -22
  238. package/pack/.claude/skills/rite-vet/SKILL.md +110 -113
  239. package/pack/.claude/skills/rite-vet/reference/artifacts.md +42 -9
  240. package/pack/.claude/skills/rite-vet/reference/review-axes.md +39 -37
  241. package/pack/generated/claude/agents/devrites-code-reviewer.md +62 -48
  242. package/pack/generated/claude/agents/devrites-devex-reviewer.md +69 -53
  243. package/pack/generated/claude/agents/devrites-doubt-reviewer.md +29 -22
  244. package/pack/generated/claude/agents/devrites-evidence-scout.md +69 -0
  245. package/pack/generated/claude/agents/devrites-forge-judge.md +74 -61
  246. package/pack/generated/claude/agents/devrites-frontend-reviewer.md +48 -39
  247. package/pack/generated/claude/agents/devrites-performance-reviewer.md +49 -40
  248. package/pack/generated/claude/agents/devrites-plan-drafter.md +71 -0
  249. package/pack/generated/claude/agents/devrites-plan-reviewer.md +80 -47
  250. package/pack/generated/claude/agents/devrites-proof-runner.md +74 -0
  251. package/pack/generated/claude/agents/devrites-retrospector.md +48 -45
  252. package/pack/generated/claude/agents/devrites-security-auditor.md +46 -36
  253. package/pack/generated/claude/agents/devrites-simplifier-reviewer.md +50 -46
  254. package/pack/generated/claude/agents/devrites-slice-wright.md +153 -165
  255. package/pack/generated/claude/agents/devrites-spec-reviewer.md +34 -32
  256. package/pack/generated/claude/agents/devrites-strategy-reviewer.md +63 -34
  257. package/pack/generated/claude/agents/devrites-test-analyst.md +40 -30
  258. package/pack/generated/claude/settings.json +2 -1
  259. package/pack/generated/claude/skills/devrites-audit/SKILL.md +40 -61
  260. package/pack/generated/claude/skills/devrites-debug-recovery/SKILL.md +24 -13
  261. package/pack/generated/claude/skills/devrites-debug-recovery/reference/build-the-loop.md +24 -21
  262. package/pack/generated/claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +34 -6
  263. package/pack/generated/claude/skills/devrites-debug-recovery/reference/instrumentation.md +2 -2
  264. package/pack/generated/claude/skills/devrites-doubt/SKILL.md +25 -17
  265. package/pack/generated/claude/skills/devrites-interview/SKILL.md +53 -52
  266. package/pack/generated/claude/skills/devrites-lib/SKILL.md +11 -9
  267. package/pack/generated/claude/skills/devrites-lib/reference/intent-map.md +3 -2
  268. package/pack/generated/claude/skills/devrites-lib/reference/parallel-dispatch.md +82 -137
  269. package/pack/generated/claude/skills/devrites-lib/reference/reply-contract.md +8 -1
  270. package/pack/generated/claude/skills/devrites-lib/reference/standards/README.md +38 -55
  271. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +53 -27
  272. package/pack/generated/claude/skills/devrites-lib/reference/standards/agents.md +198 -190
  273. package/pack/generated/claude/skills/devrites-lib/reference/standards/anti-patterns.md +5 -15
  274. package/pack/generated/claude/skills/devrites-lib/reference/standards/ci-cd.md +27 -58
  275. package/pack/generated/claude/skills/devrites-lib/reference/standards/code-review.md +16 -52
  276. package/pack/generated/claude/skills/devrites-lib/reference/standards/coding-style.md +2 -10
  277. package/pack/generated/claude/skills/devrites-lib/reference/standards/context-hygiene.md +18 -61
  278. package/pack/generated/claude/skills/devrites-lib/reference/standards/core.md +23 -18
  279. package/pack/generated/claude/skills/devrites-lib/reference/standards/deprecation.md +17 -57
  280. package/pack/generated/claude/skills/devrites-lib/reference/standards/development-workflow.md +4 -33
  281. package/pack/generated/claude/skills/devrites-lib/reference/standards/git-workflow.md +4 -20
  282. package/pack/generated/claude/skills/devrites-lib/reference/standards/hooks.md +3 -14
  283. package/pack/generated/claude/skills/devrites-lib/reference/standards/patterns.md +9 -25
  284. package/pack/generated/claude/skills/devrites-lib/reference/standards/performance.md +0 -9
  285. package/pack/generated/claude/skills/devrites-lib/reference/standards/principles.md +1 -3
  286. package/pack/generated/claude/skills/devrites-lib/reference/standards/security.md +17 -7
  287. package/pack/generated/claude/skills/devrites-lib/reference/standards/testing.md +1 -27
  288. package/pack/generated/claude/skills/devrites-lib/reference/standards/tooling.md +46 -50
  289. package/pack/generated/claude/skills/devrites-lib/reference/workspace-artifact-schema.md +23 -10
  290. package/pack/generated/claude/skills/devrites-source-driven/SKILL.md +23 -22
  291. package/pack/generated/claude/skills/rite/SKILL.md +8 -6
  292. package/pack/generated/claude/skills/rite/reference/menu.md +8 -6
  293. package/pack/generated/claude/skills/rite-adopt/SKILL.md +33 -37
  294. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +33 -28
  295. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +21 -21
  296. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +15 -6
  297. package/pack/generated/claude/skills/rite-build/SKILL.md +35 -30
  298. package/pack/generated/claude/skills/rite-build/reference/afk-discipline.md +38 -38
  299. package/pack/generated/claude/skills/rite-build/reference/evidence-standard.md +10 -0
  300. package/pack/generated/claude/skills/rite-build/reference/forge.md +186 -156
  301. package/pack/generated/claude/skills/rite-build/reference/one-slice-cycle.md +4 -3
  302. package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +96 -175
  303. package/pack/generated/claude/skills/rite-build/reference/wright-dispatch.md +129 -134
  304. package/pack/generated/claude/skills/rite-clarify/SKILL.md +89 -0
  305. package/pack/generated/claude/skills/rite-clarify/reference/decision-coverage.md +59 -0
  306. package/pack/generated/claude/skills/rite-converge/SKILL.md +35 -25
  307. package/pack/generated/claude/skills/rite-define/SKILL.md +57 -32
  308. package/pack/generated/claude/skills/rite-define/reference/gates.md +16 -15
  309. package/pack/generated/claude/skills/rite-define/reference/plan-template.md +16 -8
  310. package/pack/generated/claude/skills/rite-frame/reference/failure-modes.md +22 -24
  311. package/pack/generated/claude/skills/rite-plan/SKILL.md +44 -16
  312. package/pack/generated/claude/skills/rite-plan/reference/task-breakdown.md +4 -0
  313. package/pack/generated/claude/skills/rite-polish/SKILL.md +27 -23
  314. package/pack/generated/claude/skills/rite-prototype/SKILL.md +25 -26
  315. package/pack/generated/claude/skills/rite-prove/SKILL.md +27 -17
  316. package/pack/generated/claude/skills/rite-resolve/SKILL.md +12 -11
  317. package/pack/generated/claude/skills/rite-resolve/reference/answer-protocol.md +3 -0
  318. package/pack/generated/claude/skills/rite-review/SKILL.md +37 -28
  319. package/pack/generated/claude/skills/rite-seal/reference/phase-contract.md +27 -92
  320. package/pack/generated/claude/skills/rite-seal/reference/risk-and-rollback.md +13 -0
  321. package/pack/generated/claude/skills/rite-ship/reference/design-memory.md +31 -36
  322. package/pack/generated/claude/skills/rite-spec/SKILL.md +84 -135
  323. package/pack/generated/claude/skills/rite-spec/reference/investigation.md +37 -33
  324. package/pack/generated/claude/skills/rite-spec/reference/question-protocol.md +6 -2
  325. package/pack/generated/claude/skills/rite-spec/reference/spec-checklists.md +25 -24
  326. package/pack/generated/claude/skills/rite-spec/reference/spec-template.md +9 -2
  327. package/pack/generated/claude/skills/rite-spec/reference/state-workspace.md +13 -3
  328. package/pack/generated/claude/skills/rite-temper/SKILL.md +62 -47
  329. package/pack/generated/claude/skills/rite-temper/reference/review-dimensions.md +24 -22
  330. package/pack/generated/claude/skills/rite-vet/SKILL.md +110 -113
  331. package/pack/generated/claude/skills/rite-vet/reference/artifacts.md +42 -9
  332. package/pack/generated/claude/skills/rite-vet/reference/review-axes.md +39 -37
  333. package/pack/generated/codex/AGENTS.md +5 -2
  334. package/pack/generated/codex/agents/devrites-code-reviewer.toml +69 -47
  335. package/pack/generated/codex/agents/devrites-devex-reviewer.toml +75 -51
  336. package/pack/generated/codex/agents/devrites-doubt-reviewer.toml +35 -20
  337. package/pack/generated/codex/agents/devrites-evidence-scout.toml +75 -0
  338. package/pack/generated/codex/agents/devrites-forge-judge.toml +80 -59
  339. package/pack/generated/codex/agents/devrites-frontend-reviewer.toml +54 -37
  340. package/pack/generated/codex/agents/devrites-performance-reviewer.toml +55 -38
  341. package/pack/generated/codex/agents/devrites-plan-drafter.toml +77 -0
  342. package/pack/generated/codex/agents/devrites-plan-reviewer.toml +82 -47
  343. package/pack/generated/codex/agents/devrites-proof-runner.toml +80 -0
  344. package/pack/generated/codex/agents/devrites-retrospector.toml +54 -43
  345. package/pack/generated/codex/agents/devrites-security-auditor.toml +53 -35
  346. package/pack/generated/codex/agents/devrites-simplifier-reviewer.toml +56 -44
  347. package/pack/generated/codex/agents/devrites-slice-wright.toml +159 -163
  348. package/pack/generated/codex/agents/devrites-spec-reviewer.toml +40 -30
  349. package/pack/generated/codex/agents/devrites-strategy-reviewer.toml +65 -34
  350. package/pack/generated/codex/agents/devrites-test-analyst.toml +46 -28
  351. package/pack/generated/codex/hooks.json +4 -14
  352. package/pack/generated/codex/skills/devrites-api-interface/SKILL.md +7 -3
  353. package/pack/generated/codex/skills/devrites-audit/SKILL.md +47 -64
  354. package/pack/generated/codex/skills/devrites-browser-proof/SKILL.md +7 -3
  355. package/pack/generated/codex/skills/devrites-debug-recovery/SKILL.md +31 -16
  356. package/pack/generated/codex/skills/devrites-debug-recovery/reference/build-the-loop.md +24 -21
  357. package/pack/generated/codex/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +34 -6
  358. package/pack/generated/codex/skills/devrites-debug-recovery/reference/instrumentation.md +2 -2
  359. package/pack/generated/codex/skills/devrites-doubt/SKILL.md +32 -20
  360. package/pack/generated/codex/skills/devrites-frontend-craft/SKILL.md +7 -3
  361. package/pack/generated/codex/skills/devrites-interview/SKILL.md +60 -55
  362. package/pack/generated/codex/skills/devrites-lib/SKILL.md +18 -12
  363. package/pack/generated/codex/skills/devrites-lib/reference/intent-map.md +3 -2
  364. package/pack/generated/codex/skills/devrites-lib/reference/parallel-dispatch.md +82 -137
  365. package/pack/generated/codex/skills/devrites-lib/reference/reply-contract.md +8 -1
  366. package/pack/generated/codex/skills/devrites-lib/reference/standards/README.md +38 -55
  367. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +53 -27
  368. package/pack/generated/codex/skills/devrites-lib/reference/standards/agents.md +198 -190
  369. package/pack/generated/codex/skills/devrites-lib/reference/standards/anti-patterns.md +5 -15
  370. package/pack/generated/codex/skills/devrites-lib/reference/standards/ci-cd.md +27 -58
  371. package/pack/generated/codex/skills/devrites-lib/reference/standards/code-review.md +16 -52
  372. package/pack/generated/codex/skills/devrites-lib/reference/standards/coding-style.md +2 -10
  373. package/pack/generated/codex/skills/devrites-lib/reference/standards/context-hygiene.md +18 -61
  374. package/pack/generated/codex/skills/devrites-lib/reference/standards/core.md +23 -18
  375. package/pack/generated/codex/skills/devrites-lib/reference/standards/deprecation.md +17 -57
  376. package/pack/generated/codex/skills/devrites-lib/reference/standards/development-workflow.md +4 -33
  377. package/pack/generated/codex/skills/devrites-lib/reference/standards/git-workflow.md +4 -20
  378. package/pack/generated/codex/skills/devrites-lib/reference/standards/hooks.md +3 -14
  379. package/pack/generated/codex/skills/devrites-lib/reference/standards/patterns.md +9 -25
  380. package/pack/generated/codex/skills/devrites-lib/reference/standards/performance.md +0 -9
  381. package/pack/generated/codex/skills/devrites-lib/reference/standards/principles.md +1 -3
  382. package/pack/generated/codex/skills/devrites-lib/reference/standards/security.md +17 -7
  383. package/pack/generated/codex/skills/devrites-lib/reference/standards/testing.md +1 -27
  384. package/pack/generated/codex/skills/devrites-lib/reference/standards/tooling.md +46 -50
  385. package/pack/generated/codex/skills/devrites-lib/reference/workspace-artifact-schema.md +23 -10
  386. package/pack/generated/codex/skills/devrites-prose-craft/SKILL.md +7 -3
  387. package/pack/generated/codex/skills/devrites-refresh-indexes/SKILL.md +7 -3
  388. package/pack/generated/codex/skills/devrites-source-driven/SKILL.md +29 -24
  389. package/pack/generated/codex/skills/devrites-ux-shape/SKILL.md +7 -3
  390. package/pack/generated/codex/skills/rite/SKILL.md +19 -13
  391. package/pack/generated/codex/skills/rite/reference/menu.md +8 -6
  392. package/pack/generated/codex/skills/rite-adopt/SKILL.md +40 -40
  393. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +40 -31
  394. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +21 -21
  395. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +15 -6
  396. package/pack/generated/codex/skills/rite-build/SKILL.md +42 -33
  397. package/pack/generated/codex/skills/rite-build/reference/afk-discipline.md +38 -38
  398. package/pack/generated/codex/skills/rite-build/reference/evidence-standard.md +10 -0
  399. package/pack/generated/codex/skills/rite-build/reference/forge.md +186 -156
  400. package/pack/generated/codex/skills/rite-build/reference/one-slice-cycle.md +4 -3
  401. package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +96 -175
  402. package/pack/generated/codex/skills/rite-build/reference/wright-dispatch.md +129 -134
  403. package/pack/generated/codex/skills/rite-clarify/SKILL.md +105 -0
  404. package/pack/generated/codex/skills/rite-clarify/reference/decision-coverage.md +59 -0
  405. package/pack/generated/codex/skills/rite-converge/SKILL.md +42 -28
  406. package/pack/generated/codex/skills/rite-customize/SKILL.md +7 -3
  407. package/pack/generated/codex/skills/rite-define/SKILL.md +64 -35
  408. package/pack/generated/codex/skills/rite-define/reference/gates.md +16 -15
  409. package/pack/generated/codex/skills/rite-define/reference/plan-template.md +16 -8
  410. package/pack/generated/codex/skills/rite-doctor/SKILL.md +7 -3
  411. package/pack/generated/codex/skills/rite-dogfood/SKILL.md +7 -3
  412. package/pack/generated/codex/skills/rite-explain/SKILL.md +7 -3
  413. package/pack/generated/codex/skills/rite-frame/SKILL.md +7 -3
  414. package/pack/generated/codex/skills/rite-frame/reference/failure-modes.md +22 -24
  415. package/pack/generated/codex/skills/rite-handoff/SKILL.md +7 -3
  416. package/pack/generated/codex/skills/rite-learn/SKILL.md +7 -3
  417. package/pack/generated/codex/skills/rite-plan/SKILL.md +51 -19
  418. package/pack/generated/codex/skills/rite-plan/reference/task-breakdown.md +5 -1
  419. package/pack/generated/codex/skills/rite-polish/SKILL.md +34 -26
  420. package/pack/generated/codex/skills/rite-pov/SKILL.md +7 -3
  421. package/pack/generated/codex/skills/rite-pr-feedback/SKILL.md +7 -3
  422. package/pack/generated/codex/skills/rite-pressure-test/SKILL.md +7 -3
  423. package/pack/generated/codex/skills/rite-prototype/SKILL.md +32 -29
  424. package/pack/generated/codex/skills/rite-prove/SKILL.md +34 -20
  425. package/pack/generated/codex/skills/rite-quick/SKILL.md +7 -3
  426. package/pack/generated/codex/skills/rite-resolve/SKILL.md +19 -14
  427. package/pack/generated/codex/skills/rite-resolve/reference/answer-protocol.md +3 -0
  428. package/pack/generated/codex/skills/rite-review/SKILL.md +44 -31
  429. package/pack/generated/codex/skills/rite-seal/SKILL.md +7 -3
  430. package/pack/generated/codex/skills/rite-seal/reference/phase-contract.md +27 -92
  431. package/pack/generated/codex/skills/rite-seal/reference/risk-and-rollback.md +13 -0
  432. package/pack/generated/codex/skills/rite-ship/SKILL.md +7 -3
  433. package/pack/generated/codex/skills/rite-ship/reference/design-memory.md +31 -36
  434. package/pack/generated/codex/skills/rite-spec/SKILL.md +91 -138
  435. package/pack/generated/codex/skills/rite-spec/reference/investigation.md +37 -33
  436. package/pack/generated/codex/skills/rite-spec/reference/question-protocol.md +6 -2
  437. package/pack/generated/codex/skills/rite-spec/reference/spec-checklists.md +25 -24
  438. package/pack/generated/codex/skills/rite-spec/reference/spec-template.md +9 -2
  439. package/pack/generated/codex/skills/rite-spec/reference/state-workspace.md +13 -3
  440. package/pack/generated/codex/skills/rite-status/SKILL.md +7 -3
  441. package/pack/generated/codex/skills/rite-temper/SKILL.md +69 -50
  442. package/pack/generated/codex/skills/rite-temper/reference/review-dimensions.md +24 -22
  443. package/pack/generated/codex/skills/rite-vet/SKILL.md +117 -116
  444. package/pack/generated/codex/skills/rite-vet/reference/artifacts.md +42 -9
  445. package/pack/generated/codex/skills/rite-vet/reference/review-axes.md +40 -38
  446. package/pack/generated/codex/skills/rite-zoom-out/SKILL.md +7 -3
  447. package/package.json +1 -1
  448. package/scripts/build-release-tarball.sh +32 -15
  449. package/scripts/check-authority-drift.py +125 -0
  450. package/scripts/check-instruction-size-baseline.mjs +19 -11
  451. package/scripts/check-invocation-integrity.py +2 -0
  452. package/scripts/codex-generate.sh +69 -33
  453. package/scripts/grade-feature.sh +121 -40
  454. package/scripts/live-hosts/agent-result.schema.json +230 -0
  455. package/scripts/live-hosts/claude.sh +87 -0
  456. package/scripts/live-hosts/codex.sh +81 -0
  457. package/scripts/live-hosts/common.sh +113 -0
  458. package/scripts/live-hosts/fake-host.py +264 -0
  459. package/scripts/live-hosts/host-transport.py +287 -0
  460. package/scripts/release-check.sh +5 -1
  461. package/scripts/run-agent-contract-evals.py +1380 -0
  462. package/scripts/run-behavioral-evals.sh +24 -30
  463. package/scripts/run-evals.sh +1 -5
  464. package/scripts/run-live-behavioral-evals.py +1274 -144
  465. package/scripts/run-outcome-evals.sh +414 -88
  466. package/scripts/run-tests.mjs +30 -2
  467. package/scripts/skills-inventory.mjs +1 -1
  468. package/scripts/validate-workflow-security.py +39 -20
  469. package/scripts/validate-workspace-schema.py +362 -10
  470. package/scripts/validate.sh +21 -15
  471. package/engine/testdata/golden/TestParityWrightScope/devrites-edit-allowed.golden +0 -1
  472. /package/engine/testdata/golden/{TestParityReconcile/check-no-claimed.golden → TestParityBuildReadiness/arg=clarifyopen.golden} +0 -0
@@ -11,50 +11,41 @@ This is the Codex mirror of a DevRites skill. In Codex:
11
11
 
12
12
  - Load DevRites engineering standards from `.agents/skills/devrites-lib/reference/standards/`. Read `.agents/skills/devrites-lib/reference/standards/core.md` before workflow work, then load the other `.agents/skills/devrites-lib/reference/standards/*.md` files exactly when this skill asks for them.
13
13
  - Use the installed `devrites-engine` binary as the canonical runtime helper surface for orientation, gates, and state mutation.
14
- - When this skill asks for a DevRites specialist or writer agent, **explicitly** spawn the matching Codex custom agent from `.codex/agents/devrites-*.toml` through Codex subagents (`spawn_agent`), then wait for its result and reconcile it as the skill instructs. Do not do the review inline just because the instruction to spawn is embedded here: Codex under-fires embedded spawn/skill instructions (openai/codex #23496), so treat the spawn as required, not optional.
15
- - The independence of a fresh-context subagent is the point. If Codex genuinely cannot spawn subagents in the current surface, run the documented inline fallback and **label the result an inline fallback, not an independent review**: an inline pass shares the calling context and is weaker evidence.
16
- - Codex project hooks are installed in `.codex/hooks.json`. Review and trust them with `/hooks` before relying on hook enforcement.
14
+ - **Invocation and dispatch are different:** invoke means run a skill in this context; dispatch means start a fresh agent with `spawn_agent`, await it, and reconcile its result. Never describe inline skill work as a dispatch.
15
+ - For every DevRites specialist or writer dispatch, first call `spawn_agent` with the named `devrites-<role>` custom role. The matching project contract is `.codex/agents/devrites-<role>.toml`.
16
+ - If `spawn_agent` is callable but a named read-only role is unavailable, use generic `explorer` only when the host proves that run has a runtime-enforced read-only sandbox. Tell it to read `.codex/agents/devrites-<role>.toml`, follow its `developer_instructions`, and execute the unchanged packet. A missing read-only custom role is not evidence that spawning is unavailable.
17
+ - Never dispatch generic `worker` for `devrites-slice-wright` unless the host proves that worker run carries exact DevRites identity and the same `.wright-allowlist` enforcement as the named role. Codex reports a generic run as `agent_type=worker`, so the generated global hooks cannot prove that binding. Reject that unsafe rung and use the documented labelled inline wright path with `.reconcile-inline` plus the full reconcile gate.
18
+ - If the host cannot prove the generic explorer is runtime read-only, reject that rung too. Only when no spawn primitive exists or a higher-priority policy rejects a safe spawn may the root run the documented discipline inline. Label it `independence: fallback`, never call it independent, and apply every fallback risk gate. An unbound generic wright or unconfined generic explorer is such a safety rejection, not evidence that no agents exist.
19
+ - Wait for every required fresh-context dispatch before reconciling or advancing. A backgrounded or lost result is incomplete.
20
+ - Codex project hooks are installed in `.codex/hooks.json`; declared-leaf hooks are scoped inside `.codex/agents/devrites-*.toml`. Review and trust them with `/hooks` before relying on hook enforcement.
17
21
  - When this skill asks a HITL question via `AskUserQuestion`: Codex's equivalent (`request_user_input`) exists only in Plan mode. Outside Plan mode, render the option set as a plain numbered list in chat and **end the turn** so the human answers: NEVER silently pick an option yourself; auto-picking is AFK's contract, gated by the `.devrites/AFK` sentinel.
18
22
 
19
23
 
20
- # $rite-vet: vet the plan before you build
24
+ # $rite-vet: review the plan before build
21
25
 
22
- Take a defined plan and **vet** it the way a senior staff engineer would in a plan review:
23
- challenge the scope, walk architecture / plan code-quality / test-coverage / performance,
24
- calibrate every finding by confidence (and refuse to emit one you can't trace to a quoted
25
- line), design the test coverage the build will target, and map the failure modes and
26
- parallel lanes: *before* `$rite-build` writes a line. The one DevRites step that hardens
27
- the **implementation plan** at the engineering level and folds the result into the canonical
28
- contract, so the build follows a reviewed plan. Runs on **every** plan (depth scales to
29
- stakes; never skipped) and is always part of `$rite-autocomplete`; `--cross-model` adds a
30
- different-model second opinion. **Read the active workspace first**; if there's no
31
- `plan.md`, tell the user to run `$rite-define`.
26
+ Review a defined plan for implementation scope, architecture, code quality, test
27
+ coverage, performance, failure modes, and parallel work. Cite the source for every
28
+ finding and design the test coverage that `$rite-build` will use. Fold accepted
29
+ engineering changes into the canonical plan before code is written. Run this step on
30
+ **every** plan; depth varies with risk. `$rite-autocomplete` always includes it, and
31
+ `--cross-model` adds a second opinion from another model. **Read the active workspace
32
+ first**; if there is no `plan.md`, tell the user to run `$rite-define`.
32
33
 
33
- This is the engineering counterpart to `$rite-temper` (which is strategic, on the *spec*).
34
- Temper decides *the right thing*; vet decides *the right way to build it*.
34
+ `$rite-temper` reviews product scope and strategy in the spec. `$rite-vet` reviews how
35
+ to implement that settled scope.
35
36
 
36
37
  ## Rules consulted (read on demand from `.agents/skills/devrites-lib/reference/standards/`)
37
- Pull on demand: `principles.md` (the project
38
- invariants gate (how `.devrites/principles.md` is scored pass/fail), `patterns.md` +
39
- `coding-style.md` (the over-engineering / reuse-first / YAGNI rubric) reuse the pack's
40
- standard), `testing.md` (the test-coverage axis) + `spec-grammar.md` (when the spec uses
41
- structured Requirement/Scenario blocks, each scenario is a coverage unit `test-plan.md` must
42
- map), `performance.md` (the perf axis),
43
- `error-handling.md` (failure-mode coverage), `development-workflow.md` (parallel lanes,
44
- definition of done), `afk-hitl.md` (irreversible-risk list + gate ceiling),
45
- `developer-experience.md` (when the plan ships a developer-facing surface (API / CLI / SDK /
46
- webhook / config / error messages / getting-started) predict the DX scorecard here),
47
- `elicitation.md` (the move-set to deepen an axis finding or a risky design choice: selected by
48
- the section's risk: Tournament for two viable designs, Delphi for a shaky estimate, Assumption
49
- Audit for a plan resting on unstated beliefs).
50
- - `definition-of-done.md`: standing Done bar: acceptance mapped, fresh proof, no open hard gates, scoped edits, rollback/docs where needed.
38
+ Pull the standard named by the active axis: `principles.md`, `patterns.md`,
39
+ `coding-style.md`, `testing.md`, `spec-grammar.md`, `performance.md`,
40
+ `error-handling.md`, `development-workflow.md`, `afk-hitl.md`,
41
+ `developer-experience.md`, `elicitation.md`, and `definition-of-done.md`.
51
42
 
52
43
 
53
44
  ## Operating rules
54
- - **Review the plan, not the spec's ambition.** The spec's scope/ambition is `$rite-temper`'s
55
- job and is treated as settled here. Vet asks *given this scope, is this the right, simplest,
56
- best-tested, lowest-risk way to build it*, and challenges only implementation scope creep.
57
- - **You harden the plan directly; the reviewer judges.** Vet *is* the plan-hardening phase, so
45
+ - **Review implementation, not product ambition.** Treat the scope established by
46
+ `$rite-temper` as settled. Check whether the plan is simple, well tested, and low risk,
47
+ and challenge only implementation scope creep.
48
+ - **The root updates the plan; the reviewer judges.** Vet is the plan-hardening phase, so
58
49
  behavior-preserving plan refinements (test requirements, tightened scope boundaries, ordering,
59
50
  parallel lanes, error-handling + failure-mode coverage) are written straight into
60
51
  `plan.md` / `tasks.md` / `test-plan.md`. You are the single canonical writer. A finding that
@@ -62,80 +53,71 @@ Audit for a plan resting on unstated beliefs).
62
53
  through the **Spec Drift Guard** (record in `drift.md`, recorded decision, then `$rite-plan
63
54
  repair` for any structural reslice). Nothing that grows the build's scope lands without a
64
55
  recorded human decision.
65
- - **Confidence over assertion.** Every finding carries a confidence band; a finding you cannot
56
+ - **Support every finding.** Every finding carries a confidence band; a finding you cannot
66
57
  back by quoting the plan/spec line (or the code it references) is forced to low confidence and
67
58
  suppressed from the main report: see the verification gate in [`reference/review-axes.md`](reference/review-axes.md).
68
- - **Bound rigor by reversibility.** Auth / migration / public-API / data-model touches get
69
- maximum conservatism and always pause (irreversible-risk list), regardless of run mode.
70
- - **Honest verdict, gated on the floor.** Never round "thin" up to "ready"; the axis verdict is
71
- the weakest finding, not an average. Record every call's *why*.
59
+ - **Apply maximum caution to hard-to-reverse changes.** Auth, migration, public API, and
60
+ data-model changes always pause under the irreversible-risk list.
61
+ - **Use the lowest axis band.** Never round `thin` up to `ready`; do not average the
62
+ axes. Record the reason for every decision.
63
+ - **Search before asking.** Apply `afk-hitl.md` decision ownership: verify facts and fold
64
+ reversible technical hardening into the plan; ask only about human-owned choices.
65
+ - **Root hardens; reviewer judges.** Dispatch follows the file-backed contract in
66
+ [`agents.md`](../devrites-lib/reference/standards/agents.md). The root owns every
67
+ question, decision, fold-back, readiness verdict, and workspace write.
72
68
 
73
69
  ## Workflow
74
70
  0. **Read `.agents/skills/devrites-lib/reference/standards/core.md`** first.
75
- Then **run the shared orientation preamble**. It prints `state.md`, the artifacts present,
76
- the run mode (HITL/AFK), and the open-question tally by gate, so you orient deterministically
77
- instead of re-deriving state from raw Markdown:
71
+ Then run the shared orientation preamble. It prints `state.md`, present artifacts,
72
+ run mode, and open-question totals:
78
73
  ```bash
79
74
  devrites-engine preamble
80
75
  devrites-engine snapshot
81
76
  ```
82
- Then the workspace: `plan.md`, `tasks.md`, `spec.md`
77
+ Then the workspace: `plan.md`, `tasks.md`, `spec.md`, `decision-coverage.md`
83
78
  (for intent + acceptance), `strategy.md` (if `$rite-temper` ran), `decisions.md`,
84
79
  `assumptions.md`, `design-brief.md` (if UI), `state.md`. Require a `plan.md` whose
85
- Readiness gate passes (or `Plan approved`): else STOP → `$rite-define`. Prefer a
80
+ Readiness gate passes (or `Plan approved`): else STOP → `$rite-define`. Require
81
+ `Decision coverage: CLEAR`: else STOP → `$rite-clarify`. Prefer a
86
82
  code-intelligence index if available (see
87
83
  `.agents/skills/devrites-lib/reference/standards/tooling.md`) for placement / blast-radius / reuse checks.
88
- 1. **Calibrate depth. Never skip this step.** See [`reference/depth.md`](reference/depth.md). Every plan is
89
- vetted; what scales is the *depth*. A simple, single-module, reversible plan with no
90
- irreversible-risk / data-model / new-pattern trigger → **light pass** (brief scope check + a
91
- one-line scan per axis + the acceptance→test map). Any full-pass trigger (or `--full`) → the
92
- **full pass** below. There is no skip: every feature leaves a recorded engineering verdict and
93
- a `test-plan.md` coverage map.
94
- 2. **Scope Challenge (blocking gate):** [`reference/review-axes.md`](reference/review-axes.md)
95
- §0. Search prior archived decisions for the plan's main nouns before asking the human to re-decide:
96
- `devrites-engine decisions search "<2-4 plan nouns>"` (run `decisions index` first if needed).
97
- What already exists that solves a sub-problem (reuse vs rebuild)? The minimum diff for the
98
- stated acceptance? Complexity smell (the plan touches **>8 files** or adds **>2 new
99
- services/modules**) **STOP and ask** before any axis. Verify each new pattern / infra choice
100
- against a built-in (dispatch `devrites-source-driven`); completeness check (with AI, full
101
- coverage is ~100× cheaper than the human-hours saved by a shortcut: prefer complete); and a
102
- distribution check for any new artifact.
103
- 2a. **Cross-artifact analyze gate + principles / charter / conventions gate.** Before the axes, run
104
- one read-only consistency+coverage pass over `spec.md` + `plan.md` + `tasks.md` (+ `traceability.md`
105
- if present); any **CRITICAL**: an acceptance criterion with no slice, a slice satisfying no
106
- criterion, a contradiction across artifacts, a requirement stated twice with conflicting terms:
107
- **blocks `$rite-build`** until resolved. The engine covers the deterministic floor (AC coverage,
108
- orphan slices, vague adjectives); you add the semantic passes it can't: **terminology drift**
109
- (the same concept named differently across artifacts: normalize to the spec's term) and
110
- **duplicated or conflicting requirements**. Then score
111
- the three project gates as explicit **pass/fail** on the planned approach:
112
- - **Principles** (`.devrites/principles.md`, rubric in [`principles.md`](../devrites-lib/reference/standards/principles.md)).
113
- The authored invariants the project will not break. A plan that bakes in a violation of a
114
- declared principle with **no recorded, human-approved exception** is a **top-severity** finding,
115
- walked **first**, and **blocks `$rite-build`**. Absent or empty file → none declared → passes;
116
- **never block for the absence of principles**. A genuine need to break one routes to a scoped,
117
- dated exception in the principles register: never a silent work-around (adding the exception is
118
- an irreversible-risk decision: it always pauses for a human, even in AFK).
119
- - **The anti-slop charter** (`coding-style.md` + `prose-style.md`) and **the conventions ledger**
120
- (`.devrites/conventions.md`): a plan that bakes in a god-module, a speculative abstraction with
121
- no second caller, or a dependency where an in-repo option exists is a **top-severity** violation.
122
- **Re-check all three after the axes harden the plan** (post-design). Write the result to `analysis.md`.
84
+ 1. **Set review depth. Never skip this step.** Apply
85
+ [`reference/depth.md`](reference/depth.md) exactly. Every plan leaves a recorded
86
+ engineering verdict and `test-plan.md` coverage map.
87
+ 1a. **Required initial independent pass (light and full).** Before hardening or writing,
88
+ freeze the candidate and dispatch `devrites-plan-reviewer` with the plan/spec packet.
89
+ Await and validate its report. Light depth reduces the inline hardening, not this
90
+ independent gate. Dispatch the DevEx predictor alongside it when triggered (within the
91
+ maximum-three read-only budget).
92
+ 2. **Scope challenge (blocking gate):** apply §0 of
93
+ [`reference/review-axes.md`](reference/review-axes.md). Search prior decisions first:
94
+ `devrites-engine decisions search "<2-4 plan nouns>"`. Harden to the smallest
95
+ behavior-preserving plan; ask only when that changes acceptance or explicit architecture policy.
96
+ 2a. **Cross-artifact analyze + project gates.** Run the deterministic gate, add the
97
+ semantic terminology/conflict pass, and score principles, the anti-slop charter, and
98
+ conventions using their named standards. Any Critical blocks `$rite-build`; a principle
99
+ exception is always human-owned, while an absent principles file passes. Re-check after
100
+ hardening and write the result to `analysis.md`.
123
101
  ```bash
124
102
  devrites-engine analyze; echo "analyze rc=$?"
125
103
  ```
126
- 3. **Four-axis review:** [`reference/review-axes.md`](reference/review-axes.md), through the
127
- senior-engineer lenses in [`reference/eng-lenses.md`](reference/eng-lenses.md): **Architecture
128
- Plan code-quality Test-coverage design Performance**, ≤8 findings per axis, each
129
- `[severity] (confidence: N/10) <ref> finding`. **Walk findings WITH the human, one at a
130
- time** via `AskUserQuestion` (best-guess + why + options with effort/risk/maintenance, mapped
131
- to a rule): the artifact is the *output* of the review, not a substitute for it.
132
- When an axis finding hinges on a genuinely open design choice or a shaky estimate, deepen that
133
- one finding with a fitting technique from
134
- [`elicitation.md`](../devrites-lib/reference/standards/elicitation.md) (Tournament for two viable
135
- designs, Delphi for the estimate, Assumption Audit for unstated beliefs) before you band it. (AFK ceiling
136
- single-sourced in [`reference/depth.md`](reference/depth.md): hardening /
137
- coverage-increasing findings auto-apply; **anything that grows scope or changes acceptance is a
138
- blocking pause**; irreversible-risk always pauses.)
104
+ 2b. **Build-entry preflight.** Using [`reference/artifacts.md`](reference/artifacts.md), verify
105
+ each exact proof command/cwd/tool/version and prerequisite; package names against their
106
+ authoritative source plus nearest manifest/lockfile; parser-sensitive planned syntax in an
107
+ isolated fixture; and the existing UI/browser harness where applicable. Record complete
108
+ SHA-256 provenance inputs. This is non-mutating and need not make future behavior pass.
109
+ 2c. **Implementation-readiness audit.** Goal-backward map every REQ/AC/NFR, interaction,
110
+ edge/prohibition, and decision-coverage row to a slice and executable proof. Verify
111
+ UX/spec/architecture alignment, producer-consumer contracts, slice independence/order and
112
+ wiring, exact prerequisites, failure paths, operations, observability, rollout, and rollback.
113
+ Fold technical fixes into the plan. Product/risk gaps are `NEEDS CLARIFICATION`
114
+ `$rite-clarify`; technical plan/preflight gaps are `NEEDS REPLAN` → `$rite-plan repair`.
115
+ Neither becomes a build qid.
116
+ 3. **Review four axes:** apply [`reference/review-axes.md`](reference/review-axes.md)
117
+ through [`reference/eng-lenses.md`](reference/eng-lenses.md). Fold verified,
118
+ behavior-preserving technical findings into the plan. Walk only human-owned decisions with
119
+ the human, one coherent option packet at a time. The AFK ceiling remains owned by
120
+ [`reference/depth.md`](reference/depth.md): scope/acceptance changes and irreversible risk pause.
139
121
  4. **Required outputs:** write every shape and fold-back required by
140
122
  [`reference/artifacts.md`](reference/artifacts.md), using the review rules in
141
123
  [`reference/review-axes.md`](reference/review-axes.md). Ground parallelization in:
@@ -143,34 +125,52 @@ Audit for a plan resting on unstated beliefs).
143
125
  devrites-engine lanes plan "$(cat .devrites/ACTIVE 2>/dev/null)"
144
126
  ```
145
127
  Completion: every scenario and acceptance criterion maps to planned proof, every slice is
146
- one-pass implementable, and developer-facing plans have a predicted `devex.md` scorecard.
147
- 4a. **Forge gate (only when `Forge: yes`).** Apply the eligibility and scorecard contract in
148
- [`rite-build/reference/forge.md`](../rite-build/reference/forge.md). Confirm and record
149
- genuinely distinct strategies, or clear the flag; an ineligible Forge never reaches build.
150
- 5. **Write `eng-review.md` + `test-plan.md`, fold back:** [`reference/artifacts.md`](reference/artifacts.md).
151
- `eng-review.md` is the durable record; `test-plan.md` is the build-readable coverage target
152
- (`$rite-build` and `$rite-prove` read it). Harden `plan.md` / `tasks.md` directly for
153
- behavior-preserving refinements; route every acceptance/behavior-changing delta through the
154
- **Spec Drift Guard** (`drift.md` + recorded decision + `$rite-plan repair`). Append
155
- `decisions.md` (one ADR per material call) and `assumptions.md`. Re-run the gate after
156
- every fold-back so a task edit cannot invalidate the earlier pass:
128
+ one-pass implementable, the Build-entry preflight is green or names an owned prerequisite,
129
+ and developer-facing plans have a predicted `devex.md` scorecard.
130
+ 4a. **Forge gate.** `$rite-define` leaves `no` / `none` / `none`; Vet alone promotes under
131
+ [`rite-build/reference/forge.md`](../rite-build/reference/forge.md). Require a costly
132
+ unresolved architecture fork, 2–3 distinct complete contiguous `A`–`C` strategies, every
133
+ slice AC plus exact `test-plan.md` rows/commands, and `manifest-env-v1` as an explicit
134
+ Build-entry prerequisite. After final fold-back the three fields must agree, else clear
135
+ Forge before READY.
136
+ 5. **Write and fold back every artifact required by
137
+ [`reference/artifacts.md`](reference/artifacts.md).** Route every
138
+ acceptance/behavior-changing delta through the **Spec Drift Guard** (`drift.md` +
139
+ recorded decision + `$rite-plan repair`). After any edit to
140
+ `brief.md`, `spec.md`, `decisions.md`, `assumptions.md`, or `questions.md`, re-scan the
141
+ affected coverage rows, assumption audit, residual uncertainty, and closed gates.
142
+ Partial/Missing, an unowned material assumption, or an open blocking/escalating question is
143
+ `NEEDS CLARIFICATION` → `$rite-clarify`/HITL; never refresh past it. Only after the matrix is
144
+ re-closed, run `devrites-engine readiness-digest coverage <slug>` and replace the complete
145
+ `Coverage inputs SHA-256` line in `decision-coverage.md`. This coverage refresh must precede
146
+ `devrites-engine readiness-digest engineering <slug>`.
147
+ Re-run the gate after every fold-back so a task edit cannot invalidate the earlier pass:
157
148
  ```bash
158
149
  devrites-engine analyze; echo "final analyze rc=$?"
159
150
  ```
160
151
  Any non-zero result blocks the handoff. Then update `state.md`:
161
- `Phase: vet`, `Next step: $rite-build`; on a blocking pause write the `Awaiting human` block +
162
- `Status: awaiting_human` before stopping.
163
- 6. **Adversarial verification loop.** Apply the light/full branching contract in
164
- [`reference/depth.md`](reference/depth.md). Full mode dispatches the fresh-context plan
165
- reviewer, plus the devex predictor when applicable, for at most three repair iterations;
152
+ write one typed field to `eng-review.md`: `Implementation readiness: READY`,
153
+ `NEEDS CLARIFICATION`, or `NEEDS REPLAN`. Only READY sets `Phase: vet` and
154
+ `Next step: $rite-build`, after a final sweep leaves no foreseeable human choice except a
155
+ justified action-time checkpoint. Technical failure records its reproduction and
156
+ `$rite-plan repair` without a qid; a human-owned contract gap routes `$rite-clarify` and
157
+ uses the normal awaiting-human block.
158
+ 6. **One narrow recheck after accepted edits.** If steps 2 through 5 changed the frozen candidate,
159
+ dispatch `devrites-plan-reviewer` once more with only the accepted initial findings,
160
+ changed planning paths, affected criteria, and the new immutable identity. Do not repeat
161
+ the full review or start a third loop. If nothing changed, the initial report is final.
162
+ If the recheck causes an accepted edit, repeat step 5, including coverage refresh and analyze,
163
+ before generating the engineering digest.
166
164
  [`reference/cross-model.md`](reference/cross-model.md) owns the optional outside voice.
167
- Completion: the final axis floor clears or a blocking gate is recorded.
168
- 7. **STOP.** Report the scope verdict, the per-axis floor, the coverage gaps closed, and the
169
- failure-mode criticals; recommend `$rite-build`.
165
+ Completion: the final axis floor clears, an objective technical blocker is recorded, or a
166
+ genuine human-owned gate is recorded.
167
+ 7. **STOP.** Report the scope verdict, lowest axis band, coverage gaps closed, the
168
+ Build-entry preflight, expected action-time checkpoints, and the failure-mode criticals;
169
+ recommend `$rite-build` only when the entry contract is ready.
170
170
 
171
- > **Mid-flight discipline.** When tempted to batch-dump findings into `eng-review.md` and skip
172
- > the walk-through, harden the plan past a finding that changes acceptance, score before
173
- > quoting the source, or wave through a complexity smell "to keep moving": see
171
+ > **Mid-flight discipline.** Do not replace the interactive review with
172
+ > `eng-review.md`, change acceptance through plan hardening, score without source
173
+ > evidence, or ignore unexplained complexity. See
174
174
  > [`reference/anti-patterns.md`](reference/anti-patterns.md).
175
175
 
176
176
  ## Output
@@ -181,12 +181,13 @@ Default success shape:
181
181
  ```
182
182
  Done: plan vetted for <slug>; depth <light|full> with axis floor <band>.
183
183
  Changed: eng-review.md, test-plan.md, plan.md, decisions.md
184
- Evidence: coverage <x/y> planned; open findings Critical 0 / Important 0 / Suggestion <n>; reviewer loop <n>; outside-voice <ran|skipped-unavailable|disabled>
184
+ Evidence: Implementation readiness: READY; coverage <x/y> planned; build-entry preflight <pass>; open findings Critical 0 / Important 0 / Suggestion <n>; reviewer loop <n>; outside-voice <ran|skipped-unavailable|disabled>
185
185
  Open: none
186
186
  Next: $rite-build
187
187
  Record: .devrites/work/<slug>/eng-review.md
188
188
  ↻ Hygiene: /clear before $rite-build
189
189
  ```
190
190
  If a blocker or Spec Drift Guard delta remains, use the shared `Stopped / blocked`
191
- form and route `Fix:` to `$rite-plan`; do not recommend `$rite-build`.
191
+ form and route `Fix:` to `$rite-clarify` for product/risk decisions or `$rite-plan`
192
+ for technical replanning; do not recommend `$rite-build`.
192
193
  **DO NOT write code, slice, or run the build here**. That's `$rite-build`. Vet reviews and hardens the plan; it never implements.
@@ -1,9 +1,7 @@
1
1
  # `eng-review.md` + `test-plan.md` templates + fold-back rules
2
2
 
3
- `$rite-vet` produces two artifacts and a set of fold-back edits. `eng-review.md` is the durable
4
- **record** of the review; `test-plan.md` is the build-readable **coverage target**; the
5
- fold-back edits to `plan.md` / `tasks.md` are what the build follows. The record
6
- without the fold-back is dead prose: the build reads `plan.md` + `test-plan.md`, not `eng-review.md`.
3
+ `eng-review.md` records the review; `test-plan.md` is the build-readable coverage target.
4
+ Fold findings into `plan.md`/`tasks.md`: review prose alone does not change the build.
7
5
 
8
6
  ## `eng-review.md`: the record
9
7
  Write to `.devrites/work/<slug>/eng-review.md`. If one exists for the slug, **update** it, don't
@@ -12,6 +10,8 @@ clobber.
12
10
  ```markdown
13
11
  # Eng review: <slug>
14
12
  Vetted: <iso> Cross-model: ran (codex) | off
13
+ Implementation readiness: <READY | NEEDS CLARIFICATION | NEEDS REPLAN>
14
+ Readiness inputs SHA-256: <exact value from `devrites-engine readiness-digest engineering <slug>`>
15
15
 
16
16
  ## 1. Depth
17
17
  light | full (<trigger that escalated it>) # every plan is vetted — light or full, never skipped (see depth.md)
@@ -22,6 +22,19 @@ light | full (<trigger that escalated it>) # every plan is vetted — light
22
22
  - Complexity: ok | smell (<n files, m new services) → asked → <reduce|proceed, why>
23
23
  - Built-in / completeness / distribution: <flags, with source citations>
24
24
 
25
+ ## 2a. Build-entry preflight
26
+ | Gate | Command + cwd | Tool/version | Prerequisite owner | Full provenance inputs | Fixture/smoke | Verdict |
27
+ |---|---|---|---|---|---|---|
28
+ | <test/browser/package> | <command · cwd> | <version> | <owner + item> | <tool/manifest/lockfile/config SHA-256> | <what ran> | pass/fail/blocked |
29
+
30
+ ## 2b. Implementation readiness
31
+ | Surface | Requirement/decision | Boundary/wiring | Slice | Proof | Verdict |
32
+ |---|---|---|---|---|---|
33
+ | <journey/data/interface/ops> | <REQ/AC + coverage row> | <contract + key link> | <SLICE-###> | <test-plan row> | ready/gap |
34
+
35
+ Inventory/currentness: <pass/gaps> · slice order/independence: <pass/gaps> ·
36
+ UX/spec/architecture: <pass/n-a/gaps> · operations/rollout/rollback: <pass/n-a/gaps>
37
+
25
38
  ## 3. Axis findings (floor-gated)
26
39
  | Axis | Floor band | Findings (sev · confidence) |
27
40
  |---|---|---|
@@ -47,6 +60,7 @@ Sequential — no opportunity # OR the dependency table + lanes + order + conf
47
60
  ## 7. Completion summary
48
61
  - Scope: accepted | reduced · Architecture: <n> · Code-quality: <n>
49
62
  - Coverage: <x/y> planned, <n> gaps, <n> regressions (Critical)
63
+ - Build entry: preflight <pass/fail/blocked>; action-time checkpoints <none/list>
50
64
  - Failure modes: <n> mapped, <n> critical gaps
51
65
  - NOT in scope: written · What already exists: written
52
66
  - Plan: hardened in place | <n> deltas via Spec Drift Guard
@@ -61,6 +75,14 @@ test and where*, not implementation detail.
61
75
  # Test plan: <slug>
62
76
  From $rite-vet on <iso>. Runner + conventions: <detected framework + command>.
63
77
 
78
+ ## Build-entry preflight
79
+ | Gate | Command | Cwd | Expected | Prerequisites | Provenance to recapture |
80
+ |---|---|---|---|---|---|
81
+ | <test/browser/package> | <exact command> | <path> | <exit/output> | <service/browser/credential owner> | <tool version + full SHA-256s> |
82
+
83
+ Link any disposable parser fixture. Build evidence recomputes every digest; preflight values
84
+ are not post-build proof.
85
+
64
86
  ## Coverage diagram
65
87
  <the ASCII code-paths + user-flows diagram from review-axes.md, with COVERAGE / GAPS / REGRESSIONS line>
66
88
 
@@ -77,11 +99,8 @@ fails any row with no passing result — an unverified element is a NO-GO, like
77
99
  ```markdown
78
100
  | Element / flow | Kind (field/checkbox/select/radio/toggle/button/link/flow) | Level | Test file | Asserts (action → expected) |
79
101
  |---|---|---|---|---|
80
- | email field | field | unit | <form.test> | invalid → error shown; valid → accepted |
81
- | 'remember me' | checkbox | unit | <form.test> | toggles the persisted flag |
82
- | country | select | unit | <form.test> | options load; change fires handler |
83
- | submit | button | component | <form.test> | disabled until valid; click → submits once |
84
- | login | flow ★★★ | E2E | <login.e2e> | enter → submit → lands on dashboard |
102
+ | email field | field | unit | <form.test> | invalid → error; valid → accepted |
103
+ | login | flow ★★★ | E2E | <login.e2e> | submit dashboard |
85
104
  ```
86
105
  Omit the whole section only for a slice with **no** interactive surface (pure backend/logic).
87
106
 
@@ -114,6 +133,9 @@ acceptance/behavior changes route through the **Spec Drift Guard**.
114
133
  - `tasks.md` slices ← added test requirements (point at `test-plan.md`), added error-handling /
115
134
  failure-mode coverage, tightened slice scope, a split of a refactor+behavior slice into two.
116
135
  Adjust a slice's `Gate:` upward when vet reveals higher stakes (e.g. an unflagged migration).
136
+ For an eligible architecture competition, set the canonical `Forge`, `Forge strategies`,
137
+ and `Forge scorecard` fields only after the acceptance→test map is final; otherwise keep
138
+ `no` / `none` / `none`.
117
139
  - Re-run the `plan.md` Readiness gate after edits; it must still pass.
118
140
  - **Route through the Spec Drift Guard** (record `drift.md` + a recorded decision, then `$rite-plan
119
141
  repair` for any structural reslice) for anything that **changes an acceptance criterion, product
@@ -133,3 +155,14 @@ acceptance/behavior changes route through the **Spec Drift Guard**.
133
155
  `$rite-build` (the slice-wright) and `$rite-prove` **read `test-plan.md`** as the coverage
134
156
  target; `$rite-review` and `$rite-seal` may consult `eng-review.md` for the failure-mode +
135
157
  scope record.
158
+ - Write `test-plan.md` and finish all fold-back edits and rechecks first. If this pass changed
159
+ `brief.md`, `spec.md`, `decisions.md`, `assumptions.md`, or `questions.md`, revalidate the
160
+ affected decision-coverage rows, assumption audit, residual uncertainty, and closed gates.
161
+ Partial/Missing, an unowned material assumption, or an open blocking/escalating question routes
162
+ `$rite-clarify`/HITL; never hide it with a new digest. Once re-closed, run
163
+ `devrites-engine readiness-digest coverage <slug>` and replace the complete
164
+ `Coverage inputs SHA-256` line in `decision-coverage.md`. Only then run
165
+ `devrites-engine readiness-digest engineering <slug>` and copy its complete
166
+ field line into `eng-review.md`. The build gate rejects a stale digest,
167
+ placeholders, non-passing preflight/readiness rows, empty tables, or an
168
+ acceptance criterion with no test mapping.
@@ -1,57 +1,53 @@
1
- # The vet review: scope challenge, four axes, required outputs
1
+ # Vet review: scope, four axes, and outputs
2
2
 
3
- The body of `$rite-vet`. Run §0 first as a blocking gate, then the four axes one at a time,
4
- then the required outputs. Apply the senior-engineer lenses in [`eng-lenses.md`](eng-lenses.md)
5
- throughout. They're how you *see* the findings, not a separate checklist. Every finding is
6
- calibrated and gated (see "Confidence + verification gate" below) before it reaches the human.
3
+ Run §0 first as a blocking gate, then review the four axes in order and produce the
4
+ required outputs. Apply the engineering lenses in [`eng-lenses.md`](eng-lenses.md)
5
+ throughout rather than as a separate checklist. Calibrate every finding through the
6
+ confidence and verification gate before presenting it.
7
7
 
8
8
  ---
9
9
 
10
- ## §0. Scope Challenge (blocking gate: runs before any axis)
10
+ ## §0. Scope challenge (blocking gate)
11
11
 
12
- Before reviewing *how* the plan builds, challenge *whether it should build this much*. This is
13
- implementation-scope discipline (the spec's ambition is settled, that was `$rite-temper`).
12
+ Before reviewing implementation details, check whether the plan includes more work than
13
+ the settled spec requires.
14
14
 
15
15
  1. **What already exists?** For each sub-problem in the plan, find the existing code/flow that
16
16
  already solves it (use a code-intelligence index if available: see `../../devrites-lib/reference/standards/tooling.md`).
17
17
  Can the plan **capture outputs from an existing
18
18
  flow** instead of building a parallel one? Reuse → extend → build new, in that order
19
19
  (`coding-style.md`). List every reuse opportunity the plan misses.
20
- 2. **Minimum diff.** What's the smallest set of changes that meets the spec's *acceptance
21
- criteria*? Flag any planned work that can be deferred without blocking acceptance. Be ruthless
22
- about implementation scope creep, but never cut an acceptance criterion (that's a Drift Guard
23
- matter, not a trim).
20
+ 2. **Minimum diff.** Find the smallest set of changes that meets the spec's acceptance
21
+ criteria. Flag work that can be deferred without blocking acceptance. Do not cut an
22
+ acceptance criterion; that requires the Drift Guard.
24
23
  3. **Complexity smell.** If `plan.md` touches **>8 files** or adds **>2 new services / modules /
25
24
  classes**, treat it as a smell. Check the plan's complexity gate justifies it. If it doesn't
26
- **STOP**: name what's overbuilt, propose a smaller version that meets acceptance, and ask
27
- via `AskUserQuestion` whether to reduce or proceed. Do not start the axes until answered.
25
+ harden to the smallest acceptance-preserving plan. Ask only if reduction changes
26
+ acceptance or explicit architecture policy; never start the axes unresolved.
28
27
  4. **Built-in check.** For each new pattern / infra component / concurrency approach the plan
29
28
  introduces, verify a framework/runtime built-in doesn't already do it, and that the choice is
30
- current best practice with no known footgun: dispatch `devrites-source-driven` to confirm at
29
+ current best practice with no known footgun: invoke `devrites-source-driven` to confirm at
31
30
  the source and record the citation. A custom roll where a built-in exists is a scope-reduction
32
31
  finding.
33
- 5. **Completeness check.** Is the plan doing the complete version or a shortcut? With AI-assisted
34
- coding the cost of completeness (full edge-case handling, complete error paths, real test
35
- coverage) is a fraction of what it was: a shortcut that saves human-hours but only saves
36
- minutes here is a false economy. Prefer the complete option; flag shortcuts that exist only to
37
- save effort that AI has already made cheap.
32
+ 5. **Completeness check.** Identify shortcuts in edge-case handling, error paths, and
33
+ test coverage. Prefer the complete option when AI-assisted implementation makes the
34
+ additional work small. Flag shortcuts that save little time but leave known gaps.
38
35
  6. **Distribution check.** If the plan introduces a new artifact (CLI binary, package, container,
39
36
  deployable), does it include how it gets built / published / installed? If distribution is
40
37
  deferred, say so explicitly in "NOT in scope": don't let it silently drop.
41
38
 
42
- > **STOP discipline.** If the complexity smell trips, the `AskUserQuestion` is a tool call, not
43
- > prose. Naming the 80%-solution in chat and continuing is the failure this gate exists to prevent.
39
+ > **STOP discipline.** Fold technical reduction into the plan; ask and stop only for a
40
+ > human-owned choice.
44
41
 
45
42
  If the smell does not trip, present the §0 findings and proceed to Axis 1.
46
43
 
47
44
  ---
48
45
 
49
- ## The four axes (one at a time, 8 findings each)
46
+ ## Four axes (one at a time, at most 8 findings each)
50
47
 
51
- For each axis: evaluate, then **walk each finding WITH the human** via `AskUserQuestion` (one
52
- issue per call: see "How to ask" below). HITL pauses on each material finding; AFK auto-applies
53
- within the gate ceiling (`depth.md`). If an axis genuinely has no issue, say "No issues,
54
- moving on" and continue: don't manufacture findings.
48
+ For each axis, fold verified technical findings into the plan, then walk each human-owned
49
+ decision via one coherent `AskUserQuestion` packet. Supporting findings may combine only
50
+ with one owner/trade-off. HITL pauses there; AFK follows `depth.md`. Never invent findings.
55
51
 
56
52
  ### 1. Architecture
57
53
  - Component boundaries, coupling, data-flow patterns, single points of failure. Architecture records invariants, not scaffolding: each medium+ decision should state `Binds:` and `Prevents:` so the builder knows what divergence it prevents.
@@ -72,7 +68,7 @@ moving on" and continue: don't manufacture findings.
72
68
  change will make stale.
73
69
 
74
70
  ### 3. Test-coverage design
75
- The differentiator: design the tests *before* the code, so the build writes them alongside.
71
+ Design tests before code so the build writes them alongside the implementation.
76
72
  - **Framework detection:** find the project's existing test runner + conventions; match them
77
73
  (never introduce a new runner to prove one change: `testing.md`).
78
74
  - **Map acceptance → tests.** Every spec acceptance criterion must map to ≥1 planned, surface-anchored test (the API response/UI state/CLI output the criterion names, not an internal proxy).
@@ -117,22 +113,21 @@ acceptance criteria covered ✓" and continue.
117
113
 
118
114
  ---
119
115
 
120
- ## Confidence + verification gate (applies to every finding, all axes)
116
+ ## Confidence and verification gate
121
117
  Tag each finding `[severity] (confidence: N/10) <plan/task/spec ref> — finding`:
122
118
  - **9-10** verified against a quoted line · **7-8** strong pattern match → report normally.
123
119
  - **5-6** moderate → report with "verify this is real".
124
120
  - **≤4** speculative → **suppress from the walk-through**, appendix only.
125
121
 
126
- **The gate:** before raising a finding, quote the line(s) that motivate it. Can't quote it
127
- force confidence 4 and suppress. This kills the "the plan doesn't handle X" finding when the
128
- plan *does* and you skimmed. Don't fabricate 7+ to dodge it. (Same discipline the reviewer agent
129
- runs: `devrites-plan-reviewer`.)
122
+ Before raising a finding, quote the lines that support it. If no line supports it, set
123
+ confidence to 4 or lower and suppress it. Do not inflate confidence to avoid suppression.
124
+ `devrites-plan-reviewer` follows the same rule.
130
125
 
131
126
  ---
132
127
 
133
- ## How to ask (the interactive walk)
128
+ ## Present human-owned decisions
134
129
  Use `AskUserQuestion` per the pack's standard. Plan-review specifics:
135
- - **One finding = one call.** Never batch findings into one question.
130
+ - **One decision = one call.** Never ask about agent work or batch unrelated choices.
136
131
  - Concrete: name the plan/task section + the quoted line.
137
132
  - 2-3 options, including "do nothing / proceed as-is" where reasonable.
138
133
  - Per option, one line: **effort** (human ~X / with the build agent ~Y), **risk**, **maintenance**.
@@ -144,8 +139,10 @@ Use `AskUserQuestion` per the pack's standard. Plan-review specifics:
144
139
  happy-path), add `Completeness: N/10` per option. If they differ in *kind* (two different
145
140
  architectures), skip the score and note "options differ in kind, not coverage". Never fabricate
146
141
  a score on a kind question.
147
- - Every material finding ends as a **recorded decision**: a resolved `questions.md` qid for HITL
148
- or a `decisions.md` ADR for AFK. The walk must leave an auditable trail, not just chat.
142
+ - Every material call ends as a **recorded decision**: behavior-preserving technical hardening
143
+ goes to `decisions.md`; a human-owned HITL choice gets a resolved `questions.md` qid; AFK
144
+ records the allowed recommendation in `decisions.md`. The review must leave an auditable
145
+ trail without turning agent work into questions.
149
146
 
150
147
  ---
151
148
 
@@ -164,4 +161,9 @@ Use `AskUserQuestion` per the pack's standard. Plan-review specifics:
164
161
  parallel lanes (shared module → same lane/sequential; independent → separate lanes), execution
165
162
  order, and conflict flags where two lanes touch the same module dir. This feeds `$rite-build`'s
166
163
  isolation strategy and the autocomplete loop. (Shape in [`artifacts.md`](artifacts.md).)
167
- 5. **Completion summary:** the one-glance recap (shape in [`artifacts.md`](artifacts.md)).
164
+ 5. **Build-entry preflight:** commands/cwds, tools, package state, parser/browser smoke,
165
+ prerequisites, and provenance ([`artifacts.md`](artifacts.md)).
166
+ 6. **Implementation readiness:** goal-backward coverage, wiring, dependency simulation,
167
+ alignment, operations, and rollback verdict.
168
+ 7. **Completion summary:** the compact recap defined in
169
+ [`artifacts.md`](artifacts.md).
@@ -12,9 +12,13 @@ This is the Codex mirror of a DevRites skill. In Codex:
12
12
 
13
13
  - Load DevRites engineering standards from `.agents/skills/devrites-lib/reference/standards/`. Read `.agents/skills/devrites-lib/reference/standards/core.md` before workflow work, then load the other `.agents/skills/devrites-lib/reference/standards/*.md` files exactly when this skill asks for them.
14
14
  - Use the installed `devrites-engine` binary as the canonical runtime helper surface for orientation, gates, and state mutation.
15
- - When this skill asks for a DevRites specialist or writer agent, **explicitly** spawn the matching Codex custom agent from `.codex/agents/devrites-*.toml` through Codex subagents (`spawn_agent`), then wait for its result and reconcile it as the skill instructs. Do not do the review inline just because the instruction to spawn is embedded here: Codex under-fires embedded spawn/skill instructions (openai/codex #23496), so treat the spawn as required, not optional.
16
- - The independence of a fresh-context subagent is the point. If Codex genuinely cannot spawn subagents in the current surface, run the documented inline fallback and **label the result an inline fallback, not an independent review**: an inline pass shares the calling context and is weaker evidence.
17
- - Codex project hooks are installed in `.codex/hooks.json`. Review and trust them with `/hooks` before relying on hook enforcement.
15
+ - **Invocation and dispatch are different:** invoke means run a skill in this context; dispatch means start a fresh agent with `spawn_agent`, await it, and reconcile its result. Never describe inline skill work as a dispatch.
16
+ - For every DevRites specialist or writer dispatch, first call `spawn_agent` with the named `devrites-<role>` custom role. The matching project contract is `.codex/agents/devrites-<role>.toml`.
17
+ - If `spawn_agent` is callable but a named read-only role is unavailable, use generic `explorer` only when the host proves that run has a runtime-enforced read-only sandbox. Tell it to read `.codex/agents/devrites-<role>.toml`, follow its `developer_instructions`, and execute the unchanged packet. A missing read-only custom role is not evidence that spawning is unavailable.
18
+ - Never dispatch generic `worker` for `devrites-slice-wright` unless the host proves that worker run carries exact DevRites identity and the same `.wright-allowlist` enforcement as the named role. Codex reports a generic run as `agent_type=worker`, so the generated global hooks cannot prove that binding. Reject that unsafe rung and use the documented labelled inline wright path with `.reconcile-inline` plus the full reconcile gate.
19
+ - If the host cannot prove the generic explorer is runtime read-only, reject that rung too. Only when no spawn primitive exists or a higher-priority policy rejects a safe spawn may the root run the documented discipline inline. Label it `independence: fallback`, never call it independent, and apply every fallback risk gate. An unbound generic wright or unconfined generic explorer is such a safety rejection, not evidence that no agents exist.
20
+ - Wait for every required fresh-context dispatch before reconciling or advancing. A backgrounded or lost result is incomplete.
21
+ - Codex project hooks are installed in `.codex/hooks.json`; declared-leaf hooks are scoped inside `.codex/agents/devrites-*.toml`. Review and trust them with `/hooks` before relying on hook enforcement.
18
22
  - When this skill asks a HITL question via `AskUserQuestion`: Codex's equivalent (`request_user_input`) exists only in Plan mode. Outside Plan mode, render the option set as a plain numbered list in chat and **end the turn** so the human answers: NEVER silently pick an option yourself; auto-picking is AFK's contract, gated by the `.devrites/AFK` sentinel.
19
23
 
20
24