[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71F1436EVYTQQ7JVJ2NQB28":3,"skill-same:01M71F1436EVYTQQ7JVJ2NQB28":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":62,"install":63,"resources":76},"01M71F1436EVYTQQ7JVJ2NQB28","bitbucket-merge-workflow",null,"Provider-oriented merge workflow for feature branches created in worktrees. Uses the configured base branch from [recipes.bitbucket-pr-flow.config] (base_branch). Bitbucket via PHP bb-cli.","parada1104\u002Fai-specs-cli","parada1104","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F57575053?v=4","01M71EZZV71KAFZKJ47FQ99ZVS","01M71EZZW7JJBY2VAWA5HRD944",0,"MIT","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Fcatalog\u002Frecipes\u002Fbitbucket-pr-flow\u002Fskills\u002Fbitbucket-merge-workflow\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"workflow","bitbucket","merge","bitbucket merge workflow","worktree","cli","work","cleaning","branches","up","manual","work on","provider","runtime","for","development","feature","pr","branch","pull","2026-11-10 10:12:30",false,"---\nname: bitbucket-merge-workflow\ndescription: >\n  Provider-oriented merge workflow for feature branches created in worktrees.\n  Uses the configured base branch from\n  [recipes.bitbucket-pr-flow.config] (base_branch). Bitbucket via PHP bb-cli.\nlicense: MIT\nmetadata:\n  author: ai-specs\n  version: \"1.0\"\n  generatedBy: \"manual-runtime\"\n  scope: [root]\n  auto_invoke:\n    - \"Creating a pull request on Bitbucket\"\n    - \"Merging a feature branch via Bitbucket PR\"\n    - \"Cleaning up a worktree after merge\"\n    - \"Finishing work on a feature branch\"\n    - \"Syncing development after a merge\"\n---\n\n# Bitbucket Merge Workflow\n\nUse this skill only when the user explicitly asks to create a PR, merge, finish\na branch, or clean up after merge on Bitbucket.\n\nUse the configured base branch from `[recipes.bitbucket-pr-flow.config]` (`base_branch`).\nThis recipe implements Bitbucket through PHP [`bb-cli`](https:\u002F\u002Fbb-cli.github.io)\n(Homebrew formula `bb-cli`, binary `bb`). Honor any no-push\u002Fno-merge rules\ndeclared for the project. `command -v bb` cannot tell PHP `bb-cli` from a\nleftover TypeScript Bitbucket CLI. Positively confirm PHP `bb-cli` with\n`bb --version` plus the PHP `bb auth show` shape; if the binary is not PHP\n`bb-cli`, stop and install from https:\u002F\u002Fbb-cli.github.io (`brew install bb-cli`).\n\n## Artifact ownership\n\nThis skill owns provider transport, PR review and merge, and worktree\u002Fbranch\ncleanup only. It does not own SDD\u002FOpenSpec planning, spec promotion, archive, or\nthe pre-merge artifact guardian, and it imposes no planning-artifact\nprecondition on the branch.\n\nWhen the `plan-build-flow` recipe is enabled, that recipe owns artifact\nplanning, promotion, and archive, together with its own pre-archive and\npre-merge gates; finish them before requesting this skill's merge. A project\nthat does not enable Plan Build can create and merge a PR with no OpenSpec\nchange tree.\n\n## Preconditions\n\n- User explicitly requested PR\u002Fmerge\u002Fcleanup.\n- Working branch belongs to one focused change.\n- Worktree has no unrelated uncommitted changes.\n- Required verification evidence is complete or the user accepts the gap.\n- `bb` is installed and authenticated.\n\n## Runtime Preflight\n\nBefore any push or PR creation, verify the Bitbucket CLI is available:\n\n```bash\ncommand -v bb\nBB_VERSION=$(bb --version 2>&1)\nprintf '%s\\n' \"$BB_VERSION\"\nif ! printf '%s\\n' \"$BB_VERSION\" | grep -q 'Version:'; then\n  echo \"**Blocker**: \\`bb\\` on PATH is not PHP bb-cli. Install PHP bb-cli from https:\u002F\u002Fbb-cli.github.io (Homebrew: \\`brew install bb-cli\\`; never Homebrew formula\u002Fcask \\`bb\\`) and retry.\"\n  return 1\nfi\n```\n\nIf `bb` is not found, stop and report:\n\n> **Blocker**: `bb` is not installed. Install it from https:\u002F\u002Fbb-cli.github.io\n> (Homebrew: `brew install bb-cli`; never Homebrew formula\u002Fcask `bb`) and retry.\n\nIf `bb --version` does not identify PHP `bb-cli`, stop — that binary is\nnot PHP `bb-cli`.\n\nThen verify authentication with a redacted capture (emit only `Username`;\nnever print `AppPassword`). Parse conservatively and block on a missing,\nempty, or multiple Username line:\n\n```bash\nAUTH_CAPTURE=$(bb auth show 2>&1)\nUSERNAME_LINES=$(printf '%s\\n' \"$AUTH_CAPTURE\" | awk -F': ' '$1 == \"Username\" { print }')\nUSERNAME_COUNT=$(printf '%s\\n' \"$USERNAME_LINES\" | awk 'NF { n++ } END { print n+0 }')\nif [ \"$USERNAME_COUNT\" -ne 1 ]; then\n  echo \"**Blocker**: missing, empty, or multiple Username lines. \\`bb\\` is not authenticated. Run \\`bb auth save\\` and retry.\"\n  return 1\nfi\nUSERNAME=$(printf '%s\\n' \"$USERNAME_LINES\" | awk -F': ' '{ gsub(\u002F^ +| +$\u002F, \"\", $2); print $2 }')\nif [ -z \"$USERNAME\" ]; then\n  echo \"**Blocker**: missing or empty Username. \\`bb\\` is not authenticated. Run \\`bb auth save\\` and retry.\"\n  return 1\nfi\nprintf '%s\\n' \"$USERNAME_LINES\"\n```\n\nObserved PHP output shape (do not print `AppPassword`): `Username: \u003Cvalue>` and\n`AppPassword: \u003Csecret>`. A missing or empty `Username`, or multiple Username\nlines, means credentials are absent or ambiguous. If unauthenticated, stop\nand report:\n\n> **Blocker**: `bb` is not authenticated. Run `bb auth save` and retry.\n\n**Open verification gap:** `bb auth save` prompt text is undocumented — run it\nwith no invented flags. See https:\u002F\u002Fbb-cli.github.io\u002Fauthentication\n\nThen run **Runtime Preflight: Account Match** when `expected_owner` is set in\n`[recipes.bitbucket-pr-flow.config]` (skip when empty — no extra CLI calls):\n\n```bash\n# Runtime Preflight: Account Match (Bitbucket)\n# PHP bb-cli: capture bb auth show (not bb auth status). Username parse is conservative.\nEXPECTED_OWNER=\"{config.expected_owner}\"\nif [ -n \"$EXPECTED_OWNER\" ]; then\n  AUTH_CAPTURE=$(bb auth show 2>&1)\n  USERNAME_LINES=$(printf '%s\\n' \"$AUTH_CAPTURE\" | awk -F': ' '$1 == \"Username\" { print }')\n  USERNAME_COUNT=$(printf '%s\\n' \"$USERNAME_LINES\" | awk 'NF { n++ } END { print n+0 }')\n  if [ \"$USERNAME_COUNT\" -ne 1 ]; then\n    echo \"**Blocker**: missing, empty, or multiple Username lines. Stop rather than guessing.\"\n    echo \"bb has no 'auth switch'. Run: bb auth save\"\n    return 1\n  fi\n  ACTIVE=$(printf '%s\\n' \"$USERNAME_LINES\" | awk -F': ' '{ gsub(\u002F^ +| +$\u002F, \"\", $2); print $2 }')\n  if [ -z \"$ACTIVE\" ] || [ \"$ACTIVE\" != \"$EXPECTED_OWNER\" ]; then\n    echo \"**Blocker**: active bb account is '$ACTIVE'; expected '$EXPECTED_OWNER'.\"\n    echo \"bb has no 'auth switch'. Run: bb auth save\"\n    return 1\n  fi\nfi\n```\n\n## Head branch class\n\nBefore merge and cleanup, resolve `HEAD_BRANCH` = the PR source branch name.\n\n**Protected heads** (exact match): `main`, `master`, `development`, `staging`,\nplus configured `[recipes.bitbucket-pr-flow.config].base_branch` and (when set)\n`[recipes.worktree-flow.config].integration_branch`.\n\n**Feature heads**: everything else — including `release\u002FvX.Y.Z`, `feat\u002F*`, `fix\u002F*`.\n\nPrefer shipping to `main` from a disposable `release\u002FvX.Y.Z` head, not from\n`development` as the PR source. Keep Bitbucket UI \"Close source branch\" off for\nprotected heads; never pass --close-source-branch to `bb` (that flag is not a\nverified PHP option). Feature-head source-branch closure is git\u002FUI policy\n(worktree remove + `git push $REMOTE --delete` + `git branch -D`), not a\nPHP merge-method flag. Never remotely delete a protected head.\n\n## Workflow\n\n1. Inspect current branch, worktree path, and `git status`.\n2. Run or confirm any verification required before merge.\n3. Run **Runtime Preflight** (CLI checks + account match above).\n4. Resolve the Bitbucket remote and push the feature branch explicitly:\n\n```bash\nREMOTE=$(git remote | grep -E '^(origin|bitbucket|upstream)$' | head -1 || echo \"origin\")\ngit push -u $REMOTE \u003Cbranch-name>\n```\n\n> **Note**: The remote is resolved dynamically to support repos where the Bitbucket remote is named `bitbucket` or `upstream` instead of `origin`. Falls back to `origin` if no known name matches.\n\n5. Create a pull request with the configured base branch (positional source then\n   destination; never `-i` as the agent default):\n\n```bash\nbb pr create \u003Cbranch-name> \u003Cbase_branch> --title \"\u003Ctitle>\" --description \"\u003Csummary>\"\n```\n\n6. STOP. Do not merge. Report the PR URL and wait for explicit user approval.\n\n7. `bb pr show \u003Cpr-id>` displays **comments** (optional second argument `true`\n   for unresolved inline comments only). It is not PR JSON and must not be used\n   with `--json` \u002F `--jq`.\n\n   Before merging, the approval-SHA policy still applies: do not merge a branch\n   that moved after approval. **Open verification gap:** there is no verified\n   command in this recipe to retrieve `APPROVED_SHA` \u002F `CURRENT_SHA` from PHP\n   `bb-cli` without a forbidden probe. Stop and ask the user to confirm the\n   reviewed revision in the Bitbucket UI rather than guessing flags or running\n   `bb pr commits` as discovery.\n\n8. Classify `HEAD_BRANCH` (see **Head branch class**). Before the provider merge\n   command, report the Tracker item state with the direct host mode of the tracker\n   gate script. This is Tracker item reporting, not OpenSpec artifact or archive\n   validation; the bridge is the single shell host to the verified Go `--ledger`\n   predicate, and it is safe when dormant or unbound. Tracker checkpoints only\n   exist when the tracker recipe is installed: if the script is absent, skip this\n   step (there is no tracker lifecycle to report). The Tracker host is advisory:\n   it reports a `block` \u002F `ask` \u002F `needs-item` verdict on stderr and exits `0`, so\n   a non-zero Tracker verdict never blocks the merge or unrelated source work:\n\n```bash\nGATE=ai-specs\u002Frecipes\u002Ftrello-mcp-workflow\u002Fhooks\u002Ftracker-card-gate.sh\nif [ -f \"$GATE\" ]; then\n  bash \"$GATE\" --root \u003Cplanning-root> --checkpoint pre-merge \u003Cslug>\nfi\n```\n\n   Merge only after explicit user approval, required checks\u002Freview, and a\n   matching approved source commit (see the open verification gap above), then\n   merge with method + id only:\n\n```bash\nbb pr merge \u003Cpr-id>\n```\n\n**Open verification gap:** squash strategy and source-branch closure are not\nverified PHP `bb pr merge` options. Do not add `--strategy squash` or\n`--close-source-branch`. Protected heads must not be deleted via Bitbucket UI\n\"Close source branch\", worktree cleanup, or remote branch delete.\n\n9. After the PR is merged, sync the integration branch. **Post-merge worktree \u002F\n    local \u002F remote branch cleanup runs only for feature heads.** For a\n    protected head, skip worktree remove, `git push $REMOTE --delete`, and\n    `git branch -D` for that head — only sync the base:\n\n```bash\ngit checkout \u003Cbase_branch>\nREMOTE=$(git remote | grep -E '^(origin|bitbucket|upstream)$' | head -1 || echo \"origin\")\ngit pull --ff-only $REMOTE \u003Cbase_branch>\n```\n\nFor a **feature** head, leave the worktree first (`cd` to the main repo root —\nnever remove while `$PWD` is inside the worktree). Prefer the worktree-flow\ncleanup script:\n\n```bash\ncd \u003Cmain-repo-root>\nbash ai-specs\u002Frecipes\u002Fworktree-flow\u002Foverrides\u002Fbin\u002Fworktree-cleanup.sh \\\n  --dir .worktrees --base \u003Cbase_branch>\n```\n\nManual fallback only if the script is unavailable. After a successful merge,\ndelete the **feature** remote branch using the same dynamic `$REMOTE`\nresolution. Never run remote delete for a protected head (`main`, `master`,\n`development`, `staging`, configured base\u002Fintegration). Require explicit user\ninstruction and stop without deleting if the worktree is dirty:\n\n```bash\nREMOTE=$(git remote | grep -E '^(origin|bitbucket|upstream)$' | head -1 || echo \"origin\")\ngit worktree remove \u003Cabsolute-path-to-worktree>\ngit push \"$REMOTE\" --delete \u003Cbranch-name>\ngit branch -D \u003Cbranch-name>\n```\n\n> **Note**: `git branch -D` (capital D) is required when the merged PR does not\n> leave the feature commits as ancestors of the target (common after a UI\n> squash). `git branch -d` would refuse with \"not fully merged\". Force-delete\n> is safe here because the PR was already merged. Stop without deleting if the\n> worktree is dirty. Remote delete is `git push $REMOTE --delete` for feature\n> heads only.\n\n## Guardrails\n\n- Never merge locally with `git merge` for feature work that should go through PR.\n- Never push, merge, delete branches, or remove worktrees without explicit user instruction.\n- Never remove a worktree before confirming the PR is merged and no uncommitted work remains.\n- Never delete a protected head (`main` \u002F `master` \u002F `development` \u002F `staging` \u002F\n  configured base or integration branch) via Bitbucket close-source UI, worktree\n  cleanup, or remote branch delete.\n- Preserve unrelated changes; stop and ask if cleanup would touch them.\n- Never rely on implicit push behavior from the Bitbucket CLI — always push explicitly before creating the PR.\n- Never use options that merge without explicit user approval.\n- If `bb` is unavailable or unauthenticated, stop with the exact blocker before pushing or creating a PR.\n","# Bitbucket Merge Workflow\n\nUse this skill only when the user explicitly asks to create a PR, merge, finish\na branch, or clean up after merge on Bitbucket.\n\nUse the configured base branch from `[recipes.bitbucket-pr-flow.config]` (`base_branch`).\nThis recipe implements Bitbucket through PHP [`bb-cli`](https:\u002F\u002Fbb-cli.github.io)\n(Homebrew formula `bb-cli`, binary `bb`). Honor any no-push\u002Fno-merge rules\ndeclared for the project. `command -v bb` cannot tell PHP `bb-cli` from a\nleftover TypeScript Bitbucket CLI. Positively confirm PHP `bb-cli` with\n`bb --version` plus the PHP `bb auth show` shape; if the binary is not PHP\n`bb-cli`, stop and install from https:\u002F\u002Fbb-cli.github.io (`brew install bb-cli`).\n\n## Artifact ownership\n\nThis skill owns provider transport, PR review and merge, and worktree\u002Fbranch\ncleanup only. It does not own SDD\u002FOpenSpec planning, spec promotion, archive, or\nthe pre-merge artifact guardian, and it imposes no planning-artifact\nprecondition on the branch.\n\nWhen the `plan-build-flow` recipe is enabled, that recipe owns artifact\nplanning, promotion, and archive, together with its own pre-archive and\npre-merge gates; finish them before requesting this skill's merge. A project\nthat does not enable Plan Build can create and merge a PR with no OpenSpec\nchange tree.\n\n## Preconditions\n\n- User explicitly requested PR\u002Fmerge\u002Fcleanup.\n- Working branch belongs to one focused change.\n- Worktree has no unrelated uncommitted changes.\n- Required verification evidence is complete or the user accepts the gap.\n- `bb` is installed and authenticated.\n\n## Runtime Preflight\n\nBefore any push or PR creation, verify the Bitbucket CLI is available:\n\n```bash\ncommand -v bb\nBB_VERSION=$(bb --version 2>&1)\nprintf '%s\\n' \"$BB_VERSION\"\nif ! printf '%s\\n' \"$BB_VERSION\" | grep -q 'Version:'; then\n  echo \"**Blocker**: \\`bb\\` on PATH is not PHP bb-cli. Install PHP bb-cli from https:\u002F\u002Fbb-cli.github.io (Homebrew: \\`brew install bb-cli\\`; never Homebrew formula\u002Fcask \\`bb\\`) and retry.\"\n  return 1\nfi\n```\n\nIf `bb` is not found, stop and report:\n\n> **Blocker**: `bb` is not installed. Install it from https:\u002F\u002Fbb-cli.github.io\n> (Homebrew: `brew install bb-cli`; never Homebrew formula\u002Fcask `bb`) and retry.\n\nIf `bb --version` does not identify PHP `bb-cli`, stop — that binary is\nnot PHP `bb-cli`.\n\nThen verify authentication with a redacted capture (emit only `Username`;\nnever print `AppPassword`). Parse conservatively and block on a missing,\nempty, or multiple Username line:\n\n```bash\nAUTH_CAPTURE=$(bb auth show 2>&1)\nUSERNAME_LINES=$(printf '%s\\n' \"$AUTH_CAPTURE\" | awk -F': ' '$1 == \"Username\" { print }')\nUSERNAME_COUNT=$(printf '%s\\n' \"$USERNAME_LINES\" | awk 'NF { n++ } END { print n+0 }')\nif [ \"$USERNAME_COUNT\" -ne 1 ]; then\n  echo \"**Blocker**: missing, empty, or multiple Username lines. \\`bb\\` is not authenticated. Run \\`bb auth save\\` and retry.\"\n  return 1\nfi\nUSERNAME=$(printf '%s\\n' \"$USERNAME_LINES\" | awk -F': ' '{ gsub(\u002F^ +| +$\u002F, \"\", $2); print $2 }')\nif [ -z \"$USERNAME\" ]; then\n  echo \"**Blocker**: missing or empty Username. \\`bb\\` is not authenticated. Run \\`bb auth save\\` and retry.\"\n  return 1\nfi\nprintf '%s\\n' \"$USERNAME_LINES\"\n```\n\nObserved PHP output shape (do not print `AppPassword`): `Username: \u003Cvalue>` and\n`AppPassword: \u003Csecret>`. A missing or empty `Username`, or multiple Username\nlines, means credentials are absent or ambiguous. If unauthenticated, stop\nand report:\n\n> **Blocker**: `bb` is not authenticated. Run `bb auth save` and retry.\n\n**Open verification gap:** `bb auth save` prompt text is undocumented — run it\nwith no invented flags. See https:\u002F\u002Fbb-cli.github.io\u002Fauthentication\n\nThen run **Runtime Preflight: Account Match** when `expected_owner` is set in\n`[recipes.bitbucket-pr-flow.config]` (skip when empty — no extra CLI calls):\n\n```bash\n# Runtime Preflight: Account Match (Bitbucket)\n# PHP bb-cli: capture bb auth show (not bb auth status). Username parse is conservative.\nEXPECTED_OWNER=\"{config.expected_owner}\"\nif [ -n \"$EXPECTED_OWNER\" ]; then\n  AUTH_CAPTURE=$(bb auth show 2>&1)\n  USERNAME_LINES=$(printf '%s\\n' \"$AUTH_CAPTURE\" | awk -F': ' '$1 == \"Username\" { print }')\n  USERNAME_COUNT=$(printf '%s\\n' \"$USERNAME_LINES\" | awk 'NF { n++ } END { print n+0 }')\n  if [ \"$USERNAME_COUNT\" -ne 1 ]; then\n    echo \"**Blocker**: missing, empty, or multiple Username lines. Stop rather than guessing.\"\n    echo \"bb has no 'auth switch'. Run: bb auth save\"\n    return 1\n  fi\n  ACTIVE=$(printf '%s\\n' \"$USERNAME_LINES\" | awk -F': ' '{ gsub(\u002F^ +| +$\u002F, \"\", $2); print $2 }')\n  if [ -z \"$ACTIVE\" ] || [ \"$ACTIVE\" != \"$EXPECTED_OWNER\" ]; then\n    echo \"**Blocker**: active bb account is '$ACTIVE'; expected '$EXPECTED_OWNER'.\"\n    echo \"bb has no 'auth switch'. Run: bb auth save\"\n    return 1\n  fi\nfi\n```\n\n## Head branch class\n\nBefore merge and cleanup, resolve `HEAD_BRANCH` = the PR source branch name.\n\n**Protected heads** (exact match): `main`, `master`, `development`, `staging`,\nplus configured `[recipes.bitbucket-pr-flow.config].base_branch` and (when set)\n`[recipes.worktree-flow.config].integration_branch`.\n\n**Feature heads**: everything else — including `release\u002FvX.Y.Z`, `feat\u002F*`, `fix\u002F*`.\n\nPrefer shipping to `main` from a disposable `release\u002FvX.Y.Z` head, not from\n`development` as the PR source. Keep Bitbucket UI \"Close source branch\" off for\nprotected heads; never pass --close-source-branch to `bb` (that flag is not a\nverified PHP option). Feature-head source-branch closure is git\u002FUI policy\n(worktree remove + `git push $REMOTE --delete` + `git branch -D`), not a\nPHP merge-method flag. Never remotely delete a protected head.\n\n## Workflow\n\n1. Inspect current branch, worktree path, and `git status`.\n2. Run or confirm any verification required before merge.\n3. Run **Runtime Preflight** (CLI checks + account match above).\n4. Resolve the Bitbucket remote and push the feature branch explicitly:\n\n```bash\nREMOTE=$(git remote | grep -E '^(origin|bitbucket|upstream)$' | head -1 || echo \"origin\")\ngit push -u $REMOTE \u003Cbranch-name>\n```\n\n> **Note**: The remote is resolved dynamically to support repos where the Bitbucket remote is named `bitbucket` or `upstream` instead of `origin`. Falls back to `origin` if no known name matches.\n\n5. Create a pull request with the configured base branch (positional source then\n   destination; never `-i` as the agent default):\n\n```bash\nbb pr create \u003Cbranch-name> \u003Cbase_branch> --title \"\u003Ctitle>\" --description \"\u003Csummary>\"\n```\n\n6. STOP. Do not merge. Report the PR URL and wait for explicit user approval.\n\n7. `bb pr show \u003Cpr-id>` displays **comments** (optional second argument `true`\n   for unresolved inline comments only). It is not PR JSON and must not be used\n   with `--json` \u002F `--jq`.\n\n   Before merging, the approval-SHA policy still applies: do not merge a branch\n   that moved after approval. **Open verification gap:** there is no verified\n   command in this recipe to retrieve `APPROVED_SHA` \u002F `CURRENT_SHA` from PHP\n   `bb-cli` without a forbidden probe. Stop and ask the user to confirm the\n   reviewed revision in the Bitbucket UI rather than guessing flags or running\n   `bb pr commits` as discovery.\n\n8. Classify `HEAD_BRANCH` (see **Head branch class**). Before the provider merge\n   command, report the Tracker item state with the direct host mode of the tracker\n   gate script. This is Tracker item reporting, not OpenSpec artifact or archive\n   validation; the bridge is the single shell host to the verified Go `--ledger`\n   predicate, and it is safe when dormant or unbound. Tracker checkpoints only\n   exist when the tracker recipe is installed: if the script is absent, skip this\n   step (there is no tracker lifecycle to report). The Tracker host is advisory:\n   it reports a `block` \u002F `ask` \u002F `needs-item` verdict on stderr and exits `0`, so\n   a non-zero Tracker verdict never blocks the merge or unrelated source work:\n\n```bash\nGATE=ai-specs\u002Frecipes\u002Ftrello-mcp-workflow\u002Fhooks\u002Ftracker-card-gate.sh\nif [ -f \"$GATE\" ]; then\n  bash \"$GATE\" --root \u003Cplanning-root> --checkpoint pre-merge \u003Cslug>\nfi\n```\n\n   Merge only after explicit user approval, required checks\u002Freview, and a\n   matching approved source commit (see the open verification gap above), then\n   merge with method + id only:\n\n```bash\nbb pr merge \u003Cpr-id>\n```\n\n**Open verification gap:** squash strategy and source-branch closure are not\nverified PHP `bb pr merge` options. Do not add `--strategy squash` or\n`--close-source-branch`. Protected heads must not be deleted via Bitbucket UI\n\"Close source branch\", worktree cleanup, or remote branch delete.\n\n9. After the PR is merged, sync the integration branch. **Post-merge worktree \u002F\n    local \u002F remote branch cleanup runs only for feature heads.** For a\n    protected head, skip worktree remove, `git push $REMOTE --delete`, and\n    `git branch -D` for that head — only sync the base:\n\n```bash\ngit checkout \u003Cbase_branch>\nREMOTE=$(git remote | grep -E '^(origin|bitbucket|upstream)$' | head -1 || echo \"origin\")\ngit pull --ff-only $REMOTE \u003Cbase_branch>\n```\n\nFor a **feature** head, leave the worktree first (`cd` to the main repo root —\nnever remove while `$PWD` is inside the worktree). Prefer the worktree-flow\ncleanup script:\n\n```bash\ncd \u003Cmain-repo-root>\nbash ai-specs\u002Frecipes\u002Fworktree-flow\u002Foverrides\u002Fbin\u002Fworktree-cleanup.sh \\\n  --dir .worktrees --base \u003Cbase_branch>\n```\n\nManual fallback only if the script is unavailable. After a successful merge,\ndelete the **feature** remote branch using the same dynamic `$REMOTE`\nresolution. Never run remote delete for a protected head (`main`, `master`,\n`development`, `staging`, configured base\u002Fintegration). Require explicit user\ninstruction and stop without deleting if the worktree is dirty:\n\n```bash\nREMOTE=$(git remote | grep -E '^(origin|bitbucket|upstream)$' | head -1 || echo \"origin\")\ngit worktree remove \u003Cabsolute-path-to-worktree>\ngit push \"$REMOTE\" --delete \u003Cbranch-name>\ngit branch -D \u003Cbranch-name>\n```\n\n> **Note**: `git branch -D` (capital D) is required when the merged PR does not\n> leave the feature commits as ancestors of the target (common after a UI\n> squash). `git branch -d` would refuse with \"not fully merged\". Force-delete\n> is safe here because the PR was already merged. Stop without deleting if the\n> worktree is dirty. Remote delete is `git push $REMOTE --delete` for feature\n> heads only.\n\n## Guardrails\n\n- Never merge locally with `git merge` for feature work that should go through PR.\n- Never push, merge, delete branches, or remove worktrees without explicit user instruction.\n- Never remove a worktree before confirming the PR is merged and no uncommitted work remains.\n- Never delete a protected head (`main` \u002F `master` \u002F `development` \u002F `staging` \u002F\n  configured base or integration branch) via Bitbucket close-source UI, worktree\n  cleanup, or remote branch delete.\n- Preserve unrelated changes; stop and ask if cleanup would touch them.\n- Never rely on implicit push behavior from the Bitbucket CLI — always push explicitly before creating the PR.\n- Never use options that merge without explicit user approval.\n- If `bb` is unavailable or unauthenticated, stop with the exact blocker before pushing or creating a PR.\n",{"name":5,"license":14,"metadata":43,"description":55},{"scope":44,"author":46,"version":47,"auto_invoke":48,"generatedBy":54},[45],"root","ai-specs","1.0",[49,50,51,52,53],"Creating a pull request on Bitbucket","Merging a feature branch via Bitbucket PR","Cleaning up a worktree after merge","Finishing work on a feature branch","Syncing development after a merge","manual-runtime","Provider-oriented merge workflow for feature branches created in worktrees. Uses the configured base branch from [recipes.bitbucket-pr-flow.config] (base_branch). Bitbucket via PHP bb-cli.\n","main","c092fc1f51280350a4434827e2f6d6d99e3431ca","catalog\u002Frecipes\u002Fbitbucket-pr-flow\u002Fskills\u002Fbitbucket-merge-workflow",2,"https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli","https:\u002F\u002Fgithub.com\u002Fparada1104","2026-11-15 03:00:26",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add parada1104\u002Fai-specs-cli --skill bitbucket-merge-workflow",{"tool":69,"command":70},"bunx","bunx skills add parada1104\u002Fai-specs-cli --skill bitbucket-merge-workflow",{"tool":72,"command":73},"pnpm","pnpm dlx skills add parada1104\u002Fai-specs-cli --skill bitbucket-merge-workflow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Fcatalog\u002Frecipes\u002Fbitbucket-pr-flow\u002Fskills\u002Fbitbucket-merge-workflow\u002FSKILL.md",true,[],[78,90,101,109,118,128],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":38},"01M71F2TF9TS9DNCJ68M7C3B5S","test-skill","Test skill for fixture purposes.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Frecipes\u002Ftest-fixture\u002Fskills\u002Ftest-skill\u002FSKILL.md",[],[85,86,32,45,87,88,89],"Test Skill","test","fixtures","fixture","testing",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":38},"01M71F2RTH94ZB7XEAW4P6ZG0D","obsidian-markdown","Fixture skill for obsidian-markdown.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fkepano-obsidian-skills\u002Fskills\u002Fobsidian-markdown\u002FSKILL.md",[],[97,98,99,32,88,100],"markdown","obsidian markdown","obsidian","fixture skill",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":38},"01M71F2R20CPTJXD9F7DP4JPP6","obsidian-cli","Fixture skill for obsidian-cli.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fkepano-obsidian-skills\u002Fskills\u002Fobsidian-cli\u002FSKILL.md",[],[108,99,23,32,88,100],"obsidian cli",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":38},"01M71F2PCH4NWVTT1J57SHJX33","obsidian-bases","Fixture skill for obsidian-bases.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fkepano-obsidian-skills\u002Fskills\u002Fobsidian-bases\u002FSKILL.md",[],[116,117,99,32,88,100],"bases","obsidian bases",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":38},"01M71F2MSS6EVFEYVYAA1KBYCC","json-canvas","Fixture skill for json-canvas.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fkepano-obsidian-skills\u002Fskills\u002Fjson-canvas\u002FSKILL.md",[],[125,126,127,100,88,32],"json","json canvas","canvas",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":38},"01M71F2KY5QVNEN1Q3REFB0MQZ","defuddle","Fixture skill for defuddle.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fkepano-obsidian-skills\u002Fskills\u002Fdefuddle\u002FSKILL.md",[],[130,100,88,32]]