devrites 1.19.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 (232) hide show
  1. package/.claude-plugin/marketplace.json +24 -0
  2. package/.claude-plugin/plugin.json +43 -0
  3. package/CHANGELOG.md +391 -0
  4. package/LICENSE +56 -0
  5. package/NOTICE.md +18 -0
  6. package/README.md +582 -0
  7. package/SECURITY.md +193 -0
  8. package/bin/devrites.mjs +100 -0
  9. package/docs/architecture.md +272 -0
  10. package/docs/cli-mcp.md +57 -0
  11. package/docs/command-map.md +143 -0
  12. package/docs/flow.md +360 -0
  13. package/docs/release.md +29 -0
  14. package/docs/skills.md +214 -0
  15. package/docs/usage.md +325 -0
  16. package/install.sh +359 -0
  17. package/mcp/devrites-mcp.mjs +103 -0
  18. package/pack/.claude/agents/devrites-code-reviewer.md +50 -0
  19. package/pack/.claude/agents/devrites-doubt-reviewer.md +55 -0
  20. package/pack/.claude/agents/devrites-frontend-reviewer.md +52 -0
  21. package/pack/.claude/agents/devrites-performance-reviewer.md +47 -0
  22. package/pack/.claude/agents/devrites-plan-reviewer.md +79 -0
  23. package/pack/.claude/agents/devrites-security-auditor.md +53 -0
  24. package/pack/.claude/agents/devrites-simplifier-reviewer.md +75 -0
  25. package/pack/.claude/agents/devrites-slice-wright.md +181 -0
  26. package/pack/.claude/agents/devrites-spec-reviewer.md +72 -0
  27. package/pack/.claude/agents/devrites-strategy-reviewer.md +62 -0
  28. package/pack/.claude/agents/devrites-test-analyst.md +47 -0
  29. package/pack/.claude/hooks/devrites-a1-guard.sh +81 -0
  30. package/pack/.claude/hooks/devrites-allow.sh +44 -0
  31. package/pack/.claude/hooks/devrites-cursor.sh +28 -0
  32. package/pack/.claude/hooks/devrites-orient.sh +53 -0
  33. package/pack/.claude/hooks/devrites-redwatch.sh +39 -0
  34. package/pack/.claude/hooks/devrites-refresh-indexes.sh +127 -0
  35. package/pack/.claude/hooks/devrites-reviewer-readonly.sh +28 -0
  36. package/pack/.claude/hooks/devrites-statusline.sh +18 -0
  37. package/pack/.claude/hooks/devrites-stop-gate.sh +45 -0
  38. package/pack/.claude/hooks/devrites-wright-scope.sh +35 -0
  39. package/pack/.claude/hooks/hooks.json +52 -0
  40. package/pack/.claude/rules/README.md +48 -0
  41. package/pack/.claude/rules/afk-hitl.md +245 -0
  42. package/pack/.claude/rules/agents.md +98 -0
  43. package/pack/.claude/rules/anti-patterns.md +48 -0
  44. package/pack/.claude/rules/code-review.md +38 -0
  45. package/pack/.claude/rules/coding-style.md +55 -0
  46. package/pack/.claude/rules/context-hygiene.md +97 -0
  47. package/pack/.claude/rules/core.md +119 -0
  48. package/pack/.claude/rules/development-workflow.md +40 -0
  49. package/pack/.claude/rules/documentation.md +27 -0
  50. package/pack/.claude/rules/error-handling.md +33 -0
  51. package/pack/.claude/rules/git-workflow.md +35 -0
  52. package/pack/.claude/rules/hooks.md +38 -0
  53. package/pack/.claude/rules/patterns.md +45 -0
  54. package/pack/.claude/rules/performance.md +27 -0
  55. package/pack/.claude/rules/prose-style.md +101 -0
  56. package/pack/.claude/rules/security.md +63 -0
  57. package/pack/.claude/rules/testing.md +88 -0
  58. package/pack/.claude/rules/tooling.md +72 -0
  59. package/pack/.claude/settings.json +53 -0
  60. package/pack/.claude/skills/devrites-api-interface/SKILL.md +45 -0
  61. package/pack/.claude/skills/devrites-audit/SKILL.md +73 -0
  62. package/pack/.claude/skills/devrites-browser-proof/SKILL.md +38 -0
  63. package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +50 -0
  64. package/pack/.claude/skills/devrites-debug-recovery/reference/build-the-loop.md +47 -0
  65. package/pack/.claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +17 -0
  66. package/pack/.claude/skills/devrites-debug-recovery/reference/hypotheses.md +17 -0
  67. package/pack/.claude/skills/devrites-debug-recovery/reference/instrumentation.md +21 -0
  68. package/pack/.claude/skills/devrites-debug-recovery/reference/regression-test.md +31 -0
  69. package/pack/.claude/skills/devrites-doubt/SKILL.md +75 -0
  70. package/pack/.claude/skills/devrites-frontend-craft/SKILL.md +96 -0
  71. package/pack/.claude/skills/devrites-frontend-craft/reference/craft.md +59 -0
  72. package/pack/.claude/skills/devrites-frontend-craft/reference/design-references.md +116 -0
  73. package/pack/.claude/skills/devrites-frontend-craft/reference/fullstack.md +45 -0
  74. package/pack/.claude/skills/devrites-frontend-craft/reference/quality-standards.md +215 -0
  75. package/pack/.claude/skills/devrites-frontend-craft/reference/reuse-first.md +59 -0
  76. package/pack/.claude/skills/devrites-frontend-craft/reference/shape.md +60 -0
  77. package/pack/.claude/skills/devrites-interview/SKILL.md +81 -0
  78. package/pack/.claude/skills/devrites-lib/SKILL.md +76 -0
  79. package/pack/.claude/skills/devrites-lib/scripts/analyze.sh +78 -0
  80. package/pack/.claude/skills/devrites-lib/scripts/check-acceptance.sh +75 -0
  81. package/pack/.claude/skills/devrites-lib/scripts/close-out.sh +47 -0
  82. package/pack/.claude/skills/devrites-lib/scripts/conventions.py +273 -0
  83. package/pack/.claude/skills/devrites-lib/scripts/coverage.sh +51 -0
  84. package/pack/.claude/skills/devrites-lib/scripts/devrites.sh +69 -0
  85. package/pack/.claude/skills/devrites-lib/scripts/doctor.sh +92 -0
  86. package/pack/.claude/skills/devrites-lib/scripts/evidence-fresh.sh +63 -0
  87. package/pack/.claude/skills/devrites-lib/scripts/footprint.sh +45 -0
  88. package/pack/.claude/skills/devrites-lib/scripts/learnings.sh +74 -0
  89. package/pack/.claude/skills/devrites-lib/scripts/mutation-gate.sh +52 -0
  90. package/pack/.claude/skills/devrites-lib/scripts/package-existence.sh +68 -0
  91. package/pack/.claude/skills/devrites-lib/scripts/preamble.sh +76 -0
  92. package/pack/.claude/skills/devrites-lib/scripts/progress.sh +103 -0
  93. package/pack/.claude/skills/devrites-lib/scripts/readiness.sh +62 -0
  94. package/pack/.claude/skills/devrites-lib/scripts/reconcile.sh +123 -0
  95. package/pack/.claude/skills/devrites-lib/scripts/resolve.sh +279 -0
  96. package/pack/.claude/skills/devrites-lib/scripts/stuck.sh +67 -0
  97. package/pack/.claude/skills/devrites-lib/scripts/test-integrity.sh +87 -0
  98. package/pack/.claude/skills/devrites-lib/scripts/tick-afk.sh +52 -0
  99. package/pack/.claude/skills/devrites-prose-craft/SKILL.md +105 -0
  100. package/pack/.claude/skills/devrites-prose-craft/reference/banned-phrases.md +95 -0
  101. package/pack/.claude/skills/devrites-prose-craft/reference/examples.md +88 -0
  102. package/pack/.claude/skills/devrites-prose-craft/reference/structures.md +134 -0
  103. package/pack/.claude/skills/devrites-refresh-indexes/SKILL.md +54 -0
  104. package/pack/.claude/skills/devrites-source-driven/SKILL.md +36 -0
  105. package/pack/.claude/skills/devrites-ux-shape/SKILL.md +121 -0
  106. package/pack/.claude/skills/devrites-ux-shape/reference/brief-template.md +93 -0
  107. package/pack/.claude/skills/devrites-ux-shape/reference/visual-direction-probe.md +48 -0
  108. package/pack/.claude/skills/rite/SKILL.md +135 -0
  109. package/pack/.claude/skills/rite/reference/menu.md +32 -0
  110. package/pack/.claude/skills/rite-adopt/SKILL.md +83 -0
  111. package/pack/.claude/skills/rite-adopt/reference/adoption.md +58 -0
  112. package/pack/.claude/skills/rite-adopt/reference/anti-patterns.md +19 -0
  113. package/pack/.claude/skills/rite-autocomplete/SKILL.md +96 -0
  114. package/pack/.claude/skills/rite-autocomplete/reference/decision-policy.md +35 -0
  115. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +54 -0
  116. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +59 -0
  117. package/pack/.claude/skills/rite-build/SKILL.md +261 -0
  118. package/pack/.claude/skills/rite-build/reference/afk-discipline.md +145 -0
  119. package/pack/.claude/skills/rite-build/reference/anti-patterns.md +25 -0
  120. package/pack/.claude/skills/rite-build/reference/checkpoint-protocol.md +149 -0
  121. package/pack/.claude/skills/rite-build/reference/evidence-standard.md +32 -0
  122. package/pack/.claude/skills/rite-build/reference/frontend-trigger.md +39 -0
  123. package/pack/.claude/skills/rite-build/reference/one-slice-cycle.md +38 -0
  124. package/pack/.claude/skills/rite-build/reference/spec-drift-guard.md +43 -0
  125. package/pack/.claude/skills/rite-build/reference/tdd.md +26 -0
  126. package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +115 -0
  127. package/pack/.claude/skills/rite-define/SKILL.md +157 -0
  128. package/pack/.claude/skills/rite-define/reference/anti-patterns.md +25 -0
  129. package/pack/.claude/skills/rite-define/reference/gates.md +152 -0
  130. package/pack/.claude/skills/rite-define/reference/plan-template.md +65 -0
  131. package/pack/.claude/skills/rite-doctor/SKILL.md +50 -0
  132. package/pack/.claude/skills/rite-frame/SKILL.md +116 -0
  133. package/pack/.claude/skills/rite-frame/reference/failure-modes.md +68 -0
  134. package/pack/.claude/skills/rite-handoff/SKILL.md +95 -0
  135. package/pack/.claude/skills/rite-handoff/reference/handoff-template.md +34 -0
  136. package/pack/.claude/skills/rite-learn/SKILL.md +82 -0
  137. package/pack/.claude/skills/rite-plan/SKILL.md +82 -0
  138. package/pack/.claude/skills/rite-plan/reference/anti-patterns.md +24 -0
  139. package/pack/.claude/skills/rite-plan/reference/dependency-graph.md +33 -0
  140. package/pack/.claude/skills/rite-plan/reference/replan-and-repair.md +42 -0
  141. package/pack/.claude/skills/rite-plan/reference/slicing.md +52 -0
  142. package/pack/.claude/skills/rite-plan/reference/task-breakdown.md +34 -0
  143. package/pack/.claude/skills/rite-polish/SKILL.md +90 -0
  144. package/pack/.claude/skills/rite-polish/reference/anti-ai-slop.md +177 -0
  145. package/pack/.claude/skills/rite-polish/reference/anti-patterns.md +27 -0
  146. package/pack/.claude/skills/rite-polish/reference/backend-polish.md +80 -0
  147. package/pack/.claude/skills/rite-polish/reference/browser-polish-evidence.md +31 -0
  148. package/pack/.claude/skills/rite-polish/reference/code.md +85 -0
  149. package/pack/.claude/skills/rite-polish/reference/design-system-discovery.md +35 -0
  150. package/pack/.claude/skills/rite-polish/reference/harden-checklist.md +109 -0
  151. package/pack/.claude/skills/rite-polish/reference/ui.md +136 -0
  152. package/pack/.claude/skills/rite-pressure-test/SKILL.md +43 -0
  153. package/pack/.claude/skills/rite-prototype/SKILL.md +87 -0
  154. package/pack/.claude/skills/rite-prove/SKILL.md +120 -0
  155. package/pack/.claude/skills/rite-prove/reference/anti-patterns.md +25 -0
  156. package/pack/.claude/skills/rite-prove/reference/browser-proof.md +26 -0
  157. package/pack/.claude/skills/rite-prove/reference/failure-triage.md +25 -0
  158. package/pack/.claude/skills/rite-prove/reference/proof-ladder.md +26 -0
  159. package/pack/.claude/skills/rite-prove/reference/test-command-discovery.md +30 -0
  160. package/pack/.claude/skills/rite-quick/SKILL.md +81 -0
  161. package/pack/.claude/skills/rite-resolve/SKILL.md +113 -0
  162. package/pack/.claude/skills/rite-resolve/reference/answer-protocol.md +114 -0
  163. package/pack/.claude/skills/rite-review/SKILL.md +170 -0
  164. package/pack/.claude/skills/rite-review/reference/anti-patterns.md +32 -0
  165. package/pack/.claude/skills/rite-review/reference/cognitive-load.md +90 -0
  166. package/pack/.claude/skills/rite-review/reference/feature-scoped-review.md +26 -0
  167. package/pack/.claude/skills/rite-review/reference/five-axis-review.md +46 -0
  168. package/pack/.claude/skills/rite-review/reference/nielsen-heuristics.md +130 -0
  169. package/pack/.claude/skills/rite-review/reference/parallel-dispatch.md +62 -0
  170. package/pack/.claude/skills/rite-review/reference/performance-review.md +28 -0
  171. package/pack/.claude/skills/rite-review/reference/security-review.md +32 -0
  172. package/pack/.claude/skills/rite-seal/SKILL.md +183 -0
  173. package/pack/.claude/skills/rite-seal/reference/anti-patterns.md +27 -0
  174. package/pack/.claude/skills/rite-seal/reference/conventions-ledger.md +63 -0
  175. package/pack/.claude/skills/rite-seal/reference/final-evidence.md +72 -0
  176. package/pack/.claude/skills/rite-seal/reference/go-no-go.md +37 -0
  177. package/pack/.claude/skills/rite-seal/reference/parallel-dispatch.md +69 -0
  178. package/pack/.claude/skills/rite-seal/reference/risk-and-rollback.md +30 -0
  179. package/pack/.claude/skills/rite-seal/reference/seal-template.md +36 -0
  180. package/pack/.claude/skills/rite-ship/SKILL.md +120 -0
  181. package/pack/.claude/skills/rite-ship/reference/anti-patterns.md +25 -0
  182. package/pack/.claude/skills/rite-ship/reference/close-out.md +31 -0
  183. package/pack/.claude/skills/rite-ship/reference/design-memory.md +120 -0
  184. package/pack/.claude/skills/rite-ship/reference/git-ship.md +42 -0
  185. package/pack/.claude/skills/rite-ship/reference/ship-template.md +33 -0
  186. package/pack/.claude/skills/rite-spec/SKILL.md +126 -0
  187. package/pack/.claude/skills/rite-spec/reference/acceptance-criteria.md +31 -0
  188. package/pack/.claude/skills/rite-spec/reference/anti-patterns.md +25 -0
  189. package/pack/.claude/skills/rite-spec/reference/interview-patterns.md +56 -0
  190. package/pack/.claude/skills/rite-spec/reference/investigation.md +64 -0
  191. package/pack/.claude/skills/rite-spec/reference/question-protocol.md +61 -0
  192. package/pack/.claude/skills/rite-spec/reference/references-intake.md +57 -0
  193. package/pack/.claude/skills/rite-spec/reference/spec-checklists.md +73 -0
  194. package/pack/.claude/skills/rite-spec/reference/spec-template.md +124 -0
  195. package/pack/.claude/skills/rite-spec/reference/state-workspace.md +159 -0
  196. package/pack/.claude/skills/rite-status/SKILL.md +101 -0
  197. package/pack/.claude/skills/rite-temper/SKILL.md +119 -0
  198. package/pack/.claude/skills/rite-temper/reference/anti-patterns.md +29 -0
  199. package/pack/.claude/skills/rite-temper/reference/review-dimensions.md +65 -0
  200. package/pack/.claude/skills/rite-temper/reference/scope-modes.md +53 -0
  201. package/pack/.claude/skills/rite-temper/reference/significance.md +46 -0
  202. package/pack/.claude/skills/rite-temper/reference/strategy-template.md +90 -0
  203. package/pack/.claude/skills/rite-vet/SKILL.md +155 -0
  204. package/pack/.claude/skills/rite-vet/reference/anti-patterns.md +29 -0
  205. package/pack/.claude/skills/rite-vet/reference/artifacts.md +135 -0
  206. package/pack/.claude/skills/rite-vet/reference/cross-model.md +41 -0
  207. package/pack/.claude/skills/rite-vet/reference/depth.md +53 -0
  208. package/pack/.claude/skills/rite-vet/reference/eng-lenses.md +48 -0
  209. package/pack/.claude/skills/rite-vet/reference/review-axes.md +167 -0
  210. package/pack/.claude/skills/rite-zoom-out/SKILL.md +75 -0
  211. package/package.json +68 -0
  212. package/scripts/build-release-tarball.sh +74 -0
  213. package/scripts/check-cross-refs.py +121 -0
  214. package/scripts/check-no-global-writes.sh +44 -0
  215. package/scripts/check-rule-uniqueness.sh +73 -0
  216. package/scripts/devrites-detect.sh +175 -0
  217. package/scripts/eval-runner.py +273 -0
  218. package/scripts/grade-feature.sh +104 -0
  219. package/scripts/install-lib.sh +83 -0
  220. package/scripts/pin.sh +166 -0
  221. package/scripts/render-eval-summary.py +48 -0
  222. package/scripts/run-evals.sh +149 -0
  223. package/scripts/run-outcome-evals.sh +49 -0
  224. package/scripts/scan-pack-security.py +209 -0
  225. package/scripts/scan-supply-chain-iocs.py +127 -0
  226. package/scripts/supply-chain-iocs.json +11 -0
  227. package/scripts/sync-version.sh +56 -0
  228. package/scripts/validate-frontmatter.py +149 -0
  229. package/scripts/validate-workflow-security.py +86 -0
  230. package/scripts/validate.sh +234 -0
  231. package/uninstall.sh +137 -0
  232. package/update.sh +196 -0
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: devrites-ux-shape
3
+ description: Plan the UX/UI before any code — produce the feature-level `design-brief.md` (design direction, key states, interaction model, visual-direction probe) the build then targets. Use when `/rite-spec` detects UI, or the user says "shape the UX", "plan the UI before coding", "design direction", "what should this look like", or a UI feature needs its look & flow decided up front. Woven into spec/build, not a separate phase. Not for building (use `devrites-frontend-craft`), polishing a built UI (use `/rite-polish`), or throwaway exploration (use `/rite-prototype`).
4
+ user-invocable: false
5
+ ---
6
+
7
+ # devrites-ux-shape — plan the UX/UI before code
8
+
9
+ Decide what the UI *is* and how it should look and behave **before** code, and write it to
10
+ the feature's `design-brief.md` — the contract the build (`devrites-frontend-craft`),
11
+ polish, and seal all check against. This is "shape before code" raised to a **feature-level
12
+ artifact**: produced once at spec time, refined per slice. It is **woven into the
13
+ lifecycle** (`/rite-spec` calls it when UI is detected; `/rite-build` refines it), not a
14
+ separate phase the user runs.
15
+
16
+ ## When it runs
17
+ - `/rite-spec` invokes it after references-intake when the feature touches UI
18
+ (`../rite-build/reference/frontend-trigger.md`). Output: `design-brief.md` + a
19
+ confirmation pause.
20
+ - `/rite-build` / `devrites-frontend-craft` read the brief as the **build target** and
21
+ refine it for the slice's surface — they don't re-derive it.
22
+ - Skip entirely for backend / data / CLI / infra-only features.
23
+
24
+ ## 1. Foundation — discover, don't impose
25
+ Reuse what's there first. Read the design system + register and any references the spec
26
+ gathered:
27
+ - Design system + register (tokens, components, type, spacing, neighbors; brand-vs-product)
28
+ → `../devrites-frontend-craft/reference/design-references.md`.
29
+ - `PRODUCT.md` / `DESIGN.md` / `CLAUDE.md` if present — anchors that reduce questions.
30
+ `DESIGN.md` is the project's **rolled-up design memory** (tokens, calibration baseline,
31
+ proven component behaviors) earlier features sealed via `../rite-ship/reference/design-memory.md`;
32
+ treat it as the inherited system — read it before re-discovering, depart only on signal.
33
+ - `references.md` + `references/` — the screenshots / Figma / video / links the human
34
+ supplied. When present they are the **build target**, not inspiration.
35
+
36
+ ## 2. Discovery — one round, assert-then-confirm
37
+ Understand the feature deeply enough to make excellent design calls — **no code, no
38
+ markup**. Use the `devrites-interview` cadence: 2-3 questions per round, best-guess
39
+ attached, stop when answers converge. One round is the default; add a second only for
40
+ material gaps. When `PRODUCT.md` + the spec already pin an answer, **assert it and ask to
41
+ confirm** ("reads as Restrained — confirm?"), don't offer a four-option menu. Cover:
42
+ - **Purpose & user** — who, in what state of mind (rushed / exploring / anxious / focused).
43
+ - **Content & data** — realistic ranges (0 / typical / many), dynamic content, real
44
+ media/assets the surface needs.
45
+ - **Anti-goals** — what this must NOT be; the biggest risk of getting it wrong.
46
+
47
+ ## 3. Design direction — the direction set (commit, don't hedge)
48
+ One deliberate visual decision on four fronts, each anchored in an existing reference so
49
+ the call is checkable, not taste:
50
+ - **Scene sentence** — who / where / ambient light / mood, per
51
+ `../devrites-frontend-craft/reference/design-references.md`. Forces dark-vs-light and
52
+ tone from the scene, not the category.
53
+ - **Color strategy** — Restrained / Committed / Multi-role / Saturated, per the
54
+ color-commitment table in `../devrites-frontend-craft/reference/quality-standards.md`.
55
+ Pick from the scene; register doesn't decide it.
56
+ - **Calibration** — density (Airy / Balanced / Dense) and motion (Minimal / Standard /
57
+ Expressive), per the calibration table in the same quality-standards file. Set both from
58
+ the scene so the build targets a calibration, not a guess (a 2am SRE → Dense + Minimal; a
59
+ launch hero → Airy + Expressive).
60
+ - **Named anchor references** — 2-3 *specific* products / brands / objects to steer toward
61
+ (not adjectives like "modern" or "clean"), plus the saved `references/` files.
62
+
63
+ Respect the existing identity (default, ~90%); depart only on an explicit signal.
64
+
65
+ ## 4. Scope — task-scoped, never persisted
66
+ Name the output target so sketch-vs-ship isn't guessed: **fidelity** (sketch / mid-fi /
67
+ high-fi / production — DevRites default is production), **breadth** (one screen / a flow /
68
+ a surface), **interactivity**, **time intent**. These ride in the brief only; they do not
69
+ change the project's design system, and never get written to `PRODUCT.md` / `DESIGN.md`.
70
+
71
+ ## 5. Key states + interaction model
72
+ List every state the feature needs and what the user must see/feel in each (default,
73
+ loading initial+subsequent, empty→next-action, error→recovery, success, disabled/
74
+ no-permission, long-content/overflow), the information hierarchy (what's seen 1st / 2nd /
75
+ 3rd; primary action unmistakable), responsive reflow, a11y must-haves, and the interaction
76
+ model (inline vs navigated vs — rarely — modal; optimistic vs pending; feedback). Canonical
77
+ state list: `../devrites-frontend-craft/reference/shape.md`.
78
+
79
+ ## 6. Visual-direction probe — capability-gated
80
+ When the work is net-new or directionally ambiguous and fidelity ≥ mid-fi, pressure-test
81
+ the lane with something concrete instead of words — pull Figma context, generate image
82
+ probes, screenshot reference sites, or route a code-fidelity question to `/rite-prototype`.
83
+ **Capability-gated**: announce the skip in one line if no tool is available. Flow:
84
+ [reference/visual-direction-probe.md](reference/visual-direction-probe.md).
85
+
86
+ ## 7. AI-slop pre-check
87
+ Run the two-altitude category-reflex check (`../rite-polish/reference/anti-ai-slop.md`) on
88
+ the chosen direction *before* writing the brief — if the palette/theme is guessable from
89
+ the category, rework the scene sentence and color strategy. Cheaper to catch the slop in
90
+ the brief than in the build.
91
+
92
+ ## 8. Write the brief + gate
93
+ Write `design-brief.md` ([reference/brief-template.md](reference/brief-template.md)) —
94
+ **compact** (3-5 bullets) when discovery was crisp, **full** when the surface is ambiguous
95
+ or multi-screen. Don't pad a clear brief to look thorough; don't skip the pause to look
96
+ fast. Then honor the run mode (`../../rules/afk-hitl.md`):
97
+ - **HITL** — present the brief and **STOP for explicit confirmation**. The pause is the
98
+ point: shape ends at the user's "go", not at your own certainty. Disagreement → revisit
99
+ the relevant discovery question.
100
+ - **AFK** — assert the best-guess direction, record it in `decisions.md` + an advisory
101
+ `questions.md` entry, and proceed. A direction touching the irreversible-risk list still
102
+ pauses.
103
+
104
+ ## Output
105
+ ```
106
+ UX/UI shaped: <slug>
107
+ Direction: <color strategy> · density <airy|balanced|dense>/motion <minimal|standard|expressive> · "<scene sentence>" · anchors: <ref A, ref B>
108
+ States: <n listed> Probe: <figma | images | prototype | skipped — no tool>
109
+ Brief: design-brief.md (<compact | full>)
110
+ Gate: <confirmed | awaiting confirmation | AFK-asserted>
111
+ Next: /rite-define (UI slices map to the brief's states) — or /rite-build refines it per slice
112
+ ```
113
+
114
+ ## NEVER (ux-shape)
115
+ - Never write code, markup, or a component here — produce the thinking, not the UI.
116
+ - Never finalize the brief without naming the **primary action** and the **full state set**
117
+ (not just the happy path).
118
+ - Never decide visual direction by taste when the project has a system — discover first.
119
+ - Never skip the HITL confirmation pause "because the brief is obviously right" — ask once,
120
+ wait.
121
+ - Never re-derive the brief from scratch in `/rite-build` — refine the existing one.
@@ -0,0 +1,93 @@
1
+ # `design-brief.md` template — the UX/UI contract
2
+
3
+ The feature-level design decision, produced **before** code by `devrites-ux-shape` (at
4
+ `/rite-spec` when UI is detected) and the **target** the build, polish, and seal check
5
+ against. `devrites-frontend-craft` refines it per slice and appends build-time decisions;
6
+ it is never re-derived from scratch.
7
+
8
+ Pick the shape by how clear the answers are. **Compact** is the default for a crisp prompt;
9
+ **full** when the surface is ambiguous, multi-screen, or the user asked to shape it as a
10
+ step. Don't pad a clear brief into a long one to look thorough.
11
+
12
+ ## Compact form (default)
13
+ ```markdown
14
+ # Design brief: <feature>
15
+ Slug: <kebab> Shaped: <iso> Register: brand | product Fidelity: <sketch|mid-fi|high-fi|production>
16
+
17
+ - **Building**: <one line — what + who it's for + the primary action>
18
+ - **Direction**: <color strategy> · density <airy|balanced|dense>/motion <minimal|standard|expressive> · "<scene sentence>" · anchors: <ref A, ref B> (+ references/<file> R-ids)
19
+ - **States**: <the states this surface needs, comma-listed>
20
+ - **Interaction**: <inline / navigated / modal · feedback · entry→completion in a phrase>
21
+ - **Confirm or override?** <the one or two things you still want the user to confirm>
22
+ ```
23
+
24
+ ## Full form
25
+ ```markdown
26
+ # Design brief: <feature>
27
+ Slug: <kebab> Shaped: <iso> Register: brand | product
28
+
29
+ ## 1. Summary
30
+ What this is, who it's for, what it must accomplish (2-3 sentences).
31
+
32
+ ## 2. Primary action
33
+ The single most important thing the user does or understands here. Everything else is secondary.
34
+
35
+ ## 3. Design direction
36
+ - Color strategy: Restrained | Committed | Multi-role | Saturated — why (from the scene, not the category).
37
+ - Calibration: density Airy | Balanced | Dense · motion Minimal | Standard | Expressive — from the scene (`../../devrites-frontend-craft/reference/quality-standards.md` — Calibration).
38
+ - Scene sentence: "<who uses it, where, under what light, in what mood>".
39
+ - Named anchors: <2-3 specific products / brands / objects> + saved references (R-ids → references/<file>).
40
+ - Departure: default (preserve identity) | departing because <explicit signal>.
41
+
42
+ ## 4. Scope *(task-scoped — not persisted to PRODUCT.md / DESIGN.md)*
43
+ Fidelity · breadth · interactivity · time intent.
44
+
45
+ ## 5. Layout & hierarchy
46
+ What gets emphasis; what's seen 1st / 2nd / 3rd; how information flows. Hierarchy, not CSS.
47
+
48
+ ## 6. Key states
49
+ Every state + what the user needs to see and feel:
50
+ | State | User sees / feels | Notes |
51
+ |---|---|---|
52
+ | default / populated | | |
53
+ | loading | | initial + subsequent |
54
+ | empty | | welcoming + the next action |
55
+ | error | | what happened + how to recover |
56
+ | success | | |
57
+ | disabled / no-permission | | |
58
+ | long-content / overflow / many items | | |
59
+
60
+ ## 7. Interaction model
61
+ Inline vs navigated vs (rarely) modal; optimistic vs pending; focus & keyboard; feedback on
62
+ every action; the flow from entry to completion.
63
+
64
+ ## 8. Content & copy
65
+ Labels, empty/error messages, microcopy in the product's voice. Realistic dynamic ranges.
66
+ For image-led surfaces: required media roles + likely source (project asset / generated /
67
+ SVG-CSS / icon library / accepted omission).
68
+
69
+ ## 9. Responsive & a11y
70
+ Reflow 320→1440 (what stacks / collapses / scrolls); focus order, labels, contrast,
71
+ keyboard, target size. Floor: `../../devrites-frontend-craft/reference/quality-standards.md`.
72
+
73
+ ## 10. Visual-direction probe
74
+ Which probe ran (figma / images / prototype / skipped — no tool), which direction won, what
75
+ changed in the brief because of it. Artifacts saved under `references/`.
76
+
77
+ ## 11. Open questions
78
+ Genuinely unresolved only. If you'd write "Recommend: X", decide X instead.
79
+
80
+ ## Build-time refinements *(appended by devrites-frontend-craft per slice)*
81
+ - Slice <N>: <decision made while building this surface + why>.
82
+ ```
83
+
84
+ ## How downstream phases use it
85
+ - `/rite-define` — UI slices map to the **Key states** + **Interaction model**; each UI
86
+ slice names which states it covers.
87
+ - `/rite-build` + `devrites-frontend-craft` — build **to** the brief; refine per slice;
88
+ append refinements above instead of re-deriving.
89
+ - `/rite-prove` + `browser-evidence.md` — verify the built UI against the brief's states +
90
+ references.
91
+ - `/rite-polish` — Phase 4 reads the brief so polish honors the agreed direction.
92
+ - `/rite-seal` + `devrites-frontend-reviewer` — check the UI matches the brief (states
93
+ covered, direction held, references matched).
@@ -0,0 +1,48 @@
1
+ # Visual-direction probe — test the lane before the brief locks
2
+
3
+ Before finalizing `design-brief.md`, pressure-test the visual direction with something
4
+ concrete instead of words — *when it will actually clarify the brief*. This is the
5
+ DevRites-native answer to "build it according to the design (Figma, images)": show a
6
+ direction, get a reaction, then write the brief.
7
+
8
+ ## When to run (all true)
9
+ - The work is **net-new** or directionally **ambiguous**. An existing surface to match →
10
+ skip; the supplied references already ARE the target.
11
+ - Fidelity is **mid-fi or higher**. Sketch-only planning → skip.
12
+ - A probe tool is actually available (below). **Capability-gated** — never ask the user to
13
+ install APIs or tooling. If none is available, **announce the skip in one line** and
14
+ proceed to the brief. The one-line announcement is required; it forces a conscious choice
15
+ instead of letting the step quietly evaporate.
16
+
17
+ ## Pick the probe by what's available (first match)
18
+ 1. **Figma reference supplied** → pull design context with the Figma integration (frames,
19
+ tokens, components, a screenshot of the target). Record what it dictates. A Figma frame
20
+ that conflicts with the project's design system is a **question for the user**, not a
21
+ silent choice.
22
+ 2. **Native image generation available** (Figma Make, an image-gen MCP, computer-use, or
23
+ similar) → generate **2-4 distinct direction probes** from the discovery answers (color
24
+ strategy, scene sentence, anchors). They must differ in **primary direction** —
25
+ hierarchy, density, typographic voice, topology — not just palette tweaks. Treat them as
26
+ *direction tests*, not final UI.
27
+ 3. **A code-fidelity question** ("which of these layouts actually works in our stack") →
28
+ route to **`/rite-prototype`** (2-4 real UI variations on one throwaway route). Prototype
29
+ is DevRites' existing tool for this; don't rebuild it here.
30
+ 4. **Reference sites / links only** → screenshot them (`devrites-browser-proof` tooling)
31
+ and read the relevant intent (tone, density, interaction).
32
+ 5. **Nothing available** → one-line skip, proceed.
33
+
34
+ ## How to use the result
35
+ - Ask which direction feels closest, what's off, what carries forward. Don't treat
36
+ generated imagery as final UX, copy, or accessibility behavior.
37
+ - If the probe reveals a mismatch, revise the **discovery inputs** (scene sentence, color
38
+ strategy, anchors) *before* writing the brief — that's the whole point of probing.
39
+ - Save probe artifacts (generated images, Figma exports, screenshots) into
40
+ `.devrites/work/<slug>/references/`, index them in `references.md` with what each shows,
41
+ and note the winning direction in the brief's **Visual-direction probe** section.
42
+
43
+ ## Limits
44
+ - Don't skip discovery because image generation is available.
45
+ - Don't run a probe for a minor refinement of existing work — it's for shaping a new
46
+ surface or a big directional choice.
47
+ - Don't block the brief on a slow or failing tool — try once, then skip with the one-line
48
+ note.
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: rite
3
+ description: DevRites menu + router. Without args, renders the menu. With a verb (e.g. `spec`, `build`, `review`), dispatches to the matching `rite-<verb>` skill — `/rite spec foo` is equivalent to `/rite-spec foo`. Use when the user types `/rite` or names a phase verb.
4
+ argument-hint: "[verb [args...]]"
5
+ user-invocable: true
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # /rite — DevRites menu + router
10
+
11
+ You are the DevRites entry point. Two modes:
12
+
13
+ - **No args** → render the menu (below), then stop. Do not execute a workflow phase. Do not read `state.md` / run evidence checks / list artifacts — that's `/rite-status`.
14
+ - **Verb arg** → dispatch to the matching `rite-<verb>` skill (see "Dispatch" below). The router is a pass-through: `/rite spec foo` ≡ `/rite-spec foo`; the called skill owns the output.
15
+
16
+ ## Dispatch
17
+
18
+ If `$ARGUMENTS` starts with a verb in this table, **load the matching skill and execute its workflow** with the remainder of `$ARGUMENTS` as that skill's argument. Try post-install path first, fall back to pre-install:
19
+
20
+ ```bash
21
+ V=<verb>; ARGS="<remaining args>"
22
+ F=.claude/skills/rite-$V/SKILL.md
23
+ [ -f "$F" ] || F=pack/.claude/skills/rite-$V/SKILL.md
24
+ # Then Read "$F" and follow its workflow with $ARGS as that skill's $ARGUMENTS.
25
+ ```
26
+
27
+ | Verb | Equivalent shortcut | Skill |
28
+ |---|---|---|
29
+ | `spec [feature]` | `/rite-spec` | start a feature — investigate + write spec.md |
30
+ | `adopt [area]` | `/rite-adopt` | onboard an existing codebase — reverse-derive spec.md + seed conventions |
31
+ | `temper [--mode]` | `/rite-temper` | optional strategic spec review (scope mode + pre-mortem) before define |
32
+ | `define` | `/rite-define` | turn the spec into plan + task slices |
33
+ | `vet [--cross-model]` | `/rite-vet` | optional engineering plan review (scope · architecture · tests · perf) before build |
34
+ | `plan [mode]` | `/rite-plan` | reshape / reslice / repair an active plan |
35
+ | `build [slice]` | `/rite-build` | implement exactly one vertical slice, then stop |
36
+ | `prove` | `/rite-prove` | full tests + browser proof |
37
+ | `polish [mode]` | `/rite-polish` | code + UI polish |
38
+ | `review [scope]` | `/rite-review` | multi-axis feature review |
39
+ | `seal` | `/rite-seal` | final GO / NO-GO decision |
40
+ | `ship` | `/rite-ship` | type-GO + commit/push/tag, then archive the task |
41
+ | `status [slug]` | `/rite-status` | active feature, next action, evidence |
42
+ | `doctor` | `/rite-doctor` | health check — install integrity, stale ACTIVE, orphaned gates, hook wiring |
43
+ | `use <slug>` | (inline) | switch the active feature — re-point `.devrites/ACTIVE` |
44
+ | `resolve <qid> "<answer>"` | `/rite-resolve` | answer a HITL gate |
45
+ | `prototype [question]` | `/rite-prototype` | throwaway prototype |
46
+ | `handoff [focus]` | `/rite-handoff` | compact chat → handoff doc |
47
+ | `zoom-out` | `/rite-zoom-out` | structural map of unfamiliar code |
48
+ | `pressure-test` | `/rite-pressure-test` | diverge → converge on a rough idea |
49
+ | `autocomplete [idea] [--ship]` | `/rite-autocomplete` | run the whole lifecycle unattended |
50
+ | `quick [change]` | `/rite-quick` | express lane — one small reversible change, build → prove → ship |
51
+ | `frame [task]` | `/rite-frame` | pre-flight goal-reframe + four-failure-mode self-audit for ad-hoc / express work |
52
+
53
+ The `/rite-<verb>` standalones remain user-invocable as direct shortcuts; both forms hit the same skill. Use whichever reads more naturally — the menu form (`/rite spec`) for discovery, the shortcut (`/rite-spec`) for muscle memory.
54
+
55
+ `use <slug>` is handled **inline** — there is no `rite-use` skill. Confirm
56
+ `.devrites/work/<slug>/` exists, then re-point `.devrites/ACTIVE` to `<slug>` and report
57
+ the now-active feature. It is cheap context-switching only — no re-spec, no phase run. If
58
+ the workspace is missing, list the slugs under `.devrites/work/` and stop.
59
+
60
+ Specialist triggers (model-invoked inside the above):
61
+ `devrites-frontend-craft` (UI) · `devrites-browser-proof` (UI verify) ·
62
+ `devrites-source-driven` (uncertain library) · `devrites-doubt` (non-trivial
63
+ decision) · `devrites-api-interface` (cross-boundary) ·
64
+ `devrites-audit <security|perf|simplify>` (single-axis review/polish pass) ·
65
+ `devrites-debug-recovery` (failures). Parallel reviewer fan-out at seal lives
66
+ inline in `/rite-seal` (see its `reference/parallel-dispatch.md`).
67
+
68
+ ## What to output
69
+
70
+ 1. **Verb in `$ARGUMENTS`** → dispatch per the table above. The called skill owns the response.
71
+ 2. **No args** → render the menu below, then stop.
72
+ 3. **Unrecognized first token** → tell the user the known verbs and stop. Don't guess.
73
+ 4. **No active feature** and the user asked "where am I" or named no verb → point at `/rite spec <feature>` (or `/rite-spec`). Don't summarize state yourself — `/rite status` (or `/rite-status`) owns that.
74
+
75
+ ## Gotchas
76
+ - No args → render the menu and stop. Don't execute a phase, read `state.md`, or summarize status — that's `/rite-status`.
77
+ - Unrecognized first token → list the known verbs and stop; never guess which phase the user meant.
78
+ - Pure pass-through: dispatch to the `rite-<verb>` skill and let it own the output; don't do the phase's work in the router.
79
+
80
+ ## Menu
81
+
82
+ ```
83
+ DevRites — disciplined senior-engineer workflow
84
+ menu form direct shortcut
85
+ SPEC /rite spec ≡ /rite-spec investigate deeply → write spec.md
86
+ ADOPT /rite adopt ≡ /rite-adopt onboard existing code → reverse-derive spec.md + seed conventions
87
+ TEMPER /rite temper ≡ /rite-temper optional — strategic review: scope mode + pre-mortem, harden the spec
88
+ PLAN /rite define ≡ /rite-define turn the spec into plan + task slices + state
89
+ VET /rite vet ≡ /rite-vet optional — engineering plan review: scope · architecture · tests · perf, harden the plan
90
+ REPLAN /rite plan ≡ /rite-plan decompose / reslice / repair an active plan
91
+ BUILD /rite build ≡ /rite-build implement exactly one verified vertical slice, then stop
92
+ PROVE /rite prove ≡ /rite-prove tests + build + runtime + browser evidence
93
+ POLISH /rite polish ≡ /rite-polish code polish always; UI normalize + polish if UI
94
+ REVIEW /rite review ≡ /rite-review feature-scoped multi-axis review
95
+ SEAL /rite seal ≡ /rite-seal final GO / NO-GO decision (no git)
96
+ SHIP /rite ship ≡ /rite-ship type-GO + commit/push/tag, then archive + clear ACTIVE
97
+ STATUS /rite status ≡ /rite-status active feature, next action, evidence, risks
98
+ DOCTOR /rite doctor ≡ /rite-doctor health check — install · stale ACTIVE · orphaned gates · hook wiring
99
+ SWITCH /rite use <slug> re-point .devrites/ACTIVE to another feature (inline)
100
+ RESUME /rite resolve ... ≡ /rite-resolve answer a HITL checkpoint
101
+ AUTO /rite autocomplete ... ≡ /rite-autocomplete run the whole lifecycle unattended (--ship to push)
102
+ QUICK /rite quick <change> ≡ /rite-quick express lane — one small reversible change (escalates if it grows)
103
+ UTILITY /rite frame | prototype | handoff | zoom-out | pressure-test (or direct /rite-* shortcuts)
104
+ ```
105
+
106
+ > **Small one-off change?** A typo, copy tweak, config bump, or one-function fix → **`/rite-quick`**
107
+ > (express lane: one contract → build → prove → ship, no full workspace). It escalates to
108
+ > `/rite-spec` the instant the change grows past small / reversible / unambiguous. The full
109
+ > lifecycle above is for real features — don't pay its ceremony for a one-off.
110
+
111
+ ## Core operating rules (every DevRites skill enforces)
112
+
113
+ The minimal version lives in `.claude/rules/core.md`; DevRites skills Read it as
114
+ their first step, and the other rule files load on demand. The rule list:
115
+
116
+ 1. **Right step, right time** — smallest relevant workflow; don't load everything.
117
+ 2. **No silent assumptions** — surface material assumptions; ask when the
118
+ answer changes scope, architecture, data model, UX, security, migration
119
+ risk, or acceptance.
120
+ 3. **No guessing through confusion** — if requirements / code / tests / docs
121
+ conflict, stop, name the conflict, present options, wait for resolution
122
+ when the answer changes the product.
123
+ 4. **Spec is living, not sacred** — change spec/plan only through the
124
+ Spec Drift Guard; never code against a known-wrong plan.
125
+ 5. **One slice at a time** — `/rite-build` does one slice then stops.
126
+ 6. **Evidence over confidence** — tests, builds, runtime, screenshots beat
127
+ assertions; record commands and output.
128
+ 7. **Feature scope only** — review / simplify / polish / security stay within
129
+ the active feature and touched files.
130
+ 8. **Prefer existing conventions** — follow the project's architecture,
131
+ components, tokens, tests, and commands.
132
+ 9. **Verify uncertain facts at the source** — when framework / library
133
+ behaviour matters and isn't certain, check the docs or source and record it.
134
+
135
+ Detail in [reference/menu.md](reference/menu.md) when needed.
@@ -0,0 +1,32 @@
1
+ # Menu reference
2
+
3
+ Phase-ordered command reference for `/rite`. Load only if the user wants detail on
4
+ what each command does or how phases connect.
5
+
6
+ ## Phases and commands
7
+
8
+ | Phase | Command | Use when |
9
+ |---|---|---|
10
+ | Spec | `/rite-spec <feature>` | **Start here.** Investigate deeply → write spec.md. Asks you with options; gathers any design references you attach (optional). |
11
+ | Temper | `/rite-temper` | _Optional, before define._ Strategic review of the spec — scope mode (expand/selective/hold-rigor/reduce) + pre-mortem; hardens the spec. Best on big/risky features; mandatory in `/rite-autocomplete`. |
12
+ | Plan | `/rite-define` | Turn the approved spec into plan + vertical task slices + state. |
13
+ | Re-plan | `/rite-plan` | The active plan is too big, wrong, stale, ambiguous, or blocked. |
14
+ | Build | `/rite-build` | Implement the next single vertical slice. Stops after one slice. |
15
+ | Prove | `/rite-prove` | Prove the current scope: tests, build, runtime, browser evidence. |
16
+ | Polish | `/rite-polish` | Code polish always; UI normalize + ship-quality polish if UI is in scope. Modes: `bolder/quieter/distill/harden/normalize-only`. |
17
+ | Review | `/rite-review` | Feature-scoped review before sealing. |
18
+ | Seal | `/rite-seal` | Final GO / NO-GO decision. |
19
+ | Status | `/rite-status` | See where the active feature stands. |
20
+
21
+ ## Typical orderings
22
+
23
+ - **Every feature**: `/rite-spec` (spec) → *(big feature? `/rite-temper` — strategic review)* →
24
+ `/rite-define` (plan) → `/rite-build` ×N (all slices) → `/rite-prove` (once all built) →
25
+ `/rite-polish` (always: code + UI if UI) → `/rite-review` → `/rite-seal`.
26
+ - **Drift mid-build**: stop → drift question → `/rite-plan` (repair) → resume build.
27
+
28
+ ## Rules this menu obeys
29
+
30
+ - `/rite` never edits code or runs a phase workflow.
31
+ - It reads `.devrites/ACTIVE` and `state.md` for status only.
32
+ - It suggests; the user (or Claude, when appropriate) invokes the real skill.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: rite-adopt
3
+ description: Bring an EXISTING codebase under DevRites — reverse-derive a `spec.md` of current behavior, placement, and architecture, and seed the project conventions ledger from the idioms the code already follows, then hand off to the lifecycle. Use when the user says "adopt this project", "onboard this codebase", "we already have code", "bring this repo into DevRites", or "reverse-engineer a spec from the existing app". Not for a brand-new feature or idea (use `/rite-spec`), planning an approved spec (`/rite-define`), or just mapping unfamiliar code without onboarding it (`/rite-zoom-out`).
4
+ argument-hint: "[path or area to adopt] [+ what you want to build next]"
5
+ user-invocable: true
6
+ ---
7
+
8
+ # /rite-adopt — brownfield on-ramp
9
+
10
+ The **reverse** of `/rite-spec`. `/rite-spec` goes idea → spec; `/rite-adopt` goes
11
+ **existing code → spec + seeded conventions**, so an already-built project can enter the
12
+ DevRites lifecycle without hand-writing a spec from nothing. It produces the same
13
+ `spec.md` the rest of the lifecycle expects, plus a head start in the conventions ledger
14
+ so the very first new slice already knows the project's idioms.
15
+
16
+ Use it once, at the start, to onboard a repo (or a sub-area of one). After it, the normal
17
+ lifecycle (`/rite-temper` → `/rite-define` → `/rite-build` …) takes over.
18
+
19
+ > **Just want a map, not an onboarding?** `/rite-zoom-out` returns a structural map of
20
+ > unfamiliar code without creating a workspace or ledger. `/rite-adopt` is the heavier move:
21
+ > it *commits the project to the lifecycle*. Pick zoom-out to look, adopt to begin.
22
+
23
+ ## Rules consulted (read on demand from `.claude/rules/`)
24
+ **Step 0:** Read `.claude/rules/core.md` first. Pull `documentation.md` when recording
25
+ the adoption decisions (why-not-what) in `decisions.md`.
26
+
27
+ ## Operating rules (DevRites core)
28
+ - No silent assumptions · prefer the project's existing conventions (you are *documenting*
29
+ them, not imposing new ones) · ask the human when the adoption scope or the next-build
30
+ objective is unclear.
31
+
32
+ ## Workflow
33
+ 0. **Read `.claude/rules/core.md`**, then run the shared orientation preamble:
34
+ ```bash
35
+ P=.claude/skills/devrites-lib/scripts/preamble.sh
36
+ [ -f "$P" ] || P="${CLAUDE_SKILL_DIR:-}/../devrites-lib/scripts/preamble.sh"
37
+ [ -f "$P" ] || P=pack/.claude/skills/devrites-lib/scripts/preamble.sh
38
+ [ -f "$P" ] && bash "$P" || echo "(orientation preamble unavailable on this install — read state.md directly to orient)"
39
+ ```
40
+ 1. **Scope the adoption** (`$ARGUMENTS`). Which repo or sub-area is being onboarded, and —
41
+ if stated — what the user wants to build *next* on top of it. If the next-build objective
42
+ is missing, ask once (it shapes the spec's acceptance); if the area is ambiguous, confirm
43
+ before investigating the whole tree.
44
+ 2. **Reverse-investigate the existing code** — the durable shape of the project. Use a
45
+ code-intelligence index if available — codebase-memory-mcp first (its `get_architecture`
46
+ gives a fast overview), cross-checked with codegraph + graphify, else standard methods
47
+ (LSP / Read/Grep/Glob); see `.claude/rules/tooling.md` — for
48
+ structure, callers, and impact. Capture, per [adoption](reference/adoption.md): **current
49
+ behavior**, **architecture + placement** (layers, seams, where each kind of thing lives),
50
+ the **commands** (test / build / typecheck / lint), and the **idioms** (naming, layering,
51
+ error model, test style) + recurring **gotchas**. Read `PRODUCT.md` / `DESIGN.md` /
52
+ `CLAUDE.md` / `AGENTS.md` if present.
53
+ 3. **Write `spec.md`** via [rite-spec's spec template](../rite-spec/reference/spec-template.md)
54
+ and create the workspace + set `.devrites/ACTIVE`
55
+ ([state-workspace](../rite-spec/reference/state-workspace.md)). The spec records the
56
+ **current behavior as the baseline** and the **next objective** (what adoption is for) with
57
+ measurable acceptance. Also write `decisions.md`, `assumptions.md`, `questions.md`, and
58
+ `state.md` (phase: spec).
59
+ 4. **Seed the conventions ledger** from what the investigation *observed* —
60
+ [adoption § seeding](reference/adoption.md). This is the deliberate bootstrap exception to
61
+ evidence-gated promotion: the seeds start at the base band and are provenance-tagged as
62
+ onboarding observations, not sealed-slice proofs, so real slices later corroborate or
63
+ (fresh-wins) contradict them.
64
+ 5. **Hand off.** The project is now in the lifecycle with a spec and a head-start ledger.
65
+ Point the user at `/rite-temper` (big/risky) or `/rite-define` (straightforward) — do not
66
+ plan or build here.
67
+
68
+ > **Mid-flight discipline.** Don't invent conventions the code doesn't actually follow, don't
69
+ > seed an idiom you only assumed, and don't expand scope into a rewrite — adoption documents
70
+ > what exists; the *next* feature changes it. See [`anti-patterns`](reference/anti-patterns.md).
71
+
72
+ ## Output
73
+
74
+ **Footer first** — render the progress footer (`progress.sh`, resolved like the step-0
75
+ preamble). Then:
76
+ ```
77
+ Adopted: <slug>
78
+ Baseline: <one-line summary of current behavior> Placement: <where it lives>
79
+ Next objective: <what we'll build on top>
80
+ Conventions seeded: <n> (commands · idioms · placement · gotchas)
81
+ Next: big / risky? → /rite-temper · straightforward? → /rite-define
82
+ ↻ Hygiene: /clear before the next phase (spec.md + decisions.md + the seeded ledger captured). See rules/context-hygiene.md.
83
+ ```
@@ -0,0 +1,58 @@
1
+ # Adoption — reverse-investigate + seed (the on-ramp contract)
2
+
3
+ Loaded on demand by `/rite-adopt`. Two jobs: document what the code already does (so the
4
+ lifecycle has a spec), and seed the conventions ledger (so the first slice knows the idioms).
5
+
6
+ ## Reverse-investigation — what to capture
7
+
8
+ Document the **durable shape** of the project, not a line-by-line tour:
9
+
10
+ - **Current behavior** — what the adopted area does today, from the user's perspective.
11
+ - **Architecture + placement** — the layers and seams; where each kind of thing lives
12
+ (where endpoints / components / models / migrations / tests go). Prefer a code-intelligence
13
+ index if available — codebase-memory-mcp first, cross-checked with codegraph + graphify, else standard methods (LSP / Read/Grep/Glob) (see
14
+ `../../../rules/tooling.md`) — for structure, callers, and impact.
15
+ - **Commands** — the real test / build / typecheck / lint commands (run or read them; don't
16
+ guess). Verify uncertain framework facts at the source.
17
+ - **Idioms** — naming + casing, layering, the error model, the result/exception style, the
18
+ http/data-access pattern, the test framework + file layout.
19
+ - **Gotchas** — non-obvious constraints the code encodes (ordering requirements, "don't call
20
+ X before Y", a framework quirk).
21
+
22
+ This feeds `spec.md` (current behavior as the baseline + the next objective) and the ledger
23
+ seeds below.
24
+
25
+ ## Seeding the conventions ledger
26
+
27
+ The deliberate **bootstrap exception** to evidence-gated promotion. Normally a convention is
28
+ promoted only when a *sealed slice proved it* (`/rite-seal`); adoption seeds from **observed
29
+ existing code** so the first slice isn't blind. Keep the seeds honest:
30
+
31
+ - Seed only what the code **actually and consistently** follows — not an aspiration, not a
32
+ one-off, not something you assumed.
33
+ - Each seed starts at the base band (one corroboration) and is provenance-tagged as an
34
+ onboarding observation, **not** a sealed-slice proof. Real slices later corroborate it
35
+ (raising the band) or, per fresh-observation-wins, contradict it.
36
+
37
+ ```bash
38
+ C=.claude/skills/devrites-lib/scripts/conventions.py
39
+ [ -f "$C" ] || C="${CLAUDE_SKILL_DIR:-}/../devrites-lib/scripts/conventions.py"
40
+ [ -f "$C" ] || C=pack/.claude/skills/devrites-lib/scripts/conventions.py
41
+ SLUG="$(cat .devrites/ACTIVE 2>/dev/null | tr -d '[:space:]')"
42
+ if command -v python3 >/dev/null 2>&1 && [ -f "$C" ]; then
43
+ python3 "$C" promote --slug "${SLUG}-adopt" \
44
+ --key test-runner --kind test \
45
+ --statement "tests run with <runner>, <file layout>" \
46
+ --evidence "observed during /rite-adopt onboarding (not yet slice-proven)"
47
+ # …one promote per durable convention the investigation actually observed
48
+ # (test-runner, build-cmd, error-model, http-client, endpoint-placement, …).
49
+ else
50
+ echo "(conventions ledger unavailable — python3 or script missing; skipping seed)"
51
+ fi
52
+ ```
53
+
54
+ The `-adopt` suffix on the slug marks the provenance as onboarding. Because the ledger is
55
+ read at orient as a *prior* and the live code always overrides it
56
+ ([`.claude/rules/security.md`](../../../rules/security.md) § Prompt-injection resistance),
57
+ an over-eager seed is self-correcting — but seed conservatively anyway; a wrong seed costs a
58
+ needless contradiction later.
@@ -0,0 +1,19 @@
1
+ # /rite-adopt — anti-patterns
2
+
3
+ Start with the universal table in [`../../../rules/anti-patterns.md`](../../../rules/anti-patterns.md).
4
+ Below are the rationalizations specific to onboarding an existing codebase.
5
+
6
+ ## Adoption-specific rationalizations
7
+
8
+ | Excuse | Rebuttal |
9
+ |---|---|
10
+ | "I'll improve this messy bit while I document it." | Adoption *documents* what exists; it changes nothing. A cleanup is the *next* feature through the normal lifecycle — recording it as a drive-by here hides the baseline and balloons the diff. |
11
+ | "This looks like the convention, so I'll seed it." | Seed only what the code *actually and consistently* follows. A guessed seed becomes a high-confidence-looking prior that steers the first slice wrong. Observe it in ≥2 places or leave it out. |
12
+ | "I'll spec the ideal architecture, not the current one." | The spec's baseline is *current behavior*. Aspirations go in the next objective, not the baseline — otherwise every later slice drifts against a spec that never matched reality. |
13
+ | "Whole repo in one adopt." | Onboard the area you'll actually work in. A repo-wide adopt produces an unfocused spec and a ledger full of conventions no slice will touch. |
14
+
15
+ ## Red flags
16
+
17
+ - A seeded convention with no concrete code location behind it.
18
+ - `spec.md` describing behavior the code does **not** currently have (that's the next feature, not the baseline).
19
+ - Editing source during adoption — adoption writes `.devrites/` + the ledger, never project code.