What problem does it solve?
This Skill automates the end-of-life steps for an OpenSpec feature by merging an approved pull request, migrating any unfinished tasks, archiving the proposal, and cleaning up branches and worktrees so work is not lost and the main branch remains clean.
Core Features & Use Cases
- PR verification and merge: Confirm approvals and CI status, then merge the feature PR (squash or merge commit) and delete the feature branch.
- Task migration: Detect unchecked tasks in the OpenSpec proposal and migrate them to beads issues or create a follow-up OpenSpec proposal to preserve context and dependencies.
- Archive and validate specs: Archive the OpenSpec change, merge delta specs, run strict validation, and refresh repository architecture artifacts.
- Worktree and lock-aware cleanup: Use isolated worktrees for operations, teardown worktrees afterwards, and optionally release locks or perform coordinator handoff for distributed agents.
- Use case: After a successful review and CI, run this workflow to finalize the change-id, ensure all follow-ups are tracked, archive the proposal, and restore a clean main branch.
Quick Start
Run the cleanup-feature with the relevant change id to merge the approved PR, migrate open tasks to beads or a follow-up proposal, archive the OpenSpec proposal, and remove worktrees and stale branches.