@wbern/claude-instructions 1.21.0 → 2.1.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 (80) hide show
  1. package/README.md +4 -2
  2. package/bin/cli.js +414 -229
  3. package/package.json +8 -6
  4. package/src/README.md +279 -0
  5. package/src/fragments/aaa-pattern.md +7 -0
  6. package/src/fragments/beads-awareness.md +1 -0
  7. package/src/fragments/beads-integration.md +8 -0
  8. package/{downloads/without-beads/commit.md → src/fragments/commit-process.md} +0 -17
  9. package/src/fragments/consistency-check.md +1 -0
  10. package/src/fragments/discovery-phase.md +22 -0
  11. package/src/fragments/fallback-arguments-beads.md +3 -0
  12. package/src/fragments/fallback-arguments.md +1 -0
  13. package/src/fragments/fullwidth-dollar-note.md +1 -0
  14. package/src/fragments/gap-beads.md +1 -0
  15. package/src/fragments/git-host-detection.md +19 -0
  16. package/src/fragments/github-issue-fetch.md +10 -0
  17. package/src/fragments/no-plan-files.md +3 -0
  18. package/src/fragments/peeping-tom-warning.md +9 -0
  19. package/src/fragments/plan-beads-context-hint.md +1 -0
  20. package/src/fragments/plan-beads-details.md +49 -0
  21. package/src/fragments/plan-beads-integration.md +2 -0
  22. package/src/fragments/summarize-beads.md +8 -0
  23. package/{downloads/without-beads/summarize.md → src/fragments/summarize-structure.md} +0 -20
  24. package/{downloads/without-beads/tdd.md → src/fragments/tdd-fundamentals.md} +0 -21
  25. package/src/fragments/test-quality-criteria.md +24 -0
  26. package/src/fragments/universal-guidelines.md +6 -0
  27. package/{downloads/without-beads → src/sources}/add-command.md +11 -25
  28. package/{downloads/without-beads → src/sources}/ask.md +11 -6
  29. package/{downloads/without-beads → src/sources}/beepboop.md +7 -6
  30. package/{downloads/without-beads → src/sources}/busycommit.md +9 -36
  31. package/{downloads/without-beads → src/sources}/code-review.md +16 -30
  32. package/src/sources/commit.md +23 -0
  33. package/src/sources/cycle.md +23 -0
  34. package/{downloads/without-beads → src/sources}/gap.md +11 -8
  35. package/src/sources/green.md +23 -0
  36. package/src/sources/issue.md +42 -0
  37. package/{downloads/without-beads → src/sources}/kata.md +10 -9
  38. package/{downloads/without-beads → src/sources}/plan.md +18 -39
  39. package/{downloads/without-beads → src/sources}/pr.md +10 -6
  40. package/src/sources/red.md +26 -0
  41. package/src/sources/refactor.md +27 -0
  42. package/{downloads/without-beads → src/sources}/ship.md +11 -6
  43. package/{downloads/without-beads → src/sources}/show.md +11 -6
  44. package/src/sources/spike.md +23 -0
  45. package/src/sources/summarize.md +23 -0
  46. package/{downloads/without-beads → src/sources}/tdd-review.md +11 -31
  47. package/src/sources/tdd.md +24 -0
  48. package/{downloads/without-beads → src/sources}/worktree-add.md +13 -31
  49. package/{downloads/without-beads → src/sources}/worktree-cleanup.md +9 -27
  50. package/downloads/with-beads/add-command.md +0 -159
  51. package/downloads/with-beads/ask.md +0 -144
  52. package/downloads/with-beads/beepboop.md +0 -47
  53. package/downloads/with-beads/busycommit.md +0 -78
  54. package/downloads/with-beads/code-review.md +0 -263
  55. package/downloads/with-beads/commands-metadata.json +0 -155
  56. package/downloads/with-beads/commit.md +0 -49
  57. package/downloads/with-beads/cycle.md +0 -95
  58. package/downloads/with-beads/gap.md +0 -38
  59. package/downloads/with-beads/green.md +0 -95
  60. package/downloads/with-beads/issue.md +0 -152
  61. package/downloads/with-beads/kata.md +0 -444
  62. package/downloads/with-beads/plan.md +0 -186
  63. package/downloads/with-beads/pr.md +0 -82
  64. package/downloads/with-beads/red.md +0 -103
  65. package/downloads/with-beads/refactor.md +0 -105
  66. package/downloads/with-beads/ship.md +0 -98
  67. package/downloads/with-beads/show.md +0 -114
  68. package/downloads/with-beads/spike.md +0 -95
  69. package/downloads/with-beads/summarize.md +0 -54
  70. package/downloads/with-beads/tdd-review.md +0 -102
  71. package/downloads/with-beads/tdd.md +0 -94
  72. package/downloads/with-beads/worktree-add.md +0 -357
  73. package/downloads/with-beads/worktree-cleanup.md +0 -250
  74. package/downloads/without-beads/commands-metadata.json +0 -155
  75. package/downloads/without-beads/cycle.md +0 -90
  76. package/downloads/without-beads/green.md +0 -90
  77. package/downloads/without-beads/issue.md +0 -140
  78. package/downloads/without-beads/red.md +0 -98
  79. package/downloads/without-beads/refactor.md +0 -100
  80. package/downloads/without-beads/spike.md +0 -90
@@ -1,140 +0,0 @@
1
- ---
2
- description: Analyze GitHub issue and create TDD implementation plan
3
- argument-hint: [optional-issue-number]
4
- ---
5
-
6
- Analyze GitHub issue and create TDD implementation plan.
7
-
8
- ## General Guidelines
9
-
10
- ### Output Style
11
-
12
- - **Never explicitly mention TDD** in code, comments, commits, PRs, or issues
13
- - Write natural, descriptive code without meta-commentary about the development process
14
- - The code should speak for itself - TDD is the process, not the product
15
-
16
- Process:
17
-
18
- 1. Get Issue Number
19
-
20
- - Either from branch name use that issue number
21
- - Patterns: issue-123, 123-feature, feature/123, fix/123
22
- - Or from this bullet point with custom info: $ARGUMENTS
23
- - If not found: ask user
24
-
25
- 1. Fetch Issue
26
-
27
- Try to fetch the issue using GitHub MCP (mcp__github__issue_read tool).
28
-
29
- If GitHub MCP is not configured, show:
30
-
31
- ```
32
- GitHub MCP not configured!
33
- See: https://github.com/modelcontextprotocol/servers/tree/main/src/github
34
- Trying GitHub CLI fallback...
35
- ```
36
-
37
- Then try using `gh issue view [ISSUE_NUMBER] --json` as fallback.
38
-
39
- 1. Analyze and Plan
40
-
41
- Summarize the issue and requirements, then:
42
-
43
- ## Discovery Phase
44
-
45
- Understand the requirement by asking (use AskUserQuestion if needed):
46
-
47
- **Problem Statement**
48
-
49
- - What problem does this solve?
50
- - Who experiences this problem?
51
- - What's the current pain point?
52
-
53
- **Desired Outcome**
54
-
55
- - What should happen after this is built?
56
- - How will users interact with it?
57
- - What does success look like?
58
-
59
- **Scope & Constraints**
60
-
61
- - What's in scope vs. out of scope?
62
- - Any technical constraints?
63
- - Dependencies on other systems/features?
64
-
65
- **Context Check**
66
-
67
- - Search codebase for related features/modules
68
- - Check for existing test files that might be relevant
69
-
70
- ## TDD Fundamentals
71
-
72
- ### The TDD Cycle
73
-
74
- The foundation of TDD is the Red-Green-Refactor cycle:
75
-
76
- 1. **Red Phase**: Write ONE failing test that describes desired behavior
77
-
78
- - The test must fail for the RIGHT reason (not syntax/import errors)
79
- - Only one test at a time - this is critical for TDD discipline
80
- - 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.
81
- - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
82
- - Starting TDD for a new feature is always valid, even if test output shows unrelated work
83
- - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
84
- - 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
-
86
- 2. **Green Phase**: Write MINIMAL code to make the test pass
87
-
88
- - Implement only what's needed for the current failing test
89
- - No anticipatory coding or extra features
90
- - Address the specific failure message
91
-
92
- 3. **Refactor Phase**: Improve code structure while keeping tests green
93
- - Only allowed when relevant tests are passing
94
- - Requires proof that tests have been run and are green
95
- - Applies to BOTH implementation and test code
96
- - No refactoring with failing tests - fix them first
97
-
98
- ### Core Violations
99
-
100
- 1. **Multiple Test Addition**
101
-
102
- - Adding more than one new test at once
103
- - Exception: Initial test file setup or extracting shared test utilities
104
-
105
- 2. **Over-Implementation**
106
-
107
- - Code that exceeds what's needed to pass the current failing test
108
- - Adding untested features, methods, or error handling
109
- - Implementing multiple methods when test only requires one
110
-
111
- 3. **Premature Implementation**
112
- - Adding implementation before a test exists and fails properly
113
- - Adding implementation without running the test first
114
- - Refactoring when tests haven't been run or are failing
115
-
116
- ### Critical Principle: Incremental Development
117
-
118
- Each step in TDD should address ONE specific issue:
119
-
120
- - Test fails "not defined" → Create empty stub/class only
121
- - Test fails "not a function" → Add method stub only
122
- - Test fails with assertion → Implement minimal logic only
123
-
124
- ### Optional Pre-Phase: Spike Phase
125
-
126
- In rare cases where the problem space, interface, or expected behavior is unclear, a **Spike Phase** may be used **before the Red Phase**.
127
- This phase is **not part of the regular TDD workflow** and must only be applied under exceptional circumstances.
128
-
129
- - The goal of a Spike is **exploration and learning**, not implementation.
130
- - The code written during a Spike is **disposable** and **must not** be merged or reused directly.
131
- - Once sufficient understanding is achieved, all spike code is discarded, and normal TDD resumes starting from the **Red Phase**.
132
- - A Spike is justified only when it is impossible to define a meaningful failing test due to technical uncertainty or unknown system behavior.
133
-
134
- ### General Information
135
-
136
- - Sometimes the test output shows as no tests have been run when a new test is failing due to a missing import or constructor. In such cases, allow the agent to create simple stubs. Ask them if they forgot to create a stub if they are stuck.
137
- - It is never allowed to introduce new logic without evidence of relevant failing tests. However, stubs and simple implementation to make imports and test infrastructure work is fine.
138
- - In the refactor phase, it is perfectly fine to refactor both test and implementation code. That said, completely new functionality is not allowed. Types, clean up, abstractions, and helpers are allowed as long as they do not introduce new behavior.
139
- - Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
140
- - Provide the agent with helpful directions so that they do not get stuck when blocking them.
@@ -1,98 +0,0 @@
1
- ---
2
- description: Execute TDD Red Phase - write ONE failing test
3
- argument-hint: [optional additional info]
4
- ---
5
-
6
- RED PHASE! Apply the below to the info given by user input here:
7
-
8
- $ARGUMENTS
9
-
10
- ## General Guidelines
11
-
12
- ### Output Style
13
-
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
-
18
- (If there was no info above, fallback to the context of the conversation)
19
-
20
- ## TDD Fundamentals
21
-
22
- ### The TDD Cycle
23
-
24
- The foundation of TDD is the Red-Green-Refactor cycle:
25
-
26
- 1. **Red Phase**: Write ONE failing test that describes desired behavior
27
-
28
- - The test must fail for the RIGHT reason (not syntax/import errors)
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.
31
- - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
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
35
-
36
- 2. **Green Phase**: Write MINIMAL code to make the test pass
37
-
38
- - Implement only what's needed for the current failing test
39
- - No anticipatory coding or extra features
40
- - Address the specific failure message
41
-
42
- 3. **Refactor Phase**: Improve code structure while keeping tests green
43
- - Only allowed when relevant tests are passing
44
- - Requires proof that tests have been run and are green
45
- - Applies to BOTH implementation and test code
46
- - No refactoring with failing tests - fix them first
47
-
48
- ### Core Violations
49
-
50
- 1. **Multiple Test Addition**
51
-
52
- - Adding more than one new test at once
53
- - Exception: Initial test file setup or extracting shared test utilities
54
-
55
- 2. **Over-Implementation**
56
-
57
- - Code that exceeds what's needed to pass the current failing test
58
- - Adding untested features, methods, or error handling
59
- - Implementing multiple methods when test only requires one
60
-
61
- 3. **Premature Implementation**
62
- - Adding implementation before a test exists and fails properly
63
- - Adding implementation without running the test first
64
- - Refactoring when tests haven't been run or are failing
65
-
66
- ### Critical Principle: Incremental Development
67
-
68
- Each step in TDD should address ONE specific issue:
69
-
70
- - Test fails "not defined" → Create empty stub/class only
71
- - Test fails "not a function" → Add method stub only
72
- - Test fails with assertion → Implement minimal logic only
73
-
74
- ### Optional Pre-Phase: Spike Phase
75
-
76
- In rare cases where the problem space, interface, or expected behavior is unclear, a **Spike Phase** may be used **before the Red Phase**.
77
- This phase is **not part of the regular TDD workflow** and must only be applied under exceptional circumstances.
78
-
79
- - The goal of a Spike is **exploration and learning**, not implementation.
80
- - The code written during a Spike is **disposable** and **must not** be merged or reused directly.
81
- - Once sufficient understanding is achieved, all spike code is discarded, and normal TDD resumes starting from the **Red Phase**.
82
- - A Spike is justified only when it is impossible to define a meaningful failing test due to technical uncertainty or unknown system behavior.
83
-
84
- ### General Information
85
-
86
- - Sometimes the test output shows as no tests have been run when a new test is failing due to a missing import or constructor. In such cases, allow the agent to create simple stubs. Ask them if they forgot to create a stub if they are stuck.
87
- - It is never allowed to introduce new logic without evidence of relevant failing tests. However, stubs and simple implementation to make imports and test infrastructure work is fine.
88
- - In the refactor phase, it is perfectly fine to refactor both test and implementation code. That said, completely new functionality is not allowed. Types, clean up, abstractions, and helpers are allowed as long as they do not introduce new behavior.
89
- - Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
90
- - Provide the agent with helpful directions so that they do not get stuck when blocking them.
91
-
92
- ### Test Structure (AAA Pattern)
93
-
94
- Structure each test with clear phases:
95
-
96
- - **Arrange**: Set up test data and preconditions (keep minimal)
97
- - **Act**: Execute the single action being tested
98
- - **Assert**: Verify the expected outcome with specific assertions
@@ -1,100 +0,0 @@
1
- ---
2
- description: Execute TDD Refactor Phase - improve code structure while keeping tests green
3
- argument-hint: <refactoring description>
4
- ---
5
-
6
- Apply this document (specifically the Refactor phase), to the info given by user input here: $ARGUMENTS
7
-
8
- ## General Guidelines
9
-
10
- ### Output Style
11
-
12
- - **Never explicitly mention TDD** in code, comments, commits, PRs, or issues
13
- - Write natural, descriptive code without meta-commentary about the development process
14
- - The code should speak for itself - TDD is the process, not the product
15
-
16
- (If there was no info above, fallback to the context of the conversation)
17
-
18
- ## TDD Fundamentals
19
-
20
- ### The TDD Cycle
21
-
22
- The foundation of TDD is the Red-Green-Refactor cycle:
23
-
24
- 1. **Red Phase**: Write ONE failing test that describes desired behavior
25
-
26
- - The test must fail for the RIGHT reason (not syntax/import errors)
27
- - Only one test at a time - this is critical for TDD discipline
28
- - 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
- - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
30
- - Starting TDD for a new feature is always valid, even if test output shows unrelated work
31
- - For DOM-based tests, use `data-testid` attributes to select elements rather than CSS classes, tag names, or text content
32
- - 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
-
34
- 2. **Green Phase**: Write MINIMAL code to make the test pass
35
-
36
- - Implement only what's needed for the current failing test
37
- - No anticipatory coding or extra features
38
- - Address the specific failure message
39
-
40
- 3. **Refactor Phase**: Improve code structure while keeping tests green
41
- - Only allowed when relevant tests are passing
42
- - Requires proof that tests have been run and are green
43
- - Applies to BOTH implementation and test code
44
- - No refactoring with failing tests - fix them first
45
-
46
- ### Core Violations
47
-
48
- 1. **Multiple Test Addition**
49
-
50
- - Adding more than one new test at once
51
- - Exception: Initial test file setup or extracting shared test utilities
52
-
53
- 2. **Over-Implementation**
54
-
55
- - Code that exceeds what's needed to pass the current failing test
56
- - Adding untested features, methods, or error handling
57
- - Implementing multiple methods when test only requires one
58
-
59
- 3. **Premature Implementation**
60
- - Adding implementation before a test exists and fails properly
61
- - Adding implementation without running the test first
62
- - Refactoring when tests haven't been run or are failing
63
-
64
- ### Critical Principle: Incremental Development
65
-
66
- Each step in TDD should address ONE specific issue:
67
-
68
- - Test fails "not defined" → Create empty stub/class only
69
- - Test fails "not a function" → Add method stub only
70
- - Test fails with assertion → Implement minimal logic only
71
-
72
- ### Optional Pre-Phase: Spike Phase
73
-
74
- In rare cases where the problem space, interface, or expected behavior is unclear, a **Spike Phase** may be used **before the Red Phase**.
75
- This phase is **not part of the regular TDD workflow** and must only be applied under exceptional circumstances.
76
-
77
- - The goal of a Spike is **exploration and learning**, not implementation.
78
- - The code written during a Spike is **disposable** and **must not** be merged or reused directly.
79
- - Once sufficient understanding is achieved, all spike code is discarded, and normal TDD resumes starting from the **Red Phase**.
80
- - A Spike is justified only when it is impossible to define a meaningful failing test due to technical uncertainty or unknown system behavior.
81
-
82
- ### General Information
83
-
84
- - Sometimes the test output shows as no tests have been run when a new test is failing due to a missing import or constructor. In such cases, allow the agent to create simple stubs. Ask them if they forgot to create a stub if they are stuck.
85
- - It is never allowed to introduce new logic without evidence of relevant failing tests. However, stubs and simple implementation to make imports and test infrastructure work is fine.
86
- - In the refactor phase, it is perfectly fine to refactor both test and implementation code. That said, completely new functionality is not allowed. Types, clean up, abstractions, and helpers are allowed as long as they do not introduce new behavior.
87
- - Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
88
- - Provide the agent with helpful directions so that they do not get stuck when blocking them.
89
-
90
- ### Watch for Brittle Tests
91
-
92
- When refactoring implementation, watch for **Peeping Tom** tests that:
93
-
94
- - Test private methods or internal state directly
95
- - Assert on implementation details rather than behavior
96
- - Break on any refactoring even when behavior is preserved
97
-
98
- If tests fail after a pure refactoring (no behavior change), consider whether the tests are testing implementation rather than behavior.
99
-
100
- 1. **Consistency check** - Look for inconsistent patterns, naming conventions, or structure across the codebase
@@ -1,90 +0,0 @@
1
- ---
2
- description: Execute TDD Spike Phase - exploratory coding to understand problem space before TDD
3
- argument-hint: <exploration description>
4
- ---
5
-
6
- SPIKE PHASE! Apply the below to the info given by user input here:
7
-
8
- $ARGUMENTS
9
-
10
- ## General Guidelines
11
-
12
- ### Output Style
13
-
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
-
18
- (If there was no info above, fallback to the context of the conversation)
19
-
20
- ## TDD Fundamentals
21
-
22
- ### The TDD Cycle
23
-
24
- The foundation of TDD is the Red-Green-Refactor cycle:
25
-
26
- 1. **Red Phase**: Write ONE failing test that describes desired behavior
27
-
28
- - The test must fail for the RIGHT reason (not syntax/import errors)
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.
31
- - **Adding a single test to a test file is ALWAYS allowed** - no prior test output needed
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
35
-
36
- 2. **Green Phase**: Write MINIMAL code to make the test pass
37
-
38
- - Implement only what's needed for the current failing test
39
- - No anticipatory coding or extra features
40
- - Address the specific failure message
41
-
42
- 3. **Refactor Phase**: Improve code structure while keeping tests green
43
- - Only allowed when relevant tests are passing
44
- - Requires proof that tests have been run and are green
45
- - Applies to BOTH implementation and test code
46
- - No refactoring with failing tests - fix them first
47
-
48
- ### Core Violations
49
-
50
- 1. **Multiple Test Addition**
51
-
52
- - Adding more than one new test at once
53
- - Exception: Initial test file setup or extracting shared test utilities
54
-
55
- 2. **Over-Implementation**
56
-
57
- - Code that exceeds what's needed to pass the current failing test
58
- - Adding untested features, methods, or error handling
59
- - Implementing multiple methods when test only requires one
60
-
61
- 3. **Premature Implementation**
62
- - Adding implementation before a test exists and fails properly
63
- - Adding implementation without running the test first
64
- - Refactoring when tests haven't been run or are failing
65
-
66
- ### Critical Principle: Incremental Development
67
-
68
- Each step in TDD should address ONE specific issue:
69
-
70
- - Test fails "not defined" → Create empty stub/class only
71
- - Test fails "not a function" → Add method stub only
72
- - Test fails with assertion → Implement minimal logic only
73
-
74
- ### Optional Pre-Phase: Spike Phase
75
-
76
- In rare cases where the problem space, interface, or expected behavior is unclear, a **Spike Phase** may be used **before the Red Phase**.
77
- This phase is **not part of the regular TDD workflow** and must only be applied under exceptional circumstances.
78
-
79
- - The goal of a Spike is **exploration and learning**, not implementation.
80
- - The code written during a Spike is **disposable** and **must not** be merged or reused directly.
81
- - Once sufficient understanding is achieved, all spike code is discarded, and normal TDD resumes starting from the **Red Phase**.
82
- - A Spike is justified only when it is impossible to define a meaningful failing test due to technical uncertainty or unknown system behavior.
83
-
84
- ### General Information
85
-
86
- - Sometimes the test output shows as no tests have been run when a new test is failing due to a missing import or constructor. In such cases, allow the agent to create simple stubs. Ask them if they forgot to create a stub if they are stuck.
87
- - It is never allowed to introduce new logic without evidence of relevant failing tests. However, stubs and simple implementation to make imports and test infrastructure work is fine.
88
- - In the refactor phase, it is perfectly fine to refactor both test and implementation code. That said, completely new functionality is not allowed. Types, clean up, abstractions, and helpers are allowed as long as they do not introduce new behavior.
89
- - Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
90
- - Provide the agent with helpful directions so that they do not get stuck when blocking them.