Feature flag pattern: When replacing an old feature with a new feature via a...
Feature flag pattern: When replacing an old feature with a new feature via a feature flag, avoid changing the old code.
Why? Because changing the old code introduces risk.
Instead: Create new files. Copy/paste from the old code if needed. Later, when you know the new feature works, you can easily delete the old code - it's low-risk because it's completely separate from the new code.
Summary: Maintain clear separation. Optimize for deletion.