@hustle-together/api-dev-tools 3.11.1 → 3.12.2
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.
- package/.claude/agents/code-reviewer.md +170 -0
- package/.claude/agents/docs-generator.md +80 -0
- package/.claude/agents/implementation-reviewer.md +119 -0
- package/.claude/agents/parallel-researcher.md +52 -0
- package/.claude/agents/research-validator.md +116 -0
- package/.claude/agents/schema-generator.md +70 -0
- package/.claude/agents/test-writer.md +104 -0
- package/.claude/api-dev-state.json +305 -56
- package/.claude/commands/README.md +21 -10
- package/.claude/commands/add-command.md +8 -5
- package/.claude/commands/api-create.md +36 -25
- package/.claude/commands/api-env.md +1 -0
- package/.claude/commands/api-interview.md +32 -19
- package/.claude/commands/api-research.md +47 -21
- package/.claude/commands/api-status.md +21 -1
- package/.claude/commands/api-verify.md +14 -13
- package/.claude/commands/beepboop.md +4 -5
- package/.claude/commands/busycommit.md +2 -3
- package/.claude/commands/commit.md +2 -3
- package/.claude/commands/cycle.md +2 -7
- package/.claude/commands/gap.md +2 -3
- package/.claude/commands/green.md +2 -7
- package/.claude/commands/issue.md +3 -8
- package/.claude/commands/ntfy-setup.md +91 -0
- package/.claude/commands/ntfy-test.md +74 -0
- package/.claude/commands/plan.md +2 -3
- package/.claude/commands/pr.md +2 -3
- package/.claude/commands/publish.md +40 -0
- package/.claude/commands/red.md +2 -7
- package/.claude/commands/refactor.md +2 -7
- package/.claude/commands/spike.md +2 -7
- package/.claude/commands/summarize.md +2 -3
- package/.claude/commands/tdd.md +2 -7
- package/.claude/commands/worktree-add.md +208 -216
- package/.claude/commands/worktree-cleanup.md +172 -178
- package/.claude/settings.json +63 -12
- package/.claude/settings.local.json +2 -1
- package/.claude-plugin/marketplace.json +2 -11
- package/.skills/README.md +55 -53
- package/.skills/_shared/settings.json +1 -1
- package/.skills/add-command/SKILL.md +10 -5
- package/.skills/api-create/SKILL.md +146 -35
- package/.skills/api-env/SKILL.md +1 -0
- package/.skills/api-interview/SKILL.md +32 -19
- package/.skills/api-research/SKILL.md +47 -21
- package/.skills/api-status/SKILL.md +21 -1
- package/.skills/api-verify/SKILL.md +14 -13
- package/.skills/beepboop/SKILL.md +6 -5
- package/.skills/busycommit/SKILL.md +4 -3
- package/.skills/commit/SKILL.md +4 -3
- package/.skills/cycle/SKILL.md +4 -7
- package/.skills/gap/SKILL.md +4 -3
- package/.skills/green/SKILL.md +4 -7
- package/.skills/issue/SKILL.md +5 -8
- package/.skills/plan/SKILL.md +4 -3
- package/.skills/pr/SKILL.md +4 -3
- package/.skills/publish/SKILL.md +160 -0
- package/.skills/red/SKILL.md +4 -7
- package/.skills/refactor/SKILL.md +4 -7
- package/.skills/spike/SKILL.md +4 -7
- package/.skills/summarize/SKILL.md +4 -3
- package/.skills/tdd/SKILL.md +4 -7
- package/.skills/update-todos/SKILL.md +22 -0
- package/.skills/worktree-add/SKILL.md +210 -216
- package/.skills/worktree-cleanup/SKILL.md +183 -187
- package/CHANGELOG.md +97 -79
- package/README.md +161 -7142
- package/bin/cli.js +448 -805
- package/commands/README.md +66 -31
- package/commands/add-command.md +8 -5
- package/commands/beepboop.md +4 -5
- package/commands/busycommit.md +2 -3
- package/commands/commit.md +2 -3
- package/commands/cycle.md +2 -7
- package/commands/gap.md +2 -3
- package/commands/green.md +2 -7
- package/commands/hustle-api-continue.md +8 -5
- package/commands/hustle-api-create.md +70 -29
- package/commands/hustle-api-env.md +1 -0
- package/commands/hustle-api-interview.md +32 -19
- package/commands/hustle-api-research.md +47 -21
- package/commands/hustle-api-sessions.md +8 -7
- package/commands/hustle-api-status.md +21 -1
- package/commands/hustle-api-verify.md +14 -13
- package/commands/hustle-combine.md +488 -241
- package/commands/hustle-ui-create-page.md +113 -50
- package/commands/hustle-ui-create.md +179 -26
- package/commands/issue.md +3 -8
- package/commands/plan.md +2 -3
- package/commands/pr.md +2 -3
- package/commands/red.md +2 -7
- package/commands/refactor.md +2 -7
- package/commands/spike.md +2 -7
- package/commands/summarize.md +2 -3
- package/commands/tdd.md +2 -7
- package/commands/worktree-add.md +208 -216
- package/commands/worktree-cleanup.md +172 -178
- package/hooks/api-workflow-check.py +5 -3
- package/hooks/enforce-component-type-confirm.py +97 -0
- package/hooks/lib/__init__.py +1 -0
- package/hooks/lib/greptile.py +355 -0
- package/hooks/lib/ntfy.py +209 -0
- package/hooks/notify-input-needed.py +73 -0
- package/hooks/notify-phase-complete.py +90 -0
- package/hooks/run-code-review.py +246 -0
- package/hooks/track-token-usage.py +121 -0
- package/package.json +13 -3
- package/scripts/collect-test-results.ts +102 -77
- package/scripts/extract-parameters.ts +112 -70
- package/scripts/generate-test-manifest.ts +118 -77
- package/templates/.env.example +57 -0
- package/templates/BRAND_GUIDE.md +92 -52
- package/templates/CLAUDE-SECTION.md +40 -37
- package/templates/SPEC.json +186 -38
- package/templates/api-dev-state.json +33 -4
- package/templates/api-showcase/_components/APICard.tsx +22 -18
- package/templates/api-showcase/_components/APIModal.tsx +110 -64
- package/templates/api-showcase/_components/APIShowcase.tsx +53 -35
- package/templates/api-showcase/_components/APITester.tsx +128 -67
- package/templates/api-showcase/page.tsx +4 -4
- package/templates/api-test/page.tsx +51 -30
- package/templates/api-test/test-structure/route.ts +43 -34
- package/templates/component/Component.stories.tsx +41 -39
- package/templates/component/Component.test.tsx +96 -78
- package/templates/component/Component.tsx +63 -52
- package/templates/component/Component.types.ts +10 -6
- package/templates/component/Component.visual.spec.ts +170 -0
- package/templates/component/index.ts +2 -2
- package/templates/dev-tools/_components/DevToolsLanding.tsx +8 -8
- package/templates/dev-tools/page.tsx +4 -3
- package/templates/mcp-servers.json +30 -2
- package/templates/page/page.e2e.test.ts +56 -48
- package/templates/page/page.tsx +3 -3
- package/templates/shared/HeroHeader.tsx +16 -15
- package/templates/shared/index.ts +1 -1
- package/templates/ui-showcase/_components/PreviewCard.tsx +20 -20
- package/templates/ui-showcase/_components/PreviewModal.tsx +149 -108
- package/templates/ui-showcase/_components/UIShowcase.tsx +43 -35
- package/templates/ui-showcase/page.tsx +4 -4
|
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
description: Add a new git worktree from branch name or GitHub issue URL, copy settings, install deps, and open in current IDE
|
|
16
17
|
argument-hint: <branch-name-or-github-issue-url> [optional-base-branch]
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
# Git Worktree Setup
|
|
@@ -37,228 +39,221 @@ Uncommitted changes: !git status --short`
|
|
|
37
39
|
|
|
38
40
|
<execution_steps>
|
|
39
41
|
<step_0>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
If MCP validation fails:
|
|
52
|
-
- Show clear error message
|
|
53
|
-
- Provide setup instructions
|
|
54
|
-
- Fallback to CLI if possible
|
|
55
|
-
</error_handling>
|
|
56
|
-
<purpose>Ensure required MCP dependencies are available before proceeding</purpose>
|
|
42
|
+
<description>Validate MCP dependencies</description>
|
|
43
|
+
<check_github_mcp>
|
|
44
|
+
<requirement>GitHub MCP server must be configured</requirement>
|
|
45
|
+
<fallback>If unavailable, use `gh` CLI commands</fallback>
|
|
46
|
+
<validation> - Try listing available MCP resources - If GitHub MCP not found, switch to CLI fallback - Inform user about MCP configuration if needed
|
|
47
|
+
</validation>
|
|
48
|
+
</check_github_mcp>
|
|
49
|
+
<error_handling>
|
|
50
|
+
If MCP validation fails: - Show clear error message - Provide setup instructions - Fallback to CLI if possible
|
|
51
|
+
</error_handling>
|
|
52
|
+
<purpose>Ensure required MCP dependencies are available before proceeding</purpose>
|
|
57
53
|
</step_0>
|
|
58
54
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
55
|
+
<step_1>
|
|
56
|
+
<description>Detect current IDE environment</description>
|
|
57
|
+
<detection_methods>
|
|
58
|
+
<method_1>
|
|
59
|
+
<tool>mcp**ide**getDiagnostics</tool>
|
|
60
|
+
<vs_code_insiders>Check for paths containing "Code - Insiders"</vs_code_insiders>
|
|
61
|
+
<vs_code>Check for paths containing "Code/" or "Code.app"</vs_code>
|
|
62
|
+
<cursor>Check for paths containing "Cursor"</cursor>
|
|
63
|
+
<zed>Check for paths containing "Zed"</zed>
|
|
64
|
+
</method_1>
|
|
65
|
+
<method_2>
|
|
66
|
+
<fallback_detection>Use which command to find available IDEs</fallback_detection>
|
|
67
|
+
<commands>which code-insiders code zed cursor</commands>
|
|
68
|
+
<priority_order>code-insiders > cursor > zed > code</priority_order>
|
|
69
|
+
</method_2>
|
|
70
|
+
</detection_methods>
|
|
71
|
+
<set_variables>
|
|
72
|
+
<ide_command>Detected command (code-insiders|code|zed|cursor)</ide_command>
|
|
73
|
+
<ide_name>Human-readable name</ide_name>
|
|
74
|
+
<supports_tasks>true for VS Code variants, false for others</supports_tasks>
|
|
75
|
+
</set_variables>
|
|
76
|
+
<purpose>Automatically detect which IDE to use for opening the new worktree</purpose>
|
|
77
|
+
</step_1>
|
|
78
|
+
|
|
79
|
+
<step_2>
|
|
80
|
+
<description>Parse the arguments</description>
|
|
81
|
+
<input>The user-provided arguments</input>
|
|
82
|
+
<expected_format>branch-name-or-github-url [optional-base-branch]</expected_format>
|
|
83
|
+
<example>fix/issue-123-main-content-area-visually-clipped main</example>
|
|
84
|
+
<example_github_url><https://github.com/owner/project/issues/123> main</example_github_url>
|
|
85
|
+
<default_base_branch>main (if not specified)</default_base_branch>
|
|
86
|
+
</step_1>
|
|
87
|
+
|
|
88
|
+
<step_2_5>
|
|
89
|
+
<description>Handle GitHub issue URLs</description>
|
|
90
|
+
<condition>If first argument matches GitHub issue URL pattern</condition>
|
|
91
|
+
<url_detection>Check if argument contains "github.com" and "/issues/"</url_detection>
|
|
92
|
+
<url_parsing>
|
|
93
|
+
<pattern>https://github.com/{owner}/{repo}/issues/{issue_number}</pattern>
|
|
94
|
+
<extract>owner, repo, issue_number from URL</extract>
|
|
95
|
+
</url_parsing>
|
|
96
|
+
<fetch_issue_details>
|
|
97
|
+
<tool>mcp**github**issue_read</tool>
|
|
98
|
+
<method>get</method>
|
|
99
|
+
<parameters>owner, repo, issue_number</parameters>
|
|
100
|
+
</fetch_issue_details>
|
|
101
|
+
<generate_branch_name>
|
|
102
|
+
<determine_type>Analyze issue title/labels to determine type (feat/fix/refactor/chore)</determine_type>
|
|
103
|
+
<format>{type}/{repo}-{issue_number}-{kebab-case-title}</format>
|
|
104
|
+
<kebab_case>Convert title to lowercase, replace spaces/special chars with hyphens</kebab_case>
|
|
105
|
+
<sanitization>
|
|
106
|
+
<rule>Always use lowercase for branch names</rule>
|
|
107
|
+
<rule>Replace # with - (hash symbol not allowed in git branch names)</rule>
|
|
108
|
+
<rule>Remove or replace other special characters: @, $, %, ^, &, \*, (, ), [, ], {, }, \, |, ;, :, ", ', <, >, ?, /, ~, `</rule>
|
|
109
|
+
<rule>Replace multiple consecutive hyphens with single hyphen</rule>
|
|
110
|
+
<rule>Trim leading/trailing hyphens</rule>
|
|
111
|
+
</sanitization>
|
|
112
|
+
<truncate>Limit total branch name to reasonable length (~60 chars)</truncate>
|
|
113
|
+
</generate_branch_name>
|
|
114
|
+
<user_confirmation>
|
|
115
|
+
<display>Show generated branch name and ask for confirmation</display>
|
|
116
|
+
<options>"Yes, proceed" or "No, exit" or "Edit branch name"</options>
|
|
117
|
+
<if_no>Exit command gracefully</if_no>
|
|
118
|
+
<if_edit>Allow user to modify the branch name</if_edit>
|
|
119
|
+
<if_yes>Continue with generated/modified branch name</if_yes>
|
|
120
|
+
</user_confirmation>
|
|
121
|
+
<examples>
|
|
122
|
+
<input>https://github.com/owner/project/issues/456</input>
|
|
123
|
+
|
|
124
|
+
<title>"Fix duplicate items in list view"</title>
|
|
125
|
+
<generated>fix/issue-456-duplicate-items-in-list-view</generated>
|
|
126
|
+
</examples>
|
|
127
|
+
</step_1_5>
|
|
128
|
+
|
|
129
|
+
<step_3>
|
|
130
|
+
<description>Add all files and stash uncommitted changes if any exist</description>
|
|
131
|
+
<condition>If output is not empty (has uncommitted changes)</condition>
|
|
132
|
+
<command>git add -A && git stash push -m "Worktree switch: Moving changes to ${branch_name}"</chained_command>
|
|
133
|
+
<purpose>Preserve work in progress before switching worktrees</purpose>
|
|
134
|
+
<note>Remember stash was created for later restoration</note>
|
|
135
|
+
</step_3>
|
|
136
|
+
|
|
137
|
+
<step_4>
|
|
138
|
+
<description>Determine worktree parent directory</description>
|
|
139
|
+
<check_if_in_worktree>git rev-parse --is-inside-work-tree && git worktree list --porcelain | grep "$(git rev-parse --show-toplevel)"</check_if_in_worktree>
|
|
140
|
+
<set_parent_path>
|
|
141
|
+
<if_main_worktree>Set parent_path=".."</if_main_worktree>
|
|
142
|
+
<if_secondary_worktree>Set parent_path="../.." (need to go up two levels)</if_secondary_worktree>
|
|
143
|
+
</set_parent_path>
|
|
144
|
+
<purpose>Correctly determine where to create new worktree regardless of current location</purpose>
|
|
145
|
+
<note>This handles both main worktree and secondary worktree scenarios</note>
|
|
146
|
+
</step_4>
|
|
147
|
+
|
|
148
|
+
<step_5>
|
|
149
|
+
<description>Fetch latest changes from remote</description>
|
|
150
|
+
<command>git fetch origin</command>
|
|
151
|
+
<purpose>Ensure we have the latest remote branches and main branch state</purpose>
|
|
152
|
+
<note>This ensures new worktrees are created from the most recent main branch</note>
|
|
153
|
+
</step_6>
|
|
154
|
+
|
|
155
|
+
<step_7>
|
|
156
|
+
<description>Check if branch exists on remote</description>
|
|
157
|
+
<command>git branch -r | grep "origin/${branch_name}"</command>
|
|
158
|
+
<decision>
|
|
159
|
+
<if_exists>Branch exists on remote - will checkout existing branch</if_exists>
|
|
160
|
+
<if_not_exists>Branch does not exist - will create new branch from base</if_not_exists>
|
|
161
|
+
</decision>
|
|
162
|
+
</step_5>
|
|
163
|
+
|
|
164
|
+
<step_6>
|
|
165
|
+
<description>Create the worktree</description>
|
|
166
|
+
<option_a_new_branch>
|
|
167
|
+
<condition>Remote branch does NOT exist</condition>
|
|
168
|
+
<command>git worktree add ${parent_path}/${branch_name} -b ${branch_name} ${base_branch}</command>
|
|
172
169
|
<example>git worktree add ../fix/issue-123-main-content-area-visually-clipped -b fix/issue-123-main-content-area-visually-clipped main</example>
|
|
173
170
|
</option_a_new_branch>
|
|
174
171
|
<option_b_existing_branch>
|
|
175
172
|
<condition>Remote branch EXISTS</condition>
|
|
176
173
|
<command>git worktree add ${parent_path}/${branch_name} ${branch_name}</command>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
174
|
+
<example>git worktree add ../fix/issue-123-main-content-area-visually-clipped fix/issue-123-main-content-area-visually-clipped</example>
|
|
175
|
+
</option_b_existing_branch>
|
|
176
|
+
</step_7>
|
|
177
|
+
|
|
178
|
+
<step_8>
|
|
179
|
+
<description>Copy Claude settings to new worktree</description>
|
|
180
|
+
|
|
181
|
+
<source>.claude/settings.local.json</source>
|
|
182
|
+
<destination>${parent_path}/${branch_name}/.claude/settings.local.json</destination>
|
|
183
|
+
<command>cp -r .claude/settings.local.json ${parent_path}/${branch_name}/.claude/settings.local.json</command>
|
|
184
|
+
<purpose>Preserve all permission settings and configurations</purpose>
|
|
185
|
+
</step_8>
|
|
186
|
+
|
|
187
|
+
<step*9>
|
|
188
|
+
<description>Copy .env.local files to new worktree</description>
|
|
189
|
+
<search_command>find . -name ".env.local" -type f</search_command>
|
|
190
|
+
<copy_logic>For each .env.local file found, copy to corresponding location in new worktree</copy_logic>
|
|
191
|
+
<common_locations> - app/.env.local - packages/\*/.env.local - (any other .env.local files found)
|
|
192
|
+
</common_locations>
|
|
193
|
+
<copy_command>find . -name ".env.local" -type f -exec sh -c 'mkdir -p "$(dirname "${parent_path}/${branch_name}/$1")" && cp "$1" "${parent_path}/${branch_name}/$1"' *{} \;</copy_command>
|
|
194
|
+
<purpose>Preserve local environment configurations for development</purpose>
|
|
195
|
+
<note>Only copies files that exist; ignores missing ones</note>
|
|
196
|
+
</step_9>
|
|
197
|
+
|
|
198
|
+
<step_10>
|
|
199
|
+
<description>Create IDE-specific configuration (conditional)</description>
|
|
200
|
+
<condition>Only if supports_tasks is true (VS Code variants)</condition>
|
|
201
|
+
<vs_code_tasks>
|
|
202
|
+
<create_directory>mkdir -p ${parent_path}/${branch_name}/.vscode</create_directory>
|
|
203
|
+
<create_file_command>cat > ${parent_path}/${branch_name}/.vscode/tasks.json << 'EOF'
|
|
204
|
+
{
|
|
205
|
+
"version": "2.0.0",
|
|
206
|
+
"tasks": [
|
|
209
207
|
{
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
]
|
|
208
|
+
"label": "Auto start Claude",
|
|
209
|
+
"type": "shell",
|
|
210
|
+
"command": "claude",
|
|
211
|
+
"runOptions": {
|
|
212
|
+
"runOn": "folderOpen"
|
|
213
|
+
},
|
|
214
|
+
"presentation": {
|
|
215
|
+
"echo": false,
|
|
216
|
+
"reveal": "always",
|
|
217
|
+
"focus": true,
|
|
218
|
+
"panel": "new"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
]
|
|
227
222
|
}
|
|
228
223
|
EOF</create_file_command>
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
224
|
+
</vs_code_tasks>
|
|
225
|
+
<purpose>Create auto-start Claude task for VS Code variants on folder open</purpose>
|
|
226
|
+
<note>Only creates for VS Code variants (code, code-insiders, cursor)</note>
|
|
227
|
+
<skip_message>Skipping IDE-specific config for non-VS Code IDEs</skip_message>
|
|
228
|
+
</step_10>
|
|
229
|
+
|
|
230
|
+
<step_11>
|
|
231
|
+
<description>Install dependencies in new worktree</description>
|
|
232
|
+
<working_directory>${parent_path}/${branch_name}</working_directory>
|
|
233
|
+
<command>cd ${parent_path}/${branch_name} && pnpm install</command>
|
|
234
|
+
<purpose>Ensure all node_modules are installed for the new worktree</purpose>
|
|
235
|
+
</step_11>
|
|
236
|
+
|
|
237
|
+
<step_12>
|
|
238
|
+
<description>Apply stashed changes to new worktree (if stash was created)</description>
|
|
239
|
+
<condition>Only if stash was created in step_3</condition>
|
|
240
|
+
<working_directory>${parent_path}/${branch_name}</working_directory>
|
|
241
|
+
<command>cd ${parent_path}/${branch_name} && git stash pop</command>
|
|
242
|
+
<purpose>Restore uncommitted work-in-progress to the new worktree branch</purpose>
|
|
243
|
+
<note>This moves your uncommitted changes to the new branch where you'll continue working</note>
|
|
244
|
+
</step_12>
|
|
245
|
+
|
|
246
|
+
<step_13>
|
|
247
|
+
<description>Open detected IDE in new worktree</description>
|
|
248
|
+
<command>${ide_command} ${parent_path}/${branch_name}</command>
|
|
249
|
+
<ide_specific_behavior>
|
|
250
|
+
<vs_code_variants>Opens folder in VS Code/Insiders/Cursor with tasks.json auto-starting Claude</vs_code_variants>
|
|
251
|
+
<zed>Opens folder in Zed editor</zed>
|
|
252
|
+
<other>Uses detected IDE command to open folder</other>
|
|
253
|
+
</ide_specific_behavior>
|
|
254
|
+
<purpose>Launch development environment for the new worktree using detected IDE</purpose>
|
|
255
|
+
<confirmation_message>Opening worktree in ${ide_name}</confirmation_message>
|
|
256
|
+
</step_11>
|
|
262
257
|
</execution_steps>
|
|
263
258
|
|
|
264
259
|
<important_notes>
|
|
@@ -273,8 +268,7 @@ EOF</create_file_command>
|
|
|
273
268
|
- Uncommitted changes are automatically stashed and moved to the new worktree
|
|
274
269
|
- Your work-in-progress seamlessly transfers to the new branch
|
|
275
270
|
- IDE detection fallback: checks available editors and uses priority order
|
|
276
|
-
</important_notes>
|
|
277
|
-
|
|
271
|
+
</important_notes>
|
|
278
272
|
|
|
279
273
|
## 🛡 Project Rules (Injected into every command)
|
|
280
274
|
|
|
@@ -300,7 +294,7 @@ EOF</create_file_command>
|
|
|
300
294
|
4. **API KEY MANAGEMENT:**
|
|
301
295
|
- Support three loading methods:
|
|
302
296
|
- Server environment variables
|
|
303
|
-
-
|
|
297
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
304
298
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
305
299
|
- Never hardcode API keys
|
|
306
300
|
- Always validate key availability before use
|
|
@@ -325,4 +319,4 @@ EOF</create_file_command>
|
|
|
325
319
|
- Code examples
|
|
326
320
|
- Testing notes
|
|
327
321
|
- Document expected behavior and edge cases
|
|
328
|
-
- Include real-world output examples
|
|
322
|
+
- Include real-world output examples
|