ワンクリックで
github-pr-review
// Review a pull request for correctness, EEGLAB parity, and behavioral regressions in sccn/eegprep.
// Review a pull request for correctness, EEGLAB parity, and behavioral regressions in sccn/eegprep.
Develop new EEGPrep features end to end with EEGLAB parity, AGENTS.md compliance, planning, implementation, tests, GUI visual parity, GUI user-flow QA, review, and PR creation. Use when a user asks Codex to build or port an EEGPrep feature, especially pop_* functions, GUI components, or EEGLAB-parity workflows.
Build, port, or iterate on EEGPrep GUI features so they visually and behaviorally match EEGLAB MATLAB UI. Use when implementing a pop_ function GUI, adding an EEGPrep Qt dialog/window, creating or updating visual parity cases under tools/visual_parity, comparing EEGLAB and EEGPrep screenshots, debugging MATLAB GUI capture under X11, or tuning layout/style from an end-user screenshot feedback loop.
Exhaustive user-flow QA workflow using the Computer/GUI agent plus terminal for current PR or branch features. Use only when the user explicitly invokes `$gui-agent-flow-qa`, explicitly mentions `gui-agent-flow-qa`, or explicitly asks to use the Computer/GUI agent to simulate all user flows and produce a QA report. Do not use for ordinary testing, code review, implementation, or GUI parity work unless the user explicitly requests this workflow.
End-to-end workflow for fixing a GitHub issue. Use when asked to fix, investigate, or resolve a GitHub issue in sccn/eegprep.
Authoring pull requests in sccn/eegprep. Use when creating or updating a PR, and whenever changing a branch that is already associated with a PR.
| name | github-pr-review |
| description | Review a pull request for correctness, EEGLAB parity, and behavioral regressions in sccn/eegprep. |
| allowed-tools | Bash(gh issue view:*), Bash(gh search:*), Bash(gh issue list:*), Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*), Bash(gh pr list:*), Bash(git rev-parse:*), mcp__github_inline_comment__create_inline_comment |
Provide a code review for the given pull request.
You are reviewing this PR for EEGPrep, a Python library that aims to port core EEGLAB concepts, workflows, code organization, GUI patterns, and user experience from MATLAB to Python.
Prioritize the following:
Review in this order:
Use this context when reviewing:
When reviewing tests:
These assumptions apply to all agents and subagents:
Follow these steps precisely.
Launch a haiku agent to check if any of the following are true:
gh pr view <PR> --comments, and the review was not explicitly requested via comment, such as "claude review this."When a maintainer explicitly requests a re-review, always proceed even if a prior review exists.
If any stop condition is true, stop and do not proceed.
Still review Claude-generated PRs.
Launch a haiku agent to return a list of file paths, not contents, for all relevant CLAUDE.md and AGENTS.md files, including:
When evaluating compliance for a file, only consider CLAUDE.md and AGENTS.md files that are in that file's directory or parent directories.
Launch a sonnet agent to view the pull request and return:
Launch 4 agents in parallel. Each agent should receive:
Each agent should return a list of issues. Each issue must include:
Audit changes for CLAUDE.md and AGENTS.md compliance.
Only flag clear, unambiguous violations where the relevant instruction is scoped to the changed file.
Audit whether the PR follows existing EEGPrep style, architecture, and conventions.
Only flag maintainability issues that are specific to the changed code and likely to matter.
Do not request speculative abstractions, broad refactors, or unrelated cleanup.
Scan for correctness bugs in the diff itself.
Focus on:
Flag only significant bugs. Ignore nitpicks and likely false positives.
Do not flag issues that cannot be validated without looking at context outside of the diff.
Review the introduced code for EEGPrep-specific risks.
Focus on:
Only flag concrete, actionable issues tied to changed code.
We only want high-signal findings.
Flag issues where:
Do not flag:
If you are not confident an issue is real, do not flag it. False positives erode trust and waste reviewer time.
For each issue found in step 4, launch a parallel validation subagent.
The validation subagent should receive:
Use:
The validation subagent must determine whether the issue is truly valid with high confidence.
For example:
Filter out any issues that were not validated in step 5.
The remaining validated findings form the final review.
Output a summary of the review findings to the terminal.
If issues were found, list each issue with:
If no issues were found, state:
No issues found. Checked for bugs, EEGLAB parity, data structure compatibility, tests, and CLAUDE.md/AGENTS.md compliance.
If --comment argument was not provided, stop here. Do not post any GitHub comments.
If --comment argument was provided, continue.
Create a review comment body file.
The comment must use this format:
## Code review
- Overall assessment: <safe to merge / needs changes / needs more context>
- Highest-risk area: <area>
- Merge recommendation: <safe to merge / needs changes / needs more context>
## Blocking
<findings or None.>
## Important
<findings or None.>
## Nits
<findings or None.>
## Test gaps
<findings or None.>
## EEGLAB parity notes
<findings or None.>
Rules for the review comment:
None.If no issues were found, use this format:
## Code review
- Overall assessment: Looks good.
- Highest-risk area: None identified.
- Merge recommendation: Safe to merge.
## Blocking
None.
## Important
None.
## Nits
None.
## Test gaps
None.
## EEGLAB parity notes
None.
Checked for correctness bugs, EEGLAB parity, data structure compatibility, changed-behavior tests, and CLAUDE.md/AGENTS.md compliance.
Post or update the PR review comment using:
gh pr comment "$PR_NUMBER" --edit-last --create-if-none --body-file <file>
Create a list of all inline comments you plan to leave. This list is only for internal review. Do not post it anywhere.
Post inline comments only for validated issues that are best attached to a specific changed line.
Do not post inline comments for broad summary items, general test gaps, or high-level EEGLAB parity notes unless there is a specific changed line where the issue belongs.
Post inline comments using mcp__github_inline_comment__create_inline_comment with confirmed: true.
For each inline comment:
You must cite and link each issue in inline comments when referring to files, code, CLAUDE.md, AGENTS.md, or EEGLAB reference material.
When linking to code in inline comments, follow this format precisely:
https://github.com/sccn/eegprep/blob/e2e3d3971874cbf0102fc0d3e2a189277f999a1a/README.md#L1-L5
Requirements:
$(git rev-parse HEAD) in Markdown links.# after the file name.L[start]-L[end].