oh-my-customcode 0.44.5 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: ambiguity-gate
3
+ description: Pre-routing ambiguity analysis — scores request clarity and asks clarifying questions when needed (inspired by ouroboros)
4
+ scope: core
5
+ user-invocable: true
6
+ argument-hint: "[request to analyze for ambiguity]"
7
+ ---
8
+
9
+ # Ambiguity Gate
10
+
11
+ ## Purpose
12
+
13
+ Analyze a user request for ambiguity before routing to implementation. Inspired by the [ouroboros](https://github.com/Q00/ouroboros) Socratic interviewer pattern, this skill measures request clarity on a 0.0–1.0 scale and asks targeted clarifying questions when needed.
14
+
15
+ ## Ambiguity Scoring
16
+
17
+ | Score Range | Verdict | Action |
18
+ |-------------|---------|--------|
19
+ | ≤ 0.2 | Clear | Proceed with implementation |
20
+ | 0.2–0.5 | Moderate | Suggest clarifications but allow proceeding |
21
+ | > 0.5 | High | Require clarification before proceeding |
22
+
23
+ ## Scoring Factors
24
+
25
+ | Factor | Weight | Description |
26
+ |--------|--------|-------------|
27
+ | Scope clarity | 30% | Is the scope of work well-defined? |
28
+ | Technical specificity | 25% | Are technical requirements clear? |
29
+ | Acceptance criteria | 20% | Can we determine when the task is done? |
30
+ | Constraint clarity | 15% | Are constraints and limitations specified? |
31
+ | Context sufficiency | 10% | Is there enough context to proceed? |
32
+
33
+ **Composite score** = weighted sum of individual factor scores (each 0.0–1.0, inverted: 0.0 = clear, 1.0 = ambiguous).
34
+
35
+ ## Output Format
36
+
37
+ ```
38
+ [Ambiguity Analysis]
39
+ ├── Score: {0.0-1.0}
40
+ ├── Verdict: {Clear | Moderate | High}
41
+ ├── Breakdown:
42
+ │ ├── Scope: {score} — {reason}
43
+ │ ├── Technical: {score} — {reason}
44
+ │ ├── Acceptance: {score} — {reason}
45
+ │ ├── Constraints: {score} — {reason}
46
+ │ └── Context: {score} — {reason}
47
+ └── Suggestions: {clarifying questions if score > 0.2}
48
+ ```
49
+
50
+ ## Workflow
51
+
52
+ 1. Receive the request to analyze (from `$ARGUMENTS` or conversation context)
53
+ 2. Score each factor independently
54
+ 3. Compute weighted composite score
55
+ 4. Determine verdict based on threshold
56
+ 5. If score > 0.2: generate targeted clarifying questions (max 3, prioritized by highest-weight ambiguous factors)
57
+ 6. If score > 0.5: do NOT proceed to implementation; present analysis and wait for clarification
58
+ 7. If score ≤ 0.2: output analysis and proceed
59
+
60
+ ## Clarifying Question Guidelines
61
+
62
+ - Ask **one question per ambiguous factor** (max 3 total)
63
+ - Order by factor weight (scope → technical → acceptance criteria)
64
+ - Make questions specific and answerable
65
+ - Avoid yes/no questions; prefer open-ended with examples
66
+
67
+ **Example questions:**
68
+ - Scope: "Should this change affect all environments or only development?"
69
+ - Technical: "What language/framework should this be implemented in?"
70
+ - Acceptance: "What would a passing test look like for this feature?"
71
+ - Constraints: "Are there performance or memory constraints to consider?"
72
+ - Context: "Is this a new feature or modifying existing behavior?"
73
+
74
+ ## Integration
75
+
76
+ This skill can be:
77
+ - **Invoked manually**: `/ambiguity-gate [request]` — analyze a specific request
78
+ - **Integrated into routing skills**: Insert as a pre-check step before agent delegation when request complexity warrants it
79
+
80
+ Routing skill integration example:
81
+ ```
82
+ 1. Run ambiguity-gate on user request
83
+ 2. If score > 0.5: surface questions, wait for response, re-run gate
84
+ 3. If score ≤ 0.5: proceed with normal routing
85
+ ```
86
+
87
+ ## When NOT to Use
88
+
89
+ Skip this skill for:
90
+ - Simple, one-line questions ("What does X do?")
91
+ - One-line fixes with clear scope ("Fix the typo in line 42")
92
+ - Well-defined bug reports with reproduction steps and expected behavior
93
+ - Requests with explicit acceptance criteria already stated
94
+ - Follow-up requests that clarify a previous ambiguous request
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: omcustom-feedback
3
+ description: Submit feedback about oh-my-customcode as a GitHub issue
4
+ scope: harness
5
+ user-invocable: true
6
+ disable-model-invocation: true
7
+ argument-hint: "[description or leave empty for interactive]"
8
+ ---
9
+
10
+ # Feedback Submitter
11
+
12
+ Submit feedback about oh-my-customcode (bugs, features, improvements, questions) directly as a GitHub issue from the CLI session.
13
+
14
+ ## Purpose
15
+
16
+ Lowers the barrier for submitting feedback by allowing users to create GitHub issues without leaving their terminal session. All feedback is filed to the `baekenough/oh-my-customcode` repository.
17
+
18
+ ## Usage
19
+
20
+ ```
21
+ # Inline feedback
22
+ /omcustom:feedback HUD display is missing during parallel agent spawn
23
+
24
+ # Interactive (no arguments)
25
+ /omcustom:feedback
26
+ ```
27
+
28
+ ## Workflow
29
+
30
+ ### Phase 1: Input Parsing
31
+
32
+ If arguments are provided:
33
+ 1. Analyze the content to auto-detect category (`bug`, `feature`, `improvement`, `question`)
34
+ 2. Use the content as the issue title (truncate to 80 chars if needed)
35
+ 3. Use the full content as the description body
36
+
37
+ If no arguments:
38
+ 1. Ask the user for category using AskUserQuestion: `[bug / feature / improvement / question]`
39
+ 2. Ask for title and optional detailed description (combine into a single prompt when possible)
40
+
41
+ ### Phase 2: Preflight Check
42
+
43
+ ```bash
44
+ # Verify gh CLI is installed
45
+ command -v gh >/dev/null 2>&1 || { echo "Error: gh CLI not installed. Install from https://cli.github.com/"; exit 1; }
46
+
47
+ # Verify authentication
48
+ gh auth status 2>&1 | grep -q "Logged in" || { echo "Error: Not authenticated. Run 'gh auth login' first."; exit 1; }
49
+ ```
50
+
51
+ ### Phase 3: Environment Collection
52
+
53
+ Collect environment info via Bash:
54
+
55
+ ```bash
56
+ # omcustom version
57
+ OMCUSTOM_VERSION=$(node -e "console.log(require('./package.json').version)" 2>/dev/null || echo "unknown")
58
+
59
+ # Claude Code version
60
+ CLAUDE_VERSION=$(claude --version 2>/dev/null || echo "unknown")
61
+
62
+ # OS
63
+ OS_INFO=$(uname -s 2>/dev/null || echo "unknown")
64
+
65
+ # Project name
66
+ PROJECT_NAME=$(basename "$(pwd)")
67
+ ```
68
+
69
+ ### Phase 4: Confirmation and Create
70
+
71
+ 1. Show the user a preview of the issue to be created:
72
+ ```
73
+ [Preview]
74
+ ├── Title: {title}
75
+ ├── Category: {category}
76
+ ├── Labels: feedback, {category-label}
77
+ └── Repo: baekenough/oh-my-customcode
78
+ ```
79
+ 2. Ask for confirmation before creating
80
+
81
+ 3. Ensure labels exist (defensive):
82
+ ```bash
83
+ gh label create feedback --description "User feedback via /omcustom:feedback" --color 0E8A16 --repo baekenough/oh-my-customcode 2>/dev/null || true
84
+ ```
85
+
86
+ 4. Create the issue using `--body-file` for safe markdown handling:
87
+ ```bash
88
+ # Write body to temp file to avoid shell escaping issues
89
+ cat > /tmp/omcustom-feedback-body.md << 'FEEDBACK_EOF'
90
+ ## Feedback
91
+
92
+ **Category**: {category}
93
+ **Source**: omcustom CLI v{version}
94
+
95
+ ### Description
96
+ {user description}
97
+
98
+ ### Environment
99
+ - omcustom version: {omcustom_version}
100
+ - Claude Code version: {claude_version}
101
+ - OS: {os_info}
102
+ - Project: {project_name}
103
+
104
+ ---
105
+ *Submitted via `/omcustom:feedback`*
106
+ FEEDBACK_EOF
107
+
108
+ # Create issue
109
+ gh issue create \
110
+ --repo baekenough/oh-my-customcode \
111
+ --title "{title}" \
112
+ --label "feedback,{category_label}" \
113
+ --body-file /tmp/omcustom-feedback-body.md
114
+
115
+ # Clean up
116
+ rm -f /tmp/omcustom-feedback-body.md
117
+ ```
118
+
119
+ 5. If label creation fails AND issue creation fails due to labels, retry without labels as fallback
120
+
121
+ 6. Return the issue URL to the user
122
+
123
+ ### Category-to-Label Mapping
124
+
125
+ | Category | GitHub Label |
126
+ |----------|-------------|
127
+ | bug | bug |
128
+ | feature | enhancement |
129
+ | improvement | enhancement |
130
+ | question | question |
131
+
132
+ ## Notes
133
+
134
+ - Target repo is hardcoded to `baekenough/oh-my-customcode` — feedback is always about omcustom itself
135
+ - Requires `gh` CLI with authentication
136
+ - Uses `--body-file` instead of `--body` to safely handle markdown with special characters
137
+ - `disable-model-invocation: true` ensures this skill only runs when explicitly invoked by the user
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: sdd
3
+ description: Alias for sdd-dev — Spec-Driven Development workflow
4
+ scope: core
5
+ version: 1.0.0
6
+ user-invocable: true
7
+ argument-hint: "[task description or leave empty for guided workflow]"
8
+ ---
9
+
10
+ # SDD Skill (Alias)
11
+
12
+ This is an alias for the `sdd-dev` skill.
13
+
14
+ **Redirects to**: `.claude/skills/sdd-dev/SKILL.md`
15
+
16
+ See [sdd-dev](../sdd-dev/SKILL.md) for full documentation.
17
+
18
+ ## Usage
19
+
20
+ ```
21
+ /sdd [task description]
22
+ ```
23
+
24
+ Equivalent to `/sdd-dev [task description]`.
@@ -0,0 +1,257 @@
1
+ ---
2
+ name: sdd-dev
3
+ description: Spec-Driven Development workflow — enforces sdd/ folder hierarchy with planning-first gates, current-state artifacts, and completion verification
4
+ scope: core
5
+ version: 1.0.0
6
+ user-invocable: true
7
+ argument-hint: "[task description or leave empty for guided workflow]"
8
+ ---
9
+
10
+ # SDD (Spec-Driven Development) Skill
11
+
12
+ Spec-Driven Development workflow that enforces the `sdd/` folder hierarchy. All development work proceeds through planning-first gates and produces current-state artifacts as completion evidence.
13
+
14
+ ## Trigger Keywords
15
+
16
+ Invoke this skill when user requests:
17
+ - 개발해, 작업해, 구현해, 수정해, 고쳐, 리팩토링해, 테스트해, 배포해
18
+ - 화면명세서, 화면설계서, UI, 디자인, screen spec, screen design
19
+ - develop, implement, fix, refactor, build, deploy
20
+
21
+ ## sdd/ Folder Hierarchy
22
+
23
+ ```
24
+ sdd/
25
+ ├── 01_planning/ # Requirements, constraints, stakeholder input
26
+ ├── 02_plan/ # Execution plan, acceptance criteria, approach
27
+ ├── 03_build/ # Current build state, implementation notes
28
+ ├── 04_verify/ # Verification evidence, test results, residual risks
29
+ ├── 05_operate/ # Deployment notes, runbooks (conditional)
30
+ └── 99_toolchain/ # Tool configs, scripts, environment setup
31
+ ```
32
+
33
+ **Key Principle**: These folders are **current-state artifacts**, not history archives. Each file reflects the current state of the work — update in place rather than appending new versions.
34
+
35
+ ## Workflow
36
+
37
+ ### Step 0: Activation Check
38
+
39
+ Verify `sdd/` folder exists in the project root:
40
+
41
+ ```bash
42
+ ls sdd/ 2>/dev/null || echo "sdd/ folder not found"
43
+ ```
44
+
45
+ If `sdd/` does not exist:
46
+ 1. Inform the user that SDD workflow requires a `sdd/` folder
47
+ 2. Offer to create the folder structure: `mkdir -p sdd/{01_planning,02_plan,03_build,04_verify,05_operate,99_toolchain}`
48
+ 3. Ask user to confirm before proceeding
49
+
50
+ If `sdd/` exists, continue to Step 1.
51
+
52
+ ### Step 1: Planning Review (Gate)
53
+
54
+ **MUST complete before any coding begins.**
55
+
56
+ Read all relevant planning documents:
57
+
58
+ ```
59
+ [SDD] Reading planning documents...
60
+ ├── sdd/01_planning/ — requirements, constraints
61
+ └── sdd/99_toolchain/ — tool configs, environment
62
+ ```
63
+
64
+ Actions:
65
+ 1. Read `sdd/01_planning/` contents (all .md files)
66
+ 2. Read `sdd/99_toolchain/` if present
67
+ 3. Identify: What is the task? What constraints exist? What is in scope?
68
+ 4. If planning docs are empty or missing, prompt user to fill them before proceeding
69
+
70
+ **Gate**: If planning docs are absent or insufficient, pause and ask user to provide requirements. Do NOT proceed to plan phase without understanding the context.
71
+
72
+ ### Step 2: Plan Phase
73
+
74
+ Create or update `sdd/02_plan/` with the execution plan.
75
+
76
+ Artifact to produce: `sdd/02_plan/current.md`
77
+
78
+ ```markdown
79
+ # Execution Plan
80
+
81
+ ## Task
82
+ {task description}
83
+
84
+ ## Approach
85
+ {implementation strategy}
86
+
87
+ ## Acceptance Criteria
88
+ - [ ] {criterion 1}
89
+ - [ ] {criterion 2}
90
+ - [ ] {criterion N}
91
+
92
+ ## Out of Scope
93
+ - {what will NOT be done}
94
+
95
+ ## Dependencies
96
+ - {prerequisite or dependency}
97
+ ```
98
+
99
+ **Display**:
100
+ ```
101
+ [SDD Plan] Created sdd/02_plan/current.md
102
+ ├── Approach: {one-line summary}
103
+ ├── Criteria: {N} acceptance criteria defined
104
+ └── Gate: Plan ready — proceeding to build
105
+ ```
106
+
107
+ ### Step 3: Build Phase
108
+
109
+ Implement the changes. Update `sdd/03_build/` with current build state.
110
+
111
+ Artifact to produce or update: `sdd/03_build/current.md`
112
+
113
+ ```markdown
114
+ # Build State
115
+
116
+ ## Status
117
+ {In Progress | Complete}
118
+
119
+ ## Implemented
120
+ - {file or component}: {what was done}
121
+
122
+ ## Decisions Made
123
+ - {decision}: {rationale}
124
+
125
+ ## Known Issues
126
+ - {issue}: {planned resolution}
127
+ ```
128
+
129
+ During implementation:
130
+ - Follow the plan from Step 2
131
+ - Update `sdd/03_build/current.md` as work progresses
132
+ - Keep the artifact current (not a log — overwrite stale entries)
133
+
134
+ **Display**:
135
+ ```
136
+ [SDD Build] Implementing changes...
137
+ [SDD Build] Updated sdd/03_build/current.md
138
+ └── Status: {In Progress | Complete}
139
+ ```
140
+
141
+ ### Step 4: Verify Phase
142
+
143
+ Run verification and update `sdd/04_verify/` with evidence.
144
+
145
+ Artifact to produce or update: `sdd/04_verify/current.md`
146
+
147
+ ```markdown
148
+ # Verification Evidence
149
+
150
+ ## Acceptance Criteria Results
151
+ - [x] {criterion 1}: {evidence}
152
+ - [x] {criterion 2}: {evidence}
153
+ - [ ] {criterion N}: {reason if not passing}
154
+
155
+ ## Tests Run
156
+ - {test command or suite}: {result}
157
+
158
+ ## Residual Risks
159
+ - {risk}: {severity} — {mitigation plan}
160
+
161
+ ## Verdict
162
+ {Pass | Fail | Conditional Pass}
163
+ ```
164
+
165
+ Actions:
166
+ 1. Check each acceptance criterion from `sdd/02_plan/current.md`
167
+ 2. Run applicable tests or verification commands
168
+ 3. Document evidence (do NOT just say "tests pass" — include actual output or reference)
169
+ 4. List residual risks honestly
170
+
171
+ **Gate**: If verdict is Fail, return to Step 3 (Build). Do NOT declare done with a Fail verdict.
172
+
173
+ **Display**:
174
+ ```
175
+ [SDD Verify] Running verification...
176
+ [SDD Verify] Updated sdd/04_verify/current.md
177
+ ├── Criteria: {N}/{total} passing
178
+ ├── Residual risks: {count}
179
+ └── Verdict: {Pass | Fail | Conditional Pass}
180
+ ```
181
+
182
+ ### Step 5: Operate Phase (Conditional)
183
+
184
+ Only execute if deployment is in scope for this task.
185
+
186
+ Artifact to produce or update: `sdd/05_operate/current.md`
187
+
188
+ ```markdown
189
+ # Operate State
190
+
191
+ ## Deployment
192
+ - Environment: {target}
193
+ - Method: {how deployed}
194
+ - Timestamp: {when}
195
+
196
+ ## Runbook
197
+ {steps to operate, restart, rollback}
198
+
199
+ ## Monitoring
200
+ {what to watch, alerts, logs}
201
+ ```
202
+
203
+ Skip this step if:
204
+ - Task is code-only (no deployment)
205
+ - User did not request deployment
206
+ - Deployment is handled by CI/CD automatically
207
+
208
+ ### Step 6: Completion Gate
209
+
210
+ Before declaring `[Done]`, verify:
211
+
212
+ ```
213
+ [SDD Done?] Checking completion gates...
214
+ ├── sdd/02_plan/current.md — exists? {Y/N}
215
+ ├── sdd/03_build/current.md — exists and current? {Y/N}
216
+ ├── sdd/04_verify/current.md — exists and verdict Pass? {Y/N}
217
+ └── sdd/05_operate/current.md — exists (if deploy in scope)? {Y/N}
218
+ ```
219
+
220
+ If any gate fails, complete the missing artifact before declaring done.
221
+
222
+ Final display:
223
+ ```
224
+ [SDD Done] Task complete
225
+ ├── Plan: sdd/02_plan/current.md
226
+ ├── Build: sdd/03_build/current.md
227
+ ├── Verify: sdd/04_verify/current.md (Verdict: Pass)
228
+ └── Artifacts are current-state — ready for next iteration
229
+ ```
230
+
231
+ ## Artifact Maintenance Rules
232
+
233
+ 1. **Overwrite, don't append**: Update files in place. These are current-state docs, not logs.
234
+ 2. **One file per folder**: `current.md` is the canonical artifact. Supplementary files are allowed but the main doc is always `current.md`.
235
+ 3. **Checkboxes reflect reality**: Do NOT pre-check criteria. Update checkboxes as work is verified.
236
+ 4. **Residual risks are honest**: List known risks even after passing. Hiding risks defeats the purpose.
237
+
238
+ ## Integration with Other Skills
239
+
240
+ | Skill | When to Use Together |
241
+ |-------|---------------------|
242
+ | `/deep-plan` | Before `/sdd-dev` when requirements are ambiguous — use deep-plan to research, then sdd-dev to execute |
243
+ | `/structured-dev-cycle` | Alternative workflow without sdd/ folder — use sdd-dev when project uses sdd/ hierarchy |
244
+ | `/dev-review` | After Step 4 — use dev-review for additional code quality check |
245
+ | `/adversarial-review` | After Step 4 — use adversarial-review for security-sensitive changes |
246
+
247
+ ## Example Usage
248
+
249
+ ```
250
+ /sdd-dev add user authentication to the API
251
+ /sdd-dev implement pagination for the product list screen
252
+ /sdd-dev 화면명세서 기반으로 대시보드 UI 구현
253
+ /sdd-dev refactor the payment module
254
+ /sdd-dev # (no argument — guided workflow)
255
+ ```
256
+
257
+ When no argument is provided, ask: "어떤 작업을 진행할까요? sdd/01_planning/ 의 요구사항을 기반으로 계획을 수립합니다."
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: sdd-development
3
+ description: Alias for sdd-dev — Spec-Driven Development workflow
4
+ scope: core
5
+ version: 1.0.0
6
+ user-invocable: true
7
+ argument-hint: "[task description or leave empty for guided workflow]"
8
+ ---
9
+
10
+ # SDD Development Skill (Alias)
11
+
12
+ This is an alias for the `sdd-dev` skill.
13
+
14
+ **Redirects to**: `.claude/skills/sdd-dev/SKILL.md`
15
+
16
+ See [sdd-dev](../sdd-dev/SKILL.md) for full documentation.
17
+
18
+ ## Usage
19
+
20
+ ```
21
+ /sdd-development [task description]
22
+ ```
23
+
24
+ Equivalent to `/sdd-dev [task description]`.
@@ -103,6 +103,7 @@ oh-my-customcode로 구동됩니다.
103
103
  | `/omcustom:fix-refs` | 깨진 참조 수정 |
104
104
  | `/omcustom:takeover` | 기존 에이전트/스킬에서 canonical spec 추출 |
105
105
  | `/adversarial-review` | 공격자 관점 보안 코드 리뷰 |
106
+ | `/ambiguity-gate` | 요청 모호성 분석 및 명확화 질문 (ouroboros 패턴) |
106
107
  | `/dev-review` | 코드 베스트 프랙티스 리뷰 |
107
108
  | `/dev-refactor` | 코드 리팩토링 |
108
109
  | `/memory-save` | 세션 컨텍스트를 claude-mem에 저장 |
@@ -112,6 +113,7 @@ oh-my-customcode로 구동됩니다.
112
113
  | `/omcustom:npm-version` | 시맨틱 버전 관리 |
113
114
  | `/omcustom:npm-audit` | 의존성 감사 |
114
115
  | `/omcustom:release-notes` | 릴리즈 노트 생성 (git 히스토리 기반) |
116
+ | `/omcustom:feedback` | 사용자 피드백을 GitHub Issue로 등록 |
115
117
  | `/codex-exec` | Codex CLI 프롬프트 실행 |
116
118
  | `/optimize-analyze` | 번들 및 성능 분석 |
117
119
  | `/optimize-bundle` | 번들 크기 최적화 |
@@ -131,11 +133,11 @@ project/
131
133
  +-- CLAUDE.md # 진입점
132
134
  +-- .claude/
133
135
  | +-- agents/ # 서브에이전트 정의 (44 파일)
134
- | +-- skills/ # 스킬 (76 디렉토리)
136
+ | +-- skills/ # 스킬 (78 디렉토리)
135
137
  | +-- rules/ # 전역 규칙 (R000-R021)
136
138
  | +-- hooks/ # 훅 스크립트 (보안, 검증, HUD)
137
139
  | +-- contexts/ # 컨텍스트 파일 (ecomode)
138
- +-- guides/ # 레퍼런스 문서 (26 토픽)
140
+ +-- guides/ # 레퍼런스 문서 (27 토픽)
139
141
  ```
140
142
 
141
143
  ## 오케스트레이션
@@ -0,0 +1,134 @@
1
+ # Git Worktree Workflow
2
+
3
+ ## Overview
4
+
5
+ Git worktrees allow you to check out multiple branches simultaneously in separate directories, each with its own working tree. This eliminates the need to stash changes or commit incomplete work when switching between branches.
6
+
7
+ **Key benefits:**
8
+ - Work on `develop` and `team-plugin` simultaneously without context switching
9
+ - Keep long-running feature branches open alongside hotfix branches
10
+ - Run tests on one branch while coding on another
11
+
12
+ ## Recommended Directory Structure
13
+
14
+ ```
15
+ ~/workspace/projects/
16
+ ├── oh-my-customcode/ # Main worktree (develop)
17
+ ├── oh-my-customcode-team-plugin/ # team-plugin branch
18
+ └── oh-my-customcode-release/ # release/* branches
19
+ ```
20
+
21
+ Convention: `{repo-name}-{branch-suffix}` as sibling directories to the main worktree.
22
+
23
+ ## Basic Commands
24
+
25
+ ### Create a worktree
26
+
27
+ ```bash
28
+ # From the main repository directory
29
+ cd ~/workspace/projects/oh-my-customcode
30
+
31
+ # Attach to an existing remote branch
32
+ git worktree add ../oh-my-customcode-team-plugin team-plugin
33
+
34
+ # Create a new branch and worktree together
35
+ git worktree add ../oh-my-customcode-release release/v0.43.0
36
+ ```
37
+
38
+ ### List worktrees
39
+
40
+ ```bash
41
+ git worktree list
42
+ ```
43
+
44
+ Output:
45
+ ```
46
+ /Users/you/workspace/projects/oh-my-customcode abc1234 [develop]
47
+ /Users/you/workspace/projects/oh-my-customcode-team-plugin def5678 [team-plugin]
48
+ /Users/you/workspace/projects/oh-my-customcode-release ghi9012 [release/v0.43.0]
49
+ ```
50
+
51
+ ### Remove a worktree
52
+
53
+ ```bash
54
+ # Remove after branch is merged
55
+ git worktree remove ../oh-my-customcode-release
56
+
57
+ # Clean up stale worktree references
58
+ git worktree prune
59
+ ```
60
+
61
+ ### Move a worktree
62
+
63
+ ```bash
64
+ git worktree move ../oh-my-customcode-release ../oh-my-customcode-hotfix
65
+ ```
66
+
67
+ ## Claude Code Integration
68
+
69
+ ### Built-in Worktree Tools
70
+
71
+ Claude Code provides `EnterWorktree` and `ExitWorktree` tools for session-scoped worktree management:
72
+
73
+ ```
74
+ EnterWorktree(name: "feature-x")
75
+ # Creates .claude/worktrees/feature-x with a new branch based on HEAD
76
+ # Session working directory switches to the worktree
77
+
78
+ ExitWorktree()
79
+ # Returns to the main repository
80
+ # Prompts to keep or remove the worktree
81
+ ```
82
+
83
+ ### Agent Isolation Mode
84
+
85
+ Agents can use `isolation: worktree` in their frontmatter to run in an isolated git worktree:
86
+
87
+ ```yaml
88
+ ---
89
+ name: my-agent
90
+ isolation: worktree
91
+ ---
92
+ ```
93
+
94
+ This gives the agent a separate working copy, enabling safe code changes with rollback capability. The worktree is automatically created and cleaned up by the agent lifecycle.
95
+
96
+ ### Superpowers Skill
97
+
98
+ The `superpowers` plugin includes a `using-git-worktrees` skill with additional patterns for worktree-based workflows. Reference it for advanced use cases like parallel CI testing and multi-branch refactoring.
99
+
100
+ ## Caveats
101
+
102
+ ### Same branch restriction
103
+
104
+ A branch cannot be checked out in multiple worktrees simultaneously. Attempting this will fail:
105
+
106
+ ```bash
107
+ # ERROR: 'develop' is already checked out at '~/workspace/projects/oh-my-customcode'
108
+ git worktree add ../oh-my-customcode-dev2 develop
109
+ ```
110
+
111
+ ### Independent dependencies
112
+
113
+ Each worktree has its own `node_modules`. Run package installation separately:
114
+
115
+ ```bash
116
+ cd ../oh-my-customcode-team-plugin
117
+ bun install
118
+ ```
119
+
120
+ ### Gitignored files
121
+
122
+ Files under `.claude/` are gitignored in this project. When adding new `.claude/` files, use `git add -f`:
123
+
124
+ ```bash
125
+ git add -f .claude/agents/new-agent.md
126
+ ```
127
+
128
+ ### Shared git objects
129
+
130
+ All worktrees share the same `.git` object store. Operations like `git gc` and `git fetch` affect all worktrees.
131
+
132
+ ### Worktree-local files
133
+
134
+ Files listed in `.gitignore` (like `node_modules/`, `.env`) are independent per worktree. Configuration files that are not tracked must be set up separately in each worktree.