원클릭으로
finishing-a-development-branch
Verifies, summarises, and closes a development branch.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Verifies, summarises, and closes a development branch.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Flags risky shell commands and unsafe tree ops.
Detects high-confidence security risks in code.
Surfaces the dojo's non-negotiable prime directives.
Activates the dojo framework at the start of a session.
Plans multi-step work before writing code.
Captures lessons and promotes recurring patterns.
| name | finishing-a-development-branch |
| description | Verifies, summarises, and closes a development branch. |
| tier | practical |
| category | workflow |
| created_by | human |
| platforms | ["windows","macos","linux"] |
| tags | ["git","merge","lifecycle"] |
| author | Andreas Wasita (@andreaswasita) |
Runs the closing ritual for a completed branch or worktree: final verification, full diff review, options presented to the user, chosen action executed, cleanup, and a logged retrospective. Does NOT merge without explicit user consent.
tasks/todo.md are marked complete.git configured with author identity and remote access.gh CLI authenticated (for PR option).powershell tool to run gates and git.1. Run the dojo gate + full test suite. All green.
2. Review the full diff against main.
3. Present options: merge / PR / keep / discard.
4. Wait for the user to choose.
5. Execute the chosen action.
6. Clean up worktree, branch, and tasks/todo.md.
7. Log the retrospective in tasks/lessons.md.
| Option | Commands |
|---|---|
| Merge | git checkout main && git merge --squash <branch> && git commit && git branch -d <branch> |
| PR | git push -u origin <branch> && gh pr create --fill |
| Keep | (no-op) leave the branch as-is |
| Discard | git checkout main && git branch -D <branch> |
| Verification check | Command |
|---|---|
| Dojo gate | bash scripts/verify.sh --check |
| Full tests | npm test / pytest / go test ./... / dotnet test |
| Clean tree | git status --porcelain |
| Full diff | git diff main --stat then git diff main |
| Commit log | git log main..HEAD --oneline |
Run via the powershell tool:
bash scripts/verify.sh --check
git status --porcelain
git log main..HEAD --oneline
git diff main --stat
All checks must pass. Anything failing → fix it, do not force-merge.
Walk the cumulative diff. Ask:
## Branch Complete: feature/add-search
**Summary:** Full-text search with 3 endpoints, Elasticsearch integration, 24 new tests.
**Stats:** 8 commits, 12 files changed, +420 / -30 lines.
**Options:**
1. Merge to main (squash + delete branch)
2. Open a PR
3. Keep the branch as-is
4. Discard the branch and all changes
Wait for the user's explicit choice.
Run the commands from the Quick Reference table for the chosen option. Confirm completion with the user.
git worktree remove ../<workdir>.tasks/todo.md.git status on main is clean.Append to tasks/lessons.md:
- date: 2026-05-19
type: session-retrospective
feature: "full-text search"
went_well: "TDD caught 2 edge cases before they shipped"
went_poorly: "Underestimated Elasticsearch config — took 2x planned time"
lesson: "Account for infrastructure setup in time estimates for new services"
Without the retrospective, the dojo does not learn from this branch.
verify.sh --check exits 0.tasks/todo.md reset or archived.tasks/lessons.md.