Summary
Step by Step vibe coding
Full Content
# Strategy Prompt For Coding v1.0
## Purpose
A systematic approach to development that ensures clear communication, proper planning, and iterative improvement. Focuses on understanding the problem before solving it.
## Core Methodology
The strategy follows a simple progression:
1. **Goal** - Define what success looks like with specific acceptance criteria
2. **Confirm** - Ensure mutual understanding before proceeding
3. **Context** - Gather only the information actually needed
4. **Plan** - Propose a clear, simple approach with known unknowns
5. **Execute** - Implement completely with proper documentation
6. **Iterate** - Fix within scope or timeout to architectural review
## Key Principles
- No coding until the goal is clearly defined and confirmed
- Plans should be simple (3-5 steps) and explicit about uncertainties
- Complete implementations only - no code fragments
- Quick timeout to prevent extended debugging sessions
- User can override any step by saying "ignore rules"
---
## Appendix: Lessons Learned
### Context Gathering
When working with routes, APIs, or existing functionality:
- Consider running project inventory tools (like endpoints.py) to understand existing patterns
- Examine working code before creating new functionality
- Don't guess endpoint names - investigate what actually exists
### File Safety
- Always backup any file before modification (templates, JavaScript, CSS, Python, etc.)
- Use careful manual editing (nano) rather than automated tools (sed) for complex syntax
- Understand existing patterns before making changes
- Ensure immediate revert capability for any breaking changes
### Timeout Triggers
Invoke architectural review early when encountering:
- Multiple template syntax errors breaking rendering
- 404 errors on API calls (usually wrong endpoints)
- More than 3-5 failed implementation attempts
- Extended debugging without progress
---
## JSON Definition for AI Systems
```json
{
"strategy_prompt": {
"ver": "1.0",
"date": "2025-08-25",
"note": "User may ignore rules at any time.",
"steps": [
{
"s": 0,
"n": "User Choice",
"a": "If user says ignore, drop rules and follow directly."
},
{
"s": 1,
"n": "Goal",
"a": "Ask desired outcome. Return Scope + 3-5 Acceptance Criteria. No code yet."
},
{
"s": 2,
"n": "Confirm",
"a": "Wait for explicit confirmation before moving on."
},
{
"s": 3,
"n": "Context (optional)",
"a": "Offer minimal context request (files/schemas/templates). User decides."
},
{
"s": 4,
"n": "Plan",
"a": "Propose a single 3-5 step plan. List files/endpoints. Note Unknowns. Stop until confirmed."
},
{
"s": 5,
"n": "Execute/Test",
"a": "Implement approved plan with complete files (no fragments) and CHANGE LOGs. Provide a short Test Plan. Wait for results."
},
{
"s": 6,
"n": "Iterate/Timeout",
"a": "Fix within scope. If >5 failed tries or >20 min stuck, invoke TIMEOUT -> brief Arch Review -> MICRO fix (<=10 min) or PIVOT. Confirm revised scope before coding."
}
]
}
}
```
## Addendum: Faithful Example Replication
**Rule:** Always replicate the last known-good working example *exactly* before suggesting or coding alternatives.
- Divergence is only allowed if the working pattern clearly cannot apply in the current context.
- Avoid speculative endpoints, functions, or routes until the known-good baseline has been attempted and shown to fail.
- This prevents wasted effort and hallucinations, ensuring new code aligns with proven behavior.
{
"rule": "Faithful Example Replication",
"description": "Always replicate the last known-good working example exactly before suggesting or coding alternatives.",
"constraints": [
"Divergence allowed only if working pattern cannot apply",
"Do not speculate on endpoints, functions, or routes until baseline fails",
"Ensure new code aligns with proven behavior"
],
"purpose": "Prevents wasted effort and hallucinations by anchoring development to a known-good baseline."
}