@mrciphersmith/keryx 0.4.27 → 0.4.28
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/README.md +2 -2
- package/dist/cli.js +105165 -104989
- package/dist/core.js +21 -197
- package/dist/keryx-general-worker-entry.js +22 -201
- package/package.json +3 -3
- package/src/gdskills/bundled/agents/work-planner.md +1 -1
- package/src/gdskills/bundled/install-manifest.json +3 -26
- package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +1 -2
- package/src/gdskills/bundled/rules/core/definition-of-done.mdc +0 -1
- package/src/gdskills/bundled/rules/core/implementation-doc-mandate.mdc +4 -5
- package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +8 -8
- package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +7 -10
- package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +12 -21
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +3 -3
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +1 -1
- package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/interview/SKILL.md +3 -4
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/git-publish/SKILL.md +60 -0
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +3 -3
- package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +7 -7
- package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +22 -22
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +15 -15
- package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +7 -7
- package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +34 -30
- package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +64 -135
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +4 -4
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +18 -20
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +12 -18
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +2 -2
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +2 -10
- package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +35 -35
- package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +4 -5
- package/src/gdskills/bundled/skills/review/review-premise/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +3 -5
- package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +14 -15
- package/src/gdskills/bundled/skills/review/review-style/SKILL.md +14 -13
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +11 -11
- package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +10 -11
- package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +5 -5
- package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
- package/src/gdskills/bundled/stacks/mobx/agent-refs.json +1 -1
- package/src/gdskills/bundled/stacks/mobx/governance/scout.json +2 -2
- package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/SKILL.md +2 -2
- package/src/gdskills/bundled/stacks/vue/governance/scout.json +1 -1
- package/src/gdskills/contracts/review-finding.schema.json +2 -2
- package/src/gdskills/bundled/rules/core/code-review-ai-assistant.mdc +0 -49
- package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +0 -198
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +0 -177
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +0 -414
- package/src/gdskills/bundled/skills/orchestration/job-documenter/input-contract.schema.json +0 -55
- package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json +0 -58
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +0 -209
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +0 -209
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +0 -208
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +0 -255
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +0 -255
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +0 -254
- package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +0 -209
- package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +0 -209
- package/src/gdskills/bundled/skills/planning/planner/SKILL.md +0 -208
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +0 -171
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +0 -171
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +0 -170
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +0 -184
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +0 -184
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +0 -183
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +0 -249
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +0 -249
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +0 -248
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +0 -199
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +0 -199
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +0 -198
- package/src/gdskills/bundled/skills/quality/commit/SKILL.md +0 -87
- package/src/gdskills/bundled/skills/quality/pr/SKILL.md +0 -95
- package/src/gdskills/bundled/skills/quality/push/SKILL.md +0 -73
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +0 -238
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +0 -301
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +0 -208
|
@@ -14,7 +14,7 @@ triggers:
|
|
|
14
14
|
- "degradation against the base branch"
|
|
15
15
|
metadata:
|
|
16
16
|
author: "MrCipherSmith"
|
|
17
|
-
version: "1.
|
|
17
|
+
version: "1.3.0"
|
|
18
18
|
category: "review"
|
|
19
19
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
20
20
|
origin: "authored"
|
|
@@ -33,7 +33,7 @@ How this differs from `review-regression`, before anything else:
|
|
|
33
33
|
|
|
34
34
|
`review-regression` is untouched by this reviewer and keeps its own screen. Do not re-file its findings; do not widen yours into its question.
|
|
35
35
|
|
|
36
|
-
Your inputs are the reviewer payload only; session memory and earlier conversation are not inputs. You run no command unless your payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where your host gives a read-only child git (keryx shell does not: there the payload supplies the history).
|
|
36
|
+
Your inputs are the reviewer payload only; session memory and earlier conversation are not inputs. You run no command unless your payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where your host gives a read-only child git (keryx shell does not: there the payload supplies the history), and the read-only layer commands the orchestrator lists (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`, `keryx ctx rg|read`); you never write in the reviewed tree.
|
|
37
37
|
|
|
38
38
|
## The one question
|
|
39
39
|
|
|
@@ -65,12 +65,12 @@ minor, major or blocker carries one `evidence_kind`, and `evidence` says what yo
|
|
|
65
65
|
|---|---|
|
|
66
66
|
| `probe` | you ran the code, or a script against it, on head and on base, and the outputs differ |
|
|
67
67
|
| `consumer-trace` | you followed a consumer of the changed symbol to its effect, file by file |
|
|
68
|
-
| `merge-trace` |
|
|
69
|
-
| `red-test` |
|
|
68
|
+
| `merge-trace` | two heads were merged (run: scratch copy, orchestrator, verify-run) or the merge was traced by reading both diffs, to show what the second drops |
|
|
69
|
+
| `red-test` | a test fails on the head and passes on the base: an existing named test, run on head and base by the orchestrator (`keryx review verify-run`), or one written and run in a scratch copy (`keryx review mutate`) |
|
|
70
70
|
| `base-diff` | you read the same path on base and on head and quote both |
|
|
71
71
|
|
|
72
|
-
`probe
|
|
73
|
-
`run-tests
|
|
72
|
+
`probe` runs code, so it needs `allowed_tools` to include `run-tests`. A run `red-test` or `merge-trace` also write, and never in the reviewed tree (other reviewers read it at once): they count only when the orchestrator produced them (`keryx review verify-run`) or they ran in a scratch copy (`keryx review mutate`). A merge you traced by reading both diffs is `merge-trace` too and a read-only reviewer may file it, saying in `evidence` that it was read, not run; any other unrun trace is stated in prose, labelled unrun.
|
|
73
|
+
Without `run-tests`, `consumer-trace` and `base-diff` are still evidence: a trigger and outcome you
|
|
74
74
|
read in the code is a finding, `major` when a user who reaches it gets a wrong, lost or blocked result.
|
|
75
75
|
A question is for what the code cannot answer (a backend reply, data, timing), not for what you did not run.
|
|
76
76
|
|
|
@@ -84,7 +84,7 @@ and lists it in `scope.md` under `## Degradation evidence screen` with the rule
|
|
|
84
84
|
- the diff, and the PR description when there is one;
|
|
85
85
|
- the importers of the module that holds each changed shared export (and of a barrel that re-exports it), from the code graph, under one cap shared by all exports, with what it dropped. Trace those first. If the cap dropped consumers, say so in your summary; do not imply a complete sweep.
|
|
86
86
|
Where the graph lists no importers for a changed export (a barrel, a re-export, a file it has no node for), search for the users of the symbol, mark them `search-derived` in `enumeration_method`, and name in the summary the exports the graph could not answer;
|
|
87
|
-
- the flow's frozen acceptance criteria, and the previous round's findings.
|
|
87
|
+
- the flow's frozen acceptance criteria (none supplied: use the PR body or issue the payload carries, else say in the summary that no criteria were supplied), and the previous round's findings.
|
|
88
88
|
|
|
89
89
|
## How to look
|
|
90
90
|
|
|
@@ -16,7 +16,7 @@ triggers:
|
|
|
16
16
|
- "reactflow review"
|
|
17
17
|
metadata:
|
|
18
18
|
author: "MrCipherSmith"
|
|
19
|
-
version: "1.
|
|
19
|
+
version: "1.1.0"
|
|
20
20
|
category: "review"
|
|
21
21
|
license: "MIT"
|
|
22
22
|
---
|
|
@@ -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), and the read-only layer commands the orchestrator lists (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`, `keryx ctx rg|read`); it never writes in the reviewed tree.
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
@@ -5,7 +5,7 @@ description: "Use when a frontend review is requested, checking React component
|
|
|
5
5
|
triggers: ["frontend review", "component review", "ui review", "review React", "review components"]
|
|
6
6
|
metadata:
|
|
7
7
|
author: "MrCipherSmith"
|
|
8
|
-
version: "1.
|
|
8
|
+
version: "1.5.0"
|
|
9
9
|
category: "review"
|
|
10
10
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
11
11
|
stack_requires: "react,mobx"
|
|
@@ -17,9 +17,9 @@ 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), and the read-only layer commands the orchestrator lists (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`, `keryx ctx rg|read`); it never writes in the reviewed tree.
|
|
21
21
|
|
|
22
|
-
This skill consolidates what
|
|
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
|
|
|
24
24
|
---
|
|
25
25
|
|
|
@@ -47,7 +47,7 @@ This skill consolidates what was previously split between `code-style-review` (f
|
|
|
47
47
|
| Cross-layer architecture (service layer design, module boundaries) | NO | `review-architecture` |
|
|
48
48
|
| Security vulnerabilities (XSS, injection, auth gaps) | NO | `review-security-code` |
|
|
49
49
|
| Performance bottlenecks (N+1, bundle size, re-render frequency) | NO | `review-performance` |
|
|
50
|
-
| Code style, naming outside frontend conventions | NO | `
|
|
50
|
+
| Code style, naming outside frontend conventions | NO | `review-style` |
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
@@ -67,9 +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**.
|
|
71
|
-
|
|
72
|
-
not a second opinion.
|
|
70
|
+
These say what is **always reported**. Its severity is the conditions table under
|
|
71
|
+
Finding Format — the canonical rubric applied, not a second opinion.
|
|
73
72
|
|
|
74
73
|
1. **Every observable mutation outside an action or `runInAction` is reported.**
|
|
75
74
|
No exception for "small stores" or "simple assignments".
|
|
@@ -140,7 +139,7 @@ If no CLAUDE.md is found, proceed normally. CLAUDE.md is optional and non-blocki
|
|
|
140
139
|
|
|
141
140
|
Flags:
|
|
142
141
|
- Component reads `store.*` or `useLocalObservable` result but is not wrapped in `observer` — **major** (stale UI; not one of the four merge-blocking shapes)
|
|
143
|
-
- `observer` applied inside another HOC wrapper instead of outside — **major**
|
|
142
|
+
- `observer` applied inside another HOC wrapper instead of outside — **minor** (layer-violation rule; **major** only with a named defect it causes)
|
|
144
143
|
|
|
145
144
|
#### A2. MVVM Boundary (Business Logic in Store, Not Component)
|
|
146
145
|
|
|
@@ -150,8 +149,8 @@ Flags:
|
|
|
150
149
|
- [ ] Computed/derived values MUST be `@computed` getters in the store, not inline derivations in the component body
|
|
151
150
|
|
|
152
151
|
Flags:
|
|
153
|
-
- `fetch()` / `axios` / `httpClient` call directly in component (hook or handler) — **
|
|
154
|
-
- Business logic (conditionals, transformations, validation) inside a component event handler instead of a store method — **
|
|
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)
|
|
155
154
|
- Derived value computed inline in component that could be a `@computed` getter — **minor**
|
|
156
155
|
|
|
157
156
|
#### A3. useEffect Misuse
|
|
@@ -163,9 +162,9 @@ Flags:
|
|
|
163
162
|
- [ ] Every `useEffect` that creates a subscription, timer, or listener MUST return a cleanup function
|
|
164
163
|
|
|
165
164
|
Flags:
|
|
166
|
-
- `useEffect` calls `store.loadX()`, or a child store's `init()` that the parent store owns — **major**
|
|
167
|
-
- `useEffect` contains `fetch()` or IO — **
|
|
168
|
-
- `useEffect` contains business logic / state derivation — **
|
|
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)
|
|
169
168
|
- `useEffect` creates a subscription/timer/listener with no cleanup return — **major** (memory leak)
|
|
170
169
|
|
|
171
170
|
#### A4. Key Props on Lists
|
|
@@ -237,19 +236,21 @@ Decision rule for inter-store callbacks: ask "Is this called from JSX or a React
|
|
|
237
236
|
|
|
238
237
|
Flags:
|
|
239
238
|
- `public` keyword on any member — **minor** (ESLint `no-public` already fails CI; a reviewer restating a lint rule is not a merge gate)
|
|
240
|
-
- `onChangeX`, `onFireX`, `handleX`, `syncX` without `private` — **
|
|
241
|
-
- Missing `private` on internal state or helper methods — **
|
|
242
|
-
- Missing `private readonly` on injected dependencies — **minor**
|
|
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**
|
|
243
242
|
|
|
244
243
|
#### B4. Observable Collections
|
|
245
244
|
|
|
246
245
|
- [ ] `IObservableArray` MUST be mutated in place using MobX methods (`.replace()`, `.push()`, `.splice()`, etc.) inside `runInAction` — never reassigned
|
|
247
246
|
- [ ] `ObservableMap` MUST be mutated using `.set()`, `.delete()`, `.merge()`, `.replace()` — never reassigned
|
|
248
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
249
|
|
|
250
250
|
Flags:
|
|
251
251
|
- `IObservableArray` field reassigned instead of using `.replace()` — **major**
|
|
252
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**
|
|
253
254
|
- Observable mutation outside `runInAction` in async context — **major**, or **blocker** where the interleaving can corrupt persisted state (frontend law 1)
|
|
254
255
|
|
|
255
256
|
#### B5. Reactions and Disposers
|
|
@@ -282,7 +283,7 @@ Flags:
|
|
|
282
283
|
Flags:
|
|
283
284
|
- Public UI method missing `@action.bound` — **major**
|
|
284
285
|
- Public helper method marked `@action.bound` but does not mutate state — **minor**
|
|
285
|
-
- Public async action doing API/IO directly instead of delegating to private — **major**
|
|
286
|
+
- Public async action doing API/IO directly instead of delegating to private — **minor** (layer-violation rule; **major** only with a named defect)
|
|
286
287
|
- State mutation after `await` outside `runInAction` — **major**, or **blocker** where the interleaving can corrupt persisted state (frontend law 1)
|
|
287
288
|
- Missing `try/catch/finally` on private async method owning loading flags — **major**
|
|
288
289
|
- `catch (err: any)` instead of `catch (err: unknown)` — **minor**
|
|
@@ -301,8 +302,8 @@ Patterns that MUST be `private` unless called from JSX:
|
|
|
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.
|
|
302
303
|
|
|
303
304
|
Flags:
|
|
304
|
-
- Public method matching `onChangeX`, `onFireX`, `handleX`, `syncX` naming not called from components — **
|
|
305
|
-
- Inter-store callback without `private` — **
|
|
305
|
+
- Public method matching `onChangeX`, `onFireX`, `handleX`, `syncX` naming not called from components — **minor**
|
|
306
|
+
- Inter-store callback without `private` — **minor**
|
|
306
307
|
- `@action.bound` on a `private` method that is not passed as a callback reference — **minor**
|
|
307
308
|
|
|
308
309
|
#### B8. Bidirectional Sync Bounce Protection
|
|
@@ -310,8 +311,8 @@ Flags:
|
|
|
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.
|
|
311
312
|
|
|
312
313
|
Flags:
|
|
313
|
-
- Bidirectional store sync without equality guard — **blocker**
|
|
314
|
-
- Store A writes to Store B in a callback from Store B without `!==` check —
|
|
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
|
|
315
316
|
- Truthy guard (`if (value)`) on optional/nullable field instead of equality check in sync logic — **major**
|
|
316
317
|
|
|
317
318
|
#### B9. API Calls Placement
|
|
@@ -321,8 +322,8 @@ Flags:
|
|
|
321
322
|
- [ ] Components MUST NOT call APIs directly (fetch, axios, httpClient, service.callX) — even inside `useEffect`
|
|
322
323
|
|
|
323
324
|
Flags:
|
|
324
|
-
- API call inside a public `@action.bound` method body — **major**
|
|
325
|
-
- API call in a component (hook, handler, useEffect) — **
|
|
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)
|
|
326
327
|
|
|
327
328
|
#### B10. Lifecycle Initialization and Disposal
|
|
328
329
|
|
|
@@ -332,7 +333,7 @@ Flags:
|
|
|
332
333
|
- [ ] Store `dispose()` MUST set `this.disposed = true` before canceling async work
|
|
333
334
|
|
|
334
335
|
Flags:
|
|
335
|
-
- Component `useEffect` calls `store.loadX()`, or a child store's `init()` / `onMount()` that the parent store owns — **
|
|
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])`
|
|
336
337
|
- Parent store does not call `child.dispose()` in `onUnmount()` / `dispose()` — **major**
|
|
337
338
|
- Missing `disposed` flag in store with async operations — **major**
|
|
338
339
|
|
|
@@ -345,12 +346,14 @@ Flags:
|
|
|
345
346
|
- [ ] No `!` non-null assertion without a comment proving the value cannot be null/undefined at that point
|
|
346
347
|
- [ ] Props interface MUST use `I` prefix: `interface IMyComponentProps { ... }`
|
|
347
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`
|
|
348
350
|
- [ ] `catch (err: unknown)` — typed error handling, not `catch (err)` or `catch (err: any)`
|
|
349
351
|
|
|
350
352
|
Flags:
|
|
351
|
-
- `any` type in new code — **major**
|
|
353
|
+
- `any` type in new code — **minor** (**major** only with a named input and the wrong value it lets through)
|
|
352
354
|
- `!` non-null assertion without justification comment — **minor**
|
|
353
355
|
- Props interface without `I` prefix — **minor**
|
|
356
|
+
- Store state or public API left to an inferred object-literal type — **minor**
|
|
354
357
|
- `catch (err: any)` — **minor**
|
|
355
358
|
|
|
356
359
|
---
|
|
@@ -457,7 +460,7 @@ This is the correct lifecycle bridge — do not flag it under A3 or B10. Those r
|
|
|
457
460
|
|
|
458
461
|
Distinction:
|
|
459
462
|
- `useEffect(() => { store.onMount(); return () => store.onUnmount(); }, [store])` — correct lifecycle bridge — **do not flag**
|
|
460
|
-
- `useEffect(() => { store.loadData(); }, [])` or `useEffect(() => { store.childStore.init(); }, [])` — data trigger, or a child store's lifecycle the parent store owns, run from the component — **
|
|
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)
|
|
461
464
|
|
|
462
465
|
#### D7. JSX and Naming Conventions
|
|
463
466
|
|
|
@@ -559,7 +562,8 @@ conditions land under that rubric, not a second rubric.
|
|
|
559
562
|
| A render path that throws on an input the change admits | `blocker` | Crash |
|
|
560
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 |
|
|
561
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 |
|
|
562
|
-
| API/IO call in a component | `major` | Layer violation. Identical to `review-architecture`'s rule for the same condition
|
|
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 |
|
|
563
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) |
|
|
564
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 |
|
|
565
569
|
| Observation with no concrete bug | `info` | Shared laws 1 and 2 |
|
|
@@ -573,13 +577,13 @@ Stop and re-read these rules if you are thinking:
|
|
|
573
577
|
| Rationalization | Why it's wrong |
|
|
574
578
|
|---|---|
|
|
575
579
|
| "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 |
|
|
576
|
-
| "The mutation happens in a non-async method, so runInAction isn't needed" | Mutations outside action/runInAction are always
|
|
577
|
-
| "I'll
|
|
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 conditions table sets the level |
|
|
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 or a stated project rule makes it `major`, as in `review-architecture` |
|
|
578
582
|
| "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 |
|
|
579
583
|
| "This inter-store callback works fine as public" | Frontend law 5: if it is not called from JSX, it must be `private` |
|
|
580
584
|
| "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 |
|
|
581
585
|
| "I can suggest adding useCallback everywhere for safety" | With MobX+observer, useCallback is rarely needed and adds noise; only flag when concretely justified |
|
|
582
|
-
| "The bidirectional sync looks fine, no equality guard needed" | Bidirectional sync without equality guard is
|
|
586
|
+
| "The bidirectional sync looks fine, no equality guard needed" | Bidirectional sync without an equality guard is always reported; its level follows the conditions table (reachability decides) |
|
|
583
587
|
|
|
584
588
|
---
|
|
585
589
|
|
|
@@ -14,7 +14,7 @@ description: |
|
|
|
14
14
|
triggers: ["frontend conventions", "local frontend rules", "CLAUDE frontend", "review frontend conventions"]
|
|
15
15
|
metadata:
|
|
16
16
|
author: "MrCipherSmith"
|
|
17
|
-
version: "1.
|
|
17
|
+
version: "1.1.0"
|
|
18
18
|
category: "review"
|
|
19
19
|
stack_requires: "react,mobx"
|
|
20
20
|
overlap_group: "frontend"
|
|
@@ -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), and the read-only layer commands the orchestrator lists (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`, `keryx ctx rg|read`); it never writes in the reviewed tree.
|
|
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.
|