import json
from pathlib import Path

RULES_FILE = Path(__file__).parent / "rules" / "custom.rules.json"

def load_rules():
    if RULES_FILE.exists():
        with open(RULES_FILE, "r", encoding="utf-8") as f:
            return json.load(f)
    return {}
