ワンクリックで
aidlc-using-git-worktrees
Use when an isolated workspace is needed for feature development, creating a git worktree with a new branch.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when an isolated workspace is needed for feature development, creating a git worktree with a new branch.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
아이디어를 설계로 전환하거나, 새로운 기능을 만들거나, 구현 전 구조화된 설계가 필요한 창의적/탐색적 작업에 사용. Use when turning an idea into a design, creating a new feature, or when any creative/exploratory work needs structured design before implementation.
태스크나 unit 구현이 완료되어 머지 전 코드 리뷰가 필요할 때, 또는 사용자가 명시적으로 코드 리뷰를 요청할 때 사용. Use when a task or unit implementation is complete and needs code review before merging, or when the user explicitly requests a code review on their changes.
설계 문서를 상세 구현 계획으로 변환하거나, "구현 계획 작성", "plan 만들어줘" 요청 시 사용. INCEPTION 워크플로우 계획은 aidlc-workflow-planning 사용. Use when a design document needs to be converted into a detailed implementation plan with task breakdown, or when "구현 계획 작성", "plan 만들어줘" is requested. Not for INCEPTION workflow planning — use aidlc-workflow-planning instead.
Use when user explicitly requests "auto 모드", "자동 모드", "auto mode", or "알아서 만들어줘". 초보자를 위한 완전 자동 devflow. greenfield 전용. 요구사항 입력 → inception → construction → build-test를 자동 진행하며 각 flow 종료 시 멀티에이전트 리뷰 필수.
현재 세션에서 구현 계획을 실행할 때 사용. 독립 태스크별 신규 서브에이전트 컨텍스트 활용. Use when executing an implementation plan in the current session with independent tasks that benefit from fresh subagent context per task.
프로덕션 코드 작성, 버그 수정, 리팩토링 시 사용 — 예외 없이 RED-GREEN-REFACTOR 사이클을 강제. Use when writing any production code, fixing bugs, or refactoring — enforces RED-GREEN-REFACTOR cycle with no exceptions.
| name | aidlc-using-git-worktrees |
| description | Use when an isolated workspace is needed for feature development, creating a git worktree with a new branch. |
| metadata | {"version":"0.1.0","author":"Jay","category":"ai-dlc-workflow","invoke_mode":"orchestrator-only","return_behavior":"stop-no-gate","skill_nature":null,"lifecycle":"active"} |
Construction 시작 전 격리된 git worktree를 생성하여 main 브랜치를 보호한다.
호출 주체: inception-orchestrator (workflow-planning 게이트에서 "Git worktree로 격리 개발" 선택 시)
git rev-parse --is-inside-work-tree 2>/dev/null
git repo가 없는 경우 (Greenfield 신규 프로젝트):
⚠️ Git 저장소가 초기화되지 않았습니다.
워크트리를 생성하려면 git init이 필요합니다.
A) git init 후 워크트리 생성 진행
B) 워크트리 없이 현재 디렉토리에서 진행 (오케스트레이터에 반환)
git init && git add -A && git commit -m "chore: initial commit" 실행 후 Step 2 진행git repo가 있는 경우: Step 2로 진행
오케스트레이터에서 "Branch: feature/[이름]" 신호를 받은 경우: 해당 이름을 그대로 사용한다.
신호가 없는 경우 (직접 호출 등): devflow-docs/inception/requirements.md의 ## User Intent 섹션을 읽어 feature 이름을 추출한다.
변환 규칙:
feature/ 추가예시:
feature/todo-apifeature/user-authfeature/notification-servicerequirements.md가 없으면: feature/devflow-construction
ls -d .worktrees 2>/dev/null || ls -d worktrees 2>/dev/null
| 상태 | 처리 |
|---|---|
.worktrees/ 존재 | 해당 디렉토리 사용 |
worktrees/ 존재 | 해당 디렉토리 사용 |
| 둘 다 없음 | .worktrees/ 신규 생성 |
git check-ignore -q .worktrees 2>/dev/null
무시되지 않는 경우: .gitignore에 추가 후 커밋
echo ".worktrees/" >> .gitignore
git add .gitignore
git commit -m "chore: .worktrees/ .gitignore에 추가"
BRANCH=[Step 2에서 도출한 브랜치 이름]
PATH=".worktrees/$(echo $BRANCH | sed 's/feature\///')"
git worktree add "$PATH" -b "$BRANCH"
워크트리 디렉토리에서 프로젝트 파일을 감지하여 설치 실행:
# Node.js
[ -f package.json ] && npm install
# Python (uv 우선)
[ -f pyproject.toml ] && (command -v uv && uv sync || poetry install)
[ -f requirements.txt ] && pip install -r requirements.txt
# Go
[ -f go.mod ] && go mod download
# Rust
[ -f Cargo.toml ] && cargo build 2>/dev/null
해당 파일이 없으면 스킵.
Greenfield (기존 테스트 없음): 스킵 — "테스트 없음 (신규 프로젝트)" 기록
Brownfield: 프로젝트 파일 기반으로 테스트 명령 자동 감지 후 실행:
[ -f package.json ] && npm test -- --passWithNoTests 2>&1 | tail -5
[ -f pyproject.toml ] && uv run pytest --tb=no -q 2>&1 | tail -3
[ -f go.mod ] && go test ./... 2>&1 | tail -3
[ -f Cargo.toml ] && cargo test 2>&1 | tail -3
결과:
워크트리 생성 완료 후 devflow-docs/devflow-state.md의 ## Worktree 필드를 업데이트한다:
branch: [branch-name]path: [.worktrees/xxx]스킵된 경우(git 미사용): branch: none, path: none으로 기록.
conventions 표준 형식. 반환 필드:
git branch --list [branch-name]
-[n] 숫자 접미사 추가 (feature/todo-api-2)git worktree add 실패 시 에러 메시지를 표시하고 STOP. Return 결과에 ⚠️ 워크트리 생성 실패: [에러 메시지] 기록.
오케스트레이터가 사용자에게 물음:
Step 6 전체 스킵. 노트: "의존성 파일 없음 — code-generation 완료 후 설치 가능"
Return 결과에 ⚠️ N failures 기록 후 STOP.
오케스트레이터가 사용자에게 물음: