File to create a new project based on this repo#8
File to create a new project based on this repo#8mspuckit wants to merge 4 commits intoniksacdev:mainfrom
Conversation
Updated instructions for Windows users regarding file copying commands.
Added Windows-specific instructions for copying files.
Update README with Windows file copy instructions
There was a problem hiding this comment.
Pull request overview
This PR introduces automation for setting up new projects based on the engineering-team-agents repository structure. It adds a Python script that copies the agent infrastructure to a new directory and updates the README with Windows-specific setup instructions.
- Adds
setup_new_project.py, a comprehensive Python script that automates copying agent files, directories, and creating project structure - Updates README.md with a Windows-specific example for the xcopy command
- Enables users to quickly bootstrap new projects with the full engineering agents framework
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| setup_new_project.py | New Python script providing automated project setup with validation, directory creation, file copying, and README generation |
| README.md | Adds Windows-specific xcopy example for manual setup instructions |
Comments suppressed due to low confidence (2)
setup_new_project.py:18
- Import of 'os' is not used.
import os
setup_new_project.py:23
- Import of 'List' is not used.
from typing import List, Tuple
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| **Windows users:** Replace `cp -r` with `xcopy /E /I` and `cp` with `copy` | ||
|
|
||
| e.g xcopy ..\engineering-team-agents\.claude\* .\ /E /I /H |
There was a problem hiding this comment.
The abbreviation 'e.g.' is missing a period. It should be 'e.g.' with a period after 'g'.
| e.g xcopy ..\engineering-team-agents\.claude\* .\ /E /I /H | |
| e.g. xcopy ..\engineering-team-agents\.claude\* .\ /E /I /H |
| python setup_new_project.py C:\\Projects\\my_new_project | ||
| """ | ||
|
|
||
| import os |
There was a problem hiding this comment.
The 'os' module is imported but never used in the script. Consider removing this unused import to keep the code clean.
| import os |
| import shutil | ||
| import argparse | ||
| from pathlib import Path | ||
| from typing import List, Tuple |
There was a problem hiding this comment.
The 'List' type from typing is imported but never used in the script. Consider removing this unused import to keep the code clean.
| from typing import List, Tuple | |
| from typing import Tuple |
| """Copy a directory recursively with error handling.""" | ||
| try: | ||
| if target_dir.exists(): |
There was a problem hiding this comment.
The copy_directory method uses shutil.rmtree without confirmation when the target directory exists. This could lead to unintended data loss if a user accidentally targets an existing directory. Consider adding user confirmation before deleting existing directories, or using a safer approach like merging contents or failing with an error message.
| """Copy a directory recursively with error handling.""" | |
| try: | |
| if target_dir.exists(): | |
| """Copy a directory recursively with error handling and confirmation before deleting existing target.""" | |
| try: | |
| if target_dir.exists(): | |
| response = input(f"⚠️ Target directory '{target_dir}' already exists. Delete and replace it? [y/N]: ").strip().lower() | |
| if response != 'y': | |
| print(f"❌ Skipping copy of {source_dir} to {target_dir}.") | |
| return False |
| return False | ||
|
|
||
| # Check if target directory is empty (or only contains common files) | ||
| existing_files = list(target_path.glob('*')) |
There was a problem hiding this comment.
Using glob('') only checks for top-level items and will miss hidden files and directories (those starting with a dot). This means the script won't detect existing .git, .github, or .claude directories, potentially causing unexpected overwrites. Consider using iterdir() or glob('**/', recursive=True) to include hidden files, or explicitly check for important hidden directories.
| existing_files = list(target_path.glob('*')) | |
| existing_files = list(target_path.iterdir()) |
| if len(sys.argv) < 2: | ||
| parser.print_help() | ||
| return 1 | ||
|
|
There was a problem hiding this comment.
The manual check for sys.argv length is unnecessary and creates inconsistent behavior. The argparse library will automatically handle missing required arguments and display help. This check will prevent argparse from showing its standard error messages when arguments are missing. Consider removing this manual check to rely on argparse's built-in behavior.
| if len(sys.argv) < 2: | |
| parser.print_help() | |
| return 1 | |
Script created to create a new project based on this repo where in a directory of choice.