diff options
| author | Arpit Chakladar <arpit@chakladar.me> | 2026-09-29 23:45:25 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpit@chakladar.me> | 2026-09-29 23:45:25 +0530 |
| commit | 33519df0fff478526d217d04190577b33c5bf7d0 (patch) | |
| tree | 18f6ee9bb8101381212038d16099e59d250b7080 /modules/development/pi-coding-agent/skills/refactoring | |
| parent | 7975de6d03289bcc143137d5458486def5adc672 (diff) | |
| parent | 871a29efd370088f669c4f2b9e20b8992406a444 (diff) | |
| download | home-manager-config-33519df0fff478526d217d04190577b33c5bf7d0.tar.gz home-manager-config-33519df0fff478526d217d04190577b33c5bf7d0.zip | |
Merge branch 'adding-pi-harness'
Diffstat (limited to 'modules/development/pi-coding-agent/skills/refactoring')
| -rw-r--r-- | modules/development/pi-coding-agent/skills/refactoring/SKILL.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/modules/development/pi-coding-agent/skills/refactoring/SKILL.md b/modules/development/pi-coding-agent/skills/refactoring/SKILL.md new file mode 100644 index 0000000..09f01fa --- /dev/null +++ b/modules/development/pi-coding-agent/skills/refactoring/SKILL.md @@ -0,0 +1,40 @@ +--- +name: refactoring +description: "Explicitly preserve behavior while improving structure; identify unnecessary abstraction and avoid scope creep." +--- + +# Refactoring Skill + +Explicitly preserve behavior while improving structure; identify unnecessary abstraction and avoid scope creep. + +## Subagents +When you need to delegate sub‑tasks, use the `pi-subagents` skill. + +**Example:** When refactoring a legacy module, use a **scout** to identify all call sites of the `legacy::utils` functions, another **scout** to map the test coverage for each, and an **implementer** to inline or replace them incrementally while a **reviewer** ensures behavior is preserved. + +*You may adapt the delegation pattern to fit the exact requirements of the codebase.* + +## Principles + +### Preserve Behavior +- Run tests before and after +- Make incremental changes +- Verify at each step + +### Improve Structure +- Reduce duplication +- Clarify intent +- Improve modularity + +### Avoid Scope Creep +- One refactoring at a time +- No new features +- No style-only changes in same commit + +### Identify Unnecessary Abstraction +- Remove unused interfaces +- Inline single-use functions +- Flatten deep hierarchies + +### Run tools +- Use refactoring tools like formatters/linters when available |
