Parallel implementation using Agent Teams. Spawns teammates per module/layer, each owning separate files to avoid conflicts. Uses shared task list with dependencies for autonomous coordination. Run after /startproject plan approval.
Agent Teams による並列実装。/startproject で承認された計画に基づいて実行する。
/startproject が完了し、計画がユーザーに承認されていること.claude/docs/DESIGN.md にアーキテクチャが記録されていることStep 1: Analyze Plan & Design Team
計画からタスク依存関係を分析し、チーム構成を決定
↓
Step 2: Spawn Agent Team
モジュール/レイヤー単位でTeammateを起動
↓
Step 3: Monitor & Coordinate
Lead がモニタリング、統合、品質管理
↓
Step 4: Integration & Verification
全タスク完了後、統合テスト実行
タスクリストから並列化可能なワークストリームを特定する。
Pattern A: Module-Based (推奨)
Teammate 1: Module A (models, core logic)
Teammate 2: Module B (API, endpoints)
Teammate 3: Tests (unit + integration)
Pattern B: Layer-Based
Teammate 1: Data layer (models, DB)
Teammate 2: Business logic (services)
Teammate 3: Interface layer (API/CLI)
Pattern C: Feature-Based
Teammate 1: Feature X (all layers)
Teammate 2: Feature Y (all layers)
Teammate 3: Shared infrastructure
計画に基づいてチームを起動する。
Create an agent team for implementing: {feature}
Each teammate receives:
- Project Brief from CLAUDE.md
- Architecture from .claude/docs/DESIGN.md
- Library constraints from .claude/docs/libraries/
- Their specific task assignments
Spawn teammates:
1. **Implementer-{module}** for each module/workstream
Prompt: "You are implementing {module} for project: {feature}.
Read these files for context:
- CLAUDE.md (project context)
- .claude/docs/DESIGN.md (architecture)
- .claude/docs/libraries/ (library constraints)
Your assigned tasks:
{task list for this teammate}
Your file ownership:
{list of files this teammate owns}
Rules:
- ONLY edit files in your ownership set
- Follow existing codebase patterns
- Write type hints on all functions
- Run ruff check after each file change
- Communicate with other teammates if you need interface changes
When done with each task, mark it completed in the task list."
2. **Tester** (optional but recommended)
Prompt: "You are the Tester for project: {feature}.
Read:
- CLAUDE.md, .claude/docs/DESIGN.md
- Existing test patterns in tests/
Your tasks:
- Write tests for each module as implementers complete them
- Follow TDD where possible (write test stubs first)
- Run uv run pytest after each test file
- Report failing tests to the relevant implementer
Test coverage target: 80%+"
Use delegate mode (Shift+Tab) to prevent Lead from implementing directly.
Wait for all teammates to complete their tasks.
Lead は実装せず、モニタリングと統合に専念する。
| 状況 | 対応 |
|---|---|
| Teammate が長時間タスクを進めない | メッセージで確認、必要なら再指示 |
| ファイル競合が発生 | 所有権を再配分 |
| テストが失敗し続ける | 関連する Implementer にメッセージ |
| 想定外の技術的問題 | Codex に相談(サブエージェント経由) |
TeammateIdle hook と TaskCompleted hook が自動で品質チェック:
全タスク完了後、統合検証を行う。
# All quality checks
uv run ruff check .
uv run ruff format --check .
uv run ty check src/
uv run pytest -v
# Or via poe
poe all
## 実装完了: {feature}
### 完了タスク
- [x] {task 1}
- [x] {task 2}
...
### 品質チェック
- ruff: ✓ / ✗
- ty: ✓ / ✗
- pytest: ✓ ({N} tests passed)
- coverage: {N}%
### 次のステップ
`/team-review` で並列レビューを実行してください
Clean up the team