analyzing-codebases
Detects project languages and monorepo state, runs language-appropriate static analysis (dependency graph, complexity, duplication, semantic patterns), and…
Converts a refactor map into a phased plan using parallel-change, branch-by-abstraction, or strangler fig patterns. Use when user has approved the refactor map from analyzing-codebases.
$ npx -y skills add wayne930242/Reflexive-Claude-Code --skill planning-refactors --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/planning-refactorsContext preview
The summary Claude sees to decide when to auto-load this skill.
Converts a refactor map into a phased plan using parallel-change, branch-by-abstraction, or strangler fig patterns. Use when user has approved the refactor map from analyzing-codebases.
name: planning-refactors description: Converts a refactor map into a phased plan using parallel-change, branch-by-abstraction, or strangler fig patterns. Use when user has approved the refactor map from analyzing-codebases.
**Planning refactors IS producing phased, always-green, bounded-size plans from the refactor map.**
Each phase is one commit: expand, migrate, or contract. Every phase has a verification hook (tests pass, specific metric improved). Phases never exceed 400 LOC predicted diff.
**Core principle:** Small reversible phases beat big irreversible restructures.
**Pattern:** Chain **Handoff:** user-confirmation **Next:** `scaffolding-characterization-tests`
**Tasks:** 1. Parse refactor map 2. Select top 1-3 hotspots to target this run 3. For each hotspot, pick a pattern (parallel-change / BBA / strangler) 4. Decompose each into phases with LOC estimates 5. Identify characterization test needs per phase 6. Write refactor plan 7. Present to user for approval
Read `.rcc/{ts}-refactor-map.md`. Validate all required sections present (per schema). Missing → abort and tell user to rerun analyzing.
Default: top 3 hotspots. Exceptions:
Per target, decide based on these rules (see `references/patterns.md` for full criteria):
For each phase:
For each phase touching untested code, mark `must-scaffold` and specify:
Write `.rcc/{ts}-refactor-plan.md` per schema in `references/refactor-plan-schema.md`.
Print summary: targets selected, patterns chosen, total phases, estimated total LOC, high-risk count. Ask user: `approve` / `adjust targets` / `change patterns` / `abort`.
Approved → hand off to `scaffolding-characterization-tests`. Dry-run mode: stop here, print plan, exit.
| Thought | Reality | |---------|---------| | "Combine expand + migrate for efficiency" | Parallel-change requires separation for rollback safety. | | "Characterization test optional, user will review" | Research: untested code during refactor is top failure mode. | | "Top 5 hotspots fits in one run" | 400 LOC ceiling × 3 targets ≈ safe per-run budget. | | "Skip cycle-break, deal with it later" | Cyclic deps compound. Break first. |
A Claude Code plugin marketplace for skills-driven Agentic Context Engineering (ACE) — build, analyze, and maintain agent systems with structured workflows.
Repo: wayne930242/Reflexive-Claude-Code
Detects project languages and monorepo state, runs language-appropriate static analysis (dependency graph, complexity, duplication, semantic patterns), and…
Executes a refactor plan phase-by-phase on a dedicated branch with per-phase commits and mandatory reviewer checkpoints. Use when characterization-tests…
Writes AGENTS.md per subproject, archives run artifacts, and suggests rcc handoff conditionally. Use when verifying-refactors passes (PASS or…
Adds golden/snapshot tests to untested hotspot modules before refactoring. Use when refactor plan marks any phase with…
Validates hard structural rules (no cycles, file/fn line caps, cognitive/cyclomatic complexity) and runs mutation testing on touched modules. Use when…
Validates component-type choices for agent system work, classifying knowledge as CLAUDE.md vs rule vs skill vs agent vs hook and checking for conflicts. Use…