Hybrid workflow combining human decision-making with AI agent execution. Humans control strategy; agents handle operations.
This pattern divides responsibilities:
Automation Level: ~80% Human Intervention: Strategic decisions only
| Role | Responsibilities |
|---|---|
| Developer | Write code, create PRs, address feedback |
| Team Lead | Review architecture, approve releases |
| AI Agent | Run checks, suggest fixes, manage merges |
| Reviewer | Code quality, business logic validation |
main (production)
└── develop (integration)
└── feature/* (human-created)
| Branch | Purpose | Created By | Merged By |
|---|---|---|---|
main |
Production | - | Agent (after approval) |
develop |
Integration | - | Agent |
feature/* |
Features | Human | Agent |
# Developer creates feature branch
git checkout -b feature/add-auth develop
# Developer implements changes
git add .
git commit -m "feat: add authentication"
# Developer pushes and creates PR
git push origin feature/add-auth
# → Create PR via GitHub/GitLab UI
When PR is created, agent automatically:
┌──────────────────────────────────────────────────┐
│ Agent Review Pipeline │
├──────────────────────────────────────────────────┤
│ 1. Run test suite │
│ 2. Check code style (lint, format) │
│ 3. Build project │
│ 4. Security vulnerability scan │
│ 5. Generate review summary │
│ 6. Identify auto-fixable issues │
│ 7. Apply auto-fixes (formatting, imports) │
│ 8. Notify reviewers │
└──────────────────────────────────────────────────┘
Agent Comments on PR:
## 🤖 Automated Review Summary
### ✅ Checks Passed
- Unit tests: 142 passed
- Coverage: 84% (+2%)
- Build: Success (32s)
### 🔧 Auto-Fixed
- Formatted 3 files
- Sorted imports in auth.py
### ⚠️ Suggestions
- Consider adding error handling in `login()` (line 42)
- Test coverage for `logout()` is below threshold
### 👥 Ready for human review
@team-lead @senior-dev
Reviewer focuses on:
Review outcomes:
After human approval:
Team Lead Agent
│ │
│──── Trigger release ────>│
│ │──── Create release branch
│ │──── Compile changelog
│ │──── Bump version
│<── Release ready ────────│
│ │
│──── Review & approve ───>│
│ │──── Merge to main
│ │──── Create tag
│ │──── Deploy
│<── 🚀 Deployed ──────────│
| Event | Channel | Priority |
|---|---|---|
| PR ready for review | #code-review | Normal |
| Tests failed | #ci-alerts | High |
| Merge conflict | #dev-team | High |
| Release deployed | #releases | Normal |
| Security issue | #security | Urgent |
Agent posts structured comments with:
📊 Weekly Development Summary
PRs Merged: 12
Tests Run: 1,847
Coverage: 84% (+3%)
Releases: 1 (v1.2.0)
Issues Resolved: 8
Top Contributors:
1. @developer-a (5 PRs)
2. @developer-b (4 PRs)
3. @developer-c (3 PRs)
agent:
auto_fix:
formatting: true
imports: true
trailing_whitespace: true
reviews:
generate_summary: true
suggest_improvements: true
max_suggestions: 5
merge:
strategy: squash # or rebase, merge
delete_branch: true
update_changelog: true
approvals:
required: 1
from_code_owners: true
dismiss_stale: true
require_review_from:
- team-lead
- senior-dev
release:
schedule: "0 10 * * 1" # Monday 10:00
require_approval: true
approvers:
- team-lead
- product-owner
✅ Good Fit:
❌ Poor Fit:
| Metric | Target |
|---|---|
| PR Review Time | < 4 hours |
| Merge to Deploy | < 1 day |
| Agent Fix Rate | > 30% of issues |
| Human Review Focus | Architecture only |
| Release Success | > 99% |