Gemini Review Dispatcher
All-in-one command covering transform, gemini, code, assist. Includes structured workflows, validation checks, and reusable patterns for git workflow.
Gemini Review Dispatcher
Fetch Gemini Code Assist review comments from a PR, prioritize them, and create an actionable task list for systematic resolution.
When to Use This Command
Run this command when you need to:
- Process Gemini Code Assist review feedback on a pull request into prioritized action items
- Convert automated AI review comments into a structured task list with severity classifications
- Systematically address PR review feedback with effort estimates and implementation order
Consider alternatives when:
- The PR has no Gemini Code Assist review (the reviewer is human or a different bot)
- You want a general code analysis rather than processing existing review comments
Quick Start
Configuration
name: gemini-review-dispatcher type: command category: git-workflow
Example Invocation
claude command:run gemini-review-dispatcher --pr 42
Example Output
PR #42: feat(payments): Add Stripe integration
Gemini Review: 14 comments found
Comment Analysis:
Critical (must-fix): 2
Improvement (should-fix): 5
Suggestion (nice-to-have): 4
Style (optional): 3
Priority Task List:
[P1] Fix SQL injection in query builder (auth.ts:45) ~15min
[P1] Remove exposed API key from config (config.ts:12) ~5min
[P2] Add error handling to payment webhook (webhook.ts) ~30min
[P2] Reduce PaymentService complexity (service.ts) ~45min
[P2] Add input validation to checkout endpoint ~20min
[P3] Update JSDoc for public methods ~15min
[P3] Rename variables for clarity (utils.ts) ~5min
Execution Plan:
Phase 1 (Critical): 2 items, ~20min - fix immediately
Phase 2 (Important): 3 items, ~1h 35min - same PR
Phase 3 (Optional): 2 items, ~20min - future PR
Skipped: 3 style comments (conflict with project conventions)
Start fixing? Run with --execute to begin Phase 1.
Core Concepts
Review Processing Overview
| Aspect | Details |
|---|---|
| Comment Fetching | Retrieves Gemini Code Assist comments via GitHub CLI API |
| Severity Classification | Categorizes as critical, improvement, suggestion, or style |
| Priority Assignment | Must-fix, should-fix, nice-to-have, or skip with reasoning |
| Effort Estimation | Estimates implementation time (small, medium, large) per item |
| Execution Phasing | Groups fixes into phases: critical first, then important, then optional |
Review Dispatch Workflow
PR Number
|
v
+--------------------+
| Fetch PR + Reviews |---> gh api pulls/N/comments
+--------------------+
|
v
+--------------------+
| Parse Comments |---> Extract location, issue, suggestion
+--------------------+
|
v
+--------------------+
| Classify Severity |---> Critical / Improvement / Style
+--------------------+
|
v
+--------------------+
| Estimate Effort |---> Small (5min) / Med (30min) / Large
+--------------------+
|
v
+--------------------+
| Generate Task List |---> Prioritized with phases
+--------------------+
|
v
+--------------------+
| Execute (optional) |---> Apply fixes phase by phase
+--------------------+
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| pr | integer | auto-detect | PR number to process (auto-detects from current branch) |
| execute | boolean | false | Start executing fixes after analysis (prompts for confirmation) |
| priority | string | all | Minimum priority to process: critical, improvement, suggestion, all |
| preview | boolean | false | Show planned changes without applying them |
| export | string | none | Export analysis to file: markdown or json format |
Best Practices
-
Fix Critical Issues First - Security vulnerabilities and data integrity issues must be resolved before the PR merges. Address all P1 items in the first commit, then proceed to improvements.
-
Do Not Blindly Accept Every Suggestion - Gemini's suggestions are recommendations, not mandates. Evaluate each one against project context. Some suggestions may conflict with established patterns or be low-value changes.
-
Document Skip Decisions - When you decide not to implement a Gemini suggestion, record why. This prevents revisiting the same decision in future reviews and helps calibrate the tool's usefulness.
-
Group Related Fixes - When multiple comments relate to the same file or module, fix them together in a single commit. This reduces review churn and keeps the git history clean.
-
Use Separate Commits Per Phase - Create one commit for critical fixes, another for improvements, and optionally a third for style changes. This makes it easy for reviewers to verify that critical issues were addressed.
Common Issues
-
No Gemini Comments Found - The PR does not have Gemini Code Assist enabled or the review has not been triggered yet. Verify that Gemini Code Assist is installed on the repository and that the PR has been reviewed.
-
False Positive Security Alert - Gemini flags a pattern as a security issue that is actually safe in context (e.g., a test file with hardcoded credentials). Mark it as skipped with a clear justification rather than implementing an unnecessary fix.
-
Effort Estimate Significantly Wrong - The estimated 15-minute fix turns out to require 2 hours due to hidden complexity. Re-evaluate the task, update the estimate, and consider deferring it to a follow-up PR if it exceeds the original scope.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.