Misalignment is mostly a skill issue.
This is a free library of prompt and spec patterns for people who build with AI agents. When an agent does the wrong thing, the fix is usually a clearer spec and a verification gate, not a different model. The harness you put around the model matters more than the model itself.
Every pattern has the problem it solves, how it works, a copy-paste template, and when not to use it.
Patterns
12 patterns
- Specs
Spec-first task brief
Write the goal, inputs, outputs and done-criteria down before the agent touches anything.
- Specs
Acceptance criteria checklist
Turn "done" into a list of observable, yes-or-no checks the agent and you can both verify.
- Verification gates
Tests as the gate
Define the check first, then let the agent iterate until the check passes. Not until it feels done.
- Verification gates
Evidence-of-done report
Require the agent to end with what it ran, what it saw, and what it did not verify.
- Verification gates
Fresh-eyes review pass
Review the diff in a new session that sees only the spec and the change, not the reasoning that produced it.
- Agent harness
Plan, checkpoint, then execute
Have the agent propose a plan and stop. Approve or correct it before any changes are made.
- Agent harness
Approval gate for irreversible actions
Let the agent draft anything it likes, but require a human yes before it sends, deletes, pays or publishes.
- Agent harness
One task per run, small diffs
Break work into small, separately verifiable tasks and commit between them.
- Context
Project rules file
Keep stable project knowledge in one versioned file the agent reads every session.
- Context
Handoff summary between sessions
End long sessions with a compact state file, and start the next session from it instead of the full history.
- Prompting basics
Delimit instructions from data
Wrap pasted documents, logs and user content in clear tags so the model can tell them apart from your instructions.
- Prompting basics
Few-shot examples
Show two to five worked input/output examples instead of describing the format in prose.