/apogee:finish [research <slug>]from apogee
Close the unit of work /apogee:start opened, and the only way work is closed in an Apogee project. feature/bugfix: review, docs, public docs, clean tree, git-flow finish into develop, push develop. hotfix: review, then the release preparation (version, CHANGELOG, gate, notes) and the operator's commands. research: check the note is complete, mark it done, propose the follow-up. Detects the type from the current branch.
Ships in apogee. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The exit that /apogee:start opens. One command closes any unit of work; what it does depends on
the type. The raw git flow <type> finish commands are this skill's internals; don't run them
directly. Nothing here reaches main or creates a tag: for a hotfix this command prepares and
hands the finish to the operator (ADR 0007).
Context from user: $ARGUMENTS
Same rule throughout: if you're tempted to silently paper over a problem (stale docs, a dirty tree, a failing gate, open steps), STOP and surface it.
$ARGUMENTS starts with research → research, the slug (if given) names the file.git branch --show-current, matched against the git-flow prefixes
(git config --get-regexp '^gitflow\.prefix\.', defaults feature/ bugfix/ hotfix/ release/):
feature/ or bugfix/ → work branch; hotfix/ → hotfix; release/ → release.develop, main, or a repo without git-flow): look for research files with
status: open in docs/apogee/research/. Exactly one → research on that file. Several →
list them and ask which. None, in a git-flow repo → nothing to finish; say so. None, in a repo
without git-flow on a non-default branch → plain branch (below).Survey. Base = gitflow.branch.develop. git log <base>..HEAD --oneline,
git diff <base> --stat, git status. No commits and a clean tree → offer
git flow <type> delete <slug> instead of a finish. Diffs over ~200 lines or 10 files: summarise
through an Explore sub-agent rather than reading the whole diff here.
Review loop. Run apogee:review-work <base>: tests of the change, review of the whole
branch, fixes committed on the branch, tests again. It stops the finish if its tests are still
red after two repair rounds. Skip only if it already ran in this session and no code was
committed after its last commit. Note the commit it ended on.
Docs. Skip if apogee:update-docs already ran in this session after the last code commit.
Otherwise apply its "When to Skip" list; if the change is substantive, run
apogee:update-docs <base>. Then, when any doc under docs/ declares sources: overlapping
the branch's changed files and was not itself touched on the branch, run
apogee:public-docs update. update-docs edits local-only files (docs/apogee/, the root
CLAUDE.md), so there is nothing to commit; only public-docs output under docs/ (and a
tracked CLAUDE.md, if the project tracks it) commits through apogee:git-commit.
Clean tree. git status must be empty. Dirty → STOP; show git status and
git diff --stat, and offer: commit named files, discard, abort. Never git add -A. This
has no exception, autonomous or not (ADR 0006): a dirty tree at this point means commit
discipline broke somewhere.
Clean history. Before the merge is the last point where a bad message is cheap to fix. In
the repo and in each submodule with commits on the branch:
bash "${CLAUDE_PLUGIN_ROOT}/skills/git-commit/scripts/check-local-names.sh" --range <base>..HEAD.
FAIL → STOP, list the commits. Rewording a published branch needs a force push, so it is the
user's call: ask through AskUserQuestion (reword, or finish as is), and give the commands
(git rebase -i <base> with reword, then git push --force-with-lease origin <branch>).
Don't finish until they answer.
Tracker (beads projects). The epic linked to this branch (external_ref) should have all
steps closed. Open steps → close the ones actually done, ask about the rest; don't close
unfinished work to get past this.
Still current. If code (not docs) was committed after the commit review-work ended on —
typically by step 3 or 5 — re-run its step 4 (tests of the change) on the new head. Red → STOP
on the branch. The full suite is not run here; it belongs to the release preparation and CI.
Finish. A zone worktree (git config --worktree --get apogee.zone prints its
submodules) closes itself: inside it, run
bash "${CLAUDE_PLUGIN_ROOT}/skills/start/scripts/zone-worktree.sh" close. It merges each
zone submodule's branch into that submodule's develop with git flow from the main checkout,
pins the superproject branch to them, and removes the worktrees; then run the
git flow <type> finish <slug> it prints, from the main checkout, and go on to step 8. It
stops on uncommitted changes, on a main checkout off develop, or on a merge conflict:
report where, and resolve there before re-running. Any other linked worktree
(git rev-parse --git-dir differs from --git-common-dir) → STOP and point at the main
checkout before touching anything. Otherwise, from the main checkout, release the branch from
linked worktrees: git will
not delete a branch another worktree has checked out, so the finish would stop half-way. In
the repo and in each submodule, git worktree list --porcelain names them
(branch refs/heads/<type>/<slug>); remove each with git worktree remove <path>, no
--force. When git refuses:
apogee:cleanup's inventory (--no-size); only a REMOVE verdict lets you delete the
directory by its path and git worktree prune the gitdirs, else STOP and report.Then, via the apogee:git-flow skill's command map:
git flow <type> finish <slug>
Invoked from /apogee:run-plan's loop, prefix it with APOGEE_RUN_PLAN=1 (the hook then checks
for open epic steps, fail-closed); never add the prefix outside that loop. A merge conflict →
STOP, leave the tree as it is, report the files. Worktree + git-flow is unsupported by AVH →
STOP and point at the main checkout.
Publish. If a remote exists: git push origin develop, and delete the remote work branch
(git push origin --delete <type>/<slug>) if it was published. In a superproject, push each
submodule first: after a zone close that is each zone submodule's develop
(git -C <path> push origin develop, then delete its published work branch), since the
superproject's develop now pins those commits. Never main, never tags.
Close the epic (beads): br epic close-eligible; log
br comments add <epicId> --message "finish: merged <branch> into develop".
Report: branch, commit count, one-line summary, docs touched, worktrees removed, pushed or
not, anything carried forward (low-severity review notes, skipped docs and why). Then run
bash "${CLAUDE_PLUGIN_ROOT}/skills/cleanup/scripts/inventory.sh" --no-size; if it lists
PRUNE or REMOVE entries, add one line with their counts and offer /apogee:cleanup.
Delete nothing else here: other worktrees may belong to agents still at work.
Steps 1–6 of the work branch, with base = the production branch (so review-work main), then the
release preparation, whose CI gate runs the full suite:
follow sections A–G of
${CLAUDE_PLUGIN_ROOT}/skills/release/references/prepare-and-hand-over.md with <type> =
hotfix and <version> = the branch slug. That bumps the version, writes the CHANGELOG section,
runs the gate, commits the prep, writes the notes file to $TMPDIR and prints the operator's
three commands (finish, push, publish). Stop there: the finish merges into main and tags, and
the hook refuses it to an agent. After the hand-over, make no commit on the branch until the
operator says the finish has not been run.
A release/<version> branch is /apogee:release's; running finish on it resumes the same
preparation: sections A–G of the reference with <type> = release.
Hand over to apogee:research with close <note path>: it checks the conclusion, the sources and
the second opinion, closes the note and its tracker issue, promotes what lasts, and proposes the
follow-up. No git in this mode: docs/apogee/ is local-only.
The production-branch wall (ADR 0007) applies in every repo with a main, so an agent never
merges into it. Steps 1–6 of the work branch with base = the default branch, then push the
branch (git push -u origin <branch>) and hand over: print gh pr create --fill (or the merge
command) for the operator. Offer to initialise git-flow for next time (the apogee:git-flow skill, main + develop); with git-flow, finish can
merge into develop on its own.
What SKILL.md sets; muted values are Claude Code's defaults
20 skills in this plugin
/ai-clean-roomPersonal black-box clean-room skill: build an independent product that reproduces the functionality of a closed-source reference application using only its public documentation, observed behavior and screenshots, without copying its code, texts, icons, design or name. Manual invocation only (/apogee:ai-clean-room)./brOfficial skill for beads_rust (`br`), a local-first, dependency-aware issue tracker for AI agents. Use when creating issues, triaging backlogs, managing dependencies, finding ready work, updating status, or exporting the local JSONL backup (br sync --flush-only)./cleanupReclaim disk space that agent work leaves behind: linked git worktrees (of the repository and of every submodule), the stale records of worktrees deleted by hand, orphaned worktree directories, and the build directories (Rust target/, DerivedData) that make each copy 5–35 GB. Inventories first with a read-only script, deletes only what the user picks. Use when the disk fills up, when worktrees pile up after parallel agents, or when the user asks to clean up, tidy up or free space, in any language. Offered by the session-start reminder and by /apogee:finish./git-commitThis skill should be used whenever creating a git commit or writing a commit message — when the user asks to "commit", "create a commit", "git commit", "write a commit message", "commit my changes", or "conventional commit". Generates a Conventional Commits message from the staged diff (falling back to all changes), validates it against strict rules, and creates the commit. Commit messages are always written in English. Applies only inside a git repository./git-flowDrive the installed git flow binary (AVH Edition) for Git Flow branching: init a repo, start/finish/publish feature and bugfix branches, cut and finish a release with tag and back-merge, ship a hotfix, or open a support branch. Use when asked to run git flow, start or finish a feature/release/hotfix, cut a release, tag a version, or initialize Git Flow. Applies only inside a git repository./initBootstrap a project's Apogee context: research the codebase, fill docs/apogee/ai-context and the root CLAUDE.md, seed a CLAUDE.md per first-level submodule. Run once per project, in Plan Mode.npx claudepluginhub mishagin-dev/apogee --plugin apogee