skills/request-refactor-plan/SKILL.md
Plan a refactor as a sequence of tiny, working commits via adversarial interview. Default output is a markdown plan at `<project-root>/docs/refactor-plans/<name>.md`; pass `--emit-issue` to also file a GitHub issue. Trigger on structural refactors (rename, extract, move, split, dedupe) — NOT new features.
npx skillsauth add outlinedriven/odin-codex-plugin request-refactor-planInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Adversarial interview to break a refactor into the smallest commits that each leave the codebase green.
Refactor-plan is structural-only and scope-narrow: rename, extract, move, split, merge, dedupe, type-tighten, dependency invert. No behavior change. No new features. No bug fixes bundled in.
For general feature work or behavior change, use general implementation planning. For executing a refactor that intentionally breaks compat, use the break-compat refactor workflow.
Default: write plan to <project-root>/docs/refactor-plans/<kebab-name>.md.
Optional --emit-issue: after writing the file, also file a GitHub issue with gh issue create --body-file <path>.
git grep -l for callsite-adjacent assertions, plus extension-and-glob test discovery: fd -g '*.test.ts' -g '*.spec.ts' (Node), fd -g '*_test.go' (Go), fd -g 'test_*.py' -g '*_test.py' (Python), fd -g '*_test.rs' plus git grep -n '#\[test\]' (Rust), fd -g 'test_*.ml' -g '*_test.ml' (OCaml).--emit-issue was passed, mirror to GitHub.# Refactor: <name>
## Problem
<developer's framing of the pain>
## Solution
<chosen approach in one paragraph>
## Commits
<numbered list; each commit is one concern; each leaves the tree green; plain English, no file paths>
## Decisions
- modules touched
- interfaces modified
- schema/API contract changes
- explicit non-decisions
## Testing
- what counts as a good test (external behavior, not internals)
- modules under test
- prior-art tests in the repo
## Out of scope
<explicit non-goals>
Avoid file paths and code snippets in the plan; both go stale within hours.
TypeScript (Nest module split): "Extract BillingModule from AppModule" decomposes into: (1) move providers, (2) re-export public types, (3) update import sites in batches of 5, (4) delete dead re-exports. Each commit passes pnpm typecheck && pnpm test.
Rust (crate carve-out): "Split parser from core crate" decomposes into: (1) add new parser crate skeleton, (2) move types with pub use shim, (3) move impls behind shim, (4) flip downstream use paths, (5) delete shim. Each commit passes cargo check --workspace && cargo test.
testing
ODIN's compress-operations dispatcher under the Compressor/Extender role. Invoke on "tidy", "clean up", "tidy this file/memory/workspace/git/docs", or when active context (current file, diff, stack, memory directory) has structural rot to resolve before touching behavior. Detects target domain from context and routes to the sibling skill. Requires explicit target or clear active-context signal — do not invoke speculatively.
development
Cross-domain taste skill — apply distinctive judgment to any artifact (prose, code, design, decisions) instead of converging to AI defaults. Two modes — `audit` (judge work against the two-sided charter and portable anchors) and `anchor` (load register before producing). Auto-detects by phrasing; override via `/taste audit | anchor`. Trigger on "is this slop?", "overkill?", "elegant?", "taste-test this".
tools
One-shot bootstrap of strict-mode tooling per ecosystem plus per-task GOALS.md scaffolding so an agentic loop can self-verify. Writes typechecker/linter/schema-validator config for TS (strict + noUncheckedIndexedAccess + exactOptionalPropertyTypes), Python (Pyright strict, Ruff strict), Rust (Clippy deny-correctness), Go (golangci-lint with staticcheck), OCaml (dune --release); establishes `.agent-tasks/<id>/GOALS.md` per-task convention distinct from project-stable AGENTS.md. C++/Java/Kotlin and framework specifics (Spring Boot, Nest, React-strict) are out of scope. Trigger on new project bootstrap, agentic-task setup, "make this self-verifying", "set the loop's goal", "scaffold goals for this issue". Pairs with `llm-self-loop` runtime.
tools
Install git pre-commit hooks via the project's hook tool — Husky+lint-staged (JS), pre-commit (Python/OCaml), lefthook (Go), cargo-husky (Rust). Use when the user wants commit-time formatting, linting, type-checking, or test gates. Detects ecosystem first.