OSpec Overview
Outcome-driven specification format for AI coding agents to build products
OSpec v1.0 Specification
Core Concept — Recipe Format for AI Coding Agents
OSpec is a YAML specification format that solves the decision paralysis problem for AI coding agents. Instead of agents wasting time choosing between countless tech stack options, OSpec provides proven, battle-tested combinations that work well with specific AI coding agents.
Key Principles
- Outcome-driven specification — Define WHAT to build, not HOW to build it
- Proven tech stacks — Curated combinations that actually work in production
- Agent optimization — Stack choices optimized for specific AI coding agents
- Decision elimination — No more “Postgres or SQLite? npm or yarn?” paralysis
- Scaffolding automation — Like
rails new
orcreate-react-app
but for AI agents - Acceptance criteria — Clear verification that the outcome works as intended
Core Concepts
Outcome Types
OSpec supports various outcome types, each with tailored acceptance criteria:
web-app
- Full-stack web applicationsapi
- RESTful or GraphQL APIscli
- Command-line toolsgame
- Interactive gameslibrary
- Reusable code librariesml-pipeline
- Machine learning workflowsmobile-app
- Mobile applicationsdesktop-app
- Desktop applicationsinfrastructure
- Infrastructure as codedocumentation
- Technical documentation
How AI Agents Use OSpec
When an AI coding agent receives an OSpec file, it can immediately:
- Understand the outcome — Know exactly what product to build
- Choose proven tools — Use the specified tech stack without decision paralysis
- Set up the project — Scaffold directories, configs, and boilerplate code
- Install dependencies — Use the correct package manager and versions
- Verify completion — Test against the acceptance criteria
This eliminates the back-and-forth of “which framework should I use?” and gets straight to building.
Specification Structure
Core Fields
# Version of OSpec format
ospec_version: "1.0.0"
# Unique project identifier
id: "ecommerce-shop"
# Human-readable name
name: "E-commerce Website"
# What you're building
description: "Online shop with product catalog, cart, and checkout"
# Type of product
outcome_type: "web-app"
# The tech stack - eliminates decision paralysis
stack:
# Specific versions
frontend: "Next.js@14"
# Proven combinations that work together
backend: "Supabase"
styling: "TailwindCSS"
# Agent-optimized choices
deploy: "Vercel"
package_manager: "npm"
# How to verify it works
acceptance:
http_endpoints:
- path: "/"
user_flows:
- "User can browse products and add to cart"
Tooling Preferences
The stack
section can specify preferences that eliminate micro-decisions:
- Package managers:
npm
vsyarn
vspnpm
- Python environments:
pyenv
vsuv
vsvenv
- Testing frameworks:
pytest
vsunittest
- Database tools:
prisma
vssqlalchemy
- Deployment:
vercel
vsrailway
vsfly.io