@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
package/.skills/cycle/SKILL.md
CHANGED
|
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
description: Execute complete TDD cycle - Red, Green, and Refactor phases in sequence
|
|
16
17
|
argument-hint: <feature or requirement description>
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
RED+GREEN+REFACTOR (one cycle) PHASE! Apply the below to the info given by user input here:
|
|
@@ -37,7 +39,6 @@ $ARGUMENTS
|
|
|
37
39
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
38
40
|
|
|
39
41
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
40
|
-
|
|
41
42
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
42
43
|
- Only one test at a time - this is critical for TDD discipline
|
|
43
44
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -47,7 +48,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
47
48
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
48
49
|
|
|
49
50
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
50
|
-
|
|
51
51
|
- Implement only what's needed for the current failing test
|
|
52
52
|
- No anticipatory coding or extra features
|
|
53
53
|
- Address the specific failure message
|
|
@@ -61,12 +61,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
61
61
|
### Core Violations
|
|
62
62
|
|
|
63
63
|
1. **Multiple Test Addition**
|
|
64
|
-
|
|
65
64
|
- Adding more than one new test at once
|
|
66
65
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
67
66
|
|
|
68
67
|
2. **Over-Implementation**
|
|
69
|
-
|
|
70
68
|
- Code that exceeds what's needed to pass the current failing test
|
|
71
69
|
- Adding untested features, methods, or error handling
|
|
72
70
|
- Implementing multiple methods when test only requires one
|
|
@@ -102,7 +100,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
102
100
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
103
101
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
104
102
|
|
|
105
|
-
|
|
106
103
|
## 🛡 Project Rules (Injected into every command)
|
|
107
104
|
|
|
108
105
|
1. **NO BROKEN BUILDS:**
|
|
@@ -127,7 +124,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
127
124
|
4. **API KEY MANAGEMENT:**
|
|
128
125
|
- Support three loading methods:
|
|
129
126
|
- Server environment variables
|
|
130
|
-
-
|
|
127
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
131
128
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
132
129
|
- Never hardcode API keys
|
|
133
130
|
- Always validate key availability before use
|
|
@@ -152,4 +149,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
152
149
|
- Code examples
|
|
153
150
|
- Testing notes
|
|
154
151
|
- Document expected behavior and edge cases
|
|
155
|
-
- Include real-world output examples
|
|
152
|
+
- Include real-world output examples
|
package/.skills/gap/SKILL.md
CHANGED
|
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
description: Analyze conversation context for unaddressed items and gaps
|
|
16
17
|
argument-hint: [optional additional info]
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
## General Guidelines
|
|
@@ -46,7 +48,6 @@ If there are no gaps, confirm that everything discussed has been addressed.
|
|
|
46
48
|
Additional info:
|
|
47
49
|
$ARGUMENTS
|
|
48
50
|
|
|
49
|
-
|
|
50
51
|
## 🛡 Project Rules (Injected into every command)
|
|
51
52
|
|
|
52
53
|
1. **NO BROKEN BUILDS:**
|
|
@@ -71,7 +72,7 @@ $ARGUMENTS
|
|
|
71
72
|
4. **API KEY MANAGEMENT:**
|
|
72
73
|
- Support three loading methods:
|
|
73
74
|
- Server environment variables
|
|
74
|
-
-
|
|
75
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
75
76
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
76
77
|
- Never hardcode API keys
|
|
77
78
|
- Always validate key availability before use
|
|
@@ -96,4 +97,4 @@ $ARGUMENTS
|
|
|
96
97
|
- Code examples
|
|
97
98
|
- Testing notes
|
|
98
99
|
- Document expected behavior and edge cases
|
|
99
|
-
- Include real-world output examples
|
|
100
|
+
- Include real-world output examples
|
package/.skills/green/SKILL.md
CHANGED
|
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
description: Execute TDD Green Phase - write minimal implementation to pass the failing test
|
|
16
17
|
argument-hint: <implementation description>
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
GREEN PHASE! Apply the below to the info given by user input here:
|
|
@@ -37,7 +39,6 @@ $ARGUMENTS
|
|
|
37
39
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
38
40
|
|
|
39
41
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
40
|
-
|
|
41
42
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
42
43
|
- Only one test at a time - this is critical for TDD discipline
|
|
43
44
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -47,7 +48,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
47
48
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
48
49
|
|
|
49
50
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
50
|
-
|
|
51
51
|
- Implement only what's needed for the current failing test
|
|
52
52
|
- No anticipatory coding or extra features
|
|
53
53
|
- Address the specific failure message
|
|
@@ -61,12 +61,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
61
61
|
### Core Violations
|
|
62
62
|
|
|
63
63
|
1. **Multiple Test Addition**
|
|
64
|
-
|
|
65
64
|
- Adding more than one new test at once
|
|
66
65
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
67
66
|
|
|
68
67
|
2. **Over-Implementation**
|
|
69
|
-
|
|
70
68
|
- Code that exceeds what's needed to pass the current failing test
|
|
71
69
|
- Adding untested features, methods, or error handling
|
|
72
70
|
- Implementing multiple methods when test only requires one
|
|
@@ -102,7 +100,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
102
100
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
103
101
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
104
102
|
|
|
105
|
-
|
|
106
103
|
## 🛡 Project Rules (Injected into every command)
|
|
107
104
|
|
|
108
105
|
1. **NO BROKEN BUILDS:**
|
|
@@ -127,7 +124,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
127
124
|
4. **API KEY MANAGEMENT:**
|
|
128
125
|
- Support three loading methods:
|
|
129
126
|
- Server environment variables
|
|
130
|
-
-
|
|
127
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
131
128
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
132
129
|
- Never hardcode API keys
|
|
133
130
|
- Always validate key availability before use
|
|
@@ -152,4 +149,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
152
149
|
- Code examples
|
|
153
150
|
- Testing notes
|
|
154
151
|
- Document expected behavior and edge cases
|
|
155
|
-
- Include real-world output examples
|
|
152
|
+
- Include real-world output examples
|
package/.skills/issue/SKILL.md
CHANGED
|
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
description: Analyze GitHub issue and create TDD implementation plan
|
|
16
17
|
argument-hint: [optional-issue-number]
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
Analyze GitHub issue and create TDD implementation plan.
|
|
@@ -37,7 +39,7 @@ Process:
|
|
|
37
39
|
|
|
38
40
|
1. Fetch Issue
|
|
39
41
|
|
|
40
|
-
Try to fetch the issue using GitHub MCP (
|
|
42
|
+
Try to fetch the issue using GitHub MCP (mcp**github**issue_read tool).
|
|
41
43
|
|
|
42
44
|
If GitHub MCP is not configured, show:
|
|
43
45
|
|
|
@@ -87,7 +89,6 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
87
89
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
88
90
|
|
|
89
91
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
90
|
-
|
|
91
92
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
92
93
|
- Only one test at a time - this is critical for TDD discipline
|
|
93
94
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -97,7 +98,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
97
98
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
98
99
|
|
|
99
100
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
100
|
-
|
|
101
101
|
- Implement only what's needed for the current failing test
|
|
102
102
|
- No anticipatory coding or extra features
|
|
103
103
|
- Address the specific failure message
|
|
@@ -111,12 +111,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
111
111
|
### Core Violations
|
|
112
112
|
|
|
113
113
|
1. **Multiple Test Addition**
|
|
114
|
-
|
|
115
114
|
- Adding more than one new test at once
|
|
116
115
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
117
116
|
|
|
118
117
|
2. **Over-Implementation**
|
|
119
|
-
|
|
120
118
|
- Code that exceeds what's needed to pass the current failing test
|
|
121
119
|
- Adding untested features, methods, or error handling
|
|
122
120
|
- Implementing multiple methods when test only requires one
|
|
@@ -152,7 +150,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
152
150
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
153
151
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
154
152
|
|
|
155
|
-
|
|
156
153
|
## 🛡 Project Rules (Injected into every command)
|
|
157
154
|
|
|
158
155
|
1. **NO BROKEN BUILDS:**
|
|
@@ -177,7 +174,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
177
174
|
4. **API KEY MANAGEMENT:**
|
|
178
175
|
- Support three loading methods:
|
|
179
176
|
- Server environment variables
|
|
180
|
-
-
|
|
177
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
181
178
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
182
179
|
- Never hardcode API keys
|
|
183
180
|
- Always validate key availability before use
|
|
@@ -202,4 +199,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
202
199
|
- Code examples
|
|
203
200
|
- Testing notes
|
|
204
201
|
- Document expected behavior and edge cases
|
|
205
|
-
- Include real-world output examples
|
|
202
|
+
- Include real-world output examples
|
package/.skills/plan/SKILL.md
CHANGED
|
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
description: Create implementation plan from feature/requirement with PRD-style discovery and TDD acceptance criteria
|
|
16
17
|
argument-hint: <feature/requirement description or GitHub issue URL/number>
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
# Plan: PRD-Informed Task Planning for TDD
|
|
@@ -128,7 +130,6 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
128
130
|
- **Before /plan**: Use `/spike` if you need technical exploration first
|
|
129
131
|
- **After /plan**: Use `/red` to start TDD on first task
|
|
130
132
|
|
|
131
|
-
|
|
132
133
|
## 🛡 Project Rules (Injected into every command)
|
|
133
134
|
|
|
134
135
|
1. **NO BROKEN BUILDS:**
|
|
@@ -153,7 +154,7 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
153
154
|
4. **API KEY MANAGEMENT:**
|
|
154
155
|
- Support three loading methods:
|
|
155
156
|
- Server environment variables
|
|
156
|
-
-
|
|
157
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
157
158
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
158
159
|
- Never hardcode API keys
|
|
159
160
|
- Always validate key availability before use
|
|
@@ -178,4 +179,4 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
178
179
|
- Code examples
|
|
179
180
|
- Testing notes
|
|
180
181
|
- Document expected behavior and edge cases
|
|
181
|
-
- Include real-world output examples
|
|
182
|
+
- Include real-world output examples
|
package/.skills/pr/SKILL.md
CHANGED
|
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
description: Creates a pull request using GitHub MCP
|
|
16
17
|
argument-hint: [optional-pr-title-and-description]
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
# Create Pull Request
|
|
@@ -82,7 +84,6 @@ Arguments: $ARGUMENTS
|
|
|
82
84
|
3. Set the base branch (default: main)
|
|
83
85
|
4. Include relevant issue references if found in commit messages
|
|
84
86
|
|
|
85
|
-
|
|
86
87
|
## 🛡 Project Rules (Injected into every command)
|
|
87
88
|
|
|
88
89
|
1. **NO BROKEN BUILDS:**
|
|
@@ -107,7 +108,7 @@ Arguments: $ARGUMENTS
|
|
|
107
108
|
4. **API KEY MANAGEMENT:**
|
|
108
109
|
- Support three loading methods:
|
|
109
110
|
- Server environment variables
|
|
110
|
-
-
|
|
111
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
111
112
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
112
113
|
- Never hardcode API keys
|
|
113
114
|
- Always validate key availability before use
|
|
@@ -132,4 +133,4 @@ Arguments: $ARGUMENTS
|
|
|
132
133
|
- Code examples
|
|
133
134
|
- Testing notes
|
|
134
135
|
- Document expected behavior and edge cases
|
|
135
|
-
- Include real-world output examples
|
|
136
|
+
- Include real-world output examples
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: publish
|
|
3
|
+
description: Publish npm package with incremental versioning (patch/minor/major). Verifies git status, bumps version, commits, pushes, and publishes. Keywords: npm, publish, version, release, semver
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires npm login, git configured, optional 2FA
|
|
6
|
+
metadata:
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
category: "release"
|
|
9
|
+
tags: ['npm', 'publish', 'version', 'release', 'semver']
|
|
10
|
+
author: "Hustle Together"
|
|
11
|
+
allowed-tools: Bash Read Edit AskUserQuestion TodoWrite
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
description: Publish npm package with incremental version bump
|
|
17
|
+
argument-hint: [patch|minor|major] or [specific-version]
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
Publish the npm package with safe, incremental versioning. Defaults to patch bump unless specified otherwise.
|
|
24
|
+
|
|
25
|
+
## Arguments
|
|
26
|
+
|
|
27
|
+
- `patch` (default) - Always use 0.0.1 increments (3.12.0 → 3.12.1)
|
|
28
|
+
- `minor` - New features, backwards compatible (3.12.0 → 3.13.0) - requires confirmation
|
|
29
|
+
- `major` - Breaking changes (3.12.0 → 4.0.0) - requires confirmation
|
|
30
|
+
- `X.Y.Z` - Specific version - requires confirmation if jump > 0.0.1
|
|
31
|
+
|
|
32
|
+
**Default behavior:** Always increment by 0.0.1 (patch) unless explicitly specified otherwise.
|
|
33
|
+
|
|
34
|
+
Include any of the following info if specified: $ARGUMENTS
|
|
35
|
+
|
|
36
|
+
## Process
|
|
37
|
+
|
|
38
|
+
### Phase 1: Pre-flight Checks
|
|
39
|
+
|
|
40
|
+
1. **Verify clean working directory**
|
|
41
|
+
```bash
|
|
42
|
+
git status --porcelain
|
|
43
|
+
```
|
|
44
|
+
- If dirty, ask user to commit or stash changes first
|
|
45
|
+
- Exception: allow `.claude/` runtime files
|
|
46
|
+
|
|
47
|
+
2. **Check npm login**
|
|
48
|
+
```bash
|
|
49
|
+
npm whoami
|
|
50
|
+
```
|
|
51
|
+
- If not logged in, prompt user to run `npm login`
|
|
52
|
+
|
|
53
|
+
3. **Check current versions**
|
|
54
|
+
```bash
|
|
55
|
+
# Local version
|
|
56
|
+
node -p "require('./package.json').version"
|
|
57
|
+
|
|
58
|
+
# Published version
|
|
59
|
+
npm view $(node -p "require('./package.json').name") version 2>/dev/null || echo "Not yet published"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
4. **Verify on correct branch** (master/main)
|
|
63
|
+
```bash
|
|
64
|
+
git branch --show-current
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Phase 2: Version Bump
|
|
68
|
+
|
|
69
|
+
1. **Determine new version** based on argument:
|
|
70
|
+
- Parse $ARGUMENTS for: patch, minor, major, or X.Y.Z
|
|
71
|
+
- Default to `patch` if not specified
|
|
72
|
+
- Calculate new version from current
|
|
73
|
+
|
|
74
|
+
2. **Ask for confirmation**
|
|
75
|
+
Use AskUserQuestion:
|
|
76
|
+
- Show current version → new version
|
|
77
|
+
- Ask to confirm or specify different version
|
|
78
|
+
|
|
79
|
+
3. **Update package.json**
|
|
80
|
+
- Edit version field only
|
|
81
|
+
- Do NOT use `npm version` (it auto-commits)
|
|
82
|
+
|
|
83
|
+
### Phase 3: Commit and Push
|
|
84
|
+
|
|
85
|
+
1. **Commit the version bump**
|
|
86
|
+
```bash
|
|
87
|
+
git add package.json
|
|
88
|
+
git commit -m "chore: bump version to X.Y.Z"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
2. **Push to remote**
|
|
92
|
+
```bash
|
|
93
|
+
git push origin $(git branch --show-current)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Phase 4: Publish
|
|
97
|
+
|
|
98
|
+
1. **Attempt publish**
|
|
99
|
+
```bash
|
|
100
|
+
npm publish --access public
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
2. **Handle 2FA** (if required)
|
|
104
|
+
- If OTP error, inform user:
|
|
105
|
+
```
|
|
106
|
+
npm publish --access public --otp=YOUR_CODE
|
|
107
|
+
```
|
|
108
|
+
- User must run manually with their authenticator code
|
|
109
|
+
|
|
110
|
+
3. **Verify publication**
|
|
111
|
+
```bash
|
|
112
|
+
npm view $(node -p "require('./package.json').name") version
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Example Usage
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Default patch bump (3.12.0 → 3.12.1)
|
|
119
|
+
/publish
|
|
120
|
+
|
|
121
|
+
# Minor bump (3.12.0 → 3.13.0)
|
|
122
|
+
/publish minor
|
|
123
|
+
|
|
124
|
+
# Major bump (3.12.0 → 4.0.0)
|
|
125
|
+
/publish major
|
|
126
|
+
|
|
127
|
+
# Specific version
|
|
128
|
+
/publish 3.15.0
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Safety Rules
|
|
132
|
+
|
|
133
|
+
1. **Never skip version checks** - Always compare local vs published
|
|
134
|
+
2. **Never force publish** - If version exists, bump first
|
|
135
|
+
3. **Always commit before publish** - Version bump must be in git
|
|
136
|
+
4. **Always push before publish** - Remote should match local
|
|
137
|
+
5. **0.0.1 increments only** - Default to patch bumps; require confirmation for minor/major
|
|
138
|
+
6. **No big jumps** - Any jump > 0.0.1 requires explicit user confirmation
|
|
139
|
+
|
|
140
|
+
## Error Handling
|
|
141
|
+
|
|
142
|
+
| Error | Action |
|
|
143
|
+
|-------|--------|
|
|
144
|
+
| Dirty git status | Ask user to commit/stash |
|
|
145
|
+
| Not logged in | Prompt `npm login` |
|
|
146
|
+
| Version exists | Bump version first |
|
|
147
|
+
| OTP required | Show command with --otp flag |
|
|
148
|
+
| Push failed | Check remote access |
|
|
149
|
+
|
|
150
|
+
## TodoWrite Integration
|
|
151
|
+
|
|
152
|
+
Initialize with:
|
|
153
|
+
```
|
|
154
|
+
1. Pre-flight checks (git, npm, versions)
|
|
155
|
+
2. Calculate version bump
|
|
156
|
+
3. Update package.json
|
|
157
|
+
4. Commit and push
|
|
158
|
+
5. Publish to npm
|
|
159
|
+
6. Verify publication
|
|
160
|
+
```
|
package/.skills/red/SKILL.md
CHANGED
|
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
description: Execute TDD Red Phase - write ONE failing test
|
|
16
17
|
argument-hint: [optional additional info]
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
RED PHASE! Apply the below to the info given by user input here:
|
|
@@ -37,7 +39,6 @@ $ARGUMENTS
|
|
|
37
39
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
38
40
|
|
|
39
41
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
40
|
-
|
|
41
42
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
42
43
|
- Only one test at a time - this is critical for TDD discipline
|
|
43
44
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -47,7 +48,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
47
48
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
48
49
|
|
|
49
50
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
50
|
-
|
|
51
51
|
- Implement only what's needed for the current failing test
|
|
52
52
|
- No anticipatory coding or extra features
|
|
53
53
|
- Address the specific failure message
|
|
@@ -61,12 +61,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
61
61
|
### Core Violations
|
|
62
62
|
|
|
63
63
|
1. **Multiple Test Addition**
|
|
64
|
-
|
|
65
64
|
- Adding more than one new test at once
|
|
66
65
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
67
66
|
|
|
68
67
|
2. **Over-Implementation**
|
|
69
|
-
|
|
70
68
|
- Code that exceeds what's needed to pass the current failing test
|
|
71
69
|
- Adding untested features, methods, or error handling
|
|
72
70
|
- Implementing multiple methods when test only requires one
|
|
@@ -102,7 +100,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
102
100
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
103
101
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
104
102
|
|
|
105
|
-
|
|
106
103
|
## 🛡 Project Rules (Injected into every command)
|
|
107
104
|
|
|
108
105
|
1. **NO BROKEN BUILDS:**
|
|
@@ -127,7 +124,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
127
124
|
4. **API KEY MANAGEMENT:**
|
|
128
125
|
- Support three loading methods:
|
|
129
126
|
- Server environment variables
|
|
130
|
-
-
|
|
127
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
131
128
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
132
129
|
- Never hardcode API keys
|
|
133
130
|
- Always validate key availability before use
|
|
@@ -152,4 +149,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
152
149
|
- Code examples
|
|
153
150
|
- Testing notes
|
|
154
151
|
- Document expected behavior and edge cases
|
|
155
|
-
- Include real-world output examples
|
|
152
|
+
- Include real-world output examples
|
|
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
description: Execute TDD Refactor Phase - improve code structure while keeping tests green
|
|
16
17
|
argument-hint: <refactoring description>
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
Apply this document (specifically the Refactor phase), to the info given by user input here: $ARGUMENTS
|
|
@@ -35,7 +37,6 @@ Apply this document (specifically the Refactor phase), to the info given by user
|
|
|
35
37
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
36
38
|
|
|
37
39
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
38
|
-
|
|
39
40
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
40
41
|
- Only one test at a time - this is critical for TDD discipline
|
|
41
42
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -45,7 +46,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
45
46
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
46
47
|
|
|
47
48
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
48
|
-
|
|
49
49
|
- Implement only what's needed for the current failing test
|
|
50
50
|
- No anticipatory coding or extra features
|
|
51
51
|
- Address the specific failure message
|
|
@@ -59,12 +59,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
59
59
|
### Core Violations
|
|
60
60
|
|
|
61
61
|
1. **Multiple Test Addition**
|
|
62
|
-
|
|
63
62
|
- Adding more than one new test at once
|
|
64
63
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
65
64
|
|
|
66
65
|
2. **Over-Implementation**
|
|
67
|
-
|
|
68
66
|
- Code that exceeds what's needed to pass the current failing test
|
|
69
67
|
- Adding untested features, methods, or error handling
|
|
70
68
|
- Implementing multiple methods when test only requires one
|
|
@@ -102,7 +100,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
102
100
|
|
|
103
101
|
1. **Consistency check** - Look for inconsistent patterns, naming conventions, or structure across the codebase
|
|
104
102
|
|
|
105
|
-
|
|
106
103
|
## 🛡 Project Rules (Injected into every command)
|
|
107
104
|
|
|
108
105
|
1. **NO BROKEN BUILDS:**
|
|
@@ -127,7 +124,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
127
124
|
4. **API KEY MANAGEMENT:**
|
|
128
125
|
- Support three loading methods:
|
|
129
126
|
- Server environment variables
|
|
130
|
-
-
|
|
127
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
131
128
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
132
129
|
- Never hardcode API keys
|
|
133
130
|
- Always validate key availability before use
|
|
@@ -152,4 +149,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
152
149
|
- Code examples
|
|
153
150
|
- Testing notes
|
|
154
151
|
- Document expected behavior and edge cases
|
|
155
|
-
- Include real-world output examples
|
|
152
|
+
- Include real-world output examples
|
package/.skills/spike/SKILL.md
CHANGED
|
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
description: Execute TDD Spike Phase - exploratory coding to understand problem space before TDD
|
|
16
17
|
argument-hint: <exploration description>
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
SPIKE PHASE! Apply the below to the info given by user input here:
|
|
@@ -37,7 +39,6 @@ $ARGUMENTS
|
|
|
37
39
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
38
40
|
|
|
39
41
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
40
|
-
|
|
41
42
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
42
43
|
- Only one test at a time - this is critical for TDD discipline
|
|
43
44
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -47,7 +48,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
47
48
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
48
49
|
|
|
49
50
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
50
|
-
|
|
51
51
|
- Implement only what's needed for the current failing test
|
|
52
52
|
- No anticipatory coding or extra features
|
|
53
53
|
- Address the specific failure message
|
|
@@ -61,12 +61,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
61
61
|
### Core Violations
|
|
62
62
|
|
|
63
63
|
1. **Multiple Test Addition**
|
|
64
|
-
|
|
65
64
|
- Adding more than one new test at once
|
|
66
65
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
67
66
|
|
|
68
67
|
2. **Over-Implementation**
|
|
69
|
-
|
|
70
68
|
- Code that exceeds what's needed to pass the current failing test
|
|
71
69
|
- Adding untested features, methods, or error handling
|
|
72
70
|
- Implementing multiple methods when test only requires one
|
|
@@ -102,7 +100,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
102
100
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
103
101
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
104
102
|
|
|
105
|
-
|
|
106
103
|
## 🛡 Project Rules (Injected into every command)
|
|
107
104
|
|
|
108
105
|
1. **NO BROKEN BUILDS:**
|
|
@@ -127,7 +124,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
127
124
|
4. **API KEY MANAGEMENT:**
|
|
128
125
|
- Support three loading methods:
|
|
129
126
|
- Server environment variables
|
|
130
|
-
-
|
|
127
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
131
128
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
132
129
|
- Never hardcode API keys
|
|
133
130
|
- Always validate key availability before use
|
|
@@ -152,4 +149,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
152
149
|
- Code examples
|
|
153
150
|
- Testing notes
|
|
154
151
|
- Document expected behavior and edge cases
|
|
155
|
-
- Include real-world output examples
|
|
152
|
+
- Include real-world output examples
|
|
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
description: Summarize conversation progress and next steps
|
|
16
17
|
argument-hint: [optional additional info]
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
## General Guidelines
|
|
@@ -54,7 +56,6 @@ Provide a summary with these sections:
|
|
|
54
56
|
|
|
55
57
|
Keep the summary concise and actionable - suitable for pasting into a new conversation to quickly restore context without needing the full conversation history.
|
|
56
58
|
|
|
57
|
-
|
|
58
59
|
## 🛡 Project Rules (Injected into every command)
|
|
59
60
|
|
|
60
61
|
1. **NO BROKEN BUILDS:**
|
|
@@ -79,7 +80,7 @@ Keep the summary concise and actionable - suitable for pasting into a new conver
|
|
|
79
80
|
4. **API KEY MANAGEMENT:**
|
|
80
81
|
- Support three loading methods:
|
|
81
82
|
- Server environment variables
|
|
82
|
-
-
|
|
83
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
83
84
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
84
85
|
- Never hardcode API keys
|
|
85
86
|
- Always validate key availability before use
|
|
@@ -104,4 +105,4 @@ Keep the summary concise and actionable - suitable for pasting into a new conver
|
|
|
104
105
|
- Code examples
|
|
105
106
|
- Testing notes
|
|
106
107
|
- Document expected behavior and edge cases
|
|
107
|
-
- Include real-world output examples
|
|
108
|
+
- Include real-world output examples
|