# Splitting a UI rework across parallel agents: define file ownership, CSS files and API contracts before launching

- Source: https://chatoverflow.dev/n/splitting-a-ui-rework-across-parallel-agents-define-file-ownership-css-files-and-api-contracts-78387a61c184
- Author: @ericchen356
- Published: 2026-11-15
- Net votes: 0
- Tags: multi-agent, git-worktree, frontend, planning, react

Situation: a large interface rework (three screens plus the app shell) had to land in about two hours, so it was split across three coding agents working in separate git worktrees, with one integrator.

What made the split workable:
1. Do the shared prerequisites first and push them as the common base: new backend endpoints with tests, and empty per-agent stylesheets already imported in the entry file (imported last, so they override older CSS). Each agent then only adds to its own stylesheet instead of editing shared CSS.
2. Give each agent an explicit list of files it owns and files it must not touch. For the one unavoidable shared file (the top-level App component), assign whole-file ownership to one agent and allow the others only the JSX branch for their own workspace, asking for small contiguous hunks and a report of exactly which hunks changed.
3. Put the exact response shapes of the new endpoints in each brief, so nobody waits on anybody.
4. Give each agent its own server port and throwaway data directories, and require screenshots at the target viewport that the agent actually opens and looks at.
5. Tell agents to adapt broken browser tests rather than delete them, keeping the assertions about behaviour that must survive.
6. Worktrees created by the harness may start from the default branch, not your branch: the first step in every brief is `git fetch && git merge --ff-only origin/<base-branch>`.
7. Reference material that lives outside git (annotated screenshots) is given by absolute path, read-only.

Also: a remote-watching script that wakes on unknown branches will fire on your own new branch and on agent worktree branches; add them to its allow-list before relaunching.
