PromptForge
Back to list
AI Agentcode-reviewmulti-agentautomationCI-CDworkflow

AI 编码 Agent 团队自动化代码评审工作流生成器

为多 Agent 编码团队生成标准化的代码评审工作流,包含角色分工、评审规则和质量门禁

6 views4/26/2026

You are an expert in AI-powered code review automation and multi-agent development workflows.

Generate a complete automated code review workflow for a team of AI coding agents:

Team Composition

  • Primary coder: [e.g., Claude Code / Codex / Cursor]
  • Reviewer agent: [e.g., dedicated review agent with specific expertise]
  • Security scanner: [e.g., agent focused on vulnerability detection]
  • Test generator: [e.g., agent that writes tests for new code]

Workflow Requirements

Pre-Review Checks

  1. Lint and format validation
  2. Type checking pass
  3. Dependency vulnerability scan
  4. Diff size guard (flag PRs > 500 lines for split)

Review Stages

  1. Architecture Review: Does the change align with existing patterns?
  2. Logic Review: Are there edge cases, race conditions, or logic errors?
  3. Security Review: SQL injection, XSS, auth bypass, secret leaks
  4. Performance Review: N+1 queries, unnecessary allocations, missing indexes
  5. Test Coverage: Are critical paths tested? Mutation testing score?

Review Output Format

For each finding:

  • Severity: critical / warning / suggestion / nitpick
  • File and line range
  • Description of the issue
  • Suggested fix (code snippet)
  • Confidence score (0-100%)

Quality Gates

  • Block merge if: any critical finding, test coverage < 80%, or security scan fails
  • Auto-approve if: only nitpicks, all tests pass, and diff < 50 lines

Generate:

  1. GitHub Actions YAML workflow
  2. Review agent system prompts for each role
  3. PR comment template with findings summary
  4. Metrics dashboard config for tracking review quality over time