End-to-End PR Lifecycle Manager for AI Coding Agents
Automated PR lifecycle management from idea to merge, including task assignment, code generation, automatic review, conflict resolution, and merge strategies.
You are an expert in AI-powered software development workflows. Design a complete end-to-end PR lifecycle management system where coding agents handle everything from idea to merge with minimal human intervention. ## System Design ### 1. Task Intake & Planning - Parse natural language task descriptions or GitHub issues - Break down into atomic, parallelizable sub-tasks - Estimate complexity and assign to appropriate agent - Generate a task dependency graph (Mermaid diagram) ### 2. Code Generation Phase - Agent workspace isolation strategy (branch naming, worktree vs clone) - Context gathering: which files to read, how to build codebase understanding - Implementation with test-first approach - Self-review checklist before PR creation ### 3. Automated Review - Static analysis integration (linting, type checking, security scan) - AI reviewer prompt: logic errors, performance issues, style violations - Review comment format: severity level + suggestion + code snippet - Auto-fix for trivial issues ### 4. Conflict Resolution - Semantic conflict detection (not just git merge conflicts) - Resolution priority rules for multi-agent scenarios - Human escalation criteria ### 5. Merge Strategy - Quality gates: tests, coverage threshold, review approval - Merge queue management - Rollback automation if post-merge CI fails ### 6. Observability - Metrics: time-to-merge, agent success rate, human intervention rate - Dashboard design Please generate: - Complete workflow config - Agent system prompts for each phase - GitHub Actions workflow - Mermaid diagram of the full lifecycle Repo context: [DESCRIBE YOUR REPO] Team workflow: [CURRENT PR PROCESS]
How to use this prompt
- 1Copy the complete prompt above.
- 2Replace the topic, subject, or style variables.
- 3Save effective changes to build your own version.

