@mrciphersmith/keryx 0.4.28 → 0.4.30
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/dist/cli.js +4916 -3655
- package/dist/core.js +91 -28
- package/dist/keryx-general-worker-entry.js +413 -240
- package/package.json +1 -1
- package/src/gdskills/bundled/install-manifest.json +3 -0
- package/src/gdskills/bundled/rules/core/api-contracts.mdc +21 -136
- package/src/gdskills/bundled/rules/core/async-patterns.mdc +18 -171
- package/src/gdskills/bundled/rules/core/clean-architecture.mdc +40 -150
- package/src/gdskills/bundled/rules/core/cli-interface-design.mdc +63 -194
- package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +36 -48
- package/src/gdskills/bundled/rules/core/concurrency-patterns.mdc +32 -0
- package/src/gdskills/bundled/rules/core/database-patterns.mdc +26 -148
- package/src/gdskills/bundled/rules/core/error-handling.mdc +57 -109
- package/src/gdskills/bundled/rules/core/frontend-assistant.mdc +14 -29
- package/src/gdskills/bundled/rules/core/layout-rendering.mdc +51 -0
- package/src/gdskills/bundled/rules/core/mobx-store-template.mdc +69 -511
- package/src/gdskills/bundled/rules/core/nestjs-dto.mdc +18 -36
- package/src/gdskills/bundled/rules/core/playwright-testing.mdc +35 -308
- package/src/gdskills/bundled/rules/core/security-baseline.mdc +18 -140
- package/src/gdskills/bundled/rules/core/skill-authoring.mdc +190 -0
- package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +5 -0
- package/src/gdskills/bundled/rules/core/solid-principles.mdc +70 -121
- package/src/gdskills/bundled/rules/core/storybook-guidelines.mdc +20 -22
- package/src/gdskills/bundled/rules/core/tdd-workflow.mdc +37 -74
- package/src/gdskills/bundled/rules/core/ui-anti-slop.mdc +48 -37
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/quality/deprecation-path/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +25 -61
- package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +15 -69
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +84 -418
- package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +17 -311
- package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +8 -22
- package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +84 -228
- package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +22 -28
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +9 -10
- package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +16 -38
- package/src/gdskills/bundled/skills/review/review-premise/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +8 -8
- package/src/gdskills/bundled/skills/review/review-style/SKILL.md +49 -88
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +22 -40
- package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +42 -82
- package/src/gdskills/bundled/stacks/angular/rules/coding-style.mdc +15 -57
- package/src/gdskills/bundled/stacks/angular/rules/patterns.mdc +16 -60
- package/src/gdskills/bundled/stacks/angular/rules/security.mdc +11 -49
- package/src/gdskills/bundled/stacks/angular/rules/testing.mdc +13 -52
- package/src/gdskills/bundled/stacks/c-cpp/rules/coding-style.mdc +33 -57
- package/src/gdskills/bundled/stacks/c-cpp/rules/patterns.mdc +35 -62
- package/src/gdskills/bundled/stacks/c-cpp/rules/security.mdc +35 -62
- package/src/gdskills/bundled/stacks/c-cpp/rules/testing.mdc +34 -54
- package/src/gdskills/bundled/stacks/ci-github-gitlab/rules/patterns.mdc +27 -56
- package/src/gdskills/bundled/stacks/ci-github-gitlab/rules/security.mdc +51 -119
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/coding-style.mdc +42 -74
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/patterns.mdc +45 -83
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/security.mdc +34 -59
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/testing.mdc +33 -62
- package/src/gdskills/bundled/stacks/django/rules/coding-style.mdc +15 -56
- package/src/gdskills/bundled/stacks/django/rules/patterns.mdc +16 -68
- package/src/gdskills/bundled/stacks/django/rules/security.mdc +13 -71
- package/src/gdskills/bundled/stacks/django/rules/testing.mdc +16 -62
- package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/coding-style.mdc +30 -53
- package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/patterns.mdc +20 -56
- package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/security.mdc +52 -122
- package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/testing.mdc +23 -42
- package/src/gdskills/bundled/stacks/fastapi/rules/coding-style.mdc +13 -47
- package/src/gdskills/bundled/stacks/fastapi/rules/patterns.mdc +18 -81
- package/src/gdskills/bundled/stacks/fastapi/rules/security.mdc +13 -75
- package/src/gdskills/bundled/stacks/fastapi/rules/testing.mdc +14 -58
- package/src/gdskills/bundled/stacks/flutter-dart/rules/coding-style.mdc +36 -74
- package/src/gdskills/bundled/stacks/flutter-dart/rules/patterns.mdc +30 -66
- package/src/gdskills/bundled/stacks/flutter-dart/rules/security.mdc +33 -67
- package/src/gdskills/bundled/stacks/flutter-dart/rules/testing.mdc +41 -73
- package/src/gdskills/bundled/stacks/go/rules/coding-style.mdc +36 -57
- package/src/gdskills/bundled/stacks/go/rules/patterns.mdc +27 -42
- package/src/gdskills/bundled/stacks/go/rules/security.mdc +26 -43
- package/src/gdskills/bundled/stacks/go/rules/testing.mdc +23 -41
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/coding-style.mdc +21 -40
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/patterns.mdc +26 -43
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/security.mdc +25 -37
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/testing.mdc +34 -50
- package/src/gdskills/bundled/stacks/kotlin-android/rules/coding-style.mdc +28 -65
- package/src/gdskills/bundled/stacks/kotlin-android/rules/patterns.mdc +34 -78
- package/src/gdskills/bundled/stacks/kotlin-android/rules/security.mdc +35 -68
- package/src/gdskills/bundled/stacks/kotlin-android/rules/testing.mdc +34 -68
- package/src/gdskills/bundled/stacks/mobx/rules/coding-style.mdc +18 -64
- package/src/gdskills/bundled/stacks/mobx/rules/patterns.mdc +13 -66
- package/src/gdskills/bundled/stacks/mobx/rules/security.mdc +8 -35
- package/src/gdskills/bundled/stacks/mobx/rules/testing.mdc +10 -39
- package/src/gdskills/bundled/stacks/nestjs/rules/coding-style.mdc +32 -45
- package/src/gdskills/bundled/stacks/nestjs/rules/patterns.mdc +40 -60
- package/src/gdskills/bundled/stacks/nestjs/rules/security.mdc +30 -50
- package/src/gdskills/bundled/stacks/nestjs/rules/testing.mdc +27 -47
- package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/coding-style.mdc +14 -48
- package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/patterns.mdc +15 -67
- package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/security.mdc +12 -50
- package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/testing.mdc +11 -43
- package/src/gdskills/bundled/stacks/php-laravel/rules/coding-style.mdc +17 -58
- package/src/gdskills/bundled/stacks/php-laravel/rules/patterns.mdc +15 -56
- package/src/gdskills/bundled/stacks/php-laravel/rules/security.mdc +13 -50
- package/src/gdskills/bundled/stacks/php-laravel/rules/testing.mdc +14 -55
- package/src/gdskills/bundled/stacks/python/rules/coding-style.mdc +13 -41
- package/src/gdskills/bundled/stacks/python/rules/patterns.mdc +20 -61
- package/src/gdskills/bundled/stacks/python/rules/security.mdc +15 -57
- package/src/gdskills/bundled/stacks/python/rules/testing.mdc +16 -50
- package/src/gdskills/bundled/stacks/react/rules/coding-style.mdc +14 -40
- package/src/gdskills/bundled/stacks/react/rules/patterns.mdc +15 -55
- package/src/gdskills/bundled/stacks/react/rules/security.mdc +13 -49
- package/src/gdskills/bundled/stacks/react/rules/testing.mdc +10 -37
- package/src/gdskills/bundled/stacks/ruby-rails/rules/coding-style.mdc +15 -48
- package/src/gdskills/bundled/stacks/ruby-rails/rules/patterns.mdc +18 -67
- package/src/gdskills/bundled/stacks/ruby-rails/rules/security.mdc +11 -60
- package/src/gdskills/bundled/stacks/ruby-rails/rules/testing.mdc +14 -65
- package/src/gdskills/bundled/stacks/rust/rules/coding-style.mdc +39 -65
- package/src/gdskills/bundled/stacks/rust/rules/patterns.mdc +33 -60
- package/src/gdskills/bundled/stacks/rust/rules/security.mdc +35 -57
- package/src/gdskills/bundled/stacks/rust/rules/testing.mdc +29 -52
- package/src/gdskills/bundled/stacks/sql-db/rules/coding-style.mdc +12 -48
- package/src/gdskills/bundled/stacks/sql-db/rules/patterns.mdc +22 -113
- package/src/gdskills/bundled/stacks/sql-db/rules/security.mdc +11 -56
- package/src/gdskills/bundled/stacks/sql-db/rules/testing.mdc +14 -59
- package/src/gdskills/bundled/stacks/swift-ios/rules/coding-style.mdc +29 -65
- package/src/gdskills/bundled/stacks/swift-ios/rules/patterns.mdc +41 -88
- package/src/gdskills/bundled/stacks/swift-ios/rules/security.mdc +28 -53
- package/src/gdskills/bundled/stacks/swift-ios/rules/testing.mdc +32 -65
- package/src/gdskills/bundled/stacks/vue/rules/coding-style.mdc +17 -52
- package/src/gdskills/bundled/stacks/vue/rules/patterns.mdc +17 -63
- package/src/gdskills/bundled/stacks/vue/rules/security.mdc +11 -41
- package/src/gdskills/bundled/stacks/vue/rules/testing.mdc +16 -48
|
@@ -24,7 +24,7 @@ license: "MIT"
|
|
|
24
24
|
# Review — Flow Graph Abstractions
|
|
25
25
|
|
|
26
26
|
Reviewer for reusable ReactFlow/graph integration layers. Use it when a repository has a shared
|
|
27
|
-
graph surface consumed by domain modules. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history)
|
|
27
|
+
graph surface consumed by domain modules. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
@@ -17,7 +17,7 @@ license: "MIT"
|
|
|
17
17
|
|
|
18
18
|
## Purpose
|
|
19
19
|
|
|
20
|
-
Validates frontend-specific patterns in the changed code of the current branch. Covers React component correctness (observer wrapping, MVVM boundary, useEffect misuse, accessibility basics, key props), full MobX store patterns (structure, member ordering, accessibility modifiers, observable collections, reactions, async actions, bidirectional sync, lifecycle, API placement), and TypeScript safety. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history)
|
|
20
|
+
Validates frontend-specific patterns in the changed code of the current branch. Covers React component correctness (observer wrapping, MVVM boundary, useEffect misuse, accessibility basics, key props), full MobX store patterns (structure, member ordering, accessibility modifiers, observable collections, reactions, async actions, bidirectional sync, lifecycle, API placement), and TypeScript safety. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
|
|
21
21
|
|
|
22
22
|
This skill consolidates what two earlier profiles (a style one and a MobX store one, both removed) used to split between them, so it is the one reviewer for frontend style, MobX and store changes.
|
|
23
23
|
|
|
@@ -67,8 +67,8 @@ boundary is the trigger-and-outcome test.
|
|
|
67
67
|
|
|
68
68
|
### Frontend / MobX laws
|
|
69
69
|
|
|
70
|
-
These say what is **always reported**. Its severity is the
|
|
71
|
-
|
|
70
|
+
These say what is **always reported**. Its severity is the matching rule's **Review severities** table (Parts A-C) —
|
|
71
|
+
the canonical rubric applied, not a second opinion.
|
|
72
72
|
|
|
73
73
|
1. **Every observable mutation outside an action or `runInAction` is reported.**
|
|
74
74
|
No exception for "small stores" or "simple assignments".
|
|
@@ -128,235 +128,16 @@ If no CLAUDE.md is found, proceed normally. CLAUDE.md is optional and non-blocki
|
|
|
128
128
|
|
|
129
129
|
## Review Checklist
|
|
130
130
|
|
|
131
|
-
###
|
|
131
|
+
### Parts A-C: the standard
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
Components, stores, TypeScript and stories are checked against the rules the code was written to. Read each that the change touches; each ends with a **Review severities** table, and a finding takes its level from that table's row:
|
|
134
134
|
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
135
|
+
- `.metaproject/rules/core/code-style-patterns.mdc`: `observer`, layers (no API/IO or business logic in components), where state lives (`useState` for UI-only state is correct), store created once, effect cleanup, keys, accessibility, TypeScript (`any`, `!`, `I` prefix, `src/` imports).
|
|
136
|
+
- `.metaproject/rules/core/mobx-store-template.mdc`: `makeObservable` and decorators, mutations in actions, thin public `@action.bound` over private arrow methods (`@action.bound` on a private method is a finding), async flags and the `disposed` guard, disposers and child stores, in-place collection updates, two-way sync guards, the `onMount()`/`onUnmount()` lifecycle bridge (correct, never flagged).
|
|
137
|
+
- `.metaproject/rules/core/storybook-guidelines.mdc`: which states each component's stories cover, `fn()` for actions.
|
|
138
|
+
- `.metaproject/rules/core/error-handling.mdc` for `catch` typing and swallowed errors.
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
- Component reads `store.*` or `useLocalObservable` result but is not wrapped in `observer` — **major** (stale UI; not one of the four merge-blocking shapes)
|
|
142
|
-
- `observer` applied inside another HOC wrapper instead of outside — **minor** (layer-violation rule; **major** only with a named defect it causes)
|
|
143
|
-
|
|
144
|
-
#### A2. MVVM Boundary (Business Logic in Store, Not Component)
|
|
145
|
-
|
|
146
|
-
- [ ] Business logic MUST live in Store/Service, not in component
|
|
147
|
-
- [ ] IO (API calls, file reads, WebSocket messages) MUST originate from private store methods
|
|
148
|
-
- [ ] Component event handlers must only call store action methods — no logic between the event and the store call
|
|
149
|
-
- [ ] Computed/derived values MUST be `@computed` getters in the store, not inline derivations in the component body
|
|
150
|
-
|
|
151
|
-
Flags:
|
|
152
|
-
- `fetch()` / `axios` / `httpClient` call directly in component (hook or handler) — **minor** (layer violation; **major** only with a named defect it causes or a stated project rule; same as `review-architecture`)
|
|
153
|
-
- Business logic (conditionals, transformations, validation) inside a component event handler instead of a store method — **minor** (layer violation, same condition)
|
|
154
|
-
- Derived value computed inline in component that could be a `@computed` getter — **minor**
|
|
155
|
-
|
|
156
|
-
#### A3. useEffect Misuse
|
|
157
|
-
|
|
158
|
-
- [ ] `useEffect` must not contain business logic
|
|
159
|
-
- [ ] `useEffect` must not fetch data or run business logic through the store: no `store.load()` / `store.loadX()`, and no `init()` of a child store that the parent store owns. The lifecycle bridge `useEffect(() => { store.onMount(); return () => store.onUnmount(); }, [store])` is correct and is not flagged (D6) — it hands the mount event to the store, which decides what to load
|
|
160
|
-
- [ ] `useEffect` must not contain API calls or IO
|
|
161
|
-
- [ ] `useEffect` used to synchronize component state with store state is a sign the component should be an `observer` instead
|
|
162
|
-
- [ ] Every `useEffect` that creates a subscription, timer, or listener MUST return a cleanup function
|
|
163
|
-
|
|
164
|
-
Flags:
|
|
165
|
-
- `useEffect` calls `store.loadX()`, or a child store's `init()` that the parent store owns — **minor** (layer-violation rule, as a direct fetch in a component; **major** only with a named defect; the `onMount()` / `onUnmount()` bridge form is not this)
|
|
166
|
-
- `useEffect` contains `fetch()` or IO — **minor** (API in component; layer-violation rule)
|
|
167
|
-
- `useEffect` contains business logic / state derivation — **minor** (layer-violation rule)
|
|
168
|
-
- `useEffect` creates a subscription/timer/listener with no cleanup return — **major** (memory leak)
|
|
169
|
-
|
|
170
|
-
#### A4. Key Props on Lists
|
|
171
|
-
|
|
172
|
-
- [ ] Every `.map()` rendering React elements MUST have a `key` prop on the root returned element
|
|
173
|
-
- [ ] Keys must be stable, unique identifiers — not array index when the list can reorder or filter
|
|
174
|
-
- [ ] Key must be on the element returned by `.map()`, not a child inside it
|
|
175
|
-
|
|
176
|
-
Flags:
|
|
177
|
-
- Missing `key` prop on list — **major** (causes reconciliation bugs)
|
|
178
|
-
- `key={index}` on a list that can reorder, filter, or paginate — **minor**
|
|
179
|
-
|
|
180
|
-
#### A5. Accessibility Basics
|
|
181
|
-
|
|
182
|
-
- [ ] `<img>` tags MUST have `alt` attribute (can be `alt=""` for decorative images, must be descriptive for content images)
|
|
183
|
-
- [ ] Interactive elements (`<button>`, `<a>`) with no visible text content MUST have `aria-label` or `aria-labelledby`
|
|
184
|
-
- [ ] Form inputs MUST have an associated `<label>` (via `htmlFor` + `id`, or `aria-label`)
|
|
185
|
-
- [ ] `role="button"` on a `<div>` or `<span>` without `tabIndex={0}` and keyboard handler — prefer a real `<button>`
|
|
186
|
-
- [ ] `onClick` on non-interactive elements without keyboard equivalent
|
|
187
|
-
|
|
188
|
-
Flags:
|
|
189
|
-
- `<img>` without `alt` — **major**
|
|
190
|
-
- Interactive element without accessible name — **major**
|
|
191
|
-
- Non-semantic interactive element without keyboard support — **minor**
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
### Part B: MobX Store Patterns
|
|
196
|
-
|
|
197
|
-
#### B1. Store Structure
|
|
198
|
-
|
|
199
|
-
- [ ] Store class MUST call `makeObservable(this)` in the constructor
|
|
200
|
-
- [ ] Observable state MUST use `@observable`, `@observable.shallow`, `@observable.ref`, or `@observable.struct` decorators
|
|
201
|
-
- [ ] Derived values MUST live in `@computed` getters, not recomputed in components or plain methods
|
|
202
|
-
- [ ] `@observable.ref` is preferred for large external objects or objects that manage their own reactivity
|
|
203
|
-
|
|
204
|
-
Flags:
|
|
205
|
-
- `makeObservable(this)` missing from constructor — **major** (nothing is reactive; stale UI, not corrupted state)
|
|
206
|
-
- Observable state missing `@observable` decorator — **major**
|
|
207
|
-
- Derived value in plain method instead of `@computed` — **minor**
|
|
208
|
-
|
|
209
|
-
#### B2. Member Ordering
|
|
210
|
-
|
|
211
|
-
The canonical class member order (flag deviations):
|
|
212
|
-
|
|
213
|
-
1. `private` fields (internal state, disposers, injected deps as `private readonly`)
|
|
214
|
-
2. Public fields (`@observable`, `readonly`, public plain props)
|
|
215
|
-
3. `constructor`
|
|
216
|
-
4. Public methods: `@computed` getters, lifecycle (`init`, `dispose`, `onMount`, `onUnmount`), public helpers/selectors, public `@action.bound` UI entrypoints
|
|
217
|
-
5. `private` methods
|
|
218
|
-
|
|
219
|
-
Flags:
|
|
220
|
-
- Constructor before field declarations — **minor**
|
|
221
|
-
- Private methods before public methods — **minor**
|
|
222
|
-
- `@action.bound` public method buried among private methods — **minor**
|
|
223
|
-
|
|
224
|
-
#### B3. Member Accessibility Modifiers
|
|
225
|
-
|
|
226
|
-
ESLint rule: `@typescript-eslint/explicit-member-accessibility: ["error", { accessibility: "no-public" }]` — the word `public` is **forbidden** on any class member.
|
|
227
|
-
|
|
228
|
-
Correct accessibility:
|
|
229
|
-
- *(no modifier)*: observable fields, computed getters, lifecycle methods, public helper methods, public `@action.bound` UI methods
|
|
230
|
-
- `private`: internal state (`disposed`, `initialized`, `_value`), helper methods, API-call methods (`fetchX`, `performX`), inter-store callbacks (`onChangeX`, `onFireX`, `handleX`, `syncX`)
|
|
231
|
-
- `private readonly`: constructor-injected dependencies, immutable configuration (`service`, `context`, `id`)
|
|
232
|
-
- `readonly`: immutable public identity fields (`pipelineType`, `contextActions`)
|
|
233
|
-
- `protected`: only in abstract base classes for extension points
|
|
234
|
-
|
|
235
|
-
Decision rule for inter-store callbacks: ask "Is this called from JSX or a React event handler?" If NO — it is `private`.
|
|
236
|
-
|
|
237
|
-
Flags:
|
|
238
|
-
- `public` keyword on any member — **minor** (ESLint `no-public` already fails CI; a reviewer restating a lint rule is not a merge gate)
|
|
239
|
-
- `onChangeX`, `onFireX`, `handleX`, `syncX` without `private` — **minor**
|
|
240
|
-
- Missing `private` on internal state or helper methods — **minor**
|
|
241
|
-
- Missing `private readonly` on a private field that is never reassigned (injected dependencies, immutable configuration) — **minor**
|
|
242
|
-
|
|
243
|
-
#### B4. Observable Collections
|
|
244
|
-
|
|
245
|
-
- [ ] `IObservableArray` MUST be mutated in place using MobX methods (`.replace()`, `.push()`, `.splice()`, etc.) inside `runInAction` — never reassigned
|
|
246
|
-
- [ ] `ObservableMap` MUST be mutated using `.set()`, `.delete()`, `.merge()`, `.replace()` — never reassigned
|
|
247
|
-
- [ ] Deep `@observable` on a large external object/instance should use `@observable.ref` instead
|
|
248
|
-
- [ ] A list of plain items that is replaced whole and never mutated per element uses `@observable.shallow` (or `.ref`), not deep `@observable`
|
|
249
|
-
|
|
250
|
-
Flags:
|
|
251
|
-
- `IObservableArray` field reassigned instead of using `.replace()` — **major**
|
|
252
|
-
- `ObservableMap` field reassigned instead of `.replace()` or `.merge()` — **major**
|
|
253
|
-
- Deep `@observable` on a list of plain items that is only ever replaced whole — **minor**
|
|
254
|
-
- Observable mutation outside `runInAction` in async context — **major**, or **blocker** where the interleaving can corrupt persisted state (frontend law 1)
|
|
255
|
-
|
|
256
|
-
#### B5. Reactions and Disposers
|
|
257
|
-
|
|
258
|
-
- [ ] Every `autorun`, `reaction`, or `when` created in the store MUST be disposed in `dispose()`
|
|
259
|
-
- [ ] Disposers MUST be stored in `private disposers: IReactionDisposer[]`
|
|
260
|
-
- [ ] `dispose()` MUST call `this.disposers.forEach(d => d())` (or equivalent)
|
|
261
|
-
- [ ] Stores with async operations MUST have a `disposed` guard: check `if (this.disposed) return` after each `await`
|
|
262
|
-
|
|
263
|
-
Flags:
|
|
264
|
-
- `autorun` / `reaction` / `when` without disposer in `dispose()` — **major**
|
|
265
|
-
- Missing `dispose()` in a store that creates reactions — **major**
|
|
266
|
-
- Missing `disposed` guard in async store methods — **major**
|
|
267
|
-
- `private disposers: IReactionDisposer[]` missing when reactions are used — **minor**
|
|
268
|
-
|
|
269
|
-
#### B6. Actions and Async
|
|
270
|
-
|
|
271
|
-
**Public methods (UI entrypoints):**
|
|
272
|
-
- [ ] Public mutating methods called from React components or route handlers MUST be `@action.bound`
|
|
273
|
-
- [ ] Public `@action.bound` methods MUST stay thin: optional guard → delegate to private method
|
|
274
|
-
- [ ] Public non-mutating helpers/selectors must NOT be `@action.bound` (unnecessary and misleading)
|
|
275
|
-
- [ ] Arrow method on a class used as an event handler alternative: acceptable when context must escape but generally prefer `@action.bound`
|
|
276
|
-
|
|
277
|
-
**Private async methods:**
|
|
278
|
-
- [ ] State mutations after `await` MUST be wrapped in `runInAction()`
|
|
279
|
-
- [ ] Private async methods that own loading/error flags MUST use `try/catch/finally`
|
|
280
|
-
- [ ] `catch (err: unknown)` MUST be used — NOT `catch (err: any)` or untyped `catch (err)`
|
|
281
|
-
- [ ] `finally` block MUST reset loading flags (e.g., `this.isLoading = false`) inside `runInAction`
|
|
282
|
-
|
|
283
|
-
Flags:
|
|
284
|
-
- Public UI method missing `@action.bound` — **major**
|
|
285
|
-
- Public helper method marked `@action.bound` but does not mutate state — **minor**
|
|
286
|
-
- Public async action doing API/IO directly instead of delegating to private — **minor** (layer-violation rule; **major** only with a named defect)
|
|
287
|
-
- State mutation after `await` outside `runInAction` — **major**, or **blocker** where the interleaving can corrupt persisted state (frontend law 1)
|
|
288
|
-
- Missing `try/catch/finally` on private async method owning loading flags — **major**
|
|
289
|
-
- `catch (err: any)` instead of `catch (err: unknown)` — **minor**
|
|
290
|
-
|
|
291
|
-
#### B7. Inter-Store Callbacks and Internal Handlers
|
|
292
|
-
|
|
293
|
-
Methods serving as callbacks between stores or internal event handlers MUST be `private`.
|
|
294
|
-
|
|
295
|
-
Patterns that MUST be `private` unless called from JSX:
|
|
296
|
-
- `onChangeEditorState(state)`
|
|
297
|
-
- `onFireExecutorChange()`
|
|
298
|
-
- `onChangeX(value)`
|
|
299
|
-
- `handleX()`
|
|
300
|
-
- `syncX()`
|
|
301
|
-
|
|
302
|
-
The test: "Is this method called from JSX or passed as a React event handler prop?" If NO — it is `private`, full stop.
|
|
303
|
-
|
|
304
|
-
Flags:
|
|
305
|
-
- Public method matching `onChangeX`, `onFireX`, `handleX`, `syncX` naming not called from components — **minor**
|
|
306
|
-
- Inter-store callback without `private` — **minor**
|
|
307
|
-
- `@action.bound` on a `private` method that is not passed as a callback reference — **minor**
|
|
308
|
-
|
|
309
|
-
#### B8. Bidirectional Sync Bounce Protection
|
|
310
|
-
|
|
311
|
-
When two stores synchronize state in both directions, at least one direction MUST have an equality guard (`if (newValue !== currentValue)`) before writing to the other store. Without this, changes bounce indefinitely.
|
|
312
|
-
|
|
313
|
-
Flags:
|
|
314
|
-
- Bidirectional store sync without equality guard — **blocker** only when a named trigger reaches the loop and it kills the render (crash); **major** for a reachable hang; **info** with no path shown
|
|
315
|
-
- Store A writes to Store B in a callback from Store B without `!==` check — same condition as the line above
|
|
316
|
-
- Truthy guard (`if (value)`) on optional/nullable field instead of equality check in sync logic — **major**
|
|
317
|
-
|
|
318
|
-
#### B9. API Calls Placement
|
|
319
|
-
|
|
320
|
-
- [ ] API/IO calls belong in `private` store methods only
|
|
321
|
-
- [ ] Public `@action.bound` methods are thin: guard-check → delegate to private method
|
|
322
|
-
- [ ] Components MUST NOT call APIs directly (fetch, axios, httpClient, service.callX) — even inside `useEffect`
|
|
323
|
-
|
|
324
|
-
Flags:
|
|
325
|
-
- API call inside a public `@action.bound` method body — **minor** (layer-violation rule; **major** only with a named defect)
|
|
326
|
-
- API call in a component (hook, handler, useEffect) — **minor** (frontend law 3; layer-violation rule)
|
|
327
|
-
|
|
328
|
-
#### B10. Lifecycle Initialization and Disposal
|
|
329
|
-
|
|
330
|
-
- [ ] `init()` / `onMount()` of a **child** store is called from the **parent store's** `init()` / `onMount()`, not from a component `useEffect`. The component's own store is different: its `onMount()` / `onUnmount()` are called from the component through the lifecycle bridge (D6), and that is correct
|
|
331
|
-
- [ ] Components must NOT trigger store data loading via `useEffect` (e.g., `useEffect(() => { store.load() }, [])`)
|
|
332
|
-
- [ ] Parent store's `onUnmount()` / `dispose()` MUST call `childStore.dispose()` to prevent stale-state updates
|
|
333
|
-
- [ ] Store `dispose()` MUST set `this.disposed = true` before canceling async work
|
|
334
|
-
|
|
335
|
-
Flags:
|
|
336
|
-
- Component `useEffect` calls `store.loadX()`, or a child store's `init()` / `onMount()` that the parent store owns — **minor** (as above). Do not flag the bridge `useEffect(() => { store.onMount(); return () => store.onUnmount(); }, [store])`
|
|
337
|
-
- Parent store does not call `child.dispose()` in `onUnmount()` / `dispose()` — **major**
|
|
338
|
-
- Missing `disposed` flag in store with async operations — **major**
|
|
339
|
-
|
|
340
|
-
---
|
|
341
|
-
|
|
342
|
-
### Part C: TypeScript Safety
|
|
343
|
-
|
|
344
|
-
- [ ] No `any` type in changed code — use `unknown` + type guards or specific types
|
|
345
|
-
- [ ] No `as any` or `as unknown as T` unsafe double-cast without a comment explaining why
|
|
346
|
-
- [ ] No `!` non-null assertion without a comment proving the value cannot be null/undefined at that point
|
|
347
|
-
- [ ] Props interface MUST use `I` prefix: `interface IMyComponentProps { ... }`
|
|
348
|
-
- [ ] Prefer optional chaining (`?.`) and nullish coalescing (`??`) over `!` assertions
|
|
349
|
-
- [ ] A store's state and its public API are typed with explicit interfaces/types, not inferred object literals or `any`
|
|
350
|
-
- [ ] `catch (err: unknown)` — typed error handling, not `catch (err)` or `catch (err: any)`
|
|
351
|
-
|
|
352
|
-
Flags:
|
|
353
|
-
- `any` type in new code — **minor** (**major** only with a named input and the wrong value it lets through)
|
|
354
|
-
- `!` non-null assertion without justification comment — **minor**
|
|
355
|
-
- Props interface without `I` prefix — **minor**
|
|
356
|
-
- Store state or public API left to an inferred object-literal type — **minor**
|
|
357
|
-
- `catch (err: any)` — **minor**
|
|
358
|
-
|
|
359
|
-
---
|
|
140
|
+
A pattern listed under a row's **Not a finding** is not reported. A defect no row covers is rated by the canonical rubric.
|
|
360
141
|
|
|
361
142
|
### Part D: Project-Specific Patterns (populated from CLAUDE.md in Step 0)
|
|
362
143
|
|
|
@@ -400,69 +181,7 @@ class RootStore {
|
|
|
400
181
|
- Swappable stores MUST use `@observable.shallow`, not `@observable` — deep observation of child store internals causes double-tracking — **major** if using `@observable` on swappable stores
|
|
401
182
|
- Context interface (callbacks the child calls back into the parent) should be passed as arrow functions, not raw store references — flag raw store reference leak as **minor**
|
|
402
183
|
|
|
403
|
-
#### D3.
|
|
404
|
-
|
|
405
|
-
When a project CLAUDE.md defines which binding style to use for methods passed between stores:
|
|
406
|
-
|
|
407
|
-
```typescript
|
|
408
|
-
// Inter-store callback: arrow function property (auto-bound; no @action.bound needed)
|
|
409
|
-
handleChildChange = (value: string) => {
|
|
410
|
-
runInAction(() => { this.value = value; });
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
// UI entrypoint called from JSX: @action.bound
|
|
414
|
-
@action.bound
|
|
415
|
-
submit() { ... }
|
|
416
|
-
```
|
|
417
|
-
|
|
418
|
-
If the project follows this distinction:
|
|
419
|
-
- Arrow function for store-to-store methods: correct — do NOT flag
|
|
420
|
-
- `@action.bound` on an inter-store method: **minor** (stylistically wrong per project convention, functionally OK)
|
|
421
|
-
- Neither arrow nor `@action.bound` on a mutating method — **major** (Iron Laws still apply regardless of style choice)
|
|
422
|
-
|
|
423
|
-
#### D4. React Hooks to Avoid (MobX Equivalents)
|
|
424
|
-
|
|
425
|
-
When a project CLAUDE.md explicitly forbids certain hooks in favor of MobX equivalents:
|
|
426
|
-
|
|
427
|
-
| Forbidden Pattern | MobX Replacement | Severity if found |
|
|
428
|
-
|-------------------|-----------------|-------------------|
|
|
429
|
-
| `useState` for store-managed state | `@observable` in store | major |
|
|
430
|
-
| `useMemo` for derived store values | `@computed` getter | major |
|
|
431
|
-
| `useCallback` wrapping a store method | `@action.bound` or arrow method | minor |
|
|
432
|
-
|
|
433
|
-
Flag only when the hook manages state that belongs in a store. Local UI-only state (`useState` for a controlled input that never persists) is acceptable.
|
|
434
|
-
|
|
435
|
-
#### D5. Store Initialization in Components
|
|
436
|
-
|
|
437
|
-
When a project defines a canonical store initialization pattern:
|
|
438
|
-
|
|
439
|
-
```typescript
|
|
440
|
-
// Canonical: useLocalObservable with lazy initializer (store created once, not on every render)
|
|
441
|
-
const store = useLocalObservable(() => props.store ?? new ComponentStore(props.service));
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
- `new Store()` directly in the component body — **major** (store recreated on every render)
|
|
445
|
-
- Store created with `useMemo` instead of `useLocalObservable` — **minor** (not observable-aware; `useLocalObservable` is the correct primitive)
|
|
446
|
-
- `useLocalObservable(() => props.store)` when the store is always provided externally is acceptable
|
|
447
|
-
|
|
448
|
-
#### D6. Store Lifecycle Bridge via useEffect
|
|
449
|
-
|
|
450
|
-
The component tells its store that it mounted and unmounted; the store decides what that means:
|
|
451
|
-
|
|
452
|
-
```typescript
|
|
453
|
-
useEffect(() => {
|
|
454
|
-
store.onMount();
|
|
455
|
-
return () => store.onUnmount();
|
|
456
|
-
}, [store]);
|
|
457
|
-
```
|
|
458
|
-
|
|
459
|
-
This is the correct lifecycle bridge — do not flag it under A3 or B10. Those rules target a data fetch or business logic placed in the effect, and a component reaching into a child store the parent store owns; they do not target the lifecycle hooks themselves. What `onMount()` does (load, subscribe, initialise child stores) is store code and is reviewed as store code.
|
|
460
|
-
|
|
461
|
-
Distinction:
|
|
462
|
-
- `useEffect(() => { store.onMount(); return () => store.onUnmount(); }, [store])` — correct lifecycle bridge — **do not flag**
|
|
463
|
-
- `useEffect(() => { store.loadData(); }, [])` or `useEffect(() => { store.childStore.init(); }, [])` — data trigger, or a child store's lifecycle the parent store owns, run from the component — **minor** (A3 / B10, regardless of project conventions); **major** only with a named defect (trigger and wrong outcome)
|
|
464
|
-
|
|
465
|
-
#### D7. JSX and Naming Conventions
|
|
184
|
+
#### D3. JSX and Naming Conventions
|
|
466
185
|
|
|
467
186
|
When a project CLAUDE.md defines JSX and naming rules:
|
|
468
187
|
|
|
@@ -536,7 +255,7 @@ STATUS: DONE_WITH_CONCERNS
|
|
|
536
255
|
### [F-001] Title
|
|
537
256
|
- **Severity**: blocker | major | minor | info
|
|
538
257
|
- **File**: path/to/file.ts:line
|
|
539
|
-
- **Rule**:
|
|
258
|
+
- **Rule**: the rule and row, e.g. `code-style-patterns` Rule 5 | `mobx-store-template` Rule 2
|
|
540
259
|
- **Problem**: what is wrong in the code
|
|
541
260
|
- **Why it matters**: concrete impact (silent non-reactivity, stale state, memory leak, etc.)
|
|
542
261
|
- **Fix**: concrete suggestion
|
|
@@ -552,21 +271,8 @@ STATUS: DONE_WITH_CONCERNS
|
|
|
552
271
|
|
|
553
272
|
### Where frontend conditions land
|
|
554
273
|
|
|
555
|
-
Severity comes from **Severity (canonical)** in `review-orchestrator/SKILL.md
|
|
556
|
-
|
|
557
|
-
conditions land under that rubric, not a second rubric.
|
|
558
|
-
|
|
559
|
-
| Condition | Severity | Why, under the canonical rubric |
|
|
560
|
-
|---|---|---|
|
|
561
|
-
| A store mutation that corrupts or loses persisted state | `blocker` | Data corruption |
|
|
562
|
-
| A render path that throws on an input the change admits | `blocker` | Crash |
|
|
563
|
-
| Missing `observer()` on a component that reads observables | `major` | Named trigger (the observable changes) and named outcome (the UI does not update). Stale UI is not a crash, data loss, vulnerability, or missing acceptance criterion |
|
|
564
|
-
| Observable mutation outside an action or `runInAction` | `major` — `blocker` only where the interleaving can corrupt persisted state | Same wording as `review-logic` and `review-highload` for a race: the outcome decides |
|
|
565
|
-
| API/IO call in a component; business logic in a component | `minor` — `major` only with a named defect it causes (trigger and outcome) or a stated project rule | Layer violation: structural. Identical to `review-architecture`'s rule for the same condition |
|
|
566
|
-
| Bidirectional sync without an equality guard | `blocker` when a named trigger reaches the loop and the render dies; `major` for a reachable hang; `info` with no path | The outcome and its reachability decide, not the pattern |
|
|
567
|
-
| `useState` for store-managed state; `useMemo` for a derived store value; a store constructed in the component body | `major` | Named trigger (a re-render) and named outcome (state lost or recreated) |
|
|
568
|
-
| `public` on a class member; `useCallback` around a store method; a store created with `useMemo` instead of `useLocalObservable`; an unprivate inter-store callback | `minor` | The code behaves correctly. A lint rule that fails CI is caught by the machine, not by a reviewer, and the cost is to the next editor |
|
|
569
|
-
| Observation with no concrete bug | `info` | Shared laws 1 and 2 |
|
|
274
|
+
Severity comes from **Severity (canonical)** in `review-orchestrator/SKILL.md`; the rules' **Review severities** tables (Parts A-C) are that rubric applied to these patterns, and this reviewer keeps no table of its own. Outside those rows: a store mutation that corrupts or loses persisted state is `blocker`, a render path that throws on an input the change admits is `blocker`, and an observation with no concrete bug is `info` (shared laws 1 and 2).
|
|
275
|
+
|
|
570
276
|
|
|
571
277
|
---
|
|
572
278
|
|
|
@@ -577,13 +283,13 @@ Stop and re-read these rules if you are thinking:
|
|
|
577
283
|
| Rationalization | Why it's wrong |
|
|
578
284
|
|---|---|
|
|
579
285
|
| "The store is small, no need for full observer wrapping" | Missing `observer()` is reported regardless of store size — frontend law 2. It is `major`, not `blocker`: stale UI is not one of the four shapes |
|
|
580
|
-
| "The mutation happens in a non-async method, so runInAction isn't needed" | Mutations outside action/runInAction are always reported — frontend law 1; the
|
|
581
|
-
| "I'll skip the API call in component to avoid friction" | API in a component is always reported — frontend law 3; `minor` unless a named defect
|
|
286
|
+
| "The mutation happens in a non-async method, so runInAction isn't needed" | Mutations outside action/runInAction are always reported — frontend law 1; the rule's severity table sets the level |
|
|
287
|
+
| "I'll skip the API call in component to avoid friction" | API in a component is always reported — frontend law 3; `minor` unless a named defect makes it `major`, as in `review-architecture` |
|
|
582
288
|
| "The `public` keyword is just a style issue, I'll call it minor" | It is `minor` — but still reported. The linter fails CI on it, which is why a reviewer does not need to block merge on it too |
|
|
583
289
|
| "This inter-store callback works fine as public" | Frontend law 5: if it is not called from JSX, it must be `private` |
|
|
584
290
|
| "No spec compliance check needed for this skill" | Correct — this skill covers Stage 2 (code quality) only; spec compliance is handled by the orchestrator or review-logic |
|
|
585
291
|
| "I can suggest adding useCallback everywhere for safety" | With MobX+observer, useCallback is rarely needed and adds noise; only flag when concretely justified |
|
|
586
|
-
| "The bidirectional sync looks fine, no equality guard needed" | Bidirectional sync without an equality guard is always reported; its level follows the
|
|
292
|
+
| "The bidirectional sync looks fine, no equality guard needed" | Bidirectional sync without an equality guard is always reported; its level follows the `mobx-store-template` table (reachability decides) |
|
|
587
293
|
|
|
588
294
|
---
|
|
589
295
|
|
|
@@ -26,7 +26,7 @@ license: "MIT"
|
|
|
26
26
|
|
|
27
27
|
Reviewer for frontend repository conventions that are more specific than generic React/MobX
|
|
28
28
|
correctness. Use it alongside `review-frontend`, `review-style`, `review-performance`, and
|
|
29
|
-
`review-logic`. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history)
|
|
29
|
+
`review-logic`. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
|
|
30
30
|
|
|
31
31
|
Before reviewing, read the nearest project guide files if they exist: root `CLAUDE.md`,
|
|
32
32
|
`AGENTS.md`, `.junie/guidelines.md`, `ARCHITECTURE.md`, and module-level `CLAUDE.md` files.
|
|
@@ -58,28 +58,15 @@ project-specific guide was found.
|
|
|
58
58
|
|
|
59
59
|
### TypeScript
|
|
60
60
|
|
|
61
|
-
- Avoid
|
|
61
|
+
- Avoid broad `as` casts. Prefer type guards, discriminated unions, and precise types. `any`, `!` and the `I` prefix are `.metaproject/rules/core/code-style-patterns.mdc` Rule 8.
|
|
62
62
|
- Keep tests and stories typed unless intentionally exercising invalid edge cases.
|
|
63
63
|
- Follow local React type import conventions consistently.
|
|
64
64
|
- Write new code in the direction of stricter compiler settings.
|
|
65
65
|
|
|
66
|
-
### React Components
|
|
66
|
+
### React Components and State Stores
|
|
67
67
|
|
|
68
|
-
-
|
|
69
|
-
- Business logic, IO, validation, and data transformation belong in stores/services.
|
|
70
|
-
- Avoid React local state/memo/callback hooks where the local architecture expects observable or
|
|
71
|
-
computed state.
|
|
72
|
-
- Use effects only for lifecycle, subscriptions, and third-party integration; always clean up.
|
|
73
|
-
- Components reading observable state are wrapped in the repository's reactive wrapper.
|
|
74
|
-
- Props shape and file naming follow local conventions.
|
|
68
|
+
Components follow `.metaproject/rules/core/code-style-patterns.mdc` (reactive wrapper, thin components, where state lives, effects and cleanup, props naming) and stores follow `.metaproject/rules/core/mobx-store-template.mdc` (naming and file casing, reactivity in the constructor, member order, `@action.bound` on public UI-called methods only, actions around async mutations). Each takes its severity from that rule's **Review severities** table, and a local guide that is stricter wins. Local `useState` for UI-only state and a memo over non-store values are correct. Beyond the rules:
|
|
75
69
|
|
|
76
|
-
### State Stores
|
|
77
|
-
|
|
78
|
-
- Store classes follow local naming, file casing, context, and hook conventions.
|
|
79
|
-
- Observable classes initialize their reactivity in constructors.
|
|
80
|
-
- Member ordering follows local lint/member-ordering rules.
|
|
81
|
-
- UI-called actions preserve `this` binding.
|
|
82
|
-
- Async callbacks that mutate observable state re-enter an action boundary.
|
|
83
70
|
- Derived serializable state has a single source of truth such as `currentState` when that is the
|
|
84
71
|
local pattern.
|
|
85
72
|
|
|
@@ -90,13 +77,12 @@ project-specific guide was found.
|
|
|
90
77
|
entries.
|
|
91
78
|
- Browser storage goes through shared wrappers/adapters; direct `localStorage`/`sessionStorage`
|
|
92
79
|
access is a review finding when wrappers exist.
|
|
93
|
-
- Catch blocks
|
|
94
|
-
|
|
80
|
+
- Catch blocks notify through the established UI notification channel and normalize user-facing
|
|
81
|
+
messages; keeping the cause and logging once are `.metaproject/rules/core/error-handling.mdc` Rules 3 and 5.
|
|
95
82
|
|
|
96
83
|
### Stories and Tooling
|
|
97
84
|
|
|
98
|
-
- New reusable UI surfaces have stories or examples matching local standards.
|
|
99
|
-
- Stories include representative default, empty/minimal, and stress/large states where useful.
|
|
85
|
+
- New reusable UI surfaces have stories or examples matching local standards; which states they cover is `.metaproject/rules/core/storybook-guidelines.mdc` Rule 2.
|
|
100
86
|
- Wrapper components expose plain props for controls when the primary component is store-only.
|
|
101
87
|
- Treat unused-code tools as signals: preserve intentional public APIs with narrow ignores rather
|
|
102
88
|
than deleting documented runtime/story/test entrypoints.
|
|
@@ -169,7 +155,7 @@ conditions land under that rubric.
|
|
|
169
155
|
| Condition | Severity | Why, under the canonical rubric |
|
|
170
156
|
|---|---|---|
|
|
171
157
|
| Unguarded direct storage writes that can throw on quota | `blocker` | Crash on a reachable input |
|
|
172
|
-
| Lost reactivity; masked translation
|
|
158
|
+
| Lost reactivity (`code-style-patterns.mdc` Rule 1 row); a masked translation | `major` | Named trigger and named outcome. Identical to `review-frontend`'s rating for lost reactivity, deliberately. An error path is rated by `error-handling.mdc`, not here |
|
|
173
159
|
| A convention violation the linter or CI already fails on | `minor` | The machine catches it; a reviewer restating it is not a merge gate |
|
|
174
160
|
| Naming, story coverage, file placement | `minor` | Correct today; the cost is to the next editor |
|
|
175
161
|
| A convention preference with no named consequence | `info` | Shared laws 1 and 2 |
|