Feat: Add PR summary in review + Strict JSON schema + Persist previous review when possible#23
Merged
HungKNguyen merged 4 commits intomainfrom Feb 13, 2026
Merged
Conversation
There was a problem hiding this comment.
📋 PR Summary:
This PR adds a PR summary feature to the code review output, implements strict JSON schema enforcement for Claude's responses, and refactors the review persistence logic to update existing reviews in place when possible rather than always dismissing stale reviews. These changes improve review output quality and reduce notification noise for PR authors.
13 files reviewed
| File | Changes |
|---|---|
claudecode/review_schema.py |
New file defining JSON schema for review output validation |
claudecode/github_action_audit.py |
Adds JSON schema enforcement, pr_summary extraction, updated validation |
claudecode/prompts.py |
Adds pr_summary field and guidelines to review prompt |
scripts/comment-pr-findings.js |
New review update logic, PR summary formatting, simplified finding format |
action.yml |
Removes dismiss-stale-reviews input, adds pr-summary.json output |
claudecode/evals/* |
Increased timeouts, added pr_summary/analysis_summary to eval results |
claudecode/test_*.py |
Updated tests for new pr_summary field and schema changes |
scripts/comment-pr-findings.bun.test.js |
Updated tests for new review update logic and PR summary formatting |
.gitignore |
Added .env to gitignore |
No issues found. Changes look good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce PR Summary Table
Currently in the review comment, the bot will give automated one setence statement like "No issue found" or "Found issue ...". Instead we take inspiration from other review bot by asking Claude Code to also produce a
pr_summarywhich describe what the PR is about as well as a table for detailing the changes per file.We also remove
analysis_summaryfrom the Claude Code JSON since that can be derived from the rest of the JSON output (no need to waste token).Increase reliability via Claude Code JSON Schema
This PR also enhances the quality of the Claude Code output by using the new
--json-schemaoption introduced in 2.0.25 (Nov 2025). We still keep the old repair JSON logic as a safeguardChange how the bot handle previous reviews
The current implementation use a flag to determine if we should dismiss the previous staled review. This PR removed the flag to opt for an automated behavior. Upon new reivews:
Misc
comment-pr-finding.js. Some of the fields likefinding.extraMetadataandfinding.extrais no longer being produced by Claude Code.