en un clic
opsx-archive
Archive a completed change in the experimental workflow
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Archive a completed change in the experimental workflow
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Reset the OpenRegister development environment (stop, remove volumes, restart, install apps)
Create a Pull Request from the current branch — runs local checks, picks target branch, and opens the PR on GitHub
Analyze a project's OpenSpec from 8 persona perspectives and suggest additional features
Detect admin settings Vue components registered in the vue-router. Admin settings are rendered by Nextcloud's settings framework via `AdminSettings.php`; adding their Vue components to the in-app router exposes them as publicly-accessible frontend routes, bypassing all server-side access checks. ADR-004 hard rule. Observed 2026-04-30 on doriath where `/settings → AdminRoot` was a route in `src/router/index.js` (commit c7c72e9).
Run `composer audit` to check composer.lock dependencies for known CVEs. Invoked by the builder before push and the reviewer's mandatory block. Mirrors the orchestrator's `composer-audit` quality gate.
Scan lib/ for forbidden debug helpers (var_dump / die / error_log / print_r / dd / dump) that should not ship. Invoked by the builder before push, by the reviewer as Mandatory Step 2, and by the fixer during a retry. Mirrors the orchestrator's `forbidden-patterns` quality gate.
| name | opsx-archive |
| description | Archive a completed change in the experimental workflow |
| metadata | {"category":"Workflow","tags":["workflow","archive","experimental"]} |
Archive a completed change in the experimental workflow.
Input: Optionally specify a change name after /opsx-archive (e.g., /opsx-archive add-auth). 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.
1.1. If a change name was provided, verify it exists before proceeding
Check that openspec/changes/<name>/ exists on disk. If it does NOT:
if [ ! -d "openspec/changes/<name>" ]; then
echo "Change '<name>' not found. Available active changes:"
openspec list --json | jq -r '.[] | select(.status != "archived") | " - " + .name'
# Prompt for re-selection
fi
Then use AskUserQuestion to ask:
"Change
<name>doesn't exist. Pick an active one or cancel."
List the available changes as options + a "Cancel" option. Do NOT proceed past this step until the user selects a real change or cancels.
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)
Determine which artifacts are required vs optional: build the required set by walking the dependency graph backwards from applyRequires — any artifact transitively needed to satisfy apply.requires is required; all others are optional.
If any REQUIRED artifacts are not done:
If only OPTIONAL artifacts are not done (or were never created):
Check task completion status
Run two checks in parallel — local tasks file and GitHub tracking issue.
A. Local tasks.md check: Read the tasks file (typically tasks.md) and count tasks marked - [ ] (incomplete) vs - [x] (complete).
B. GitHub issue check (if plan.json exists): Read plan.json to get tracking_issue and repo, then:
get_issue → {owner, repo, issue_number: <tracking_issue>} → scan body for - [ ] linesgh issue view <tracking_issue> --repo <repo> --json body --jq '.body' → count - [ ] linesReconcile findings — two distinct failure modes:
Case A — Sync gap: tasks.md shows all done, but the GitHub tracking issue has unchecked boxes. The work is complete but GitHub is out of date.
⛔ Cannot archive: GitHub tracking issue #<n> has N unchecked task(s) but tasks.md shows all complete.
This is a sync gap — the tracking issue needs to be updated.
[x] in tasks.md: find the parent task line by matching its title, change - [ ] to - [x]; scan every immediately following line — for each line starting with - [ ] (2-space indent), change it to - [x]; stop scanning at any line that is NOT an indented sub-checkbox (blank line, new parent checkbox, section header, etc.). Write the updated body back in a single call. Then continue to archive.Case B — Genuinely incomplete tasks: tasks.md has - [ ] items (regardless of what GitHub shows). The work is not done.
⛔ Cannot archive: N task(s) are still incomplete in tasks.md:
- Task X: <title>
If no tasks file exists: 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. Proceed to archive regardless of choice.
4.5. Convert test-plan test cases to reusable test scenarios
Check if openspec/changes/<name>/test-plan.md exists. If it does not exist, skip this step silently.
If test-plan.md exists:
a. Parse all test cases by scanning for ### TC-N: headers. For each, extract: title (rest of the header line), type, persona, preconditions, steps, expected result, spec_ref, and test command fields.
b. Determine which app this change belongs to (from the change's .openspec.yaml or the project field in plan.json). The test scenarios directory is <APP>/test-scenarios/ relative to the workspace root (e.g., openregister/test-scenarios/, opencatalogi/test-scenarios/).
c. Use AskUserQuestion to ask:
"This change has N test cases in test-plan.md. Convert them to reusable test scenarios?
Test scenarios live in
<APP>/test-scenarios/and are automatically picked up by/test-persona-*,/test-app, and/test-counselcommands after this change is archived."
Options:
If "Let me choose": use a second AskUserQuestion with multiSelect: true, listing each TC as TC-N: <title>. User picks which to convert.
d. For each selected TC, create a test scenario file:
<APP>/test-scenarios/ for files matching TS-NNN-*.md, find the highest N, increment by 1. Start at TS-001 if none exist. Create the directory if it doesn't exist.type → TS category (persona type → functional; all others map directly)persona → TS personas list (map display name to persona slug: Henk → henk-bakker, Fatima → fatima-el-amrani, Sem → sem-de-jong, Noor → noor-yilmaz, Annemarie → annemarie-de-vries, Mark → mark-visser, Priya → priya-ganpat, Jan-Willem → janwillem-van-der-berg; omit if —)preconditions → TS Preconditions section + GIVEN linesteps → WHEN line(s) in Scenarioexpected result → THEN line(s) in Scenariotest command → TS test-commands listspec_ref → TS spec-refs listmedium; use high if the TC is compliance-critical (AVG/GDPR, authorisation, security) or if the spec_ref points to a High-severity requirement<APP>/test-scenarios/TS-NNN-<slug>.md using the standard scenario file format:Use the format defined in templates/test-scenario-template.md.
e. Report: "Created N test scenario file(s): TS-NNN, TS-NNN+1, …"
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>
5.5. Update spec links in main specs
After moving the change to archive, update any spec that references this change in its **OpenSpec changes** list:
a. Search all spec files for links pointing to ../../changes/<name>/ (or changes/<name>/):
bash grep -rl "changes/<name>/" openspec/specs/
b. For each matching spec file:
- Replace the active link [<name>](../../changes/<name>/) with the archived link [<name>](../../changes/archive/YYYY-MM-DD-<name>/) _(archived YYYY-MM-DD)_
- If this was the last active change for that spec (all other entries in **OpenSpec changes** are also archived), update the spec's **Status** field to done
- If the list now exceeds 15 entries, apply the grouping rule from writing-specs.md (group by timeframe, oldest first, never remove entries)
c. If a spec exists for a capability defined in this change's ## Capabilities section but the spec does NOT yet have this change in its **OpenSpec changes** list — add it as an archived entry now.
d. Also check the shared specs at .claude/openspec/specs/ for any cross-app capabilities this change touched.
Update feature documentation
If a docs/features/README.md exists in the project root, update the corresponding feature doc:
a. Read the Spec-to-Feature Mapping section from docs/features/README.md to find which feature doc corresponds to the change name (or the delta spec names).
b. Identify the matching feature doc file. A change may map to a feature doc in two ways:
lead-management → lead-management.md)c. If a matching feature doc is found:
openspec/specs/<spec-name>/spec.md)d. If no matching feature doc is found, create one at docs/features/<change-name>.md with:
e. Update the feature overview table in docs/features/README.md:
docs/features/README.md doesn't exist, create it with:
Standards references to include where applicable:
gemmaonline.nl)6.5. Update CHANGELOG.md
Create or update CHANGELOG.md in the project root.
a. Determine the version:
- Read openspec/app-config.json → use version field
- Fallback: read appinfo/info.xml → use <version> element
- If neither exists, use Unreleased
b. Gather entry content:
- Read the completed tasks from tasks.md — items marked - [x] become bullet points (strip the [x] prefix, keep the description)
- Read the change title/summary from .openspec.yaml or proposal.md if available (use as a comment or section intro)
- If no tasks file exists, use the change name as a single entry line
c. Categorize tasks using Keep a Changelog categories: - Added — new features or capabilities - Changed — changes to existing functionality - Fixed — bug fixes - Removed — removed features - Security — security fixes
If a task description clearly fits a category, group it there. If uncertain, place it under **Added**.
d. Format the new entry: ```markdown ## [] - YYYY-MM-DD
### Added
- <task description>
- <task description>
### Fixed
- <task description>
```
e. If CHANGELOG.md already exists:
- Read the current content
- Check if a ## [<version>] entry already exists (exact version match)
- If yes: append the new items into the existing entry's sections (merge, no duplicates)
- If no: insert the new entry at the top — immediately after the # Changelog header line (or at line 1 if no header)
f. If CHANGELOG.md does not exist: create it: ```markdown # Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [<version>] - YYYY-MM-DD
### Added
- <item>
```
7. Close GitHub issue (if plan.json exists)
Read openspec/changes/<name>/plan.json (from its new archive location).
If tracking_issue is set, use AskUserQuestion to ask:
"Close GitHub issue #<tracking_issue>?"
ℹ️ Future feature: In a planned update, issues will auto-close when the associated PR is merged, managed via a GitHub Project board (to do → refinement → ready for development → in progress → code quality check → code security check → review → done). For now, you can close it manually here.
Options:
If user chooses to close:
update_issue → {owner, repo, issue_number: <tracking_issue>, state: "closed"}, then add_issue_comment → {owner, repo, issue_number: <tracking_issue>, body: "✓ Change archived: openspec/changes/archive/YYYY-MM-DD-<name>/"}gh issue close <tracking_issue> --repo <repo> --comment "✓ Change archived: openspec/changes/archive/YYYY-MM-DD-<name>/"Display summary and ask what's next
Show archive completion summary including:
Then use AskUserQuestion to ask:
"Change archived! What would you like to do next?"
Options:
/sync-docs dev) — update .claude/docs/ to reflect current commands and conventions (recommended after any workflow change)/opsx-new) — begin working on the next feature or fix/opsx-explore) — think through what to build next before committing/feature-counsel) — get multi-persona analysis of what to build nextFor all output formats, see examples/output-templates.md.
What's Next
The change is archived. Start your next change with:
/opsx-new — start a new change/opsx-explore — explore ideas before startingCapture Learnings
After execution, review what happened and append new observations to learnings.md under the appropriate section:
Each entry must include today's date. One insight per bullet. Skip if nothing new was learned.
Guardrails