← ClaudeAtlas

oc-refactorlisted

Behavior-preserving refactor, plus read-only lens, impact, and tooling modes. Trigger: refactor, refactorizar, code smells, limpiar código, legacy code.
andresnator/agents-orchestrator · ★ 0 · Code & Development · score 66
Install: claude install-skill andresnator/agents-orchestrator
# Refactor ## Intent - **Goal:** Improve code structure without a change to observable behavior, or return one read-only analysis that a mode below defines. - **Limits:** - Cover, then modify. Do not change code that tests do not cover. If coverage is too expensive, make the step smaller or add a hardening task first. - Keep behavior-preserving work and functional change in different steps. Record a bug that you find as follow-up work. Do not fix it in the refactor. - Analysis modes (`lens`, `impact`, `tooling`) are read-only. They do not edit, ask, delegate, or fetch. - Do not refactor across a bounded-context boundary. - **Fails if:** observable behavior changes; a public contract changes silently; a claim has no `file:line` and no `hypothesis` mark; a characterization test asserts desired behavior instead of current behavior. ## Context - **Reads:** the target, its callers and tests, and build files in or above the target scope. - **Never reads:** code that the change cannot affect; web sources. - **Scope:** refactor requests in any language; `oc-plan` deep-mode briefs; `oc-arch` (`kiss` lens). ## Expectations - **Scenarios:** - WHEN the target has no sufficient tests THEN write characterization tests for the touched zone first, in a dedicated test file per unit (per `oc-conventions`). Find seams and break dependencies minimally before structural change. - WHEN the language is Java THEN use only APIs that the detected Java version supports, and keep check