---
title: "Refactoring Plans"
method: GET
path: "/snapshots/{snapshot_id}/health/refactoring-plans"
tags: ["code-health"]
---

# Refactoring Plans

`GET /snapshots/{snapshot_id}/health/refactoring-plans`

Deterministic, graph-aware refactoring plans (repowise >= 0.24.0).

Extract Class / Extract Helper / Extract Method / Move Method / Break
Cycle / Split File / Performance Fix suggestions, unified-ranked at index
time. Distinct from `/refactoring-targets` (the
impact-per-effort file ranking). Returns `state='not_available'` for
snapshots indexed before the layer landed.

## Path parameters

- `snapshot_id` string, required

## Query parameters

- `type` string, nullable — Filter to one refactoring_type (chip counts stay full).
- `min_confidence` string, nullable — Surface gate: low | medium | high.

## Response `200`

Successful Response

- RefactoringPlansResponse
  - `summary` RefactoringSummary
    - `total` integer, required
    - `by_type` RefactoringTypeCount[]
      - `type` string, required
      - `count` integer, required
    - `files_total` integer, nullable
    - `structural_total` integer, nullable
    - `performance_total` integer, nullable
    - `small_effort_total` integer, nullable
    - `health_recovery_total` integer, nullable
    - `negligible_health_total` integer, nullable
    - `best_health_gain` number, nullable
  - `plans` RefactoringPlan[]
    - `id` string, required
    - `refactoring_type` string, required
    - `file_path` string, required
    - `target_symbol` string, required
    - `line_start` integer, nullable
    - `line_end` integer, nullable
    - `plan` object
    - `evidence` object
    - `impact_delta` number
    - `effort_bucket` string
    - `blast_radius` object
    - `confidence` string
    - `source_biomarker` string
    - `rank_score` number
    - `dependents` integer
    - `file_nloc` integer
    - `benefit` number
    - `leverage` number
    - `cost` number
    - `risk` number
    - `file_weighted_deficit` integer
    - `validation` object
  - `state` string
  - `reason` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/repowise/apis/repowise-hosted-api.md) · [All operations](https://skmtc.dev/repowise/apis/repowise-hosted-api/llms.txt) · [OpenAPI document](https://skmtc.dev/repowise/apis/repowise-hosted-api/revisions/98c833b3480d?raw)
