From single developer + AI to industrial code generation pipeline.
This module extends the core agentic framework to support team-scale and batch code generation scenarios.
The base framework (checkpoints, escalation, roles) works well for:
- 1 developer + 1 AI session
- Synchronous, interactive work
- Real-time feedback loops
The Factory Model is for:
- Multiple developers + multiple AI agents
- Batch/async code generation (overnight runs)
- High-volume merge request pipelines
- Metrics-driven optimization
| Component | Purpose | Document |
|---|---|---|
| Multi-Agent Orchestration | Coordinate N agents on M tasks | MULTI_AGENT_ORCHESTRATION.md |
| Batch Pipeline | Async code generation workflow | BATCH_PIPELINE.md |
| Automated Gates | Pre-review quality checks | AUTOMATED_GATES.md |
| Metrics Dashboard | Track and optimize performance | METRICS_DASHBOARD.md |
┌─────────────────────────────────────────────────────────────────┐
│ TICKET QUEUE │
│ [Issue #1] [Issue #2] [Issue #3] ... [Issue #N] │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ ORCHESTRATOR │
│ • Assigns tickets to agents based on capacity │
│ • Manages agent pool │
│ • Handles failures and retries │
└─────────────────────────────────────────────────────────────────┘
│
┌───────────────────┼───────────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Agent 1 │ │ Agent 2 │ │ Agent N │
│ C0→C1→C2 │ │ C0→C1→C2 │ │ C0→C1→C2 │
└──────────┘ └──────────┘ └──────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ AUTOMATED GATES │
│ • Static analysis (lint, type check) │
│ • Security scan (SAST, secrets detection) │
│ • Test execution │
│ • Quality score calculation │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ REVIEW QUEUE │
│ Prioritized by: quality score, risk level, reviewer load │
│ [MR #1: 92/100] [MR #2: 87/100] [MR #3: 95/100] │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ METRICS COLLECTOR │
│ • Time to merge │
│ • Acceptance rate │
│ • Rework ratio │
│ • Agent performance │
└─────────────────────────────────────────────────────────────────┘
The Factory Model builds on top of the core framework:
| Core Component | Factory Extension |
|---|---|
| Checkpoints (C0-C3) | Same checkpoints, automated verification |
| Escalation Rules | Automated escalation detection → human queue |
| Roles | Manager role becomes Orchestrator |
| Quality Gates | Automated gates before human review |
- Add automated gates to existing workflow
- Track basic metrics
- Same human oversight
- 2-3 concurrent agents
- Simple round-robin assignment
- Shared review queue
- N agents with orchestrator
- Batch overnight generation
- Metrics-driven optimization
- SLA-based prioritization
Before implementing Factory Model:
- Core framework working — Checkpoints and escalation rules tested
- CI/CD pipeline — Automated tests and deployments
- Code review process — Established review culture
- Metrics baseline — Know your current velocity and quality
- Start with Automated Gates — highest value, lowest risk
- Add Metrics Dashboard — establish baselines
- Then Batch Pipeline if needed
- Finally Multi-Agent Orchestration for scale
The Factory Model is optional. Many teams get excellent results with the core framework alone.