|
| 1 | +--- |
| 2 | +name: Agent Refactoring Task |
| 3 | +about: Code refactoring for AI agents (optimized for agent mode) |
| 4 | +title: '[REFACTOR] ' |
| 5 | +labels: refactor, agent-task |
| 6 | +assignees: '' |
| 7 | +--- |
| 8 | + |
| 9 | +## Refactoring Goal |
| 10 | + |
| 11 | +**What to improve and why**: |
| 12 | + |
| 13 | +**Current problem**: |
| 14 | + |
| 15 | +**Desired state**: |
| 16 | + |
| 17 | +## Contracts (Do NOT Break) |
| 18 | + |
| 19 | +**What must remain unchanged**: |
| 20 | + |
| 21 | +- [ ] Public API contracts (interfaces, function signatures) |
| 22 | +- [ ] Existing test behavior |
| 23 | +- [ ] External integrations |
| 24 | +- [ ] User-facing behavior |
| 25 | + |
| 26 | +## Acceptance Criteria |
| 27 | + |
| 28 | +- [ ] Refactoring goal achieved |
| 29 | +- [ ] All existing tests still pass (no regressions) |
| 30 | +- [ ] Golden tests unchanged (if applicable) |
| 31 | +- [ ] `make validate` passes |
| 32 | +- [ ] Code coverage maintained or improved |
| 33 | +- [ ] Documentation updated |
| 34 | + |
| 35 | +## Refactoring Strategy |
| 36 | + |
| 37 | +**Approach to take**: |
| 38 | + |
| 39 | +1. Step 1 |
| 40 | +2. Step 2 |
| 41 | +3. Step 3 |
| 42 | + |
| 43 | +**Files to modify**: |
| 44 | + |
| 45 | +- |
| 46 | +- |
| 47 | +- **Tests to verify**: |
| 48 | + |
| 49 | +- |
| 50 | +- |
| 51 | +- |
| 52 | + |
| 53 | +## Safety Checks |
| 54 | + |
| 55 | +**Before making changes**: |
| 56 | + |
| 57 | +- [ ] Run full test suite (baseline) |
| 58 | +- [ ] Identify all consumers of code being refactored |
| 59 | +- [ ] Document current contracts |
| 60 | +- [ ] Create golden tests if none exist |
| 61 | + |
| 62 | +**After making changes**: |
| 63 | + |
| 64 | +- [ ] All tests still pass |
| 65 | +- [ ] No change in test coverage |
| 66 | +- [ ] Golden tests match (no behavior change) |
| 67 | +- [ ] Manual verification of affected features |
| 68 | + |
| 69 | +## Context |
| 70 | + |
| 71 | +**Related code**: |
| 72 | + |
| 73 | +- Files to refactor: |
| 74 | +- Tests to preserve: |
| 75 | +- Consumers to verify: |
| 76 | +- Related issues: |
| 77 | + |
| 78 | +## Benefits |
| 79 | + |
| 80 | +**What improves**: |
| 81 | + |
| 82 | +- Performance: |
| 83 | +- Maintainability: |
| 84 | +- Readability: |
| 85 | +- Testability: |
| 86 | +- Other: |
| 87 | + |
| 88 | +## Risks |
| 89 | + |
| 90 | +**Potential issues to watch for**: |
| 91 | + |
| 92 | +- Risk 1: |
| 93 | +- Risk 2: |
| 94 | +- Mitigation strategy: |
| 95 | + |
| 96 | +## Definition of Done |
| 97 | + |
| 98 | +- [ ] Refactoring complete |
| 99 | +- [ ] All existing tests pass (no regressions) |
| 100 | +- [ ] Golden tests unchanged |
| 101 | +- [ ] Code coverage >= baseline |
| 102 | +- [ ] `make validate` passes |
| 103 | +- [ ] Documentation updated |
| 104 | +- [ ] Benefits validated (performance, etc.) |
| 105 | +- [ ] No contracts broken |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +**Agent Guidelines**: Read [AGENTS.md](../../AGENTS.md) before starting. |
| 110 | +Refactoring MUST NOT break contracts. Run tests before and after. Golden tests |
| 111 | +are your regression safety net. |
0 commit comments