@mrciphersmith/keryx 0.4.29 → 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.
Files changed (123) hide show
  1. package/dist/cli.js +2408 -1369
  2. package/dist/core.js +90 -27
  3. package/dist/keryx-general-worker-entry.js +82 -25
  4. package/package.json +1 -1
  5. package/src/gdskills/bundled/install-manifest.json +2 -0
  6. package/src/gdskills/bundled/rules/core/api-contracts.mdc +21 -136
  7. package/src/gdskills/bundled/rules/core/async-patterns.mdc +18 -171
  8. package/src/gdskills/bundled/rules/core/clean-architecture.mdc +21 -3
  9. package/src/gdskills/bundled/rules/core/cli-interface-design.mdc +63 -194
  10. package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +36 -49
  11. package/src/gdskills/bundled/rules/core/concurrency-patterns.mdc +32 -0
  12. package/src/gdskills/bundled/rules/core/database-patterns.mdc +26 -148
  13. package/src/gdskills/bundled/rules/core/error-handling.mdc +7 -8
  14. package/src/gdskills/bundled/rules/core/frontend-assistant.mdc +14 -29
  15. package/src/gdskills/bundled/rules/core/layout-rendering.mdc +51 -0
  16. package/src/gdskills/bundled/rules/core/mobx-store-template.mdc +69 -511
  17. package/src/gdskills/bundled/rules/core/nestjs-dto.mdc +18 -36
  18. package/src/gdskills/bundled/rules/core/playwright-testing.mdc +35 -308
  19. package/src/gdskills/bundled/rules/core/security-baseline.mdc +18 -140
  20. package/src/gdskills/bundled/rules/core/solid-principles.mdc +31 -7
  21. package/src/gdskills/bundled/rules/core/storybook-guidelines.mdc +20 -22
  22. package/src/gdskills/bundled/rules/core/tdd-workflow.mdc +37 -74
  23. package/src/gdskills/bundled/rules/core/ui-anti-slop.mdc +48 -37
  24. package/src/gdskills/bundled/skills/quality/deprecation-path/SKILL.md +1 -1
  25. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +24 -60
  26. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +13 -65
  27. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +22 -35
  28. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +16 -309
  29. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +7 -21
  30. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +83 -227
  31. package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +22 -28
  32. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +8 -8
  33. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +15 -37
  34. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +7 -7
  35. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +31 -66
  36. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +21 -39
  37. package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +42 -82
  38. package/src/gdskills/bundled/stacks/angular/rules/coding-style.mdc +15 -57
  39. package/src/gdskills/bundled/stacks/angular/rules/patterns.mdc +16 -60
  40. package/src/gdskills/bundled/stacks/angular/rules/security.mdc +11 -49
  41. package/src/gdskills/bundled/stacks/angular/rules/testing.mdc +13 -52
  42. package/src/gdskills/bundled/stacks/c-cpp/rules/coding-style.mdc +33 -57
  43. package/src/gdskills/bundled/stacks/c-cpp/rules/patterns.mdc +35 -62
  44. package/src/gdskills/bundled/stacks/c-cpp/rules/security.mdc +35 -62
  45. package/src/gdskills/bundled/stacks/c-cpp/rules/testing.mdc +34 -54
  46. package/src/gdskills/bundled/stacks/ci-github-gitlab/rules/patterns.mdc +27 -56
  47. package/src/gdskills/bundled/stacks/ci-github-gitlab/rules/security.mdc +51 -119
  48. package/src/gdskills/bundled/stacks/csharp-dotnet/rules/coding-style.mdc +42 -74
  49. package/src/gdskills/bundled/stacks/csharp-dotnet/rules/patterns.mdc +45 -84
  50. package/src/gdskills/bundled/stacks/csharp-dotnet/rules/security.mdc +34 -59
  51. package/src/gdskills/bundled/stacks/csharp-dotnet/rules/testing.mdc +33 -62
  52. package/src/gdskills/bundled/stacks/django/rules/coding-style.mdc +15 -56
  53. package/src/gdskills/bundled/stacks/django/rules/patterns.mdc +16 -68
  54. package/src/gdskills/bundled/stacks/django/rules/security.mdc +13 -71
  55. package/src/gdskills/bundled/stacks/django/rules/testing.mdc +16 -62
  56. package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/coding-style.mdc +30 -53
  57. package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/patterns.mdc +20 -56
  58. package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/security.mdc +52 -122
  59. package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/testing.mdc +23 -42
  60. package/src/gdskills/bundled/stacks/fastapi/rules/coding-style.mdc +13 -47
  61. package/src/gdskills/bundled/stacks/fastapi/rules/patterns.mdc +18 -81
  62. package/src/gdskills/bundled/stacks/fastapi/rules/security.mdc +13 -75
  63. package/src/gdskills/bundled/stacks/fastapi/rules/testing.mdc +14 -58
  64. package/src/gdskills/bundled/stacks/flutter-dart/rules/coding-style.mdc +36 -74
  65. package/src/gdskills/bundled/stacks/flutter-dart/rules/patterns.mdc +30 -66
  66. package/src/gdskills/bundled/stacks/flutter-dart/rules/security.mdc +33 -67
  67. package/src/gdskills/bundled/stacks/flutter-dart/rules/testing.mdc +41 -73
  68. package/src/gdskills/bundled/stacks/go/rules/coding-style.mdc +36 -57
  69. package/src/gdskills/bundled/stacks/go/rules/patterns.mdc +27 -42
  70. package/src/gdskills/bundled/stacks/go/rules/security.mdc +26 -43
  71. package/src/gdskills/bundled/stacks/go/rules/testing.mdc +23 -41
  72. package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/coding-style.mdc +18 -37
  73. package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/patterns.mdc +26 -43
  74. package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/security.mdc +25 -37
  75. package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/testing.mdc +34 -50
  76. package/src/gdskills/bundled/stacks/kotlin-android/rules/coding-style.mdc +28 -65
  77. package/src/gdskills/bundled/stacks/kotlin-android/rules/patterns.mdc +34 -78
  78. package/src/gdskills/bundled/stacks/kotlin-android/rules/security.mdc +35 -68
  79. package/src/gdskills/bundled/stacks/kotlin-android/rules/testing.mdc +34 -68
  80. package/src/gdskills/bundled/stacks/mobx/rules/coding-style.mdc +18 -64
  81. package/src/gdskills/bundled/stacks/mobx/rules/patterns.mdc +13 -66
  82. package/src/gdskills/bundled/stacks/mobx/rules/security.mdc +8 -35
  83. package/src/gdskills/bundled/stacks/mobx/rules/testing.mdc +10 -39
  84. package/src/gdskills/bundled/stacks/nestjs/rules/coding-style.mdc +32 -45
  85. package/src/gdskills/bundled/stacks/nestjs/rules/patterns.mdc +40 -60
  86. package/src/gdskills/bundled/stacks/nestjs/rules/security.mdc +30 -50
  87. package/src/gdskills/bundled/stacks/nestjs/rules/testing.mdc +27 -47
  88. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/coding-style.mdc +14 -48
  89. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/patterns.mdc +15 -67
  90. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/security.mdc +12 -50
  91. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/testing.mdc +11 -43
  92. package/src/gdskills/bundled/stacks/php-laravel/rules/coding-style.mdc +17 -58
  93. package/src/gdskills/bundled/stacks/php-laravel/rules/patterns.mdc +15 -56
  94. package/src/gdskills/bundled/stacks/php-laravel/rules/security.mdc +13 -50
  95. package/src/gdskills/bundled/stacks/php-laravel/rules/testing.mdc +14 -55
  96. package/src/gdskills/bundled/stacks/python/rules/coding-style.mdc +13 -41
  97. package/src/gdskills/bundled/stacks/python/rules/patterns.mdc +20 -61
  98. package/src/gdskills/bundled/stacks/python/rules/security.mdc +15 -57
  99. package/src/gdskills/bundled/stacks/python/rules/testing.mdc +16 -50
  100. package/src/gdskills/bundled/stacks/react/rules/coding-style.mdc +14 -40
  101. package/src/gdskills/bundled/stacks/react/rules/patterns.mdc +15 -55
  102. package/src/gdskills/bundled/stacks/react/rules/security.mdc +13 -49
  103. package/src/gdskills/bundled/stacks/react/rules/testing.mdc +10 -37
  104. package/src/gdskills/bundled/stacks/ruby-rails/rules/coding-style.mdc +12 -45
  105. package/src/gdskills/bundled/stacks/ruby-rails/rules/patterns.mdc +18 -67
  106. package/src/gdskills/bundled/stacks/ruby-rails/rules/security.mdc +11 -60
  107. package/src/gdskills/bundled/stacks/ruby-rails/rules/testing.mdc +14 -65
  108. package/src/gdskills/bundled/stacks/rust/rules/coding-style.mdc +39 -65
  109. package/src/gdskills/bundled/stacks/rust/rules/patterns.mdc +33 -60
  110. package/src/gdskills/bundled/stacks/rust/rules/security.mdc +35 -57
  111. package/src/gdskills/bundled/stacks/rust/rules/testing.mdc +29 -52
  112. package/src/gdskills/bundled/stacks/sql-db/rules/coding-style.mdc +12 -48
  113. package/src/gdskills/bundled/stacks/sql-db/rules/patterns.mdc +22 -113
  114. package/src/gdskills/bundled/stacks/sql-db/rules/security.mdc +11 -56
  115. package/src/gdskills/bundled/stacks/sql-db/rules/testing.mdc +14 -59
  116. package/src/gdskills/bundled/stacks/swift-ios/rules/coding-style.mdc +29 -65
  117. package/src/gdskills/bundled/stacks/swift-ios/rules/patterns.mdc +41 -88
  118. package/src/gdskills/bundled/stacks/swift-ios/rules/security.mdc +28 -53
  119. package/src/gdskills/bundled/stacks/swift-ios/rules/testing.mdc +32 -65
  120. package/src/gdskills/bundled/stacks/vue/rules/coding-style.mdc +17 -52
  121. package/src/gdskills/bundled/stacks/vue/rules/patterns.mdc +17 -63
  122. package/src/gdskills/bundled/stacks/vue/rules/security.mdc +11 -41
  123. package/src/gdskills/bundled/stacks/vue/rules/testing.mdc +16 -48
@@ -34,6 +34,12 @@ Every finding must describe an observable, reproducible defect or a spec gap.
34
34
 
35
35
  ---
36
36
 
37
+ ## The standard
38
+
39
+ Read both rules before the diff; where this file and a rule disagree, the rule wins.
40
+ - `.metaproject/rules/core/async-patterns.mdc` — parallel awaits, timeouts, bounded fan-out, event-loop blocking, **Review severities**.
41
+ - `.metaproject/rules/core/error-handling.mdc` — failure signalling, silent catches, unhandled rejections, **Review severities**.
42
+
37
43
  ## Workflow
38
44
 
39
45
  ```
@@ -137,17 +143,12 @@ earlier review round, because there the finding is recorded as closed and is not
137
143
  ### Async / Concurrency
138
144
 
139
145
  - [ ] Missing `await` on async call — result is a `Promise`, not the value
140
- - [ ] `await` inside a non-async function (syntax error or no-op)
141
146
  - [ ] Parallel async calls that should be sequential (shared mutable state)
142
- - [ ] Sequential `await` calls that could be `Promise.all` (performance is a secondary concern here; flag when correctness is affected by ordering assumption)
143
147
  - [ ] Race conditions: state updated in one branch before a concurrent operation resolves
144
- - [ ] Unhandled promise rejection (no `.catch`, no `try/catch`, no `Promise.allSettled`)
145
148
  - [ ] `setTimeout`/`setInterval` with shared state and no cleanup
146
149
 
147
150
  ### Error Handling
148
151
 
149
- - [ ] Swallowed `catch` blocks (catches error, does nothing)
150
- - [ ] Error rethrown as generic string, losing stack trace
151
152
  - [ ] Missing error boundary in UI component tree
152
153
  - [ ] HTTP errors not checked (`response.ok` ignored)
153
154
  - [ ] Partial success treated as full success (only first item processed, error on rest silently dropped)
@@ -245,14 +246,14 @@ conditions land under that rubric, not a second rubric.
245
246
 
246
247
  | Condition | Severity | Why, under the canonical rubric |
247
248
  |---|---|---|
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
+ | Unhandled rejection; swallowed error; sequential independent awaits, no timeout, unbounded fan-out, event-loop blocking | per `error-handling.mdc` / `async-patterns.mdc` **Review severities** | One table for writers and every reviewer |
249
250
  | Corrupted or lost persisted/returned data | `blocker` | Data loss or corruption |
250
251
  | Unimplemented acceptance criterion | `blocker` | Named shape 4 |
251
252
  | 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
253
  | Silent wrong result on a named input | `major` | Trigger and outcome are both named |
253
254
  | Type contract broken (declared type is not what is returned) | `major` | Callers observe the wrong value |
254
255
  | Edge case not handled, no input that reaches it named | `minor` | No trigger; the cost is to the next editor |
255
- | Non-null assertion without a comment | `minor` | Behaves correctly today; the cost is to the reader |
256
+ | Non-null assertion (`!`) | the `!` row of `code-style-patterns.mdc` Review severities | That table owns the rating; do not restate it here |
256
257
  | "Could be more defensive", no observable defect | `info` | Neither trigger nor maintenance cost named |
257
258
 
258
259
  ## Iron Laws
@@ -347,7 +348,6 @@ When dispatched by `review-orchestrator` or `job-orchestrator`, the prompt MAY c
347
348
  | "I see a potential security issue" | Security belongs in `review-security-code`; note it as info and defer |
348
349
  | "The spec is unclear so I'll skip the gate" | Unclear spec → `NEEDS_CONTEXT` status + ask for clarification |
349
350
  | "I'll mark everything blocker to be safe" | Overstated severity makes reports unactionable; calibrate per the severity guide |
350
- | "Async performance is slow, so that's a logic bug" | Performance lives in `review-performance` unless incorrect ordering changes the result |
351
351
  | "I didn't reproduce the bug so I won't report it" | Every blocker needs a scenario, not a repro — describe the failing code path |
352
352
 
353
353
  <!-- keryx:layers-block:start -->
@@ -85,7 +85,7 @@ render frame, a file in a tree walk or a command start, not a request handler.
85
85
  - [ ] Work done per keystroke or per render frame (re-reading a file, re-parsing, re-sorting, rebuilding a list) that could be done once per change of its inputs
86
86
  - [ ] Per-file work in a command that walks the tree or every flow: a read, parse, `existsSync` or child spawn per entry where one pass or one batch would do
87
87
  - [ ] Command startup cost: heavy top-level imports or eager reads in a module every command loads, when only some commands use them
88
- - [ ] Synchronous I/O (`readFileSync`, `execSync`, `spawnSync`) on an interactive path: input handling, render, a prompt waiting on the user
88
+ - [ ] Synchronous I/O (`readFileSync`, `execSync`, `spawnSync`) on an interactive path: input handling, render, a prompt waiting on the user (rated by `.metaproject/rules/core/async-patterns.mdc` Rule 4, as in section 7)
89
89
  - [ ] JSON parse, regex compilation or config load repeated inside a loop instead of hoisted
90
90
  - [ ] O(n²) over files, flows, findings or lines: a nested scan, `.includes`/`.find` inside a loop over the same set, sort inside a loop
91
91
  - [ ] Polling (`setTimeout`/`setInterval`, `while` wait loop) where an event or a single await would do
@@ -96,51 +96,36 @@ render frame, a file in a tree walk or a command start, not a request handler.
96
96
 
97
97
  ### 1. N+1 Database Queries
98
98
 
99
- **Detection patterns:**
100
- - [ ] Loop or `.map()` containing a DB query, repository call, or Prisma/TypeORM find
101
- - [ ] `for (const item of items) { await repo.findOne(...) }` — classic N+1
102
- - [ ] ORM relation accessed without eager loading inside iteration: `order.items` where `items` is a lazy relation loaded inside a loop
103
- - [ ] GraphQL resolver loading a child relation per parent without a DataLoader
104
-
105
- **Correct patterns to confirm:** Prisma `include`/`select` on the parent query; TypeORM `leftJoinAndSelect()` or `relations`; MikroORM `populate`; raw SQL `JOIN` rather than a query per row.
106
-
107
- **Hot path requirement:** State whether this runs per HTTP request, per list item render, per job iteration, etc.
99
+ The standard and its severities are `.metaproject/rules/core/database-patterns.mdc` (Rule 1 and its **Review severities** row). Also: a GraphQL resolver loading a child per parent without a DataLoader is the same shape. State whether the loop runs per HTTP request, per list item render or per job iteration, with its size.
108
100
 
109
101
  ### 2. Unnecessary React Re-renders
110
102
 
111
103
  **Detection patterns:**
112
104
  - [ ] Object or array literal created inline in JSX: `<Component options={{ key: val }} />` — new reference every render
113
- - [ ] Arrow function created inline as prop: `<Button onClick={() => store.doX()} />` — new reference every render
114
- - [ ] Large expensive computation performed directly in render body (not in useMemo)
105
+ - [ ] Arrow function created inline as a prop of a non-store value; an arrow that only forwards to a store action is allowed and needs no `useCallback`
106
+ - [ ] Large expensive computation performed directly in render body
115
107
  - [ ] Context value object created inline without useMemo: `<MyContext.Provider value={{ a, b }}>` — every parent render triggers all consumers
116
108
  - [ ] Component receiving a new object/array reference from props despite same data (parent not memoizing)
117
109
 
118
110
  **When memo IS justified (flag absence):**
119
111
  - [ ] Pure child component receiving stable props but not wrapped in `React.memo` — only flag if the parent re-renders frequently (e.g., on keypress, scroll, animation frame)
120
- - [ ] `useCallback` absent for a callback passed to a `React.memo` child — only flag if the child is expensive
112
+ - [ ] `useCallback` absent for a non-store callback passed to a `React.memo` child — only flag if the child is expensive; a store method or store value is never wrapped in `useCallback`/`useMemo`
121
113
 
122
- **MobX note:** With MobX + observer, `useCallback`/`useMemo` are rarely needed. Do NOT flag their absence unless there is concrete evidence of re-render cost. Flag only missing `observer()` (see `review-frontend` for full MobX checklist).
114
+ **MobX note:** `observer` and where memoization does and does not belong are `.metaproject/rules/core/code-style-patterns.mdc` Rules 1 and 3. Without a concrete re-render cost there is no finding.
123
115
 
124
116
  ### 3. Expensive Computations in Hot Paths
125
117
 
126
- - [ ] Sorting, filtering, or reducing a large array inside a render function without `useMemo`
118
+ - [ ] Sorting, filtering, or reducing a large array inside a render function without `useMemo`; when the array is store state the fix is `@computed` (`.metaproject/rules/core/mobx-store-template.mdc` Rule 1), not `useMemo`
127
119
  - [ ] Deep clone (`JSON.parse(JSON.stringify(...))`) inside a loop or on every render
128
120
  - [ ] Regex compilation inside a loop — should be compiled once outside: `const RE = /pattern/`
129
121
  - [ ] `Object.keys().reduce()` or similar aggregation recalculated on every render instead of being derived in store or memoized
130
122
  - [ ] Recursive computation without memoization called in a loop
131
123
 
132
- **Hot path requirement:** An expensive computation is a `major` finding when it runs at render time, in a tight loop, or on every CLI command start (a hot path, Part 0). Once per page load is a path you can name: rate it by the table (`major` with its cost and frequency stated, else `minor`). Once per process (server start, a build) is `info` at most.
124
+ **Hot path requirement:** An expensive computation is `major` only with a named cost and frequency (a render, a tight loop, every CLI command start: a hot path, Part 0); without both it is `minor`. Once per process (server start, a build) is `info` at most.
133
125
 
134
126
  ### 4. Missing Database Indexes
135
127
 
136
- Detectable from query patterns in changed code (not from DB schema directly):
137
-
138
- - [ ] New query filtering on a column that is not a primary key and not obviously indexed: `WHERE email = ?` without a unique constraint visible in the schema or migration
139
- - [ ] `ORDER BY created_at DESC` on a table with potentially large row counts — `created_at` index not evident
140
- - [ ] `LIKE '%term%'` — prefix wildcard prevents index use; flag as info with suggestion to use full-text search
141
- - [ ] Foreign key column used in JOIN without an index (common ORM footgun)
142
-
143
- **Evidence requirement:** Cannot confirm an index is missing without seeing the migration or schema. If the schema is not in the payload, it is `info`: say that reading the schema would settle it. Schema shown with no index and the table shown large (its size named): `major`. Schema shown, size not: `minor`.
128
+ The standard and its severities are `.metaproject/rules/core/database-patterns.mdc` (Rule 2 and its **Review severities** row, which also rates an index with no schema in the payload). Also: `LIKE '%term%'` cannot use a b-tree index; flag it as `info` with full-text search as the fix.
144
129
 
145
130
  ### 5. Memory Leaks
146
131
 
@@ -148,11 +133,9 @@ Detectable from query patterns in changed code (not from DB schema directly):
148
133
  - [ ] `addEventListener` without matching `removeEventListener` in cleanup
149
134
  - [ ] `setInterval` / `setTimeout` (recurring) without `clearInterval` / `clearTimeout` in cleanup
150
135
  - [ ] RxJS `subscribe()` without `unsubscribe()` stored in a disposable or returned from useEffect cleanup
151
- - [ ] MobX `autorun` / `reaction` / `when` without disposer called in `dispose()` (see `review-frontend` for full checklist)
152
136
  - [ ] WebSocket or SSE connection opened without close in cleanup
153
137
 
154
- **React useEffect:**
155
- - [ ] `useEffect` that creates a subscription, timer, or async operation but returns no cleanup function
138
+ MobX disposers are `.metaproject/rules/core/mobx-store-template.mdc` Rule 5; a `useEffect` subscription, timer or async operation with no cleanup is `.metaproject/rules/core/code-style-patterns.mdc` Rule 5. Each takes its severity from that rule's table.
156
139
 
157
140
  **Unbounded collections:**
158
141
  - [ ] Map, Set, or array that grows on every event/request with no eviction, max size, or TTL
@@ -175,19 +158,16 @@ Detectable from query patterns in changed code (not from DB schema directly):
175
158
 
176
159
  ### 7. Synchronous Blocking in Async Contexts
177
160
 
178
- - [ ] `fs.readFileSync` / `fs.writeFileSync` inside a request handler or async function
179
- - [ ] `child_process.execSync` in a Node.js server handler
180
- - [ ] CPU-intensive synchronous computation (sorting large arrays, JSON.parse of large payloads) in an Express/NestJS handler without offloading to a worker
161
+ Sync file I/O, `execSync` and CPU-heavy work on a request path are `.metaproject/rules/core/async-patterns.mdc` Rule 4 and its **Review severities** row. Also:
162
+
181
163
  - [ ] `new Promise(resolve => setTimeout(resolve, N))` — artificial sleep in a server handler
182
164
  - [ ] Synchronous DB client used in an async context (e.g., `better-sqlite3` in an Express handler serving concurrent requests)
183
165
 
184
166
  ### 8. Missing Pagination
185
167
 
186
- - [ ] Repository query with no `take`/`limit` on a collection that could grow (user-generated content, logs, history)
187
- - [ ] `findAll()` / `find({})` with no limit on a table mentioned as potentially large in context
188
- - [ ] API endpoint returning an array without `page`/`cursor`/`limit` parameters when the underlying data is unbounded
168
+ The standard and its severities are `.metaproject/rules/core/api-contracts.mdc` (Rule 6 and its **Review severities** row): a list bounded small by construction is not a finding, and attacker-reachable memory exhaustion is `blocker`. The repository-level counterpart:
189
169
 
190
- **Evidence requirement:** Only flag as `major` if the dataset is described as large or clearly unbounded. For small controlled datasets, flag as `minor`.
170
+ - [ ] Repository query with no `take`/`limit` on a collection that could grow (user-generated content, logs, history), or `findAll()` / `find({})` with no limit on a table named as large
191
171
 
192
172
  ### 9. Redundant API Calls
193
173
 
@@ -198,9 +178,7 @@ Detectable from query patterns in changed code (not from DB schema directly):
198
178
 
199
179
  ### 10. MobX: Derived State Computed in Renders
200
180
 
201
- - [ ] Value derived from observables computed inline in a component: `const total = store.items.reduce(...)` — should be `@computed get total()` in the store
202
- - [ ] Filtered list recalculated in render: `store.items.filter(x => x.active)` — should be a `@computed`
203
- - [ ] Conditional format derived from observable in render instead of a computed getter
181
+ Derived values belong in `@computed` (`.metaproject/rules/core/mobx-store-template.mdc` Rule 1 and its row) and logic does not live in a component (`.metaproject/rules/core/code-style-patterns.mdc` Rule 2). This lens adds only the cost angle: a reduce, filter or format recomputed on a high-frequency render, with its frequency named.
204
182
 
205
183
  ---
206
184
 
@@ -75,14 +75,17 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
75
75
 
76
76
  ---
77
77
 
78
+ ## The standard
79
+
80
+ Read `.metaproject/rules/core/security-baseline.mdc` before the diff (secrets, queries, boundary validation, logging, dependencies, **Review severities**). Where this file and the rule disagree, the rule wins.
81
+
78
82
  ## Review Checklist
79
83
 
80
84
  Work through every category below for each changed file. Tie every finding to a concrete line in the diff.
81
85
 
82
86
  ### 1. Injection Vulnerabilities
83
87
 
84
- **SQL Injection**
85
- - [ ] Raw SQL built by string concatenation or template literals with user input
88
+ **SQL Injection** (`security-baseline.mdc`)
86
89
  - [ ] ORM `query()` / `rawQuery()` calls with unparameterized values
87
90
  - [ ] TypeORM `createQueryBuilder` using `.where(\`field = '${value}'\`)` instead of parameterized bindings
88
91
 
@@ -143,14 +146,11 @@ Attack vector template: _"Attacker replaces `id=123` with `id=456` in request, a
143
146
  - [ ] Express: no `express-validator` or equivalent on body/query params
144
147
  - [ ] Accepting unbounded `limit`/`offset` from user without max cap (DoS vector)
145
148
  - [ ] File upload: MIME type and extension validated only client-side, not server-side
146
- - [ ] Email/URL fields accepted without format validation
147
149
 
148
150
  ### 5. Secrets and Credentials
149
151
 
150
- - [ ] Hardcoded API keys, passwords, tokens, or private keys in source
151
152
  - [ ] Secrets passed via URL query params (end up in logs and proxies)
152
- - [ ] Passwords, tokens, or PII logged via `console.log`, `logger.debug`, or error serialization
153
- - [ ] `.env` files committed to version control
153
+ - [ ] PII logged via error serialization
154
154
  - [ ] JWT secret is a short literal string (`"secret"`, `"myapp"`)
155
155
 
156
156
  ### 6. Insecure Cryptography
@@ -305,6 +305,7 @@ conditions land under that rubric, not a second rubric.
305
305
 
306
306
  | Condition | Severity | Why, under the canonical rubric |
307
307
  |---|---|---|
308
+ | Secrets, interpolated queries, unvalidated boundary input, logged secrets, dependency ranges | per `.metaproject/rules/core/security-baseline.mdc` **Review severities** | One table for writers and this reviewer |
308
309
  | Exploitable vulnerability in the current code path, with the attack vector stated | `blocker` | Named shape 3 |
309
310
  | A weakness a named trigger reaches in the current code, producing a wrong outcome short of a named attacker impact | `major` | Trigger and outcome are named; not shape 3 |
310
311
  | Hardening or defence-in-depth on code that is not currently exploitable | `minor` | The code behaves correctly; the cost is to whoever hardens it later |
@@ -327,7 +328,6 @@ Stop and re-read these rules if you are thinking:
327
328
  | "The team would never send that payload" | Attackers are not on the team |
328
329
  | "MD5 is used for caching keys, not passwords — it's fine" | State it as INFO, but do not silently skip it; it often drifts |
329
330
  | "I'll downgrade to minor to avoid friction" | Severity reflects real risk, not social dynamics |
330
- | "The code uses an ORM so SQL injection is not possible" | ORMs have raw-query escape hatches; verify parameterization |
331
331
  | "No attack vector found — I'll call it major anyway" | Without a vector the attacker claim is dropped, not the finding: it is `major` only with a named trigger and wrong outcome, else `info` (security-specific law) |
332
332
  | "It's a security finding, so it's a blocker" | `blocker` is the four shapes in **Severity (canonical)**. An unreachable weakness is `info` (shared law 1) however alarming its name; a reachable one with a named trigger and wrong outcome, short of shape 3, is `major`; reachable but behaving correctly is hardening (`minor`) |
333
333
  | "It's outside the diff but the pattern is clearly wrong" | Only flag changed code; flag legacy via INFO with note to track separately |
@@ -2,7 +2,7 @@
2
2
  name: review-style
3
3
  model_tier: light
4
4
  description: |
5
- Use when: reviewing code for style, naming conventions, readability, and DRY violations —
5
+ Use when: reviewing code for names, naming conventions and readability —
6
6
  without touching logic, architecture, security, or performance. Dispatched by
7
7
  review-orchestrator with the --style flag.
8
8
  NOT for: logic bugs, architectural violations, security vulnerabilities, performance
@@ -23,8 +23,8 @@ license: "MIT"
23
23
 
24
24
  # Review — Style, Naming & Readability
25
25
 
26
- Focused style reviewer. Covers naming conventions, dead code, readability, DRY violations,
27
- import organization, comment quality, file length, cyclomatic complexity, and console noise.
26
+ Focused style reviewer. Covers names, naming conventions, readability, file length,
27
+ cyclomatic complexity, barrel and re-export hygiene, and console noise.
28
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
29
 
30
30
  ## The standard
@@ -33,10 +33,10 @@ Read `.metaproject/rules/core/solid-principles.mdc` before the diff: it is the
33
33
  file the code was written against. Its **Readability thresholds** table is this
34
34
  lens's thresholds and default severities; under a threshold, report nothing.
35
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.
36
+ Names are rated by the `solid-principles.mdc` **Review severities** Name row. Not
37
+ this lens's: duplication, magic literals, comments and lookup-map or branch-chain
38
+ findings (`review-clean-code`); circular imports (`review-architecture`); unused
39
+ imports and variables and import order (the linter).
40
40
 
41
41
  A threshold counts only when this change crosses it: one more line in a file
42
42
  already past a length limit is not a finding.
@@ -51,13 +51,11 @@ review-style Progress:
51
51
  - [ ] Step 2: Determine git scope (merge-base) — see .metaproject/skills/gdskills/shared/git-merge-base.md
52
52
  - [ ] Step 3: Collect diff and changed file list
53
53
  - [ ] Step 4: Naming conventions check
54
- - [ ] Step 5: Dead code and imports check
54
+ - [ ] Step 5: Dead exports and module hygiene check
55
55
  - [ ] Step 6: Readability and complexity check
56
- - [ ] Step 7: DRY violations check
57
- - [ ] Step 8: Comment quality check
58
- - [ ] Step 9: File length and structure check
59
- - [ ] Step 10: Console usage check
60
- - [ ] Step 11: Emit findings in unified format, sorted by severity
56
+ - [ ] Step 7: File length and structure check
57
+ - [ ] Step 8: Console usage check
58
+ - [ ] Step 9: Emit findings in unified format, sorted by severity
61
59
  ```
62
60
 
63
61
  ---
@@ -95,7 +93,7 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
95
93
  Casing, boolean prefixes and verb names follow the language's published defaults; report a departure only where the surrounding code follows the default.
96
94
 
97
95
  **Variables and functions**
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)
96
+ - Single-letter names only for loop counters and short array callbacks (`arr.map(x => x.id)`); `let x = fetchUser()` is a finding (the Name row)
99
97
 
100
98
  **Classes and interfaces**
101
99
  - Interfaces are named without an `I` prefix (`UserService`, not `IUserService`); an `I` prefix the change introduces is a finding
@@ -109,70 +107,38 @@ Naming severity is set by the Style laws below and by the canonical rubric in `r
109
107
 
110
108
  ---
111
109
 
112
- ### 2. Dead Code and Unused Imports
110
+ ### 2. Dead Exports
113
111
 
114
- - Unused variables (`const x = ...` never referenced) — flag as `minor`
115
- - Unused function parameters in non-interface-implementing functions — flag as `minor`
116
- - Unused imports — flag as `minor`; provide the removal patch
117
- - Commented-out code — flag as `minor` (`review-clean-code`'s Comment row); ask: "Is this intentional? If not, remove."
118
112
  - Exported functions/classes that are never imported anywhere in the diff scope — flag as `info`
119
- (may be used externally; do not assume dead without evidence)
113
+ (may be used externally; do not assume dead without evidence). Unused variables, parameters and imports are the linter's.
120
114
 
121
115
  ---
122
116
 
123
117
  ### 3. Readability and Complexity
124
118
 
125
- **Conditions**
119
+ **Conditions and nesting** (clause, depth and complexity thresholds are the Readability thresholds table)
126
120
  - A boolean condition over the clause threshold — suggest extracting a named predicate
121
+ - Callback or `if/else` nesting over the depth threshold — suggest extraction, `async/await` or guard clauses
122
+ - A function over the decision-branch threshold — suggest splitting into named functions
127
123
  - Double negatives (`!isNotEmpty`) — flag as `minor`; rewrite to positive form
128
124
  - Ternary chains (ternary inside ternary) — flag as `minor`; suggest `if/else` or early return
129
125
 
130
- **Nesting**
131
- - Callback or `if/else` nesting over the depth threshold — suggest extraction, `async/await` or guard clauses
132
-
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)
135
-
136
- **Cyclomatic complexity**
137
- - A function over the decision-branch threshold (if/else, switch cases, ternaries, loops) — suggest splitting into named functions
138
-
139
- ---
140
-
141
- ### 4. DRY Violations
142
-
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
144
- - Similar switch/if-else trees that could be a lookup map — flag as `minor`
145
-
146
- Do not flag DRY violations for code outside the diff even if legacy duplication exists.
147
-
148
126
  ---
149
127
 
150
- ### 5. Import Organization
128
+ ### 4. Module Hygiene
151
129
 
152
130
  - Barrel imports (`import * as X from '...'`) without reason — flag as `info`
153
- - Circular imports (visible from import paths) — flag as `minor`; `review-architecture` owns the rating, and one that fails at runtime is its finding
154
131
  - Re-exporting something that is immediately re-used in the same file — flag as `minor` (unnecessary indirection)
155
132
 
156
133
  ---
157
134
 
158
- ### 6. Comment Quality
159
-
160
- **Misleading or outdated comments**
161
- - Comment describes what the code does but the code has changed — flag as `minor`
162
- - Comment says "TODO: remove before deploy" and was merged — flag as `minor`
163
- - Comment is actively wrong (incorrect description of behavior) — flag as `minor` (`review-clean-code` owns comment ratings; a defect the comment caused is that defect's finding)
164
-
165
- **Missing JSDoc on public APIs**
166
- - Public functions/classes exported from a module should have a JSDoc comment describing purpose, params, and return value
167
- - Missing JSDoc on public APIs: flag as `info` (unless the project has a documented standard requiring it, in which case `minor`)
135
+ ### 5. Public API Docs
168
136
 
169
- **Noise comments**
170
- - A redundant comment (`// increment i` above `i++`) — flag as `minor` (`review-clean-code`'s Comment row); suggest removing
171
- - Section divider comments (`// =========`) that add no semantic value — flag as `info`
137
+ - Missing JSDoc on a public export: flag as `info` (`minor` where the project has a documented standard). Comment quality is `review-clean-code`'s.
172
138
 
173
139
  ---
174
140
 
175
- ### 7. File Length and Structure
141
+ ### 6. File Length and Structure
176
142
 
177
143
  - A file over a length threshold — suggest splitting by responsibility
178
144
  - A file over the unrelated-exports threshold — suggest splitting into focused modules
@@ -180,7 +146,7 @@ Do not flag DRY violations for code outside the diff even if legacy duplication
180
146
 
181
147
  ---
182
148
 
183
- ### 8. Console Usage
149
+ ### 7. Console Usage
184
150
 
185
151
  - `console.log` / `console.error` / `console.warn` in non-test production code — flag as `minor`
186
152
  - Suggest replacing with project logger (`AppLogger`, `Logger`, etc.) or remove entirely
@@ -207,10 +173,9 @@ boundary is the trigger-and-outcome test.
207
173
  | Rule | Rationale |
208
174
  |------|-----------|
209
175
  | 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 |
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 |
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 |
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 |
176
+ | 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 | The `solid-principles.mdc` Name row; this lens is its only rater |
177
+ | Never flag issues handled by the project's autoformatter or linter (indentation, trailing spaces, bracket style, import grouping and order, unused imports and variables) | Linter/formatter owns that; double-flagging creates noise. This does not cover the `from "src/..."` import-path row of `code-style-patterns.mdc` Rule 8, which is path style, not grouping or order |
178
+ | Do not expand scope to architectural or logic concerns | Stay in style lane; hand off to the right reviewer. Circular imports are `review-architecture`'s |
214
179
 
215
180
  ---
216
181
 
@@ -253,7 +218,7 @@ observation is theatre, not rigour.
253
218
  - **Severity**: major | minor | info
254
219
  - **File**: path/to/file.ts:line
255
220
  - **Problem**: what is wrong
256
- - **Why it matters**: readability / maintainability / DRY / convention consistency
221
+ - **Why it matters**: readability / maintainability / convention consistency
257
222
  - **Fix**: concrete suggestion
258
223
  - **Patch** (optional):
259
224
  ```diff
@@ -302,7 +267,7 @@ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
302
267
  <[F-NNN] findings>
303
268
 
304
269
  ## Positive Notes
305
- <Optional. Consistent naming, clean imports, good comments.>
270
+ <Optional. Consistent naming, readable structure.>
306
271
  ```
307
272
 
308
273
  ---
@@ -311,8 +276,9 @@ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
311
276
 
312
277
  | Concern | This skill | Use instead |
313
278
  |---------|------------|-------------|
314
- | Naming, formatting, readability, imports, file length | YES | — |
315
- | Duplication, comments, circular imports (reported here at `minor`) | rating owned elsewhere | `review-clean-code` (duplication, comments); `review-architecture` (circular imports) |
279
+ | Names, readability, barrels and re-exports, file length | YES | — |
280
+ | Duplication, magic literals, comments, lookup maps | NO | `review-clean-code` |
281
+ | Circular imports | NO | `review-architecture` |
316
282
  | Logic bugs, incorrect return values | NO | `review-logic` |
317
283
  | Architectural layer violations | NO | `review-architecture` |
318
284
  | Security vulnerabilities | NO | `review-security-code` |
@@ -345,6 +311,5 @@ If absent, infer conventions from surrounding unchanged code in the same files;
345
311
  | Rationalization | Why it is wrong |
346
312
  |----------------|-----------------|
347
313
  | "The naming is a bit odd but I understand it" | Reviewers understand their own code; the next dev won't |
348
- | "It's only one magic number" | One `42` today becomes twelve untraceable `42`s tomorrow |
349
- | "DRY violation is minor so I'll skip it" | It is `minor` and still reported, once, with every site listed |
350
314
  | "The file is 600 lines but it's organized" | Organization doesn't prevent merge conflicts and scroll fatigue |
315
+ | "An unused import is an easy minor to add" | The linter owns unused imports and variables; a finding here double-reports it |
@@ -104,26 +104,25 @@ pass, then work the checklist.
104
104
 
105
105
  ---
106
106
 
107
- ## Checklist
107
+ ## The standard
108
+
109
+ These project rules hold what to check and how to rate it. Read each one that applies to the change and rate by its **Review severities** table; this lens does not restate them.
108
110
 
109
- ### Test Location and Tiers
111
+ - `.metaproject/rules/core/tdd-workflow.mdc`: one toolchain, colocation, a test for new or changed logic, boundary mocking, no real network or clock, no sleeps, flakes fixed by waiting on a state, tests never deleted to go green.
112
+ - `.metaproject/rules/core/playwright-testing.mdc`: waits, locator order, auth in a setup project, independent specs, owned data, route mocking, screenshots, smoke tags.
110
113
 
111
- - Tests live near the code they cover unless the repository has a deliberate central test layout.
112
- - Shared test infrastructure folders are not used as buckets for feature tests.
113
- - Unit, integration, component, and e2e tiers are named and routed consistently.
114
- - Fast feedback lanes stay fast; screenshot/component/e2e suites are not used for cheap unit
115
- assertions.
116
- - Coverage gates focus on changed risk, not low-value tests for trivial getters.
114
+ The checks below are the lens's own; no rule covers them.
117
115
 
118
- ### Network and Boundary Mocking
116
+ ---
117
+
118
+ ## Checklist
119
119
 
120
- - For data-fetching UI, prefer rendering the real component/store and mocking only the network
121
- boundary.
122
- - Avoid mocking the API module in integration tests when the repository has network-level mock
123
- infrastructure.
120
+ ### Boundary Mocking, Beyond the Rule
121
+
122
+ - For data-fetching UI, prefer rendering the real component/store and mocking only the network boundary.
123
+ - Avoid mocking the API module in integration tests when the repository has network-level mock infrastructure.
124
124
  - Unhandled network requests fail loudly instead of silently hitting the real world.
125
- - Mock handlers/fixtures are colocated and reusable by tests/stories where practical.
126
- - Handler paths match the runtime test environment and avoid hard-coded origins unless required.
125
+ - Mock handlers/fixtures are colocated and reusable by tests/stories where practical; handler paths match the runtime test environment and avoid hard-coded origins unless required.
127
126
 
128
127
  ### Behaviour Assertions
129
128
 
@@ -166,24 +165,10 @@ pass, then work the checklist.
166
165
  such test needs one positive artifact proving the path was entered before the
167
166
  negative assertions mean anything.
168
167
 
169
- ### Browser and E2E Determinism
170
-
171
- - Tests create their own artifacts with unique names and assert on those artifacts.
172
- - Avoid mutating or deleting seeded/shared environment data.
173
- - Avoid env-wide assertions such as exact global counts, `.first()`, or `.nth(N)` unless the test
174
- owns the full dataset.
175
- - No fixed sleeps; wait on assertions, events, responses, or polling predicates.
176
- - Backend-dependent assertions wait on the response/event that proves the backend completed.
177
- - Smoke tags are reserved for fast, reliable, load-bearing baseline flows.
178
- - Locator priority prefers stable test ids and accessible roles over raw CSS selectors.
179
- - Screenshot tests are avoided for heavy, unstable, or non-deterministic surfaces unless the
180
- repository explicitly supports them.
168
+ ### Tiers
181
169
 
182
- ### Local Type and Build Gotchas
183
-
184
- - Account for incremental compiler caches when validating newly added files.
185
- - Generated/vendored files that are outside the lint/type project are ignored centrally rather
186
- than hand-formatted into compliance.
170
+ - Fast feedback lanes stay fast: screenshot, component and e2e suites are not used for cheap unit assertions.
171
+ - Coverage gates focus on changed risk.
187
172
 
188
173
  ---
189
174
 
@@ -234,20 +219,17 @@ class_scope:
234
219
  - **Fix**: concrete test rewrite or fixture/handler change
235
220
  ```
236
221
 
237
- Severity comes from **Severity (canonical)** in `review-orchestrator/SKILL.md`. This reviewer keeps no rubric of its own; what follows is where its recurring conditions land under that rubric.
222
+ Severity comes from **Severity (canonical)** in `review-orchestrator/SKILL.md`. Defects the two rules name are rated by their **Review severities** tables (`tdd-workflow.mdc`, `playwright-testing.mdc`), including a test that cannot fail and a flaky test; this lens does not restate them. What follows is where its own recurring conditions land.
238
223
 
239
224
  | Condition | Severity | Why, under the canonical rubric |
240
225
  |---|---|---|
241
- | A test that passes while the behaviour it names is broken | `blocker` | The acceptance criterion is unimplemented — the test only claims otherwise |
242
- | Real-network leak; shared-data mutation across tests; fixed sleeps; asserting on a backend race | `major` | Named trigger (the run) and named outcome (flake or a false pass) |
243
226
  | A gate the diff added survives deletion with the suite green | `minor` | The code is correct; the cost is that the next edit to it is unprotected |
244
- | A fixture whose shape contradicts the scenario it names, or pins a value the producer cannot emit | `minor` | Same — plus the next author reads it as coverage it does not provide |
227
+ | A fixture whose shape contradicts the scenario it names, or pins a value the producer cannot emit | `minor` | Same, plus the next author reads it as coverage it does not provide |
245
228
  | Assertions ride the fallback branch while the code names another authoritative | `minor` | Same |
246
- | Substrate choice, smoke tagging, locator priority, co-location | `minor` | The suite is correct; the cost is to whoever maintains it |
229
+ | A test that asserts only falsy state, with no positive artifact that the path ran | `minor` | It passes when the code never ran |
230
+ | Substrate choice (API module mocked where network-level mocks exist) | `minor` | The suite is correct; the cost is to whoever maintains it |
247
231
  | A convention preference with no effect on determinism or signal | `info` | Shared laws 1 and 2 |
248
232
 
249
- A flaky test is `major`, not `blocker`: it wastes time, but it does not ship a defect. A test that cannot fail does — which is why it is the one `blocker` here.
250
-
251
233
  The three mutation-pass rows sit at `minor` deliberately, and the reasoning is the canonical rubric rather than modesty: a coverage gap names no runtime trigger and no user-visible outcome, so it cannot be `major` under the boundary test. What makes them worth reporting is not severity but **evidence class** — each one is a command that ran, which is the rarest thing in a review and the only kind of finding a later round cannot argue away. Report them with the mutation and its result, and they survive adjudication intact. Report them as "coverage looks thin" and they are correctly discarded.
252
234
 
253
235
  The moment a surviving mutation is accompanied by a **reachable input that makes the unpinned code do the wrong thing**, that is a separate finding at the severity its own outcome earns — usually `major`. The coverage gap and the defect are two findings, not one, and conflating them loses whichever the adjudicator disbelieves.