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,104 @@
1
+ ---
2
+ name: rite-polish
3
+ description: Polish the active feature's code and any touched UI before review. Use for finish or normalization requests; not for repository-wide refactors.
4
+ argument-hint: "[target | bolder | quieter | distill | harden | normalize-only]"
5
+ user-invocable: true
6
+ ---
7
+
8
+ # /rite-polish: finish before review
9
+
10
+ Polish code for every feature. When the feature touches UI, normalize and polish the
11
+ UI as well. Complete this self-review before `/rite-review`. The code and UI phases
12
+ live in [`reference/code.md`](reference/code.md)
13
+ ([`anti-ai-slop.md`](reference/anti-ai-slop.md),
14
+ [`backend-polish.md`](reference/backend-polish.md))
15
+ and [`reference/ui.md`](reference/ui.md)
16
+ ([`browser-polish-evidence.md`](reference/browser-polish-evidence.md),
17
+ [`design-system-discovery.md`](reference/design-system-discovery.md),
18
+ [`harden-checklist.md`](reference/harden-checklist.md));
19
+ read only the phase in scope.
20
+
21
+ ## Operating rules
22
+
23
+ - **Functionality complete first.** Polish runs after `/rite-prove` (full
24
+ feature proven).
25
+ - Follow the shared
26
+ [`candidate-integrity.md`](../devrites-lib/reference/candidate-integrity.md).
27
+ Polish owns every candidate-affecting correction and durable rollup before Review.
28
+ - Feature scope only.
29
+ - For UI, **normalize before polishing**. Do not add decoration on top of drift.
30
+ - **Bounded polish passes.** Verification runs in bounded passes, not a loop: after the
31
+ Phase 4 assessment, at most one more correction round for **new** findings, then stop —
32
+ residual subjective preference is recorded in `polish-report.md`, not re-polished.
33
+ **Failing case:** the same surface reopened a third time with no new failing evidence.
34
+ - **Root selects; wright edits.** The controlling chat assesses and reconciles, but every
35
+ accepted source/test correction is dispatched to the sole writer,
36
+ `devrites-slice-wright`, through
37
+ [`agents.md`](../devrites-lib/reference/standards/agents.md). Never edit source inline or
38
+ run two correction writers concurrently.
39
+
40
+ ## Polish axes (C3 — completeness vs craft)
41
+
42
+ Score **separately**; conflating them hides gaps:
43
+
44
+ | Axis | Question | Failing case |
45
+ | --- | --- | --- |
46
+ | **ux_coverage** | Did we compare every stated alternative/state? | Omitted empty/error state treated as agreement |
47
+ | **completeness** | Are required states, copy, and flows present? | Hero-only layout with no loading/error |
48
+ | **craft / anti-slop** | Does the UI avoid generic template patterns? | Inter + purple gradient hero with no product-specific hierarchy |
49
+ | **distinction** | Is there one intentional signature detail? | Polished but indistinguishable from a template |
50
+
51
+ Incomplete comparison is **not** agreement. Record axis deltas in `polish-report.md`.
52
+
53
+ ## Orchestration
54
+
55
+ 0. **Read** `.pi/skills/devrites-lib/reference/standards/core.md` first (the always-on operating rules). The
56
+ per-phase rule files (`coding-style.md`, `error-handling.md`, …) load on demand
57
+ from `reference/code.md` / `reference/ui.md` when their phase runs; for UI scope also read
58
+ `.pi/skills/devrites-lib/reference/standards/browser-proof-checklist.md`.
59
+ Then read the explicit or active workspace's `state.md` directly.
60
+ 1. **Read** `state.md`, `touched-files.md`, the current candidate digest, and the
61
+ `git diff` for the active workspace (or `$ARGUMENTS` if a target was given).
62
+ 2. **Detect UI scope:** UI is touched if the diff or `touched-files.md`
63
+ contains any of: `.tsx`, `.jsx`, `.vue`, `.svelte`, `.html`, `.css`,
64
+ `.scss`, `.sass`, `.less`, `.styl`, component dirs (`components/`,
65
+ `pages/`, `routes/`, `app/`, `views/`, `screens/`), Storybook stories,
66
+ or design-token files. When in doubt, look for visual changes that need
67
+ verification.
68
+ 3. **Always** read [`reference/code.md`](reference/code.md) and assess **Phase 1
69
+ (code polish)**; if backend was touched, assess **Phase 2 (backend polish)** from
70
+ the same file. Reconcile the findings, then send accepted corrections as one bounded
71
+ wright contract.
72
+ 4. **If UI scope detected** read [`reference/ui.md`](reference/ui.md), and read
73
+ `design-brief.md` if present so the polish follows the direction and states established
74
+ by `devrites-ux-shape` and refined by `devrites-frontend-craft`. **Read the
75
+ `## Visual Verdict` table in `browser-evidence.md` if present:
76
+ its `FAIL` and `PARTIAL` rows are the normalize/quality-bar worklist**: identify the root
77
+ cause of each (a missing state, an off-token CTA, or an anti-slop hit) rather than
78
+ hiding it with decoration. Assess **Phase 3 (normalize)** → **Phase 4 (UI polish)**,
79
+ then send accepted UI
80
+ corrections to the wright (which invokes the relevant craft skill). Honor argument modes:
81
+ - `bolder | quieter | distill | harden`: passed to Phase 4 as the
82
+ emphasis dial.
83
+ - `normalize-only`: assess Phase 3 and stop (no Phase 4).
84
+ 5. **Finish durable rollups before Review.** Apply the capability
85
+ [`ledger`](reference/ledger.md) when requirements changed, the optional UI
86
+ [`design memory`](reference/design-memory.md), and durable
87
+ [`ADR promotion`](reference/adr-promotion.md). Add every changed project path
88
+ to the candidate manifest; none of these writes waits for Ship.
89
+ 6. **Re-prove and close.** After all accepted code/UI corrections and rollups,
90
+ run `devrites-engine check candidate <slug>`. Any digest change requires
91
+ affected real re-proof using the approved commands, fresh proof-runner
92
+ validation, refreshed evidence/browser bindings, and an updated candidate
93
+ manifest. Record a **`Re-verification:`** line in `polish-report.md`. Close
94
+ the candidate for Review only after these checks are green.
95
+ 7. **Aggregate output:** each phase appends to the single `polish-report.md`.
96
+
97
+ ## Refinement modes
98
+
99
+ Pass the requested UI direction to Phase 4. Modes do not bypass normalization or the
100
+ quality bar; they apply after the system is aligned. See `reference/ui.md`.
101
+
102
+ > **Mid-flight discipline.** When tempted to polish UI without normalize, cite
103
+ > clean lint as proof of quality, skip Phase 2 on a backend diff, or delete a
104
+ > Chesterton's Fence: see [anti-patterns](reference/anti-patterns.md).
@@ -0,0 +1,11 @@
1
+ # ADR promotion
2
+
3
+ During Polish, promote a `decisions.md` architecture/interface choice only when it is
4
+ hard to reverse, surprising without context, and a real trade-off. Otherwise leave it in
5
+ the archived workspace. If the project has no `docs/adr/`, ask before creating that
6
+ convention.
7
+
8
+ Write the next append-only `docs/adr/ADR-NNN.md` with Context, Decision, Status
9
+ `accepted`, and Consequences. Never rewrite an accepted ADR; supersede it with a linked
10
+ new ADR. Add it to the candidate manifest, run affected real re-proof, and refresh evidence
11
+ and browser bindings before Review. Ship performs no ADR promotion.
@@ -0,0 +1,187 @@
1
+ # Anti-AI-slop
2
+
3
+ Tells of generic LLM-generated work — in **UI** and in **code**. Applies at two stages:
4
+
5
+ - **At build time** (preventive) — `/rite-build` checks against these as it writes; the
6
+ cheap moment to avoid them.
7
+ - **At polish time** (catch) — `/rite-polish` Phase 1 (Code) + Phase 2 (Backend) + Phase 4
8
+ (UI) scrub anything that slipped through.
9
+
10
+ Avoid these unless the project's existing system explicitly uses them. When in doubt,
11
+ match the neighbors.
12
+
13
+ ## UI anti-slop (banned defaults)
14
+ - Default **purple/blue gradients** as the brand look. Special case: any
15
+ hero hex in the `#6366f1 → #a855f7 → #ec4899` family applied as a default.
16
+ - **Gradient text** (`background-clip: text`) used decoratively on headings.
17
+ - **Glassmorphism** (`backdrop-filter: blur(...)` on translucent panels) as
18
+ a default surface.
19
+ - **Side-stripe colored borders** on cards/sections — the
20
+ "tiny-bar-of-meaningful-accent-color-on-the-left" pattern. Distinctive
21
+ templating tell.
22
+ - **Pure `#000` / `#fff`** as raw text or background — too clinical; use
23
+ near-black/near-white tokens (`oklch(0.18 0 0)` / `oklch(0.98 0 0)` or
24
+ the project's surface tokens).
25
+ - **All-CAPS body text** for paragraphs/labels. Reserve uppercase for short
26
+ micro-copy (badges, eyebrows); never for sentences.
27
+ - **Em-dashes in UI copy — zero.** Soft limits ("use sparingly") get ignored; the rule
28
+ is binary and greppable: no `—` in any visible string. Use a comma, period, or colon.
29
+ - **Cards inside cards** — nested bordered/elevated containers.
30
+ - **Identical card grids** for everything, regardless of content.
31
+ - A **generic rounded-square icon tile** above every heading/section.
32
+ - **Gray text on colored backgrounds** (fails contrast, looks templated).
33
+ - The **hero-metric cliché** — three big numbers in a row with no real meaning.
34
+ - **Decorative bounce / elastic easing** on everything; motion without purpose.
35
+ - **Reflex fonts** picked because they're the default in a tutorial:
36
+ - Inter for every product when the project has its own choice.
37
+ - **DM Sans**, **Plus Jakarta Sans**, **Fraunces**, **Newsreader** when
38
+ they're not the project's actual type system.
39
+ Match the project; don't reach for the "tasteful default" of 2024.
40
+ - **Modal-first thinking** — reaching for a modal as the answer to every interaction.
41
+ - **Ghost-card** — a `1px` border *and* a soft (blur ≥16px) shadow on the same element.
42
+ Borders separate; shadows lift — pick one
43
+ (`devrites-frontend-craft/reference/quality-standards.md` — Materiality).
44
+ - **Balloon radius** — `border-radius` above ~16px on cards, inputs, panels. Cards top
45
+ out around 12–16px; full pills are for tags and buttons only.
46
+ - **Uppercase tracked eyebrow above every section** — one named kicker is voice; one per
47
+ section is template grammar (countable cap below).
48
+ - **Numbered-section scaffolding** (`01 / 02 / 03`) when the sections aren't a sequence.
49
+ - **Fake UI-in-a-div** — a "product screenshot" assembled from nested divs, or hand-drawn/
50
+ sketchy SVG scenery. Ship a real capture/asset or nothing (quality-standards — Materiality).
51
+ - **Hero prop badges** — version labels (`V0.6`, `BETA`) and decorative pulsing status
52
+ dots as set dressing.
53
+ - **Unstyled UA chrome** — shipping the browser's default blue selection, caret,
54
+ scrollbar, or focus outline as the look (quality-standards § Browser chrome).
55
+ - **Invented metrics** — precise-looking numbers with no source (`+247% faster`,
56
+ `99.99% uptime`). **Off-token color** — a hex used inline that the token set doesn't
57
+ define. Both are realism failures, not styling choices.
58
+
59
+ ### Required remediations (fix the hit, don't just flag it)
60
+ A slop finding names its remediation from this table; a ban without a stated fix is
61
+ an incomplete finding.
62
+
63
+ | Signature | Required remediation |
64
+ | --- | --- |
65
+ | Default purple/blue gradient; gradient text; glassmorphism default | Re-derive from the scene sentence and colour commitment, then re-run both category-reflex tests |
66
+ | Invented metric | Replace with the state lattice's missing-data placeholder (quality-standards § Focus & states) plus a "metric to confirm" question, or delete the proof slot |
67
+ | Off-token color | Lift into the token set as a named color; replace every inline use |
68
+ | Wrapping CTA / nav overflow | Shorter label, `white-space: nowrap`, or a collapsed nav — never a shrunken tap target |
69
+ | Horizontal scroll in 320–1920 | `minmax(0, 1fr)` on content tracks + `overflow-x: clip` on `html`/`body` (quality-standards § Responsive) |
70
+ | Fake UI-in-a-div screenshot | Ship a real capture/asset or remove the block |
71
+ | Sticky sub-nav hidden by a banner | Offset by the banner's token height; split z-index roles instead of one raised value |
72
+ | Unstyled UA selection / focus ring / caret / scrollbar | Theme from tokens per quality-standards § Browser chrome, or decline in `design-brief.md` |
73
+
74
+ ### Copy & data realism
75
+ Placeholder content is a tell even when the layout is clean: fake-perfect numbers
76
+ (`99.99%`, `10,000+` — real data is ragged), placeholder people/brands ("John Doe",
77
+ "Acme"), filler verbs (Elevate / Seamless / Unleash). Re-read every visible string before
78
+ shipping; AI-cute copy is worse than boring copy.
79
+
80
+ ### Category-reflex check — run at two altitudes
81
+
82
+ Most generic-AI design fails one of these two reflex tests. Run both — the
83
+ second one catches what the first one misses.
84
+
85
+ - **First-order:** if someone could guess the theme + palette *from the
86
+ category alone* — "observability → dark blue", "healthcare → white +
87
+ teal", "fintech → navy + gold", "AI tool → black with a violet accent",
88
+ "crypto → neon on black" — the styling is on the first training-data
89
+ reflex. Rework the scene sentence
90
+ (`devrites-frontend-craft/reference/design-references.md`) and the
91
+ colour-commitment strategy
92
+ (`devrites-frontend-craft/reference/quality-standards.md`) until the
93
+ answer isn't obvious from the domain.
94
+ - **Second-order:** if a stranger looked at the surface with *no copy
95
+ visible* and confidently said "this is a CRM / fitness tracker / fintech
96
+ / AI workflow tool", the styling is still on a category template — just
97
+ one tier deeper. The first reflex was avoided, the second wasn't.
98
+ Re-shape until the surface doesn't telegraph its category from looks
99
+ alone.
100
+
101
+ Both pass = the surface looks like *this product*, not "an app in this category".
102
+
103
+ ### Mechanical pre-flight (countable — run, don't vibe)
104
+ Each is pass/fail by counting or grep, not judgment:
105
+ - **Em-dashes** in visible UI strings: exactly **0**.
106
+ - **Eyebrows** (uppercase-tracked kickers): ≤ `ceil(sections / 3)`.
107
+ - **Layout families** (hero, image+text split, card grid, bento, table…): no family more
108
+ than twice per page; never 3 consecutive image+text zigzags.
109
+ - **Icons**: 0 emoji-as-icon; exactly one icon set imported.
110
+ - **State presence in code**: default+hover+focus-visible+active+disabled for every interactive element; loading/error/empty where data delays or fails — an unreachable state's screenshot proves nothing.
111
+ - **Form inputs**: no border-width shifts between states; focus ring from outline/ring (not border swap); consistent control height; reserved helper slot; disabled beyond opacity alone.
112
+
113
+ ## Code anti-slop (UI **and** backend)
114
+ - **Over-defensive checks** — `if (x && x.length > 0)` repeated, layered null guards,
115
+ belt-and-braces nullability the surrounding code already proves. Signals lack of
116
+ confidence in the flow.
117
+ - **Blanket `catch` / "robust" error handling** that swallows errors or wraps them in
118
+ generic "Something went wrong." Hides bugs. Catch narrow; rethrow with context; fail
119
+ closed on auth/permission/transaction.
120
+ - **Useless wrapper functions** — `function getUser(id){ return User.find(id); }` adds a
121
+ hop with no value. Inline or remove.
122
+ - **Over-engineered abstractions** for trivial problems — a factory + interface + plugin
123
+ registry for a 10-line function. **Don't add abstraction before two real callers**
124
+ (see `coding-style.md`, `patterns.md`).
125
+ - **Convention-blind** code — ignores the repo's naming, file layout, error patterns,
126
+ validation style. "Generic good code" beats the project's idiom; reuse first (see
127
+ `coding-style.md`).
128
+ - **Going beyond the spec** — features/options/configs/flags the spec didn't ask for.
129
+ Implement exactly what was specified; flag extras as follow-ups.
130
+ - **Comment noise — the most common code tell.** Default to **zero** comments; the code and
131
+ the names carry the meaning. A comment earns its place only by answering *why* in one
132
+ sentence (intent, a trade-off, a non-obvious constraint, a "here be dragons" warning). Cut
133
+ every comment that restates the code:
134
+ - *What-comments* — `// increment i by 1`, `// set the user name`, `// return the result`.
135
+ - *Tutorial comments* — `// loop through the array` over a `.forEach`; `// check if null`.
136
+ - *Sycophant / filler* — `// helper function`, `// this is important`, `// magic happens here`.
137
+ - *Ownerless TODOs* — `// TODO: improve this later` with no issue/owner.
138
+ - *Meta / edit-process comments* — the agent narrating its own edit: `// Now I'll add error
139
+ handling`, `// Updated to handle the edge case`, `// As requested`, `// Step 1: … Step 2:`.
140
+ The reader doesn't care how the diff was produced.
141
+ - *Hedging / apologetic / overconfident comments* — `// should work`, `// hopefully handles
142
+ this`, `// I think`, `// hacky`, `// sorry`, or `// obviously` / `// just` / `// trivial`.
143
+ They admit the code is unverified (or paper over it). Verify the code; delete the doubt.
144
+ Density smell: more than roughly **one comment per ~10 lines of straightforward code** means
145
+ you are narrating, not explaining. Rename the thing or delete the comment.
146
+ - **Names must match the contract.** A name is a promise about what the symbol does — keep it
147
+ honest. A `validateUser()` that actually checks payment status, an `isReady` that mutates
148
+ state, a `getUser()` that also writes a log: the name lies. Models pick names that *sound*
149
+ plausible for the category; verify the name says what the code does.
150
+ - **Generic AI naming** — `process_data`, `handle_thing`, `do_it`, `result`, `data`,
151
+ `temp`, `manager`, `helper`, `util2`. Name for *intent*, in the repo's casing and idiom —
152
+ not for the action's category.
153
+ - **Premature config** — feature flags / config knobs / extension points with no current
154
+ user.
155
+ - **Dead leftovers** — TODOs without an owner/issue, commented-out code, unused imports,
156
+ `console.log`s, debug prints.
157
+ - **Hallucinated imports & APIs** — an import of a package or module the project doesn't
158
+ declare (absent from the manifest/lockfile) or that doesn't exist, and invented methods or
159
+ parameters on a real library. Unused imports are dead code; *non-existent* ones are the model
160
+ inventing dependencies. Verify every import resolves and every unfamiliar API exists at the
161
+ source (`devrites-source-driven`) — never invent one.
162
+ - **Placeholder bodies posing as complete** — a function that looks implemented but only does
163
+ `pass` / `...` / `return None` / `throw NotImplementedError` / returns a constant. It promises
164
+ functionality that isn't there. A genuine `@abstractmethod` / interface / Protocol stub is
165
+ fine — the slop is the stub pretending to be the real implementation.
166
+ - **Fake or inflated docstrings** — a generic "This function does X" / "Handles the logic" that
167
+ restates the signature, or a 10-line docstring over a 2-line body. A real public-API docstring
168
+ earns its place; the slop is the one that inflates or says nothing. Follow the project's doc
169
+ convention either way.
170
+ - **Oversized units (smell, not a hard gate)** — a function past ~50 logical lines, cyclomatic
171
+ complexity >10, more than ~4 parameters, or nesting ≥4 deep is a god-function smell. Split it
172
+ or flatten with guard clauses; judge in context, don't game the metric.
173
+ - **Unexplained magic constants** — a bare literal, a hardcoded URL/endpoint, or an embedded
174
+ account/provider/test ID inline with no name or source. Give it a name (a const) or a home
175
+ (config/env). The mirror image of premature config, and just as much a tell.
176
+ - **Copy-paste duplication** — a near-identical block pasted and tweaked instead of reused.
177
+ Reuse → extend → build new (`coding-style.md`, `patterns.md`); duplication beats the *wrong*
178
+ abstraction, but pasted clones are slop, not a deliberate AHA call.
179
+
180
+ ## Why banned, what instead
181
+ They signal model-generated rather than team-designed work: they ignore register and
182
+ idiom, add noise, hide bugs (defensive catches), bloat diffs, and often fail a11y or
183
+ correctness review. Instead: project tokens/components, validate at trust boundaries,
184
+ catch narrow and rethrow, one clear name per concept, reuse first (`coding-style.md`),
185
+ implement exactly the spec. If the project intentionally uses one of these, follow the
186
+ project — consistency beats the rule. A check or abstraction you can't justify in one
187
+ sentence is slop: delete it or ask.
@@ -0,0 +1,30 @@
1
+ # rite-polish: anti-patterns
2
+
3
+ Load this when standing a non-trivial polish decision, or when tempted to
4
+ skip normalize, polish without Chesterton's Fence, or cite clean lint/build
5
+ as proof of quality.
6
+
7
+ Pack-wide rationalizations + red flags (incl. lint-pass-as-quality): see
8
+ [standards/anti-patterns.md](../../devrites-lib/reference/standards/anti-patterns.md).
9
+
10
+ ## Phase-specific rationalizations
11
+
12
+ | Excuse | Rebuttal |
13
+ |---|---|
14
+ | "Tests pass; the feature is done." | Tests don't measure ship-quality, design drift, anti-slop, or backend polish. |
15
+ | "UI looks fine to me." | Must align to the design system + meet CWV/WCAG 2.2, not match a personal taste. |
16
+ | "Code is simple enough; no need to audit." | Measure first. If there's no hotspot, that's fine, but record "no hotspots found", don't skip silently. |
17
+ | "It's a small UI change; polish without normalize is fine." | **NO**: decoration on drift is banned. Phase 3 runs before Phase 4, always. |
18
+ | "Backend looks OK; skip Phase 2." | If the diff touched BE, Phase 2 runs: error responses, logging hygiene, queries, anti-slop. |
19
+ | "Fewer lines is simpler, so this is done." | The bar is the comprehension test, not line count: would a new reader understand it *faster* than the original? A cryptic one-liner fails it. Fewer-but-slower is churn: revert it. |
20
+
21
+ ## Red Flags
22
+
23
+ - About to polish UI (Phase 4) without running normalize (Phase 3) first.
24
+ - No browser evidence saved for a UI polish.
25
+ - Code polish ran without naming a single technique (guard clauses, Extract Method, ...).
26
+ - Backend was touched but `polish-report.md` shows no Phase 2 section.
27
+ - A "simplification" that changes observable behavior. That's not behavior-preserving.
28
+ - Reading a Chesterton's Fence as "looks dead" and deleting without explaining what it guards.
29
+ - Simplifying, reflowing, or "tidying" a block marked `devrites:keep` / `simplify-ignore`: the marker is an explicit fence; leave it in place.
30
+ - Hand-editing a >500-line simplification that a codemod / AST transform should have applied uniformly.
@@ -0,0 +1,80 @@
1
+ # Backend polish (when backend touched)
2
+
3
+ Runs as Phase 2 of `/rite-polish` when the feature touches server-side code: handlers /
4
+ controllers / services / routes / models / migrations / queries / jobs / workers / auth /
5
+ schemas. Polishes the **server side** to ship-quality before review, the way UI normalize
6
+ + polish does for the client side.
7
+
8
+ ## Scope detection (BE is in scope if any of these are touched)
9
+ - API/route handlers (REST/GraphQL/gRPC); controllers/services/middleware.
10
+ - DB layer: models, queries, migrations, schemas, ORM calls.
11
+ - Auth/session/permission code; trust-boundary checks.
12
+ - Background jobs, workers, schedulers, queue handlers.
13
+ - Server-side files in the project's language (`.rb`/`.py`/`.go`/`.rs`/`.java`/`.cs`/
14
+ `.php`/`.ts`-server etc.) outside the UI layer.
15
+
16
+ ## Polish checklist
17
+
18
+ ### Error handling (consistent + meaningful)
19
+ - [ ] **Consistent error response shape** across endpoints (e.g. an RFC 7807 problem
20
+ document or the project's existing convention). One shape, not three.
21
+ - [ ] **Correct HTTP / protocol status codes** (4xx for client errors, 5xx for server
22
+ errors; not 200 with `{ error: ... }`).
23
+ - [ ] **Custom error classes** (or equivalent) so callers can distinguish error kinds.
24
+ - [ ] **Fail closed** on auth/permission/transaction errors: deny + roll back; never
25
+ default to allow or partial commit (`error-handling.md`, `security.md`).
26
+ - [ ] **Narrow `catch`**: no blanket `catch (e) {}` swallows. If you catch, recover or
27
+ rethrow with context.
28
+
29
+ ### Logging hygiene
30
+ - [ ] **Structured logs** (key/value or JSON) with **context**: request id, user/actor
31
+ id, operation, duration.
32
+ - [ ] Log the **events that matter**: failures, access violations, validation rejections,
33
+ retries, auth events.
34
+ - [ ] **Never log** secrets, tokens, full credentials, PII, full request bodies for
35
+ sensitive endpoints. Mask or omit.
36
+ - [ ] No `console.log` / debug prints left in. No noisy "got here" lines.
37
+
38
+ ### Data & queries
39
+ - [ ] **No N+1**: fetch in batches / use joins or includes.
40
+ - [ ] **No unbounded result sets**: pagination/limits where data can grow.
41
+ - [ ] **Parameterized queries** only; never string-built SQL/shell/HTML.
42
+ - [ ] **Indexes** exist for new query patterns (or recorded as a follow-up if the project
43
+ adds them by migration).
44
+ - [ ] **Transaction boundaries** are right: one logical write = one transaction; rollback
45
+ on error; no partial commits.
46
+ - [ ] Don't return more fields than the caller needs.
47
+
48
+ ### API contract
49
+ - [ ] Response shape matches the contract the spec set (and what the UI / consumers
50
+ expect: match against `references/` if any).
51
+ - [ ] **Idempotency** where applicable (PUT/DELETE; retry-safe POSTs with idempotency
52
+ keys).
53
+ - [ ] **Pagination, sorting, filtering** consistent with neighboring endpoints.
54
+ - [ ] **Validation at the boundary**: type/length/format/range on untrusted input;
55
+ reject what doesn't match (see `security.md` three-tier).
56
+
57
+ ### Performance (measure first)
58
+ - [ ] Hot-path work measured; obvious wins (cache, batch, hoist) applied; perf claims
59
+ cite a number (`devrites-audit perf`).
60
+ - [ ] No accidental quadratic loops over growing collections.
61
+
62
+ ### Cleanup
63
+ - [ ] **Dead routes / unused endpoints** removed if this feature created them and they're
64
+ unused.
65
+ - [ ] Naming + comments in touched server code: clear, intent-revealing, no fake-helpful
66
+ "// gets the user" lines.
67
+ - [ ] No leftover `TODO`s without an owner/issue.
68
+ - [ ] **Migrations** are reversible where reasonable; destructive ones have rollback notes.
69
+
70
+ ### Anti-slop (code patterns: see `anti-ai-slop.md`)
71
+ - [ ] No over-defensive null/length checks layered redundantly.
72
+ - [ ] No useless wrapper functions ("`function getUser(id) { return User.find(id); }`").
73
+ - [ ] No generic AI naming (`process_data`, `handle_thing`, `do_it`).
74
+ - [ ] No "robust" code that catches everything and hides bugs.
75
+ - [ ] Didn't go **beyond the spec**: implemented what the spec asked, no extras.
76
+
77
+ ## Rules
78
+ - Feature scope only. Don't refactor unrelated server code.
79
+ - Re-prove after changes: targeted tests + a real request/response observation.
80
+ - A polish change that breaks a test isn't behavior-preserving: revert and reconsider.
@@ -0,0 +1,33 @@
1
+ # Browser polish evidence
2
+
3
+ Polish claims need visual proof. When a browser can run, capture evidence via the proof
4
+ ladder (`devrites-browser-proof`) and record it in `browser-evidence.md` (and summarize
5
+ in `polish-report.md`).
6
+
7
+ ## Required when a browser can run
8
+ - Screenshots of the polished UI at the canonical viewport set
9
+ (`devrites-frontend-craft/reference/quality-standards.md` § Responsive — currently
10
+ 320 / 768 / 1024 / 1440).
11
+ **Open each screenshot and describe what's visible**: a path is not proof.
12
+ - All key interaction states captured or exercised: hover, focus, active, disabled,
13
+ loading, empty, error, success.
14
+ - Console clean (no errors/warnings): captured.
15
+ - No layout shift on load: observed.
16
+ - Reduced-motion behavior checked if motion was added.
17
+ - **Design references**: if the spec saved references in `.devrites/work/<slug>/references/`,
18
+ compare the polished UI against them: does it match the agreed target? Note any diffs.
19
+
20
+ ## Before/after
21
+ Where polish changed something visible, capture a **before/after** pair. The pair is the
22
+ evidence that the change is real and an improvement, not a regression.
23
+
24
+ ## If no browser is available
25
+ - Record the limitation explicitly in `browser-evidence.md`.
26
+ - Write the exact manual steps to verify (route, viewport, what to look for in each
27
+ state).
28
+ - Do **not** claim the polish is verified. Mark it **pending (manual)** and let
29
+ `/rite-review` / `/rite-seal` weigh the UI risk.
30
+
31
+ ## Never
32
+ - Cite "lint clean" / "build passed" / "no type errors" as evidence of *visual* quality.
33
+ - Assert a state works without exercising it.
@@ -0,0 +1,82 @@
1
+ # Code + backend polish (Phase 1 + Phase 2)
2
+
3
+ Loaded from `/rite-polish` every run, regardless of UI scope. Two sub-phases:
4
+ code polish (Phase 1) and, when backend is touched, backend polish (Phase 2).
5
+
6
+ ## Rules consulted (read on demand from `.pi/skills/devrites-lib/reference/standards/`)
7
+
8
+ - `coding-style.md`: Phase 1 (simplify, dead code, naming, comments).
9
+ - `patterns.md`: Phase 1 simplification: avoid over-engineering.
10
+ - `error-handling.md`: Phase 2 backend (no silent catches, consistent errors).
11
+ - `performance.md`: Phase 2 backend (N+1s, query bounds).
12
+ - `documentation.md`: keep touched docs current; record polish-time decisions.
13
+
14
+ ## Operating rules
15
+
16
+ - **Never cite clean automation** (lint/build pass) as proof of good design or
17
+ simplicity.
18
+ - Feature scope only. Spec Drift Guard applies.
19
+ - Re-run targeted tests after each change: a simplification that breaks a
20
+ test wasn't behavior-preserving.
21
+
22
+ ## Phase 1: Code polish *(always)*
23
+
24
+ Delegates the audit to `devrites-audit simplify`. Reduce complexity in the
25
+ feature's touched code while **preserving exact behavior**. Scope = active
26
+ feature only.
27
+
28
+ - **Measure first, target hotspots:** deep nesting, long branchy functions,
29
+ high cyclomatic complexity, sprawling conditionals. Don't redistribute
30
+ complexity, reduce it. Untargeted cleanup just moves decision points around.
31
+ - **Behavior-preserving techniques** (name the one used per change): guard
32
+ clauses (flatten nested if/else, return early on unwanted cases), Extract
33
+ Method (a coherent block into a named single-responsibility helper), simplify
34
+ conditionals (switch/lookup over a long if-else; decompose a complex boolean
35
+ into well-named parts), dedupe, inline single-use indirection, replace
36
+ hand-rolled utils with the stdlib/existing helper, delete dead code this
37
+ feature added.
38
+ - **Chesterton's Fence:** understand *why* something exists before removing it.
39
+ If you can't explain a check, branch, or wrapper, you may not remove it:
40
+ many "useless" lines guard a real edge case. A `devrites:keep` / `simplify-ignore`
41
+ marker comment **is** an author's fence, made explicit: read it and leave the marked
42
+ block exactly as-is: never simplify, reflow, or "tidy" it. Honor the marker in place;
43
+ don't rewrite the file around it.
44
+ - **Behavior preservation:** observable behavior stays identical; tests stay
45
+ green. If behavior would change, it's not simplification. It needs its own
46
+ acceptance + proof (and maybe drift handling). Prefer transformations with
47
+ obvious equivalence.
48
+ - **Don't over-reduce / proportionality:** inherent complexity is fine;
49
+ readability is the goal, not a metric. Forcing the complexity number down by
50
+ *hiding* branches elsewhere is worse. Don't spend disproportionate effort on
51
+ small, stable, rarely-touched code; target central/often-read code.
52
+ - **Guardrails:** feature scope only, no project-wide refactor; don't delete
53
+ suspected dead code **outside** this feature without asking; re-prove after
54
+ simplifying (a simplification that breaks a test wasn't behavior-preserving);
55
+ cleverness that's shorter but harder to read is not simpler.
56
+ - **Rule of 500: mechanize the big ones.** A simplification touching more than ~500 lines
57
+ (a rename, an API-shape change, a repeated idiom swap) is a job for a codemod / AST transform /
58
+ `sed`, not hand-edits. Hand-editing at that scale is where transcription bugs and inconsistent
59
+ application creep in; a scripted transform applies once, uniformly, and is reviewable as one diff.
60
+ - **Cleanup**: remove TODOs, `console.log`s, commented-out code, unused
61
+ imports/vars; tighten naming and comments in code this feature touched.
62
+ - **The comprehension test (the completion criterion).** Every change must pass one question:
63
+ *would a new team member understand this faster than the original?* If not, it's churn, not
64
+ simplification: revert it. Fewer lines that read slower fail this test; a clearer five lines
65
+ beat a cryptic one.
66
+ - **Done when:** every touched change passes the comprehension test, every anti-slop charter
67
+ item in the touched code is cleared (the AI-tells do-not list: [anti-ai-slop.md](anti-ai-slop.md)
68
+ Code section, `coding-style.md`) **and** the feature's targeted tests + build re-run green.
69
+ An open charter item or a red check means Phase 1 isn't done.
70
+
71
+ ## Phase 2: Backend polish *(if BE touched)*
72
+
73
+ See [backend-polish.md](backend-polish.md). For server-side scope (handlers,
74
+ services, routes, models, migrations, queries, jobs, auth). Polish the server
75
+ side to ship-quality.
76
+
77
+ ## Output → appends to `polish-report.md`
78
+
79
+ ```
80
+ Phase 1 (code polish): findings → fixes (technique + why behavior preserved)
81
+ Phase 2 (backend polish): error/log/data/API/cleanup fixes | n/a (no backend)
82
+ ```
@@ -0,0 +1,117 @@
1
+ # Design memory: record proven design rules in `DESIGN.md`
2
+
3
+ This optional `/rite-polish` step applies only to UI features. Feature design decisions
4
+ live in `design-brief.md` and archive with the workspace. With the user's approval,
5
+ copy proven, reusable design rules into the project-level `DESIGN.md` for later
6
+ features.
7
+
8
+ `devrites-ux-shape` §1 and
9
+ `devrites-frontend-craft/reference/design-references.md` read `DESIGN.md` when present.
10
+ This step writes that file from real feature evidence before Review.
11
+
12
+ ## When it runs
13
+ - **UI features only.** No UI in the diff → skip silently.
14
+ - **During Polish, after initial proof and before candidate closure.** Any update
15
+ enters the candidate manifest and is proved and reviewed with the feature.
16
+ - **Opt in and confirm.** A project-wide artifact is outside feature scope
17
+ (`standards/core.md` rule 7), so never write it silently. Present a ranked option set
18
+ (see [`afk-hitl.md`](../../devrites-lib/reference/standards/afk-hitl.md), "Option set");
19
+ **default is skip**. The user opts to persist.
20
+ - **AFK:** first-time `DESIGN.md` creation is a `validating` gate because it adds a
21
+ persistent project artifact. Propose and queue it; do not create it automatically. An append to an
22
+ existing `DESIGN.md` is `advisory` and may auto-proceed when `allow_gates` permits, since
23
+ it only adds evidence-proven entries.
24
+
25
+ ## Inputs (proven only)
26
+
27
+ Entries are **proven, not aspirational**.
28
+ - `design-brief.md`: direction, color strategy, **calibration** (density / motion), key
29
+ states, named anchors, and the per-slice **Build-time refinements**.
30
+ - The **closed candidate diff** and `touched-files.md`: the tokens, components,
31
+ and states the candidate proves. Record only what the diff proves, not
32
+ everything the brief intended.
33
+ - Existing `DESIGN.md` if present: the merge target.
34
+
35
+ ## What to record
36
+ Record only reusable rules established by the proved candidate. Exclude choices
37
+ that apply only to this feature.
38
+ - **Tokens introduced + used:** new color roles / spacing steps / type steps / elevation
39
+ / radius proved in the candidate and reusable. Names and values, mirrored from the code.
40
+ - **Color strategy and calibration baseline:** the strategy (Restrained / Committed / …) and
41
+ established density / motion; record a deviation as a deviation, not a new
42
+ default.
43
+ - **Type & spacing scales** in actual use; **motion** classes + easing; **materiality**
44
+ (elevation set, hairline usage, glass / texture policy).
45
+ - **Component behaviors:** for each shared component established or extended by the
46
+ feature, record its proved states and interaction model.
47
+ - **Named-anchor lineage:** the anchors used by proved features.
48
+ - **Anti-slop exceptions:** any banned default the project *intentionally* uses (with the
49
+ why), so build / polish don't "correct" a deliberate choice.
50
+
51
+ ## Merge discipline
52
+ - **Append, don't overwrite.** Add proven entries; never silently rewrite an existing one.
53
+ - **Ask about conflicts.** If a new token, font, or strategy contradicts an existing
54
+ `DESIGN.md` entry, present the option set to the user. Do not resolve it yourself.
55
+ Keep one design system per project.
56
+ - **Never invent.** Include only rules proven by the feature.
57
+ - **Attribute and keep it short.** Tag each new entry with the feature slug. Future
58
+ specs read this file, so use concise entries.
59
+
60
+ ## How it enters the candidate
61
+ `DESIGN.md` is a tracked project artifact:
62
+ 1. Write / update `<project-root>/DESIGN.md` from the template below.
63
+ 2. Add `DESIGN.md` to the authoritative candidate manifest.
64
+ 3. Run affected real re-proof, refresh evidence/browser digest bindings, and
65
+ include the result in Review. Ship performs no design-memory write.
66
+
67
+ ## `DESIGN.md` template (project-level, stack-agnostic)
68
+ ```markdown
69
+ # DESIGN.md — <project> design memory
70
+
71
+ > Rolled up from proven features by `/rite-polish` (design memory). Read by
72
+ > `devrites-ux-shape` and `devrites-frontend-craft` as the inherited system. Evidence-only:
73
+ > every entry was proven. Edit through a feature's polish, not by hand.
74
+
75
+ ## Register & direction
76
+ Default register per surface (brand / product) and the scene-derived direction the product
77
+ keeps converging on.
78
+
79
+ ## Color
80
+ Strategy baseline (Restrained | Committed | Multi-role | Saturated). Token roles
81
+ (surface / text / accent / border / danger / …) with values or token names. Dark-mode approach.
82
+
83
+ ## Calibration
84
+ Density baseline (Airy | Balanced | Dense) · Motion baseline (Minimal | Standard | Expressive).
85
+ Surfaces that deviate + why.
86
+
87
+ ## Typography
88
+ Families; the scale in use (fixed rem / fluid clamp); heading↔body ratio; weights.
89
+
90
+ ## Spacing
91
+ The scale (4 pt multiples) and section rhythm in use.
92
+
93
+ ## Motion
94
+ Classes in use, easing, `prefers-reduced-motion` handling.
95
+
96
+ ## Materiality
97
+ Elevation token set, hairline usage, glass policy, texture / asset approach.
98
+
99
+ ## Components (proven behaviors)
100
+ | Component | States proven | Interaction model | First proven by |
101
+ |---|---|---|---|
102
+ | <name> | default/hover/focus/loading/empty/error/… | inline / navigated / modal · feedback | <slug> |
103
+
104
+ ## Named-anchor lineage
105
+ The anchors features steered toward (keeps new work coherent).
106
+
107
+ ## Anti-slop — project exceptions
108
+ Banned defaults this project *intentionally* uses, with the why (so build/polish don't undo them).
109
+ ```
110
+
111
+ ## NEVER (design memory)
112
+ - Never roll up unattended on first creation: a new persistent project artifact is a
113
+ confirmed step, never an AFK silent write.
114
+ - Never write an entry the feature did not prove: no aspirational tokens.
115
+ - Never overwrite or silently reconcile a conflicting existing entry: surface it.
116
+ - Never persist a feature-only one-off as if it were the project default.
117
+ - Never leave `DESIGN.md` outside the candidate manifest or defer it until Ship.