Loading...
Loading...
Post-merge workflow resolution. Verifies PR merge status, backfills synthesis metadata, force-resolves review statuses, transitions to completed, and cleans up worktrees/branches. Use when the user says 'cleanup', 'resolve workflow', 'mark as done', or runs /cleanup. Do NOT use before PRs are merged.
npx skill4agent add lvlup-sw/exarchos cleanuplist_prsget_pr_commentsghglabazcompleted@skills/prune-workflows/SKILL.mdexarchos_orchestrate prune_stale_workflowscompletedcancelled/cleanupmcp__exarchos__exarchos_workflow({ action: "get", featureId: "<id>" })mcp__exarchos__exarchos_view({ action: "pipeline" })exarchos_orchestrate({ action: "list_prs", state: "merged" })exarchos_orchestrate({ action: "get_pr_comments", prId: "<number>" })prUrlmergedBranchesreferences/merge-verification.mdexarchos_orchestrate({
action: "check_post_merge",
featureId: "<id>",
prUrl: "<url>",
mergeSha: "<sha>"
})mcp__exarchos__exarchos_workflow({
action: "cleanup",
featureId: "<id>",
mergeVerified: true,
prUrl: "<url-or-array>",
mergedBranches: ["branch1", "branch2"]
})synthesis.prUrlsynthesis.mergedBranchesapprovedcompletedworkflow.cleanup# Read worktrees from state (already captured in step 1)
git worktree remove .worktrees/<name>
git worktree prunegit fetch --prune
git branch -d <merged-branch-1> <merged-branch-2> ...## Cleanup Complete
**Feature:** <featureId>
**Transition:** <previousPhase> → completed
**PRs merged:** <count>
**Worktrees removed:** <count>
**Branches synced:** ✓dryRun: truemcp__exarchos__exarchos_workflow({
action: "cleanup",
featureId: "<id>",
mergeVerified: true,
dryRun: true
})| Error | Cause | Resolution |
|---|---|---|
| STATE_NOT_FOUND | Invalid featureId | Check pipeline view for active workflows |
| ALREADY_COMPLETED | Workflow already done | No action needed |
| INVALID_TRANSITION | Workflow is cancelled | Cannot cleanup cancelled workflows |
| GUARD_FAILED | mergeVerified is false | Verify PRs are merged before cleanup |
| Don't | Do Instead |
|---|---|
| Use cleanup as escape hatch during implementation | Only use after PRs are merged |
| Skip merge verification | Always verify via GitHub API |
| Manually navigate HSM guards post-merge | Use /cleanup |
| Leave worktrees after cleanup | Include worktree removal in process |
workflow.cleanup