claude-memory/graph/solutions/agent-swarm-wave-parallelism-for-rust-implementation-with-co-3ecd87.md
2026-02-27 23:06:27 -06:00

61 lines
2.6 KiB
Markdown

---
id: 3ecd877b-de73-4afd-b328-b3ee99f5a1e3
type: solution
title: "Agent swarm wave parallelism for Rust implementation with code review pass"
tags: [claude-code, swarm, orchestrator, code-review, rust, sba-scout, workflow]
importance: 0.6
confidence: 0.8
created: "2026-02-28T04:58:09.031652+00:00"
updated: "2026-02-28T05:06:27.264870+00:00"
relations:
- target: 4dc83eed-b0b1-4924-b82e-faf352426785
type: CAUSES
direction: outgoing
strength: 0.8
edge_id: 235a68a1-bb13-43e0-9784-4b8561f7685a
- target: 27a1f728-ec90-469c-a6ab-5644d333322f
type: CAUSES
direction: outgoing
strength: 0.9
edge_id: 08588ede-b8fa-4b19-9c7e-b513808fa2e7
- target: 99f4462b-91eb-4243-99cf-7a74a3afadbf
type: BUILDS_ON
direction: outgoing
strength: 0.8
edge_id: 75cf8b48-8e9a-467b-9552-fb44d978a9ae
- target: 3227a923-84c4-4fe3-8574-dbf74d6e8b37
type: RELATED_TO
direction: outgoing
strength: 0.9
edge_id: 391f6718-4f2f-49d0-acb8-659b04ed8c51
- target: 0e484de1-cb92-479c-95ec-06fa9e886c0c
type: BUILDS_ON
direction: incoming
strength: 0.95
edge_id: 91e7a65f-ba4f-4533-b9b6-b9d732762490
---
# Agent Swarm Wave Pattern for Rust Implementation
Used TeamCreate + Agent worktrees for parallel Rust implementation across 3 waves based on dependency graph.
## What Worked
- **Wave parallelism** works well when tasks map to separate files (`types.rs`, `client.rs`, `importer.rs`, `sync.rs`) — no merge conflicts, each agent owns its file
- **Full task descriptions** with column mappings and reference file paths let coders work autonomously with zero clarification needed
- **All 7 coders produced compiling code on first try** — the thorough task specs paid off
## Problems Encountered
- **Pane limit hit**: Got "no space for new pane" error when 6 idle agents from earlier waves were still alive. Shut down idle agents promptly between waves to avoid this.
## Code Review Caught Real Bugs
1. **Missing `#[serde(default)]` on 8 TeamData fields** — would cause runtime deserialization panics when API returns objects without those optional fields
2. **Dead `ApiError::Parse` variant**`response.json()` returns `reqwest::Error` not `serde_json::Error`, making the Parse variant unreachable. Fix: use `response.text()` + `serde_json::from_str()`
3. **`import_all_cards` hard-failing** on first missing CSV — changed to resilient independent tries for each CSV
## Recommendation
Always run a code review agent after implementation waves, especially for error handling and serde derives. The review ROI was high — caught 3 bugs that would have been runtime failures.