Test coverage push

Raise test coverage across a codebase in one sitting: one agent per package, each with a measurable target, working in its own worktree so their test runs don't collide.

Find the gaps

Run your coverage tool once and pick the packages furthest below target. Give each its own worktree:

beswarm worktree add --name tests-billing --workspace api
beswarm worktree add --name tests-auth --workspace api
beswarm worktree add --name tests-search --workspace api

Start one agent per package

Put the target and the command that proves it in the prompt:

beswarm agent start --name billing --agent claude <terminal-id> --group coverage \
  --prompt "Add tests for src/billing until its line coverage is at least 80%. Test behavior, not implementation details. Don't change production code; if something is untestable, note why in ../../reports/coverage/billing.md. Run npm test -- --coverage src/billing before you finish and paste the final number into that report."
beswarm agent start --name auth --agent codex <terminal-id> --group coverage \
  --prompt "Same task for src/auth. Write to ../../reports/coverage/auth.md."
beswarm agent start --name search --agent gemini <terminal-id> --group coverage \
  --prompt "Same task for src/search. Write to ../../reports/coverage/search.md."

Mixing agents is fine here. Each package is independent.

Agents started in a worktree's terminal work inside .worktrees/<name>/, so prompts point them at ../../reports/ — the repo root's reports/, where the Artifacts panel looks.

Wait and check the numbers

beswarm agent wait billing --until done,blocked --timeout 2400
beswarm agent wait auth --until done,blocked --timeout 2400
beswarm agent wait search --until done,blocked --timeout 2400
beswarm artifact list

Each report holds the final coverage figure and anything the agent judged untestable. That list is often the more useful output: it points at code that needs refactoring.

Review the tests themselves

Coverage counts lines run, not bugs caught. Ask a separate agent to look for weak tests:

beswarm agent start --name reviewer --agent claude --group coverage \
  --prompt "Review the new tests in .worktrees/tests-*. Flag tests that assert nothing meaningful, mock the code under test, or only check that no exception is thrown. Write to reports/coverage/review.md." \
  --wait --timeout 1200

Merge the worktrees you keep, then beswarm agent close --group coverage.