@mrciphersmith/keryx 0.4.27 → 0.4.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +2 -2
  2. package/dist/cli.js +105640 -105242
  3. package/dist/core.js +24 -200
  4. package/dist/keryx-general-worker-entry.js +355 -418
  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 +4 -26
  8. package/src/gdskills/bundled/rules/core/clean-architecture.mdc +25 -153
  9. package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +1 -2
  10. package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +1 -0
  11. package/src/gdskills/bundled/rules/core/definition-of-done.mdc +0 -1
  12. package/src/gdskills/bundled/rules/core/error-handling.mdc +57 -108
  13. package/src/gdskills/bundled/rules/core/implementation-doc-mandate.mdc +4 -5
  14. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +8 -8
  15. package/src/gdskills/bundled/rules/core/skill-authoring.mdc +190 -0
  16. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +12 -10
  17. package/src/gdskills/bundled/rules/core/solid-principles.mdc +48 -123
  18. package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +1 -1
  19. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +12 -21
  20. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +3 -3
  21. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +1 -1
  22. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
  23. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +2 -2
  24. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +1 -1
  25. package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +1 -1
  26. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +1 -1
  27. package/src/gdskills/bundled/skills/planning/interview/SKILL.md +3 -4
  28. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +1 -1
  29. package/src/gdskills/bundled/skills/quality/git-publish/SKILL.md +60 -0
  30. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +1 -1
  31. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +1 -1
  32. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +3 -3
  33. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +6 -6
  34. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +23 -25
  35. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +100 -421
  36. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +2 -2
  37. package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +6 -6
  38. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -1
  39. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +36 -33
  40. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +1 -1
  41. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +63 -134
  42. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +4 -5
  43. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +18 -20
  44. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +12 -18
  45. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +2 -2
  46. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +2 -10
  47. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +35 -35
  48. package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +4 -5
  49. package/src/gdskills/bundled/skills/review/review-premise/SKILL.md +2 -2
  50. package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +2 -4
  51. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +13 -14
  52. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +41 -44
  53. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +10 -10
  54. package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +10 -11
  55. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +5 -5
  56. package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
  57. package/src/gdskills/bundled/stacks/csharp-dotnet/rules/patterns.mdc +4 -3
  58. package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/coding-style.mdc +3 -3
  59. package/src/gdskills/bundled/stacks/mobx/agent-refs.json +1 -1
  60. package/src/gdskills/bundled/stacks/mobx/governance/scout.json +2 -2
  61. package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/SKILL.md +2 -2
  62. package/src/gdskills/bundled/stacks/ruby-rails/rules/coding-style.mdc +4 -4
  63. package/src/gdskills/bundled/stacks/vue/governance/scout.json +1 -1
  64. package/src/gdskills/contracts/review-finding.schema.json +2 -2
  65. package/src/gdskills/bundled/rules/core/code-review-ai-assistant.mdc +0 -49
  66. package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +0 -198
  67. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +0 -177
  68. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +0 -414
  69. package/src/gdskills/bundled/skills/orchestration/job-documenter/input-contract.schema.json +0 -55
  70. package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json +0 -58
  71. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +0 -209
  72. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +0 -209
  73. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +0 -208
  74. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +0 -255
  75. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +0 -255
  76. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +0 -254
  77. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +0 -209
  78. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +0 -209
  79. package/src/gdskills/bundled/skills/planning/planner/SKILL.md +0 -208
  80. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +0 -171
  81. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +0 -171
  82. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +0 -170
  83. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +0 -184
  84. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +0 -184
  85. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +0 -183
  86. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +0 -249
  87. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +0 -249
  88. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +0 -248
  89. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +0 -199
  90. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +0 -199
  91. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +0 -198
  92. package/src/gdskills/bundled/skills/quality/commit/SKILL.md +0 -87
  93. package/src/gdskills/bundled/skills/quality/pr/SKILL.md +0 -95
  94. package/src/gdskills/bundled/skills/quality/push/SKILL.md +0 -73
  95. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +0 -238
  96. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +0 -301
  97. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +0 -208
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: git-publish
3
+ description: "Use when committing changes, pushing a branch to the remote, or opening a pull request: commit, push and PR rules for staging, hooks, upstream and force. NOT for documenting a pull request that is already open, or its linked issue (use `pr-issue-documenter`)."
4
+ triggers:
5
+ - "commit changes"
6
+ - "git commit"
7
+ - "conventional commit"
8
+ - "Commit this"
9
+ - "push branch"
10
+ - "git push"
11
+ - "publish branch"
12
+ - "Push to remote"
13
+ - "open PR"
14
+ - "create pull request"
15
+ - "draft PR"
16
+ - "Open pull request"
17
+ metadata:
18
+ author: "MrCipherSmith"
19
+ version: "1.0.0"
20
+ category: "quality"
21
+ compatible_harnesses: "cursor,codex,zed,opencode,claude"
22
+ license: "MIT"
23
+ ---
24
+
25
+ # Git publishing rules
26
+
27
+ Apply to every commit, push and pull request you create.
28
+
29
+ ## Commit
30
+
31
+ - Stage explicit paths that belong to the change. Never `git add -A`, `--all` or `.`, never `commit -a`:
32
+ other agents or the user may have unrelated edits in the same tree.
33
+ - Never stage `.env`, credentials, keys or large binaries. Ask before staging an untracked file that
34
+ does not look like part of this change.
35
+ - Subject `<type>(<scope>): <description>`, English, at most 72 characters, naming the change.
36
+ - No `Co-Authored-By` or "Generated with" trailers.
37
+ - Never `--no-verify`. If a hook fails, fix the cause, re-stage and make a new commit; amend only when
38
+ the user asked for an amend.
39
+
40
+ ## Push
41
+
42
+ - Ask first if the tree has uncommitted changes, or if the branch is `main`/`master`.
43
+ - A branch without an upstream is pushed with `git push -u origin <branch>`.
44
+ - Never force (`--force`, `--force-with-lease`, `+ref`) unless the user said "force push" in this
45
+ conversation. A rejected push is rebased onto the remote and pushed normally, or handed back.
46
+
47
+ ## Pull request
48
+
49
+ - Push the branch with `-u` before `gh pr create`; never open a PR from `main`/`master` or over a
50
+ dirty tree without asking.
51
+ - Title under 70 characters describing the whole branch. Body covers every commit in
52
+ `<base>..HEAD`: Summary, Changes, Test plan.
53
+ - Reference only issues the branch or its commits actually link; never guess a `Closes #N`.
54
+ - Ask before opening a PR of 10 or more commits.
55
+ - Report the PR URL.
56
+
57
+ ## Verification
58
+
59
+ - Done when `git show --stat HEAD` lists exactly the intended files.
60
+ - Done when `git log @{upstream}..HEAD` is empty.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pr-issue-documenter
3
- description: "Use when documenting PR changes, adding a PR description, creating a linked issue for a PR, or updating an existing issue body. NOT for opening the pull request in the first place (use `pr`)."
3
+ description: "Use when documenting PR changes, adding a PR description, creating a linked issue for a PR, or updating an existing issue body. NOT for opening the pull request in the first place (use `git-publish`)."
4
4
  triggers:
5
5
  - "document PR"
6
6
  - "PR description"
@@ -90,7 +90,7 @@ not a hardcoded `cat`/`ls`/`find` invocation).
90
90
  - Fixture/factory patterns (how test data is created)
91
91
  - Before/after hook usage
92
92
 
93
- **1.2b Load test-convention rules, project first.** Read the testing rules the task touches (`testing-conventions`, `tdd-workflow`, and any rule the task names) in this order: `.metaproject/rules/project/<rule>.mdc` first, then `.metaproject/rules/core/<rule>.mdc`. A project rule with the same name replaces the bundled one; a project rule with a different name adds to it. Take the list from `workspace.resolved_context_file` when the task carries one, otherwise run `keryx skills resolve-context --for test --files <target_files, comma-joined> --task-text '<task description, each ' written as '\''>' --out <project-relative path>` (`--task-text` lets a declared keyword promote a document); read its `must_read` entries in full and record each in `project_context_applied` with the resolver's `sha256`. An entry with reason `condition:glob:<g>` or `condition:keyword:<k>` was promoted by a declared condition: read its anchored section, and its item needs the `path`, the `sha256` of the whole file as pinned, the `anchor` exactly as declared, a `summary` (at least 40 characters, in your own words, naming at least three distinct words of five or more letters from that section) and `how` `read` or `followed`, never `n/a`. Where a project test convention and a bundled one conflict, the project wins. A project skill only supplements these steps; it never replaces this skill.
93
+ **1.2b Load test-convention rules, project first.** Read the testing rules the task touches (`tdd-workflow`, the installed stack pack's `testing.mdc`, and any rule the task names) in this order: `.metaproject/rules/project/<rule>.mdc` first, then `.metaproject/rules/core/<rule>.mdc`. A project rule with the same name replaces the bundled one; a project rule with a different name adds to it. Take the list from `workspace.resolved_context_file` when the task carries one, otherwise run `keryx skills resolve-context --for test --files <target_files, comma-joined> --task-text '<task description, each ' written as '\''>' --out <project-relative path>` (`--task-text` lets a declared keyword promote a document); read its `must_read` entries in full and record each in `project_context_applied` with the resolver's `sha256`. An entry with reason `condition:glob:<g>` or `condition:keyword:<k>` was promoted by a declared condition: read its anchored section, and its item needs the `path`, the `sha256` of the whole file as pinned, the `anchor` exactly as declared, a `summary` (at least 40 characters, in your own words, naming at least three distinct words of five or more letters from that section) and `how` `read` or `followed`, never `n/a`. Where a project test convention and a bundled one conflict, the project wins. A project skill only supplements these steps; it never replaces this skill.
94
94
 
95
95
  **1.3 Identify test file naming:**
96
96
  - Pattern (`<component>.test.ts`, `<service>.spec.ts`, `test_<module>.py`) and location (co-located, or `__tests__`/`tests/`)
@@ -214,9 +214,9 @@ following `code-review-learned-profile.mdc`. It has no opinions of its own.
214
214
  | Concern | This skill | Use instead |
215
215
  | -------------------------------------------------------------- | ---------- | ------------------------ |
216
216
  | This project's accumulated review conventions | ✅ YES | — |
217
- | General AI review (broader quality, performance, UX) | ❌ NO | `code-ai-review` |
218
- | MobX store internals (actions, computed, reactions) | ❌ NO | `code-mobx-store-review` |
219
- | Pure style/naming/architecture pattern audit | ❌ NO | `code-style-review` |
217
+ | General review (broader quality, performance, UX) | ❌ NO | `review-orchestrator` |
218
+ | MobX store internals (actions, computed, reactions) | ❌ NO | `review-frontend` |
219
+ | Pure style/naming/architecture pattern audit | ❌ NO | `review-style` |
220
220
  | Logic correctness with no learned lesson behind it | ❌ NO | `review-logic` |
221
221
 
222
222
  ---
@@ -16,7 +16,7 @@ triggers:
16
16
  - "check layers"
17
17
  metadata:
18
18
  author: "MrCipherSmith"
19
- version: "1.0.0"
19
+ version: "1.2.0"
20
20
  category: "review"
21
21
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
22
22
  license: "MIT"
@@ -197,7 +197,7 @@ Focus on **SRP** and **DIP** — the two most commonly violated in practice.
197
197
  | Security vulnerabilities (injection, auth bypass) | NO | `review-security-code` |
198
198
  | Style, naming, import order | NO | `review-style` |
199
199
  | Performance (bundle size, render cost, query plan) | NO | `review-performance` |
200
- | MobX store internals deep-dive | surface violations only | `code-mobx-store-review` for full store audit |
200
+ | MobX store internals deep-dive | surface violations only | `review-frontend` for full store audit |
201
201
 
202
202
  ---
203
203
 
@@ -257,13 +257,13 @@ conditions land under that rubric, not a second rubric.
257
257
  |---|---|---|
258
258
  | Circular dependency that fails at runtime (an import resolves to `undefined` on a path the change reaches) | `blocker` | Crash |
259
259
  | Module scope mismatch that produces wrong data across requests | `blocker` | Data corruption |
260
- | Layer violation — API/IO call in a component, business logic in a controller, domain importing infrastructure | `major` | A named trigger and a named outcome, but structural: not a crash, data loss, vulnerability, or missing acceptance criterion. Identical to `review-frontend`'s rule for the same condition |
261
- | Broken DIP; cross-module coupling with a named consequence | `major` | Same |
260
+ | Layer violation — API/IO call in a component, business logic in a controller, domain importing infrastructure | `minor` — `major` only when a concrete defect it causes is named (trigger and outcome) or a stated project rule makes it one | Structural cost lands on the next editor. Identical to `review-frontend` and `review-backend` for the same condition |
261
+ | Broken DIP; cross-module coupling | `minor` — `major` under the same condition | Same |
262
262
  | SRP smell with a clear separation path; ISP violation; a component reading several raw observables instead of a computed | `minor` | The code is correct; the cost is to whoever restructures it next |
263
263
  | Architectural opinion with no named violation | `info` | Shared laws 1 and 2 |
264
264
 
265
- A circular import that resolves cleanly is not a `blocker` — it is `minor`, and
266
- if the concern is purely readability it belongs to `review-style`.
265
+ This lens owns circular imports: one that resolves cleanly is `minor`, not a
266
+ `blocker`; `review-style` and `review-clean-code` defer to this rating.
267
267
 
268
268
  ## Iron Laws
269
269
 
@@ -15,7 +15,7 @@ triggers:
15
15
  - "review NestJS"
16
16
  metadata:
17
17
  author: "MrCipherSmith"
18
- version: "1.0.0"
18
+ version: "1.3.0"
19
19
  category: "review"
20
20
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
21
21
  stack_requires: "nestjs,prisma"
@@ -79,7 +79,7 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
79
79
 
80
80
  **Module structure**
81
81
  - `@Module()` declaration present; providers, imports, exports are correctly listed
82
- - Circular dependency risk: two modules importing each other — flag as `major` if detected; suggest `forwardRef()`
82
+ - Circular dependency risk: two modules importing each other — defer the cycle to `review-architecture`; suggest `forwardRef()`
83
83
  - Feature modules do not import `AppModule`
84
84
 
85
85
  **Provider scope**
@@ -91,18 +91,17 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
91
91
  - All controller methods accepting user input (body, query, param) have a DTO class decorated with `class-validator` decorators
92
92
  - Required fields: `@IsString()`, `@IsNumber()`, `@IsEmail()`, etc. present and accurate
93
93
  - `@IsOptional()` used only on truly optional fields; non-optional fields must not have `@IsOptional()`
94
- - `ValidationPipe` applied globally (in `main.ts`) or explicitly via `@UsePipes(ValidationPipe)` — **blocker** if missing on any endpoint accepting user input
94
+ - `ValidationPipe` applied globally (in `main.ts`) or explicitly via `@UsePipes(ValidationPipe)` — missing on an endpoint accepting user input is rated by the DTO row of the conditions table
95
95
  - `@Transform()` used where input coercion is needed (e.g., string → number from query params)
96
96
 
97
97
  **Guards and roles**
98
98
  - Protected endpoints have `@UseGuards(...)` with appropriate guard(s)
99
- - Role-based access uses `@Roles(...)` decorator with a roles guard — missing guard on an endpoint that should be protected is a **blocker**
99
+ - Role-based access uses `@Roles(...)` decorator with a roles guard — a missing guard on an endpoint that should be protected is rated by the auth-guard row of the conditions table
100
100
  - Public endpoints explicitly marked with `@Public()` or equivalent decorator, not just left unguarded
101
101
 
102
102
  **Controller responsibilities**
103
- - Controllers are thin: no business logic, no direct ORM calls, no computation
104
- - Controller methods do: parse input → delegate to service → return response
105
- - If business logic is in a controller method, flag as `major` ("move to service layer")
103
+ - Controllers are thin: no business logic, no direct ORM calls, no computation; a method does parse input → delegate to service → return response
104
+ - If business logic is in a controller method, flag it per the controller row of the conditions table (`minor`: "move to service layer")
106
105
 
107
106
  **Service layer**
108
107
  - Business logic lives in services
@@ -129,9 +128,8 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
129
128
  - Missing pagination on a list endpoint flagged as `major` when no obvious bound exists
130
129
 
131
130
  **Error handling**
132
- - Async controller methods must have error handling: either `try/catch` or a global exception filter
133
- - Unhandled promise rejections (async method without try/catch, no global filter) — **blocker**
134
- - Exception messages must not leak internal details (stack traces, ORM error strings) to the HTTP response — leaking is a **blocker**
131
+ - Unhandled promise rejections are rated by `.metaproject/rules/core/error-handling.mdc` (**Review severities**): a rejection Nest's exception layer answers with an error response is not a crash; rate that response
132
+ - Exception messages must not leak internal details (stack traces, ORM error strings) to the HTTP response — leaking is rated by the stack-trace row of the conditions table
135
133
  - NestJS built-in exceptions (`NotFoundException`, `BadRequestException`, etc.) preferred over generic `Error`
136
134
 
137
135
  ---
@@ -139,7 +137,7 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
139
137
  ### 3. Database Patterns (ORM)
140
138
 
141
139
  **N+1 queries**
142
- - Relation loaded inside a loop without eager loading (`relations`, `leftJoinAndSelect`) or a DataLoader — **always major**
140
+ - Relation loaded inside a loop without eager loading (`relations`, `leftJoinAndSelect`) or a DataLoader — rated by the N+1 row of the conditions table
143
141
  - Example: `for (const user of users) { user.orders = await orderRepo.find(...) }` — flag with concrete suggestion to use `relations: ['orders']` or batch query
144
142
 
145
143
  **Transactions**
@@ -148,9 +146,9 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
148
146
  - NestJS TypeORM: use `dataSource.transaction(async (manager) => { ... })` or `@Transaction()` decorator pattern
149
147
 
150
148
  **Raw query safety**
151
- - String interpolation in raw queries is a **blocker** (SQL injection risk)
149
+ - String interpolation in raw queries: SQL injection risk, rated by the raw-SQL row of the conditions table
152
150
  - Use parameterized queries: `query('SELECT * FROM users WHERE id = $1', [id])`
153
- - Flag `createQueryBuilder().where('id = ' + id)` as blocker
151
+ - Flag `createQueryBuilder().where('id = ' + id)` under that row
154
152
 
155
153
  **Soft deletes**
156
154
  - If the project schema uses `deletedAt` / `@DeleteDateColumn()`, deletions must use `.softRemove()` / `.softDelete()`, not `.remove()` / `.delete()`
@@ -159,7 +157,7 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
159
157
  **Migration safety**
160
158
  - Column removed in migration — check that no application code still references it
161
159
  - Dropping a column without a deprecation period in a live system flagged as `major`
162
- - `NOT NULL` column added without a default value to a populated table — **blocker**
160
+ - `NOT NULL` column added without a default value to a populated table — `major`; `blocker` only on shown truncation
163
161
 
164
162
  ---
165
163
 
@@ -167,7 +165,7 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
167
165
 
168
166
  - No `any` in new code — suggest `unknown` with type guards, or correct typed return
169
167
  - Public service methods must have explicit return types (`Promise<UserDto>`, not inferred)
170
- - Service contracts expressed as interfaces (`IUserService`), not just class implementations
168
+ - Interfaces only at an I/O or substitution boundary, named without an `I` prefix (`solid-principles.mdc`, D)
171
169
  - No `as any` or unsafe casts (`as unknown as T`) without a comment explaining why
172
170
  - `@ts-ignore` / `@ts-expect-error` without explanation comment — flag as `minor`
173
171
 
@@ -205,15 +203,15 @@ is, and a condition that cannot name one is not a `blocker`.
205
203
 
206
204
  | Condition | Severity | Shape |
207
205
  |---|---|---|
208
- | Missing DTO validation on an endpoint accepting user input | `blocker` | Exploitable vulnerability |
209
- | String interpolation in raw SQL query | `blocker` | Exploitable vulnerability |
210
- | Leaking stack trace / raw ORM error to API response | `blocker` | Exploitable vulnerability (information disclosure) |
206
+ | Missing DTO validation on an endpoint accepting user input | `blocker` with an attack vector stated (input, entry point, impact — `review-security-code` law); `major` with a named malformed input and wrong outcome; else `info` | Exploitable vulnerability only when the vector is shown |
207
+ | String interpolation in raw SQL query | `blocker` with an attack vector stated (input, entry point, impact); `major` with a named input and wrong outcome; else `info` | Exploitable vulnerability only when the vector is shown |
208
+ | Leaking stack trace / raw ORM error to API response | `blocker` with an attack vector stated (what is disclosed, to whom, through which entry point); `major` when the leak is shown reaching a response; else `info` | Exploitable vulnerability only when the vector is shown; a shown leak is a wrong outcome |
209
+ | Missing auth guard on an endpoint that should be protected | `blocker` with an attack vector stated (caller, entry point, impact); `major` with a named caller and the wrong outcome it gets; else `info` | Exploitable vulnerability only when the vector is shown |
211
210
  | `REQUEST`-scoped provider injected into a `Singleton` | `blocker` | Data corruption — one request's state is served to another |
212
- | Unhandled promise rejection in a controller method | `blocker` | Crash |
213
- | `NOT NULL` column added without a default to a populated table | `blocker` | Data loss — the migration fails or truncates |
214
- | N+1 query (relation loaded in a loop) | `major` (minimum) | Named trigger and outcome; degradation, not an outage. Same rating as `review-highload` |
211
+ | `NOT NULL` column added without a default to a populated table | `major` — the migration fails on deploy against existing rows; `blocker` only where the tool shown truncates or backfills wrong values | Data loss only when rows are shown destroyed or wrong. Same rating as `review-highload` |
212
+ | N+1 query (relation loaded in a loop) | `major` with the reachable loop size or call frequency named; else `info` | Cost stated with its frequency; degradation, not an outage |
215
213
  | Missing transaction on a multi-step atomic mutation | `major` — `blocker` where a partial write corrupts persisted state | The outcome decides |
216
- | Business logic in a controller | `major` | Layer violation. Same rating as `review-architecture` |
214
+ | Business logic in a controller | `minor` — `major` only with a concrete defect it causes (trigger and outcome) or a stated project rule it breaks | Layer violation. Same rating as `review-architecture` |
217
215
  | Missing pagination on an unbounded list endpoint | `major` — `blocker` where an attacker-reachable request exhausts memory | Degradation vs. crash/DoS |
218
216
 
219
217
  ---
@@ -282,7 +280,7 @@ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
282
280
  ```markdown
283
281
  # Backend Review Report
284
282
 
285
- ## Verdict: APPROVE | APPROVE_WITH_SUGGESTIONS | REQUEST_CHANGES
283
+ <!-- No merge verdict: the orchestrator owns it. A standalone run summarizes findings only. -->
286
284
 
287
285
  ## Summary
288
286
  <2-4 sentences covering what changed, overall backend health, key concerns.>
@@ -343,8 +341,8 @@ When dispatched by `review-orchestrator` or `job-orchestrator`, the prompt MAY c
343
341
  |----------------|-----------------|
344
342
  | "ValidationPipe is probably configured somewhere" | Always verify it is applied; assumption lets injection reach service layer |
345
343
  | "The N+1 only runs on small datasets now" | Data grows; flag it now with a clear fix, not after the incident |
346
- | "The controller has some logic but it's minor" | The line is binary — logic in controller = untestable without HTTP stack |
347
- | "Stack trace in response only shows in dev" | Config can be wrong in prod; treat it as blocker always |
344
+ | "The controller has some logic but it's minor" | Logic in a controller is `minor` unless a defect is named; say which, do not rate by feeling |
345
+ | "Stack trace in response only shows in dev" | Config can be wrong in prod; report it per the stack-trace row; blocker needs a shown vector |
348
346
  | "I'll skip the migration check — it's just a column rename" | Column renames without fallback break zero-downtime deploys |
349
347
 
350
348
  <!-- keryx:layers-block:start -->