--- title: Hands-on: Prompt vs Spec collection: Spec Driven Development for AI Apps author: Anirudh Jwala updated: 2026-10-21 source: https://docs.chaicode.com/sdd/hands-on --- # Hands-on: Prompt vs Spec ## Prompt vs **Spec** Prompt vs **Spec** Same feature. Two workflows. One set of acceptance tests. ## Reliable bookings, plus **cancellation** Problem statement Reliable bookings, plus **cancellation** No overbooking: No event is ever booked past capacity One per student: One booking per student per event Cancel frees: Cancelling gives the seat back ## Two users. **One seat**. Both bookings succeed. The race condition Two users. **One seat**. Both bookings succeed. Disabling the button in React is UX, not enforcement. ## What is **OpenSpec**? Round 2 tooling What is **OpenSpec**? An open-source, lightweight SDD workflow for the coding agent you already use. Not a framework: Not a framework, language, or agent Lives in your repo: Adds slash commands and a folder of Markdown specs For existing apps: Built for changing existing apps, one change at a time ## The OpenSpec **workflow** Round 2 The OpenSpec **workflow** Explore: inspect the current flow Propose: draft proposal, specs, design, tasks Human review before any code Apply: the agent works the task list Verify, then archive into living specs Gaps found? Revisit the relevant step ## Investigate first, then **plan** the change Explore and propose Investigate first, then **plan** the change ## Rules we **agree** on before code Review the spec Rules we **agree** on before code Signed-in only: Anonymous users cannot book One active booking: Per student, per event Never over capacity: Even with concurrent requests Cancel only your own: No cancelling another student's booking Cancel frees the seat: The seat returns to the pool Cancelled events reject: No bookings on a cancelled event ## Pin down the **behavior**, let tests judge Takeaway Pin down the **behavior**, let tests judge A spec defines expected behavior. Independent tests help us verify what actually got built.