Luigit
repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by admin

pi/agent/prompts/refactor.md

Raw
Rendered preview

description: Refactor code safely argument-hint: ""

Refactor code safely

Target: $ARGUMENTS

  1. Analyze - Understand current structure
  2. Plan - List refactoring steps
  3. Tests - Ensure coverage before changes
  4. Refactor - Apply changes incrementally, adhering to brutal code style
  5. Verify - Run tests after each step

Common patterns: extract function, remove duplication, simplify conditionals.

---
description: Refactor code safely
argument-hint: "<file-or-directory>"
---

# Refactor code safely

**Target**:
$ARGUMENTS

1. **Analyze** - Understand current structure
2. **Plan** - List refactoring steps
3. **Tests** - Ensure coverage before changes
4. **Refactor** - Apply changes incrementally, adhering to brutal code style
5. **Verify** - Run tests after each step

Common patterns:
extract function, remove duplication, simplify conditionals.