Perform code reviews using parallel aimi-native review agents
From aimi-engineeringnpx claudepluginhub aimi-so/aimi-engineering-plugin --plugin aimi-engineering[PR number, GitHub URL, branch name, or latest]/reviewRuns Codex code review on local git state (working tree or vs base branch). Supports --wait/--background, --base <ref>, --scope auto|working-tree|branch.
/reviewReviews HTML file for design anti-patterns, principles violations, and accessibility issues. Generates markdown report with status tables and recommendations.
/reviewReviews staged changes or recent commits across five axes—correctness, readability, architecture, security, performance—producing categorized findings with file:line references and fixes.
/reviewReviews specified code scope via four specialists (quality, security, performance, architecture), producing summary, detailed findings, refactoring suggestions, prioritized action plan.
/reviewPerforms expert multi-LLM code review with inline PR comments on staged changes, open PRs, working tree, or paths. Checks LLM providers and queries focus areas.
/reviewDispatches the reviewer agent to review current branch code changes against code quality principles.
Perform code reviews using parallel aimi-native review agents with findings synthesis.
<review_target> #$ARGUMENTS </review_target>
gh pr view $ARGUMENTS --json title,body,files,headRefName,baseRefNamegit diff main...$ARGUMENTS --name-only# Get changed files
gh pr view [number] --json files --jq '.files[].path'
# OR for branch comparison:
git diff main...HEAD --name-only
Read the changed files to understand the PR content. Collect the diff for agent context.
These paths must never be flagged for deletion or removal by any review agent:
.aimi/plans/*.md — Plan files.aimi/solutions/*.md — Solution documents.aimi/tasks/*.json — Task files.aimi/brainstorms/*.md — Brainstorm documentsRun these agents in parallel using the Task tool:
Task subagent_type="aimi-engineering:review:aimi-architecture-strategist"
prompt: "Review this code for architectural compliance:
[PR content / diff summary]"
Task subagent_type="aimi-engineering:review:aimi-security-sentinel"
prompt: "Perform security audit on this code:
[PR content / diff summary]"
Task subagent_type="aimi-engineering:review:aimi-code-simplicity-reviewer"
prompt: "Review this code for simplicity and minimalism:
[PR content / diff summary]"
Task subagent_type="aimi-engineering:review:aimi-performance-oracle"
prompt: "Analyze this code for performance issues:
[PR content / diff summary]"
Task subagent_type="aimi-engineering:review:aimi-agent-native-reviewer"
prompt: "Verify new features are agent-accessible:
[PR content / diff summary]"
Task subagent_type="aimi-engineering:research:aimi-learnings-researcher"
prompt: "Search .aimi/solutions/ for past issues related to this PR:
[PR content / diff summary]"
Run ONLY when PR contains database migrations, schema changes, or data backfills.
Detection: Check if changed files include db/migrate/*.rb, db/schema.rb, migration scripts, or data backfill tasks.
Task subagent_type="aimi-engineering:review:aimi-schema-drift-detector"
prompt: "Detect unrelated schema.rb changes:
[PR content / diff summary]"
Task subagent_type="aimi-engineering:review:aimi-data-migration-expert"
prompt: "Validate ID mappings and migration safety:
[PR content / diff summary]"
Task subagent_type="aimi-engineering:review:aimi-deployment-verification-agent"
prompt: "Create deployment checklist with verification queries:
[PR content / diff summary]"
Detect primary language from changed files and run the appropriate reviewer:
| File Extensions | Agent |
|---|---|
*.rb, Gemfile, *.erb | aimi-engineering:review:aimi-kieran-rails-reviewer |
*.ts, *.tsx, *.js | aimi-engineering:review:aimi-kieran-typescript-reviewer |
*.py | aimi-engineering:review:aimi-kieran-python-reviewer |
For Rails projects, also consider running:
aimi-engineering:review:aimi-dhh-rails-reviewer for Rails convention checksaimi-engineering:review:aimi-julik-frontend-races-reviewer for Stimulus/JS race conditionsFor each finding: Small (< 30 min), Medium (30 min - 2 hours), Large (> 2 hours)
## Review Complete
**Review Target:** [PR title or branch name]
**Branch:** [branch-name]
### Findings Summary
- **Total Findings:** [X]
- **P1 CRITICAL:** [count] - BLOCKS MERGE
- **P2 IMPORTANT:** [count] - Should Fix
- **P3 NICE-TO-HAVE:** [count] - Enhancements
### P1 - Critical (Must Fix Before Merge)
1. **[Finding title]** — [description]
- Location: [file:line]
- Impact: [what breaks]
- Fix: [how to fix]
- Effort: [Small/Medium/Large]
### P2 - Important (Should Fix)
1. **[Finding title]** — [description]
- Location: [file:line]
- Recommendation: [how to improve]
- Effort: [Small/Medium/Large]
### P3 - Nice-to-Have
1. **[Finding title]** — [description]
- Suggestion: [improvement]
### Review Agents Used
- aimi-architecture-strategist
- aimi-security-sentinel
- aimi-code-simplicity-reviewer
- aimi-performance-oracle
- aimi-agent-native-reviewer
- aimi-learnings-researcher
- [conditional agents if run]
### Next Steps
1. **Address P1 findings** — Critical issues must be fixed before merge
2. **Run `/aimi:execute`** — Continue autonomous execution
3. **Run `/aimi:status`** — Check current task progress
| Failure | Action |
|---|---|
| No review target found | Ask user to specify PR number or branch |
| Agent fails | Proceed with available results, note in report |
| No changed files | Report "No changes to review" |
| gh CLI not installed | Fall back to git diff for branch comparison |