@mrciphersmith/keryx 0.2.71 → 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 (65) hide show
  1. package/dist/cli.js +4296 -2223
  2. package/package.json +1 -1
  3. package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +81 -0
  4. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +1 -1
  5. package/src/gdskills/bundled/rules/core/review-strict-profile.mdc +8 -4
  6. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +2 -2
  7. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +2 -2
  8. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +2 -2
  9. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +2 -2
  10. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +2 -2
  11. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +2 -2
  12. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +3 -3
  13. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +3 -3
  14. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +3 -3
  15. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +3 -3
  16. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +3 -3
  17. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +1 -1
  18. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +1 -1
  19. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +2 -2
  20. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +2 -2
  21. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +1 -1
  22. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +1 -1
  23. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +1 -1
  24. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +1 -1
  25. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +1 -1
  26. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +972 -509
  27. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +972 -509
  28. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +943 -513
  29. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +972 -509
  30. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +972 -509
  31. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/input-contract.schema.json +38 -28
  32. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/orchestrator-prompt.md +98 -66
  33. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/output-contract.schema.json +27 -5
  34. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +1 -1
  35. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +2 -2
  36. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.codex.md +252 -0
  37. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.cursor.md +252 -0
  38. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +243 -0
  39. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.opencode.md +252 -0
  40. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.zed.md +252 -0
  41. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +1 -1
  42. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +1 -1
  43. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +1 -1
  44. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +1 -1
  45. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +1 -1
  46. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +1 -1
  47. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -1
  48. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +1 -1
  49. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +1 -1
  50. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +1 -1
  51. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +2 -2
  52. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +10 -10
  53. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +1 -1
  54. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +36 -17
  55. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +1 -1
  56. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +1 -1
  57. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +1 -1
  58. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +1 -1
  59. package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
  60. package/src/gdskills/bundled/rules/core/code-review-b091-profile.mdc +0 -48
  61. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.codex.md +0 -209
  62. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.cursor.md +0 -209
  63. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.md +0 -208
  64. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.opencode.md +0 -209
  65. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.zed.md +0 -209
@@ -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,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.