Clean Vibe Templates
These templates are extracted from Appendix C of Clean Vibe Code. Copy and adapt them for your own repository.
1. The "Clean Prompt" Template
Use this for complex feature implementation.
# Context
I am working on [module name]. Current tech stack: [stack].
Existing patterns can be found in [file path].
# Design Decisions
- State management: [e.g. Redux Toolkit]
- Error handling: [e.g. Result objects]
- Security: [e.g. httpOnly cookies]
# Task
Implement the [feature name] following the design above.
# Constraints
- Do not use [forbidden library].
- Keep functions under 30 lines.
- Ensure 100% test coverage for logic.
# Deliverables
- Implementation code
- Unit tests
- 3-sentence summary of the internal logic
2. Team AI Instructions (.cursorrules)
Standardize your team's AI behavior.
# Team Standards: Clean Vibe Code
You are an expert engineer implementing our specific design.
## Architectural Guardrails
- We use Tailwind CSS for all styling.
- We prefer functional components and hooks.
- Never use empty catch blocks.
## Security Constraints
- All user input must be sanitized via the `validateInput` helper.
- Never hardcode API keys or secrets.
## Agent Boundaries
- STOP and ask for permission before modifying files in `/database/`.
- STOP and ask before updating `package.json` dependencies.
3. AI-Era ADR Template
Document the "Why" behind the "What".
# ADR-[ID]: [Decision Title]
- **Date:** [Date]
- **Status:** [Draft/Accepted/Superseded]
## Context
[What problem were we trying to solve? Why did we need AI assistance?]
## Decision (Human Design)
[What architectural choice did we make? Why is this the 'Clean' path?]
## AI Implementation Details
[Which model was used? What were the key prompts?]
## Consequences & Debt
[What debt did we take? When will it be repaid?]