epic-merge
Verify the gates of an Epic pull request (checks, conflicts, mergeability) and merge it unless merge is disabled. Sub-skill of epic-implementer.
- License 许可
- MIT
- 最近更新
- 2026-10-28
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- epic-merge
- description
- Verify the gates of an Epic pull request (checks, conflicts, mergeability) and merge it unless merge is disabled. Sub-skill of epic-implementer.
03 SKILL.md 正文
User Input
$ARGUMENTS
The input must contain the pull request number, the worktree path, the merge conventions from epic-repository-rules and whether merge is disabled (no-merge).
Objective
Make sure the pull request is merge-ready and, unless no-merge is set, merge it.
The gates in sections 1-3 always run. Only section 4 depends on no-merge.
1. Checks
- Wait for all CI checks to finish (
gh pr checks <pr> --watch). - If every check passes, continue.
- If a check fails:
- Read the failure logs.
- Fix the cause in the Epic worktree, following
command-bus-architecture. - Run the local validation again (tests, lint, typecheck, build).
- Commit with
epic-commit-progressivelyand push. - Wait for the checks again.
- After 3 failed fix attempts on the same check, stop and report
BLOCKED.
If the repository has no CI checks, rely on the local final validation and report that no remote checks exist.
2. Conflicts
Check mergeability (gh pr view <pr> --json mergeable,mergeStateStatus).
If the branch is behind or conflicts with the base branch:
- Update the Epic branch with the base branch, following repository rules (rebase or merge).
- Resolve conflicts preserving the intent of both sides.
- Run the local validation again.
- Push and go back to section 1.
If a conflict cannot be resolved without changing Epic scope or someone else's work semantics, stop and report BLOCKED.
3. Other Gates
Verify:
- Required reviews / approvals.
- Branch protection rules.
- Draft status.
- Unresolved required conversations.
Never bypass a gate. Never use admin overrides (--admin) or force pushes to the base branch.
If a gate requires a human (e.g. a required approval), stop and report WAITING_FOR_HUMAN with what is missing.
4. Merge
If no-merge is set:
- Do not merge.
- Report
READY_TO_MERGEwhen all gates pass.
Otherwise, when all gates pass:
- Merge using the merge method from repository rules. If none exists, use a merge commit (
gh pr merge <pr> --merge) so the progressive commits are preserved. Do not delete branches here;epic-cleanupdoes it. - Confirm the pull request state is
MERGED. - Confirm the Epic Issues were closed; close any that were not.
5. Final Output
Return:
- Decision:
MERGED,READY_TO_MERGE(no-merge),WAITING_FOR_HUMANorBLOCKED - Checks status
- Conflicts found and how they were resolved
- Fix commits pushed
- Merge commit (when merged)
- What is missing (when not merged)
Return this output to the calling skill and continue its flow. Do not end the run here unless this skill was invoked directly by the user.
04 同仓库更多 Skills
utils-implementation
Write and organize utils (pure helpers for formatting, mapping, filtering, math, parsing, ids, storage) as one namespace object per domain with clear, readable names. Use before creating or changing any util.
test-writer
Write tests for the current implementation
tech-lead
Analyze a project, turn the user's goal into an implementation-ready GitHub Epic and Issues (following project rules, the Command Bus architecture and Fragiola UI), then start epic-implementer automatically (use the no-implement flag to stop after planning).
tech-lead-publish
Publish a final Epic and its Issues to GitHub, linked and labeled, keeping dependency and execution information. Sub-skill of tech-lead.
setup-command-system
Install the Command System architecture in the project
reviewer
Review code changes and provide feedback