Skip to content

Commit 56782fb

Browse files
committed
✨ feat(ci): decomposed-review prompt for Claude Code review — structured output
Fourth of four PRs from the fullsend-ai/fullsend automation evaluation. Adopts fullsend's "decomposed code review" pattern (docs/problems/code-review.md) — split review into specialized concerns (correctness, security, style) rather than one monolithic pass. Done as a single LLM call with structured output, not 3 parallel jobs, to keep token cost neutral. The prompt asks the existing /code-review:code-review plugin to organize its findings into three explicit sections with P0/P1/P2 priority tags, and to write "None." under any section that has nothing to report so it doesn't fabricate issues. The SECURITY section references docs/security/SECURITY-AI.md (added in PR #8249) so the reviewer explicitly watches for the six threat categories — external prompt injection, insider credentials, DoS, agent drift, supply chain, agent-to-agent injection — on any PR that touches LLM-calling code. Only change is the `prompt:` field in the existing `.github/workflows/claude-code-review.yml`. No new actions, no new secrets, no cost increase. Expected behavior after merge: - Every PR's Claude Code review comment now has a CORRECTNESS / SECURITY / STYLE structure instead of prose. - Every issue is tagged P0/P1/P2 so reviewers can triage quickly. - A pure doc PR should show "None." in all three sections, not fabricated nits. - A PR touching LLM-calling code should produce at least one item in SECURITY referencing prompt-injection risk. Signed-off-by: Andrew Anderson <[email protected]>
1 parent b30010f commit 56782fb

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/claude-code-review.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,32 @@ jobs:
4141
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
4242
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
4343
plugins: 'code-review@claude-code-plugins'
44-
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
44+
# Decomposed-review prompt: single LLM call, structured output
45+
# with three explicit concern sections + priority ranking.
46+
# Adapted from fullsend-ai/fullsend's "decomposed code review"
47+
# pattern (docs/problems/code-review.md) — kept as a single call
48+
# rather than 3 parallel jobs to avoid tripling the token cost.
49+
# See docs/security/SECURITY-AI.md for the security concerns the
50+
# SECURITY section is asked to watch for.
51+
prompt: |
52+
/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}
53+
54+
After producing the review, organize your comments into exactly three sections in this order:
55+
56+
## CORRECTNESS
57+
Bugs, race conditions, logic errors, broken edge cases, incorrect assumptions, type mismatches, missing null/undefined guards. Things that will make the code behave wrong at runtime.
58+
59+
## SECURITY
60+
Authentication/authorization gaps, input validation, secret handling, injection (SQL, command, prompt), unsafe deserialization, path traversal, CORS, CSRF, and — for any LLM-calling code — the six threat categories from `docs/security/SECURITY-AI.md` (external prompt injection, insider credentials, DoS/resource exhaustion, agent drift, supply chain, agent-to-agent injection).
61+
62+
## STYLE
63+
Naming, comments, idiomatic patterns, dead code, missing constants (magic numbers/strings), hardcoded routes, localization gaps. Things that affect readability and maintainability but not correctness.
64+
65+
For every issue you raise, prefix it with a priority tag: **P0** (must fix before merge), **P1** (should fix before merge), or **P2** (nice to have, follow-up OK).
66+
67+
If a section has nothing to report, write exactly `None.` on a line by itself under that heading — do not fabricate issues to fill the section.
68+
69+
Keep the total response scannable: prefer bullets over prose, link to specific file:line references, and don't repeat the same issue across sections.
4570
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
4671
# or https://code.claude.com/docs/en/cli-reference for available options
4772

0 commit comments

Comments
 (0)