Merge Prep
Workflow
Require <source-branch> and resolve --target to {TARGET_BRANCH} or
main when omitted. Validate both refs and a clean worktree before analysis.
Use native, read-only Git evidence: merge-base, commit log, changed-file
summary, and git merge-tree --write-tree <target> <source> (or report
UNAVAILABLE when the installed Git cannot provide that read-only operation).
Report commits, files, conflict details, likely conflict patterns, and
text-only resolution strategies. Emit copy-pasteable commands for a human to
execute later. Never run git checkout, git switch, git merge, git rebase, or a conflict edit. See
references/workflow.md for the exact sequence.
When NOT to Use
- The worktree is dirty or either branch/ref is missing.
- A merge, checkout, rebase, or conflict resolution should happen now.
- A write-capable branch operation is requested.
Output
Pre-merge evidence includes source/target refs, merge-base, commits, files,
merge-tree output, conflict status, and copy-pasteable manual commands.
Conflicts are findings, not permission to mutate. A complete read-only
analysis ends PASS (with its conflict status); missing preconditions or
unexpected Git failures are terminal BLOCKED/FAIL results. No merge claim
is made.
Verification
References
references/workflow.md — native analysis,
conflict interpretation, and manual command output.
1---2name: merge-prep3description: 'Prepare a read-only branch merge analysis with native git merge-tree conflict detection and copy-pasteable manual commands. Use when deciding whether to merge one branch into another. Not for: checkout, merge, rebase, conflict edits, or branch mutation. Output: commits, files, conflicts, evidence, and manual commands.'4argument-hint: '<source-branch> [--target=<branch>]'5metadata:6 source: https://skillmd.com/skills/hmj1026/merge-prep7 dhpk-capability-id: dhpk.skill.merge-prep8 dhpk-name-style: portable-skill9 dhpk-invocation-class: implicit-eligible10---1112# Merge Prep1314## Workflow1516Require `<source-branch>` and resolve `--target` to `{TARGET_BRANCH}` or17`main` when omitted. Validate both refs and a clean worktree before analysis.18Use native, read-only Git evidence: merge-base, commit log, changed-file19summary, and `git merge-tree --write-tree <target> <source>` (or report20`UNAVAILABLE` when the installed Git cannot provide that read-only operation).2122Report commits, files, conflict details, likely conflict patterns, and23text-only resolution strategies. Emit copy-pasteable commands for a human to24execute later. Never run `git checkout`, `git switch`, `git merge`, `git25rebase`, or a conflict edit. See26[`references/workflow.md`](references/workflow.md) for the exact sequence.2728## When NOT to Use2930- The worktree is dirty or either branch/ref is missing.31- A merge, checkout, rebase, or conflict resolution should happen now.32- A write-capable branch operation is requested.3334## Output3536Pre-merge evidence includes source/target refs, merge-base, commits, files,37`merge-tree` output, conflict status, and copy-pasteable manual commands.38Conflicts are findings, not permission to mutate. A complete read-only39analysis ends `PASS` (with its conflict status); missing preconditions or40unexpected Git failures are terminal `BLOCKED`/`FAIL` results. No merge claim41is made.4243## Verification4445- [ ] Source and target resolve and `git status --porcelain` is empty.46- [ ] Native merge-tree analysis ran without changing the worktree.47- [ ] Commit/file/conflict evidence is included, including clean conflicts48 when none were found.49- [ ] Suggested merge commands are output only and were not executed.5051## References5253- [`references/workflow.md`](references/workflow.md) — native analysis,54 conflict interpretation, and manual command output.