Overview
Multi-file editing is where LLM coding assistants provide the most value — and where they are most likely to introduce inconsistencies. Effective techniques ensure changes across files remain coordinated and correct.
Provide the Full Picture
- •Include all files that need changes in the LLM context
- •Show type definitions, implementations, and tests together
- •Include the integration points where changed code is consumed
- •If a file is too large, provide the relevant section plus its public API
Change Order
| Order | File Type | Why First |
|---|---|---|
| 1 | Types / Interfaces | Defines the contract all other code follows |
| 2 | Implementation | Implements the contract defined by types |
| 3 | Tests | Verifies implementation matches expectations |
| 4 | Integration points | Wires everything together (routes, config) |
Verification
After multi-file changes: run the type checker (catches interface mismatches), run tests (catches behavioral regressions), and do a final review of the complete diff. Never merge multi-file LLM changes without all three checks.