G

Gemini Review Dispatcher

All-in-one command covering transform, gemini, code, assist. Includes structured workflows, validation checks, and reusable patterns for git workflow.

CommandClipticsgit workflowv1.0.0MIT
0 views0 copies

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

AspectDetails
Comment FetchingRetrieves Gemini Code Assist comments via GitHub CLI API
Severity ClassificationCategorizes as critical, improvement, suggestion, or style
Priority AssignmentMust-fix, should-fix, nice-to-have, or skip with reasoning
Effort EstimationEstimates implementation time (small, medium, large) per item
Execution PhasingGroups 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

ParameterTypeDefaultDescription
printegerauto-detectPR number to process (auto-detects from current branch)
executebooleanfalseStart executing fixes after analysis (prompts for confirmation)
prioritystringallMinimum priority to process: critical, improvement, suggestion, all
previewbooleanfalseShow planned changes without applying them
exportstringnoneExport analysis to file: markdown or json format

Best Practices

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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

  1. 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.

  2. 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.

  3. 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.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates