Spec → Ship: A Practical Workflow for Building With AI Coding Agents
A repeatable, engineering-first workflow for turning fuzzy ideas into shipped software — using AI agents without sacrificing quality.
Spec → Ship: A Practical Workflow for Building With AI Coding Agents
AI coding agents are great at producing output. The real challenge is producing outcomes: software that is correct, secure, and maintainable.
This is the workflow I use to get reliable results.
1) Start with constraints, not features
Before anything else, define:
- Audience (who is this for?)
- Success metrics (what improves?)
- Non-goals (what’s explicitly out of scope?)
- Risks (security, data integrity, performance, privacy)
Constraints reduce wasted effort and prevent “AI-driven scope creep.”
2) Make “done” testable
A good spec makes acceptance obvious. Examples:
- “Admin routes require authenticated admin users.”
- “Published content is visible publicly; drafts are not.”
- “Build succeeds even when optional env vars are missing.”
- “RSS and sitemap are generated.”
If you can’t tell whether it’s done, it’s not scoped.
3) Slice the work into verifiable increments
The agent should ship in small chunks:
- one route,
- one CRUD surface,
- one policy layer,
- one data fetch path.
Each slice should end with: it compiles, it runs, it matches the spec.
4) Put security rules where mistakes are hardest
Two principles:
- Enforce permissions close to the data (e.g., row-level security).
- Keep server-only secrets server-only (never in client bundles).
Even if your UI is “correct,” assume it can be bypassed.
5) Prefer boring architecture
When in doubt:
- a clear table schema over “flexible JSON everywhere”
- explicit server actions over complex client state
- readable code over clever abstractions
Boring systems are easier to secure and maintain.
6) Add a “verification loop” to every change
A reliable loop looks like:
- compile/build check
- a quick click-path sanity check (the happy path)
- at least one failure-mode check (unauthorized, missing data, empty state)
If you only test happy paths, production will test the rest.
7) Capture the decisions
The highest-leverage output isn’t code—it’s why the code is this way. Keep short notes:
- what tradeoff you made
- why you chose it
- what you’d revisit later
That becomes your roadmap.
If you’re building with AI agents and want fewer surprises, this workflow is a strong default. If you want help applying it to your product, reach out via Contact.