← ClaudeAtlas

cc-refactorlisted

Run the refactor workflow — mandatory architectural justification, test verification, risk-based implementation, and scope enforcement.
lgzarturo/codeconductor · ★ 0 · AI & Automation · score 70
Install: claude install-skill lgzarturo/codeconductor
# Refactor Workflow Refactor description: $ARGUMENTS Describe what you want to refactor and why. Include: - The current structure or pattern being changed - The target structure or pattern - The motivation (performance, readability, architectural alignment, etc.) - Known risk areas or dependencies --- ## Prerequisite — Test coverage check Before any agent is invoked, verify that the code being refactored has adequate test coverage. A refactor without tests is not a refactor — it is a rewrite with unknown behavioral consequences. If coverage is insufficient: 1. **STOP**. Report the coverage gap to the human. 2. Suggest invoking `/cc:test-plan` first to establish coverage. 3. Do not proceed with the refactor until coverage is confirmed. --- ## Step 1 — Architectural justification (architect) Always invoke `architect` first, regardless of risk level. A refactor without a written justification is scope creep in disguise. architect must produce a Refactor Plan that includes: - Statement of the problem with the current structure - Proposed target structure and rationale - Affected files and module boundaries - Risk level: `low`, `medium`, or `high` - Behavioral invariants that must not change - Open questions requiring human input **Scope creep warning:** If during planning architect identifies unrelated improvements, they must be listed separately as "Out of scope." They are not part of this refactor. **STOP here. Show the Refactor Plan and wait for explicit human