| name | worktree-task |
| description | Create a git worktree for a new TASK. Use when starting a new feature, fix, or refactor task that requires isolated development. |
| user-invocable | true |
| allowed-tools | Bash(git *) |
Worktree Task Creation
TASK ๋จ์๋ก git worktree๋ฅผ ์์ฑํ์ฌ ๊ฒฉ๋ฆฌ๋ ๊ฐ๋ฐ ํ๊ฒฝ์ ๊ตฌ์ฑํฉ๋๋ค.
Context
- Current worktrees: !
git worktree list
- Current branch: !
git branch --show-current
- Repository root: !
git rev-parse --show-toplevel
Your Task
์ฌ์ฉ์๊ฐ ์ ๊ณตํ TASK ์ ๋ณด๋ฅผ ๋ฐํ์ผ๋ก worktree๋ฅผ ์์ฑํฉ๋๋ค.
์
๋ ฅ ํ์ฑ
์ฌ์ฉ์ ์
๋ ฅ์์ ๋ค์์ ์ถ์ถ:
- task-name: ์งง์ ์๋ณ์ (์: task-a, fix-memory, refactor-ui)
- task-type: feature, fix, refactor, chore ์ค ํ๋
- description: ๋ธ๋์น ์ด๋ฆ์ ํฌํจํ ์ค๋ช
(์ ํ์ )
๋ช
๋ช
๊ท์น
Worktree ๊ฒฝ๋ก: /Users/hansuk.hong/P/kattle-<task-name>
๋ธ๋์น ์ด๋ฆ: <task-type>/<task-name>-<description>
์คํ ๋จ๊ณ
- Worktree ๋ชฉ๋ก ํ์ธ - ์ค๋ณต ๋ฐฉ์ง
- Worktree ์์ฑ - ์ ๋ธ๋์น์ ํจ๊ป
- ๊ฒฐ๊ณผ ๋ณด๊ณ - ์์ฑ๋ ๊ฒฝ๋ก ๋ฐ ๋ธ๋์น
๋ช
๋ น์ด ํ
ํ๋ฆฟ
git worktree list | grep -q "kattle-<task-name>" && echo "Already exists" && exit 1
git worktree add \
/Users/hansuk.hong/P/kattle-<task-name> \
-b <task-type>/<task-name>-<description>
git worktree list
Examples
Feature ์์
์
๋ ฅ: /worktree-task feature task-d add-column-selector
๊ฒฐ๊ณผ:
- ๊ฒฝ๋ก: /Users/hansuk.hong/P/kattle-task-d
- ๋ธ๋์น: feature/task-d-add-column-selector
Bug Fix
์
๋ ฅ: /worktree-task fix issue-456 null-pointer-in-watch
๊ฒฐ๊ณผ:
- ๊ฒฝ๋ก: /Users/hansuk.hong/P/kattle-fix-issue-456
- ๋ธ๋์น: fix/issue-456-null-pointer-in-watch
Refactor
์
๋ ฅ: /worktree-task refactor cleanup remove-dead-code
๊ฒฐ๊ณผ:
- ๊ฒฝ๋ก: /Users/hansuk.hong/P/kattle-cleanup
- ๋ธ๋์น: refactor/cleanup-remove-dead-code
Output Format
Worktree created:
Path: /Users/hansuk.hong/P/kattle-<task-name>
Branch: <task-type>/<task-name>-<description>
To work in this worktree:
- Open in IDE: code /Users/hansuk.hong/P/kattle-<task-name>
- Run commands: git -C /Users/hansuk.hong/P/kattle-<task-name> status