Implement new Analyze phase (Phase 0) for ADW workflows with sub-agent delegation.
Implementation Plan: See docs/architecture/IMPLEMENTATION_PLAN_MULTISTAGE_PLANNING.md
Overview
Add a discrete Analyze phase that runs BEFORE the Plan phase to decompose work into components using Claude Code sub-agents.
5 Implementation Phases
-
Data Types & State Extensions (1.5h)
- Add ComponentAnalysis, DRYFinding, ContextAnalysis dataclasses
- Extend ADWStateData with analysis fields
-
Sub-Agent Definitions (1.5h)
- Create
.claude/subagents/component_analyzer.md
- Create
.claude/subagents/dry_checker.md
- Create
.claude/subagents/context_calculator.md
-
Analyze Phase Script (2.0h)
- Implement
adws/adw_analyze_work_iso.py
- Integrate Task tool for sub-agent spawning
-
Enhanced Plan Phase (2.0h)
- Enhance
adws/adw_plan_iso.py with 3-constraint framework
- Add fallback to time-based heuristics if no analysis
-
Coupled Workflow & Integration (1.0h)
- Create
adws/adw_analyze_plan_iso.py
- Update ALL_PHASES in orchestrator scripts
- Add unit tests
Benefits
- 19% cost reduction (220k vs 271k tokens)
- Backward compatible (opt-in via --skip-analysis)
- DRY checking sub-agent prevents code duplication
- Context-aware phase boundaries (file count + token limits + logical coupling)
New 11-Phase Sequence
- Analyze ← NEW
- Plan ← Enhanced
- Validate
- Build
- Lint
- Test
- Review
- Document
- Ship
- Cleanup
- Verify
Estimate: 8.0 hours
Implement new Analyze phase (Phase 0) for ADW workflows with sub-agent delegation.
Implementation Plan: See
docs/architecture/IMPLEMENTATION_PLAN_MULTISTAGE_PLANNING.mdOverview
Add a discrete Analyze phase that runs BEFORE the Plan phase to decompose work into components using Claude Code sub-agents.
5 Implementation Phases
Data Types & State Extensions (1.5h)
Sub-Agent Definitions (1.5h)
.claude/subagents/component_analyzer.md.claude/subagents/dry_checker.md.claude/subagents/context_calculator.mdAnalyze Phase Script (2.0h)
adws/adw_analyze_work_iso.pyEnhanced Plan Phase (2.0h)
adws/adw_plan_iso.pywith 3-constraint frameworkCoupled Workflow & Integration (1.0h)
adws/adw_analyze_plan_iso.pyBenefits
New 11-Phase Sequence
Estimate: 8.0 hours