devrites 5.5.0 → 5.6.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 (281) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +8 -6
  3. package/engine/internal/devritespaths/paths.go +3 -0
  4. package/engine/internal/hostpack/hostpack.go +45 -6
  5. package/engine/internal/hostpack/hostpack_test.go +29 -13
  6. package/engine/internal/install/apply.go +14 -5
  7. package/engine/internal/install/install.go +8 -2
  8. package/engine/internal/install/install_test.go +12 -5
  9. package/engine/internal/install/merge.go +5 -0
  10. package/engine/internal/install/preflight.go +20 -2
  11. package/engine/internal/install/uninstall.go +5 -0
  12. package/engine/internal/install/update.go +1 -1
  13. package/install.sh +4 -1
  14. package/pack/generated/README.md +5 -1
  15. package/pack/generated/pi/AGENTS.md +22 -0
  16. package/pack/generated/pi/agents/devrites-code-reviewer.md +142 -0
  17. package/pack/generated/pi/agents/devrites-devex-reviewer.md +124 -0
  18. package/pack/generated/pi/agents/devrites-doubt-reviewer.md +88 -0
  19. package/pack/generated/pi/agents/devrites-evidence-scout.md +72 -0
  20. package/pack/generated/pi/agents/devrites-frontend-reviewer.md +116 -0
  21. package/pack/generated/pi/agents/devrites-performance-reviewer.md +115 -0
  22. package/pack/generated/pi/agents/devrites-plan-drafter.md +99 -0
  23. package/pack/generated/pi/agents/devrites-plan-reviewer.md +142 -0
  24. package/pack/generated/pi/agents/devrites-proof-runner.md +74 -0
  25. package/pack/generated/pi/agents/devrites-retrospector.md +61 -0
  26. package/pack/generated/pi/agents/devrites-security-auditor.md +109 -0
  27. package/pack/generated/pi/agents/devrites-simplifier-reviewer.md +94 -0
  28. package/pack/generated/pi/agents/devrites-slice-wright.md +204 -0
  29. package/pack/generated/pi/agents/devrites-spec-reviewer.md +96 -0
  30. package/pack/generated/pi/agents/devrites-strategy-reviewer.md +100 -0
  31. package/pack/generated/pi/agents/devrites-test-analyst.md +94 -0
  32. package/pack/generated/pi/agents/devrites-upgrade-planner.md +89 -0
  33. package/pack/generated/pi/prompts/rite-adopt.md +5 -0
  34. package/pack/generated/pi/prompts/rite-autocomplete.md +5 -0
  35. package/pack/generated/pi/prompts/rite-build.md +5 -0
  36. package/pack/generated/pi/prompts/rite-clarify.md +5 -0
  37. package/pack/generated/pi/prompts/rite-converge.md +5 -0
  38. package/pack/generated/pi/prompts/rite-customize.md +5 -0
  39. package/pack/generated/pi/prompts/rite-define.md +5 -0
  40. package/pack/generated/pi/prompts/rite-doctor.md +5 -0
  41. package/pack/generated/pi/prompts/rite-dogfood.md +5 -0
  42. package/pack/generated/pi/prompts/rite-explain.md +5 -0
  43. package/pack/generated/pi/prompts/rite-frame.md +5 -0
  44. package/pack/generated/pi/prompts/rite-handoff.md +5 -0
  45. package/pack/generated/pi/prompts/rite-learn.md +5 -0
  46. package/pack/generated/pi/prompts/rite-plan.md +5 -0
  47. package/pack/generated/pi/prompts/rite-polish.md +5 -0
  48. package/pack/generated/pi/prompts/rite-pov.md +5 -0
  49. package/pack/generated/pi/prompts/rite-pr-feedback.md +5 -0
  50. package/pack/generated/pi/prompts/rite-pressure-test.md +5 -0
  51. package/pack/generated/pi/prompts/rite-prototype.md +5 -0
  52. package/pack/generated/pi/prompts/rite-prove.md +5 -0
  53. package/pack/generated/pi/prompts/rite-quick.md +5 -0
  54. package/pack/generated/pi/prompts/rite-resolve.md +5 -0
  55. package/pack/generated/pi/prompts/rite-review.md +5 -0
  56. package/pack/generated/pi/prompts/rite-seal.md +5 -0
  57. package/pack/generated/pi/prompts/rite-ship.md +5 -0
  58. package/pack/generated/pi/prompts/rite-spec.md +5 -0
  59. package/pack/generated/pi/prompts/rite-status.md +5 -0
  60. package/pack/generated/pi/prompts/rite-temper.md +5 -0
  61. package/pack/generated/pi/prompts/rite-upgrade.md +5 -0
  62. package/pack/generated/pi/prompts/rite-vet.md +5 -0
  63. package/pack/generated/pi/prompts/rite-watch-pr.md +5 -0
  64. package/pack/generated/pi/prompts/rite-zoom-out.md +5 -0
  65. package/pack/generated/pi/prompts/rite.md +5 -0
  66. package/pack/generated/pi/skills/devrites-api-interface/SKILL.md +63 -0
  67. package/pack/generated/pi/skills/devrites-audit/SKILL.md +50 -0
  68. package/pack/generated/pi/skills/devrites-browser-proof/SKILL.md +76 -0
  69. package/pack/generated/pi/skills/devrites-browser-proof/reference/browser-performance.md +15 -0
  70. package/pack/generated/pi/skills/devrites-browser-proof/reference/visual-verdict.md +34 -0
  71. package/pack/generated/pi/skills/devrites-debug-recovery/SKILL.md +96 -0
  72. package/pack/generated/pi/skills/devrites-debug-recovery/reference/build-the-loop.md +58 -0
  73. package/pack/generated/pi/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +34 -0
  74. package/pack/generated/pi/skills/devrites-debug-recovery/reference/hypotheses.md +17 -0
  75. package/pack/generated/pi/skills/devrites-debug-recovery/reference/instrumentation.md +21 -0
  76. package/pack/generated/pi/skills/devrites-debug-recovery/reference/regression-test.md +30 -0
  77. package/pack/generated/pi/skills/devrites-debug-recovery/reference/trace.md +25 -0
  78. package/pack/generated/pi/skills/devrites-doubt/SKILL.md +79 -0
  79. package/pack/generated/pi/skills/devrites-frontend-craft/SKILL.md +86 -0
  80. package/pack/generated/pi/skills/devrites-frontend-craft/reference/craft.md +63 -0
  81. package/pack/generated/pi/skills/devrites-frontend-craft/reference/design-references.md +116 -0
  82. package/pack/generated/pi/skills/devrites-frontend-craft/reference/fullstack.md +46 -0
  83. package/pack/generated/pi/skills/devrites-frontend-craft/reference/quality-standards.md +294 -0
  84. package/pack/generated/pi/skills/devrites-frontend-craft/reference/reuse-first.md +53 -0
  85. package/pack/generated/pi/skills/devrites-frontend-craft/reference/shape.md +56 -0
  86. package/pack/generated/pi/skills/devrites-interview/SKILL.md +102 -0
  87. package/pack/generated/pi/skills/devrites-lib/SKILL.md +58 -0
  88. package/pack/generated/pi/skills/devrites-lib/reference/candidate-integrity.md +42 -0
  89. package/pack/generated/pi/skills/devrites-lib/reference/intent-map.md +64 -0
  90. package/pack/generated/pi/skills/devrites-lib/reference/orchestration-profiles.md +27 -0
  91. package/pack/generated/pi/skills/devrites-lib/reference/parallel-dispatch.md +73 -0
  92. package/pack/generated/pi/skills/devrites-lib/reference/reply-contract.md +88 -0
  93. package/pack/generated/pi/skills/devrites-lib/reference/standards/README.md +60 -0
  94. package/pack/generated/pi/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md +30 -0
  95. package/pack/generated/pi/skills/devrites-lib/reference/standards/afk-hitl.md +398 -0
  96. package/pack/generated/pi/skills/devrites-lib/reference/standards/agents.md +99 -0
  97. package/pack/generated/pi/skills/devrites-lib/reference/standards/anti-patterns.md +48 -0
  98. package/pack/generated/pi/skills/devrites-lib/reference/standards/browser-proof-checklist.md +24 -0
  99. package/pack/generated/pi/skills/devrites-lib/reference/standards/ci-cd.md +50 -0
  100. package/pack/generated/pi/skills/devrites-lib/reference/standards/code-navigation.md +43 -0
  101. package/pack/generated/pi/skills/devrites-lib/reference/standards/code-review.md +108 -0
  102. package/pack/generated/pi/skills/devrites-lib/reference/standards/coding-style.md +48 -0
  103. package/pack/generated/pi/skills/devrites-lib/reference/standards/context-hygiene.md +109 -0
  104. package/pack/generated/pi/skills/devrites-lib/reference/standards/core.md +167 -0
  105. package/pack/generated/pi/skills/devrites-lib/reference/standards/data-integrity.md +118 -0
  106. package/pack/generated/pi/skills/devrites-lib/reference/standards/debug-recovery.md +28 -0
  107. package/pack/generated/pi/skills/devrites-lib/reference/standards/definition-of-done.md +19 -0
  108. package/pack/generated/pi/skills/devrites-lib/reference/standards/deprecation.md +31 -0
  109. package/pack/generated/pi/skills/devrites-lib/reference/standards/developer-experience.md +119 -0
  110. package/pack/generated/pi/skills/devrites-lib/reference/standards/development-workflow.md +29 -0
  111. package/pack/generated/pi/skills/devrites-lib/reference/standards/documentation.md +43 -0
  112. package/pack/generated/pi/skills/devrites-lib/reference/standards/edge-case-trace.md +92 -0
  113. package/pack/generated/pi/skills/devrites-lib/reference/standards/elicitation.md +85 -0
  114. package/pack/generated/pi/skills/devrites-lib/reference/standards/error-handling.md +47 -0
  115. package/pack/generated/pi/skills/devrites-lib/reference/standards/git-workflow.md +49 -0
  116. package/pack/generated/pi/skills/devrites-lib/reference/standards/hooks.md +25 -0
  117. package/pack/generated/pi/skills/devrites-lib/reference/standards/integration-reliability.md +102 -0
  118. package/pack/generated/pi/skills/devrites-lib/reference/standards/loop-operations.md +85 -0
  119. package/pack/generated/pi/skills/devrites-lib/reference/standards/observability.md +88 -0
  120. package/pack/generated/pi/skills/devrites-lib/reference/standards/one-shot-actions.md +97 -0
  121. package/pack/generated/pi/skills/devrites-lib/reference/standards/patterns.md +68 -0
  122. package/pack/generated/pi/skills/devrites-lib/reference/standards/performance.md +51 -0
  123. package/pack/generated/pi/skills/devrites-lib/reference/standards/principles.md +42 -0
  124. package/pack/generated/pi/skills/devrites-lib/reference/standards/prose-style.md +123 -0
  125. package/pack/generated/pi/skills/devrites-lib/reference/standards/release/ship-checklist.md +8 -0
  126. package/pack/generated/pi/skills/devrites-lib/reference/standards/repository-topology.md +80 -0
  127. package/pack/generated/pi/skills/devrites-lib/reference/standards/review-checklist.md +12 -0
  128. package/pack/generated/pi/skills/devrites-lib/reference/standards/security-checklist.md +25 -0
  129. package/pack/generated/pi/skills/devrites-lib/reference/standards/security.md +202 -0
  130. package/pack/generated/pi/skills/devrites-lib/reference/standards/skill-authoring.md +209 -0
  131. package/pack/generated/pi/skills/devrites-lib/reference/standards/spec-grammar.md +197 -0
  132. package/pack/generated/pi/skills/devrites-lib/reference/standards/test-proof-checklist.md +13 -0
  133. package/pack/generated/pi/skills/devrites-lib/reference/standards/testing.md +212 -0
  134. package/pack/generated/pi/skills/devrites-lib/reference/standards/tooling.md +92 -0
  135. package/pack/generated/pi/skills/devrites-lib/reference/standards/workflow-artifacts.md +427 -0
  136. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/code.md +44 -0
  137. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/comparison.md +42 -0
  138. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/diagram.md +51 -0
  139. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/index.md +66 -0
  140. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/input.md +46 -0
  141. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/outline-template.md +106 -0
  142. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/plan.md +48 -0
  143. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/slides.md +40 -0
  144. package/pack/generated/pi/skills/devrites-lib/reference/visual-playbooks/table.md +42 -0
  145. package/pack/generated/pi/skills/devrites-lib/reference/workspace-artifact-schema.md +267 -0
  146. package/pack/generated/pi/skills/devrites-prose-craft/SKILL.md +73 -0
  147. package/pack/generated/pi/skills/devrites-prose-craft/reference/banned-phrases.md +132 -0
  148. package/pack/generated/pi/skills/devrites-prose-craft/reference/examples.md +131 -0
  149. package/pack/generated/pi/skills/devrites-prose-craft/reference/structures.md +196 -0
  150. package/pack/generated/pi/skills/devrites-source-driven/SKILL.md +52 -0
  151. package/pack/generated/pi/skills/devrites-ux-shape/SKILL.md +134 -0
  152. package/pack/generated/pi/skills/devrites-ux-shape/reference/brief-template.md +108 -0
  153. package/pack/generated/pi/skills/devrites-ux-shape/reference/visual-direction-probe.md +48 -0
  154. package/pack/generated/pi/skills/rite/SKILL.md +148 -0
  155. package/pack/generated/pi/skills/rite/reference/menu.md +48 -0
  156. package/pack/generated/pi/skills/rite-adopt/SKILL.md +52 -0
  157. package/pack/generated/pi/skills/rite-adopt/reference/adoption.md +19 -0
  158. package/pack/generated/pi/skills/rite-adopt/reference/anti-patterns.md +19 -0
  159. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +132 -0
  160. package/pack/generated/pi/skills/rite-autocomplete/reference/decision-policy.md +41 -0
  161. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +148 -0
  162. package/pack/generated/pi/skills/rite-autocomplete/reference/stop-conditions.md +92 -0
  163. package/pack/generated/pi/skills/rite-build/SKILL.md +96 -0
  164. package/pack/generated/pi/skills/rite-build/reference/afk-discipline.md +145 -0
  165. package/pack/generated/pi/skills/rite-build/reference/anti-patterns.md +23 -0
  166. package/pack/generated/pi/skills/rite-build/reference/checkpoint-protocol.md +120 -0
  167. package/pack/generated/pi/skills/rite-build/reference/checkpoint.md +44 -0
  168. package/pack/generated/pi/skills/rite-build/reference/frontend-trigger.md +39 -0
  169. package/pack/generated/pi/skills/rite-build/reference/one-slice-cycle.md +50 -0
  170. package/pack/generated/pi/skills/rite-build/reference/output.md +33 -0
  171. package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +205 -0
  172. package/pack/generated/pi/skills/rite-build/reference/phase-contract.md +87 -0
  173. package/pack/generated/pi/skills/rite-build/reference/spec-drift-guard.md +84 -0
  174. package/pack/generated/pi/skills/rite-build/reference/tdd.md +27 -0
  175. package/pack/generated/pi/skills/rite-build/reference/wright-dispatch.md +89 -0
  176. package/pack/generated/pi/skills/rite-clarify/SKILL.md +99 -0
  177. package/pack/generated/pi/skills/rite-clarify/reference/anti-patterns.md +24 -0
  178. package/pack/generated/pi/skills/rite-clarify/reference/decision-coverage.md +55 -0
  179. package/pack/generated/pi/skills/rite-converge/SKILL.md +145 -0
  180. package/pack/generated/pi/skills/rite-converge/reference/anti-patterns.md +35 -0
  181. package/pack/generated/pi/skills/rite-converge/reference/convergence-assessment.md +65 -0
  182. package/pack/generated/pi/skills/rite-customize/SKILL.md +60 -0
  183. package/pack/generated/pi/skills/rite-define/SKILL.md +169 -0
  184. package/pack/generated/pi/skills/rite-define/reference/anti-patterns.md +26 -0
  185. package/pack/generated/pi/skills/rite-define/reference/gates.md +154 -0
  186. package/pack/generated/pi/skills/rite-define/reference/plan-template.md +149 -0
  187. package/pack/generated/pi/skills/rite-doctor/SKILL.md +69 -0
  188. package/pack/generated/pi/skills/rite-dogfood/SKILL.md +55 -0
  189. package/pack/generated/pi/skills/rite-explain/SKILL.md +152 -0
  190. package/pack/generated/pi/skills/rite-explain/reference/intake.md +89 -0
  191. package/pack/generated/pi/skills/rite-frame/SKILL.md +115 -0
  192. package/pack/generated/pi/skills/rite-frame/reference/failure-modes.md +66 -0
  193. package/pack/generated/pi/skills/rite-handoff/SKILL.md +97 -0
  194. package/pack/generated/pi/skills/rite-handoff/reference/handoff-template.md +44 -0
  195. package/pack/generated/pi/skills/rite-learn/SKILL.md +72 -0
  196. package/pack/generated/pi/skills/rite-plan/SKILL.md +186 -0
  197. package/pack/generated/pi/skills/rite-plan/reference/anti-patterns.md +34 -0
  198. package/pack/generated/pi/skills/rite-plan/reference/dependency-graph.md +48 -0
  199. package/pack/generated/pi/skills/rite-plan/reference/replan-and-repair.md +105 -0
  200. package/pack/generated/pi/skills/rite-plan/reference/slicing.md +167 -0
  201. package/pack/generated/pi/skills/rite-plan/reference/task-breakdown.md +42 -0
  202. package/pack/generated/pi/skills/rite-polish/SKILL.md +104 -0
  203. package/pack/generated/pi/skills/rite-polish/reference/adr-promotion.md +11 -0
  204. package/pack/generated/pi/skills/rite-polish/reference/anti-ai-slop.md +187 -0
  205. package/pack/generated/pi/skills/rite-polish/reference/anti-patterns.md +30 -0
  206. package/pack/generated/pi/skills/rite-polish/reference/backend-polish.md +80 -0
  207. package/pack/generated/pi/skills/rite-polish/reference/browser-polish-evidence.md +33 -0
  208. package/pack/generated/pi/skills/rite-polish/reference/code.md +82 -0
  209. package/pack/generated/pi/skills/rite-polish/reference/design-memory.md +117 -0
  210. package/pack/generated/pi/skills/rite-polish/reference/design-system-discovery.md +8 -0
  211. package/pack/generated/pi/skills/rite-polish/reference/harden-checklist.md +109 -0
  212. package/pack/generated/pi/skills/rite-polish/reference/ledger.md +65 -0
  213. package/pack/generated/pi/skills/rite-polish/reference/ui.md +137 -0
  214. package/pack/generated/pi/skills/rite-pov/SKILL.md +58 -0
  215. package/pack/generated/pi/skills/rite-pr-feedback/SKILL.md +54 -0
  216. package/pack/generated/pi/skills/rite-pressure-test/SKILL.md +67 -0
  217. package/pack/generated/pi/skills/rite-prototype/SKILL.md +104 -0
  218. package/pack/generated/pi/skills/rite-prove/SKILL.md +120 -0
  219. package/pack/generated/pi/skills/rite-prove/reference/acceptance-proof.md +88 -0
  220. package/pack/generated/pi/skills/rite-prove/reference/anti-patterns.md +25 -0
  221. package/pack/generated/pi/skills/rite-prove/reference/browser-proof.md +51 -0
  222. package/pack/generated/pi/skills/rite-prove/reference/failure-triage.md +43 -0
  223. package/pack/generated/pi/skills/rite-prove/reference/proof-ladder.md +28 -0
  224. package/pack/generated/pi/skills/rite-prove/reference/test-command-discovery.md +30 -0
  225. package/pack/generated/pi/skills/rite-quick/SKILL.md +82 -0
  226. package/pack/generated/pi/skills/rite-resolve/SKILL.md +95 -0
  227. package/pack/generated/pi/skills/rite-resolve/reference/answer-protocol.md +118 -0
  228. package/pack/generated/pi/skills/rite-review/SKILL.md +170 -0
  229. package/pack/generated/pi/skills/rite-review/reference/anti-patterns.md +32 -0
  230. package/pack/generated/pi/skills/rite-review/reference/cognitive-load.md +90 -0
  231. package/pack/generated/pi/skills/rite-review/reference/feature-scoped-review.md +26 -0
  232. package/pack/generated/pi/skills/rite-review/reference/five-axis-review.md +66 -0
  233. package/pack/generated/pi/skills/rite-review/reference/nielsen-heuristics.md +126 -0
  234. package/pack/generated/pi/skills/rite-review/reference/performance-checklist.md +80 -0
  235. package/pack/generated/pi/skills/rite-review/reference/performance-review.md +14 -0
  236. package/pack/generated/pi/skills/rite-review/reference/security-review.md +42 -0
  237. package/pack/generated/pi/skills/rite-seal/SKILL.md +75 -0
  238. package/pack/generated/pi/skills/rite-seal/reference/anti-patterns.md +29 -0
  239. package/pack/generated/pi/skills/rite-seal/reference/final-evidence.md +41 -0
  240. package/pack/generated/pi/skills/rite-seal/reference/go-no-go.md +29 -0
  241. package/pack/generated/pi/skills/rite-seal/reference/output.md +5 -0
  242. package/pack/generated/pi/skills/rite-seal/reference/phase-contract.md +47 -0
  243. package/pack/generated/pi/skills/rite-seal/reference/risk-and-rollback.md +56 -0
  244. package/pack/generated/pi/skills/rite-seal/reference/seal-template.md +27 -0
  245. package/pack/generated/pi/skills/rite-ship/SKILL.md +88 -0
  246. package/pack/generated/pi/skills/rite-ship/reference/anti-patterns.md +28 -0
  247. package/pack/generated/pi/skills/rite-ship/reference/close-out.md +68 -0
  248. package/pack/generated/pi/skills/rite-ship/reference/git-ship.md +120 -0
  249. package/pack/generated/pi/skills/rite-ship/reference/rollout.md +62 -0
  250. package/pack/generated/pi/skills/rite-ship/reference/ship-template.md +39 -0
  251. package/pack/generated/pi/skills/rite-spec/SKILL.md +150 -0
  252. package/pack/generated/pi/skills/rite-spec/reference/acceptance-criteria.md +31 -0
  253. package/pack/generated/pi/skills/rite-spec/reference/ai-spec-template.md +40 -0
  254. package/pack/generated/pi/skills/rite-spec/reference/anti-patterns.md +27 -0
  255. package/pack/generated/pi/skills/rite-spec/reference/interview-patterns.md +56 -0
  256. package/pack/generated/pi/skills/rite-spec/reference/investigation.md +83 -0
  257. package/pack/generated/pi/skills/rite-spec/reference/question-protocol.md +36 -0
  258. package/pack/generated/pi/skills/rite-spec/reference/references-intake.md +62 -0
  259. package/pack/generated/pi/skills/rite-spec/reference/spec-checklists.md +89 -0
  260. package/pack/generated/pi/skills/rite-spec/reference/spec-template.md +154 -0
  261. package/pack/generated/pi/skills/rite-spec/reference/state-workspace.md +227 -0
  262. package/pack/generated/pi/skills/rite-status/SKILL.md +57 -0
  263. package/pack/generated/pi/skills/rite-temper/SKILL.md +130 -0
  264. package/pack/generated/pi/skills/rite-temper/reference/anti-patterns.md +30 -0
  265. package/pack/generated/pi/skills/rite-temper/reference/review-dimensions.md +66 -0
  266. package/pack/generated/pi/skills/rite-temper/reference/scope-modes.md +53 -0
  267. package/pack/generated/pi/skills/rite-temper/reference/significance.md +46 -0
  268. package/pack/generated/pi/skills/rite-temper/reference/strategy-template.md +90 -0
  269. package/pack/generated/pi/skills/rite-upgrade/SKILL.md +121 -0
  270. package/pack/generated/pi/skills/rite-vet/SKILL.md +193 -0
  271. package/pack/generated/pi/skills/rite-vet/reference/anti-patterns.md +43 -0
  272. package/pack/generated/pi/skills/rite-vet/reference/artifacts.md +202 -0
  273. package/pack/generated/pi/skills/rite-vet/reference/cross-model.md +19 -0
  274. package/pack/generated/pi/skills/rite-vet/reference/depth.md +59 -0
  275. package/pack/generated/pi/skills/rite-vet/reference/eng-lenses.md +48 -0
  276. package/pack/generated/pi/skills/rite-vet/reference/review-axes.md +201 -0
  277. package/pack/generated/pi/skills/rite-watch-pr/SKILL.md +85 -0
  278. package/pack/generated/pi/skills/rite-zoom-out/SKILL.md +69 -0
  279. package/package.json +3 -2
  280. package/scripts/build-host-artifacts.sh +54 -4
  281. package/scripts/pi-generate.sh +198 -0
@@ -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 `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,150 @@
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
+ user-invocable: true
6
+ ---
7
+
8
+ # /rite-spec: investigate and write the spec
9
+
10
+ Investigate and resolve material gaps into a placed, covered `spec.md`.
11
+ `/rite-clarify` audits topology next. Write no plan, task, or code here.
12
+
13
+ > Use `/rite-quick` for a typo, copy/config edit, or one-function fix. It returns
14
+ > here for auth, data, migration, public API, or multi-slice work.
15
+
16
+ ## Rules consulted (read on demand from `.pi/skills/devrites-lib/reference/standards/`)
17
+ Pull `documentation.md` for significant decisions and `principles.md` for
18
+ declared invariants; an unavoidable principle violation is blocking.
19
+ For behavioral/high-risk acceptance, use `spec-grammar.md` plus workspace schema;
20
+ simple criteria stay flat `AC-###`. Apply
21
+ [`acceptance-criteria.md`](reference/acceptance-criteria.md) so each is binary and observable.
22
+ Use [`edge-case-trace.md`](../devrites-lib/reference/standards/edge-case-trace.md)
23
+ to populate only relevant edge/prohibition rows. The spec's applicability map routes
24
+ topology, data, integration, security, and delivery concerns to their focused standard;
25
+ load a routed standard to discover required behavior, not to prescribe implementation.
26
+
27
+ ## Operating rules (DevRites core)
28
+ - No silent assumptions or guessing; prefer conventions; ask on scope,
29
+ placement, data, UX, security, migration, or acceptance changes.
30
+ - **Root authority:** controlling chat asks humans, decides, and writes workspace;
31
+ evidence work follows [`agents.md`](../devrites-lib/reference/standards/agents.md).
32
+ - **Author one section at a time:** problem → goal → requirements → acceptance →
33
+ edges. For contested requirements/boundaries/assumptions, apply
34
+ [`elicitation.md`](../devrites-lib/reference/standards/elicitation.md) before continuing.
35
+
36
+ ## Workflow
37
+ 0. Read core; if `.devrites/ACTIVE` exists, require its `state.md`.
38
+ 0a. **Adoption check.** For a never-adopted existing codebase, route first to
39
+ `/rite-adopt` with `$ARGUMENTS`; it derives baseline spec/principles. HITL
40
+ offers ranked adopt-first and spec-only choices; permitted AFK adopts.
41
+ Silently skip greenfield/onboarded projects, and never block solely on absence:
42
+ ```bash
43
+ if [ ! -d .devrites/archive ] \
44
+ && [ -z "$(ls .devrites/work 2>/dev/null)" ] \
45
+ && [ -n "$(git ls-files 2>/dev/null | grep -vE '^\.(devrites|claude)/' | head -1)" ]; then
46
+ echo "brownfield, not yet adopted → recommend /rite-adopt first (carry this idea as its next objective)"
47
+ else echo "greenfield or already onboarded → continue spec"; fi
48
+ ```
49
+ 1. **Understand the request** (`$ARGUMENTS`). State outcome and underlying
50
+ problem in one sentence. **Completion:** it includes both.
51
+ 1a. **Dedupe.** Search local issues/PRDs, work, and archive. On a close match ask
52
+ extend/adopt/new, then record the choice; otherwise continue silently.
53
+ A recorded [feature-sequence continuation](../rite-plan/reference/slicing.md#continuation-workspaces)
54
+ is a **new** workspace (`<parent>-2`): carry the parent slug and position into
55
+ `brief.md`, read the parent artifacts as design input, and do not route to
56
+ `/rite-plan revise` on the parent. When the ask is open and archived work records
57
+ an unfinished sequence, propose that next continuation (slug + objective) as the
58
+ recommended option instead of a fresh slug.
59
+ 2. **Investigate:** follow [investigation](reference/investigation.md) through its
60
+ complete findings and done-when gate. Discover the project's **test /
61
+ build/typecheck/lint** commands, frontend/backend systems, and declared project guidance
62
+ (`PRODUCT.md`, `DESIGN.md`, `CLAUDE.md`, `AGENTS.md`, and `.devrites/principles.md` when
63
+ present).
64
+ **Consult the capability ledger**, which records current system behavior
65
+ ([`ledger.md`](../rite-polish/reference/ledger.md)); Polish folds accepted deltas
66
+ before Review. List `.devrites/specs/*/spec.md` with the
67
+ host filesystem and read only capabilities this feature touches. Search accepted ADRs and
68
+ relevant `.devrites/**/decisions.md` files directly before asking the human to revisit a
69
+ settled architecture, API, or auth choice. Compare exact requirement headers and meanings
70
+ with the current ledger to choose ADDED/MODIFIED/REMOVED; never classify from memory. Use
71
+ `spec-grammar.md`'s singular `Capability impact:` declaration to name the affected
72
+ capabilities and change, or give its specific `none` justification.
73
+ Inventory affected observable behavior from current test/contract/runtime/source
74
+ evidence; map each outcome to preserving REQ/AC. Greenfield `none` needs the
75
+ template's specific justification.
76
+ Identify proof constraints now: human-only credentials, unavailable environments, approval
77
+ windows, or acceptance not observable through existing test/runtime/browser surfaces.
78
+ An unfamiliar framework/version routes to `devrites-source-driven`; missing or
79
+ contradictory documentation is evidence to reconcile, never a license to guess.
80
+ Split independent placement, blast-radius, and external-fact questions into at most three
81
+ bounded `devrites-evidence-scout` tasks on one frozen candidate. Wait for and reconcile every
82
+ cited dossier before step 4. The scout supplies facts only; it never asks the human or writes
83
+ the spec.
84
+ 3. **Gather design references when provided:** [references-intake](reference/references-intake.md).
85
+ The human may attach screenshots, mockups, a Figma link, a video, links, or nothing.
86
+ Skip this step when none are provided. Otherwise, **view or fetch**
87
+ them, **save local files** into `.devrites/work/<slug>/references/`, and index them in
88
+ `references.md` as target, constraint, or inspiration. Later phases honor that role
89
+ rather than treating every reference as a fidelity target.
90
+ **Completion:** every supplied reference is saved and classified, or absence is explicit.
91
+ 3a. **Shape UX/UI before code when the feature is frontend**
92
+ ([frontend-trigger](../rite-build/reference/frontend-trigger.md)). Apply
93
+ `devrites-ux-shape` within the spec phase. It turns the
94
+ references and spec into a feature-level **`design-brief.md`** (design direction, key
95
+ states, interaction model, optional Figma/image visual-direction probe) that `/rite-build`
96
+ targets for the build. In HITL it pauses for the human to
97
+ confirm the direction; in AFK it asserts the best guess and logs it. Pure
98
+ backend/data/CLI features skip this.
99
+ 4. **Resolve human-owned gaps.** Recommend an option and let the human decide. Apply
100
+ [question-protocol](reference/question-protocol.md), the shared
101
+ [`afk-hitl.md` option-set and decision-ownership rules](../devrites-lib/reference/standards/afk-hitl.md#decision-ownership-search-before-asking),
102
+ and [`interview-patterns.md`](reference/interview-patterns.md) for a vague ask. Every
103
+ material dimension is resolved by a human pick or explicitly deferred as non-blocking;
104
+ only genuinely reversible, low-impact details go to `assumptions.md`. A paper-only
105
+ uncertainty may take one scoped `/rite-prototype` detour. A declared-principle conflict
106
+ remains blocking until the human approves a recorded, scoped exception.
107
+ 4a. **Build-interruption forecast.** Search first, then list and close foreseeable human needs:
108
+ product/acceptance ambiguity, irreversible/external approval, or human-only access. Record
109
+ owned prerequisites. Keep a build checkpoint only for unavailable pre-code evidence or a
110
+ mandatory action-time approval. **Completion:** no foreseeable human choice is deferred.
111
+ 5. **Create or update the workspace** + set `.devrites/ACTIVE` from
112
+ [state-workspace](reference/state-workspace.md). If the slug already exists,
113
+ update the existing workspace rather than overwrite it; preserve history and
114
+ unrelated settled content. Write every required artifact and conditional
115
+ annex exactly from [spec-template](reference/spec-template.md)
116
+ ([ai-spec-template](reference/ai-spec-template.md)), including its
117
+ capability impact, existing-behavior preservation, grammar/delta,
118
+ stakeholder/constraint/invariant, failure/recovery, applicability, coverage-seed,
119
+ qualified backstop, edge/prohibition, UI, and AI rules. Native
120
+ hierarchical instructions remain stable; do not rewrite `AGENTS.md` or
121
+ `CLAUDE.md` for the active workspace.
122
+ 5a. **Check the spec prose** with [spec-checklists](reference/spec-checklists.md).
123
+ Emit every applicable domain checklist and fix each CRITICAL by correcting the spec,
124
+ never by softening the question.
125
+ 6. **Run the complete readiness gate** at the bottom of
126
+ [spec-template](reference/spec-template.md), then apply the
127
+ **Native grammar re-read checklist** in `spec-grammar.md` to the complete
128
+ saved `spec.md`. Re-open the file after corrections and verify every
129
+ applicable item; there is no parser or replacement script. Natively compare
130
+ deltas with the current ledger using exact header semantics and the ledger's
131
+ complete-block preservation rule.
132
+ `tasks.md` deliberately does not exist yet; cross-artifact traceability starts in
133
+ `/rite-define`. Any grammar or delta failure blocks. The interruption forecast must be resolved, owned, or a justified
134
+ action-time gate. Then write `Spec gate: passed <iso>`.
135
+ 6a. **Existing-spec delta.** For a pre-existing slug/workspace, compare old/new
136
+ spec and questions, then show `Acceptance delta` (added/removed/reworded IDs)
137
+ and `Open-question delta` (opened/resolved/reworded IDs), using `none` for
138
+ empty categories. Show before proceeding; new workspaces skip.
139
+ 6b. **Review-before-code digest.** Before planning, render the compact human review:
140
+ `Intent` (one sentence), `Done means` (top acceptance/scenario IDs), `Scope/risk` (what is in/out
141
+ plus the hard gates), and `Build exactly this?` (yes → next phase; no → revise now). The digest
142
+ is a view over `spec.md`, not a new artifact. **Stop** after the digest.
143
+
144
+ > **Mid-flight discipline.** Do not skip investigation, gap resolution, or placement
145
+ > decisions. See [`anti-patterns`](reference/anti-patterns.md).
146
+
147
+ ## Output
148
+
149
+ When the ask overlaps the ACTIVE feature (same intent, >50% scope), route to
150
+ `/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
+ ```
@@ -0,0 +1,27 @@
1
+ # rite-spec: anti-patterns
2
+
3
+ Load this when standing a non-trivial decision in `/rite-spec`, or when the
4
+ agent feels reluctance toward investigation depth, gap-closing, or
5
+ placement decisions.
6
+
7
+ Pack-wide rationalizations + red flags: see [standards/anti-patterns.md](../../devrites-lib/reference/standards/anti-patterns.md).
8
+
9
+ ## Phase-specific rationalizations
10
+
11
+ | Excuse | Rebuttal |
12
+ |---|---|
13
+ | "User said *just make it work*: no spec needed." | Vague asks are exactly where `/rite-spec` earns its keep; load `devrites-interview` and ask one question at a time. |
14
+ | "I already understand the request." | Then writing the placement + acceptance criteria takes minutes and saves drift later. Investigation isn't for *you*, it's for `/rite-define`. |
15
+ | "Too small for a spec." | If it's big enough for `/rite-build`, it's big enough for one paragraph of WHAT/WHY + measurable acceptance. |
16
+ | "No design refs were attached, so skip references." | Skip the *gathering*, not the *acknowledgement*. Note "no references provided" in the spec: silence is ambiguous. |
17
+ | "I can resolve gaps as I build." | Drift discovered at slice 3 costs more than 5 questions answered now. |
18
+ | "I'm confident of the answer, so I'll just decide this myself." | Confidence changes the *cost* of the question, not its *owner*. A material decision (scope · placement · data model · UX · security · migration · acceptance) is put to the human as a ranked option set: near-certainty just makes it a one-pick confirm, never a silent decision. |
19
+ | "Presenting options for every gap is over-asking." | Over-asking is many questions at once or asking what the codebase answers. One ranked option set per *material* gap, recommended-first, is the opposite: it hands the human the decision cheaply. Reversible low-impact details you still auto-decide and log. |
20
+
21
+ ## Red Flags
22
+
23
+ - About to start writing `spec.md` without a Placement & integration section.
24
+ - Spec has no measurable acceptance criteria: "works as expected" is not measurable.
25
+ - A `[NEEDS CLARIFICATION]` marker remains on a blocking item.
26
+ - Design references were attached but never opened, saved, or indexed in `references.md`.
27
+ - The investigation didn't read the module/component that currently owns this area.
@@ -0,0 +1,56 @@
1
+ # Interview patterns
2
+
3
+ Question ladders by domain. Pull the rung that matches the biggest current unknown.
4
+ Each question still follows the protocol: one at a time, best guess attached.
5
+
6
+ ## Vague ask? Map the decision tree first
7
+ For a fuzzy one-liner (`"design a contact page"`, `"add reporting"`), sketch the branches
8
+ the answer splits into, then resolve each **depth-first**: one branch to a decision before
9
+ opening the next:
10
+
11
+ ```text
12
+ contact page
13
+ ├─ purpose? ── sales lead | support request | general
14
+ ├─ fields? ── name/email/message | + company/phone | file upload
15
+ ├─ on submit? ── email | ticket/CRM | DB row | embedded third-party form
16
+ └─ success? ── inline confirm | redirect | autoresponder
17
+ ```
18
+
19
+ Once per interview you may **challenge the premise** instead of refining it
20
+ (*"is a form even the right answer, or a mailto / booking link?"*): a good reframe
21
+ collapses whole branches. Then use the domain ladders below for each open branch.
22
+
23
+ ## Objective / problem
24
+ - "What does success look like in one sentence?"
25
+ - "Who hits this, how often, and what do they do today instead?"
26
+ - "If we shipped only one thing here, what must it be?"
27
+
28
+ ## Scope boundaries
29
+ - "What is explicitly **out** of scope for this first version?"
30
+ - "Is this a new capability or a change to an existing flow?"
31
+ - "What's the smallest version that's still useful?" (→ slice 1)
32
+
33
+ ## Data model
34
+ - "What are the core entities and how do they relate?"
35
+ - "What's the source of truth, and can these fields change after creation?"
36
+ - "Any uniqueness, ordering, or soft-delete needs?"
37
+
38
+ ## UX / flow
39
+ - "Walk me through the happy path screen by screen."
40
+ - "What are the empty / loading / error / permission-denied states?"
41
+ - "Brand surface (marketing) or product surface (app UI)?" (drives craft)
42
+
43
+ ## Integration / external
44
+ - "Which external systems or APIs are involved, and who owns them?"
45
+ - "Sync or async? What happens when the dependency is down?"
46
+
47
+ ## Non-functional
48
+ - "Any latency, scale, or volume targets I should design to?"
49
+ - "Auth/permission rules? Anything sensitive (PII, secrets, payments)?"
50
+
51
+ ## Acceptance
52
+ - "How will we *prove* this works: what's the test or observation?"
53
+ - "What would make you reject the PR?"
54
+
55
+ ## Anti-references (taste)
56
+ - "Show me one thing that does this well, and one that does it badly."
@@ -0,0 +1,83 @@
1
+ # Investigation before specification
2
+
3
+ Understand the requirement, decide where it belongs, define the outcome, and identify
4
+ every issue and gap. Resolve material gaps with the user before the spec is ready. A
5
+ gap first found during `/rite-build` is a drift event.
6
+
7
+ Use a code-intelligence index if available (see
8
+ `../../devrites-lib/reference/standards/tooling.md`) for structural questions such as
9
+ where code lives, what calls it, and what it could break. With none present, use
10
+ Read/Grep/Glob. When a gap depends on an external fact, such as a standard, UX pattern,
11
+ or comparable product, **search the web if available** (brave MCP preferred;
12
+ `../../devrites-lib/reference/standards/tooling.md`). Cite the finding in the option
13
+ presented to the human.
14
+
15
+ ## Check the archive first
16
+ Before external research, check whether the project already shipped related work. Search
17
+ the archive for the feature's key nouns. A hit may indicate an extension, conflict, or
18
+ replacement and provides prior decisions:
19
+ Use native file search over `.devrites/archive/*/{spec,decisions}.md`.
20
+ - **Overlap found** → read the overlapping `spec.md` + its `decisions.md`, then put it to
21
+ the human as a ranked option (*extend the shipped feature* · *this supersedes it* ·
22
+ *genuinely distinct*) same option-set contract as a gap.
23
+ - **No archive / no hit** → skip silently; never block a spec on absent history (the
24
+ brownfield / principles no-op discipline).
25
+
26
+ ## Produce these findings (write into spec.md)
27
+ 1. **The request and problem:** restate the goal and the problem behind it (people ask
28
+ for "a dashboard" when they want an answer to a question). Who hits it, how often,
29
+ what they do today instead.
30
+ 2. **Current behavior:** how it works today, or what's absent. Read the actual code and
31
+ flows; don't assume.
32
+ 3. **Placement**
33
+ - Which module / layer / file / component should own this; the right seam.
34
+ - Existing patterns/components/utilities to **extend or reuse** instead of duplicating.
35
+ - **Integration points**: callers and dependents, the data it reads/writes, the
36
+ APIs/events/contracts it touches (interface analysis: how it interacts with the
37
+ rest of the system).
38
+ 4. **Outcome:** the result and how to observe it (feeds
39
+ success + acceptance criteria).
40
+ 5. **Issues:** conflicts with existing code/UX/data/permissions, constraints, and
41
+ anything that makes the obvious approach wrong. Each issue gets a disposition.
42
+ 6. **Gaps:** unknowns, ambiguities, undecided behavior, missing inputs. **Every gap
43
+ becomes a question** (next section).
44
+ 7. **Blast radius:** what this change could break (use the code graph's impact/callers).
45
+ Informs risks, test strategy, and rollback.
46
+ 8. **Human prerequisites:** credentials, accounts, approval windows, or irreversible
47
+ action-time decisions the acceptance path requires. Separate these from agent-owned
48
+ implementation and diagnostic work.
49
+
50
+ Design/reference materials the human supplies: see [references-intake](references-intake.md).
51
+
52
+ ## Gap analysis (present → desired)
53
+ State the present and desired states. Their delta defines the work; unknowns in that
54
+ delta are gaps. Resolve them before `/rite-define`. Mark each gap inline with
55
+ `[NEEDS CLARIFICATION: question]`.
56
+
57
+ ## Present gaps and issues as options
58
+ For each material gap or issue that changes scope, placement, data model, UX, security,
59
+ migration risk, or acceptance, **ask the human** one gap at a time with a ranked
60
+ option set with the recommended option **first and marked `(Recommended)`** plus an escape
61
+ hatch (via `AskUserQuestion` in HITL):
62
+ ```
63
+ <gap/issue stated in one line>. Why it matters: <...>
64
+ 1. <recommended option> (Recommended) — <implication / where it places the work; cite any web/docs finding>
65
+ 2. <alternative> — <implication>
66
+ 3. <alternative> — <implication>
67
+ 4. Something else — I'll describe it
68
+ ```
69
+ Investigate and recommend, but do not settle a material decision. High confidence may
70
+ make the answer a one-pick confirmation; it does not change the decision owner.
71
+ Only a **genuinely reversible, low-impact** gap is decided and recorded in `assumptions.md`
72
+ without asking. Full render contract + AFK behaviour: [`afk-hitl.md`](../../devrites-lib/reference/standards/afk-hitl.md).
73
+
74
+ ## Done when
75
+ - The shipped archive was checked for prior art; any overlap was surfaced to the human.
76
+ - The problem, current behavior, placement, and outcome are written down.
77
+ - Every issue has a disposition; every material gap is resolved **by a human pick** from its
78
+ option set (or explicitly deferred as non-blocking), not settled silently on your confidence.
79
+ - Every foreseeable build-time human prerequisite is resolved, assigned, or justified as an
80
+ action-time gate; objective repair/retry work is not disguised as a question.
81
+ - No blocking `[NEEDS CLARIFICATION]` remains. The spec covers the gaps found during
82
+ authoring and records correct placement. This is the `/rite-spec` readiness gate
83
+ before `/rite-clarify` performs the systematic topology scan.
@@ -0,0 +1,36 @@
1
+ # Spec question protocol
2
+
3
+ For vague or unknown intent, invoke `devrites-interview` for ordered one-question turns,
4
+ recommendations, option sets, pass limits, reframing, and closure.
5
+ This file owns only Spec-specific coverage and recording. Render through
6
+ [`Option set`](../../devrites-lib/reference/standards/afk-hitl.md#option-set-how-every-gap-is-presented).
7
+
8
+ ## Coverage gate: am I done asking?
9
+ Each dimension MUST be **resolved** or **explicitly deferred** (logged, non-blocking),
10
+ never skipped:
11
+ - [ ] **Objective:** one-sentence success + the real problem behind it.
12
+ - [ ] **Scope**: what's in vs explicitly out for v1.
13
+ - [ ] **Data model**: core entities + relationships (or "none").
14
+ - [ ] **UX / flow**: happy path + empty/loading/error/permission states (or "no UI").
15
+ - [ ] **Integration**: external systems/APIs/contracts (or "none").
16
+ - [ ] **Non-functional**: auth, sensitive data, latency/scale (or "n/a").
17
+ - [ ] **Acceptance**: how each requirement is *proven* (test/observation).
18
+ - [ ] **Human prerequisites**: credentials, approval windows, irreversible action-time gates
19
+ (or "none").
20
+
21
+ An agent recommendation is not a user answer. A human-owned material product, scope, UX,
22
+ compatibility, or acceptance choice closes only by the user's option selection, free-form
23
+ answer, or explicit deferral. Packets MAY be bounded; readiness MUST NOT. Rescan and continue
24
+ while blockers remain. If the user stops, keep them blocking and MUST NOT pass `/rite-spec`
25
+ readiness.
26
+
27
+ ## Spec question boundary
28
+ - Search code, decisions, authoritative docs before asking discoverable facts.
29
+ - Decide and log agent-owned reversible implementation/test details.
30
+ - Record tooling failures as prerequisites or blockers; never ask the human to authorize repair.
31
+ - Ask only material choices, not everything at once.
32
+
33
+ ## Record
34
+ Confirmed answers → `decisions.md` (with rationale). Agent-owned reversible, low-impact
35
+ technical assumptions →
36
+ `assumptions.md`. Open non-blocking items → `questions.md`.