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