@mrciphersmith/keryx 0.2.71 → 0.2.73

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 (162) hide show
  1. package/dist/cli.js +4632 -2229
  2. package/package.json +2 -2
  3. package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +81 -0
  4. package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +1 -1
  5. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +2 -2
  6. package/src/gdskills/bundled/rules/core/review-strict-profile.mdc +8 -4
  7. package/src/gdskills/bundled/rules/core/subagent-context-construction.md +1 -1
  8. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +326 -20
  9. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +320 -22
  10. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +326 -12
  11. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +333 -9
  12. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +94 -6
  13. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +94 -6
  14. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +2 -2
  15. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +94 -6
  16. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +94 -6
  17. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +3 -3
  18. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +154 -1098
  19. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +154 -1098
  20. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +3 -3
  21. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +154 -1098
  22. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +154 -1098
  23. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +1 -1
  24. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +102 -42
  25. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +102 -42
  26. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +2 -2
  27. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +2 -2
  28. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +115 -49
  29. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +115 -49
  30. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +115 -49
  31. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +115 -49
  32. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +1 -1
  33. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +16 -7
  34. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +16 -7
  35. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +1 -1
  36. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +16 -7
  37. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +16 -7
  38. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +973 -510
  39. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +973 -510
  40. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +944 -514
  41. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +973 -510
  42. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +973 -510
  43. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/input-contract.schema.json +38 -28
  44. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/orchestrator-prompt.md +98 -66
  45. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/output-contract.schema.json +27 -5
  46. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +300 -55
  47. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +300 -55
  48. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +120 -37
  49. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +300 -55
  50. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +300 -55
  51. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +57 -15
  52. package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +50 -23
  53. package/src/gdskills/bundled/skills/orchestration/task-implementer/output-contract.schema.json +6 -2
  54. package/src/gdskills/bundled/skills/orchestration/task-implementer/task-request.template.md +18 -12
  55. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +1 -1
  56. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +1 -1
  57. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +168 -9
  58. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +168 -9
  59. package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +7 -1
  60. package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +7 -1
  61. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +7 -1
  62. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +7 -1
  63. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +215 -9
  64. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +215 -9
  65. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +168 -9
  66. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +168 -9
  67. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +2 -2
  68. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +2 -2
  69. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +2 -2
  70. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +2 -2
  71. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +133 -9
  72. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +133 -9
  73. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +145 -9
  74. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +145 -9
  75. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +210 -9
  76. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +210 -9
  77. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +161 -9
  78. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +161 -9
  79. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +1 -1
  80. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +1 -1
  81. package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +1 -1
  82. package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +1 -1
  83. package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +1 -1
  84. package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +1 -1
  85. package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +1 -1
  86. package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +1 -1
  87. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +1 -1
  88. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +1 -1
  89. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +1 -1
  90. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +1 -1
  91. package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +1 -1
  92. package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +1 -1
  93. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +1 -1
  94. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +1 -1
  95. package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +1 -1
  96. package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +1 -1
  97. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +15 -1
  98. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +248 -165
  99. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +15 -1
  100. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +359 -19
  101. package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +1 -1
  102. package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +1 -1
  103. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +1 -1
  104. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +1 -1
  105. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +1 -1
  106. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +1 -1
  107. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +299 -24
  108. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +296 -31
  109. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +309 -18
  110. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +312 -17
  111. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +29 -30
  112. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +29 -30
  113. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +2 -2
  114. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +29 -30
  115. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +29 -30
  116. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.codex.md +243 -0
  117. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.cursor.md +243 -0
  118. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +243 -0
  119. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.opencode.md +243 -0
  120. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.zed.md +243 -0
  121. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +19 -23
  122. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +19 -23
  123. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +1 -1
  124. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +19 -23
  125. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +19 -23
  126. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +17 -24
  127. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +17 -24
  128. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +1 -1
  129. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +17 -24
  130. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +17 -24
  131. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +1 -1
  132. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +1 -1
  133. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +1 -1
  134. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +1 -1
  135. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -1
  136. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +1 -1
  137. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +1 -1
  138. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +1 -1
  139. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +2 -2
  140. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +26 -13
  141. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +1 -1
  142. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +36 -17
  143. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +1 -1
  144. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +1 -1
  145. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +1 -1
  146. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +1 -1
  147. package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
  148. package/src/gdskills/bundled/rules/core/code-review-b091-profile.mdc +0 -48
  149. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.claude.md +0 -46
  150. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.claude.md +0 -94
  151. package/src/gdskills/bundled/skills/quality/changelog/SKILL.claude.md +0 -45
  152. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.claude.md +0 -40
  153. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.claude.md +0 -45
  154. package/src/gdskills/bundled/skills/quality/deploy/SKILL.claude.md +0 -42
  155. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.claude.md +0 -48
  156. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.claude.md +0 -40
  157. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.claude.md +0 -30
  158. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.codex.md +0 -209
  159. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.cursor.md +0 -209
  160. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.md +0 -208
  161. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.opencode.md +0 -209
  162. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.zed.md +0 -209
@@ -31,6 +31,19 @@ Code Review Progress:
31
31
  - [ ] Step 6: Generate report with patches
32
32
  ```
33
33
 
34
+ ## Scope Boundaries
35
+ This skill focuses on:
36
+ - Correctness and logic bugs
37
+ - Type safety and TypeScript contract violations
38
+ - Security and null-safety issues
39
+ - Error handling completeness
40
+ - Performance anti-patterns
41
+
42
+ This skill does NOT duplicate:
43
+ - MobX store-specific patterns → covered by code-mobx-store-review
44
+ - Naming/formatting/import organization → covered by code-style-review
45
+ - Architecture opinions and persona-specific insights → covered by code-learned-review
46
+
34
47
  ## Главное правило: скоуп ревью
35
48
 
36
49
  Ревьюй только изменения, внесённые в текущей ветке с момента её ответвления от родительской.
@@ -41,38 +54,11 @@ Code Review Progress:
41
54
  - Если пользователь **явно передал commit hash/range**, ревьюй только запрошенный диапазон; локальные незакоммиченные изменения не добавляй, если это отдельно не попросили.
42
55
  - Не ревьюй не связанные с веткой части репозитория.
43
56
 
44
- ## Определение parent ref (детерминированно, именно родитель ветки)
57
+ ## Scope Detection
45
58
 
46
- Используй первый существующий вариант:
59
+ See shared script: `skills/shared/git-merge-base.md`
47
60
 
48
- 1. `origin/main`
49
- 2. `origin/master`
50
- 3. `main`
51
- 4. `master`
52
- 5. `@{upstream}` только если это не текущая feature-ветка
53
-
54
- ```bash
55
- BRANCH="$(git rev-parse --abbrev-ref HEAD)"
56
- UPSTREAM_REF="$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || true)"
57
-
58
- PARENT=""
59
- if git rev-parse --verify -q "origin/main" >/dev/null; then
60
- PARENT="origin/main"
61
- elif git rev-parse --verify -q "origin/master" >/dev/null; then
62
- PARENT="origin/master"
63
- elif git rev-parse --verify -q "main" >/dev/null; then
64
- PARENT="main"
65
- elif git rev-parse --verify -q "master" >/dev/null; then
66
- PARENT="master"
67
- elif [ -n "$UPSTREAM_REF" ] && [ "$UPSTREAM_REF" != "$BRANCH" ] && [ "$UPSTREAM_REF" != "origin/$BRANCH" ]; then
68
- PARENT="@{upstream}"
69
- else
70
- echo "Cannot determine parent ref" >&2
71
- exit 1
72
- fi
73
-
74
- BASE_SHA="$(git merge-base HEAD "$PARENT")"
75
- ```
61
+ Run the script from that file to determine MERGE_BASE and SCOPE before proceeding with the review.
76
62
 
77
63
  ## Команды, чтобы собрать “срез” для ревью
78
64
 
@@ -186,6 +172,19 @@ index 0000000..1111111 100644
186
172
 
187
173
  ---
188
174
 
175
+ ## Scope Boundaries
176
+
177
+ This skill covers **general AI code quality review** following `code-review-ai-assistant.mdc`.
178
+
179
+ | Concern | This skill | Use instead |
180
+ |---------|-----------|-------------|
181
+ | Types, safety, architecture, readability, performance, tests | ✅ YES | — |
182
+ | MobX store internals (actions, computed, reactions, async) | ⚠️ surface-level only | `code-mobx-store-review` for deep store analysis |
183
+ | Review against this project's own learned conventions | ❌ NO | `code-learned-review` |
184
+ | Pure style/naming/pattern audit | ❌ NO | `code-style-review` |
185
+
186
+ ---
187
+
189
188
  ## Job Context Awareness
190
189
 
191
190
  When dispatched by `job-orchestrator` as part of a job pipeline, the prompt MAY include:
@@ -0,0 +1,243 @@
1
+ ---
2
+ name: code-learned-review
3
+ description: "Reviews the current branch against conventions this project learned from its own pull-request comments, recorded in a local project skill. Ships with an empty checklist: the content comes from `keryx review learn`, never from the tool. Use when: a project has a learned review skill and wants its own accumulated conventions applied."
4
+ triggers:
5
+ - "learned review"
6
+ - "review with our conventions"
7
+ - "review using what we learned"
8
+ metadata:
9
+ author: "keryx"
10
+ version: "2.0.0"
11
+ category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
13
+ license: "MIT"
14
+ ---
15
+
16
+ # Learned Code Review (current branch only)
17
+
18
+ ## What this skill is, and what it is not
19
+
20
+ This skill carries **no review conventions of its own**. It is a mechanism with
21
+ an empty checklist, and the checklist is filled in by the project that installs
22
+ it.
23
+
24
+ What it applies is a **project skill** under
25
+ `.metaproject/project-skills/<module>/<skill>/SKILL.md`, whose `Review Lessons`,
26
+ `Review Checklist` and `Anti-patterns` sections were written from pull-request
27
+ comments left by the people that project named. Point a second project at
28
+ different reviewers and its learned skill diverges from the first. That is the
29
+ intended behaviour: there is no single correct checklist, and shipping one would
30
+ mean shipping one team's opinions to everybody.
31
+
32
+ If this project has no learned skill yet, **say so and stop**. An empty learned
33
+ review is not a generic review; use `review-orchestrator` for that.
34
+
35
+ ## Workflow
36
+
37
+ Copy this checklist and track progress:
38
+
39
+ ```
40
+ Learned Review Progress:
41
+ - [ ] Step 1: Read .metaproject/review-learning.config.json — which skill is this project's?
42
+ - [ ] Step 2: Read that project skill; if it has no lessons, stop and say so
43
+ - [ ] Step 3: Determine parent branch and calculate merge-base
44
+ - [ ] Step 4: Collect git diff (committed + local changes)
45
+ - [ ] Step 5: Apply the learned checklist, lesson by lesson
46
+ - [ ] Step 6: Report each finding with the learned lesson it rests on
47
+ - [ ] Step 7: Feed new pull-request comments back with `keryx review learn`
48
+ ```
49
+
50
+ ## Mandatory rules
51
+
52
+ 1. **Default scope (no commit hash/range given)**: the review covers **all**
53
+ changes on the current branch from the merge-base with its parent branch —
54
+ committed (`BASE_SHA..HEAD`) and local uncommitted (staged/unstaged/untracked).
55
+ 2. **Explicit commit hash/range**: review only the requested range; do not add
56
+ local uncommitted changes unless asked separately.
57
+ 3. **The checklist is the project's, not this file's**: every finding cites a
58
+ line in the project skill named by
59
+ `.metaproject/review-learning.config.json`. A finding with nothing behind it
60
+ there is a generic finding and belongs to the reviewer that owns it —
61
+ `review-logic`, `review-architecture`, `review-security-code`.
62
+ 4. **Result**: a detailed report with an explanation per finding and a concrete
63
+ fix (a minimal patch where the fix is obvious).
64
+
65
+ ## Where the checklist comes from
66
+
67
+ ```bash
68
+ # 1. Which local skill does this project teach, from which repository,
69
+ # and whose comments count?
70
+ cat .metaproject/review-learning.config.json
71
+
72
+ # 2. The comments themselves, collected once per round and kept on disk.
73
+ keryx review comments collect --repo <owner/repo> --pr <n> --sha <head-sha>
74
+
75
+ # 3. The join: configured authors only, read from the record above, never
76
+ # re-fetched. Writes a proposal and changes nothing.
77
+ keryx review learn --pr <n>
78
+
79
+ # 4. The only writer. Bumps the skill version, appends to skill-changelog.md,
80
+ # and refuses any target outside .metaproject/project-skills/.
81
+ keryx skills learn apply .metaproject/data/gdskills/proposals/<id>.json
82
+ ```
83
+
84
+ An author the config does not name contributes nothing — their text reaches no
85
+ proposal and no `SKILL.md`. A project with no config file does not learn, and
86
+ that is a supported state rather than an error.
87
+
88
+ ## Scope Detection
89
+
90
+ See shared script: `skills/shared/git-merge-base.md`
91
+
92
+ Run the script from that file to determine MERGE_BASE and SCOPE before
93
+ proceeding with the review.
94
+
95
+ ## Commands to assemble the review slice
96
+
97
+ ### A) Default mode (no hash/range from the user)
98
+
99
+ ```bash
100
+ git status
101
+
102
+ # The committed part of the branch
103
+ git log --oneline "${BASE_SHA}..HEAD"
104
+ git diff --stat "${BASE_SHA}..HEAD"
105
+ git diff --name-status "${BASE_SHA}..HEAD"
106
+ git diff "${BASE_SHA}..HEAD"
107
+
108
+ # The full current slice from merge-base to the working tree:
109
+ # commits + staged + unstaged
110
+ # (untracked files via git status / git ls-files)
111
+ git diff --stat "${BASE_SHA}"
112
+ git diff --name-status "${BASE_SHA}"
113
+ git diff "${BASE_SHA}"
114
+ git ls-files --others --exclude-standard
115
+ ```
116
+
117
+ ### B) Explicit hash/range mode
118
+
119
+ ```bash
120
+ git show --stat --name-status --patch <COMMIT_SHA>
121
+ git log --oneline <FROM_SHA>..<TO_SHA>
122
+ git diff --stat <FROM_SHA>..<TO_SHA>
123
+ git diff --name-status <FROM_SHA>..<TO_SHA>
124
+ git diff <FROM_SHA>..<TO_SHA>
125
+ ```
126
+
127
+ ## How to review
128
+
129
+ Work the learned checklist one lesson at a time against the diff. For each
130
+ lesson in the project skill, ask whether the diff contains the situation the
131
+ lesson describes, and record the answer either way — a lesson that never matches
132
+ anything is a lesson worth retiring, and only a review that checked it can say
133
+ so.
134
+
135
+ Three rules govern the application, and they are the same three whatever the
136
+ lessons say:
137
+
138
+ - **A lesson is evidence, not authority.** It records that somebody objected to
139
+ something once. If the diff has a reason the objection does not apply here, the
140
+ reason wins and the finding is not raised.
141
+ - **Do not generalise a lesson past its text.** A lesson about one function is
142
+ about that shape of function. Widening it into a rule about a layer, a module
143
+ or a language is inventing a convention the project never agreed to.
144
+ - **Do not attribute.** The record says a comment was left. Reporting a finding
145
+ as what a particular person would want turns a checklist back into a persona,
146
+ which is the defect this skill exists to remove.
147
+
148
+ ## Output format
149
+
150
+ ```markdown
151
+ ## Verdict
152
+
153
+ <APPROVE / APPROVE WITH SUGGESTIONS / REQUEST CHANGES / COMMENT> + the 1-3 most
154
+ important points.
155
+
156
+ ## Review scope (current branch only)
157
+
158
+ - Branch: `<BRANCH>`
159
+ - Parent ref: `<PARENT>`
160
+ - Merge-base: `<BASE_SHA>`
161
+ - Scope mode: `<default-with-uncommitted | explicit-hash-range>`
162
+ - Commits (merge-base..HEAD): <N>
163
+ - Changed files: <list or count>
164
+
165
+ ## Learned checklist applied
166
+
167
+ - Project skill: `<module>/<skill>` version `<x.y.z>`
168
+ - Lessons checked: <N>
169
+ - Lessons that matched: <N>
170
+
171
+ ## Findings
172
+
173
+ <findings, grouped by the learned lesson each rests on>
174
+
175
+ ## Findings with no learned lesson behind them
176
+
177
+ <either empty, or listed separately and routed to the reviewer that owns them>
178
+
179
+ ## Suggested fixes (patches)
180
+
181
+ <minimal unified diffs for the obvious ones>
182
+ ```
183
+
184
+ ### Required shape of each finding
185
+
186
+ - **Severity**: `blocker` / `major` / `minor`
187
+ - **Learned lesson**: the line from the project skill this rests on
188
+ - **Location**: file path + the relevant hunk from the diff
189
+ - **Problem**: what is wrong
190
+ - **Why it matters**: correctness / testability / conventions / maintainability
191
+ - **Suggested fix**: what specifically to do, without widening scope
192
+ - **Optional patch**: a unified diff when the fix is simple
193
+
194
+ Example patch block:
195
+
196
+ ```diff
197
+ diff --git a/path/file.ts b/path/file.ts
198
+ index 0000000..1111111 100644
199
+ --- a/path/file.ts
200
+ +++ b/path/file.ts
201
+ @@ -1,3 +1,3 @@
202
+ -const x = 1;
203
+ +const x = 2;
204
+ ```
205
+
206
+ ---
207
+
208
+ ## Scope Boundaries
209
+
210
+ This skill covers **review against this project's own learned conventions**,
211
+ following `code-review-learned-profile.mdc`. It has no opinions of its own.
212
+
213
+ | Concern | This skill | Use instead |
214
+ | -------------------------------------------------------------- | ---------- | ------------------------ |
215
+ | This project's accumulated review conventions | ✅ YES | — |
216
+ | General AI review (broader quality, performance, UX) | ❌ NO | `code-ai-review` |
217
+ | MobX store internals (actions, computed, reactions) | ❌ NO | `code-mobx-store-review` |
218
+ | Pure style/naming/architecture pattern audit | ❌ NO | `code-style-review` |
219
+ | Logic correctness with no learned lesson behind it | ❌ NO | `review-logic` |
220
+
221
+ ---
222
+
223
+ ## Job Context Awareness
224
+
225
+ When dispatched by `job-orchestrator` as part of a job pipeline, the prompt MAY
226
+ include:
227
+
228
+ ```
229
+ JOB_NAME: <job-name>
230
+ CONTEXT_PATH: .metaproject/jobs/<job-name>/ai/context.md
231
+ ```
232
+
233
+ If provided and the file exists, read the context document before starting the
234
+ review. Use it to:
235
+
236
+ - Understand which libraries and patterns were intentionally chosen for the
237
+ implementation
238
+ - Avoid flagging correct library usage as issues
239
+ - Provide more accurate findings by understanding the project's architectural
240
+ decisions
241
+
242
+ If the file does not exist or is not provided, proceed normally — context is
243
+ optional and non-blocking.
@@ -0,0 +1,243 @@
1
+ ---
2
+ name: code-learned-review
3
+ description: "Reviews the current branch against conventions this project learned from its own pull-request comments, recorded in a local project skill. Ships with an empty checklist: the content comes from `keryx review learn`, never from the tool. Use when: a project has a learned review skill and wants its own accumulated conventions applied."
4
+ triggers:
5
+ - "learned review"
6
+ - "review with our conventions"
7
+ - "review using what we learned"
8
+ metadata:
9
+ author: "keryx"
10
+ version: "2.0.0"
11
+ category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
13
+ license: "MIT"
14
+ ---
15
+
16
+ # Learned Code Review (current branch only)
17
+
18
+ ## What this skill is, and what it is not
19
+
20
+ This skill carries **no review conventions of its own**. It is a mechanism with
21
+ an empty checklist, and the checklist is filled in by the project that installs
22
+ it.
23
+
24
+ What it applies is a **project skill** under
25
+ `.metaproject/project-skills/<module>/<skill>/SKILL.md`, whose `Review Lessons`,
26
+ `Review Checklist` and `Anti-patterns` sections were written from pull-request
27
+ comments left by the people that project named. Point a second project at
28
+ different reviewers and its learned skill diverges from the first. That is the
29
+ intended behaviour: there is no single correct checklist, and shipping one would
30
+ mean shipping one team's opinions to everybody.
31
+
32
+ If this project has no learned skill yet, **say so and stop**. An empty learned
33
+ review is not a generic review; use `review-orchestrator` for that.
34
+
35
+ ## Workflow
36
+
37
+ Copy this checklist and track progress:
38
+
39
+ ```
40
+ Learned Review Progress:
41
+ - [ ] Step 1: Read .metaproject/review-learning.config.json — which skill is this project's?
42
+ - [ ] Step 2: Read that project skill; if it has no lessons, stop and say so
43
+ - [ ] Step 3: Determine parent branch and calculate merge-base
44
+ - [ ] Step 4: Collect git diff (committed + local changes)
45
+ - [ ] Step 5: Apply the learned checklist, lesson by lesson
46
+ - [ ] Step 6: Report each finding with the learned lesson it rests on
47
+ - [ ] Step 7: Feed new pull-request comments back with `keryx review learn`
48
+ ```
49
+
50
+ ## Mandatory rules
51
+
52
+ 1. **Default scope (no commit hash/range given)**: the review covers **all**
53
+ changes on the current branch from the merge-base with its parent branch —
54
+ committed (`BASE_SHA..HEAD`) and local uncommitted (staged/unstaged/untracked).
55
+ 2. **Explicit commit hash/range**: review only the requested range; do not add
56
+ local uncommitted changes unless asked separately.
57
+ 3. **The checklist is the project's, not this file's**: every finding cites a
58
+ line in the project skill named by
59
+ `.metaproject/review-learning.config.json`. A finding with nothing behind it
60
+ there is a generic finding and belongs to the reviewer that owns it —
61
+ `review-logic`, `review-architecture`, `review-security-code`.
62
+ 4. **Result**: a detailed report with an explanation per finding and a concrete
63
+ fix (a minimal patch where the fix is obvious).
64
+
65
+ ## Where the checklist comes from
66
+
67
+ ```bash
68
+ # 1. Which local skill does this project teach, from which repository,
69
+ # and whose comments count?
70
+ cat .metaproject/review-learning.config.json
71
+
72
+ # 2. The comments themselves, collected once per round and kept on disk.
73
+ keryx review comments collect --repo <owner/repo> --pr <n> --sha <head-sha>
74
+
75
+ # 3. The join: configured authors only, read from the record above, never
76
+ # re-fetched. Writes a proposal and changes nothing.
77
+ keryx review learn --pr <n>
78
+
79
+ # 4. The only writer. Bumps the skill version, appends to skill-changelog.md,
80
+ # and refuses any target outside .metaproject/project-skills/.
81
+ keryx skills learn apply .metaproject/data/gdskills/proposals/<id>.json
82
+ ```
83
+
84
+ An author the config does not name contributes nothing — their text reaches no
85
+ proposal and no `SKILL.md`. A project with no config file does not learn, and
86
+ that is a supported state rather than an error.
87
+
88
+ ## Scope Detection
89
+
90
+ See shared script: `skills/shared/git-merge-base.md`
91
+
92
+ Run the script from that file to determine MERGE_BASE and SCOPE before
93
+ proceeding with the review.
94
+
95
+ ## Commands to assemble the review slice
96
+
97
+ ### A) Default mode (no hash/range from the user)
98
+
99
+ ```bash
100
+ git status
101
+
102
+ # The committed part of the branch
103
+ git log --oneline "${BASE_SHA}..HEAD"
104
+ git diff --stat "${BASE_SHA}..HEAD"
105
+ git diff --name-status "${BASE_SHA}..HEAD"
106
+ git diff "${BASE_SHA}..HEAD"
107
+
108
+ # The full current slice from merge-base to the working tree:
109
+ # commits + staged + unstaged
110
+ # (untracked files via git status / git ls-files)
111
+ git diff --stat "${BASE_SHA}"
112
+ git diff --name-status "${BASE_SHA}"
113
+ git diff "${BASE_SHA}"
114
+ git ls-files --others --exclude-standard
115
+ ```
116
+
117
+ ### B) Explicit hash/range mode
118
+
119
+ ```bash
120
+ git show --stat --name-status --patch <COMMIT_SHA>
121
+ git log --oneline <FROM_SHA>..<TO_SHA>
122
+ git diff --stat <FROM_SHA>..<TO_SHA>
123
+ git diff --name-status <FROM_SHA>..<TO_SHA>
124
+ git diff <FROM_SHA>..<TO_SHA>
125
+ ```
126
+
127
+ ## How to review
128
+
129
+ Work the learned checklist one lesson at a time against the diff. For each
130
+ lesson in the project skill, ask whether the diff contains the situation the
131
+ lesson describes, and record the answer either way — a lesson that never matches
132
+ anything is a lesson worth retiring, and only a review that checked it can say
133
+ so.
134
+
135
+ Three rules govern the application, and they are the same three whatever the
136
+ lessons say:
137
+
138
+ - **A lesson is evidence, not authority.** It records that somebody objected to
139
+ something once. If the diff has a reason the objection does not apply here, the
140
+ reason wins and the finding is not raised.
141
+ - **Do not generalise a lesson past its text.** A lesson about one function is
142
+ about that shape of function. Widening it into a rule about a layer, a module
143
+ or a language is inventing a convention the project never agreed to.
144
+ - **Do not attribute.** The record says a comment was left. Reporting a finding
145
+ as what a particular person would want turns a checklist back into a persona,
146
+ which is the defect this skill exists to remove.
147
+
148
+ ## Output format
149
+
150
+ ```markdown
151
+ ## Verdict
152
+
153
+ <APPROVE / APPROVE WITH SUGGESTIONS / REQUEST CHANGES / COMMENT> + the 1-3 most
154
+ important points.
155
+
156
+ ## Review scope (current branch only)
157
+
158
+ - Branch: `<BRANCH>`
159
+ - Parent ref: `<PARENT>`
160
+ - Merge-base: `<BASE_SHA>`
161
+ - Scope mode: `<default-with-uncommitted | explicit-hash-range>`
162
+ - Commits (merge-base..HEAD): <N>
163
+ - Changed files: <list or count>
164
+
165
+ ## Learned checklist applied
166
+
167
+ - Project skill: `<module>/<skill>` version `<x.y.z>`
168
+ - Lessons checked: <N>
169
+ - Lessons that matched: <N>
170
+
171
+ ## Findings
172
+
173
+ <findings, grouped by the learned lesson each rests on>
174
+
175
+ ## Findings with no learned lesson behind them
176
+
177
+ <either empty, or listed separately and routed to the reviewer that owns them>
178
+
179
+ ## Suggested fixes (patches)
180
+
181
+ <minimal unified diffs for the obvious ones>
182
+ ```
183
+
184
+ ### Required shape of each finding
185
+
186
+ - **Severity**: `blocker` / `major` / `minor`
187
+ - **Learned lesson**: the line from the project skill this rests on
188
+ - **Location**: file path + the relevant hunk from the diff
189
+ - **Problem**: what is wrong
190
+ - **Why it matters**: correctness / testability / conventions / maintainability
191
+ - **Suggested fix**: what specifically to do, without widening scope
192
+ - **Optional patch**: a unified diff when the fix is simple
193
+
194
+ Example patch block:
195
+
196
+ ```diff
197
+ diff --git a/path/file.ts b/path/file.ts
198
+ index 0000000..1111111 100644
199
+ --- a/path/file.ts
200
+ +++ b/path/file.ts
201
+ @@ -1,3 +1,3 @@
202
+ -const x = 1;
203
+ +const x = 2;
204
+ ```
205
+
206
+ ---
207
+
208
+ ## Scope Boundaries
209
+
210
+ This skill covers **review against this project's own learned conventions**,
211
+ following `code-review-learned-profile.mdc`. It has no opinions of its own.
212
+
213
+ | Concern | This skill | Use instead |
214
+ | -------------------------------------------------------------- | ---------- | ------------------------ |
215
+ | This project's accumulated review conventions | ✅ YES | — |
216
+ | General AI review (broader quality, performance, UX) | ❌ NO | `code-ai-review` |
217
+ | MobX store internals (actions, computed, reactions) | ❌ NO | `code-mobx-store-review` |
218
+ | Pure style/naming/architecture pattern audit | ❌ NO | `code-style-review` |
219
+ | Logic correctness with no learned lesson behind it | ❌ NO | `review-logic` |
220
+
221
+ ---
222
+
223
+ ## Job Context Awareness
224
+
225
+ When dispatched by `job-orchestrator` as part of a job pipeline, the prompt MAY
226
+ include:
227
+
228
+ ```
229
+ JOB_NAME: <job-name>
230
+ CONTEXT_PATH: .metaproject/jobs/<job-name>/ai/context.md
231
+ ```
232
+
233
+ If provided and the file exists, read the context document before starting the
234
+ review. Use it to:
235
+
236
+ - Understand which libraries and patterns were intentionally chosen for the
237
+ implementation
238
+ - Avoid flagging correct library usage as issues
239
+ - Provide more accurate findings by understanding the project's architectural
240
+ decisions
241
+
242
+ If the file does not exist or is not provided, proceed normally — context is
243
+ optional and non-blocking.