Back to list
AI Agentcode-reviewmulti-agentautomationCI-CDworkflow
AI 编码 Agent 团队自动化代码评审工作流生成器
为多 Agent 编码团队生成标准化的代码评审工作流,包含角色分工、评审规则和质量门禁
7 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
- Lint and format validation
- Type checking pass
- Dependency vulnerability scan
- Diff size guard (flag PRs > 500 lines for split)
Review Stages
- Architecture Review: Does the change align with existing patterns?
- Logic Review: Are there edge cases, race conditions, or logic errors?
- Security Review: SQL injection, XSS, auth bypass, secret leaks
- Performance Review: N+1 queries, unnecessary allocations, missing indexes
- 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:
- GitHub Actions YAML workflow
- Review agent system prompts for each role
- PR comment template with findings summary
- Metrics dashboard config for tracking review quality over time