rebar-mcp 2.0.0 → 2.2.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 (99) hide show
  1. package/.claude/skills/{bmmibwetxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx → bmmoseokfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}/SKILL.md +2 -2
  2. package/.claude/skills/{bmmibwjgvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx → bmmosewq3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}/SKILL.md +2 -2
  3. package/.claude/skills/{bmmibwsesxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx → bmmosf3hvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}/SKILL.md +2 -2
  4. package/.claude/skills/{bmmibwxufxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx → bmmosfe4bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}/SKILL.md +2 -2
  5. package/.claude/skills/bmmous2g0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/SKILL.md +21 -0
  6. package/.claude/skills/{bnd-mmibweu3 → bnd-mmoseokj}/SKILL.md +2 -2
  7. package/.claude/skills/{bnd-mmibwjh4 → bnd-mmosewq9}/SKILL.md +2 -2
  8. package/.claude/skills/{bnd-mmibwsey → bnd-mmosf3i0}/SKILL.md +2 -2
  9. package/.claude/skills/{bnd-mmibwxup → bnd-mmosfe4f}/SKILL.md +2 -2
  10. package/.claude/skills/bnd-mmous2g4/SKILL.md +21 -0
  11. package/.claude/skills/{nl-mmibweus → nl-mmoseoky}/SKILL.md +2 -2
  12. package/.claude/skills/{nl-mmibwjhf → nl-mmosewqr}/SKILL.md +2 -2
  13. package/.claude/skills/{nl-mmibwsf7 → nl-mmosf3i7}/SKILL.md +2 -2
  14. package/.claude/skills/{nl-mmibwxvq → nl-mmosfe4m}/SKILL.md +2 -2
  15. package/.claude/skills/nl-mmous2gc/SKILL.md +25 -0
  16. package/.claude/skills/test/", /"malicious/": /"true/SKILL.md" +43 -62
  17. package/.claude/skills/test-emoji-/360/237/230/200-skill/SKILL.md +43 -62
  18. package/.claude/skills/test-skill/SKILL.md +43 -62
  19. package/.claude/skills/test; rm -rf /; skill/SKILL.md +43 -62
  20. package/.claude/skills/test<script>alert(1)</script>skill/SKILL.md +43 -62
  21. package/README.md +141 -14
  22. package/dist/cli.d.ts.map +1 -1
  23. package/dist/cli.js +207 -0
  24. package/dist/cli.js.map +1 -1
  25. package/dist/constants.d.ts +1 -1
  26. package/dist/constants.d.ts.map +1 -1
  27. package/dist/constants.js +1 -1
  28. package/dist/constants.js.map +1 -1
  29. package/dist/index.js +73 -9
  30. package/dist/index.js.map +1 -1
  31. package/dist/schemas/common.d.ts +3 -0
  32. package/dist/schemas/common.d.ts.map +1 -1
  33. package/dist/schemas/scaffolding.d.ts +79 -0
  34. package/dist/schemas/scaffolding.d.ts.map +1 -1
  35. package/dist/schemas/scaffolding.js +28 -0
  36. package/dist/schemas/scaffolding.js.map +1 -1
  37. package/dist/services/prereview-engine.d.ts +60 -0
  38. package/dist/services/prereview-engine.d.ts.map +1 -0
  39. package/dist/services/prereview-engine.js +354 -0
  40. package/dist/services/prereview-engine.js.map +1 -0
  41. package/dist/services/strictness.js +10 -10
  42. package/dist/services/strictness.js.map +1 -1
  43. package/dist/tests/enforcement.test.js +8 -11
  44. package/dist/tests/enforcement.test.js.map +1 -1
  45. package/dist/tests/knowledge.test.js +4 -5
  46. package/dist/tests/knowledge.test.js.map +1 -1
  47. package/dist/tools/enterprise.d.ts.map +1 -1
  48. package/dist/tools/enterprise.js +303 -102
  49. package/dist/tools/enterprise.js.map +1 -1
  50. package/dist/tools/knowledge.d.ts.map +1 -1
  51. package/dist/tools/knowledge.js +51 -14
  52. package/dist/tools/knowledge.js.map +1 -1
  53. package/dist/tools/management.d.ts.map +1 -1
  54. package/dist/tools/management.js +95 -6
  55. package/dist/tools/management.js.map +1 -1
  56. package/dist/tools/prereview.d.ts +3 -0
  57. package/dist/tools/prereview.d.ts.map +1 -0
  58. package/dist/tools/prereview.js +523 -0
  59. package/dist/tools/prereview.js.map +1 -0
  60. package/dist/tools/scaffolding.d.ts.map +1 -1
  61. package/dist/tools/scaffolding.js +188 -56
  62. package/dist/tools/scaffolding.js.map +1 -1
  63. package/package.json +2 -1
  64. package/src/cli.ts +245 -0
  65. package/src/constants.ts +1 -1
  66. package/src/index.ts +83 -9
  67. package/src/schemas/scaffolding.ts +28 -0
  68. package/src/services/prereview-engine.ts +428 -0
  69. package/src/services/strictness.ts +10 -10
  70. package/src/tests/enforcement.test.ts +8 -12
  71. package/src/tests/knowledge.test.ts +4 -6
  72. package/src/tools/enterprise.ts +311 -100
  73. package/src/tools/knowledge.ts +52 -15
  74. package/src/tools/management.ts +99 -6
  75. package/src/tools/prereview.ts +685 -0
  76. package/src/tools/scaffolding.ts +185 -47
  77. package/.claude/skills/bmmibx3r9xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/SKILL.md +0 -21
  78. package/.claude/skills/bmmji0lrkxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/SKILL.md +0 -21
  79. package/.claude/skills/bmmjiniphxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/SKILL.md +0 -21
  80. package/.claude/skills/bmmjio86zxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/SKILL.md +0 -21
  81. package/.claude/skills/bmmjiolfbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/SKILL.md +0 -21
  82. package/.claude/skills/bmmjit1lvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/SKILL.md +0 -21
  83. package/.claude/skills/bmmjita1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/SKILL.md +0 -21
  84. package/.claude/skills/bnd-mmibx3rg/SKILL.md +0 -21
  85. package/.claude/skills/bnd-mmji0lrp/SKILL.md +0 -21
  86. package/.claude/skills/bnd-mmjinipm/SKILL.md +0 -21
  87. package/.claude/skills/bnd-mmjio875/SKILL.md +0 -21
  88. package/.claude/skills/bnd-mmjiolfg/SKILL.md +0 -21
  89. package/.claude/skills/bnd-mmjit1m3/SKILL.md +0 -21
  90. package/.claude/skills/bnd-mmjita1x/SKILL.md +0 -21
  91. package/.claude/skills/coercion-test/SKILL.md +0 -50
  92. package/.claude/skills/mcp-dev/SKILL.md +0 -61
  93. package/.claude/skills/nl-mmibx3rt/SKILL.md +0 -25
  94. package/.claude/skills/nl-mmji0lrz/SKILL.md +0 -25
  95. package/.claude/skills/nl-mmjinipx/SKILL.md +0 -25
  96. package/.claude/skills/nl-mmjio87f/SKILL.md +0 -25
  97. package/.claude/skills/nl-mmjiolfs/SKILL.md +0 -25
  98. package/.claude/skills/nl-mmjit1mc/SKILL.md +0 -25
  99. package/.claude/skills/nl-mmjita26/SKILL.md +0 -25
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: bmmibwetxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2
+ name: bmmoseokfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3
3
  description: A test skill
4
4
  invocation: undefined
5
5
  context: undefined
6
6
  ---
7
7
 
8
- # bmmibwetxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8
+ # bmmoseokfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
9
9
 
10
10
  A test skill
11
11
 
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: bmmibwjgvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2
+ name: bmmosewq3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3
3
  description: A test skill
4
4
  invocation: undefined
5
5
  context: undefined
6
6
  ---
7
7
 
8
- # bmmibwjgvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8
+ # bmmosewq3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
9
9
 
10
10
  A test skill
11
11
 
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: bmmibwsesxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2
+ name: bmmosf3hvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3
3
  description: A test skill
4
4
  invocation: undefined
5
5
  context: undefined
6
6
  ---
7
7
 
8
- # bmmibwsesxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8
+ # bmmosf3hvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
9
9
 
10
10
  A test skill
11
11
 
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: bmmibwxufxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2
+ name: bmmosfe4bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3
3
  description: A test skill
4
4
  invocation: undefined
5
5
  context: undefined
6
6
  ---
7
7
 
8
- # bmmibwxufxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8
+ # bmmosfe4bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
9
9
 
10
10
  A test skill
11
11
 
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: bmmous2g0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3
+ description: A test skill
4
+ invocation: undefined
5
+ context: undefined
6
+ ---
7
+
8
+ # bmmous2g0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
9
+
10
+ A test skill
11
+
12
+ ## Instructions
13
+
14
+ <!-- Replace this with your skill instructions.
15
+ Good skill instructions:
16
+ 1. Define the agent's role clearly
17
+ 2. Specify the exact output format
18
+ 3. List what to check/do step by step
19
+ 4. Include examples of good output
20
+ -->
21
+
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: bnd-mmibweu3
2
+ name: bnd-mmoseokj
3
3
  description: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4
4
  invocation: undefined
5
5
  context: undefined
6
6
  ---
7
7
 
8
- # bnd-mmibweu3
8
+ # bnd-mmoseokj
9
9
 
10
10
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
11
11
 
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: bnd-mmibwjh4
2
+ name: bnd-mmosewq9
3
3
  description: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4
4
  invocation: undefined
5
5
  context: undefined
6
6
  ---
7
7
 
8
- # bnd-mmibwjh4
8
+ # bnd-mmosewq9
9
9
 
10
10
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
11
11
 
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: bnd-mmibwsey
2
+ name: bnd-mmosf3i0
3
3
  description: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4
4
  invocation: undefined
5
5
  context: undefined
6
6
  ---
7
7
 
8
- # bnd-mmibwsey
8
+ # bnd-mmosf3i0
9
9
 
10
10
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
11
11
 
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: bnd-mmibwxup
2
+ name: bnd-mmosfe4f
3
3
  description: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4
4
  invocation: undefined
5
5
  context: undefined
6
6
  ---
7
7
 
8
- # bnd-mmibwxup
8
+ # bnd-mmosfe4f
9
9
 
10
10
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
11
11
 
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: bnd-mmous2g4
3
+ description: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4
+ invocation: undefined
5
+ context: undefined
6
+ ---
7
+
8
+ # bnd-mmous2g4
9
+
10
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
11
+
12
+ ## Instructions
13
+
14
+ <!-- Replace this with your skill instructions.
15
+ Good skill instructions:
16
+ 1. Define the agent's role clearly
17
+ 2. Specify the exact output format
18
+ 3. List what to check/do step by step
19
+ 4. Include examples of good output
20
+ -->
21
+
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: nl-mmibweus
2
+ name: nl-mmoseoky
3
3
  description: Line one
4
4
  Line two
5
5
  Line three
@@ -7,7 +7,7 @@ invocation: undefined
7
7
  context: undefined
8
8
  ---
9
9
 
10
- # nl-mmibweus
10
+ # nl-mmoseoky
11
11
 
12
12
  Line one
13
13
  Line two
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: nl-mmibwjhf
2
+ name: nl-mmosewqr
3
3
  description: Line one
4
4
  Line two
5
5
  Line three
@@ -7,7 +7,7 @@ invocation: undefined
7
7
  context: undefined
8
8
  ---
9
9
 
10
- # nl-mmibwjhf
10
+ # nl-mmosewqr
11
11
 
12
12
  Line one
13
13
  Line two
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: nl-mmibwsf7
2
+ name: nl-mmosf3i7
3
3
  description: Line one
4
4
  Line two
5
5
  Line three
@@ -7,7 +7,7 @@ invocation: undefined
7
7
  context: undefined
8
8
  ---
9
9
 
10
- # nl-mmibwsf7
10
+ # nl-mmosf3i7
11
11
 
12
12
  Line one
13
13
  Line two
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: nl-mmibwxvq
2
+ name: nl-mmosfe4m
3
3
  description: Line one
4
4
  Line two
5
5
  Line three
@@ -7,7 +7,7 @@ invocation: undefined
7
7
  context: undefined
8
8
  ---
9
9
 
10
- # nl-mmibwxvq
10
+ # nl-mmosfe4m
11
11
 
12
12
  Line one
13
13
  Line two
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: nl-mmous2gc
3
+ description: Line one
4
+ Line two
5
+ Line three
6
+ invocation: undefined
7
+ context: undefined
8
+ ---
9
+
10
+ # nl-mmous2gc
11
+
12
+ Line one
13
+ Line two
14
+ Line three
15
+
16
+ ## Instructions
17
+
18
+ <!-- Replace this with your skill instructions.
19
+ Good skill instructions:
20
+ 1. Define the agent's role clearly
21
+ 2. Specify the exact output format
22
+ 3. List what to check/do step by step
23
+ 4. Include examples of good output
24
+ -->
25
+
@@ -5,65 +5,46 @@ invocation: undefined
5
5
  context: undefined
6
6
  ---
7
7
 
8
- ## Test Writing Process
9
-
10
- ### Step 1: Analyze What Needs Testing
11
- - Read the function/module signature, parameters, and return type
12
- - Identify the happy path (normal successful execution)
13
- - Identify error paths (what can go wrong?)
14
- - Identify edge cases (empty input, null, boundary values, max values)
15
- - Identify integration points (database calls, API calls, file system)
16
-
17
- ### Step 2: Write Tests in This Order
18
-
19
- 1. **Happy path test** The most basic successful case
20
- 2. **Input validation tests** — Invalid inputs, missing required fields, wrong types
21
- 3. **Edge case tests** — Empty arrays, zero values, very long strings, special characters
22
- 4. **Error handling tests** Network failures, database errors, file not found
23
- 5. **Integration tests** Full request/response cycle (if applicable)
24
-
25
- ### Step 3: Test Structure
26
-
27
- Every test MUST follow this structure:
28
-
29
- ```
30
- // Descriptive name that explains what is being tested and expected outcome
31
- test("createUser returns the created user with a generated ID when given valid input", async () => {
32
- // ARRANGE: Set up test data and dependencies
33
- const input = { name: "Test User", email: "test@example.com" };
34
-
35
- // ACT: Execute the function under test
36
- const result = await createUser(input);
37
-
38
- // ASSERT: Verify the outcome
39
- expect(result.id).toBeDefined();
40
- expect(result.name).toBe("Test User");
41
- expect(result.email).toBe("test@example.com");
42
- });
43
- ```
44
-
45
- ### Mandatory Test Categories
46
-
47
- For EVERY function, write tests covering:
48
-
49
- | Category | Example | Required? |
50
- |---|---|---|
51
- | Valid input, expected output | Normal successful operation | ALWAYS |
52
- | Missing required field | Omit a required parameter | ALWAYS |
53
- | Invalid type | Pass string where number expected | ALWAYS |
54
- | Empty input | Empty string, empty array, null | ALWAYS |
55
- | Boundary values | 0, -1, MAX_INT, very long string | WHEN APPLICABLE |
56
- | Duplicate/conflict | Creating something that already exists | WHEN APPLICABLE |
57
- | Not found | Requesting something that does not exist | WHEN APPLICABLE |
58
- | Unauthorized | Accessing without proper permissions | WHEN AUTH EXISTS |
59
- | Concurrent access | Two operations on same resource | WHEN APPLICABLE |
60
- | Error recovery | Service dependency fails | WHEN EXTERNAL DEPS EXIST |
61
-
62
- ### Rules
63
- - Test file names MUST match source file: `user.service.ts` → `user.service.test.ts`
64
- - NEVER test implementation details — test behavior and outcomes
65
- - NEVER use `test("should work")` — test names must describe the specific scenario and expected outcome
66
- - EVERY test must be independent — no test should depend on another test running first
67
- - ALWAYS clean up test data (use beforeEach/afterEach or setup/teardown)
68
- - Mock external dependencies (databases, APIs, file system) — do not make real network calls in unit tests
69
- - NEVER write a test that always passes — verify your test fails before the implementation exists
8
+ # Test Writer
9
+
10
+ You write tests that catch real bugs, not tests that just check if the code runs.
11
+
12
+ ## Before Writing
13
+
14
+ 1. **Read existing tests** find 2-3 test files to understand:
15
+ - Which testing framework (Jest, Vitest, pytest, JUnit, etc.)
16
+ - Test file naming convention (`.test.ts`, `.spec.ts`, `_test.go`, etc.)
17
+ - Test location (colocated vs. `__tests__/` vs. `test/`)
18
+ - Mocking patterns used (jest.mock, vi.mock, unittest.mock, etc.)
19
+ - Setup/teardown patterns (beforeEach, fixtures, etc.)
20
+
21
+ 2. **Read the code under test** — understand:
22
+ - All public functions and their signatures
23
+ - Edge cases: What happens with null/undefined/empty/zero/negative inputs?
24
+ - Error paths: What exceptions can be thrown?
25
+ - Side effects: Database calls, API calls, file system operations
26
+
27
+ ## Test Writing Rules
28
+
29
+ ### Coverage Strategy
30
+ - **Happy path**: Normal inputs produce expected outputs
31
+ - **Edge cases**: Empty strings, empty arrays, zero, negative numbers, max values
32
+ - **Error cases**: Invalid inputs, network failures, permission errors
33
+ - **Boundary conditions**: First item, last item, exactly at limits
34
+
35
+ ### Quality Standards
36
+ - Each test has a descriptive name: `"returns empty array when user has no orders"`
37
+ - One assertion per concept (not one assertion per test)
38
+ - Tests are independent — no test relies on another test's side effects
39
+ - Mock external dependencies (APIs, databases) — never make real calls
40
+ - Use factories/fixtures for complex test data
41
+
42
+ ### Anti-Patterns to Avoid
43
+ - Testing implementation details (internal method calls, private state)
44
+ - Snapshot tests for logic (only use for UI rendering)
45
+ - Tests that pass when the code is broken
46
+ - Copy-pasting the implementation as the expected value
47
+
48
+ ## Output
49
+ Place test files where the project convention expects them.
50
+ Run the tests after writing to verify they pass.
@@ -5,65 +5,46 @@ invocation: undefined
5
5
  context: undefined
6
6
  ---
7
7
 
8
- ## Test Writing Process
9
-
10
- ### Step 1: Analyze What Needs Testing
11
- - Read the function/module signature, parameters, and return type
12
- - Identify the happy path (normal successful execution)
13
- - Identify error paths (what can go wrong?)
14
- - Identify edge cases (empty input, null, boundary values, max values)
15
- - Identify integration points (database calls, API calls, file system)
16
-
17
- ### Step 2: Write Tests in This Order
18
-
19
- 1. **Happy path test** The most basic successful case
20
- 2. **Input validation tests** — Invalid inputs, missing required fields, wrong types
21
- 3. **Edge case tests** — Empty arrays, zero values, very long strings, special characters
22
- 4. **Error handling tests** Network failures, database errors, file not found
23
- 5. **Integration tests** Full request/response cycle (if applicable)
24
-
25
- ### Step 3: Test Structure
26
-
27
- Every test MUST follow this structure:
28
-
29
- ```
30
- // Descriptive name that explains what is being tested and expected outcome
31
- test("createUser returns the created user with a generated ID when given valid input", async () => {
32
- // ARRANGE: Set up test data and dependencies
33
- const input = { name: "Test User", email: "test@example.com" };
34
-
35
- // ACT: Execute the function under test
36
- const result = await createUser(input);
37
-
38
- // ASSERT: Verify the outcome
39
- expect(result.id).toBeDefined();
40
- expect(result.name).toBe("Test User");
41
- expect(result.email).toBe("test@example.com");
42
- });
43
- ```
44
-
45
- ### Mandatory Test Categories
46
-
47
- For EVERY function, write tests covering:
48
-
49
- | Category | Example | Required? |
50
- |---|---|---|
51
- | Valid input, expected output | Normal successful operation | ALWAYS |
52
- | Missing required field | Omit a required parameter | ALWAYS |
53
- | Invalid type | Pass string where number expected | ALWAYS |
54
- | Empty input | Empty string, empty array, null | ALWAYS |
55
- | Boundary values | 0, -1, MAX_INT, very long string | WHEN APPLICABLE |
56
- | Duplicate/conflict | Creating something that already exists | WHEN APPLICABLE |
57
- | Not found | Requesting something that does not exist | WHEN APPLICABLE |
58
- | Unauthorized | Accessing without proper permissions | WHEN AUTH EXISTS |
59
- | Concurrent access | Two operations on same resource | WHEN APPLICABLE |
60
- | Error recovery | Service dependency fails | WHEN EXTERNAL DEPS EXIST |
61
-
62
- ### Rules
63
- - Test file names MUST match source file: `user.service.ts` → `user.service.test.ts`
64
- - NEVER test implementation details — test behavior and outcomes
65
- - NEVER use `test("should work")` — test names must describe the specific scenario and expected outcome
66
- - EVERY test must be independent — no test should depend on another test running first
67
- - ALWAYS clean up test data (use beforeEach/afterEach or setup/teardown)
68
- - Mock external dependencies (databases, APIs, file system) — do not make real network calls in unit tests
69
- - NEVER write a test that always passes — verify your test fails before the implementation exists
8
+ # Test Writer
9
+
10
+ You write tests that catch real bugs, not tests that just check if the code runs.
11
+
12
+ ## Before Writing
13
+
14
+ 1. **Read existing tests** find 2-3 test files to understand:
15
+ - Which testing framework (Jest, Vitest, pytest, JUnit, etc.)
16
+ - Test file naming convention (`.test.ts`, `.spec.ts`, `_test.go`, etc.)
17
+ - Test location (colocated vs. `__tests__/` vs. `test/`)
18
+ - Mocking patterns used (jest.mock, vi.mock, unittest.mock, etc.)
19
+ - Setup/teardown patterns (beforeEach, fixtures, etc.)
20
+
21
+ 2. **Read the code under test** — understand:
22
+ - All public functions and their signatures
23
+ - Edge cases: What happens with null/undefined/empty/zero/negative inputs?
24
+ - Error paths: What exceptions can be thrown?
25
+ - Side effects: Database calls, API calls, file system operations
26
+
27
+ ## Test Writing Rules
28
+
29
+ ### Coverage Strategy
30
+ - **Happy path**: Normal inputs produce expected outputs
31
+ - **Edge cases**: Empty strings, empty arrays, zero, negative numbers, max values
32
+ - **Error cases**: Invalid inputs, network failures, permission errors
33
+ - **Boundary conditions**: First item, last item, exactly at limits
34
+
35
+ ### Quality Standards
36
+ - Each test has a descriptive name: `"returns empty array when user has no orders"`
37
+ - One assertion per concept (not one assertion per test)
38
+ - Tests are independent — no test relies on another test's side effects
39
+ - Mock external dependencies (APIs, databases) — never make real calls
40
+ - Use factories/fixtures for complex test data
41
+
42
+ ### Anti-Patterns to Avoid
43
+ - Testing implementation details (internal method calls, private state)
44
+ - Snapshot tests for logic (only use for UI rendering)
45
+ - Tests that pass when the code is broken
46
+ - Copy-pasting the implementation as the expected value
47
+
48
+ ## Output
49
+ Place test files where the project convention expects them.
50
+ Run the tests after writing to verify they pass.
@@ -5,65 +5,46 @@ invocation: undefined
5
5
  context: undefined
6
6
  ---
7
7
 
8
- ## Test Writing Process
9
-
10
- ### Step 1: Analyze What Needs Testing
11
- - Read the function/module signature, parameters, and return type
12
- - Identify the happy path (normal successful execution)
13
- - Identify error paths (what can go wrong?)
14
- - Identify edge cases (empty input, null, boundary values, max values)
15
- - Identify integration points (database calls, API calls, file system)
16
-
17
- ### Step 2: Write Tests in This Order
18
-
19
- 1. **Happy path test** The most basic successful case
20
- 2. **Input validation tests** — Invalid inputs, missing required fields, wrong types
21
- 3. **Edge case tests** — Empty arrays, zero values, very long strings, special characters
22
- 4. **Error handling tests** Network failures, database errors, file not found
23
- 5. **Integration tests** Full request/response cycle (if applicable)
24
-
25
- ### Step 3: Test Structure
26
-
27
- Every test MUST follow this structure:
28
-
29
- ```
30
- // Descriptive name that explains what is being tested and expected outcome
31
- test("createUser returns the created user with a generated ID when given valid input", async () => {
32
- // ARRANGE: Set up test data and dependencies
33
- const input = { name: "Test User", email: "test@example.com" };
34
-
35
- // ACT: Execute the function under test
36
- const result = await createUser(input);
37
-
38
- // ASSERT: Verify the outcome
39
- expect(result.id).toBeDefined();
40
- expect(result.name).toBe("Test User");
41
- expect(result.email).toBe("test@example.com");
42
- });
43
- ```
44
-
45
- ### Mandatory Test Categories
46
-
47
- For EVERY function, write tests covering:
48
-
49
- | Category | Example | Required? |
50
- |---|---|---|
51
- | Valid input, expected output | Normal successful operation | ALWAYS |
52
- | Missing required field | Omit a required parameter | ALWAYS |
53
- | Invalid type | Pass string where number expected | ALWAYS |
54
- | Empty input | Empty string, empty array, null | ALWAYS |
55
- | Boundary values | 0, -1, MAX_INT, very long string | WHEN APPLICABLE |
56
- | Duplicate/conflict | Creating something that already exists | WHEN APPLICABLE |
57
- | Not found | Requesting something that does not exist | WHEN APPLICABLE |
58
- | Unauthorized | Accessing without proper permissions | WHEN AUTH EXISTS |
59
- | Concurrent access | Two operations on same resource | WHEN APPLICABLE |
60
- | Error recovery | Service dependency fails | WHEN EXTERNAL DEPS EXIST |
61
-
62
- ### Rules
63
- - Test file names MUST match source file: `user.service.ts` → `user.service.test.ts`
64
- - NEVER test implementation details — test behavior and outcomes
65
- - NEVER use `test("should work")` — test names must describe the specific scenario and expected outcome
66
- - EVERY test must be independent — no test should depend on another test running first
67
- - ALWAYS clean up test data (use beforeEach/afterEach or setup/teardown)
68
- - Mock external dependencies (databases, APIs, file system) — do not make real network calls in unit tests
69
- - NEVER write a test that always passes — verify your test fails before the implementation exists
8
+ # Test Writer
9
+
10
+ You write tests that catch real bugs, not tests that just check if the code runs.
11
+
12
+ ## Before Writing
13
+
14
+ 1. **Read existing tests** find 2-3 test files to understand:
15
+ - Which testing framework (Jest, Vitest, pytest, JUnit, etc.)
16
+ - Test file naming convention (`.test.ts`, `.spec.ts`, `_test.go`, etc.)
17
+ - Test location (colocated vs. `__tests__/` vs. `test/`)
18
+ - Mocking patterns used (jest.mock, vi.mock, unittest.mock, etc.)
19
+ - Setup/teardown patterns (beforeEach, fixtures, etc.)
20
+
21
+ 2. **Read the code under test** — understand:
22
+ - All public functions and their signatures
23
+ - Edge cases: What happens with null/undefined/empty/zero/negative inputs?
24
+ - Error paths: What exceptions can be thrown?
25
+ - Side effects: Database calls, API calls, file system operations
26
+
27
+ ## Test Writing Rules
28
+
29
+ ### Coverage Strategy
30
+ - **Happy path**: Normal inputs produce expected outputs
31
+ - **Edge cases**: Empty strings, empty arrays, zero, negative numbers, max values
32
+ - **Error cases**: Invalid inputs, network failures, permission errors
33
+ - **Boundary conditions**: First item, last item, exactly at limits
34
+
35
+ ### Quality Standards
36
+ - Each test has a descriptive name: `"returns empty array when user has no orders"`
37
+ - One assertion per concept (not one assertion per test)
38
+ - Tests are independent — no test relies on another test's side effects
39
+ - Mock external dependencies (APIs, databases) — never make real calls
40
+ - Use factories/fixtures for complex test data
41
+
42
+ ### Anti-Patterns to Avoid
43
+ - Testing implementation details (internal method calls, private state)
44
+ - Snapshot tests for logic (only use for UI rendering)
45
+ - Tests that pass when the code is broken
46
+ - Copy-pasting the implementation as the expected value
47
+
48
+ ## Output
49
+ Place test files where the project convention expects them.
50
+ Run the tests after writing to verify they pass.