Principle
One clear reason to change.
A module or class should have one coherent responsibility — one principal reason to change. Splitting unrelated concerns reduces the blast radius of future edits.
Traditional engineering
Keep business rules, persistence, notifications and orchestration separate when they evolve for different reasons. Organize modules around coherent responsibilities, not arbitrary file size limits.
With AI coding agents
Give agents bounded changes aligned to module ownership. A single generated PR should not casually mix pricing logic, database migration, observability and UI refactoring without a deliberate reason.