flow-finalize
БесплатноБез исполняемых скриптовНе проверенFinalize a merged issue — archive its OpenSpec change (sync delta specs into openspec/specs/), remove the worktree + branch, and close the issue with a…
от pmcfadin★ 22 звезды на GitHubОб этом скилле
flow-finalize — archive, clean up, close
You are the CQLite delivery lead. The PR for issue #N is merged. Close the loop.
Steps
FIRST — is this a COMPLETED delivery or a SLICE? (issue #3550) A slice is a merged PR that shipped part of an issue which deliberately stays OPEN (the shape the lead ruled correct on #3393). This skill's default path ends by archiving the change, setting the board to Done, and CLOSING the issue — every one of which is WRONG for a slice, and closing the issue is the named FORBIDDEN workaround #3550 exists to prevent. Do not run steps 3, 5 and 7 unmodified for a slice; see "Slice deliveries" below, which says exactly what to do instead. Deciding is mechanical, not a judgement call: if the merged PR declared
Closes #<N>it is a completed delivery; if it deliberately did not, it is a slice. Compare by URL, never by number — an issue NUMBER is repository-scoped, so a PR closingother-repo#<N>would read as closing THIS repo's#<N>and you would close a deliberately-open issue.delivery-telemetry.pymakes the same comparison the same way (issue #3550).# gh's built-in --jq takes NO --arg, so the issue url is passed through the ENVIRONMENT # and read with jq's env.U. (`gh pr view --jq --arg u "$u" '<expr>'` is a usage error: # --jq consumes "--arg" and the rest become surplus positionals.) export U=$(gh issue view <N> --json url --jq .url) gh pr view <pr> --json closingIssuesReferences \ --jq 'if [.closingIssuesReferences[].url] | index(env.U) then "COMPLETED" else "SLICE" end' # COMPLETED -> run every step as written # SLICE -> follow "Slice deliveries" below
- Confirm the merge + capture the merged branch. state MUST be
MERGED; the cleanup in step 6 keys off the merged PR'sheadRefName(NOT aissue-<N>-*glob — see the #1162 guardrails below):
If not merged, stop — finalize only runs post-merge.gh pr view <pr> --json state,mergeCommit,headRefName # state MUST be MERGED; record headRefName as <merged-branch> for step 6. - Update the root checkout's main — but FIRST guard against a commandeered root. A Codex/other
session may have switched the shared root checkout onto its own branch. Do NOT
git switch main/git resetit back (that yanks it from whoever owns it), and NEVER commit to it while it is off-main:
(Archiving + cleanup below run from the worktree; they don't require local main.)repo_root=~/projects/cqlite root_branch=$(git -C "$repo_root" rev-parse --abbrev-ref HEAD) git -C "$repo_root" fetch origin main -q if [ "$root_branch" = "main" ]; then git -C "$repo_root" merge --ff-only origin/main else echo "⚠️ root checkout is on $root_branch, not main — will stamp main-only artifacts via a throwaway worktree (step 4), NOT the root." fi - Archive the OpenSpec change (design-driven) — NOT for a SLICE delivery (see the gate above:
the change is unfinished and archiving strands the remaining slices):
openspec archive <slug> --yes(use--skip-specsonly for a doc/infra change with no capability delta). This moves the change toopenspec/changes/archive/and syncs its delta spec intoopenspec/specs/<capability>/spec.md. Commit the archive (and push / open a small PR per the repo's merge norms). - (Retired) Telemetry stamping. Delivery telemetry was retired on 2026-11-02 (#4406): do not run
scripts/delivery-telemetry.py recordand do not open a ledger PR.docs/reports/delivery-telemetry.jsonlstays in the tree as history only. Step numbers are kept so existing references still resolve. - Set the board to Done + release the claim. — NOT Done for a SLICE delivery (see the gate
above: use
Ready/In Progress; Done hides an unfinished issue from dispatch). The PR-merged / issue-closed server-side automation should already have moved the Project item toStatus=Done(it fires even when you merge from the phone/web — noflow-*run needed); if it hasn't, set it yourself:
Do NOT write any# Run the flow-board detection snippet first (it switches to the project-capable account — the EMU # flip otherwise makes this write fail silently), then set the board Status only. # `--field` is NOT a gh flag (verified gh 2.87.3 offers only --field-id); all four IDs are required: gh project item-edit --id <item-id> --project-id <project-id> \ --field-id <status-field-id> --single-select-option-id <Done-option-id> # when have_project=1status:*label here. Done → no board-derived label (board→label mirror #2855: Backlog/Done carry none), and the mirror only reconciles OPEN issues, so a leftover label on the now-closed issue is irrelevant to discovery (--state open) and to the detector; a reopen fires the mirror'sissues: reopenedtrigger and re-derives from board Status
Установить flow-finalize в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл flow-finalize?
Finalize a merged issue — archive its OpenSpec change (sync delta specs into openspec/specs/), remove the worktree + branch, and close the issue with a traceable comment. Fifth stage of the CQLite delivery pipeline. Runs after the PR is merged — workers merge autonomously on green (gate PASS + C PASS + roborev clean), so finalize normally follows the worker's own merge. Use right after a merge (or when the owner says "finalize
Как установить скилл flow-finalize?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл flow-finalize запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub