
branch-completion
Use when implementation is complete and tests pass. Guides completion by presenting structured optio
提供方 jagreehal|开源
Branch Completion
Critical rules
- No completion options while tests fail. Tests are the gate.
- Present exactly four options: merge locally, open PR, keep as-is, discard.
- Never delete work without exact typed confirmation (
discard). - Never force-push without an explicit request.
- Option 1: re-test after merge. Option 3: keep the worktree.
- Before executing a choice, read references/options.md.
Workflow
- Run the project test suite. On failure: show failures, stop — do not present options.
- Present the four structured options (see options reference).
- Execute the chosen option per the reference (merge / PR / keep / discard).
- Cleanup: remove worktree for options 1 and 4; keep for 2 and 3. Option 2 keeps worktree for PR iteration.
Resources
- references/options.md — option commands, cleanup table, presentation template. Read before executing a choice.
Validation
Before options:
- Suite run and passing
After choice:
- Option 1: merged result re-tested; branch and worktree removed
- Option 2: pushed, PR created, URL reported, worktree kept
- Option 3: branch and worktree preserved, location reported
- Option 4: exact
discardconfirmation before deletion; worktree removed
Constraints
- Not for mid-implementation or unverified work.
- Related:
verification-before-completion,git-worktrees,implementation-planning.