$ chip ~/vibe-drops
Is your prompt the reason the model keeps missing? Tap the weak prompt, then the strong one — and see exactly what changed.
Interactive take on The Prompt Engineering Playbook for Programmers by Addy Osmani.
A function meant to index users by ID throws TypeError: Cannot read property 'id' of undefined. Two prompts, two answers. Tap each to reveal.
"Why isn't my mapUsersById function working?"
"Hard to say without more info. Is the array maybe empty, or not an array at all? Check that each user has an id. If users is undefined, the loop wouldn't run properly."
Generic guesses. Nothing points at the real mistake — the prompt gave the model nothing to work with, so it fell back to its most common debugging lines.
"I have a JavaScript function mapUsersById that should build a lookup map from an array of user objects, but it throws. For example, passing [{id: 1, name: "Alice"}] gives TypeError: Cannot read property 'id' of undefined. Here is the code:
<snippet>
It should return {"1": {id: 1, name: "Alice"}}. Where is the bug and how do I fix it?"
"The error means user is undefined at some iteration. Your loop uses i <= users.length, so on the last pass users[i] reads one element past the end of the array. Change the bound to i < users.length and the undefined read goes away."
Pinpoints the loop bound, explains why it breaks, and gives the fix. The model could do real problem-solving because the prompt did the setup work.
tap a card to reveal its answer
rich context — assume the model knows nothing about your project. One setup line removes a round of guessing.rich context — the error text is a clue. It pointed the model straight at the indexing logic instead of wandering.input/output examples — one concrete example turns "something is broken" into a test the model tries to satisfy.rich context + specific goal — "Where is the bug and how do I fix it?" beats "why isn't this working?" because it names the deliverable.Osmani structures the playbook around three jobs. Pick one to see its pattern, then the builder below will follow it.
$ debug
Describe symptoms precisely, then steer the model through the code.
$ refactor
Name what "better" means — the model can't read your mind.
$ feature
Plan first, then build in small, checkable steps.
Fill what applies. The builder turns it into a prompt that follows the playbook — and tells you which principles you used.