# Openspec Archive Change

Archive a completed change in the experimental workflow.

- Repository: https://github.com/KunAgent/Kun (6362 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add KunAgent/Kun --skill openspec-archive-change -g -a claude-code -y`
Codex: `npx skills add KunAgent/Kun --skill openspec-archive-change -g -a codex -y`
Cursor: `npx skills add KunAgent/Kun --skill openspec-archive-change -g -a cursor -y`
Gemini CLI: `npx skills add KunAgent/Kun --skill openspec-archive-change -g -a gemini-cli -y`

## Description

Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

Archive a completed change in the experimental workflow.

**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.

**Steps**

1. **If no change name provided, prompt for selection**

   Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.

   Show only active changes (not already archived).
   Include the schema used for each change if available.

   **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.

2. **Check artifact completion status**

   Run `openspec status --change "<name>" --json` to check artifact completion.

   Parse the JSON to understand:
   - `schemaName`: The workflow being used
   - `artifacts`: List of artifacts with their status (`done` or other)

   **If any artifacts are not `done`:**
   - Display warning listing incomplete artifacts
   - Use **AskUserQuestion tool** to confirm user wants to proceed
   - Proceed if user confirms

3. **Check task completion status**

   Read the tasks file (typically `tasks.md`) to check for incomplete tasks.

   Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).

   **If incomplete tasks found:**
   - Display warning showing count of incomplete tasks
   - Use **AskUserQuestion tool** to confirm user wants to proceed
   - Proceed if user confirms

   **If no tasks file exists:** Proceed without task-related warning.

4. **Assess delta spec sync state**

   Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.

   **If delta specs exist:**
   - Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
   - Determine what changes would be applied (adds, modifications, removals, renames)
   - Show a combined summary before prompting

The rest: https://github.com/KunAgent/Kun/blob/HEAD/.claude/skills/openspec-archive-change/SKILL.md
