@wbern/claude-instructions 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +1 -0
  2. package/downloads/with-beads/add-command.md +2 -2
  3. package/downloads/with-beads/busycommit.md +56 -0
  4. package/downloads/with-beads/commands-metadata.json +5 -0
  5. package/downloads/with-beads/commit.md +0 -20
  6. package/downloads/with-beads/cycle.md +3 -0
  7. package/downloads/with-beads/gap.md +3 -0
  8. package/downloads/with-beads/green.md +3 -0
  9. package/downloads/with-beads/issue.md +3 -0
  10. package/downloads/with-beads/red.md +3 -0
  11. package/downloads/with-beads/refactor.md +3 -0
  12. package/downloads/with-beads/spike.md +3 -0
  13. package/downloads/with-beads/summarize.md +2 -0
  14. package/downloads/with-beads/tdd.md +3 -0
  15. package/downloads/with-beads/worktree-add.md +1 -1
  16. package/downloads/with-beads/worktree-cleanup.md +2 -0
  17. package/downloads/without-beads/add-command.md +2 -2
  18. package/downloads/without-beads/busycommit.md +56 -0
  19. package/downloads/without-beads/commands-metadata.json +5 -0
  20. package/downloads/without-beads/commit.md +0 -20
  21. package/downloads/without-beads/cycle.md +3 -0
  22. package/downloads/without-beads/gap.md +3 -0
  23. package/downloads/without-beads/green.md +3 -0
  24. package/downloads/without-beads/issue.md +3 -0
  25. package/downloads/without-beads/red.md +3 -0
  26. package/downloads/without-beads/refactor.md +3 -0
  27. package/downloads/without-beads/spike.md +3 -0
  28. package/downloads/without-beads/summarize.md +2 -0
  29. package/downloads/without-beads/tdd.md +3 -0
  30. package/downloads/without-beads/worktree-add.md +1 -1
  31. package/downloads/without-beads/worktree-cleanup.md +2 -0
  32. package/package.json +1 -1
package/README.md CHANGED
@@ -119,6 +119,7 @@ flowchart TB
119
119
  ### Workflow
120
120
 
121
121
  - `/commit` - Create a git commit following project standards
122
+ - `/busycommit` - Create multiple atomic git commits, one logical change at a time
122
123
  - `/ship` - Ship code directly to main - for small, obvious changes that don't need review (Cursor's modern alternative to PRs)
123
124
  - `/show` - Show code to team with auto-merge - for changes that should be visible but don't need approval (Cursor's modern workflow)
124
125
  - `/ask` - Request team review and approval - for complex changes needing discussion (OK fine, traditional PRs still have their place - Cursor)
@@ -58,7 +58,7 @@ echo "Review this code for bugs and suggest fixes" > ~/.claude/commands/review.m
58
58
 
59
59
  ### Command with Arguments
60
60
  ```markdown
61
- Fix issue #$ARGUMENTS following our coding standards
61
+ Fix issue #ARGUMENTS following our coding standards
62
62
  ```
63
63
 
64
64
  ### Command with File References
@@ -83,7 +83,7 @@ Create commit for these changes.
83
83
  ### Namespaced Command
84
84
  ```bash
85
85
  mkdir -p ~/.claude/commands/ai
86
- echo "Ask GPT-5 about: $ARGUMENTS" > ~/.claude/commands/ai/gpt5.md
86
+ echo "Ask GPT-5 about: ARGUMENTS" > ~/.claude/commands/ai/gpt5.md
87
87
  # Creates: /ai:gpt5
88
88
  ```
89
89
 
@@ -0,0 +1,56 @@
1
+ ---
2
+ allowed-tools: Bash(pnpm test:*), Bash(pnpm lint:*)
3
+ description: Create multiple atomic git commits, one logical change at a time
4
+ argument-hint: [optional-commit-description]
5
+ ---
6
+
7
+ Create multiple atomic git commits, committing the smallest possible logical unit at a time
8
+
9
+ Include any of the following info if specified: $ARGUMENTS
10
+
11
+
12
+
13
+
14
+ ## Process
15
+
16
+ 1. Run `git status` and `git diff` to review changes
17
+ 2. Run `git log --oneline -5` to see recent commit style
18
+ 3. Stage relevant files with `git add`
19
+ 4. Create commit with descriptive message
20
+ 5. Verify with `git status`
21
+
22
+ ## Example
23
+
24
+ ```bash
25
+ git add <files>
26
+ git commit -m "feat(#123): add validation to user input form"
27
+ ```
28
+
29
+ ## Atomic Commit Approach
30
+
31
+ Each commit should represent ONE logical change. Do NOT bundle multiple unrelated changes into one commit.
32
+
33
+ - Identify the smallest atomic units of change
34
+ - For EACH atomic unit: stage only those files/hunks, commit, verify
35
+ - Use `git add -p` to stage partial file changes when a file contains multiple logical changes
36
+ - Repeat until all changes are committed
37
+ - It is OK to create multiple commits without stopping - keep going until `git status` shows clean
38
+
39
+ ## Multi-Commit Example
40
+
41
+ If a single file contains multiple unrelated changes, use `git add -p` to stage hunks interactively:
42
+
43
+ ```bash
44
+ # Stage only the validation-related hunks from the file
45
+ git add -p src/user-service.ts
46
+ # Select 'y' for validation hunks, 'n' for others
47
+ git commit -m "feat(#123): add email format validation"
48
+
49
+ # Stage the error handling hunks
50
+ git add -p src/user-service.ts
51
+ git commit -m "fix(#124): handle null user gracefully"
52
+
53
+ # Stage remaining changes
54
+ git add src/user-service.ts
55
+ git commit -m "refactor: extract user lookup to helper"
56
+ ```
@@ -14,6 +14,11 @@
14
14
  "category": "Utilities",
15
15
  "order": 2
16
16
  },
17
+ "busycommit.md": {
18
+ "description": "Create multiple atomic git commits, one logical change at a time",
19
+ "category": "Workflow",
20
+ "order": 2
21
+ },
17
22
  "commit.md": {
18
23
  "description": "Create a git commit following project standards",
19
24
  "category": "Workflow",
@@ -8,28 +8,8 @@ Create a git commit following project standards
8
8
 
9
9
  Include any of the following info if specified: $ARGUMENTS
10
10
 
11
- ## General Guidelines
12
11
 
13
- ### Output Style
14
- - **Never explicitly mention TDD** in code, comments, commits, PRs, or issues
15
- - Write natural, descriptive code without meta-commentary about the development process
16
- - The code should speak for itself - TDD is the process, not the product
17
12
 
18
- ## Commit Message Rules
19
-
20
- Follows [Conventional Commits](https://www.conventionalcommits.org/) standard.
21
-
22
- 1. **Format**: `type(#issue): description`
23
- - Use `#123` for local repo issues
24
- - Use `owner/repo#123` for cross-repo issues
25
- - Common types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
26
-
27
- 2. **AI Credits**: **NEVER include AI credits in commit messages**
28
- - No "Generated with Claude Code"
29
- - No "Co-Authored-By: Claude" or "Co-Authored-By: Happy"
30
- - Focus on the actual changes made, not conversation history
31
-
32
- 3. **Content**: Write clear, concise commit messages describing what changed and why
33
13
 
34
14
  ## Process
35
15
 
@@ -29,8 +29,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
29
29
 
30
30
  - The test must fail for the RIGHT reason (not syntax/import errors)
31
31
  - Only one test at a time - this is critical for TDD discipline
32
+ - 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
33
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
33
34
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
35
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
36
+ - 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
34
37
 
35
38
  2. **Green Phase**: Write MINIMAL code to make the test pass
36
39
 
@@ -20,3 +20,6 @@ Present findings as a prioritized list with:
20
20
  - Suggested next action
21
21
 
22
22
  If there are no gaps, confirm that everything discussed has been addressed.
23
+
24
+ Additional info:
25
+ $ARGUMENTS
@@ -29,8 +29,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
29
29
 
30
30
  - The test must fail for the RIGHT reason (not syntax/import errors)
31
31
  - Only one test at a time - this is critical for TDD discipline
32
+ - 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
33
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
33
34
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
35
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
36
+ - 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
34
37
 
35
38
  2. **Green Phase**: Write MINIMAL code to make the test pass
36
39
 
@@ -81,8 +81,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
81
81
 
82
82
  - The test must fail for the RIGHT reason (not syntax/import errors)
83
83
  - Only one test at a time - this is critical for TDD discipline
84
+ - 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
85
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
85
86
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
87
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
88
+ - 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
86
89
 
87
90
  2. **Green Phase**: Write MINIMAL code to make the test pass
88
91
 
@@ -26,8 +26,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
26
26
 
27
27
  - The test must fail for the RIGHT reason (not syntax/import errors)
28
28
  - Only one test at a time - this is critical for TDD discipline
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.
29
30
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
30
31
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
32
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
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
31
34
 
32
35
  2. **Green Phase**: Write MINIMAL code to make the test pass
33
36
 
@@ -27,8 +27,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
27
27
 
28
28
  - The test must fail for the RIGHT reason (not syntax/import errors)
29
29
  - Only one test at a time - this is critical for TDD discipline
30
+ - 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.
30
31
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
31
32
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
33
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
34
+ - 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
32
35
 
33
36
  2. **Green Phase**: Write MINIMAL code to make the test pass
34
37
 
@@ -29,8 +29,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
29
29
 
30
30
  - The test must fail for the RIGHT reason (not syntax/import errors)
31
31
  - Only one test at a time - this is critical for TDD discipline
32
+ - 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
33
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
33
34
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
35
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
36
+ - 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
34
37
 
35
38
  2. **Green Phase**: Write MINIMAL code to make the test pass
36
39
 
@@ -5,6 +5,8 @@ description: Summarize conversation progress and next steps
5
5
 
6
6
  Create a concise summary of the current conversation suitable for transferring context to a new conversation.
7
7
 
8
+ Additional info: $ARGUMENTS
9
+
8
10
  ## Summary Structure
9
11
 
10
12
  Provide a summary with these sections:
@@ -23,8 +23,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
23
23
 
24
24
  - The test must fail for the RIGHT reason (not syntax/import errors)
25
25
  - Only one test at a time - this is critical for TDD discipline
26
+ - 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.
26
27
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
27
28
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
29
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
30
+ - 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
28
31
 
29
32
  2. **Green Phase**: Write MINIMAL code to make the test pass
30
33
 
@@ -69,7 +69,7 @@ Uncommitted changes: !git status --short`
69
69
 
70
70
  <step_2>
71
71
  <description>Parse the arguments</description>
72
- <input>$ARGUMENTS</input>
72
+ <input>The user-provided arguments</input>
73
73
  <expected_format>branch-name-or-github-url [optional-base-branch]</expected_format>
74
74
  <example>fix/issue-123-main-content-area-visually-clipped main</example>
75
75
  <example_github_url>https://github.com/owner/project/issues/123 main</example_github_url>
@@ -15,6 +15,8 @@ argument-hint: (no arguments)
15
15
 
16
16
  Clean up merged worktrees by finding the oldest merged branch, consolidating settings, and removing stale worktrees.
17
17
 
18
+ Additional info: $ARGUMENTS
19
+
18
20
  <current_state>
19
21
  Current branch: !git branch --show-current`
20
22
  Current worktrees: !git worktree list`
@@ -58,7 +58,7 @@ echo "Review this code for bugs and suggest fixes" > ~/.claude/commands/review.m
58
58
 
59
59
  ### Command with Arguments
60
60
  ```markdown
61
- Fix issue #$ARGUMENTS following our coding standards
61
+ Fix issue #ARGUMENTS following our coding standards
62
62
  ```
63
63
 
64
64
  ### Command with File References
@@ -83,7 +83,7 @@ Create commit for these changes.
83
83
  ### Namespaced Command
84
84
  ```bash
85
85
  mkdir -p ~/.claude/commands/ai
86
- echo "Ask GPT-5 about: $ARGUMENTS" > ~/.claude/commands/ai/gpt5.md
86
+ echo "Ask GPT-5 about: ARGUMENTS" > ~/.claude/commands/ai/gpt5.md
87
87
  # Creates: /ai:gpt5
88
88
  ```
89
89
 
@@ -0,0 +1,56 @@
1
+ ---
2
+ allowed-tools: Bash(pnpm test:*), Bash(pnpm lint:*)
3
+ description: Create multiple atomic git commits, one logical change at a time
4
+ argument-hint: [optional-commit-description]
5
+ ---
6
+
7
+ Create multiple atomic git commits, committing the smallest possible logical unit at a time
8
+
9
+ Include any of the following info if specified: $ARGUMENTS
10
+
11
+
12
+
13
+
14
+ ## Process
15
+
16
+ 1. Run `git status` and `git diff` to review changes
17
+ 2. Run `git log --oneline -5` to see recent commit style
18
+ 3. Stage relevant files with `git add`
19
+ 4. Create commit with descriptive message
20
+ 5. Verify with `git status`
21
+
22
+ ## Example
23
+
24
+ ```bash
25
+ git add <files>
26
+ git commit -m "feat(#123): add validation to user input form"
27
+ ```
28
+
29
+ ## Atomic Commit Approach
30
+
31
+ Each commit should represent ONE logical change. Do NOT bundle multiple unrelated changes into one commit.
32
+
33
+ - Identify the smallest atomic units of change
34
+ - For EACH atomic unit: stage only those files/hunks, commit, verify
35
+ - Use `git add -p` to stage partial file changes when a file contains multiple logical changes
36
+ - Repeat until all changes are committed
37
+ - It is OK to create multiple commits without stopping - keep going until `git status` shows clean
38
+
39
+ ## Multi-Commit Example
40
+
41
+ If a single file contains multiple unrelated changes, use `git add -p` to stage hunks interactively:
42
+
43
+ ```bash
44
+ # Stage only the validation-related hunks from the file
45
+ git add -p src/user-service.ts
46
+ # Select 'y' for validation hunks, 'n' for others
47
+ git commit -m "feat(#123): add email format validation"
48
+
49
+ # Stage the error handling hunks
50
+ git add -p src/user-service.ts
51
+ git commit -m "fix(#124): handle null user gracefully"
52
+
53
+ # Stage remaining changes
54
+ git add src/user-service.ts
55
+ git commit -m "refactor: extract user lookup to helper"
56
+ ```
@@ -14,6 +14,11 @@
14
14
  "category": "Utilities",
15
15
  "order": 2
16
16
  },
17
+ "busycommit.md": {
18
+ "description": "Create multiple atomic git commits, one logical change at a time",
19
+ "category": "Workflow",
20
+ "order": 2
21
+ },
17
22
  "commit.md": {
18
23
  "description": "Create a git commit following project standards",
19
24
  "category": "Workflow",
@@ -8,28 +8,8 @@ Create a git commit following project standards
8
8
 
9
9
  Include any of the following info if specified: $ARGUMENTS
10
10
 
11
- ## General Guidelines
12
11
 
13
- ### Output Style
14
- - **Never explicitly mention TDD** in code, comments, commits, PRs, or issues
15
- - Write natural, descriptive code without meta-commentary about the development process
16
- - The code should speak for itself - TDD is the process, not the product
17
12
 
18
- ## Commit Message Rules
19
-
20
- Follows [Conventional Commits](https://www.conventionalcommits.org/) standard.
21
-
22
- 1. **Format**: `type(#issue): description`
23
- - Use `#123` for local repo issues
24
- - Use `owner/repo#123` for cross-repo issues
25
- - Common types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
26
-
27
- 2. **AI Credits**: **NEVER include AI credits in commit messages**
28
- - No "Generated with Claude Code"
29
- - No "Co-Authored-By: Claude" or "Co-Authored-By: Happy"
30
- - Focus on the actual changes made, not conversation history
31
-
32
- 3. **Content**: Write clear, concise commit messages describing what changed and why
33
13
 
34
14
  ## Process
35
15
 
@@ -29,8 +29,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
29
29
 
30
30
  - The test must fail for the RIGHT reason (not syntax/import errors)
31
31
  - Only one test at a time - this is critical for TDD discipline
32
+ - 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
33
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
33
34
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
35
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
36
+ - 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
34
37
 
35
38
  2. **Green Phase**: Write MINIMAL code to make the test pass
36
39
 
@@ -19,3 +19,6 @@ Present findings as a prioritized list with:
19
19
  - Suggested next action
20
20
 
21
21
  If there are no gaps, confirm that everything discussed has been addressed.
22
+
23
+ Additional info:
24
+ $ARGUMENTS
@@ -29,8 +29,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
29
29
 
30
30
  - The test must fail for the RIGHT reason (not syntax/import errors)
31
31
  - Only one test at a time - this is critical for TDD discipline
32
+ - 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
33
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
33
34
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
35
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
36
+ - 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
34
37
 
35
38
  2. **Green Phase**: Write MINIMAL code to make the test pass
36
39
 
@@ -73,8 +73,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
73
73
 
74
74
  - The test must fail for the RIGHT reason (not syntax/import errors)
75
75
  - Only one test at a time - this is critical for TDD discipline
76
+ - 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.
76
77
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
77
78
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
79
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
80
+ - 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
78
81
 
79
82
  2. **Green Phase**: Write MINIMAL code to make the test pass
80
83
 
@@ -26,8 +26,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
26
26
 
27
27
  - The test must fail for the RIGHT reason (not syntax/import errors)
28
28
  - Only one test at a time - this is critical for TDD discipline
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.
29
30
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
30
31
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
32
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
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
31
34
 
32
35
  2. **Green Phase**: Write MINIMAL code to make the test pass
33
36
 
@@ -27,8 +27,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
27
27
 
28
28
  - The test must fail for the RIGHT reason (not syntax/import errors)
29
29
  - Only one test at a time - this is critical for TDD discipline
30
+ - 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.
30
31
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
31
32
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
33
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
34
+ - 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
32
35
 
33
36
  2. **Green Phase**: Write MINIMAL code to make the test pass
34
37
 
@@ -29,8 +29,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
29
29
 
30
30
  - The test must fail for the RIGHT reason (not syntax/import errors)
31
31
  - Only one test at a time - this is critical for TDD discipline
32
+ - 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
33
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
33
34
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
35
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
36
+ - 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
34
37
 
35
38
  2. **Green Phase**: Write MINIMAL code to make the test pass
36
39
 
@@ -5,6 +5,8 @@ description: Summarize conversation progress and next steps
5
5
 
6
6
  Create a concise summary of the current conversation suitable for transferring context to a new conversation.
7
7
 
8
+ Additional info: $ARGUMENTS
9
+
8
10
  ## Summary Structure
9
11
 
10
12
  Provide a summary with these sections:
@@ -23,8 +23,11 @@ The foundation of TDD is the Red-Green-Refactor cycle:
23
23
 
24
24
  - The test must fail for the RIGHT reason (not syntax/import errors)
25
25
  - Only one test at a time - this is critical for TDD discipline
26
+ - 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.
26
27
  - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
27
28
  - Starting TDD for a new feature is always valid, even if test output shows unrelated work
29
+ - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
30
+ - 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
28
31
 
29
32
  2. **Green Phase**: Write MINIMAL code to make the test pass
30
33
 
@@ -69,7 +69,7 @@ Uncommitted changes: !git status --short`
69
69
 
70
70
  <step_2>
71
71
  <description>Parse the arguments</description>
72
- <input>$ARGUMENTS</input>
72
+ <input>The user-provided arguments</input>
73
73
  <expected_format>branch-name-or-github-url [optional-base-branch]</expected_format>
74
74
  <example>fix/issue-123-main-content-area-visually-clipped main</example>
75
75
  <example_github_url>https://github.com/owner/project/issues/123 main</example_github_url>
@@ -15,6 +15,8 @@ argument-hint: (no arguments)
15
15
 
16
16
  Clean up merged worktrees by finding the oldest merged branch, consolidating settings, and removing stale worktrees.
17
17
 
18
+ Additional info: $ARGUMENTS
19
+
18
20
  <current_state>
19
21
  Current branch: !git branch --show-current`
20
22
  Current worktrees: !git worktree list`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wbern/claude-instructions",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "TDD workflow commands for Claude Code CLI",
5
5
  "type": "module",
6
6
  "bin": "./bin/cli.js",