buck2-stack-maintainer

Rebase fork/stack onto origin/main and publish merge commits to fork/main.

6|Updated Jul 9, 2019
One-click install
npx skills add https://github.com/sluongng/dotfiles --skill buck2-stack-maintainer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: buck2-stack-maintainer
Source: https://github.com/sluongng/dotfiles/tree/main/config/claude/plugins/buck2/skills/buck2-stack-maintainer
Command: npx skills add https://github.com/sluongng/dotfiles --skill buck2-stack-maintainer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Keeps Buck2 fork/stack in sync with upstream main by rebasing and merging changes, enabling automated validation through BuildBuddy workflows.

Core Features & Use Cases

  • Rebase and merge: maintain a deterministic patch stack by rebasing fork/stack onto origin/main and publishing bazel-rbe-style merge commits to fork/main.
  • BuildBuddy integration: trigger or poll BuildBuddy Workflows for each stack prefix to verify changes and quickly fix failed commits.
  • Invariant-driven workflow: preserve upstream history as first parent and ensure the final stack merge is testable and auditable.

Quick Start

Run the tool in dry-run mode to preview the plan and then run with apply to publish the stack prefixes.

Frequently Asked Questions about buck2-stack-maintainer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically rebase a Buck2 fork onto upstream main?

To automatically rebase a Buck2 fork, this tool rebases your fork/stack onto origin/main and publishes bazel-rbe-style merge commits to fork/main. It ensures upstream history is preserved as the first parent while keeping your local patch stack synchronized.

Can I trigger BuildBuddy workflows for each Buck2 stack prefix?

Yes, you can trigger BuildBuddy workflows for each Buck2 stack prefix. The automation triggers or polls BuildBuddy Workflows to verify changes, allowing you to quickly identify and fix failed commits during the stack maintenance process.

What's the best way to maintain a deterministic Buck2 patch stack?

The best way to maintain a deterministic Buck2 patch stack is using an invariant-driven workflow. This approach rebases fork/stack onto origin/main and publishes merge commits to fork/main, ensuring the final stack merge remains testable and auditable.

Do I need a local Buck2 repository to sync forks with BuildBuddy?

Yes, you need a local Buck2 repository with valid Git remotes and access to BuildBuddy. The workflow relies on concrete invariants, specifically origin/main as upstream, fork/stack as the stack, and fork/main as the merge-commit branch.

How does the dry-run mode work for Buck2 stack maintenance?

Dry-run mode previews the maintenance plan without applying changes. You run the tool in dry-run mode to review how the Buck2 stack prefixes will be rebased and merged, then execute with apply to publish the stack prefixes.

Why preserve upstream history as the first parent during a Buck2 rebase?

Preserving upstream history as the first parent during a Buck2 rebase ensures the final stack merge is testable and auditable. This invariant-driven workflow publishes bazel-rbe-style merge commits to fork/main while keeping origin/main history intact.