Skip to content
rd-skills
All skills

refactoring

FoundationJIT only

analysis-agent/review-agent: use when splitting, merging, moving, or deleting code while preserving behavior; skip behavior-changing implementation.

Group
Engineering workflow
Supported roles
MainAnalysisTaskReview
Source
SKILL.md

Use when

Trigger signals that make this skill the right owner

  • placement and ownership are fixed while code moves splits merges or deletes with behavior preserved
  • actual diff duplicate helper consolidation private class move or structural relocation requires characterization and rollback proof

Do not use when

Anti-triggers — as binding as the triggers above

  • no task-local refactoring decision is required
  • existence pattern placement module ownership or behavior change remains unresolved

Required inputs

What must be supplied before this skill can decide anything

  • fixed destination and owner
  • observable behavior and characterization evidence
  • selected primary Professional Skill and task-local trigger

Output contract

What this skill owes the next role

  • refactoring decision with preserved-behavior boundary, characterization evidence, reversible structural steps, dependency and ownership effects, accepted deletion decision and preservation evidence, rollback limits, and residual risks

Escalation signals

When this skill must hand the decision back

  • Refactors without safety checks or cleanup exits cause unintended behavior changes permanent compatibility debt unreadable split structures reckless file merges hidden side effects and broken public contracts

Loaded by

This skill never owns a task. These professionals may pull it in as Layer 3.

Targeted references

Each reference carries its own load condition. None of them enter context by default.

ReferenceLoad whenDo not load whenRequired by
behavior-preservation-evidence.mdevidence-patternthe change claims behavior preservation across a structural rewritethe task intentionally changes externally observable behaviorReviewAnalysis
checklist.mddecision-checkliststructural change affects observable behavior contracts ownership steps or rollbacksimple local rename preserves behavior and all public boundariesReviewAnalysis
split-merge-cleanup-patterns.mdbenchmark-patternthe diff splits merges relocates responsibilities or must sequence an accepted deletion decisiondeletion readiness is unresolved or no structural cleanup or ownership change is proposedReviewAnalysis