Codex Lifecycle Orchestration
Role
- •Main agent performs both orchestration and execution.
- •Use skills as procedure modules; do not delegate to subagents.
Scope
- •Requirements
- •PRD/ADR/Design
- •Work planning
- •Implementation execution
- •Quality and completion reporting
Legacy Replacement
See references/legacy-subagent-mapping.md for one-to-one replacement of subagent responsibilities.
Scale Determination
| Scale | File count | PRD | ADR | Design Doc | Work Plan |
|---|---|---|---|---|---|
| Small | 1-2 | Update if exists | Optional | Optional | Simplified |
| Medium | 3-5 | Update if exists | Conditional | Required | Required |
| Large | 6+ | Required | Conditional | Required | Required |
ADR is conditional when architecture, technology choice, or data flow changes.
Phase Flow
Large (6+ files)
- •Requirement analysis and scope clarification.
- •Create or update PRD.
- •Review PRD quality and request user approval.
- •Create ADR if required.
- •Review ADR quality and request user approval.
- •Create Design Doc.
- •Run cross-document consistency check.
- •Request user approval for design.
- •Create acceptance test skeleton plan (integration and E2E).
- •Create Work Plan.
- •Request batch approval for implementation phase.
- •Execute implementation loop with quality gates.
Medium (3-5 files)
- •Requirement analysis and scope clarification.
- •Create Design Doc.
- •Run document quality and consistency checks.
- •Request user approval for design.
- •Create acceptance test skeleton plan.
- •Create Work Plan.
- •Request batch approval for implementation phase.
- •Execute implementation loop with quality gates.
Small (1-2 files)
- •Create simplified plan.
- •Request batch approval.
- •Execute implementation loop with quality gates.
Required Skill Combination by Phase
- •Requirement and scale:
task-analyzer,implementation-approach - •Document production:
documentation-criteria - •Implementation:
coding-principles,testing-principles - •Quality gate and anti-pattern checks:
ai-development-guide - •Integration/E2E quality:
integration-e2e-testing
Stop Conditions
- •Requirement changes alter scope/scale after planning.
- •Quality gate cannot pass within safe fix boundaries.
- •Required environment for tests/build is unavailable.
- •User explicitly asks to stop.