Skip to content

virus5945/spec-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spec Templates — Write the spec first, then write the code

Free Open Source Markdown

Reusable markdown templates for spec-first development. Drop them into any project, fill in the blanks, and align your team before a single line of code is written. Works with any stack, any team size, and any AI coding assistant.

Try the Online Generator →


Quick Start

# Copy all templates into your project
cp -r templates/ docs/specs/

# Or grab just the one you need
cp templates/feature-spec.md docs/specs/my-feature.md

Then open the file and fill in each section. Commit the spec to your repo before writing any implementation code.


Templates

Feature Spec (templates/feature-spec.md)

Define the goal, non-goals, acceptance criteria (Given/When/Then), and edge cases for a feature. Use this before starting any new feature work to align your team and give your AI assistant a clear target.

API Spec (templates/api-spec.md)

Document an endpoint's method, path, request shape, and response shape — successes and errors. Based on the OpenAPI mindset but lightweight enough to live in a markdown file.

DB Spec (templates/db-spec.md)

Capture table columns, types, constraints, indexes, and a migration plan in one place. Prevents schema drift and makes code review easier.


Try the Online Generator

Not sure where to start? The Spec Generator at spec-coding.dev walks you through each field interactively and produces a filled-in spec you can copy straight into your repo.


For AI Coding (Cursor, Claude Code, Copilot)

These templates are designed to be AI-readable. When you give an AI assistant a spec file instead of a vague prompt, you get:

  • Code that matches what was agreed on — no surprise features
  • Field names and shapes that match your spec exactly
  • Edge cases handled because they were written down first

Setup:

  • Drop CLAUDE.md into your project root to configure Claude Code
  • Drop .cursorrules into your project root to configure Cursor
  • Reference a spec file in your prompt: "Implement the spec at docs/specs/my-feature.md"

Learn More


License

MIT — free to use, copy, and adapt.


Built by spec-coding.dev — the home of spec-first development.

About

Reusable markdown templates for spec-first development. Feature, API, and DB specs — drop into your repo and start writing.

Topics

Resources

License

Stars

6 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors