Combine upstream code-review plugin with Quarto-tailored prompt#71
Conversation
Swaps the upstream `code-review@claude-code-plugins` invocation for a custom prompt that asks Claude to review against this repo's actual conventions: Quarto/prose correctness, R style, build hygiene, and template/CI impact. Adds `track_progress: true` for the checklist UI and an `--allowedTools` list scoped to inline-comment + read-only `gh` commands so the reviewer can post structured feedback. Bumps `pull-requests` permission from read to write so the action can actually post comments. Tradeoff: this loses upstream updates to the `code-review` plugin in exchange for a review tuned to this repo's specific style guide. Easy to revert if the upstream plugin gains useful features. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@claude review |
PR #71 had replaced the upstream `code-review@claude-code-plugins` plugin with a custom Quarto-tailored prompt — gaining repo-specific priorities but losing future upstream improvements to the canonical review skill. This revision keeps both: - Re-add `plugin_marketplaces` + `plugins` so the upstream skill runs. - Lead the prompt with `/code-review:code-review <PR-ref>`, then append the Quarto / R / build-hygiene / template-impact priorities so they layer on top of the standard checks instead of replacing them. - Add the delete-prior-sticky pre-step (per the team's claude-review-workflow skill) so the new sticky lands at the bottom of the PR conversation instead of getting buried in GitHub's folded-comments section. The "deleted a comment from claude Bot" timeline entry is expected. - Quote `track_progress: 'true'` and add `use_sticky_comment: 'true'` to match the action's expected string inputs. - Elevate `issues:` permission from read to write so the delete-comment API call works (PR comments are issue comments under GitHub's REST split). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reverts the delete-prior-sticky pre-step and `use_sticky_comment: true` added earlier in this PR. Each review run now posts a fresh comment and leaves prior reviews in place — visible review history wins over a single bottom-anchored sticky. Also drops the now-unneeded `issues: write` permission back to `read`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@claude review |
|
Claude finished @d-morrison's task in 1m 36s —— View job PR Review
Overall this is a clean, well-scoped change. The Quarto-addendum prompt is specific, actionable, and well-structured. A few things worth addressing before merge: Stale PR descriptionThe Summary section describes features that don't exist in the final file:
The code is correct; the description just wasn't updated after
|
`Bash(gh pr comment:*)` would also allow `gh pr comment --edit` and `gh pr comment --delete-last`, which conflicts with the team's just-add-don't-delete policy for review comments. Narrow to `Bash(gh pr comment create:*)` so the reviewer can still post a top-level summary on each run but can't touch prior reviews. Addresses @claude review feedback on this PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@claude please review the new commit |
|
Claude finished @d-morrison's task in 1m 29s —— View job PR Review — commit
|
Two doc-only fixes addressing @claude review feedback on this PR: - Add an inline comment noting `code-review@claude-code-plugins` is a branch ref (not a version tag), intentionally unpinned so we track upstream improvements to the canonical review skill. - Add an inline comment explaining why `id-token: write` is required — the action performs a GitHub App-token exchange even when using OAuth auth, and that exchange needs OIDC. Without the permission the action fails with "App token exchange failed: 401 Unauthorized". Both are stated as low-priority / non-blocking by the reviewer, but documenting now keeps future reviewers from re-flagging them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@claude please review the new commit |
|
Claude finished @d-morrison's task in 54s —— View job PR Review — commit
|
|
@claude address comments and failing workflows |
|
Claude finished @d-morrison's task in 2m 1s —— View job Addressing comments and failing workflows
Review comment — "why removed?" (line 40 of base branch)Line 40 in the base branch was Failing workflow: Claude Code ReviewRoot cause: Expected behavior, not a PR defect. The action performs an OIDC token exchange that validates the workflow file is identical to the default branch version before granting elevated permissions. Since this PR modifies the review workflow itself, validation fails with: The action's own error message acknowledges this: "If you're seeing this on a PR when you first add a code review workflow file to your repository, this is normal and you should ignore this error." This failure is structural — it happens on any PR that touches No change needed. Failing workflow: Check LinksRoot cause: Transient network connectivity failure from the Azure runner, not a broken link. The Azure Recommended fix: Re-run the Check Links workflow — this class of error does not warrant adding Bottom line: Neither failure is caused by the changes in this PR. The Claude review failure is a known, expected limitation when reviewing workflow-file changes; the link failure is transient. The PR is ready to merge once #70 lands — re-run Check Links first to get a clean signal. |
|
@claude the link issue reoccured: https://github.com/d-morrison/qwt/actions/runs/26112538437/job/76794986372?pr=71 why? |
|
Claude finished @d-morrison's task in 1m 5s —— View job
Why the link check keeps failingShort answer: Evidence from the log: The failures appear at timestamp Both failures are also consistent across Azure regions ( What to do: The right fix here is to add exclude = [
# quarto.org blocks GitHub Actions runner IPs (Cloudflare firewall);
# the URLs are valid but lychee cannot reach them from CI
"https://quarto.org/.*",
]The "links checked by hand" label is a one-PR workaround, not a root-cause fix — you'd need to apply it on every PR that touches files referencing |
Mirrors the PR #70 round-4 fix so this branch's claude-code-review.yml agrees with the version that's about to land on main. Without this, when #70 merges and this branch needs to pull base, the `if:` line would conflict. Functionally identical to the change on #70: skips fork PRs since they can't read `CLAUDE_CODE_OAUTH_TOKEN` and would otherwise fail with a noisy red check. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @d-morrison's task in 54s —— View job PR Review — commit
|
The file-level summary still said "Skips PRs from Dependabot and from drafts" but now also skips fork PRs (added in commit 19de75f). Update the header so the top-of-file summary matches the if-guard. Minor cleanup per @claude review feedback on this PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@claude please review the new commit |
|
Claude finished @d-morrison's task in 37s —— View job PR Review — commit
|
Adds a concurrency group so a newer push cancels the in-progress review of the now-stale diff — avoids redundant overlapping review runs (and the duplicate fresh comments they'd post under this workflow's keep-history design) on rapid pushes. Plain `cancel-in-progress: true` is safe here because this review is read-only (allowedTools grant no git push/commit), so it never pushes a fix and can't self-cancel the way rme's fix-and-push review did (which needed the conditional guard in d-morrison/rme#817). Also nudges GitHub to recompute this PR's stale CONFLICTING mergeability flag — local git confirms origin/main is a clean ancestor of this branch, so the merge is conflict-free. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Closing+reopening to force GitHub to recompute a stuck CONFLICTING mergeability flag — local git confirms origin/main is a clean ancestor of this branch and the merge is conflict-free (net diff is just claude-code-review.yml). No content change. |
…ude-review-custom-prompt # Conflicts: # .github/workflows/claude-code-review.yml
|
Claude Code CLI (local session) is working on this — paws off until I'm done. |
|
Done with this local session — unclaimed. Addressed the open inline comment (explained the removed step |
|
Stacked on top of #70 — review that one first; this PR's diff is against
add-claude-pr-creation, notmain.Summary
Keeps the upstream
code-review@claude-code-pluginsplugin invocation in.github/workflows/claude-code-review.yml(so we pick up future improvements to the canonical review skill) and layers a Quarto/R-specific addendum on top so the reviewer also catches issues particular to this template repo.The combined prompt:
/code-review:code-review <PR-ref>— the standard structured review..qmdchunk option syntax, cross-ref resolution, the bullet-list rule,code-folddiscipline..lintr.Rcompliance, no new dependencies without justification (template repo → every dep propagates to downstream books)._site//_freeze//.quarto/commits,README.RmdvsREADME.md, BibTeX hygiene.copilot-setup-steps.yml), spell/link-check failures fixed at source.Also:
use_sticky_comment, no delete-prior-sticky pre-step) — the team prefers a visible review history over a single rolling sticky.track_progress: 'true'for the checklist UI in the action's run.--allowedToolsscoped to the inline-comment MCP + read-onlyghcommands +gh pr comment create(narrowed fromgh pr comment:*so the reviewer can post a top-level summary but can't edit or delete prior comments).pull-requests: write(wasread) so the action can leave inline + top-level review comments.issues:staysread.Test plan
--allowedTools).🤖 Generated with Claude Code