← All guides

Acceptance criteria before you prompt Claude Code

If every new feature breaks an old one, the agent never had a written definition of done. Three minutes of Given/When/Then beats an evening of reverts.

Bad vs better prompts

Bad: “Add password reset and make it secure.”

Better: numbered, observable criteria + an explicit out-of-scope list. “Secure” without a Then clause is not a criterion.

3-minute template

Feature: <one sentence>

Acceptance:
- AC-1: Given …, When …, Then …
- AC-2: Given …, When …, Then …
- AC-3: Given …, When …, Then …

Edge cases:
- …

Out of scope:
- Do not touch …

Likely files (optional guess):
- …

Feed it to Claude Code without scope creep

  1. Paste the template into the first message or keep durable instructions in CLAUDE.md at the repo root, which Claude Code loads as project memory (Claude Code memory docs).
  2. Prompt: “Implement AC-1 only. Do not edit out-of-scope paths. When finished, list files changed and how AC-1’s Then can be verified.”
  3. You verify. Then AC-2. Never “and also while you’re at it.”
  4. Append finished criteria to a project checklist so the next feature must still pass old Thens.

What this is not

Automate the lock + export packs

SpecLock (Night Shift Labs) is planned as a browser workspace that drafts and locks criteria, exports packs for your AI coding tool, and grows a regression checklist. In development (waitlist only), not charging yet. Planned pricing Solo $15 / Pro $29.

Join the waitlist

Related: Spec-driven development with Cursor · Not affiliated with Anthropic.