Complete flow for creating a new project. 1. Get project name and path 2. Create project directory and scaffold prompts 3. Ask: Claude or Manual? 4. If Claude: Run /create-spec with project path 5. If Manual: Show paths, wait for Enter 6. Return (name, path) tuple if su
()
| 328 | |
| 329 | |
| 330 | def create_new_project_flow() -> tuple[str, Path] | None: |
| 331 | """ |
| 332 | Complete flow for creating a new project. |
| 333 | |
| 334 | 1. Get project name and path |
| 335 | 2. Create project directory and scaffold prompts |
| 336 | 3. Ask: Claude or Manual? |
| 337 | 4. If Claude: Run /create-spec with project path |
| 338 | 5. If Manual: Show paths, wait for Enter |
| 339 | 6. Return (name, path) tuple if successful |
| 340 | """ |
| 341 | project_info = get_new_project_info() |
| 342 | if not project_info: |
| 343 | return None |
| 344 | |
| 345 | project_name, project_path = project_info |
| 346 | |
| 347 | # Create project directory and scaffold prompts FIRST |
| 348 | project_dir = ensure_project_scaffolded(project_name, project_path) |
| 349 | |
| 350 | # Ask user how they want to handle spec creation |
| 351 | choice = ask_spec_creation_choice() |
| 352 | |
| 353 | if choice == 'b': |
| 354 | return None |
| 355 | elif choice == '1': |
| 356 | # Create spec with Claude |
| 357 | success = run_spec_creation(project_dir) |
| 358 | if not success: |
| 359 | print("\nYou can try again later or edit the templates manually.") |
| 360 | retry = input("Start agent anyway? [y/N]: ").strip().lower() |
| 361 | if retry != 'y': |
| 362 | return None |
| 363 | elif choice == '2': |
| 364 | # Manual mode - guide user through editing |
| 365 | success = run_manual_spec_flow(project_dir) |
| 366 | if not success: |
| 367 | return None |
| 368 | |
| 369 | return project_name, project_dir |
| 370 | |
| 371 | |
| 372 | def run_agent(project_name: str, project_dir: Path) -> None: |
no test coverage detected