From f332b2169d47d0c7bb9847e4ecf299197803c860 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 26 May 2026 13:34:18 -0500 Subject: feat(commands): let the agent invoke codify, refactor, and respond-to-cj-comments I dropped disable-model-invocation from these three commands, the same one-line change I made to start-work. They were user-only, so the agent couldn't run them as a workflow step. Now the agent can invoke them through the Skill tool and I can still type the slash command. The remaining flagged commands stay user-only for now. --- .claude/commands/refactor.md | 1 - 1 file changed, 1 deletion(-) (limited to '.claude/commands/refactor.md') diff --git a/.claude/commands/refactor.md b/.claude/commands/refactor.md index ce3aaaa..08cbdab 100644 --- a/.claude/commands/refactor.md +++ b/.claude/commands/refactor.md @@ -1,7 +1,6 @@ --- description: Scan code for refactoring opportunities or perform a targeted refactor. Six modes — `full` (default; complexity + duplication + dead-code scans), `quick` (high-severity findings only), `complexity` (length / nesting / cyclomatic / parameter count / boolean ops with severity bands and techniques like guard clauses, extract method/predicate, parameter object, decompose conditional), `duplication` (clones / logic / constants / patterns / error-handling with extract-function / parameterize / template-method strategies), `dead-code` (imports / exports / branches / feature flags / deps with high/medium/low confidence labels), `rename old new` (codebase-wide symbol rename with reference search, preview gate, atomic commit, post-apply verification). Findings render as `[SEVERITY] Category — File / Metric / Issue / Suggestion` blocks plus a summary table and quick-wins. Structure-only — no feature work mixed in, no auto-apply without confirmation, characterization tests first when coverage is missing, small focused commits. Use for cleanup or wide renames. Do NOT use for behavior changes (`fix:` or `feat:`, not refactor), green-field design (use `/arch-design`), or single-symbol single-file renames (just edit). Companion to `/add-tests` for the characterization-test prereq. argument-hint: "[scope: full|quick|complexity|duplication|dead-code|rename old new]" -disable-model-invocation: true --- # /refactor — Code Refactoring Skill -- cgit v1.2.3