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,87 @@
1
+ ---
2
+ name: rite-ship
3
+ description: Commit, push, tag, archive, or close a sealed feature after /rite-seal GO. Use for repository mutation; not for GO/NO-GO readiness.
4
+ argument-hint: "[feature-slug]"
5
+ ---
6
+
7
+ # /rite-ship: ship + close the task
8
+
9
+ `/rite-seal` decides; `/rite-ship` mutates Git and closes. Read the active workspace;
10
+ if absent, route to `/rite-spec <feature>`. Ship only with current **GO** in `seal.md`.
11
+
12
+ ## Rules consulted (read on demand from `.devin/skills/devrites-lib/reference/standards/`)
13
+ **Step 0:** Read [`core.md`](../devrites-lib/reference/standards/core.md), then pull as needed:
14
+ - [`git-workflow.md`](../devrites-lib/reference/standards/git-workflow.md): Conventional Commits, atomicity, never-commit list.
15
+ - [`afk-hitl.md`](../devrites-lib/reference/standards/afk-hitl.md): AFK pause rules for irreversible actions (the type-GO gate itself: [`git-ship.md`](reference/git-ship.md), [`rollout.md`](reference/rollout.md)).
16
+ - [`definition-of-done.md`](../devrites-lib/reference/standards/definition-of-done.md): acceptance, evidence, drift, rollback, docs.
17
+ - [`release/ship-checklist.md`](../devrites-lib/reference/standards/release/ship-checklist.md): final pass/fail sweep.
18
+
19
+ ## Operating rules
20
+ - **GO is prerequisite.** No current `seal.md` GO → stop at `/rite-seal`.
21
+ - **Ship is candidate-read-only.** Follow
22
+ [`candidate-integrity.md`](../devrites-lib/reference/candidate-integrity.md).
23
+ Ship must not change any candidate path or `touched-files.md`; it may write only
24
+ workspace `ship.md`, `state.md`, and archive bookkeeping. Project/manifest mutation
25
+ returns through Prove → Review → Seal.
26
+ - **Bindings stay exact.** Rerun candidate/Seal checks; require the digest bound in
27
+ evidence, optional browser evidence, review, and seal. Any mismatch stops.
28
+ - **Fresh approval.** Disclose the exact Git attempt; literal `GO` authorizes it once.
29
+ Change/retry means re-prompt. Native approval remains separate/authoritative.
30
+ - **Archive, never delete,** every audit `.md`.
31
+
32
+ ## Workflow
33
+ 1. **Orient.** Snapshot; read seal, state, spec, touched files, evidence, and any UI
34
+ brief. Confirm GO/closed digest, then run:
35
+ ```bash
36
+ devrites-engine check candidate <slug>
37
+ devrites-engine check seal <slug>
38
+ ```
39
+ Nonzero/mismatch stops; never reinterpret it.
40
+ 1a. **Health (advisory).** Apply `/rite-doctor` read-only; surface WARN/FAIL without
41
+ repair. If ACTIVE is flagged, confirm the slug.
42
+ 2. **Prepare the exact Git candidate.** Follow
43
+ [`git-ship.md`](reference/git-ship.md): refuse out-of-manifest staged work; stage
44
+ exact manifest paths only after Seal GO; compare NUL-delimited staged state/path
45
+ sets, require identical index/worktree bytes, and rerun candidate/Seal checks.
46
+ From the verified index, build the exact project-conformant message/trailers,
47
+ branch, tag/PR, commands, and skips.
48
+ 2a. **Credential guard (HIGH blocks).** Scan staged blobs and any PR body. HIGH stops
49
+ and requires rotation/redaction; MEDIUM needs confirmation recorded in `ship.md`;
50
+ LOW is FYI.
51
+ ```bash
52
+ devrites-engine secret-scan --staged
53
+ ```
54
+ Scan a PR body with `devrites-engine secret-scan --stdin` only through non-logging
55
+ process stdin, then close it—never command/argv/env/heredoc/log/temp file. If that
56
+ channel is unavailable, stop. **rc=3 → STOP:** no type-GO/commit/push/archive.
57
+ 2b. **Reconcile residuals before type-GO.** Scan `strategy.md` deferrals,
58
+ `decisions.md` FYIs/revisit triggers, unresolved `review.md` non-blocking/if-minor/
59
+ FYI findings, and `seal.md` follow-ups. Deduplicate only rows with identical
60
+ obligation + disposition, preserving every source pointer. Each residual appears
61
+ once in the pending `ship.md` table as `tracked` (durable path/ID) or `no-action`
62
+ (prior decision or explicit human acceptance + reason/revisit). Type-GO never
63
+ implies `no-action`. Missing/vague/conflicting disposition blocks; `none` requires
64
+ empty sources.
65
+ 3. **Type-GO.** Render [`git-ship.md`](reference/git-ship.md)'s prompt and wait.
66
+ Literal `GO` proceeds once; anything else records cancellation in `ship.md` and
67
+ stops. Any command/scope/branch/message/tag/PR change or retry needs a fresh prompt;
68
+ native approval is still required.
69
+ 4. On GO, commit; verify committed state/path set and exact candidate digest; then push →
70
+ tag/PR as applicable via `git-ship.md`. Capture SHA(s), branch, tag/PR URL. Mismatch
71
+ stops before push/tag; retry needs fresh approval.
72
+ 4a. **PR only:** render [`git-ship.md`](reference/git-ship.md#pull-request-body)'s
73
+ structured body; omit empty sections.
74
+ 5. Re-scan the four residual sources; any new/missing/changed item blocks archive.
75
+ Write [the template](reference/ship-template.md) with shipment metadata and the
76
+ unchanged pre-GO reconciliation.
77
+ 6. **Close.** Set `state.md` phase `done`; follow
78
+ [`close-out.md`](reference/close-out.md) and run `devrites-engine state close <slug>`
79
+ to move `.devrites/work/<slug>` → `.devrites/archive/<slug>` and clear `ACTIVE`
80
+ only if it names this slug; preserve another active feature's cursor.
81
+ Preserve every `.md`; stable hierarchical instructions need no active-workspace sync.
82
+ Report the recorded `Next step` verbatim — the exact `/rite-spec <parent>-<n> "<objective>"`
83
+ when a continuation sequence remains — so the next increment starts from one line,
84
+ never from chat memory.
85
+
86
+ > **Mid-flight discipline.** No seal GO, skipped type-GO, out-of-manifest stage, or
87
+ > deleted workspace. Stop and use [`anti-patterns`](reference/anti-patterns.md).
@@ -0,0 +1,28 @@
1
+ # rite-ship: anti-patterns
2
+
3
+ Load this before any irreversible action: `git commit`, `push`, `tag`, publish, deploy,
4
+ or when tempted to skip the close-out.
5
+
6
+ Pack-wide rationalizations + red flags: see
7
+ [standards/anti-patterns.md](../../devrites-lib/reference/standards/anti-patterns.md).
8
+
9
+ ## Phase-specific rationalizations
10
+
11
+ | Excuse | Rebuttal |
12
+ |---|---|
13
+ | "Seal said GO, so I can just push." | A GO verdict is a decision, not authorization. **Render the type-GO prompt every time** and wait for the literal `GO`. |
14
+ | "I'll push the tag now; type-GO is a formality." | Type-GO is the last safety net before an irreversible action. Always render it: even under auto-trigger. |
15
+ | "`git add -A` is faster than listing touched files." | Stage only what's in `touched-files.md`. `-A` sweeps secrets, scratch files, and out-of-scope edits into the ship. |
16
+ | "The evidence is probably still good." | Recheck the canonical candidate digest and every artifact binding. Any mismatch stops. |
17
+ | "The ledger/DESIGN/ADR update is just ship bookkeeping." | Those are candidate paths. Route the change through Polish, affected Prove, Review, and Seal; Ship is read-only. |
18
+ | "Delete the workspace, the feature's done." | Closing **archives** the workspace (`.devrites/archive/<slug>/`); it never deletes the audit trail. |
19
+
20
+ ## Red Flags
21
+
22
+ - About to run `git push` / `git tag` without rendering the type-GO prompt.
23
+ - Shipping without a `GO` verdict recorded in `seal.md`.
24
+ - Staging files not listed in `touched-files.md`, or any secret / `.env`.
25
+ - Changing a candidate path or the manifest after Seal.
26
+ - Pushing or tagging before the committed NUL-delimited state/path and digest checks pass.
27
+ - `rm`-ing `.devrites/work/<slug>/` instead of archiving it.
28
+ - Marking the feature `done` but leaving `.devrites/ACTIVE` pointing at it.
@@ -0,0 +1,68 @@
1
+ # Close-out: archive the workspace, free the active slot
2
+
3
+ Closing a feature means it stops being the *active* work, not that its record is
4
+ deleted. DevRites keeps the audit trail; it just moves out of the live path.
5
+
6
+ ## What close-out does
7
+
8
+ 1. **Mark done.** Set `state.md` → `Phase: done`, `Status: done`, and a `Next step`.
9
+ When this workspace's `decisions.md` records an unfinished
10
+ [continuation sequence](../../rite-plan/reference/slicing.md#continuation-workspaces),
11
+ that step is the **exact** next command — `/rite-spec <parent>-<n> "<objective>"` —
12
+ and the ship reply prints the same line. Otherwise it stays
13
+ `/rite-spec <next feature>`. Nothing spawns the continuation automatically:
14
+ the recorded command is the handoff, so the human starts each increment knowingly.
15
+ 2. **Archive.** Run the deterministic script:
16
+ ```bash
17
+ devrites-engine state close <slug>
18
+ ```
19
+ It moves `.devrites/work/<slug>/` → `.devrites/archive/<slug>/` (every `.md`
20
+ intact) and clears `.devrites/ACTIVE` **only if** ACTIVE still points at `<slug>`.
21
+ It refuses to clobber an existing `.devrites/archive/<slug>/` (exit 5).
22
+ 3. **Confirm the observed post-state.** The archive exists with its audit records
23
+ intact and the live workspace is absent. If ACTIVE named this slug, verify it is
24
+ empty; if it named another feature, verify that value remains unchanged. Only an
25
+ empty cursor permits the claim "no active feature".
26
+
27
+ Any nonzero exit stops close-out. Archive collision (exit 5) never authorizes overwrite.
28
+ If clearing ACTIVE fails, the engine attempts to move the archive back; that rollback
29
+ can also fail. Inspect the actual live path, archive and cursor before reporting or
30
+ retrying. Record the command/error and observed locations; never claim restored state
31
+ from an attempted rollback or repeat a move against an unverified destination.
32
+
33
+ ## Sequence predecessors
34
+
35
+ A deferred-ship sequence leaves earlier milestones sealed and unarchived in
36
+ `.devrites/work/`. The release ship's disclosed plan may close them
37
+ (`devrites-engine state close '<slug>'` per predecessor) after the release commit
38
+ lands; each close is safe because `ACTIVE` names the release workspace. Closing is
39
+ bookkeeping only: the release commit already carries their bytes, and their audit
40
+ records move intact.
41
+
42
+ ## Why archive, not delete
43
+
44
+ - The `.md` files (`spec`, `decisions`, `assumptions`, `evidence`, `seal`, `ship`, …)
45
+ are the project's record of *why* the feature is the way it is. A future
46
+ `/rite-zoom-out` or incident review reads them.
47
+ - Deleting them would make the workflow's own "evidence over confidence" rule a lie.
48
+
49
+ ## Re-opening an archived feature
50
+
51
+ Before restoring an archive, verify its identity, released cursor form and declared
52
+ workspace schema, that the live destination is absent, and that ACTIVE is empty or
53
+ already names this slug. A collision or another active feature stops restoration;
54
+ do not replace its workspace or cursor. Supported released cursor forms remain valid:
55
+ age or encoding alone never requires normalization (see
56
+ [workspace-artifact-schema.md](../../devrites-lib/reference/workspace-artifact-schema.md)).
57
+ An unsupported declared schema stops restoration: record the observed version,
58
+ installed engine's recovery diagnostic and pending normalization owner. Do not guess
59
+ a repair or claim `/rite-upgrade` migrates archives; archived/done work is its no-op.
60
+
61
+ After an authorized restoration, verify the actual paths and cursor and preserve the
62
+ audit records. Reconcile the resumed scope through `/rite-converge`; changes return to
63
+ the applicable earlier lifecycle stage. Historical proof/GO remains historical: a new
64
+ candidate requires fresh Prove → Polish → Review → Seal bindings before Ship. Restoring files
65
+ does not reactivate an old GO.
66
+
67
+ Cross-feature review is user-invoked through `/rite-learn`; close-out does not
68
+ mine, score, nudge, or write a retrospective ledger.
@@ -0,0 +1,120 @@
1
+ # The irreversible ship: type-GO + git ladder
2
+
3
+ `/rite-ship` alone runs irreversible actions. A seal GO is never authorization for Git.
4
+ Require fresh approval for one disclosed attempt plus native permission.
5
+
6
+ ## The type-GO prompt (render verbatim, wait)
7
+
8
+ ```
9
+ Feature: <slug>
10
+ Verdict: GO (seal.md)
11
+ Acceptance criteria proven: <n / total>
12
+ Branch: <target branch>
13
+ Candidate paths: <exact project-relative paths>
14
+ Checkpoint collapse: <exact `git reset --soft '<merge-base>'` command | skip>
15
+ Collapse slugs: <active slug plus every recorded sequence slug in the range | n/a>
16
+ Stage plan: <exact argv-safe `git add -- '<path>'` command for every manifest row>
17
+ Commit: <exact git commit command>
18
+ Push: <exact git push command | skip>
19
+ Tag: <exact git tag command | skip>
20
+ PR: <exact PR command, target, title, and body source | skip>
21
+ Close: <exact `devrites-engine state close '<slug>'` for each sealed sequence predecessor | skip>
22
+
23
+ Type "GO" exactly to approve this attempt once. Anything else cancels.
24
+ ```
25
+
26
+ Rules:
27
+ - Render every attempt; autocomplete flags only reach this boundary.
28
+ - Only literal `GO` proceeds. Anything else cancels, records
29
+ `user declined irreversible step at <ts>` in `ship.md`, and stops.
30
+ - `GO` is one-use for the shown scope/commands; changed/retried plans re-prompt.
31
+ - Prior answers, AFK, seal GO, and native approval do not replace type-GO;
32
+ type-GO never replaces/bypasses native permission or sandbox approval.
33
+
34
+ ## The candidate-safe Git ladder
35
+
36
+ Follow [`git-workflow.md`](../../devrites-lib/reference/standards/git-workflow.md) and project convention; invent no release flow.
37
+ Candidate identity always comes from `devrites-engine check candidate`; do not
38
+ implement a Git-side hash.
39
+
40
+ ### Before type-GO
41
+
42
+ Pre-GO is read-only. Do not run the disclosed collapse or staging commands.
43
+
44
+ 0. **Protect existing index work.** Read the NUL-delimited staged state/path set.
45
+ Refuse a pre-existing staged path outside the manifest; never unstage, stage,
46
+ reset, or discard user work.
47
+ 1. **Analyze checkpoint history without mutating it.** Read the upstream, merge
48
+ base, commit OIDs, and full subjects. If no checkpoint commit exists, disclose
49
+ `skip`. A collapse is eligible only when every commit in its range has the exact
50
+ `WIP(<slug>):` prefix for the validated active slug — or, for a release ship of a
51
+ deferred-ship sequence, for a slug recorded in the parent's `decisions.md`
52
+ sequence whose workspace is sealed in this run
53
+ ([afk-hitl.md § Sequence continuation](../../devrites-lib/reference/standards/afk-hitl.md#sequence-continuation-continue_sequence-max_workspaces));
54
+ disclose the exact slug set. A different slug, missing colon, broad `WIP(` match,
55
+ ordinary commit, or mixed history blocks; never reinterpret the range.
56
+ 2. **Verify the candidate.** Rerun `devrites-engine check candidate <slug>` and
57
+ `devrites-engine check seal <slug>`, compare every binding, require the
58
+ candidate worktree paths to be unchanged, and inspect the existing staged
59
+ scope. These checks do not prepare the index.
60
+ 3. **Prepare the disclosure.** Build argv-safe commands from literal validated
61
+ paths, without `eval` or command-string interpolation. Run only read-only
62
+ secret scans of the existing staged state and proposed PR body. Render the
63
+ literal prompt with the exact optional collapse command or `skip`, exact stage
64
+ plan, commit, push, tag, and PR commands; then wait.
65
+
66
+ ### After type-GO
67
+
68
+ 1. **Optional checkpoint collapse.** If and only if the prompt disclosed it,
69
+ recheck that `HEAD`, merge base, and every subject are unchanged and that each
70
+ subject starts exactly `WIP(<slug>):` for the disclosed slug set, then run the
71
+ exact disclosed `git reset --soft "$mb"`. Otherwise skip. Any different or mixed
72
+ subject blocks without mutation.
73
+ 2. **Exact staging.** Run `git add -- "$path"` once for each disclosed manifest
74
+ row, passing each validated project-relative path as its own quoted argv
75
+ element. Use no glob, directory, `-A`, `.env`, secret, out-of-scope path,
76
+ `eval`, or interpolated command string.
77
+ 3. **Compare staged scope.** Compare the NUL-delimited output of
78
+ `git diff --cached --name-status --no-renames -z` to the manifest's exact
79
+ state/path set. `present` maps only to `A` or `M`; `deleted` maps only to `D`.
80
+ Reject missing, extra, renamed, duplicated, or differently classified paths.
81
+ 4. **Compare staged bytes.** Require no index-to-worktree difference for any
82
+ manifest path. A dirty manifest path stops; never stage or reinterpret it
83
+ after this comparison.
84
+ 5. **Revalidate immediately before commit.** With no intervening mutation,
85
+ rerun `devrites-engine check candidate <slug>` and
86
+ `devrites-engine check seal <slug>`, require the exact candidate digest and
87
+ every evidence/browser/review/Seal binding, then run the staged secret scan.
88
+ Any scope, byte, identity, binding, scan, history, or command drift invalidates
89
+ the one-use approval. Stop and render a fresh type-GO prompt; do not repair the
90
+ drift under the old approval.
91
+ 6. **Commit** one logical change using Conventional Commit and a why-body.
92
+ Non-trivial work adds applicable `Constraint:`, `Rejected:`, `Confidence:`,
93
+ `Scope-risk:`, and `Not-tested:` workspace trailers; trivial edits omit them.
94
+ 7. **Verify the commit.** Immediately after the authorized commit and before any
95
+ push or tag, compare
96
+ `git diff-tree --root --no-commit-id --name-status --no-renames -r -z HEAD`
97
+ to the manifest using the same exact state/path mapping. Require candidate
98
+ paths still match `HEAD`, then rerun `devrites-engine check candidate <slug>`
99
+ and `devrites-engine check seal <slug>` and compare the exact digest again.
100
+ Any mismatch stops; do not reinterpret it.
101
+ 8. **Push** to the project-conventional target branch.
102
+ 9. **Tag / PR** only when project convention requires it; otherwise skip.
103
+ 10. **Close sealed predecessors** only when the prompt disclosed them: run the
104
+ exact `devrites-engine state close '<slug>'` once per predecessor. Each is safe
105
+ because `ACTIVE` names the release workspace; a nonzero exit stops the rest and
106
+ is reported, never retried against an unverified destination.
107
+
108
+ Record SHA(s), branch, and tag/PR URL in `ship.md`.
109
+
110
+ ## Pull request body
111
+
112
+ When this ship opens a PR, include only applicable sections:
113
+
114
+ - **Summary:** what shipped and acceptance proven.
115
+ - **Risk & rollback:** migration/auth/destructive risk and reversal from `seal.md`.
116
+ - **What to scrutinize:** highest-blast-radius review stops.
117
+ - **Evidence:** condensed proof plus the archived evidence bundle.
118
+
119
+ For an agent-owned staged rollout, apply [`rollout.md`](rollout.md). CI-owned deploys
120
+ skip that branch. Delete empty sections rather than writing `N/A`.
@@ -0,0 +1,62 @@
1
+ # Staged rollout and recovery: live deploys only
2
+
3
+ Load this only when `/rite-ship` itself is explicitly authorized to drive a live
4
+ deployment. Git-only Ship stops before rollout; CI-owned deployment follows the pipeline's
5
+ runbook. A Seal GO or AFK setting never authorizes production action.
6
+
7
+ ## Preconditions before exposure
8
+
9
+ Record one rollout sheet in `ship.md`:
10
+
11
+ | Item | Required decision/evidence |
12
+ | --- | --- |
13
+ | Units and order | Repository/deployable, schema, config, application, worker, contract, and flag order; safe old/new combinations. |
14
+ | Exposure stages | Project-native internal/canary/cohort/percentage/region stages and hold window. |
15
+ | Advance/hold/abort signals | Project baseline or SLO, measurement window, minimum sample, exact threshold, and owner. |
16
+ | Recovery | Fastest safe mechanism, steps, owner, measured/rehearsed time, and data/external-effect reconciliation. |
17
+ | Observability | Watched dashboard/query/alert, failure signal, and executable first action. |
18
+ | Authorization | Exact target/action approved for this attempt; no inferred retry permission. |
19
+
20
+ Do not import generic percentage, latency, error-rate, or time-to-rollback numbers. Use
21
+ accepted product risk, current baseline/SLO, traffic volume, and platform capability. If the
22
+ project has no defensible threshold or signal, the monitoring gap blocks live exposure.
23
+
24
+ ## Choose the smallest reversible mechanism
25
+
26
+ - A feature flag is useful only when the off path preserves current behavior, both states
27
+ are tested, disabling it stops the risky effect, and it has an owner/removal trigger.
28
+ Do not add a flag to a change already reversible by a safe atomic deploy.
29
+ - A flag cannot reverse destructive data/schema effects. Apply
30
+ [`data-integrity.md`](../../devrites-lib/reference/standards/data-integrity.md) and prove
31
+ restore or forward recovery separately.
32
+ - External APIs, webhooks, queues, jobs, and caches apply
33
+ [`integration-reliability.md`](../../devrites-lib/reference/standards/integration-reliability.md):
34
+ reconcile unknown outcomes, drain/quarantine/replay safely, and protect downstream capacity.
35
+ - Multi-root/service rollout follows
36
+ [`repository-topology.md`](../../devrites-lib/reference/standards/repository-topology.md);
37
+ references to another repository never grant write/deploy authority there.
38
+
39
+ ## Stage, observe, decide
40
+
41
+ At each authorized stage:
42
+
43
+ 1. Verify the intended versions/config/schema and candidate identity on the exact target.
44
+ 2. Exercise one critical success path and the declared degradation/recovery signal.
45
+ 3. Observe for the recorded window and sample; bind results to the stage and baseline.
46
+ 4. **Advance** only when every advance condition holds. **Hold** on ambiguous or
47
+ insufficient evidence. **Abort/recover** immediately on an abort condition, security or
48
+ tenant breach, data-integrity violation, unreconciled duplicate/unknown effect, or loss of
49
+ observability.
50
+ 5. Re-verify after recovery; record partial effects and reconciliation. A rollback command
51
+ exiting zero is not proof the prior state or data was restored.
52
+
53
+ Never compress stages because an early sample "looks fine," continue through a monitoring
54
+ gap, or retry a failed live action without fresh authorization when the attempt/target changes.
55
+
56
+ ## Completion
57
+
58
+ Rollout is complete only when full intended exposure meets the recorded window/signals,
59
+ telemetry is still watched, migrations/backfills and queues/reconciliation are settled,
60
+ documentation matches deployed behavior, and temporary flags/compatibility paths have a
61
+ dated removal owner. Otherwise report the exact current stage and remaining risk; do not call
62
+ the launch done.
@@ -0,0 +1,39 @@
1
+ # `ship.md` template
2
+
3
+ Write before close-out; it moves to `.devrites/archive/<slug>/ship.md`.
4
+
5
+ ```markdown
6
+ # Ship: <slug>
7
+
8
+ - Shipped at: <iso>
9
+ - Verdict: GO (seal.md)
10
+ - Branch: <branch>
11
+ - Commit(s): <sha> [<sha> …]
12
+ - Tag/PR: <value|none>
13
+
14
+ ## What shipped
15
+ <project-vocabulary paragraph>
16
+
17
+ ## Acceptance
18
+ - Proven: <n/total> (evidence.md/seal.md)
19
+ - Outstanding: <rows below | none>
20
+
21
+ ## Evidence
22
+ - seal.md — verdict/reconciliation
23
+ - evidence.md — acceptance; browser-evidence.md if UI
24
+ - review.md — review findings
25
+
26
+ ## Follow-up reconciliation
27
+ Checked: strategy.md (if present), decisions.md, review.md, seal.md.
28
+
29
+ | Source | Item | Disposition | Destination / rationale |
30
+ |---|---|---|---|
31
+ | <file + section> | <item> | tracked | <durable path/ID> |
32
+ | <file + section> | <item> | no-action | <decision or explicit human no-action approval + reason/revisit> |
33
+
34
+ <If empty: No residual items found.>
35
+ ```
36
+
37
+ Keep pointers short. Acceptance MUST match `seal.md`. Each source residual appears
38
+ once; a missing target, unsupported `no-action`, vague disposition, or conflict blocks
39
+ close-out.
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: rite-spec
3
+ description: Specify new, vague, or high-risk behavior before code. Use for features, auth, migrations, or public API changes; not for planning an approved spec.
4
+ argument-hint: "<feature or idea>"
5
+ ---
6
+
7
+ # /rite-spec: investigate and write the spec
8
+
9
+ Investigate and resolve material gaps into a placed, covered `spec.md`.
10
+ `/rite-clarify` audits topology next. Write no plan, task, or code here.
11
+
12
+ > Use `/rite-quick` for a typo, copy/config edit, or one-function fix. It returns
13
+ > here for auth, data, migration, public API, or multi-slice work.
14
+
15
+ ## Rules consulted (read on demand from `.devin/skills/devrites-lib/reference/standards/`)
16
+ Pull [`documentation.md`](../devrites-lib/reference/standards/documentation.md) for significant decisions and [`principles.md`](../devrites-lib/reference/standards/principles.md) for
17
+ declared invariants; an unavoidable principle violation is blocking.
18
+ For behavioral/high-risk acceptance, use [`spec-grammar.md`](../devrites-lib/reference/standards/spec-grammar.md) plus workspace schema;
19
+ simple criteria stay flat `AC-###`. Apply
20
+ [`acceptance-criteria.md`](reference/acceptance-criteria.md) so each is binary and observable.
21
+ Use [`edge-case-trace.md`](../devrites-lib/reference/standards/edge-case-trace.md)
22
+ to populate only relevant edge/prohibition rows. The spec's applicability map routes
23
+ topology, data, integration, security, and delivery concerns to their focused standard;
24
+ load a routed standard to discover required behavior, not to prescribe implementation.
25
+
26
+ ## Operating rules (DevRites core)
27
+ - No silent assumptions or guessing; prefer conventions; ask on scope,
28
+ placement, data, UX, security, migration, or acceptance changes.
29
+ - **Root authority:** controlling chat asks humans, decides, and writes workspace;
30
+ evidence work follows [`agents.md`](../devrites-lib/reference/standards/agents.md).
31
+ - **Author one section at a time:** problem → goal → requirements → acceptance →
32
+ edges. For contested requirements/boundaries/assumptions, apply
33
+ [`elicitation.md`](../devrites-lib/reference/standards/elicitation.md) before continuing.
34
+
35
+ ## Workflow
36
+ 0. Read core; if `.devrites/ACTIVE` exists, require its `state.md`.
37
+ 0a. **Adoption check.** For a never-adopted existing codebase, route first to
38
+ `/rite-adopt` with `$ARGUMENTS`; it derives baseline spec/principles. HITL
39
+ offers ranked adopt-first and spec-only choices; permitted AFK adopts.
40
+ Silently skip greenfield/onboarded projects, and never block solely on absence:
41
+ ```bash
42
+ if [ ! -d .devrites/archive ] \
43
+ && [ -z "$(ls .devrites/work 2>/dev/null)" ] \
44
+ && [ -n "$(git ls-files 2>/dev/null | grep -vE '^\.(devrites|claude)/' | head -1)" ]; then
45
+ echo "brownfield, not yet adopted → recommend /rite-adopt first (carry this idea as its next objective)"
46
+ else echo "greenfield or already onboarded → continue spec"; fi
47
+ ```
48
+ 1. **Understand the request** (`$ARGUMENTS`). State outcome and underlying
49
+ problem in one sentence. **Completion:** it includes both.
50
+ 1a. **Dedupe.** Search local issues/PRDs, work, and archive. On a close match ask
51
+ extend/adopt/new, then record the choice; otherwise continue silently.
52
+ A recorded [feature-sequence continuation](../rite-plan/reference/slicing.md#continuation-workspaces)
53
+ is a **new** workspace (`<parent>-2`): carry the parent slug and position into
54
+ `brief.md`, read the parent artifacts as design input, and do not route to
55
+ `/rite-plan revise` on the parent. When the ask is open and archived work records
56
+ an unfinished sequence, propose that next continuation (slug + objective) as the
57
+ recommended option instead of a fresh slug.
58
+ 2. **Investigate:** follow [investigation](reference/investigation.md) through its
59
+ complete findings and done-when gate. Discover the project's **test /
60
+ build/typecheck/lint** commands, frontend/backend systems, and declared project guidance
61
+ (`PRODUCT.md`, `DESIGN.md`, `CLAUDE.md`, `AGENTS.md`, and `.devrites/principles.md` when
62
+ present).
63
+ **Consult the capability ledger**, which records current system behavior
64
+ ([`ledger.md`](../rite-polish/reference/ledger.md)); Polish folds accepted deltas
65
+ before Review. List `.devrites/specs/*/spec.md` with the
66
+ host filesystem and read only capabilities this feature touches. Search accepted ADRs and
67
+ relevant `.devrites/**/decisions.md` files directly before asking the human to revisit a
68
+ settled architecture, API, or auth choice. Compare exact requirement headers and meanings
69
+ with the current ledger to choose ADDED/MODIFIED/REMOVED; never classify from memory. Use
70
+ [`spec-grammar.md`](../devrites-lib/reference/standards/spec-grammar.md)'s singular `Capability impact:` declaration to name the affected
71
+ capabilities and change, or give its specific `none` justification.
72
+ Inventory affected observable behavior from current test/contract/runtime/source
73
+ evidence; map each outcome to preserving REQ/AC. Greenfield `none` needs the
74
+ template's specific justification.
75
+ Identify proof constraints now: human-only credentials, unavailable environments, approval
76
+ windows, or acceptance not observable through existing test/runtime/browser surfaces.
77
+ An unfamiliar framework/version routes to `devrites-source-driven`; missing or
78
+ contradictory documentation is evidence to reconcile, never a license to guess.
79
+ Split independent placement, blast-radius, and external-fact questions into at most three
80
+ bounded `devrites-evidence-scout` tasks on one frozen candidate. Wait for and reconcile every
81
+ cited dossier before step 4. The scout supplies facts only; it never asks the human or writes
82
+ the spec.
83
+ 3. **Gather design references when provided:** [references-intake](reference/references-intake.md).
84
+ The human may attach screenshots, mockups, a Figma link, a video, links, or nothing.
85
+ Skip this step when none are provided. Otherwise, **view or fetch**
86
+ them, **save local files** into `.devrites/work/<slug>/references/`, and index them in
87
+ `references.md` as target, constraint, or inspiration. Later phases honor that role
88
+ rather than treating every reference as a fidelity target.
89
+ **Completion:** every supplied reference is saved and classified, or absence is explicit.
90
+ 3a. **Shape UX/UI before code when the feature is frontend**
91
+ ([frontend-trigger](../rite-build/reference/frontend-trigger.md)). Apply
92
+ `devrites-ux-shape` within the spec phase. It turns the
93
+ references and spec into a feature-level **`design-brief.md`** (design direction, key
94
+ states, interaction model, optional Figma/image visual-direction probe) that `/rite-build`
95
+ targets for the build. In HITL it pauses for the human to
96
+ confirm the direction; in AFK it asserts the best guess and logs it. Pure
97
+ backend/data/CLI features skip this.
98
+ 4. **Resolve human-owned gaps.** Recommend an option and let the human decide. Apply
99
+ [question-protocol](reference/question-protocol.md), the shared
100
+ [[`afk-hitl.md`](../devrites-lib/reference/standards/afk-hitl.md) option-set and decision-ownership rules](../devrites-lib/reference/standards/afk-hitl.md#decision-ownership-search-before-asking),
101
+ and [`interview-patterns.md`](reference/interview-patterns.md) for a vague ask. Every
102
+ material dimension is resolved by a human pick or explicitly deferred as non-blocking;
103
+ only genuinely reversible, low-impact details go to `assumptions.md`. A paper-only
104
+ uncertainty may take one scoped `/rite-prototype` detour. A declared-principle conflict
105
+ remains blocking until the human approves a recorded, scoped exception.
106
+ 4a. **Build-interruption forecast.** Search first, then list and close foreseeable human needs:
107
+ product/acceptance ambiguity, irreversible/external approval, or human-only access. Record
108
+ owned prerequisites. Keep a build checkpoint only for unavailable pre-code evidence or a
109
+ mandatory action-time approval. **Completion:** no foreseeable human choice is deferred.
110
+ 5. **Create or update the workspace** + set `.devrites/ACTIVE` from
111
+ [state-workspace](reference/state-workspace.md). If the slug already exists,
112
+ update the existing workspace rather than overwrite it; preserve history and
113
+ unrelated settled content. Write every required artifact and conditional
114
+ annex exactly from [spec-template](reference/spec-template.md)
115
+ ([ai-spec-template](reference/ai-spec-template.md)), including its
116
+ capability impact, existing-behavior preservation, grammar/delta,
117
+ stakeholder/constraint/invariant, failure/recovery, applicability, coverage-seed,
118
+ qualified backstop, edge/prohibition, UI, and AI rules. Native
119
+ hierarchical instructions remain stable; do not rewrite `AGENTS.md` or
120
+ `CLAUDE.md` for the active workspace.
121
+ 5a. **Check the spec prose** with [spec-checklists](reference/spec-checklists.md).
122
+ Emit every applicable domain checklist and fix each CRITICAL by correcting the spec,
123
+ never by softening the question.
124
+ 6. **Run the complete readiness gate** at the bottom of
125
+ [spec-template](reference/spec-template.md), then apply the
126
+ **Native grammar re-read checklist** in [`spec-grammar.md`](../devrites-lib/reference/standards/spec-grammar.md) to the complete
127
+ saved `spec.md`. Re-open the file after corrections and verify every
128
+ applicable item; there is no parser or replacement script. Natively compare
129
+ deltas with the current ledger using exact header semantics and the ledger's
130
+ complete-block preservation rule.
131
+ `tasks.md` deliberately does not exist yet; cross-artifact traceability starts in
132
+ `/rite-define`. Any grammar or delta failure blocks. The interruption forecast must be resolved, owned, or a justified
133
+ action-time gate. Then write `Spec gate: passed <iso>`.
134
+ 6a. **Existing-spec delta.** For a pre-existing slug/workspace, compare old/new
135
+ spec and questions, then show `Acceptance delta` (added/removed/reworded IDs)
136
+ and `Open-question delta` (opened/resolved/reworded IDs), using `none` for
137
+ empty categories. Show before proceeding; new workspaces skip.
138
+ 6b. **Review-before-code digest.** Before planning, render the compact human review:
139
+ `Intent` (one sentence), `Done means` (top acceptance/scenario IDs), `Scope/risk` (what is in/out
140
+ plus the hard gates), and `Build exactly this?` (yes → next phase; no → revise now). The digest
141
+ is a view over `spec.md`, not a new artifact. **Stop** after the digest.
142
+
143
+ > **Mid-flight discipline.** Do not skip investigation, gap resolution, or placement
144
+ > decisions. See [`anti-patterns`](reference/anti-patterns.md).
145
+
146
+ ## Output
147
+
148
+ When the ask overlaps the ACTIVE feature (same intent, >50% scope), route to
149
+ `/rite-plan revise` (its gate decides) rather than minting a parallel workspace.
@@ -0,0 +1,31 @@
1
+ # Acceptance criteria
2
+
3
+ Acceptance criteria are the contract the seal checks. Write them so each is
4
+ **independently verifiable by evidence**, not opinion.
5
+
6
+ ## A good criterion
7
+ - Is observable: a test passes, a command outputs X, a screenshot shows Y.
8
+ - Is binary: met or not: no "mostly".
9
+ - Names the evidence: "`npm test path/x.test.ts` passes" or "POST /export returns 200
10
+ with a CSV body" or "empty state renders 'No exports yet' at 375px".
11
+ - Belongs to a slice: every criterion maps to at least one slice (mapped in `/rite-define`).
12
+
13
+ ## Forms
14
+ | Type | Template |
15
+ |---|---|
16
+ | Functional | "Given <state>, when <action>, then <observable result>." |
17
+ | API | "<METHOD> <route> with <input> returns <status> and <shape>." |
18
+ | UI | "<screen> shows <element/state> at <viewport>; <interaction> does <result>." |
19
+ | UI vs reference | "<screen> matches design reference <Rn> at <viewport>." |
20
+ | Non-functional | "<operation> completes under <budget> / handles <volume>." |
21
+ | Negative | "<invalid input> is rejected with <message>, no <side effect>." |
22
+
23
+ ## Anti-patterns
24
+ - "Works well" / "is fast" / "looks good": unverifiable. Attach a number or an
25
+ observation.
26
+ - Criteria with no slice: orphaned scope.
27
+ - Criteria only provable by reading the code: require runtime/test evidence instead.
28
+
29
+ ## At seal time
30
+ Each criterion gets a checkbox + the evidence that proves it. Unproven critical
31
+ criteria force **NO-GO**.
@@ -0,0 +1,40 @@
1
+ # `ai-spec.md` template
2
+
3
+ Create this annex only when the feature touches model calls, RAG, agents, evals,
4
+ or LLM output.
5
+
6
+ ```markdown
7
+ # AI-SPEC: <Feature>
8
+
9
+ ## AI surface
10
+ | Surface | Purpose | Owner |
11
+ | --- | --- | --- |
12
+ | <model call/RAG/agent/eval> | <why it exists> | <module/team> |
13
+
14
+ ## Model/runtime choice
15
+ - Framework/model/provider: <choice or project default>
16
+ - Settings that matter: <temperature, tools, retrieval scope, limits>
17
+ - Fallback/degradation: <what users see when AI is unavailable>
18
+
19
+ ## Domain evals
20
+ | Eval ID | Scenario / slice | Dataset provenance | Expected signal + threshold | Gate |
21
+ | --- | --- | --- | --- | --- |
22
+ | EVAL-001 | <representative/adversarial/empty-context case> | <held-out source/version> | <pass condition and baseline delta> | build/seal |
23
+
24
+ For RAG, cover retrieval relevance/context recall, context precision, answer
25
+ faithfulness, citation support, tenant/ACL isolation, poisoned or conflicting documents,
26
+ and insufficient-context fallback as applicable. A single polished example is not an eval.
27
+
28
+ ## Guardrails
29
+ - Inputs: <validation, prompt-injection boundaries, tenant/data limits>
30
+ - Retrieval: <source provenance, indexing validation, tenant/ACL filter, freshness/deletion>
31
+ - Outputs: <schema checks, refusals, human review, citations only to supporting retrieved sources>
32
+ - Privacy/security: <data sent to model, retention, secrets policy>
33
+ - Unknown/insufficient context: <abstain, clarify, or bounded fallback; never fabricate>
34
+
35
+ ## Monitoring
36
+ - Runtime metrics/logs: <latency, cost, retrieval/quality, refusal/error/fallback rates>
37
+ - Alerts or manual review: <trigger>
38
+ - Rollback/kill switch: <prompt/model/index version and reversible mechanism>
39
+ - Drift evaluation: <reference set, schedule/trigger, regression threshold, owner>
40
+ ```