"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-08 04:52:07.276206
"""

```python
from typing import List, Optional


class FactChecker:
    """A simple fact-checker class that evaluates a list of facts based on a predefined set of rules.

    Args:
        rules: A list of callables where each callable takes a fact as input and returns True or False.
    
    Methods:
        check_facts: Takes a list of facts and checks them against the defined rules.
        add_rule: Adds a new rule to the checker.
    """

    def __init__(self, rules: Optional[List[callable]] = None):
        self.rules = rules if rules is not None else []

    def check_facts(self, facts: List[str]) -> bool:
        """Check each fact against all defined rules and return True only if all rules pass.

        Args:
            facts: A list of strings representing the facts to be checked.
        
        Returns:
            True if all facts pass all rules, False otherwise.
        """
        for rule in self.rules:
            if not all(rule(fact) for fact in facts):
                return False
        return True

    def add_rule(self, rule: callable):
        """Add a new rule to the checker.

        Args:
            rule: A callable that takes a single string argument and returns a boolean.
        """
        self.rules.append(rule)


# Example usage
def is_positive_number(fact: str) -> bool:
    return fact.isdigit() and int(fact) > 0


def contains_vowel(fact: str) -> bool:
    vowels = "aeiouAEIOU"
    for char in fact:
        if char in vowels:
            return True
    return False


# Create a FactChecker instance with the provided rules
fact_checker = FactChecker([is_positive_number, contains_vowel])

# Test facts
facts_to_check = ["123", "hello", "-567"]

# Check if all facts pass the defined rules
result = fact_checker.check_facts(facts_to_check)
print(result)  # Expected: False since '-567' is not a positive number

fact_checker.add_rule(lambda x: len(x) > 10)

# Recheck with the new rule added
facts_to_recheck = ["123456789", "abcdefghijklmnopqrstuvwxyz", "-567"]
result_after_adding_rule = fact_checker.check_facts(facts_to_recheck)
print(result_after_adding_rule)  # Expected: False since '123456789' has less than 10 characters
```