finishing-a-development-branch
Skill2 starsChanged 57 days agoMITView on GitHub
Use when implementation is complete and needs integrating - re-runs the gate to verify each phase, then decides how the run branch lands.
123 other projects use a version of this.
Adopted by
Most recently taken up by
- LayneChai/superpowers-dshtheir own version, first seen Oct 3, 2026
- HanksChen0110/skillstheir own version, first seen Oct 3, 2026
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- lsy041015/orchestratheir own version, first seen Oct 2, 2026
- Wenaixi/dsh-superpowertheir own version, first seen Oct 1, 2026
- Just-Silver/just-silver-skillstheir own version, first seen Sep 30, 2026
Used with
Projects with it also use diagnosing-superpowers, testing-anti-patterns and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
obraSkilldiagnosing-superpowers
Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
Also in 6 projects that use this
MicrosoftSkilltesting-anti-patterns
Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies
Also in 5 projects that use this
MorningStar0709Skillchinese-git-workflow
Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".
Also in 4 projects that use this
shibit-netSkillchinese-code-review
中文 review 沟通参考——话术模板、分级标注(必须修复/建议修改/仅供参考)、国内团队常见反模式应对。仅在用户显式 /chinese-code-review 时调用,不要根据上下文自动触发。
Also in 3 projects that use this
shibit-netSkillchinese-commit-conventions
中文 commit 与 changelog 配置参考——Conventional Commits 中文适配、commitlint/husky/commitizen 中文模板、conventional-changelog 中文配置。仅在用户显式 /chinese-commit-conventions 时调用,不要根据上下文自动触发。
Also in 3 projects that use this
MorningStar0709Skillworkflow-runner
Run an agency-orchestrator style YAML workflow inside the current Trae conversation by simulating or coordinating multiple roles. Use when the user provides a `.yaml` or `.yml` workflow, asks for multi-role collaboration, says things like “用多个角色一起评审这个 PRD”“多角色协作”“先生成工作流再执行”“让产品经理、架构师、QA 一起看一下”, or wants roles such as product manager, architect, reviewer, or QA to work together. Supports layered execution, role prompting, variable interpolation, document-backed inputs, and parallel steps only when the current environment has a clear subagent mapping. Do not use for ordinary implementation plans, simple code changes, or tasks already covered by `writing-plans`, `executing-plans`, `subagent-driven-development`, or single-purpose review/debug skills.
Also in 4 projects that use this
- +1 more from shibit-net
Other versions123 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 123
- obra/superpowers★ 314ksame name
- jnMetaCode/superpowers-zh★ 8.3ksame name
- openai/plugins★ 7.3ksame name
- microsoft/FluidFramework★ 4.9ksame name
- GanyuanRan/Aegis★ 1.3ksame name
- coco-research/coco★ 437same name
- Ibrahim-3d/orchestrator-supaconductor★ 380same name
- totvs/engpro-advpl-tlpp-skills★ 138same name
- Houseofmvps/ultraship★ 123same name
- LayneChai/superpowers-dsh★ 102same name
113 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- brainstormingSkill
- executing-plansSkill
- fleet-lifecycleSkill
- fleetmates-configSkill
- fleet-supervisionSkill
- parallel-executionSkill
- phase-gateSkill
- receiving-code-reviewSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-fleetmatesSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 114 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
If .fleetmates/<run-id>/status.json exists and has a non-empty status.gates, this is a fleet run — but a record in status.gates is a report …
- Very specific: line 36
Use status.gates only to see which phases the run executed.
- Distinctive: line 78
If you find yourself about to commit implementation work straight onto the run branch instead of a teammate branch, stop — that's the wrong …
- Distinctive: line 117
Do not sweep by hand: a hand-run git worktree remove --force or git branch -D supplies neither the recomputed phase gate nor the ancestry …
- Distinctive: line 131
Before proposing integration, check for parked or deferred findings from review — anything a gate check or reviewer flagged but did not …
“Common” is measured: kept by at least 6 in 10 of the 114 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Finishing a Development Branch
Work is not finished because the code looks done. It is finished when a gate you just ran says so — not when a record claims one already did.
The completion gate
Work is not finished because the code looks done, and never because "the tests looked green" or "the teammate said it was done" earlier in the conversation. Which check applies depends on what state the run is in — check in this order.
1. Fleet run: status.gates is recorded
If .fleetmates/<run-id>/status.json exists and has a non-empty status.gates, this is a fleet
run — but a record in status.gates is a report written by the agents being enforced, and
status.json is agent-writable, so it is never trusted as evidence. A recorded verdict of
PASS proves nothing by itself:
{
"gates": {
"<phaseName>": {
"verdict": "PASS",
"failed": [],
"skipped": [],
"pending": [],
"recordedAt": 1785952191621
}
}
}Use status.gates only to see which phases the run executed. For each of those phases,
re-run the gate now:
node "<fleetmates root>/scripts/cli.mjs" gate --run <runId> --plan <planPath> --root <project root> --phase <name>gate recomputes fileset and ownership from git at the moment it runs — it does not read
or trust the old record. If any phase's fresh run does not exit 0, the work is not finished —
name the phase and stop.
2. Inline run: a run directory exists but gates are absent or empty
executing-plans runs plans inline, task by task, and never writes a gate manifest or a
verdict — that's by design, not an omission. If status.json exists but status.gates is
absent or empty, the run is inline, and the absent gates are expected, not a fault to fix here.
There is no fleet history to derive fileset or ownership from, so run the gate solo:
node "<fleetmates root>/scripts/cli.mjs" gate --no-fleet --root <project root>--no-fleet is the only way the enforcement checks are skipped, and it runs the project's
full test suite (and any other command checks fleetmates.gate.json declares) fresh — a
remembered result, or a run from earlier in this session, is not evidence. Once it exits
0, proceed.
3. No run directory at all
Someone may have finished work on a branch without ever calling init-run — there's no
.fleetmates/<run-id>/ to read. Run the gate solo the same way as case 2, confirm it exits 0
from fresh output, and proceed the same way.
Branch taxonomy
Two kinds of branch exist in this plugin, and they are not interchangeable:
- Teammate branches are scratch. Each teammate does its work on its own branch, inside its
own worktree, and that branch is deleted by
prune-runfor each worktree it removes, once the run branch provably contains it. - The run branch is the deliverable. It is the only branch that matters once the run is
done, and
tm-integratoris the sole writer of it. Teammate branches merge into the run branch; the run branch never merges into a teammate branch, and no other role pushes to it directly.
If you find yourself about to commit implementation work straight onto the run branch instead of a teammate branch, stop — that's the wrong direction for this model.
Worktree and branch cleanup
A finished run leaves a worktree and a scratch branch per task. The --yes flag runs
git worktree remove --force on every worktree it lists as prunable, and that discards
uncommitted and untracked changes in it without asking. On Windows, it also follows a
junction a worktree holds, so a worktree provisioned with a junction back into the
repository — the kind a fresh worktree's own dependency install might use as a shortcut,
such as a junction into the repository's real node_modules — has that target's
contents deleted too, not just the worktree's own. Without --yes the command removes
nothing, and it prints the worktrees and branches it would act on if nothing changes
before the --yes run — both runs recompute the gate from scratch, but not which of
those branches would actually be deleted — that verdict is computed only inside the
removal itself. Run it first without --yes to read the plan, then add --yes to
remove what it lists:
node "<fleetmates root>/scripts/cli.mjs" prune-run --run <runId> --plan <planPath> --root <project root> [--yes]It removes a task's worktree only where that task's phase gate recomputes to PASS, and
it deletes the worktree's branch only where git merge-base --is-ancestor proves the
run branch already contains it. That proof is against the ref derive takes directly
off git symbolic-ref --quiet HEAD, not off an abbreviated name, and derive refuses
to produce a run branch at all when HEAD is detached, when HEAD points outside
refs/heads/, or when the name that ref strips to is itself a ref path — so nothing a
teammate can plant under refs/heads/ changes which ref this proof or the deletion it
authorises runs against. That proof is not something a bare git branch -D makes on its own: -D
deletes whatever branch it is given without asking whether the run branch contains it —
it refuses only a branch a registered worktree still holds checked out, which is why
prune-run removes the worktree first — and the plain -d measures "merged" against
the branch's upstream or your current HEAD, never against the run branch. It never
touches the main worktree, and it never removes another run's task worktree, but it does
force-remove a leaked merge-preview worktree — a scratch worktree under the system temp
directory — regardless of which run's gate created it, because a killed gate cannot run
its own cleanup. Every worktree it examines and declines to remove is printed with the
reason; it examines worktrees, not bare branches, so a task branch whose worktree is
already gone is not reported either way.
Do not sweep by hand: a hand-run git worktree remove --force or git branch -D supplies
neither the recomputed phase gate nor the ancestry proof above — it only does what the flag
itself says, on whatever you point it at.
What this does not clean up: .fleetmates/<run-id>/ stays on disk on purpose. Delete it
yourself when you no longer want the record: resume reads it to continue a run, while
rebuild-state reads it twice: once to refuse when it exists, since it exists for the
case where the directory is already gone, and once to keep the run branch it recorded —
delete the directory and a later rebuild-state run from any other checkout records that
checkout as the run branch, permanently, and complete --enforcement-only can no longer
verify completion for the rest of the run. It is gitignored.
Surface unresolved findings
Before proposing integration, check for parked or deferred findings from review — anything a gate check or reviewer flagged but did not block on. Report them explicitly here, individually, with enough detail to judge. Do not let them get buried in a "looks good" summary. The user decides whether an unresolved finding blocks integration; that call is not yours to make silently.
Integration options
Once a freshly re-run gate has passed for every phase and any parked findings are on the table, present the choice — do not pick one unilaterally:
- Merge to the default branch.
- Open a pull request for external review before it lands.
- Keep the branch for further work — integration isn't forced just because the gate passed.
Carry out whichever the user picks; don't default to merging in the absence of an answer.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

