"""Shared helpers for the ModuleMap-Bench scripts: Python 3.8+, standard library only.""" import json import os ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ROLES = ["entry", "client", "service", "domain", "persistence", "event", "config", "none"] def read_jsonl(path): with open(path, encoding="utf-8") as f: return [json.loads(line) for line in f if line.strip()] def data(*parts): return os.path.join(ROOT, "data", *parts)