@lenne.tech/cli 1.2.0 → 1.3.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 (36) hide show
  1. package/build/commands/claude/install-plugin.js +339 -0
  2. package/package.json +1 -1
  3. package/build/commands/claude/install-commands.js +0 -337
  4. package/build/commands/claude/install-mcps.js +0 -258
  5. package/build/commands/claude/install-skills.js +0 -693
  6. package/build/lib/mcp-registry.js +0 -80
  7. package/build/templates/claude-commands/code-cleanup.md +0 -82
  8. package/build/templates/claude-commands/commit-message.md +0 -21
  9. package/build/templates/claude-commands/create-story.md +0 -435
  10. package/build/templates/claude-commands/mr-description-clipboard.md +0 -48
  11. package/build/templates/claude-commands/mr-description.md +0 -33
  12. package/build/templates/claude-commands/sec-review.md +0 -62
  13. package/build/templates/claude-commands/skill-optimize.md +0 -481
  14. package/build/templates/claude-commands/test-generate.md +0 -45
  15. package/build/templates/claude-skills/building-stories-with-tdd/SKILL.md +0 -265
  16. package/build/templates/claude-skills/building-stories-with-tdd/code-quality.md +0 -276
  17. package/build/templates/claude-skills/building-stories-with-tdd/database-indexes.md +0 -182
  18. package/build/templates/claude-skills/building-stories-with-tdd/examples.md +0 -1383
  19. package/build/templates/claude-skills/building-stories-with-tdd/handling-existing-tests.md +0 -197
  20. package/build/templates/claude-skills/building-stories-with-tdd/reference.md +0 -1427
  21. package/build/templates/claude-skills/building-stories-with-tdd/security-review.md +0 -307
  22. package/build/templates/claude-skills/building-stories-with-tdd/workflow.md +0 -1004
  23. package/build/templates/claude-skills/generating-nest-servers/SKILL.md +0 -303
  24. package/build/templates/claude-skills/generating-nest-servers/configuration.md +0 -285
  25. package/build/templates/claude-skills/generating-nest-servers/declare-keyword-warning.md +0 -133
  26. package/build/templates/claude-skills/generating-nest-servers/description-management.md +0 -226
  27. package/build/templates/claude-skills/generating-nest-servers/examples.md +0 -893
  28. package/build/templates/claude-skills/generating-nest-servers/framework-guide.md +0 -259
  29. package/build/templates/claude-skills/generating-nest-servers/quality-review.md +0 -864
  30. package/build/templates/claude-skills/generating-nest-servers/reference.md +0 -487
  31. package/build/templates/claude-skills/generating-nest-servers/security-rules.md +0 -371
  32. package/build/templates/claude-skills/generating-nest-servers/verification-checklist.md +0 -262
  33. package/build/templates/claude-skills/generating-nest-servers/workflow-process.md +0 -1061
  34. package/build/templates/claude-skills/using-lt-cli/SKILL.md +0 -284
  35. package/build/templates/claude-skills/using-lt-cli/examples.md +0 -546
  36. package/build/templates/claude-skills/using-lt-cli/reference.md +0 -513
@@ -1,197 +0,0 @@
1
- ---
2
- name: story-tdd-handling-existing-tests
3
- version: 1.0.0
4
- description: Complete guide for handling existing tests when modifying code in TDD workflow - decision trees, git analysis, examples, and guidelines for determining when to update tests vs fix code
5
- ---
6
-
7
- # 🔄 Handling Existing Tests When Modifying Code
8
-
9
- ## Table of Contents
10
- - [Analysis Decision Tree](#analysis-decision-tree)
11
- - [Using Git for Analysis (ALLOWED)](#using-git-for-analysis-allowed)
12
- - [Examples](#examples)
13
- - [Guidelines](#guidelines)
14
- - [Process](#process)
15
- - [Red Flags](#red-flags)
16
- - [Remember](#remember)
17
-
18
- **CRITICAL RULE:** When your code changes cause existing (non-story) tests to fail, you MUST analyze and handle this properly.
19
-
20
- ## Analysis Decision Tree
21
-
22
- When existing tests fail after your changes:
23
-
24
- ```
25
- Existing test fails
26
-
27
- ├─► Was this change intentional and breaking?
28
- │ │
29
- │ ├─► YES: Change was deliberate and it's clear why tests break
30
- │ │ └─► ✅ Update the existing tests to reflect new behavior
31
- │ │ - Modify test expectations
32
- │ │ - Update test data/setup if needed
33
- │ │ - Document why test was changed
34
- │ │
35
- │ └─► NO/UNCLEAR: Not sure why tests are breaking
36
- │ └─► 🔍 Investigate potential side effect
37
- │ │
38
- │ ├─► Use git to review previous state:
39
- │ │ - git show HEAD:path/to/file.ts
40
- │ │ - git diff HEAD path/to/test.ts
41
- │ │ - git log -p path/to/file.ts
42
- │ │
43
- │ ├─► Compare old vs new behavior
44
- │ │
45
- │ └─► ⚠️ Likely unintended side effect!
46
- │ └─► Fix code to satisfy BOTH old AND new tests
47
- │ - Refine implementation
48
- │ - Add conditional logic if needed
49
- │ - Ensure backward compatibility
50
- │ - Keep existing functionality intact
51
- ```
52
-
53
- ## Using Git for Analysis (ALLOWED)
54
-
55
- **✅ Git commands are EXPLICITLY ALLOWED for analysis:**
56
-
57
- ```bash
58
- # View old version of a file
59
- git show HEAD:src/server/modules/user/user.service.ts
60
-
61
- # See what changed in a file
62
- git diff HEAD src/server/modules/user/user.service.ts
63
-
64
- # View file from specific commit
65
- git show abc123:path/to/file.ts
66
-
67
- # See commit history for a file
68
- git log -p --follow path/to/file.ts
69
-
70
- # Compare branches
71
- git diff main..HEAD path/to/file.ts
72
- ```
73
-
74
- **These commands help you understand:**
75
- - What the code looked like before your changes
76
- - What the previous test expectations were
77
- - Why existing tests were written a certain way
78
- - Whether your change introduces regression
79
-
80
- ## Examples
81
-
82
- ### Example 1: Intentional Breaking Change
83
-
84
- ```typescript
85
- // Scenario: You added a required field to User model
86
- // Old test expects: { email, firstName }
87
- // New behavior requires: { email, firstName, lastName }
88
-
89
- // ✅ CORRECT: Update the test
90
- it('should create user', async () => {
91
- const user = await userService.create({
92
- email: 'test@example.com',
93
- firstName: 'John',
94
- lastName: 'Doe', // ✅ Added required field
95
- });
96
- // ...
97
- });
98
- ```
99
-
100
- ### Example 2: Unintended Side Effect
101
-
102
- ```typescript
103
- // Scenario: You changed authentication logic for new feature
104
- // Old tests for different feature now fail unexpectedly
105
-
106
- // ❌ WRONG: Just update the failing tests
107
- // ✅ CORRECT: Investigate and fix the code
108
-
109
- // 1. Use git to see old implementation
110
- // git show HEAD:src/server/modules/auth/auth.service.ts
111
-
112
- // 2. Identify the unintended side effect
113
- // 3. Refine your code to avoid breaking existing functionality
114
-
115
- // Example fix: Add conditional logic
116
- async authenticate(user: User, options?: AuthOptions) {
117
- // Your new feature logic
118
- if (options?.useNewBehavior) {
119
- return this.newAuthMethod(user);
120
- }
121
-
122
- // Preserve existing behavior for backward compatibility
123
- return this.existingAuthMethod(user);
124
- }
125
- ```
126
-
127
- ## Guidelines
128
-
129
- **✅ DO update existing tests when:**
130
- - You intentionally changed an API contract
131
- - You removed deprecated functionality
132
- - You renamed fields/methods
133
- - The old behavior is being replaced (not extended)
134
- - It's documented in your story requirements
135
-
136
- **❌ DON'T update existing tests when:**
137
- - You're not sure why they're failing
138
- - The failure seems unrelated to your story
139
- - Multiple unrelated tests are breaking
140
- - The test was testing important existing functionality
141
-
142
- **🔍 INVESTIGATE when:**
143
- - More than 2-3 existing tests fail
144
- - Tests in unrelated modules fail
145
- - Test failure messages are unclear
146
- - You suspect a side effect
147
-
148
- ## Process
149
-
150
- 1. **Run ALL tests** (not just story tests)
151
- ```bash
152
- npm test
153
- ```
154
-
155
- 2. **If existing tests fail:**
156
- ```bash
157
- # Identify which tests failed
158
- # For each failing test, decide:
159
- ```
160
-
161
- 3. **For intentional changes:**
162
- - Update test expectations
163
- - Document change in commit message (when developer commits)
164
- - Verify all tests pass
165
-
166
- 4. **For unclear failures:**
167
- - Use `git show` to see old code
168
- - Use `git diff` to see your changes
169
- - Compare old vs new behavior
170
- - Refine code to fix both old AND new tests
171
-
172
- 5. **Validate:**
173
- ```bash
174
- # All tests (old + new) should pass
175
- npm test
176
- ```
177
-
178
- ## Red Flags
179
-
180
- 🚩 **Warning signs of unintended side effects:**
181
- - Tests in different modules failing
182
- - Security/auth tests failing
183
- - Tests that worked in `main` branch now fail
184
- - Tests with names unrelated to your story failing
185
-
186
- **When you see red flags:**
187
- 1. STOP updating tests
188
- 2. Use git to investigate
189
- 3. Fix the code, not the tests
190
- 4. Ask developer if uncertain
191
-
192
- ## Remember
193
-
194
- - **Existing tests are documentation** of expected behavior
195
- - **Don't break working functionality** to make new tests pass
196
- - **Use git freely** for investigation (NOT for commits)
197
- - **When in doubt, preserve backward compatibility**