원클릭으로
backport
Backport a merged PR to a release branch, resolving conflicts if needed
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Backport a merged PR to a release branch, resolving conflicts if needed
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Spot-check the health of a live Aztec network deployment by sweeping recent GCP logs for warn/error messages, mapping each to the deployed code, classifying expected vs unexpected, and verifying the hard invariants (no slashing, no attestation timeouts, no unexplained prunes/conflicts). Use when asked to "spot-check", "review logs", or "health check" a network (staging, testnet, devnet, ...) over a recent window.
Reference for merge-train automation internals -- workflows, scripts, CI integration, and configuration. Use when modifying or debugging merge-train infrastructure.
Build and update the developer documentation site for a new release
Guide for working with merge-train branches -- creating PRs, choosing the right base branch, understanding labels, handling failures, and bypassing checks.
Create a well-formed Linear issue — with complete context for a fresh agent, a point estimate (1/2/3/5), and acceptance criteria. Works standalone or as part of planning a project with multiple issues. Use when asked to file/create/open a Linear issue, "make a ticket", or when breaking a plan into tracked work.
Build or adjust a Linear cycle — for a whole team or just yourself. Size capacity from last-3-cycle velocity, fill with backlog bugs/high-priority items first and project work after (in your chosen project focus order), with no unassigned issues. Use when planning/prepping a cycle for a team, or when one member wants to fill/rebalance their own cycle work.
SOC 직업 분류 기준
| name | backport |
| description | Backport a merged PR to a release branch, resolving conflicts if needed |
| argument-hint | <PR number> <target branch> |
Backport a merged PR to a release branch staging area. Uses the existing
scripts/backport_to_staging.sh for the happy path, then resolves conflicts
manually if the diff does not apply cleanly.
/backport 12345 v4 # release branch
/backport 12345 v4-devnet-2 # devnet branch
Confirm exactly two arguments are provided: a PR number and a target branch.
Supported target branches:
v2, v3, v4v4-devnet-1, v4-devnet-2, etc.Abort if:
gh pr view <PR> --repo AztecProtocol/aztec-packages --json state,title
Abort if:
state is not MERGED -> "PR # is , only merged PRs can be backported."Check whether this PR has already been backported to the staging branch by looking for its PR number in the commit log:
STAGING_BRANCH="backport-to-${TARGET_BRANCH}-staging"
git fetch origin "$STAGING_BRANCH" 2>/dev/null
if git log "origin/$STAGING_BRANCH" --oneline --grep="(#<PR_NUMBER>)" | grep -q .; then
echo "PR #<PR_NUMBER> has already been backported to $STAGING_BRANCH."
fi
Abort if the PR number appears in the staging branch commit log. Show the matching commit(s) and tell the user the backport already exists.
Create a temporary worktree so the backport does not disturb the user's current branch or working tree. Save the original directory to return to later.
ORIGINAL_DIR=$(pwd)
REPO_ROOT=$(git rev-parse --show-toplevel)
WORKTREE_DIR=$(mktemp -d)
git worktree add "$WORKTREE_DIR" HEAD
cd "$WORKTREE_DIR"
All subsequent steps run inside the worktree. On completion or failure, always clean up (see Step 10).
Run the backport script from the worktree:
./scripts/backport_to_staging.sh <PR_NUMBER> <TARGET_BRANCH>
If the script succeeds: Skip to Step 10 (cleanup and report).
If the script fails: Continue to Step 6 (conflict resolution).
The script will have left the worktree on the backport-to-<TARGET_BRANCH>-staging
branch with partially applied changes and .rej files for hunks that failed.
Verify current branch is backport-to-<TARGET_BRANCH>-staging
Identify the state of the working tree:
git status
Find all reject files:
find . -name '*.rej' -not -path './node_modules/*' -not -path './.git/*'
Get the full PR diff for reference:
gh pr diff <PR_NUMBER>
For each .rej file:
.rej file after resolvingAlso check for files that may need to be created or deleted based on the PR diff but were not handled by the partial apply.
Important considerations:
next. Do not assume
the surrounding code is the same as in the original PR.Check if changes exist in yarn-project:
git diff --name-only | grep '^yarn-project/' || true
If yarn-project changes exist, run from yarn-project:
yarn build
Check if changes exist outside yarn-project:
git diff --name-only | grep -v '^yarn-project/' || true
If changes exist outside yarn-project, run bootstrap from the repo root:
./bootstrap.sh build yarn-project
Fix any build errors that arise from the backport adaptation.
Clean up and let the script handle commit, push, and PR management:
find . -name '*.rej' -delete
git add -A
./scripts/backport_to_staging.sh --continue <PR_NUMBER> <TARGET_BRANCH>
Return to the original directory and remove the temporary worktree:
cd "$ORIGINAL_DIR"
git worktree remove "$WORKTREE_DIR"
Always clean up the worktree, even if earlier steps failed. If git worktree remove fails (e.g., uncommitted changes), use git worktree remove --force.
Print a summary:
--continue after resolving: The script's --continue mode picks up where
the initial run left off (commit, push, PR creation, body update).--author to set the original PR
author on the commit. The committer stays as whoever runs the command (GPG signing
works).yarn build or bootstrap to confirm the
backport compiles. Do not run the full test suite -- that is CI's job..rej files: Always delete .rej files before committing.backport-to-{TARGET_BRANCH}-staging (e.g., backport-to-v4-staging,
backport-to-v4-devnet-2-staging). Multiple backports accumulate on the same
staging branch and get merged together.