rd13_copilot_setup/prompts/refactor.prompt.md
Conrad Schulz 9838c7a0b3 feat: initial copilot workspace setup
- User settings.json with 9 senior-dev behavior rules
- 9 prompt files: requirements, architecture, new-feature, code-review,
  debug, refactor, write-tests, done-check, docker
- git-templates for .github/ and .vscode/ auto-copy on git init
- deploy.sh (macOS/bash) and deploy.fish (Linux/fish) scripts
- copilot-bootstrap.fish for existing/cloned repos
2026-05-29 08:19:50 +00:00

33 lines
1.1 KiB
Markdown
Raw Permalink 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.