agent-briefing
Use when writing a prompt for a subagent or teammate, deciding how much context another agent needs, writing or reading a handoff…
Use when implementation on a branch is finished and reviewed and the work needs to land, be proposed as a pull request, be parked for later, or be thrown away.
Claude Code
$ npx -y skills add NoobyGains/godmode --skill merge-protocol --agent claude-code
Codex
$ npx skills add NoobyGains/godmode --skill merge-protocol -a codex -y
Cursor
$ npx skills add NoobyGains/godmode --skill merge-protocol -a cursor -y
Gemini CLI
$ npx skills add NoobyGains/godmode --skill merge-protocol -a gemini-cli -y
GitHub Copilot
$ npx skills add NoobyGains/godmode --skill merge-protocol -a github-copilot -y
OpenCode
$ npx skills add NoobyGains/godmode --skill merge-protocol -a opencode -y
Windsurf
$ npx skills add NoobyGains/godmode --skill merge-protocol -a windsurf -y
name: merge-protocol description: "Use when implementation on a branch is finished and reviewed and the work needs to land, be proposed as a pull request, be parked for later, or be thrown away."
The last step of a run decides what happens to the branch: merge it locally, open a pull request, keep it as it is, or abandon it. Each path is easy to get slightly wrong (merging into the wrong base, deleting a worktree that held the only copy of a file, force-pushing over someone's commits), and most of those mistakes are expensive to undo.
**Core principle: prove the suite is green on the exact tree you are about to land, let the user choose the path, execute it exactly, and tear down only what this run created.** Integration is the user's decision; your job is to make each option safe.
NO LANDING ON A RED SUITE, NO ABANDONING WITHOUT THE TYPED WORD
No exceptions. No workarounds. No shortcuts.
**Required:**
**Skip:**
Run the project's full test command in the worktree, plus its other machine checks if it has them (lint, type check, build). Read the output.
Also check `git status --porcelain`. Uncommitted changes are either committed now (they belong to the work) or reported to the user (they do not).
git_dir=$(cd "$(git rev-parse --git-dir)" && pwd -P) git_common=$(cd "$(git rev-parse --git-common-dir)" && pwd -P) worktree_path=$(git rev-parse --show-toplevel) # capture now; later steps change directory branch=$(git branch --show-current)
| State | Paths offered | Teardown | |---|---|---| | Normal checkout (`git_dir` equals `git_common`) | all four | none needed | | Linked worktree on a named branch | all four | only if this run created it | | Linked worktree, detached HEAD | PR (push as a new branch), keep, abandon | the host manages it; leave it |
The trunk is the branch this work forked from: named in the plan, the ledger, the branch's upstream, or `git merge-base`. If it is not certain, ask one question: "This branch split from `<best guess>`, correct?" Merging into the wrong base is expensive to undo.
Present exactly this, with the real names filled in:
The work on <branch> is complete. Suite: <command> -> <counts>. 1. Merge into <trunk> locally 2. Push <branch> and open a pull request against <trunk> 3. Keep the branch as it is for later 4. Abandon the work (deletes the branch and its commits) Which path?
Wait for the answer. If the run made rulings or left deferred minors, list them above the menu so the user decides with them in view.
**Path 1: Merge locally**
main_root=$(git -C "$git_common/.." rev-parse --show-toplevel) cd "$main_root" git switch "$trunk" git pull --ff-only # if the trunk has a remote; stop if it cannot fast-forward git merge --no-ff "$branch" <full test command>
If the merged result is red, stop. The merge is local and nothing is pushed: leave the branch and worktree in place, report, and investigate. If green: tear down (step 6), then `git branch -d "$branch"`. Do not push the trunk unless the user asked for that too.
**Path 2: Pull request**
git push -u origin "$branch" # detached HEAD: git push origin HEAD:refs/heads/<new-branch>
Open the pull request against the trunk with the forge's command-line tool if one is installed, or the creation link the push prints. Follow the repository's pull-request template. The body says what changed, how it was verified (commands and counts), the rulings made, and the deferred minors. Report the URL. Keep the worktree: review feedback gets fixed there.
**Path 3: Keep as it is**
Report: `Keeping <branch>. Worktree at <path>. Resume with the ledger at <ledger path>.` Change nothing.
**Path 4: Abandon**
Show exactly what will be lost and require the typed word:
This permanently deletes: - branch <branch> - commits: <git log --oneline trunk..branch> - worktree at <path>, including uncommitted files: <list or "none"> Type "abandon" to confirm.
Only the exact word authorises it. "Yes", "sure" or "get rid of it" do not; ask again. On confirmation: change to the main root, tear down (step 6), then `git branch -D "$branch"`. If the branch was pushed, ask separately before deleting the remote branch.
Runs after path 1 and confirmed abandonment only.
Delete the run's plan workspace (`.godmode/runs/<plan-slug>/`) after the rulings have been reported.
Path: <1-4> Branch: <name> Trunk: <name> Suite: <command> -> <counts> (on the merged tree for path 1) Result: <merge commit | PR URL | kept at path | deleted> Teardown: <what was removed, what was lef
Engineering discipline for AI coding agents: question the request, verify against current docs, plan, build test-first on the cheapest capable model, review with a second model family, prove it before saying done. One repo for Claude Code, Codex, Antigravity, Cursor, Gemini CLI and OpenCode.
Use when writing a prompt for a subagent or teammate, deciding how much context another agent needs, writing or reading a handoff…
Use when a task, feature or bug fix is implemented and before it is committed, merged or handed back to the user, and when the…
Use when about to add or change code in an existing codebase: a new file, module, route, component, service, test, migration,…
Use when about to say that work is done, fixed, passing, working, deployed or ready, before committing, opening or merging a pull…
Use when a reviewed change is about to land on a shared branch, be released or be deployed, and when the user asks for a second…
Use when a written implementation plan is ready to execute in the current session and its tasks are mostly independent, so each…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration