Stack create

From athola/claude-night-market · View interactive version

Stack create is an AI agent skill from the GitHub repository athola/claude-night-market. 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.

How to use this skill

Skill file

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

Prerequisites

attune:blueprint)

Required Progress Tracking

Create progress items before starting:

  1. stack-create:git-version-checked
  2. stack-create:slices-identified
  3. stack-create:branches-created
  4. 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:

Example slices for a plan with three parts:

Slice 1: add-schema     -- database schema changes
Slice 2: add-api        -- API layer (depends on schema)
Slice 3: add-ui         -- frontend (depends on API)

Record the slice list before creating branches.

Step 3: Create Branches (`branches-created`)

Starting from the base branch (usually master or main):

BASE=master
STACK=stack/my-feature

# Slice 1 branches from master
git checkout -b ${STACK}/add-schema ${BASE}

# Slice 2 branches from slice 1
git checkout -b ${STACK}/add-api ${STACK}/add-schema

# Slice 3 branches from slice 2
git checkout -b ${STACK}/add-ui ${STACK}/add-api

Convention: stack/<feature-name>/<slice-name>

Return to the first slice branch to begin work:

git checkout ${STACK}/add-schema

jj Accelerator (if available)

# jj creates an empty commit on each branch automatically
# Use jj new to move to a new change
jj new -m "stack: add-schema" --no-edit

Step 4: Verify Stack (`stack-verified`)

Confirm the branch topology is correct:

git log --oneline --graph \
  ${BASE}..${STACK}/add-ui

Each slice branch should appear as a linear chain above

the base.

If jj is available:

jj log --revisions \
  "ancestors(${STACK}/add-ui, 10) & !ancestors(${BASE})"

Notes

each slice (empty branches produce confusing PRs)

by convention; keep it short and descriptive

open PRs, or work slice-by-slice and push when ready

re-verify the topology in Step 4

Exit Criteria

through stack-create:stack-verified) are created before branch

creation starts and marked complete in order

branch tracking is documented and the user is warned

stack/<feature-name>/<slice-name>

with each slice branch appearing in dependency order

is verified

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.