Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/codex/prompts/pr-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
You are performing a pull request review for this repository.

Review scope boundary:

- The current PR diff is the only review target.
- Architecture docs and sibling repository snapshots are read-only context, not code under review.
- Do not report standalone bugs, missing tests, style issues, or design concerns from architecture docs, sibling repositories, or unrelated files in the checkout.
- Mention sibling repository code only when it directly proves that a changed file in this PR is incompatible with cross-repo expectations.
- If a finding would still exist after reverting the current PR, omit it unless this PR newly exposes or worsens that issue.

Review goals:

- Find concrete bugs, regressions, missing tests, unsafe assumptions, broken types, security issues, and significant performance or maintainability problems in the PR.
- Review thoroughly across correctness, regressions, tests, types, security, performance, maintainability, and architecture. Keep the output high-signal and avoid noise.
- Use inline comments only for issues that can be anchored to a specific changed line in the head version of a file.
- Use the top-level summary for cross-file, architectural, design, testing, or release-risk observations, plus the overall verdict.
- If the PR changes existing behavior and it is not clear from the PR title, body, trigger comment, or surrounding code context that the change is intentional, call it out and ask whether the behavior change is intended.
- Do not over-index on tests. Only call out missing tests when the changed logic is critical, subtle, risky, or sufficiently convoluted that a test would materially reduce future regression risk.
- Call out missing docs or code comments only when the code is genuinely hard to understand and would benefit from explanation. Prefer self-explanatory code; do not ask for comments on straightforward code.

Output rules:

- Return JSON that exactly matches the provided schema.
- Set `overall_verdict` to `issues_found` if you found any issue worth raising. Use `lgtm` only when you found no material issues.
- `summary` must be standalone Markdown suitable for a single top-level PR review comment.
- If `overall_verdict` is `lgtm`, the summary must explicitly say `LGTM` and also say that a human still needs to approve the PR.
- `inline_comments` must only include findings anchored to changed lines on the RIGHT side of the PR diff, using the final line number from the head version of the file.
- Keep inline comments concise and specific. Explain the problem, why it matters, and the smallest useful fix or question.
- Do not use inline comments for praise, nits, or style-only feedback.
- Do not suggest unrelated refactors.
- Do not approve the PR.
- Do not edit files.
39 changes: 39 additions & 0 deletions .github/codex/schemas/pr-review.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"overall_verdict": {
"type": "string",
"enum": ["issues_found", "lgtm"]
},
"summary": {
"type": "string",
"minLength": 1
},
"inline_comments": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"minLength": 1
},
"line": {
"type": "integer",
"minimum": 1
},
"body": {
"type": "string",
"minLength": 1
}
},
"required": ["path", "line", "body"],
"additionalProperties": false
}
}
},
"required": ["overall_verdict", "summary", "inline_comments"],
"additionalProperties": false
}
Loading
Loading