@mrciphersmith/keryx 0.4.28 → 0.4.29

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.
Files changed (32) hide show
  1. package/dist/cli.js +2710 -2488
  2. package/dist/core.js +5 -5
  3. package/dist/keryx-general-worker-entry.js +335 -219
  4. package/package.json +1 -1
  5. package/src/gdskills/bundled/install-manifest.json +1 -0
  6. package/src/gdskills/bundled/rules/core/clean-architecture.mdc +25 -153
  7. package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +1 -0
  8. package/src/gdskills/bundled/rules/core/error-handling.mdc +57 -108
  9. package/src/gdskills/bundled/rules/core/skill-authoring.mdc +190 -0
  10. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +5 -0
  11. package/src/gdskills/bundled/rules/core/solid-principles.mdc +48 -123
  12. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +2 -2
  13. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +1 -1
  14. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +1 -1
  15. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +3 -5
  16. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +100 -421
  17. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +2 -2
  18. package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +1 -1
  19. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -1
  20. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +4 -5
  21. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +1 -1
  22. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +1 -1
  23. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +2 -3
  24. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +1 -1
  25. package/src/gdskills/bundled/skills/review/review-premise/SKILL.md +1 -1
  26. package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +1 -1
  27. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +1 -1
  28. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +32 -36
  29. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +1 -1
  30. package/src/gdskills/bundled/stacks/csharp-dotnet/rules/patterns.mdc +4 -3
  31. package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/coding-style.mdc +3 -3
  32. package/src/gdskills/bundled/stacks/ruby-rails/rules/coding-style.mdc +4 -4
@@ -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), 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.
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).
37
37
 
38
38
  ## The one question
39
39
 
@@ -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), 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.
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), 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.
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
 
@@ -286,7 +286,7 @@ Flags:
286
286
  - Public async action doing API/IO directly instead of delegating to private — **minor** (layer-violation rule; **major** only with a named defect)
287
287
  - State mutation after `await` outside `runInAction` — **major**, or **blocker** where the interleaving can corrupt persisted state (frontend law 1)
288
288
  - Missing `try/catch/finally` on private async method owning loading flags — **major**
289
- - `catch (err: any)` instead of `catch (err: unknown)` — **minor**
289
+ - `catch (err: any)` — rated by `.metaproject/rules/core/error-handling.mdc` (**Review severities**)
290
290
 
291
291
  #### B7. Inter-Store Callbacks and Internal Handlers
292
292
 
@@ -344,7 +344,7 @@ Flags:
344
344
  - [ ] No `any` type in changed code — use `unknown` + type guards or specific types
345
345
  - [ ] No `as any` or `as unknown as T` unsafe double-cast without a comment explaining why
346
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 { ... }`
347
+ - [ ] Props interface named without an `I` prefix: `interface MyComponentProps { ... }`
348
348
  - [ ] Prefer optional chaining (`?.`) and nullish coalescing (`??`) over `!` assertions
349
349
  - [ ] A store's state and its public API are typed with explicit interfaces/types, not inferred object literals or `any`
350
350
  - [ ] `catch (err: unknown)` — typed error handling, not `catch (err)` or `catch (err: any)`
@@ -352,9 +352,8 @@ Flags:
352
352
  Flags:
353
353
  - `any` type in new code — **minor** (**major** only with a named input and the wrong value it lets through)
354
354
  - `!` non-null assertion without justification comment — **minor**
355
- - Props interface without `I` prefix — **minor**
355
+ - Props interface with an `I` prefix introduced by the change — **minor**
356
356
  - Store state or public API left to an inferred object-literal type — **minor**
357
- - `catch (err: any)` — **minor**
358
357
 
359
358
  ---
360
359
 
@@ -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), 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.
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.
@@ -29,7 +29,7 @@ license: "MIT"
29
29
 
30
30
  Specialized reviewer for **code that runs concurrently** — under request load, or as several sessions and child processes.
31
31
  Focuses on correctness under concurrency, resource contention, back-pressure, failure
32
- modes at scale, and distributed systems invariants — not general performance profiling. 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.
32
+ modes at scale, and distributed systems invariants — not general performance profiling. 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).
33
33
 
34
34
  Reviews only changes introduced in the current branch (merge-base to HEAD).
35
35
 
@@ -27,7 +27,7 @@ license: "MIT"
27
27
 
28
28
  Specialized reviewer for **logic correctness and algorithmic soundness**.
29
29
  Inherits from the correctness phases of two earlier profiles (the strict AI review one, since removed, and `code-learned-review`)
30
- and unifies them into a single focused pass. 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
+ and unifies them into a single focused pass. 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).
31
31
 
32
32
  This reviewer does not care about formatting, naming, or architecture opinions.
33
33
  Every finding must describe an observable, reproducible defect or a spec gap.
@@ -245,12 +245,11 @@ conditions land under that rubric, not a second rubric.
245
245
 
246
246
  | Condition | Severity | Why, under the canonical rubric |
247
247
  |---|---|---|
248
- | Unhandled promise rejection reaching the process | `blocker` | Crash |
248
+ | Unhandled rejection; swallowed error hiding a failed operation | per `.metaproject/rules/core/error-handling.mdc` **Review severities** — read it before the diff | One table for writers and every reviewer |
249
249
  | Corrupted or lost persisted/returned data | `blocker` | Data loss or corruption |
250
250
  | Unimplemented acceptance criterion | `blocker` | Named shape 4 |
251
251
  | Race condition on shared mutable state | `blocker` **if** the interleaving can corrupt or lose data; otherwise `major` | The outcome decides, not the word "race" |
252
252
  | Silent wrong result on a named input | `major` | Trigger and outcome are both named |
253
- | Swallowed error that hides a failed operation | `major` — `blocker` only if the caller then persists or returns wrong data | Silent failure is wrong behaviour; corruption is a different shape |
254
253
  | Type contract broken (declared type is not what is returned) | `major` | Callers observe the wrong value |
255
254
  | Edge case not handled, no input that reaches it named | `minor` | No trigger; the cost is to the next editor |
256
255
  | Non-null assertion without a comment | `minor` | Behaves correctly today; the cost is to the reader |
@@ -21,7 +21,7 @@ license: "MIT"
21
21
 
22
22
  ## Purpose
23
23
 
24
- Finds real, code-level performance problems introduced in the changed code of the current branch. Covers CLI and TUI hot paths, N+1 database queries, unnecessary React re-renders, missing memoization in hot paths, memory leaks, large bundle imports, synchronous blocking in async contexts, missing pagination, and redundant API calls. 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.
24
+ Finds real, code-level performance problems introduced in the changed code of the current branch. Covers CLI and TUI hot paths, N+1 database queries, unnecessary React re-renders, missing memoization in hot paths, memory leaks, large bundle imports, synchronous blocking in async contexts, missing pagination, and redundant API calls. 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).
25
25
 
26
26
  This skill focuses on **measurable or high-likelihood bottlenecks** only. Premature optimization, hypothetical slowness, and style preferences are out of scope.
27
27
 
@@ -109,7 +109,7 @@ signal and no practice source against it is upheld.
109
109
  | **Claim first, argument second.** | The case passed two reviews that read the fix's argument and never the premise. |
110
110
  | **`challenged` cites.** Each intent signal names its `ref` (`file:line` or a SHA) and what it says; each practice source names the guideline and section precisely enough to look up. | An uncited challenge is rejected and the finding stays as reported. Never invent a quote. |
111
111
  | **Never re-grade by the rubric.** Severity is the reviewer's and the verifier's call; a test gap or a surviving mutant stays as reported unless intent or practice shrinks it, and a minor is upheld or challenged, never downgraded. | An uncited downgrade is rejected (`downgrade-without-evidence`). Minors matter: a finding you weaken is one nobody fixes. |
112
- | **Read-only.** Read files; run nothing but `git log`, `git blame` and `git show` (only where your host gives a read-only child git) 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`); never write in the reviewed tree. On keryx shell you have no shell and no git tool: read the history excerpts in `context_files`, or say the history was not read. | Executing is the verifier's job; this judgement is about meaning. |
112
+ | **Read-only.** Read files; run nothing but `git log`, `git blame` and `git show` (only where your host gives a read-only child git). On keryx shell you have no shell and no git tool: read the history excerpts in `context_files`, or say the history was not read. | Executing is the verifier's job; this judgement is about meaning. |
113
113
  | **An external finding, and a `review-security-code` finding, is held or upheld, never dismissed or downgraded.** | A human asked; the operator answers them. Severity of a security finding measures exposure, which intent does not lower. The merge rejects the downgrade (`external-downgrade`, `security-downgrade`). |
114
114
 
115
115
  ## Output Contract
@@ -22,7 +22,7 @@ license: "MIT"
22
22
  # Review: Regression
23
23
 
24
24
  You are reviewing **scope B** of a deep round. The files you are given are not
25
- under review. They are under **regression check**. 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.
25
+ under review. They are under **regression check**. 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).
26
26
 
27
27
  ## The one question
28
28
 
@@ -23,7 +23,7 @@ license: "MIT"
23
23
 
24
24
  ## Purpose
25
25
 
26
- Finds exploitable security vulnerabilities introduced in the changed code of the current branch. Covers injection, auth/authz gaps, IDOR, secrets, insecure crypto, CSRF, path traversal, and framework-specific patterns (NestJS, React). Produces findings with explicit attack vectors and concrete fixes. 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.
26
+ Finds exploitable security vulnerabilities introduced in the changed code of the current branch. Covers injection, auth/authz gaps, IDOR, secrets, insecure crypto, CSRF, path traversal, and framework-specific patterns (NestJS, React). Produces findings with explicit attack vectors and concrete fixes. 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
27
 
28
28
  This skill covers **code-level security only**. It does NOT audit npm/bun dependency trees, Docker configurations, or deployment surfaces — use `security-audit` for those.
29
29
 
@@ -15,7 +15,7 @@ triggers:
15
15
  - "check readability"
16
16
  metadata:
17
17
  author: "MrCipherSmith"
18
- version: "1.2.0"
18
+ version: "1.3.0"
19
19
  category: "review"
20
20
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
21
21
  license: "MIT"
@@ -25,7 +25,21 @@ license: "MIT"
25
25
 
26
26
  Focused style reviewer. Covers naming conventions, dead code, readability, DRY violations,
27
27
  import organization, comment quality, file length, cyclomatic complexity, and console noise.
28
- Never touches logic correctness, architecture, security, or performance. 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
+ Never touches logic correctness, architecture, security, or performance. 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
+
30
+ ## The standard
31
+
32
+ Read `.metaproject/rules/core/solid-principles.mdc` before the diff: it is the
33
+ file the code was written against. Its **Readability thresholds** table is this
34
+ lens's thresholds and default severities; under a threshold, report nothing.
35
+
36
+ Duplication, magic literals, names and comments are rated by `review-clean-code`
37
+ from the same file. `--frontend` dispatches this lens without it, so report those
38
+ signals here at that lens's threshold and severity, never a stricter one: one
39
+ condition must not carry two outcomes.
40
+
41
+ A threshold counts only when this change crosses it: one more line in a file
42
+ already past a length limit is not a finding.
29
43
 
30
44
  ---
31
45
 
@@ -78,23 +92,14 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
78
92
 
79
93
  ### 1. Naming Conventions
80
94
 
95
+ Casing, boolean prefixes and verb names follow the language's published defaults; report a departure only where the surrounding code follows the default.
96
+
81
97
  **Variables and functions**
82
- - `camelCase` for variables, function parameters, and function names
83
- - `PascalCase` for classes, interfaces, enums, and React components
84
- - `UPPER_SNAKE_CASE` for module-level constants (truly constant values, not `let` reassigned as constants)
85
- - Boolean variables/functions prefixed with `is`, `has`, `can`, `should` (e.g., `isLoading`, `hasAccess`)
86
- - Avoid single-letter names except in short array callbacks (`arr.map(x => x.id)` acceptable; `let x = fetchUser()` is not)
87
- - Avoid abbreviations that are not universally understood (`usr`, `mgr`, `repo` vs `repository`)
88
-
89
- **Functions**
90
- - Function names are verbs or verb phrases: `getUser`, `handleSubmit`, `parseConfig`
91
- - Event handlers prefixed with `on` or `handle`: `onSubmit`, `handleClick`
92
- - Predicate functions return boolean and are named accordingly: `isValid()`, not `checkValid()`
98
+ - Single-letter names only for loop counters and short array callbacks (`arr.map(x => x.id)`); `let x = fetchUser()` is a finding (`review-clean-code`'s Name row)
93
99
 
94
100
  **Classes and interfaces**
95
- - Interface names use `I` prefix: `IUserService`, `IAuthGuard`
101
+ - Interfaces are named without an `I` prefix (`UserService`, not `IUserService`); an `I` prefix the change introduces is a finding
96
102
  - Enum members: `UPPER_SNAKE_CASE` or `PascalCase` — whichever the project uses consistently; flag inconsistency
97
- - Type alias names: `PascalCase`
98
103
 
99
104
  **Files and directories**
100
105
  - File names match the primary export: `UserService` → `user.service.ts`
@@ -109,7 +114,7 @@ Naming severity is set by the Style laws below and by the canonical rubric in `r
109
114
  - Unused variables (`const x = ...` never referenced) — flag as `minor`
110
115
  - Unused function parameters in non-interface-implementing functions — flag as `minor`
111
116
  - Unused imports — flag as `minor`; provide the removal patch
112
- - Commented-out code blocks (more than one line) — flag as `minor`; ask: "Is this intentional? If not, remove."
117
+ - Commented-out code — flag as `minor` (`review-clean-code`'s Comment row); ask: "Is this intentional? If not, remove."
113
118
  - Exported functions/classes that are never imported anywhere in the diff scope — flag as `info`
114
119
  (may be used externally; do not assume dead without evidence)
115
120
 
@@ -118,28 +123,24 @@ Naming severity is set by the Style laws below and by the canonical rubric in `r
118
123
  ### 3. Readability and Complexity
119
124
 
120
125
  **Conditions**
121
- - Overly complex boolean conditions (more than 3 clauses without parentheses grouping) — flag as `minor`; suggest extracting to a named predicate
126
+ - A boolean condition over the clause threshold — suggest extracting a named predicate
122
127
  - Double negatives (`!isNotEmpty`) — flag as `minor`; rewrite to positive form
123
128
  - Ternary chains (ternary inside ternary) — flag as `minor`; suggest `if/else` or early return
124
129
 
125
130
  **Nesting**
126
- - Functions with callback nesting deeper than 3 levels — flag as `minor`; suggest extraction or `async/await`
127
- - `if/else` trees deeper than 3 levels — flag as `minor`; suggest guard clauses (early returns)
131
+ - Callback or `if/else` nesting over the depth threshold — suggest extraction, `async/await` or guard clauses
128
132
 
129
- **Magic numbers**
130
- - Numeric or string literals used in logic without a named constant — flag as `minor`
131
- - Exception: index `0`, `1`, `-1`, empty string `""`, and HTTP status codes when the context is obvious
132
- - Suggest: `const MAX_RETRY_COUNT = 3;`
133
+ **Magic literals**
134
+ - A numeric or string literal with business meaning and no named constant, including one repeated across places — flag as `minor`; neutral values are not findings (`review-clean-code`'s Magic number row)
133
135
 
134
136
  **Cyclomatic complexity**
135
- - Functions with more than 10 decision branches (if/else/switch cases/ternary/loop) — flag as `minor`; suggest splitting into smaller, named functions
137
+ - A function over the decision-branch threshold (if/else, switch cases, ternaries, loops) — suggest splitting into named functions
136
138
 
137
139
  ---
138
140
 
139
141
  ### 4. DRY Violations
140
142
 
141
- - Clearly duplicated logic blocks (same or near-identical code in two places within the diff) — flag as `minor`, however large; `review-clean-code` owns the duplication rating (its law 3)
142
- - Duplicated string literals used in multiple places — flag as `info`; suggest a shared constant
143
+ - Duplicated logic block in 3 or more copies (`solid-principles.mdc` Thresholds) — flag as `minor`, one finding listing every copy; 2 copies is not a finding
143
144
  - Similar switch/if-else trees that could be a lookup map — flag as `minor`
144
145
 
145
146
  Do not flag DRY violations for code outside the diff even if legacy duplication exists.
@@ -148,8 +149,6 @@ Do not flag DRY violations for code outside the diff even if legacy duplication
148
149
 
149
150
  ### 5. Import Organization
150
151
 
151
- - Imports must be grouped (framework/library imports first, then project imports, then relative imports); blank line between groups
152
- - Imports within a group should be alphabetically sorted (or consistently ordered — match project convention)
153
152
  - Barrel imports (`import * as X from '...'`) without reason — flag as `info`
154
153
  - Circular imports (visible from import paths) — flag as `minor`; `review-architecture` owns the rating, and one that fails at runtime is its finding
155
154
  - Re-exporting something that is immediately re-used in the same file — flag as `minor` (unnecessary indirection)
@@ -168,18 +167,16 @@ Do not flag DRY violations for code outside the diff even if legacy duplication
168
167
  - Missing JSDoc on public APIs: flag as `info` (unless the project has a documented standard requiring it, in which case `minor`)
169
168
 
170
169
  **Noise comments**
171
- - `// increment i` above `i++` — flag as `info`; suggest removing
170
+ - A redundant comment (`// increment i` above `i++`) — flag as `minor` (`review-clean-code`'s Comment row); suggest removing
172
171
  - Section divider comments (`// =========`) that add no semantic value — flag as `info`
173
172
 
174
173
  ---
175
174
 
176
175
  ### 7. File Length and Structure
177
176
 
178
- - Files exceeding 500 lines (excluding generated code, test fixtures, and migration files) — flag as `info` with a suggestion to split by responsibility
179
- - Files exceeding 800 lines — flag as `minor`
180
- - Single file exporting more than 5 unrelated things — flag as `minor`; suggest splitting into focused modules
177
+ - A file over a length threshold — suggest splitting by responsibility
178
+ - A file over the unrelated-exports threshold — suggest splitting into focused modules
181
179
  - A React component file whose parts are out of order (imports, interfaces, component, helpers) — flag as `minor`
182
- - Test files: no limit enforced; complexity handled by test count and grouping
183
180
 
184
181
  ---
185
182
 
@@ -211,8 +208,8 @@ boundary is the trigger-and-outcome test.
211
208
  |------|-----------|
212
209
  | Style findings are **never** `blocker` | None of the four merge-blocking shapes is reachable from a style observation. This reviewer's finding format omits `blocker` for that reason |
213
210
  | A naming issue is `minor`; it reaches `major` only when the name has already produced an observable wrong outcome at a call site you can name | Identical to `review-clean-code` law 2, deliberately: the same condition must not carry two severities |
214
- | Duplication is `minor`, reported once with every site listed | Identical to `review-clean-code` law 3 |
215
- | Never flag issues handled by the project's autoformatter (indentation, trailing spaces, bracket style) | Linter/formatter owns that; double-flagging creates noise |
211
+ | Duplication needs 3+ copies and is `minor`, reported once with every copy listed | Identical to `review-clean-code` law 3 |
212
+ | Never flag issues handled by the project's autoformatter or linter (indentation, trailing spaces, bracket style, import grouping and order) | Linter/formatter owns that; double-flagging creates noise |
216
213
  | Do not expand scope to architectural or logic concerns | Stay in style lane; hand off to the right reviewer. A circular import that fails at runtime is `review-architecture`'s finding, not a style one |
217
214
 
218
215
  ---
@@ -348,7 +345,6 @@ If absent, infer conventions from surrounding unchanged code in the same files;
348
345
  | Rationalization | Why it is wrong |
349
346
  |----------------|-----------------|
350
347
  | "The naming is a bit odd but I understand it" | Reviewers understand their own code; the next dev won't |
351
- | "Commented-out code might be needed later" | Git history exists for that; dead comments add noise |
352
348
  | "It's only one magic number" | One `42` today becomes twelve untraceable `42`s tomorrow |
353
349
  | "DRY violation is minor so I'll skip it" | It is `minor` and still reported, once, with every site listed |
354
350
  | "The file is 600 lines but it's organized" | Organization doesn't prevent merge conflicts and scroll fatigue |
@@ -28,7 +28,7 @@ license: "MIT"
28
28
 
29
29
  # Review — Testing Practices
30
30
 
31
- Reviewer for local testing discipline. Read project test guides first when present, then apply the neutral baseline below. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs the tests only when its payload's `allowed_tools` says `run-tests`, within `exec_budget_s`; otherwise it runs no command, 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.
31
+ Reviewer for local testing discipline. Read project test guides first when present, then apply the neutral baseline below. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs the tests only when its payload's `allowed_tools` says `run-tests`, within `exec_budget_s`; otherwise it runs no command, 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).
32
32
 
33
33
  ---
34
34
 
@@ -49,9 +49,10 @@ dependency injection, LINQ, and disposal. Applies only to `*.cs` files.
49
49
  `Singleton` by capturing it directly — that captures the first
50
50
  request's instance for the app's lifetime; resolve it per-use via
51
51
  `IServiceScopeFactory`/`IServiceProvider.CreateScope()` instead.
52
- - Depend on an interface (`IOrderRepository`), not a concrete
53
- implementation, at a constructor boundary that DI resolves — this is
54
- what makes the type unit-testable without a real database/HTTP call.
52
+ - Depend on an interface (`IOrderRepository`) at an I/O or substitution
53
+ boundary that DI resolves (repository, external client, clock) — this
54
+ is what makes the type unit-testable without a real database/HTTP call.
55
+ A single internal implementation gets no interface.
55
56
  - Prefer constructor injection for required dependencies; reserve
56
57
  property injection for genuinely optional dependencies with a working
57
58
  default, which is uncommon.
@@ -22,9 +22,9 @@ still comes from the common rules this file `extends`.
22
22
  dependency graph, prevents the field from being `final`/`val`, and
23
23
  makes the class impossible to construct without the Spring container in
24
24
  a plain unit test.
25
- - A class with more than 4-5 constructor dependencies is a signal the
26
- class has too many responsibilities, not a reason to fall back to field
27
- injection to make the constructor shorter.
25
+ - Overrides the `solid-principles.mdc` "Constructor dependencies" row
26
+ for Java/Kotlin: more than 4 is the threshold, a signal of too many
27
+ responsibilities, never a reason to fall back to field injection.
28
28
 
29
29
  ## Layered architecture
30
30
 
@@ -20,10 +20,10 @@ Narrows `core-common-rules`' stack-agnostic style rules to modern Ruby
20
20
  `is_published`); a destructive/bang method that mutates in place or
21
21
  raises instead of returning nil ends in `!` and normally has a
22
22
  non-bang counterpart (`save!` alongside `save`).
23
- - Two-space indentation, no tabs; keep a method short enough to read on
24
- one screen — a model method past ~10 lines is a signal to extract a
25
- private method, a concern, or (per `rules/patterns.mdc`) a service
26
- object, not to keep growing in place.
23
+ - Two-space indentation, no tabs.
24
+ - Overrides the `solid-principles.mdc` "Function body length" row for
25
+ Ruby: a method over 10 lines is the threshold. Extract a private
26
+ method, a concern, or (per `rules/patterns.mdc`) a service object.
27
27
  - Follow the app's own file layout: `app/models`, `app/controllers`,
28
28
  `app/jobs`, `app/services` (if the app already has one) — do not
29
29
  invent a new top-level directory for one class.