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.
- package/.claude-plugin/marketplace.json +24 -0
- package/.claude-plugin/plugin.json +43 -0
- package/CHANGELOG.md +391 -0
- package/LICENSE +56 -0
- package/NOTICE.md +18 -0
- package/README.md +582 -0
- package/SECURITY.md +193 -0
- package/bin/devrites.mjs +100 -0
- package/docs/architecture.md +272 -0
- package/docs/cli-mcp.md +57 -0
- package/docs/command-map.md +143 -0
- package/docs/flow.md +360 -0
- package/docs/release.md +29 -0
- package/docs/skills.md +214 -0
- package/docs/usage.md +325 -0
- package/install.sh +359 -0
- package/mcp/devrites-mcp.mjs +103 -0
- package/pack/.claude/agents/devrites-code-reviewer.md +50 -0
- package/pack/.claude/agents/devrites-doubt-reviewer.md +55 -0
- package/pack/.claude/agents/devrites-frontend-reviewer.md +52 -0
- package/pack/.claude/agents/devrites-performance-reviewer.md +47 -0
- package/pack/.claude/agents/devrites-plan-reviewer.md +79 -0
- package/pack/.claude/agents/devrites-security-auditor.md +53 -0
- package/pack/.claude/agents/devrites-simplifier-reviewer.md +75 -0
- package/pack/.claude/agents/devrites-slice-wright.md +181 -0
- package/pack/.claude/agents/devrites-spec-reviewer.md +72 -0
- package/pack/.claude/agents/devrites-strategy-reviewer.md +62 -0
- package/pack/.claude/agents/devrites-test-analyst.md +47 -0
- package/pack/.claude/hooks/devrites-a1-guard.sh +81 -0
- package/pack/.claude/hooks/devrites-allow.sh +44 -0
- package/pack/.claude/hooks/devrites-cursor.sh +28 -0
- package/pack/.claude/hooks/devrites-orient.sh +53 -0
- package/pack/.claude/hooks/devrites-redwatch.sh +39 -0
- package/pack/.claude/hooks/devrites-refresh-indexes.sh +127 -0
- package/pack/.claude/hooks/devrites-reviewer-readonly.sh +28 -0
- package/pack/.claude/hooks/devrites-statusline.sh +18 -0
- package/pack/.claude/hooks/devrites-stop-gate.sh +45 -0
- package/pack/.claude/hooks/devrites-wright-scope.sh +35 -0
- package/pack/.claude/hooks/hooks.json +52 -0
- package/pack/.claude/rules/README.md +48 -0
- package/pack/.claude/rules/afk-hitl.md +245 -0
- package/pack/.claude/rules/agents.md +98 -0
- package/pack/.claude/rules/anti-patterns.md +48 -0
- package/pack/.claude/rules/code-review.md +38 -0
- package/pack/.claude/rules/coding-style.md +55 -0
- package/pack/.claude/rules/context-hygiene.md +97 -0
- package/pack/.claude/rules/core.md +119 -0
- package/pack/.claude/rules/development-workflow.md +40 -0
- package/pack/.claude/rules/documentation.md +27 -0
- package/pack/.claude/rules/error-handling.md +33 -0
- package/pack/.claude/rules/git-workflow.md +35 -0
- package/pack/.claude/rules/hooks.md +38 -0
- package/pack/.claude/rules/patterns.md +45 -0
- package/pack/.claude/rules/performance.md +27 -0
- package/pack/.claude/rules/prose-style.md +101 -0
- package/pack/.claude/rules/security.md +63 -0
- package/pack/.claude/rules/testing.md +88 -0
- package/pack/.claude/rules/tooling.md +72 -0
- package/pack/.claude/settings.json +53 -0
- package/pack/.claude/skills/devrites-api-interface/SKILL.md +45 -0
- package/pack/.claude/skills/devrites-audit/SKILL.md +73 -0
- package/pack/.claude/skills/devrites-browser-proof/SKILL.md +38 -0
- package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +50 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/build-the-loop.md +47 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +17 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/hypotheses.md +17 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/instrumentation.md +21 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/regression-test.md +31 -0
- package/pack/.claude/skills/devrites-doubt/SKILL.md +75 -0
- package/pack/.claude/skills/devrites-frontend-craft/SKILL.md +96 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/craft.md +59 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/design-references.md +116 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/fullstack.md +45 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/quality-standards.md +215 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/reuse-first.md +59 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/shape.md +60 -0
- package/pack/.claude/skills/devrites-interview/SKILL.md +81 -0
- package/pack/.claude/skills/devrites-lib/SKILL.md +76 -0
- package/pack/.claude/skills/devrites-lib/scripts/analyze.sh +78 -0
- package/pack/.claude/skills/devrites-lib/scripts/check-acceptance.sh +75 -0
- package/pack/.claude/skills/devrites-lib/scripts/close-out.sh +47 -0
- package/pack/.claude/skills/devrites-lib/scripts/conventions.py +273 -0
- package/pack/.claude/skills/devrites-lib/scripts/coverage.sh +51 -0
- package/pack/.claude/skills/devrites-lib/scripts/devrites.sh +69 -0
- package/pack/.claude/skills/devrites-lib/scripts/doctor.sh +92 -0
- package/pack/.claude/skills/devrites-lib/scripts/evidence-fresh.sh +63 -0
- package/pack/.claude/skills/devrites-lib/scripts/footprint.sh +45 -0
- package/pack/.claude/skills/devrites-lib/scripts/learnings.sh +74 -0
- package/pack/.claude/skills/devrites-lib/scripts/mutation-gate.sh +52 -0
- package/pack/.claude/skills/devrites-lib/scripts/package-existence.sh +68 -0
- package/pack/.claude/skills/devrites-lib/scripts/preamble.sh +76 -0
- package/pack/.claude/skills/devrites-lib/scripts/progress.sh +103 -0
- package/pack/.claude/skills/devrites-lib/scripts/readiness.sh +62 -0
- package/pack/.claude/skills/devrites-lib/scripts/reconcile.sh +123 -0
- package/pack/.claude/skills/devrites-lib/scripts/resolve.sh +279 -0
- package/pack/.claude/skills/devrites-lib/scripts/stuck.sh +67 -0
- package/pack/.claude/skills/devrites-lib/scripts/test-integrity.sh +87 -0
- package/pack/.claude/skills/devrites-lib/scripts/tick-afk.sh +52 -0
- package/pack/.claude/skills/devrites-prose-craft/SKILL.md +105 -0
- package/pack/.claude/skills/devrites-prose-craft/reference/banned-phrases.md +95 -0
- package/pack/.claude/skills/devrites-prose-craft/reference/examples.md +88 -0
- package/pack/.claude/skills/devrites-prose-craft/reference/structures.md +134 -0
- package/pack/.claude/skills/devrites-refresh-indexes/SKILL.md +54 -0
- package/pack/.claude/skills/devrites-source-driven/SKILL.md +36 -0
- package/pack/.claude/skills/devrites-ux-shape/SKILL.md +121 -0
- package/pack/.claude/skills/devrites-ux-shape/reference/brief-template.md +93 -0
- package/pack/.claude/skills/devrites-ux-shape/reference/visual-direction-probe.md +48 -0
- package/pack/.claude/skills/rite/SKILL.md +135 -0
- package/pack/.claude/skills/rite/reference/menu.md +32 -0
- package/pack/.claude/skills/rite-adopt/SKILL.md +83 -0
- package/pack/.claude/skills/rite-adopt/reference/adoption.md +58 -0
- package/pack/.claude/skills/rite-adopt/reference/anti-patterns.md +19 -0
- package/pack/.claude/skills/rite-autocomplete/SKILL.md +96 -0
- package/pack/.claude/skills/rite-autocomplete/reference/decision-policy.md +35 -0
- package/pack/.claude/skills/rite-autocomplete/reference/loop.md +54 -0
- package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +59 -0
- package/pack/.claude/skills/rite-build/SKILL.md +261 -0
- package/pack/.claude/skills/rite-build/reference/afk-discipline.md +145 -0
- package/pack/.claude/skills/rite-build/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-build/reference/checkpoint-protocol.md +149 -0
- package/pack/.claude/skills/rite-build/reference/evidence-standard.md +32 -0
- package/pack/.claude/skills/rite-build/reference/frontend-trigger.md +39 -0
- package/pack/.claude/skills/rite-build/reference/one-slice-cycle.md +38 -0
- package/pack/.claude/skills/rite-build/reference/spec-drift-guard.md +43 -0
- package/pack/.claude/skills/rite-build/reference/tdd.md +26 -0
- package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +115 -0
- package/pack/.claude/skills/rite-define/SKILL.md +157 -0
- package/pack/.claude/skills/rite-define/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-define/reference/gates.md +152 -0
- package/pack/.claude/skills/rite-define/reference/plan-template.md +65 -0
- package/pack/.claude/skills/rite-doctor/SKILL.md +50 -0
- package/pack/.claude/skills/rite-frame/SKILL.md +116 -0
- package/pack/.claude/skills/rite-frame/reference/failure-modes.md +68 -0
- package/pack/.claude/skills/rite-handoff/SKILL.md +95 -0
- package/pack/.claude/skills/rite-handoff/reference/handoff-template.md +34 -0
- package/pack/.claude/skills/rite-learn/SKILL.md +82 -0
- package/pack/.claude/skills/rite-plan/SKILL.md +82 -0
- package/pack/.claude/skills/rite-plan/reference/anti-patterns.md +24 -0
- package/pack/.claude/skills/rite-plan/reference/dependency-graph.md +33 -0
- package/pack/.claude/skills/rite-plan/reference/replan-and-repair.md +42 -0
- package/pack/.claude/skills/rite-plan/reference/slicing.md +52 -0
- package/pack/.claude/skills/rite-plan/reference/task-breakdown.md +34 -0
- package/pack/.claude/skills/rite-polish/SKILL.md +90 -0
- package/pack/.claude/skills/rite-polish/reference/anti-ai-slop.md +177 -0
- package/pack/.claude/skills/rite-polish/reference/anti-patterns.md +27 -0
- package/pack/.claude/skills/rite-polish/reference/backend-polish.md +80 -0
- package/pack/.claude/skills/rite-polish/reference/browser-polish-evidence.md +31 -0
- package/pack/.claude/skills/rite-polish/reference/code.md +85 -0
- package/pack/.claude/skills/rite-polish/reference/design-system-discovery.md +35 -0
- package/pack/.claude/skills/rite-polish/reference/harden-checklist.md +109 -0
- package/pack/.claude/skills/rite-polish/reference/ui.md +136 -0
- package/pack/.claude/skills/rite-pressure-test/SKILL.md +43 -0
- package/pack/.claude/skills/rite-prototype/SKILL.md +87 -0
- package/pack/.claude/skills/rite-prove/SKILL.md +120 -0
- package/pack/.claude/skills/rite-prove/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-prove/reference/browser-proof.md +26 -0
- package/pack/.claude/skills/rite-prove/reference/failure-triage.md +25 -0
- package/pack/.claude/skills/rite-prove/reference/proof-ladder.md +26 -0
- package/pack/.claude/skills/rite-prove/reference/test-command-discovery.md +30 -0
- package/pack/.claude/skills/rite-quick/SKILL.md +81 -0
- package/pack/.claude/skills/rite-resolve/SKILL.md +113 -0
- package/pack/.claude/skills/rite-resolve/reference/answer-protocol.md +114 -0
- package/pack/.claude/skills/rite-review/SKILL.md +170 -0
- package/pack/.claude/skills/rite-review/reference/anti-patterns.md +32 -0
- package/pack/.claude/skills/rite-review/reference/cognitive-load.md +90 -0
- package/pack/.claude/skills/rite-review/reference/feature-scoped-review.md +26 -0
- package/pack/.claude/skills/rite-review/reference/five-axis-review.md +46 -0
- package/pack/.claude/skills/rite-review/reference/nielsen-heuristics.md +130 -0
- package/pack/.claude/skills/rite-review/reference/parallel-dispatch.md +62 -0
- package/pack/.claude/skills/rite-review/reference/performance-review.md +28 -0
- package/pack/.claude/skills/rite-review/reference/security-review.md +32 -0
- package/pack/.claude/skills/rite-seal/SKILL.md +183 -0
- package/pack/.claude/skills/rite-seal/reference/anti-patterns.md +27 -0
- package/pack/.claude/skills/rite-seal/reference/conventions-ledger.md +63 -0
- package/pack/.claude/skills/rite-seal/reference/final-evidence.md +72 -0
- package/pack/.claude/skills/rite-seal/reference/go-no-go.md +37 -0
- package/pack/.claude/skills/rite-seal/reference/parallel-dispatch.md +69 -0
- package/pack/.claude/skills/rite-seal/reference/risk-and-rollback.md +30 -0
- package/pack/.claude/skills/rite-seal/reference/seal-template.md +36 -0
- package/pack/.claude/skills/rite-ship/SKILL.md +120 -0
- package/pack/.claude/skills/rite-ship/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-ship/reference/close-out.md +31 -0
- package/pack/.claude/skills/rite-ship/reference/design-memory.md +120 -0
- package/pack/.claude/skills/rite-ship/reference/git-ship.md +42 -0
- package/pack/.claude/skills/rite-ship/reference/ship-template.md +33 -0
- package/pack/.claude/skills/rite-spec/SKILL.md +126 -0
- package/pack/.claude/skills/rite-spec/reference/acceptance-criteria.md +31 -0
- package/pack/.claude/skills/rite-spec/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-spec/reference/interview-patterns.md +56 -0
- package/pack/.claude/skills/rite-spec/reference/investigation.md +64 -0
- package/pack/.claude/skills/rite-spec/reference/question-protocol.md +61 -0
- package/pack/.claude/skills/rite-spec/reference/references-intake.md +57 -0
- package/pack/.claude/skills/rite-spec/reference/spec-checklists.md +73 -0
- package/pack/.claude/skills/rite-spec/reference/spec-template.md +124 -0
- package/pack/.claude/skills/rite-spec/reference/state-workspace.md +159 -0
- package/pack/.claude/skills/rite-status/SKILL.md +101 -0
- package/pack/.claude/skills/rite-temper/SKILL.md +119 -0
- package/pack/.claude/skills/rite-temper/reference/anti-patterns.md +29 -0
- package/pack/.claude/skills/rite-temper/reference/review-dimensions.md +65 -0
- package/pack/.claude/skills/rite-temper/reference/scope-modes.md +53 -0
- package/pack/.claude/skills/rite-temper/reference/significance.md +46 -0
- package/pack/.claude/skills/rite-temper/reference/strategy-template.md +90 -0
- package/pack/.claude/skills/rite-vet/SKILL.md +155 -0
- package/pack/.claude/skills/rite-vet/reference/anti-patterns.md +29 -0
- package/pack/.claude/skills/rite-vet/reference/artifacts.md +135 -0
- package/pack/.claude/skills/rite-vet/reference/cross-model.md +41 -0
- package/pack/.claude/skills/rite-vet/reference/depth.md +53 -0
- package/pack/.claude/skills/rite-vet/reference/eng-lenses.md +48 -0
- package/pack/.claude/skills/rite-vet/reference/review-axes.md +167 -0
- package/pack/.claude/skills/rite-zoom-out/SKILL.md +75 -0
- package/package.json +68 -0
- package/scripts/build-release-tarball.sh +74 -0
- package/scripts/check-cross-refs.py +121 -0
- package/scripts/check-no-global-writes.sh +44 -0
- package/scripts/check-rule-uniqueness.sh +73 -0
- package/scripts/devrites-detect.sh +175 -0
- package/scripts/eval-runner.py +273 -0
- package/scripts/grade-feature.sh +104 -0
- package/scripts/install-lib.sh +83 -0
- package/scripts/pin.sh +166 -0
- package/scripts/render-eval-summary.py +48 -0
- package/scripts/run-evals.sh +149 -0
- package/scripts/run-outcome-evals.sh +49 -0
- package/scripts/scan-pack-security.py +209 -0
- package/scripts/scan-supply-chain-iocs.py +127 -0
- package/scripts/supply-chain-iocs.json +11 -0
- package/scripts/sync-version.sh +56 -0
- package/scripts/validate-frontmatter.py +149 -0
- package/scripts/validate-workflow-security.py +86 -0
- package/scripts/validate.sh +234 -0
- package/uninstall.sh +137 -0
- package/update.sh +196 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Normalize + UI quality (Phase 3 + Phase 4)
|
|
2
|
+
|
|
3
|
+
Loaded from `/rite-polish` only when the diff touches UI. Two phases, strict
|
|
4
|
+
order: normalize to the design system (Phase 3), then the ship-quality detail
|
|
5
|
+
pass (Phase 4). Normalize removes drift and aligns to the system; polish sweats
|
|
6
|
+
the details. Skipping normalize means polishing drift.
|
|
7
|
+
|
|
8
|
+
## Operating rules
|
|
9
|
+
|
|
10
|
+
- **NEVER polish without normalizing first** — decoration on drift is banned.
|
|
11
|
+
Phase 3 runs before Phase 4, always.
|
|
12
|
+
- Browser evidence required for UI polish when a browser can run
|
|
13
|
+
([browser-polish-evidence.md](browser-polish-evidence.md)).
|
|
14
|
+
- Don't invent a new design system. Ask when design-system principles are
|
|
15
|
+
ambiguous. Spec Drift Guard applies (a design-system contradiction is drift).
|
|
16
|
+
|
|
17
|
+
## Why this order
|
|
18
|
+
|
|
19
|
+
A beautiful component that ignores the project's tokens, components, and flow
|
|
20
|
+
shape is *worse* than a plain one that fits — it adds a second system the team
|
|
21
|
+
must maintain. Alignment is the precondition for polish, not an optional first
|
|
22
|
+
step. **Fixing the symptom without naming the cause is how drift compounds:**
|
|
23
|
+
patching a colour without adding the token bakes the next drift in; swapping a
|
|
24
|
+
class without moving to the shared component leaves the next caller to redo the
|
|
25
|
+
work.
|
|
26
|
+
|
|
27
|
+
## Phase 3 — Normalize
|
|
28
|
+
|
|
29
|
+
Goal: this feature looks and behaves like it belongs in *this* product.
|
|
30
|
+
|
|
31
|
+
1. **Discover the design system**
|
|
32
|
+
([design-system-discovery.md](design-system-discovery.md)): docs, tokens,
|
|
33
|
+
shared components, spacing/type scales, color roles, icon set, interaction
|
|
34
|
+
& form patterns, neighboring screens.
|
|
35
|
+
2. **Identify drift by root cause**, classifying each into one of **three
|
|
36
|
+
buckets** — the bucket dictates the fix:
|
|
37
|
+
|
|
38
|
+
| Bucket | What it is | Fix |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| **Token gap** | A value is hard-coded where a token should carry it (colour, spacing, type size, radius, shadow). | Use the existing token; if a needed slot doesn't exist, propose adding it to the system — don't invent one inline. |
|
|
41
|
+
| **Component miss** | A one-off implementation exists where a shared component already covers the case (button, input, dialog, menu, table row). | Swap to the shared component. Don't fork it into the feature folder. |
|
|
42
|
+
| **Flow / IA misalignment** | The feature's flow shape, naming, or mental model doesn't match neighbouring features (modal where the project goes inline; save-on-blur where the project uses explicit submit; new vocabulary for an existing concept). | Reshape the flow / rename to the project's vocabulary. The most expensive bucket — and the most damaging if skipped. |
|
|
43
|
+
|
|
44
|
+
Sub-cases that map back to the buckets above: generic-AI-template styling →
|
|
45
|
+
**Token gap** (hard-coded styling that should ride a token) or **Component
|
|
46
|
+
miss** (rebuilt instead of reused); orphaned styles or components this
|
|
47
|
+
feature created → **Component miss** (consolidate or remove); inconsistent
|
|
48
|
+
IA / naming → **Flow / IA misalignment**.
|
|
49
|
+
3. **Fix root causes, not symptoms** — use existing tokens, swap to shared
|
|
50
|
+
components, align flow shape with neighbors, consolidate duplication, remove
|
|
51
|
+
obsolete styles created by this feature. Ask the user when a design-system
|
|
52
|
+
principle is genuinely ambiguous — don't guess the system's intent.
|
|
53
|
+
|
|
54
|
+
## Phase 4 — UI polish
|
|
55
|
+
|
|
56
|
+
Only after functionality is complete **and** Phase 3 is done. Systematic detail
|
|
57
|
+
pass against the UI quality bar below — zoom in, squint, use the thing. Little
|
|
58
|
+
things add up.
|
|
59
|
+
|
|
60
|
+
Meet the **2026 quality bar** — CWV (LCP ≤ 2.5s / INP ≤ 200ms / CLS ≤ 0.1) and
|
|
61
|
+
WCAG 2.2 AA. Avoid [anti-ai-slop.md](anti-ai-slop.md). If the spec saved design
|
|
62
|
+
references in `references/`, **match them**.
|
|
63
|
+
|
|
64
|
+
Run the production-hardening sweep before declaring polish done — extreme
|
|
65
|
+
inputs, errors, network, i18n, permission states — per
|
|
66
|
+
[harden-checklist.md](harden-checklist.md). Polish that only works on the happy
|
|
67
|
+
path isn't polish.
|
|
68
|
+
|
|
69
|
+
### UI quality bar (checklist)
|
|
70
|
+
|
|
71
|
+
- [ ] **Aligned to the design system** — drift named and resolved by root cause (Phase 3)
|
|
72
|
+
- [ ] **IA & flow** match neighboring features
|
|
73
|
+
- [ ] **Visual hierarchy** — the primary action is obviously primary
|
|
74
|
+
- [ ] **Spacing** uses design tokens consistently; rhythm reads as deliberate
|
|
75
|
+
- [ ] **Alignment** perfect at every breakpoint
|
|
76
|
+
- [ ] **Typography** hierarchy consistent; line length sane (65–75ch prose)
|
|
77
|
+
- [ ] **Color & contrast** — semantic roles; text ≥ 4.5:1 (≥ 3:1 large/UI), WCAG 2.2 AA
|
|
78
|
+
- [ ] **All interaction states** — hover, active, focus, disabled, selected
|
|
79
|
+
- [ ] **Focus states visible** and **keyboard navigation** works
|
|
80
|
+
- [ ] **Loading** states clear; **empty** states welcoming with a next action
|
|
81
|
+
- [ ] **Error** states helpful (what happened + how to recover); **success** states clear
|
|
82
|
+
- [ ] **Forms** properly labeled, validated, with inline errors
|
|
83
|
+
- [ ] **Copy & terminology** consistent with the product's vocabulary
|
|
84
|
+
- [ ] **Icons** consistent set, properly sized and aligned
|
|
85
|
+
- [ ] **Responsive** behavior correct across target viewports
|
|
86
|
+
- [ ] **Target size** ≥ 24×24px (WCAG 2.2 AA); ≥ 44×44px for primary touch; **no drag-only** actions
|
|
87
|
+
- [ ] **Motion** smooth (~60fps), purposeful; **reduced-motion** respected
|
|
88
|
+
- [ ] **Performance basics** — no obvious jank, oversized images, or blocking work
|
|
89
|
+
- [ ] **No console errors or warnings**
|
|
90
|
+
- [ ] **No layout shift** on load
|
|
91
|
+
- [ ] Works in the project's **supported browsers**
|
|
92
|
+
- [ ] **Code quality** in touched UI files — no TODOs, console.logs, commented-out code
|
|
93
|
+
|
|
94
|
+
### Measurable bar (2026)
|
|
95
|
+
|
|
96
|
+
Polish verifies against the frontend quality standards
|
|
97
|
+
(`devrites-frontend-craft/reference/quality-standards.md`), measured not assumed:
|
|
98
|
+
- Core Web Vitals (p75): **LCP ≤ 2.5 s · INP ≤ 200 ms · CLS ≤ 0.1**.
|
|
99
|
+
- WCAG 2.2 AA: semantic HTML, keyboard-operable, visible focus ≥ 3:1, no drag-only.
|
|
100
|
+
- Responsive at **320 / 768 / 1024 / 1440**; survives 200% text zoom; no horizontal scroll.
|
|
101
|
+
- No console errors/warnings; no axe violations; `prefers-reduced-motion` honored.
|
|
102
|
+
Cite the evidence in `browser-evidence.md`.
|
|
103
|
+
|
|
104
|
+
### Triage
|
|
105
|
+
|
|
106
|
+
If it ships in 30 minutes, fix what users will actually notice (hierarchy,
|
|
107
|
+
states, broken layout, bad copy) before micro-spacing. Don't introduce bugs
|
|
108
|
+
while polishing — re-prove after changes.
|
|
109
|
+
|
|
110
|
+
### Refinement modes (optional dials within Phase 4)
|
|
111
|
+
|
|
112
|
+
| Mode | When | What it means |
|
|
113
|
+
|---|---|---|
|
|
114
|
+
| **bolder** | Surface reads safe / generic / forgettable. | Stronger hierarchy + weight contrast, one decisive accent, more committed scale. Reject generic-bold reflexes — gradients, glassmorphism, neon. |
|
|
115
|
+
| **quieter** | Surface reads loud / overstimulating. | Reduce chroma, increase whitespace, flatten elevation, soften motion. Personality stays; intensity drops. |
|
|
116
|
+
| **distill** | Too many elements / colours / sizes competing. | Remove anything that doesn't earn its place: redundant copy, decorative shadows/borders. One primary action per screen. |
|
|
117
|
+
| **harden** | Surface only works on the happy path. | Walk [harden-checklist.md](harden-checklist.md) explicitly. Design every error / empty / partial / offline state. |
|
|
118
|
+
|
|
119
|
+
Modes are advisory. Default Phase 4 covers all four already; the mode just
|
|
120
|
+
shifts the emphasis of the same pass when the brief asks for it.
|
|
121
|
+
|
|
122
|
+
## NEVER
|
|
123
|
+
|
|
124
|
+
- Polish before it's functionally complete.
|
|
125
|
+
- Polish without aligning first (decoration on drift).
|
|
126
|
+
- Guess at design-system principles instead of asking.
|
|
127
|
+
- Introduce bugs while polishing (re-prove after changes).
|
|
128
|
+
- Invent a new design system or add a component/icon library without asking.
|
|
129
|
+
|
|
130
|
+
## Output → appends to `polish-report.md`
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
Phase 3 (normalize): drift found → root-cause fixes
|
|
134
|
+
Phase 4 (UI polish): quality-bar deltas
|
|
135
|
+
Browser evidence: <summary>
|
|
136
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rite-pressure-test
|
|
3
|
+
description: Pressure-test a rough idea — diverge into 3-5 genuinely different options, then converge on one with the trade-off and decision hinge. Use when the user says "ideate", "refine this idea", "stress-test my plan", "I have a vague idea", or `/rite-spec` flags the concept as rough. Not for writing the spec (use `/rite-spec`).
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# rite-pressure-test — diverge then converge
|
|
8
|
+
|
|
9
|
+
Use when the *idea* (not just the requirements) is rough. Generate options, then commit
|
|
10
|
+
to one — so `/rite-spec` has a real direction to specify.
|
|
11
|
+
|
|
12
|
+
Read `.claude/rules/core.md` first — its operating rules (no silent assumptions, prefer
|
|
13
|
+
existing conventions) shape the divergence. The other rule files load on demand.
|
|
14
|
+
|
|
15
|
+
## Diverge (widen)
|
|
16
|
+
- Generate 3–5 genuinely different approaches to the underlying goal, not variations of
|
|
17
|
+
one. Cover at least: the obvious approach, a simpler/smaller approach, and a
|
|
18
|
+
different-shape approach (different data model, flow, or boundary).
|
|
19
|
+
- For each: one-line description, what it optimizes for, rough cost, main risk.
|
|
20
|
+
- Stay concrete — name real entities, flows, and surfaces, not abstractions.
|
|
21
|
+
|
|
22
|
+
## Converge (commit)
|
|
23
|
+
- Weigh options against the goal, constraints, and existing codebase conventions.
|
|
24
|
+
- Recommend one, with the reason and the key trade-off accepted.
|
|
25
|
+
- Note what would change the recommendation (the decision's hinge).
|
|
26
|
+
|
|
27
|
+
## Boundaries
|
|
28
|
+
- This is exploration, not specification. Output a **direction**, not a finished spec —
|
|
29
|
+
`/rite-spec` writes the spec.
|
|
30
|
+
- Don't over-explore: 3–5 options, one pass of convergence. If the user already knows
|
|
31
|
+
the direction, skip this and go straight to `/rite-spec`.
|
|
32
|
+
- Ask the user to pick when two options are close and the choice changes the product.
|
|
33
|
+
|
|
34
|
+
## Output
|
|
35
|
+
```
|
|
36
|
+
Goal (restated): ...
|
|
37
|
+
Options:
|
|
38
|
+
A. <approach> — optimizes <x>, cost <y>, risk <z>
|
|
39
|
+
B. ...
|
|
40
|
+
Recommendation: <option> because <reason>; trade-off accepted: <...>
|
|
41
|
+
Hinge: <what would change this>
|
|
42
|
+
Next: /rite-spec <feature> (using the chosen direction)
|
|
43
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rite-prototype
|
|
3
|
+
description: Throwaway prototype answering ONE design question — either a runnable Logic harness or 2–4 radically different UI variations on one route — then delete or absorb. Use when the user says "prototype this", "sanity-check the data model", "try a few UI designs", "let me play with it", "mock it up". Not for production code.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
argument-hint: "[the question the prototype is answering]"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /rite-prototype — throwaway code that answers ONE question
|
|
9
|
+
|
|
10
|
+
A prototype is **throwaway code that answers exactly one question**. The question
|
|
11
|
+
chooses the shape — get the shape wrong and the whole prototype wastes the user's time.
|
|
12
|
+
|
|
13
|
+
## 0. Read core rules
|
|
14
|
+
|
|
15
|
+
Read `.claude/rules/core.md` first — the operating rules and the "capture the answer"
|
|
16
|
+
persistence discipline apply even to throwaway code. The other rule files load on demand.
|
|
17
|
+
|
|
18
|
+
## 1. Name the question
|
|
19
|
+
|
|
20
|
+
If the user did not give the question explicitly, ask **one** short question to pin it
|
|
21
|
+
down. Examples that count as "the question":
|
|
22
|
+
|
|
23
|
+
- "Does this reducer correctly model add / undo / re-add of the same item?"
|
|
24
|
+
- "Which of these three settings layouts feels right?"
|
|
25
|
+
- "Will the proposed state machine deadlock when X overlaps Y?"
|
|
26
|
+
|
|
27
|
+
A vague question ("explore this feature") is not enough — push back once to sharpen it.
|
|
28
|
+
|
|
29
|
+
## 2. Pick the branch
|
|
30
|
+
|
|
31
|
+
Read the user's prompt + the surrounding code. Two branches:
|
|
32
|
+
|
|
33
|
+
| Question shape | Branch | Artifact |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| "Does this **logic / state / data model** behave right?" | **Logic** | Smallest runnable harness — terminal script / REPL / mini node or python file — that pushes the model through the hard cases. |
|
|
36
|
+
| "What should this **look like / which UX wins**?" | **UI** | 2–4 **radically different** UI variations on a single route, switchable via a query param + a small floating selector bar. |
|
|
37
|
+
|
|
38
|
+
If genuinely ambiguous and the user is AFK: pick by the surrounding code (backend module
|
|
39
|
+
→ Logic; page / component → UI) and state the assumption in a comment at the top.
|
|
40
|
+
|
|
41
|
+
**Variations must differ in shape.** UI prototypes where the variations are just colour
|
|
42
|
+
or padding tweaks teach nothing — push each variation to a different *information
|
|
43
|
+
architecture* / *interaction model* so the user can pick a direction, not a polish.
|
|
44
|
+
|
|
45
|
+
## 3. Rules that apply to both branches
|
|
46
|
+
|
|
47
|
+
1. **Throwaway from day one — and visibly so.** Place the prototype next to where it
|
|
48
|
+
will eventually be used (so context is obvious) but name it so a casual reader sees
|
|
49
|
+
it's a prototype: `prototype/`, `__prototype__`, `.scratch/`, etc. Obey the project's
|
|
50
|
+
existing routing / module convention; don't invent a new top-level structure.
|
|
51
|
+
2. **One command to run.** Use whatever task runner the project already has — `pnpm
|
|
52
|
+
<name>`, `python <path>`, `bun <path>`. The user must start it without thinking.
|
|
53
|
+
3. **No persistence by default.** State lives in memory. Persistence is usually the
|
|
54
|
+
thing the prototype is *checking*, not a dependency. If the question explicitly
|
|
55
|
+
involves a DB, hit a scratch DB or a local file with a name like
|
|
56
|
+
`PROTOTYPE — wipe me`.
|
|
57
|
+
4. **Skip the polish.** No tests. No error handling beyond what makes it run. No
|
|
58
|
+
abstractions. The point is learn fast, delete fast.
|
|
59
|
+
5. **Surface state.** After every action (Logic) or on every variant switch (UI), print
|
|
60
|
+
or render the full relevant state so the user can see what changed.
|
|
61
|
+
6. **Delete or absorb when done.** When the question has an answer, either delete the
|
|
62
|
+
prototype or fold the validated decision into the real code — don't leave it
|
|
63
|
+
rotting in the repo.
|
|
64
|
+
|
|
65
|
+
## 4. Capture the answer
|
|
66
|
+
|
|
67
|
+
The *answer* is the only durable output. Before declaring the prototype done, write
|
|
68
|
+
one of:
|
|
69
|
+
|
|
70
|
+
- An entry in the active feature's `decisions.md` (`.devrites/work/<slug>/decisions.md`)
|
|
71
|
+
with the question and the answer.
|
|
72
|
+
- A `NOTES.md` next to the prototype if no active feature exists.
|
|
73
|
+
|
|
74
|
+
If the user is around, this is a quick conversation. If they're AFK, leave a placeholder
|
|
75
|
+
("VERDICT: ___") so the next pass fills it in before the prototype is deleted.
|
|
76
|
+
|
|
77
|
+
## Where this slots in
|
|
78
|
+
|
|
79
|
+
`/rite-prototype` is a **scoped detour**, not a phase of its own. Typical placements:
|
|
80
|
+
|
|
81
|
+
- **Between `/rite-spec` and `/rite-define`** — a design question is undecidable on
|
|
82
|
+
paper; prototype it, capture the answer, return to `/rite-define`.
|
|
83
|
+
- **Mid-build** — `/rite-build` hit a state-model ambiguity that the spec doesn't
|
|
84
|
+
resolve. Drop into a Logic prototype, capture the answer, return.
|
|
85
|
+
|
|
86
|
+
After the prototype answers the question and the answer is recorded, return to the
|
|
87
|
+
calling phase. The prototype itself does **not** ship.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rite-prove
|
|
3
|
+
description: Prove the completed feature — full tests + build + typecheck + lint + browser-proof ladder — walking `spec.md` acceptance criteria one by one. Use when the user says "prove this", "run the full tests", "is this feature really done", "check it end-to-end". Not for single-slice or pre-completion proof.
|
|
4
|
+
argument-hint: "[feature-slug]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /rite-prove — prove the completed feature
|
|
9
|
+
|
|
10
|
+
Turn "I think it works" into recorded evidence for the **whole feature**. Read the active
|
|
11
|
+
workspace first; if none, run `/rite-spec <feature>`.
|
|
12
|
+
|
|
13
|
+
> **Differs from built-in `/verify` and `/run` in:** `/verify` proves a
|
|
14
|
+
> single change; `/run` launches the app. `/rite-prove` is feature-scoped:
|
|
15
|
+
> it walks `spec.md` acceptance criteria one-by-one, runs the full relevant
|
|
16
|
+
> test suite + build/typecheck/lint, ascends the browser-proof ladder
|
|
17
|
+
> (browser-harness → DevTools MCP → `/run`+`/verify` → project E2E →
|
|
18
|
+
> manual), and writes `evidence.md` + `browser-evidence.md` keyed to the
|
|
19
|
+
> active `.devrites/work/<slug>/`. Use `/verify` or `/run` on their own
|
|
20
|
+
> when there is no DevRites feature workspace.
|
|
21
|
+
|
|
22
|
+
## Gate: all slices must be built first
|
|
23
|
+
Read `tasks.md` + `state.md`. **If ANY slice is still pending/unbuilt, STOP** and tell the
|
|
24
|
+
user to finish it with `/rite-build` — `/rite-prove` runs once, when the full task is
|
|
25
|
+
complete, not after each slice. (Each slice already got its own targeted tests during
|
|
26
|
+
`/rite-build`; this phase is the comprehensive proof of the assembled feature.)
|
|
27
|
+
|
|
28
|
+
**Never report a pass you didn't observe.** If a command couldn't run, say so and give exact manual steps.
|
|
29
|
+
|
|
30
|
+
**Re-runnable, scoped.** `/rite-prove` runs once when the full feature is assembled, but
|
|
31
|
+
it can be **re-run scoped** afterwards: when `/rite-polish` or `/rite-review` edit code,
|
|
32
|
+
the existing `evidence.md` no longer post-dates the change, so re-run `/rite-prove` over
|
|
33
|
+
the affected criteria/routes to refresh proof before `/rite-seal`.
|
|
34
|
+
|
|
35
|
+
## Rules consulted (read on demand from `.claude/rules/`)
|
|
36
|
+
**Step 0:** Read `.claude/rules/core.md` first. The other rule files load on demand;
|
|
37
|
+
pull these via `Read` when relevant:
|
|
38
|
+
- `testing.md` — pyramid, determinism, no-flake discipline.
|
|
39
|
+
- `performance.md` — measure first when perf is in scope.
|
|
40
|
+
|
|
41
|
+
## Operating rules
|
|
42
|
+
- Evidence over confidence. Feature scope only — fix within the feature or record a
|
|
43
|
+
blocker; don't refactor unrelated code.
|
|
44
|
+
- Spec Drift Guard applies: if tests/evidence reveal the spec is wrong, stop and handle
|
|
45
|
+
drift (`rite-build/reference/spec-drift-guard.md`).
|
|
46
|
+
|
|
47
|
+
## Workflow
|
|
48
|
+
0. Read `.claude/rules/core.md` first (the always-on operating rules); pull the
|
|
49
|
+
on-demand rules above when relevant.
|
|
50
|
+
Then **run the shared orientation preamble** — it prints `state.md`, the artifacts present,
|
|
51
|
+
the run mode (HITL/AFK), and the open-question tally by gate, so you orient deterministically
|
|
52
|
+
instead of re-deriving state from raw Markdown:
|
|
53
|
+
```bash
|
|
54
|
+
P=.claude/skills/devrites-lib/scripts/preamble.sh
|
|
55
|
+
[ -f "$P" ] || P="${CLAUDE_SKILL_DIR:-}/../devrites-lib/scripts/preamble.sh"
|
|
56
|
+
[ -f "$P" ] || P=pack/.claude/skills/devrites-lib/scripts/preamble.sh
|
|
57
|
+
[ -f "$P" ] && bash "$P" || echo "(orientation preamble unavailable on this install — read state.md directly to orient)"
|
|
58
|
+
```
|
|
59
|
+
1. **Confirm the gate** (all slices built). Read `spec.md` (acceptance criteria +
|
|
60
|
+
"Commands discovered"), `tasks.md`, `state.md`, `test-plan.md` if present (the vetted
|
|
61
|
+
coverage target from `/rite-vet`), and the full `git diff`.
|
|
62
|
+
2. **Discover commands** if not recorded —
|
|
63
|
+
[test-command-discovery](reference/test-command-discovery.md): README, package
|
|
64
|
+
scripts, Makefile, CI configs, Gemfile/Rakefile, pyproject, go.mod, Cargo.toml.
|
|
65
|
+
3. **Run the full relevant test suite** for the feature (not a single slice), then the
|
|
66
|
+
relevant **build / typecheck / lint**.
|
|
67
|
+
4. **UI feature?** Run the browser proof ladder over the feature's routes —
|
|
68
|
+
[proof-ladder](reference/proof-ladder.md) + [browser-proof](reference/browser-proof.md)
|
|
69
|
+
(`devrites-browser-proof`): routes, viewports, screenshots (opened + described),
|
|
70
|
+
console, network, interaction paths, and design-reference match if references exist.
|
|
71
|
+
5. **Map results to acceptance** — walk `spec.md` acceptance criteria; note which are now
|
|
72
|
+
proven and which aren't. If `test-plan.md` exists, also walk its acceptance→test map and
|
|
73
|
+
per-gap requirements — a planned test (especially a regression-Critical) with no covering
|
|
74
|
+
result is an unproven gap, not a pass. **Also walk the test-plan interaction inventory**
|
|
75
|
+
(every interactive element + user flow): each must have a passing asserting test. An
|
|
76
|
+
element/flow with no asserting result is an **unproven gap = blocker** — a NO-GO at
|
|
77
|
+
`/rite-seal`, the same standing as an unproven acceptance criterion (`testing.md`
|
|
78
|
+
"Completeness"). For UI, the browser proof (step 4) demonstrates the flows; the asserting
|
|
79
|
+
tests prove the elements.
|
|
80
|
+
5a. **Assertion-strength spot check (critical paths).** For each regression-Critical /
|
|
81
|
+
irreversible / data-loss path, confirm the covering test actually *can* fail: reject
|
|
82
|
+
tautological assertions (`toBeDefined`-only, asserting the mock), and **fault-inject** —
|
|
83
|
+
break the code on purpose (flip a comparison, drop a guard) and confirm the test goes red,
|
|
84
|
+
then revert. Run the project's mutation-testing tool over the touched criticals if it has
|
|
85
|
+
one. A test that stays green on deliberately broken code is an unproven gap, not a pass
|
|
86
|
+
(`testing.md` "Assertion strength"). Record what was fault-checked in `evidence.md`.
|
|
87
|
+
Run the deterministic gates rather than eyeballing:
|
|
88
|
+
```bash
|
|
89
|
+
D=.claude/skills/devrites-lib/scripts
|
|
90
|
+
[ -d "$D" ] || D="${CLAUDE_SKILL_DIR:-}/../devrites-lib/scripts"
|
|
91
|
+
[ -d "$D" ] || D=pack/.claude/skills/devrites-lib/scripts
|
|
92
|
+
[ -f "$D/test-integrity.sh" ] && { bash "$D/test-integrity.sh"; echo "test-integrity rc=$?"; } || true # exit 3 = a test was weakened to pass → NO-GO
|
|
93
|
+
[ -f "$D/mutation-gate.sh" ] && bash "$D/mutation-gate.sh" || true # changed-files mutation score → band the seal verdict
|
|
94
|
+
```
|
|
95
|
+
For a parser / serializer / encoder / auth-token / pure-transform criterion, add a **round-trip
|
|
96
|
+
or metamorphic property** check (`decode(encode(x))==x`, `parse∘print==id`) over generated inputs —
|
|
97
|
+
example tests miss the edge cases these explore. If the same unit regenerated from a paraphrased
|
|
98
|
+
spec (or a second sample) **diverges in behaviour on shared inputs**, treat that as a low-confidence
|
|
99
|
+
signal: under AFK it blocks an auto-GO and routes to HITL.
|
|
100
|
+
6. **On failure** → [failure-triage](reference/failure-triage.md) +
|
|
101
|
+
`devrites-debug-recovery`. Reproduce → isolate → fix within scope → re-run; if a fix
|
|
102
|
+
would exceed scope, record a blocker.
|
|
103
|
+
7. Update `evidence.md`, `browser-evidence.md` (if UI), and `state.md`.
|
|
104
|
+
|
|
105
|
+
> **Mid-flight discipline.** When tempted to claim an un-observed pass, skip a rung of the browser-proof ladder, or proceed with slices pending — see [`anti-patterns`](reference/anti-patterns.md). Load it the moment you reach for the excuse.
|
|
106
|
+
|
|
107
|
+
## Output
|
|
108
|
+
|
|
109
|
+
**Footer first** — render the slice meter + flow ribbon by running the progress footer (`progress.sh`, resolved like the step-0 preamble — canonical snippet in `devrites-lib/SKILL.md`); keep the fact lines below it terse (`key value · key value`). Then:
|
|
110
|
+
```
|
|
111
|
+
Proved: <feature>
|
|
112
|
+
Acceptance criteria proven: <n / total>
|
|
113
|
+
Tests: <cmd → pass/fail (counts)>
|
|
114
|
+
Build: <cmd → pass/fail> Lint: <cmd → pass/fail>
|
|
115
|
+
Browser: <ladder rung used + summary | n/a>
|
|
116
|
+
Unresolved failures / blockers: <none | list>
|
|
117
|
+
Next: /rite-polish (finish the feature → /rite-review → /rite-seal)
|
|
118
|
+
↻ Hygiene: /clear before /rite-polish (evidence.md + browser-evidence.md captured; debug trails noisy). See rules/context-hygiene.md.
|
|
119
|
+
```
|
|
120
|
+
— (see hard rule above).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# rite-prove — anti-patterns
|
|
2
|
+
|
|
3
|
+
Load this when standing a non-trivial proof decision, or when tempted to
|
|
4
|
+
report a pass you didn't observe, skip a rung of the browser-proof ladder,
|
|
5
|
+
or proceed without all slices built.
|
|
6
|
+
|
|
7
|
+
Pack-wide rationalizations + red flags (incl. observed-but-not-recorded):
|
|
8
|
+
see [rules/anti-patterns.md](../../../rules/anti-patterns.md).
|
|
9
|
+
|
|
10
|
+
## Phase-specific rationalizations
|
|
11
|
+
|
|
12
|
+
| Excuse | Rebuttal |
|
|
13
|
+
|---|---|
|
|
14
|
+
| "Tests passed during build; that's enough." | Build = per-slice sanity check. Prove = whole-feature suite + build/typecheck/lint + browser. |
|
|
15
|
+
| "Browser proof is overkill for this UI change." | If it's UI and a browser can run, the ladder applies. If you can't, document which rung and why. |
|
|
16
|
+
| "Failure is in pre-existing code, not in this feature." | Still surfaces as a blocker. Feature scope = fix in scope or record + halt. |
|
|
17
|
+
| "Some slices are still pending but the rest can be proved." | No — `/rite-prove` runs once, when every slice is built. Otherwise you're proving a partial system. |
|
|
18
|
+
|
|
19
|
+
## Red Flags
|
|
20
|
+
|
|
21
|
+
- Reporting "pass" for a command you didn't actually run.
|
|
22
|
+
- Skipping browser-proof rungs 1–3 because rung 4 (project E2E) was easier.
|
|
23
|
+
- An acceptance criterion left "unproven" without a corresponding blocker note.
|
|
24
|
+
- Tests recorded green but the diff shows the test file wasn't touched (stale run).
|
|
25
|
+
- About to write `evidence.md` without command + output.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Browser proof — evidence schema
|
|
2
|
+
|
|
3
|
+
What `browser-evidence.md` must capture for a UI slice. Delegates to
|
|
4
|
+
`devrites-browser-proof`; this is the record contract.
|
|
5
|
+
|
|
6
|
+
```markdown
|
|
7
|
+
## Slice <N> — <name> (<date>)
|
|
8
|
+
- Tooling: browser-harness | devtools-mcp | /run+/verify | <e2e> | manual
|
|
9
|
+
- Route(s): <url(s) exercised>
|
|
10
|
+
- Viewports: 375 / 768 / 1280 (note which were checked)
|
|
11
|
+
- Screenshots: <path(s)> — described: <what is actually visible>
|
|
12
|
+
- Console: <errors/warnings, or "clean">
|
|
13
|
+
- Network: <failures, or "no failures">
|
|
14
|
+
- Interaction path: <the clicks/inputs performed and the result>
|
|
15
|
+
- Accessibility: <focus order / labels / contrast spot-check>
|
|
16
|
+
- Responsive: <what changed across viewports; any breakage>
|
|
17
|
+
- Limitations: <what could not be verified and why>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Rules
|
|
21
|
+
- Open every screenshot path and describe it — never assert from the filename.
|
|
22
|
+
- Check at least a small (375) and a large (1280) viewport for layout slices.
|
|
23
|
+
- A clean console + no layout shift are part of the evidence, not extras.
|
|
24
|
+
- If no browser can run, write the manual verification steps a human would follow and
|
|
25
|
+
mark the slice's browser proof as **pending (manual)**.
|
|
26
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Failure triage
|
|
2
|
+
|
|
3
|
+
When a test/build/runtime/browser check fails, triage before fixing. Delegates the deep
|
|
4
|
+
loop to `devrites-debug-recovery`.
|
|
5
|
+
|
|
6
|
+
## Triage ladder
|
|
7
|
+
1. **Reproduce** — run the failing command again; capture the exact error (quote it).
|
|
8
|
+
2. **Classify** the failure:
|
|
9
|
+
- test is right, code is wrong → fix the code (in scope).
|
|
10
|
+
- test is wrong/outdated → that may be **spec drift** (acceptance criteria wrong).
|
|
11
|
+
- environment/setup (missing dep, wrong node/ruby) → fix setup or record blocker.
|
|
12
|
+
- flaky (passes on re-run, timing/order) → note it; don't paper over with retries.
|
|
13
|
+
- external dependency down → record blocker; don't fake the result.
|
|
14
|
+
3. **Isolate** — minimize to the smallest failing case; bisect the diff if needed.
|
|
15
|
+
4. **Fix within scope** — the current slice/feature only. If the fix reaches outside
|
|
16
|
+
scope, stop and record a blocker in `state.md` (then `/rite-plan unblock`).
|
|
17
|
+
5. **Re-run** the same command; confirm green; record both attempts in `evidence.md`.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
- Quote the real error text; don't paraphrase it away.
|
|
21
|
+
- Don't loosen/delete a failing assertion to get green — investigate whether it's drift.
|
|
22
|
+
- Don't add blanket retries/sleeps to hide flakiness.
|
|
23
|
+
- Three failed fix attempts on the same root cause → escalate: `devrites-debug-recovery`
|
|
24
|
+
for a hypothesis-driven pass, or ask the user.
|
|
25
|
+
- A failure you can't fix in scope is a recorded **blocker**, not a silent skip.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Proof ladder
|
|
2
|
+
|
|
3
|
+
Prefer real runtime evidence. For UI/browser work, try tools top-down and record which
|
|
4
|
+
rung you used. Detect, don't install — browser tooling setup is the user's call.
|
|
5
|
+
|
|
6
|
+
1. **browser-harness** (preferred when installed & connected)
|
|
7
|
+
- Detect: `command -v browser-harness`. Use its doctor/connection check only when
|
|
8
|
+
safe. Capabilities: navigation, screenshots, coordinate clicks, console logs, DOM
|
|
9
|
+
reads, network, raw CDP. Connects to the user's Chrome — don't launch a new browser.
|
|
10
|
+
2. **Chrome DevTools MCP** (if configured) — screenshots, DOM, console, network,
|
|
11
|
+
performance, accessibility tree.
|
|
12
|
+
3. **Claude Code `/run` and `/verify`** (if available) — launch and observe the app;
|
|
13
|
+
prefer a project-specific run/verify skill if one exists.
|
|
14
|
+
4. **Project-native E2E** (only if already present) — Playwright, Cypress, Capybara,
|
|
15
|
+
Selenium. Use the project's existing commands; don't add a new framework.
|
|
16
|
+
5. **Manual fallback** — no tooling available: record the limitation and write exact
|
|
17
|
+
manual steps (route, action, expected result).
|
|
18
|
+
|
|
19
|
+
## Non-UI scope
|
|
20
|
+
The "ladder" for backend/CLI/data scope is just: targeted tests → build/typecheck/lint
|
|
21
|
+
→ runtime observation (a real request/response or CLI run). Same evidence rules apply.
|
|
22
|
+
|
|
23
|
+
## Stop conditions
|
|
24
|
+
- Auth wall reached → stop, ask the user; never type credentials from a screenshot.
|
|
25
|
+
- Destructive action required to prove → confirm with the user first.
|
|
26
|
+
- A screenshot tool returns a path → **open and describe it**; a path is not proof.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Test / build command discovery
|
|
2
|
+
|
|
3
|
+
Use the project's own commands. Never invent a test runner or build step. Discover from
|
|
4
|
+
these sources, in roughly this order of authority:
|
|
5
|
+
|
|
6
|
+
| Source | Look for |
|
|
7
|
+
|---|---|
|
|
8
|
+
| `spec.md` → "Commands discovered" | already-found commands (trust first) |
|
|
9
|
+
| `package.json` `scripts` | `test`, `build`, `typecheck`, `lint`, `dev`, `e2e` |
|
|
10
|
+
| `Makefile` / `Justfile` / `Taskfile` | `test`, `build`, `check`, `lint` targets |
|
|
11
|
+
| `Gemfile` / `Rakefile` | `rake test`, `rspec`, `bin/rails test` |
|
|
12
|
+
| `pyproject.toml` / `tox.ini` / `noxfile.py` | `pytest`, `tox`, `nox` |
|
|
13
|
+
| `go.mod` | `go test ./...`, `go build ./...`, `go vet` |
|
|
14
|
+
| `Cargo.toml` | `cargo test`, `cargo build`, `cargo clippy` |
|
|
15
|
+
| CI configs (`.github/workflows`, `.gitlab-ci.yml`, `circleci`) | the exact commands CI runs — the source of truth for "green" |
|
|
16
|
+
| README / CONTRIBUTING | documented dev/test workflow |
|
|
17
|
+
| framework conventions | Rails/Django/Next/etc. defaults when nothing else is set |
|
|
18
|
+
|
|
19
|
+
## Targeted first
|
|
20
|
+
Run the **narrowest** command that exercises the slice (a single test file/path),
|
|
21
|
+
then widen. A full suite is slower and noisier; use it for the final check, not the
|
|
22
|
+
inner loop.
|
|
23
|
+
|
|
24
|
+
## Record what you found
|
|
25
|
+
Write the discovered commands back into `spec.md` → "Commands discovered" so later
|
|
26
|
+
phases (and `/rite-seal`) don't rediscover them. Note the runner version if it matters.
|
|
27
|
+
|
|
28
|
+
## If nothing exists
|
|
29
|
+
No tests in the project: say so. Propose the minimal test setup as a **follow-up**
|
|
30
|
+
(ask before adding a framework), and prove the slice via runtime observation meanwhile.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rite-quick
|
|
3
|
+
description: Express lane for a SMALL, reversible change — one short artifact, then build → prove → ship, collapsing the full spec → define → vet → build → prove → review → seal lifecycle into one pass. Use when the user says "quick fix", "small change", "tiny tweak", "just do X", or for a typo / copy / config / single-function / one-file change that is low-risk and unambiguous. Escalates to `/rite-spec` (full lifecycle) the moment scope, risk, or ambiguity grows. Not for auth / data-model / migration / public-API / multi-slice / ambiguous work — those need the full lifecycle.
|
|
4
|
+
argument-hint: "<what to change>"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /rite-quick — express lane for small changes
|
|
9
|
+
|
|
10
|
+
The full DevRites lifecycle is right for real features; it is **ceremony** for a typo, a
|
|
11
|
+
copy tweak, a one-function fix, or a small config change. `/rite-quick` keeps the
|
|
12
|
+
discipline that matters (idiom, TDD, evidence, escape-to-full-lifecycle) and drops the
|
|
13
|
+
artifacts that don't, in a **single pass**. Senior-engineer "right step, right time" made
|
|
14
|
+
executable, not advisory.
|
|
15
|
+
|
|
16
|
+
## The significance gate (the whole safety story)
|
|
17
|
+
|
|
18
|
+
**Run this first. If ANY of these holds, STOP and route to `/rite-spec` — do NOT use the
|
|
19
|
+
express lane:**
|
|
20
|
+
- Touches **auth / authz**, a **data migration**, a **public API contract**, or any
|
|
21
|
+
**destructive / data-loss** path (the irreversible-risk list — `rules/afk-hitl.md`).
|
|
22
|
+
- Spans **more than one vertical slice**, or more than a couple of files of real logic.
|
|
23
|
+
- **Ambiguous scope** — you'd have to guess what "done" means, or the ask hides a design
|
|
24
|
+
decision (data model, new dependency, second design system).
|
|
25
|
+
- Security-sensitive input handling, or a measurable performance-critical path.
|
|
26
|
+
|
|
27
|
+
If none hold, the change is small + reversible + unambiguous → proceed. **When in doubt,
|
|
28
|
+
escalate** — the cost of the full lifecycle on a small change is minutes; the cost of the
|
|
29
|
+
express lane on a risky one is the failure mode the lifecycle exists to prevent.
|
|
30
|
+
|
|
31
|
+
## Rules consulted
|
|
32
|
+
Read `.claude/rules/core.md` first. Then the small set this lane actually needs:
|
|
33
|
+
- `coding-style.md` — naming, guard clauses, reuse-first.
|
|
34
|
+
- `testing.md` — TDD, **completeness** (every touched behavior/element asserted) +
|
|
35
|
+
**assertion strength** (no tautological tests; see it fail first), scaled to the change.
|
|
36
|
+
- `error-handling.md` / `security.md` — only if the change touches input/errors.
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
0. **Orient.** Read `core.md`. If a `.devrites/` workspace is active, run the preamble to
|
|
40
|
+
see it; `/rite-quick` does **not** require one and does **not** create the full tree.
|
|
41
|
+
1. **Significance gate** (above). Fail → STOP, tell the user to run `/rite-spec <feature>`.
|
|
42
|
+
2. **One-line contract.** Restate in 1–3 lines: the change, its **acceptance** (how you'll
|
|
43
|
+
know it works), and the **scope boundary** (what you will NOT touch). This is the entire
|
|
44
|
+
"spec + plan" for a quick change — keep it in the chat; optionally drop a `brief.md` +
|
|
45
|
+
`evidence.md` under `.devrites/work/<slug>/` if the user wants a record. This is the
|
|
46
|
+
`/rite-frame` FRAME move: if the acceptance won't reduce to a check that could be *false*,
|
|
47
|
+
the ask is ambiguous → escalate per the significance gate. Its AUDIT pass is the diff
|
|
48
|
+
self-review in step 5.
|
|
49
|
+
3. **Build with TDD.** Failing test first when behavior changes (see it fail for the right
|
|
50
|
+
reason) → smallest complete change in the **project's idiom** (reuse before you write,
|
|
51
|
+
anti-AI-slop) → cover every touched behavior / interactive element with a **real**
|
|
52
|
+
assertion. UI → check the states + a browser glance.
|
|
53
|
+
4. **Prove (scoped).** Run the **targeted** tests + typecheck / lint for what changed (not
|
|
54
|
+
the whole suite) → green. Record the command + output. A tautological test that can't
|
|
55
|
+
fail is not proof.
|
|
56
|
+
5. **Review-lite + ship.** Self-review the diff (correctness, scope, idiom — one pass, no
|
|
57
|
+
subagent fan-out). Show the diff, then on the user's confirm commit it (Conventional
|
|
58
|
+
Commits, atomic) — or hand to `/rite-ship` if a workspace is active. **Never push without
|
|
59
|
+
the user asking.**
|
|
60
|
+
|
|
61
|
+
## Escalation (mid-flight) — the Spec Drift Guard still applies
|
|
62
|
+
If the "small" change turns out to be not small — a second slice appears, a real design
|
|
63
|
+
decision surfaces, scope grows past the boundary, or you hit an irreversible-risk item —
|
|
64
|
+
**STOP, say so, and route to `/rite-spec` / `/rite-define`**. Don't quietly grow a quick
|
|
65
|
+
fix into an unreviewed feature; that's the exact drift the lifecycle guards against.
|
|
66
|
+
|
|
67
|
+
## Output
|
|
68
|
+
**Footer first** — render the flow ribbon by running the progress footer (`progress.sh`,
|
|
69
|
+
resolved like the step-0 preamble — canonical snippet in `devrites-lib/SKILL.md`) when a
|
|
70
|
+
workspace is active; otherwise skip it. Then:
|
|
71
|
+
```
|
|
72
|
+
Quick change: <one line>
|
|
73
|
+
Scope: <files touched> (boundary held? yes)
|
|
74
|
+
Tests: <cmd → pass> · Assertion check: <real asserts, saw red | n/a>
|
|
75
|
+
Diff: <summary>
|
|
76
|
+
Next ▸ commit (Conventional) on your confirm · or /rite-ship if tracked
|
|
77
|
+
↻ Hygiene: /clear after commit — the change is small and self-contained.
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**DO NOT** use this lane to dodge the gate — the express lane is for changes that are
|
|
81
|
+
*actually* small, not for shipping risky work faster.
|