3-File AI Coding System — Ryan Carson
Original source: Full Tutorial: A Proven 3-File System to Vibe Code Production Apps | Ryan Carson
TL;DR
- A lightweight, production-oriented workflow built around three files: a concise PRD, a list of atomic tasks, and TDD-style tests.
- Use AI templates to generate and refine the spec, decompose work into bite-sized tasks, and drive implementation through tests and small commits.
- Practicing TDD with AI reduces bugs and rework; use the model as a tutor to fill gaps and explain trade-offs.
- Great for solo builders: ship painkillers (urgent value) before vitamins (nice-to-haves); start tiny, iterate, and automate checks.
Core points
-
The 3 files (and why)
- PRD: clarifies scope, constraints, success criteria, and non-goals in one page.
- Atomic tasks: granular, independently verifiable steps that keep momentum and aid parallelization (human/AI).
- Tests: executable spec; stabilize behavior, enable refactors, and define “done”.
-
Workflow loop
- Draft PRD with AI template → ask questions until constraints are crisp.
- Decompose into atomic tasks (each ~5–30 minutes); include acceptance hints.
- Write/auto-generate tests first; implement the minimal code to pass; refactor.
- Rinse and repeat per task; keep commits small and reversible.
-
TDD with AI
- Let AI propose edge cases, fixtures, and failure modes; then you prune and enforce.
- Prefer code-based checks over fuzzy prompts; make judges binary when using LLM-as-judge.
- Treat test failures as guidance, not blockers; iterate spec/tests together.
-
Using AI as tutor
- Ask for alternative designs, complexity trade-offs, and gotchas before coding.
- Have it explain failing tests, suggest smaller steps, and surface missing constraints.
-
Business/solo builder notes
- Prioritize painkillers over vitamins; solve an urgent, repeated problem.
- Start as a one-person company with strict scope, clear docs, and automated tests.
Simple checklist
- Create a 1-page PRD with goals, constraints, and non-goals.
- Break into atomic tasks with clear acceptance criteria.
- Write tests first (unit/integration); run them continuously.
- Implement smallest change to green; commit; refactor.
- Use AI to draft, critique, and reduce task size; keep a lessons log.