---
name: prompt-spec
description: "Applies “Specs written for agents” as a repeatable product-quality gate. Use during spec work when an ai agent is your fastest junior — brief it like one, verify it like one."
---

# Specs written for agents

Apply this skill during **Spec** work. It supports Any stack.

An AI agent is your fastest junior — brief it like one, verify it like one.

## Instructions

When delegating work to an AI agent, write the spec as a contract. Include: (1) current state — relevant files, stack, existing patterns to follow; (2) exactly one task with a testable definition of done; (3) an example of the desired output style — one good sample beats three adjectives; (4) explicit forbidden moves (no new dependencies, no schema changes, no refactors outside the task); (5) how the result will be verified. After the agent responds, review against the spec item by item — an agent that 'did something impressive' has not necessarily done the task. If two instructions conflict, the agent will pick one silently: resolve conflicts in the spec, not in review.

## Detect the problem

- A one-line prompt for a three-file change
- Merging agent output after reading the summary only
- The same correction given to the agent twice

## Hold the gate

Do not declare this phase complete until every item passes:

- [ ] Context in the prompt: what exists, file paths, stack, constraints
- [ ] One task per prompt with a testable definition of done
- [ ] Style examples included (a good sample beats three adjectives)
- [ ] Forbidden moves stated: no new deps, no schema changes, no drive-by refactors
- [ ] Output reviewed against the spec line by line — never skimmed and merged

## Verify the result

Score the agent's output against the spec line by line before merging — every line pass/fail.
