@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: Clean up merged worktrees by verifying PR/issue status, consolidating settings, and removing stale worktrees
|
|
16
17
|
argument-hint: (no arguments)
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
# Worktree Cleanup
|
|
@@ -37,191 +39,186 @@ Current worktrees: !git worktree list`
|
|
|
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
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
55
|
+
<step_1>
|
|
56
|
+
<description>Verify we're in main branch</description>
|
|
57
|
+
<check_command>git branch --show-current</check_command>
|
|
58
|
+
<required_branch>main</required_branch>
|
|
59
|
+
<error_if_not_main>Exit with error message: "This command must be run from the main branch"</error_if_not_main>
|
|
60
|
+
<purpose>Ensure we're consolidating to the main worktree</purpose>
|
|
61
|
+
</step_1>
|
|
62
|
+
|
|
63
|
+
<step_2>
|
|
64
|
+
<description>Get list of all worktrees</description>
|
|
65
|
+
<command>git worktree list --porcelain</command>
|
|
66
|
+
<parse_output>Extract worktree paths and branch names</parse_output>
|
|
67
|
+
<exclude_main>Filter out the main worktree from cleanup candidates</exclude_main>
|
|
68
|
+
<purpose>Identify all worktrees that could potentially be cleaned up</purpose>
|
|
69
|
+
</step_2>
|
|
70
|
+
|
|
71
|
+
<step_3>
|
|
72
|
+
<description>Find oldest worktree by directory age</description>
|
|
73
|
+
<get_worktree_ages>
|
|
74
|
+
<command_macos>git worktree list | grep -v "main" | awk '{print $1}' | while read path; do /usr/bin/stat -f "%Sm|%N" -t "%Y-%m-%d %H:%M:%S" "$path" 2>/dev/null; done | sort</command_macos>
|
|
75
|
+
<command_linux>git worktree list | grep -v "main" | awk '{print $1}' | xargs stat -c "%y|%n" | sort</command_linux>
|
|
76
|
+
<purpose>List all worktrees sorted by directory modification time (oldest first)</purpose>
|
|
77
|
+
<note>Use full path /usr/bin/stat on macOS, regular stat on Linux.</note>
|
|
78
|
+
</get_worktree_ages>
|
|
79
|
+
<filter_recent>
|
|
80
|
+
<exclude_new>For worktrees created within the last 24 hours, let user know that this worktree might not be worth cleaning</exclude_new>
|
|
81
|
+
<get_current_time>date +"%Y-%m-%d %H:%M"</get_current_time>
|
|
82
|
+
</filter_recent>
|
|
83
|
+
<select_oldest>
|
|
84
|
+
<extract_branch_name>Parse branch name from oldest worktree path</extract_branch_name>
|
|
85
|
+
<important_note>DO NOT use "git branch --merged" to check merge status - it's unreliable</important_note>
|
|
86
|
+
<proceed_to_pr_check>Move directly to step 4 to verify PR merge status instead</proceed_to_pr_check>
|
|
87
|
+
</select_oldest>
|
|
88
|
+
<purpose>Identify oldest worktree candidate - actual merge verification happens via GitHub PR in next step</purpose>
|
|
89
|
+
</step_3>
|
|
90
|
+
|
|
91
|
+
<step_4>
|
|
92
|
+
<description>Verify GitHub PR merge status (primary merge verification)</description>
|
|
93
|
+
<determine_repo>
|
|
94
|
+
<check_remote>git remote get-url origin</check_remote>
|
|
95
|
+
<parse_repo>Extract owner/repo from GitHub URL</parse_repo>
|
|
96
|
+
<fallback>Use project repository from git remote (owner/repo format)</fallback>
|
|
97
|
+
</determine_repo>
|
|
98
|
+
<search_pr>
|
|
99
|
+
<tool>mcp**github**search_pull_requests</tool>
|
|
100
|
+
<query>repo:owner/repo head:{branch_name} base:main</query>
|
|
101
|
+
<purpose>Find PR for this branch targeting main</purpose>
|
|
102
|
+
<important>This is the PRIMARY way to verify if a branch was merged - NOT git commands</important>
|
|
103
|
+
</search_pr>
|
|
104
|
+
<verify_pr_merged>
|
|
105
|
+
<if_pr_found>
|
|
106
|
+
<get_pr_details>Use mcp**github**pull_request_read to get full PR info</get_pr_details>
|
|
107
|
+
<confirm_merged>Verify PR state is "closed" AND merged_at is not null AND base is "main"</confirm_merged>
|
|
108
|
+
<extract_issue_number>Look for issue references in PR title/body (e.g., #14533, owner/repo#14533)</extract_issue_number>
|
|
109
|
+
<if_merged>Proceed with cleanup - this branch was definitively merged to main</if_merged>
|
|
110
|
+
<if_not_merged>
|
|
111
|
+
<skip_worktree>This worktree is NOT merged - continue to next oldest worktree</skip_worktree>
|
|
112
|
+
<repeat_from_step_3>Go back and find the next oldest worktree to check</repeat_from_step_3>
|
|
113
|
+
</if_not_merged>
|
|
114
|
+
</if_pr_found>
|
|
115
|
+
<if_no_pr>
|
|
116
|
+
<skip_worktree>No PR found - this branch was likely never submitted for review</skip_worktree>
|
|
117
|
+
<continue_to_next>Continue checking next oldest worktree</continue_to_next>
|
|
118
|
+
</if_no_pr>
|
|
119
|
+
</verify_pr_merged>
|
|
120
|
+
<purpose>Use GitHub PR status as the authoritative source for merge verification instead of unreliable git commands</purpose>
|
|
121
|
+
</step_4>
|
|
122
|
+
|
|
123
|
+
<step_4_5>
|
|
124
|
+
<description>Check and close related GitHub issue</description>
|
|
125
|
+
<if_issue_found>
|
|
126
|
+
<get_issue_details>
|
|
127
|
+
<tool>mcp**github**issue_read</tool>
|
|
128
|
+
<method>get</method>
|
|
129
|
+
<extract_repo>From issue reference (main-repo vs cross-repo)</extract_repo>
|
|
130
|
+
</get_issue_details>
|
|
131
|
+
<check_issue_state>
|
|
132
|
+
<if_open>
|
|
133
|
+
<ask_close>Ask user: "Related issue #{number} is still open. Should I close it? (y/N)"</ask_close>
|
|
134
|
+
<if_yes_close>
|
|
135
|
+
<add_closing_comment>
|
|
136
|
+
<tool>mcp**github**add_issue_comment</tool>
|
|
137
|
+
<body_template>Closing this issue as branch {branch_name} was merged to main on {merge_date} via PR #{pr_number}.</body_template>
|
|
138
|
+
<get_merge_date>Extract merge date from PR details</get_merge_date>
|
|
139
|
+
<get_pr_number>Use PR number from search results</get_pr_number>
|
|
140
|
+
</add_closing_comment>
|
|
141
|
+
<close_issue>
|
|
142
|
+
<tool>mcp**github**issue_write</tool>
|
|
143
|
+
<method>update</method>
|
|
144
|
+
<state>closed</state>
|
|
145
|
+
<state_reason>completed</state_reason>
|
|
146
|
+
</close_issue>
|
|
147
|
+
</if_yes_close>
|
|
148
|
+
</if_open>
|
|
149
|
+
<if_closed>Inform user issue is already closed</if_closed>
|
|
150
|
+
</check_issue_state>
|
|
151
|
+
</if_issue_found>
|
|
152
|
+
<if_no_issue>Continue without issue management</if_no_issue>
|
|
153
|
+
<purpose>Ensure proper issue lifecycle management</purpose>
|
|
154
|
+
</step_4_5>
|
|
155
|
+
|
|
156
|
+
<step_5>
|
|
157
|
+
<description>Check if worktree is locked</description>
|
|
158
|
+
<check_command>git worktree list --porcelain | grep -A5 "worktree {path}" | grep "locked"</check_command>
|
|
159
|
+
<if_locked>
|
|
160
|
+
<unlock_command>git worktree unlock {path}</unlock_command>
|
|
161
|
+
<notify_user>Inform user that worktree was unlocked</notify_user>
|
|
162
|
+
</if_locked>
|
|
163
|
+
<purpose>Unlock worktree if it was locked for tracking purposes</purpose>
|
|
164
|
+
</step_5>
|
|
165
|
+
|
|
166
|
+
<step_6>
|
|
167
|
+
<description>Analyze Claude settings differences</description>
|
|
168
|
+
<read_main_settings>.claude/settings.local.json</read_main_settings>
|
|
169
|
+
<read_worktree_settings>{worktree_path}/.claude/settings.local.json</read_worktree_settings>
|
|
170
|
+
<compare_allow_lists>
|
|
171
|
+
<extract_main_allows>Extract "allow" array from main settings</extract_main_allows>
|
|
172
|
+
<extract_worktree_allows>Extract "allow" array from worktree settings</extract_worktree_allows>
|
|
173
|
+
<find_differences>Identify entries in worktree that are not in main</find_differences>
|
|
174
|
+
</compare_allow_lists>
|
|
175
|
+
<filter_suggestions>
|
|
176
|
+
<include_filesystem>Read permissions for filesystem paths</include_filesystem>
|
|
177
|
+
<exclude_intrusive>Exclude bash commands, write permissions, etc.</exclude_intrusive>
|
|
178
|
+
<focus_user_specific>Include only user-specific, non-disruptive entries</focus_user_specific>
|
|
179
|
+
</filter_suggestions>
|
|
180
|
+
<purpose>Identify useful settings to consolidate before cleanup</purpose>
|
|
181
|
+
</step_6>
|
|
182
|
+
|
|
183
|
+
<step_7>
|
|
184
|
+
<description>Suggest settings consolidation</description>
|
|
185
|
+
<if_differences_found>
|
|
186
|
+
<display_suggestions>Show filtered differences to user</display_suggestions>
|
|
187
|
+
<ask_confirmation>Ask user which entries to add to main settings</ask_confirmation>
|
|
188
|
+
<apply_changes>Update main .claude/settings.local.json with selected entries</apply_changes>
|
|
189
|
+
</if_differences_found>
|
|
190
|
+
<if_no_differences>Inform user no settings need consolidation</if_no_differences>
|
|
191
|
+
<purpose>Preserve useful development settings before removing worktree</purpose>
|
|
192
|
+
</step_7>
|
|
193
|
+
|
|
194
|
+
<step_8>
|
|
195
|
+
<description>Final cleanup confirmation</description>
|
|
196
|
+
|
|
197
|
+
<summary>
|
|
198
|
+
<display_worktree>Show worktree path and branch name</display_worktree>
|
|
199
|
+
<show_pr_status>Show merged PR details if found</show_pr_status>
|
|
200
|
+
<show_issue_status>Show related issue status if found</show_issue_status>
|
|
201
|
+
<show_last_activity>Display directory creation/modification date</show_last_activity>
|
|
202
|
+
</summary>
|
|
203
|
+
<safety_checks>
|
|
204
|
+
<check_uncommitted>git status --porcelain in worktree directory</check_uncommitted>
|
|
205
|
+
<warn_if_dirty>Alert user if uncommitted changes exist</warn_if_dirty>
|
|
206
|
+
</safety_checks>
|
|
207
|
+
<ask_deletion>Ask user confirmation: "Delete this worktree? (y/N)"</ask_deletion>
|
|
208
|
+
<purpose>Final safety check before irreversible deletion</purpose>
|
|
209
|
+
</step_8>
|
|
210
|
+
|
|
211
|
+
<step_9>
|
|
212
|
+
<description>Delete worktree</description>
|
|
213
|
+
<if_confirmed>
|
|
214
|
+
<remove_worktree>git worktree remove {path} --force</remove_worktree>
|
|
215
|
+
<cleanup_branch>git branch -d {branch_name}</cleanup_branch>
|
|
216
|
+
<success_message>Inform user worktree was successfully removed</success_message>
|
|
217
|
+
<next_steps>Suggest running command again to find next candidate</next_steps>
|
|
218
|
+
</if_confirmed>
|
|
219
|
+
<if_declined>Exit gracefully with no changes</if_declined>
|
|
220
|
+
<purpose>Perform the actual cleanup and guide user for next iteration</purpose>
|
|
221
|
+
</step_9>
|
|
225
222
|
</execution_steps>
|
|
226
223
|
|
|
227
224
|
<important_notes>
|
|
@@ -239,8 +236,7 @@ Current worktrees: !git worktree list`
|
|
|
239
236
|
- Processes one worktree at a time to maintain control
|
|
240
237
|
- Must be run from main branch for safety
|
|
241
238
|
- Works with standard GitHub repository URLs (owner/repo format)
|
|
242
|
-
</important_notes>
|
|
243
|
-
|
|
239
|
+
</important_notes>
|
|
244
240
|
|
|
245
241
|
## 🛡 Project Rules (Injected into every command)
|
|
246
242
|
|
|
@@ -266,7 +262,7 @@ Current worktrees: !git worktree list`
|
|
|
266
262
|
4. **API KEY MANAGEMENT:**
|
|
267
263
|
- Support three loading methods:
|
|
268
264
|
- Server environment variables
|
|
269
|
-
-
|
|
265
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
270
266
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
271
267
|
- Never hardcode API keys
|
|
272
268
|
- Always validate key availability before use
|
|
@@ -291,4 +287,4 @@ Current worktrees: !git worktree list`
|
|
|
291
287
|
- Code examples
|
|
292
288
|
- Testing notes
|
|
293
289
|
- Document expected behavior and edge cases
|
|
294
|
-
- Include real-world output examples
|
|
290
|
+
- Include real-world output examples
|
package/CHANGELOG.md
CHANGED
|
@@ -1,97 +1,115 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to
|
|
4
|
-
|
|
5
|
-
## [
|
|
6
|
-
|
|
7
|
-
### Added
|
|
8
|
-
- **UI Page Mode** - Full `/hustle-ui-create-page` workflow with dedicated documentation
|
|
9
|
-
- Page types: landing, dashboard, form, list, detail, auth
|
|
10
|
-
- Playwright E2E test generation (15+ test cases)
|
|
11
|
-
- Data schema validation before implementation
|
|
12
|
-
- **Page-Specific Hooks**
|
|
13
|
-
- `check-api-routes.py` - Verifies required API routes exist before page implementation
|
|
14
|
-
- `enforce-page-components.py` - Checks registry for reusable components
|
|
15
|
-
- `enforce-page-data-schema.py` - Validates API response types defined
|
|
16
|
-
- `enforce-a11y-audit.py` - Triggers WCAG audit after TDD Green phase
|
|
17
|
-
- **Combine Workflow Validation**
|
|
18
|
-
- 2+ API selection enforcement
|
|
19
|
-
- Registry verification for source APIs
|
|
20
|
-
- Flow type validation (sequential, parallel, conditional)
|
|
21
|
-
- Orchestration examples in manifest generation
|
|
22
|
-
- **Brand Color Validation** in `enforce-brand-guide.py`
|
|
23
|
-
- Extracts allowed colors from BRAND_GUIDE.md
|
|
24
|
-
- Validates hex colors, Tailwind classes, CSS variables
|
|
25
|
-
- Notifies on non-brand color usage
|
|
26
|
-
- **UI Showcase Auto-Population** in `update-ui-showcase.py`
|
|
27
|
-
- Generates `data.json` from registry automatically
|
|
28
|
-
- Component and page metadata extraction
|
|
29
|
-
|
|
30
|
-
### Changed
|
|
31
|
-
- **State Template** (`api-dev-state.json`)
|
|
32
|
-
- Added `workflow` field: api-create, combine-api, ui-create-component, ui-create-page
|
|
33
|
-
- Added `combine_config` section for orchestration settings
|
|
34
|
-
- Added `ui_config` section for component/page settings
|
|
35
|
-
- **Session Startup** (`session-startup.py`)
|
|
36
|
-
- Workflow-specific context injection
|
|
37
|
-
- Combine: source APIs, flow type, error strategy
|
|
38
|
-
- UI: brand guide status, component/page type, a11y level
|
|
39
|
-
- **Manifest Generation** (`generate-manifest-entry.py`)
|
|
40
|
-
- Orchestration examples for combined endpoints
|
|
41
|
-
- Flow diagrams and error handling examples
|
|
42
|
-
- Version updated to 3.10.0
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [1.0.1] - 2025-12-28
|
|
43
6
|
|
|
44
7
|
### Fixed
|
|
45
|
-
- Phase numbering now correctly uses 1-13 (was 0-12 in some files)
|
|
46
|
-
- Workflow type detection in api-workflow-check.py for all workflow types
|
|
47
8
|
|
|
48
|
-
|
|
9
|
+
- **Stop hook false positive blocking**: Fixed bug where `api-workflow-check.py` incorrectly blocked Q&A sessions when no workflow was active. The hook now correctly checks for both `None` and `"not_started"` phase statuses.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## [1.0.0] - 2025-12-28
|
|
14
|
+
|
|
15
|
+
### Initial Release
|
|
16
|
+
|
|
17
|
+
Interview-driven, research-first API development toolkit with 14-phase TDD workflow.
|
|
18
|
+
|
|
19
|
+
### Core Features
|
|
20
|
+
|
|
21
|
+
**Four Main Workflows:**
|
|
22
|
+
|
|
23
|
+
- `/api-create [endpoint]` - Complete 14-phase API endpoint development
|
|
24
|
+
- `/hustle-ui-create [name]` - Component development with Storybook
|
|
25
|
+
- `/hustle-ui-create-page [name]` - Page development with Playwright E2E
|
|
26
|
+
- `/hustle-combine [type]` - Orchestrate multiple existing APIs
|
|
27
|
+
|
|
28
|
+
**14-Phase Workflow:**
|
|
29
|
+
|
|
30
|
+
1. Disambiguation - Clarify ambiguous terms
|
|
31
|
+
2. Scope - Confirm understanding
|
|
32
|
+
3. Initial Research - Context7 + WebSearch (with async parallel subagents)
|
|
33
|
+
4. Interview - Questions FROM research findings
|
|
34
|
+
5. Deep Research - Adaptive searches based on answers
|
|
35
|
+
6. Schema - Zod schema from research + interview
|
|
36
|
+
7. Environment - Verify API keys exist
|
|
37
|
+
8. TDD Red - Write failing tests
|
|
38
|
+
9. TDD Green - Minimal implementation to pass
|
|
39
|
+
10. Verify - Re-research and compare to implementation
|
|
40
|
+
11. Code Review - Greptile AI-powered review (catches issues early)
|
|
41
|
+
12. TDD Refactor - Fix review issues + clean up code
|
|
42
|
+
13. Documentation - Update manifests, cache research
|
|
43
|
+
14. Completion - Final commit and PR
|
|
44
|
+
|
|
45
|
+
**23 Enforcement Hooks:**
|
|
46
|
+
|
|
47
|
+
- SessionStart: State context injection
|
|
48
|
+
- UserPromptSubmit: Research requirement detection
|
|
49
|
+
- PreToolUse: Block writes until phases complete
|
|
50
|
+
- PostToolUse: Auto-format, token tracking, notifications, code review
|
|
51
|
+
- Stop: Block if workflow incomplete
|
|
52
|
+
|
|
53
|
+
**Greptile AI Code Review (Phase 11):**
|
|
54
|
+
|
|
55
|
+
- Runs BEFORE refactoring so issues can be fixed
|
|
56
|
+
- Bug detection with full codebase context
|
|
57
|
+
- Security vulnerability scanning (OWASP top 10)
|
|
58
|
+
- Performance issue identification
|
|
59
|
+
- Returns actionable issues with file:line references
|
|
60
|
+
- Requires: GREPTILE_API_KEY + GITHUB_TOKEN
|
|
61
|
+
|
|
62
|
+
**Async Parallel Research:**
|
|
63
|
+
|
|
64
|
+
- Spawn multiple research subagents in parallel
|
|
65
|
+
- Use Ctrl+B to background agents
|
|
66
|
+
- Use /tasks to monitor progress
|
|
67
|
+
- 3x faster research with parallel Context7 + WebSearch
|
|
68
|
+
|
|
69
|
+
**7 Subagents:**
|
|
70
|
+
|
|
71
|
+
- `parallel-researcher` (Haiku) - Parallel documentation scraping
|
|
72
|
+
- `research-validator` (Haiku) - Find all endpoints and webhooks
|
|
73
|
+
- `docs-generator` (Haiku) - TypeDoc generation
|
|
74
|
+
- `schema-generator` (Sonnet) - Zod schema creation
|
|
75
|
+
- `test-writer` (Sonnet) - Comprehensive test generation
|
|
76
|
+
- `implementation-reviewer` (Sonnet) - Compare code to docs
|
|
77
|
+
- `code-reviewer` (Sonnet) - Security and performance review
|
|
49
78
|
|
|
50
|
-
|
|
51
|
-
- Animated Hero Header with 3D perspective grid
|
|
52
|
-
- Dev Tools landing page at `/dev-tools`
|
|
53
|
-
- Multi-endpoint selector for APIs with sub-endpoints
|
|
54
|
-
- Audio playback for TTS/voice API responses
|
|
55
|
-
- CLI flags: `--with-sandpack`, `--with-storybook`, `--with-playwright`
|
|
79
|
+
**NTFY Push Notifications:**
|
|
56
80
|
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
81
|
+
- Phase completion updates
|
|
82
|
+
- Input needed alerts (interview questions)
|
|
83
|
+
- Token usage per phase
|
|
84
|
+
- `/ntfy-setup` and `/ntfy-test` commands
|
|
61
85
|
|
|
62
|
-
|
|
86
|
+
**Component Type System:**
|
|
63
87
|
|
|
64
|
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
- ShadCN component detection in Phase 5
|
|
68
|
-
- 4-step verification (desktop/tablet/mobile + brand + tests + memory)
|
|
69
|
-
- UI Showcase auto-generation at `/ui-showcase`
|
|
88
|
+
- Basic components (single-purpose, few props)
|
|
89
|
+
- Complex components (multi-part, user flows)
|
|
90
|
+
- AI suggests type, user confirms via hook
|
|
70
91
|
|
|
71
|
-
|
|
92
|
+
**CLI Installer:**
|
|
72
93
|
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
- Orchestration flow types: sequential, parallel, conditional
|
|
94
|
+
- ASCII art banner with Hustle branding
|
|
95
|
+
- 8-step progress indicators
|
|
96
|
+
- Animated spinners for long operations
|
|
97
|
+
- Optional tools: Storybook, Playwright, Sandpack
|
|
78
98
|
|
|
79
|
-
|
|
99
|
+
**Additional Commands:**
|
|
80
100
|
|
|
81
|
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
- Session logging in api-sessions/
|
|
101
|
+
- TDD: `/red`, `/green`, `/refactor`, `/cycle`
|
|
102
|
+
- Git: `/commit`, `/pr`, `/busycommit`
|
|
103
|
+
- Planning: `/plan`, `/gap`, `/issue`
|
|
104
|
+
- Worktrees: `/worktree-add`, `/worktree-cleanup`
|
|
86
105
|
|
|
87
|
-
|
|
106
|
+
**Infrastructure:**
|
|
88
107
|
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
- Gap fixes for file tracking and verification
|
|
108
|
+
- State tracking in `.claude/api-dev-state.json`
|
|
109
|
+
- Research cache with 7-day freshness
|
|
110
|
+
- Registry for all created APIs/components
|
|
111
|
+
- Environment template in `templates/.env.example`
|
|
94
112
|
|
|
95
113
|
---
|
|
96
114
|
|
|
97
|
-
|
|
115
|
+
See [ROADMAP.md](./ROADMAP.md) for planned features.
|