Snippet · Writing & changing code
Add a feature without breaking the last one
The prompt that keeps working code working.
Working code is attached. It currently does <what works today> and I need that to keep working exactly as it does now. Add: <the new feature> Rules: - Show me a diff or the changed sections only, not the whole file. - Do not rename or restructure anything you were not asked to change. - If the new feature genuinely requires changing existing behaviour, stop and tell me what and why before you write it.
Most "the AI broke my app" moments are a model helpfully modernising code you never asked it to touch. Say the working parts are off limits, every time.