@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
@@ -14,7 +14,7 @@ triggers:
14
14
  - "review --hierarchical"
15
15
  metadata:
16
16
  author: "MrCipherSmith"
17
- version: "1.14.0"
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 no command, except the read-only history 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. Only you (through `keryx review verify-run --timeout <seconds>`), the verifier and at most one testing reviewer run other commands, inside a time budget. Each payload carries `allowed_tools` (`read-only` or `run-tests`) and `exec_budget_s`.
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`, `--code-ai`, `--learned`, `--code-style`, `--mobx-store`, `--verify`, `--all`. `--hierarchical` selects the capability-gated hierarchical engine; absence keeps the legacy path. |
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-ai-review`, `code-learned-review`, `code-style-review` and `code-mobx-store-review` are in the `full` profile only, so in any other profile the flags below (`--code-ai`, `--learned`, `--code-style`, `--mobx-store`, `--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.
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-ai-review` + `code-learned-review` + `code-style-review` + `code-mobx-store-review` when MobX/store files are present |
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 (for example `code-ai-review` emits
986
- free-prose Russian with no per-finding severity field, so its output cannot be normalised into
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. The `code-mobx-store-review`
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 dev server is available) |
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-ai-review`, `code-learned-review`, `code-style-review`, `code-mobx-store-review` |
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 — every security finding states its attack
1323
- vector — which does not generalise and stays there.
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 for 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."
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.0.0"
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).
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 | `code-style-review` |
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 only a `major` finding if it runs at render time or in a tight loop. A one-time computation at load time is `info` at most.
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 diff, downgrade to `minor` and note that the reviewer should check the schema.
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 `major`, and the fix it
221
- suggests is a revert: what counts as neutral under noise, and what the attempt
222
- owes the journal, are `perf-check`'s Rules, not restated here. Writing that
223
- entry is the author's job, not yours; a revert with no entry is its own `minor`.
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: `<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
- - Blockers: <N>
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 or blocker |
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.0.0"
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 exists because nobody else reads the PR body. `review-logic` reads the code,
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>"` and `keryx wiki query` — the wiki pages that
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 query) the
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.0.0"
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`, and those only where your host gives a read-only child git. 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. |
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). 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.0.0"
16
+ version: "1.3.0"
17
17
  category: "review"
18
18
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
19
19
  license: "MIT"
@@ -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.0.0"
16
+ version: "1.4.0"
17
17
  category: "review"
18
18
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
19
19
  license: "MIT"
@@ -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 | `code-style-review` |
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. **Every security finding MUST state the attack vector explicitly.** Name the
217
- attacker action, the entry point, and the impact. No attack vector → no finding
218
- above `info`. This one does not generalise — a style reviewer has no attacker
219
- — so it stays here and only here.
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 real weakness whose exploitation needs a precondition the diff does not establish — an internal-only endpoint, an authenticated caller, a value not yet attacker-controlled | `major` | Trigger and outcome are named, but the path to exploitation is not complete |
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 pattern with no attack vector in the current code | `info` | Security-specific law, and shared law 1 |
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`; a scenario you can state but cannot reach is `major`; a
315
- scenario you cannot state is `info`. Being the security reviewer does not raise
316
- any of them — see the canonical rubric on severity being a property of the
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" | No attack vector = `info` only, per the security-specific law |
333
- | "It's a security finding, so it's a blocker" | `blocker` is the four shapes in **Severity (canonical)**. An unreachable weakness is `major` however alarming its name |
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
  ---