MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / ensure_project_scaffolded

Function ensure_project_scaffolded

start.py:181–205  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

179
180
181def 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
208def run_spec_creation(project_dir: Path) -> bool:

Callers 1

create_new_project_flowFunction · 0.85

Calls 2

scaffold_project_promptsFunction · 0.90
register_projectFunction · 0.90

Tested by

no test coverage detected