# Turning a Vibe-Coded Demo Into a Real Product (11 Things) <!-- ref: @content/youtube/sean-kochel/2026-06-26-turning-a-vibe-coded-demo-into-a-real-product-11-things tags: [vibe coding, product development, spec-driven development, error handling, security] triggers: [demo lacks structure, frequent bugs in production, security vulnerabilities, poor documentation] trigger_prompt: When you're ready to turn a prototype into a real product but need guidance on establishing processes, documentation, and security measures. version: 2 updated_at: 2026-10-18T05:35:27.352Z --> Use when transitioning from a vibe-coded demo to a production-ready product, ensuring robust processes and documentation. **[Watch on YouTube](https://www.youtube.com/watch?v=wur4BdeE8jk)** # Turning a Vibe-Coded Demo Into a Real Product (11 Things) *Synthesized from Sean Kochel on Sean Kochel, 2026-06-26.* Sean Kochel is a solo builder and educator with roughly two years of vibe-coding practice who walks through the engineering disciplines that separate demos that ship from demos that become memes. ## Core Thesis Sean Kochel argues that the gap between vibe coders who ship real products and those who become cautionary tales isn't talent or tooling — it's process and vocabulary. He frames the whole discipline with a single mental model: **gates versus nets**. Gates are the structures that keep bad inputs out of production in the first place (spec-driven development, tests, CI checks, branch rules, authorization); nets are what catch the failures that get through anyway (error boundaries, rollbacks, observability, alerting). Language models, left to themselves, build neither — they take the happy path, write tests that can't fail, skip indexes, and generate N+1 queries — so the human has to install both layers deliberately. ## Key Insights - **Spec-driven development is the single highest-leverage habit.** Kochel's daily driver is **OpenSpec**; he also recommends **GitHub Spec Kit**, the first one he used. Both can absorb skills/plugins from other libraries (Ora's superpowers, Matt PCO's library, compound engineering) — it's not either/or. - Specs pay off three ways in Kochel's telling: the spec becomes a **contract** the model can be held to, big asks get decomposed into small digestible chunks (models reliably botch oversized tasks halfway through — he names Fable 5 as the only exception he's hit), and every change carries **traceability** — OpenSpec's `changes` directory logs artifacts, linked GitHub issues, and associated commits, so a bug found two weeks later still has its full lineage. - OpenSpec's flow is described as *actions, not phases*: proposal → specs → design → tasks → implement → verify. GitHub Spec Kit runs a parallel shape: **specify → plan → tasks → implement**. - **What belongs in CLAUDE.md has narrowed as models improved.** Kochel now documents only two categories: **known anti-patterns** (things it should specifically not do) and what he calls **"non-inferables"** — knowledge that lives only in your head, or conventions that would cost the agent several file reads to reconstruct. - **Nest CLAUDE.md / AGENTS.md files per subdirectory.** An agent working in the API directory reads that directory's markdown file — effectively layered instructions by location. The **intent-layers** skill library automates this: it finds directories above roughly **20,000 tokens**, generates an agent markdown file describing the files/services/logic inside, and links it from the root file. (Kochel notes viewers report the skill is broken; he keeps a clone on his GitHub.) - **Stale documentation is the nastiest failure mode.** A model will keep making a bad decision because of one obsolete comment buried in a file — and it will never volunteer that as the reason. This is a core reason Kochel favors OpenSpec: every structured change becomes living documentation, so docs can't silently drift. - **Version control, three parts:** atomic commits (one scoped logical change, with a commit message explaining *why* — models won't do this without an explicit skill or instruction); a branching/PR flow (feature branches or worktrees, never commit to main); and a real rollback story. In his own project, no user or agent may open a PR directly against `main` — work flows feature → `develop`, and only `develop` may PR into `main` after tests pass. - **Testing:** red-green-refactor (write a failing test, verify it fails; write the minimum code to pass; then refactor) — he uses Ora's superpowers **test-driven development skill** and wires it into OpenSpec so generated tasks carry the cycle. Cover unit, integration, and end-to-end; he reserves **Playwright end-to-end tests for "money paths"** like a Stripe signup/upgrade flow and the app's core value feature. Every bug becomes a **regression test** so it can't reappear. Watch for the lazy-model anti-pattern: tests written so they can never fail. - **Authentication vs. authorization** is the highest-value security fruit for vibe coders. Authentication = *who are you*; authorization = *what can you do*. His example: the system correctly identifies Joe, but should Joe be able to read Ann's personal data? Models do not infer this. Think in terms of a nutrition app with a public foods table anyone can read and a private recipes table only the owner can read. - **Enforce authorization in layers** — in the API *and* at the database. Supabase Row Level Security is the second layer if an API check gets bypassed. Supabase now offers a toggle to enable RLS by default on new projects; Kochel recommends leaving it on and disabling per-table only when needed. - **Error handling is another model blind spot.** Separate expected errors (a clean, actionable user message like a failed mail-service connection with a retry) from unexpected ones (route to a **global fallback handler** at defined boundaries — never dump a Next.js-style stack trace to users). Don't swallow errors: build front-end and back-end error boundaries and pipe them to a monitor like **Sentry**. Validate inputs on the front end so bad data never reaches the backend, and wrap external API calls (Claude, OpenAI) in **timeouts and retries** so users can't spam a broken endpoint and blow up your error rate. - **Databases hide three non-obvious traps.** Use a **migration system** (version control for your schema — rollable back and forward) rather than raw table edits. Add **indexes** on anything used for lookup or sort — the phone-book analogy: an unindexed table means paging through every entry. And watch for **N+1 queries**, which models generate by default — the waiter who runs one order at a time back to the kitchen instead of taking the whole table's order in one trip. - **Security tooling:** Kochel recommends **DeepSeek**-branded security harness "DeepSsee" (a security harness for your coding agent — not cheap; run it via a Claude Code or Codex license, and even a once-a-month gut check is worth it) and **Trail of Bits'** open-source plugin repo — skills for security audits, diff reviews, insecure-default detection, and static analysis, including a **"sharp edges"** skill that flags error-prone APIs, dangerous configurations, and footgun design. He explicitly warns against meta-prompting your own security skill from scratch. - Also: keep the **OWASP Top 10** as a working checklist; keep secrets in a locked-down deployment environment (e.g. Vercel) rather than front-end code; and add a **pre-commit secret scanner** so keys never enter git history. - **Business-logic flaws are security flaws.** His example of **failing open**: a bad request breaks something, and a free-plan user suddenly has pro-plan API access and runs up your bill. - **Hosting choice is a function of your experience level and your cost model,** not internet advice. Non-engineers should use a PaaS like **Vercel**. Use preview deployments (free on Vercel) as a staging layer. Before committing, have the model walk your codebase, model expected usage (edge function calls, token spend, user scale) and produce a cost/profit-margin comparison across hosts — the alternative is waking up to a $20,000 cloud bill. - **CI/CD via GitHub Actions**, triggered on pull request, running four steps in order: **lint → type check → full test suite → build**. A failure blocks the deploy; a pass produces a Vercel preview link to test before promotion. - **Migrations follow expand → migrate → contract.** Kochel calls this the thing he's most excited about in the whole list. *Expand*: add the new columns and ship the migration — no code reads them yet, so nothing breaks. *Migrate*: backfill data and ship the code that reads the expanded schema; the old columns stay in place, just unread. *Contract*: only then delete the old schema. This solves the ordering dance — push schema without code and it breaks; push code without schema and it breaks. - **Observability has three legs:** **logs** (centralized in something like Sentry, with request ID and user ID attached — not a console.log), **metrics** (dashboards and threshold alerts, e.g. a spike in 500s traced to your OpenAI integration), and **traces** (the path data took before the error). Set an alert for any new unhandled error that hits the global handler. - Kochel's closing frame: what separates a vibe-coded app that gets acquired (he cites Cal AI) from one that collapses is not marketing — it's doing all of the above systematically. ## Actionable Takeaways 1. **Adopt a spec-driven development tool before anything else.** Install **OpenSpec** (Kochel's daily driver) or **GitHub Spec Kit**. Run OpenSpec's flow — proposal → specs → design → tasks → implement → verify — and invoke a TDD skill at the task-generation step so red-green-refactor is baked into every generated task. 2. **Rewrite your CLAUDE.md down to two sections:** known anti-patterns, and "non-inferables" (things the agent could only learn by reading many files or by reading your mind). Delete everything else. 3. **Nest CLAUDE.md / AGENTS.md files in subdirectories** (API, UI, services) so agents load location-specific instructions. Consider the **intent-layers** skill, which auto-documents directories over ~20,000 tokens and links them from the root file. 4. **Lock your branch flow:** feature branches or worktrees only, no direct commits to `main`, and a rule that only `develop` may open a PR into `main` — and only after tests pass. Enforce atomic commits with why-focused messages via an explicit skill or instruction. 5. **Write end-to-end tests (Playwright) for money paths first** — Stripe signup/upgrade, and the app's core value feature. Add unit and integration tests around them. Turn every bug you fix into a regression test. 6. **Grill the model on authorization table by table.** Walk every schema and entity and state explicitly who may read/write what. Then enforce it twice: in the API *and* via Supabase Row Level Security. Leave Supabase's RLS-by-default toggle on and disable per-table only deliberately. 7. **Build a global error fallback handler at your app boundaries**, add front-end and back-end error boundaries, ship errors to Sentry (or AppSignal), validate inputs at the front end, and wrap every external API call in timeouts and retries. 8. **Fix the three database defaults models get wrong:** run schema changes through a migration system, add indexes on anything you look up or sort by, and audit for N+1 queries. 9. **Run a security pass with real tools, not a self-authored skill.** Use the DeepSeek-style security harness at least monthly on a Claude Max/Codex license, layer in the **Trail of Bits** plugin repo (audit, diff review, insecure defaults, static analysis, "sharp edges"), and keep the **OWASP Top 10** as a checklist. Add a pre-commit secret scanner so keys never reach git history. 10. **Wire a GitHub Actions workflow on pull request that runs, in order: lint → type check → test suite → build.** Fail the deploy on any red step; on green, test the Vercel preview link before promoting to production. 11. **Ship every schema change as expand → migrate → contract:** add new columns and migrate; backfill and ship the reading code while old columns remain; delete the old schema only after the new version is verified. 12. **Instrument before you have users, not after:** centralized logs with request and user IDs, metric dashboards with threshold alerts, traces on caught errors, and an alert on every new unhandled error. 13. **Pick your host from your own numbers.** Have the model inventory your services, project usage at your target user count, and compare hosts on profit margin — then choose a PaaS if you're not an engineer. ## Notable Quotes > "Vibe coding without process guard rails is the biggest recipe for disaster I could possibly think of." — Sean Kochel > "The spec becomes a contract that you can force the model to abide by." — Sean Kochel > "Authentication is who are you? Authorization is what can you do?" — Sean Kochel > "We have gates... so that bad inputs to the best of our ability can't actually make it through into the production environment." — Sean Kochel > "Language models are lazy... that will try to sidestep this process." — Sean Kochel --- *Related: `@content/youtube/david-perell/how-writing-helped-this-ceo-build-a-300m-company-sam-corcos` · `@content/youtube/tiago-forte/i-connected-claude-to-everything-then-i-saw-the-gap` · `@content/youtube/sirio-berati/build-ai-apps-with-gpt-5-with-one-prompt` · `@content/youtube/sirio-berati/i-built-the-entire-canva-site-in-30-mins-with-ai` · `@content/youtube/indy-dev-dan/mac-mini-agents-openclaw-is-a-nightmare-use-these-skills-instead`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*