in src/cli/utils/template.py [0:0]
def get_template_path(agent_name: str, debug: bool = False) -> pathlib.Path:
"""Get the absolute path to the agent template directory."""
current_dir = pathlib.Path(__file__).parent.parent.parent.parent
template_path = current_dir / "agents" / agent_name / "template"
if debug:
logging.debug(f"Looking for template in: {template_path}")
logging.debug(f"Template exists: {template_path.exists()}")
if template_path.exists():
logging.debug(f"Template contents: {list(template_path.iterdir())}")
if not template_path.exists():
raise ValueError(f"Template directory not found at {template_path}")
return template_path