-
Notifications
You must be signed in to change notification settings - Fork 961
Closed
Description
Just a suggestion in how to make the openspec archiver be more strict.
Causing Situation:
I had the /openspec-archive command triggered.
The archiver started doing it tasks but since no attributes / parameters had been read by the command, the archiver just archived any proposal not the one i had instructed.
Fix
- Add arguments to the header of the command
- Improve instruction to cancel the process if the id of the proposal can not be found.
Better do not archive anything than the wrong proposal.
This updated command fixed it for me:
openspec-archive.md
---
agent: subagent/openspec-archiver
description: Archive a deployed OpenSpec change and update specs.
---
<UserRequest>
ID: $ARGUMENTS
</UserRequest>
<!-- OPENSPEC:START -->
**Guardrails**
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
- Keep changes tightly scoped to the requested outcome.
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
## Steps
### ID Preparations and Confirmation
1. Identify the requested change ID (via the prompt).
2. Check what specs can be archived by using shell or bash and run the command `openspec list` to find the id available for archive.
### Validation Failed
3. If the id of the user is not among the list to be found, cancel the process. Cancel the request and tell the user why. Do not continue, do not just take any other id. YOU MUST STOP the process.
### Validation Succeeded - ID provided by the user matches an id from the list
4. Run `openspec archive <id> --yes` to let the CLI move the change and apply spec updates without prompts (use `--skip-specs` only for tooling-only work).
5. Review the command output to confirm the target specs were updated and the change landed in `changes/archive/`.
6. Validate with `openspec validate --strict` and inspect with `openspec show <id>` if anything looks off.
**Reference**
- Inspect refreshed specs with `openspec list --specs` and address any validation issues before handing off.
<!-- OPENSPEC:END -->
Not sure if it desired for me to add this to the repo.
TabishB
Metadata
Metadata
Assignees
Labels
No labels