What is Prompt Drift?
Prompt Drift (Vibe-Code Smell #1): The phenomenon where a conversation with an AI assistant gradually deviates from the original design intent over multiple turns. Each "fix" or adjustment adds a layer of logic that obscures the original requirements.
Symptoms
- You started wanting "Task Filtering" but ended with "Broken Search."
- You can't explain why a specific piece of logic exists in the final output.
- The AI keeps "forgetting" a constraint you specified in the first turn.
- The chat history is more than 10-15 turns long.
Example
- Turn 1: "Add a simple filter for active tasks." (AI implements it)
- Turn 3: "Also, let's sort them by date." (AI adds sorting, filtering slightly changes)
- Turn 7: "Wait, the sort is broken when I search." (AI adds search, sort logic becomes complex)
- Turn 12: "The active filter doesn't work for search results." (AI patches search, filters break again)
By turn 15, you have a massive block of code that tries to handle search, sort, and filter simultaneously, but none of them work perfectly, and the original intent—a simple active filter—is buried under layers of "fixes."
Why It's Dangerous
Prompt Drift is the primary driver of Knowledge Debt. Because the reasoning for each change is scattered across a long, messy chat session, no one can reconstruct the original logic. The resulting code is a "Magic Black Box" that "works" only by accident.
How to Prevent It
The Clean Vibe methodology suggests the "3-5 Turn Rule":
- Limit Iterations: If a feature isn't working perfectly within 3-5 chat turns, stop.
- Reset & Refine: Don't keep "fixing" the broken session. Take the learnings, start a fresh chat, and provide a more precise "Clean Prompt."
- Version Your Prompts: Keep your successful prompts in your repository (e.g., in a
prompts/folder) so you can return to a known good state.
Related Terms
- Clean Prompt: The tool for preventing drift.
- Over-Iteration: The process that causes drift.
- Context Flood: Another smell that worsens drift.
Book Reference
Prompt Drift is a key concept in Part I:
- Chapter 2: Chat Until It Works — how drift begins.
- Chapter 13: Clean Prompts Revisited — how to implement drift-proof workflows.
- Appendix B: Vibe-Code Smells catalog.