devrites 3.0.6 → 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 +18 -0
  2. package/README.md +67 -45
  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 +575 -58
  54. package/engine/internal/install/install_test.go +490 -9
  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
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to DevRites are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and DevRites adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Releases are generated automatically by [semantic-release](https://semantic-release.gitbook.io/) from Conventional Commits on `main`.
4
4
 
5
+ ## [3.1.0](https://github.com/ViktorsBaikers/DevRites/compare/v3.0.7...v3.1.0) (2026-07-24)
6
+
7
+ ### Added
8
+
9
+ * **devrites:** harden planning and agent orchestration ([50be03b](https://github.com/ViktorsBaikers/DevRites/commit/50be03b90f1d5004ea010cf68ff07b74bab491c6))
10
+
11
+ ### Fixed
12
+
13
+ * **ci:** correct invocation and eval discovery gates ([0a0d7d2](https://github.com/ViktorsBaikers/DevRites/commit/0a0d7d27546b90a7f5a2dd72bc9326f29416cc54))
14
+ * **devrites:** clear security and Windows mode gates ([59fcfc6](https://github.com/ViktorsBaikers/DevRites/commit/59fcfc6c1806975e36a69cde4e8a2c504657161a))
15
+ * **devrites:** restore static and Windows engine gates ([8aeb479](https://github.com/ViktorsBaikers/DevRites/commit/8aeb4793adf0ce57ba4dba7ddcb7e56f9f612f40))
16
+
17
+ ## [3.0.7](https://github.com/ViktorsBaikers/DevRites/compare/v3.0.6...v3.0.7) (2026-07-22)
18
+
19
+ ### Fixed
20
+
21
+ * **installer:** harden binary acquisition ([7534198](https://github.com/ViktorsBaikers/DevRites/commit/7534198dd3f6a29f065fe715e763e02bdc8a71c0))
22
+
5
23
  ## [3.0.6](https://github.com/ViktorsBaikers/DevRites/compare/v3.0.5...v3.0.6) (2026-07-22)
6
24
 
7
25
  ### Fixed
package/README.md CHANGED
@@ -14,14 +14,18 @@ continues.
14
14
 
15
15
  The core path is:
16
16
 
17
- `SPEC -> DEFINE -> VET -> BUILD -> PROVE -> POLISH -> REVIEW -> SEAL -> SHIP`
17
+ `SPEC -> CLARIFY -> [TEMPER] -> DEFINE -> VET -> BUILD -> PROVE -> POLISH -> REVIEW -> SEAL -> SHIP`
18
+
19
+ Clarify is mandatory but adaptive, so it asks no questions when the contract
20
+ is complete. Temper adds an optional strategic review. Vet is the only final
21
+ readiness phase before Build.
18
22
 
19
23
  Seal decides whether the feature is ready without changing git. Ship owns the
20
24
  final commit, push, and tag, and it requires a typed `GO` confirmation.
21
25
  Unattended runs may create local WIP checkpoint commits along the way, but only
22
26
  Ship collapses and pushes them.
23
27
 
24
- **Status:** [`v3.0.6`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v3.0.6): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
28
+ **Status:** [`v3.1.0`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v3.1.0): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
25
29
 
26
30
  ## Quick start
27
31
 
@@ -67,27 +71,25 @@ Claude Code supports both `/rite <verb>` and `/rite-<verb>`. Codex uses the same
67
71
  forms with `$`: `$rite <verb>` and `$rite-<verb>`. The menu and direct forms run
68
72
  the same skill.
69
73
 
70
- | Stage | Direct command | What happens |
71
- |---|---|---|
72
- | Spec | [`/rite-spec <feature>`](pack/.claude/skills/rite-spec/SKILL.md) | Investigates the request and codebase, closes product gaps, and writes `spec.md`. |
73
- | Define | [`/rite-define`](pack/.claude/skills/rite-define/SKILL.md) | Turns the spec into architecture, a plan, traceability, and vertical task slices. |
74
- | Vet | [`/rite-vet`](pack/.claude/skills/rite-vet/SKILL.md) | Reviews every plan before implementation. The depth scales with the risk. |
75
- | Build | [`/rite-build`](pack/.claude/skills/rite-build/SKILL.md) | Implements and verifies exactly one slice, then stops. Repeat for each slice. |
76
- | Prove | [`/rite-prove`](pack/.claude/skills/rite-prove/SKILL.md) | Runs the completed feature's tests, build, runtime checks, and browser proof when UI is involved. |
77
- | Polish | [`/rite-polish`](pack/.claude/skills/rite-polish/SKILL.md) | Cleans up the touched code and normalizes the UI when needed. |
78
- | Review | [`/rite-review`](pack/.claude/skills/rite-review/SKILL.md) | Runs feature-scoped review across the relevant engineering axes. |
79
- | Seal | [`/rite-seal`](pack/.claude/skills/rite-seal/SKILL.md) | Produces a final `GO` or `NO-GO` decision without changing git. |
80
- | Ship | [`/rite-ship`](pack/.claude/skills/rite-ship/SKILL.md) | On `GO`, asks for typed confirmation, performs the approved git actions, and archives the workspace. |
74
+ | # | Stage | Direct command | What happens |
75
+ |---:|---|---|---|
76
+ | 1 | Spec | [`/rite-spec <feature>`](pack/.claude/skills/rite-spec/SKILL.md) | Inspects the request and codebase, asks about product gaps, and writes `spec.md`. |
77
+ | 2 | Clarify | [`/rite-clarify`](pack/.claude/skills/rite-clarify/SKILL.md) | Checks the whole feature for missing decisions before planning. It asks no questions when everything is clear. |
78
+ | 3 | Temper | [`/rite-temper`](pack/.claude/skills/rite-temper/SKILL.md) | Challenges scope and failure modes before Define. It is optional for small work and always runs in `/rite-autocomplete`. |
79
+ | 4 | Define | [`/rite-define`](pack/.claude/skills/rite-define/SKILL.md) | Turns the approved spec into architecture, a plan, traceability, and vertical task slices. |
80
+ | 5 | Vet | [`/rite-vet`](pack/.claude/skills/rite-vet/SKILL.md) | Reviews every plan before implementation. The review depth scales with the risk. |
81
+ | 6 | Build | [`/rite-build`](pack/.claude/skills/rite-build/SKILL.md) | Implements and verifies one slice, then stops. Run it again for each remaining slice. |
82
+ | 7 | Converge | [`/rite-converge`](pack/.claude/skills/rite-converge/SKILL.md) | Runs only when recovery is needed. It compares the code with the recorded intent, adds missing slices, and sends the changed plan back to Vet. |
83
+ | 8 | Prove | [`/rite-prove`](pack/.claude/skills/rite-prove/SKILL.md) | Runs the completed feature's tests, build, runtime checks, and browser proof when the feature has a UI. |
84
+ | 9 | Polish | [`/rite-polish`](pack/.claude/skills/rite-polish/SKILL.md) | Cleans up the touched code and normalizes the UI when needed. |
85
+ | 10 | Review | [`/rite-review`](pack/.claude/skills/rite-review/SKILL.md) | Reviews the completed feature against its spec and engineering standards. |
86
+ | 11 | Seal | [`/rite-seal`](pack/.claude/skills/rite-seal/SKILL.md) | Writes the final `GO` or `NO-GO` decision without changing git. |
87
+ | 12 | Ship | [`/rite-ship`](pack/.claude/skills/rite-ship/SKILL.md) | On `GO`, asks for typed confirmation, performs the approved git actions, and archives the workspace. |
81
88
 
82
89
  Some work needs a different route:
83
90
 
84
91
  - [`/rite-quick`](pack/.claude/skills/rite-quick/SKILL.md) handles a small,
85
92
  reversible change without creating a full feature workspace.
86
- - [`/rite-temper`](pack/.claude/skills/rite-temper/SKILL.md) challenges the
87
- scope and failure modes of a larger spec before Define.
88
- - [`/rite-converge`](pack/.claude/skills/rite-converge/SKILL.md) compares a
89
- resumed, adopted, or stalled feature with the live code and adds the missing
90
- work as new slices.
91
93
  - [`/rite-autocomplete`](pack/.claude/skills/rite-autocomplete/SKILL.md) runs
92
94
  the lifecycle unattended. With `--ship`, it auto-confirms the final typed
93
95
  `GO`; without that flag, it stops and waits for you.
@@ -113,9 +115,12 @@ the original decisions and proof.
113
115
  work/<slug>/
114
116
  brief.md
115
117
  spec.md
118
+ decision-coverage.md
116
119
  architecture.md
117
120
  plan.md
118
121
  tasks.md
122
+ eng-review.md
123
+ test-plan.md
119
124
  state.md
120
125
  decisions.md
121
126
  questions.md
@@ -127,17 +132,20 @@ the original decisions and proof.
127
132
  archive/<slug>/
128
133
  ```
129
134
 
130
- Some phases add focused artifacts such as `strategy.md`, `test-plan.md`,
131
- `design-brief.md`, `browser-evidence.md`, `polish-report.md`, `drift.md`, or
132
- `handoff.md`. See the [workspace contract](docs/orchestration.md) for the full
133
- state model.
135
+ Some phases add focused artifacts such as `strategy.md`, `design-brief.md`,
136
+ `browser-evidence.md`, `polish-report.md`, `drift.md`, or `handoff.md`. See the
137
+ [workspace contract](docs/engine/workspace-schema.md) for the full state model.
134
138
 
135
139
  ## Safety rules
136
140
 
137
- - **Plan before code.** Spec, Define, and Vet settle the intended behavior and
138
- implementation path before Build starts.
141
+ - **Settle before code.** Spec and Clarify settle the behavior contract. Define
142
+ and Vet settle the implementation path before Build starts. The engine checks
143
+ the meaning and input digests of fresh `CLEAR` and `READY` artifacts; marker
144
+ text alone does not pass.
139
145
  - **Build one slice.** `/rite-build` implements one vertical slice and records
140
- its proof before returning control.
146
+ its proof before returning control. Before dispatching the sole writer, the
147
+ root writes an exact `.wright-allowlist`. Reconciliation and integrity gates
148
+ use the same pre-slice baseline.
141
149
  - **Stop on drift.** If implementation no longer matches the plan, the Spec
142
150
  Drift Guard records the mismatch in `drift.md` and routes through
143
151
  [`/rite-plan repair`](pack/.claude/skills/rite-plan/SKILL.md).
@@ -178,10 +186,11 @@ The workflow treats this file as configuration and never rewrites it.
178
186
  engine decrements that state after each built slice. Delete `.devrites/AFK` to
179
187
  return to HITL.
180
188
 
181
- AFK still pauses for blocking or escalating gates, destructive migrations,
182
- auth or authorization changes, public API breaks, external service contract
183
- changes, filesystem destruction outside the workspace, and red tests, types,
184
- or lint. The full pause and gate contract is in
189
+ AFK still pauses for product, scope, or policy choices, irreversible risk,
190
+ and access or actions available only to a human. Agents use bounded recovery
191
+ for red tests, type or lint errors, runtime failures, and missing technical
192
+ coverage. If that recovery budget runs out, they record a technical blocker
193
+ instead of asking a question. The full pause and gate contract is in
185
194
  [`afk-hitl.md`](pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md).
186
195
 
187
196
  ## Install, update, and remove
@@ -207,7 +216,7 @@ Useful install flags:
207
216
  |---|---|
208
217
  | `--target DIR` | Use another project directory. |
209
218
  | `--dry-run` | Show planned file operations without changing anything. |
210
- | `--force` | Replace conflicting files that DevRites does not own. |
219
+ | `--force` | Replace or remove foreign or customized managed files. The installer still rejects symlinks and path escapes. |
211
220
  | `--no-codex` | Skip `.agents`, `.codex`, and `AGENTS.md` integration. |
212
221
  | `--no-agents` | Skip the review agents. |
213
222
  | `--no-skills` | Skip skills and their bundled standards. |
@@ -232,11 +241,22 @@ curl -fsSL https://raw.githubusercontent.com/ViktorsBaikers/DevRites/main/instal
232
241
  curl -fsSL https://raw.githubusercontent.com/ViktorsBaikers/DevRites/main/install.sh | bash -s -- --dry-run
233
242
  ```
234
243
 
235
- The installer records every managed project file in
236
- `.claude/devrites.manifest`. Update and uninstall use that manifest, preserve
237
- `.devrites/`, and avoid removing files they do not own. The optional shared
238
- `devrites-engine` binary is the only artifact that may be installed outside the
239
- project.
244
+ The installer records every managed project file and its SHA-256 in
245
+ `.claude/devrites.manifest`. Before an update or uninstall changes anything, it
246
+ checks every managed path. It preserves customized files and tells the user to
247
+ retry with `--force` before making any changes; legacy manifests without hashes
248
+ also require `--force`.
249
+ `--force --dry-run` lists the exact destructive actions. Marker-merged files
250
+ keep user content outside the DevRites block, and `.devrites/` runtime state
251
+ remains in place. The installer refuses symlinks, junctions, and paths that
252
+ escape the target.
253
+
254
+ The optional shared `devrites-engine` binary is the only artifact installed
255
+ outside the project. Before replacement, the release binary at its staged path
256
+ must report the requested version. After installation, the binary at its final
257
+ path must report that version in a new process. The installer keeps a backup in
258
+ the same directory until the second check passes. On failure, it restores the
259
+ previous binary or removes a bad first install.
240
260
 
241
261
  ## Claude Code and Codex integration
242
262
 
@@ -255,14 +275,14 @@ through Claude Code or Codex plugin stores.
255
275
 
256
276
  ## Skills and agents
257
277
 
258
- The pack ships 42 skills: 30 public and 12 internal. The public surface contains
259
- the `rite` menu and 29 `rite-*` workflows and utilities. Eleven `devrites-*`
278
+ The pack ships 43 skills: 31 public and 12 internal. The public surface contains
279
+ the `rite` menu and 30 `rite-*` workflows and utilities. Eleven `devrites-*`
260
280
  specialists load when a matching task needs them; `devrites-lib` carries the
261
281
  shared contracts and engineering standards.
262
282
 
263
- Fourteen agents ship with the pack. Thirteen are read-only reviewers or
264
- analysts, including `devrites-retrospector`, which reads the shipped archive.
265
- `devrites-slice-wright` is the only agent allowed to edit a feature slice.
283
+ Seventeen fresh-context agents ship with the pack. Sixteen are read-only,
284
+ including the evidence scout, plan drafter, proof runner, reviewers, judges,
285
+ and retrospector. `devrites-slice-wright` is the only source/test writer.
266
286
 
267
287
  The authoritative [skills catalogue](docs/skills.md) lists every skill and
268
288
  agent. The [flow diagrams](docs/flow.md) show routing, reviewer fan-out, and
@@ -293,11 +313,13 @@ traces. DevRites detects these tools but does not install them.
293
313
  ## Security model
294
314
 
295
315
  Installed host artifacts stay in the project. The npm shim prefers an explicitly
296
- configured engine or a local `engine/devrites-engine`, can download a
297
- checksummed release binary, can build a temporary engine from the local Go
298
- source, and finally falls back to an existing `devrites-engine` on `PATH`. Use `--no-binary` or
299
- `DEVRITES_NO_BINARY=1` if you do not want the installer to keep the shared
300
- binary outside the project.
316
+ configured engine or a local `engine/devrites-engine`. If neither is available,
317
+ it can download a checksummed release binary or build a temporary engine from
318
+ the local Go source before falling back to `devrites-engine` on `PATH`. Use
319
+ `--no-binary` or `DEVRITES_NO_BINARY=1` to avoid keeping a shared binary outside
320
+ the project. `devrites-engine update` also prefers the checksummed platform
321
+ release and builds from source only as a fallback. It does not read Git metadata
322
+ from the target project.
301
323
 
302
324
  Workflow state is read through the engine rather than shell injection. The
303
325
  installer never writes `defaultMode: bypassPermissions`. Skills use networked
package/SECURITY.md CHANGED
@@ -61,19 +61,19 @@ reviewable; never suppress a hidden-unicode finding you can't explain.
61
61
  ### State loading (engine subcommands, no `!` injection)
62
62
 
63
63
  `/rite-status` and workspace-operating skills load state by running a **read-only
64
- `devrites-engine` subcommand through the `Bash` tool**. It does not use Claude Code's
65
- preprocessing-only `` !`<command>` `` dynamic-context injection, which DevRites
66
- **removed** for cross-harness portability. The no-argument `/rite` menu runs
64
+ `devrites-engine` subcommand through the `Bash` tool**. DevRites does not use
65
+ Claude Code's preprocessing-only `` !`<command>` `` dynamic-context injection
66
+ because that mechanism is not portable across harnesses. The no-argument `/rite` menu runs
67
67
  `devrites-engine first-task` instead; a routed verb hands control to its owning skill.
68
68
 
69
69
  ```bash
70
70
  command -v devrites-engine >/dev/null 2>&1 && devrites-engine preamble || echo "(unavailable: read state.md directly)"
71
71
  ```
72
72
 
73
- `devrites-engine preamble` is a project-local read of DevRites' own `.devrites/`
74
- state: no user input is concatenated into a command, no network access, no write
75
- side effects. The gate subcommands (`build-readiness`, `evidence-fresh`,
76
- `check-acceptance`) are likewise read-only. Mutating commands are explicit and
73
+ `devrites-engine preamble` reads the project's `.devrites/` state. It does not
74
+ concatenate user input into a command, access the network, or write files. The
75
+ gate subcommands (`build-readiness`, `evidence-fresh`, `check-acceptance`) are
76
+ also read-only. Mutating commands are explicit and
77
77
  scoped: for example, `resolve`, `tick-afk`, and `close-out` write only DevRites
78
78
  state, while `/rite use <slug>` deliberately repoints `.devrites/ACTIVE` inline.
79
79
 
@@ -81,7 +81,7 @@ If your environment disallows shell commands started by skills, each skill reads
81
81
  `state.md` directly through the `|| echo "(… unavailable …)"` fallback above.
82
82
  The rest of the pack continues to work.
83
83
 
84
- ### Model invocation is per skill
84
+ ### User and model invocation are separate
85
85
 
86
86
  Public skills are always user-invocable, but model invocation is set per skill.
87
87
  Skills without `disable-model-invocation: true` may be selected when their
@@ -115,22 +115,21 @@ uninstall.
115
115
 
116
116
  Skills, agents, standards, and hook configuration stay in the target project.
117
117
  The installer merges DevRites entries into project-local `.claude/settings.json`
118
- and `.codex/hooks.json` without replacing unrelated user settings. Its only
119
- sanctioned global artifact is the shared `devrites-engine` executable, installed
120
- to `DEVRITES_BIN_DIR`, a writable `~/.local/bin`, or a writable
118
+ and `.codex/hooks.json` without replacing unrelated user settings. The shared
119
+ `devrites-engine` executable is the only allowed artifact outside the project.
120
+ It is installed to `DEVRITES_BIN_DIR`, a writable `~/.local/bin`, or a writable
121
121
  `/usr/local/bin`; `--no-binary` / `DEVRITES_NO_BINARY=1` skips it. The bootstrap
122
122
  path may fetch the release bundle and checksummed engine assets. It never invokes
123
123
  `sudo` or edits shell startup files.
124
124
 
125
125
  ### npx install path
126
126
 
127
- When installed via `npx devrites@latest`, the CLI (`bin/devrites.mjs`) is a thin
128
- Node shim that delegates directly to `devrites-engine`; it does not execute
129
- `install.sh`. The host payload is bundled and pinned to the requested npm package
130
- version. To start the engine, the shim tries the matching release binary plus its
131
- SHA-256 sidecar, then a local Go build, then an existing engine. It has no runtime
132
- npm dependencies. Project-artifact and optional shared-binary boundaries are the
133
- same as the Bash path.
127
+ With `npx devrites@latest`, the CLI (`bin/devrites.mjs`) calls
128
+ `devrites-engine` directly instead of running `install.sh`. The bundled host
129
+ payload is pinned to the requested npm package version. The shim first tries the
130
+ matching release binary and its SHA-256 sidecar, then a local Go build, and then
131
+ an existing engine. It has no runtime npm dependencies. The same project and
132
+ shared-binary boundaries apply to the Bash installer.
134
133
 
135
134
  ### Recommended Claude Code permissions for managed deployments
136
135
 
@@ -148,17 +147,16 @@ For organizations evaluating DevRites under a managed Claude Code policy:
148
147
  }
149
148
  ```
150
149
 
151
- This follows the current
152
- [Claude Code permissions schema](https://code.claude.com/docs/en/permissions)
153
- and surfaces a host confirmation before the git mutation ladder. DevRites'
150
+ Under the current
151
+ [Claude Code permissions schema](https://code.claude.com/docs/en/permissions),
152
+ the host asks for confirmation before the git mutation ladder. DevRites'
154
153
  separate type-`GO` workflow gate still applies.
155
154
 
156
155
  ### Hooks (approval, orientation, and local guards)
157
156
 
158
- DevRites ships JSON-configured hooks installed by the engine-owned flow into the
159
- project-local host artifacts (`.claude/settings.json` for Claude Code and
160
- `.codex/hooks.json` for Codex). They call `devrites-engine` behind an inline
161
- fail-open guard:
157
+ The engine installs JSON-configured hooks in the project-local host artifacts:
158
+ `.claude/settings.json` for Claude Code and `.codex/hooks.json` for Codex. Both
159
+ files call `devrites-engine` behind an inline fail-open guard:
162
160
 
163
161
  - **`allow` (PreToolUse/Bash)**: auto-approves *only* the read-only engine
164
162
  orientation/gate subcommands (`check-acceptance`, `doubt-coverage`,
@@ -193,13 +191,13 @@ bundling them.
193
191
 
194
192
  ### Agentic trust boundaries
195
193
 
196
- Treat every instruction-bearing file as supply chain:
194
+ Treat every instruction-bearing file as a supply-chain input:
197
195
 
198
196
  1. **Shipped pack**: `pack/.claude/**`, generated host artifacts, hooks, and the
199
197
  engine are release-managed and scanned before publish.
200
- 2. **Project-local state**: `.devrites/work/**`, learnings, principles, and
201
- review artifacts are evidence, not authority. Live source and engine gates win
202
- over stale state.
198
+ 2. **Project-local state**: `.devrites/work/**`, learnings, unvalidated
199
+ principles, and review artifacts are evidence, not authority. Live source and
200
+ engine gates win over stale state.
203
201
  3. **User extensions/overrides**: `.devrites/extensions/**` and
204
202
  `.devrites/overrides/**` are untrusted until `devrites-engine extensions
205
203
  validate` / `overrides validate` pass. Extensions may add checks or reviewers;
@@ -210,6 +208,10 @@ Treat every instruction-bearing file as supply chain:
210
208
  missing tools degrade to file-system/engine gates instead of silently changing
211
209
  workflow semantics.
212
210
 
211
+ <!-- authority:principles-trust:start -->
212
+ Project principles may become project policy only after explicit provenance and validation; arbitrary project-local Markdown is never inherently trusted executable instruction.
213
+ <!-- authority:principles-trust:end -->
214
+
213
215
  Never copy untrusted issue text, web content, or model output into a skill,
214
216
  agent, hook, MCP config, or generated artifact without reviewing it as executable
215
217
  instructions. Hidden unicode, prompt-injection phrasing, personal absolute paths,
@@ -30,7 +30,7 @@ framework.
30
30
  | Option | Why not |
31
31
  |--------|---------|
32
32
  | Bookkeeping inside the agent prompt | Non-deterministic, context-hungry, unauditable — the exact failure this system exists to remove. |
33
- | Node/TS engine (like the reference system GSD Core) | Drags a package tree + supply-chain surface; the pure-Go single binary has none and cross-compiles to every target from one runner. |
33
+ | Node/TS engine | Drags a package tree + supply-chain surface; the pure-Go single binary has none and cross-compiles to every target from one runner. |
34
34
  | Cobra / urfave CLI framework | A dependency and a config surface for a switch statement the stdlib already handles. |
35
35
 
36
36
  ## Consequences
@@ -22,7 +22,7 @@ enumerated in code, not open-ended. `harness-matrix --check` keeps
22
22
 
23
23
  | Option | Why not |
24
24
  |--------|---------|
25
- | A generic declarative capability/adapter registry now (the GSD Core model) | Real ceiling-raiser for N hosts, but a large refactor unjustified at N=2. Recorded as a Proposed follow-up, not built. See the adoption study in `docs/research/gsd-core-adoption.md` §3.1. |
25
+ | A generic declarative capability/adapter registry now | Real ceiling-raiser for N hosts, but a large refactor unjustified at N=2. Recorded as a Proposed follow-up, not built. |
26
26
  | Claude-only | Codex users are already real; single-host would strand them. |
27
27
  | Per-host forks of the logic | Duplicates the lifecycle core across edges — the thing the adapter exists to prevent. |
28
28
 
@@ -40,8 +40,7 @@ additively.
40
40
  - Completeness is a table lookup, not a judgment call — cheap and reproducible.
41
41
  - Small files stay context-cheap and make "what's missing" self-evident.
42
42
  - `SchemaVersion = 1` is young; migration is single-version. Hardening the
43
- writer into one pure transition function is a recorded follow-up
44
- (`docs/research/gsd-core-adoption.md` §3.2).
43
+ writer into one pure transition function is a recorded follow-up.
45
44
  - The typed registry in `engine/internal/state/schema.go` is the lifecycle
46
45
  authority. Its invariant tests lock order, aliases, commands, requirements,
47
46
  and cross-format manifest freshness.
@@ -5,16 +5,15 @@
5
5
 
6
6
  ## Context
7
7
 
8
- Two gaps surfaced while studying a more mature peer system (GSD Core; see
9
- `docs/research/gsd-core-adoption.md`):
8
+ Two gaps surfaced during a control-plane reliability audit:
10
9
 
11
10
  1. **Unwired static analysis.** `engine/Makefile` defined `staticcheck` and
12
11
  `govulncheck` targets, but CI ran only `gofmt` + `go vet`. No `-race`, no
13
12
  custom analysis on the trust-root binary.
14
13
  2. **A wall-clock leak.** `resolve next-qid` derived today's date from a raw
15
14
  `time.Now()` with no seam, so its golden snapshot was pinned to the date it
16
- was recorded and failed **every other day** — a latent red the peer system's
17
- clock-seam lint would have caught at author time.
15
+ was recorded and failed **every other day** — a clock-seam check would have
16
+ caught the latent failure at author time.
18
17
 
19
18
  ## Decision
20
19
 
@@ -0,0 +1,67 @@
1
+ # ADR-0009: Pre-build decision coverage and implementation readiness
2
+
3
+ - **Status:** Accepted
4
+ - **Date:** 2026-07-23
5
+
6
+ > This ADR amends the lifecycle order in
7
+ > [ADR-0004](0004-state-schema-phases-sections.md) without changing its
8
+ > phase-relative completeness model.
9
+
10
+ ## Context
11
+
12
+ Real feature runs reached `/rite-build` with product/constraint gaps and incomplete
13
+ tooling/proof prerequisites. The build then repeatedly asked for `rite-resolve` or
14
+ `rite-plan repair`, including approval for bounded technical recovery that an agent should
15
+ own. Earlier phases had good local checklists, but no mandatory whole-feature decision
16
+ coverage artifact, and the engine's build-readiness gate checked only `state.md`.
17
+
18
+ DevRites already had a reusable clarification protocol in `devrites-interview`; the missing
19
+ piece was lifecycle ownership and an executable gate, not another interview implementation.
20
+
21
+ The design review retained multi-dimensional readiness checks, fact-first
22
+ clarification, behavior scenarios, cross-artifact consistency, goal-backward
23
+ plan checking, and an explicit implementation-readiness assessment.
24
+
25
+ We deliberately reject asking the human to approve every technical finding and unbounded
26
+ interview ceremony. Those patterns reproduce the interruption fatigue this change fixes.
27
+
28
+ ## Decision
29
+
30
+ 1. Add one public phase between spec and temper:
31
+ `frame → spec → clarify → temper → define → plan → vet → build → converge → prove → polish → review → seal → ship → done`.
32
+ 2. `/rite-clarify` is mandatory but adaptive. It enumerates the feature topology, searches
33
+ facts before asking, reuses `devrites-interview`, and takes a zero-question fast path when
34
+ the written contract is already complete.
35
+ 3. Clarification writes `decision-coverage.md`. Buildable work must contain
36
+ `Decision coverage: CLEAR`; Partial, Missing, unowned, or blocking rows cannot pass.
37
+ 4. Keep `/rite-vet` as the single final pre-build gate rather than adding a duplicate
38
+ readiness phase. It performs goal-backward implementation-readiness checks and writes
39
+ exactly one typed verdict:
40
+ `READY`, `NEEDS CLARIFICATION`, or `NEEDS REPLAN`.
41
+ 5. The engine requires both `Decision coverage: CLEAR` and
42
+ `Implementation readiness: READY` (plus `test-plan.md`) at build entry. Missing
43
+ clarification routes to `/rite-clarify`; missing vet readiness routes to `/rite-vet`.
44
+ Neither route manufactures a human question.
45
+ 6. Later-phase workspaces may retrofit decision coverage without cursor regression when the
46
+ contract is unchanged. A changed requirement or acceptance criterion still uses the Spec
47
+ Drift Guard and replanning.
48
+
49
+ ## Alternatives considered
50
+
51
+ | Option | Why not |
52
+ |---|---|
53
+ | Strengthen spec/define/vet prose only | Still leaves no auditable proof that the whole feature topology was scanned and no deterministic build-entry gate. |
54
+ | Add a new final `/rite-ready` phase | Duplicates `/rite-vet`, adds ceremony, and splits one readiness source of truth across two phases. |
55
+ | Make clarification optional for small work | Optional gates are exactly how omissions survive; an adaptive zero-question pass has negligible cost while retaining the invariant. |
56
+ | Ask every unresolved item during build | Defers cheap decisions to the most expensive point and turns routine technical recovery into human authorization. |
57
+
58
+ ## Consequences
59
+
60
+ - Planning cannot begin without explicit decision coverage, and build cannot begin without
61
+ both clarification and engineering-readiness verdicts.
62
+ - Small/well-specified work gains one cheap deterministic pass, not an interview tax.
63
+ - Existing active workspaces missing the new artifacts receive actionable `/rite-clarify`
64
+ and `/rite-vet` routes rather than false `/rite-resolve` prompts.
65
+ - `engine/internal/state/schema.go` remains the typed lifecycle/workspace authority. This
66
+ topology is schema v2; migration upgrades declarations without fabricating readiness
67
+ evidence, and generated manifests/host artifacts change with the authority.
@@ -0,0 +1,71 @@
1
+ # ADR-0010: Agent-first fresh-context orchestration
2
+
3
+ - **Status:** Accepted
4
+ - **Date:** 2026-07-23
5
+
6
+ ## Context
7
+
8
+ Lifecycle skills were still doing large searches, planning, proof, and repair work in the
9
+ orchestrator's chat context. That increased context pressure and made delegation
10
+ host-dependent: Codex could treat an unavailable custom role as if no spawn primitive
11
+ existed, while one skill described an unnamed nested writer. Reviewer hooks also guarded
12
+ only selected Bash commands, and the slice writer claimed its own file scope.
13
+
14
+ The design review for
15
+ [ADR-0009](0009-prebuild-decision-coverage-and-readiness.md) also retained
16
+ file-backed fresh task packets, separated planner/checker/executor responsibilities,
17
+ bounded research fan-out, explicit concurrency limits, typed reconciliation, and
18
+ restartable artifact boundaries. We reject persistent swarms and parallel shared-tree
19
+ writers.
20
+
21
+ ## Decision
22
+
23
+ 1. Public `rite-*` skills remain the root orchestrators. They alone own human interaction,
24
+ product/risk decisions, canonical `.devrites/` writes, phase routing, reconciliation,
25
+ gates, and irreversible actions.
26
+ 2. Heavy bounded work uses ephemeral fresh-context leaf agents at depth one. Normally no
27
+ more than three read-only leaves run concurrently; file overlap, dependencies, or
28
+ process/file-descriptor pressure reduce the wave to serial execution.
29
+ 3. Add three read-only roles:
30
+ `devrites-evidence-scout`, `devrites-plan-drafter`, and
31
+ `devrites-proof-runner`. Existing independent reviewers remain critics, not authors.
32
+ 4. `devrites-slice-wright` remains the only source/test writer. Writers never share a
33
+ working tree; accepted proof, polish, or review corrections become one bounded wright
34
+ contract.
35
+ 5. Dispatch uses file-backed `agent-packet/v1` and `agent-result/v1` envelopes with a run
36
+ ID, authoritative artifact paths, exact scope, budgets, immutable base/diff/touched-file
37
+ hashes, side effects, and typed terminal status. The orchestrator rejects malformed,
38
+ stale, or out-of-scope returns before persistence.
39
+ 6. Host fallback is ordered: named project role; generic fresh `explorer`/`worker`
40
+ reading the same role contract only when the host preserves its enforced read/write
41
+ boundary (or isolates the writer); inline discipline when no safe fresh-context rung
42
+ exists. Inline output is labelled non-independent and cannot silently satisfy an
43
+ independence gate.
44
+ 7. Agent security is fail-closed for declared leaf runs. Every role except the exact wright
45
+ is read-only; the wright consumes an orchestrator-created exact path allowlist. Nested
46
+ dispatch, self-claimed scope, installs, git publication, live migrations, and
47
+ `.devrites/` writes are forbidden to leaves.
48
+ 8. Objective failures use bounded technical recovery without asking the human to authorize
49
+ another attempt. Only product/scope/policy choices, irreversible risk, and human-only
50
+ access/actions create a human gate.
51
+
52
+ ## Alternatives considered
53
+
54
+ | Option | Why not |
55
+ |---|---|
56
+ | Keep heavy work in the main chat | Reintroduces context accumulation and makes fresh independent judgment optional. |
57
+ | One agent per lifecycle phase with write access | Duplicates orchestration authority and creates competing canonical writers. |
58
+ | Persistent team/swarm with nested workers | Adds mailbox/watchdog state, amplifies resource pressure, and violates depth-one ownership. |
59
+ | Parallel source writers on one tree | Makes authorship, implicit decisions, rollback, and reconciliation ambiguous. |
60
+ | Inline fallback whenever a custom role is unavailable | Confuses “role unavailable” with “spawn unavailable” and falsely labels self-review independent. |
61
+
62
+ ## Consequences
63
+
64
+ - Main-chat context holds routing and decisions, while agents reread canonical artifacts
65
+ from scratch and return compact typed results.
66
+ - Delegation has deterministic authority, fallback, retry, and stale-result behavior on
67
+ both Claude and Codex.
68
+ - Read-only fan-out can improve throughput, but resource limits are an upper bound rather
69
+ than a target.
70
+ - Agent profiles, host generation, hooks, packet schemas, and composition tests must evolve
71
+ together; generated host artifacts remain derived from `pack/.claude`.
@@ -0,0 +1,28 @@
1
+ # ADR-0011: Separate Define authoring from the Plan checkpoint
2
+
3
+ - **Status:** Accepted
4
+ - **Date:** 2026-07-23
5
+
6
+ ## Context
7
+
8
+ The typed lifecycle gave both `define` and `plan` the same requirements and
9
+ `/rite-define` resume command. Current skills already use `/rite-define` for
10
+ first-pass plan authoring and `/rite-plan` only to repair or reslice an existing
11
+ plan, so the duplicate state behavior made resume routing ambiguous.
12
+
13
+ ## Decision
14
+
15
+ - `define` is in-progress plan authoring and resumes `/rite-define`.
16
+ - `plan` is the approved or repaired plan checkpoint and resumes `/rite-vet`.
17
+ - `/rite-plan` remains an explicit repair/reslice operation; it is not the
18
+ checkpoint's normal resume command.
19
+ - Keep the `plan` phase ID and all phase aliases. Existing schema-v2 and legacy
20
+ workspaces therefore remain readable without migration.
21
+ - The typed phase registry owns a unique transition-right sentence for every
22
+ state; the generated manifest and current lifecycle docs derive from it.
23
+
24
+ ## Consequences
25
+
26
+ An interrupted approved plan continues into engineering review instead of
27
+ re-entering plan authoring. Repair still uses `/rite-plan`, and no compatible
28
+ workspace is rewritten merely because resume routing became unambiguous.
@@ -54,3 +54,6 @@ architecture; per-feature `decisions.md` files stay scoped to that feature.
54
54
  | [0006](0006-clock-seam-and-engine-ci-gates.md) | Clock seam + Go static-analysis CI gates | Accepted | `tests/adr_0006_clock_seam_test.go` |
55
55
  | [0007](0007-canonical-live-workspace-filenames.md) | Canonical live workspace filenames | Accepted | `internal/migrate/migrate_test.go`, `tests/migrate_cli_test.go` |
56
56
  | [0008](0008-sanctioned-engine-network-boundary.md) | Sanctioned engine network boundary | Accepted | `tests/meta_test.go` |
57
+ | [0009](0009-prebuild-decision-coverage-and-readiness.md) | Pre-build decision coverage and implementation readiness | Accepted | `internal/state/state_test.go`, `tests/parity_buildreadiness_test.go` |
58
+ | [0010](0010-agent-first-fresh-context-orchestration.md) | Agent-first fresh-context orchestration | Accepted | `tests/hook_test.go`, `tests/codex-agent-generation-test.sh` |
59
+ | [0011](0011-define-plan-transition-rights.md) | Separate Define authoring from the Plan checkpoint | Accepted | `internal/state/state_test.go`, `tests/adr_0011_define_plan_test.go` |
@@ -2,13 +2,13 @@
2
2
 
3
3
  The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.
4
4
 
5
- | Label in mattpocock/skills | Label in our tracker | Meaning |
6
- | -------------------------- | -------------------- | ---------------------------------------- |
7
- | `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
8
- | `needs-info` | `needs-info` | Waiting on reporter for more information |
9
- | `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
10
- | `ready-for-human` | `ready-for-human` | Requires human implementation |
11
- | `wontfix` | `wontfix` | Will not be actioned |
5
+ | Canonical role | Label in our tracker | Meaning |
6
+ | ----------------- | -------------------- | ---------------------------------------- |
7
+ | `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
8
+ | `needs-info` | `needs-info` | Waiting on reporter for more information |
9
+ | `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
10
+ | `ready-for-human` | `ready-for-human` | Requires human implementation |
11
+ | `wontfix` | `wontfix` | Will not be actioned |
12
12
 
13
13
  When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
14
14