Skip to content

feat(pst:refactor): standalone Fowler smell pass + refactor commit skill#67

Merged
pstaylor-patrick merged 2 commits into
mainfrom
feat/pst-refactor-skill
Jun 21, 2026
Merged

feat(pst:refactor): standalone Fowler smell pass + refactor commit skill#67
pstaylor-patrick merged 2 commits into
mainfrom
feat/pst-refactor-skill

Conversation

@pstaylor-patrick

Copy link
Copy Markdown
Owner

Summary

  • New /pst:refactor skill: standalone Fowler maintainability smell pass
  • Mirrors rule 23 as an explicit on-demand invocation (invoke at any time, independent of current feature work)
  • Haiku detects smells against the 16-smell rubric in MAINTAINABILITY.md
  • Plan gate (AskUserQuestion) before implementation
  • Sonnet implementer runs in an isolated worktree, produces a behavior-preserving refactoring commit (two hats per rule 15)
  • Input modes: path/glob, --diff, --staged, or auto-detect via pst-smell.rb
  • --report-only flag skips implementation
  • Wired into install.sh SKILLS array

Test plan

  • ls ~/.claude/commands/pst:refactor.md points to repo SKILL.md after reinstall
  • Invoking /pst:refactor with no args on a dirty working tree detects smells
  • --report-only stops after smell listing, no implementer spawned

🤖 Generated with Claude Code

https://claude.ai/code/session_019BCr5Qxi8jXnG2Rr7zdkw1

pstaylor-patrick and others added 2 commits June 21, 2026 05:51
…tor commit

Standalone /pst:refactor skill that applies the 16-smell rubric from
MAINTAINABILITY.md against a diff, file, or glob. Mirrors rule 23 as
an explicit on-demand invocation: Haiku detects smells, presents findings,
then optionally spawns a Sonnet implementer in an isolated worktree to
apply behavior-preserving fixes as a separate refactoring commit (two hats).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019BCr5Qxi8jXnG2Rr7zdkw1
…parallel Sonnet fixers

- Scope changed: default is entire codebase, not current diff
- Analysis tier changed: Opus (was Haiku) -- whole-codebase maintainability
  audit warrants deep reasoning
- Implementation: parallel Sonnet agents per file in isolated worktrees
- Fix adversarial findings: correct MAINTAINABILITY.md path (one .., not two),
  explicit git add+commit in implementer instructions, remove invalid effort
  param, fix --report-only handling, remove pst-smell.rb dependency
- Co-author trailer included in implementer commit instructions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019BCr5Qxi8jXnG2Rr7zdkw1
@pstaylor-patrick pstaylor-patrick merged commit a985c00 into main Jun 21, 2026
1 check passed
@pstaylor-patrick pstaylor-patrick deleted the feat/pst-refactor-skill branch June 21, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant