Skip to content

Commit 97c62ef

Browse files
chore: remove semver bump require
1 parent a14dcff commit 97c62ef

1 file changed

Lines changed: 49 additions & 37 deletions

File tree

.claude/skills/code-review/SKILL.md

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ Review the PR diff against the standards in this repository. Read `AGENTS.md` fo
1515
- **Template adherence**: lint/test run locally, new tests added, related PRs linked
1616
- **Multi-package PRs**: validate each changed package separately
1717

18-
### Versioning and changelog (per changed package)
18+
### Changelog (per changed package)
19+
20+
Version bumps happen in a separate dedicated PR — do not require or flag missing semver bumps.
1921

2022
If runtime code, public API, XML schema, or behavior changed:
2123

22-
- Require semver bump in `package.json`
2324
- Require `CHANGELOG.md` entry (Keep a Changelog format)
2425
- Suggest: `pnpm -w changelog`
2526

26-
If refactor/docs/tests-only: bump not required — confirm with author.
27+
If refactor/docs/tests-only: changelog entry not required — confirm with author.
2728

2829
### Mendix-specific
2930

@@ -183,21 +184,21 @@ Follow WCAG 2.2 AA. Prefer semantic HTML over ARIA — only add ARIA when native
183184

184185
## Heuristics
185186

186-
| Situation | Comment |
187-
| ---------------------------------------------- | ------------------------------------------------------------------------------ |
188-
| Code/XML changed, no version bump or CHANGELOG | "Please bump semver and add changelog (`pnpm -w changelog`)." |
189-
| Feature/fix without tests | "Please add unit tests in `src/components/__tests__/` and consider E2E tests." |
190-
| XML changed, TS props not updated | "XML props changed but TS types/usage aren't aligned." |
191-
| Async effect sets state without guard | Suggest the `active` flag pattern above |
192-
| `index` used as list `key` | Request a stable unique key |
193-
| MobX mutation outside `action` | Suggest `runInAction` or `action` wrapper |
194-
| `dangerouslySetInnerHTML` without sanitization | Flag as high severity; require DOMPurify or equivalent |
195-
| Hardcoded secret, token, or credential | Flag as critical; must be removed and rotated |
196-
| `javascript:` or `data:` URI from user input | Flag as XSS risk; require validation before use |
197-
| Interactive element is a `<div>` with onClick | Replace with `<button>` or `<a>`; add keyboard handler if div must be kept |
198-
| Missing `alt` on `<img>` | Add descriptive `alt` or `alt=""` for decorative images |
199-
| No `aria-label` on icon-only button | Add `aria-label` describing the action |
200-
| Colour used as sole differentiator | Pair with text or icon; check contrast ratio meets 4.5:1 (3:1 for large text) |
187+
| Situation | Comment |
188+
| ---------------------------------------------- | -------------------------------------------------------------------------------------------- |
189+
| Code/XML changed, no CHANGELOG entry | "Please add a changelog entry (`pnpm -w changelog`). Version bumps happen in a separate PR." |
190+
| Feature/fix without tests | "Please add unit tests in `src/components/__tests__/` and consider E2E tests." |
191+
| XML changed, TS props not updated | "XML props changed but TS types/usage aren't aligned." |
192+
| Async effect sets state without guard | Suggest the `active` flag pattern above |
193+
| `index` used as list `key` | Request a stable unique key |
194+
| MobX mutation outside `action` | Suggest `runInAction` or `action` wrapper |
195+
| `dangerouslySetInnerHTML` without sanitization | Flag as high severity; require DOMPurify or equivalent |
196+
| Hardcoded secret, token, or credential | Flag as critical; must be removed and rotated |
197+
| `javascript:` or `data:` URI from user input | Flag as XSS risk; require validation before use |
198+
| Interactive element is a `<div>` with onClick | Replace with `<button>` or `<a>`; add keyboard handler if div must be kept |
199+
| Missing `alt` on `<img>` | Add descriptive `alt` or `alt=""` for decorative images |
200+
| No `aria-label` on icon-only button | Add `aria-label` describing the action |
201+
| Colour used as sole differentiator | Pair with text or icon; check contrast ratio meets 4.5:1 (3:1 for large text) |
201202

202203
## Scope
203204

@@ -210,8 +211,8 @@ Follow WCAG 2.2 AA. Prefer semantic HTML over ARIA — only add ARIA when native
210211
| `packages/pluggableWidgets/*/**/*.scss` | Styling: BEM naming, Atlas UI classes, no `!important`, no inline styles |
211212
| `packages/pluggableWidgets/*/src/**/__tests__/*.spec.{ts,tsx}` | Unit test coverage, builder usage, RTL patterns |
212213
| `packages/pluggableWidgets/*/e2e/*.spec.js` | E2E structure, selectors, afterEach logout, no hardcoded waits |
213-
| `packages/pluggableWidgets/*/package.json` | Semver bump present when runtime/XML/behavior changed |
214-
| `packages/pluggableWidgets/*/CHANGELOG.md` | Keep a Changelog entry present when version bumped |
214+
| `packages/pluggableWidgets/*/package.json` | Version bumps happen in a separate PRdo not flag missing bumps |
215+
| `packages/pluggableWidgets/*/CHANGELOG.md` | Keep a Changelog entry present when runtime/XML/behavior changed |
215216
| `packages/pluggableWidgets/*/*.editorConfig.ts` | Studio Pro design-time config aligns with XML properties |
216217
| `packages/pluggableWidgets/*/*.editorPreview.tsx` | Preview component renders without crashing; no production-only imports |
217218
| `packages/shared/*/src/**/*.{ts,tsx}` | Shared utility changescheck for breaking API changes affecting widget consumers |
@@ -234,7 +235,7 @@ Follow WCAG 2.2 AA. Prefer semantic HTML over ARIA — only add ARIA when native
234235

235236
When a PR touches multiple packages, validate each changed package separately:
236237

237-
- Versioning and CHANGELOG per package
238+
- CHANGELOG entry per package (version bumps are out of scope)
238239
- XMLTS alignment per widget
239240
- Test coverage per changed component
240241

@@ -269,39 +270,48 @@ Always post one summary comment. Use inline comments for issues that reference a
269270
- `🔶 Changes requested — one or more medium-severity items must be addressed`
270271
- `🚨 Blocked — high-severity issue (security, data loss, broken API) must be fixed`
271272

272-
**Full template:**
273+
**Post the comment using exactly this structure** (GitHub Markdownrender as-is, do not wrap in a code fence):
274+
275+
The comment must start with:
273276

274-
````markdown
277+
```
275278
## AI Code Review
279+
```
276280
277-
>/ ⚠️ / 🔶 / 🚨 **<verdict line>**
281+
Then a blockquote verdict on the next line:
278282
279-
---
283+
```
284+
> ✅ Approved — no issues found
285+
```
286+
287+
(replace with the appropriate verdict emoji and text)
288+
289+
Then a horizontal rule `---`, then a `### What was reviewed` section with a Markdown table:
280290
291+
```
281292
### What was reviewed
282293

283-
| File | Change |
284-
| ------------------- | --------------------------------- |
285-
| `path/to/file.ts` | Brief description of what changed |
286-
| `path/to/other.yml` | Brief description |
294+
| File | Change |
295+
| --- | --- |
296+
| `path/to/file.ts` | Brief description of what changed |
297+
| `path/to/other.yml` | Brief description |
287298

288299
Skipped (out of scope): `dist/`, `pnpm-lock.yaml`
300+
```
289301
290-
---
302+
Then `---`, then a `### Findings` section (omit entirely on a clean PR) where each finding is a level-4 heading:
291303
304+
```
292305
### Findings
293306

294-
<!-- Omit this section entirely on a clean PR -->
295-
296307
#### 🚨 High — <short title>
297308

298309
**File:** `path/to/file.ts` line 42
299310
**Problem:** What is wrong and why it matters.
300311
**Fix:**
301-
302-
```ts
312+
\`\`\`ts
303313
// suggested fix snippet
304-
```
314+
\`\`\`
305315

306316
---
307317

@@ -317,14 +327,16 @@ Skipped (out of scope): `dist/`, `pnpm-lock.yaml`
317327

318328
**File:** `path/to/file.ts` line 5
319329
**Note:** What to consider, not blocking.
330+
```
320331
321-
---
332+
Then `---`, then a `### Positives` section as a bullet list:
322333
334+
```
323335
### Positives
324336

325337
- Specific thing done well (not generic praise)
326338
- Another concrete positive
327-
````
339+
```
328340
329341
### Rules
330342

0 commit comments

Comments
 (0)