AI Pair-Programming Spec Format
Engineers using AI coding assistants (Cursor, GitHub Copilot, Claude, Windsurf) get better code when the input is precise. When a PM writes a spec that's also a well-structured AI prompt, the engineer can paste it directly and get a first draft that's 70–80% right.
Context
What an AI coding assistant needs from a spec:Step 1 — Extract the coding task
CODING TASK SCOPE:
Deliverable: [One specific code artefact]
Done when: [The engineer can run [test/demo] and observe [result]]
NOT in scope: [Exclusions]
Step 2 — Write the AI pair-programming spec
TASK
[What the engineer is building — verb-first, specific]
CONTEXT
[Maximum 3 bullet points — only what the AI needs. Not history, not rationale.]
INPUT/OUTPUT SPECIFICATION
Input: [Exact schema]
Output / Rendered state: [Exact description]
State (if applicable): [What state is managed]
ACCEPTANCE CRITERIA
AC-1: GIVEN [state] WHEN [action] THEN [observable result]
AC-2: GIVEN [state] WHEN [action] THEN [observable result]
TECHNICAL CONSTRAINTS
EDGE CASES
[List every edge case. If you don't list it, the AI won't handle it.]
DO NOT BUILD
[Explicit exclusions to limit AI over-engineering]
EXAMPLE
[One example of input and expected output — the single biggest quality lever]
Step 3 — Add engineer handoff notes
Human-readable note: non-obvious context, most important AC, where to find the existing pattern.