You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/BUGBOT.md
+45Lines changed: 45 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,51 @@ Files under `packages/components/stories/recipes/` are **compositions/examples**
29
29
- The public-API, changeset, and "low-level primitive leakage" checks do **not** apply.
30
30
- The accessibility, design token, and theme checks **still** apply — recipes are reference material and should model good practice.
31
31
32
+
## PR readiness criteria
33
+
34
+
Before reviewing code, evaluate whether the PR itself is reviewable. Flag these issues as top-level comments, not inline.
35
+
36
+
### Size
37
+
38
+
-**Ideal: ≤ 400 lines changed** (excluding `pnpm-lock.yaml`, `dist/`, `*.d.ts`, and generated icon/token files). PRs above this threshold should be flagged unless the bulk is mechanical (e.g., a rename across many files, a generated sync, or a token update cascade).
39
+
-**Single concern per PR.** Adding a component and refactoring an unrelated package are two PRs. Mixing a new component with token renaming is a flag unless the naming change is what motivated the component.
40
+
-**New component ≙ one PR per component** unless the components are compositional siblings (e.g., `RadioButton` + `RadioGroup`) that make no sense separated. Flag bundles of three or more unrelated new components.
41
+
- Flag PRs that touch `packages/tokens` or `packages/vars`*and* multiple other packages simultaneously — token changes cascade to every consumer and deserve isolated, deliberate review.
42
+
43
+
### Description quality
44
+
45
+
A reviewable PR description answers three questions. Flag as `needs-description` if any are missing or too vague to act on:
46
+
47
+
1.**What changed?** Not a restatement of the commit title — an actual summary of the diff. "Updated styles" is not sufficient. "Replaced hardcoded `16px` spacing with `var(--lp-space-400)` token across Button variants" is.
48
+
2.**Why?** The motivation: a design spec update, a bug, a new feature request, an accessibility finding. PRs from AI agents often omit this entirely — flag it.
49
+
3.**How was it verified?** Screenshots for visual changes, test IDs for behavior changes, Chromatic snapshot approval note for token/theme changes. If Storybook was used for manual verification, say so.
50
+
51
+
AI-agent-generated PRs frequently produce descriptions like *"Updated the component to improve functionality"*. Flag these explicitly: the description must be specific enough that a reviewer can understand the change without reading every line of the diff.
52
+
53
+
### Changeset accuracy
54
+
55
+
- A `patch` changeset is appropriate for bug fixes and internal refactors with no API surface change.
56
+
- A `minor` changeset is appropriate for new exported components, new props on existing components, or additive behavior changes.
57
+
- A `major` changeset is appropriate for removed exports, renamed props, changed default values, or breaking type changes. This is rare; if the diff warrants `major`, call it out even if the changeset says `patch` or `minor`.
58
+
- Flag when the changeset summary is generic boilerplate (`"Updated component"`, `"Fixed issue"`) — changelogs are consumed by engineers across the org and must be human-readable.
59
+
60
+
### Automated checks (reference)
61
+
62
+
These CI checks now run on every PR and surface results automatically:
63
+
64
+
| Check | What it catches |
65
+
|---|---|
66
+
|**PR comment bot**| Packages changed, API surface diff, token changes, story coverage gaps |
67
+
|**Story Coverage** (`verify.yml`) | New exported components without a `.stories.tsx` file |
0 commit comments