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 vs Delta Specs
Main Specs vs Delta 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
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
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
Multiple Scenarios Per Requirement
Multiple Scenarios Per Requirement
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:
- Reads the delta spec from
openspec/changes/{change-name}/specs/ - Reads the main spec from
openspec/specs/ - Applies the delta:
- Adds ADDED requirements to main spec
- Updates MODIFIED requirements in main spec
- Removes REMOVED requirements from main spec
- Writes updated main spec back to
openspec/specs/ - 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
Complete Example: Adding CSV Export
Complete Example: Adding CSV Export
Domain Organization
Specs are organized by domain (logical grouping):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
- Maintainability — Only describe what’s changing, not the entire system
- Clarity — Clear before/after comparison for reviews
- Audit trail — Complete history of changes preserved in archive
- Merge safety — Automated merge process reduces conflicts
- Scoped changes — Each change is self-contained
Comparison to Traditional Approaches
Working with Delta Specs
Creating Delta Specs
Thesdd-spec sub-agent creates delta specs automatically:
Reviewing Delta Specs
Before approving implementation:- Read the proposal to understand intent
- Review each domain’s delta spec
- Check that ADDED requirements are complete
- Verify MODIFIED requirements include “(Previously: …)” text
- Confirm REMOVED requirements have rationale
Implementing from Delta Specs
Thesdd-apply sub-agent uses delta specs as acceptance criteria:
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