Specification Mode
Turns a piece of functionality into a formal, AI-readable specification file, with coded requirements (REQ/SEC/CON), Given-When-Then acceptance criteria and explicit dependencies, saved under /spec/ with a fixed naming convention.
Overview
Specification Mode writes specs meant to be read by another model just as much as by a person. Every requirement, constraint and guideline gets a stable ID, so a later document or a pull request can reference it directly instead of pointing at a vague paragraph.
How it works
- It picks a category prefix for the spec (schema, tool, data,
infrastructure, process, architecture or design) and names the file
spec-<description>.mdunder/spec/, with YAML front matter for title, version, date and owner. - Requirements, security requirements, constraints, guidelines and
patterns each get their own coded bullet (
REQ-001,SEC-001,CON-001), making individual points citable later on. - Acceptance criteria follow Given-When-Then format, and interfaces and data contracts get their own section with tables or code blocks for schemas.
- Dependencies are split into four categories (external systems, third-party services, infrastructure, data) and describe what's needed rather than a specific package version, so the spec doesn't go stale the moment a dependency gets bumped.
- The instructions specifically call for avoiding idioms and metaphors, defining every acronym, and never relying on context the reader wouldn't have, since the target reader could well be another agent.
Examples
"Write a specification for the rate limiting middleware before we
implement it."
Installation
You need VS Code with the GitHub Copilot extension.
- Create the agents folder and download the file into your repo:
mkdir -p .github/agents curl -o .github/agents/specification.agent.md \ https://raw.githubusercontent.com/github/awesome-copilot/main/agents/specification.agent.md - Reload VS Code, or open a new Copilot Chat; custom agents under
.github/agents/are picked up automatically. - Pick this agent from the mode picker in Copilot Chat and describe a
feature to confirm it writes a coded spec file under
/spec/.
Related assets
Context7
Pulls updated, version-specific documentation and code examples straight from the source into your prompt, so agents stop citing outdated APIs or hallucinating ones that don't exist.
Accessibility Expert
Reviews code and designs against WCAG 2.1/2.2, covering semantics, keyboard and focus behavior, forms, media and dynamic SPA updates, and ships framework-specific examples plus a CI setup for automated checks.
Address Comments Agent
Works through pull request review comments one at a time: applies the minimal fix for each, pushes back on comments that don't make sense, adds test coverage, and commits with a descriptive message before moving to the next comment.