refactor-radar

Ranks refactor and test-debt candidates using git churn, complexity metrics, and evidence validation gates.

6|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/greglas75/zuvo --skill refactor-radar-greglas75
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-radar
Source: https://github.com/greglas75/zuvo/tree/main/skills/refactor-radar
Command: npx skills add https://github.com/greglas75/zuvo --skill refactor-radar-greglas75

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Deciding which parts of a codebase are worth refactoring is often guesswork based on intuition or raw complexity numbers. This Skill produces an evidence-backed, ranked triage of refactor and test-debt candidates using immutable git measurements, so teams can decide WHAT to change before committing to HOW. ## Core Features & Use Cases - Deterministic discovery: Scans a git repository at a frozen commit SHA, combining cyclomatic complexity, fix-commit churn, and configurable criticality weights into a ranked candidate list saved as JSON and a Markdown report. - G1–G5 validation gates: Each candidate is checked for usage/intent, availability (PR and worktree collisions), cohesion, test verification, and bounded change scope, producing decision states like READY, TEST_FIRST, OBSERVE, BUSY, or DELETE_CANDIDATE. - Farm offloading and CodeSift integration: Large repositories can be measured on a remote farm via prepared snapshots, and verified CodeSift envelopes can replace the builtin complexity engine. - Use Case: Point the Skill at a monorepo before a refactoring sprint; it saves a discovery report ranking module families by confirmed pain and criticality, with concrete seams, invariants, and test pointers for each handoff card. ## Quick Start Ask the assistant to run refactor-radar discovery on the current repository and save a ranked report of the top refactor candidates.

Frequently Asked Questions about refactor-radar

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find which files to refactor first in a large repository?

Run the refactor-radar discovery scan, which ranks module families by cyclomatic complexity multiplied by fix-commit churn and a criticality weight. It saves a discovery.json with all rows and a compact report.md with validated handoff cards for the top candidates.

How to detect dead code before deleting it?

The G1 gate requires tracing product entry points and declared API consumers; an empty references report alone does not prove dead code. Deletion candidates need independent non-use evidence plus product-intent confirmation, and actual deletion requires a separately approved execution contract.

Does refactor-radar modify my source code?

No. DISCOVER mode only reads code and git metadata, then saves a ranked report and raw JSON. It never edits product code, creates queues, or commits; execution is a separate request routed to a dedicated refactor skill.

Can I scan a repository larger than 1000 files?

Yes, but local analysis is refused above 1,000 source and test files. Use the --prepare-farm workflow to export an immutable snapshot and run measurement on a farm worker through the rt runner, then retrieve the report locally.

What is the difference between the builtin and CodeSift engines?

The builtin engine uses Python stdlib AST for Python and bounded regex estimates for TS/JS/PHP/Kotlin. The CodeSift engine requires a verified envelope attesting source SHA, completeness, and scope; their raw complexity scores must never be compared directly.

Why does a candidate show BUSY or UNKNOWN availability?

Availability reflects current PR, worktree, and contract collisions. Exact path overlap with active work yields BUSY, while failed or skipped provider checks yield UNKNOWN; only validated FREE rows can become READY.