ai-team-library/claude/skills/merge-bean/SKILL.md
# Skill: Merge Bean ## Description Safely merges a bean's feature branch into the `main` branch. Handles pulling latest changes, detecting merge conflicts, and reporting results. This is the Merge Captain's primary operation — the final stage of the bean execution wave. ## Trigger - Invoked by the `/merge-bean` slash command. - Called automatically by `/long-run` as the final stage after bean verification. - Should be executed by the Team Lead (acting as Merge Captain) or the integrator-merg
npx skillsauth add beekeeper-lab/foundry ai-team-library/claude/skills/merge-beanInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Safely merges a bean's feature branch into the main branch. Handles pulling latest changes, detecting merge conflicts, and reporting results. This is the Merge Captain's primary operation — the final stage of the bean execution wave.
/merge-bean slash command./long-run as the final stage after bean verification.| Input | Type | Required | Description |
|-------|------|----------|-------------|
| bean_id | String | Yes | Bean identifier (e.g., BEAN-011 or 11) |
| target_branch | String | No | Branch to merge into (default: main) |
| bean_dir | Directory | Yes | ai/beans/BEAN-NNN-<slug>/ — resolved from bean_id |
ai/beans/.bean.md. Confirm status is Done.
Done: report BeanNotDone error and exit.
2a. VDD gate — Confirm a passing VDD report exists at the canonical
path ai/outputs/tech-qa/vdd-<NNN>.md (zero-padded NNN to match the
bean ID).VDDMissing error naming the bean
and exit. Suggest re-running /vdd <bean-id>.FAIL or
EMPTY: report VDDFail error with the verdict and the report
path, and exit.PARTIAL is allowed only when the bean has a manual sign-off
note in its Notes section (Team-Lead override). Otherwise refuse
with VDDPartial.PASS proceeds to Step 3.bean.md.Xm and Xh Ym formats, sum minutes, format result as Xm (under 1h) or Xh Ym (1h+).— placeholders).bean/BEAN-NNN-<slug>.git branch --list bean/BEAN-NNN-<slug>.
BranchNotFound error and exit.git checkout main (or specified target).
main should always exist.git pull origin main.
git merge bean/BEAN-NNN-<slug> --no-ff.
--no-ff flag preserves a merge commit even if fast-forward is possible, making the merge visible in history.git push origin main.
git branch -d bean/BEAN-NNN-<slug>.
git push origin --delete bean/BEAN-NNN-<slug>.git checkout main.If step 9 detects merge conflicts:
git merge --abort to restore the target branch to its pre-merge state.git checkout bean/BEAN-NNN-<slug>.| Output | Type | Description | |--------|------|-------------| | merge_commit | Git commit | Merge commit on the target branch | | merge_report | Console text | Summary: bean, branches, commit hash, or conflict details |
--no-ff to preserve merge history.main.| Error | Cause | Resolution |
|-------|-------|------------|
| BeanNotDone | Bean status is not Done | Finish the bean first, then merge |
| VDDMissing | ai/outputs/tech-qa/vdd-<NNN>.md does not exist | Run /vdd <bean-id> and re-attempt the merge |
| VDDFail | VDD report's aggregate verdict is FAIL | Fix the failing criteria, re-run /vdd, retry merge |
| VDDPartial | VDD report's aggregate verdict is PARTIAL (manual items) | Tech-QA confirms manually; re-run /vdd --manual=pass or add a Notes override |
| VDDEmpty | Bean has no Acceptance Criteria | Add criteria to the bean and re-run VDD |
| BranchNotFound | Feature branch doesn't exist in git | Was the bean processed with --no-branch? Create branch manually or skip merge |
| MergeConflict | Auto-merge fails due to conflicting changes | Report files, abort merge, return to feature branch |
| PushFailure | Push rejected or network error | Pull and retry once; if still failing, report for manual resolution |
| TargetNotFound | Target branch doesn't exist on remote | Verify repository setup — main should always exist |
Done in its bean.mdai/outputs/tech-qa/vdd-<NNN>.md with aggregate verdict
PASS (see claude/skills/vdd/SKILL.md)bean/BEAN-NNN-<slug> must exist.claude/hooks/hook-policy.md)development
# Skill: VDD (Verification-Driven Development) Gate ## Description Runs the programmatic VDD gate for a bean: parses the bean's `## Acceptance Criteria` section, dispatches each criterion's evidence type to the matching runner (test, lint, file, file-contains, or manual), aggregates the results into a pass/fail verdict, and writes a structured markdown report at `ai/outputs/tech-qa/vdd-<NNN>.md` (zero-padded NNN). This is the machine-checkable counterpart to the prose VDD policy in `ai/contex
tools
# Skill: Spawn Task ## Description Dispatches a single specialist persona to execute a single task with only that task's context. Auto-detects the runtime environment and chooses one of two execution paths: - **In tmux** (`$TMUX` set): spawn a worker in a git worktree using a child tmux window. Process-isolated, parallelizable, durable across the calling session's lifetime. Same pattern as `/spawn-bean` but at task granularity. - **Not in tmux**: invoke the `Agent` tool with `subagent_typ
development
# Skill: Orchestration Report ## Description Aggregates the per-bean **Orchestration Telemetry** blocks (BEAN-278) across recent Done beans and produces a markdown report that answers the architecture-aware-evaluation question: **is the orchestration paying for itself?** Distinct from `/telemetry-report` (which aggregates raw cost, duration, and tokens); this skill aggregates the orchestration-quality metrics layered on top — bounces, persona activations, contract violations, escape-hatch usag
development
# Skill: Health Check ## Description Runs all health checks defined in `ai/context/health-checks.md` and produces a table-format report. Can be called standalone or by other skills (e.g., `/long-run`). ## Trigger - Invoked by the `/health-check` slash command. - Called programmatically by `/long-run` at the start of each cycle. ## Inputs | Input | Type | Required | Description | |-------|------|----------|-------------| | health_checks | Markdown file | Yes | `ai/context/health-checks.md`