@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
|
@@ -3,12 +3,13 @@ name: review-clean-code
|
|
|
3
3
|
model_tier: standard
|
|
4
4
|
description: |
|
|
5
5
|
Use when: reviewing code against Clean Code principles (Uncle Bob) and SOLID at the
|
|
6
|
-
function/class level —
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
function/class level — small functions, single level of abstraction, argument count,
|
|
7
|
+
error handling, DRY, magic literals, comment quality, and SRP, OCP, LSP and ISP as applied
|
|
8
|
+
to individual classes and functions.
|
|
9
9
|
Dispatched by review-orchestrator.
|
|
10
|
-
NOT for:
|
|
11
|
-
(review-style), logic correctness bugs (review-logic), or security
|
|
10
|
+
NOT for: layer violations, dependency inversion and circular imports (review-architecture),
|
|
11
|
+
names and readability (review-style), logic correctness bugs (review-logic), or security
|
|
12
|
+
(review-security-code).
|
|
12
13
|
triggers:
|
|
13
14
|
- "clean code review"
|
|
14
15
|
- "functions do too much"
|
|
@@ -18,7 +19,7 @@ triggers:
|
|
|
18
19
|
- "Uncle Bob review"
|
|
19
20
|
metadata:
|
|
20
21
|
author: "MrCipherSmith"
|
|
21
|
-
version: "
|
|
22
|
+
version: "2.0.0"
|
|
22
23
|
category: "review"
|
|
23
24
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
24
25
|
license: "MIT"
|
|
@@ -26,50 +27,38 @@ license: "MIT"
|
|
|
26
27
|
|
|
27
28
|
# Review: Clean Code + SOLID
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
You know Clean Code and SOLID. This file does not teach them. It says which
|
|
31
|
+
project standard applies, where the project departs from the textbook, and how
|
|
32
|
+
to turn what you see into a finding or into silence.
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
Focus: maintainability of the code this change introduces, at function and class
|
|
35
|
+
level. Its inputs are the reviewer payload only; session memory and earlier
|
|
36
|
+
conversation are not inputs. It runs no command unless its payload's
|
|
37
|
+
`allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and
|
|
38
|
+
`git show` where its host gives a read-only child git (keryx shell does not:
|
|
39
|
+
there the payload supplies the history).
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## Workflow
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
Clean Code Review Progress:
|
|
42
|
-
- [ ] Step 1: Read Job Context (if provided)
|
|
43
|
-
- [ ] Step 2: Determine git scope (merge-base)
|
|
44
|
-
- [ ] Step 3: Collect diff and changed file list
|
|
45
|
-
- [ ] Step 4: Meaningful Names check
|
|
46
|
-
- [ ] Step 5: Functions check (size, abstraction, arguments)
|
|
47
|
-
- [ ] Step 6: Comments check
|
|
48
|
-
- [ ] Step 7: Error Handling check
|
|
49
|
-
- [ ] Step 8: DRY check
|
|
50
|
-
- [ ] Step 9: SOLID check (SRP, OCP, LSP, ISP, DIP)
|
|
51
|
-
- [ ] Step 10: Emit findings in unified format
|
|
52
|
-
```
|
|
41
|
+
## The standard
|
|
53
42
|
|
|
54
|
-
|
|
43
|
+
Read both rules before the diff. They are what the code was written against.
|
|
55
44
|
|
|
56
|
-
|
|
45
|
+
- `.metaproject/rules/core/solid-principles.mdc` — the **Thresholds** table, the SOLID rules and **Review severities**, which rate every SRP, OCP, LSP, ISP, duplication, magic-literal and comment finding.
|
|
46
|
+
- `.metaproject/rules/core/error-handling.mdc` — how failure is signalled, what a message carries, `cause`, silent catches.
|
|
57
47
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
| `branch` | string | no | Branch to review. Defaults to current branch. |
|
|
61
|
-
| `commit_range` | string | no | Explicit hash or range. Overrides merge-base detection. |
|
|
62
|
-
| `context_doc` | string | no | Path to job context document. Read before reviewing. |
|
|
48
|
+
A threshold there is your threshold. Under it, report nothing; never apply a
|
|
49
|
+
stricter textbook number. Where this file and a rule disagree, the rule wins.
|
|
63
50
|
|
|
64
|
-
|
|
51
|
+
Ownership: this lens owns SRP, OCP, LSP and ISP at class and function level, plus
|
|
52
|
+
duplication, magic literals and comments. `review-architecture` owns DIP, layers,
|
|
53
|
+
module boundaries and circular imports; `review-style` owns names and readability.
|
|
65
54
|
|
|
66
|
-
## Scope
|
|
55
|
+
## Scope
|
|
67
56
|
|
|
68
|
-
|
|
57
|
+
Only code introduced or modified in this change.
|
|
69
58
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
59
|
+
**Debt the change did not create** is not a finding (`solid-principles.mdc`):
|
|
60
|
+
check the before-state first. It is a finding when the change crosses a threshold,
|
|
61
|
+
or adds a self-contained block that meets it alone; cite that block.
|
|
73
62
|
|
|
74
63
|
**Supplied text first.** When the payload carries `slices`, `context_files`, `diff` or `file_contents`, review exactly that text and never rebuild the diff. A choice's history (law 4) is read with `git log`, `git blame` and `git show` only where the host gives a read-only child git; on keryx shell a read-only child has no shell and no git tool, so read the `git log -L`/`git blame` excerpts the payload supplies, or say the history was not read. Only with none supplied, collect it:
|
|
75
64
|
```bash
|
|
@@ -77,8 +66,6 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
|
|
|
77
66
|
# explicit range: <FROM_SHA>..<TO_SHA> in place of "${BASE_SHA}"
|
|
78
67
|
```
|
|
79
68
|
|
|
80
|
-
---
|
|
81
|
-
|
|
82
69
|
## Iron Laws
|
|
83
70
|
|
|
84
71
|
### Shared laws (every reviewer)
|
|
@@ -95,319 +82,60 @@ boundary is the trigger-and-outcome test.
|
|
|
95
82
|
|
|
96
83
|
### Clean Code laws
|
|
97
84
|
|
|
98
|
-
1. **
|
|
99
|
-
2. **
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
Naming is never a `blocker`. (`review-style` carries the identical rule.)
|
|
104
|
-
3. **DRY violations need at least 3 repetitions before they are worth reporting,
|
|
105
|
-
and they are `minor`.** Two occurrences can be accidental; three is a pattern.
|
|
106
|
-
Duplication is a cost to whoever edits it next, which is `minor` by the
|
|
107
|
-
canonical test — report it once, listing every site, per shared law 3.
|
|
108
|
-
4. **SOLID opinions without a named principle and a concrete violation description are `info` only.** State the principle (e.g., SRP), the two responsibilities, and the impact.
|
|
109
|
-
5. **Do not flag language idioms or framework conventions as Clean Code violations.** If it is the standard way to do something in TypeScript / NestJS / React, it is not a violation.
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Review Checklist
|
|
114
|
-
|
|
115
|
-
### Part A: Meaningful Names
|
|
116
|
-
|
|
117
|
-
The central test: **a name should tell you why it exists, what it does, and how it is used** — without needing a comment to explain it.
|
|
118
|
-
|
|
119
|
-
#### A1. Intention-Revealing Names
|
|
120
|
-
|
|
121
|
-
- [ ] Variable / parameter names that require a comment to understand their purpose
|
|
122
|
-
- [ ] Single-letter names outside loop counters (`i`, `j`, `k`) and conventional math variables
|
|
123
|
-
- [ ] Generic names that carry no information: `data`, `info`, `value`, `temp`, `result`, `obj`, `item`, `thing`, `stuff`, `helper`, `util`, `manager`, `processor`
|
|
124
|
-
- [ ] Boolean names that could be read as either true or false: prefer `isLoaded`, `hasError`, `canSubmit` over `loaded`, `error`, `submit`
|
|
125
|
-
- [ ] Function names that start with a vague verb: `do`, `handle`, `process`, `manage` — prefer verbs that describe the action: `parseConfig`, `validateToken`, `fetchUserById`
|
|
126
|
-
|
|
127
|
-
Flags:
|
|
128
|
-
- Single-letter variable outside loop — **minor**
|
|
129
|
-
- Generic meaningless name (`data`, `result`, `temp`) in new code — **minor**
|
|
130
|
-
- Boolean named without `is/has/can/should` prefix making polarity ambiguous — **minor**
|
|
131
|
-
- Function named `handleX` where X is also vague — **minor**
|
|
132
|
-
|
|
133
|
-
#### A2. Searchability and Length
|
|
134
|
-
|
|
135
|
-
- [ ] Names that are too short to be grepped: single letters or two-letter abbreviations for non-obvious concepts
|
|
136
|
-
- [ ] Names that are too long (>40 characters) adding noise without precision: prefer concise + precise over exhaustive
|
|
137
|
-
- [ ] Abbreviations that are not project-wide standards (`usr` for `user`, `cnt` for `count`, `cfg` for `config`)
|
|
138
|
-
|
|
139
|
-
Flags:
|
|
140
|
-
- Non-standard abbreviation that a new team member would need to decode — **minor**
|
|
141
|
-
|
|
142
|
-
#### A3. Consistent Vocabulary
|
|
143
|
-
|
|
144
|
-
- [ ] Same concept named differently in the same diff: `user` / `account` / `member` used interchangeably for the same domain entity
|
|
145
|
-
- [ ] Verb inconsistency for similar actions: `fetch` vs `get` vs `load` vs `retrieve` for the same type of operation in the same module
|
|
146
|
-
- [ ] Antonym inconsistency: if one side is `add`, the other should be `remove` — not `delete` / `destroy` / `clear`
|
|
147
|
-
|
|
148
|
-
Flags:
|
|
149
|
-
- Two names for the same concept in the same diff — **minor**
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
### Part B: Functions
|
|
154
|
-
|
|
155
|
-
#### B1. Function Size and Single Responsibility
|
|
156
|
-
|
|
157
|
-
Clean Code guideline: functions should do **one thing** at one level of abstraction.
|
|
158
|
-
|
|
159
|
-
- [ ] Function body exceeds ~20 lines: a strong smell that it does more than one thing
|
|
160
|
-
- [ ] Function mixes levels of abstraction: high-level orchestration next to low-level data manipulation in the same block
|
|
161
|
-
- [ ] Function that both queries data AND transforms it AND persists it (three responsibilities)
|
|
162
|
-
- [ ] Functions with a `And` or `Or` in the name, describing two operations
|
|
163
|
-
|
|
164
|
-
Flags:
|
|
165
|
-
- Function body >40 lines — **minor** (clear overload; flag specific function by name)
|
|
166
|
-
- Function body 20–40 lines with visible mixed abstraction — **minor**
|
|
167
|
-
- `doXAndY()` naming explicitly stating two operations — **minor**
|
|
168
|
-
|
|
169
|
-
#### B2. Function Arguments
|
|
170
|
-
|
|
171
|
-
- [ ] Monadic (1 arg): ideal for transformations (`parseDate(str)`) and predicates (`isEmpty(list)`)
|
|
172
|
-
- [ ] Dyadic (2 args): acceptable when arguments form a natural ordered pair (`createPoint(x, y)`)
|
|
173
|
-
- [ ] Triadic (3 args): consider if a config/options object would read more clearly
|
|
174
|
-
- [ ] Polyadic (≥4 args): almost always a sign of a missing abstraction (config object, parameter object, or SRP violation)
|
|
175
|
-
- [ ] Boolean flag arguments: `renderWidget(true, false, true)` — split into separate functions or use named option objects
|
|
176
|
-
- [ ] Output arguments: a function that mutates its argument instead of returning a value (`populate(result)`)
|
|
177
|
-
|
|
178
|
-
Flags:
|
|
179
|
-
- Function with ≥4 parameters not using an options/config object — **minor**
|
|
180
|
-
- Boolean flag parameter (`enabled: boolean`) passed to control function flow — **minor** (split into two functions)
|
|
181
|
-
- Output argument (mutating parameter instead of returning) — **minor**
|
|
182
|
-
- Three parameters where a plain named object would be clearer — **minor**
|
|
183
|
-
|
|
184
|
-
#### B3. Abstraction Level Consistency
|
|
185
|
-
|
|
186
|
-
Each function should stay at one level of the abstraction ladder. A function that opens a file, reads its bytes, decodes UTF-8, splits lines, and validates each record mixes at least 3 levels.
|
|
187
|
-
|
|
188
|
-
- [ ] Inline low-level operations (string splitting, index arithmetic) inside a high-level orchestration function
|
|
189
|
-
- [ ] High-level domain concepts (`createUserAccount`) containing raw SQL or HTTP fetch calls instead of delegating to a repository/service
|
|
190
|
-
|
|
191
|
-
Flags:
|
|
192
|
-
- High-level function with low-level implementation detail mixed in — **minor**
|
|
193
|
-
|
|
194
|
-
---
|
|
195
|
-
|
|
196
|
-
### Part C: Comments
|
|
197
|
-
|
|
198
|
-
#### C1. Comments That Lie or Are Redundant
|
|
199
|
-
|
|
200
|
-
- [ ] Comment that repeats what the code already says: `i++ // increment i`
|
|
201
|
-
- [ ] Comment that is stale / no longer matches the current code
|
|
202
|
-
- [ ] Commented-out code left in the diff
|
|
203
|
-
|
|
204
|
-
Flags:
|
|
205
|
-
- Redundant comment restating the code — **minor**
|
|
206
|
-
- Stale comment contradicting the code — **minor** (misleads the next reader; it
|
|
207
|
-
names no runtime trigger, so the canonical rubric puts it here. It was
|
|
208
|
-
**major** in this file until that was reconciled against
|
|
209
|
-
`review-orchestrator/SKILL.md` → **Severity (canonical)**, which reviewers may
|
|
210
|
-
not override. If the comment's inaccuracy *causes* a defect — someone relied on
|
|
211
|
-
it and the code does otherwise — that defect is the finding, at its own severity)
|
|
212
|
-
- Commented-out code block — **minor** (use git history, not comments, to preserve old code)
|
|
213
|
-
|
|
214
|
-
#### C1a. Documentation drift — the shapes worth searching for
|
|
215
|
-
|
|
216
|
-
Stale comments are not found by reading comments; they are found by reading each
|
|
217
|
-
comment **against the statement it sits above**. Three shapes recur, and they are
|
|
218
|
-
the cheapest real findings in a multi-round review:
|
|
219
|
-
|
|
220
|
-
- **A doc describing the rule a later round replaced.** A prop's JSDoc says the
|
|
221
|
-
tooltip drops the split "unless both are known"; the live rule is that both must
|
|
222
|
-
be greater than zero. The behaviour changed, the sentence did not. Check every
|
|
223
|
-
doc comment on every symbol the diff touched, not only the ones the diff edited.
|
|
224
|
-
- **A comment detached from its statement.** A `const` gets inserted between a
|
|
225
|
-
comment and the expression it explained, so the comment now reads as an
|
|
226
|
-
explanation of the insertion. The text is unchanged and is now wrong. Look for
|
|
227
|
-
this wherever the diff adds a line inside an existing block.
|
|
228
|
-
- **Two files documenting one field oppositely.** One says a cell is the valid
|
|
229
|
-
percentage, another computes `100 - cell` and calls it the invalid percentage.
|
|
230
|
-
Only one is right, and the diff just made the field load-bearing.
|
|
231
|
-
|
|
232
|
-
Where an issue or PR is cited, check that it is the right one and still says what
|
|
233
|
-
the comment claims — a closed *issue* cited in place of the *PR* that shipped the
|
|
234
|
-
work sends the next reader to the wrong page.
|
|
235
|
-
|
|
236
|
-
A comment that describes a behaviour with **no code path at all** — including one
|
|
237
|
-
left behind by a review finding that was later withdrawn — is the same class: it
|
|
238
|
-
should state the defensiveness it actually provides, not assert a path that does
|
|
239
|
-
not exist.
|
|
240
|
-
|
|
241
|
-
#### C2. Comments That Compensate for Bad Names
|
|
242
|
-
|
|
243
|
-
A comment whose entire purpose is to explain a poorly-named identifier is a sign to improve the name, not add a comment.
|
|
244
|
-
|
|
245
|
-
- [ ] `// This is the pipeline execution queue` explaining a variable named `queue2`
|
|
246
|
-
- [ ] JSDoc `@param data The data to process` adding zero information
|
|
247
|
-
|
|
248
|
-
Flags:
|
|
249
|
-
- Comment exists only to explain a name that could be made self-documenting — **minor**
|
|
250
|
-
|
|
251
|
-
#### C3. Comments That Are Justified
|
|
252
|
-
|
|
253
|
-
These are the correct uses of comments — do NOT flag:
|
|
254
|
-
- Legal comments (license headers)
|
|
255
|
-
- Explanation of intent for a non-obvious algorithm or business rule
|
|
256
|
-
- Clarification of a subtle domain constraint (`// ISO week starts on Monday per business requirement`)
|
|
257
|
-
- Warning about consequences (`// Do not cache — response contains time-sensitive token`)
|
|
258
|
-
- TODO/FIXME with an issue reference (`// TODO(#1234): remove after migration`)
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
### Part D: Error Handling
|
|
85
|
+
1. **Every finding cites a `file:line` in the diff.** No observations about the codebase in general.
|
|
86
|
+
2. **Names are `review-style`'s.** This lens reports no naming finding.
|
|
87
|
+
3. **Duplication needs 3+ copies**, reported once with every copy, rated by the `solid-principles.mdc` table.
|
|
88
|
+
4. **A SOLID finding names the principle, the two responsibilities or the broken contract, and the impact**, or it is `info`.
|
|
89
|
+
5. **Language idioms and framework conventions are not violations.**
|
|
263
90
|
|
|
264
|
-
|
|
91
|
+
## Decision table
|
|
265
92
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
- [ ] Using error strings instead of typed errors: `throw new Error("NOT_FOUND")` — callers cannot pattern-match
|
|
270
|
-
- [ ] `catch (err: any)` — loses type safety; use `catch (err: unknown)`
|
|
93
|
+
Each row: what to look for, when it is a finding, and its default severity. Use
|
|
94
|
+
your own Clean Code judgment for anything not listed, but the same tests apply:
|
|
95
|
+
a named site, a threshold crossed by this change, a cost someone will pay.
|
|
271
96
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
-
|
|
276
|
-
|
|
97
|
+
| Signal | A finding when | Default | Not a finding |
|
|
98
|
+
|---|---|---|---|
|
|
99
|
+
| Failure paths: a hiding `catch`, failure as a value, lost `cause`, log-and-rethrow | per `error-handling.mdc` **Review severities** | as there | as there |
|
|
100
|
+
| SRP, OCP, LSP, ISP: override that breaks the base contract, constructor I/O, function length, I/O mixed with a transform, parameters, constructor dependencies, branch chain, two change drivers, wide interface | per `solid-principles.mdc` **Review severities** | as there (LSP `major`, `blocker` when the broken caller is in the diff) | as there |
|
|
101
|
+
| Duplicated block, magic literal, comment | per `solid-principles.mdc` **Review severities** | as there | as there |
|
|
102
|
+
| Stylistic opinion; a future issue with no current violation | — | `info` | — |
|
|
277
103
|
|
|
278
|
-
|
|
104
|
+
## Documentation drift — search for it
|
|
279
105
|
|
|
280
|
-
|
|
281
|
-
|
|
106
|
+
A stale comment is found by reading each doc comment **against the statement it
|
|
107
|
+
sits above**, for every symbol the diff touched, not only the lines it edited.
|
|
108
|
+
Three shapes recur and are the cheapest real findings:
|
|
282
109
|
|
|
283
|
-
|
|
284
|
-
-
|
|
285
|
-
-
|
|
110
|
+
- **A doc describing the rule a later change replaced.** The behaviour changed, the sentence did not.
|
|
111
|
+
- **A comment detached from its statement.** A line inserted between a comment and the expression it explained.
|
|
112
|
+
- **Two places documenting one field or behaviour oppositely**, or a comment asserting a code path that does not exist.
|
|
286
113
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
### Part E: DRY (Don't Repeat Yourself)
|
|
290
|
-
|
|
291
|
-
#### E1. Code Duplication
|
|
292
|
-
|
|
293
|
-
- [ ] Identical or near-identical code blocks in ≥3 places in the diff
|
|
294
|
-
- [ ] Copy-pasted logic that differs only in one or two variable names
|
|
295
|
-
- [ ] Multiple functions doing the same transformation with slightly different wrapping
|
|
296
|
-
|
|
297
|
-
Flags:
|
|
298
|
-
- 3+ identical or near-identical blocks in the diff that could be extracted — **minor** (Clean Code law 3; this lens owns duplication, `review-style` defers)
|
|
299
|
-
- 2 occurrences — **minor** (note, do not raise unless the pattern is clearly intentional duplication)
|
|
300
|
-
|
|
301
|
-
#### E2. Magic Numbers and Strings
|
|
302
|
-
|
|
303
|
-
- [ ] Hardcoded numeric literal used in business logic with no named constant (`if (status === 3)`)
|
|
304
|
-
- [ ] Repeated string literal used as a key, type discriminant, or route path without a shared constant
|
|
305
|
-
|
|
306
|
-
Flags:
|
|
307
|
-
- Magic number in business logic (not an obvious neutral like `0`, `1`, `100`) — **minor**
|
|
308
|
-
- Repeated string constant defined inline in multiple places — **minor**
|
|
309
|
-
|
|
310
|
-
---
|
|
311
|
-
|
|
312
|
-
### Part F: SOLID (at function/class level)
|
|
313
|
-
|
|
314
|
-
This overlaps with `review-architecture` at the system level, but here the focus is on
|
|
315
|
-
**individual classes and functions**, not module structure or layer assignments.
|
|
316
|
-
|
|
317
|
-
#### F1. Single Responsibility Principle (SRP)
|
|
318
|
-
|
|
319
|
-
A class should have **one reason to change**: one owner (one part of the system that drives its evolution).
|
|
320
|
-
|
|
321
|
-
- [ ] Class responsible for both data access AND business logic
|
|
322
|
-
- [ ] Class responsible for both input validation AND output formatting
|
|
323
|
-
- [ ] A constructor that does real work: making network calls, reading files, computing state — constructors should only assign
|
|
324
|
-
|
|
325
|
-
Flags:
|
|
326
|
-
- Class with two clearly distinct responsibilities that have different change drivers — **minor**
|
|
327
|
-
- Constructor performing I/O or async operations — **minor**; **major** only with a named defect it causes (e.g. an unhandled rejection on construction)
|
|
328
|
-
- Service method doing validation + transformation + persistence inline — **minor**
|
|
329
|
-
|
|
330
|
-
#### F2. Open/Closed Principle (OCP)
|
|
331
|
-
|
|
332
|
-
Classes should be open for extension, closed for modification. Violations appear as chains that must grow every time a new case is added.
|
|
333
|
-
|
|
334
|
-
- [ ] `if/else if` or `switch` over a type discriminant that already has 3+ branches — consider a strategy/visitor pattern
|
|
335
|
-
- [ ] Adding a case to an existing long `switch` in a file not in the diff context — flag if the diff shows a new `case` in a multi-case switch
|
|
336
|
-
|
|
337
|
-
Flags:
|
|
338
|
-
- New `case` added to a switch with ≥4 existing cases where a strategy pattern would be more appropriate — **minor**
|
|
339
|
-
- `instanceof` chain (`if (x instanceof A) ... else if (x instanceof B)`) — **minor**
|
|
340
|
-
|
|
341
|
-
#### F3. Liskov Substitution Principle (LSP)
|
|
342
|
-
|
|
343
|
-
Subtypes must be substitutable for their base types without changing the program's behavior.
|
|
344
|
-
|
|
345
|
-
- [ ] Subclass `override` method that throws `NotImplementedException` or `UnsupportedOperationException`
|
|
346
|
-
- [ ] Subclass method that requires checking `instanceof this` to determine behavior
|
|
347
|
-
- [ ] Override that strengthens preconditions (rejects more inputs than the parent)
|
|
348
|
-
- [ ] Override that weakens postconditions (returns less than the parent guarantees)
|
|
349
|
-
|
|
350
|
-
Flags:
|
|
351
|
-
- Override throwing "not supported" — **minor**; **major** (or **blocker**) when a named call site reaches it through the base type (conditions table)
|
|
352
|
-
- Override requiring `instanceof` self-check — **minor**, same condition as the line above
|
|
353
|
-
|
|
354
|
-
#### F4. Interface Segregation Principle (ISP)
|
|
355
|
-
|
|
356
|
-
Clients should not be forced to depend on methods they do not use.
|
|
357
|
-
|
|
358
|
-
- [ ] Interface with ≥7 methods where implementing classes use only a subset — split into smaller interfaces
|
|
359
|
-
- [ ] Abstract class method that all concrete subclasses implement as a no-op
|
|
360
|
-
|
|
361
|
-
Flags:
|
|
362
|
-
- Interface with methods that have stub/no-op implementations in subclasses — **minor**
|
|
363
|
-
|
|
364
|
-
#### F5. Dependency Inversion Principle (DIP) — at class level
|
|
365
|
-
|
|
366
|
-
High-level modules should not depend on low-level modules. Both should depend on abstractions.
|
|
367
|
-
|
|
368
|
-
- [ ] Class instantiating its own dependencies with `new` instead of receiving them via constructor injection
|
|
369
|
-
- [ ] Class importing a concrete implementation class from another module instead of an interface/abstract class
|
|
370
|
-
|
|
371
|
-
Flags:
|
|
372
|
-
- `new ConcreteService()` inside a class method that should receive it via DI — **minor**
|
|
373
|
-
- Import of concrete implementation where an interface or abstract type exists — **minor**
|
|
374
|
-
|
|
375
|
-
---
|
|
114
|
+
Where an issue or PR is cited, check it is the right one and still says what the comment claims.
|
|
376
115
|
|
|
377
116
|
## Scope Boundaries
|
|
378
117
|
|
|
379
|
-
| Concern |
|
|
380
|
-
|
|
381
|
-
|
|
|
382
|
-
|
|
|
383
|
-
|
|
|
384
|
-
|
|
|
385
|
-
|
|
|
386
|
-
|
|
|
387
|
-
| Performance anti-patterns | NO | `review-performance` |
|
|
388
|
-
| React/MobX-specific frontend patterns | NO | `review-frontend` |
|
|
389
|
-
|
|
390
|
-
---
|
|
118
|
+
| Concern | Use instead |
|
|
119
|
+
|---------|-------------|
|
|
120
|
+
| Layer violations, module coupling, dependency direction, DIP (`new X()` for I/O), circular imports | `review-architecture` |
|
|
121
|
+
| Names, naming conventions, readability | `review-style` |
|
|
122
|
+
| Logic bugs, off-by-one errors, null-safety | `review-logic` |
|
|
123
|
+
| Security vulnerabilities | `review-security-code` |
|
|
124
|
+
| Performance anti-patterns | `review-performance` |
|
|
125
|
+
| React/MobX-specific frontend patterns | `review-frontend` |
|
|
391
126
|
|
|
392
127
|
## Orchestrated Review Contract
|
|
393
128
|
|
|
394
129
|
When dispatched by `review-orchestrator`, follow the provided `reviewer-input.schema.json` payload. Return a `REVIEW_RESULT` object compatible with `.metaproject/skills/gdskills/review/review-orchestrator/reviewer-finding.schema.json`, then a concise markdown summary. Keep findings evidence-based, include concrete `suggested_fix` for every blocker/major, and return `NEEDS_CONTEXT` instead of guessing when required context is missing.
|
|
395
130
|
|
|
396
|
-
---
|
|
397
|
-
|
|
398
131
|
## Finding Format
|
|
399
132
|
|
|
400
133
|
### Class scope — required for `blocker` and `major`
|
|
401
134
|
|
|
402
|
-
Every `blocker` and `major` finding
|
|
135
|
+
Every `blocker` and `major` finding carries `class_scope`: **every** site that
|
|
403
136
|
holds the shape you found, and **how you enumerated them** — the grep or query
|
|
404
|
-
you ran, or the guard that derives the set.
|
|
405
|
-
|
|
406
|
-
A finding anchored to one `file:line` is a claim about one site. The recorded
|
|
407
|
-
history of this repository is that a fix then repairs that site and leaves its
|
|
408
|
-
siblings: one writer of five, one operator instruction of four, six readers of
|
|
409
|
-
eight. Each was found by the *next* review round, which is why reviews here have
|
|
410
|
-
run to seven and four rounds instead of one.
|
|
137
|
+
you ran, or the guard that derives the set. A fix to one site that leaves its
|
|
138
|
+
siblings is what the next review round finds.
|
|
411
139
|
|
|
412
140
|
```yaml
|
|
413
141
|
class_scope:
|
|
@@ -415,49 +143,22 @@ class_scope:
|
|
|
415
143
|
enumeration_method: "grep for the config-path resolvers; 7 writers, 2 unguarded"
|
|
416
144
|
```
|
|
417
145
|
|
|
418
|
-
"I checked the others" is not an enumeration method.
|
|
419
|
-
is a claim that the class has exactly one member — make it deliberately, because
|
|
420
|
-
`review-finding.schema.json` accepts it and the next round tests it.
|
|
421
|
-
|
|
422
|
-
`minor` and `info` may omit it: enumerating the class for every low-severity
|
|
423
|
-
observation is theatre, not rigour.
|
|
146
|
+
"I checked the others" is not an enumeration method. `minor` and `info` may omit it.
|
|
424
147
|
|
|
425
148
|
```markdown
|
|
426
149
|
### [F-NNN] Title
|
|
427
150
|
|
|
428
151
|
- **Severity**: blocker | major | minor | info
|
|
429
152
|
- **File**: path/to/file.ts:line
|
|
430
|
-
- **Principle**: Clean Code —
|
|
153
|
+
- **Principle**: Clean Code — function design | comments | error handling | DRY | SOLID — SRP/OCP/LSP/ISP
|
|
431
154
|
- **Problem**: what is wrong and why it matters
|
|
432
155
|
- **Fix**: concrete actionable suggestion
|
|
433
|
-
- **Patch** (optional):
|
|
434
|
-
```diff
|
|
435
|
-
- old line
|
|
436
|
-
+ new line
|
|
437
|
-
```
|
|
438
156
|
```
|
|
439
157
|
|
|
440
|
-
Severity comes from **Severity (canonical)** in `review-orchestrator/SKILL.md
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
| Condition | Severity | Why, under the canonical rubric |
|
|
445
|
-
|---|---|---|
|
|
446
|
-
| Swallowed exception hiding a failed operation | `major` — `blocker` only if the caller then persists or returns wrong data | Same wording as `review-logic`, deliberately. Silent failure is wrong behaviour; corruption is a different shape |
|
|
447
|
-
| LSP violation that produces a wrong result or a crash at a named call site | `major`, or `blocker` on the crash/corruption outcome | The outcome decides, not the principle's name |
|
|
448
|
-
| Constructor performing I/O | `minor` — `major` only with a named defect it causes (trigger and outcome) | The I/O running is not wrong behaviour; untestable is a maintenance cost |
|
|
449
|
-
| Function > 40 lines; ≥ 4 parameters without an options object; boolean flag argument; class with two distinct responsibilities; `new ConcreteService()` bypassing DI | `minor` | The code is correct. The cost is to whoever reads or edits it next — that is exactly `minor` |
|
|
450
|
-
| Poor naming; redundant or stale comment; duplication (3+ sites); magic number; 20–40 line function; OCP/ISP smell; log-and-rethrow | `minor` | Same. This lens owns duplication and comments; `review-style` defers to it |
|
|
451
|
-
| Stylistic opinion; a future issue with no current violation | `info` | Neither trigger nor a named maintenance cost |
|
|
452
|
-
|
|
453
|
-
**Clean Code findings are `minor` by default.** A long function with a named
|
|
454
|
-
responsibility split is a maintenance cost, not observable wrong behaviour, and
|
|
455
|
-
`major` is reserved for findings that name a trigger and an outcome. This
|
|
456
|
-
reviewer previously called a 41-line function `major` and thereby forced
|
|
457
|
-
`REQUEST_CHANGES` on it; that is the exact mis-ranking the canonical rubric
|
|
458
|
-
exists to stop.
|
|
459
|
-
|
|
460
|
-
---
|
|
158
|
+
Severity comes from **Severity (canonical)** in `review-orchestrator/SKILL.md`;
|
|
159
|
+
the Default column above is where this lens's conditions land under it, not a
|
|
160
|
+
second rubric. **Clean Code findings are `minor` by default**: a maintenance
|
|
161
|
+
cost, not wrong behaviour. `major` needs a named trigger and outcome.
|
|
461
162
|
|
|
462
163
|
## Output Contract
|
|
463
164
|
|
|
@@ -469,70 +170,35 @@ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
|
|
|
469
170
|
## Clean Code Review
|
|
470
171
|
|
|
471
172
|
### Review Scope
|
|
472
|
-
- Branch: `<BRANCH>`
|
|
473
|
-
-
|
|
474
|
-
- Merge-base: `<BASE_SHA>`
|
|
475
|
-
- Scope mode: `<default-with-uncommitted | explicit-hash-range>`
|
|
476
|
-
- Changed files reviewed: <N>
|
|
173
|
+
- Branch: `<BRANCH>` | Parent ref: `<PARENT>` | Merge-base: `<BASE_SHA>`
|
|
174
|
+
- Scope mode: `<default-with-uncommitted | explicit-hash-range>` | Changed files reviewed: <N>
|
|
477
175
|
|
|
478
176
|
### Summary
|
|
479
|
-
<2-3 sentences
|
|
177
|
+
<2-3 sentences.>
|
|
480
178
|
|
|
481
179
|
### Stats
|
|
482
180
|
- blocker: N | major: N | minor: N | info: N
|
|
483
181
|
|
|
484
182
|
### Findings
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
<[F-NNN] findings or "No naming issues found.">
|
|
488
|
-
|
|
489
|
-
#### Functions
|
|
490
|
-
<[F-NNN] findings or "No function design issues found.">
|
|
491
|
-
|
|
492
|
-
#### Comments
|
|
493
|
-
<[F-NNN] findings or "No comment issues found.">
|
|
494
|
-
|
|
495
|
-
#### Error Handling
|
|
496
|
-
<[F-NNN] findings or "No error handling issues found.">
|
|
497
|
-
|
|
498
|
-
#### DRY
|
|
499
|
-
<[F-NNN] findings or "No DRY violations found.">
|
|
500
|
-
|
|
501
|
-
#### SOLID
|
|
502
|
-
<[F-NNN] findings or "No SOLID violations found.">
|
|
183
|
+
One `####` section per area (Functions, Comments, Error Handling, DRY,
|
|
184
|
+
SOLID): its `[F-NNN]` findings, or "No <area> issues found."
|
|
503
185
|
|
|
504
186
|
### Clean Areas
|
|
505
|
-
[
|
|
187
|
+
[Areas checked with no findings]
|
|
506
188
|
```
|
|
507
189
|
|
|
508
|
-
---
|
|
509
|
-
|
|
510
190
|
## Job Context Awareness
|
|
511
191
|
|
|
512
|
-
When dispatched by `review-orchestrator` or `job-orchestrator`, the prompt MAY include
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
JOB_NAME: <job-name>
|
|
516
|
-
CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md
|
|
517
|
-
```
|
|
518
|
-
|
|
519
|
-
If provided and the file exists, read the context document before reviewing. Use it to:
|
|
520
|
-
- Understand team-agreed naming conventions that may differ from defaults
|
|
521
|
-
- Identify intentional design decisions that appear to violate Clean Code but are documented exceptions
|
|
522
|
-
- Understand error handling strategy (Result types vs. exceptions vs. null)
|
|
523
|
-
|
|
524
|
-
If absent, proceed normally — context is optional and non-blocking.
|
|
525
|
-
|
|
526
|
-
---
|
|
192
|
+
When dispatched by `review-orchestrator` or `job-orchestrator`, the prompt MAY include
|
|
193
|
+
`JOB_NAME` and `CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md`. If the file
|
|
194
|
+
exists, read it first for team conventions and documented exceptions. If absent, proceed.
|
|
527
195
|
|
|
528
196
|
## Red Flags
|
|
529
197
|
|
|
530
198
|
| Rationalization | Why it is wrong |
|
|
531
199
|
|----------------|-----------------|
|
|
532
|
-
| "
|
|
533
|
-
| "
|
|
534
|
-
| "
|
|
535
|
-
| "
|
|
536
|
-
| "
|
|
537
|
-
| "I can flag SOLID issues at info because they're just design opinions" | Named SOLID violations with concrete impact (testability, extensibility) are at least minor |
|
|
538
|
-
| "This is how the framework works, so it's not a violation" | Framework idioms are explicitly exempt — Iron Law 5 |
|
|
200
|
+
| "Stricter is safer, I'll flag 25-line functions too" | The threshold is the shared standard the writer followed. A finding under it is noise |
|
|
201
|
+
| "It's over the threshold" (when it already was before this change) | Old debt is not this change's finding |
|
|
202
|
+
| "The catch block logs the error, that's enough" | Logging and swallowing are the same if the caller proceeds — check what happens after the catch |
|
|
203
|
+
| "I can flag SOLID issues at info because they're just design opinions" | A named violation with a concrete impact is at least `minor` |
|
|
204
|
+
| "This is how the framework works, so it's not a violation" | Framework idioms are exempt — Clean Code law 5 |
|
|
@@ -24,7 +24,7 @@ license: "MIT"
|
|
|
24
24
|
# Review — Core Boundaries
|
|
25
25
|
|
|
26
26
|
Reviewer for shared infrastructure modules. A core module should provide stable foundations
|
|
27
|
-
used by feature modules; it should not accumulate feature-specific behaviour. 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
|
+
used by feature modules; it should not accumulate feature-specific behaviour. 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
|
|
|
@@ -120,7 +120,7 @@ conditions land under that rubric.
|
|
|
120
120
|
| Condition | Severity | Why, under the canonical rubric |
|
|
121
121
|
|---|---|---|
|
|
122
122
|
| A core API change that breaks a named consumer at runtime | `blocker` | Crash at a named call site |
|
|
123
|
-
| Importing feature code into core; adding feature-specific public API to core; inverted dependency | `major`
|
|
123
|
+
| Importing feature code into core; adding feature-specific public API to core; inverted dependency | `minor` — `major` only when a concrete defect it causes is named (trigger and outcome) or a stated project rule makes it one | A layer violation. Identical to `review-architecture` for the same condition |
|
|
124
124
|
| A generic helper whose names or types lean on one feature's language | `minor` | Works today; the cost is to the next module that needs it |
|
|
125
125
|
| A blast-radius concern with no named consumer | `info` | Shared law 1 |
|
|
126
126
|
|
|
@@ -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).
|
|
37
37
|
|
|
38
38
|
## The one question
|
|
39
39
|
|