@mrciphersmith/keryx 0.2.70 → 0.2.72

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 (192) hide show
  1. package/dist/cli.js +25237 -17483
  2. package/docs/README.md +54 -0
  3. package/docs/requirements/shared-agent-context/README.md +104 -0
  4. package/package.json +3 -2
  5. package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +81 -0
  6. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +1 -1
  7. package/src/gdskills/bundled/rules/core/model-selection.mdc +184 -31
  8. package/src/gdskills/bundled/rules/core/review-strict-profile.mdc +8 -4
  9. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +36 -0
  10. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +1 -1
  11. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +1 -1
  12. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.md +2 -1
  13. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +1 -1
  14. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +1 -1
  15. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +3 -3
  16. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +3 -3
  17. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +3 -3
  18. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +3 -3
  19. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +3 -3
  20. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +2 -2
  21. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +4 -4
  22. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +4 -4
  23. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +4 -4
  24. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +4 -4
  25. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +4 -4
  26. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +2 -2
  27. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +2 -2
  28. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +3 -3
  29. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +80 -21
  30. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +1 -1
  31. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +1 -1
  32. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.md +1 -1
  33. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +1 -1
  34. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +1 -1
  35. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +2 -2
  36. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +2 -2
  37. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +3 -2
  38. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +2 -2
  39. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +2 -2
  40. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +997 -509
  41. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +997 -509
  42. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +968 -513
  43. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +997 -509
  44. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +997 -509
  45. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/input-contract.schema.json +38 -28
  46. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/orchestrator-prompt.md +98 -66
  47. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/output-contract.schema.json +27 -5
  48. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +20 -2
  49. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +20 -2
  50. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +21 -2
  51. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +20 -2
  52. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +20 -2
  53. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +1 -1
  54. package/src/gdskills/bundled/skills/planning/autodoc-analyst/SKILL.md +2 -1
  55. package/src/gdskills/bundled/skills/planning/autodoc-architect/SKILL.md +3 -1
  56. package/src/gdskills/bundled/skills/planning/autodoc-assembler/SKILL.md +2 -1
  57. package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +2 -1
  58. package/src/gdskills/bundled/skills/planning/autodoc-scanner/SKILL.md +2 -1
  59. package/src/gdskills/bundled/skills/planning/autodoc-writer/SKILL.md +2 -1
  60. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +1 -1
  61. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +1 -1
  62. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +1 -1
  63. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +1 -1
  64. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +1 -1
  65. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +2 -1
  66. package/src/gdskills/bundled/skills/planning/docpack-orchestrator/SKILL.md +1 -1
  67. package/src/gdskills/bundled/skills/planning/docpack-review/SKILL.md +1 -1
  68. package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +1 -1
  69. package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +1 -1
  70. package/src/gdskills/bundled/skills/planning/interview/SKILL.md +1 -1
  71. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +1 -1
  72. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +1 -1
  73. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +1 -1
  74. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +1 -1
  75. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +1 -1
  76. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +2 -1
  77. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +1 -1
  78. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +1 -1
  79. package/src/gdskills/bundled/skills/planning/planner/SKILL.md +2 -1
  80. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +1 -1
  81. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +1 -1
  82. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.md +1 -1
  83. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +1 -1
  84. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +1 -1
  85. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +1 -1
  86. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +1 -1
  87. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +2 -1
  88. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +1 -1
  89. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +1 -1
  90. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +2 -1
  91. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +1 -1
  92. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +1 -1
  93. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +2 -1
  94. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +1 -1
  95. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +1 -1
  96. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +2 -1
  97. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +1 -1
  98. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +1 -1
  99. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.md +1 -1
  100. package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +1 -1
  101. package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +1 -1
  102. package/src/gdskills/bundled/skills/platform/hookify/SKILL.md +1 -1
  103. package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +1 -1
  104. package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +1 -1
  105. package/src/gdskills/bundled/skills/quality/changelog/SKILL.md +1 -1
  106. package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +1 -1
  107. package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +1 -1
  108. package/src/gdskills/bundled/skills/quality/commit/SKILL.md +1 -1
  109. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +1 -1
  110. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +1 -1
  111. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.md +1 -1
  112. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +1 -1
  113. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +1 -1
  114. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.md +1 -1
  115. package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +1 -1
  116. package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +1 -1
  117. package/src/gdskills/bundled/skills/quality/deploy/SKILL.md +1 -1
  118. package/src/gdskills/bundled/skills/quality/metaproject-security/SKILL.md +1 -1
  119. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +1 -1
  120. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +1 -1
  121. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.md +1 -1
  122. package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +1 -1
  123. package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +1 -1
  124. package/src/gdskills/bundled/skills/quality/pr/SKILL.md +1 -1
  125. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +1 -1
  126. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +1 -1
  127. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +1 -1
  128. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +1 -1
  129. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +1 -1
  130. package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +1 -1
  131. package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +1 -1
  132. package/src/gdskills/bundled/skills/quality/push/SKILL.md +1 -1
  133. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +1 -1
  134. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +1 -1
  135. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.md +1 -1
  136. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +1 -1
  137. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +1 -1
  138. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.md +1 -1
  139. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +1 -1
  140. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +1 -1
  141. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +1 -1
  142. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +1 -1
  143. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +1 -1
  144. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +1 -1
  145. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +1 -1
  146. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +3 -3
  147. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +1 -1
  148. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +1 -1
  149. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.codex.md +252 -0
  150. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.cursor.md +252 -0
  151. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +243 -0
  152. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.opencode.md +252 -0
  153. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.zed.md +252 -0
  154. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +1 -1
  155. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +1 -1
  156. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +3 -2
  157. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +1 -1
  158. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +1 -1
  159. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +1 -1
  160. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +1 -1
  161. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +2 -2
  162. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +1 -1
  163. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +1 -1
  164. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +38 -11
  165. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +49 -15
  166. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +50 -13
  167. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +35 -3
  168. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +34 -3
  169. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +71 -30
  170. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +35 -4
  171. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +50 -16
  172. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +41 -13
  173. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +599 -30
  174. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +7 -0
  175. package/src/gdskills/bundled/skills/review/review-orchestrator/verification-claim.schema.json +78 -0
  176. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +44 -14
  177. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +44 -19
  178. package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +185 -0
  179. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +45 -14
  180. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +27 -7
  181. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +36 -4
  182. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +276 -0
  183. package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
  184. package/src/gdskills/contracts/review-finding.schema.json +119 -1
  185. package/src/gdskills/contracts/subagent-dispatch.schema.json +59 -3
  186. package/src/gdskills/bundled/rules/core/code-review-b091-profile.mdc +0 -48
  187. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.codex.md +0 -209
  188. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.cursor.md +0 -209
  189. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.md +0 -208
  190. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.opencode.md +0 -209
  191. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.zed.md +0 -209
  192. package/src/gdskills/bundled/skills/review/review-strict/SKILL.md +0 -328
@@ -0,0 +1,252 @@
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
+ ## Determining the parent ref (deterministic — the branch parent, not the upstream)
89
+
90
+ Use the first variant that exists:
91
+
92
+ 1. `origin/main`
93
+ 2. `origin/master`
94
+ 3. `main`
95
+ 4. `master`
96
+ 5. `@{upstream}` **only when it is not the current feature branch**
97
+
98
+ ```bash
99
+ BRANCH="$(git rev-parse --abbrev-ref HEAD)"
100
+ UPSTREAM_REF="$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || true)"
101
+
102
+ PARENT=""
103
+ if git rev-parse --verify -q "origin/main" >/dev/null; then
104
+ PARENT="origin/main"
105
+ elif git rev-parse --verify -q "origin/master" >/dev/null; then
106
+ PARENT="origin/master"
107
+ elif git rev-parse --verify -q "main" >/dev/null; then
108
+ PARENT="main"
109
+ elif git rev-parse --verify -q "master" >/dev/null; then
110
+ PARENT="master"
111
+ elif [ -n "$UPSTREAM_REF" ] && [ "$UPSTREAM_REF" != "$BRANCH" ] && [ "$UPSTREAM_REF" != "origin/$BRANCH" ]; then
112
+ PARENT="@{upstream}"
113
+ else
114
+ echo "Cannot determine parent ref" >&2
115
+ exit 1
116
+ fi
117
+
118
+ BASE_SHA="$(git merge-base HEAD "$PARENT")"
119
+ ```
120
+
121
+ ## Commands to assemble the review slice
122
+
123
+ ### A) Default mode (no hash/range from the user)
124
+
125
+ ```bash
126
+ git status
127
+
128
+ # The committed part of the branch
129
+ git log --oneline "${BASE_SHA}..HEAD"
130
+ git diff --stat "${BASE_SHA}..HEAD"
131
+ git diff --name-status "${BASE_SHA}..HEAD"
132
+ git diff "${BASE_SHA}..HEAD"
133
+
134
+ # The full current slice from merge-base to the working tree:
135
+ # commits + staged + unstaged
136
+ # (untracked files via git status / git ls-files)
137
+ git diff --stat "${BASE_SHA}"
138
+ git diff --name-status "${BASE_SHA}"
139
+ git diff "${BASE_SHA}"
140
+ git ls-files --others --exclude-standard
141
+ ```
142
+
143
+ ### B) Explicit hash/range mode
144
+
145
+ ```bash
146
+ git show --stat --name-status --patch <COMMIT_SHA>
147
+ git log --oneline <FROM_SHA>..<TO_SHA>
148
+ git diff --stat <FROM_SHA>..<TO_SHA>
149
+ git diff --name-status <FROM_SHA>..<TO_SHA>
150
+ git diff <FROM_SHA>..<TO_SHA>
151
+ ```
152
+
153
+ ## How to review
154
+
155
+ Work the learned checklist one lesson at a time against the diff. For each
156
+ lesson in the project skill, ask whether the diff contains the situation the
157
+ lesson describes, and record the answer either way — a lesson that never matches
158
+ anything is a lesson worth retiring, and only a review that checked it can say
159
+ so.
160
+
161
+ Three rules govern the application, and they are the same three whatever the
162
+ lessons say:
163
+
164
+ - **A lesson is evidence, not authority.** It records that somebody objected to
165
+ something once. If the diff has a reason the objection does not apply here, the
166
+ reason wins and the finding is not raised.
167
+ - **Do not generalise a lesson past its text.** A lesson about one function is
168
+ about that shape of function. Widening it into a rule about a layer, a module
169
+ or a language is inventing a convention the project never agreed to.
170
+ - **Do not attribute.** The record says a comment was left. Reporting a finding
171
+ as what a particular person would want turns a checklist back into a persona,
172
+ which is the defect this skill exists to remove.
173
+
174
+ ## Output format
175
+
176
+ ```markdown
177
+ ## Verdict
178
+
179
+ <APPROVE / APPROVE WITH SUGGESTIONS / REQUEST CHANGES / COMMENT> + the 1-3 most
180
+ important points.
181
+
182
+ ## Review scope (current branch only)
183
+
184
+ - Branch: `<BRANCH>`
185
+ - Parent ref: `<PARENT>`
186
+ - Merge-base: `<BASE_SHA>`
187
+ - Scope mode: `<default-with-uncommitted | explicit-hash-range>`
188
+ - Commits (merge-base..HEAD): <N>
189
+ - Changed files: <list or count>
190
+
191
+ ## Learned checklist applied
192
+
193
+ - Project skill: `<module>/<skill>` version `<x.y.z>`
194
+ - Lessons checked: <N>
195
+ - Lessons that matched: <N>
196
+
197
+ ## Findings
198
+
199
+ <findings, grouped by the learned lesson each rests on>
200
+
201
+ ## Findings with no learned lesson behind them
202
+
203
+ <either empty, or listed separately and routed to the reviewer that owns them>
204
+
205
+ ## Suggested fixes (patches)
206
+
207
+ <minimal unified diffs for the obvious ones>
208
+ ```
209
+
210
+ ### Required shape of each finding
211
+
212
+ - **Severity**: `blocker` / `major` / `minor`
213
+ - **Learned lesson**: the line from the project skill this rests on
214
+ - **Location**: file path + the relevant hunk from the diff
215
+ - **Problem**: what is wrong
216
+ - **Why it matters**: correctness / testability / conventions / maintainability
217
+ - **Suggested fix**: what specifically to do, without widening scope
218
+ - **Optional patch**: a unified diff when the fix is simple
219
+
220
+ Example patch block:
221
+
222
+ ```diff
223
+ diff --git a/path/file.ts b/path/file.ts
224
+ index 0000000..1111111 100644
225
+ --- a/path/file.ts
226
+ +++ b/path/file.ts
227
+ @@ -1,3 +1,3 @@
228
+ -const x = 1;
229
+ +const x = 2;
230
+ ```
231
+
232
+ ## Job Context Awareness
233
+
234
+ When dispatched by `job-orchestrator` as part of a job pipeline, the prompt MAY
235
+ include:
236
+
237
+ ```
238
+ JOB_NAME: <job-name>
239
+ CONTEXT_PATH: .metaproject/jobs/<job-name>/ai/context.md
240
+ ```
241
+
242
+ If provided and the file exists, read the context document before starting the
243
+ review. Use it to:
244
+
245
+ - Understand which libraries and patterns were intentionally chosen for the
246
+ implementation
247
+ - Avoid flagging correct library usage as issues
248
+ - Provide more accurate findings by understanding the project's architectural
249
+ decisions
250
+
251
+ If the file does not exist or is not provided, proceed normally — context is
252
+ optional and non-blocking.
@@ -0,0 +1,252 @@
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
+ ## Determining the parent ref (deterministic — the branch parent, not the upstream)
89
+
90
+ Use the first variant that exists:
91
+
92
+ 1. `origin/main`
93
+ 2. `origin/master`
94
+ 3. `main`
95
+ 4. `master`
96
+ 5. `@{upstream}` **only when it is not the current feature branch**
97
+
98
+ ```bash
99
+ BRANCH="$(git rev-parse --abbrev-ref HEAD)"
100
+ UPSTREAM_REF="$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || true)"
101
+
102
+ PARENT=""
103
+ if git rev-parse --verify -q "origin/main" >/dev/null; then
104
+ PARENT="origin/main"
105
+ elif git rev-parse --verify -q "origin/master" >/dev/null; then
106
+ PARENT="origin/master"
107
+ elif git rev-parse --verify -q "main" >/dev/null; then
108
+ PARENT="main"
109
+ elif git rev-parse --verify -q "master" >/dev/null; then
110
+ PARENT="master"
111
+ elif [ -n "$UPSTREAM_REF" ] && [ "$UPSTREAM_REF" != "$BRANCH" ] && [ "$UPSTREAM_REF" != "origin/$BRANCH" ]; then
112
+ PARENT="@{upstream}"
113
+ else
114
+ echo "Cannot determine parent ref" >&2
115
+ exit 1
116
+ fi
117
+
118
+ BASE_SHA="$(git merge-base HEAD "$PARENT")"
119
+ ```
120
+
121
+ ## Commands to assemble the review slice
122
+
123
+ ### A) Default mode (no hash/range from the user)
124
+
125
+ ```bash
126
+ git status
127
+
128
+ # The committed part of the branch
129
+ git log --oneline "${BASE_SHA}..HEAD"
130
+ git diff --stat "${BASE_SHA}..HEAD"
131
+ git diff --name-status "${BASE_SHA}..HEAD"
132
+ git diff "${BASE_SHA}..HEAD"
133
+
134
+ # The full current slice from merge-base to the working tree:
135
+ # commits + staged + unstaged
136
+ # (untracked files via git status / git ls-files)
137
+ git diff --stat "${BASE_SHA}"
138
+ git diff --name-status "${BASE_SHA}"
139
+ git diff "${BASE_SHA}"
140
+ git ls-files --others --exclude-standard
141
+ ```
142
+
143
+ ### B) Explicit hash/range mode
144
+
145
+ ```bash
146
+ git show --stat --name-status --patch <COMMIT_SHA>
147
+ git log --oneline <FROM_SHA>..<TO_SHA>
148
+ git diff --stat <FROM_SHA>..<TO_SHA>
149
+ git diff --name-status <FROM_SHA>..<TO_SHA>
150
+ git diff <FROM_SHA>..<TO_SHA>
151
+ ```
152
+
153
+ ## How to review
154
+
155
+ Work the learned checklist one lesson at a time against the diff. For each
156
+ lesson in the project skill, ask whether the diff contains the situation the
157
+ lesson describes, and record the answer either way — a lesson that never matches
158
+ anything is a lesson worth retiring, and only a review that checked it can say
159
+ so.
160
+
161
+ Three rules govern the application, and they are the same three whatever the
162
+ lessons say:
163
+
164
+ - **A lesson is evidence, not authority.** It records that somebody objected to
165
+ something once. If the diff has a reason the objection does not apply here, the
166
+ reason wins and the finding is not raised.
167
+ - **Do not generalise a lesson past its text.** A lesson about one function is
168
+ about that shape of function. Widening it into a rule about a layer, a module
169
+ or a language is inventing a convention the project never agreed to.
170
+ - **Do not attribute.** The record says a comment was left. Reporting a finding
171
+ as what a particular person would want turns a checklist back into a persona,
172
+ which is the defect this skill exists to remove.
173
+
174
+ ## Output format
175
+
176
+ ```markdown
177
+ ## Verdict
178
+
179
+ <APPROVE / APPROVE WITH SUGGESTIONS / REQUEST CHANGES / COMMENT> + the 1-3 most
180
+ important points.
181
+
182
+ ## Review scope (current branch only)
183
+
184
+ - Branch: `<BRANCH>`
185
+ - Parent ref: `<PARENT>`
186
+ - Merge-base: `<BASE_SHA>`
187
+ - Scope mode: `<default-with-uncommitted | explicit-hash-range>`
188
+ - Commits (merge-base..HEAD): <N>
189
+ - Changed files: <list or count>
190
+
191
+ ## Learned checklist applied
192
+
193
+ - Project skill: `<module>/<skill>` version `<x.y.z>`
194
+ - Lessons checked: <N>
195
+ - Lessons that matched: <N>
196
+
197
+ ## Findings
198
+
199
+ <findings, grouped by the learned lesson each rests on>
200
+
201
+ ## Findings with no learned lesson behind them
202
+
203
+ <either empty, or listed separately and routed to the reviewer that owns them>
204
+
205
+ ## Suggested fixes (patches)
206
+
207
+ <minimal unified diffs for the obvious ones>
208
+ ```
209
+
210
+ ### Required shape of each finding
211
+
212
+ - **Severity**: `blocker` / `major` / `minor`
213
+ - **Learned lesson**: the line from the project skill this rests on
214
+ - **Location**: file path + the relevant hunk from the diff
215
+ - **Problem**: what is wrong
216
+ - **Why it matters**: correctness / testability / conventions / maintainability
217
+ - **Suggested fix**: what specifically to do, without widening scope
218
+ - **Optional patch**: a unified diff when the fix is simple
219
+
220
+ Example patch block:
221
+
222
+ ```diff
223
+ diff --git a/path/file.ts b/path/file.ts
224
+ index 0000000..1111111 100644
225
+ --- a/path/file.ts
226
+ +++ b/path/file.ts
227
+ @@ -1,3 +1,3 @@
228
+ -const x = 1;
229
+ +const x = 2;
230
+ ```
231
+
232
+ ## Job Context Awareness
233
+
234
+ When dispatched by `job-orchestrator` as part of a job pipeline, the prompt MAY
235
+ include:
236
+
237
+ ```
238
+ JOB_NAME: <job-name>
239
+ CONTEXT_PATH: .metaproject/jobs/<job-name>/ai/context.md
240
+ ```
241
+
242
+ If provided and the file exists, read the context document before starting the
243
+ review. Use it to:
244
+
245
+ - Understand which libraries and patterns were intentionally chosen for the
246
+ implementation
247
+ - Avoid flagging correct library usage as issues
248
+ - Provide more accurate findings by understanding the project's architectural
249
+ decisions
250
+
251
+ If the file does not exist or is not provided, proceed normally — context is
252
+ optional and non-blocking.
@@ -9,8 +9,8 @@ metadata:
9
9
  author: "MrCipherSmith"
10
10
  version: "1.1.0"
11
11
  category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
12
13
  license: "MIT"
13
- compatibility: "cursor,codex,zed,opencode"
14
14
  ---
15
15
 
16
16
  ---
@@ -9,8 +9,8 @@ metadata:
9
9
  author: "MrCipherSmith"
10
10
  version: "1.1.0"
11
11
  category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
12
13
  license: "MIT"
13
- compatibility: "cursor,codex,zed,opencode"
14
14
  ---
15
15
 
16
16
  ---
@@ -9,8 +9,9 @@ metadata:
9
9
  author: "MrCipherSmith"
10
10
  version: "1.1.0"
11
11
  category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
13
+ stack_requires: "mobx"
12
14
  license: "MIT"
13
- compatibility: "cursor,codex,zed,opencode"
14
15
  ---
15
16
 
16
17
  ---
@@ -236,7 +237,7 @@ This skill covers **MobX store and state logic** — targeted review of store in
236
237
  | Store structure, actions, computed, reactions, async runInAction | ✅ YES | — |
237
238
  | View↔Store boundary violations | ✅ YES | — |
238
239
  | General code quality, readability, tests | ❌ NO | `code-ai-review` |
239
- | b091-style logic enforcement | ❌ NO | `code-b091-review` |
240
+ | Learned-convention enforcement | ❌ NO | `code-learned-review` |
240
241
  | Naming/style/architecture patterns outside stores | ❌ NO | `code-style-review` |
241
242
 
242
243
  ---
@@ -9,8 +9,8 @@ metadata:
9
9
  author: "MrCipherSmith"
10
10
  version: "1.1.0"
11
11
  category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
12
13
  license: "MIT"
13
- compatibility: "cursor,codex,zed,opencode"
14
14
  ---
15
15
 
16
16
  ---
@@ -9,8 +9,8 @@ metadata:
9
9
  author: "MrCipherSmith"
10
10
  version: "1.1.0"
11
11
  category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
12
13
  license: "MIT"
13
- compatibility: "cursor,codex,zed,opencode"
14
14
  ---
15
15
 
16
16
  ---
@@ -9,8 +9,8 @@ metadata:
9
9
  author: "MrCipherSmith"
10
10
  version: "1.0.0"
11
11
  category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
12
13
  license: "MIT"
13
- compatibility: "cursor,codex,zed,opencode"
14
14
  ---
15
15
 
16
16
 
@@ -9,8 +9,8 @@ metadata:
9
9
  author: "MrCipherSmith"
10
10
  version: "1.0.0"
11
11
  category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
12
13
  license: "MIT"
13
- compatibility: "cursor,codex,zed,opencode"
14
14
  ---
15
15
 
16
16
 
@@ -9,8 +9,8 @@ metadata:
9
9
  author: "MrCipherSmith"
10
10
  version: "1.0.0"
11
11
  category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
12
13
  license: "MIT"
13
- compatibility: "cursor,codex,zed,opencode"
14
14
  ---
15
15
 
16
16
 
@@ -146,7 +146,7 @@ This skill covers **code style and architecture patterns** — naming, organizat
146
146
  | Naming conventions, file organization, import order | ✅ YES | — |
147
147
  | TypeScript patterns, component/hook structure | ✅ YES | — |
148
148
  | Architecture pattern compliance | ✅ YES | — |
149
- | Logic correctness, type safety deep dives | ❌ NO | `code-ai-review` or `code-b091-review` |
149
+ | Logic correctness, type safety deep dives | ❌ NO | `code-ai-review` or `code-learned-review` |
150
150
  | MobX store internals | ❌ NO | `code-mobx-store-review` |
151
151
 
152
152
  ---
@@ -9,8 +9,8 @@ metadata:
9
9
  author: "MrCipherSmith"
10
10
  version: "1.0.0"
11
11
  category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
12
13
  license: "MIT"
13
- compatibility: "cursor,codex,zed,opencode"
14
14
  ---
15
15
 
16
16
 
@@ -9,8 +9,8 @@ metadata:
9
9
  author: "MrCipherSmith"
10
10
  version: "1.0.0"
11
11
  category: "review"
12
+ compatible_harnesses: "cursor,codex,zed,opencode"
12
13
  license: "MIT"
13
- compatibility: "cursor,codex,zed,opencode"
14
14
  ---
15
15
 
16
16