@the-bearded-bear/claude-craft 3.0.1 → 3.0.2-next.d96fc1d

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.
@@ -0,0 +1,286 @@
1
+ ---
2
+ name: setup-project-context
3
+ description: Codebase analysieren und Projektkontext interaktiv konfigurieren
4
+ arguments:
5
+ - name: mode
6
+ description: Erkennungsmodus (--auto minimale Fragen, --full umfassender Fragebogen)
7
+ required: false
8
+ ---
9
+
10
+ # Projektkontext Einrichten
11
+
12
+ Konfiguriert `.claude/rules/00-project-context.md` durch Analyse der Codebase und gezielte Fragen.
13
+
14
+ ## Ausfuehrung
15
+
16
+ ### Phase 1: Automatische Erkennung
17
+
18
+ Folgende Dateien und Verzeichnisse analysieren:
19
+
20
+ **Konfigurationsdateien:**
21
+ - `package.json` → Node.js Projektname, Abhangigkeiten, Skripte
22
+ - `composer.json` → PHP Projektname, Abhangigkeiten, Framework
23
+ - `pubspec.yaml` → Flutter/Dart Projektname, Abhangigkeiten
24
+ - `requirements.txt` / `pyproject.toml` → Python Abhangigkeiten
25
+ - `Cargo.toml` → Rust Projekt
26
+ - `go.mod` → Go Modul
27
+
28
+ **Umgebung & Konfiguration:**
29
+ - `.env`, `.env.example` → Datenbank, Dienste
30
+ - `config/` → Framework-Konfiguration
31
+ - `docker-compose.yml` → Dienste (DB, Redis, etc.)
32
+
33
+ **Struktur:**
34
+ - `src/`, `lib/`, `app/` → Quellcode-Speicherort
35
+ - `tests/`, `spec/` → Testing-Framework
36
+ - `docs/`, `specifications/` → Dokumentation
37
+ - `.github/`, `.gitlab-ci.yml` → CI/CD
38
+
39
+ **Domane (falls zutreffend):**
40
+ - `src/Entity/`, `src/Domain/` → Geschaftsentitaten (PHP/Symfony)
41
+ - `lib/models/`, `lib/domain/` → Modelle (Flutter/Dart)
42
+ - `models/`, `schemas/` → Datenmodelle
43
+ - `migrations/` → Datenbankschema
44
+
45
+ Analyseergebnisse anzeigen:
46
+
47
+ ```
48
+ ╔══════════════════════════════════════════════════════════════╗
49
+ ║ PROJEKTANALYSE-ERGEBNISSE ║
50
+ ╚══════════════════════════════════════════════════════════════╝
51
+
52
+ ✅ Erkannte Informationen:
53
+ ┌─────────────────┬────────────────────────────────┐
54
+ │ Element │ Wert │
55
+ ├─────────────────┼────────────────────────────────┤
56
+ │ Projektname │ {erkannter_name} │
57
+ │ Sprache │ {erkannte_sprache} │
58
+ │ Framework │ {erkanntes_framework} │
59
+ │ Datenbank │ {erkannte_datenbank} │
60
+ │ Testing │ {erkanntes_testing} │
61
+ │ CI/CD │ {erkanntes_cicd} │
62
+ └─────────────────┴────────────────────────────────┘
63
+
64
+ 📁 Projektstruktur:
65
+ {erkannte_struktur}
66
+
67
+ 📄 Gefundene Dokumentation:
68
+ {gefundene_docs}
69
+
70
+ ❌ Nicht Erkannt (wird abgefragt):
71
+ - {fehlende_elemente}
72
+ ```
73
+
74
+ ### Phase 2: Interaktive Fragen
75
+
76
+ Nur nach Informationen fragen, die in Phase 1 NICHT erkannt wurden.
77
+ Fragen uberspringen, wenn `--auto` Modus verwendet wird und ein vernunftiger Standardwert existiert.
78
+
79
+ **Wesentliche Fragen:**
80
+
81
+ 1. **Anwendungstyp** (falls nicht erkannt):
82
+ ```
83
+ Welcher Anwendungstyp ist das?
84
+ [ ] REST API [ ] Webanwendung [ ] Mobile App
85
+ [ ] CLI-Tool [ ] Bibliothek/Paket [ ] Monorepo
86
+ ```
87
+
88
+ 2. **Geschaftsdomane**:
89
+ ```
90
+ Was ist die Geschaftsdomane?
91
+ [ ] E-Commerce [ ] SaaS-Plattform [ ] FinTech
92
+ [ ] HealthTech [ ] EdTech [ ] Social/Community
93
+ [ ] Medien/Inhalt [ ] IoT [ ] Andere: _____
94
+ ```
95
+
96
+ 3. **Zielbenutzer** (2-3 Personas):
97
+ ```
98
+ Beschreiben Sie Ihre Hauptbenutzer:
99
+
100
+ Primarer Benutzer:
101
+ > Rolle: _____
102
+ > Hauptziel: _____
103
+
104
+ Sekundarer Benutzer (optional):
105
+ > Rolle: _____
106
+ > Hauptziel: _____
107
+ ```
108
+
109
+ 4. **Compliance-Anforderungen**:
110
+ ```
111
+ Welche Compliance-Anforderungen gelten?
112
+ [ ] DSGVO (EU-Datenschutz)
113
+ [ ] HIPAA (US-Gesundheitswesen)
114
+ [ ] PCI-DSS (Zahlungskarten)
115
+ [ ] SOC2 (Sicherheit)
116
+ [ ] Keine / Nicht zutreffend
117
+ ```
118
+
119
+ **Erweiterte Fragen** (nur mit `--full` Modus):
120
+
121
+ 5. **Geschaftsziele**:
122
+ ```
123
+ Kurzfristige Ziele (3-6 Monate):
124
+ > _____
125
+
126
+ Mittelfristige Ziele (6-12 Monate):
127
+ > _____
128
+ ```
129
+
130
+ 6. **Bekannte Probleme/Technische Schulden**:
131
+ ```
132
+ Gibt es bekannte Probleme oder technische Schulden zu dokumentieren?
133
+ > _____
134
+ ```
135
+
136
+ 7. **Glossarbegriffe**:
137
+ ```
138
+ Wichtige Geschaftsbegriffe zum Definieren (kommagetrennt):
139
+ > _____
140
+ ```
141
+
142
+ ### Phase 3: Kontextdatei Generieren
143
+
144
+ `.claude/rules/00-project-context.md` erstellen:
145
+
146
+ ```markdown
147
+ # Projektkontext - {PROJEKTNAME}
148
+
149
+ > Automatisch generiert von `/common:setup-project-context` am {DATUM}
150
+ > Nach Bedarf uberprufen und anpassen.
151
+
152
+ ## Ubersicht
153
+
154
+ **{PROJEKTNAME}** ist eine {TYP}-Anwendung fur die {DOMANE}-Domane.
155
+
156
+ {BESCHREIBUNG_AUS_README_ODER_BENUTZER}
157
+
158
+ ## Technischer Stack
159
+
160
+ | Komponente | Technologie |
161
+ |--------------|----------------------|
162
+ | Sprache | {SPRACHE} |
163
+ | Framework | {FRAMEWORK} |
164
+ | Datenbank | {DATABASE} |
165
+ | Cache | {CACHE_FALLS_ERKANNT}|
166
+ | Testing | {TEST_FRAMEWORKS} |
167
+ | CI/CD | {CICD_PLATTFORM} |
168
+
169
+ ## Projektstruktur
170
+
171
+ ```
172
+ {ERKANNTE_STRUKTUR}
173
+ ```
174
+
175
+ ## Geschaftsdomane
176
+
177
+ ### Kernkonzepte
178
+
179
+ {ENTITATEN_FALLS_ERKANNT}
180
+
181
+ ### Bounded Contexts
182
+
183
+ <!-- Hinzufugen bei DDD-Verwendung -->
184
+ - Kontext 1: ...
185
+ - Kontext 2: ...
186
+
187
+ ## Benutzer & Personas
188
+
189
+ ### {PRIMARER_BENUTZER_ROLLE}
190
+ - **Ziel:** {PRIMARER_BENUTZER_ZIEL}
191
+ - **Schmerzpunkte:** Zu dokumentieren
192
+ - **Wichtige Workflows:** Zu dokumentieren
193
+
194
+ ### {SEKUNDARER_BENUTZER_ROLLE}
195
+ - **Ziel:** {SEKUNDARER_BENUTZER_ZIEL}
196
+ - **Schmerzpunkte:** Zu dokumentieren
197
+ - **Wichtige Workflows:** Zu dokumentieren
198
+
199
+ ## Einschrankungen
200
+
201
+ ### Compliance
202
+ {COMPLIANCE_ANFORDERUNGEN}
203
+
204
+ ### Leistungsziele
205
+ - Seitenladezeit: < 3s
206
+ - API-Antwortzeit: < 200ms
207
+ - Verfugbarkeit: 99.9%
208
+
209
+ ### Sicherheitsanforderungen
210
+ - OWASP Top 10 Konformitat
211
+ - Eingabevalidierung an allen Endpunkten
212
+ - Authentifizierung fur geschutzte Ressourcen erforderlich
213
+
214
+ ## Ziele
215
+
216
+ ### Kurzfristig
217
+ {KURZFRISTIGE_ZIELE_ODER_PLATZHALTER}
218
+
219
+ ### Mittelfristig
220
+ {MITTELFRISTIGE_ZIELE_ODER_PLATZHALTER}
221
+
222
+ ## Bekannte Probleme / Technische Schulden
223
+
224
+ {PROBLEME_ODER_PLATZHALTER}
225
+
226
+ ## Glossar
227
+
228
+ | Begriff | Definition |
229
+ |---------|------------|
230
+ {GLOSSARBEGRIFFE_ODER_BEISPIELE}
231
+ ```
232
+
233
+ ### Phase 4: Validierung & Nachste Schritte
234
+
235
+ Zusammenfassung und Empfehlungen anzeigen:
236
+
237
+ ```
238
+ ╔══════════════════════════════════════════════════════════════╗
239
+ ║ PROJEKTKONTEXT GENERIERT ║
240
+ ╚══════════════════════════════════════════════════════════════╝
241
+
242
+ ✅ Datei erstellt: .claude/rules/00-project-context.md
243
+
244
+ Zusammenfassung:
245
+ ┌─────────────────┬────────────────────────────────┐
246
+ │ Projekt │ {PROJEKTNAME} │
247
+ │ Typ │ {TYP} │
248
+ │ Stack │ {FRAMEWORK} + {DATABASE} │
249
+ │ Domane │ {DOMANE} │
250
+ │ Compliance │ {COMPLIANCE} │
251
+ │ Personas │ {ANZAHL} definiert │
252
+ └─────────────────┴────────────────────────────────┘
253
+
254
+ 📋 Empfohlene Nachste Schritte:
255
+
256
+ 1. Generierte Datei uberprufen und Platzhalterabschnitte ausfullen
257
+ 2. Detaillierte Bounded Contexts hinzufugen falls DDD verwendet wird
258
+ 3. Wichtige Geschaftsworkflows dokumentieren
259
+ 4. Spezialisierte Agenten ausfuhren erwagen:
260
+ - @database-architect → Datenbankschema dokumentieren
261
+ - @api-designer → API-Endpunkte dokumentieren
262
+ - @security-reviewer → Sicherheitseinschrankungen uberprufen
263
+
264
+ Mochten Sie, dass ich die Datei zur Uberprufung offne?
265
+ ```
266
+
267
+ ## Modi
268
+
269
+ | Modus | Verhalten |
270
+ |-------|-----------|
271
+ | (Standard) | Erkennung + wesentliche Fragen (Typ, Domane, Benutzer, Compliance) |
272
+ | `--auto` | Maximale Auto-Erkennung, Fragen mit vernunftigen Standardwerten uberspringen |
273
+ | `--full` | Alle Fragen einschliesslich Ziele, Probleme und Glossar |
274
+
275
+ ## Beispiele
276
+
277
+ ```bash
278
+ # Standardmodus - ausgewogene Erkennung und Fragen
279
+ /common:setup-project-context
280
+
281
+ # Auto-Modus - minimale Interaktion
282
+ /common:setup-project-context --auto
283
+
284
+ # Vollstandiger Modus - umfassender Fragebogen
285
+ /common:setup-project-context --full
286
+ ```
@@ -0,0 +1,286 @@
1
+ ---
2
+ name: setup-project-context
3
+ description: Analyze codebase and configure project context interactively
4
+ arguments:
5
+ - name: mode
6
+ description: Detection mode (--auto minimal questions, --full comprehensive)
7
+ required: false
8
+ ---
9
+
10
+ # Setup Project Context
11
+
12
+ Configure `.claude/rules/00-project-context.md` by analyzing the codebase and asking targeted questions.
13
+
14
+ ## Execution
15
+
16
+ ### Phase 1: Automatic Detection
17
+
18
+ Analyze the following files and directories:
19
+
20
+ **Configuration Files:**
21
+ - `package.json` → Node.js project name, dependencies, scripts
22
+ - `composer.json` → PHP project name, dependencies, framework
23
+ - `pubspec.yaml` → Flutter/Dart project name, dependencies
24
+ - `requirements.txt` / `pyproject.toml` → Python dependencies
25
+ - `Cargo.toml` → Rust project
26
+ - `go.mod` → Go module
27
+
28
+ **Environment & Config:**
29
+ - `.env`, `.env.example` → Database, services
30
+ - `config/` → Framework configuration
31
+ - `docker-compose.yml` → Services (DB, Redis, etc.)
32
+
33
+ **Structure:**
34
+ - `src/`, `lib/`, `app/` → Source code location
35
+ - `tests/`, `spec/` → Testing framework
36
+ - `docs/`, `specifications/` → Documentation
37
+ - `.github/`, `.gitlab-ci.yml` → CI/CD
38
+
39
+ **Domain (if applicable):**
40
+ - `src/Entity/`, `src/Domain/` → Business entities (PHP/Symfony)
41
+ - `lib/models/`, `lib/domain/` → Models (Flutter/Dart)
42
+ - `models/`, `schemas/` → Data models
43
+ - `migrations/` → Database schema
44
+
45
+ Display analysis results:
46
+
47
+ ```
48
+ ╔══════════════════════════════════════════════════════════════╗
49
+ ║ PROJECT ANALYSIS RESULTS ║
50
+ ╚══════════════════════════════════════════════════════════════╝
51
+
52
+ ✅ Detected Information:
53
+ ┌─────────────────┬────────────────────────────────┐
54
+ │ Element │ Value │
55
+ ├─────────────────┼────────────────────────────────┤
56
+ │ Project Name │ {detected_name} │
57
+ │ Language │ {detected_language} │
58
+ │ Framework │ {detected_framework} │
59
+ │ Database │ {detected_database} │
60
+ │ Testing │ {detected_testing} │
61
+ │ CI/CD │ {detected_cicd} │
62
+ └─────────────────┴────────────────────────────────┘
63
+
64
+ 📁 Project Structure:
65
+ {detected_structure}
66
+
67
+ 📄 Documentation Found:
68
+ {detected_docs}
69
+
70
+ ❌ Not Detected (will ask):
71
+ - {missing_items}
72
+ ```
73
+
74
+ ### Phase 2: Interactive Questions
75
+
76
+ Ask only for information NOT detected in Phase 1.
77
+ Skip questions if `--auto` mode is used and a reasonable default exists.
78
+
79
+ **Essential Questions:**
80
+
81
+ 1. **Application Type** (if not detected):
82
+ ```
83
+ What type of application is this?
84
+ [ ] REST API [ ] Web Application [ ] Mobile App
85
+ [ ] CLI Tool [ ] Library/Package [ ] Monorepo
86
+ ```
87
+
88
+ 2. **Business Domain**:
89
+ ```
90
+ What is the business domain?
91
+ [ ] E-commerce [ ] SaaS Platform [ ] FinTech
92
+ [ ] HealthTech [ ] EdTech [ ] Social/Community
93
+ [ ] Media/Content [ ] IoT [ ] Other: _____
94
+ ```
95
+
96
+ 3. **Target Users** (2-3 personas):
97
+ ```
98
+ Describe your main users:
99
+
100
+ Primary User:
101
+ > Role: _____
102
+ > Main goal: _____
103
+
104
+ Secondary User (optional):
105
+ > Role: _____
106
+ > Main goal: _____
107
+ ```
108
+
109
+ 4. **Compliance Requirements**:
110
+ ```
111
+ Which compliance requirements apply?
112
+ [ ] GDPR (EU data protection)
113
+ [ ] HIPAA (US healthcare)
114
+ [ ] PCI-DSS (Payment card)
115
+ [ ] SOC2 (Security)
116
+ [ ] None / Not applicable
117
+ ```
118
+
119
+ **Extended Questions** (only with `--full` mode):
120
+
121
+ 5. **Business Goals**:
122
+ ```
123
+ Short-term goals (3-6 months):
124
+ > _____
125
+
126
+ Medium-term goals (6-12 months):
127
+ > _____
128
+ ```
129
+
130
+ 6. **Known Issues/Technical Debt**:
131
+ ```
132
+ Any known issues or technical debt to document?
133
+ > _____
134
+ ```
135
+
136
+ 7. **Glossary Terms**:
137
+ ```
138
+ Key business terms to define (comma-separated):
139
+ > _____
140
+ ```
141
+
142
+ ### Phase 3: Generate Context File
143
+
144
+ Create `.claude/rules/00-project-context.md`:
145
+
146
+ ```markdown
147
+ # Project Context - {PROJECT_NAME}
148
+
149
+ > Auto-generated by `/common:setup-project-context` on {DATE}
150
+ > Review and customize as needed.
151
+
152
+ ## Overview
153
+
154
+ **{PROJECT_NAME}** is a {TYPE} application for the {DOMAIN} domain.
155
+
156
+ {DESCRIPTION_FROM_README_OR_USER}
157
+
158
+ ## Technical Stack
159
+
160
+ | Component | Technology |
161
+ |--------------|----------------------|
162
+ | Language | {LANGUAGE} |
163
+ | Framework | {FRAMEWORK} |
164
+ | Database | {DATABASE} |
165
+ | Cache | {CACHE_IF_DETECTED} |
166
+ | Testing | {TESTING_FRAMEWORKS} |
167
+ | CI/CD | {CICD_PLATFORM} |
168
+
169
+ ## Project Structure
170
+
171
+ ```
172
+ {DETECTED_STRUCTURE}
173
+ ```
174
+
175
+ ## Business Domain
176
+
177
+ ### Core Concepts
178
+
179
+ {ENTITIES_IF_DETECTED}
180
+
181
+ ### Bounded Contexts
182
+
183
+ <!-- Add if using DDD -->
184
+ - Context 1: ...
185
+ - Context 2: ...
186
+
187
+ ## Users & Personas
188
+
189
+ ### {PRIMARY_USER_ROLE}
190
+ - **Goal:** {PRIMARY_USER_GOAL}
191
+ - **Pain points:** To be documented
192
+ - **Key workflows:** To be documented
193
+
194
+ ### {SECONDARY_USER_ROLE}
195
+ - **Goal:** {SECONDARY_USER_GOAL}
196
+ - **Pain points:** To be documented
197
+ - **Key workflows:** To be documented
198
+
199
+ ## Constraints
200
+
201
+ ### Compliance
202
+ {COMPLIANCE_REQUIREMENTS}
203
+
204
+ ### Performance Targets
205
+ - Page load time: < 3s
206
+ - API response time: < 200ms
207
+ - Availability: 99.9%
208
+
209
+ ### Security Requirements
210
+ - OWASP Top 10 compliance
211
+ - Input validation on all endpoints
212
+ - Authentication required for protected resources
213
+
214
+ ## Goals
215
+
216
+ ### Short-term
217
+ {SHORT_TERM_GOALS_OR_PLACEHOLDER}
218
+
219
+ ### Medium-term
220
+ {MEDIUM_TERM_GOALS_OR_PLACEHOLDER}
221
+
222
+ ## Known Issues / Technical Debt
223
+
224
+ {ISSUES_OR_PLACEHOLDER}
225
+
226
+ ## Glossary
227
+
228
+ | Term | Definition |
229
+ |------|------------|
230
+ {GLOSSARY_TERMS_OR_EXAMPLES}
231
+ ```
232
+
233
+ ### Phase 4: Validation & Next Steps
234
+
235
+ Display summary and recommendations:
236
+
237
+ ```
238
+ ╔══════════════════════════════════════════════════════════════╗
239
+ ║ PROJECT CONTEXT GENERATED ║
240
+ ╚══════════════════════════════════════════════════════════════╝
241
+
242
+ ✅ File created: .claude/rules/00-project-context.md
243
+
244
+ Summary:
245
+ ┌─────────────────┬────────────────────────────────┐
246
+ │ Project │ {PROJECT_NAME} │
247
+ │ Type │ {TYPE} │
248
+ │ Stack │ {FRAMEWORK} + {DATABASE} │
249
+ │ Domain │ {DOMAIN} │
250
+ │ Compliance │ {COMPLIANCE} │
251
+ │ Personas │ {COUNT} defined │
252
+ └─────────────────┴────────────────────────────────┘
253
+
254
+ 📋 Recommended Next Steps:
255
+
256
+ 1. Review generated file and complete placeholder sections
257
+ 2. Add detailed bounded contexts if using DDD
258
+ 3. Document key business workflows
259
+ 4. Consider running specialized agents:
260
+ - @database-architect → Document database schema
261
+ - @api-designer → Document API endpoints
262
+ - @security-reviewer → Review security constraints
263
+
264
+ Would you like me to open the file for review?
265
+ ```
266
+
267
+ ## Modes
268
+
269
+ | Mode | Behavior |
270
+ |------|----------|
271
+ | (default) | Detect + essential questions (type, domain, users, compliance) |
272
+ | `--auto` | Maximum auto-detection, skip questions with reasonable defaults |
273
+ | `--full` | All questions including goals, issues, and glossary |
274
+
275
+ ## Examples
276
+
277
+ ```bash
278
+ # Standard mode - balanced detection and questions
279
+ /common:setup-project-context
280
+
281
+ # Auto mode - minimal interaction
282
+ /common:setup-project-context --auto
283
+
284
+ # Full mode - comprehensive questionnaire
285
+ /common:setup-project-context --full
286
+ ```