ywai/skills/sdd-archive/SKILL.md
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".
npx skillsauth add Yoizen/dev-ai-workflow sdd-archiveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 spec
Merge carefully:
REQ-AUTH-001) or by nameCopy the delta spec directly:
openspec/changes/{change-name}/specs/{domain}/spec.md
→ openspec/specs/{domain}/spec.md
engram 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-report
Include 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 risksdocumentation
Yoizen UI design system guidelines and resources. Trigger: When working on Yoizen UI components, styling, colors, typography, or icons.
development
TypeScript strict patterns and best practices. Trigger: When writing TypeScript code - types, interfaces, generics.
development
Tailwind CSS 4 patterns and best practices. Trigger: When styling with Tailwind - cn(), theme variables, no var() in className.
data-ai
name: skill-sync description: > Sync skill metadata with the Auto-invoke sections in AGENTS.md. Trigger: When you change a skill's metadata (metadata.scope/metadata.auto_invoke), regenerate the Auto-invoke tables, or run ./skills/skill-sync/assets/sync.sh. metadata: author: Yoizen version: "1.0" scope: [root] auto_invoke: - "skill operations" - "workflow" - "sdd" author: Yoizen version: "1.0" scope: [root] auto_invoke: - "skill operations" - "workflow"