import yaml
from pathlib import Path

RULES_FILE = Path(__file__).parent / "rules.yaml"


def load_rules():
    if not RULES_FILE.exists():
        return []

    with RULES_FILE.open("r") as f:
        data = yaml.safe_load(f) or {}

    return data.get("rules", [])
