@lenne.tech/cli 1.0.1 → 1.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 (32) hide show
  1. package/build/commands/claude/install-commands.js +10 -5
  2. package/build/commands/claude/install-mcps.js +258 -0
  3. package/build/commands/claude/install-skills.js +90 -23
  4. package/build/lib/mcp-registry.js +80 -0
  5. package/build/templates/claude-commands/commit-message.md +21 -0
  6. package/build/templates/claude-commands/create-story.md +407 -0
  7. package/build/templates/claude-commands/skill-optimize.md +431 -90
  8. package/build/templates/claude-skills/building-stories-with-tdd/SKILL.md +265 -0
  9. package/build/templates/claude-skills/{story-tdd → building-stories-with-tdd}/code-quality.md +10 -0
  10. package/build/templates/claude-skills/{story-tdd → building-stories-with-tdd}/database-indexes.md +9 -0
  11. package/build/templates/claude-skills/{story-tdd → building-stories-with-tdd}/examples.md +115 -64
  12. package/build/templates/claude-skills/building-stories-with-tdd/handling-existing-tests.md +197 -0
  13. package/build/templates/claude-skills/{story-tdd → building-stories-with-tdd}/reference.md +276 -29
  14. package/build/templates/claude-skills/{story-tdd → building-stories-with-tdd}/security-review.md +8 -0
  15. package/build/templates/claude-skills/building-stories-with-tdd/workflow.md +1004 -0
  16. package/build/templates/claude-skills/generating-nest-servers/SKILL.md +303 -0
  17. package/build/templates/claude-skills/{nest-server-generator → generating-nest-servers}/configuration.md +6 -0
  18. package/build/templates/claude-skills/{nest-server-generator → generating-nest-servers}/declare-keyword-warning.md +9 -0
  19. package/build/templates/claude-skills/{nest-server-generator → generating-nest-servers}/description-management.md +9 -0
  20. package/build/templates/claude-skills/{nest-server-generator → generating-nest-servers}/examples.md +7 -0
  21. package/build/templates/claude-skills/generating-nest-servers/framework-guide.md +259 -0
  22. package/build/templates/claude-skills/{nest-server-generator → generating-nest-servers}/quality-review.md +9 -0
  23. package/build/templates/claude-skills/{nest-server-generator → generating-nest-servers}/reference.md +16 -0
  24. package/build/templates/claude-skills/{nest-server-generator → generating-nest-servers}/security-rules.md +13 -0
  25. package/build/templates/claude-skills/generating-nest-servers/verification-checklist.md +262 -0
  26. package/build/templates/claude-skills/generating-nest-servers/workflow-process.md +1061 -0
  27. package/build/templates/claude-skills/{lt-cli → using-lt-cli}/SKILL.md +22 -10
  28. package/build/templates/claude-skills/{lt-cli → using-lt-cli}/examples.md +7 -3
  29. package/build/templates/claude-skills/{lt-cli → using-lt-cli}/reference.md +10 -3
  30. package/package.json +2 -2
  31. package/build/templates/claude-skills/nest-server-generator/SKILL.md +0 -1891
  32. package/build/templates/claude-skills/story-tdd/SKILL.md +0 -1173
@@ -0,0 +1,407 @@
1
+ ---
2
+ description: Create a user story for TDD implementation
3
+ ---
4
+
5
+ # User Story erstellen
6
+
7
+ Guide the user through creating a well-structured user story that can be used as a prompt for Claude Code to implement with Test-Driven Development (TDD).
8
+
9
+ ## When to Use This Command
10
+
11
+ - Planning and documenting new features
12
+ - Preparing user stories for TDD implementation
13
+ - Capturing requirements in a structured format
14
+ - Creating stories for Linear tickets or documentation
15
+
16
+ **IMPORTANT: The generated story and all user-facing communication must ALWAYS be in German, regardless of the user's input language. Exceptions: Properties (camelCase), code snippets, and technical terms remain in English.**
17
+
18
+ **ABORT HANDLING: If the user wants to cancel at any point (e.g., "abbrechen", "stop", "cancel", "nicht mehr"), acknowledge it (in German): "Okay, Story-Erstellung abgebrochen." and stop the process.**
19
+
20
+ ---
21
+
22
+ ## Guidelines for Good Stories
23
+
24
+ Keep these guidelines in mind when generating the story:
25
+
26
+ ### INVEST Criteria (Quality Check)
27
+
28
+ Every story should be checked against these criteria:
29
+
30
+ - **Independent** - Can be implemented without depending on other stories
31
+ - **Negotiable** - Open for discussion and refinement
32
+ - **Valuable** - Delivers real, tangible value to the user (not just technical tasks)
33
+ - **Small** - Completable within a single sprint (if too large, suggest splitting)
34
+ - **Testable** - Has measurable acceptance criteria
35
+
36
+ ### 3C Model
37
+
38
+ - **Card** - Concise title that fits on a notecard
39
+ - **Conversation** - Story emerges from dialogue (Gap Analysis enables this)
40
+ - **Confirmation** - Clear acceptance criteria define "done"
41
+
42
+ ### Emotional Narrative
43
+
44
+ The story should convey the **user's emotional experience**, not just technical functionality. Ask "Why does this matter to the user?" - use the **5 Whys technique** if the reason is unclear.
45
+
46
+ ### Title
47
+
48
+ - Keep short (max 10 words)
49
+ - Format: "[Rolle] möchte [Feature], damit [Kurze Begründung]"
50
+
51
+ ### Acceptance Criteria
52
+
53
+ - Aim for **4-8 criteria** per story
54
+ - Start with action verbs (kann, soll, muss)
55
+ - Be specific and measurable - focus on *what*, not *how*
56
+ - Include both positive and negative cases
57
+ - Consider: authentication, authorization, validation, persistence
58
+ - **Optional Gherkin format** for complex criteria:
59
+ ```
60
+ Gegeben [Ausgangssituation]
61
+ Wenn [Aktion]
62
+ Dann [Erwartetes Ergebnis]
63
+ ```
64
+
65
+ ### Properties
66
+
67
+ - Use camelCase for property names
68
+ - Provide BOTH English AND German descriptions
69
+ - Specify relationships clearly (e.g., "Referenz auf User-Entität")
70
+
71
+ ### For TDD
72
+
73
+ - Each acceptance criterion becomes at least one test
74
+ - Consider edge cases that need explicit tests
75
+ - Think about security tests (permission-denied scenarios)
76
+
77
+ ---
78
+
79
+ ## Step 1: Collect Initial Thoughts
80
+
81
+ **Ask the user to share their story idea (in German):**
82
+
83
+ "Bitte beschreibe deine User Story Idee. Teile so viele Details wie möglich mit:
84
+ - Wer braucht dieses Feature (Rolle/Nutzertyp)?
85
+ - Was soll erreicht werden?
86
+ - Warum wird es benötigt?
87
+ - Spezifische Anforderungen oder Properties?
88
+ - Technische Hinweise?
89
+
90
+ Schreib einfach deine Gedanken auf - ich helfe dir, sie in eine strukturierte User Story zu bringen."
91
+
92
+ **Wait for the user's response before proceeding.**
93
+
94
+ ---
95
+
96
+ ## Step 2: Analyze and Identify Gaps
97
+
98
+ After receiving the user's input, analyze it against this checklist:
99
+
100
+ ### Required Elements Checklist
101
+
102
+ **Basic Story Elements:**
103
+ - [ ] **Role** - Who is the user? (Admin, Customer, Guest, etc.)
104
+ - [ ] **Feature** - What do they want to achieve?
105
+ - [ ] **Reason** - Why do they need this? What's the benefit?
106
+
107
+ **Description Details:**
108
+ - [ ] **Context** - Background information, which system/module?
109
+ - [ ] **Requirements** - Specific functional requirements
110
+ - [ ] **Properties** (optional) - Data fields with types (if applicable)
111
+ - [ ] **Notes** (optional) - Technical hints, constraints, special logic
112
+
113
+ **Quality Criteria:**
114
+ - [ ] **Acceptance Criteria** - Testable conditions for success
115
+ - [ ] **Security Considerations** - Who can access/modify? (permissions)
116
+ - [ ] **Edge Cases** - What happens in special situations?
117
+
118
+ ### Gap Analysis
119
+
120
+ For each missing or unclear element, formulate a **specific question in German** using the AskUserQuestion tool:
121
+
122
+ **Fehlende Rolle:**
123
+ - "Wer wird dieses Feature nutzen? (z.B. Admin, Kunde, Gast, Entwickler)"
124
+
125
+ **Fehlendes Feature/Ziel:**
126
+ - "Was genau soll der Nutzer tun können?"
127
+
128
+ **Fehlende Begründung:**
129
+ - "Welchen Nutzen bringt dieses Feature? Welches Problem löst es?"
130
+
131
+ **Fehlende Properties (only ask if the feature involves data entities):**
132
+ - "Welche Daten müssen gespeichert werden? Bitte liste die Properties mit ihren Typen auf (string, number, boolean, Date, enum, Referenz)"
133
+
134
+ **Fehlende Akzeptanzkriterien:**
135
+ - "Wie können wir überprüfen, dass das Feature funktioniert? Was sind die Erfolgsbedingungen?"
136
+
137
+ **Unklare Sicherheit:**
138
+ - "Wer soll Zugriff auf dieses Feature haben? Gibt es Berechtigungseinschränkungen?"
139
+
140
+ **Fehlende Edge Cases:**
141
+ - "Gibt es Sonderfälle zu beachten? Was soll passieren, wenn [konkretes Szenario]?"
142
+
143
+ ### Questioning Strategy
144
+
145
+ 1. **Ask only about missing/unclear elements** - Don't ask for information already provided
146
+ 2. **Be specific** - Reference what was said and ask for clarification
147
+ 3. **Group related questions** - Ask 2-4 questions at once, not one by one
148
+ 4. **Suggest improvements** - If something seems incomplete, suggest additions
149
+ 5. **Accept refusal gracefully** - If the user refuses to answer or provides no input, accept it and make the best of available information
150
+
151
+ **Example question (in German):**
152
+ "Deine Story-Idee ist klar bezüglich des Grundfeatures. Ich brauche noch ein paar Details:
153
+ 1. Du hast erwähnt, dass Admins Items verwalten können - können Gäste sie auch sehen?
154
+ 2. Sollen die Items eine bestimmte Reihenfolge/Position haben?
155
+ 3. Was passiert, wenn jemand versucht, ein Item zu löschen, das anderswo referenziert wird?"
156
+
157
+ **If user refuses or skips questions:**
158
+ - Accept the decision without pushing further
159
+ - Use sensible defaults or common patterns
160
+ - Make reasonable assumptions based on context
161
+ - Proceed with available information
162
+ - Document any assumptions made in the story's "Hinweise" section
163
+
164
+ ---
165
+
166
+ ## Step 3: Validate Completeness
167
+
168
+ Once all information is gathered, perform a final validation:
169
+
170
+ ### INVEST Check
171
+
172
+ - **Independent:** Does this story depend on other stories? If yes, note dependencies or suggest splitting.
173
+ - **Valuable:** Is the user value clear? If the "damit" part is weak, use 5 Whys to dig deeper:
174
+ - "Warum ist das wichtig?" → Answer → "Und warum ist das wichtig?" → repeat until real value emerges
175
+ - **Small:** Can this be completed in one sprint? If too large, suggest splitting into smaller stories (in German):
176
+ - "Diese Story scheint recht umfangreich. Sollen wir sie in kleinere Stories aufteilen?"
177
+ - **Testable:** Are all acceptance criteria measurable and verifiable?
178
+
179
+ ### Coherence Check
180
+ - Does the feature make sense as described?
181
+ - Are the requirements internally consistent?
182
+ - Do the acceptance criteria cover all requirements (aim for 4-8)?
183
+ - Are there any contradictions?
184
+
185
+ ### Emotional Value Check
186
+ - Does the story convey why this matters to the user?
187
+ - Is it more than just a technical task?
188
+ - If the narrative feels dry, ask (in German): "Was ist der eigentliche Nutzen für den Anwender? Welches Problem wird gelöst?"
189
+
190
+ ### TDD Readiness Check
191
+ - Can each acceptance criterion be converted to a test?
192
+ - Are the properties clear enough for implementation?
193
+ - Is the security model defined?
194
+
195
+ **If issues found:** Ask clarifying questions (in German) before proceeding.
196
+
197
+ **If complete:** Proceed to Step 4.
198
+
199
+ ---
200
+
201
+ ## Step 4: Generate and Present Story
202
+
203
+ Generate the complete user story in the standard format and **present it to the user first**.
204
+
205
+ **Display the story in a clearly marked code block** so the user can:
206
+ - Review and discuss the story
207
+ - Request changes or optimizations
208
+ - Copy it if needed
209
+
210
+ After presenting the story, ask (in German): "Ist die Story so in Ordnung, oder möchtest du noch etwas anpassen?"
211
+
212
+ **If changes requested:** Make the adjustments and present the updated story again.
213
+
214
+ **If approved:** Proceed to Step 5 (Ask for Output Format).
215
+
216
+ ### Story Format (German)
217
+
218
+ ```markdown
219
+ # [Titel - Rolle möchte Feature, damit Begründung]
220
+
221
+ **Story:** Als [Rolle] möchte ich [Feature], damit [Begründung].
222
+
223
+ ## Beschreibung
224
+
225
+ [Ausführliche Beschreibung]
226
+
227
+ ### Kontext
228
+ [Hintergrund und Systemkontext]
229
+
230
+ ### Anforderungen
231
+ [Liste der spezifischen Anforderungen]
232
+
233
+ ### Properties (optional, nur wenn das Feature Datenentitäten betrifft)
234
+
235
+ | Property | Type | Required | Description (EN) | Beschreibung (DE) |
236
+ |------------|--------|----------|--------------------|----------------------|
237
+ | example | string | yes | Example property | Beispiel-Eigenschaft |
238
+
239
+ [Properties-Tabelle falls relevant - Abschnitt weglassen wenn nicht benötigt]
240
+
241
+ ### Hinweise (optional)
242
+ [Technische Hinweise, Einschränkungen, spezielle Logik]
243
+
244
+ ## Akzeptanzkriterien
245
+
246
+ - [ ] [Testbares Kriterium 1]
247
+ - [ ] [Testbares Kriterium 2]
248
+ - [ ] [Sicherheitskriterium]
249
+ - [ ] [Edge-Case-Kriterium]
250
+ ```
251
+
252
+ ---
253
+
254
+ ## Step 5: Ask for Output Format
255
+
256
+ Once the user approves the story, use the AskUserQuestion tool to ask (in German):
257
+
258
+ **Question:** "Wie möchtest du mit dieser Story fortfahren?"
259
+
260
+ **Options:**
261
+ 1. **Linear Ticket erstellen** - Ticket in Linear via MCP erstellen (Linear MCP muss installiert sein)
262
+ 2. **Als Markdown-Datei speichern** - Story in eine .md-Datei im Projekt speichern
263
+ 3. **Direkt umsetzen** - Sofort mit TDD-Implementierung via `building-stories-with-tdd` Skill starten
264
+ 4. **Nichts davon** - Story wurde bereits angezeigt und kann kopiert werden, keine weitere Aktion nötig
265
+
266
+ (If user selects "Nichts davon", confirm in German: "Alles klar! Die Story wurde oben angezeigt und kann bei Bedarf kopiert werden.")
267
+
268
+ ---
269
+
270
+ ## Step 6: Execute Selected Output
271
+
272
+ ### Option 1: Linear Ticket erstellen
273
+
274
+ **Prerequisite:** Linear MCP must be installed (`lt claude install-mcps linear`)
275
+
276
+ 1. First, check if Linear MCP is available. If not, inform the user (in German):
277
+ - "Linear MCP ist nicht installiert. Du kannst es mit `lt claude install-mcps linear` installieren."
278
+ - Then ask if they want to choose a different output option
279
+
280
+ 2. If Linear MCP is available, ask for Linear project/team (in German):
281
+ - "In welchem Linear Team soll das Ticket erstellt werden?"
282
+ - Use Linear MCP to list available teams to help the user choose
283
+ - If the user provides an invalid team, show available teams and ask again
284
+
285
+ 3. Create ticket via Linear MCP:
286
+ - Title: The story title
287
+ - Description: The full story in markdown format
288
+ - Labels: Add relevant labels if applicable
289
+
290
+ 4. Report the created ticket URL to the user (in German)
291
+
292
+ 5. **Then ask (in German):** "Möchtest du diese Story jetzt auch mit TDD umsetzen?"
293
+
294
+ ### Option 2: Als Markdown-Datei speichern
295
+
296
+ 1. Ask for the file location (in German):
297
+ - "Wo soll die Story gespeichert werden? (z.B. `docs/stories/faq-verwaltung.md` oder `stories/STORY-001.md`)"
298
+ - Suggest a filename based on the story title (e.g., `stories/admin-faq-verwaltung.md`)
299
+
300
+ 2. Validate the path:
301
+ - Check if the parent directory exists
302
+ - If not, ask (in German): "Das Verzeichnis [dir] existiert nicht. Soll ich es erstellen?"
303
+ - If the file already exists, ask (in German): "Die Datei existiert bereits. Überschreiben?"
304
+
305
+ 3. Write the story to the specified file
306
+ - If writing fails, inform the user (in German): "Fehler beim Speichern: [error]. Bitte einen anderen Pfad angeben."
307
+ - Then ask for a new path
308
+
309
+ 4. Confirm (in German): "Story gespeichert unter [Pfad]"
310
+
311
+ 5. **Then ask (in German):** "Möchtest du diese Story jetzt auch mit TDD umsetzen?"
312
+
313
+ ### Option 3: Direkt umsetzen (or TDD after Option 1/2)
314
+
315
+ When the user chooses direct implementation or answers "yes" to TDD after Option 1 or 2:
316
+
317
+ 1. Confirm (in German): "Starte TDD-Implementierung mit dem `building-stories-with-tdd` Skill..."
318
+
319
+ 2. Invoke the `building-stories-with-tdd` skill with the generated story as context
320
+
321
+ 3. The skill will handle: test creation, implementation, validation
322
+
323
+ ---
324
+
325
+ ## Beispiel: FAQ-Verwaltung Story
326
+
327
+ Here is an example of a well-structured user story:
328
+
329
+ **User's initial input:**
330
+ > "Ich brauche FAQs die der Admin verwalten kann und die auf der Website angezeigt werden. Die sollen eine Reihenfolge haben."
331
+
332
+ **After gap analysis and clarification, the resulting story:**
333
+
334
+ ```markdown
335
+ # Admin möchte FAQs verwalten, damit sie auf der Website verfügbar sind
336
+
337
+ **Story:** Als Admin möchte ich FAQs verwalten können, damit sie allen Besuchern auf der Website zur Verfügung stehen.
338
+
339
+ ## Beschreibung
340
+
341
+ Es soll ein Modul für FAQs erstellt werden, in dem der Admin FAQs sehen, anlegen, bearbeiten und löschen kann. Nicht eingeloggte Nutzer sollen die FAQs sehen können, damit sie auf der Website dargestellt werden können.
342
+
343
+ ### Kontext
344
+ - FAQs sind öffentlich sichtbare Inhalte, die von Administratoren verwaltet werden
345
+ - Die Reihenfolge der FAQs ist für die Anzeige wichtig
346
+
347
+ ### Anforderungen
348
+ - Admins können vollständige CRUD-Operationen auf FAQs durchführen
349
+ - Alle Nutzer (auch Gäste) können FAQs lesen
350
+ - FAQs müssen eine bestimmte Reihenfolge über das position-Feld haben
351
+ - Die Positionsverwaltung muss automatisch und effizient erfolgen
352
+
353
+ ### Properties
354
+
355
+ | Property | Type | Required | Description (EN) | Beschreibung (DE) |
356
+ |----------|--------|----------|-------------------------|-----------------------|
357
+ | question | string | yes | Question of the FAQ | Frage der FAQ |
358
+ | answer | string | yes | Answer of the FAQ | Antwort der FAQ |
359
+ | position | number | no | Position of the element | Position des Elements |
360
+
361
+ ### Hinweise
362
+ - FAQs haben eine bestimmte Reihenfolge, die durch das `position`-Feld bestimmt wird
363
+ - Beim Anlegen oder Bearbeiten einer FAQ muss geprüft werden, ob die Positionen anderer FAQs angepasst werden müssen
364
+ - Wird bei einer neuen FAQ keine position explizit mitgegeben, wird automatisch die höchste Position + 1 vergeben
365
+ - Positionsaktualisierungen müssen effizient erfolgen (möglichst wenige Datenbankrequests)
366
+ - Wenn eine FAQ ihre Position ändert, müssen die anderen Elemente entsprechend der alten und neuen Position neu positioniert werden
367
+
368
+ ## Akzeptanzkriterien
369
+
370
+ - [ ] Administratoren können FAQs vollständig verwalten (GET, POST, DELETE, PUT)
371
+ - [ ] Alle Nutzer (auch nicht eingeloggte) können die komplette Liste der FAQs sortiert nach position (aufsteigend) abrufen
372
+ - [ ] Beim Anlegen einer neuen FAQ ohne position wird automatisch die höchste Position + 1 vergeben
373
+ - [ ] Beim Anlegen einer neuen FAQ mit einer bestimmten position werden die anderen FAQs entsprechend neu positioniert
374
+ - [ ] Beim Bearbeiten der position einer FAQ werden die anderen FAQs effizient neu positioniert
375
+ - [ ] Nicht-Admin-Nutzer können keine FAQs erstellen, bearbeiten oder löschen
376
+ - [ ] Position-Werte sind immer positive Ganzzahlen ab 1
377
+ ```
378
+
379
+ **Beispiel eines Akzeptanzkriteriums im Gherkin-Format:**
380
+
381
+ ```gherkin
382
+ Gegeben eine FAQ mit position 2 existiert bereits
383
+ Wenn ein Admin eine neue FAQ mit position 2 anlegt
384
+ Dann wird die neue FAQ an Position 2 eingefügt
385
+ Und die bisherige FAQ an Position 2 rückt auf Position 3
386
+ Und alle weiteren FAQs rücken entsprechend nach
387
+ ```
388
+
389
+ ---
390
+
391
+ ## Execution Summary
392
+
393
+ 1. **Collect initial thoughts** - Let user describe their idea freely
394
+ 2. **Analyze gaps** - Check against required elements checklist
395
+ 3. **Ask targeted questions** - Only for missing/unclear elements (in German)
396
+ 4. **Validate completeness** - INVEST check, coherence, emotional value, and TDD readiness
397
+ 5. **Generate and present story** - Format according to template (in German!) and present for discussion/optimization
398
+ 6. **Ask for output** - Linear ticket, Markdown file, direct implementation, or nothing
399
+ 7. **Execute choice and offer TDD** - Create output in selected format, then offer TDD implementation if not already chosen
400
+
401
+ **Key behaviors:**
402
+ - User can abort at any point - acknowledge and stop
403
+ - Always validate paths/teams before executing
404
+ - Handle errors gracefully with German error messages
405
+ - "Nichts davon" is a valid choice - story was already displayed
406
+
407
+ **Remember:** A well-written user story leads to better tests and cleaner implementation!