Ensure project directory exists with prompt templates and is registered. Creates the project directory, copies template files, and registers in registry. Args: project_name: Name of the project project_dir: Absolute path to the project directory Returns: T
(project_name: str, project_dir: Path)
| 179 | |
| 180 | |
| 181 | def ensure_project_scaffolded(project_name: str, project_dir: Path) -> Path: |
| 182 | """ |
| 183 | Ensure project directory exists with prompt templates and is registered. |
| 184 | |
| 185 | Creates the project directory, copies template files, and registers in registry. |
| 186 | |
| 187 | Args: |
| 188 | project_name: Name of the project |
| 189 | project_dir: Absolute path to the project directory |
| 190 | |
| 191 | Returns: |
| 192 | The project directory path |
| 193 | """ |
| 194 | # Create project directory if it doesn't exist |
| 195 | project_dir.mkdir(parents=True, exist_ok=True) |
| 196 | |
| 197 | # Scaffold prompts (copies templates if they don't exist) |
| 198 | print(f"\nSetting up project: {project_name}") |
| 199 | print(f"Location: {project_dir}") |
| 200 | scaffold_project_prompts(project_dir) |
| 201 | |
| 202 | # Register in registry |
| 203 | register_project(project_name, project_dir) |
| 204 | |
| 205 | return project_dir |
| 206 | |
| 207 | |
| 208 | def run_spec_creation(project_dir: Path) -> bool: |
no test coverage detected