> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Plan Fixes • AI Agent SDK

> plan_fixes: Produce a :class:`RepairPlan` describing what the doctor repair changes.

# plan\_fixes

Method

> This is a method of the [**DoctorRulesRegistry**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/DoctorRulesRegistry.md) class in the [**doctor\_registry**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/doctor_registry.md) module.

Produce a :class:`RepairPlan` describing what the doctor repair changes.

Safety contract:

* **Diff preview**: every applied rule records a before/after `ConfigDiff`.
* **Refuse-on-unrecoverable**: a rule that raises is skipped, its blocking
  finding(s) recorded in `refused`, and its partial change discarded.
* **Backup**: when `dry_run=False` and `backup=True` the original
  config is snapshotted to `backup_path` before returning.
* **Re-validation**: after applying, residual findings are re-collected so
  callers can report "repair left N finding(s)".

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def plan_fixes(config: Dict[str, Any]) -> RepairPlan
```

## Parameters

**config** `Dict[str, Any]` *required*

The configuration to repair (never mutated).

### Returns

**Returns** `RepairPlan`

class:`RepairPlan`.

## Uses

* `copy.deepcopy`
* `get_rules`
* `rule.collect_findings`
* `warnings.warn`
* `Finding`
* `rule.apply_fix`
* `ConfigDiff`
* `collect_all_findings`
* `RepairPlan`

## Used By

* [`DoctorRulesRegistry.apply_all_fixes`](../functions/DoctorRulesRegistry-apply_all_fixes)
* [`plan_fixes`](../functions/plan_fixes)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/runtime/doctor_registry.py#L79)
>
> `praisonaiagents/runtime/doctor_registry.py` at line 79


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.