@hustle-together/api-dev-tools 3.11.1 → 3.12.1
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 +228 -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
|
@@ -21,7 +21,7 @@ Arguments: $ARGUMENTS
|
|
|
21
21
|
|
|
22
22
|
**IMPORTANT Communication Format:**
|
|
23
23
|
|
|
24
|
-
1. **Opening**: Begin with "
|
|
24
|
+
1. **Opening**: Begin with "_Beep boop, I am Claude Code 🤖, my user has reviewed and approved the following written by me:_"
|
|
25
25
|
- Use italics for this line
|
|
26
26
|
- Clearly establishes AI authorship
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ Arguments: $ARGUMENTS
|
|
|
29
29
|
- Execute whatever communication task the user requested
|
|
30
30
|
- Write the actual content that accomplishes the user's goal
|
|
31
31
|
|
|
32
|
-
3. **Closing**: End with "
|
|
32
|
+
3. **Closing**: End with "_Beep boop, Claude Code 🤖 out!_"
|
|
33
33
|
- Use italics for this line
|
|
34
34
|
- Provides clear closure
|
|
35
35
|
|
|
@@ -44,7 +44,6 @@ This command ensures transparency about AI usage while maintaining that the user
|
|
|
44
44
|
- Responding to feedback with AI-generated explanations
|
|
45
45
|
- Any communication where AI attribution is valuable
|
|
46
46
|
|
|
47
|
-
|
|
48
47
|
## 🛡 Project Rules (Injected into every command)
|
|
49
48
|
|
|
50
49
|
1. **NO BROKEN BUILDS:**
|
|
@@ -69,7 +68,7 @@ This command ensures transparency about AI usage while maintaining that the user
|
|
|
69
68
|
4. **API KEY MANAGEMENT:**
|
|
70
69
|
- Support three loading methods:
|
|
71
70
|
- Server environment variables
|
|
72
|
-
-
|
|
71
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
73
72
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
74
73
|
- Never hardcode API keys
|
|
75
74
|
- Always validate key availability before use
|
|
@@ -94,4 +93,4 @@ This command ensures transparency about AI usage while maintaining that the user
|
|
|
94
93
|
- Code examples
|
|
95
94
|
- Testing notes
|
|
96
95
|
- Document expected behavior and edge cases
|
|
97
|
-
- Include real-world output examples
|
|
96
|
+
- Include real-world output examples
|
|
@@ -59,7 +59,6 @@ git add src/user-service.ts
|
|
|
59
59
|
git commit -m "refactor: extract user lookup to helper"
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
|
|
63
62
|
## 🛡 Project Rules (Injected into every command)
|
|
64
63
|
|
|
65
64
|
1. **NO BROKEN BUILDS:**
|
|
@@ -84,7 +83,7 @@ git commit -m "refactor: extract user lookup to helper"
|
|
|
84
83
|
4. **API KEY MANAGEMENT:**
|
|
85
84
|
- Support three loading methods:
|
|
86
85
|
- Server environment variables
|
|
87
|
-
-
|
|
86
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
88
87
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
89
88
|
- Never hardcode API keys
|
|
90
89
|
- Always validate key availability before use
|
|
@@ -109,4 +108,4 @@ git commit -m "refactor: extract user lookup to helper"
|
|
|
109
108
|
- Code examples
|
|
110
109
|
- Testing notes
|
|
111
110
|
- Document expected behavior and edge cases
|
|
112
|
-
- Include real-world output examples
|
|
111
|
+
- Include real-world output examples
|
|
@@ -30,7 +30,6 @@ git add <files>
|
|
|
30
30
|
git commit -m "feat(#123): add validation to user input form"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
|
|
34
33
|
## 🛡 Project Rules (Injected into every command)
|
|
35
34
|
|
|
36
35
|
1. **NO BROKEN BUILDS:**
|
|
@@ -55,7 +54,7 @@ git commit -m "feat(#123): add validation to user input form"
|
|
|
55
54
|
4. **API KEY MANAGEMENT:**
|
|
56
55
|
- Support three loading methods:
|
|
57
56
|
- Server environment variables
|
|
58
|
-
-
|
|
57
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
59
58
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
60
59
|
- Never hardcode API keys
|
|
61
60
|
- Always validate key availability before use
|
|
@@ -80,4 +79,4 @@ git commit -m "feat(#123): add validation to user input form"
|
|
|
80
79
|
- Code examples
|
|
81
80
|
- Testing notes
|
|
82
81
|
- Document expected behavior and edge cases
|
|
83
|
-
- Include real-world output examples
|
|
82
|
+
- Include real-world output examples
|
|
@@ -24,7 +24,6 @@ $ARGUMENTS
|
|
|
24
24
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
25
25
|
|
|
26
26
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
27
|
-
|
|
28
27
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
29
28
|
- Only one test at a time - this is critical for TDD discipline
|
|
30
29
|
- 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.
|
|
@@ -34,7 +33,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
34
33
|
- 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
|
|
35
34
|
|
|
36
35
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
37
|
-
|
|
38
36
|
- Implement only what's needed for the current failing test
|
|
39
37
|
- No anticipatory coding or extra features
|
|
40
38
|
- Address the specific failure message
|
|
@@ -48,12 +46,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
48
46
|
### Core Violations
|
|
49
47
|
|
|
50
48
|
1. **Multiple Test Addition**
|
|
51
|
-
|
|
52
49
|
- Adding more than one new test at once
|
|
53
50
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
54
51
|
|
|
55
52
|
2. **Over-Implementation**
|
|
56
|
-
|
|
57
53
|
- Code that exceeds what's needed to pass the current failing test
|
|
58
54
|
- Adding untested features, methods, or error handling
|
|
59
55
|
- Implementing multiple methods when test only requires one
|
|
@@ -89,7 +85,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
89
85
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
90
86
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
91
87
|
|
|
92
|
-
|
|
93
88
|
## 🛡 Project Rules (Injected into every command)
|
|
94
89
|
|
|
95
90
|
1. **NO BROKEN BUILDS:**
|
|
@@ -114,7 +109,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
114
109
|
4. **API KEY MANAGEMENT:**
|
|
115
110
|
- Support three loading methods:
|
|
116
111
|
- Server environment variables
|
|
117
|
-
-
|
|
112
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
118
113
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
119
114
|
- Never hardcode API keys
|
|
120
115
|
- Always validate key availability before use
|
|
@@ -139,4 +134,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
134
|
- Code examples
|
|
140
135
|
- Testing notes
|
|
141
136
|
- Document expected behavior and edge cases
|
|
142
|
-
- Include real-world output examples
|
|
137
|
+
- Include real-world output examples
|
package/.claude/commands/gap.md
CHANGED
|
@@ -33,7 +33,6 @@ If there are no gaps, confirm that everything discussed has been addressed.
|
|
|
33
33
|
Additional info:
|
|
34
34
|
$ARGUMENTS
|
|
35
35
|
|
|
36
|
-
|
|
37
36
|
## 🛡 Project Rules (Injected into every command)
|
|
38
37
|
|
|
39
38
|
1. **NO BROKEN BUILDS:**
|
|
@@ -58,7 +57,7 @@ $ARGUMENTS
|
|
|
58
57
|
4. **API KEY MANAGEMENT:**
|
|
59
58
|
- Support three loading methods:
|
|
60
59
|
- Server environment variables
|
|
61
|
-
-
|
|
60
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
62
61
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
63
62
|
- Never hardcode API keys
|
|
64
63
|
- Always validate key availability before use
|
|
@@ -83,4 +82,4 @@ $ARGUMENTS
|
|
|
83
82
|
- Code examples
|
|
84
83
|
- Testing notes
|
|
85
84
|
- Document expected behavior and edge cases
|
|
86
|
-
- Include real-world output examples
|
|
85
|
+
- Include real-world output examples
|
|
@@ -24,7 +24,6 @@ $ARGUMENTS
|
|
|
24
24
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
25
25
|
|
|
26
26
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
27
|
-
|
|
28
27
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
29
28
|
- Only one test at a time - this is critical for TDD discipline
|
|
30
29
|
- 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.
|
|
@@ -34,7 +33,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
34
33
|
- 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
|
|
35
34
|
|
|
36
35
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
37
|
-
|
|
38
36
|
- Implement only what's needed for the current failing test
|
|
39
37
|
- No anticipatory coding or extra features
|
|
40
38
|
- Address the specific failure message
|
|
@@ -48,12 +46,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
48
46
|
### Core Violations
|
|
49
47
|
|
|
50
48
|
1. **Multiple Test Addition**
|
|
51
|
-
|
|
52
49
|
- Adding more than one new test at once
|
|
53
50
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
54
51
|
|
|
55
52
|
2. **Over-Implementation**
|
|
56
|
-
|
|
57
53
|
- Code that exceeds what's needed to pass the current failing test
|
|
58
54
|
- Adding untested features, methods, or error handling
|
|
59
55
|
- Implementing multiple methods when test only requires one
|
|
@@ -89,7 +85,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
89
85
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
90
86
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
91
87
|
|
|
92
|
-
|
|
93
88
|
## 🛡 Project Rules (Injected into every command)
|
|
94
89
|
|
|
95
90
|
1. **NO BROKEN BUILDS:**
|
|
@@ -114,7 +109,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
114
109
|
4. **API KEY MANAGEMENT:**
|
|
115
110
|
- Support three loading methods:
|
|
116
111
|
- Server environment variables
|
|
117
|
-
-
|
|
112
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
118
113
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
119
114
|
- Never hardcode API keys
|
|
120
115
|
- Always validate key availability before use
|
|
@@ -139,4 +134,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
134
|
- Code examples
|
|
140
135
|
- Testing notes
|
|
141
136
|
- Document expected behavior and edge cases
|
|
142
|
-
- Include real-world output examples
|
|
137
|
+
- Include real-world output examples
|
|
@@ -24,7 +24,7 @@ Process:
|
|
|
24
24
|
|
|
25
25
|
1. Fetch Issue
|
|
26
26
|
|
|
27
|
-
Try to fetch the issue using GitHub MCP (
|
|
27
|
+
Try to fetch the issue using GitHub MCP (mcp**github**issue_read tool).
|
|
28
28
|
|
|
29
29
|
If GitHub MCP is not configured, show:
|
|
30
30
|
|
|
@@ -74,7 +74,6 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
74
74
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
75
75
|
|
|
76
76
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
77
|
-
|
|
78
77
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
79
78
|
- Only one test at a time - this is critical for TDD discipline
|
|
80
79
|
- 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.
|
|
@@ -84,7 +83,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
84
83
|
- 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
|
|
85
84
|
|
|
86
85
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
87
|
-
|
|
88
86
|
- Implement only what's needed for the current failing test
|
|
89
87
|
- No anticipatory coding or extra features
|
|
90
88
|
- Address the specific failure message
|
|
@@ -98,12 +96,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
98
96
|
### Core Violations
|
|
99
97
|
|
|
100
98
|
1. **Multiple Test Addition**
|
|
101
|
-
|
|
102
99
|
- Adding more than one new test at once
|
|
103
100
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
104
101
|
|
|
105
102
|
2. **Over-Implementation**
|
|
106
|
-
|
|
107
103
|
- Code that exceeds what's needed to pass the current failing test
|
|
108
104
|
- Adding untested features, methods, or error handling
|
|
109
105
|
- Implementing multiple methods when test only requires one
|
|
@@ -139,7 +135,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
135
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
140
136
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
141
137
|
|
|
142
|
-
|
|
143
138
|
## 🛡 Project Rules (Injected into every command)
|
|
144
139
|
|
|
145
140
|
1. **NO BROKEN BUILDS:**
|
|
@@ -164,7 +159,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
164
159
|
4. **API KEY MANAGEMENT:**
|
|
165
160
|
- Support three loading methods:
|
|
166
161
|
- Server environment variables
|
|
167
|
-
-
|
|
162
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
168
163
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
169
164
|
- Never hardcode API keys
|
|
170
165
|
- Always validate key availability before use
|
|
@@ -189,4 +184,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
189
184
|
- Code examples
|
|
190
185
|
- Testing notes
|
|
191
186
|
- Document expected behavior and edge cases
|
|
192
|
-
- Include real-world output examples
|
|
187
|
+
- Include real-world output examples
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Configure NTFY push notifications for workflow updates
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# NTFY Setup
|
|
6
|
+
|
|
7
|
+
Configure push notifications via [ntfy.sh](https://ntfy.sh) to receive workflow updates on your phone.
|
|
8
|
+
|
|
9
|
+
## Step 1: Install NTFY App
|
|
10
|
+
|
|
11
|
+
Download the NTFY app:
|
|
12
|
+
|
|
13
|
+
- **iOS**: [App Store](https://apps.apple.com/app/ntfy/id1625396347)
|
|
14
|
+
- **Android**: [Google Play](https://play.google.com/store/apps/details?id=io.heckel.ntfy) or [F-Droid](https://f-droid.org/packages/io.heckel.ntfy/)
|
|
15
|
+
|
|
16
|
+
## Step 2: Choose a Topic
|
|
17
|
+
|
|
18
|
+
Pick a unique, hard-to-guess topic name for your notifications:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
your-name-api-dev-2024
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Important:** Topics are public on ntfy.sh. Use a unique name!
|
|
25
|
+
|
|
26
|
+
## Step 3: Subscribe in App
|
|
27
|
+
|
|
28
|
+
1. Open the NTFY app
|
|
29
|
+
2. Tap the + button
|
|
30
|
+
3. Enter your topic name
|
|
31
|
+
4. Tap Subscribe
|
|
32
|
+
|
|
33
|
+
## Step 4: Configure Environment
|
|
34
|
+
|
|
35
|
+
Add to your project's `.env` file:
|
|
36
|
+
|
|
37
|
+
```env
|
|
38
|
+
NTFY_ENABLED=true
|
|
39
|
+
NTFY_SERVER=https://ntfy.sh
|
|
40
|
+
NTFY_TOPIC=your-unique-topic-name
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or copy from the template:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cp templates/.env.example .env
|
|
47
|
+
# Then edit .env with your topic
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Step 5: Test Notification
|
|
51
|
+
|
|
52
|
+
Run this command to test:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
/ntfy-test
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
You should receive a test notification on your phone.
|
|
59
|
+
|
|
60
|
+
## What You'll Receive
|
|
61
|
+
|
|
62
|
+
- 📋 Phase completion updates
|
|
63
|
+
- ⏳ "Input needed" alerts when interview questions are waiting
|
|
64
|
+
- 📊 Token usage summaries
|
|
65
|
+
- ✅ Workflow completion notifications
|
|
66
|
+
|
|
67
|
+
## Self-Hosted Option
|
|
68
|
+
|
|
69
|
+
If you prefer to self-host NTFY:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
docker run -d -p 8080:80 binwiederhier/ntfy serve
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Then set:
|
|
76
|
+
|
|
77
|
+
```env
|
|
78
|
+
NTFY_SERVER=http://localhost:8080
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Troubleshooting
|
|
82
|
+
|
|
83
|
+
**Not receiving notifications?**
|
|
84
|
+
|
|
85
|
+
1. Check NTFY_ENABLED=true in .env
|
|
86
|
+
2. Verify topic name matches exactly
|
|
87
|
+
3. Check app notification permissions
|
|
88
|
+
4. Run `/ntfy-test` to verify connection
|
|
89
|
+
|
|
90
|
+
**Rate limited?**
|
|
91
|
+
ntfy.sh has rate limits. Consider self-hosting for heavy use.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Send a test notification via NTFY
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# NTFY Test
|
|
6
|
+
|
|
7
|
+
Send a test notification to verify your NTFY setup is working.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. **Read environment configuration**:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
grep NTFY .env 2>/dev/null || echo "No .env file found"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
2. **Send test notification**:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Get config
|
|
21
|
+
source .env 2>/dev/null
|
|
22
|
+
|
|
23
|
+
if [ "$NTFY_ENABLED" = "true" ] && [ -n "$NTFY_TOPIC" ]; then
|
|
24
|
+
curl -s \
|
|
25
|
+
-H "Title: 🧪 API Dev Tools Test" \
|
|
26
|
+
-H "Priority: default" \
|
|
27
|
+
-H "Tags: test,rocket" \
|
|
28
|
+
-d "Test notification from API Dev Tools. If you see this, NTFY is configured correctly!" \
|
|
29
|
+
"${NTFY_SERVER:-https://ntfy.sh}/$NTFY_TOPIC"
|
|
30
|
+
echo ""
|
|
31
|
+
echo "✅ Test notification sent to topic: $NTFY_TOPIC"
|
|
32
|
+
else
|
|
33
|
+
echo "❌ NTFY not configured. Run /ntfy-setup first."
|
|
34
|
+
echo ""
|
|
35
|
+
echo "Required in .env:"
|
|
36
|
+
echo " NTFY_ENABLED=true"
|
|
37
|
+
echo " NTFY_TOPIC=your-topic-name"
|
|
38
|
+
fi
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
3. **Verify on phone**:
|
|
42
|
+
|
|
43
|
+
Check your NTFY app - you should see the test notification within a few seconds.
|
|
44
|
+
|
|
45
|
+
## Expected Result
|
|
46
|
+
|
|
47
|
+
You should receive a notification with:
|
|
48
|
+
|
|
49
|
+
- Title: "🧪 API Dev Tools Test"
|
|
50
|
+
- Message: "Test notification from API Dev Tools..."
|
|
51
|
+
- Tags: test, rocket emojis
|
|
52
|
+
|
|
53
|
+
## Troubleshooting
|
|
54
|
+
|
|
55
|
+
**"NTFY not configured" error:**
|
|
56
|
+
|
|
57
|
+
- Run `/ntfy-setup` to configure
|
|
58
|
+
- Or manually add to .env:
|
|
59
|
+
```env
|
|
60
|
+
NTFY_ENABLED=true
|
|
61
|
+
NTFY_TOPIC=your-unique-topic
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**No notification received:**
|
|
65
|
+
|
|
66
|
+
1. Check topic name matches your app subscription
|
|
67
|
+
2. Verify phone has internet connection
|
|
68
|
+
3. Check NTFY app notification permissions
|
|
69
|
+
4. Try visiting https://ntfy.sh/your-topic in browser
|
|
70
|
+
|
|
71
|
+
**curl error:**
|
|
72
|
+
|
|
73
|
+
- Ensure you have internet connection
|
|
74
|
+
- Check if ntfy.sh is accessible: `curl -I https://ntfy.sh`
|
package/.claude/commands/plan.md
CHANGED
|
@@ -115,7 +115,6 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
115
115
|
- **Before /plan**: Use `/spike` if you need technical exploration first
|
|
116
116
|
- **After /plan**: Use `/red` to start TDD on first task
|
|
117
117
|
|
|
118
|
-
|
|
119
118
|
## 🛡 Project Rules (Injected into every command)
|
|
120
119
|
|
|
121
120
|
1. **NO BROKEN BUILDS:**
|
|
@@ -140,7 +139,7 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
140
139
|
4. **API KEY MANAGEMENT:**
|
|
141
140
|
- Support three loading methods:
|
|
142
141
|
- Server environment variables
|
|
143
|
-
-
|
|
142
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
144
143
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
145
144
|
- Never hardcode API keys
|
|
146
145
|
- Always validate key availability before use
|
|
@@ -165,4 +164,4 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
165
164
|
- Code examples
|
|
166
165
|
- Testing notes
|
|
167
166
|
- Document expected behavior and edge cases
|
|
168
|
-
- Include real-world output examples
|
|
167
|
+
- Include real-world output examples
|
package/.claude/commands/pr.md
CHANGED
|
@@ -69,7 +69,6 @@ Arguments: $ARGUMENTS
|
|
|
69
69
|
3. Set the base branch (default: main)
|
|
70
70
|
4. Include relevant issue references if found in commit messages
|
|
71
71
|
|
|
72
|
-
|
|
73
72
|
## 🛡 Project Rules (Injected into every command)
|
|
74
73
|
|
|
75
74
|
1. **NO BROKEN BUILDS:**
|
|
@@ -94,7 +93,7 @@ Arguments: $ARGUMENTS
|
|
|
94
93
|
4. **API KEY MANAGEMENT:**
|
|
95
94
|
- Support three loading methods:
|
|
96
95
|
- Server environment variables
|
|
97
|
-
-
|
|
96
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
98
97
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
99
98
|
- Never hardcode API keys
|
|
100
99
|
- Always validate key availability before use
|
|
@@ -119,4 +118,4 @@ Arguments: $ARGUMENTS
|
|
|
119
118
|
- Code examples
|
|
120
119
|
- Testing notes
|
|
121
120
|
- Document expected behavior and edge cases
|
|
122
|
-
- Include real-world output examples
|
|
121
|
+
- Include real-world output examples
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Publish npm package with incremental versioning (patch/minor/major)
|
|
3
|
+
argument-hint: [patch|minor|major|X.Y.Z]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Publish the npm package with safe, incremental versioning.
|
|
7
|
+
|
|
8
|
+
## Arguments
|
|
9
|
+
- `patch` (default) - Bug fixes (1.0.0 → 1.0.1)
|
|
10
|
+
- `minor` - New features (1.0.0 → 1.1.0)
|
|
11
|
+
- `major` - Breaking changes (1.0.0 → 2.0.0)
|
|
12
|
+
- `X.Y.Z` - Specific version
|
|
13
|
+
|
|
14
|
+
$ARGUMENTS
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
1. **Pre-flight checks**
|
|
19
|
+
- Verify clean git status
|
|
20
|
+
- Check npm login (`npm whoami`)
|
|
21
|
+
- Compare local vs published version
|
|
22
|
+
|
|
23
|
+
2. **Version bump**
|
|
24
|
+
- Calculate new version based on argument
|
|
25
|
+
- Update package.json
|
|
26
|
+
- Commit: `chore: bump version to X.Y.Z`
|
|
27
|
+
- Push to remote
|
|
28
|
+
|
|
29
|
+
3. **Publish**
|
|
30
|
+
- Run `npm publish --access public`
|
|
31
|
+
- If 2FA required, show: `npm publish --access public --otp=CODE`
|
|
32
|
+
|
|
33
|
+
4. **Verify**
|
|
34
|
+
- Confirm new version on npm registry
|
|
35
|
+
|
|
36
|
+
## Safety Rules
|
|
37
|
+
- Always commit before publish
|
|
38
|
+
- Always push before publish
|
|
39
|
+
- Never skip version comparison
|
|
40
|
+
- Incremental bumps only (no big jumps without confirmation)
|
package/.claude/commands/red.md
CHANGED
|
@@ -24,7 +24,6 @@ $ARGUMENTS
|
|
|
24
24
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
25
25
|
|
|
26
26
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
27
|
-
|
|
28
27
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
29
28
|
- Only one test at a time - this is critical for TDD discipline
|
|
30
29
|
- 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.
|
|
@@ -34,7 +33,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
34
33
|
- 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
|
|
35
34
|
|
|
36
35
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
37
|
-
|
|
38
36
|
- Implement only what's needed for the current failing test
|
|
39
37
|
- No anticipatory coding or extra features
|
|
40
38
|
- Address the specific failure message
|
|
@@ -48,12 +46,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
48
46
|
### Core Violations
|
|
49
47
|
|
|
50
48
|
1. **Multiple Test Addition**
|
|
51
|
-
|
|
52
49
|
- Adding more than one new test at once
|
|
53
50
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
54
51
|
|
|
55
52
|
2. **Over-Implementation**
|
|
56
|
-
|
|
57
53
|
- Code that exceeds what's needed to pass the current failing test
|
|
58
54
|
- Adding untested features, methods, or error handling
|
|
59
55
|
- Implementing multiple methods when test only requires one
|
|
@@ -89,7 +85,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
89
85
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
90
86
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
91
87
|
|
|
92
|
-
|
|
93
88
|
## 🛡 Project Rules (Injected into every command)
|
|
94
89
|
|
|
95
90
|
1. **NO BROKEN BUILDS:**
|
|
@@ -114,7 +109,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
114
109
|
4. **API KEY MANAGEMENT:**
|
|
115
110
|
- Support three loading methods:
|
|
116
111
|
- Server environment variables
|
|
117
|
-
-
|
|
112
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
118
113
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
119
114
|
- Never hardcode API keys
|
|
120
115
|
- Always validate key availability before use
|
|
@@ -139,4 +134,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
134
|
- Code examples
|
|
140
135
|
- Testing notes
|
|
141
136
|
- Document expected behavior and edge cases
|
|
142
|
-
- Include real-world output examples
|
|
137
|
+
- Include real-world output examples
|
|
@@ -22,7 +22,6 @@ Apply this document (specifically the Refactor phase), to the info given by user
|
|
|
22
22
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
23
23
|
|
|
24
24
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
25
|
-
|
|
26
25
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
27
26
|
- Only one test at a time - this is critical for TDD discipline
|
|
28
27
|
- 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.
|
|
@@ -32,7 +31,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
32
31
|
- 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
|
|
33
32
|
|
|
34
33
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
35
|
-
|
|
36
34
|
- Implement only what's needed for the current failing test
|
|
37
35
|
- No anticipatory coding or extra features
|
|
38
36
|
- Address the specific failure message
|
|
@@ -46,12 +44,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
46
44
|
### Core Violations
|
|
47
45
|
|
|
48
46
|
1. **Multiple Test Addition**
|
|
49
|
-
|
|
50
47
|
- Adding more than one new test at once
|
|
51
48
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
52
49
|
|
|
53
50
|
2. **Over-Implementation**
|
|
54
|
-
|
|
55
51
|
- Code that exceeds what's needed to pass the current failing test
|
|
56
52
|
- Adding untested features, methods, or error handling
|
|
57
53
|
- Implementing multiple methods when test only requires one
|
|
@@ -89,7 +85,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
89
85
|
|
|
90
86
|
1. **Consistency check** - Look for inconsistent patterns, naming conventions, or structure across the codebase
|
|
91
87
|
|
|
92
|
-
|
|
93
88
|
## 🛡 Project Rules (Injected into every command)
|
|
94
89
|
|
|
95
90
|
1. **NO BROKEN BUILDS:**
|
|
@@ -114,7 +109,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
114
109
|
4. **API KEY MANAGEMENT:**
|
|
115
110
|
- Support three loading methods:
|
|
116
111
|
- Server environment variables
|
|
117
|
-
-
|
|
112
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
118
113
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
119
114
|
- Never hardcode API keys
|
|
120
115
|
- Always validate key availability before use
|
|
@@ -139,4 +134,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
134
|
- Code examples
|
|
140
135
|
- Testing notes
|
|
141
136
|
- Document expected behavior and edge cases
|
|
142
|
-
- Include real-world output examples
|
|
137
|
+
- Include real-world output examples
|
|
@@ -24,7 +24,6 @@ $ARGUMENTS
|
|
|
24
24
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
25
25
|
|
|
26
26
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
27
|
-
|
|
28
27
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
29
28
|
- Only one test at a time - this is critical for TDD discipline
|
|
30
29
|
- 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.
|
|
@@ -34,7 +33,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
34
33
|
- 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
|
|
35
34
|
|
|
36
35
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
37
|
-
|
|
38
36
|
- Implement only what's needed for the current failing test
|
|
39
37
|
- No anticipatory coding or extra features
|
|
40
38
|
- Address the specific failure message
|
|
@@ -48,12 +46,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
48
46
|
### Core Violations
|
|
49
47
|
|
|
50
48
|
1. **Multiple Test Addition**
|
|
51
|
-
|
|
52
49
|
- Adding more than one new test at once
|
|
53
50
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
54
51
|
|
|
55
52
|
2. **Over-Implementation**
|
|
56
|
-
|
|
57
53
|
- Code that exceeds what's needed to pass the current failing test
|
|
58
54
|
- Adding untested features, methods, or error handling
|
|
59
55
|
- Implementing multiple methods when test only requires one
|
|
@@ -89,7 +85,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
89
85
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
90
86
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
91
87
|
|
|
92
|
-
|
|
93
88
|
## 🛡 Project Rules (Injected into every command)
|
|
94
89
|
|
|
95
90
|
1. **NO BROKEN BUILDS:**
|
|
@@ -114,7 +109,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
114
109
|
4. **API KEY MANAGEMENT:**
|
|
115
110
|
- Support three loading methods:
|
|
116
111
|
- Server environment variables
|
|
117
|
-
-
|
|
112
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
118
113
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
119
114
|
- Never hardcode API keys
|
|
120
115
|
- Always validate key availability before use
|
|
@@ -139,4 +134,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
134
|
- Code examples
|
|
140
135
|
- Testing notes
|
|
141
136
|
- Document expected behavior and edge cases
|
|
142
|
-
- Include real-world output examples
|
|
137
|
+
- Include real-world output examples
|