| name | stack-create |
| description | Initializes a stacked branch set from an ordered plan, one branch per slice with parent-child links. Use when a plan has 2+ sequentially dependent changes. |
| alwaysApply | false |
| category | workflow-automation |
| tags | ["git","stacked-diffs","pr","branches","planning"] |
| tools | [] |
| complexity | medium |
| model_hint | standard |
| estimated_tokens | 800 |
| dependencies | ["sanctum:git-workspace-review","sanctum:do-issue"] |
Stack Create
Initialize a stacked branch set from a multi-step plan.
Each logical slice of the plan becomes one branch targeting
the previous slice's branch as its base.
When To Use
Use stack-create when a plan produces 2 or more ordered
changes where each change depends on the previous one
completing (and merging) before it can land.
For independent changes, use parallel worktrees instead
(see egregore).
When NOT To Use
- A single independent change, which should branch normally instead
- The stack exists and needs publishing (use
sanctum:stack-push)
Prerequisites
- Git 2.38+ (
git version | awk '{print $3}' to check)
gh CLI authenticated
- A written plan with ordered slices (from
do-issue or
attune:blueprint)
- Clean working tree on the base branch (
git status)
Required Progress Tracking
Create TodoWrite items before starting:
stack-create:git-version-checked
stack-create:slices-identified
stack-create:branches-created
stack-create:stack-verified
Step 1: Verify Git Version (git-version-checked)
git version
Confirm the output is 2.38.0 or higher.
If not, the --update-refs flag is unavailable.
Warn the user and fall back to manual branch tracking.
Check for optional jj accelerator:
if command -v jj &>/dev/null && jj root &>/dev/null 2>&1; then
echo "jj available"
else
echo "using git --update-refs"
fi
Step 2: Identify Slices (slices-identified)
Read the plan and extract ordered slices.
Each slice must satisfy:
- A single logical concern (one PR worth of change)
- A clear dependency on the slice before it (if any)