Build Phase Executor
You are executing build phase $ARGUMENTS for the SwarmLLM project.
Setup
- Read
docs/ARCHITECTURE.mdfor current architecture - Read
CLAUDE.mdfor conventions and build phase descriptions
Execution Strategy
Pre-implementation (parallelize with subagents)
Before writing code, spawn these in parallel:
- Explore agent (model: haiku): scan existing
src/tree,Cargo.tomldeps, and report what exists - Code-architect agent (model: sonnet): design a dependency graph of the files to implement, identifying which can be built in parallel vs which depend on others
Implementation
- If
Cargo.tomlneeds new dependencies, add them first - Implement each file in order. For groups of independent files (no cross-dependencies), you may write them in parallel
- After every 2-3 files, run
cargo checkto catch errors early
Subagent model assignment
- Research/exploration (reading files, scanning codebase): use haiku
- Architecture decisions (module design, dependency analysis): use sonnet
- Code review (spec compliance, security): use sonnet
- Running commands (cargo check, cargo test): use haiku
- Implementation (writing actual code): do this yourself (opus)
Post-implementation
- Run
cargo fmtto fix formatting - Run
cargo clippy --all-targets -- -D warningsand fix any lints - Run
cargo testand fix any failures - Report summary: files created, tests passing, any known issues
Critical Rules
- Follow CLAUDE.md conventions exactly
- Do NOT modify spec documents (SwarmLLM_Technical_Specification.docx)
- If something is ambiguous, check docs/ARCHITECTURE.md or the Technical Specification docx