What is a Clean Prompt?
Clean Prompt: The primary tool for Intentional Design in AI collaboration. Unlike "vibe prompts" (e.g., "Build me an auth system"), a Clean Prompt specifies the architecture before the AI begins implementing, ensuring the developer remains the author of the system's design.
Anatomy of a Clean Prompt
A Clean Prompt (detailed in Chapter 13) consists of five essential sections:
- Context: Where does this feature live? What are the existing patterns?
- Design Decisions: The "Human Design" part. Which libraries? Which state management? Which security patterns?
- The Task: The specific, atomic goal for this session.
- Constraints: Explicit "forbidden zones" or performance requirements.
- Deliverables: What exactly should the AI produce (code, tests, ADR)?
Vibe Prompt vs. Clean Prompt
❌ Vibe Prompt
"Build me a user authentication system with JWT tokens." Result: AI decides the architecture, token storage, and security levels. You own code you didn't design.
✅ Clean Prompt
"I'm implementing JWT authentication. Use httpOnly cookies for storage, bcrypt with cost 12 for passwords, and implement a 24-hour token rotation. Following the pattern in /src/auth/base.ts, implement the validateSession function."
Result: You designed the system. AI implemented your specific engineering choices. You maintain ownership.
The ROI of Clean Prompting
While writing a Clean Prompt takes longer than a vibe prompt, it drastically reduces Comprehension Debt and prevents Prompt Drift. It turns the AI from a "Magic Black Box" into a high-speed implementer of your expertise.
How to Scale Clean Prompts
In Clean Vibe Code, we recommend:
- Prompt Templates: Shared with the team in a
prompts/directory. - Prompt Versioning: Treating key prompts as code artifacts.
- ADR-First Prompting: Writing the Architectural Decision Record before the prompt.
Related Terms
- Vibe Coding: The anti-pattern.
- Intentional Design: The goal of clean prompting.
- Prompt Drift: What clean prompts prevent.
Book Reference
Clean Prompts are the cornerstone of the solution:
- Chapter 13: Clean Prompts Revisited — the full template and methodology.
- Appendix C: Ready-to-use templates for common tasks.