"""Create recovery_planner
Generated by Phi-Octopus Eden
2025-11-07 10:43:27.443118
"""

```python
from typing import Any, Dict


class RecoveryPlanner:
    """
    A class for creating a limited error recovery plan that can handle specific exceptions.
    
    Methods:
        - add_exception_handler: Adds an exception handler to the plan.
        - run_plan: Executes the recovery plan and handles any errors encountered.
    """

    def __init__(self):
        self.handlers: Dict[type, Any] = {}

    def add_exception_handler(self, exception_type: type, handler: Any) -> None:
        """
        Adds an exception handler to the plan for a specific type of error.

        :param exception_type: The type of exception to handle.
        :param handler: A function or method that will be called when the specified exception is raised.
        """
        self.handlers[exception_type] = handler

    def run_plan(self, func: Any) -> Any:
        """
        Executes a function and handles any errors encountered based on the recovery plan.

        :param func: The function to execute.
        :return: The result of the function execution or None if an exception is caught.
        """

        try:
            return func()
        except Exception as e:
            handler = self.handlers.get(type(e), None)
            if handler:
                print(f"Handling error with {handler.__name__}")
                handler(e)
            else:
                print(f"No handler for error: {type(e).__name__}")
                raise


# Example usage

def risky_function():
    """A function that may raise an exception."""
    import random
    if random.randint(0, 1) == 0:
        raise ValueError("An error occurred")
    return "Operation successful"


recovery_plan = RecoveryPlanner()
recovery_plan.add_exception_handler(ValueError, lambda e: print(f"ValueError caught: {e}"))

result = recovery_plan.run_plan(risky_function)
print(result)


def main():
    """A function that simulates a more complex program with multiple steps."""
    def step_1():
        return risky_function()

    def step_2(value):
        if value:
            raise TypeError("Unexpected type error")
        else:
            return "Step 2 completed"

    recovery_plan.add_exception_handler(TypeError, lambda e: print(f"TypeError caught: {e}"))
    
    try:
        result = recovery_plan.run_plan(step_1)
        if result:
            result = recovery_plan.run_plan(lambda: step_2(result))
    except Exception as e:
        print(f"Final error: {type(e).__name__}")
        raise


main()
```

This Python script introduces a `RecoveryPlanner` class that allows for the creation of an error handling plan. It includes methods to add exception handlers and run the recovery plan, along with example usage demonstrating how it can be utilized in a larger program.