# Refactoring Schedule Optimizer AI Agent Connect

> Strategic decision-support for balancing technical debt reduction with feature delivery.

## Overview
- **Category:** productivity
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_pzerB0VshtZtgQgpNplBYtZEIiWQEdRGmEAaaKCr/ai-agent-connect
- **Tags:** refactoring, technical-debt, planning, velocity, capacity-planning

## Description

This MCP server provides a strategic decision-support system to calculate the optimal timing for software refactoring. It balances technical debt reduction against feature delivery requirements and team capacity. Using tools like `find_optimal_schedule`, `analyze_cost_benefit`, `assess_refactoring_risk`, and `calculate_capacity_availability`, engineering leaders can determine the best sequence of tasks, perform cost-benefit analyses, and assess the risks of delaying critical fixes. It is designed to help teams maximize long-term velocity while managing immediate business pressure.

## Tools

### calculate_capacity_availability
Calculates the remaining engineering headroom after accounting for feature pressure

### assess_refactoring_risk
Evaluates the danger of delaying refactoring

### analyze_cost_benefit
Compares the cost of performing refactoring against the savings in development velocity

### find_optimal_schedule
Determines the best sequence and timing for refactoring tasks

## Prompt Examples

**Prompt:** 
```
What is the best refactoring schedule for my team with 100 units of capacity and 0.3 delivery pressure?
```

**Response:** 
```
Based on your capacity and pressure, the optimal schedule prioritizes the 'Database Migration' and 'API Refactor' tasks to maximize velocity recovery.
```

**Prompt:** 
```
Calculate the cost-benefit for debt items: [{"id": "debt-1", "cost": 500, "impact": 0.2}]
```

**Response:** 
```
The net benefit for debt-1 is 1200 units, with an estimated payback period of 4 weeks.
```

**Prompt:** 
```
How much capacity do I have left if my total capacity is 50 and delivery pressure is 0.5?
```

**Response:** 
```
Your available capacity is 25 units after accounting for the 0.5 delivery pressure impact.
```

## Frequently Asked Questions

**How does the tool determine the best refactoring sequence?**
The `find_optimal_schedule` tool prioritizes debt items that have a high velocity impact relative to their remediation cost, ensuring the most efficient use of team capacity.

**Can I evaluate the economic impact of specific technical debt?**
Yes, you can use `analyze_cost_benefit` to compare the remediation cost against the long-term savings in development velocity.

**How is risk calculated for unaddressed debt?**
The `assess_refactoring_risk` tool calculates a risk score that increases as velocity impact and the delay factor grow, helping identify critical thresholds.
