This workflow improves test coverage and minimizes bugs in brownfield systems using AI coding assistants.
AI coding assistants are more helpful in greenfield development than for modifying brownfield code — large, undertested, poorly-maintained systems that make up the majority of professional programming. Left to their defaults, these assistants read a few files, guess at intent, and edit first, verify later: precisely the failure mode Michael Feathers warned against in Working Effectively with Legacy Code [1]. We propose a seven-agent workflow — Plan, Map, Break, Cover, Implement, Refactor, Finish — that forces an AI assistant to follow Feathers' discipline: characterize existing behavior with tests before touching code. Each agent has a narrow scope, an explicit exit contract, and a file-based handoff to the next, with human review at every boundary. Applied to a real brownfield codebase, this workflow produced 43 new passing tests (raising statement coverage from 0.85% to 16.78%) against zero new tests and 0.82% coverage for a regular (plan and implement) approach, and avoided all critical and major bugs the regular approach introduced.
No takes yet. Share an insight, caveat, or question.
Ganesan et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: