← Teams and process guides

How to run a spec-first development process

How-To Teams and process Intermediate 1171007HOWTO-1171007

HOWTO-1171007Teams and processIntermediate

This guide shows you how to run a spec-first development process with spec-driven development as a team workflow.

The process is simple: define the local contract before implementation, build inside that contract, verify the result, and keep the contract aligned with code.

Short answer

Use a repeatable loop: choose one local target, write or update the relevant .sdd spec, review it until intent and boundaries are clear, implement one task or behavior, run checks, update task status only after verification, and review the final diff against the spec.

When to use this guide

Use this guide when:

Steps

1. Select a local work target

Choose a target small enough to complete and review:

Itinerary missing-place validation

Prefer one spec or one small related group of specs. Large multi-area changes should be split or planned separately.

2. Write or update the spec first

Create or update the local .sdd file:

Spec: Itinerary

Purpose:
  Keep a trip itinerary organized by day.

Owns:
  ./itinerary.js
  ./itinerary.test.js

Must:
  Reject itinerary items without a place name.

Must not:
  Change destination search behavior.

Tasks:
  [ ] Add missing-place validation.

Done when:
  Missing-place behavior is covered by a check.

The spec describes the resulting contract, not the ticket or prompt.

3. Review the spec

Before implementation, review:

Implementation should be driven by reviewed specs.

4. Implement one bounded task

Use a short task prompt or work packet:

Implement the Itinerary validation task.

The implementation should stay inside Can modify or Owns. If the task needs files outside that boundary, stop and revise the spec or split the work.

5. Run checks

Run checks that prove the behavior:

If checks cannot run, record why.

6. Update tasks and specs

After verification:

Tasks:
  [x] Add missing-place validation.

If implementation changed behavior beyond the original spec, update the spec in the same changeset or stop for review when the new behavior is uncertain.

7. Review the diff against the spec

Review the finished work:

This makes the spec-first process enforceable rather than ceremonial.

Team operating rules

Common mistakes

How to verify the result

The process is working when:

← Teams and process guides