Skip to main content

Overview

Delta specs are a core concept in Agent Teams Lite. Instead of rewriting entire specifications, changes describe only what’s different. This approach:
  • Keeps specs maintainable
  • Preserves the source of truth
  • Creates a clear audit trail
  • Enables automatic merging during archive
Delta specs are change-scoped modifications that describe ADDED, MODIFIED, or REMOVED requirements relative to the main specs.

The Core Concept

Instead of duplicating the entire specification and making changes, delta specs express only the differences:

Directory Structure

Delta specs live in the change directory, separate from main specs:
Main Specs (openspec/specs/):
  • Describe how the system works RIGHT NOW
  • Source of truth for current behavior
  • Updated only during archive phase
  • Complete, standalone specifications
Delta Specs (openspec/changes/{change-name}/specs/):
  • Describe what’s changing in this change
  • Scoped to a specific feature or fix
  • Only contain ADDED, MODIFIED, or REMOVED sections
  • Merged into main specs when archived

Delta Spec Structure

A delta spec uses three sections:

ADDED Requirements

Brand new requirements that don’t exist in the main spec:

MODIFIED Requirements

Existing requirements that are being changed:
Always include the previous version with “(Previously: …)” for clarity and audit trail purposes.

REMOVED Requirements

Requirements that are being deleted:

RFC 2119 Keywords

All specs (main and delta) use standardized language for requirement strength:

Examples

Use SHALL/MUST for critical functionality. Overusing it makes everything seem equally important. Use SHOULD for recommendations and MAY for optional features.

Given/When/Then Scenarios

Delta specs use Given/When/Then format for scenarios (acceptance criteria):

Structure

  • GIVEN — preconditions (state before the action)
  • WHEN — the action or trigger
  • THEN — expected outcomes (what should happen)
  • AND — additional preconditions or outcomes
A requirement typically has multiple scenarios covering different paths:

The Archive Cycle

Delta specs follow a lifecycle that maintains the source of truth:

Archive Process

When you run /sdd-archive, the system:
  1. Reads the delta spec from openspec/changes/{change-name}/specs/
  2. Reads the main spec from openspec/specs/
  3. Applies the delta:
    • Adds ADDED requirements to main spec
    • Updates MODIFIED requirements in main spec
    • Removes REMOVED requirements from main spec
  4. Writes updated main spec back to openspec/specs/
  5. Moves the change folder to openspec/changes/archive/YYYY-MM-DD-{change-name}/
The archive is an AUDIT TRAIL. Never delete or modify archived changes. They preserve the complete history of what was changed and why.

Real-World Example

Before (Main Spec)

During Change (Delta Spec)

After Archive (Merged Main Spec)

Archived Change

The complete change moves to:

Domain Organization

Specs are organized by domain (logical grouping):
Delta specs mirror this structure:
Delta specs only include domains that are being modified. If a change only affects the export domain, only export/spec.md exists in the delta.

Why Delta Specs Work

Benefits

  1. Maintainability — Only describe what’s changing, not the entire system
  2. Clarity — Clear before/after comparison for reviews
  3. Audit trail — Complete history of changes preserved in archive
  4. Merge safety — Automated merge process reduces conflicts
  5. Scoped changes — Each change is self-contained

Comparison to Traditional Approaches

Working with Delta Specs

Creating Delta Specs

The sdd-spec sub-agent creates delta specs automatically:

Reviewing Delta Specs

Before approving implementation:
  1. Read the proposal to understand intent
  2. Review each domain’s delta spec
  3. Check that ADDED requirements are complete
  4. Verify MODIFIED requirements include “(Previously: …)” text
  5. Confirm REMOVED requirements have rationale

Implementing from Delta Specs

The sdd-apply sub-agent uses delta specs as acceptance criteria:
Delta specs are acceptance criteria, not implementation instructions. The design.md provides the HOW, while delta specs provide the WHAT.

Next Steps

Complete Workflow

See how delta specs fit in the full workflow

TDD Workflow

Learn how specs become tests

Sub-Agents

Explore the spec writer sub-agent

Commands

Command reference for spec workflow