agentleFS
Gentleman-ProgrammingGentleman-Programming/agent-teams-lite/skills/sdd-archive/SKILL.md

sdd-archive

Skill1.2k starsChanged 9 months agoMITArchived repositoryView on GitHub

Sync delta specs to main specs and archive a completed change. Trigger: When the orchestrator launches you to archive a change after implementation and verification.

3 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 7 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    engram: Read sdd/{change-name}/proposal, sdd/{change-name}/spec, sdd/{change-name}/design, sdd/{change-name}/tasks, …

    line 26
  2. Very specific:

    openspec: Read and follow skills/_shared/openspec-convention.md.

    line 27
  3. Distinctive:

    hybrid: Follow BOTH conventions — persist archive report to Engram (with observation IDs) AND perform filesystem merge + archive folder …

    line 28
  4. Very specific:

    Follow Section A from skills/_shared/sdd-phase-common.md.

    line 34
  5. Distinctive:

    Read the existing main spec and apply the delta:

    line 46
  6. Very specific:

    Use today's date in ISO format (e.g., 2026-02-16).

    line 83
  7. Very specific:

    Follow Section C from skills/_shared/sdd-phase-common.md.

    line 101
  8. Distinctive:

    NEVER archive a change that has CRITICAL issues in its verification report

    line 138
  9. Distinctive:

    ALWAYS sync delta specs BEFORE moving to archive

    line 139
  10. Distinctive:

    When merging into existing specs, PRESERVE requirements not mentioned in the delta

    line 140
  11. Distinctive:

    Use ISO date format (YYYY-MM-DD) for archive folder prefix

    line 141
  12. Distinctive:

    If the merge would be destructive (removing large sections), WARN the orchestrator and ask for confirmation

    line 142
  13. Very specific:

    If openspec/changes/archive/ doesn't exist, create it

    line 144

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

You are a sub-agent responsible for ARCHIVING. You merge delta specs into the main specs (source of truth), then move the change folder to the archive. You complete the SDD cycle.

What You Receive

From the orchestrator:

  • Change name
  • Artifact store mode (engram | openspec | hybrid | none)

Execution and Persistence Contract

Follow Section B (retrieval) and Section C (persistence) from skills/_shared/sdd-phase-common.md.

  • engram: Read sdd/{change-name}/proposal, sdd/{change-name}/spec, sdd/{change-name}/design, sdd/{change-name}/tasks, sdd/{change-name}/verify-report (all required). Record all observation IDs in the archive report for traceability. Save as sdd/{change-name}/archive-report.
  • openspec: Read and follow skills/_shared/openspec-convention.md. Perform merge and archive folder moves.
  • hybrid: Follow BOTH conventions — persist archive report to Engram (with observation IDs) AND perform filesystem merge + archive folder moves.
  • none: Return closure summary only. Do not perform archive file operations.

What to Do

Step 1: Load Skills

Follow Section A from skills/_shared/sdd-phase-common.md.

Step 2: Sync Delta Specs to Main Specs

IF mode is engram: Skip filesystem sync — artifacts live in Engram only. The archive report (Step 5) records all observation IDs for traceability.

IF mode is none: Skip — no artifacts to sync.

IF mode is openspec or hybrid: For each delta spec in openspec/changes/{change-name}/specs/:

If Main Spec Exists (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:

  • 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:

# Copy new spec to main specs
openspec/changes/{change-name}/specs/{domain}/spec.md
  → openspec/specs/{domain}/spec.md

Step 3: Move to Archive

IF mode is engram: Skip — there are no openspec/ directories to move. The archive report in Engram serves as the audit trail.

IF mode is none: Skip — no filesystem operations.

IF mode is openspec or hybrid: Move the entire change folder to archive with date prefix:

openspec/changes/{change-name}/
  → openspec/changes/archive/YYYY-MM-DD-{change-name}/

Use today's date in ISO format (e.g., 2026-02-16).

Step 4: Verify Archive

IF mode is openspec or hybrid: Confirm:

  • Main specs updated correctly
  • Change folder moved to archive
  • Archive contains all artifacts (proposal, specs, design, tasks)
  • Active changes directory no longer has this change

IF mode is engram: Confirm all artifact observation IDs are recorded in the archive report.

IF mode is none: Skip verification — no persisted artifacts.

Step 5: Persist Archive Report

This step is MANDATORY — do NOT skip it.

Follow Section C from skills/_shared/sdd-phase-common.md.

  • artifact: archive-report
  • topic_key: sdd/{change-name}/archive-report
  • type: architecture

Step 6: Return Summary

Return to the orchestrator:

## Change Archived

**Change**: {change-name}
**Archived to**: `openspec/changes/archive/{YYYY-MM-DD}-{change-name}/` (openspec/hybrid) | Engram archive report (engram) | inline (none)

### 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)

### Source of Truth Updated
The following specs now reflect the new behavior:
- `openspec/specs/{domain}/spec.md`

### SDD Cycle Complete
The change has been fully planned, implemented, verified, and archived.
Ready for the next change.

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.archive from openspec/config.yaml
  • Return envelope per Section D from skills/_shared/sdd-phase-common.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.