The sdd-archive sub-agent completes the SDD cycle by merging delta specs into the main specs (source of truth), then moving the change folder to the archive.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Gentleman-Programming/agent-teams-lite/llms.txt
Use this file to discover all available pages before exploring further.
Metadata
sdd-archive2.0gentleman-programmingMITWhen It’s Triggered
The orchestrator launchessdd-archive when:
- User runs
/sdd-archive <change-name> - Verification passed (no CRITICAL issues)
- Change is ready to be closed
What It Does
Step 1: Sync Delta Specs to Main Specs
For each delta spec inopenspec/changes/{change-name}/specs/:
If Main Spec Exists
Reads the existing main spec and applies the delta:- Match requirements by name (e.g., ”### Requirement: Session Expiration”)
- Preserve all OTHER requirements that aren’t in the delta
- Maintain proper Markdown formatting and heading hierarchy
If Main Spec Does NOT Exist
The delta spec IS a full spec (not a delta). Copy it directly:Step 2: Move to Archive
Moves the entire change folder to archive with date prefix:2026-03-04).
Step 3: Verify Archive
Confirms:- Main specs updated correctly
- Change folder moved to archive
- Archive contains all artifacts (proposal, specs, design, tasks, verify-report)
- Active changes directory no longer has this change
Step 4: Return Summary
Returns a result envelope with archive summary.Result Envelope Example
Delta Merge Example
Before (openspec/specs/auth/spec.md):
openspec/changes/add-2fa/specs/auth/spec.md):
openspec/specs/auth/spec.md):
Archive Structure
After archiving, the structure looks like:Rules
- NEVER archive a change that has CRITICAL issues in its verification report
- ALWAYS sync delta specs BEFORE moving to archive
- When merging into existing specs, PRESERVE requirements not mentioned in the delta
- Use ISO date format (YYYY-MM-DD) for archive folder prefix
- If the merge would be destructive (removing large sections), WARN the orchestrator and ask for confirmation
- The archive is an AUDIT TRAIL — never delete or modify archived changes
- If
openspec/changes/archive/doesn’t exist, create it - Apply any
rules.archivefromopenspec/config.yaml - Return a structured envelope with:
status,executive_summary,detailed_report,artifacts,next_recommended, andrisks
Persistence Behavior
OpenSpec Mode
- Performs full merge and archive operations
- Writes to
openspec/specs/{domain}/spec.md - Moves folder to
openspec/changes/archive/
Engram Mode
- Saves archive report with all artifact observation IDs for traceability
- Topic key:
sdd/{change-name}/archive-report - Includes links to all previous artifacts (explore, proposal, spec, design, tasks, verify-report)
- Does NOT modify filesystem
None Mode
- Returns closure summary inline
- Does NOT perform file operations
Related
- Verifier — Must pass before archiving
- OpenSpec Convention — Defines archive structure
- Engram Convention — Defines artifact lineage