rd13_media_wiki/.github/prompts/refactor.prompt.md
Conrad Schulz 2a72e08c13 chore: add GitHub Copilot AI config (instructions, prompts, vscode settings)
- Add .github/copilot-instructions.md with project-specific context
- Add .github/prompts/ with 9 reusable agent prompt files
- Add .vscode/extensions.json recommending copilot extensions
- Update .vscode/settings.json with rulers and YAML schema
- Remove tracked .DS_Store
2026-05-30 10:55:16 +00:00

33 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
mode: agent
description: Refactoring Code verbessern ohne Verhalten zu ändern
tools:
- codebase
- editFiles
- problems
---
# Refactoring
**Ziel:** ${input:target:Was soll refactored werden und warum?}
## Grundregeln (nicht verhandelbar)
- **Kein Behavior-Change** Tests müssen vorher und nachher grün sein
- Scope klar definieren nichts außerhalb des Ziels anfassen
- Inkrementell vorgehen nach jedem Schritt kompilierbar/lauffähig
## Was ist erwünscht?
Wähle was zutrifft (oder beschreibe selbst):
- Lesbarkeit verbessern (Naming, Struktur)
- Duplizierung eliminieren (DRY)
- Komplexität reduzieren (Cyclomatic Complexity)
- Performance-kritischen Pfad optimieren
- Testbarkeit erhöhen (Dependency Injection, Pure Functions)
## Prozess
1. Analyse: Aktuelle Probleme konkret benennen
2. Plan: Welche Änderungen in welcher Reihenfolge
3. Durchführung: Schrittweise, jeder Schritt single-purpose
4. Verifikation: `problems`-Tool, kein roter Code
Nach dem Refactoring: diff-Zusammenfassung mit Begründung für jede wesentliche Änderung.