jr-refactor

Orchestrate code refactoring workflows with guardian routing to preserve behavior.

3|1|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/rusi/junior --skill jr-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jr-refactor
Source: https://github.com/rusi/junior/tree/main/agents/skills/jr-refactor
Command: npx skills add https://github.com/rusi/junior --skill jr-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Intelligent, adaptive refactoring workflows with guardian routing to improve code quality without changing behavior.

Core Features & Use Cases

  • Adaptive workflow orchestration for deterministic small changes and contract-style approaches for complex refactors.
  • Guardian routing to detect potential feature or bug fixes disguised as refactors and guide the correct workflow.
  • Structured planning, risk assessment, and test-preservation to ensure regression-free improvements.

Quick Start

To begin, invoke /jr-refactor with a clearly defined scope of files to refactor.

Frequently Asked Questions about jr-refactor

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

FAQPage Schema
How do I refactor code without changing behavior?

Behavior-preserving refactoring requires structured planning, risk assessment, and test-preservation checks. By routing tasks through adaptive workflows, you can execute architecture-level improvements and library migrations while ensuring regression-free code quality enhancements.

How do I reduce technical debt across a software project?

To reduce technical debt across a software project, orchestrate code refactoring tasks using adaptive workflows and guardian routing. This approach ensures structural improvements and library migrations are executed with traceable contracts and automated checks.

What is guardian routing in code refactoring?

Guardian routing is a mechanism that detects hidden feature changes or bug fixes disguised as refactors, guiding them to the correct workflow. It ensures behavior preservation by separating deterministic small changes from complex contract-style approaches.

Can I use automated workflows for library migrations?

Yes, adaptive workflow orchestration supports library migrations across a project by applying contract-style refactoring and automated checks. This ensures the migration reduces technical debt without altering user-facing behavior.

What is the best way to plan complex refactoring tasks?

The best way to plan complex refactoring tasks is using an adaptive workflow with structured risk assessment and traceable contracts. This approach separates deterministic small changes from contract-style refactors, ensuring test-preservation and regression-free improvements.