@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.
- package/README.md +2 -2
- package/dist/cli.js +105165 -104989
- package/dist/core.js +21 -197
- package/dist/keryx-general-worker-entry.js +22 -201
- package/package.json +3 -3
- package/src/gdskills/bundled/agents/work-planner.md +1 -1
- package/src/gdskills/bundled/install-manifest.json +3 -26
- package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +1 -2
- package/src/gdskills/bundled/rules/core/definition-of-done.mdc +0 -1
- package/src/gdskills/bundled/rules/core/implementation-doc-mandate.mdc +4 -5
- package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +8 -8
- package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +7 -10
- package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +12 -21
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +3 -3
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +1 -1
- package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/interview/SKILL.md +3 -4
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/git-publish/SKILL.md +60 -0
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +3 -3
- package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +7 -7
- package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +22 -22
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +15 -15
- package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +7 -7
- package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +34 -30
- package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +64 -135
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +4 -4
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +18 -20
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +12 -18
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +2 -2
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +2 -10
- package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +35 -35
- package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +4 -5
- package/src/gdskills/bundled/skills/review/review-premise/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +3 -5
- package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +14 -15
- package/src/gdskills/bundled/skills/review/review-style/SKILL.md +14 -13
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +11 -11
- package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +10 -11
- package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +5 -5
- package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
- package/src/gdskills/bundled/stacks/mobx/agent-refs.json +1 -1
- package/src/gdskills/bundled/stacks/mobx/governance/scout.json +2 -2
- package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/SKILL.md +2 -2
- package/src/gdskills/bundled/stacks/vue/governance/scout.json +1 -1
- package/src/gdskills/contracts/review-finding.schema.json +2 -2
- package/src/gdskills/bundled/rules/core/code-review-ai-assistant.mdc +0 -49
- package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +0 -198
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +0 -177
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +0 -414
- package/src/gdskills/bundled/skills/orchestration/job-documenter/input-contract.schema.json +0 -55
- package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json +0 -58
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +0 -209
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +0 -209
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +0 -208
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +0 -255
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +0 -255
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +0 -254
- package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +0 -209
- package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +0 -209
- package/src/gdskills/bundled/skills/planning/planner/SKILL.md +0 -208
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +0 -171
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +0 -171
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +0 -170
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +0 -184
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +0 -184
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +0 -183
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +0 -249
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +0 -249
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +0 -248
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +0 -199
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +0 -199
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +0 -198
- package/src/gdskills/bundled/skills/quality/commit/SKILL.md +0 -87
- package/src/gdskills/bundled/skills/quality/pr/SKILL.md +0 -95
- package/src/gdskills/bundled/skills/quality/push/SKILL.md +0 -73
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +0 -238
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +0 -301
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +0 -208
|
@@ -14,7 +14,7 @@ triggers:
|
|
|
14
14
|
- "review --hierarchical"
|
|
15
15
|
metadata:
|
|
16
16
|
author: "MrCipherSmith"
|
|
17
|
-
version: "1.
|
|
17
|
+
version: "1.16.1"
|
|
18
18
|
category: "review"
|
|
19
19
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
20
20
|
license: "MIT"
|
|
@@ -111,7 +111,7 @@ Publish this checklist with `plan_set` under the ids `step-0`…`step-14` and `s
|
|
|
111
111
|
## How to spawn (Steps 8 and 10)
|
|
112
112
|
|
|
113
113
|
- One `Agent` call per reviewer, all calls of a wave in a single message, so the wave runs in parallel.
|
|
114
|
-
- Reviewers are read-only: they read the diff and the files and run
|
|
114
|
+
- Reviewers are read-only: they read the diff and the files and run only the read-only commands: `git log`, `git blame` and `git show` (law 4; `review-premise` too) where the host gives a read-only child git. keryx shell does not: a `spawn_subagent` child has no shell and no git tool, so you run `git log -L <start>,<end>:<file>` and `git blame -L <start>,<end> <file>` for each deliberate-looking site a reviewer must judge and pass the output in `context_files`; with neither, the reviewer says the history was not read. Beyond those, a reviewer runs only the layers-block commands (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`) and `keryx ctx rg|read`, never tests, health checks, servers, mutation or any command that writes in the reviewed tree: that evidence comes from you (`keryx review verify-run --timeout <seconds>`, `keryx review mutate`), the verifier, or the one testing reviewer with `run-tests`, in a scratch copy and a time budget. Each payload carries `allowed_tools` (`read-only` or `run-tests`) and `exec_budget_s`.
|
|
115
115
|
- Use the reviewer's exact `subagent_type`. If the runtime has no such type, use `general-purpose` and name the reviewer's `SKILL.md` path in the prompt. Neither available: that reviewer is `BLOCKED`.
|
|
116
116
|
- Prompts carry pointers, not pasted files — the diff, the SHAs, the PR, the schema paths — and never paraphrase a contract. On keryx shell the slices travel in `context_files` instead (below). Run `keryx review dispatch-check --payload <file> --manifest <package>/slices/manifest.json --package <package>` on every payload before a mass dispatch; it fails `REVIEWER_INPUT_PATH_MISSING` on a missing `skill_path` or `context_doc`.
|
|
117
117
|
- A reply is a result only if it starts with a `STATUS:` line and carries a `REVIEW_RESULT` block matching `reviewer-finding.schema.json`; anything else is `BLOCKED`. The one exception: a reply or dispatch error of `STATUS: RATE_LIMITED` is handled by the Rate limits rule under Control, never marked `BLOCKED`.
|
|
@@ -199,7 +199,7 @@ which of its inputs were recovered and which were never written down.
|
|
|
199
199
|
|
|
200
200
|
| Field | Type | Required | Description |
|
|
201
201
|
|-------|------|----------|-------------|
|
|
202
|
-
| `flags` | string[] | no | One or more of: `--hierarchical`, `--frontend`, `--backend`, `--architecture`, `--security`, `--performance`, `--style`, `--clean-code`, `--highload`, `--project-conventions`, `--frontend-conventions`, `--testing-practices`, `--core-boundaries`, `--flow-graph`, `--legacy-profiles`, `--
|
|
202
|
+
| `flags` | string[] | no | One or more of: `--hierarchical`, `--frontend`, `--backend`, `--architecture`, `--security`, `--performance`, `--style`, `--clean-code`, `--highload`, `--project-conventions`, `--frontend-conventions`, `--testing-practices`, `--core-boundaries`, `--flow-graph`, `--legacy-profiles`, `--learned`, `--verify`, `--all`. `--hierarchical` selects the capability-gated hierarchical engine; absence keeps the legacy path. |
|
|
203
203
|
| `path` | string | no | File or directory path to review (e.g., `src/stores/`, `src/components/UserCard.tsx`). Activates **path mode** — reviews the files at this path directly, not a git diff. |
|
|
204
204
|
| `commit_range` | string | no | Explicit commit hash or range (e.g., `abc123..HEAD`). Overrides merge-base detection. Ignored in path mode. |
|
|
205
205
|
| `issue_url` | string | no | GitHub issue or task URL. If provided, Stage 1 gate checks spec compliance before dispatching reviewers. |
|
|
@@ -970,26 +970,20 @@ When `review.jev.select` is on, before Wave A/B dispatch: run `keryx review jev-
|
|
|
970
970
|
|
|
971
971
|
## Legacy/Profile Reviewer Auto-Detection
|
|
972
972
|
|
|
973
|
-
Legacy/profile reviewers are specialized review profiles that predate the review-domain `review-*` naming. They are still valid and must be shown separately from generic and convention reviewers so the user can opt in deliberately. **They are present only when installed:** `code-
|
|
973
|
+
Legacy/profile reviewers are specialized review profiles that predate the review-domain `review-*` naming. They are still valid and must be shown separately from generic and convention reviewers so the user can opt in deliberately. **They are present only when installed:** `code-learned-review` is in the `full` profile only, so in any other profile the flags below (`--learned`, `--legacy-profiles`) name reviewers that may not exist. When the inventory's `bundledSource` is `"project"`, a legacy reviewer missing from the `bundled` half of `keryx review reviewers --json` is absent (when it is `"package"` the half is the keryx package's own list and says nothing about this project — decide as `SKILL.detail.md`, "Skills present only when installed", describes): leave it out of the `Optional legacy/profile reviewers` preview, and when a flag asked for it, do not dispatch a substitute — record it in `Skipped reviewers` with reason `not-installed` and the command that adds it (`keryx skills install --profile full`, or the narrower manifest form in `SKILL.detail.md`, "Skills present only when installed"). `--legacy-profiles` dispatches the legacy reviewers that are installed and skips the rest the same way; `--all` never selects them.
|
|
974
974
|
|
|
975
975
|
| Trigger | Reviewers appended |
|
|
976
976
|
|---|---|
|
|
977
|
-
| `--legacy-profiles` | `code-
|
|
978
|
-
| `--code-ai` | `code-ai-review` |
|
|
977
|
+
| `--legacy-profiles` | `code-learned-review` |
|
|
979
978
|
| `--learned` | `code-learned-review` |
|
|
980
|
-
| `--code-style` | `code-style-review` |
|
|
981
|
-
| `--mobx-store` | `code-mobx-store-review` |
|
|
982
|
-
| `*.store.ts`, `makeObservable`, `observable`, `computed`, `action.bound` | suggest `code-mobx-store-review` as optional profile reviewer |
|
|
983
979
|
|
|
984
980
|
Legacy/profile reviewers are never auto-included and never prompted for, interactive or unattended — do not
|
|
985
|
-
ask about them. They are exempt from the finding contract (
|
|
986
|
-
free
|
|
981
|
+
ask about them. They are exempt from the finding contract (`code-learned-review` emits
|
|
982
|
+
free prose with no per-finding severity field, so its output cannot be normalised into
|
|
987
983
|
the unified report), which is why inclusion must be a deliberate, explicit act rather than a
|
|
988
984
|
default the user has to opt out of on every review. Dispatch them ONLY when the user passes one
|
|
989
985
|
of the flags in the Trigger table above, or when `job-orchestrator` provides `reviewers` /
|
|
990
|
-
`conditional_reviewers` automation settings that name them.
|
|
991
|
-
auto-suggestion (MobX/store files present) is informational only — list it in the Review Plan
|
|
992
|
-
Preview below, but do not dispatch it and do not ask about it without an explicit flag.
|
|
986
|
+
`conditional_reviewers` automation settings that name them.
|
|
993
987
|
|
|
994
988
|
Review Plan Preview must include an `Optional legacy/profile reviewers` group (each installed one with the flag that selects it) and a `Skipped reviewers` group with each one's reason; the wording: `SKILL.detail.md` § "Review Plan Preview — legacy groups".
|
|
995
989
|
|
|
@@ -1010,7 +1004,7 @@ Review Plan Preview must include an `Optional legacy/profile reviewers` group (e
|
|
|
1010
1004
|
| `--testing-practices` | `review-testing-practices` |
|
|
1011
1005
|
| `--core-boundaries` | `review-core-boundaries` |
|
|
1012
1006
|
| `--flow-graph` | `review-flow-graph` |
|
|
1013
|
-
| `--layout` / `--ui-ux` | `review-layout` / `review-ui-ux` (UI/UX and AI-slop; live mode too when a URL or
|
|
1007
|
+
| `--layout` / `--ui-ux` | `review-layout` / `review-ui-ux` (UI/UX and AI-slop; live mode too only when the payload supplies a URL or screenshots) |
|
|
1014
1008
|
| `--pr-contract` | `review-pr-contract` |
|
|
1015
1009
|
| `--all` | all reviewers above (including `review-highload` and project convention reviewers when local convention docs exist; `review-clean-code` and `review-style` only when the round started with `--style`, and nothing a project lists under `reviewRoles.disabled` in `routing.config.json`); never the legacy/profile reviewers, which stay flag-only |
|
|
1016
1010
|
| `--verify` | `review-verifier`, started on the first blocker or major and re-run for each later one (`SKILL.detail.md` § "Early verifier"); checks the findings by running something. Delete-only. |
|
|
@@ -1206,7 +1200,7 @@ Each reviewer must return a `REVIEW_RESULT` object matching `.metaproject/skills
|
|
|
1206
1200
|
| Test / e2e conventions | NO | `review-testing-practices` |
|
|
1207
1201
|
| Shared core boundary rules | NO | `review-core-boundaries` |
|
|
1208
1202
|
| Shared flow/graph abstraction contracts | NO | `review-flow-graph` |
|
|
1209
|
-
| Legacy/profile review profiles | NO | `code-
|
|
1203
|
+
| Legacy/profile review profiles | NO | `code-learned-review` |
|
|
1210
1204
|
|
|
1211
1205
|
## Sub-Agent Report Quality Gate
|
|
1212
1206
|
|
|
@@ -1319,8 +1313,8 @@ inventing a fifth level to express it would put us back where we started.
|
|
|
1319
1313
|
3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
|
|
1320
1314
|
4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
|
|
1321
1315
|
|
|
1322
|
-
`review-security-code` carries a fifth —
|
|
1323
|
-
|
|
1316
|
+
`review-security-code` carries a fifth — a finding that claims attacker impact states its vector; one without a vector
|
|
1317
|
+
is rated by trigger and outcome — which does not generalise and stays there.
|
|
1324
1318
|
|
|
1325
1319
|
## Finding Format
|
|
1326
1320
|
|
|
@@ -155,15 +155,15 @@
|
|
|
155
155
|
"properties": {
|
|
156
156
|
"sites": {
|
|
157
157
|
"type": "array",
|
|
158
|
-
"minItems": 1,
|
|
159
158
|
"items": {
|
|
160
159
|
"type": "string"
|
|
161
160
|
},
|
|
162
|
-
"description": "Every location carrying the shape, including ones already correct. A single-entry list is a claim that the class has one member."
|
|
161
|
+
"description": "Every location carrying the shape, including ones already correct. A single-entry list is a claim that the class has one member. An empty list is the negative enumeration (the search ran and found no site); it is valid only with a non-empty enumeration_method."
|
|
163
162
|
},
|
|
164
163
|
"enumeration_method": {
|
|
165
164
|
"type": "string",
|
|
166
165
|
"minLength": 1,
|
|
166
|
+
"pattern": "\\S",
|
|
167
167
|
"description": "How the set was derived: the grep or query run, the source-level guard that enumerates it, or why the list is exhaustive. 'I checked the others' is not a method."
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -189,21 +189,13 @@
|
|
|
189
189
|
"type": "string",
|
|
190
190
|
"enum": ["read-only", "run-tests"],
|
|
191
191
|
"default": "read-only",
|
|
192
|
-
"description": "What the reviewer may do beyond reading. `read-only` (the default): read the diff and files, and run no command, except the read-only history commands `git log`, `git blame` and `git show` (shared law 4; the premise judge too) where the host gives a read-only child git. On keryx shell a read-only child has no shell and no git tool: the parent passes `git log -L`/`git blame` output in `context_files`. `run-tests`: at most one testing reviewer per round may run the tests, inside `exec_budget_s`. Verification commands go through the parent's `keryx review verify-run --timeout`."
|
|
192
|
+
"description": "What the reviewer may do beyond reading. `read-only` (the default): read the diff and files, and run no command, except the read-only history commands `git log`, `git blame` and `git show` (shared law 4; the premise judge too) where the host gives a read-only child git. Beyond those it runs only the layers-block commands (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`) and `keryx ctx rg|read`, and never a command that writes in the reviewed tree. On keryx shell a read-only child has no shell and no git tool: the parent passes `git log -L`/`git blame` output in `context_files`. `run-tests`: at most one testing reviewer per round may run the tests, inside `exec_budget_s`. Verification commands go through the parent's `keryx review verify-run --timeout`."
|
|
193
193
|
},
|
|
194
194
|
"exec_budget_s": {
|
|
195
195
|
"type": "integer",
|
|
196
196
|
"minimum": 0,
|
|
197
197
|
"description": "Seconds of command time the reviewer may spend in total. 0 or absent with `allowed_tools: read-only`; a positive budget with `run-tests`."
|
|
198
198
|
},
|
|
199
|
-
"known_findings": {
|
|
200
|
-
"type": "array",
|
|
201
|
-
"description": "Findings already recorded by earlier waves of this round. Do not report them again; `keryx review ingest` merges duplicates.",
|
|
202
|
-
"items": {
|
|
203
|
-
"type": "object",
|
|
204
|
-
"additionalProperties": true
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
199
|
"prior_findings": {
|
|
208
200
|
"type": "array",
|
|
209
201
|
"description": "Every finding from earlier rounds on this change, with what the fix claimed about each. Eleven rounds across two flows were dispatched without this, and twice in a row the fix repaired the site the finding named while leaving its siblings — which the NEXT round then found. A reviewer that can see the earlier finding and the claimed disposition can check the claim.",
|
|
@@ -252,7 +244,7 @@
|
|
|
252
244
|
},
|
|
253
245
|
"known_findings": {
|
|
254
246
|
"type": "array",
|
|
255
|
-
"description": "Findings an EARLIER WAVE of this same round already reported, from `knownFindingsForWave(<package>)` in src/review/dedupe.ts: id plus the file/line/quote anchor, nothing else. A reviewer that would raise the same defect at the same site cites the known id in its evidence instead of re-reporting it; ingest merges whatever duplicates still arrive (same file, line within 3 or same quote, same mechanism) into one finding with the highest severity and `reported_by`. Optional; absent on the first wave.",
|
|
247
|
+
"description": "Findings an EARLIER WAVE of this same round already reported, from `knownFindingsForWave(<package>)` in src/review/dedupe.ts: id plus the file/line/quote anchor, nothing else. A reviewer that would raise the same defect at the same site cites the known id in its evidence instead of re-reporting it; `keryx review ingest` merges whatever duplicates still arrive (same file, line within 3 or same quote, same mechanism) into one finding with the highest severity and `reported_by`. Optional; absent on the first wave.",
|
|
256
248
|
"items": {
|
|
257
249
|
"type": "object",
|
|
258
250
|
"required": ["id"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review-performance
|
|
3
3
|
model_tier: standard
|
|
4
|
-
description: "Use when a performance review is requested, checking
|
|
4
|
+
description: "Use when a performance review is requested, checking CLI/TUI hot paths (per keystroke, per file, command startup), N+1 queries, unnecessary re-renders, memory leaks, missing indexes, large bundle imports, and synchronous blocking in changed code. NOT for security, logic correctness, style, or architecture."
|
|
5
5
|
triggers:
|
|
6
6
|
- "performance review"
|
|
7
7
|
- "perf check"
|
|
@@ -11,7 +11,7 @@ triggers:
|
|
|
11
11
|
- "check N+1"
|
|
12
12
|
metadata:
|
|
13
13
|
author: "MrCipherSmith"
|
|
14
|
-
version: "1.
|
|
14
|
+
version: "1.3.0"
|
|
15
15
|
category: "review"
|
|
16
16
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
17
17
|
license: "MIT"
|
|
@@ -21,7 +21,7 @@ license: "MIT"
|
|
|
21
21
|
|
|
22
22
|
## Purpose
|
|
23
23
|
|
|
24
|
-
Finds real, code-level performance problems introduced in the changed code of the current branch. Covers N+1 database queries, unnecessary React re-renders, missing memoization in hot paths, memory leaks, large bundle imports, synchronous blocking in async contexts, missing pagination, and redundant API calls. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
|
|
24
|
+
Finds real, code-level performance problems introduced in the changed code of the current branch. Covers CLI and TUI hot paths, N+1 database queries, unnecessary React re-renders, missing memoization in hot paths, memory leaks, large bundle imports, synchronous blocking in async contexts, missing pagination, and redundant API calls. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history), and the read-only layer commands the orchestrator lists (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`, `keryx ctx rg|read`); it never writes in the reviewed tree.
|
|
25
25
|
|
|
26
26
|
This skill focuses on **measurable or high-likelihood bottlenecks** only. Premature optimization, hypothetical slowness, and style preferences are out of scope.
|
|
27
27
|
|
|
@@ -42,6 +42,7 @@ This skill focuses on **measurable or high-likelihood bottlenecks** only. Premat
|
|
|
42
42
|
|
|
43
43
|
| Concern | This skill | Use instead |
|
|
44
44
|
|---------|-----------|-------------|
|
|
45
|
+
| CLI/TUI hot paths: per keystroke, per frame, per file, command startup | YES | — |
|
|
45
46
|
| N+1 database queries, missing eager loading | YES | — |
|
|
46
47
|
| Unnecessary React re-renders, missing memo/useCallback/useMemo | YES | — |
|
|
47
48
|
| Expensive computations in hot paths (render loops, tight loops) | YES | — |
|
|
@@ -55,7 +56,7 @@ This skill focuses on **measurable or high-likelihood bottlenecks** only. Premat
|
|
|
55
56
|
| Security vulnerabilities | NO | `review-security-code` |
|
|
56
57
|
| Logic correctness, race conditions | NO | `review-logic` |
|
|
57
58
|
| Architecture decisions | NO | `review-architecture` |
|
|
58
|
-
| Code style, naming | NO | `
|
|
59
|
+
| Code style, naming | NO | `review-style` |
|
|
59
60
|
| npm/bun dependency vulnerabilities, bundle analysis tooling | NO | `security-audit` / `perf-check` |
|
|
60
61
|
|
|
61
62
|
---
|
|
@@ -64,8 +65,6 @@ This skill focuses on **measurable or high-likelihood bottlenecks** only. Premat
|
|
|
64
65
|
|
|
65
66
|
See shared script: `.metaproject/skills/gdskills/shared/git-merge-base.md`
|
|
66
67
|
|
|
67
|
-
Run the script from that file to determine `MERGE_BASE` (`BASE_SHA`) and `SCOPE` before proceeding.
|
|
68
|
-
|
|
69
68
|
**Supplied text first.** When the payload carries `slices`, `context_files`, `diff` or `file_contents`, review exactly that text and never rebuild the diff. A choice's history (law 4) is read with `git log`, `git blame` and `git show` only where the host gives a read-only child git; on keryx shell a read-only child has no shell and no git tool, so read the `git log -L`/`git blame` excerpts the payload supplies, or say the history was not read. Only with none supplied, collect it:
|
|
70
69
|
```bash
|
|
71
70
|
git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files --others --exclude-standard
|
|
@@ -78,6 +77,23 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
|
|
|
78
77
|
|
|
79
78
|
Work through every category below for each changed file. Tie every finding to a concrete line in the diff. For each finding, state **the hot path or execution frequency** that makes it a real problem — without that, it is INFO only.
|
|
80
79
|
|
|
80
|
+
### 0. CLI and TUI Hot Paths (check first)
|
|
81
|
+
|
|
82
|
+
For a command-line tool or a full-screen TUI, where the hot path is a keystroke, a
|
|
83
|
+
render frame, a file in a tree walk or a command start, not a request handler.
|
|
84
|
+
|
|
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
|
+
- [ ] 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
|
+
- [ ] 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
|
|
89
|
+
- [ ] JSON parse, regex compilation or config load repeated inside a loop instead of hoisted
|
|
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
|
+
- [ ] Polling (`setTimeout`/`setInterval`, `while` wait loop) where an event or a single await would do
|
|
92
|
+
|
|
93
|
+
**Evidence:** a `verify-run` timing the orchestrator supplies, or a reasoned count
|
|
94
|
+
(calls × size: "per keystroke × a 4,000-line transcript", "per flow × every flow in
|
|
95
|
+
`.metaproject/flows`"). Either is the trigger law 1 asks for.
|
|
96
|
+
|
|
81
97
|
### 1. N+1 Database Queries
|
|
82
98
|
|
|
83
99
|
**Detection patterns:**
|
|
@@ -86,11 +102,7 @@ Work through every category below for each changed file. Tie every finding to a
|
|
|
86
102
|
- [ ] ORM relation accessed without eager loading inside iteration: `order.items` where `items` is a lazy relation loaded inside a loop
|
|
87
103
|
- [ ] GraphQL resolver loading a child relation per parent without a DataLoader
|
|
88
104
|
|
|
89
|
-
**Correct patterns to confirm:**
|
|
90
|
-
- Prisma: `include` / `select` on the parent query to fetch relations in one round trip
|
|
91
|
-
- TypeORM: `createQueryBuilder().leftJoinAndSelect()` or `findOptions.relations`
|
|
92
|
-
- MikroORM: `populate` option
|
|
93
|
-
- Raw SQL: `JOIN` rather than a secondary query per row
|
|
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.
|
|
94
106
|
|
|
95
107
|
**Hot path requirement:** State whether this runs per HTTP request, per list item render, per job iteration, etc.
|
|
96
108
|
|
|
@@ -117,7 +129,7 @@ Work through every category below for each changed file. Tie every finding to a
|
|
|
117
129
|
- [ ] `Object.keys().reduce()` or similar aggregation recalculated on every render instead of being derived in store or memoized
|
|
118
130
|
- [ ] Recursive computation without memoization called in a loop
|
|
119
131
|
|
|
120
|
-
**Hot path requirement:** An expensive computation is
|
|
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.
|
|
121
133
|
|
|
122
134
|
### 4. Missing Database Indexes
|
|
123
135
|
|
|
@@ -128,7 +140,7 @@ Detectable from query patterns in changed code (not from DB schema directly):
|
|
|
128
140
|
- [ ] `LIKE '%term%'` — prefix wildcard prevents index use; flag as info with suggestion to use full-text search
|
|
129
141
|
- [ ] Foreign key column used in JOIN without an index (common ORM footgun)
|
|
130
142
|
|
|
131
|
-
**Evidence requirement:** Cannot confirm an index is missing without seeing the migration or schema. If schema is not in the
|
|
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`.
|
|
132
144
|
|
|
133
145
|
### 5. Memory Leaks
|
|
134
146
|
|
|
@@ -217,10 +229,11 @@ boundary is the trigger-and-outcome test.
|
|
|
217
229
|
issues outside the diff are `info` at most, with a note to track separately.
|
|
218
230
|
3. **An optimisation with no before/after is an unmeasured claim, and a neutral
|
|
219
231
|
one is a finding.** Ask what was measured and on what workload. No pair at all
|
|
220
|
-
is `minor` — unjustified, not wrong. A neutral pair is `
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
entry is the author's job, not yours; a
|
|
232
|
+
is `minor` — unjustified, not wrong. A neutral pair is also `minor` (the code is
|
|
233
|
+
correct; the complexity costs whoever edits it next), and its fix is a revert:
|
|
234
|
+
what counts as neutral under noise, and what the attempt owes the journal, are
|
|
235
|
+
`perf-check`'s Rules. Writing that entry is the author's job, not yours; a
|
|
236
|
+
revert with no entry is its own `minor`.
|
|
224
237
|
|
|
225
238
|
---
|
|
226
239
|
|
|
@@ -270,17 +283,10 @@ STATUS: DONE_WITH_CONCERNS
|
|
|
270
283
|
## Performance Review
|
|
271
284
|
|
|
272
285
|
### Scope
|
|
273
|
-
- Branch
|
|
274
|
-
- Parent ref: `<PARENT>`
|
|
275
|
-
- Merge-base: `<BASE_SHA>`
|
|
276
|
-
- Scope mode: default-with-uncommitted | explicit-hash-range
|
|
277
|
-
- Changed files reviewed: <N>
|
|
286
|
+
- Branch `<BRANCH>`, parent `<PARENT>`, merge-base `<BASE_SHA>`, mode default-with-uncommitted | explicit-hash-range, <N> changed files
|
|
278
287
|
|
|
279
288
|
### Summary
|
|
280
|
-
-
|
|
281
|
-
- Major: <N>
|
|
282
|
-
- Minor: <N>
|
|
283
|
-
- Info: <N>
|
|
289
|
+
- blocker: <N> | major: <N> | minor: <N> | info: <N>
|
|
284
290
|
|
|
285
291
|
### Findings
|
|
286
292
|
|
|
@@ -291,11 +297,7 @@ STATUS: DONE_WITH_CONCERNS
|
|
|
291
297
|
- **Problem**: what is wrong in the code
|
|
292
298
|
- **Why it matters**: concrete impact (latency spike, memory growth, render thrash, etc.)
|
|
293
299
|
- **Fix**: concrete suggestion
|
|
294
|
-
- **Patch** (optional):
|
|
295
|
-
```diff
|
|
296
|
-
- slow line
|
|
297
|
-
+ optimized line
|
|
298
|
-
```
|
|
300
|
+
- **Patch** (optional): unified diff
|
|
299
301
|
|
|
300
302
|
### Clean Areas
|
|
301
303
|
[List categories with no findings, confirming they were checked]
|
|
@@ -309,7 +311,7 @@ conditions land under that rubric, not a second rubric.
|
|
|
309
311
|
|
|
310
312
|
| Condition | Severity | Why, under the canonical rubric |
|
|
311
313
|
|---|---|---|
|
|
312
|
-
| A cost that takes the process or request down — OOM, timeout, capacity exhausted at a stated load | `blocker` | Crash |
|
|
314
|
+
| A cost that takes the process or request down — OOM, timeout, capacity exhausted at a stated load or a named trigger | `blocker` | Crash |
|
|
313
315
|
| Bottleneck on a path you can name, with the frequency or data scale that makes it a cost | `major` | Trigger and outcome are both named; slow is not one of the four shapes |
|
|
314
316
|
| Inefficiency off any hot path you can name | `minor` | Correct today; the cost is to whoever tunes it next |
|
|
315
317
|
| "Looks slow", no execution context | `info` | Shared law 1 — no reproducible path |
|
|
@@ -321,13 +323,11 @@ A performance finding is `blocker` only when the degradation *is* an outage.
|
|
|
321
323
|
|
|
322
324
|
## Red Flags Table
|
|
323
325
|
|
|
324
|
-
Stop and re-read these rules if you are thinking:
|
|
325
|
-
|
|
326
326
|
| Rationalization | Why it's wrong |
|
|
327
327
|
|---|---|
|
|
328
328
|
| "This loop iterates over user data, so N+1 is obviously a problem" | State the expected N and query cost; "user data" is not self-evidently large |
|
|
329
329
|
| "Missing useMemo here is a performance issue" | useMemo has overhead; only flag when the computation is measurably expensive or the component re-renders at high frequency |
|
|
330
|
-
| "The dataset could grow large, so I'll call it a blocker" | "Could grow" = minor or info; known to be large = major
|
|
330
|
+
| "The dataset could grow large, so I'll call it a blocker" | "Could grow" = minor or info; known to be large = major, and `blocker` only when it is an outage |
|
|
331
331
|
| "The optimisation measures neutral, but it does no harm — no reason to hold the diff" | The complexity it bought with no measured gain *is* the harm, and it passes review precisely because nothing in it is wrong. Neutral is `revert`, per performance law 3 |
|
|
332
332
|
|
|
333
333
|
---
|
|
@@ -17,7 +17,7 @@ triggers:
|
|
|
17
17
|
- "documentation needed"
|
|
18
18
|
metadata:
|
|
19
19
|
author: "MrCipherSmith"
|
|
20
|
-
version: "1.
|
|
20
|
+
version: "1.1.0"
|
|
21
21
|
category: "review"
|
|
22
22
|
flags: "--pr-contract"
|
|
23
23
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
@@ -29,7 +29,7 @@ license: "MIT"
|
|
|
29
29
|
|
|
30
30
|
Reviewer for what the pull request says about itself. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs.
|
|
31
31
|
|
|
32
|
-
This lane
|
|
32
|
+
This lane owns one thing no other reviewer holds: each checklist box and claim of the PR body set against the diff and the documentation outside it. The orchestrator's Stage 1 gate reads the body for spec compliance and `review-degradation` for `diff-vs-description`; neither works the checklist. `review-logic` reads the code,
|
|
33
33
|
`review-testing-practices` reads the tests, and a retrospective review of a merged
|
|
34
34
|
frontend PR missed a documentation gap that sat in plain view: the body left
|
|
35
35
|
**Documentation needed** unticked while the diff added a user-visible table row, and
|
|
@@ -79,8 +79,7 @@ and was not touched:
|
|
|
79
79
|
|
|
80
80
|
- `keryx gdgraph find <symbol>` and `keryx gdgraph affected <file>` — what points at the
|
|
81
81
|
changed file; a `.md` or docs-site file in the answer is a candidate.
|
|
82
|
-
- `keryx wiki ask "<the changed behaviour>"`
|
|
83
|
-
name it.
|
|
82
|
+
- `keryx wiki ask "<the changed behaviour>"` — the wiki pages that name it.
|
|
84
83
|
- `keryx ctx rg "<the old label or flag>" docs README.md` — the string the change
|
|
85
84
|
replaced, wherever it is still quoted.
|
|
86
85
|
|
|
@@ -92,7 +91,7 @@ moved it. A document that is merely related is not a finding.
|
|
|
92
91
|
A reviewer on a shell host is read-only: its file tool reads inside its working directory
|
|
93
92
|
and it runs no `keryx` command. Work from `pr-context.md` and the slices you were
|
|
94
93
|
supplied. If answering needs a document you were not given, do not guess it: reply
|
|
95
|
-
`STATUS: NEEDS_CONTEXT` and name the paths (or the symbol and the wiki
|
|
94
|
+
`STATUS: NEEDS_CONTEXT` and name the paths (or the symbol and the wiki question) the
|
|
96
95
|
orchestrator should supply. Rows you could settle from what you hold are still reported.
|
|
97
96
|
|
|
98
97
|
## Severity
|
|
@@ -17,7 +17,7 @@ triggers:
|
|
|
17
17
|
- "is this finding a real defect"
|
|
18
18
|
metadata:
|
|
19
19
|
author: "MrCipherSmith"
|
|
20
|
-
version: "1.
|
|
20
|
+
version: "1.1.0"
|
|
21
21
|
category: "review"
|
|
22
22
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
23
23
|
origin: "authored"
|
|
@@ -109,7 +109,7 @@ signal and no practice source against it is upheld.
|
|
|
109
109
|
| **Claim first, argument second.** | The case passed two reviews that read the fix's argument and never the premise. |
|
|
110
110
|
| **`challenged` cites.** Each intent signal names its `ref` (`file:line` or a SHA) and what it says; each practice source names the guideline and section precisely enough to look up. | An uncited challenge is rejected and the finding stays as reported. Never invent a quote. |
|
|
111
111
|
| **Never re-grade by the rubric.** Severity is the reviewer's and the verifier's call; a test gap or a surviving mutant stays as reported unless intent or practice shrinks it, and a minor is upheld or challenged, never downgraded. | An uncited downgrade is rejected (`downgrade-without-evidence`). Minors matter: a finding you weaken is one nobody fixes. |
|
|
112
|
-
| **Read-only.** Read files; run nothing but `git log`, `git blame` and `git show
|
|
112
|
+
| **Read-only.** Read files; run nothing but `git log`, `git blame` and `git show` (only where your host gives a read-only child git) and the read-only layer commands the orchestrator lists (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`, `keryx ctx rg|read`); never write in the reviewed tree. On keryx shell you have no shell and no git tool: read the history excerpts in `context_files`, or say the history was not read. | Executing is the verifier's job; this judgement is about meaning. |
|
|
113
113
|
| **An external finding, and a `review-security-code` finding, is held or upheld, never dismissed or downgraded.** | A human asked; the operator answers them. Severity of a security finding measures exposure, which intent does not lower. The merge rejects the downgrade (`external-downgrade`, `security-downgrade`). |
|
|
114
114
|
|
|
115
115
|
## Output Contract
|
|
@@ -13,7 +13,7 @@ triggers:
|
|
|
13
13
|
- "blast radius"
|
|
14
14
|
metadata:
|
|
15
15
|
author: "MrCipherSmith"
|
|
16
|
-
version: "1.
|
|
16
|
+
version: "1.3.0"
|
|
17
17
|
category: "review"
|
|
18
18
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
19
19
|
license: "MIT"
|
|
@@ -22,7 +22,7 @@ license: "MIT"
|
|
|
22
22
|
# Review: Regression
|
|
23
23
|
|
|
24
24
|
You are reviewing **scope B** of a deep round. The files you are given are not
|
|
25
|
-
under review. They are under **regression check**. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
|
|
25
|
+
under review. They are under **regression check**. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history), and the read-only layer commands the orchestrator lists (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`, `keryx ctx rg|read`); it never writes in the reviewed tree.
|
|
26
26
|
|
|
27
27
|
## The one question
|
|
28
28
|
|
|
@@ -87,9 +87,7 @@ Step 3b.
|
|
|
87
87
|
- the flow's frozen acceptance criteria;
|
|
88
88
|
- the previous round's findings.
|
|
89
89
|
|
|
90
|
-
The set is bounded by edge distance and a file cap, and **everything the cap
|
|
91
|
-
dropped is recorded**. If the record says files were dropped, say so in your
|
|
92
|
-
summary rather than implying the set was complete.
|
|
90
|
+
The set is bounded by edge distance and a file cap, and **everything the cap dropped is recorded**. If the record says files were dropped, say so in your summary rather than implying the set was complete.
|
|
93
91
|
|
|
94
92
|
## How to look
|
|
95
93
|
|
|
@@ -13,7 +13,7 @@ triggers:
|
|
|
13
13
|
- "OWASP review"
|
|
14
14
|
metadata:
|
|
15
15
|
author: "MrCipherSmith"
|
|
16
|
-
version: "1.
|
|
16
|
+
version: "1.4.0"
|
|
17
17
|
category: "review"
|
|
18
18
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
19
19
|
license: "MIT"
|
|
@@ -23,7 +23,7 @@ license: "MIT"
|
|
|
23
23
|
|
|
24
24
|
## Purpose
|
|
25
25
|
|
|
26
|
-
Finds exploitable security vulnerabilities introduced in the changed code of the current branch. Covers injection, auth/authz gaps, IDOR, secrets, insecure crypto, CSRF, path traversal, and framework-specific patterns (NestJS, React). Produces findings with explicit attack vectors and concrete fixes. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
|
|
26
|
+
Finds exploitable security vulnerabilities introduced in the changed code of the current branch. Covers injection, auth/authz gaps, IDOR, secrets, insecure crypto, CSRF, path traversal, and framework-specific patterns (NestJS, React). Produces findings with explicit attack vectors and concrete fixes. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history), and the read-only layer commands the orchestrator lists (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`, `keryx ctx rg|read`); it never writes in the reviewed tree.
|
|
27
27
|
|
|
28
28
|
This skill covers **code-level security only**. It does NOT audit npm/bun dependency trees, Docker configurations, or deployment surfaces — use `security-audit` for those.
|
|
29
29
|
|
|
@@ -57,7 +57,7 @@ This skill covers **code-level security only**. It does NOT audit npm/bun depend
|
|
|
57
57
|
| Infrastructure / Docker / deployment security | NO | `security-audit` |
|
|
58
58
|
| Performance bottlenecks | NO | `review-performance` |
|
|
59
59
|
| Logic correctness, architecture | NO | `review-logic`, `review-architecture` |
|
|
60
|
-
| Code style, naming | NO | `
|
|
60
|
+
| Code style, naming | NO | `review-style` |
|
|
61
61
|
|
|
62
62
|
---
|
|
63
63
|
|
|
@@ -213,10 +213,10 @@ boundary is the trigger-and-outcome test.
|
|
|
213
213
|
|
|
214
214
|
### Security-specific law
|
|
215
215
|
|
|
216
|
-
1. **
|
|
217
|
-
attacker action, the entry point, and the impact.
|
|
218
|
-
|
|
219
|
-
|
|
216
|
+
1. **A finding that claims attacker impact MUST state the attack vector.** Name the
|
|
217
|
+
attacker action, the entry point, and the impact. With no vector the attacker
|
|
218
|
+
claim is dropped and the finding is rated by trigger and outcome: `major` with
|
|
219
|
+
both named, else `info`. This does not generalise (a style reviewer has no attacker), so it stays here.
|
|
220
220
|
|
|
221
221
|
---
|
|
222
222
|
|
|
@@ -306,15 +306,14 @@ conditions land under that rubric, not a second rubric.
|
|
|
306
306
|
| Condition | Severity | Why, under the canonical rubric |
|
|
307
307
|
|---|---|---|
|
|
308
308
|
| Exploitable vulnerability in the current code path, with the attack vector stated | `blocker` | Named shape 3 |
|
|
309
|
-
| A
|
|
309
|
+
| 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
310
|
| 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 |
|
|
311
|
-
| A
|
|
311
|
+
| A weakness that can be stated but not reached (the precondition — attacker-controlled input, a caller of an internal endpoint — is not shown in the code), or a pattern with no attack vector | `info` | Security-specific law, and shared law 1; say what would settle it |
|
|
312
312
|
|
|
313
313
|
**"Plausible attack scenario" is not a severity.** A scenario you can state and
|
|
314
|
-
reach is `blocker`;
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
outcome, not of the domain.
|
|
314
|
+
reach is `blocker`; one you can state but cannot reach, or cannot state, is
|
|
315
|
+
`info` (shared law 1). Being the security reviewer raises none of them: severity
|
|
316
|
+
belongs to the outcome, not the domain (canonical rubric).
|
|
318
317
|
|
|
319
318
|
---
|
|
320
319
|
|
|
@@ -329,8 +328,8 @@ Stop and re-read these rules if you are thinking:
|
|
|
329
328
|
| "MD5 is used for caching keys, not passwords — it's fine" | State it as INFO, but do not silently skip it; it often drifts |
|
|
330
329
|
| "I'll downgrade to minor to avoid friction" | Severity reflects real risk, not social dynamics |
|
|
331
330
|
| "The code uses an ORM so SQL injection is not possible" | ORMs have raw-query escape hatches; verify parameterization |
|
|
332
|
-
| "No attack vector found — I'll call it major anyway" |
|
|
333
|
-
| "It's a security finding, so it's a blocker" | `blocker` is the four shapes in **Severity (canonical)**. An unreachable weakness is `
|
|
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
|
+
| "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`) |
|
|
334
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 |
|
|
335
334
|
|
|
336
335
|
---
|
|
@@ -15,7 +15,7 @@ triggers:
|
|
|
15
15
|
- "check readability"
|
|
16
16
|
metadata:
|
|
17
17
|
author: "MrCipherSmith"
|
|
18
|
-
version: "1.
|
|
18
|
+
version: "1.2.0"
|
|
19
19
|
category: "review"
|
|
20
20
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
21
21
|
license: "MIT"
|
|
@@ -25,7 +25,7 @@ license: "MIT"
|
|
|
25
25
|
|
|
26
26
|
Focused style reviewer. Covers naming conventions, dead code, readability, DRY violations,
|
|
27
27
|
import organization, comment quality, file length, cyclomatic complexity, and console noise.
|
|
28
|
-
Never touches logic correctness, architecture, security, or performance. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
|
|
28
|
+
Never touches logic correctness, architecture, security, or performance. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history), and the read-only layer commands the orchestrator lists (`keryx gdgraph affected|find`, `keryx test related`, `keryx wiki ask`, `keryx memory search`, `keryx ctx rg|read`); it never writes in the reviewed tree.
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
@@ -132,14 +132,13 @@ Naming severity is set by the Style laws below and by the canonical rubric in `r
|
|
|
132
132
|
- Suggest: `const MAX_RETRY_COUNT = 3;`
|
|
133
133
|
|
|
134
134
|
**Cyclomatic complexity**
|
|
135
|
-
- Functions with more than 10 decision branches (if/else/switch cases/ternary/loop) — flag as `minor
|
|
136
|
-
- Suggest splitting into smaller, named functions
|
|
135
|
+
- Functions with more than 10 decision branches (if/else/switch cases/ternary/loop) — flag as `minor`; suggest splitting into smaller, named functions
|
|
137
136
|
|
|
138
137
|
---
|
|
139
138
|
|
|
140
139
|
### 4. DRY Violations
|
|
141
140
|
|
|
142
|
-
- Clearly duplicated logic blocks (same or near-identical code in two places within the diff) — flag as `
|
|
141
|
+
- Clearly duplicated logic blocks (same or near-identical code in two places within the diff) — flag as `minor`, however large; `review-clean-code` owns the duplication rating (its law 3)
|
|
143
142
|
- Duplicated string literals used in multiple places — flag as `info`; suggest a shared constant
|
|
144
143
|
- Similar switch/if-else trees that could be a lookup map — flag as `minor`
|
|
145
144
|
|
|
@@ -152,7 +151,7 @@ Do not flag DRY violations for code outside the diff even if legacy duplication
|
|
|
152
151
|
- Imports must be grouped (framework/library imports first, then project imports, then relative imports); blank line between groups
|
|
153
152
|
- Imports within a group should be alphabetically sorted (or consistently ordered — match project convention)
|
|
154
153
|
- Barrel imports (`import * as X from '...'`) without reason — flag as `info`
|
|
155
|
-
- Circular imports (visible from import paths) — flag as `
|
|
154
|
+
- Circular imports (visible from import paths) — flag as `minor`; `review-architecture` owns the rating, and one that fails at runtime is its finding
|
|
156
155
|
- Re-exporting something that is immediately re-used in the same file — flag as `minor` (unnecessary indirection)
|
|
157
156
|
|
|
158
157
|
---
|
|
@@ -161,8 +160,8 @@ Do not flag DRY violations for code outside the diff even if legacy duplication
|
|
|
161
160
|
|
|
162
161
|
**Misleading or outdated comments**
|
|
163
162
|
- Comment describes what the code does but the code has changed — flag as `minor`
|
|
164
|
-
- Comment says "TODO: remove before deploy" and was merged — flag as `
|
|
165
|
-
- Comment is actively wrong (incorrect description of behavior) — flag as `
|
|
163
|
+
- Comment says "TODO: remove before deploy" and was merged — flag as `minor`
|
|
164
|
+
- 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)
|
|
166
165
|
|
|
167
166
|
**Missing JSDoc on public APIs**
|
|
168
167
|
- Public functions/classes exported from a module should have a JSDoc comment describing purpose, params, and return value
|
|
@@ -179,6 +178,7 @@ Do not flag DRY violations for code outside the diff even if legacy duplication
|
|
|
179
178
|
- Files exceeding 500 lines (excluding generated code, test fixtures, and migration files) — flag as `info` with a suggestion to split by responsibility
|
|
180
179
|
- Files exceeding 800 lines — flag as `minor`
|
|
181
180
|
- Single file exporting more than 5 unrelated things — flag as `minor`; suggest splitting into focused modules
|
|
181
|
+
- A React component file whose parts are out of order (imports, interfaces, component, helpers) — flag as `minor`
|
|
182
182
|
- Test files: no limit enforced; complexity handled by test count and grouping
|
|
183
183
|
|
|
184
184
|
---
|
|
@@ -274,14 +274,14 @@ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
|
|
|
274
274
|
```
|
|
275
275
|
|
|
276
276
|
- `DONE` — no major or above findings (minor/info only or none)
|
|
277
|
-
- `DONE_WITH_CONCERNS` — one or more major findings (
|
|
277
|
+
- `DONE_WITH_CONCERNS` — one or more major findings (a name that has produced a named wrong outcome at a call site)
|
|
278
278
|
- `NEEDS_CONTEXT` — project naming convention unclear and no context doc provided; state what is ambiguous
|
|
279
279
|
- `BLOCKED` — cannot access diff; state reason
|
|
280
280
|
|
|
281
281
|
```markdown
|
|
282
282
|
# Style Review Report
|
|
283
283
|
|
|
284
|
-
|
|
284
|
+
<!-- No merge verdict: the orchestrator owns it. A standalone run summarizes findings only. -->
|
|
285
285
|
|
|
286
286
|
## Summary
|
|
287
287
|
<2-3 sentences: overall naming and readability health, notable patterns found.>
|
|
@@ -299,7 +299,7 @@ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
|
|
|
299
299
|
- info: N
|
|
300
300
|
|
|
301
301
|
## Major Issues
|
|
302
|
-
<[F-NNN] findings —
|
|
302
|
+
<[F-NNN] findings — names that produced a named wrong outcome>
|
|
303
303
|
|
|
304
304
|
## Minor & Info
|
|
305
305
|
<[F-NNN] findings>
|
|
@@ -314,7 +314,8 @@ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
|
|
|
314
314
|
|
|
315
315
|
| Concern | This skill | Use instead |
|
|
316
316
|
|---------|------------|-------------|
|
|
317
|
-
| Naming,
|
|
317
|
+
| Naming, formatting, readability, imports, file length | YES | — |
|
|
318
|
+
| Duplication, comments, circular imports (reported here at `minor`) | rating owned elsewhere | `review-clean-code` (duplication, comments); `review-architecture` (circular imports) |
|
|
318
319
|
| Logic bugs, incorrect return values | NO | `review-logic` |
|
|
319
320
|
| Architectural layer violations | NO | `review-architecture` |
|
|
320
321
|
| Security vulnerabilities | NO | `review-security-code` |
|
|
@@ -349,5 +350,5 @@ If absent, infer conventions from surrounding unchanged code in the same files;
|
|
|
349
350
|
| "The naming is a bit odd but I understand it" | Reviewers understand their own code; the next dev won't |
|
|
350
351
|
| "Commented-out code might be needed later" | Git history exists for that; dead comments add noise |
|
|
351
352
|
| "It's only one magic number" | One `42` today becomes twelve untraceable `42`s tomorrow |
|
|
352
|
-
| "DRY violation is minor so I'll skip it" |
|
|
353
|
+
| "DRY violation is minor so I'll skip it" | It is `minor` and still reported, once, with every site listed |
|
|
353
354
|
| "The file is 600 lines but it's organized" | Organization doesn't prevent merge conflicts and scroll fatigue |
|