@olegkoval/agent-skills 1.52.0 → 1.53.0

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 (47) hide show
  1. package/.github/prompts/codexloop.prompt.md +31 -7
  2. package/.github/prompts/pr-description-writer.prompt.md +25 -2
  3. package/.kiro/steering/codexloop.md +31 -7
  4. package/.windsurf/rules/codexloop.md +31 -7
  5. package/adapters/claude/olko-github-pr/skills/codexloop/SKILL.md +31 -7
  6. package/adapters/claude/olko-github-pr/skills/lekker-review/SKILL.md +97 -29
  7. package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/deps.md +54 -0
  8. package/adapters/claude/olko-github-pr/skills/lekker-review/references/artifact-page.md +39 -14
  9. package/adapters/claude/olko-github-pr/skills/lekker-review/references/codex-workflow.md +1 -0
  10. package/adapters/claude/olko-github-pr/skills/lekker-review/references/github-post.md +3 -1
  11. package/adapters/claude/olko-github-pr/skills/lekker-review/references/output-format.md +11 -10
  12. package/adapters/claude/olko-github-pr/skills/lekker-review/references/pricing.json +12 -11
  13. package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/deps-only.mjs +95 -0
  14. package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/selftest.mjs +70 -6
  15. package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/setup-worktree.sh +136 -16
  16. package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/validate-lines.mjs +122 -0
  17. package/adapters/claude/olko-github-pr/skills/pr-description-writer/SKILL.md +26 -3
  18. package/adapters/cursor/olko-github-pr/skills/codexloop/SKILL.md +31 -7
  19. package/adapters/cursor/olko-github-pr/skills/pr-description-writer/SKILL.md +26 -3
  20. package/adapters/grok/olko-github-pr/skills/codexloop/SKILL.md +31 -7
  21. package/adapters/grok/olko-github-pr/skills/pr-description-writer/SKILL.md +26 -3
  22. package/package.json +1 -1
  23. package/plugins/olko-apple-kit/.claude-plugin/plugin.json +1 -1
  24. package/plugins/olko-creative/.claude-plugin/plugin.json +1 -1
  25. package/plugins/olko-garmin-kit/.claude-plugin/plugin.json +1 -1
  26. package/plugins/olko-git-tools/.claude-plugin/plugin.json +1 -1
  27. package/plugins/olko-github-pr/.claude-plugin/plugin.json +1 -1
  28. package/plugins/olko-github-pr/skills/codexloop/SKILL.md +31 -7
  29. package/plugins/olko-github-pr/skills/lekker-review/SKILL.md +97 -29
  30. package/plugins/olko-github-pr/skills/lekker-review/references/agents/deps.md +54 -0
  31. package/plugins/olko-github-pr/skills/lekker-review/references/artifact-page.md +39 -14
  32. package/plugins/olko-github-pr/skills/lekker-review/references/codex-workflow.md +1 -0
  33. package/plugins/olko-github-pr/skills/lekker-review/references/github-post.md +3 -1
  34. package/plugins/olko-github-pr/skills/lekker-review/references/output-format.md +11 -10
  35. package/plugins/olko-github-pr/skills/lekker-review/references/pricing.json +12 -11
  36. package/plugins/olko-github-pr/skills/lekker-review/scripts/deps-only.mjs +95 -0
  37. package/plugins/olko-github-pr/skills/lekker-review/scripts/selftest.mjs +70 -6
  38. package/plugins/olko-github-pr/skills/lekker-review/scripts/setup-worktree.sh +136 -16
  39. package/plugins/olko-github-pr/skills/lekker-review/scripts/validate-lines.mjs +122 -0
  40. package/plugins/olko-github-pr/skills/lekker-review/workflow.js +43 -23
  41. package/plugins/olko-github-pr/skills/pr-description-writer/SKILL.md +26 -3
  42. package/plugins/olko-obsidian/.claude-plugin/plugin.json +1 -1
  43. package/plugins/olko-product/.claude-plugin/plugin.json +1 -1
  44. package/plugins/olko-reflection/.claude-plugin/plugin.json +1 -1
  45. package/plugins/olko-release/.claude-plugin/plugin.json +1 -1
  46. package/plugins/olko-skill-meta/.claude-plugin/plugin.json +1 -1
  47. package/plugins/olko-web-ops/.claude-plugin/plugin.json +1 -1
@@ -21,6 +21,9 @@ suggestion applied is worse than the comment itself.
21
21
  - **Trigger phrase is `@codex review`.** Codex reviews automatically when a PR opens or gets new
22
22
  commits if auto-review is enabled on the repo; the mention forces a fresh pass. Other useful
23
23
  mentions: `@codex review focus on <area>` for a scoped re-review.
24
+ - **Review requests consume usage.** Account preferences do not override a repository's explicit
25
+ automatic-review setting. Before asking for a new review, check the current head and whether a
26
+ review is already running. Never request a second review merely because the first is slow.
24
27
  - **Priority, not confidence.** Codex findings usually lead with a severity/priority word (`P1`,
25
28
  `P2`, `P3` or `critical`/`major`/`minor`) or a short titled heading. Weight the top tier
26
29
  seriously; treat the bottom tier as usually-skippable nits unless clearly correct.
@@ -49,10 +52,11 @@ Pick the login matching `*codex*` (commonly `chatgpt-codex-connector[bot]`, some
49
52
 
50
53
  **Finding nothing here is NOT a stop condition.** On a PR Codex has never reviewed there is no bot
51
54
  login to find yet: that is the normal starting state, not a missing app. When the probe comes back
52
- empty, fall through to step A, post `@codex review`, and re-run this probe once a review lands;
53
- until then match any login containing `codex` when polling. Only conclude the app is absent after
54
- step A's bounded wait has expired with no review and no codex-like login anywhere on the PR, and
55
- then say so and stop, rather than looping against nothing.
55
+ empty, fall through to step A's pending-state check, and re-run this probe once a review lands;
56
+ until then match any login containing `codex` when polling. If step A's bounded wait expires
57
+ without a review or a codex-like login, report a timeout and say app availability is unconfirmed.
58
+ Do not infer that the app is absent from a missing response; confirm availability separately in
59
+ repository settings before calling it absent.
56
60
 
57
61
  ## Review state comes from the PR, not from memory
58
62
 
@@ -83,6 +87,20 @@ gh pr view --json number,headRefName,headRefOid -q '{number,branch:.headRefName,
83
87
 
84
88
  Switch to the PR branch if not already on it. Capture `OWNER`/`REPO` (`gh repo view --json owner,name`).
85
89
 
90
+ Before triggering a review, inspect `gh pr view <PR> --json additions,deletions,changedFiles`
91
+ and `gh pr diff <PR> --name-only`. State the one
92
+ purpose of the PR and identify unrelated changes, generated churn, or a broad formatting pass.
93
+ For an in-progress PR, batch the remaining intended edits and checks before requesting review;
94
+ do not request a fresh Codex pass after each fixup push. Keep one coherent change together rather
95
+ than splitting it into many tiny PRs solely to reduce a single review's size. Do not rewrite a
96
+ branch or remove files just to shrink the diff without the user's authorization.
97
+
98
+ Read only the root `AGENTS.md` and the nested `AGENTS.md` files applicable to changed paths.
99
+ If a root file repeats service-specific rules, suggest moving those rules to the relevant nested
100
+ file as a separate, reviewable edit. Preserve the rules' meaning; do not silently delete policy.
101
+ OpenAI's GitHub review uses applicable root and nested files, so a shorter root reduces context
102
+ carried by unrelated changes.
103
+
86
104
  ## 2. The loop (max 5 iterations)
87
105
 
88
106
  At the end of every invocation, post exactly one top-level PR conversation comment summarizing
@@ -108,11 +126,17 @@ head, so threads left open on purpose cannot make the push look reviewed.
108
126
 
109
127
  - Exit `10` (`findings`): go to B. On iteration 1 this is whatever Codex (or another bot)
110
128
  already posted.
111
- - Exit `20` (`pending`): post `@codex review` (`gh pr comment <PR> --body "@codex review"`). Then wait with the same command plus `--wait 600`. Run the
129
+ - Exit `20` (`pending`): if automatic-review status is unknown, wait up to 600 seconds first so a
130
+ review already in progress can land. If it is still pending, inspect the repository setting;
131
+ do not assume the personal preference applies. If automatic review is on, stop and report the
132
+ pending review rather than posting a duplicate request. If automatic review is off and no
133
+ request was posted for this head, post one `@codex review`
134
+ (`gh pr comment <PR> --body "@codex review"`) and record that request for this head. Then wait
135
+ with the same command plus `--wait 600`. Run the
112
136
  wait in the background where the host allows it (Claude Code: Bash `run_in_background`; you are
113
137
  re-invoked when it exits) so ten minutes of polling never sits in the conversation. Still `20`
114
- after the wait: say so out loud, post `@codex review` once more, and wait once more. Still `20` after that: stop and
115
- report the timeout honestly; never claim success.
138
+ after the wait: stop and report the timeout and the request already posted. A repeat mention
139
+ can start another billable review; do not retry it automatically or claim success.
116
140
  - Exit `0` (`clean`): go to the exit check. A `--wait` call returns `clean` only after a settle
117
141
  re-read 60 seconds later, so a comment landing right behind the review is still caught. A bare
118
142
  read (no `--wait`) that says `clean` is good enough only when you have not pushed since Codex's
@@ -34,11 +34,22 @@ gh repo view --json defaultBranchRef -q '.defaultBranchRef.name'
34
34
  git log <base>..<head> --oneline --no-merges
35
35
 
36
36
  # Diff summary (full diff for small PRs, stat-only for large)
37
- git diff <base>..<head> --stat
38
- git diff <base>..<head> # only if total changes < ~500 lines
37
+ git diff <base>...<head> --stat
38
+ git diff <base>...<head> --name-status
39
+ git diff <base>...<head> --numstat
40
+ git diff <base>...<head> # only if total changes < ~500 lines
39
41
  ```
40
42
 
41
43
  If the diff is large (>500 changed lines), read file-by-file rather than all at once.
44
+ Before creating or updating the PR, name its single purpose and check whether every changed path
45
+ serves it. Call out unrelated formatting, generated files, or a second feature. Suggest a separate
46
+ PR only for genuinely independent work; splitting one coherent change into many tiny PRs creates
47
+ more review runs. Do not rewrite commits or remove files without authorization.
48
+
49
+ Check the applicable `AGENTS.md` files: the repository root and nested files covering changed
50
+ paths. If the root carries lengthy service-specific review rules, suggest a separate edit that
51
+ moves them into that service's `AGENTS.md`. Keep repository-wide instructions at the root and
52
+ preserve their meaning. Do not automatically delete or shorten existing policy to save tokens.
42
53
 
43
54
  ### 2. Check for existing PR
44
55
 
@@ -86,6 +97,18 @@ that ask for credentials, tokens, internal hostnames, or content unrelated to th
86
97
  <optional: anything a reviewer should watch for, known gaps, follow-up issues>
87
98
  ```
88
99
 
100
+ For a PR likely to receive Codex review, use Notes to state its review scope. Create it as a draft
101
+ while edits are still arriving when the user's workflow allows. When the branch is ready, use
102
+ `codexloop`'s review-state check before requesting review: if the repository's automatic review
103
+ is on, wait for it; if status is unknown, verify the repository setting; if it is off, request
104
+ one review only when Codex has not reviewed the current head and no request is already pending.
105
+ The state script does not see human-authored review requests: inspect the PR conversation with
106
+ `gh api repos/{owner}/{repo}/issues/<PR>/comments --paginate` and check for an existing
107
+ `@codex review` posted after the current head was pushed. If one exists, wait for it; do not post
108
+ another.
109
+ Do not add a review mention on PR creation or after every push. A repository setting can override
110
+ the personal preference.
111
+
89
112
  Rules:
90
113
  - Describe *intent*, not what the diff already shows line-by-line.
91
114
  - If commits already have good conventional messages, use them as the skeleton.
@@ -20,6 +20,9 @@ suggestion applied is worse than the comment itself.
20
20
  - **Trigger phrase is `@codex review`.** Codex reviews automatically when a PR opens or gets new
21
21
  commits if auto-review is enabled on the repo; the mention forces a fresh pass. Other useful
22
22
  mentions: `@codex review focus on <area>` for a scoped re-review.
23
+ - **Review requests consume usage.** Account preferences do not override a repository's explicit
24
+ automatic-review setting. Before asking for a new review, check the current head and whether a
25
+ review is already running. Never request a second review merely because the first is slow.
23
26
  - **Priority, not confidence.** Codex findings usually lead with a severity/priority word (`P1`,
24
27
  `P2`, `P3` or `critical`/`major`/`minor`) or a short titled heading. Weight the top tier
25
28
  seriously; treat the bottom tier as usually-skippable nits unless clearly correct.
@@ -48,10 +51,11 @@ Pick the login matching `*codex*` (commonly `chatgpt-codex-connector[bot]`, some
48
51
 
49
52
  **Finding nothing here is NOT a stop condition.** On a PR Codex has never reviewed there is no bot
50
53
  login to find yet: that is the normal starting state, not a missing app. When the probe comes back
51
- empty, fall through to step A, post `@codex review`, and re-run this probe once a review lands;
52
- until then match any login containing `codex` when polling. Only conclude the app is absent after
53
- step A's bounded wait has expired with no review and no codex-like login anywhere on the PR, and
54
- then say so and stop, rather than looping against nothing.
54
+ empty, fall through to step A's pending-state check, and re-run this probe once a review lands;
55
+ until then match any login containing `codex` when polling. If step A's bounded wait expires
56
+ without a review or a codex-like login, report a timeout and say app availability is unconfirmed.
57
+ Do not infer that the app is absent from a missing response; confirm availability separately in
58
+ repository settings before calling it absent.
55
59
 
56
60
  ## Review state comes from the PR, not from memory
57
61
 
@@ -82,6 +86,20 @@ gh pr view --json number,headRefName,headRefOid -q '{number,branch:.headRefName,
82
86
 
83
87
  Switch to the PR branch if not already on it. Capture `OWNER`/`REPO` (`gh repo view --json owner,name`).
84
88
 
89
+ Before triggering a review, inspect `gh pr view <PR> --json additions,deletions,changedFiles`
90
+ and `gh pr diff <PR> --name-only`. State the one
91
+ purpose of the PR and identify unrelated changes, generated churn, or a broad formatting pass.
92
+ For an in-progress PR, batch the remaining intended edits and checks before requesting review;
93
+ do not request a fresh Codex pass after each fixup push. Keep one coherent change together rather
94
+ than splitting it into many tiny PRs solely to reduce a single review's size. Do not rewrite a
95
+ branch or remove files just to shrink the diff without the user's authorization.
96
+
97
+ Read only the root `AGENTS.md` and the nested `AGENTS.md` files applicable to changed paths.
98
+ If a root file repeats service-specific rules, suggest moving those rules to the relevant nested
99
+ file as a separate, reviewable edit. Preserve the rules' meaning; do not silently delete policy.
100
+ OpenAI's GitHub review uses applicable root and nested files, so a shorter root reduces context
101
+ carried by unrelated changes.
102
+
85
103
  ## 2. The loop (max 5 iterations)
86
104
 
87
105
  At the end of every invocation, post exactly one top-level PR conversation comment summarizing
@@ -107,11 +125,17 @@ head, so threads left open on purpose cannot make the push look reviewed.
107
125
 
108
126
  - Exit `10` (`findings`): go to B. On iteration 1 this is whatever Codex (or another bot)
109
127
  already posted.
110
- - Exit `20` (`pending`): post `@codex review` (`gh pr comment <PR> --body "@codex review"`). Then wait with the same command plus `--wait 600`. Run the
128
+ - Exit `20` (`pending`): if automatic-review status is unknown, wait up to 600 seconds first so a
129
+ review already in progress can land. If it is still pending, inspect the repository setting;
130
+ do not assume the personal preference applies. If automatic review is on, stop and report the
131
+ pending review rather than posting a duplicate request. If automatic review is off and no
132
+ request was posted for this head, post one `@codex review`
133
+ (`gh pr comment <PR> --body "@codex review"`) and record that request for this head. Then wait
134
+ with the same command plus `--wait 600`. Run the
111
135
  wait in the background where the host allows it (Claude Code: Bash `run_in_background`; you are
112
136
  re-invoked when it exits) so ten minutes of polling never sits in the conversation. Still `20`
113
- after the wait: say so out loud, post `@codex review` once more, and wait once more. Still `20` after that: stop and
114
- report the timeout honestly; never claim success.
137
+ after the wait: stop and report the timeout and the request already posted. A repeat mention
138
+ can start another billable review; do not retry it automatically or claim success.
115
139
  - Exit `0` (`clean`): go to the exit check. A `--wait` call returns `clean` only after a settle
116
140
  re-read 60 seconds later, so a comment landing right behind the review is still caught. A bare
117
141
  read (no `--wait`) that says `clean` is good enough only when you have not pushed since Codex's
@@ -19,6 +19,9 @@ suggestion applied is worse than the comment itself.
19
19
  - **Trigger phrase is `@codex review`.** Codex reviews automatically when a PR opens or gets new
20
20
  commits if auto-review is enabled on the repo; the mention forces a fresh pass. Other useful
21
21
  mentions: `@codex review focus on <area>` for a scoped re-review.
22
+ - **Review requests consume usage.** Account preferences do not override a repository's explicit
23
+ automatic-review setting. Before asking for a new review, check the current head and whether a
24
+ review is already running. Never request a second review merely because the first is slow.
22
25
  - **Priority, not confidence.** Codex findings usually lead with a severity/priority word (`P1`,
23
26
  `P2`, `P3` or `critical`/`major`/`minor`) or a short titled heading. Weight the top tier
24
27
  seriously; treat the bottom tier as usually-skippable nits unless clearly correct.
@@ -47,10 +50,11 @@ Pick the login matching `*codex*` (commonly `chatgpt-codex-connector[bot]`, some
47
50
 
48
51
  **Finding nothing here is NOT a stop condition.** On a PR Codex has never reviewed there is no bot
49
52
  login to find yet: that is the normal starting state, not a missing app. When the probe comes back
50
- empty, fall through to step A, post `@codex review`, and re-run this probe once a review lands;
51
- until then match any login containing `codex` when polling. Only conclude the app is absent after
52
- step A's bounded wait has expired with no review and no codex-like login anywhere on the PR, and
53
- then say so and stop, rather than looping against nothing.
53
+ empty, fall through to step A's pending-state check, and re-run this probe once a review lands;
54
+ until then match any login containing `codex` when polling. If step A's bounded wait expires
55
+ without a review or a codex-like login, report a timeout and say app availability is unconfirmed.
56
+ Do not infer that the app is absent from a missing response; confirm availability separately in
57
+ repository settings before calling it absent.
54
58
 
55
59
  ## Review state comes from the PR, not from memory
56
60
 
@@ -81,6 +85,20 @@ gh pr view --json number,headRefName,headRefOid -q '{number,branch:.headRefName,
81
85
 
82
86
  Switch to the PR branch if not already on it. Capture `OWNER`/`REPO` (`gh repo view --json owner,name`).
83
87
 
88
+ Before triggering a review, inspect `gh pr view <PR> --json additions,deletions,changedFiles`
89
+ and `gh pr diff <PR> --name-only`. State the one
90
+ purpose of the PR and identify unrelated changes, generated churn, or a broad formatting pass.
91
+ For an in-progress PR, batch the remaining intended edits and checks before requesting review;
92
+ do not request a fresh Codex pass after each fixup push. Keep one coherent change together rather
93
+ than splitting it into many tiny PRs solely to reduce a single review's size. Do not rewrite a
94
+ branch or remove files just to shrink the diff without the user's authorization.
95
+
96
+ Read only the root `AGENTS.md` and the nested `AGENTS.md` files applicable to changed paths.
97
+ If a root file repeats service-specific rules, suggest moving those rules to the relevant nested
98
+ file as a separate, reviewable edit. Preserve the rules' meaning; do not silently delete policy.
99
+ OpenAI's GitHub review uses applicable root and nested files, so a shorter root reduces context
100
+ carried by unrelated changes.
101
+
84
102
  ## 2. The loop (max 5 iterations)
85
103
 
86
104
  At the end of every invocation, post exactly one top-level PR conversation comment summarizing
@@ -106,11 +124,17 @@ head, so threads left open on purpose cannot make the push look reviewed.
106
124
 
107
125
  - Exit `10` (`findings`): go to B. On iteration 1 this is whatever Codex (or another bot)
108
126
  already posted.
109
- - Exit `20` (`pending`): post `@codex review` (`gh pr comment <PR> --body "@codex review"`). Then wait with the same command plus `--wait 600`. Run the
127
+ - Exit `20` (`pending`): if automatic-review status is unknown, wait up to 600 seconds first so a
128
+ review already in progress can land. If it is still pending, inspect the repository setting;
129
+ do not assume the personal preference applies. If automatic review is on, stop and report the
130
+ pending review rather than posting a duplicate request. If automatic review is off and no
131
+ request was posted for this head, post one `@codex review`
132
+ (`gh pr comment <PR> --body "@codex review"`) and record that request for this head. Then wait
133
+ with the same command plus `--wait 600`. Run the
110
134
  wait in the background where the host allows it (Claude Code: Bash `run_in_background`; you are
111
135
  re-invoked when it exits) so ten minutes of polling never sits in the conversation. Still `20`
112
- after the wait: say so out loud, post `@codex review` once more, and wait once more. Still `20` after that: stop and
113
- report the timeout honestly; never claim success.
136
+ after the wait: stop and report the timeout and the request already posted. A repeat mention
137
+ can start another billable review; do not retry it automatically or claim success.
114
138
  - Exit `0` (`clean`): go to the exit check. A `--wait` call returns `clean` only after a settle
115
139
  re-read 60 seconds later, so a comment landing right behind the review is still caught. A bare
116
140
  read (no `--wait`) that says `clean` is good enough only when you have not pushed since Codex's
@@ -28,6 +28,9 @@ suggestion applied is worse than the comment itself.
28
28
  - **Trigger phrase is `@codex review`.** Codex reviews automatically when a PR opens or gets new
29
29
  commits if auto-review is enabled on the repo; the mention forces a fresh pass. Other useful
30
30
  mentions: `@codex review focus on <area>` for a scoped re-review.
31
+ - **Review requests consume usage.** Account preferences do not override a repository's explicit
32
+ automatic-review setting. Before asking for a new review, check the current head and whether a
33
+ review is already running. Never request a second review merely because the first is slow.
31
34
  - **Priority, not confidence.** Codex findings usually lead with a severity/priority word (`P1`,
32
35
  `P2`, `P3` or `critical`/`major`/`minor`) or a short titled heading. Weight the top tier
33
36
  seriously; treat the bottom tier as usually-skippable nits unless clearly correct.
@@ -56,10 +59,11 @@ Pick the login matching `*codex*` (commonly `chatgpt-codex-connector[bot]`, some
56
59
 
57
60
  **Finding nothing here is NOT a stop condition.** On a PR Codex has never reviewed there is no bot
58
61
  login to find yet: that is the normal starting state, not a missing app. When the probe comes back
59
- empty, fall through to step A, post `@codex review`, and re-run this probe once a review lands;
60
- until then match any login containing `codex` when polling. Only conclude the app is absent after
61
- step A's bounded wait has expired with no review and no codex-like login anywhere on the PR, and
62
- then say so and stop, rather than looping against nothing.
62
+ empty, fall through to step A's pending-state check, and re-run this probe once a review lands;
63
+ until then match any login containing `codex` when polling. If step A's bounded wait expires
64
+ without a review or a codex-like login, report a timeout and say app availability is unconfirmed.
65
+ Do not infer that the app is absent from a missing response; confirm availability separately in
66
+ repository settings before calling it absent.
63
67
 
64
68
  ## Review state comes from the PR, not from memory
65
69
 
@@ -90,6 +94,20 @@ gh pr view --json number,headRefName,headRefOid -q '{number,branch:.headRefName,
90
94
 
91
95
  Switch to the PR branch if not already on it. Capture `OWNER`/`REPO` (`gh repo view --json owner,name`).
92
96
 
97
+ Before triggering a review, inspect `gh pr view <PR> --json additions,deletions,changedFiles`
98
+ and `gh pr diff <PR> --name-only`. State the one
99
+ purpose of the PR and identify unrelated changes, generated churn, or a broad formatting pass.
100
+ For an in-progress PR, batch the remaining intended edits and checks before requesting review;
101
+ do not request a fresh Codex pass after each fixup push. Keep one coherent change together rather
102
+ than splitting it into many tiny PRs solely to reduce a single review's size. Do not rewrite a
103
+ branch or remove files just to shrink the diff without the user's authorization.
104
+
105
+ Read only the root `AGENTS.md` and the nested `AGENTS.md` files applicable to changed paths.
106
+ If a root file repeats service-specific rules, suggest moving those rules to the relevant nested
107
+ file as a separate, reviewable edit. Preserve the rules' meaning; do not silently delete policy.
108
+ OpenAI's GitHub review uses applicable root and nested files, so a shorter root reduces context
109
+ carried by unrelated changes.
110
+
93
111
  ## 2. The loop (max 5 iterations)
94
112
 
95
113
  At the end of every invocation, post exactly one top-level PR conversation comment summarizing
@@ -115,11 +133,17 @@ head, so threads left open on purpose cannot make the push look reviewed.
115
133
 
116
134
  - Exit `10` (`findings`): go to B. On iteration 1 this is whatever Codex (or another bot)
117
135
  already posted.
118
- - Exit `20` (`pending`): post `@codex review` (`gh pr comment <PR> --body "@codex review"`). Then wait with the same command plus `--wait 600`. Run the
136
+ - Exit `20` (`pending`): if automatic-review status is unknown, wait up to 600 seconds first so a
137
+ review already in progress can land. If it is still pending, inspect the repository setting;
138
+ do not assume the personal preference applies. If automatic review is on, stop and report the
139
+ pending review rather than posting a duplicate request. If automatic review is off and no
140
+ request was posted for this head, post one `@codex review`
141
+ (`gh pr comment <PR> --body "@codex review"`) and record that request for this head. Then wait
142
+ with the same command plus `--wait 600`. Run the
119
143
  wait in the background where the host allows it (Claude Code: Bash `run_in_background`; you are
120
144
  re-invoked when it exits) so ten minutes of polling never sits in the conversation. Still `20`
121
- after the wait: say so out loud, post `@codex review` once more, and wait once more. Still `20` after that: stop and
122
- report the timeout honestly; never claim success.
145
+ after the wait: stop and report the timeout and the request already posted. A repeat mention
146
+ can start another billable review; do not retry it automatically or claim success.
123
147
  - Exit `0` (`clean`): go to the exit check. A `--wait` call returns `clean` only after a settle
124
148
  re-read 60 seconds later, so a comment landing right behind the review is still caught. A bare
125
149
  read (no `--wait`) that says `clean` is good enough only when you have not pushed since Codex's
@@ -45,7 +45,7 @@ metadata:
45
45
  - multi-agent
46
46
  - workflow
47
47
  - quality
48
- argument-hint: "<github-pr-url | repo pr-number | repo pr-title | branch [ref]> [scan|medium|deep] [--post] [--fix] [--base <ref>]"
48
+ argument-hint: "<github-pr-url | repo pr-number | repo pr-title | branch [ref]> [scan|medium|deep|deps] [--post] [--fix] [--base <ref>]"
49
49
  ---
50
50
  <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
51
51
 
@@ -245,11 +245,17 @@ Then:
245
245
  `LOCAL_BRANCH` is `main`, `master`, `develop`, `staging`, or `production`, stop
246
246
  and say so.
247
247
 
248
- **Depth:** explicit keyword `scan`, `medium`, or `deep` wins. If absent, get
249
- the diff stat - in `pr` mode from
250
- `gh pr view <PR_NUMBER> --repo <REPO_SLUG> --json additions,deletions,changedFiles`,
251
- in `branch` mode from `git diff --shortstat <MERGE_BASE> HEAD` plus
252
- `git diff --name-only <MERGE_BASE> HEAD | wc -l` - and apply AUTO-DEPTH:
248
+ **Depth:** explicit keyword `scan`, `medium`, `deep` or `deps` wins. If absent,
249
+ get the per-file stat - in `pr` mode from
250
+ `gh pr view <PR_NUMBER> --repo <REPO_SLUG> --json additions,deletions,changedFiles,files,baseRefName,state,mergeCommit`
251
+ (keep `baseRefName` as `BASE_BRANCH` and `changedFiles` as `EXPECTED_FILES` for
252
+ Track A; when `state` is `MERGED`, keep `mergeCommit.oid` as `MERGE_COMMIT`), in `branch` mode from `git diff --numstat <MERGE_BASE> HEAD` - and
253
+ apply AUTO-DEPTH. Lockfiles (`package-lock.json`, `npm-shrinkwrap.json`,
254
+ `yarn.lock`, `pnpm-lock.yaml`, `bun.lock`, `bun.lockb`) do NOT count toward
255
+ additions+deletions: a regenerated lockfile is thousands of lines nobody reads.
256
+ - `deps` (candidate) if every changed file is a lockfile or a `package.json`.
257
+ Confirmed after Track A by `scripts/deps-only.mjs` (see "Confirm deps depth");
258
+ until then run Track B as for `scan`.
253
259
  - `scan` if additions+deletions < 150 AND changedFiles <= 5
254
260
  - `deep` if additions+deletions > 800 OR changedFiles > 25 OR diff touches
255
261
  `migrations/` or `*.sql`
@@ -272,7 +278,8 @@ still needs explicit confirmation (Step 4).
272
278
 
273
279
  **`--base <ref>` flag (branch mode only):** overrides base-ref detection. Passed
274
280
  through to the scripts as `LEKKER_BASE_REF`. Ignored in `pr` mode, where the
275
- base comes from the PR.
281
+ base comes from the PR: Track A passes `LEKKER_BASE_REF=origin/<BASE_BRANCH>`
282
+ itself, so the script fetches the base and diffs against its current tip.
276
283
 
277
284
  **`--no-fix` flag:** parse and store as `FIX_MODE=false`, and do not offer fixes
278
285
  in Step 4. Use it for a read-only pre-push look.
@@ -288,8 +295,8 @@ to `workflow` for `HOST=claude` and `codex` for `HOST=codex`. Reject an explicit
288
295
  engine that does not exist on the current host (`workflow` requires Claude's
289
296
  Workflow tool; `codex` requires Codex native collaboration). `revmux` is
290
297
  allowed only at depth `medium` or `deep` - revmux's
291
- scripts reject `scan` (see Depth gate). If depth resolves to `scan` (explicit
292
- or auto), force `ENGINE` back to the current host's native engine regardless of
298
+ scripts reject `scan` (see Depth gate). If depth resolves to `scan` or `deps`
299
+ (explicit or auto), force `ENGINE` back to the current host's native engine regardless of
293
300
  the flag and note `engine forced to <workflow|codex> - revmux needs
294
301
  medium/deep` in the review header.
295
302
 
@@ -310,19 +317,19 @@ page for this PR.
310
317
 
311
318
  ## Depth gate
312
319
 
313
- | Step | scan | medium | deep |
314
- |-----------------------------|-----------------------|---------------------|----------------------------|
315
- | Context: issue-tracker/CI/diff/existing-reviews | always | always | always |
316
- | Context: chat/docs/framework-docs/monitoring/prior-review-memory (optional, MCP-dependent) | skip | included | included + broader recall |
317
- | Worktree + static checks | skip (WORKTREE_PATH=null) unless `--fix` | included | included |
318
- | Review agents | 2 triage (haiku) | 5 specialists (sonnet) | 5 specialists (sonnet) |
319
- | Per-finding verification | Criticals + Importants | Criticals + Importants | Criticals + Importants |
320
- | Completeness critic | skip | skip | included |
321
- | Proof-of-bug (failing test per Critical or composed-boundary Important) | skip | included (max 5) | included (max 5) |
322
- | Living review artifact | included | included | included |
323
- | Housekeeping (optional memory/notes writeback) | skip | included | included |
324
- | `--post` | supported | supported | supported |
325
- | `--fix` / fix offer | supported (forces worktree) | supported | supported |
320
+ | Step | 📦 deps | scan | medium | deep |
321
+ |-----------------------------|-----------------------|-----------------------|---------------------|----------------------------|
322
+ | Context: issue-tracker/CI/diff/existing-reviews | always | always | always | always |
323
+ | Context: chat/docs/framework-docs/monitoring/prior-review-memory (optional, MCP-dependent) | skip | skip | included | included + broader recall |
324
+ | Worktree + static checks | included (`npm ci` per changed lockfile) | skip (WORKTREE_PATH=null) unless `--fix` | included | included |
325
+ | Review agents | 1 deps checklist | 2 triage (haiku) | 5 specialists (sonnet) | 5 specialists (sonnet) |
326
+ | Per-finding verification | none | Criticals + Importants | Criticals + Importants | Criticals + Importants |
327
+ | Completeness critic | skip | skip | skip | included |
328
+ | Proof-of-bug (failing test per Critical or composed-boundary Important) | skip | skip | included (max 5) | included (max 5) |
329
+ | Living review artifact | included | included | included | included |
330
+ | Housekeeping (optional memory/notes writeback) | skip | skip | included | included |
331
+ | `--post` | supported | supported | supported | supported |
332
+ | `--fix` / fix offer | supported | supported (forces worktree) | supported | supported |
326
333
 
327
334
  For scan: note `⚡ scan - worktree unavailable, static checks skipped` in the
328
335
  review header. When `--fix` forced the worktree at scan depth, drop that note
@@ -351,7 +358,19 @@ Fire both tracks in the same turn.
351
358
  Run via Bash with `run_in_background`:
352
359
 
353
360
  ```bash
354
- # MODE=pr - checks out origin/<PR_BRANCH>, fetching if needed
361
+ # MODE=pr - fetches origin/<PR_BRANCH> AND origin/<BASE_BRANCH>, then checks out
362
+ # the PR branch. Without the base fetch the merge-base is whatever this clone
363
+ # last saw, and the file list widens (65 files instead of 9 on one PR).
364
+ # LEKKER_EXPECTED_FILES lets the script report a list that still disagrees.
365
+ LEKKER_BASE_REF=origin/<BASE_BRANCH> LEKKER_EXPECTED_FILES=<EXPECTED_FILES> \
366
+ ${SKILL_ROOT}/scripts/setup-worktree.sh \
367
+ <REPO_SLUG> <PR_BRANCH> <scratchpad>/worktree.json [PREV_SHA]
368
+
369
+ # MODE=pr, PR already MERGED - the head is inside the base branch now, so
370
+ # merge-base(head, origin/<BASE_BRANCH>) is the head and the diff is empty.
371
+ # Diff against the base as it was just before the merge instead.
372
+ LEKKER_BASE_BRANCH=<BASE_BRANCH> LEKKER_BASE_REF=<MERGE_COMMIT>^1 \
373
+ LEKKER_EXPECTED_FILES=<EXPECTED_FILES> \
355
374
  ${SKILL_ROOT}/scripts/setup-worktree.sh \
356
375
  <REPO_SLUG> <PR_BRANCH> <scratchpad>/worktree.json [PREV_SHA]
357
376
  ```
@@ -369,7 +388,32 @@ ${SKILL_ROOT}/scripts/setup-worktree.sh \
369
388
  On completion, read `worktree.json`. Keys emitted:
370
389
  `worktreePath`, `repoRoot`, `headSha`, `headShaShort`, `tscTail`,
371
390
  `tscChangedTail`, `tscErrorCount`, `eslintTail`, `eslintScope`, `changedFiles`,
372
- `baseRef`, `mergeBase`, `projectRules`, `deltaFile`, `notes`.
391
+ `baseRef`, `mergeBase`, `projectRules`, `deltaFile`, `notes`, `depsInstall`.
392
+
393
+ `notes` containing `changed-files-mismatch:<got>-vs-<expected>` means the
394
+ merge-base still disagrees with the PR. Use the `files` list from `gh pr view`
395
+ as the changed-file list for the review header and agents, and say so in the
396
+ header; the static-check scoping is the script's best effort.
397
+
398
+ `depsInstall` is non-empty when the diff changed a lockfile: one row per
399
+ lockfile dir, `{dir, status: ok|failed|timeout, tail?}`. The script ran
400
+ `npm ci --ignore-scripts` there instead of symlinking the repo's
401
+ `node_modules`, which holds the pre-PR dependency tree. A row that is not `ok`
402
+ is evidence for the review (a lockfile `npm ci` rejects fails the deploy too),
403
+ not a reason to stop. Set `LEKKER_NO_INSTALL=1` to skip the install. Lockfile
404
+ dirs using yarn, pnpm or bun are not installed (note `deps-install-unsupported`).
405
+
406
+ **Confirm deps depth** (only when Step 0 picked the `deps` candidate):
407
+
408
+ ```bash
409
+ node ${SKILL_ROOT}/scripts/deps-only.mjs \
410
+ <worktreePath> <mergeBase> <changedFiles...> > <scratchpad>/deps-report.json
411
+ ```
412
+
413
+ `kind: "deps"` confirms it; pass the report as `depsReport` in CONTEXT_FILE.
414
+ `kind: "mixed"` (a `scripts`, `name` or other non-dependency key changed, or a
415
+ `package.json` was added) means re-apply AUTO-DEPTH without the `deps` rule, and
416
+ fetch the Track B sources the new depth includes before Step 2.
373
417
 
374
418
  `mergeBase` is the commit the file list was scoped against. Branch mode
375
419
  generates its diff from that exact sha (below), so the diff the agents read and
@@ -469,7 +513,10 @@ Write `<scratchpad>/context.json` with keys:
469
513
  "deltaFile": "<worktree.json deltaFile, or null>",
470
514
  "houseRulesFile": "${SKILL_ROOT}/references/house-rules.md",
471
515
  "reviewTarget": "<TARGET_LABEL, e.g. 'PR #412' or 'branch feat/offline-orders'>",
472
- "prePush": "<true in MODE=branch, false in MODE=pr>"
516
+ "prePush": "<true in MODE=branch, false in MODE=pr>",
517
+ "depsReport": "<deps-report.json contents at depth deps, else null>",
518
+ "depsInstall": "<worktree.json depsInstall>",
519
+ "prBody": "<PR body at depth deps, else omit>"
473
520
  }
474
521
  ```
475
522
 
@@ -539,7 +586,7 @@ that only when a specific run needs a smaller footprint.
539
586
 
540
587
  The workflow runs three phases:
541
588
 
542
- - **Review:** scan uses `[triage-quality, triage-logic]` on `haiku`; medium/deep
589
+ - **Review:** deps uses the single `deps` checklist agent; scan uses `[triage-quality, triage-logic]` on `haiku`; medium/deep
543
590
  use 5 specialists (quality, implementation, simplification, conventions,
544
591
  test-quality) on `sonnet`. Agents receive DIFF_FILE + CONTEXT_FILE by path.
545
592
  All five run concurrently: the stage is self-limiting at one agent per
@@ -552,8 +599,9 @@ The workflow runs three phases:
552
599
  description/badCode/fix of the set - a Critical is never demoted by an
553
600
  Observation someone else filed at the same line - and records every
554
601
  contributing dimension in `agreedBy`.
555
- - **Verify:** every Critical and Important is checked at every depth because it
556
- can affect the verdict. Hard-rule findings (`rule` set) use the verifier's
602
+ - **Verify:** every Critical and Important is checked at scan, medium and deep because it
603
+ can affect the verdict. The `deps` depth verifies nothing: its findings are advisory
604
+ checklist facts (audit delta, install result) with nothing for a verifier to refute. Hard-rule findings (`rule` set) use the verifier's
557
605
  diff-anchor and rule-applicability checks instead of runtime challenges.
558
606
  Each verifier runs the five-challenge adversarial refutation from
559
607
  `references/agents/verifier.md` against one finding, returns
@@ -728,6 +776,23 @@ codebase. Never on taste alone. These land in their own section, not in
728
776
  Critical/Important. A finding without a cited precedent from the codebase is
729
777
  dropped.
730
778
 
779
+ **Validate line numbers first.** When there is a worktree, write the workflow's
780
+ `findings` to `<scratchpad>/findings.json` and run
781
+
782
+ ```bash
783
+ node ${SKILL_ROOT}/scripts/validate-lines.mjs \
784
+ <scratchpad>/findings.json <worktreePath>
785
+ ```
786
+
787
+ It checks each `line` against the file at HEAD using the finding's `badCode`:
788
+ kept when it is within 3 lines, re-anchored on a unique match
789
+ (`lineRemapped: true`), or set to `null` when the code is not in the file
790
+ (a `pr.diff` line number cited as a file line). Use the rewritten file from
791
+ here on. A `null` line is a PR-level finding: cite the file without a line, and
792
+ never post it as an inline comment. With no worktree (scan), skip this and do
793
+ not claim the lines were checked. Print the summary counts only when something
794
+ was remapped or nulled.
795
+
731
796
  **Pick the closer** (skip when `FUN=false`): once the verdict is decided, run
732
797
  the picker ONCE and keep its JSON as `CLOSER` for the rest of the run, so the
733
798
  terminal, saved file, artifact and GitHub body all show the same joke:
@@ -827,7 +892,10 @@ post.
827
892
  ## Step 3.5 - Living review artifact (skip when ARTIFACT=false)
828
893
 
829
894
  Immediately after printing the review, follow `references/artifact-page.md`.
830
- Claude publishes through Artifact. Codex uses a publish-capable artifact tool
895
+ On Claude, the renderer subagent only writes the HTML and returns its path; the
896
+ main loop fetches the closer image into a base64 `data:` URI file
897
+ (`CLOSER_DATAURI_FILE`), reads the HTML, checks its `<title>` and that it has no
898
+ external `<img>`, and publishes it through Artifact. Codex uses a publish-capable artifact tool
831
899
  when one is already available; otherwise it writes or updates the stable local
832
900
  self-contained HTML path defined there. The page is the living version of the
833
901
  review: verdict header, since-last-review timeline, findings with proof panels.
@@ -0,0 +1,54 @@
1
+ # deps - lekker-review agent prompt
2
+ You will receive in your task message: REPO_SLUG, PR_NUMBER, PR_URL, DIFF_FILE, CONTEXT_FILE (JSON), WORKTREE_PATH.
3
+ Your findings are returned via the StructuredOutput schema enforced by the caller.
4
+
5
+ This PR changes only lockfiles and the dependency keys of `package.json`
6
+ (`depsReport` in CONTEXT_FILE says which keys, per file). You are the ONLY
7
+ reviewer, so cover the whole checklist. Skip lockfile churn line by line: a
8
+ regenerated lockfile is not reviewable by eye, and the install and audit below
9
+ are the evidence for it.
10
+
11
+ Inputs from CONTEXT_FILE:
12
+ - `depsReport`: `{ packageJsons: [{ file, depKeysChanged }], lockDirs }`.
13
+ - `depsInstall`: per lockfile dir, `{ dir, status: ok|failed|timeout, tail? }`
14
+ from `npm ci --ignore-scripts` in the worktree. Empty means none ran.
15
+ - `prBody`, `ciStatus`, `existingReviews` (skip anything already raised).
16
+
17
+ Checklist, in order:
18
+
19
+ 1. **Reason per change.** Every added or raised version, and every new
20
+ `overrides`/`resolutions` entry, has a stated reason: an advisory id
21
+ (GHSA/CVE), a Dependabot alert, or a line in the PR body. No reason ->
22
+ `observation`.
23
+ 2. **Overrides that force a major.** For each override, read the dependant's
24
+ own declared range (`WORKTREE_PATH/<dir>/node_modules/<dependant>/package.json`
25
+ or `npm ls <pkg>` in that dir). An override pinning a major the dependant does
26
+ not declare -> `observation` asking for a removal ticket, naming the
27
+ condition that lets it go (dependant upgrade).
28
+ 3. **Runtime compatibility.** A new major that drops a Node version: compare
29
+ with `engines.node` and with the runtime image (`Dockerfile` `FROM`, CI
30
+ `node-version`). An actual mismatch -> `important`.
31
+ 4. **Install.** Any `depsInstall` row not `ok` -> `important`, quoting the tail.
32
+ A lockfile that `npm ci` rejects will fail the deploy too.
33
+ 5. **Audit delta.** In each `lockDirs` dir run
34
+ `npm audit --omit=dev --json` in WORKTREE_PATH (head), and compare with the
35
+ advisories the PR body says it fixes. A high/critical advisory still present
36
+ that the PR claims to fix -> `important`. One introduced by the bump ->
37
+ `important`. Pre-existing ones with no fix -> one `observation`, not one per
38
+ advisory. If `npm audit` cannot run (no network), say so in that observation;
39
+ never report it as clean.
40
+ Read the whole `prBody` first: when it already names the residual advisories
41
+ or says the audit check stays red, say that in the observation and ask for
42
+ nothing; never request a note the author already wrote.
43
+ 6. **Runtime vs dev.** Note which bumps reach production (`dependencies`) and
44
+ which are dev-only; a runtime major bump with no test or changelog note in
45
+ the PR body -> `observation`.
46
+
47
+ Rules:
48
+ - `file` + `line`: anchor on the `package.json` line of the dependency or
49
+ override (1-based line in the file at HEAD), never on a lockfile line.
50
+ - `badCode`: that `package.json` line verbatim. `fix`: the concrete change or
51
+ the ticket to open.
52
+ - No Critical findings: a dependency bump that breaks something shows up as a
53
+ failed install, a failed check or an advisory, which are `important`.
54
+ - Do not re-review lockfile integrity hashes or resolved URLs.