Most engineers use AI to write code. Fewer use it to write the thing that makes code easier to get right the first
time: the spec. A sharp spec catches ambiguity before it becomes a bug, aligns the team before it becomes a meeting,
and gives you — or your AI pair — a reliable contract to code against.
Here's a five-step framework I call SCOPE that turns a rough feature idea into a production-ready spec in under 30
minutes.
The SCOPE Framework
Situation — current state and pain
Constraints — non-negotiables (perf, security, backwards compat)
Outcomes — measurable success criteria
Paths — happy path + at least two edge cases
Exclusions — explicit out-of-scope items
You feed each layer to the AI sequentially. Each prompt builds on the last response, so you never get a vague wall of
text — you get a focused, layered document.
Step 1 — Dump the Situation
You are a senior staff engineer helping write a technical spec.
Feature: [one sentence description]
Current behaviour: [what happens today]
Pain: [why this is a problem right now]
Ask me clarifying questions before writing anything.
List them as a numbered set, max 6 questions.
Why ask for questions first? It forces the AI to surface your blind spots instead of confidently filling them with
assumptions.
Step 2 — Lock in Constraints & Outcomes
After answering the AI's questions, run this follow-up:
Given those answers, draft:
A constraints table (column A: constraint, column B: why it exists)
3-5 measurable success criteria in the format:
"Given [context], when [action], then [outcome], measured by [metric]"
Do not write prose sections yet.
Step 3 — Generate Edge Cases
Now think adversarially. For the happy path above, list:
3 edge cases an engineer might miss
1 security or data-integrity risk
1 degraded-mode behaviour (what should happen if a dependency is down)
Format as a table: Case | Expected behaviour | Test hint
This single prompt has caught more pre-prod bugs in my workflow than any linter.
Steps 4 & 5 — Assemble & Exclude
Ask the AI to compile everything into a single Markdown doc, then end with: "Add an explicit OUT OF SCOPE section.
Suggest 3 things that sound related but should be deferred." That last piece is gold for managing scope creep in
sprint planning.
Why This Works
You're not asking the AI to think for you — you're using it as a structured interviewer that holds the SCOPE shape
across turns. The output is something you can drop directly into Notion, Linear, or a PR description with minimal
editing.
If you want a pre-built prompt library that covers specs, ADRs, post-mortems, and code review briefs — all wired up
with the same chain-of-thought discipline — check out the AI Engineering Prompt Pack at https://gumroad.com/l/nhltvo.
It's what I keep open in a second window on every new feature ticket.
Reply with what you build. Always good to see these in the wild.