AGENT SKILL

openspec-archive-change

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

License 许可
MIT
所属仓库
Wizarck/nexandro
最近更新
2026-09-25
Stars
★ 2
Forks
1

01 前言 Front Matter

name
openspec-archive-change
license
MIT
metadata
{ "author": "openspec", "version": "1.0", "generatedBy": "1.3.0" }
description
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
compatibility
Requires openspec CLI.

03 SKILL.md 正文

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. Verify project board Status=Done before archiving (per project-board-sync.md §2 L7)

    Invoke scripts/verify_board_state.py BEFORE doing any archive work. The script queries the GH Project board and exits non-zero if the matching item's Status is not Done. Refuse to archive on non-zero exit — do NOT paraphrase the script's output, cite the exit code (per verification-before-completion.md §4.1.2).

    Required env / inputs:

    • --change-id — the OpenSpec change-id being archived
    • --owner — GH user/org login owning the project
    • --project-number — numeric Project V2 ID
    • --expected-status Done — default for archive workflows
    python -m scripts.verify_board_state \
        --change-id <name> \
        --owner <gh-user-or-org> \
        --project-number <N> \
        --expected-status Done
    

    Exit-code semantics (stable contract):

    • 0 — Status=Done, proceed.
    • 1 — Status mismatch. Refuse archive: surface the script's stderr to the user and ask them to (a) wait for L1 PR-merged automation to fire, or (b) verify the L2 workflow ran correctly, or (c) manually advance the status if board got drift.
    • 2 — Item not found. Refuse archive: the change-id doesn't match a project item title.
    • 3 — GraphQL/network error. Surface to user and offer one retry.

    If scripts/verify_board_state.py is not present (consumer on ai-playbook < v0.10.0): emit a warning and continue (legacy behaviour). New consumers (v0.10.0+) MUST have the script and MUST not bypass.

  2. 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.

  3. 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
  4. 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.

  5. Assess delta spec sync state (informational only — no automated sync in this version)

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

    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 so the user knows what an eventual sync would do.

    Archive only does the move + retro — no automated sync is performed.

  6. Perform the archive

    Create the archive directory if it doesn't exist:

    mkdir -p openspec/changes/archive
    

    Generate target name using current date: YYYY-MM-DD-<change-name>

    Check if target already exists:

    • If yes: Fail with error, suggest renaming existing archive or using different date
    • If no: Move the change directory to archive
    mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
    
  7. Chain a retrospective write to retros/<change-id>.md (Gate F deliverable)

    Per runbook-bmad-openspec.md §3.1 and §4 + Gate F in §5, every archive MUST chain a retro write. Path: retros/<change-id>.md (relative to the project root). Create the retros/ directory if it does not exist.

    • If a bmad-retrospective skill is available, invoke it via the Skill tool, passing the change-id and the archive path. It produces the retro per the BMAD retrospective format.

    • Otherwise, write a stub markdown directly with the following sections (the human fills them in):

      # Retrospective: <change-id>
      
      - **Archived**: YYYY-MM-DD
      - **Archive path**: openspec/changes/archive/YYYY-MM-DD-<change-id>/
      - **Schema**: <schema-name>
      
      ## What worked
      
      <one-paragraph: practices, patterns, decisions that paid off>
      
      ## What didn't
      
      <one-paragraph: friction, surprises, rework>
      
      ## Lessons
      
      <bulleted: durable lessons; candidates for retention to Hindsight if cross-project>
      
      ## Carry-forward to next change
      
      <bulleted: action items, follow-up tickets, spec edits>
      

    If retros/<change-id>.md already exists, do NOT overwrite — append a new dated section instead and warn the user.

  8. Display summary

    Show archive completion summary including:

    • Change name
    • Schema that was used
    • Archive location
    • Whether specs were synced (if applicable)
    • Note about any warnings (incomplete artifacts/tasks)

Output On Success

## Archive Complete

**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
**Specs:** No automated sync (deferred to v0.8.0 spec-sync skill); delta-spec assessment shown above for human follow-up.
**Retro:** retros/<change-id>.md (stub written / appended)

All artifacts complete. All tasks complete.

Guardrails

  • Always run Step 0 first (project board Status=Done verification) for consumers on ai-playbook v0.10.0+; refuse archive on non-zero exit per project-board-sync.md L7
  • Always prompt for change selection if not provided
  • Use artifact graph (openspec status --json) for completion checking
  • Don't block archive on warnings - just inform and confirm
  • Preserve .openspec.yaml when moving to archive (it moves with the directory)
  • Show clear summary of what happened
  • Always chain the retro write (step 6) — Gate F deliverable per the runbook; never skip silently
  • If delta specs exist, always run the assessment and show the combined summary (informational only until v0.8.0)

04 同仓库更多 Skills

Wizarck
Wizarck/nexandro

xlsx

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file; create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files into proper spreadsheets.

行政与办公人员电子表格
★ 2
Wizarck
Wizarck/nexandro

use-case-research

Creates JTBD-aligned Use Cases CSVs through structured user interviews, parallel vendor/industry research, and Jobs-to-be-Done synthesis. Generates 17-column CSV (OFFER-001 format) and validates with /qa-use-cases. Use when creating or updating use case research for an offering.

资料检索与研究Skill与智能体开发
★ 2
Wizarck
Wizarck/nexandro

sync-jira

Two-way sync between PROGRESS.md pipeline status and JIRA CIT tasks. Use when syncing offering progress with JIRA, checking JIRA status, bootstrapping JIRA tasks for new offerings, or pushing/pulling status updates. Also use when the user mentions JIRA, CIT tasks, or pipeline sync.

Skill与智能体开发
★ 2
Wizarck
Wizarck/nexandro

strategy

Tunes business strategy and aligns with corporate ABC Goals. Use when working on 01_BS/ business strategy files.

Skill与智能体开发
★ 2
Wizarck
Wizarck/nexandro

start

Starts the full MCP stack: LiteLLM proxy + Docker services (Hindsight, Atlassian, Google Workspace) + skills-manager + notebooklm. All services connect directly — no proxy. Use /start at the beginning of any session where MCP tools are needed, or when any service is stopped. LiteLLM must start before Docker — Hindsight depends on it at startup.

运维与部署Skill与智能体开发
★ 2
Wizarck
Wizarck/nexandro

start-palafito

Úsalo cuando el usuario quiere arrancar el stack palafito-prod (Paperclip) y, si hace falta, levantar Docker Desktop antes.

运维与部署
★ 2