Sync delta specs to main specs and archive a completed change. Trigger: "archive", "archivar", "close change", "cerrar cambio", "sdd archive", "finalizar", "merge specs", "/sdd:archive".
89
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillValidation for skill structure
You are a sub-agent responsible for ARCHIVING. You merge delta specs into the main specs (source of truth), then close the change. You complete the SDD cycle.
From the orchestrator:
engram | openspec | none)Read and follow skills/_shared/persistence-contract.md for mode resolution rules.
engram: Read and follow skills/_shared/engram-convention.md. Retrieve ALL prior artifacts by topic_key to collect observation IDs for the lineage record. Artifact type: archive-report. Do NOT move any project files.openspec: Read and follow skills/_shared/openspec-convention.md. Perform spec merge and move change folder. Create archive report as part of the move.none: Return the full archive summary inline. Do NOT create or move any project files.Read the verification report:
mem_search(query: "sdd/{change-name}/verify-report") + mem_get_observationopenspec/changes/{change-name}/verify-report.mdIf verdict is FAIL (CRITICAL issues present), REFUSE to archive. Return status blocked with the list of critical issues.
For each delta spec in openspec/changes/{change-name}/specs/:
openspec/specs/{domain}/spec.md)Read the existing main spec and apply the delta:
FOR EACH SECTION in delta spec:
├── ADDED Requirements → Append to main spec's Requirements section
├── MODIFIED Requirements → Replace the matching requirement in main spec
└── REMOVED Requirements → Delete the matching requirement from main specMerge carefully:
REQ-AUTH-001) or by nameCopy the delta spec directly:
openspec/changes/{change-name}/specs/{domain}/spec.md
→ openspec/specs/{domain}/spec.mdengram mode: The spec content is already in Engram as
sdd/{change-name}/spec. Note the observation ID in the archive-report as the new source of truth for that domain. No file merge needed.
# Lessons Learned: {change-name}
## What Went Well
- {Things that worked smoothly in this SDD cycle}
## What Could Improve
- {Friction points, gaps in specs, design mismatches}
## Surprises / Discoveries
- {Unexpected findings during implementation or verification}
## Recommendations for Future Changes
- {Process improvements, missing skills, config adjustments}If no notable lessons (simple change, everything smooth), write:
No significant lessons — straightforward change.
### {Change Title} ({YYYY-MM-DD})
{One-line description of what changed from the user's perspective.}
- {Bullet point of visible change 1}
- {Bullet point of visible change 2}If the project has a CHANGELOG.md, append this entry under the appropriate section (Added/Changed/Fixed/Removed).
If no changelog exists, include the entry in the archive summary only.
| Metric | Value |
|---|---|
| Total tasks | {N} |
| Tasks completed | {N} |
| Phases | {N} |
| Files created | {N} |
| Files modified | {N} |
| Files deleted | {N} |
| Verify verdict | {PASS/PASS WITH WARNINGS/FAIL} |
| Critical issues found | {N} |
| Warnings found | {N} |
| Effort estimate (proposal) | {XS/S/M/L/XL} |
Move the change folder:
openspec/changes/{change-name}/
→ openspec/changes/archive/YYYY-MM-DD-{change-name}/Use today's date in ISO format (e.g., 2026-03-02).
If openspec/changes/archive/ doesn't exist, create it first.
For engram mode, collect ALL observation IDs for the change to create a complete lineage record:
Retrieve IDs via mem_search + mem_get_observation for:
- sdd/{change-name}/explore (if exists)
- sdd/{change-name}/proposal
- sdd/{change-name}/spec
- sdd/{change-name}/design
- sdd/{change-name}/tasks
- sdd/{change-name}/apply-progress (one or more)
- sdd/{change-name}/verify-reportInclude all collected IDs in the archive-report content under a Lineage section.
mem_save with topic_key: sdd/{change-name}/archive-report — include lineage section with all observation IDslessons.md to the change folder (before moving it), then move the folder to archiveConfirm:
## Change Archived
**Change**: {change-name}
**Date**: {YYYY-MM-DD}
**Persistence**: {engram (archive-report ID: #{id}) | openspec (archive path) | none (inline)}
### Specs Synced
| Domain | Action | Details |
|--------|--------|---------|
| {domain} | Created/Updated | {N added, M modified, K removed requirements} |
### Archive Contents
- proposal.md ✅
- specs/ ✅
- design.md ✅
- tasks.md ✅ ({N}/{N} tasks complete)
- verify-report.md ✅
- lessons.md ✅
### Changelog Entry{The changelog entry generated in Step 4}
### Metrics
{The metrics table from Step 5}
### Engram Lineage (engram mode only)
| Artifact | Observation ID |
|----------|----------------|
| explore | #{id or "—"} |
| proposal | #{id} |
| spec | #{id} |
| design | #{id} |
| tasks | #{id} |
| apply-progress | #{id(s)} |
| verify-report | #{id} |
| archive-report | #{id} |
### Source of Truth Updated
{openspec: "The following specs now reflect the new behavior: openspec/specs/{domain}/spec.md"}
{engram: "Spec content is in Engram observation #{spec-id}. Use topic_key sdd/{change-name}/spec to retrieve."}
### SDD Cycle Complete
The change has been fully planned, implemented, verified, and archived.
Ready for the next change.| Situation | Action |
|---|---|
| Verification report has CRITICAL issues | REFUSE to archive; return status blocked with list of critical issues |
| Verification report is missing | Ask orchestrator to run sdd-verify first; do not archive without verification |
| Delta spec merge conflicts with main spec | Perform manual merge carefully; flag conflicting sections in summary |
| Changelog file doesn't exist | Include changelog entry in return summary only; do not create CHANGELOG.md |
| Archive folder already exists for this date+name | Append suffix: YYYY-MM-DD-{change-name}-2 |
| Some artifacts are missing (fast-tracked change) | Archive anyway; note missing artifacts; they were intentionally skipped |
| Cannot collect all Engram IDs for lineage | Archive with partial lineage; note which IDs could not be retrieved |
none mode, NEVER create or modify any project filesrules.archive from openspec/config.yaml or the engram project contextstatus, executive_summary, detailed_report (optional), artifacts, next_recommended, and risks78a194d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.