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.
1.2 KiB
1.2 KiB
Implementation Tasks
1. Update OpenCode Configurator
- 1.1 Add
$ARGUMENTSplaceholder to OpenCode archive frontmatter (matching the proposal pattern) - 1.2 Format it as
<ChangeId>\n $ARGUMENTS\n</ChangeId>or similar structure for clarity - 1.3 Ensure
updateExistingrewrites the archive frontmatter/body so$ARGUMENTSpersists afteropenspec update
2. Update Slash Command Templates
- 2.1 Modify archive steps to validate change ID argument when provided via
$ARGUMENTS - 2.2 Keep backward compatibility - allow inferring from context if no argument provided
- 2.3 Add step to validate the change ID exists using
openspec listbefore archiving
3. Update Documentation
- 3.1 Update AGENTS.md archive examples to show argument usage
- 3.2 Document that OpenCode now supports
/openspec:archive <change-id>
4. Validation and Testing
- 4.1 Run
openspec updateto 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 --strictto ensure no issues