"""Create recovery_planner
Generated by Phi-Octopus Eden
2025-11-05 22:50:16.021591
"""

```python
from typing import Callable, Optional


class RecoveryPlanner:
    """
    A class for creating a limited error recovery planner.

    This planner aims to handle recoverable errors by retrying operations up to a certain limit.
    """

    def __init__(self, max_retries: int = 3):
        """
        Initialize the RecoveryPlanner with a maximum number of retries.

        :param max_retries: Maximum number of times an operation should be retried in case of failure
        """
        self.max_retries = max_retries

    def plan_recovery(self, operation: Callable[[], None], recovery_action: Optional[Callable[[Exception], None]] = None) -> bool:
        """
        Plan and execute a limited error recovery strategy for an operation.

        :param operation: The operation to be executed
        :param recovery_action: An optional action to be performed in case of failure
        :return: True if the operation was successful, False otherwise
        """
        retries_left = self.max_retries

        while retries_left > 0:
            try:
                operation()
                return True
            except Exception as e:
                if recovery_action:
                    recovery_action(e)
                retries_left -= 1
                if retries_left == 0:
                    print(f"Failed after {self.max_retries} attempts")
                    return False

        return False


def example_operation() -> None:
    """
    An example operation that might fail.
    Simulates a failure by intentionally dividing by zero.

    :return: None
    """
    try:
        result = 10 / 0
    except ZeroDivisionError:
        print("Caught division by zero error")


def recovery_action(error: Exception) -> None:
    """
    A simple recovery action that logs the error.
    
    :param error: The caught exception to log
    :return: None
    """
    print(f"An error occurred: {error}")


if __name__ == "__main__":
    planner = RecoveryPlanner(max_retries=3)
    success = planner.plan_recovery(example_operation, recovery_action)
    print("Operation was successful:", success)

```

This code defines a `RecoveryPlanner` class that can be used to wrap operations and manage their execution in the presence of recoverable errors. The example usage demonstrates how to use this class with a failing operation (`example_operation`) and a recovery action (`recovery_action`).