Odin-claude-plugin pr-merge-temporal
Merge multiple PRs into a temporal integration branch before merging to base, with ordered conflict resolution. Use when you want to validate a set of PRs together on a staging branch before advancing the base branch.
git clone https://github.com/OutlineDriven/odin-claude-plugin
T=$(mktemp -d) && git clone --depth=1 https://github.com/OutlineDriven/odin-claude-plugin "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pr-merge-temporal" ~/.claude/skills/outlinedriven-odin-claude-plugin-pr-merge-temporal && rm -rf "$T"
skills/pr-merge-temporal/SKILL.mdSmart Merge to Temporal Branch
Merge multiple PRs into a temporal integration branch for validation before merging to base.
Process
-
Detect base branch: Identify the default branch via
or repo conventions.git remote show origin -
Enumerate PRs: List all PRs to merge. For each, fetch the latest HEAD.
-
Create temporal branch: Fetch latest and branch from the remote base tip.
git fetch origin git checkout -b temporal/<timestamp> origin/<base> -
Determine merge order:
- If the user specifies an order, use that.
- Otherwise, compute dependency/topological order (if PR B depends on PR A, merge A first).
- If PRs are independent with no clear ordering, present the list and ask the user to confirm or reorder before proceeding.
-
Sequential merge with conflict handling — for each PR in order: a. Attempt
into the temporal branch. b. If merge succeeds cleanly, continue to next PR. c. If conflicts occur:git merge --no-ff <pr-branch>- Analyze each conflict using
and codebase context.difft - Apply resolution using structural understanding (prefer base for formatting, PR for logic).
- If a conflict cannot be resolved with confidence, abort (
), stop, and report the conflict with both sides and a recommended resolution. d. After each successful merge, run available build/test commands to catch regressions early.git merge --abort
- Analyze each conflict using
-
Validate temporal branch: Once all PRs are merged, run full build/test suite if available.
-
Report results: Present the validated temporal branch to the user. Do NOT merge into base automatically — only advance base if the user explicitly requests it.
-
Abort conditions — stop the queue and report if:
- A conflict cannot be safely auto-resolved.
- A post-merge build/test fails.
- A PR has been superseded or closed.
The temporal branch is abandoned:
— base remains untouched.git checkout <base>
Output
Report for each PR: merged successfully, conflicts resolved (with details), or blocked (with reason). Include the temporal branch name for user review.