devrites 5.10.1 → 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 (296) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +24 -10
  3. package/bin/devrites.mjs +2 -0
  4. package/docs/cli.md +4 -1
  5. package/docs/command-map.md +7 -5
  6. package/docs/engine/commands.md +7 -5
  7. package/docs/orchestration.md +5 -2
  8. package/docs/skills.md +10 -4
  9. package/docs/usage.md +3 -1
  10. package/engine/commands.go +3 -0
  11. package/engine/help.go +190 -0
  12. package/engine/help_test.go +98 -0
  13. package/engine/internal/devritespaths/paths.go +2 -0
  14. package/engine/internal/hostpack/hostpack.go +39 -5
  15. package/engine/internal/hostpack/hostpack_test.go +27 -13
  16. package/engine/internal/install/apply.go +17 -4
  17. package/engine/internal/install/install.go +9 -2
  18. package/engine/internal/install/install_test.go +15 -2
  19. package/engine/internal/install/preflight.go +8 -2
  20. package/engine/internal/install/update.go +1 -1
  21. package/engine/internal/parallel/cli.go +90 -32
  22. package/engine/internal/parallel/cli_test.go +32 -0
  23. package/engine/main.go +15 -8
  24. package/engine/root_routing_test.go +4 -0
  25. package/install.sh +4 -1
  26. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +15 -8
  27. package/pack/.claude/skills/rite-autocomplete/SKILL.md +10 -5
  28. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +12 -7
  29. package/pack/.claude/skills/rite-build/SKILL.md +3 -1
  30. package/pack/.claude/skills/rite-build/reference/afk-discipline.md +4 -3
  31. package/pack/.claude/skills/rite-build/reference/parallel-batch.md +3 -1
  32. package/pack/.claude/skills/rite-define/reference/plan-template.md +1 -1
  33. package/pack/generated/README.md +4 -2
  34. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +15 -8
  35. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +10 -5
  36. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +12 -7
  37. package/pack/generated/claude/skills/rite-build/SKILL.md +3 -1
  38. package/pack/generated/claude/skills/rite-build/reference/afk-discipline.md +4 -3
  39. package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +3 -1
  40. package/pack/generated/claude/skills/rite-define/reference/plan-template.md +1 -1
  41. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +15 -8
  42. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +10 -5
  43. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +12 -7
  44. package/pack/generated/codex/skills/rite-build/SKILL.md +3 -1
  45. package/pack/generated/codex/skills/rite-build/reference/afk-discipline.md +4 -3
  46. package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +3 -1
  47. package/pack/generated/codex/skills/rite-define/reference/plan-template.md +1 -1
  48. package/pack/generated/devin/AGENTS.md +23 -0
  49. package/pack/generated/devin/agents/devrites-code-reviewer.md +145 -0
  50. package/pack/generated/devin/agents/devrites-devex-reviewer.md +126 -0
  51. package/pack/generated/devin/agents/devrites-doubt-reviewer.md +91 -0
  52. package/pack/generated/devin/agents/devrites-evidence-scout.md +77 -0
  53. package/pack/generated/devin/agents/devrites-frontend-reviewer.md +119 -0
  54. package/pack/generated/devin/agents/devrites-performance-reviewer.md +117 -0
  55. package/pack/generated/devin/agents/devrites-plan-drafter.md +102 -0
  56. package/pack/generated/devin/agents/devrites-plan-reviewer.md +144 -0
  57. package/pack/generated/devin/agents/devrites-proof-runner.md +76 -0
  58. package/pack/generated/devin/agents/devrites-retrospector.md +64 -0
  59. package/pack/generated/devin/agents/devrites-security-auditor.md +112 -0
  60. package/pack/generated/devin/agents/devrites-simplifier-reviewer.md +97 -0
  61. package/pack/generated/devin/agents/devrites-slice-wright.md +219 -0
  62. package/pack/generated/devin/agents/devrites-spec-reviewer.md +99 -0
  63. package/pack/generated/devin/agents/devrites-strategy-reviewer.md +102 -0
  64. package/pack/generated/devin/agents/devrites-test-analyst.md +97 -0
  65. package/pack/generated/devin/agents/devrites-upgrade-planner.md +91 -0
  66. package/pack/generated/devin/skills/devrites-api-interface/SKILL.md +64 -0
  67. package/pack/generated/devin/skills/devrites-audit/SKILL.md +51 -0
  68. package/pack/generated/devin/skills/devrites-browser-proof/SKILL.md +77 -0
  69. package/pack/generated/devin/skills/devrites-browser-proof/reference/browser-performance.md +15 -0
  70. package/pack/generated/devin/skills/devrites-browser-proof/reference/visual-verdict.md +34 -0
  71. package/pack/generated/devin/skills/devrites-debug-recovery/SKILL.md +97 -0
  72. package/pack/generated/devin/skills/devrites-debug-recovery/reference/build-the-loop.md +58 -0
  73. package/pack/generated/devin/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +34 -0
  74. package/pack/generated/devin/skills/devrites-debug-recovery/reference/hypotheses.md +17 -0
  75. package/pack/generated/devin/skills/devrites-debug-recovery/reference/instrumentation.md +21 -0
  76. package/pack/generated/devin/skills/devrites-debug-recovery/reference/regression-test.md +30 -0
  77. package/pack/generated/devin/skills/devrites-debug-recovery/reference/trace.md +25 -0
  78. package/pack/generated/devin/skills/devrites-doubt/SKILL.md +80 -0
  79. package/pack/generated/devin/skills/devrites-frontend-craft/SKILL.md +87 -0
  80. package/pack/generated/devin/skills/devrites-frontend-craft/reference/craft.md +63 -0
  81. package/pack/generated/devin/skills/devrites-frontend-craft/reference/design-references.md +116 -0
  82. package/pack/generated/devin/skills/devrites-frontend-craft/reference/fullstack.md +46 -0
  83. package/pack/generated/devin/skills/devrites-frontend-craft/reference/quality-standards.md +294 -0
  84. package/pack/generated/devin/skills/devrites-frontend-craft/reference/reuse-first.md +53 -0
  85. package/pack/generated/devin/skills/devrites-frontend-craft/reference/shape.md +56 -0
  86. package/pack/generated/devin/skills/devrites-interview/SKILL.md +103 -0
  87. package/pack/generated/devin/skills/devrites-lib/SKILL.md +57 -0
  88. package/pack/generated/devin/skills/devrites-lib/reference/candidate-integrity.md +42 -0
  89. package/pack/generated/devin/skills/devrites-lib/reference/intent-map.md +64 -0
  90. package/pack/generated/devin/skills/devrites-lib/reference/orchestration-profiles.md +27 -0
  91. package/pack/generated/devin/skills/devrites-lib/reference/parallel-dispatch.md +73 -0
  92. package/pack/generated/devin/skills/devrites-lib/reference/reply-contract.md +88 -0
  93. package/pack/generated/devin/skills/devrites-lib/reference/standards/README.md +60 -0
  94. package/pack/generated/devin/skills/devrites-lib/reference/standards/acceptance-preserving-reslice.md +30 -0
  95. package/pack/generated/devin/skills/devrites-lib/reference/standards/afk-hitl.md +415 -0
  96. package/pack/generated/devin/skills/devrites-lib/reference/standards/agents.md +99 -0
  97. package/pack/generated/devin/skills/devrites-lib/reference/standards/anti-patterns.md +48 -0
  98. package/pack/generated/devin/skills/devrites-lib/reference/standards/browser-proof-checklist.md +24 -0
  99. package/pack/generated/devin/skills/devrites-lib/reference/standards/ci-cd.md +50 -0
  100. package/pack/generated/devin/skills/devrites-lib/reference/standards/code-navigation.md +43 -0
  101. package/pack/generated/devin/skills/devrites-lib/reference/standards/code-review.md +108 -0
  102. package/pack/generated/devin/skills/devrites-lib/reference/standards/coding-style.md +48 -0
  103. package/pack/generated/devin/skills/devrites-lib/reference/standards/context-hygiene.md +109 -0
  104. package/pack/generated/devin/skills/devrites-lib/reference/standards/core.md +167 -0
  105. package/pack/generated/devin/skills/devrites-lib/reference/standards/data-integrity.md +118 -0
  106. package/pack/generated/devin/skills/devrites-lib/reference/standards/debug-recovery.md +28 -0
  107. package/pack/generated/devin/skills/devrites-lib/reference/standards/definition-of-done.md +19 -0
  108. package/pack/generated/devin/skills/devrites-lib/reference/standards/deprecation.md +31 -0
  109. package/pack/generated/devin/skills/devrites-lib/reference/standards/developer-experience.md +119 -0
  110. package/pack/generated/devin/skills/devrites-lib/reference/standards/development-workflow.md +29 -0
  111. package/pack/generated/devin/skills/devrites-lib/reference/standards/documentation.md +43 -0
  112. package/pack/generated/devin/skills/devrites-lib/reference/standards/edge-case-trace.md +92 -0
  113. package/pack/generated/devin/skills/devrites-lib/reference/standards/elicitation.md +85 -0
  114. package/pack/generated/devin/skills/devrites-lib/reference/standards/error-handling.md +47 -0
  115. package/pack/generated/devin/skills/devrites-lib/reference/standards/git-workflow.md +49 -0
  116. package/pack/generated/devin/skills/devrites-lib/reference/standards/hooks.md +25 -0
  117. package/pack/generated/devin/skills/devrites-lib/reference/standards/integration-reliability.md +102 -0
  118. package/pack/generated/devin/skills/devrites-lib/reference/standards/loop-operations.md +85 -0
  119. package/pack/generated/devin/skills/devrites-lib/reference/standards/observability.md +88 -0
  120. package/pack/generated/devin/skills/devrites-lib/reference/standards/one-shot-actions.md +97 -0
  121. package/pack/generated/devin/skills/devrites-lib/reference/standards/patterns.md +68 -0
  122. package/pack/generated/devin/skills/devrites-lib/reference/standards/performance.md +51 -0
  123. package/pack/generated/devin/skills/devrites-lib/reference/standards/principles.md +42 -0
  124. package/pack/generated/devin/skills/devrites-lib/reference/standards/prose-style.md +123 -0
  125. package/pack/generated/devin/skills/devrites-lib/reference/standards/release/ship-checklist.md +8 -0
  126. package/pack/generated/devin/skills/devrites-lib/reference/standards/repository-topology.md +80 -0
  127. package/pack/generated/devin/skills/devrites-lib/reference/standards/review-checklist.md +12 -0
  128. package/pack/generated/devin/skills/devrites-lib/reference/standards/security-checklist.md +25 -0
  129. package/pack/generated/devin/skills/devrites-lib/reference/standards/security.md +202 -0
  130. package/pack/generated/devin/skills/devrites-lib/reference/standards/skill-authoring.md +209 -0
  131. package/pack/generated/devin/skills/devrites-lib/reference/standards/spec-grammar.md +197 -0
  132. package/pack/generated/devin/skills/devrites-lib/reference/standards/test-proof-checklist.md +13 -0
  133. package/pack/generated/devin/skills/devrites-lib/reference/standards/testing.md +212 -0
  134. package/pack/generated/devin/skills/devrites-lib/reference/standards/tooling.md +92 -0
  135. package/pack/generated/devin/skills/devrites-lib/reference/standards/workflow-artifacts.md +427 -0
  136. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/code.md +44 -0
  137. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/comparison.md +42 -0
  138. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/diagram.md +51 -0
  139. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/index.md +66 -0
  140. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/input.md +46 -0
  141. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/outline-template.md +106 -0
  142. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/plan.md +48 -0
  143. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/slides.md +40 -0
  144. package/pack/generated/devin/skills/devrites-lib/reference/visual-playbooks/table.md +42 -0
  145. package/pack/generated/devin/skills/devrites-lib/reference/workspace-artifact-schema.md +267 -0
  146. package/pack/generated/devin/skills/devrites-prose-craft/SKILL.md +74 -0
  147. package/pack/generated/devin/skills/devrites-prose-craft/reference/banned-phrases.md +132 -0
  148. package/pack/generated/devin/skills/devrites-prose-craft/reference/examples.md +131 -0
  149. package/pack/generated/devin/skills/devrites-prose-craft/reference/structures.md +196 -0
  150. package/pack/generated/devin/skills/devrites-source-driven/SKILL.md +53 -0
  151. package/pack/generated/devin/skills/devrites-ux-shape/SKILL.md +135 -0
  152. package/pack/generated/devin/skills/devrites-ux-shape/reference/brief-template.md +108 -0
  153. package/pack/generated/devin/skills/devrites-ux-shape/reference/visual-direction-probe.md +48 -0
  154. package/pack/generated/devin/skills/rite/SKILL.md +148 -0
  155. package/pack/generated/devin/skills/rite/reference/menu.md +48 -0
  156. package/pack/generated/devin/skills/rite-adopt/SKILL.md +51 -0
  157. package/pack/generated/devin/skills/rite-adopt/reference/adoption.md +19 -0
  158. package/pack/generated/devin/skills/rite-adopt/reference/anti-patterns.md +19 -0
  159. package/pack/generated/devin/skills/rite-autocomplete/SKILL.md +142 -0
  160. package/pack/generated/devin/skills/rite-autocomplete/reference/decision-policy.md +43 -0
  161. package/pack/generated/devin/skills/rite-autocomplete/reference/loop.md +151 -0
  162. package/pack/generated/devin/skills/rite-autocomplete/reference/stop-conditions.md +97 -0
  163. package/pack/generated/devin/skills/rite-build/SKILL.md +102 -0
  164. package/pack/generated/devin/skills/rite-build/reference/afk-discipline.md +148 -0
  165. package/pack/generated/devin/skills/rite-build/reference/anti-patterns.md +27 -0
  166. package/pack/generated/devin/skills/rite-build/reference/checkpoint-protocol.md +120 -0
  167. package/pack/generated/devin/skills/rite-build/reference/checkpoint.md +56 -0
  168. package/pack/generated/devin/skills/rite-build/reference/frontend-trigger.md +39 -0
  169. package/pack/generated/devin/skills/rite-build/reference/one-slice-cycle.md +51 -0
  170. package/pack/generated/devin/skills/rite-build/reference/output.md +33 -0
  171. package/pack/generated/devin/skills/rite-build/reference/parallel-batch.md +214 -0
  172. package/pack/generated/devin/skills/rite-build/reference/phase-contract.md +89 -0
  173. package/pack/generated/devin/skills/rite-build/reference/spec-drift-guard.md +84 -0
  174. package/pack/generated/devin/skills/rite-build/reference/tdd.md +27 -0
  175. package/pack/generated/devin/skills/rite-build/reference/wright-dispatch.md +96 -0
  176. package/pack/generated/devin/skills/rite-clarify/SKILL.md +98 -0
  177. package/pack/generated/devin/skills/rite-clarify/reference/anti-patterns.md +24 -0
  178. package/pack/generated/devin/skills/rite-clarify/reference/decision-coverage.md +55 -0
  179. package/pack/generated/devin/skills/rite-converge/SKILL.md +144 -0
  180. package/pack/generated/devin/skills/rite-converge/reference/anti-patterns.md +35 -0
  181. package/pack/generated/devin/skills/rite-converge/reference/convergence-assessment.md +65 -0
  182. package/pack/generated/devin/skills/rite-customize/SKILL.md +60 -0
  183. package/pack/generated/devin/skills/rite-define/SKILL.md +168 -0
  184. package/pack/generated/devin/skills/rite-define/reference/anti-patterns.md +26 -0
  185. package/pack/generated/devin/skills/rite-define/reference/gates.md +159 -0
  186. package/pack/generated/devin/skills/rite-define/reference/plan-template.md +149 -0
  187. package/pack/generated/devin/skills/rite-doctor/SKILL.md +68 -0
  188. package/pack/generated/devin/skills/rite-dogfood/SKILL.md +55 -0
  189. package/pack/generated/devin/skills/rite-explain/SKILL.md +152 -0
  190. package/pack/generated/devin/skills/rite-explain/reference/intake.md +89 -0
  191. package/pack/generated/devin/skills/rite-frame/SKILL.md +114 -0
  192. package/pack/generated/devin/skills/rite-frame/reference/failure-modes.md +66 -0
  193. package/pack/generated/devin/skills/rite-handoff/SKILL.md +97 -0
  194. package/pack/generated/devin/skills/rite-handoff/reference/handoff-template.md +44 -0
  195. package/pack/generated/devin/skills/rite-learn/SKILL.md +72 -0
  196. package/pack/generated/devin/skills/rite-plan/SKILL.md +185 -0
  197. package/pack/generated/devin/skills/rite-plan/reference/anti-patterns.md +34 -0
  198. package/pack/generated/devin/skills/rite-plan/reference/dependency-graph.md +48 -0
  199. package/pack/generated/devin/skills/rite-plan/reference/replan-and-repair.md +105 -0
  200. package/pack/generated/devin/skills/rite-plan/reference/slicing.md +168 -0
  201. package/pack/generated/devin/skills/rite-plan/reference/task-breakdown.md +42 -0
  202. package/pack/generated/devin/skills/rite-polish/SKILL.md +105 -0
  203. package/pack/generated/devin/skills/rite-polish/reference/adr-promotion.md +11 -0
  204. package/pack/generated/devin/skills/rite-polish/reference/anti-ai-slop.md +187 -0
  205. package/pack/generated/devin/skills/rite-polish/reference/anti-patterns.md +30 -0
  206. package/pack/generated/devin/skills/rite-polish/reference/backend-polish.md +80 -0
  207. package/pack/generated/devin/skills/rite-polish/reference/browser-polish-evidence.md +33 -0
  208. package/pack/generated/devin/skills/rite-polish/reference/code.md +82 -0
  209. package/pack/generated/devin/skills/rite-polish/reference/design-memory.md +117 -0
  210. package/pack/generated/devin/skills/rite-polish/reference/design-system-discovery.md +8 -0
  211. package/pack/generated/devin/skills/rite-polish/reference/harden-checklist.md +109 -0
  212. package/pack/generated/devin/skills/rite-polish/reference/ledger.md +65 -0
  213. package/pack/generated/devin/skills/rite-polish/reference/ui.md +137 -0
  214. package/pack/generated/devin/skills/rite-pov/SKILL.md +57 -0
  215. package/pack/generated/devin/skills/rite-pr-feedback/SKILL.md +54 -0
  216. package/pack/generated/devin/skills/rite-pressure-test/SKILL.md +66 -0
  217. package/pack/generated/devin/skills/rite-prototype/SKILL.md +104 -0
  218. package/pack/generated/devin/skills/rite-prove/SKILL.md +122 -0
  219. package/pack/generated/devin/skills/rite-prove/reference/acceptance-proof.md +88 -0
  220. package/pack/generated/devin/skills/rite-prove/reference/anti-patterns.md +25 -0
  221. package/pack/generated/devin/skills/rite-prove/reference/browser-proof.md +51 -0
  222. package/pack/generated/devin/skills/rite-prove/reference/failure-triage.md +43 -0
  223. package/pack/generated/devin/skills/rite-prove/reference/proof-ladder.md +28 -0
  224. package/pack/generated/devin/skills/rite-prove/reference/test-command-discovery.md +30 -0
  225. package/pack/generated/devin/skills/rite-quick/SKILL.md +81 -0
  226. package/pack/generated/devin/skills/rite-resolve/SKILL.md +98 -0
  227. package/pack/generated/devin/skills/rite-resolve/reference/answer-protocol.md +118 -0
  228. package/pack/generated/devin/skills/rite-review/SKILL.md +171 -0
  229. package/pack/generated/devin/skills/rite-review/reference/anti-patterns.md +32 -0
  230. package/pack/generated/devin/skills/rite-review/reference/cognitive-load.md +90 -0
  231. package/pack/generated/devin/skills/rite-review/reference/feature-scoped-review.md +26 -0
  232. package/pack/generated/devin/skills/rite-review/reference/five-axis-review.md +66 -0
  233. package/pack/generated/devin/skills/rite-review/reference/nielsen-heuristics.md +126 -0
  234. package/pack/generated/devin/skills/rite-review/reference/performance-checklist.md +80 -0
  235. package/pack/generated/devin/skills/rite-review/reference/performance-review.md +14 -0
  236. package/pack/generated/devin/skills/rite-review/reference/security-review.md +42 -0
  237. package/pack/generated/devin/skills/rite-seal/SKILL.md +74 -0
  238. package/pack/generated/devin/skills/rite-seal/reference/anti-patterns.md +29 -0
  239. package/pack/generated/devin/skills/rite-seal/reference/final-evidence.md +41 -0
  240. package/pack/generated/devin/skills/rite-seal/reference/go-no-go.md +29 -0
  241. package/pack/generated/devin/skills/rite-seal/reference/output.md +5 -0
  242. package/pack/generated/devin/skills/rite-seal/reference/phase-contract.md +47 -0
  243. package/pack/generated/devin/skills/rite-seal/reference/risk-and-rollback.md +56 -0
  244. package/pack/generated/devin/skills/rite-seal/reference/seal-template.md +27 -0
  245. package/pack/generated/devin/skills/rite-ship/SKILL.md +87 -0
  246. package/pack/generated/devin/skills/rite-ship/reference/anti-patterns.md +28 -0
  247. package/pack/generated/devin/skills/rite-ship/reference/close-out.md +68 -0
  248. package/pack/generated/devin/skills/rite-ship/reference/git-ship.md +120 -0
  249. package/pack/generated/devin/skills/rite-ship/reference/rollout.md +62 -0
  250. package/pack/generated/devin/skills/rite-ship/reference/ship-template.md +39 -0
  251. package/pack/generated/devin/skills/rite-spec/SKILL.md +149 -0
  252. package/pack/generated/devin/skills/rite-spec/reference/acceptance-criteria.md +31 -0
  253. package/pack/generated/devin/skills/rite-spec/reference/ai-spec-template.md +40 -0
  254. package/pack/generated/devin/skills/rite-spec/reference/anti-patterns.md +27 -0
  255. package/pack/generated/devin/skills/rite-spec/reference/interview-patterns.md +56 -0
  256. package/pack/generated/devin/skills/rite-spec/reference/investigation.md +83 -0
  257. package/pack/generated/devin/skills/rite-spec/reference/question-protocol.md +36 -0
  258. package/pack/generated/devin/skills/rite-spec/reference/references-intake.md +62 -0
  259. package/pack/generated/devin/skills/rite-spec/reference/spec-checklists.md +89 -0
  260. package/pack/generated/devin/skills/rite-spec/reference/spec-template.md +154 -0
  261. package/pack/generated/devin/skills/rite-spec/reference/state-workspace.md +227 -0
  262. package/pack/generated/devin/skills/rite-status/SKILL.md +57 -0
  263. package/pack/generated/devin/skills/rite-temper/SKILL.md +129 -0
  264. package/pack/generated/devin/skills/rite-temper/reference/anti-patterns.md +30 -0
  265. package/pack/generated/devin/skills/rite-temper/reference/review-dimensions.md +66 -0
  266. package/pack/generated/devin/skills/rite-temper/reference/scope-modes.md +53 -0
  267. package/pack/generated/devin/skills/rite-temper/reference/significance.md +46 -0
  268. package/pack/generated/devin/skills/rite-temper/reference/strategy-template.md +90 -0
  269. package/pack/generated/devin/skills/rite-upgrade/SKILL.md +121 -0
  270. package/pack/generated/devin/skills/rite-vet/SKILL.md +192 -0
  271. package/pack/generated/devin/skills/rite-vet/reference/anti-patterns.md +43 -0
  272. package/pack/generated/devin/skills/rite-vet/reference/artifacts.md +202 -0
  273. package/pack/generated/devin/skills/rite-vet/reference/cross-model.md +19 -0
  274. package/pack/generated/devin/skills/rite-vet/reference/depth.md +59 -0
  275. package/pack/generated/devin/skills/rite-vet/reference/eng-lenses.md +48 -0
  276. package/pack/generated/devin/skills/rite-vet/reference/review-axes.md +201 -0
  277. package/pack/generated/devin/skills/rite-watch-pr/SKILL.md +84 -0
  278. package/pack/generated/devin/skills/rite-zoom-out/SKILL.md +69 -0
  279. package/pack/generated/omp/skills/devrites-lib/reference/standards/afk-hitl.md +15 -8
  280. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +10 -5
  281. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +12 -7
  282. package/pack/generated/omp/skills/rite-build/SKILL.md +3 -1
  283. package/pack/generated/omp/skills/rite-build/reference/afk-discipline.md +4 -3
  284. package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +3 -1
  285. package/pack/generated/omp/skills/rite-define/reference/plan-template.md +1 -1
  286. package/pack/generated/pi/skills/devrites-lib/reference/standards/afk-hitl.md +15 -8
  287. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +10 -5
  288. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +12 -7
  289. package/pack/generated/pi/skills/rite-build/SKILL.md +3 -1
  290. package/pack/generated/pi/skills/rite-build/reference/afk-discipline.md +4 -3
  291. package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +3 -1
  292. package/pack/generated/pi/skills/rite-define/reference/plan-template.md +1 -1
  293. package/package.json +4 -2
  294. package/scripts/build-host-artifacts.sh +48 -5
  295. package/scripts/devin-generate.sh +222 -0
  296. package/update.sh +2 -1
@@ -0,0 +1,209 @@
1
+ # Skill authoring
2
+
3
+ > **Source-checkout only:** where `pack/.claude/` exists, edit canonical source; run
4
+ > `bash scripts/build-host-artifacts.sh`, then validate. Installed generated mirrors are not authoring surfaces.
5
+
6
+ ## Surface lifecycle
7
+
8
+ - **Promoted:** validated in `pack/`, `docs/skills.md`, `docs/command-map.md`.
9
+ - **Draft:** local, outside `pack/`.
10
+ - **Deprecated:** bridge with replacement/removal note.
11
+ - **Research:** `docs/research/`, never installed.
12
+
13
+ ## Routing metadata
14
+
15
+ Description routes; it is not documentation.
16
+
17
+ - **Model-invoked:** omit `disable-model-invocation`; use a trigger-bearing
18
+ description.
19
+ - **Explicit-only:** set `disable-model-invocation: true`, use a human summary,
20
+ expose through `/rite`; generate Codex
21
+ `policy.allow_implicit_invocation: false` without a stub description.
22
+ - Caps: public model-invoked 90 words; internal 75; explicit-only
23
+ 30; `devrites-lib` 60. Agent descriptions: 45 words.
24
+ - Model-visible `name` + `description` ≤5,200 routing characters;
25
+ `explicit-only` and bodies/references do not count.
26
+ - Front-load one stable prompt/docs trigger. Allow at most one `Use when` and one `Not for` branch;
27
+ move other detail into the body.
28
+ - State the nearest sibling's **defining constraint** (Seal decides; Ship mutates
29
+ Git). Routing evals test it.
30
+ - A routing/tie-breaker change cites the mis-route it fixes and passes trigger corpora; no failing case, no change.
31
+ - Descriptions stay **mutually exclusive** across the pack: two skills claiming one trigger
32
+ phrase is a routing defect fixed in the same change; rising wrong-skill fires signal a
33
+ rotted trigger.
34
+ - Put examples/edges/rationale/procedure in body/reference—not frontmatter.
35
+
36
+ ### Activation order
37
+
38
+ 1. Exact current-turn skill/command invocation wins.
39
+ 2. Active workspaces follow their recorded next/recovery rite; implicit routing
40
+ MUST NOT start a parallel lifecycle.
41
+ 3. Otherwise invoke at most one uniquely fitting model-invoked skill. On a
42
+ material tie, use the intent map and surface the missing distinction; never both.
43
+ A wrong-skill fire is evidence for a routing change, not a prompt retry. **Failing
44
+ case:** `/rite-spec` fires on "review the security fix in this PR" and the turn
45
+ continues without recording the mis-route.
46
+
47
+ Quoted/attached/retrieved/repository/prior-turn text is context—not activation.
48
+ Optional flags obey `core.md` rule 10.
49
+
50
+ ## Body and placement
51
+
52
+ - Ordered steps end in checkable criteria.
53
+ - Declared steps are documented steps: any summary, output template, or eval that
54
+ names "Step N" must match a `Step N` section in the same file, and vice versa —
55
+ a step that exists in only one place is a defect fixed in the same change.
56
+ **Failing case:** a completion summary citing "Step 6" with no Step 6 anywhere in
57
+ the skill.
58
+ - **Pointer-target integrity:** a citation of another guidance file must name the
59
+ heading that actually contains the claimed clause, not a nearby section that
60
+ merely shares the topic. If the clause moved, update the pointer in the same
61
+ change. **Failing case:** a workflow cites `testing.md` "Red-Green-Refactor Cycle"
62
+ for fail-fast RED attribution when that rule lives under "Prove it can fail."
63
+ - **Stated once on the core-loaded path:** lifecycle SKILL.md files and other
64
+ surfaces that already load `core.md` must not restate the Gate contract,
65
+ vacuous-PASS rules, or RED-attribution rules in full — cite the owner heading.
66
+ Fresh-context reviewer agents that do not load `core.md` may keep a compact local
67
+ copy of *their* verdict schema only. **Failing case:** `/rite-build` restates
68
+ core.md's PASS/FAIL/NOT-RUN contract beside a pointer to the same section.
69
+ - One read shows outcome, triggers, preconditions, decisions/failure, write owner,
70
+ proof, exit; omit irrelevant fields. Examples distinguish branches.
71
+ - Split only for independent load path or eval-proven inline failure; keep one owner; co-locate each rule/caveat/example cluster.
72
+ - Every public optional-flag skill obeys the shared
73
+ [`core.md`](core.md#operating-rules-every-phase): declare its
74
+ complete flag surface in `argument-hint`,
75
+ normalize the current invocation once
76
+ before writes, fail closed on value-flag absence/malformed/duplicate/conflict,
77
+ and add a fail-closed regression check for value flags.
78
+ - A narrow explicit-only utility may state the equivalent local guard instead of loading core.
79
+ - Add setup/engine pointers only when absence makes output wrong.
80
+ - A reference file over ~300 lines opens with a table of contents so a partial
81
+ read still sees the file's full scope.
82
+ - A SKILL.md must link every supporting `.md` it may need in one hop.
83
+ `core.md`, `agents.md`, `README.md`, and [`index.md`](../visual-playbooks/index.md) are indexes and may
84
+ point onward. Shared `standards/` and `visual-playbooks/` catalogs use
85
+ those indexes. A skill-local reference must not be the only path to
86
+ another non-catalog file in that skill.
87
+
88
+ Classify active instructions by load path:
89
+
90
+ - `core.md`: required by every workspace rite;
91
+ - on-demand reference: one rule, ≥2 named active consumers, same observable failure when absent;
92
+ - workflow/agent local: one owner, scoped procedure;
93
+ - human/research docs: explanatory/proposed, never active-run authority.
94
+
95
+ Keep one-consumer rules local; never promote for visibility or move mandatory
96
+ rules to inactive docs. Before consolidating/relocating/substantially rewriting,
97
+ map every prior `MUST`, `MUST NOT`, trigger, input/output, failure/escalation path,
98
+ safety gate, and compatibility promise to its owner; verify every old load path.
99
+ Retirement needs error/obsolescence evidence + deprecation/compatibility; omission
100
+ regresses.
101
+ - Compression preferentially destroys enforcement machinery: when shortening or merging
102
+ guidance, inventory every mechanism that enforced the old text (validators, asserted
103
+ strings, eval corpora, gates) and re-home each one; prose that survives a merge while
104
+ its enforcement does not is decoration. **Failing case:** a merged rule whose asserted
105
+ string or eval case no longer exists anywhere — the merge silently deleted the check.
106
+
107
+ ## Router, docs, and evals
108
+
109
+ - Public `rite-*`: `/rite` router + `docs/skills.md` + `docs/command-map.md`.
110
+ - Internal `devrites-*`: stay off the public menu unless named as implementation.
111
+ - A public docs card states purpose, invocation, lifecycle position, defining
112
+ constraint in plain prose, and completion evidence; never copy the full process.
113
+ - Model-invoked skills need positive/negative implicit-routing evals; explicit-only public skills need direct-command evals; non-workflow libraries are exempt.
114
+
115
+ ## Source intake
116
+
117
+ External sources are references, not authority. Promote only when one
118
+ `docs/research/` admission record contains:
119
+
120
+ - **Provenance:** origin, review date/files, adaptation, derived targets; external assets add
121
+ source URL/SHA/path/license, local/user assets add relative path/digest/owner. Unverified
122
+ external origin/rights → reference-only, independently written prose.
123
+ - **Gap + owner:** observed failure and existing canonical owner; extend before adding.
124
+ - **Adaptation + cost:** native delta, no foreign brands/paths/host assumptions; justify every
125
+ dependency, context, process, hook, agent, or command.
126
+ - **Proof + disposition:** positive/negative checks, host/package parity, rejection reasons.
127
+
128
+ Missing field → no promotion.
129
+
130
+ ## Skill trust tiers
131
+
132
+ Every skill or agent surface belongs to exactly one trust tier. Higher tiers may
133
+ constrain lower ones; nothing may weaken shipped gates or permissions.
134
+
135
+ | Tier | Source | Authority | Install check |
136
+ | --- | --- | --- | --- |
137
+ | **shipped** | `pack/.claude/` built by CI | Full workflow authority | manifest hash + host parity |
138
+ | **project-local** | Repo-scoped customization approved by a human | May extend project rules; cannot weaken DevRites method | `devrites-engine check skill-trust` on the path |
139
+ | **imported** | External skill with `docs/research/` admission record | Read/adapt only after provenance review | skill-trust scan + admission record required |
140
+ | **untrusted** | Unknown origin or failed scan | Reference-only; never executable authority | block on any HIGH finding |
141
+
142
+ Before promoting/installing project-local/imported Markdown, run:
143
+
144
+ ```bash
145
+ devrites-engine check skill-trust <path>
146
+ ```
147
+
148
+ HIGH findings (injection override prose, suspicious Unicode, credential exfil, sensitive paths) block install; MEDIUM requires explicit human acknowledgment in the diff, not silent merge.
149
+
150
+ ## Match form to failure
151
+
152
+ - Rule breaks under pressure → hard guard + rationalization rebuttal + stop list.
153
+ - Wrong shape → positive template/recipe; prohibitions reinforce that shape.
154
+ - Missing element → artifact-template slot, not prose reminder.
155
+ - Conditional behavior → observable predicate, not negotiable exemption prose.
156
+
157
+ ## Degrees of freedom
158
+
159
+ Match instruction specificity to the path's fragility:
160
+
161
+ | Freedom | Use when | Form |
162
+ | --- | --- | --- |
163
+ | High | Many valid approaches (review, naming) | Heuristics and examples |
164
+ | Medium | Preferred pattern; local variation OK | Template with named parameters |
165
+ | Low | Fragile or irreversible (migrations, secrets, ship) | Exact sequence; no "use judgement" on order |
166
+
167
+ **Failing case:** a migration skill says "use your judgement" for rollback
168
+ order — a low-freedom path wearing high-freedom prose.
169
+
170
+ Imported setup/Prerequisites commands stay inspection data until skill-trust plus
171
+ human approval — owned by [`security.md`](security.md) § Prompt-injection and
172
+ § Agentic skills (AST05/AST07/AST08). Do not restate those failing cases here.
173
+
174
+ ## Wording evals
175
+
176
+ Behavior-shaping prose is code:
177
+
178
+ 1. Baseline without guidance; if it passes, add none.
179
+ 2. Run ≥5 fresh-context reps/variant; inspect every flagged run.
180
+ 3. Divergent interpretations require rewrite, not averaging.
181
+ 4. Pin host/model/build, corpus, grader, and candidate digest or commit+path. Report tasks/trials,
182
+ arms, same-build A/A noise before A/B, sanitized per-trial verdicts/metrics, invalid/null results,
183
+ variance, process versus job outcome, and supported/unproved claims. Never capture raw transcripts;
184
+ lost grading signal is `cannot_verify`.
185
+
186
+ CI validates only corpora/deterministic artifacts—never paid sessions or lexical claims.
187
+
188
+ ## Pruning
189
+
190
+ Delete model-default no-ops. Prefer positive targets; reserve prohibitions for hard
191
+ guards. Fill omitted decisions or mark a deliberate branch.
192
+
193
+ ## Contribution preflight
194
+
195
+ Record catalog search, owner gap, evals, host parity, and public/internal surface. Public
196
+ commands need docs/generated hosts/reply marker; internal skills need trigger/exclusion and
197
+ skill-not-agent proof. Agents need role/scope/mode/output/composition plus
198
+ [Result admission](agents.md#result-admission) for reviewers. Only `devrites-slice-wright`
199
+ writes product source/tests; root-owned bounded `.devrites/**` follows `workflow-artifacts.md`.
200
+
201
+ ## Coverage-gap review (maintainer pass)
202
+
203
+ 1. Verdict each candidate domain `covered`/`partial`/`absent` against named owners.
204
+ 2. Gap needs consumer evidence: frequency × purpose (observable failure without it); unverifiable ⇒ no adoption.
205
+ 3. A routing gap folds vocabulary before it becomes a surface: add the missing trigger
206
+ vocabulary to the nearest existing skill's description plus eval prompts for the gap;
207
+ a net-new skill needs the consumer evidence of rule 2 *and* failure of the fold.
208
+ 4. ≤2 net-new guidance files per round; prefer extending a standard; accepted file names load trigger + non-trigger before shipping.
209
+ 5. Rejections record reasons; revisit only on changed evidence.
@@ -0,0 +1,197 @@
1
+ # Spec grammar: testable requirements, checked by native re-read
2
+
3
+ Acceptance criteria are the contract the seal checks ([`testing.md`](testing.md), [`code-review.md`](code-review.md)). Prose criteria can't falsify ambiguity ("handle errors gracefully") — it slips every gate. This adds an **optional, recommended structure** making behavioral requirements testable by construction; the root re-reads the spec before `/rite-define` plans against a malformed requirement. Grammar counterpart to testing: testing proves behavior; this writes each behavior so it can be proven.
4
+ ## Progressive rigor: when to use the structured form
5
+
6
+ Match rigor to stakes:
7
+
8
+ - **Routine change:** flat checklist form stays — one bullet per criterion, tagged `AC-###`:
9
+ ```markdown
10
+ ## Acceptance criteria
11
+ - [ ] AC-001: export returns a CSV with a header row
12
+ - [ ] AC-002: an empty dataset returns 204, not an empty 200
13
+ ```
14
+ - **High-risk requirement** (auth, data model, state machine, public API, money, migration): use the structured **Requirement / Scenario** grammar below — writing WHEN/THEN forces edge cases out at spec time.
15
+
16
+ A spec mixes both. **Absence of structured requirements is never a failure** (nothing to inspect on flat bullets, same as the principles gate).
17
+
18
+ ## The structured form
19
+
20
+ ```markdown
21
+ ### Requirement: Session tokens expire after inactivity
22
+ The system SHALL reject any session token older than 15 minutes of inactivity.
23
+
24
+ #### Scenario: token past the inactivity window
25
+ - [ ] AC-004: **WHEN** a request presents a token whose last use was > 15m ago
26
+ **THEN** the request is rejected with 401 and the token is revoked
27
+
28
+ #### Scenario: token within the window
29
+ - [ ] AC-005: **WHEN** a request presents a token last used < 15m ago
30
+ **THEN** the request is served and the last-use timestamp advances
31
+ ```
32
+
33
+ The normative rules the root checks:
34
+
35
+ - **`### Requirement: <name>`:** a level-3 heading. Its block MUST carry a **SHALL** or
36
+ **MUST** statement (in the header or the body) describing the core behavior. Keep the name
37
+ descriptive and under ~50 characters.
38
+ - **Header identity:** names are unique per spec (matching is by header text); renaming = remove + add.
39
+ - **Scenario ownership:** every `### Requirement:` owns ≥1 `#### Scenario:`; none = an assertion no test targets.
40
+ - **WHEN/THEN:** trigger + observable outcome (AND chains extra conditions); uppercase keywords; either half missing isn't falsifiable.
41
+ - **EARS (optional):** for state and error, the five standard clauses are also valid and recommended. Existing WHEN/THEN scenario lines stay valid; a spec may mix both.
42
+
43
+ | Kind | Form |
44
+ | --- | --- |
45
+ | Ubiquitous | The system SHALL \<behavior> |
46
+ | Event-driven | WHEN \<trigger> the system SHALL \<behavior> |
47
+ | State-driven | WHILE \<in state> the system SHALL \<behavior> |
48
+ | Unwanted | IF \<unwanted> THEN the system SHALL \<response> |
49
+ | Optional | WHERE \<feature on> the system SHALL \<behavior> |
50
+
51
+ ## Behavior first: WHAT, not HOW
52
+
53
+ A spec requirement describes observable behavior, not the implementation that delivers it
54
+ (the spec stays technology-agnostic: see [`spec-template.md`](../../../rite-spec/reference/spec-template.md)). "**THEN**
55
+ respond 401" is behavior; "**THEN** call `AuthGuard.reject()`" leaks the design and locks the
56
+ plan before `/rite-define` has chosen it. Name the input, the observable output, and the state
57
+ change, not the function, class, or library. Implementation belongs in `plan.md`, not the
58
+ requirement.
59
+
60
+ Acceptance criteria are **surface-anchored**: they observe the outermost surface the user or
61
+ system can see. If the feature is an API contract, the THEN names the response shape/status; if it
62
+ is a UI flow, the THEN names the visible state. Internal rows, helper calls, and emitted logs can
63
+ support proof, but they are not the criterion unless the spec's surface is explicitly internal.
64
+
65
+ ## How it composes (no new gate, no duplication)
66
+
67
+ - **`AC-###` ids nest inside scenarios.** Same ids as the flat form. Proof maps
68
+ observed evidence; spec review checks meaning. Native re-read checks shape only.
69
+ - **Prove/Review hooks.** Each scenario is one behavior: WHEN/THEN or EARS maps
70
+ to arrange/assert ([`testing.md`](testing.md)).
71
+ - **Checklists still apply.** Structure does not excuse a vague THEN.
72
+
73
+ ## Outcome metrics are not acceptance criteria
74
+
75
+ A **buildable** acceptance criterion names an observable behavior a slice delivers and a test
76
+ proves. An **outcome metric** names a post-launch business result. The distinction decides
77
+ what the coverage gate may check.
78
+
79
+ Tag only buildable criteria with an `AC-###` id. An outcome metric carries no id and lives under
80
+ a separate **`## Success metrics`** heading:
81
+
82
+ ```markdown
83
+ ## Acceptance criteria
84
+ - [ ] AC-001: export returns a CSV with a header row # buildable — a slice + a test
85
+
86
+ ## Success metrics # outcome — no AC id, not slice-mapped
87
+ - Support tickets about export drop by half within a quarter
88
+ ```
89
+
90
+ Load-bearing test: **can one slice make this true and one test show it?** If no, it is a
91
+ success metric, not an acceptance criterion. Native traceability reviews map only
92
+ buildable `AC-###` IDs.
93
+
94
+ ## Capability-impact declaration
95
+
96
+ Every new or materially revised feature spec contains exactly one concise standalone statement:
97
+
98
+ ```text
99
+ Capability impact: <affected capability or capabilities and the observable change>
100
+ ```
101
+
102
+ When no capability contract changes, use:
103
+
104
+ ```text
105
+ Capability impact: none — <specific justification>
106
+ ```
107
+
108
+ The statement scopes ledger inspection; it does not replace the capability suffix on a
109
+ delta heading. A vague list or an unjustified `none` blocks spec readiness.
110
+
111
+ ## Native grammar re-read checklist
112
+
113
+ At the spec readiness gate, the controlling root re-opens `spec.md` and checks
114
+ each item against the file's exact headings and text. **No parser or replacement script** is introduced.
115
+
116
+ - [ ] `## Acceptance criteria` exists and every buildable criterion has one
117
+ unique `AC-###` ID; success metrics have none.
118
+ - [ ] Every `### Requirement:` header is non-empty and unique.
119
+ - [ ] Every structured requirement contains a normative `SHALL` or `MUST`
120
+ statement and at least one `#### Scenario:`.
121
+ - [ ] Every scenario has an observable trigger/outcome (WHEN/THEN or EARS WHILE/IF), plus an `AC-###` criterion; it describes behavior rather than implementation.
122
+ - [ ] Delta headings use only ADDED, MODIFIED, or REMOVED. Each named capability
123
+ is contained under `.devrites/specs/`, and MODIFIED/REMOVED headers match the
124
+ current ledger exactly.
125
+ - [ ] Exactly one capability-impact declaration exists and agrees with the ledger
126
+ deltas, or gives a specific `none` justification.
127
+ - [ ] Re-read the entire requirements and acceptance sections once more after
128
+ corrections so duplicates and partial edits cannot hide between blocks.
129
+
130
+ Any miss blocks spec readiness. Correct the spec; never soften or skip the
131
+ checklist. A flat-only spec still checks the acceptance section and has no
132
+ Requirement/Scenario rows to inspect.
133
+
134
+ ## Delta form: when the capability ledger already holds this behavior
135
+
136
+ The Requirement / Scenario block is the unit the **capability ledger** stores: the living
137
+ `.devrites/specs/<capability>/spec.md` record of *what the system does now*, folded during
138
+ Polish before Review
139
+ ([ledger reference](../../../rite-polish/reference/ledger.md)). When a feature changes behavior a
140
+ ledger already describes, write its spec as **deltas against the ledger** instead of a flat
141
+ snapshot, so the change (not merely the end state) is explicit and the fold is unambiguous.
142
+
143
+ Group the structured `### Requirement:` blocks under three H2 sections, each tagged with the
144
+ capability it folds into. One feature spec MAY carry deltas across several capabilities:
145
+
146
+ ```markdown
147
+ ## ADDED Requirements — capability: theming
148
+ ### Requirement: Dark mode honors the system preference
149
+ The system SHALL default to the OS colour-scheme on first load.
150
+ #### Scenario: no stored preference
151
+ - [ ] AC-010: **WHEN** a first-time visitor loads the app **THEN** the theme matches the OS setting
152
+
153
+ ## MODIFIED Requirements — capability: settings-ui
154
+ ### Requirement: Settings exposes a theme control
155
+ <the full new version of the requirement — not just the diff>
156
+
157
+ ## REMOVED Requirements — capability: theming
158
+ ### Requirement: Theme is hard-coded to light
159
+ Removed — superseded by system-preference detection.
160
+ ```
161
+
162
+ The Polish fold (`/rite-polish`) previews and writes through the host
163
+ filesystem. **ADDED** appends, **MODIFIED** replaces the same-named requirement, and
164
+ **REMOVED** deletes it. Matching is by **header identity** (the rule
165
+ above: names are unique and a rename is a remove + add), so the section MUST use the exact ledger
166
+ header text for MODIFIED / REMOVED.
167
+
168
+ For **MODIFIED**, compare the complete current requirement block with the proposed full
169
+ replacement under the lossless rule in [`ledger.md`](../../../rite-polish/reference/ledger.md). An unexplained
170
+ omission blocks readiness; it is not cleanup.
171
+
172
+ - **The `— capability: <name>` suffix is the fold target.** Omit it and the fold defaults to the
173
+ feature slug: correct for a single-capability feature; name it explicitly when a feature spans
174
+ more than one, or when the capability differs from the slug.
175
+ - **Pick the kind against the current ledger, not from memory.** Read the affected
176
+ `.devrites/specs/<capability>/spec.md` directly. A real change marked ADDED yields two
177
+ competing requirements; new behavior marked MODIFIED has nothing to replace.
178
+ - **Greenfield stays flat.** A capability with no ledger entry is all-new: write plain
179
+ `### Requirement:` blocks with no delta H2; the first confirmed native ledger update seeds the capability as if
180
+ every block were ADDED. Never pay delta ceremony for behavior that has no prior record.
181
+
182
+ At the spec gate, apply the native grammar re-read checklist above to the
183
+ feature spec, then rehearse the fold against the current ledger before readiness:
184
+ each **MODIFIED** and **REMOVED** header must exist verbatim in the current
185
+ ledger, and each **ADDED** header must be absent from it. Any grammar or delta
186
+ mismatch blocks readiness — a delta that would fail the Polish fold is a spec
187
+ defect, not a polish-time discovery. **Failing case:** a MODIFIED block renaming
188
+ its requirement passes review, then the fold deletes nothing and appends a
189
+ duplicate after implementation has already shipped.
190
+
191
+
192
+ ## Unresolved-question markers (fail closed)
193
+
194
+ - `spec.md` may mark an unknown in place as `` `[NEEDS DECISION: q-YYYY-MM-DD-NNN]` `` beside the affected requirement/criterion; released workspaces use their recorded `Q-###` form. A free-text `` `[NEEDS CLARIFICATION: <question>]` `` placeholder is the drafting form from the spec template; it converts to the id-bound marker before readiness.
195
+ - The id must exist in `questions.md`, status open, with a `gate:` naming the resolving phase. Spec readiness treats any surviving marker as an open-question blocker (fail closed).
196
+ - Resolution removes the marker in the same edit that records the answer; markers pointing at resolved/dropped ids block too.
197
+ - Markers are forbidden in plan-stage artifacts and inside acceptance-criteria rows — unresolved criteria get reclassified or removed, not fenced.
@@ -0,0 +1,13 @@
1
+ # Test proof checklist
2
+
3
+ - New behavior has an asserting test, preferably written before implementation.
4
+ - The test was seen fail for the right reason.
5
+ - Verification commands and relevant output are recorded.
6
+ - Regression, edge, and error paths match the acceptance criteria.
7
+ - Applicable data, integration, topology, compatibility, concurrency, retry, interruption,
8
+ and time-zone risks have discriminating cases or a recorded dismissal.
9
+ - Mocks do not remove the risk being claimed; wiring proof follows real data to the promised surface.
10
+ - A claimed pre-existing/environment-only failure has a same-command baseline.
11
+ - Passing existing tests alone is not proof of the change.
12
+
13
+ Detailed standard: `testing.md`.
@@ -0,0 +1,212 @@
1
+ # Testing
2
+
3
+ Tests are evidence. They exist to prove behavior and to catch regressions, not to hit a
4
+ coverage number.
5
+
6
+ ## Shape: a pyramid
7
+ - **Many** fast, isolated unit tests at the base.
8
+ - **Some** integration tests for how components fit together.
9
+ - **Few** end-to-end tests for critical user journeys (they're slow and the most
10
+ flake-prone: reserve them for what matters).
11
+
12
+ Size by **resource cost**, not by folder. A **small** test runs in one process, no I/O: the
13
+ base of the pyramid, and the only size allowed to be many. A **medium** test touches the local
14
+ machine (filesystem, a container, `localhost`). A **large** test crosses the network or a real
15
+ external service: the flaky, slow tier E2E lives in. Push every behavior to the smallest size
16
+ that can still prove it; a behavior provable small but written large is a slow test you'll
17
+ learn to skip.
18
+
19
+ ## Completeness: every behavior, element, and flow has a test (at the right level)
20
+ "Tested" means *every* observable behavior, *every* interactive element (input field,
21
+ checkbox, radio, select, toggle, button, actionable link), and *every* user flow has at
22
+ least one **asserting** test, not that a coverage % is hit. Completeness counts behaviors
23
+ covered, not lines executed: 100% line coverage can still leave a button's click untested,
24
+ and a button with one asserting unit test is "covered" at far less than 100% lines. Chase the
25
+ behavior, not the number.
26
+
27
+ Poor test coverage or missing tests in a brownfield area is baseline risk, not permission to leave
28
+ the changed behavior unproven. Add the smallest surface-anchored regression test and separate
29
+ pre-existing failures with same-command evidence.
30
+
31
+ Acceptance and tests are **surface-anchored**: assert the outermost surface the intent names. If the feature promised an API response, assert the API response; a database row behind it is supporting evidence, not proof.
32
+
33
+ Put each test at the level that proves it cheapest and most reliably (the pyramid above):
34
+ - **Element / field behavior:** validation, required, format, min/max, toggle on→off, select
35
+ options load + change fires, button enabled/disabled, handler runs → a **unit / component**
36
+ test. The bulk of element coverage lives here.
37
+ - **Wiring across a few components:** form submit → store → re-render → an **integration** test.
38
+ - **A critical end-to-end journey:** login, checkout, a destructive / data-loss path → **one
39
+ E2E** test. E2E is slow + flake-prone; reserve it for journeys, **never one-per-field**.
40
+
41
+ An interactive element or a user flow with **zero asserting test is a defect**: surfaced as an
42
+ unproven gap at `/rite-prove` and a NO-GO at `/rite-seal`, the same standing as an unproven
43
+ acceptance criterion. Assert what the element *does*, not that the markup exists.
44
+
45
+ ## Assertion strength: a test that can't fail proves nothing
46
+ Completeness counts tests; strength makes them mean something. A test that passes for *any*
47
+ implementation is theatre, and it's the shape AI reaches for by default. Reject the weak forms:
48
+
49
+ ### Positive, discriminating proof
50
+
51
+ A behavioral requirement is proved only by observed positive, discriminating evidence that
52
+ would fail if the behavior were absent or wrong. Skipped, focused, filtered, or pending tests,
53
+ zero-test runs, assertion-free tests, tautologies, unexecuted commands, and success inferred
54
+ only from exit status cannot prove behavior.
55
+
56
+ Build, compile, typecheck, and lint prove only their corresponding static criterion, never
57
+ runtime behavior. Explicit shell assertions and golden/text comparisons remain valid when the
58
+ criterion genuinely concerns a textual or command-line artifact and the assertion
59
+ discriminates the required result.
60
+
61
+ - **Preserve producer failure.** `test-command | tail` may hide a failed producer. Require
62
+ upstream-failure semantics or separately check its status; truncated output is not a pass.
63
+ - **No tautologies.** Defined/non-null passes for almost anything; assert exact value, error,
64
+ state change, row, or event.
65
+ - **Don't assert the mock.** A test that stubs a dependency to return `X` then asserts `X` came
66
+ back tests the stub, not your code. Assert the real effect on real (or realistic) data.
67
+ - **Cover unhappy edges:** empty/missing input, omitted fields, boundaries, invalid state, and
68
+ long/weird input; assert the promised rejection/default.
69
+ - **Prove it can fail.** Critical or regression paths require the [safe perturbation contract](#safe-perturbation); use the project's mutation runner when present. Unrelated baseline failures, setup/fixture crashes, collection/import errors, or a skipped/filtered target are not target-attributable RED. **Failing case:** the suite was already red elsewhere and the new test never ran.
70
+ - **Don't mirror the implementation.** A test whose assertions restate the code under test
71
+ (same constant, same formula, same branch) stays green even when the logic is wrong. Assert
72
+ an **independently-derived** expected value: reasoned from the spec, not copied from the code.
73
+ - **Don't grep the source.** A test that reads a source file as text and asserts it
74
+ `contains("foo")` proves a string exists, not that the behavior works. It passes on dead code
75
+ and breaks on a harmless rename. **Execute** the code and assert its effect; reserve text
76
+ scanning for genuinely textual artifacts (generated output, a committed manifest, a golden snapshot).
77
+ - **Coverage says "ran"; mutation says "checked".** Line coverage proves a line executed, not
78
+ that a test would catch it breaking. Where the project has a mutation runner,
79
+ use its documented command; a surviving mutant is a behaviour no test checks.
80
+
81
+ ### Safe perturbation
82
+
83
+ For required mutation or critical-link probes, use a faithful isolated copy of the
84
+ current candidate, including its staged/unstaged content, never the shared proof/reviewer
85
+ tree or HEAD alone. Bind its starting content to the candidate; retain the original
86
+ candidate check before/after per [`candidate-integrity.md`](../candidate-integrity.md).
87
+ Only an exact path-bounded wright may hand-edit source; an existing mutation runner
88
+ runs under normal approved command authority. Isolation grants no live-service or
89
+ destructive authority. Input fault injection must likewise leave candidate sources intact.
90
+ Critical/regression mutation must break the relevant implementation; an input-only
91
+ probe cannot replace it. Critical-link checks may perturb the load-bearing input.
92
+
93
+ Record the perturbation, executed target assertion's attributable RED, restoration,
94
+ normal GREEN, and unchanged original candidate. A surviving break is an unproven gap.
95
+ Unavailable isolation, authority, or attributable evidence is `cannot_verify`, blocking
96
+ the required proof and Seal; never waive critical/regression obligations. **Failing
97
+ case:** mutating a clean HEAD copy proves an older implementation while dirty candidate
98
+ changes remain untested.
99
+
100
+ ## Never weaken a failing test (test integrity)
101
+ A failing test is a signal, not an obstacle. Never delete it, skip it (`it.skip`, `xit`,
102
+ `@pytest.mark.skip`, `t.Skip`, `#[ignore]`), mark it `xfail`, narrow the run with `.only`, or
103
+ loosen its assertions to turn the suite green. A red test means one of two things: the code is
104
+ wrong (fix the code) or the test is wrong (surface it as a blocking question and get the change
105
+ agreed): never quietly make the red go away. A test weakened to clear a gate is a **Critical**
106
+ finding. The root's diff review and dedicated test analysis compare the
107
+ candidate with its base and reject deleted, skipped, focused, or weakened tests.
108
+
109
+ ## The verification gap: green, but the test doesn't prove the change
110
+ Diff review catches reaching green by *weakening* a test. This catches the quieter failure: a
111
+ test that was never touched, is fully green, and still doesn't exercise the behavior that changed.
112
+ A passing suite is not proof the *change* is proven: the suite could pass identically with the
113
+ change reverted. Run this trace for each behavioral change in the diff:
114
+
115
+ 1. **Screen for behavioral change.** What in this diff changes an observable output, not just its
116
+ shape? Treat a dependency bump, a build/config edit, or a data change as behavioral too: the
117
+ load-bearing change often isn't the line that looks important.
118
+ 2. **Name what changed.** State the old behavior and the new one in one sentence each.
119
+ 3. **Trace to the consumer.** Find where the changed code is called from.
120
+ 4. **Inspect the consumer's test.** Does an *asserting*, surface-anchored test drive that consumer through the
121
+ **new** behavior, not merely execute the path, and not assert the old expectation still?
122
+ 5. **Confirm the gap is real.** A finding is: `<change at file:line>` has no test that would go red
123
+ if it regressed: cite the test that *should* cover it and show what it misses. No general
124
+ advice; a gap you can't point at is not a finding (the verification gate applies).
125
+
126
+ A changed behavior with no test that would fail on its regression is an **unproven gap**: the same
127
+ standing as an untested element or an unproven acceptance criterion. A source
128
+ change with no test-file delta is a pointer to run this trace, never a verdict
129
+ on its own.
130
+
131
+ ## DAMP over DRY in tests
132
+ Test code optimizes for a different reader than production code: someone staring at a failure who
133
+ needs the whole scenario in front of them. A test should read like a spec: arrange, act, assert,
134
+ visible in one screen. Prefer a little repetition over a clever shared helper that hides what the
135
+ test exercises; **D**escriptive **A**nd **M**eaningful **P**hrases beat **D**on't **R**epeat **Y**ourself
136
+ here. (Deliberately trades against production reuse-first: a fixture that makes the reader
137
+ scroll away to understand the case costs more than the duplication saved.)
138
+
139
+ ## Test doubles: reach for the real thing first
140
+ Prefer, in order: **real > fake > stub > mock**. Use the real collaborator when it's fast and
141
+ deterministic; a **fake** (an in-memory implementation that honors the contract) when it isn't; a
142
+ **stub** for a canned return; a **mock** (asserting *how* it was called) only at a true boundary
143
+ you own. Over-mocking is the failure mode: a suite stitched from mocks passes while production
144
+ breaks, because it tested the stubs, not the code (see "Don't assert the mock" above).
145
+
146
+ | Double it | Leave it real |
147
+ |---|---|
148
+ | The database, network, filesystem, clock, randomness | Pure functions and business logic |
149
+ | A third-party API or paid/rate-limited service | Your own internal utilities and transforms |
150
+ | Anything non-deterministic or slow | Validation and mapping under test |
151
+
152
+ ## Prove the risk the design actually introduces
153
+
154
+ Select cases from the accepted spec and applicable standards, not a generic count:
155
+
156
+ - Durable data changes apply [`data-integrity.md`](data-integrity.md): invalid write,
157
+ duplicate/retry, concurrent update, interrupted migration/backfill, old/new version
158
+ coexistence, tenant denial, and rollback/forward recovery as relevant.
159
+ - API/webhook/queue/cache work applies
160
+ [`integration-reliability.md`](integration-reliability.md): invalid/partial response,
161
+ auth failure, timeout/unknown outcome, rate limit, outage, duplicate, out-of-order,
162
+ poison/backlog, and stale-cache/partition behavior as relevant.
163
+ - Multi-root/service work applies [`repository-topology.md`](repository-topology.md):
164
+ provider and consumer both consume the canonical contract and run from their proven
165
+ roots. One member's green suite cannot prove another member.
166
+ - Compatibility/delivery work drives both feature-flag states and old/new caller or
167
+ schema combinations. Migration-before-code and code-before-migration order each need a
168
+ declared expected result.
169
+
170
+ Dismiss an irrelevant case with a reason; silently omitting an applicable case is a gap.
171
+
172
+ ## False-positive and coincidental-reliance checks
173
+
174
+ - **Trace cause to effect.** A test proves wiring only when real input reaches the new
175
+ implementation and its distinct output reaches the promised surface. Registration,
176
+ file existence, a spy call, or a fixture containing the expected text can pass while
177
+ production still uses the old path.
178
+ - **Change the load-bearing input or implementation.** For a critical link, perturb the
179
+ input or break the link and observe the surface assertion fail. If another path happens
180
+ to produce the same output, the test relies on coincidence and needs a discriminating
181
+ fixture/assertion.
182
+ - **Do not mock away the named risk.** A timeout test whose mock cannot time out, a
183
+ transaction test without transaction boundaries, or a tenant test with one tenant is
184
+ mislabeled coverage. Use a contract-capable fake, local integration surface, sandbox,
185
+ or authorized real boundary appropriate to the risk.
186
+ - **Baseline environmental claims.** "Pre-existing", "only fails in CI", or "works in one
187
+ region/time zone" requires a before-candidate run or other dated baseline on the same
188
+ command and environment. Without it, classify the result as unresolved.
189
+
190
+ ## Determinism: no flaky tests
191
+ - A flaky test is a broken test. Isolate and fix it immediately; don't paper over it with
192
+ retries or `sleep`. **Failing case:** a known-flaky test is left with retries so the
193
+ suite is paper-green at Prove/Seal → NO-GO.
194
+ - Mock/stub external services so tests are predictable and fast. Use stable selectors in
195
+ UI tests, not brittle positional ones.
196
+ - No hidden shared state or order-dependence between tests.
197
+ - **Seam the clock; never read it raw in a tested path.** Route wall-clock reads through one
198
+ injectable seam (an env override like `DEVRITES_NOW`, or an injected clock) so time/date-derived
199
+ output is pinned in tests. A raw `time.Now()` feeding output makes a golden snapshot rot at the
200
+ next day boundary: green today, red tomorrow, for no code change. The test must control time so
201
+ its result depends on behavior, not when the suite runs.
202
+ - Pin the time zone and locale independently of the instant. Cover offset/date rollover,
203
+ daylight-saving gap/fold where the product supports it, and serialization round trips;
204
+ a UTC-only unit test does not prove local-calendar behavior.
205
+ - **No elapsed-time assertions.** `assert elapsed < 200ms` / `took` under a threshold tests the
206
+ CI runner's load, not your code: flaky by construction. Assert the *result*, not the duration;
207
+ for ordering or concurrency use a deterministic signal (a fake clock, a channel), never a `sleep`.
208
+
209
+ ## Use the project's tooling
210
+ Run the project's existing test commands and framework. Don't introduce a new test runner
211
+ to prove one change. If a project has no tests, propose the minimal setup: ask before
212
+ adding a framework.