differential-feature-refactor

Produces a differential document comparing current code against authorized design intent before scoping a refactor.

2|Updated Jul 18, 2026
One-click install
npx skills add https://github.com/Arasz/ai-badger --skill differential-feature-refactor-arasz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: differential-feature-refactor
Source: https://github.com/Arasz/ai-badger/tree/main/features/common/skills/differential-feature-refactor
Command: npx skills add https://github.com/Arasz/ai-badger --skill differential-feature-refactor-arasz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? When a feature has drifted from its intended design — parallel implementations, code that looks dead but may be a ratified extension point, or architecture buried under accumulated cruft — teams risk deleting live integration paths or scoping refactors off proposals instead of decisions. This Skill reconciles what exists in the tree against what ADRs, requirements, and rulings actually authorize before any refactor is planned. ## Core Features & Use Cases - Authority-first analysis: Collects ADRs, FR/NFR requirements, and recorded rulings before reading implementation code, and never infers design intent from code shape. - Differential document generation: Writes a dated have-vs-will-have document from a fixed template, with every current-state claim carrying a path:line citation or an [UNVERIFIED] marker, plus four Mermaid flow views (architecture, data, logic, integration). - Structured decision collection: Raises undefined points as greppable UP blocks with exactly three propositions each, collected via a generated review form (or <answer> fallback blocks), then produces a refactor specification and implementation plan. - Use Case: Two parallel implementations of the same ingest path exist and nobody knows which is intended. Run this Skill to ground both in the tree, surface the unrecorded decision as an undefined point, get a human ruling, and turn the verdict into a refactor spec and plan. ## Quick Start Use the differential-feature-refactor skill to reconcile the feed-monitoring feature's two parallel implementations against its ADRs and produce a differential document with undefined points for my review.

Frequently Asked Questions about differential-feature-refactor

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

FAQPage Schema
How do I refactor a feature that has drifted from its original design?

Start by collecting the ADRs, requirements, and rulings that govern the feature before reading any code. Then document current state with path:line citations, raise undefined points where no decision authorizes what exists, collect human rulings, and only then write the refactor specification and plan.

How to tell dead code from a ratified extension point?

You cannot tell from code shape alone — no callers is evidence about wiring, not intent. Only an ADR, requirement, or recorded ruling authorizes calling something dead; otherwise mark it as an undefined point and get a human decision before deleting anything.

What is a differential document in refactoring?

A differential document is a dated, side-by-side record of what the code currently does versus what authorized decisions say it should do. It includes cited current-state claims, four Mermaid flow views, and inline undefined-point blocks, and it feeds a refactor specification and implementation plan.

Can I use a plan or review document as the target state for a refactor?

No. Plans and review documents are proposals, not authority. Only ADRs, FR/NFR requirements, or recorded rulings authorize a target state; anything else must be marked [UNVERIFIED] and raised as an undefined point for a human ruling.

When should I not use the differential refactor approach?

Do not use it for genuinely new sub-features with no existing code — hand those to a specification skill instead. It is designed for features that already exist in the tree but have drifted from, or were never reconciled with, their intended design.