What problem does it solve? Refactoring a codebase safely requires a deep, evidence-backed understanding of its structure, but manually auditing architecture, duplicates, dead code, and dependency direction is slow and error-prone. This Skill produces an implementation-ready refactor plan that another coding agent can execute step by step without re-discovering the codebase. ## Core Features & Use Cases - Planning-only safety guarantee: Reads and statically analyzes the repository but never modifies, moves, renames, or deletes source, tests, or config — safe to run on any repo at any time. - Two executable artifacts: Writes REFACTOR_PLAN.md (14-section human-readable plan) and REFACTOR_BACKLOG.json (machine-readable task DAG with dependencies, duplicates, and risky areas) at the repo root. - Evidence-based analysis: Every finding cites a real path, symbol, or command — covering architecture, circular dependencies, god modules, dead code, test gaps, and config sprawl. - Two execution modes: Inline analysis for small/medium repos, or a multi-agent dispatcher (tools/refactor_planner.ts) with dry-run preview, per-agent context packs, and backlog validation for large repos. - Use Case: Point it at a legacy monorepo before a restructuring effort; it inventories the tree, discovers the real test/build commands from manifests, and outputs a phased, file-by-file plan whose first recommended PR is small and low-risk. ## Quick Start Ask the agent to run stark-refactor-plan against the current repository to produce REFACTOR_PLAN.md and REFACTOR_BACKLOG.json without changing any source files.