@mrciphersmith/keryx 0.4.27 → 0.4.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +2 -2
  2. package/dist/cli.js +105165 -104989
  3. package/dist/core.js +21 -197
  4. package/dist/keryx-general-worker-entry.js +22 -201
  5. package/package.json +3 -3
  6. package/src/gdskills/bundled/agents/work-planner.md +1 -1
  7. package/src/gdskills/bundled/install-manifest.json +3 -26
  8. package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +1 -2
  9. package/src/gdskills/bundled/rules/core/definition-of-done.mdc +0 -1
  10. package/src/gdskills/bundled/rules/core/implementation-doc-mandate.mdc +4 -5
  11. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +8 -8
  12. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +7 -10
  13. package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +1 -1
  14. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +12 -21
  15. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +3 -3
  16. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +1 -1
  17. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
  18. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +1 -1
  19. package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +1 -1
  20. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +1 -1
  21. package/src/gdskills/bundled/skills/planning/interview/SKILL.md +3 -4
  22. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +1 -1
  23. package/src/gdskills/bundled/skills/quality/git-publish/SKILL.md +60 -0
  24. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +1 -1
  25. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +3 -3
  26. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +7 -7
  27. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +22 -22
  28. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +15 -15
  29. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +2 -2
  30. package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +7 -7
  31. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +2 -2
  32. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +34 -30
  33. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +2 -2
  34. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +64 -135
  35. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +4 -4
  36. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +18 -20
  37. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +12 -18
  38. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +2 -2
  39. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +2 -10
  40. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +35 -35
  41. package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +4 -5
  42. package/src/gdskills/bundled/skills/review/review-premise/SKILL.md +2 -2
  43. package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +3 -5
  44. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +14 -15
  45. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +14 -13
  46. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +11 -11
  47. package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +10 -11
  48. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +5 -5
  49. package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
  50. package/src/gdskills/bundled/stacks/mobx/agent-refs.json +1 -1
  51. package/src/gdskills/bundled/stacks/mobx/governance/scout.json +2 -2
  52. package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/SKILL.md +2 -2
  53. package/src/gdskills/bundled/stacks/vue/governance/scout.json +1 -1
  54. package/src/gdskills/contracts/review-finding.schema.json +2 -2
  55. package/src/gdskills/bundled/rules/core/code-review-ai-assistant.mdc +0 -49
  56. package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +0 -198
  57. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +0 -177
  58. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +0 -414
  59. package/src/gdskills/bundled/skills/orchestration/job-documenter/input-contract.schema.json +0 -55
  60. package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json +0 -58
  61. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +0 -209
  62. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +0 -209
  63. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +0 -208
  64. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +0 -255
  65. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +0 -255
  66. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +0 -254
  67. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +0 -209
  68. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +0 -209
  69. package/src/gdskills/bundled/skills/planning/planner/SKILL.md +0 -208
  70. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +0 -171
  71. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +0 -171
  72. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +0 -170
  73. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +0 -184
  74. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +0 -184
  75. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +0 -183
  76. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +0 -249
  77. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +0 -249
  78. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +0 -248
  79. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +0 -199
  80. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +0 -199
  81. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +0 -198
  82. package/src/gdskills/bundled/skills/quality/commit/SKILL.md +0 -87
  83. package/src/gdskills/bundled/skills/quality/pr/SKILL.md +0 -95
  84. package/src/gdskills/bundled/skills/quality/push/SKILL.md +0 -73
  85. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +0 -238
  86. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +0 -301
  87. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +0 -208
@@ -5,7 +5,8 @@ description: |
5
5
  Use when: reviewing code that will run under high concurrency or high traffic —
6
6
  race conditions, connection pool exhaustion, cache invalidation, missing indexes,
7
7
  unbounded queues, missing backpressure, retry storms, idempotency gaps,
8
- hot-path blocking I/O, and distributed systems anti-patterns.
8
+ hot-path blocking I/O, concurrent sessions sharing state files, lock files,
9
+ process fan-out, and distributed systems anti-patterns.
9
10
  Dispatched by review-orchestrator.
10
11
  NOT for: frontend re-render performance (review-performance), general N+1 queries
11
12
  (review-performance), clean code style (review-clean-code), or NestJS module structure
@@ -18,7 +19,7 @@ triggers:
18
19
  - "review distributed"
19
20
  metadata:
20
21
  author: "MrCipherSmith"
21
- version: "1.0.0"
22
+ version: "1.4.0"
22
23
  category: "review"
23
24
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
24
25
  license: "MIT"
@@ -26,9 +27,9 @@ license: "MIT"
26
27
 
27
28
  # Review: High-Load & Scalability
28
29
 
29
- Specialized reviewer for **code that will run under significant concurrent load**.
30
+ Specialized reviewer for **code that runs concurrently** — under request load, or as several sessions and child processes.
30
31
  Focuses on correctness under concurrency, resource contention, back-pressure, failure
31
- modes at scale, and distributed systems invariants — not general performance profiling. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
32
+ modes at scale, and distributed systems invariants — not general performance profiling. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history), and the read-only layer commands the orchestrator lists (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`, `keryx ctx rg|read`); it never writes in the reviewed tree.
32
33
 
33
34
  Reviews only changes introduced in the current branch (merge-base to HEAD).
34
35
 
@@ -38,11 +39,11 @@ Reviews only changes introduced in the current branch (merge-base to HEAD).
38
39
 
39
40
  ```
40
41
  High-Load Review Progress:
41
- - [ ] Step 1: Read Job Context (if provided) — understand expected load profile
42
+ - [ ] Step 1: Read Job Context (if provided) — load profile, or the concrete triggers
42
43
  - [ ] Step 2: Determine git scope (merge-base)
43
44
  - [ ] Step 3: Collect diff and changed file list
44
- - [ ] Step 4: Concurrency and race condition check
45
- - [ ] Step 5: Resource management check (connections, threads, file handles, memory)
45
+ - [ ] Step 4: CLI, TUI and multi-session concurrency (Part 0)
46
+ - [ ] Step 5: Concurrency and race conditions; resource management (connections, threads, file handles, memory)
46
47
  - [ ] Step 6: Caching and cache invalidation check
47
48
  - [ ] Step 7: Database access patterns under load
48
49
  - [ ] Step 8: Async processing and queue patterns
@@ -60,7 +61,7 @@ High-Load Review Progress:
60
61
  | `branch` | string | no | Branch to review. Defaults to current branch. |
61
62
  | `commit_range` | string | no | Explicit hash or range. Overrides merge-base detection. |
62
63
  | `context_doc` | string | no | Path to job context document. Read before reviewing to understand expected RPS, SLA, and load profile. |
63
- | `load_profile` | string | no | Optional hint: expected RPS, concurrent users, or traffic pattern. Adjusts severity of findings. |
64
+ | `load_profile` | string | no | Expected RPS, concurrent users or sessions, or traffic pattern, when a job context states it. Nothing fills it by default; without it see **No stated load** below. |
64
65
 
65
66
  ---
66
67
 
@@ -95,16 +96,17 @@ boundary is the trigger-and-outcome test.
95
96
 
96
97
  ### High-load laws
97
98
 
98
- 1. **Every finding states its failure mode: what breaks, and at what load.** "OOM
99
- at ~1k RPS", "pool exhausted at 500 concurrent users", "duplicate charge on the
100
- first retry". This is what shared law 1 asks of a load finding — a load level
101
- is the trigger.
99
+ 1. **Every finding states its failure mode: what breaks, and under what trigger.**
100
+ "OOM at ~1k RPS", "two sessions running `flow complete` lose one update",
101
+ "duplicate charge on the first retry". The trigger is a stated load level or a
102
+ concrete one the evidence shows — never an assumed traffic level.
102
103
  2. **A race condition on shared mutable state is never dismissed as unlikely.**
103
104
  "It probably won't happen in practice" is not an argument; races manifest
104
105
  unpredictably under load. Its *severity* still comes from its outcome — see the
105
106
  conditions table below — but it is never dropped for improbability.
106
- 3. **An unbounded resource that grows with request rate is never `minor`.**
107
- Connections, threads, queues, in-memory collections: under load it exhausts.
107
+ 3. **An unbounded resource names what grows it.** Connections, threads, queues,
108
+ in-memory collections, child processes: the finding names the input that grows
109
+ it (requests, sessions, files, flows, children); the table below sets the level.
108
110
  4. **Architecture opinions without a named pattern violation and a load-related
109
111
  failure mode are `info` only.** State the failure mode, not just that "it could
110
112
  be better".
@@ -113,6 +115,22 @@ boundary is the trigger-and-outcome test.
113
115
 
114
116
  ## Review Checklist
115
117
 
118
+ ### Part 0: CLI, TUI and Multi-Session Concurrency (check first)
119
+
120
+ For a CLI, a full-screen TUI, agent sessions and their child processes, where the
121
+ load is the number of sessions, files, flows or children rather than RPS. A
122
+ finding here cites that trigger; it needs no request handler and no load profile.
123
+
124
+ - [ ] Several sessions or processes sharing one checkout run the same command over the same state directory (e.g. `.metaproject/`) and nothing serialises them
125
+ - [ ] Read-modify-write of a shared JSON/JSONL state file with no lock and no write-to-temp-then-rename: the last writer drops the other's update, or a reader parses a half-written file
126
+ - [ ] JSONL appended from several processes in more than one write per record, so lines interleave
127
+ - [ ] Lock file created by check-then-create instead of an exclusive create (`wx`); released outside `finally`; no stale-lock recovery (holder PID or age), so a crashed holder blocks every later session; or recovery that can take a live holder's lock
128
+ - [ ] One child process, subagent or task spawned per file, flow, finding or input item with no concurrency bound
129
+ - [ ] Retry loop (spawn, lock acquire, a remote or network call) with no cap and no backoff
130
+ - [ ] Child stdout/stderr or a log accumulated whole in memory (string concatenation, array push) with no cap or ring buffer
131
+ - [ ] AbortController or timeout leaks: timer not cleared on success, a listener added to a long-lived signal per call, a child not killed when the signal aborts, a background task outliving its session
132
+ - [ ] Long-running server: per-connection state with no bound, or a broadcast to every socket with no backpressure
133
+
116
134
  ### Part A: Concurrency and Race Conditions
117
135
 
118
136
  #### A1. Shared Mutable State
@@ -122,32 +140,18 @@ boundary is the trigger-and-outcome test.
122
140
  - [ ] `Map` / `Set` / plain objects used as in-process caches mutated from concurrent async operations
123
141
  - [ ] NestJS `DEFAULT`-scoped (singleton) service holding per-request state (e.g., `this.currentUser = ...`)
124
142
 
125
- Flags:
126
- - Singleton service holding mutable per-request state — **blocker**
127
- - Read-modify-write on shared map/counter without atomicity — **blocker**
128
- - Module-level mutable variable mutated from async handlers — **major**
129
-
130
143
  #### A2. Double-Check and TOCTOU
131
144
 
132
145
  - [ ] Check-then-act patterns where the condition can change between check and action: `if (!exists) insert` without a unique constraint or lock
133
146
  - [ ] Optimistic upsert without conflict handling (`INSERT ... ON CONFLICT DO NOTHING` with no retry)
134
147
  - [ ] Token or resource validity checked before use but not at the moment of use (TOCTOU)
135
148
 
136
- Flags:
137
- - Check-then-act on a DB record with no uniqueness enforcement or lock — **blocker**
138
- - Token validity checked only at entry, not at point of use after a long async chain — **major**
139
-
140
149
  #### A3. Async/Await and Concurrency Primitives
141
150
 
142
151
  - [ ] `Promise.all` used with an unbounded array of promises (can spawn thousands of concurrent operations)
143
152
  - [ ] `for...of` with `await` inside where `Promise.all` would allow safe parallelism (sequential when parallel is intended)
144
153
  - [ ] Missing concurrency limit: N parallel jobs where N = input size (use a concurrency limiter / semaphore for unbounded inputs)
145
- - [ ] `async` function swallowing rejection via unhandled `.catch(() => {})` on a fire-and-forget
146
-
147
- Flags:
148
- - `Promise.all(items.map(...))` where `items` can be arbitrarily large — **major** (resource exhaustion)
149
- - Fire-and-forget async call with no error handling and no queue backing — **major**
150
- - Missing concurrency cap on parallel operations whose count scales with user input — **major**
154
+ - [ ] `async` function swallowing rejection via unhandled `.catch(() => {})` on a fire-and-forget, or a fire-and-forget call with no error handling and no queue backing
151
155
 
152
156
  ---
153
157
 
@@ -160,33 +164,18 @@ Flags:
160
164
  - [ ] Pool exhaustion handling: no timeout on `pool.connect()`, no error boundary — requests will hang silently
161
165
  - [ ] Connection opened in a function that may throw before `.release()` or `.end()` without a `finally` block
162
166
 
163
- Flags:
164
- - `new Pool()` / `new Client()` / `createConnection()` inside a request handler — **blocker**
165
- - No pool max size configured for a production service — **major**
166
- - Connection acquired without guaranteed release in finally — **major**
167
- - Pool timeout not configured (will queue indefinitely on exhaustion) — **minor**
168
-
169
167
  #### B2. File Handles and Streams
170
168
 
171
169
  - [ ] File opened with `fs.open` / `fs.createReadStream` without explicit close / destroy on error
172
170
  - [ ] Readable stream not consumed (memory grows indefinitely until GC or crash)
173
171
  - [ ] Large file read into memory at once (`fs.readFileSync` / `Buffer.concat` on unknown-size input) — use streams
174
172
 
175
- Flags:
176
- - File handle without guaranteed close — **major**
177
- - `readFileSync` or full `Buffer.concat` on potentially large/user-supplied files — **major**
178
- - Unhandled readable stream accumulating in memory — **major**
179
-
180
173
  #### B3. Memory and Object Allocation
181
174
 
182
- - [ ] Large objects allocated per-request that are not freed between requests
175
+ - [ ] Large objects allocated per-request that are not freed between requests, or allocated in a hot path where they could be pooled or reused
183
176
  - [ ] In-process cache (plain `Map`) with no eviction policy — grows unboundedly
184
177
  - [ ] Closure capturing a large object (e.g., full DB result set) in a long-lived data structure
185
178
 
186
- Flags:
187
- - In-process cache `Map` / `Record` with no TTL or max-size eviction — **major**
188
- - Per-request object allocation in a hot path that could be pooled or reused — **minor**
189
-
190
179
  ---
191
180
 
192
181
  ### Part C: Caching
@@ -198,30 +187,16 @@ Flags:
198
187
  - [ ] Cache key not namespaced — collision between tenants / environments
199
188
  - [ ] Caching a response that contains per-user data without scoping the key to the user
200
189
 
201
- Flags:
202
- - Cached response containing user-specific data with no user-scoped key — **blocker** (data leak)
203
- - Related cache entries not invalidated after a mutating operation — **major**
204
- - Missing cache key namespace in a multi-tenant or multi-environment system — **major**
205
- - TTL missing or set to a value that is clearly mismatched with data freshness requirements — **minor**
206
-
207
190
  #### C2. Cache Stampede
208
191
 
209
- - [ ] High-traffic key expires simultaneously for many callers — no lock-based or probabilistic early expiry to prevent stampede
192
+ - [ ] Hot key (the evidence shows many concurrent readers) expires simultaneously for many callers — no lock-based or probabilistic early expiry to prevent stampede
210
193
  - [ ] Thundering herd: cache miss triggers N concurrent DB reads for the same key with no deduplication (e.g., no mutex/semaphore on the first fetch)
211
194
 
212
- Flags:
213
- - Hot key (called >100 RPS) with no stampede protection — **major**
214
- - Cache miss firing N simultaneous DB queries with no in-flight deduplication — **major**
215
-
216
195
  #### C3. Cache Correctness
217
196
 
218
197
  - [ ] Mutable value stored in cache by reference (not a deep copy) — mutation after storage corrupts the cache
219
198
  - [ ] Cache key includes non-deterministic components (timestamp, random value, process ID)
220
199
 
221
- Flags:
222
- - Storing a mutable reference in cache (object not serialized/cloned) — **major**
223
- - Non-deterministic cache key — **major**
224
-
225
200
  ---
226
201
 
227
202
  ### Part D: Database Access Under Load
@@ -232,21 +207,12 @@ Flags:
232
207
  - [ ] JOIN on a column that lacks an index on at least one side
233
208
  - [ ] Unique constraint missing on a column used in uniqueness checks
234
209
 
235
- Flags:
236
- - `WHERE` / `ORDER BY` on an un-indexed column on a high-traffic table — **major**
237
- - Missing unique constraint where the application relies on uniqueness — **blocker**
238
-
239
210
  #### D2. Lock Contention
240
211
 
241
212
  - [ ] `SELECT ... FOR UPDATE` on a wide row range — locks more rows than needed
242
213
  - [ ] Transaction holding a lock while performing external I/O (HTTP call, file read) — lock held far too long
243
214
  - [ ] Nested transactions with locks — can deadlock under concurrent writers
244
- - [ ] Long-running migration with a full-table lock on a live, high-traffic table
245
-
246
- Flags:
247
- - External I/O (HTTP, file) inside a database transaction — **blocker**
248
- - `SELECT ... FOR UPDATE` with no LIMIT on a high-traffic table — **major**
249
- - Schema migration adding NOT NULL column without a default on a live table — **major**
215
+ - [ ] Long-running migration with a full-table lock on a live table, or adding a NOT NULL column without a default
250
216
 
251
217
  #### D3. N+1 and Unbounded Queries
252
218
 
@@ -254,21 +220,12 @@ Flags:
254
220
  - [ ] `findAll()` / `SELECT *` on a large table with no LIMIT/pagination
255
221
  - [ ] Fetching full entity to check a single field
256
222
 
257
- Flags:
258
- - N+1 in a hot path — **major** (also flagged by `review-performance`, noted here for load context)
259
- - Unbounded `findAll()` on a table that grows with usage — **major**
260
- - Fetching full row just to read one column — **minor**
261
-
262
223
  #### D4. Connection and Transaction Hygiene
263
224
 
264
225
  - [ ] Transaction started but no explicit commit / rollback on all code paths (leak on exception)
265
226
  - [ ] Long-lived transaction (spans multiple user interactions or HTTP calls)
266
227
  - [ ] Mixing read replicas and write primary within the same business operation without awareness of replication lag
267
228
 
268
- Flags:
269
- - Transaction with no guaranteed commit/rollback on exception path — **major**
270
- - Replication lag not accounted for (read-your-writes guarantee assumed on replica) — **major**
271
-
272
229
  ---
273
230
 
274
231
  ### Part E: Async Processing and Queues
@@ -279,29 +236,17 @@ Flags:
279
236
  - [ ] Consumer not acknowledging/nacking messages — messages redeliver indefinitely on crash
280
237
  - [ ] Batch consumer with no upper bound on batch size — single batch can take arbitrarily long
281
238
 
282
- Flags:
283
- - Unbounded in-memory queue / channel — **blocker**
284
- - Message consumer missing ack/nack — **major**
285
- - Batch size not capped — **major**
286
-
287
239
  #### E2. Dead Letter and Poison Pills
288
240
 
289
241
  - [ ] No dead-letter queue for failed messages — poison pills block the consumer indefinitely
290
242
  - [ ] Retry loop with no maximum retry count — failed message retried forever
291
243
  - [ ] Consumer crashing on a single malformed message due to missing error handling around deserialization
292
244
 
293
- Flags:
294
- - No DLQ or max retry limit on a message consumer — **major**
295
- - Deserialization error crashing the consumer process — **major**
296
-
297
245
  #### E3. Ordering Guarantees
298
246
 
299
247
  - [ ] Code assumes FIFO delivery on a queue that does not guarantee ordering (e.g., SQS standard)
300
248
  - [ ] Parallel consumers writing to shared state where order matters
301
249
 
302
- Flags:
303
- - FIFO assumption on an at-least-once / unordered queue — **major**
304
-
305
250
  ---
306
251
 
307
252
  ### Part F: Retry, Timeout, and Circuit Breaker
@@ -313,30 +258,16 @@ Flags:
313
258
  - [ ] No maximum retry count — code retries indefinitely
314
259
  - [ ] Missing jitter on exponential backoff — synchronized retries cause thundering herd
315
260
 
316
- Flags:
317
- - Non-idempotent write retried without idempotency key — **blocker** (data integrity)
318
- - Fixed delay retry or no backoff — **major**
319
- - No max retry count — **major**
320
- - Exponential backoff without jitter — **minor**
321
-
322
261
  #### F2. Timeouts
323
262
 
324
263
  - [ ] HTTP client / DB call / queue operation with no timeout configured
325
264
  - [ ] Single timeout for the full chain (outer timeout too long relative to the number of downstream calls)
326
265
  - [ ] `setTimeout` as a timeout substitute for async operations that do not stop when the timer fires
327
266
 
328
- Flags:
329
- - External call with no timeout — **major**
330
- - Using `setTimeout` as a "give up" timer without actually canceling the operation — **minor**
331
-
332
267
  #### F3. Circuit Breaker
333
268
 
334
269
  - [ ] Repeated calls to a known-failing downstream without a circuit breaker — floods the downstream and starves the thread pool
335
- - [ ] Fallback returning stale/empty data not documented as intentional degradation
336
-
337
- Flags:
338
- - Unbounded retries to a failing downstream without circuit breaker — **major**
339
- - No fallback or graceful degradation when downstream is unavailable — **minor**
270
+ - [ ] No fallback or graceful degradation when the downstream is unavailable, or a fallback returning stale/empty data not documented as intentional degradation
340
271
 
341
272
  ---
342
273
 
@@ -348,31 +279,18 @@ Flags:
348
279
  - [ ] API endpoint that creates a resource not accepting or generating an idempotency key
349
280
  - [ ] Distributed cron/scheduled job running on multiple instances simultaneously with no distributed lock
350
281
 
351
- Flags:
352
- - Event handler with no deduplication and non-idempotent side effects — **blocker**
353
- - Distributed cron with no leader election or distributed lock — **blocker**
354
- - Resource creation endpoint with no idempotency key support — **major**
355
-
356
282
  #### G2. Distributed Consistency
357
283
 
358
284
  - [ ] Assumption that two sequential operations form an atomic unit without a transaction or saga
359
285
  - [ ] Cross-service write sequence with no compensation logic on partial failure
360
286
  - [ ] Relying on eventual consistency while assuming immediate consistency (reading from cache/replica right after writing)
361
287
 
362
- Flags:
363
- - Multi-step cross-service operation with no rollback / saga — **major**
364
- - Assumed immediate consistency where eventual consistency is the actual guarantee — **major**
365
-
366
288
  #### G3. Clock and ID Assumptions
367
289
 
368
290
  - [ ] Using `Date.now()` or `new Date()` for ordering events across distributed nodes — clocks drift
369
291
  - [ ] Auto-increment integer IDs expected to be globally unique across sharded databases
370
292
  - [ ] UUID v1 (time-based, exposable MAC address) used where UUID v4 (random) is safer
371
293
 
372
- Flags:
373
- - Event ordering based on wall-clock time in a distributed context — **major**
374
- - Assumption of globally unique sequential IDs across shards — **major**
375
-
376
294
  ---
377
295
 
378
296
  ## Scope Boundaries
@@ -380,6 +298,7 @@ Flags:
380
298
  | Concern | This skill | Use instead |
381
299
  |---------|-----------|-------------|
382
300
  | Race conditions, shared mutable state, concurrent writes | YES | — |
301
+ | Concurrent sessions, shared state-file writes, lock files, child fan-out | YES | — |
383
302
  | Connection pool exhaustion, resource leaks | YES | — |
384
303
  | Cache invalidation, cache stampede, stale reads | YES | — |
385
304
  | Lock contention, long transactions, missing indexes | YES | — |
@@ -433,28 +352,29 @@ observation is theatre, not rigour.
433
352
  - **Severity**: blocker | major | minor | info
434
353
  - **File**: path/to/file.ts:line
435
354
  - **Pattern**: Concurrency A1 — Shared Mutable State | Resource B1 — Connection Pool | etc.
436
- - **Failure mode**: what specifically breaks under load and at what scale
355
+ - **Failure mode** (mandatory): what breaks and the trigger that breaks it (OOM at 1k RPS, a lost `flow.json` update from two sessions, duplicate charges on retry)
437
356
  - **Fix**: concrete change with reference pattern (exponential backoff, connection pool, distributed lock, etc.)
438
357
  - **Patch** (optional): unified diff
439
358
  ```
440
359
 
441
- The **Failure mode** line is mandatory for this reviewer — every finding must state the load-related consequence (OOM at 1k RPS, connection exhaustion at 500 concurrent users, duplicate charges on retry, etc.).
442
-
443
360
  Severity comes from **Severity (canonical)** in `review-orchestrator/SKILL.md`.
444
361
  This reviewer keeps no table of its own; what follows is where its recurring
445
362
  conditions land under that rubric, not a second rubric.
446
363
 
364
+ Each row names the condition and the evidence the canonical level needs; without
365
+ that evidence the finding drops to the row's fallback level, and without a concrete trigger it is `info`.
366
+
447
367
  | Condition | Severity | Why, under the canonical rubric |
448
368
  |---|---|---|
449
- | Race condition on shared mutable state | `blocker` **if** the interleaving can corrupt or lose data; otherwise `major` | Same wording as `review-logic`, deliberately: the outcome decides, not the word "race" |
450
- | Non-idempotent retry of an operation with side effects | `blocker` | A retried write duplicates or corrupts persisted state |
451
- | Unbounded in-memory queue or collection growing with request rate | `blocker` | OOM is a crash; state the rate that reaches it |
452
- | Distributed cron or job with no lock | `blocker` | Concurrent runs duplicate side effects |
453
- | Transaction held open across external I/O | `blocker` | Pool exhaustion takes the service down |
454
- | Blocking I/O on a thread or fiber shared with the event loop | `major` | Named trigger: a request served on that thread. Named outcome: every concurrent request on it stalls behind the one slow call. Restored — the per-reviewer rubric that carried this floor was deleted and the conditions table did not pick it up, leaving the skill's own description advertising hot-path blocking I/O with no rule assigning it a severity |
455
- | Connection without a pool; unbounded `Promise.all`; missing retry timeout or backoff; cache stampede on a hot key; N+1 on a hot path; long transaction; missing DLQ | `major` | Named trigger (a load level) and named outcome, but the outcome is degradation, not one of the four shapes |
456
- | Backoff without jitter; TTL misconfigured; per-request allocation on a hot path; full-row fetch for one field | `minor` | Correct under load; the cost is to whoever tunes it next |
457
- | Architectural note with no failure mode at a stated load | `info` | Shared law 1 |
369
+ | Race condition on shared mutable state, including a lost update to a shared state file | `blocker` **if** the interleaving can corrupt or lose data; otherwise `major` | Same wording as `review-logic`, deliberately: the outcome decides, not the word "race" |
370
+ | Check-then-act with no unique constraint or lock; non-idempotent retry; event handler with no deduplication; scheduled job or session work with no lock | `blocker` when the evidence shows the duplicate or lost write persisted (shape 2); otherwise `major` | The concurrent or retried path must exist in the code, not be assumed |
371
+ | Per-user data cached under a key not scoped to the user | `blocker` when the evidence shows a second user served the first user's entry (shape 2; shape 3 too when an attacker can steer it); `major` when a second user's request path to the key is named (trigger) but serving the wrong entry is not shown; `info` when no second reader's path is named | Blocker needs both readers shown; major needs the second reader's path named |
372
+ | `NOT NULL` column added without a default to a populated table, or a migration that fails against existing rows | `major`; `blocker` only where truncation or data loss is shown | Same rating as `review-backend` |
373
+ | Query filtering or ordering on a column with no index on a table shown to be large | `major` with the table size named; `minor` when the schema is shown but the size is not; `info` when the schema is not in the payload | Same rule as `review-performance`: reading the schema settles it |
374
+ | Unbounded queue, collection, buffer or fan-out | `blocker` only when the evidence shows the growth reaching exhaustion (shape 1); otherwise `major` with what grows it named | Law 3: the input that grows it is the trigger |
375
+ | External I/O inside a transaction or under a lock; connection without a pool; unbounded `Promise.all`; retry without cap or backoff; missing timeout; stale lock with no recovery; stampede on a hot key; N+1 on a hot path; long transaction; missing DLQ; blocking I/O on a thread or the event loop other work shares | `major` when the finding names the trigger and the stall, exhaustion or hang it causes; `blocker` only if it shows the crash | Degradation is not one of the four shapes |
376
+ | Backoff without jitter; TTL misconfigured; per-request allocation on a hot path; full-row fetch for one field; undocumented fallback | `minor` | Correct under load; the cost is to whoever tunes it next |
377
+ | Architectural note with no failure mode under a concrete trigger | `info` | Shared law 1 |
458
378
 
459
379
  ---
460
380
 
@@ -472,7 +392,7 @@ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
472
392
  - Parent ref: `<PARENT>`
473
393
  - Merge-base: `<BASE_SHA>`
474
394
  - Scope mode: `<default-with-uncommitted | explicit-hash-range>`
475
- - Load profile: `<from context doc or "not provided">`
395
+ - Load profile: `<from context doc, or "not provided" + the concrete triggers used>`
476
396
  - Changed files reviewed: <N>
477
397
 
478
398
  ### Summary
@@ -483,6 +403,9 @@ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
483
403
 
484
404
  ### Findings
485
405
 
406
+ #### CLI / Multi-Session Concurrency
407
+ <[F-NNN] findings or "None detected.">
408
+
486
409
  #### Concurrency & Race Conditions
487
410
  <[F-NNN] findings or "None detected.">
488
411
 
@@ -526,7 +449,13 @@ If provided and the file exists, read the context document before reviewing. Use
526
449
  - Avoid flagging documented acceptable degradation paths as violations
527
450
 
528
451
  If absent, proceed normally — context is optional and non-blocking.
529
- When load profile is unknown, note in findings that severity assumes "moderate-to-high traffic".
452
+
453
+ **No stated load.** Without a `load_profile` or a context document, do not assume
454
+ a traffic level. Name the concrete trigger the code shows instead: N concurrent
455
+ sessions on one checkout, a loop over every file or flow, a fan-out of children,
456
+ a retry after a failed spawn. Such a finding is rated by the conditions table like
457
+ any other — it is not `info` merely because no load was stated; it is `info` only
458
+ when no concrete trigger can be named.
530
459
 
531
460
  ---
532
461
 
@@ -535,9 +464,9 @@ When load profile is unknown, note in findings that severity assumes "moderate-t
535
464
  | Rationalization | Why it is wrong |
536
465
  |----------------|-----------------|
537
466
  | "We don't have high traffic yet, so this is fine" | Correctness under concurrency does not depend on current traffic; a race condition exists at 1 RPS too |
538
- | "The connection pool defaults are probably fine" | Default pools (5–10 connections) queue at a few hundred concurrent users; always verify |
467
+ | "The connection pool defaults are probably fine" | Default pools (5–10 connections) queue under concurrent use; verify against the trigger the code shows (**No stated load**) |
539
468
  | "Retrying this is safe because it's idempotent" | Verify it actually is — most `POST` endpoints are not idempotent by default |
540
- | "We'll add a circuit breaker later" | "Later" is when the downstream is down; flag as minor now to create the record |
469
+ | "We'll add a circuit breaker later" | "Later" is when the downstream is down; flag it now, at the level the conditions table gives |
541
470
  | "The cache invalidation is handled somewhere else" | "Somewhere else" means it will be missed — flag where the write happens with no corresponding invalidation |
542
471
  | "This runs in a queue so race conditions don't apply" | Multiple consumer instances still race on shared DB rows unless explicitly serialized |
543
472
  | "Using Date.now() for ordering is fine" | Clock skew across nodes makes wall-clock ordering unreliable; use logical clocks or DB sequences |
@@ -17,7 +17,7 @@ triggers:
17
17
  - "check this for bugs"
18
18
  metadata:
19
19
  author: "MrCipherSmith"
20
- version: "1.0.0"
20
+ version: "1.1.0"
21
21
  category: "review"
22
22
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
23
23
  license: "MIT"
@@ -26,8 +26,8 @@ license: "MIT"
26
26
  # Review Logic
27
27
 
28
28
  Specialized reviewer for **logic correctness and algorithmic soundness**.
29
- Inherits from the original `code-ai-review` + `code-learned-review` correctness phases
30
- and unifies them into a single focused pass. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
29
+ Inherits from the correctness phases of two earlier profiles (the strict AI review one, since removed, and `code-learned-review`)
30
+ and unifies them into a single focused pass. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history), and the read-only layer commands the orchestrator lists (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`, `keryx ctx rg|read`); it never writes in the reviewed tree.
31
31
 
32
32
  This reviewer does not care about formatting, naming, or architecture opinions.
33
33
  Every finding must describe an observable, reproducible defect or a spec gap.
@@ -187,7 +187,7 @@ earlier review round, because there the finding is recorded as closed and is not
187
187
  | Performance profiling (bundle size, query cost, render cycles) | NO | `review-performance` |
188
188
  | Style, naming, import organization | NO | `review-style` |
189
189
  | Layer violations, SOLID, module coupling | NO | `review-architecture` |
190
- | React/MobX-specific store patterns | NO | `code-mobx-store-review` |
190
+ | React/MobX-specific store patterns | NO | `review-frontend` |
191
191
 
192
192
  ---
193
193
 
@@ -129,16 +129,13 @@ review: it is a fact about the review, not about the diff.
129
129
 
130
130
  ## Skills present only when installed
131
131
 
132
- SKILL.md names five skills that the `minimal` and `recommended` profiles do not
132
+ SKILL.md names two skills that the `minimal` and `recommended` profiles do not
133
133
  install — they are in the `full` profile only (`src/gdskills/catalog.ts`):
134
134
 
135
135
  | Skill | Reached through |
136
136
  |---|---|
137
137
  | `review-pr-feedback` | "A round never answers a pull request another skill is answering" |
138
- | `code-ai-review` | `--code-ai`, `--legacy-profiles` |
139
138
  | `code-learned-review` | `--learned`, `--legacy-profiles` |
140
- | `code-style-review` | `--code-style`, `--legacy-profiles` |
141
- | `code-mobx-store-review` | `--mobx-store`, `--legacy-profiles` |
142
139
 
143
140
  Whether one is **present** is read from `keryx review reviewers --json`, and
144
141
  the answer depends on the inventory's `bundledSource`, which says which tree
@@ -153,12 +150,12 @@ which describes what keryx ships, not what this project has.
153
150
 
154
151
  `"package"` means the project has no `.metaproject/skills/gdskills/review`
155
152
  directory at all — a worktree or clone whose `.metaproject/` holds only data,
156
- for instance. The inventory then lists every review skill in the package, all
157
- five above included, whatever profile the project would install, and each
153
+ for instance. The inventory then lists every review skill in the package, both
154
+ above included, whatever profile the project would install, and each
158
155
  entry's `path` is relative to the keryx package (`src/gdskills/bundled/…`), not
159
156
  to the project. Nothing is installed in this project in that state, so a name
160
157
  being in the list is not evidence that it is, and a name missing from it is not
161
- what `not-installed` means either. Decide each of the five by what can actually
158
+ what `not-installed` means either. Decide each of the two by what can actually
162
159
  be dispatched: if the runtime has an agent type of that exact name ("Agent
163
160
  Runtime Compatibility" in SKILL.md), the skill is usable and is dispatched as
164
161
  any other reviewer; if it does not, record `not-installed` with the command
@@ -187,15 +184,12 @@ Adding one. The commands are `keryx skills install` in its two forms
187
184
  (`src/commands/skills.ts`):
188
185
 
189
186
  ```bash
190
- # everything the full profile holds, including all five
187
+ # everything the full profile holds, including both
191
188
  keryx skills install --profile full
192
189
 
193
- # manifest installer: the generic review module only — review-pr-feedback,
194
- # code-ai-review, code-learned-review and code-style-review among its skills
190
+ # manifest installer: the generic review module only — review-pr-feedback
191
+ # and code-learned-review among its skills
195
192
  keryx skills install --profile core --target keryx-shell
196
-
197
- # manifest installer: add the MobX component to a profile — code-mobx-store-review
198
- keryx skills install --profile <manifest-profile> --with capability:mobx --target keryx-shell
199
193
  ```
200
194
 
201
195
  What those flags do and do not reach:
@@ -206,7 +200,7 @@ What those flags do and do not reach:
206
200
  - `--with <id>` is repeatable and takes a **component** id from
207
201
  `install-manifest.json` (`capability:mobx`, `framework:react`, …). It has no
208
202
  single-skill form: the smallest unit the manifest installs is a module.
209
- `review-pr-feedback` and the three `code-*` profile reviewers live in module
203
+ `review-pr-feedback` and `code-learned-review` live in module
210
204
  `review-core-skills`, which belongs to no component and arrives through a
211
205
  profile that lists it (`core`, `full`).
212
206
  - Add `--dry-run` first to read the plan. A file already on disk that the
@@ -741,6 +735,16 @@ as a separate review. Pass `--brief` output verbatim into the scope-B dispatch:
741
735
  the code rejection is the enforcement, but a reviewer told afterwards has already
742
736
  spent the round producing findings that will all be refused.
743
737
 
738
+ **A missing input is replaced in the dispatch, never left blank.** No linked
739
+ flow means no frozen acceptance criteria: put the PR body or issue text in the
740
+ scope-B payload, labelled as the criteria it stands in for; with neither, write
741
+ `acceptance criteria: none supplied`, and the reviewer's summary says it judged
742
+ behaviour against the diff alone. A FIX slice in a `delta` round gets no graph
743
+ blast-radius set: its radius is the names the fix changed
744
+ (`review_context.scope.files`, see the `delta` round below), and the reviewer
745
+ checks the fix lines for regressions of the behaviour they touch before it
746
+ disposes each attached finding.
747
+
744
748
  `class_scope` on a scope-B finding names the **caller that breaks**, not the
745
749
  changed line, because that is the site a human has to look at.
746
750
 
@@ -1037,16 +1041,10 @@ Before any mass dispatch run `keryx review dispatch-check --payload <file> --man
1037
1041
 
1038
1042
  ```text
1039
1043
  Optional legacy/profile reviewers:
1040
- - code-ai-review: available via --code-ai or --legacy-profiles
1041
1044
  - code-learned-review: available via --learned or --legacy-profiles
1042
- - code-style-review: available via --code-style or --legacy-profiles
1043
- - code-mobx-store-review: auto-suggest when *.store.ts or MobX patterns are present; available via --mobx-store or --legacy-profiles
1044
1045
 
1045
1046
  Skipped reviewers:
1046
- - code-ai-review: profile reviewer, not selected unless --code-ai/--legacy-profiles
1047
1047
  - code-learned-review: profile reviewer, not selected unless --learned/--legacy-profiles
1048
- - code-style-review: legacy style profile, not selected unless --code-style/--legacy-profiles
1049
- - code-mobx-store-review: not selected unless --mobx-store/--legacy-profiles or MobX store files are detected
1050
1048
  ```
1051
1049
 
1052
1050
  ## Token and context budget