Archive a completed change in the experimental workflow.
OpenSpec is a human-intent programming layer between human intent and general-purpose programming languages.
For workflow-managed writes, read the resolved file definition before its instruction and template, and MUST NOT copy definitions, config projections, or reasoning into artifacts.
2.5. Execute Full Verify
-
Check artifact completion status
Run openspec status --change "<name>" --json. Warn and confirm before proceeding if any artifact is not done.
-
Check task completion status
Read tasks.md; warn and confirm before proceeding if incomplete checkboxes remain. Missing tasks are not a task-related blocker.
-
Assess delta sync state
If delta specs or architecture-delta.c4 exist, assess whether sync is required. The archive CLI performs verify, sync, and move-to-archive; do not duplicate sync writes manually.
-
Run archive CLI
Run openspec archive "<change-name>" after the verify gate is fresh. CLI only verifies, syncs, moves the change to archive, and prints the git handoff reminder. CLI MUST NOT create commits, merge branches, switch branches, delete branches, remove worktrees, or generate commit messages.
-
Git handoff
Read the archive CLI output and the projected git policy from openspec config project --json. Summary fields include change name, schema, archive location, verify gate result, specs / architecture sync result, agent-owned git follow-up status, and merge strategy.
-
Agent git flow
The agent continues the post-archive git flow. First handle the implementation boundary before OpenSpec/docs archive artifacts. If uncommitted real project implementation changes remain, create a normal implementation commit that contains only those changes. Then always create a semantic boundary commit with git commit --allow-empty; this boundary commit may be intentionally empty when the effective implementation diff is already carried by retained wip: opt-* checkpoint commits. If git.commitMessage.boundary is set, read that project-relative path; otherwise read the project-root file openspec/references/openspec-boundary-commit-message.md. Use that template to build the boundary commit message and run git commit -F - for the boundary commit. If git.commitMessage.archive is set, read that project-relative path; otherwise read the project-root file openspec/references/openspec-archive-commit-message.md. Use that template before creating the OpenSpec/docs archive commit, add only archive/synced paths, and run git commit -F -. If a merge or squash commit message is needed, prepare it from the configured or built-in merge template. If git.commitMessage.merge is set, read that project-relative path; otherwise read the project-root file openspec/references/openspec-merge-summary-message.md.
Apply the retained isolation metadata after archive commits are complete. Map the projected strategy to git merge --no-ff, git merge --ff-only, or git merge --squash. For method: "branch", switch to originalBranch, then merge branchName with the projected strategy. For method: "worktree", keep commits in worktreePath; before merging, verify that sourceRoot is on originalBranch, then run the projected merge from sourceRoot using git -C <sourceRoot>. The agent MUST NOT reset, clean, stash, or commit unrelated source-workspace changes. After a successful merge, require the Apply worktree to be clean, run git worktree remove <worktreePath> from sourceRoot, and only then delete branchName when git.branch.deleteAfterArchive is true and git branch --merged confirms it is merged. For method: "none", do not switch, merge, remove a worktree, or delete the current branch. Stop and report the retained metadata/current state mismatch instead of guessing. Build paths with path.join(), path.resolve(), and path.normalize().
-
Display summary
Include change, schema, archive location, verify gate result, specs / architecture sync result, agent-owned git follow-up status, Merge Strategy, cleanup responsibility, verify reuse/reexecution, and warnings. Do not report that CLI created an archive commit, performed a merge, or deleted a feature branch.