"""Prompt loader utility for readme-writer."""

from pathlib import Path


class PromptLoader:
    """Utility class for loading prompts from files."""
    
    def __init__(self):
        """Initialize the prompt loader."""
        # Get the prompts directory relative to this file
        current_file = Path(__file__)
        self.prompts_dir = current_file.parent.parent / "prompts"
    
    def load_prompt(self, prompt_file: str) -> str:
        """Load a prompt from a file."""
        prompt_path = self.prompts_dir / prompt_file
        
        if not prompt_path.exists():
            raise FileNotFoundError(f"Prompt file not found: {prompt_path}")
        
        with open(prompt_path, 'r', encoding='utf-8') as f:
            return f.read().strip()
    
    def load_full_prompt(self) -> str:
        """Load the full generation prompt."""
        return self.load_prompt("full-prompt.txt") 