Skip to content

feat(skills): add backport bundled skill#169

Merged
emal-avala merged 1 commit intomainfrom
feat/skill-backport
Apr 23, 2026
Merged

feat(skills): add backport bundled skill#169
emal-avala merged 1 commit intomainfrom
feat/skill-backport

Conversation

@emal-avala
Copy link
Copy Markdown
Member

Summary

Adds `/backport` — cherry-picks a commit or PR onto one or more release branches. One isolated worktree per branch, per-target verification, conflicts that need judgment stop rather than guess.

Guardrails in the prompt:

  • one worktree per target branch — doesn't mutate the current tree
  • mechanical conflict resolution only (trivial renames, import reorders); anything requiring judgment stops on that branch and surfaces the conflict
  • run the target branch's test + lint gate (fix may depend on newer-branch code)
  • push to `backport/-onto-` and open a linked PR
  • summary table: `target | backport PR or failure | clean or had-conflicts`
  • never force-push, never squash without reviewer sign-off, never mark complete if tests failed

Why

Backports across `release/1.14`, `release/1.15`, `release/1.16` are a common post-fix chore. Without a skill, the agent tends to either try everything in the current working tree (contaminating it) or silently skip failing targets. The `batch` skill covers the parallel-worktree workflow for arbitrary changes; `backport` specializes it for `git cherry-pick` with PR creation baked in.

Complements `/batch` (PR #162) for the cherry-pick-and-open-PR flow specifically.

Test plan

  • `cargo fmt --all` clean
  • `cargo check` passes
  • `cargo test -p agent-code-lib --lib skills` (11 tests pass)
  • Manual: `/backport PR 123 to release/1.14 and release/1.15` → two worktrees, two backport branches, two PRs linked to chore: release v0.15.2 #123

Cherry-picks a commit or PR onto one or more release branches, each
in its own worktree. Guardrails baked into the prompt:

- one worktree per target branch (don't contaminate the current tree)
- mechanical conflict resolution only (trivial renames, import
  reorders); anything needing judgment STOPS on that branch
- run the target branch's test + lint gate — the fix may depend on
  newer-branch code that doesn't exist on the older branch
- push to backport/<source>-onto-<target> branch and open a PR
  linking the original
- summary table at the end: target | backport PR or failure | clean
  or had-conflicts
- never force-push, never squash without reviewer sign-off, never
  mark complete if tests failed
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@emal-avala emal-avala merged commit e40e99b into main Apr 23, 2026
13 of 14 checks passed
@emal-avala emal-avala deleted the feat/skill-backport branch April 23, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant