Feature refactor proposal

From fritzprix/libr-agent · View interactive version

Feature refactor proposal is an AI agent skill from the GitHub repository fritzprix/libr-agent. Analyze codebase against new feature requirements, map affected modules and dependencies, identify architectural risks, and propose a structured refactoring and implementation plan before writing code. Use when starting a new feature, planning refactoring, analyzing codebase impact, or reviewing fea

How to use this skill

Skill file

Feature Refactor Proposal

This skill provides a structured methodology for analyzing an existing codebase against new feature requirements, identifying technical debt and risks, and producing a clear refactoring and implementation proposal before writing code.

When to Use

Use this skill when:

Workflow Decision Tree

User provides New Feature Requirements / Issue
  │
  ├── 1. Parse Requirements & Define Boundaries
  │     └─ Identify UI, state, API, and backend scope
  │
  ├── 2. Map Codebase Impact
  │     └─ Locate affected components, hooks, services, types
  │
  ├── 3. Evaluate Risks & Trade-offs
  │     └─ Consult [risk_checklist.md](references/risk_checklist.md)
  │
  ├── 4. Draft Refactoring & Implementation Plan
  │     └─ Use [proposal_template.md](references/proposal_template.md)
  │
  └── 5. Present Proposal & Verification Steps
        └─ Provide phased steps and validation commands

Detailed Steps

Step 1: Requirement Breakdown & Scope Mapping

  1. Extract core requirements and non-goals from the user prompt or issue document.
  2. Categorize requirements by impact layer:

Step 2: Codebase Exploration & Dependency Tracing

  1. Search for relevant existing files using workspace__grepFiles and workspace__globFiles.
  2. Inspect target files with workspace__readFile to understand:
  1. Map component dependencies to anticipate ripple effects when modifying signatures or state.

Step 3: Risk Assessment & Architecture Trade-offs

  1. Load and evaluate against references/risk_checklist.md:
  1. Compare architectural choices (e.g., Option A: Direct Extension vs Option B: Modular Refactoring).

Step 4: Generate Proposal Report

  1. Use the structure provided in references/proposal_template.md.
  2. Document:

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.