Skip to main content

df-stack-extend

Use when Delong invokes /df-stack-extend to start new work stacked on top of an existing Graphite stack — opens a new worktree with a Graphite-tracked branch on the stack's top branch, so review fixes can continue in the stack's own worktree.

소스 정보

저장소
delfu/dotfiles
최근 소스 활동
2026년 10월 12일 17:10
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
df-stack-extend
description
Use when Delong invokes /df-stack-extend to start new work stacked on top of an existing Graphite stack — opens a new worktree with a Graphite-tracked branch on the stack's top branch, so review fixes can continue in the stack's own worktree.
user-invocable
true
argument-hint
<what to build> [--on <branch>]
# Next work session on a stack (Delong) Start the next idea in a **new worktree**, on a branch Graphite tracks as a child of the stack's top branch. The stack's own worktree stays untouched, so another agent can keep fixing review comments there in parallel. Graphite never rewrites a branch checked out in another worktree. While this session works, restacks in the stack's worktree skip this branch. `/df-stack-submit` runs `/df-stack-sync` here first, which restacks it onto whatever the stack below has become. Unfinished work isn't published by accident either: review fixes are pushed with `gt submit --stack --update-only`, which skips branches without a PR. ## Workflow ### 1. Find the parent branch - If `--on <branch>` was given, use it. - Otherwise, if the current branch is tracked by Graphite, use the top of its stack. Run `gt log short --no-interactive` and take the topmost descendant of the current branch. If the current branch has several children, ask which one. - Otherwise, list Delong's open stacks (`gh pr list --author @me --state open --json headRefName,baseRefName,title`) and ask. Check that the parent is safe to build on: ```bash git fetch origin "$PARENT" git rev-parse "$PARENT" "origin/$PARENT" ``` If local and remote differ, someone has unpushed or unpulled changes. Show both SHAs and ask. Don't move the local ref: it may be checked out in another worktree. ### 2. Create the worktree ```bash MAIN_ROOT=$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)") WT="$MAIN_ROOT/.claude/worktrees/<slug>" git -C "$MAIN_ROOT" worktree add "$WT" -b "delong/<slug>" "$PARENT" ``` Call **EnterWorktree** with `path: "$WT"`, then track the branch on its parent: ```bash gt track --parent "$PARENT" --no-interactive ``` Run `./.worktreesetup` in the background. ### 3. Plan and build Same as `/df-new` steps 2–4: plan with `ce-plan` when the work is non-trivial, then build with agents. Use plain commits on `delong/<slug>`, stage by explicit path, and don't push. Finish by pointing at `/df-stack-submit`, which will extend the stack. ## Common Pitfalls - Never edit the parent stack's branches from this worktree. Review fixes for lower PRs belong in the stack's own worktree. - If a lower PR changes or merges while you work, that's fine. `/df-stack-submit` syncs this branch onto the new stack first. - Two `/df-stack-extend` sessions on the same parent create sibling branches, not a chain. Graphite allows that, but ask Delong if it looks unintended.
GitHub에서 보기