finishing a development branch

Engineering Community

Skill notes

Overview

Core principle: Verify tests → Detect environment → Present options → Execute choice → Clean up. Announce at start: "I'm using the finishing-a-development-branch skill to complete this work."

Step 1: Verify Tests

Run the project's full test suite (npm test / cargo test / pytest / go test ./...). If tests fail, report the failures and stop — the menu comes after a green suite: If tests pass: continue to Step 2.

Step 2: Detect Environment

This determines which menu to show and how cleanup works: State · Menu · Cleanup GIT_DIR == GIT_COMMON (normal repo) · Standard 3 options · No worktree to clean up GIT_DIR != GIT_COMMON, named branch · Standard 3 options · Provenance-based (see Step 6) GIT_DIR != GIT_COMMON, detached HEAD · Reduced 2 options (no merge) · Externally managed — leave in place

Step 3: Determine Base Branch

The base branch is whatever this work forked from — usually named in the plan, the conversation, or the branch's upstream. If it is not already known, ask: "This branch split from <your best guess> - is that correct?" Confirm before merging: merging into the wrong base is expensive to undo.

Step 4: Present Options

Normal repo and named-branch worktree — present exactly these 3 options: Detached HEAD — present exactly these 2 options: Present the menu exactly as written — concise, with every option coming from the list above. Discarding the work happens only in response to your human partner explicitly asking for it (see "If your human partner asks to

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Engineering
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@obra · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
macOS · Linux · Windows
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1: Verify Tests

Run the project's full test suite (`npm test` / `cargo test` / `pytest` / `go test ./...`). If tests fail, report the failures and stop — the menu comes after a green suite: If tests pass: continue to Step 2.

02
Step 2: Detect Environment

This determines which menu to show and how cleanup works: State · Menu · Cleanup `GIT_DIR == GIT_COMMON` (normal repo) · Standard 3 options · No worktree to clean up `GIT_DIR != GIT_COMMON`, named branch · Standard 3 options · Provenance-based (see Step 6) `GIT_DIR != GIT_COMMON`, detached HEAD · Reduced 2 options (no merge) · Externally managed — leave in place

03
Step 3: Determine Base Branch

The base branch is whatever this work forked from — usually named in the plan, the conversation, or the branch's upstream. If it is not already known, ask: "This branch split from <your best guess> - is that correct?" Confirm before merging: merging into the wrong base is expensive to undo.

04
Step 4: Present Options

Normal repo and named-branch worktree — present exactly these 3 options: Detached HEAD — present exactly these 2 options: Present the menu exactly as written — concise, with every option coming from the list above. Discarding the work happens only in response to your human partner explicitly asking for it (see "If your human partner asks to

05
Step 5: Execute Choice

Step 5: Execute Choice

06
Step 6: Cleanup Workspace

Runs for Option 1 and confirmed discards. Options 2 and 3 always preserve the worktree. Both callers have already changed directory to the main repo root — worktree removal must run from outside the worktree — and use the `GIT_DIR`/`GIT_COMMON`/`WORKTREE_PATH` values captured in Step 2, from before that directory change.

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.