From buehler
Use when all task PRs are merged into the feature branch — creates feature→main PR, polls for review, merges, creates retro wiki page, updates meta wiki, runs sizing calibration, closes milestone
How this skill is triggered — by the user, by Claude, or both
Slash command
/buehler:integrateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Type:** Rigid. Follow this process exactly.
Type: Rigid. Follow this process exactly.
.github/buehler.yaml for configuration valuesIn buehler, merging happens in two waves:
This skill handles wave 2 plus all finalization: retro wiki page, meta wiki page update, PRD status update, sizing calibration PR, and milestone closure.
You MUST create a task for each of these items and complete them in order:
Verify that wave 1 is complete — all task PRs should already be merged into the feature branch.
status:done (task PR merged into feature branch)status:in-progress, status:blocked, or status:ready:
gh issue list --milestone "{milestone_title}" --search "\"Stabilization: {milestone_title}\" in:title" --json number --jq '.[0].number'<!-- buehler:parent #{stabilization_number} -->)# Fetch open issues in milestone
gh issue list --milestone "{milestone_title}" --state open --json number,title,labels
In the two-wave model, there is typically one feature PR (feature→main). The per-issue topological sort is handled by buehler:review in wave 1.
If multiple feature branches are ready (multiple epics), use dependency ordering between epics:
Present the merge plan showing the feature branch(es) to merge:
## Feature Branch Merge Plan
| Order | Feature Branch | Epic | Stories | Tasks |
|-------|---------------|------|---------|-------|
| 1 | feature/{epic}-v{Major} | {Epic Name} | {count} | {count} |
If approval_gates.before_merge is true, present the merge plan and wait:
## Feature Branch Merge Plan
**Feature branch:** feature/{epic}-v{Major}
**Target:** {base_branch}
**Strategy:** squash (feature branch squashed into single commit on base branch)
**Stories included:** {count}
**Tasks completed:** {count}
**All scenario trackers passing:** Yes/No
Approve merge?
Even if the gate is off, always announce what you are about to do before starting.
Create a PR from the feature branch to the base branch:
gh pr create --base {base_branch} --head feature/{epic}-v{Major} \
--title "{Epic Name} v{Major}.{Minor}" \
--body "## {Epic Name} v{Major}.{Minor}
Milestone: #{milestone_number}
PRD: [PRD-{epic}-v{Major}](../../wiki/PRD-{epic}-v{Major})
### Stories Completed
{list of stories with issue numbers}
### Summary
{aggregate description of what this version delivers}
"
Use the same polling mechanism as buehler:review but for the feature→main PR.
Read polling-prompt.md from the buehler:review skill directory and fill in the template with the feature PR number.
review.polling_model from config, default haiku)review.polling_interval seconds (default 60), timeout at review.polling_timeout (default 3600)review.require_codeowners is true (the default), verify a matching CODEOWNER has approved before proceeding. If no CODEOWNER approval exists, do not merge — report the gap and continue pollingOnce the feature PR is approved, merge it into the base branch.
gh pr view {pr_number} --json mergeable,mergeStateStatus
If the feature branch is behind the base branch:
git fetch origin
git checkout feature/{epic}-v{Major}
git rebase origin/{base_branch}
git push --force-with-lease origin feature/{epic}-v{Major}
Wait for CI to re-run after rebase.
If the feature branch has merge conflicts after rebase:
Squash-merge the feature branch into the base branch (collapses all task commits into a single commit):
gh pr merge {pr_number} --squash --delete-branch
After merging, verify the base branch is healthy:
git checkout {base_branch}
git pull origin {base_branch}
{test_command}
If tests fail after merge:
Feature branch merged to {base_branch}.
**Options:**
1. **Close milestone** — run retro, update wiki, create calibration PR, close
2. **Keep open** — more work planned for this epic version (invoke `buehler:dispatch` for next minor)
If user chooses to keep open, stop here. Otherwise proceed with steps 8-14.
Gather all ## Lessons Learned comments from task issues in the milestone:
# For each issue in milestone, find comments matching "## Lessons Learned"
gh issue list --milestone "{milestone_title}" --state closed --json number --jq '.[].number'
For each issue, fetch comments and parse the ## Lessons Learned section:
size: label)wiki.directory config):
git -C {wiki_directory} pull origin master
Retro-{epic}-v{Major}.{Minor}.md using retro-template.md from this skill directoryapproval_gates.before_wiki_update is true, present the page content and wait for approvalgit -C {wiki_directory} add "Retro-{epic}-v{Major}.{Minor}.md"
git -C {wiki_directory} commit -m "Add retro for {epic} v{Major}.{Minor}"
git -C {wiki_directory} push origin master
{Epic-Name}.md with the following sections:
approval_gates.before_wiki_update is true, present changes and wait for approvalgit -C {wiki_directory} add "{Epic-Name}.md"
git -C {wiki_directory} commit -m "Update meta page for {epic} v{Major}.{Minor} — shipped"
git -C {wiki_directory} push origin master
git -C {wiki_directory} add "PRD-{epic}-v{Major}.md"
git -C {wiki_directory} commit -m "PRD-{epic}-v{Major}: status Active → Approved"
git -C {wiki_directory} push origin master
Using the token data collected in Step 8:
sizing.buckets section of .github/buehler.yaml:
git checkout -b calibrate/sizing-{epic}-v{Major}.{Minor} origin/{base_branch}
# Apply sizing bucket updates to .github/buehler.yaml
git add .github/buehler.yaml
git commit -m "chore: calibrate sizing buckets from {epic} v{Major}.{Minor} retro"
git push -u origin calibrate/sizing-{epic}-v{Major}.{Minor}
gh pr create --base {base_branch} \
--head calibrate/sizing-{epic}-v{Major}.{Minor} \
--title "Calibrate sizing buckets from {epic} v{Major}.{Minor}" \
--body "## Sizing Calibration
Evidence from {epic} v{Major}.{Minor} retro:
| Task | Issue | Estimated Size | Actual Tokens | Delta % |
|------|-------|----------------|---------------|---------|
{evidence rows}
### Recommendations
{bucket adjustment rationale}
See [Retro-{epic}-v{Major}.{Minor}](../../wiki/Retro-{epic}-v{Major}.{Minor}) for full details.
"
gh api repos/{owner}/{repo}/milestones/{milestone_number} \
--method PATCH -f state="closed"
If approval_gates.before_close_milestone is true, ask for confirmation first.
## Integration Complete
**Milestone:** {title} — CLOSED
**Feature branch:** feature/{epic}-v{Major} → {base_branch}
**Merge strategy:** {strategy}
**Stories completed:** {count}
**Tasks completed:** {count}
### Wiki Updates
- **Retro:** [Retro-{epic}-v{X}.{Y}](wiki_link)
- **Meta page:** [{Epic Name}](wiki_link) — updated
- **PRD:** [PRD-{epic}-v{X}](wiki_link) — status: Approved
### Sizing Calibration
- **Calibration PR:** #{pr_number}
- **Tasks analyzed:** {count}
- **Bucket adjustments proposed:** {count}
### Post-Merge Tests
- **Status:** PASSING
- **Total tests:** {count}
### Cleanup
- Feature branch deleted: {yes/no}
- Worktrees to clean: `rm -rf {worktree_dir}/{branch_prefix}/`
| Conflict Type | Detection | Resolution |
|---|---|---|
| Additive — different files or non-overlapping sections | git rebase succeeds | Automatic via rebase |
| Overlapping — same lines in same file | git rebase fails with conflict markers | Present both versions to user, ask for resolution |
| Semantic — no textual conflict but broken behavior | Tests fail after merge | Revert merge, dispatch fix agent to reconcile |
After integration, remind the user to clean up worktrees:
rm -rf {worktree_dir}/{branch_prefix}/
Or if using git worktree tracking:
git worktree list
git worktree remove {path} # for each completed worktree
git worktree prune
: delimiter (e.g., status:done, size:m)buehler:{skill} formatnpx claudepluginhub corrigantj/buehler --plugin buehlerFetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.