mistle/goal_loader.py
2026-02-09 10:15:12 +01:00

13 lines
348 B
Python

from __future__ import annotations
from pathlib import Path
def load_goal_instructions(path: str = "GOAL.md") -> str:
goal_path = Path(path)
if not goal_path.exists():
return ""
try:
return goal_path.read_text(encoding="utf-8").strip()
except OSError: # pragma: no cover - environment specific
return ""