@the-bearded-bear/claude-craft 5.2.1 → 5.3.0-next.cc5a278
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.
- package/Dev/i18n/de/Common/commands/recette-fix.md +287 -0
- package/Dev/i18n/de/Common/commands/recette.md +1 -0
- package/Dev/i18n/de/Common/templates/bug-story.md +65 -0
- package/Dev/i18n/en/Common/commands/recette-fix.md +287 -0
- package/Dev/i18n/en/Common/commands/recette.md +1 -0
- package/Dev/i18n/en/Common/templates/bug-story.md +65 -0
- package/Dev/i18n/es/Common/commands/recette-fix.md +287 -0
- package/Dev/i18n/es/Common/commands/recette.md +1 -0
- package/Dev/i18n/es/Common/templates/bug-story.md +65 -0
- package/Dev/i18n/fr/Common/commands/recette-fix.md +287 -0
- package/Dev/i18n/fr/Common/commands/recette.md +1 -0
- package/Dev/i18n/fr/Common/templates/bug-story.md +65 -0
- package/Dev/i18n/pt/Common/commands/recette-fix.md +287 -0
- package/Dev/i18n/pt/Common/commands/recette.md +1 -0
- package/Dev/i18n/pt/Common/templates/bug-story.md +65 -0
- package/Dev/scripts/install-angular-rules.sh +1 -1
- package/Dev/scripts/install-common-rules.sh +1 -1
- package/Dev/scripts/install-csharp-rules.sh +1 -1
- package/Dev/scripts/install-flutter-rules.sh +1 -1
- package/Dev/scripts/install-laravel-rules.sh +1 -1
- package/Dev/scripts/install-php-rules.sh +1 -1
- package/Dev/scripts/install-python-rules.sh +1 -1
- package/Dev/scripts/install-react-rules.sh +1 -1
- package/Dev/scripts/install-reactnative-rules.sh +1 -1
- package/Dev/scripts/install-symfony-rules.sh +1 -1
- package/Dev/scripts/install-vuejs-rules.sh +1 -1
- package/Project/agents/qa-recette.yaml +29 -0
- package/README.md +3 -2
- package/package.json +1 -1
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Automatisierte Fehlerbehebung aus QA Recette Sitzungen
|
|
3
|
+
argument-hint: --session=<session-id> [--dry-run|--skip-fix|--severity=<level>|--auto-commit]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# QA Recette Fix - Automatisierte Fehlerbehebung
|
|
7
|
+
|
|
8
|
+
Ergaenzung zu `/qa:recette`. Liest einen Recette-Sitzungsbericht, verfeinert jeden Fehler fuer die Verarbeitung, generiert Projektmanagement-Dokumente (BMAD Bug Stories, Backlog, Sprint), und startet dann die TDD-basierte Behebung fuer jeden Bug. Implementiert die **Goldene Regel**: Ein behobener Fehler darf NIE wieder auftreten.
|
|
9
|
+
|
|
10
|
+
## Argumente
|
|
11
|
+
|
|
12
|
+
**$ARGUMENTS**
|
|
13
|
+
|
|
14
|
+
- `--session=<id>` : Recette-Sitzungs-ID (z.B. REC-20260130-143022) **[erforderlich]**
|
|
15
|
+
- `--dry-run` : Fehler verfeinern und BMAD-Dokumente generieren ohne zu beheben
|
|
16
|
+
- `--severity=<level>` : Nach Mindestschwere filtern (critical, high, medium, low)
|
|
17
|
+
- `--skip-fix` : Nur Dokumente generieren, keine TDD-Behebung
|
|
18
|
+
- `--auto-commit` : Automatischer Commit nach jeder Fehlerbehebung
|
|
19
|
+
|
|
20
|
+
## Hauptfunktionen
|
|
21
|
+
|
|
22
|
+
| Funktion | Beschreibung |
|
|
23
|
+
|----------|--------------|
|
|
24
|
+
| **Fehlerverfeinerung** | Analysiert die Ursache, reproduziert ueber Chrome wenn verfuegbar |
|
|
25
|
+
| **Intelligente Gruppierung** | Dedupliziert Fehler nach gemeinsamer Ursache |
|
|
26
|
+
| **BMAD-Dokumente** | Generiert Bug Stories, aktualisiert Backlog und Sprint |
|
|
27
|
+
| **TDD-Behebung** | RED → GREEN → REFACTOR Workflow fuer jeden Bug |
|
|
28
|
+
| **Regressionstests** | Automatische Generierung und Registeraktualisierung |
|
|
29
|
+
| **Fortschrittsverfolgung** | fix-state.yaml fuer Fortsetzung und Monitoring |
|
|
30
|
+
|
|
31
|
+
## 7-Phasen-Prozess
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Recette-Sitzung (.recette/sessions/{id}/)
|
|
35
|
+
|
|
|
36
|
+
v
|
|
37
|
+
Phase 1: Sitzung und Fehler laden
|
|
38
|
+
|
|
|
39
|
+
v
|
|
40
|
+
Phase 2: Fehlerbeschreibungen verfeinern
|
|
41
|
+
| - Ueber Chrome reproduzieren wenn noetig
|
|
42
|
+
| - Ursache identifizieren
|
|
43
|
+
| - Schwere klassifizieren
|
|
44
|
+
|
|
|
45
|
+
v
|
|
46
|
+
Phase 3: Nach Ursache gruppieren
|
|
47
|
+
| - Deduplizierung
|
|
48
|
+
| - Priorisierung
|
|
49
|
+
|
|
|
50
|
+
v
|
|
51
|
+
Phase 4: BMAD-Dokumente generieren
|
|
52
|
+
| - Bug Stories (US-XXX-bug-YYY)
|
|
53
|
+
| - Backlog aktualisieren
|
|
54
|
+
| - sprint-status.yaml aktualisieren
|
|
55
|
+
|
|
|
56
|
+
v
|
|
57
|
+
Phase 5: TDD-Behebung pro Bug
|
|
58
|
+
| - RED: Test der den Bug reproduziert
|
|
59
|
+
| - GREEN: Minimale Behebung
|
|
60
|
+
| - REFACTOR: Verbesserung
|
|
61
|
+
|
|
|
62
|
+
v
|
|
63
|
+
Phase 6: Verifizierung
|
|
64
|
+
| - Alle Tests bestehen
|
|
65
|
+
| - Regressionstests generiert
|
|
66
|
+
| - Regressionsregister aktualisiert
|
|
67
|
+
|
|
|
68
|
+
v
|
|
69
|
+
Phase 7: Zusammenfassungsbericht
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Phase 1: Sitzung Laden
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
┌─────────────────────────────────────────┐
|
|
76
|
+
│ 1. load_session(session_id) │
|
|
77
|
+
│ - .recette/sessions/{id}/ lesen │
|
|
78
|
+
│ - state.yaml laden │
|
|
79
|
+
│ - Fehler extrahieren (failed) │
|
|
80
|
+
│ - Screenshots/Logs laden │
|
|
81
|
+
└─────────────────────────────────────────┘
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Phase 2: Fehlerverfeinerung
|
|
85
|
+
|
|
86
|
+
Fuer jeden erkannten Fehler:
|
|
87
|
+
|
|
88
|
+
1. Screenshot/Log des Fehlers aus der Sitzung erneut lesen
|
|
89
|
+
2. Wenn Chrome MCP verfuegbar: Fehler reproduzieren zur Bestaetigung
|
|
90
|
+
3. Quellcode analysieren um Ursache zu identifizieren
|
|
91
|
+
4. Beschreibung neu formulieren mit: aktuelles Verhalten, erwartetes Verhalten, betroffene Dateien, vermutete Ursache
|
|
92
|
+
|
|
93
|
+
**Schweregradmatrix:**
|
|
94
|
+
|
|
95
|
+
| Fehlertyp | Benutzerauswirkung | Haeufigkeit | Schweregrad |
|
|
96
|
+
|-----------|-------------------|-------------|-------------|
|
|
97
|
+
| security | Beliebig | Beliebig | critical |
|
|
98
|
+
| logic | Blockierend | Beliebig | critical |
|
|
99
|
+
| logic | Nicht-blockierend | Haeufig | high |
|
|
100
|
+
| validation | Blockierend | Beliebig | high |
|
|
101
|
+
| validation | Nicht-blockierend | Selten | medium |
|
|
102
|
+
| interaction | Beliebig | Beliebig | high |
|
|
103
|
+
| visual | Schwere Verschlechterung | Beliebig | medium |
|
|
104
|
+
| visual | Kosmetisch | Beliebig | low |
|
|
105
|
+
| api | 5xx-Fehler | Beliebig | critical |
|
|
106
|
+
| api | Unerwarteter 4xx | Beliebig | high |
|
|
107
|
+
|
|
108
|
+
### Phase 3: Gruppierung nach Ursache
|
|
109
|
+
|
|
110
|
+
Mehrere Recette-Fehler koennen die gleiche Ursache haben:
|
|
111
|
+
|
|
112
|
+
- Formularvalidierungsfehler + Nachrichtenanzeigefehler = gleiche Validierungskomponente
|
|
113
|
+
- API-Fehler auf 3 Endpunkten = gleiche Authentifizierungs-Middleware
|
|
114
|
+
|
|
115
|
+
Die Gruppierung erstellt **eine einzige Bug Story** pro Ursache statt einer pro Fehler.
|
|
116
|
+
|
|
117
|
+
### Phase 4: BMAD-Dokumentgenerierung
|
|
118
|
+
|
|
119
|
+
Fuer jeden gruppierten Bug:
|
|
120
|
+
|
|
121
|
+
1. Bug Story aus dem Template `bug-story.md` generieren
|
|
122
|
+
2. Zu `.bmad/sprint-status.yaml` mit Status `ready-for-dev` hinzufuegen
|
|
123
|
+
3. Wenn ein Sprint aktiv ist: zum aktuellen Sprint hinzufuegen
|
|
124
|
+
4. Sonst: zum Backlog hinzufuegen
|
|
125
|
+
|
|
126
|
+
### Phase 5: TDD-Behebung
|
|
127
|
+
|
|
128
|
+
Fuer jede Bug Story (nach Schweregrad sortiert):
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
┌──────────────────────────────────────────────┐
|
|
132
|
+
│ BUG-001 (critical) │
|
|
133
|
+
│ │
|
|
134
|
+
│ 1. RED : Test schreiben der Bug │
|
|
135
|
+
│ reproduziert → MUSS fehlschlagen │
|
|
136
|
+
│ │
|
|
137
|
+
│ 2. GREEN : Minimale Code-Behebung │
|
|
138
|
+
│ → Ausfuehren → MUSS bestehen │
|
|
139
|
+
│ → Alle Tests → Nicht-Regression │
|
|
140
|
+
│ │
|
|
141
|
+
│ 3. REFACTOR : Verbessern wenn noetig │
|
|
142
|
+
│ → Regressionstest generieren │
|
|
143
|
+
│ → Register aktualisieren │
|
|
144
|
+
│ → fix-state.yaml aktualisieren │
|
|
145
|
+
│ │
|
|
146
|
+
│ 4. COMMIT (wenn --auto-commit) │
|
|
147
|
+
│ fix({modul}): {desc} [recette:{session}] │
|
|
148
|
+
└──────────────────────────────────────────────┘
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Generierte Testtypen nach Klassifizierung:**
|
|
152
|
+
|
|
153
|
+
| Fehlertyp | Unit-Test | Funktionstest | Behat-Feature |
|
|
154
|
+
|-----------|:---------:|:-------------:|:-------------:|
|
|
155
|
+
| logic | X | | |
|
|
156
|
+
| validation | X | X | |
|
|
157
|
+
| api | | X | |
|
|
158
|
+
| interaction | | | X |
|
|
159
|
+
| visual | | | X |
|
|
160
|
+
| security | X | X | |
|
|
161
|
+
|
|
162
|
+
### Phase 6: Verifizierung
|
|
163
|
+
|
|
164
|
+
1. Alle Projekttests ausfuehren
|
|
165
|
+
2. Pruefen ob generierte Regressionstests in `.recette/regression/tests/` sind
|
|
166
|
+
3. Pruefen ob `.recette/regression/registry.yaml` aktuell ist
|
|
167
|
+
4. Pruefen ob fix-state.yaml den korrekten Zustand widerspiegelt
|
|
168
|
+
|
|
169
|
+
### Phase 7: Zusammenfassungsbericht
|
|
170
|
+
|
|
171
|
+
Generiert einen Zusammenfassungsbericht mit:
|
|
172
|
+
|
|
173
|
+
- Gesamtzahl verarbeiteter Fehler
|
|
174
|
+
- Anzahl gruppierter Bugs (nach Deduplizierung)
|
|
175
|
+
- Erfolgreiche / fehlgeschlagene / uebersprungene Behebungen
|
|
176
|
+
- Generierte Regressionstests
|
|
177
|
+
- Durchgefuehrte Commits (wenn `--auto-commit`)
|
|
178
|
+
|
|
179
|
+
## Fortschrittszustand (fix-state.yaml)
|
|
180
|
+
|
|
181
|
+
```yaml
|
|
182
|
+
# .recette/sessions/{id}/fix-state.yaml
|
|
183
|
+
session_id: "REC-20260130-143022"
|
|
184
|
+
started_at: "2026-01-31T10:00:00"
|
|
185
|
+
status: "in-progress" # pending | in-progress | completed | paused
|
|
186
|
+
|
|
187
|
+
errors:
|
|
188
|
+
total: 8
|
|
189
|
+
grouped: 5
|
|
190
|
+
refined: 5
|
|
191
|
+
fixed: 3
|
|
192
|
+
skipped: 0
|
|
193
|
+
remaining: 2
|
|
194
|
+
|
|
195
|
+
bugs:
|
|
196
|
+
- id: "BUG-001"
|
|
197
|
+
error_ids: ["ERR-001", "ERR-003"]
|
|
198
|
+
severity: critical
|
|
199
|
+
title: "Authentifizierung schlaegt nach Sitzungs-Timeout fehl"
|
|
200
|
+
story_id: "US-042-bug-001"
|
|
201
|
+
status: "fixed" # pending | refining | documented | fixing | fixed | skipped
|
|
202
|
+
tdd_phase: "refactor"
|
|
203
|
+
fix_commit: "abc1234"
|
|
204
|
+
regression_test: "tests/Functional/Auth/SessionTimeoutTest.php"
|
|
205
|
+
|
|
206
|
+
- id: "BUG-002"
|
|
207
|
+
error_ids: ["ERR-002"]
|
|
208
|
+
severity: high
|
|
209
|
+
title: "Kontaktformular zeigt Validierungsfehler nicht an"
|
|
210
|
+
story_id: "US-042-bug-002"
|
|
211
|
+
status: "fixing"
|
|
212
|
+
tdd_phase: "green"
|
|
213
|
+
fix_commit: null
|
|
214
|
+
regression_test: null
|
|
215
|
+
|
|
216
|
+
current_bug: "BUG-002"
|
|
217
|
+
resume_from:
|
|
218
|
+
bug_id: "BUG-002"
|
|
219
|
+
phase: "green"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Beispiele
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Alle Bugs einer Recette-Sitzung beheben
|
|
226
|
+
/qa:recette-fix --session=REC-20260130-143022
|
|
227
|
+
|
|
228
|
+
# Dry Run: verfeinern und dokumentieren ohne zu beheben
|
|
229
|
+
/qa:recette-fix --session=REC-20260130-143022 --dry-run
|
|
230
|
+
|
|
231
|
+
# Nur kritische und hohe Bugs beheben
|
|
232
|
+
/qa:recette-fix --session=REC-20260130-143022 --severity=high
|
|
233
|
+
|
|
234
|
+
# BMAD-Dokumente generieren ohne TDD zu starten
|
|
235
|
+
/qa:recette-fix --session=REC-20260130-143022 --skip-fix
|
|
236
|
+
|
|
237
|
+
# Beheben mit automatischem Commit
|
|
238
|
+
/qa:recette-fix --session=REC-20260130-143022 --auto-commit
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Ausgabestruktur
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
.recette/sessions/{session-id}/
|
|
245
|
+
├── state.yaml # Recette-Sitzungszustand
|
|
246
|
+
├── fix-state.yaml # Behebungs-Fortschrittszustand
|
|
247
|
+
├── screenshots/ # Fehler-Screenshots
|
|
248
|
+
└── logs/ # Detaillierte Logs
|
|
249
|
+
|
|
250
|
+
.bmad/stories/
|
|
251
|
+
├── US-042-bug-001.md # BMAD Bug Story
|
|
252
|
+
├── US-042-bug-002.md
|
|
253
|
+
└── ...
|
|
254
|
+
|
|
255
|
+
.recette/regression/
|
|
256
|
+
├── registry.yaml # Aktualisiertes Register
|
|
257
|
+
└── tests/
|
|
258
|
+
├── Unit/
|
|
259
|
+
├── Functional/
|
|
260
|
+
└── Behat/
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Verwandte Befehle
|
|
264
|
+
|
|
265
|
+
| Befehl | Beschreibung |
|
|
266
|
+
|--------|--------------|
|
|
267
|
+
| `/qa:recette` | Akzeptanztests ausfuehren |
|
|
268
|
+
| `/qa:recette-status` | Sitzungsstatus anzeigen |
|
|
269
|
+
| `/qa:recette-regression` | Regressionstests anzeigen |
|
|
270
|
+
| `/qa:recette-report` | Bericht generieren |
|
|
271
|
+
|
|
272
|
+
## Fehlermeldungen
|
|
273
|
+
|
|
274
|
+
| Fehler | Loesung |
|
|
275
|
+
|--------|---------|
|
|
276
|
+
| "Sitzung nicht gefunden" | Ueberpruefen Sie die Sitzungs-ID in `.recette/sessions/` |
|
|
277
|
+
| "Keine Fehler in der Sitzung" | Die Sitzung hat keine Fehler zu beheben |
|
|
278
|
+
| "sprint-status.yaml nicht gefunden" | BMAD mit `/bmad:init` initialisieren |
|
|
279
|
+
| "RED-Test schlaegt nicht fehl" | Bug existiert moeglicherweise nicht mehr, manuell pruefen |
|
|
280
|
+
|
|
281
|
+
## Best Practices
|
|
282
|
+
|
|
283
|
+
1. **Mit Dry-Run beginnen** : Verfeinerte Fehler und Dokumente vor der Behebung pruefen
|
|
284
|
+
2. **Nach Schweregrad priorisieren** : Mit kritischen Bugs beginnen
|
|
285
|
+
3. **Gruppierungen validieren** : Pruefen ob gruppierte Fehler wirklich die gleiche Ursache haben
|
|
286
|
+
4. **Stories ueberpruefen** : Generierte Bug Stories vor TDD-Start pruefen
|
|
287
|
+
5. **Auto-Commit verwenden** : Fuer eine saubere Behebungshistorie
|
|
@@ -210,6 +210,7 @@ entries:
|
|
|
210
210
|
|
|
211
211
|
| Befehl | Beschreibung |
|
|
212
212
|
|--------|--------------|
|
|
213
|
+
| `/qa:recette-fix` | Bugs aus einer Recette-Sitzung beheben |
|
|
213
214
|
| `/qa:recette-status` | Sitzungsstatus anzeigen |
|
|
214
215
|
| `/qa:recette-regression` | Regressionstests anzeigen |
|
|
215
216
|
| `/qa:recette-report` | Bericht generieren |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# {BUG_ID}: [BUG] {TITEL}
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
|
|
5
|
+
- **ID**: {BUG_ID}
|
|
6
|
+
- **Typ**: bug
|
|
7
|
+
- **Quelle**: Recette {SESSION_ID}
|
|
8
|
+
- **Quellfehler**: {ERROR_ID}
|
|
9
|
+
- **Schweregrad**: {critical|high|medium|low}
|
|
10
|
+
- **Sprint**: {SPRINT}
|
|
11
|
+
- **Status**: backlog
|
|
12
|
+
- **Datum**: {DATE}
|
|
13
|
+
|
|
14
|
+
## Fehlerbeschreibung
|
|
15
|
+
|
|
16
|
+
**Aktuelles Verhalten**: {verfeinerte Beschreibung des beobachteten Verhaltens}
|
|
17
|
+
|
|
18
|
+
**Erwartetes Verhalten**: {Beschreibung des korrekten erwarteten Verhaltens}
|
|
19
|
+
|
|
20
|
+
## Reproduktionsschritte
|
|
21
|
+
|
|
22
|
+
1. {Schritt 1}
|
|
23
|
+
2. {Schritt 2}
|
|
24
|
+
3. {Schritt 3}
|
|
25
|
+
|
|
26
|
+
## Ursache
|
|
27
|
+
|
|
28
|
+
{Ursachenanalyse aus der Verfeinerung}
|
|
29
|
+
|
|
30
|
+
## Akzeptanzkriterien
|
|
31
|
+
|
|
32
|
+
### AC-1: Bug tritt nicht mehr auf
|
|
33
|
+
|
|
34
|
+
```gherkin
|
|
35
|
+
GIVEN {Kontext}
|
|
36
|
+
WHEN {Aktion die den Bug ausgeloest hat}
|
|
37
|
+
THEN {korrektes Verhalten}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### AC-2: Regressionstest besteht
|
|
41
|
+
|
|
42
|
+
```gherkin
|
|
43
|
+
GIVEN die Behebung ist vorhanden
|
|
44
|
+
WHEN die Regressions-Suite ausgefuehrt wird
|
|
45
|
+
THEN bestehen alle Tests
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Betroffene Dateien
|
|
49
|
+
|
|
50
|
+
- {Datei 1}
|
|
51
|
+
- {Datei 2}
|
|
52
|
+
|
|
53
|
+
## Screenshots
|
|
54
|
+
|
|
55
|
+
<!-- Screenshots aus der Recette-Sitzung wenn verfuegbar -->
|
|
56
|
+
<!-- Pfad: .recette/sessions/{SESSION_ID}/screenshots/ -->
|
|
57
|
+
|
|
58
|
+
## Definition of Done
|
|
59
|
+
|
|
60
|
+
- [ ] RED-Test geschrieben (reproduziert den Bug)
|
|
61
|
+
- [ ] GREEN-Behebung angewendet
|
|
62
|
+
- [ ] Refactoring durchgefuehrt
|
|
63
|
+
- [ ] Regressionstests generiert
|
|
64
|
+
- [ ] Regressionsregister aktualisiert
|
|
65
|
+
- [ ] Alle Tests bestehen
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Automated bug fixing from QA Recette sessions
|
|
3
|
+
argument-hint: --session=<session-id> [--dry-run|--skip-fix|--severity=<level>|--auto-commit]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# QA Recette Fix - Automated Bug Fixing
|
|
7
|
+
|
|
8
|
+
Complement to `/qa:recette`. Reads a recette session/report, refines each error to make it actionable, generates project management documents (BMAD bug stories, backlog, sprint), then launches TDD-based fixing for each bug. Implements the **Golden Rule**: A fixed bug should NEVER reappear.
|
|
9
|
+
|
|
10
|
+
## Arguments
|
|
11
|
+
|
|
12
|
+
**$ARGUMENTS**
|
|
13
|
+
|
|
14
|
+
- `--session=<id>`: Recette session ID (e.g., REC-20260130-143022) **[required]**
|
|
15
|
+
- `--dry-run`: Refine errors and generate BMAD documents without fixing
|
|
16
|
+
- `--severity=<level>`: Filter by minimum severity (critical, high, medium, low)
|
|
17
|
+
- `--skip-fix`: Generate documents only, no TDD fixing
|
|
18
|
+
- `--auto-commit`: Automatic commit after each bug fix
|
|
19
|
+
|
|
20
|
+
## Key Features
|
|
21
|
+
|
|
22
|
+
| Feature | Description |
|
|
23
|
+
|---------|-------------|
|
|
24
|
+
| **Error Refinement** | Analyzes root cause, reproduces via Chrome if available |
|
|
25
|
+
| **Smart Grouping** | Deduplicates errors by common root cause |
|
|
26
|
+
| **BMAD Documents** | Generates bug stories, updates backlog and sprint |
|
|
27
|
+
| **TDD Fixing** | RED -> GREEN -> REFACTOR workflow for each bug |
|
|
28
|
+
| **Regression Tests** | Automatic generation and registry update |
|
|
29
|
+
| **Progress Tracking** | fix-state.yaml for resume and monitoring |
|
|
30
|
+
|
|
31
|
+
## 7-Phase Process
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Recette session (.recette/sessions/{id}/)
|
|
35
|
+
|
|
|
36
|
+
v
|
|
37
|
+
Phase 1: Load session and errors
|
|
38
|
+
|
|
|
39
|
+
v
|
|
40
|
+
Phase 2: Refine error descriptions
|
|
41
|
+
| - Reproduce via Chrome if needed
|
|
42
|
+
| - Identify root cause
|
|
43
|
+
| - Classify severity
|
|
44
|
+
|
|
|
45
|
+
v
|
|
46
|
+
Phase 3: Group by root cause
|
|
47
|
+
| - Deduplication
|
|
48
|
+
| - Prioritization
|
|
49
|
+
|
|
|
50
|
+
v
|
|
51
|
+
Phase 4: Generate BMAD documents
|
|
52
|
+
| - Bug stories (US-XXX-bug-YYY)
|
|
53
|
+
| - Update backlog
|
|
54
|
+
| - Update sprint-status.yaml
|
|
55
|
+
|
|
|
56
|
+
v
|
|
57
|
+
Phase 5: TDD fix per bug
|
|
58
|
+
| - RED: test reproducing the bug
|
|
59
|
+
| - GREEN: minimal fix
|
|
60
|
+
| - REFACTOR: improvement
|
|
61
|
+
|
|
|
62
|
+
v
|
|
63
|
+
Phase 6: Verification
|
|
64
|
+
| - All tests pass
|
|
65
|
+
| - Regression tests generated
|
|
66
|
+
| - Regression registry updated
|
|
67
|
+
|
|
|
68
|
+
v
|
|
69
|
+
Phase 7: Summary report
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Phase 1: Session Loading
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
┌─────────────────────────────────────────┐
|
|
76
|
+
│ 1. load_session(session_id) │
|
|
77
|
+
│ - Read .recette/sessions/{id}/ │
|
|
78
|
+
│ - Load state.yaml │
|
|
79
|
+
│ - Extract errors (failed) │
|
|
80
|
+
│ - Load associated screenshots/logs │
|
|
81
|
+
└─────────────────────────────────────────┘
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Phase 2: Error Refinement
|
|
85
|
+
|
|
86
|
+
For each detected error:
|
|
87
|
+
|
|
88
|
+
1. Re-read the error screenshot/log from the session
|
|
89
|
+
2. If Chrome MCP is available: reproduce the error to confirm
|
|
90
|
+
3. Analyze source code to identify root cause
|
|
91
|
+
4. Reformulate description with: actual behavior, expected behavior, affected files, suspected root cause
|
|
92
|
+
|
|
93
|
+
**Severity Matrix:**
|
|
94
|
+
|
|
95
|
+
| Error Type | User Impact | Frequency | Severity |
|
|
96
|
+
|------------|-------------|-----------|----------|
|
|
97
|
+
| security | Any | Any | critical |
|
|
98
|
+
| logic | Blocking | Any | critical |
|
|
99
|
+
| logic | Non-blocking | Frequent | high |
|
|
100
|
+
| validation | Blocking | Any | high |
|
|
101
|
+
| validation | Non-blocking | Rare | medium |
|
|
102
|
+
| interaction | Any | Any | high |
|
|
103
|
+
| visual | Major degradation | Any | medium |
|
|
104
|
+
| visual | Cosmetic | Any | low |
|
|
105
|
+
| api | 5xx error | Any | critical |
|
|
106
|
+
| api | Unexpected 4xx | Any | high |
|
|
107
|
+
|
|
108
|
+
### Phase 3: Root Cause Grouping
|
|
109
|
+
|
|
110
|
+
Multiple recette errors can share the same root cause:
|
|
111
|
+
|
|
112
|
+
- Form validation error + message display error = same validation component
|
|
113
|
+
- API error on 3 endpoints = same authentication middleware
|
|
114
|
+
|
|
115
|
+
Grouping creates **one bug story** per root cause instead of one per error.
|
|
116
|
+
|
|
117
|
+
### Phase 4: BMAD Document Generation
|
|
118
|
+
|
|
119
|
+
For each grouped bug:
|
|
120
|
+
|
|
121
|
+
1. Generate bug story from `bug-story.md` template
|
|
122
|
+
2. Add to `.bmad/sprint-status.yaml` with status `ready-for-dev`
|
|
123
|
+
3. If a sprint is active: add to current sprint
|
|
124
|
+
4. Otherwise: add to backlog
|
|
125
|
+
|
|
126
|
+
### Phase 5: TDD Fixing
|
|
127
|
+
|
|
128
|
+
For each bug story (by severity order):
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
┌──────────────────────────────────────────────┐
|
|
132
|
+
│ BUG-001 (critical) │
|
|
133
|
+
│ │
|
|
134
|
+
│ 1. RED : Write test reproducing the bug │
|
|
135
|
+
│ → Execute → MUST fail │
|
|
136
|
+
│ │
|
|
137
|
+
│ 2. GREEN : Minimal code fix │
|
|
138
|
+
│ → Execute → MUST pass │
|
|
139
|
+
│ → All tests → non-regression │
|
|
140
|
+
│ │
|
|
141
|
+
│ 3. REFACTOR : Improve if necessary │
|
|
142
|
+
│ → Generate regression test │
|
|
143
|
+
│ → Update registry │
|
|
144
|
+
│ → Update fix-state.yaml │
|
|
145
|
+
│ │
|
|
146
|
+
│ 4. COMMIT (if --auto-commit) │
|
|
147
|
+
│ fix({module}): {desc} [recette:{session}]│
|
|
148
|
+
└──────────────────────────────────────────────┘
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Test types generated by classification:**
|
|
152
|
+
|
|
153
|
+
| Error Type | Unit Test | Functional Test | Behat Feature |
|
|
154
|
+
|------------|:---------:|:---------------:|:-------------:|
|
|
155
|
+
| logic | X | | |
|
|
156
|
+
| validation | X | X | |
|
|
157
|
+
| api | | X | |
|
|
158
|
+
| interaction | | | X |
|
|
159
|
+
| visual | | | X |
|
|
160
|
+
| security | X | X | |
|
|
161
|
+
|
|
162
|
+
### Phase 6: Verification
|
|
163
|
+
|
|
164
|
+
1. Run all project tests
|
|
165
|
+
2. Verify generated regression tests are in `.recette/regression/tests/`
|
|
166
|
+
3. Verify `.recette/regression/registry.yaml` is up to date
|
|
167
|
+
4. Verify fix-state.yaml reflects correct state
|
|
168
|
+
|
|
169
|
+
### Phase 7: Summary Report
|
|
170
|
+
|
|
171
|
+
Generates a summary report with:
|
|
172
|
+
|
|
173
|
+
- Total number of errors processed
|
|
174
|
+
- Number of grouped bugs (after deduplication)
|
|
175
|
+
- Successful / failed / skipped fixes
|
|
176
|
+
- Regression tests generated
|
|
177
|
+
- Commits made (if `--auto-commit`)
|
|
178
|
+
|
|
179
|
+
## Progress State (fix-state.yaml)
|
|
180
|
+
|
|
181
|
+
```yaml
|
|
182
|
+
# .recette/sessions/{id}/fix-state.yaml
|
|
183
|
+
session_id: "REC-20260130-143022"
|
|
184
|
+
started_at: "2026-01-31T10:00:00"
|
|
185
|
+
status: "in-progress" # pending | in-progress | completed | paused
|
|
186
|
+
|
|
187
|
+
errors:
|
|
188
|
+
total: 8
|
|
189
|
+
grouped: 5
|
|
190
|
+
refined: 5
|
|
191
|
+
fixed: 3
|
|
192
|
+
skipped: 0
|
|
193
|
+
remaining: 2
|
|
194
|
+
|
|
195
|
+
bugs:
|
|
196
|
+
- id: "BUG-001"
|
|
197
|
+
error_ids: ["ERR-001", "ERR-003"]
|
|
198
|
+
severity: critical
|
|
199
|
+
title: "Authentication fails after session timeout"
|
|
200
|
+
story_id: "US-042-bug-001"
|
|
201
|
+
status: "fixed" # pending | refining | documented | fixing | fixed | skipped
|
|
202
|
+
tdd_phase: "refactor"
|
|
203
|
+
fix_commit: "abc1234"
|
|
204
|
+
regression_test: "tests/Functional/Auth/SessionTimeoutTest.php"
|
|
205
|
+
|
|
206
|
+
- id: "BUG-002"
|
|
207
|
+
error_ids: ["ERR-002"]
|
|
208
|
+
severity: high
|
|
209
|
+
title: "Contact form does not display validation errors"
|
|
210
|
+
story_id: "US-042-bug-002"
|
|
211
|
+
status: "fixing"
|
|
212
|
+
tdd_phase: "green"
|
|
213
|
+
fix_commit: null
|
|
214
|
+
regression_test: null
|
|
215
|
+
|
|
216
|
+
current_bug: "BUG-002"
|
|
217
|
+
resume_from:
|
|
218
|
+
bug_id: "BUG-002"
|
|
219
|
+
phase: "green"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Examples
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Fix all bugs from a recette session
|
|
226
|
+
/qa:recette-fix --session=REC-20260130-143022
|
|
227
|
+
|
|
228
|
+
# Dry run: refine and document without fixing
|
|
229
|
+
/qa:recette-fix --session=REC-20260130-143022 --dry-run
|
|
230
|
+
|
|
231
|
+
# Fix only critical and high severity bugs
|
|
232
|
+
/qa:recette-fix --session=REC-20260130-143022 --severity=high
|
|
233
|
+
|
|
234
|
+
# Generate BMAD documents without launching TDD
|
|
235
|
+
/qa:recette-fix --session=REC-20260130-143022 --skip-fix
|
|
236
|
+
|
|
237
|
+
# Fix with automatic commits
|
|
238
|
+
/qa:recette-fix --session=REC-20260130-143022 --auto-commit
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Output Structure
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
.recette/sessions/{session-id}/
|
|
245
|
+
├── state.yaml # Recette session state
|
|
246
|
+
├── fix-state.yaml # Fix progress state
|
|
247
|
+
├── screenshots/ # Error screenshots
|
|
248
|
+
└── logs/ # Detailed logs
|
|
249
|
+
|
|
250
|
+
.bmad/stories/
|
|
251
|
+
├── US-042-bug-001.md # BMAD bug story
|
|
252
|
+
├── US-042-bug-002.md
|
|
253
|
+
└── ...
|
|
254
|
+
|
|
255
|
+
.recette/regression/
|
|
256
|
+
├── registry.yaml # Updated registry
|
|
257
|
+
└── tests/
|
|
258
|
+
├── Unit/
|
|
259
|
+
├── Functional/
|
|
260
|
+
└── Behat/
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Related Commands
|
|
264
|
+
|
|
265
|
+
| Command | Description |
|
|
266
|
+
|---------|-------------|
|
|
267
|
+
| `/qa:recette` | Execute acceptance tests |
|
|
268
|
+
| `/qa:recette-status` | Show session status |
|
|
269
|
+
| `/qa:recette-regression` | View regression tests |
|
|
270
|
+
| `/qa:recette-report` | Generate report |
|
|
271
|
+
|
|
272
|
+
## Error Messages
|
|
273
|
+
|
|
274
|
+
| Error | Solution |
|
|
275
|
+
|-------|----------|
|
|
276
|
+
| "Session not found" | Verify session ID in `.recette/sessions/` |
|
|
277
|
+
| "No errors in session" | Session has no errors to fix |
|
|
278
|
+
| "sprint-status.yaml not found" | Initialize BMAD with `/bmad:init` |
|
|
279
|
+
| "RED test does not fail" | Bug may no longer exist, check manually |
|
|
280
|
+
|
|
281
|
+
## Best Practices
|
|
282
|
+
|
|
283
|
+
1. **Start with dry-run**: Verify refined errors and documents before fixing
|
|
284
|
+
2. **Prioritize by severity**: Start with critical bugs
|
|
285
|
+
3. **Validate groupings**: Verify grouped errors truly share the same cause
|
|
286
|
+
4. **Review stories**: Check generated bug stories before launching TDD
|
|
287
|
+
5. **Use auto-commit**: To keep a clean history of fixes
|
|
@@ -210,6 +210,7 @@ entries:
|
|
|
210
210
|
|
|
211
211
|
| Command | Description |
|
|
212
212
|
|---------|-------------|
|
|
213
|
+
| `/qa:recette-fix` | Fix bugs from a recette session |
|
|
213
214
|
| `/qa:recette-status` | Show session status |
|
|
214
215
|
| `/qa:recette-regression` | View regression tests |
|
|
215
216
|
| `/qa:recette-report` | Generate report |
|