Sspec Synthesizes Programs from Explicit Context.
sspec is a document-driven workflow for coding with agents.
It keeps project context, request entrypoints, change specs, execution plans, and scoped memory in the repository instead of leaving them only in chat. Chat moves the work forward; repository files keep the durable state.
If you rely on chat alone for AI coding, common problems include:
- context and key decisions disappearing across sessions;
- design and implementation checkpoints becoming implicit;
- project conventions needing to be restated repeatedly;
- complex work growing into one opaque, hard-to-review thread.
sspec writes the working state into the repository:
AGENTS.mddefines the collaboration protocol;.sspec/project.mdrecords project identity, stack, key paths, and conventions;.sspec/requests/stores request entrypoints;.sspec/changes/stores per-change specs, tasks, memory, and supporting files;.sspec/spec-docs/stores architecture knowledge that should outlive one change;.sspec/asks/stores structured questions when important decisions need an explicit record.
When work resumes, the agent reads repository context instead of reconstructing state from prior chat.
sspec assumes a human-led, agent-accelerated workflow.
The developer is expected to:
- define the request clearly enough for the agent to work from it;
- answer design and scope questions at alignment points;
- review implementation results and catch mistakes;
- decide when work should stay in one
changeand when it should be split.
If you do not plan to review the design, review the code, or judge whether the implementation is correct, sspec is usually not a good fit.
Start with two core concepts: request and change.
request: the task entrypoint written by the developer. It captures background, constraints, direction, and success criteria.change: a cohesive, trackable unit of work. Achangeshould stay small enough to review and reason about as one unit.
The core files inside a change are:
spec.md: the problem and the solution contract;tasks.md: the execution checklist and progress;memory.md: the current state, durable knowledge, and milestones for continuity.
Optional files inside a change:
design.md: detailed technical design when interfaces, data models, or architecture matter;revisions/: amendments after the design gate;reference/: supporting notes, investigation material, and auxiliary files.
For work that is too large for one change, use a root change to coordinate multiple sub-changes.
sspec project init creates the project scaffold:
project/
├── AGENTS.md
├── .agents/ # optional synced host location
└── .sspec/
├── project.md
├── requests/
├── changes/
├── asks/
├── skills/
├── spec-docs/
├── howto/
└── tmp/
A typical change directory looks like this:
.sspec/changes/<ts>_<name>/
├── spec.md
├── tasks.md
├── memory.md
├── design.md # optional
├── revisions/ # optional
└── reference/
Main directories:
project.md: project identity and conventions;requests/: request files written by the developer;changes/: per-change working documents;asks/: structured questions and answers when needed;skills/: agent-facing skills synced into host-specific locations;spec-docs/: long-lived architecture and project knowledge;howto/: focused operational guides for specific jobs;tmp/: scratch space for temporary notes and drafts.
sspec’s default lifecycle is:
Clarify → Design → Plan → Implement → Review
What each stage does:
- Clarify: build shared understanding from user intent and codebase reality;
- Design: create the change, write
spec.md, adddesign.mdwhen needed, then align with the user; - Plan: turn the design into file-level tasks in
tasks.md; - Implement: execute tasks, update progress, and keep
memory.mdcurrent; - Review: collect feedback, iterate, and close the loop.
Two practical rules:
memory.mdis the continuity file agents resume from;- if approved scope or design needs to change later, record it in
revisions/NNN-*.mdand updatetasks.md.
pip install sspec
# or
uv tool install sspeccd your-project
sspec project initThen fill .sspec/project.md with:
- your stack;
- key paths;
- coding conventions;
- project-level notes.
sspec request new add-password-resetWrite background, problem, direction, and success criteria in the generated request file. A minimal example:
# Request: add-password-reset
## Background
We currently support email and password login only.
## Problem
Users cannot reset a forgotten password on their own.
## Initial Direction
- Use email reset tokens
- Tokens must be time-limited and single-use
- Do not add new external services
## Success Criteria
- Users can request a reset email
- Tokens expire and cannot be reused
- The core flow is covered by tests
## Relational Context
- Related code: `src/auth/*`
- Existing emails: `src/notifications/email/*`You can paste the request file path into chat and tell the agent to follow AGENTS.md:
Please work from this request:
.sspec/requests/<your-request-file>.md
Follow `AGENTS.md` and `.sspec/skills/`.
Start with `sspec-clarify`, then create and maintain the change docs.
Stop at design and implementation gates for review.
The agent will typically create the working change with:
sspec change new --from <request>Use the CLI to inspect progress and current state:
sspec change list
sspec change status <name>When the design needs a dedicated technical document:
sspec change scaffold design <change>When the work is complete, archive the change and its linked request:
sspec change archive --with-request [name]Developer responsibilities
- write the
request, including background, constraints, and success criteria; - answer key design and scope questions;
- approve the design direction and implementation result;
- decide when a
changeshould be split.
Agent responsibilities
- clarify the problem before designing;
- create and maintain the
changedocs for the work; - propose a solution, align with the user, then implement;
- keep
tasks.mdandmemory.mdcurrent while the change is active.
Workflow rules
- start from a
request, not from chat history alone; - design and implementation both stop at explicit review points;
- long-lived state belongs in repository files, not only in chat;
- complex work should be split into trackable changes instead of accumulating in one thread.
These are the commands most users need. For the full list, run sspec --help.
sspec project init
sspec project status
sspec project update --dry-runsspec request new <name>
sspec request list
sspec request show <name>
sspec request find <query>
sspec request archive [name] --with-changesspec change new <name>
sspec change new --from <request>
sspec change new <name> --root
sspec change new <name> --scaffold design
sspec change scaffold design <change>
sspec change scaffold revision <change> --title "scope-update"
sspec change status <name>
sspec change list --all
sspec change validate <name>
sspec change archive [name] --with-requestsspec ask create <name>
sspec ask prompt <ask-file>
sspec ask list --all
sspec ask archive [name]sspec doc list
sspec doc new "<name>"
sspec howto list
sspec howto resume-change
sspec skill list
sspec tool now
sspec tool mdtoc README.md
sspec tool view-tree .Use a root change when the work is too large for one trackable unit:
sspec change new <name> --rootA root change defines the overall problem and phase breakdown. File-level design and execution stay in the sub-changes.
Create design.md when the change introduces new interfaces, data models, or architectural behavior.
When approved design or scope changes later, create a revision file and update the plan:
sspec change scaffold revision <change> --title "<reason>"memory.md is the continuity surface for a change. It typically carries:
State: where the work is now and what happens next;Key Files: non-obvious files that matter to continuation;Knowledge: durable decisions, constraints, and gotchas;Milestones: one-line factual session records.
Root changes also use Coordination to summarize sub-change status.
.sspec/skills/ is the source directory for skills. Host-specific locations such as .agents/skills/ are synced from it by sspec project init and sspec project update.
sspec tool provides CLI complements for agent workflows, including:
nowaskmdtocview-treefileinfopatchwritetreesitterpack-zip
Run sspec tool --help for the full list.
sspec assumes an agent environment that can:
- read and write local repository files;
- follow instructions from
AGENTS.md; - execute local CLI commands;
- load and follow skills under
.sspec/skills/.
AGPL-V3.0