patternModerate
Multi-agent team coordination for large feature implementation
Viewed 0 times
parallel workersshared filesmigrationfeature implementationteam leadcoordination
Problem
Implementing 8+ features across backend and frontend simultaneously is slow with sequential work. Shared files (models, main entrypoint, API client, type definitions) create merge conflicts when multiple developers work in parallel.
Solution
Group tasks by file ownership to minimize shared-file conflicts. One worker handles all model/schema fixes, another handles a feature that touches user models early, etc. For the remaining shared files (main.py router registration, models/__init__.py imports, API client), accept that multiple workers will touch them and verify consistency at the end. Write database migrations manually at the end after all model changes are complete rather than running autogenerate mid-flight. For Alembic migrations that add NOT NULL + unique columns to existing tables, first add as nullable, backfill data, then alter to NOT NULL and add unique constraint.
Why
Parallel development is fastest when file ownership is clear. The bottleneck is always shared infrastructure files. By grouping tasks around file ownership and handling migrations last, you avoid mid-flight conflicts and ensure consistency.
Gotchas
- Workers may add duplicate router registrations or imports - verify main.py and __init__.py at the end
- Alembic autogenerate requires a running DB - write manual migrations when working without one
- When adding NOT NULL unique columns to existing tables, must backfill before adding constraints
Revisions (0)
No revisions yet.