Repository navigation
Replies: 1 comment
|
It's intentional. A collaborator answered the same question in #656: The current archive skill isn't a loose reimplementation, either. Before it moves anything it checks sync state per capability, verifies the merged main specs, and refuses to archive while a sync is blocked or still running. It also copies the CLI's rules, such as no double date prefix and the REMOVED-only refusal ( If you'd rather have the deterministic path in an agent session, nothing stops you from calling the CLI directly. It has a non-interactive mode (flags): openspec archive <change-name> --yes --json
# tooling/doc-only change with no spec deltas:
openspec archive <change-name> --yes --skip-specs --jsonA practical split: use |
Uh oh!
There was an error while loading. Please reload this page.
Note
Moved from issue #863, originally opened by @ngbruce on 2026-03-20. Continuing the conversation here in Discussions — the original issue thread (including any comments) stays available at #863 for the record.
Summary
There is a discrepancy between:
openspec archiveas the canonical way to archive a change and sync specs./opsx:archive, which instruct the LLM to perform manual file operations (read/write/mv) and do not callopenspec archive.This has been partially raised in question: why achive skill or command relies on llm to manually merge specs why it does not use openspec archive cli command? #656, but I want to provide more concrete file paths and examples from the current templates.
Current Behavior
1. Official CLI:
openspec archiveThe OpenSpec CLI provides a dedicated lifecycle command for archiving changes:
This is documented as the standard way to:
openspec/specs/openspec/changes/archive/YYYY-MM-DD-<name>/Tutorials and docs consistently show
openspec archiveas the canonical archive step for humans.2. OPSX workflow:
/opsx:archiveIn
docs/opsx.md,/opsx:archiveis described simply as:This implies that the system is responsible for “moving to archive” and syncing specs, but does not specify whether the LLM should call the CLI or do it manually.
3. Auto-generated AI commands (example: CodeBuddy)
According to
docs/supported-tools.md, OpenSpec generates per-tool command and skill files.For CodeBuddy the relevant paths are:
.codebuddy/skills/openspec-*/SKILL.md.codebuddy/commands/opsx/<id>.mdFor the
archiveworkflow, the generated files are:project\.codebuddy\commands\opsx\archive.mdproject\.codebuddy\skills\openspec-archive-change\SKILL.mdFrom what I see in current templates (e.g.
.opencode/skills/openspec-archive-change/SKILL.mdin projects using OpenSpec), theopenspec-archive-changeskill instructs the LLM to:openspec list --jsonandopenspec status --jsonto pick a change and check artifacts.tasks.mdfor incomplete tasks.openspec/changes/<name>/specs/with main specs underopenspec/specs/<capability>/spec.md.Notably, this skill does not invoke
openspec archiveat all.It explicitly says:
Why This Is Confusing
openspec archive <name> --yesand let the CLI handle merging and moving.This raises a few questions:
openspec archive?Is there a known limitation (e.g. error handling, idempotency, JSON output, or missing flags) that makes it unsafe or unreliable for LLM agents to invoke the CLI?
Issues like Archive command moves changes to incorrect path (openspec/changes/archive) #412 (archive path problems) and Use git move for archive #709 (git history behavior) suggest the archive implementation has evolved. Is the current guidance for AI agents to manually implement archiving until the CLI stabilizes?
Should tools like CodeBuddy, Claude Code, Cursor, etc. eventually wrap
openspec archivein their skills, or is the design to keep skills “pure” and let them drive the CLI through other commands (e.g.openspec status --json) while avoiding the archive command itself?Suggested Improvement
If
openspec archiveis indeed the intended canonical entry point for archiving, I’d suggest:openspec-archive-change(and equivalent skills for other tools) prefer callingopenspec archive <name> --yeswhen the CLI is available, falling back to manual steps only if necessary./opsx:archiveandopenspec archiveindocs/opsx.mdordocs/supported-tools.md– especially for tool vendors and skill authors.Related
docs/opsx.md–/opsx:archivedescription.docs/supported-tools.md– skill and command paths for CodeBuddy and other tools..opencode/skills/openspec-archive-change/SKILL.md.All reactions