"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-06 07:04:35.950029
"""

```python
from typing import List, Dict

class KnowledgeBase:
    def __init__(self):
        self.knowledge = []

    def add_fact(self, fact: str) -> None:
        """Add a new fact to the knowledge base."""
        self.knowledge.append(fact)

    def get_facts(self) -> List[str]:
        """Retrieve all facts stored in the knowledge base."""
        return self.knowledge

class RuleEngine:
    def __init__(self, rules: Dict[str, str]):
        self.rules = rules

    def apply_rule(self, fact: str) -> str:
        """Apply a rule to a given fact and generate an inference."""
        for key in self.rules:
            if key in fact:
                return self.rules[key]
        return "No applicable rule found."

def create_reasoning_engine(facts: List[str], rules: Dict[str, str]) -> RuleEngine:
    """
    Create a reasoning engine that can apply rules to facts.

    :param facts: A list of initial facts.
    :param rules: A dictionary containing rules where keys are patterns and values are inferences.
    :return: An instance of RuleEngine.
    """
    knowledge_base = KnowledgeBase()
    for fact in facts:
        knowledge_base.add_fact(fact)

    rule_engine = RuleEngine(rules)
    return rule_engine

# Example usage
if __name__ == "__main__":
    initial_facts = ["The sun is shining", "It is a warm day"]
    rules = {
        "The sun is shining": "It will be a sunny day",
        "It is a warm day": "You should wear light clothing"
    }
    
    reasoning_engine = create_reasoning_engine(initial_facts, rules)
    inferred_fact = reasoning_engine.apply_rule("The sun is shining")
    print(inferred_fact)  # Output: It will be a sunny day

```