devrites 5.10.2 → 5.11.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 (250) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +24 -10
  3. package/bin/devrites.mjs +2 -0
  4. package/docs/command-map.md +5 -4
  5. package/docs/skills.md +10 -4
  6. package/engine/internal/devritespaths/paths.go +2 -0
  7. package/engine/internal/hostpack/hostpack.go +39 -5
  8. package/engine/internal/hostpack/hostpack_test.go +27 -13
  9. package/engine/internal/install/apply.go +17 -4
  10. package/engine/internal/install/install.go +9 -2
  11. package/engine/internal/install/install_test.go +15 -2
  12. package/engine/internal/install/preflight.go +8 -2
  13. package/engine/internal/install/update.go +1 -1
  14. package/install.sh +4 -1
  15. package/pack/generated/README.md +4 -2
  16. package/pack/generated/devin/AGENTS.md +23 -0
  17. package/pack/generated/devin/agents/devrites-code-reviewer.md +145 -0
  18. package/pack/generated/devin/agents/devrites-devex-reviewer.md +126 -0
  19. package/pack/generated/devin/agents/devrites-doubt-reviewer.md +91 -0
  20. package/pack/generated/devin/agents/devrites-evidence-scout.md +77 -0
  21. package/pack/generated/devin/agents/devrites-frontend-reviewer.md +119 -0
  22. package/pack/generated/devin/agents/devrites-performance-reviewer.md +117 -0
  23. package/pack/generated/devin/agents/devrites-plan-drafter.md +102 -0
  24. package/pack/generated/devin/agents/devrites-plan-reviewer.md +144 -0
  25. package/pack/generated/devin/agents/devrites-proof-runner.md +76 -0
  26. package/pack/generated/devin/agents/devrites-retrospector.md +64 -0
  27. package/pack/generated/devin/agents/devrites-security-auditor.md +112 -0
  28. package/pack/generated/devin/agents/devrites-simplifier-reviewer.md +97 -0
  29. package/pack/generated/devin/agents/devrites-slice-wright.md +219 -0
  30. package/pack/generated/devin/agents/devrites-spec-reviewer.md +99 -0
  31. package/pack/generated/devin/agents/devrites-strategy-reviewer.md +102 -0
  32. package/pack/generated/devin/agents/devrites-test-analyst.md +97 -0
  33. package/pack/generated/devin/agents/devrites-upgrade-planner.md +91 -0
  34. package/pack/generated/devin/skills/devrites-api-interface/SKILL.md +64 -0
  35. package/pack/generated/devin/skills/devrites-audit/SKILL.md +51 -0
  36. package/pack/generated/devin/skills/devrites-browser-proof/SKILL.md +77 -0
  37. package/pack/generated/devin/skills/devrites-browser-proof/reference/browser-performance.md +15 -0
  38. package/pack/generated/devin/skills/devrites-browser-proof/reference/visual-verdict.md +34 -0
  39. package/pack/generated/devin/skills/devrites-debug-recovery/SKILL.md +97 -0
  40. package/pack/generated/devin/skills/devrites-debug-recovery/reference/build-the-loop.md +58 -0
  41. package/pack/generated/devin/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +34 -0
  42. package/pack/generated/devin/skills/devrites-debug-recovery/reference/hypotheses.md +17 -0
  43. package/pack/generated/devin/skills/devrites-debug-recovery/reference/instrumentation.md +21 -0
  44. package/pack/generated/devin/skills/devrites-debug-recovery/reference/regression-test.md +30 -0
  45. package/pack/generated/devin/skills/devrites-debug-recovery/reference/trace.md +25 -0
  46. package/pack/generated/devin/skills/devrites-doubt/SKILL.md +80 -0
  47. package/pack/generated/devin/skills/devrites-frontend-craft/SKILL.md +87 -0
  48. package/pack/generated/devin/skills/devrites-frontend-craft/reference/craft.md +63 -0
  49. package/pack/generated/devin/skills/devrites-frontend-craft/reference/design-references.md +116 -0
  50. package/pack/generated/devin/skills/devrites-frontend-craft/reference/fullstack.md +46 -0
  51. package/pack/generated/devin/skills/devrites-frontend-craft/reference/quality-standards.md +294 -0
  52. package/pack/generated/devin/skills/devrites-frontend-craft/reference/reuse-first.md +53 -0
  53. package/pack/generated/devin/skills/devrites-frontend-craft/reference/shape.md +56 -0
  54. package/pack/generated/devin/skills/devrites-interview/SKILL.md +103 -0
  55. package/pack/generated/devin/skills/devrites-lib/SKILL.md +57 -0
  56. package/pack/generated/devin/skills/devrites-lib/reference/candidate-integrity.md +42 -0
  57. package/pack/generated/devin/skills/devrites-lib/reference/intent-map.md +64 -0
  58. package/pack/generated/devin/skills/devrites-lib/reference/orchestration-profiles.md +27 -0
  59. package/pack/generated/devin/skills/devrites-lib/reference/parallel-dispatch.md +73 -0
  60. package/pack/generated/devin/skills/devrites-lib/reference/reply-contract.md +88 -0
  61. package/pack/generated/devin/skills/devrites-lib/reference/standards/README.md +60 -0
  62. package/pack/generated/devin/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md +30 -0
  63. package/pack/generated/devin/skills/devrites-lib/reference/standards/afk-hitl.md +415 -0
  64. package/pack/generated/devin/skills/devrites-lib/reference/standards/agents.md +99 -0
  65. package/pack/generated/devin/skills/devrites-lib/reference/standards/anti-patterns.md +48 -0
  66. package/pack/generated/devin/skills/devrites-lib/reference/standards/browser-proof-checklist.md +24 -0
  67. package/pack/generated/devin/skills/devrites-lib/reference/standards/ci-cd.md +50 -0
  68. package/pack/generated/devin/skills/devrites-lib/reference/standards/code-navigation.md +43 -0
  69. package/pack/generated/devin/skills/devrites-lib/reference/standards/code-review.md +108 -0
  70. package/pack/generated/devin/skills/devrites-lib/reference/standards/coding-style.md +48 -0
  71. package/pack/generated/devin/skills/devrites-lib/reference/standards/context-hygiene.md +109 -0
  72. package/pack/generated/devin/skills/devrites-lib/reference/standards/core.md +167 -0
  73. package/pack/generated/devin/skills/devrites-lib/reference/standards/data-integrity.md +118 -0
  74. package/pack/generated/devin/skills/devrites-lib/reference/standards/debug-recovery.md +28 -0
  75. package/pack/generated/devin/skills/devrites-lib/reference/standards/definition-of-done.md +19 -0
  76. package/pack/generated/devin/skills/devrites-lib/reference/standards/deprecation.md +31 -0
  77. package/pack/generated/devin/skills/devrites-lib/reference/standards/developer-experience.md +119 -0
  78. package/pack/generated/devin/skills/devrites-lib/reference/standards/development-workflow.md +29 -0
  79. package/pack/generated/devin/skills/devrites-lib/reference/standards/documentation.md +43 -0
  80. package/pack/generated/devin/skills/devrites-lib/reference/standards/edge-case-trace.md +92 -0
  81. package/pack/generated/devin/skills/devrites-lib/reference/standards/elicitation.md +85 -0
  82. package/pack/generated/devin/skills/devrites-lib/reference/standards/error-handling.md +47 -0
  83. package/pack/generated/devin/skills/devrites-lib/reference/standards/git-workflow.md +49 -0
  84. package/pack/generated/devin/skills/devrites-lib/reference/standards/hooks.md +25 -0
  85. package/pack/generated/devin/skills/devrites-lib/reference/standards/integration-reliability.md +102 -0
  86. package/pack/generated/devin/skills/devrites-lib/reference/standards/loop-operations.md +85 -0
  87. package/pack/generated/devin/skills/devrites-lib/reference/standards/observability.md +88 -0
  88. package/pack/generated/devin/skills/devrites-lib/reference/standards/one-shot-actions.md +97 -0
  89. package/pack/generated/devin/skills/devrites-lib/reference/standards/patterns.md +68 -0
  90. package/pack/generated/devin/skills/devrites-lib/reference/standards/performance.md +51 -0
  91. package/pack/generated/devin/skills/devrites-lib/reference/standards/principles.md +42 -0
  92. package/pack/generated/devin/skills/devrites-lib/reference/standards/prose-style.md +123 -0
  93. package/pack/generated/devin/skills/devrites-lib/reference/standards/release/ship-checklist.md +8 -0
  94. package/pack/generated/devin/skills/devrites-lib/reference/standards/repository-topology.md +80 -0
  95. package/pack/generated/devin/skills/devrites-lib/reference/standards/review-checklist.md +12 -0
  96. package/pack/generated/devin/skills/devrites-lib/reference/standards/security-checklist.md +25 -0
  97. package/pack/generated/devin/skills/devrites-lib/reference/standards/security.md +202 -0
  98. package/pack/generated/devin/skills/devrites-lib/reference/standards/skill-authoring.md +209 -0
  99. package/pack/generated/devin/skills/devrites-lib/reference/standards/spec-grammar.md +197 -0
  100. package/pack/generated/devin/skills/devrites-lib/reference/standards/test-proof-checklist.md +13 -0
  101. package/pack/generated/devin/skills/devrites-lib/reference/standards/testing.md +212 -0
  102. package/pack/generated/devin/skills/devrites-lib/reference/standards/tooling.md +92 -0
  103. package/pack/generated/devin/skills/devrites-lib/reference/standards/workflow-artifacts.md +427 -0
  104. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/code.md +44 -0
  105. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/comparison.md +42 -0
  106. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/diagram.md +51 -0
  107. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/index.md +66 -0
  108. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/input.md +46 -0
  109. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/outline-template.md +106 -0
  110. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/plan.md +48 -0
  111. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/slides.md +40 -0
  112. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/table.md +42 -0
  113. package/pack/generated/devin/skills/devrites-lib/reference/workspace-artifact-schema.md +267 -0
  114. package/pack/generated/devin/skills/devrites-prose-craft/SKILL.md +74 -0
  115. package/pack/generated/devin/skills/devrites-prose-craft/reference/banned-phrases.md +132 -0
  116. package/pack/generated/devin/skills/devrites-prose-craft/reference/examples.md +131 -0
  117. package/pack/generated/devin/skills/devrites-prose-craft/reference/structures.md +196 -0
  118. package/pack/generated/devin/skills/devrites-source-driven/SKILL.md +53 -0
  119. package/pack/generated/devin/skills/devrites-ux-shape/SKILL.md +135 -0
  120. package/pack/generated/devin/skills/devrites-ux-shape/reference/brief-template.md +108 -0
  121. package/pack/generated/devin/skills/devrites-ux-shape/reference/visual-direction-probe.md +48 -0
  122. package/pack/generated/devin/skills/rite/SKILL.md +148 -0
  123. package/pack/generated/devin/skills/rite/reference/menu.md +48 -0
  124. package/pack/generated/devin/skills/rite-adopt/SKILL.md +51 -0
  125. package/pack/generated/devin/skills/rite-adopt/reference/adoption.md +19 -0
  126. package/pack/generated/devin/skills/rite-adopt/reference/anti-patterns.md +19 -0
  127. package/pack/generated/devin/skills/rite-autocomplete/SKILL.md +142 -0
  128. package/pack/generated/devin/skills/rite-autocomplete/reference/decision-policy.md +43 -0
  129. package/pack/generated/devin/skills/rite-autocomplete/reference/loop.md +151 -0
  130. package/pack/generated/devin/skills/rite-autocomplete/reference/stop-conditions.md +97 -0
  131. package/pack/generated/devin/skills/rite-build/SKILL.md +102 -0
  132. package/pack/generated/devin/skills/rite-build/reference/afk-discipline.md +148 -0
  133. package/pack/generated/devin/skills/rite-build/reference/anti-patterns.md +27 -0
  134. package/pack/generated/devin/skills/rite-build/reference/checkpoint-protocol.md +120 -0
  135. package/pack/generated/devin/skills/rite-build/reference/checkpoint.md +56 -0
  136. package/pack/generated/devin/skills/rite-build/reference/frontend-trigger.md +39 -0
  137. package/pack/generated/devin/skills/rite-build/reference/one-slice-cycle.md +51 -0
  138. package/pack/generated/devin/skills/rite-build/reference/output.md +33 -0
  139. package/pack/generated/devin/skills/rite-build/reference/parallel-batch.md +214 -0
  140. package/pack/generated/devin/skills/rite-build/reference/phase-contract.md +89 -0
  141. package/pack/generated/devin/skills/rite-build/reference/spec-drift-guard.md +84 -0
  142. package/pack/generated/devin/skills/rite-build/reference/tdd.md +27 -0
  143. package/pack/generated/devin/skills/rite-build/reference/wright-dispatch.md +96 -0
  144. package/pack/generated/devin/skills/rite-clarify/SKILL.md +98 -0
  145. package/pack/generated/devin/skills/rite-clarify/reference/anti-patterns.md +24 -0
  146. package/pack/generated/devin/skills/rite-clarify/reference/decision-coverage.md +55 -0
  147. package/pack/generated/devin/skills/rite-converge/SKILL.md +144 -0
  148. package/pack/generated/devin/skills/rite-converge/reference/anti-patterns.md +35 -0
  149. package/pack/generated/devin/skills/rite-converge/reference/convergence-assessment.md +65 -0
  150. package/pack/generated/devin/skills/rite-customize/SKILL.md +60 -0
  151. package/pack/generated/devin/skills/rite-define/SKILL.md +168 -0
  152. package/pack/generated/devin/skills/rite-define/reference/anti-patterns.md +26 -0
  153. package/pack/generated/devin/skills/rite-define/reference/gates.md +159 -0
  154. package/pack/generated/devin/skills/rite-define/reference/plan-template.md +149 -0
  155. package/pack/generated/devin/skills/rite-doctor/SKILL.md +68 -0
  156. package/pack/generated/devin/skills/rite-dogfood/SKILL.md +55 -0
  157. package/pack/generated/devin/skills/rite-explain/SKILL.md +152 -0
  158. package/pack/generated/devin/skills/rite-explain/reference/intake.md +89 -0
  159. package/pack/generated/devin/skills/rite-frame/SKILL.md +114 -0
  160. package/pack/generated/devin/skills/rite-frame/reference/failure-modes.md +66 -0
  161. package/pack/generated/devin/skills/rite-handoff/SKILL.md +97 -0
  162. package/pack/generated/devin/skills/rite-handoff/reference/handoff-template.md +44 -0
  163. package/pack/generated/devin/skills/rite-learn/SKILL.md +72 -0
  164. package/pack/generated/devin/skills/rite-plan/SKILL.md +185 -0
  165. package/pack/generated/devin/skills/rite-plan/reference/anti-patterns.md +34 -0
  166. package/pack/generated/devin/skills/rite-plan/reference/dependency-graph.md +48 -0
  167. package/pack/generated/devin/skills/rite-plan/reference/replan-and-repair.md +105 -0
  168. package/pack/generated/devin/skills/rite-plan/reference/slicing.md +168 -0
  169. package/pack/generated/devin/skills/rite-plan/reference/task-breakdown.md +42 -0
  170. package/pack/generated/devin/skills/rite-polish/SKILL.md +105 -0
  171. package/pack/generated/devin/skills/rite-polish/reference/adr-promotion.md +11 -0
  172. package/pack/generated/devin/skills/rite-polish/reference/anti-ai-slop.md +187 -0
  173. package/pack/generated/devin/skills/rite-polish/reference/anti-patterns.md +30 -0
  174. package/pack/generated/devin/skills/rite-polish/reference/backend-polish.md +80 -0
  175. package/pack/generated/devin/skills/rite-polish/reference/browser-polish-evidence.md +33 -0
  176. package/pack/generated/devin/skills/rite-polish/reference/code.md +82 -0
  177. package/pack/generated/devin/skills/rite-polish/reference/design-memory.md +117 -0
  178. package/pack/generated/devin/skills/rite-polish/reference/design-system-discovery.md +8 -0
  179. package/pack/generated/devin/skills/rite-polish/reference/harden-checklist.md +109 -0
  180. package/pack/generated/devin/skills/rite-polish/reference/ledger.md +65 -0
  181. package/pack/generated/devin/skills/rite-polish/reference/ui.md +137 -0
  182. package/pack/generated/devin/skills/rite-pov/SKILL.md +57 -0
  183. package/pack/generated/devin/skills/rite-pr-feedback/SKILL.md +54 -0
  184. package/pack/generated/devin/skills/rite-pressure-test/SKILL.md +66 -0
  185. package/pack/generated/devin/skills/rite-prototype/SKILL.md +104 -0
  186. package/pack/generated/devin/skills/rite-prove/SKILL.md +122 -0
  187. package/pack/generated/devin/skills/rite-prove/reference/acceptance-proof.md +88 -0
  188. package/pack/generated/devin/skills/rite-prove/reference/anti-patterns.md +25 -0
  189. package/pack/generated/devin/skills/rite-prove/reference/browser-proof.md +51 -0
  190. package/pack/generated/devin/skills/rite-prove/reference/failure-triage.md +43 -0
  191. package/pack/generated/devin/skills/rite-prove/reference/proof-ladder.md +28 -0
  192. package/pack/generated/devin/skills/rite-prove/reference/test-command-discovery.md +30 -0
  193. package/pack/generated/devin/skills/rite-quick/SKILL.md +81 -0
  194. package/pack/generated/devin/skills/rite-resolve/SKILL.md +98 -0
  195. package/pack/generated/devin/skills/rite-resolve/reference/answer-protocol.md +118 -0
  196. package/pack/generated/devin/skills/rite-review/SKILL.md +171 -0
  197. package/pack/generated/devin/skills/rite-review/reference/anti-patterns.md +32 -0
  198. package/pack/generated/devin/skills/rite-review/reference/cognitive-load.md +90 -0
  199. package/pack/generated/devin/skills/rite-review/reference/feature-scoped-review.md +26 -0
  200. package/pack/generated/devin/skills/rite-review/reference/five-axis-review.md +66 -0
  201. package/pack/generated/devin/skills/rite-review/reference/nielsen-heuristics.md +126 -0
  202. package/pack/generated/devin/skills/rite-review/reference/performance-checklist.md +80 -0
  203. package/pack/generated/devin/skills/rite-review/reference/performance-review.md +14 -0
  204. package/pack/generated/devin/skills/rite-review/reference/security-review.md +42 -0
  205. package/pack/generated/devin/skills/rite-seal/SKILL.md +74 -0
  206. package/pack/generated/devin/skills/rite-seal/reference/anti-patterns.md +29 -0
  207. package/pack/generated/devin/skills/rite-seal/reference/final-evidence.md +41 -0
  208. package/pack/generated/devin/skills/rite-seal/reference/go-no-go.md +29 -0
  209. package/pack/generated/devin/skills/rite-seal/reference/output.md +5 -0
  210. package/pack/generated/devin/skills/rite-seal/reference/phase-contract.md +47 -0
  211. package/pack/generated/devin/skills/rite-seal/reference/risk-and-rollback.md +56 -0
  212. package/pack/generated/devin/skills/rite-seal/reference/seal-template.md +27 -0
  213. package/pack/generated/devin/skills/rite-ship/SKILL.md +87 -0
  214. package/pack/generated/devin/skills/rite-ship/reference/anti-patterns.md +28 -0
  215. package/pack/generated/devin/skills/rite-ship/reference/close-out.md +68 -0
  216. package/pack/generated/devin/skills/rite-ship/reference/git-ship.md +120 -0
  217. package/pack/generated/devin/skills/rite-ship/reference/rollout.md +62 -0
  218. package/pack/generated/devin/skills/rite-ship/reference/ship-template.md +39 -0
  219. package/pack/generated/devin/skills/rite-spec/SKILL.md +149 -0
  220. package/pack/generated/devin/skills/rite-spec/reference/acceptance-criteria.md +31 -0
  221. package/pack/generated/devin/skills/rite-spec/reference/ai-spec-template.md +40 -0
  222. package/pack/generated/devin/skills/rite-spec/reference/anti-patterns.md +27 -0
  223. package/pack/generated/devin/skills/rite-spec/reference/interview-patterns.md +56 -0
  224. package/pack/generated/devin/skills/rite-spec/reference/investigation.md +83 -0
  225. package/pack/generated/devin/skills/rite-spec/reference/question-protocol.md +36 -0
  226. package/pack/generated/devin/skills/rite-spec/reference/references-intake.md +62 -0
  227. package/pack/generated/devin/skills/rite-spec/reference/spec-checklists.md +89 -0
  228. package/pack/generated/devin/skills/rite-spec/reference/spec-template.md +154 -0
  229. package/pack/generated/devin/skills/rite-spec/reference/state-workspace.md +227 -0
  230. package/pack/generated/devin/skills/rite-status/SKILL.md +57 -0
  231. package/pack/generated/devin/skills/rite-temper/SKILL.md +129 -0
  232. package/pack/generated/devin/skills/rite-temper/reference/anti-patterns.md +30 -0
  233. package/pack/generated/devin/skills/rite-temper/reference/review-dimensions.md +66 -0
  234. package/pack/generated/devin/skills/rite-temper/reference/scope-modes.md +53 -0
  235. package/pack/generated/devin/skills/rite-temper/reference/significance.md +46 -0
  236. package/pack/generated/devin/skills/rite-temper/reference/strategy-template.md +90 -0
  237. package/pack/generated/devin/skills/rite-upgrade/SKILL.md +121 -0
  238. package/pack/generated/devin/skills/rite-vet/SKILL.md +192 -0
  239. package/pack/generated/devin/skills/rite-vet/reference/anti-patterns.md +43 -0
  240. package/pack/generated/devin/skills/rite-vet/reference/artifacts.md +202 -0
  241. package/pack/generated/devin/skills/rite-vet/reference/cross-model.md +19 -0
  242. package/pack/generated/devin/skills/rite-vet/reference/depth.md +59 -0
  243. package/pack/generated/devin/skills/rite-vet/reference/eng-lenses.md +48 -0
  244. package/pack/generated/devin/skills/rite-vet/reference/review-axes.md +201 -0
  245. package/pack/generated/devin/skills/rite-watch-pr/SKILL.md +84 -0
  246. package/pack/generated/devin/skills/rite-zoom-out/SKILL.md +69 -0
  247. package/package.json +4 -2
  248. package/scripts/build-host-artifacts.sh +48 -5
  249. package/scripts/devin-generate.sh +222 -0
  250. package/update.sh +2 -1
@@ -0,0 +1,151 @@
1
+ # The autocomplete loop: arm AFK, drive every phase
2
+
3
+ Autocomplete sequences existing `/rite-*` workflows without pausing between
4
+ routine phases. Acceptance-preserving Reslice authority is
5
+ `.devin/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md`.
6
+
7
+ <!-- BEGIN RESLICE ROUTE-TO-ACTION -->
8
+ - `FOLD` → keep Plan repair/affected Vet internal; no stop solely for topology/count.
9
+ - `GUARD_AND_REPAIR` → enter Spec Drift Guard/Clarify; pause only at an existing human-owned gate; resume Plan/Vet internally.
10
+ - `BLOCKED_INPUT` → no planning writes; stop internal branch; exact diagnostic; recover authority; reclassify.
11
+ <!-- END RESLICE ROUTE-TO-ACTION -->
12
+
13
+ ## Arm AFK once
14
+
15
+ ```yaml
16
+ allow_gates: [advisory, validating]
17
+ # max_slices / max_agents / max_minutes / max_review_queue omitted: unlimited
18
+ # continue_sequence: true # opt-in: chain recorded continuations after Seal GO
19
+ # max_workspaces: 5 # sequence budget when chaining
20
+ # max_parallel: 10 # default cap when this invocation omits `--parallel N`; `--parallel N` wins and rewrites only this field
21
+ # max_tokens: <N>
22
+ # max_cost_usd: <amount>
23
+ # notify: "<cmd>"
24
+ ```
25
+
26
+ Read an existing sentinel first. Preserve it byte-for-byte when valid, except
27
+ when this invocation contains `--parallel N`: then write or replace only
28
+ `max_parallel: N` and leave every other key unchanged. Stop if the sentinel is
29
+ malformed. Do not stop because it names `max_slices` / `max_agents` /
30
+ `max_minutes` / `max_review_queue` or only `[advisory]`. If absent, write it
31
+ once after clarity, and include `max_parallel: N` when that flag is present.
32
+ Never write `max_slices` from `--max-slices`. It is otherwise read-only: never rewrite it after Vet or reset it on resume. Leftover `expires_at` is ignored
33
+ and never rewritten. **Failing case:** leftover `max_parallel: 1` keeps the run
34
+ serial after `--parallel 5`.
35
+
36
+ ### Derive the mutable post-vet budget
37
+
38
+ After Vet, seed `afk_slices_remaining` from the pending count so every pending
39
+ slice can run. Ignore `--max-slices`, sentinel `max_slices`, and leftover
40
+ remaining. AFK configuration itself stays unchanged.
41
+
42
+ ### Admit each unattended cycle
43
+
44
+ Before every phase, review fan-out, recovery, or writer dispatch: cheapest
45
+ readiness check first; reject overlap. Do not stop on `max_agents`,
46
+ `max_minutes`, or `max_review_queue`. Count every leaf result. A new activation
47
+ gets fresh activation-local counters but retains durable slice/recovery state.
48
+
49
+ When driving `/rite-build`, ignore afk-discipline remaining-0, `--max-slices`,
50
+ and parallel AFK headroom as stop conditions. Pass this invocation's
51
+ `--parallel N` into `/rite-build` when present; leftover sentinel
52
+ `max_parallel` is then not the cap. Close validating questions and blocking questions
53
+ that already name a ranked recommended option (recommended pick via
54
+ `devrites-engine state resolve`) instead of queuing them or handing
55
+ `/rite-resolve` to the user. Escalating, irreversible-risk, access, and
56
+ blocking with no recommended option still pause.
57
+
58
+ ## Phase arc
59
+
60
+ Workspace files carry state; chat does not. Read and execute each phase skill:
61
+
62
+ | Step | Phase | Completion / edge |
63
+ | --- | --- | --- |
64
+ | 1 | `/rite-spec` | investigate and write testable intent |
65
+ | 2 | `/rite-clarify` | topology-first scan; require `Decision coverage: CLEAR`, then arm AFK |
66
+ | 3 | `/rite-temper` | harden, reduce, or expand; irreversible risk still pauses |
67
+ | 4 | `/rite-define` | approved plan/tasks/traceability |
68
+ | 5 | `/rite-vet` | every plan; derive mutable budget after READY |
69
+ | 6 | `/rite-build` batch loop | largest eligible path-disjoint set (cap: this invocation's `--parallel N`, else sentinel `max_parallel`, else 10; one-slice round when <2 eligible); recompute after each round; charge once per green built slice |
70
+ | 7 | `/rite-prove` | all slices built; approved proof; recovery on red |
71
+ | 8 | `/rite-polish` | re-prove after code edits |
72
+ | 9 | `/rite-review` | in-scope correction then fresh proof |
73
+ | 10 | `/rite-seal` | GO/NO-GO; no Git |
74
+ | 11 | `/rite-ship` | only after GO; `--ship` never authorizes Git; stop at literal-GO/native approval |
75
+
76
+ Before advancing, check
77
+ [stop-conditions.md](stop-conditions.md). After source edits, discard stale pass
78
+ evidence. Re-read the active workspace before each phase.
79
+
80
+ ## Sequence continuation
81
+
82
+ With `continue_sequence: true` and sequence budget remaining
83
+ ([sentinel](../../devrites-lib/reference/standards/afk-hitl.md#sequence-continuation-continue_sequence-max_workspaces)),
84
+ step 10 does not end the run: leave the sealed workspace unshipped with its
85
+ `Next step: /rite-ship`, then invoke the next recorded continuation
86
+ (`/rite-spec <parent>-<n> "<objective>"` from the parent's `decisions.md` sequence)
87
+ and re-enter step 1. Spend one workspace per opened continuation.
88
+
89
+ Spend accounting is durable in `state.md` cursors, not chat. Before invoking the
90
+ continuation, ensure the current workspace's `sequence_workspaces_remaining` is
91
+ set — absent, write `max_workspaces - 1` and `sequence_position: 1` first — and
92
+ `> 0`. `/rite-spec` seeds the child's sequence cursor at creation per the
93
+ [continuation contract](../../rite-plan/reference/slicing.md#continuation-workspaces);
94
+ after the child's `state.md` exists, verify it — `sequence_parent` = the current
95
+ slug, `sequence_position` = parent position + 1,
96
+ `sequence_workspaces_remaining` = parent remaining − 1, and — when the recorded
97
+ entry is the sequence's release milestone — `sequence_role: release` (gates then
98
+ require the union manifest). On resume, a child whose
99
+ fields are missing is re-seeded from its `brief.md` parent/position and the
100
+ parent's counter (same values, never a second charge); a child with no recorded
101
+ parent/position is not a sequence member and the chain stops.
102
+
103
+ Stop instead when: no recorded next entry; the cap or review-queue bound is
104
+ reached; a human-owned, safety, access, or exhaustion condition fires; or Seal returns
105
+ `NO-GO`. On stop, report the sequence position, the sealed-but-unshipped workspaces, and
106
+ the single release command (`/rite-autocomplete <release milestone> --ship`, or
107
+ `/rite-ship` for the current sealed workspace when the sequence is complete).
108
+
109
+ ## Backtrack without handing off
110
+
111
+ The active Autocomplete root remains caller whenever a later phase exposes an
112
+ agent-owned earlier-phase gap:
113
+
114
+ 1. Save the originating phase/action unless a valid native return cursor exists.
115
+ 2. On cold resume, reconcile the terminal cursor against durable fingerprint
116
+ accounting. Restore `return_next_action` only from the approved
117
+ `test-plan.md`/evidence action; ambiguity returns to Vet and never licenses
118
+ execution.
119
+ 3. Invoke required Plan repair, affected Vet, remediation, and proof inline.
120
+ Recovery Vet is a narrow Vet recheck of prior findings, changed paths/criteria,
121
+ and affected evidence; it never restarts unaffected axes. A nested `STOP`
122
+ ends that phase only; do not hand the intermediate command to the user.
123
+ 4. Re-read state after each nested phase. Reconcile exact causal fingerprints
124
+ from `drift.md`/`evidence.md`. A closed reproduction is progress. A different
125
+ Critical/Important invariant gets a separate budget; Suggestion/Nit/FYI does
126
+ not prolong the chain. Only a no-progress result charges the same fingerprint.
127
+ 5. For failed consumptive action, spent authorization blocks only another real
128
+ execution. Use retained evidence for offline diagnosis, repair, and narrow
129
+ Vet; after READY, pause for fresh authorization.
130
+ 6. Restore and consume the original cursor when prerequisites are green.
131
+
132
+ <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"loop tick sees Workflow Artifact trigger/state","action":"invoke classifier once under owner lock; no actor-history migration","return":"same loop cursor; no budget charge for verify/rerun"} -->
133
+ Ask only for a human-owned decision or mandatory safety/access action. An open
134
+ blocking question with `proposed` or option 1 labelled Recommended is not that
135
+ decision: resolve it and continue. Three no-progress corrections of one exact
136
+ fingerprint exhaust; preserve its reproduction and dead ends without another
137
+ Plan/Vet command.
138
+
139
+ ## Continuous caller obligation
140
+
141
+ No user-facing reply is permitted while durable state contains agent-owned
142
+ `NEEDS_REPLAN`, an intermediate Plan/Vet action, a distinct retained
143
+ Critical/Important fingerprint below its cap, or an open blocking question that
144
+ already names a ranked recommended option. Invoke the next internal repair or
145
+ `devrites-engine state resolve` immediately. A narrow reviewer closing one finding and exposing another
146
+ Critical/Important invariant is progress, not exhaustion.
147
+
148
+ The number of completed repair/Vet cycles is not a stop condition. Context
149
+ pressure, compaction, session duration, and nested completion do not convert an
150
+ internal checkpoint into a handoff. Persist it and resume until the requested
151
+ rest point or a shared human/safety/access/exhaustion condition.
@@ -0,0 +1,97 @@
1
+ # Stop conditions: when autocomplete pauses
2
+
3
+ On a real stop, write `state.md` as `awaiting_human` or `blocked`, persist the
4
+ reason, and include one resume command only when an actual human/safety/access
5
+ action can change it. Exhausted agent-owned recovery records terminal
6
+ `Next step: none` and no runnable recovery command. `--ship` never bypasses a
7
+ stop.
8
+
9
+ Authority: `.devin/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md`.
10
+
11
+ <!-- BEGIN RESLICE ROUTE-TO-ACTION -->
12
+ - `FOLD` → keep Plan repair/affected Vet internal; no stop solely for topology/count.
13
+ - `GUARD_AND_REPAIR` → enter Spec Drift Guard/Clarify; pause only at an existing human-owned gate; resume Plan/Vet internally.
14
+ - `BLOCKED_INPUT` → no planning writes; stop internal branch; exact diagnostic; recover authority; reclassify.
15
+ <!-- END RESLICE ROUTE-TO-ACTION -->
16
+
17
+ ## Always stop
18
+
19
+ Regardless of flags or AFK ceiling:
20
+
21
+ - destructive data migration;
22
+ - auth/authz boundary change;
23
+ - public API break;
24
+ - external-service contract change; or
25
+ - filesystem destruction outside the workspace.
26
+
27
+ Red proof cannot advance. Run bounded Debug Recovery; stop after proven
28
+ exhaustion unless the remaining owner is human.
29
+
30
+ ## Not stops: internal technical routing
31
+
32
+ `NEEDS_REPLAN` is not a stop condition under active Autocomplete. It blocks
33
+ forward work, persists the return cursor, and invokes Plan repair plus Recovery
34
+ Vet inline. The same applies to nested `STOP`/`Next step` when its decision is
35
+ agent-owned.
36
+
37
+ Agent-owned backtracking is not a stop condition while the exact causal
38
+ fingerprint has budget. Invoke the earlier phase, affected Vet, remediation, and
39
+ proof; then resume the origin. Stop only after three no-progress corrections of
40
+ that exact fingerprint or a real human/safety/access gate. Preserve reproduction,
41
+ attempts, and dead ends; never offer `/rite-plan unblock` or another routine
42
+ phase command. Reinvocation with unchanged evidence does not reset the cap.
43
+ `unchanged` means the same fingerprint already has three recorded no-progress
44
+ corrections. Closure is progress; a separately evidenced Critical/Important
45
+ invariant starts its own cap and cannot extend the closed one.
46
+
47
+ Spent consumptive-action authorization is not technical-recovery exhaustion.
48
+ It blocks another execution; retained new Critical/Important evidence still
49
+ enters offline recovery. After affected Vet is READY, pause for fresh action
50
+ authorization and never reuse old GO.
51
+
52
+ Past evidence being irretrievable is not by itself terminal. If an in-scope
53
+ trusted seam can uniquely discriminate the next failure, run diagnostic-
54
+ amplification Plan repair and narrow Vet inline, then pause for fresh GO before
55
+ one evidence-acquisition attempt. Use terminal none only when no safe in-scope
56
+ seam exists, a real human/risk/scope gate owns it, or bounded recovery is
57
+ exhausted.
58
+
59
+ <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"classifier returns owner-busy, exhausted, or existing hard gate","action":"stop on exact WAIT_ACTIVE_OWNER, BLOCKED_EXHAUSTED, or BLOCKED_GATE result","return":"unchanged cursor plus fixed route-owned output"} -->
60
+ ## Other stop classes
61
+
62
+ - **Gate severity:** escalating always stops. Blocking with a ranked recommended
63
+ option (`proposed` or option 1 labelled Recommended): auto-pick via
64
+ `devrites-engine state resolve`, then continue internally (including Spec Drift
65
+ Guard when the answer changes ownership or acceptance). Blocking with no
66
+ recommended option still stops. Validating: auto-pick the recommended option,
67
+ close the question, continue.
68
+ - **Temper:** `expand` and extra acceptance auto-apply (record + Drift Guard).
69
+ Irreversible-risk still pauses. `hold-rigor`, `reduce-to-MVP`, and a skip do not pause.
70
+ - **Clarify:** material Partial/Missing/unowned decision coverage or a
71
+ low-confidence high-consequence assumption. Continue the initial interview;
72
+ never arm AFK early.
73
+ - **Seal:** remaining NO-GO after recommended-option questions are closed, with
74
+ every remaining blocker and fix direction. Never round up to GO. An open
75
+ recommended-option blocking question is not a Seal stop: resolve it, recover
76
+ agent-owned findings, then re-enter Seal.
77
+ - **Reslice:** execute its marked action before deciding continue/stop.
78
+ - **Slice budget:** do not stop on `--max-slices`. Leftover
79
+ pre-existing remaining value, explicit flag, sentinel cap, or post-vet pending count
80
+ does not stop. Zero with no pending slices is normal completion.
81
+ Malformed flag stops before any write.
82
+ - **Resource envelope:** overlapping run or missing AFK after arm still stops.
83
+ Do not stop on `--max-slices`, `max_agents`, `max_minutes`, or `max_review_queue`.
84
+ - **Confidence:** intent still cannot become testable acceptance after interview.
85
+ - **Repeated failure:** the exact fingerprint's bounded recovery is exhausted.
86
+
87
+ ## Final GO and durable stop
88
+
89
+ `--ship`/`--yolo` never authorizes Git. With a flag, complete Ship preflight,
90
+ disclose the exact plan, and stop for literal `GO` plus native approval. Without
91
+ one, stop at Seal GO with `/rite-ship`. Seal GO, AFK, prior approval, and flags
92
+ never satisfy Ship approval.
93
+
94
+ A cold-resumable stop records `state.md` status, exact reason, and either one
95
+ human-owned resume action or `none — technical recovery exhausted`; the owning
96
+ question/drift/seal entry explains it. The user-facing line says what stopped
97
+ and, only when applicable, what human action resumes it.
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: rite-build
3
+ description: Build the next approved vertical slice with evidence. HITL one-slice default; AFK/autocomplete chain serially or in eligible path-disjoint batches (dynamic size, cap 10); `--parallel N` caps a batch.
4
+ argument-hint: "[--parallel N] [slice number or name]"
5
+ ---
6
+
7
+ # /rite-build: one verified slice
8
+
9
+ HITL stops; a later user invocation starts the next slice.
10
+ Explicit `.devrites/AFK` alone lets the controlling root chain under green proof,
11
+ caps and pause rules. Every wright returns after one slice.
12
+ **Opt-in:** `/rite-build --parallel N` (2≤N≤10; N=1≡serial) follows
13
+ [`reference/parallel-batch.md`](reference/parallel-batch.md)
14
+ ([`one-slice-cycle.md`](reference/one-slice-cycle.md)).
15
+
16
+ Root owns gates/bookkeeping; fresh
17
+ [`devrites-slice-wright`](.devin/agents/devrites-slice-wright.md) writes source/tests.
18
+ Workflow Artifacts use
19
+ [`workflow-artifacts.md`](../devrites-lib/reference/standards/workflow-artifacts.md).
20
+ Execute [`reference/phase-contract.md`](reference/phase-contract.md)
21
+ ([`one-slice-cycle.md`](reference/one-slice-cycle.md),
22
+ [`afk-discipline.md`](reference/afk-discipline.md)); dispatch uses
23
+ [`reference/wright-dispatch.md`](reference/wright-dispatch.md).
24
+
25
+ ## Required rules
26
+
27
+ Read `.devin/skills/devrites-lib/reference/standards/core.md` first. Load only triggered rules:
28
+ coding/error/testing/[`tdd.md`](reference/tdd.md)/patterns/DoD; binding
29
+ `.devrites/principles.md`; security; topology; data integrity; integration reliability.
30
+ Wright applies anti-slop; root verifies returns and never patches source.
31
+
32
+ ## Invariants
33
+
34
+ - Default: one slice; writers serial on control. Parallel only via `--parallel N`
35
+ under [`reference/parallel-batch.md`](reference/parallel-batch.md). Same-worktree
36
+ multi-writer / root-emulated concurrency forbidden. Native-worktree pilot =
37
+ single-slice isolation when `wright-dispatch.md` preflight + reconcile hold.
38
+ - Exact feature scope only; reject out-of-allowlist diffs; record adjacent issues.
39
+ - Re-prove affected behavior after edits; reuse observations only under
40
+ [evidence validity](../devrites-lib/reference/candidate-integrity.md#evidence-validity).
41
+ - Unplanned dependency/design-system/gap/repair → Vet/Spec Drift Guard batch
42
+ sweep: every contract-assumption violation recorded before one folded
43
+ repair+vet. Ask only for licensing/cost/security/product or explicit
44
+ architecture-policy decisions.
45
+ - Root never edits product source/tests (`.devrites/` + Workflow Artifact only).
46
+ Wright is sole product writer; extras in returned paths/`git diff --name-only` hard-stop.
47
+ - Principles bind; irreversible conflict needs human exception or stop.
48
+ - Evidence beats confidence. Never weaken tests, skip TDD, widen writers, or
49
+ self-approve. Drift → [`spec-drift-guard.md`](reference/spec-drift-guard.md);
50
+ checkpoint → [`checkpoint.md`](reference/checkpoint.md).
51
+ - Async readiness waits during slice work follow
52
+ [`debug-recovery.md`](../devrites-lib/reference/standards/debug-recovery.md)
53
+ (bounded poll + last-signal artifact; no blind sleep as primary strategy).
54
+
55
+ ## Workflow Artifact branch
56
+
57
+ <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"Vet-ready admitted bytes require root authorship outside product wright","action":"ROOT_TRANSACTION; root writes only admitted .devrites/** targets","return":"saved Build slice cursor; wright product allowlist unchanged"} -->
58
+ ## `--parallel N` (opt-in)
59
+
60
+ Omitted/`1` ≡ serial; `2`–`10` is a **cap** — the root runs the largest eligible
61
+ path-disjoint set it can start now (`N_eff`), takes fewer when the cap cannot be
62
+ filled, and recomputes after every completed round (serial slice or parallel
63
+ integrate) until no pending slice remains
64
+ ([`parallel-batch.md` § Dynamic selection](reference/parallel-batch.md#dynamic-selection-and-re-batching)).
65
+ Unattended runs (`/rite-autocomplete`, `.devrites/AFK` `max_parallel`) repeat batches
66
+ inside the same run; HITL stops after each batch. This invocation's `--parallel N`
67
+ is the cap: leftover sentinel `max_parallel` is not consulted. Autocomplete with
68
+ that flag also writes or replaces only `max_parallel: N`. Non-integer/`N≤0`/`N>10` hard refuse.
69
+ All-green (independent review + proof) then integrate as one local `WIP(<slug>):`
70
+ commit per sibling onto the current control branch (never pushed). Do not
71
+ integrate a sibling because the wright returned. A red/gap sibling gets a bounded repair
72
+ round in its own worktree — never rebuilt from scratch while budget remains.
73
+ Post-writer inventory and affected rechecks follow `phase-contract.md` § Independent
74
+ Build review; fold accounts before one repair-all wright.
75
+ Plan-owned gaps still route through Spec Drift Guard
76
+ (batch sweep, one folded plan repair + one vet recheck inline); do not emit
77
+ a human `Fix`. Exhausted repair blocks and preserves everything;
78
+ `cleanup --force` salvages slice branches before removing worktrees —
79
+ human-gated to abandon a batch, orchestrator-emitted only as the salvage
80
+ step of an automatic frozen-lease re-batch.
81
+ AFK charges after integrate only. Running lease blocks another
82
+ `/rite-build`. Details: `parallel-batch.md`.
83
+
84
+ ## Execute and reply
85
+
86
+ Run every step in `reference/phase-contract.md`: readiness, one target, dispatch
87
+ or canonical transaction, return inspection, independent code/doubt/test analysis,
88
+ approved fail-on-red proof, record, AFK accounting, and stop. Use
89
+ [`reference/output.md`](reference/output.md) plus the shared
90
+ [`reply contract`](../devrites-lib/reference/reply-contract.md). HITL never starts
91
+ the next slice automatically; AFK obeys remaining budget; Prove requires all slices built.
92
+
93
+ ## Phase exit
94
+
95
+ **Complete when:** Independent Build review and fail-on-red proof are green,
96
+ `git diff --name-only` ⊆ allowlist, no open Critical/Important, `state.md` cursor
97
+ advances with recorded evidence, and the control-branch checkpoint has landed
98
+ per [`checkpoint.md`](reference/checkpoint.md).
99
+
100
+ **Failing case:** wright reports "done" but independent review or proof was
101
+ skipped, red, or followed by an uncommitted repair → slice incomplete; do not
102
+ advance cursor or commit on control.
@@ -0,0 +1,148 @@
1
+ # AFK discipline for unattended `/rite-build`
2
+
3
+ AFK mode is active when `.devrites/AFK` exists. It lets `/rite-build` chain slices
4
+ without per-slice user input. The rules below limit that unattended work.
5
+
6
+ Load the shared
7
+ [`afk-hitl.md`](../../devrites-lib/reference/standards/afk-hitl.md#the-sentinel-devritesafk)
8
+ contract for the sentinel schema, defaults, gate ceiling, and mutable-counter
9
+ ownership. This file owns only Build's dispatch, charging, and red-path behavior.
10
+
11
+ Rules: green before `built`; hard `max_slices` cap; gates before the action they
12
+ control; irreversible work (destructive/auth/public API) always pauses.
13
+
14
+ ## Iteration cap
15
+
16
+ The controlling root owns the cap:
17
+
18
+ 1. **Before every dispatch**, re-read `.devrites/AFK`, `state.md`, and the
19
+ selected slice. This invocation's `--parallel N` is the cap when present;
20
+ leftover sentinel `max_parallel` is not consulted in that case. When that
21
+ flag or sentinel `max_parallel` is greater than 1, recompute `N_eff` via
22
+ `parallel select` before the next dispatch — a prior one-slice round does not keep the run serial. A configured `max_slices` and any existing
23
+ `afk_slices_remaining` value, including its released bullet form, must each
24
+ be a decimal nonnegative integer. A missing
25
+ `state.md` or malformed configured value fails closed; an omitted cap is the
26
+ documented unlimited default only when no remaining counter exists. If the
27
+ effective remaining value is zero, stop before dispatching another slice.
28
+ 2. **After proof is green**, combine the pending → built record and budget
29
+ charge in one `state.md` rewrite. If the remaining field is absent, add
30
+ `afk_slices_remaining` to a cursor table or `AFK slices remaining` to a
31
+ legacy bullet cursor, seed it from `max_slices`, and write
32
+ `max_slices - 1`; otherwise preserve its spelling and write `remaining - 1`.
33
+ The counter is never below zero: a value that would go negative is an invariant failure and
34
+ stops. A missing `max_slices` means unlimited and no remaining field is
35
+ created.
36
+ A controlling orchestrator may pre-seed the remaining field from a validated
37
+ post-plan budget before the first dispatch; never increase or reinitialize an
38
+ existing value.
39
+ 3. **Charge exactly once after each green built slice.** On the control tree, a slice
40
+ already marked built is not charged again after retry, resume, or
41
+ compaction. Re-read the saved cursor; if it is zero, report the cap and stop
42
+ before the next dispatch.
43
+ - **Serial:** charge when fail-on-red is green and the built record is written
44
+ (same rewrite as step 2).
45
+ - **Parallel `--parallel`:** charge only after **successful serial integrate**
46
+ — once per integrated green sibling. Abort / integrate-failed → charge **0**.
47
+ Do not charge on worktree-green before integrate. See
48
+ [`parallel-batch.md`](parallel-batch.md).
49
+
50
+ Use this stop message:
51
+
52
+ ```text
53
+ AFK cap reached. Raise `state.md` `afk_slices_remaining`/`AFK slices remaining` or remove the sentinel to continue.
54
+ ```
55
+
56
+ `max_slices` itself is read-only and never rewritten. No exit-code command
57
+ enforces this policy.
58
+
59
+ Choose caps deliberately (≈5–10 small, ≈30–50 larger). Avoid `unlimited` until HITL
60
+ has succeeded for the work.
61
+
62
+ ## Fail-on-red
63
+
64
+ The **fail-on-red step** refuses `built` when targeted tests/types/lint are red. Red means
65
+ wrong contract or proof path — agent-owned recovery; never advance on broken state.
66
+
67
+ The fail-on-red path:
68
+
69
+ 1. Continue the same wright under `devrites-debug-recovery`, carrying exact output and dead
70
+ ends; cap writer + recovery at three no-progress attempts per exact causal fingerprint.
71
+ A correction that closes the reproduction is progress; a different evidenced
72
+ Critical/Important invariant starts a separate fingerprint.
73
+ 2. Green → record the slice. Product-contract/irreversible ambiguity → write the genuine
74
+ human gate. Missing human-only credential/permission → write a human-intervention gate.
75
+ 3. Any other exhausted objective failure → set `Status: blocked`, preserve the reproduction,
76
+ set `Next step: none — technical recovery exhausted for <causal fingerprint>; requires new evidence or changed failure conditions`, and STOP without a qid or runnable phase command. Reinvocation with the unchanged fingerprint remains blocked and does not reset the cap.
77
+ 4. Fire `notify:` only for an actual `awaiting_human` transition.
78
+
79
+ AFK never starts the next slice while checks are red and never asks the human to approve
80
+ agent-owned diagnosis or parser/test repair.
81
+
82
+ ## Irreversible-risk list (always pause)
83
+
84
+ Regardless of `allow_gates`, AFK invokes the checkpoint protocol when the slice touches
85
+ any of:
86
+
87
+ - Destructive data migration (drop column, drop table, irreversible backfill).
88
+ - Auth / authz boundary change (new role, changed permission check, new public auth endpoint).
89
+ - Public API break (response shape change, removed endpoint, changed status code semantics).
90
+ - External-service contract change (webhook payload, partner-facing schema).
91
+ - Filesystem destructive operation outside the workspace (`rm -rf` of project paths,
92
+ rewriting `.gitignore`-listed paths, deleting fixtures).
93
+ - Anything the slice's `Gate: blocking` plus its `Checkpoint:` line in `tasks.md` flags as irreversible.
94
+
95
+ This is the Claude Code auto-mode transcript classifier list adapted to the DevRites
96
+ workspace.
97
+
98
+ ## The `notify:` hook contract
99
+
100
+ The hook is a single shell command run on the `awaiting_human` transition. Environment
101
+ the hook receives:
102
+
103
+ | Var | Value |
104
+ | --- | --- |
105
+ | `DEVRITES_QID` | the new qid (e.g. `q-2026-05-28-001`) |
106
+ | `DEVRITES_GATE` | `advisory` / `validating` / `blocking` / `escalating` |
107
+ | `DEVRITES_SLICE` | `<N — name>` |
108
+ | `DEVRITES_SLUG` | active feature slug |
109
+ | `DEVRITES_QUESTION` | the checkpoint text |
110
+ | `DEVRITES_PROPOSED` | the proposed answer |
111
+
112
+ The hook is best effort: a non-zero exit does **not** roll back the pause. Failures are
113
+ logged to `evidence.md` so the user sees them on return.
114
+
115
+ Example targets:
116
+
117
+ - `curl -d "$DEVRITES_QID: $DEVRITES_QUESTION" ntfy.sh/my-topic`
118
+ - `osascript -e "display notification \"$DEVRITES_QUESTION\" with title \"DevRites: $DEVRITES_GATE\""`
119
+ - `pb push "$DEVRITES_SLUG: $DEVRITES_QUESTION"` (via pushbullet CLI)
120
+
121
+ DevRites does not implement notifications; the configured hook does.
122
+
123
+ ## When to leave AFK
124
+
125
+ Drop the sentinel before:
126
+
127
+ - A new feature when `/rite-build` has not yet completed successfully on this codebase
128
+ in HITL.
129
+ - A risky slice you marked `Mode: HITL` and want to walk through interactively even if
130
+ the gate is technically `validating`.
131
+ - Any time you'd rather review per-slice than batch-resolve afterwards.
132
+
133
+ AFK allows routine work to continue automatically. Re-enable it for another batch of
134
+ low-stakes work.
135
+
136
+ ## What AFK does NOT do
137
+
138
+ - It does not bypass `/rite-prove`, `/rite-review`, or `/rite-seal`. Those gates are
139
+ feature-scoped and always run when their phase runs.
140
+ - It does not skip `/rite-plan repair` when the Spec Drift Guard finds that the
141
+ durable plan is wrong. Objective implementation and tool failures stay in
142
+ bounded recovery instead.
143
+ - It does not skip `devrites-source-driven` checks. Uncertain framework behavior still
144
+ triggers the doc lookup.
145
+ - It does not skip `evidence.md` writes. AFK runs that don't record evidence are
146
+ unproven and get rejected at `/rite-prove` regardless.
147
+
148
+ The sentinel widens *human pauses*, nothing else.
@@ -0,0 +1,27 @@
1
+ # rite-build: anti-patterns
2
+
3
+ Load when a non-trivial decision stands or stopping, TDD, or doubt discipline
4
+ feels inconvenient.
5
+
6
+ Pack-wide rationalizations and red flags live in
7
+ [standards/anti-patterns.md](../../devrites-lib/reference/standards/anti-patterns.md).
8
+
9
+ ## Phase-specific rationalizations
10
+
11
+ | Excuse | Rebuttal |
12
+ |---|---|
13
+ | "Slices 1 and 2 are related; let me do both." | HITL needs a later user invocation. Explicit `.devrites/AFK` may let the root chain only after green proof and cap/pause gates; each wright still returns after one. |
14
+ | "It's faster to skip `devrites-doubt` for this small change." | Doubt is cheapest *before* the decision is standing. After is debugging. |
15
+
16
+ ## Red Flags
17
+
18
+ - About to start slice N+1 outside explicit AFK or before its green-proof/cap/pause gates.
19
+ - Skipping `devrites-doubt` on a branching, boundary, data-model, auth, public-API, or migration decision.
20
+ - Adding a dependency or a second design system without recording rationale in `decisions.md`.
21
+ - Writing a `try/catch` block wider than what you handle.
22
+ - A comment that restates what the next line does.
23
+ - Touching files that aren't in `touched-files.md` for "tidiness".
24
+ - A comment, filename, test name, or commit subject that mentions `SLICE-###`,
25
+ a slice number, or "this slice".
26
+ - Committing onto control when the wright returns, or before Independent Build
27
+ review and fail-on-red proof are green.
@@ -0,0 +1,120 @@
1
+ # Checkpoint protocol: what `/rite-build` does when a slice is HITL
2
+
3
+ HITL slices pause **pre-action** as a ranked **option set** before any code:
4
+
5
+ - **Interactive:** `AskUserQuestion`; record to `questions.md`/`decisions.md`; clear gate;
6
+ continue in place (no `/rite-resolve` round-trip).
7
+ - **Absent / AFK / notify-only:** persist open question + `Awaiting human`, notify, **stop**.
8
+ Resume via `/rite-resolve` (or `--batch`).
9
+
10
+ ## Render contract
11
+
12
+ Render the checkpoint in user-facing output **and** persist it for the next session / AFK
13
+ observer.
14
+
15
+ ### User-facing render: the option set
16
+
17
+ Present as `AskUserQuestion` ranked **option set** ([`afk-hitl.md`](../../devrites-lib/reference/standards/afk-hitl.md)): 2–4 options,
18
+ recommended first + `(Recommended)`, dimension-tagged trade-offs, plus escape hatch.
19
+ Header names slice + gate:
20
+
21
+ ```
22
+ Slice <N — name> — HITL (<gate>, SLA <SLA>). <Checkpoint text from tasks.md>
23
+
24
+ ▸ 1. <recommended> (Recommended)
25
+ logic: … · infra: … · business: … · architecture: … (+ security/UX/risk if in scope)
26
+ 2. <alternative> — <rationale + the trade-off it accepts>
27
+ 3. <alternative> — <rationale>
28
+ 4. Something else — I'll describe it
29
+ ```
30
+
31
+ Option #1 (recommended) is **required** and must reflect *this* project. Interactive pick →
32
+ resolve in place; pause → persist the same set to `questions.md` `options:` with resume
33
+ `/rite-resolve <qid> "<answer>"` (or `--drop <qid> "<reason>"`).
34
+
35
+ ### Workspace mutations
36
+
37
+ In one bounded root-owned update (one `questions.md` append and one `state.md`
38
+ rewrite; do not claim cross-file atomicity):
39
+
40
+ 1. **`questions.md` append:**
41
+
42
+ ```markdown
43
+ ## q-<YYYY-MM-DD>-<NNN>
44
+ status: open
45
+ slice: <N — name>
46
+ gate: <gate from tasks.md>
47
+ question: <Checkpoint text from tasks.md>
48
+ options: | # the ranked set, recommended first (matches the render)
49
+ 1. <recommended> (Recommended) — logic: … · infra: … · business: … · architecture: …
50
+ 2. <alternative> — <rationale>
51
+ proposed: <the recommended option restated; matches option 1>
52
+ raised_at: <iso>
53
+ ```
54
+
55
+ 2. **`state.md` updates:**
56
+
57
+ ```markdown
58
+ - Status: awaiting_human
59
+ - Active slice: <N — name>
60
+ - Slice mode: HITL
61
+ - Next step: /rite-resolve <qid> "<answer>"
62
+
63
+ ## Awaiting human
64
+ - qid: <q-...-NNN>
65
+ - gate: <gate>
66
+ - question: <Checkpoint text>
67
+ - proposed: <one-paragraph best-guess>
68
+ - raised_at: <iso>
69
+ - blocking_slices: [<list, from `Blocked by` lookups>]
70
+ ```
71
+
72
+ 3. **`notify:` hook (if `.devrites/AFK` defines one):** export all six env vars from the
73
+ canonical contract in [`afk-discipline.md`](afk-discipline.md) (the `notify:` hook
74
+ contract table is the source of truth):
75
+
76
+ ```bash
77
+ DEVRITES_QID="$qid" \
78
+ DEVRITES_GATE="$gate" \
79
+ DEVRITES_SLICE="$slice_id" \
80
+ DEVRITES_SLUG="$slug" \
81
+ DEVRITES_QUESTION="$question" \
82
+ DEVRITES_PROPOSED="$proposed" \
83
+ sh -c "$notify_cmd"
84
+ ```
85
+
86
+ Fire after workspace write. Hook failure does **not** roll back the pause (best-effort).
87
+
88
+ ## qid generation
89
+
90
+ Format: `q-YYYY-MM-DD-NNN`, where `NNN` is the next sequential integer for that date in
91
+ `questions.md`. The controlling root must scan every question header matching
92
+ today's prefix, collect its numeric suffixes, and select one above the highest
93
+ observed suffix (or `001` when none exist), advancing until it is unused. Then
94
+ re-read `questions.md` immediately before the append and repeat the scan. Append only if
95
+ the same candidate is still the next unused id; otherwise recompute. There is no
96
+ reservation or engine command for qids.
97
+
98
+ ## When AFK is active
99
+
100
+ If `.devrites/AFK` exists and the slice `Gate` is in `allow_gates`, skip this protocol and
101
+ auto-pick recommended option 1:
102
+
103
+ - `advisory`: log `gate: advisory` + `decisions.md`, then dispatch wright.
104
+ - `validating` (only if allowed): dispatch wright; on return log `gate: validating`, mark
105
+ `built (pending review)`, continue. Slice states remain `pending|built`; feature
106
+ acceptance is `/rite-prove`. Open `validating` is NO-GO at seal until `/rite-resolve`.
107
+
108
+ `blocking` / `escalating` / irreversible-risk always use this protocol (`afk-discipline.md`).
109
+
110
+ ## Multi-question pauses
111
+
112
+ **One question per pause.** Multiple HITL checkpoints → `/rite-plan reslice`.
113
+
114
+ ## What NOT to do
115
+
116
+ - Don't write code then pause — pre-action only.
117
+ - Don't render without persisting `state.md` + `questions.md`.
118
+ - Don't self-answer a human pause via `proposed:` — `/rite-resolve` needs an explicit
119
+ answer (distinct from interactive pick / AFK auto-pick on `allow_gates`).
120
+ - Don't put `notify:` output in chat; don't fire `notify:` on advisory-only entries.