multi-agent-sdlc / src /multi_agent_sdlc /project_description.py
Pedro
load project descriptions from md files
49ad56c
Raw History Blame Contribute Delete
552 Bytes
from pathlib import Path
MARKDOWN_SUFFIXES = {".md", ".markdown"}
def load_project_description(path: Path) -> str:
if path.suffix.lower() not in MARKDOWN_SUFFIXES:
raise ValueError(f"Project description must be a Markdown file: {path}")
try:
description = path.read_text(encoding="utf-8").strip()
except OSError as error:
raise ValueError(f"Could not read project description: {path}") from error
if not description:
raise ValueError(f"Project description is empty: {path}")
return description