.agents/skills/openspec-archive-change/SKILL.md
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
npx skillsauth add em-jones/staccato-toolkit openspec-archive-changeInstall 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.
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
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.
Check artifact completion status
Run openspec status --change "<name>" --json to check artifact completion.
Parse the JSON to understand:
schemaName: The workflow being usedartifacts: List of artifacts with their status (done or other)If any artifacts are not done:
Check task completion status
Read proposal.md from the change directory. Parse its YAML frontmatter to get td-board.
If td-board is present:
td board show "<td-board>" to list all issuesclosed statusGate: tasks (title prefix Gate:) from other open issuesIf open Gate: tasks found:
If other open (non-Gate) issues found:
If no td-board in frontmatter: Proceed without task-related warning.
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:
openspec/specs/<capability>/spec.mdPrompt options:
If user chooses sync, execute /opsx-sync logic (use the openspec-sync-specs skill). Proceed to archive regardless of choice.
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:
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
Create ADR symlink(s)
After the directory is moved to its archive location, check whether the archived design.md declares a component field in its YAML frontmatter.
If component field is absent or empty: skip silently — not every change maps to a single component.
For each component path declared (handle both scalar and list forms):
a. Resolve <repo-root>/<component-path>/docs/adrs/ — this is the target directory (Backstage ADR plugin path). If it does not exist, create it:
mkdir -p <repo-root>/<component-path>/docs/adrs
b. Determine the next available sequence number by listing existing entries in docs/adrs/:
ls <adr-dir> | grep -E '^[0-9]{4}-' | sort | tail -1
# Increment the numeric prefix by 1; start at 0001 if directory is empty
c. Compute the symlink name: NNNN-YYYY-MM-DD-<change-name>.md
(e.g. 0003-2026-02-24-initialize-dagger-devops.md)
d. Compute the symlink target as a relative path from the docs/adrs/ directory to the archived design.md.
For example, if the archive is at openspec/changes/archive/2026-02-24-my-change/design.md
and the docs/adrs/ dir is at src/ops/workloads/docs/adrs/, the relative path would be:
../../../../../openspec/changes/archive/2026-02-24-my-change/design.md
Use Python to compute the relative path:
python3 -c "import os; print(os.path.relpath('<archive-design-md-abs>', '<adrs-dir-abs>'))"
e. Create the symlink (skip if target symlink already exists):
ln -s "<relative-target>" "<adrs-dir>/<symlink-name>"
f. Record each symlink created for the summary.
Sync Tech Radar
After ADR symlinks are created, run the tech radar sync script to update docs/tech-radar.json with any tech-radar frontmatter entries from the archived change:
bash .opencode/skills/dev-portal-manager/scripts/sync-tech-radar.sh
The script will:
design.md files (including the newly archived one)tech-radar frontmatter blocksdocs/tech-radar.json with deduplicated entriesIf the script produces changes to docs/tech-radar.json:
If no changes are produced:
Verify Backstage portal tasks exist (fallback creation if design-phase audit was skipped)
The design phase should have already created these tasks during the Catalog Entity Audit. At archive time, verify they exist and create any that are missing as a safety net.
Read td-issue from proposal.md frontmatter to get the change root id.
Check what Backstage tasks already exist on the change board:
td board show "<td-board>" | grep -E "^(Backstage:|TecDocs:)"
For each Component declared in design.md (component field or ## Catalog Entities table):
a. ADR annotation task — if not already on the board, create:
td create "Backstage: add adr-location annotation to <component-name> entity" \
--type task --parent <change-root-id> \
--body "Ensure .entities/component-<name>.yaml has:
annotations:
backstage.io/adr-location: docs/adrs
ADR symlink created at: <component-path>/docs/adrs/<symlink-name>"
td link <task-id> openspec/changes/archive/YYYY-MM-DD-<name>/design.md --role reference
b. TechDocs scaffolding task — if not already on the board, create:
td create "Backstage: scaffold TechDocs for <component-name>" \
--type task --parent <change-root-id> \
--body "Ensure <component-path> has:
- mkdocs.yml (with techdocs-core plugin and nav entries for any new docs pages added by this change)
- docs/index.md (at minimum)
- annotation in .entities/component-<name>.yaml: backstage.io/techdocs-ref: dir:.
Verify TechDocs renders correctly in Backstage after scaffolding."
td link <task-id> openspec/changes/archive/YYYY-MM-DD-<name>/design.md --role reference
c. TecDocs content task — if not already on the board, create:
td create "TecDocs: write documentation for <change-name> in <component-name>" \
--type task --parent <change-root-id> \
--body "Write or update docs pages in <component-path>/docs/ for the changes introduced:
- Document key design decisions, configuration, and usage
- Add entries to mkdocs.yml nav for any new pages
- Verify pages render in Backstage TechDocs"
td link <task-id> openspec/changes/archive/YYYY-MM-DD-<name>/design.md --role reference
For every change (regardless of component count or technology adoption):
d. Tech Radar review task — if not already on the board, create (once per change):
td create "Backstage: review Tech Radar for <change-name>" \
--type task --parent <change-root-id> \
--body "Review docs/tech-radar.json for any decisions made in this change.
For technologies in '## Technology Adoption & Usage Rules': add or update entries with ring Adopt|Trial|Assess|Hold.
For changes with no new technology adoption: confirm existing entries are still accurate."
td link <task-id> openspec/changes/archive/YYYY-MM-DD-<name>/design.md --role reference
Note: If all tasks already exist from the design phase (the normal case), no new tasks are created — log "All Backstage tasks already created at design time."
Display summary
Show archive completion summary including:
Output On Success
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
**ADR symlink:** src/<component>/docs/adrs/NNNN-YYYY-MM-DD-<name>.md → openspec/changes/archive/YYYY-MM-DD-<name>/design.md
(or "No component declared" if component field absent)
**Backstage tasks:**
✓ All Backstage tasks already created at design time (or list fallback-created tasks)
Pending: td-xxxxx Backstage: add adr-location annotation to <component-name> entity
Pending: td-yyyyy Backstage: scaffold TechDocs for <component-name>
Pending: td-zzzzz TecDocs: write documentation for <change-name> in <component-name>
Pending: td-aaaaa Backstage: review Tech Radar for <change-name>
All artifacts complete. All td issues closed.
Guardrails
Gate: tasks are blocking — require explicit force confirmation; they represent prerequisite dependency violations, not routine warningsdocs/adrs/ (not adr/); the Backstage ADR plugin reads backstage.io/adr-location: docs/adrsNNNN-YYYY-MM-DD-<change-name>.mdcomponent field is absent, skip symlink creation silently — do not errortools
<!--VITE PLUS START--> # Using Vite+, the Unified Toolchain for the Web This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`. ## Vite+ Workflow `vp` is a global binary that handles the full development lifecycle. Run `vp help` to pr
development
Guide for building performant data tables. Uses tanstack-table for table logic (sorting, filtering, pagination) and tanstack-virtual for rendering large datasets efficiently.
development
Expert guidance for building observable, expressive, and fault-tolerant TypeScript applications using the effect-ts/effect ecosystem. Covers Effect<A, E, R> type, error management, dependency injection via Layers, observability (logging, metrics, tracing), concurrency with Fibers, retry/scheduling, Schema validation, Streams, and Sinks.
tools
Complete E2E (end-to-end) and integration testing skill for TypeScript/NestJS projects using Jest, real infrastructure via Docker, and GWT pattern. ALWAYS use this skill when user needs to: **SETUP** - Initialize or configure E2E testing infrastructure: - Set up E2E testing for a new project - Configure docker-compose for testing (Kafka, PostgreSQL, MongoDB, Redis) - Create jest-e2e.config.ts or E2E Jest configuration - Set up test helpers for database, Kafka, or Redis - Configure .env.e2e environment variables - Create test/e2e directory structure **WRITE** - Create or add E2E/integration tests: - Write, create, add, or generate e2e tests or integration tests - Test API endpoints, workflows, or complete features end-to-end - Test with real databases, message brokers, or external services - Test Kafka consumers/producers, event-driven workflows - Working on any file ending in .e2e-spec.ts or in test/e2e/ directory - Use GWT (Given-When-Then) pattern for tests **REVIEW** - Audit or evaluate E2E tests: - Review existing E2E tests for quality - Check test isolation and cleanup patterns - Audit GWT pattern compliance - Evaluate assertion quality and specificity - Check for anti-patterns (multiple WHEN actions, conditional assertions) **RUN** - Execute or analyze E2E test results: - Run E2E tests - Start/stop Docker infrastructure for testing - Analyze E2E test results - Verify Docker services are healthy - Interpret test output and failures **DEBUG** - Fix failing or flaky E2E tests: - Fix failing E2E tests - Debug flaky tests or test isolation issues - Troubleshoot connection errors (database, Kafka, Redis) - Fix timeout issues or async operation failures - Diagnose race conditions or state leakage - Debug Kafka message consumption issues **OPTIMIZE** - Improve E2E test performance: - Speed up slow E2E tests - Optimize Docker infrastructure startup - Replace fixed waits with smart polling - Reduce beforeEach cleanup time - Improve test parallelization where safe Keywords: e2e, end-to-end, integration test, e2e-spec.ts, test/e2e, Jest, supertest, NestJS, Kafka, Redpanda, PostgreSQL, MongoDB, Redis, docker-compose, GWT pattern, Given-When-Then, real infrastructure, test isolation, flaky test, MSW, nock, waitForMessages, fix e2e, debug e2e, run e2e, review e2e, optimize e2e, setup e2e