DEV Community

Ariel Frischer
Ariel Frischer

Posted on

Autospec: Spec-Driven Development for AI Coding Agents

AI coding agents are powerful, but the workflow can get messy fast: vague prompts, drifting context, half-finished plans, and implementation work that starts before the requirements are clear.

autospec is a CLI for bringing structure back into that loop.

It turns feature work into a repeatable flow:

specify -> plan -> tasks -> implement
Enter fullscreen mode Exit fullscreen mode

Each stage produces YAML artifacts, so the output is structured, reviewable, and easy for tools to validate.

Install

curl -fsSL https://raw.githubusercontent.com/ariel-frischer/autospec/main/install.sh | sh
Enter fullscreen mode Exit fullscreen mode

You will also need Git and one supported coding agent:

  • Claude Code
  • Codex CLI
  • OpenCode

Set up a project

From inside your repo:

autospec doctor
autospec init
autospec constitution
Enter fullscreen mode Exit fullscreen mode

doctor checks dependencies, init sets up autospec config, and constitution creates project-level principles for future specs.

The basic workflow

Start by generating only the spec:

autospec run -s "Add user authentication with OAuth"
Enter fullscreen mode Exit fullscreen mode

Autospec creates a feature directory like:

specs/
  001-user-authentication/
    spec.yaml
Enter fullscreen mode Exit fullscreen mode

Review and edit the spec before continuing. Then run the rest:

autospec run -pti
Enter fullscreen mode Exit fullscreen mode

That continues through:

plan -> tasks -> implement
Enter fullscreen mode Exit fullscreen mode

The resulting directory grows into:

specs/
  001-user-authentication/
    spec.yaml
    plan.yaml
    tasks.yaml
Enter fullscreen mode Exit fullscreen mode

One-command mode

For smaller features, you can run the full flow at once:

autospec run -a "Add a caching layer for API responses"
Enter fullscreen mode Exit fullscreen mode

-a means all core stages:

-spti
Enter fullscreen mode Exit fullscreen mode

That expands to:

specify -> plan -> tasks -> implement
Enter fullscreen mode Exit fullscreen mode

Useful commands

# Planning only: specify, plan, tasks
autospec prep "Add billing webhooks"

# Full workflow shortcut
autospec all "Add team invitations"

# Implementation only
autospec implement

# Resume from a specific phase
autospec implement --from-phase 3

# Run a single task
autospec implement --task T003

# Show progress
autospec status
autospec st -v
Enter fullscreen mode Exit fullscreen mode

Pick your agent

Autospec can run with different coding agents:

autospec run -a --agent claude "Add unit tests"
autospec run -a --agent codex "Add CLI smoke tests"
autospec run -a --agent opencode "Add REST API endpoints"
Enter fullscreen mode Exit fullscreen mode

You can also configure the agent during init:

autospec init --ai codex
autospec init --ai claude,codex,opencode
Enter fullscreen mode Exit fullscreen mode

Why it is useful

The main benefit is not that it writes code for you. The benefit is that it slows the agent down in the right places.

Instead of jumping straight from prompt to patch, autospec gives you review points:

  • Is the requirement correct?
  • Is the plan sane?
  • Are the tasks ordered properly?
  • Can implementation resume cleanly if something fails?

Because the artifacts are YAML-first, they are easier to inspect, validate, diff, and update than a long chat transcript.

Links

Top comments (1)

Collapse
 
vicchen profile image
Vic Chen

Really like the structure here. Turning agent work into explicit spec -> plan -> tasks artifacts feels much closer to how serious teams can review, diff, and debug AI-assisted delivery. The YAML handoff is especially smart because it makes the workflow inspectable instead of living inside one giant prompt.