mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-09-14 20:16:53 +08:00
810f12fd43
Add $ARGUMENTS placeholder to the /openspec:archive slash command to allow explicit change ID specification, improving safety and matching CLI behavior. Changes: - Add $ARGUMENTS to archive command frontmatter in OpenCode configurator - Update archive command template with argument validation steps - Add rewriteArchiveFile method to handle managed section updates - Update AGENTS.md documentation for archive command usage This change makes it possible for users to run `/openspec:archive <change-id>` instead of relying on context inference, reducing the risk of archiving the wrong change.
22 lines
1.2 KiB
Markdown
22 lines
1.2 KiB
Markdown
# Implementation Tasks
|
|
|
|
## 1. Update OpenCode Configurator
|
|
- [x] 1.1 Add `$ARGUMENTS` placeholder to OpenCode archive frontmatter (matching the proposal pattern)
|
|
- [x] 1.2 Format it as `<ChangeId>\n $ARGUMENTS\n</ChangeId>` or similar structure for clarity
|
|
- [x] 1.3 Ensure `updateExisting` rewrites the archive frontmatter/body so `$ARGUMENTS` persists after `openspec update`
|
|
|
|
## 2. Update Slash Command Templates
|
|
- [x] 2.1 Modify archive steps to validate change ID argument when provided via `$ARGUMENTS`
|
|
- [x] 2.2 Keep backward compatibility - allow inferring from context if no argument provided
|
|
- [x] 2.3 Add step to validate the change ID exists using `openspec list` before archiving
|
|
|
|
## 3. Update Documentation
|
|
- [x] 3.1 Update AGENTS.md archive examples to show argument usage
|
|
- [x] 3.2 Document that OpenCode now supports `/openspec:archive <change-id>`
|
|
|
|
## 4. Validation and Testing
|
|
- [ ] 4.1 Run `openspec update` to regenerate OpenCode slash commands
|
|
- [ ] 4.2 Manually test with OpenCode using `/openspec:archive <change-id>`
|
|
- [ ] 4.3 Test backward compatibility (archive command without arguments)
|
|
- [ ] 4.4 Run `openspec validate --strict` to ensure no issues
|