Principle
Ownership means you can change the product on a Tuesday without asking a platform for permission. The codebase is the institutional memory of decisions — tests, types, and small modules beat a chat log of what the agent did last month.
AI accelerates typing; it does not absolve structure. The shift from prototype to owned code is a shift from demonstration to revision under stress.
The decision
DEC_009
Repo + CI + deploy
│
▼
Auth + identity
│
▼
Core data model + migrations
│
▼
Billing / integrations (if any)
│
▼
Polish + edge casesWhat “owned” looks like
| Owned | Not owned |
|---|---|
| Git history you control | Export zip from a builder |
Reproducible npm run build | ”Works on my Lovable project” |
| Env vars documented | Secrets in chat |
| One command test or smoke | ”AI will remember” |
| You can explain the data model | Tables named Table_7 |
Workflow
- Run the migration checklist —
templates/migration-checklist.md. - Scaffold intentionally — pick stack you can maintain solo or with your team; boring beats clever.
- Port decisions, not pixels — carry validated workflow and data model; redesign is allowed, amnesia is not.
- Vertical slice first — one path end-to-end in production before horizontal “platform” work.
- Write the README for future you — setup, deploy, where AI is allowed to edit.
- Establish gates — lint, typecheck, or smoke test before merge; agents need guardrails too.
Working with AI in an owned repo
- Scope prompts to files and tasks — “implement ticket #12 in
src/auth/” beats “improve the app.” - Require diffs you can review — if you cannot summarize the change in one sentence, it is too big.
- Keep a
AGENTS.mdorCONTRIBUTING.md— stack, conventions, forbidden zones (billing, migrations). - Never merge what you cannot debug — especially auth, payments, and data deletion.
Tooling
Your chosen framework (Next, Astro, Rails, etc.) matters less than: git, CI (GitHub Actions), hosted deploy (Vercel, Fly, Railway), and a migration tool if you have a database.
Common mistakes
- Big-bang rewrite instead of vertical migration.
- Letting agents create duplicate abstractions every session.
- No staging environment — production becomes the test.
- Skipping delete/export paths until a user asks.
Artifacts
- Migration checklist (templates/)
AGENTS.md— boundaries for humans and agents- Architecture note — one diagram or bullet list of modules and data flow
Further reading
- Chapter 07 — When to leave the prototype
- Chapter 09 — AI pair programming
- Chapter 12 — Testing and maintainability