From 33a2a2e5ab3a6011ecac40e6d1466a6d56f85e1d Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Tue, 10 Mar 2026 15:23:59 -0400 Subject: [PATCH] Add claude review command Signed-off-by: Abhijeet Kasurde --- .claude/commands/review.md | 56 ++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 3 ++ 2 files changed, 59 insertions(+) create mode 100644 .claude/commands/review.md create mode 100644 CLAUDE.md diff --git a/.claude/commands/review.md b/.claude/commands/review.md new file mode 100644 index 00000000..5abaacc6 --- /dev/null +++ b/.claude/commands/review.md @@ -0,0 +1,56 @@ +--- +description: Review an Ansible Builder PR following the project's standardized process +argument-hint: +allowed-tools: [TodoWrite, Bash(gh pr view:*), Bash(gh pr diff:*), Bash(gh pr checkout:*), Bash(gh pr checks:*), Read, Grep, Glob, Search] +--- + +PR Review Command +================= + +Review an Ansible Builder PR following the project's standardized process. + +Usage +----- + +```bash +/review +``` + +Arguments +--------- + +- `pr_number` (required): The GitHub PR number to review + +Implementation +-------------- + +This command implements the PR review process for ansible-builder, which uses tox/pytest for testing and GitHub releases for changelog management. + +Review Process Steps +-------------------- + +The command follows these numbered steps: + +1. **Create TodoWrite list** for systematic review tracking +2. **Get PR details**: `gh pr view -R ansible/ansible-builder` to understand scope, motivation and the desired outcome +3. **Get PR diff**: `gh pr diff -R ansible/ansible-builder` to see all changes +4. **Check required components FIRST**: + - Verify tests exist and specifically cover the changed code paths + - Unit tests should be pytest style, and functional rather than tightly coupled to mocking + - All source code changes MUST include tests (per CONTRIBUTING.md) + - Check for appropriate test coverage in `test/unit/` or `test/integration/` +5. **Checkout PR branch**: `gh pr checkout -R ansible/ansible-builder` to examine code holistically +6. **Review existing feedback**: `gh pr view -R ansible/ansible-builder --comments` for all comments and previous reviews +7. **Verify all issues addressed**: Ensure CI failures, reviewer requests, and discussion points are resolved +8. **Call out unresolved feedback**: Explicitly mention any discussions/requests that remain unaddressed + +Critical Review Elements +------------------------ + +- **Licensing**: Verify Apache License 2.0 compatibility for any new dependencies +- **Test scope**: Tests must exercise actual changed code, not just add random coverage +- **Changelog**: No changelog fragments needed - managed via GitHub releases +- **Testing**: Uses tox/pytest (not ansible-test). Check CI passes for linters, unit, and integration tests +- **Code quality**: Must pass `tox -e linters` (flake8, yamllint, mypy) + +Each step is tracked in TodoWrite for visibility and systematic completion. A review round should not exceed 20 feedback items. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..a076ce07 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,3 @@ +- @AGENTS.md +- @~/.claude/ansible.md +- @CLAUDE.local.md