linear-cleanup-feature

Merge approved OpenSpec feature pull requests and archive proposals.

Updated Dec 26, 2025
One-click install
npx skills add https://github.com/jankneumann/agentic-content-analyzer --skill linear-cleanup-feature
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: linear-cleanup-feature
Source: https://github.com/jankneumann/agentic-content-analyzer/tree/main/.gemini/skills/cleanup-feature
Command: npx skills add https://github.com/jankneumann/agentic-content-analyzer --skill linear-cleanup-feature

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about linear-cleanup-feature

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I merge an approved pull request and archive an OpenSpec feature proposal?

Merging an approved pull request and archiving an OpenSpec feature involves verifying PR approvals and CI checks, executing the merge, archiving the spec, and deleting the branch.

What happens to unresolved tasks when I merge an OpenSpec proposal?

Unresolved tasks are detected and migrated to beads issues or a follow-up OpenSpec proposal, ensuring no work is lost during the branch cleanup and merge process.

Does branch cleanup after a PR merge support isolated worktrees?

Yes, the workflow uses isolated worktrees for PR merge operations and performs worktree teardown afterward to ensure the main branch remains clean.

How do I validate specs and refresh architecture artifacts after merging a feature branch?

After merging a feature branch, the workflow archives OpenSpec changes, merges delta specs, runs strict validation, and refreshes repository architecture artifacts.

Can I use this workflow to handle distributed agent handoffs during branch cleanup?

Yes, the workflow includes an optional coordinator handoff for distributed agents, releasing locks and respecting guardrails during the final branch and worktree cleanup.