DocsGuides

Spec-driven development

Write a spec, plan it, build it and keep it true, with every step saved as Markdown in your repository.

Spec-driven development makes the spec the unit of work. A change starts as Markdown in your repository and moves through four steps (specify, design and plan, implement, archive). Every step leaves files behind, so you, your team and any other coding agent can pick the work up from the folder alone.

It is built from two ideas. From OpenSpec: a living description of what the system does, one spec per capability, which finished changes are merged into. From GitHub Spec Kit: one folder per change, with a document for each concern and for each task. Rusty does not need either tool, and can import their folders and export to either.

You find it on the Specs page of the Documentation tab. It reads plain files, so it works before the repository is analyzed.

The folder

Specs live in specs/ at the root of the repository. They are meant to be committed.

specs/
├── README.md                        the conventions, for people and other agents
├── project.md                       purpose, stack, commands, conventions, principles
├── capabilities/
│   └── albums/spec.md               what the system does now, as named requirements
├── changes/
│   └── 0007-photo-albums/
│       ├── change.md                status and history
│       ├── spec.md                  why, requirements with criteria, open questions
│       ├── checklist.md             quality questions about the spec, ticked when it answers them
│       ├── research.md              optional
│       ├── design.md                approach, files, data, risks
│       ├── tasks.md                 the ordered checklist
│       ├── tasks/T2-sidebar.md      one document per finished task
│       └── verification.md          every criterion, with its result
└── archive/
    └── 2026-10-30-0007-photo-albums/   finished changes, merged into capabilities

If specs/ is already used for something else, put {"root": "docs/specs"} in .rusty/specs.json and Rusty uses that folder instead.

Set up

Open the Specs page. In a repository without specs you can:

  • Onboard this project. For a project that already exists. See Onboarding an existing project.
  • Set up specs. Writes README.md and a project.md template, without a model.
  • New change. Creates the first change straight away.

The project file ends in a Principles section: the few, testable rules every change is checked against.

Onboarding an existing project

A blank project can start with a change. A project that is already under way needs its current behavior written down first, so later changes have something to change. Onboarding does that in two steps, with you in between.

  1. Survey. Onboard this project opens an Agent tab with the Survey the project workflow. Add what you know in the Notes: line (for a project with little code, describe what it is for) and send. Rusty reads the repository and writes specs/project.md and specs/onboarding.md, a list of the capabilities it found:

    ## albums
    Purpose: grouping photos without moving them.
    Paths: `src/albums/`, `src/ui/AlbumSidebar.tsx`
    Notes: renaming is the tricky part
  2. Review the list. Nothing else has been written yet. Open onboarding.md (Edit onboarding.md on the Project page) and rename, remove or add capabilities, or change the paths each one is read from. A capability's name becomes its folder under capabilities/.

  3. Write the specs. The Project page shows the list with what is written and what is not. Write spec writes one capability's spec in its own run, reading the code at its paths and its tests, and leaves the message for you to send. Write all remaining starts the missing ones one after another in a single Agent tab without waiting for you; a run that fails or that you stop ends the batch. Each spec is a set of named requirements with WHEN … THEN scenarios, and is checked for drift.

Running the survey again keeps the entries you edited and revises the rest. Rewrite on a capability revises its spec and keeps what you wrote.

A change, step by step

1. New change

New change asks for a title and a sentence on why. It creates the next numbered folder with change.md and a spec.md template.

By default it also creates and switches to a Git branch named spec/0007-photo-albums, before writing the files, so the spec lands on the branch. Clear the checkbox to stay on your current branch. Outside a Git repository, in a repository with no commits, or when the branch name is taken, the change is still created and a notification says why there is no branch. Uncommitted work comes along to the new branch.

2. Specify

Specify opens an Agent tab with the Specify a change workflow. Its message is filled in with a Notes: line where you can add what you know. When you send it, Rusty reads the project file, the existing capabilities and the code, and writes spec.md:

### R1: Albums can be created and named
Capability: albums (adds "Album creation")
A user creates an album with a name that is unique in the library.

- C1: WHEN the user creates an album with a new name THEN it appears in the sidebar.
- C2: WHEN the name is already taken THEN nothing is created and the reason is shown.

Before the spec is written, a Clarify step settles what the code can answer, records the defaults it takes under Assumptions, and keeps the few questions that change scope, security or what a user sees. Requirements state behavior, never the implementation, and each criterion has a result someone can check. User stories are ordered by priority (US1 (P1)), each with an independent check. Success criteria (S1) give measurable outcomes without naming any technology, and Key entities describe the data when there is some.

Requirements and criteria have ids (R1, C1) that tasks and verification refer to. Questions only you can answer are listed under Open questions, at most five, each with a recommended answer. Edit the file, or run Specify again with notes: it revises the current spec, keeps your edits and ids, and moves answered questions to Clarifications.

The Capability: line says what the requirement does to a capability once the change is finished: adds, changes or removes a named requirement.

The last step, Checklist, tests the spec the way unit tests test code and writes checklist.md. It asks questions about the writing, not the software, such as Are the limits on an album name specified?, grouped by completeness, clarity, consistency, measurability, scenario and edge coverage, non-functional needs, dependencies and scope. It adds a section for the domain the change is about, such as user experience, an interface, security or data. Each item (CHK001) points to the part of the spec it is about, or is marked [Gap], [Ambiguity], [Conflict] or [Assumption]. Items the spec answers are ticked. Open items say what is missing, and the Specs page counts them (a warning once the change is planned). Design & tasks reads them as gaps to handle or name. Untick an item you disagree with. Close an open item by editing the spec or running Specify again, which re-answers the checklist and keeps your ticks and its ids.

3. Design & tasks

Design & tasks writes design.md (approach, files and symbols, data and contracts, failure handling, tests, and a check against the project's principles) and then tasks.md:

- [ ] **T1** Album model and storage. R1 (C1, C2)
  Add `Album` to `src/albums/model.rs` and persist it with the library.
- [ ] **T2** Create and rename albums from the sidebar. R1 (C1) after T1

Between the design and the tasks, a Check step compares spec and design: every criterion needs a part of the design and a test, and gaps and conflicts are rated before the tasks are written. Tasks are grouped in phases: setup, foundation, one phase per user story in priority order (the first is the MVP), and a final check. Each phase has a checkpoint saying what can be tried once it is done. Each task names the requirements and criteria it satisfies and the tasks it comes after, and every criterion is named by at least one task. A range such as C1–C3 or after T1–T3 names every id in it. The Tasks step cannot finish while a criterion is named by no task, a task names no criterion or an id that is not in the spec, or the after links form a circle: the list goes back to it with what to fix before tasks.md is written. Both files are yours to edit before anything is built. Ticking a task by hand marks it done; unticking it reopens it.

Specify and Design & tasks write straight into the folder. There is no approval step: read the files (and the branch's diff), edit them, or run the step again with notes.

4. Implement

Implement builds the tasks that are not ticked yet, one at a time. Each task gets a step plan, a fresh builder and a review against the criteria it names. Then Verify checks every criterion of the spec, not just those of this run's tasks, and you try the checks only a person can do. This is the task queue of the other workflows, with the folder as the plan.

What it leaves in the change folder, also when a run fails or you stop it:

  • the tasks it finished, ticked in tasks.md;
  • tasks/T2-<title>.md for each, with what was built and how it was reviewed;
  • verification.md, with every criterion and its result;
  • the status in change.md: building, then verifying once every task is ticked, then done when verification and your manual checks pass.

A run starts from the files, so a stopped run continues after the tasks it finished. If every task is already ticked, a single final check task confirms the whole spec against the code and fixes what is missing. Ticks are written when the run ends, not as each task finishes; if the app crashes mid-run, that run's progress is lost.

5. Archive

Archive merges a finished change into the capability specs and moves the folder to specs/archive/<date>-<folder>/.

  • A requirement that adds appears in its capability with its criteria as scenarios; one that changes replaces the requirement of that name in place; one that removes deletes it. A capability that does not exist yet is created.
  • If a merge is impossible (adding a name that exists, changing or removing one that does not), nothing is written and the message says which requirement.
  • Requirements without a Capability: line are merged nowhere and reported.
  • The change must be done with every task ticked. Otherwise Rusty asks, and Archive anyway archives it as it is.

Changes across several repositories

When the workspace holds several repositories, one change can span some of them, for example a backend, an app and the website.

  1. Open the repository that should hold the main spec in the repository picker, and choose New change. The dialog lists the workspace's other repositories. Tick the ones the change also touches.
  2. Rusty creates one change folder in each repository, each numbered in its own repository. They all switch to one branch named after the main part, such as spec/0004-dark-mode. Each change.md names the repository with the main spec (main:) and the other parts (links: [rusty-core/0002-dark-mode]).
  3. Run Specify in the main repository first. It writes the spec of the whole change and marks each requirement with the repository that delivers it (Repository: rusty-core). What two repositories exchange, such as an API, a file format or an event, gets its own requirement that names both.
  4. Then open each other part (Open in the change's This change spans … box) and run Specify there. Each part writes only its repository's share, pointing back to the main requirement it comes from.
  5. Design & tasks and Implement run per part. Each step is shown the other parts' state and their designs, so the contracts stay the same, and it builds only in its own repository. A task that needs another part's work first says so, for example Needs rusty-core T3 first. Run the parts in that order.
  6. Switch all to spec/… in the same box puts every part's repository on the change's branch. Uncommitted work in a repository is stashed for the branch it was on and comes back when you return to that branch, as with Rusty's branch menu.

The steps run in the workspace folder, so their messages name paths from there (rusty-ide/specs/changes/…). Each part is archived in its own repository.

Your own step instructions

Each step has detailed built-in instructions. To add your team's rules, create specs/instructions/<step>.md, where <step> is specify, plan, implement, start or capability. Its text is added to that step's context after the documents, and specs/instructions/all.md is added to every step. For example, plan.md could say "Every design needs a Rollback section" or "Write decisions as short ADRs". The files are read when the run starts, so a change applies to the next run.

Statuses

Status Means
draft The folder exists; the spec is not written.
specified A spec exists.
planned tasks.md exists.
building Some tasks are ticked.
verifying Every task is ticked; verification has not passed.
done Verification and the manual checks passed.
archived Merged into the capabilities and moved.

The status is a record, not a lock. The page also shows what the files say: if every task is ticked while the status is planned, it tells you and never rewrites the status itself. A folder written by hand, without change.md, gets a status from the documents it holds.

Warnings

The page checks each change and shows what it finds, with the file and line to open:

  • a requirement without criteria, a criterion not in WHEN … THEN form;
  • a criterion no task names, a task that names a requirement or criterion that is not in the spec, a task that comes after one that does not exist, tasks that depend on each other in a circle;
  • open questions (a note while the change is being specified, a warning once it is planned);
  • two changes with the same number, a folder not named NNNN-slug, a project file without principles.

Drift. Specs describe the system as it is. A capability or the project file that names a file (in backticks, with a folder, like src/albums/model.rs) which no longer exists is flagged on the capability's page, so you know which spec to update.

Using the specs in chats

  • Use in chats. On a change, this marks it as the one you are working on. Chats and agents are then told about it: its title, status, progress, its open tasks and where its files are. The choice is remembered for the repository.
  • spec_context. A read-only tool every agent and workflow step can use. With no input it lists the project, the capabilities and the changes with their status and next step. With change (the folder name, the number, or part of the title) it returns that change's open tasks and the documents asked for (spec, design, tasks, research, verification; spec and design by default). Like repo_context, it is granted along with read_file. See Profiles & workflows.

Importing and exporting

Importing

If the repository already has an openspec/ folder or Spec Kit's .specify/ and specs/001-feature/ folders, the Specs page offers Import from OpenSpec or Import from Spec Kit. It is a one-time, non-destructive copy: the original stays where it is, nothing that already exists in specs/ is overwritten, and a change that was imported before is skipped.

From OpenSpec Becomes
project.md project.md, with a Principles section added if it had none
specs/<capability>/spec.md capabilities/<capability>/spec.md; the ## Purpose section becomes the Purpose: line
changes/<name>/proposal.md and its ADDED, MODIFIED and REMOVED delta specs a numbered change: Why and What changes from the proposal, one requirement per delta with a Capability: line, each scenario as a criterion
design.md, tasks.md design.md; tasks.md renumbered T1, T2, … with ticks kept and the group as instructions
changes/archive/ not imported
From Spec Kit Becomes
.specify/memory/constitution.md the Principles of project.md
specs/001-feature/spec.md spec.md: one requirement per user story with its Given/When/Then scenarios as criteria, one for the functional requirements, [NEEDS CLARIFICATION] markers as open questions
plan.md, research.md design.md, research.md
checklists/*.md one checklist.md, a section per checklist, ticks kept
tasks.md renumbered T1, T2, … with ticks kept and the phase as instructions
data-model.md, quickstart.md, contracts/ stay where they are, listed at the end of design.md

Imported tasks do not name requirements or criteria, so the page shows warnings that criteria are not named by any task; add the references or ignore them. The conversions are best effort.

Exporting

Your specs stay the source. On the Project page, Export to OpenSpec and Export to Spec Kit write them in the other tool's layout, so a team that works there can use them. It is a one-way, non-destructive copy: nothing that already exists in the target is overwritten (it is listed as left alone), and each exported change gets a line in its history, so importing from that folder later does not bring it back as a second copy. Run it again after more changes to add the new ones; changes already exported are not updated.

To OpenSpec Written as
project.md openspec/project.md
capabilities/<name>/spec.md openspec/specs/<name>/spec.md, with a ## Purpose section and each criterion as a #### Scenario: with WHEN, THEN and AND lines
each change, active or archived openspec/changes/<slug>/ (archived: changes/archive/<date>-<slug>/) with proposal.md (Why, What Changes, Impact), design.md, tasks.md and a delta spec per capability: requirements that add go under ADDED, change under MODIFIED, remove under REMOVED

Requirements without a Capability: line belong to no capability and are not written to OpenSpec.

To Spec Kit Written as
the Principles of project.md .specify/memory/constitution.md
each change specs/NNN-slug/ with spec.md (one user story per requirement, its criteria as Given/When/Then, a functional requirement for each, open questions as [NEEDS CLARIFICATION]), plan.md (the design), research.md, checklists/requirements.md (the checklist) and tasks.md (T001, T002, … with ticks kept)

Capability specs have no Spec Kit equivalent and are not exported to it. The conversions are best effort, and checked by exporting and importing back, not against the tools themselves.

Good to know

  • The workflows are built-in workflows, so you can pick the models they use like any other, and Auto never starts them on its own.
  • Specify, Design & tasks and Implement run in the workspace folder. The repository must be that folder or one inside it. The Specs page itself works for any repository you pick.
  • A step's documents are written when its run finishes. Stopping Specify or Design & tasks saves nothing.
  • Running Specify or Design & tasks again replaces the file with a revision of the current text. Git keeps the previous version.
Esc

Type to search the docs.