Promptles
Errors

Describe the Sequence

For timing bugs, describe the exact order of operations that causes the failure. 'There's a race condition' is a label, not a description. 'Request A reads stock=5, then Request B reads stock=5, then both write stock=4' tells Claude exactly where the atomicity breaks down.

Where you'll practice this

5 Promptles scenarios teach this principle directly. Each one drops you into a real engineering ticket and asks you to write the prompt you'd send to Claude Code.

  • The Race Condition

    Your inventory system in `services/inventory.ts` has a critical bug. Two async functions, `reserveStock` and `processOrder`, both read the current stock count, then update it. When two orders come in at the same time for the same product, both read the same stock value (e.g.,…

  • The OAuth Flow

    You need to build a simple Express web app in a file called `calendar-app.js` that authenticates users via Google OAuth 2.0 and displays their upcoming calendar events. The flow is: (1) user visits `/auth` and gets redirected to Google's consent screen, (2) Google redirects back…

  • The Chained Login

    Your QA team has a Postman collection that hits authenticated endpoints on your internal app. Every request needs an `Authorization: Bearer <jwt>` header, but the JWT expires after 15 minutes, so manually pasting it gets old fast. The login endpoint is `POST /auth/login` with…

  • Run TDD End-to-End

    You're adding a `formatRelativeTime(date)` helper to your project's date-utils library. It returns 'just now' for less than a minute, 'N minutes ago' for under an hour, 'N hours ago' for under a day, 'N days ago' for under 7 days, and a formatted absolute date for anything…

  • Checkpoint the Migration

    Your team needs to rename a critical column — `users.display_name` becomes `users.full_name` — across a 50-million-row Postgres table that backs every login. The textbook approach is six steps: (1) add the new `full_name` column nullable, (2) backfill from `display_name`, (3)…

Other principles in Errors