SparkGen Generate
Generate a new project from the SparkGen-AWS cookiecutter template.
Dynamic Context
Before generating:
- •Read
cookiecutter.jsonto understand all available template variables - •Check cookiecutter is installed:
cookiecutter --version - •Determine output directory (default: current working directory)
Actions
Generate Project
Map the user's arguments to cookiecutter variables:
| Argument | cookiecutter Variable | Default |
|---|---|---|
| project_name | project_name | "My SparkGen AWS Agent" |
| --mode | deployment_mode | "all" |
| --agents | num_agents | "4" |
| --rag | enable_rag | "yes" |
| --provider | llm_provider | "bedrock" |
Build the cookiecutter command with --no-input and variable overrides:
bash
cookiecutter . --no-input \ project_name="<name>" \ deployment_mode="<mode>" \ num_agents="<N>" \ enable_rag="<yes|no>" \ llm_provider="<provider>"
Post-Generation Verification
After generating:
- •Verify output directory exists:
ls <output_slug>/ - •Compile check:
python -m compileall <output_slug>/app -q - •Verify key files:
- •
<output_slug>/config/ai_workflow.yaml - •
<output_slug>/Makefile - •
<output_slug>/app/api.py - •
<output_slug>/.claude/skills/(skills directory) - •
<output_slug>/CLAUDE.md
- •
- •Count agents in workflow:
grep "^ - name:" <output_slug>/config/ai_workflow.yaml
Print Summary
code
=== Project Generated === Name: <project_name> Location: ./<output_slug>/ Mode: <deployment_mode> Provider: <llm_provider> Agents: <num_agents> RAG: <enable_rag> Guardrails: <enable_guardrails> Next steps: cd <output_slug> make setup # Install dependencies make local # Start local dev server Available skills (in generated project): /sparkgen-deploy Deploy to local/docker/aws /sparkgen-test Run tests /sparkgen-chat Test chat /sparkgen-debug Diagnose issues
Error Handling
- •If cookiecutter not installed:
pip install cookiecutter - •If output directory already exists: warn and ask to overwrite
- •If compile check fails: report Jinja2 rendering errors