Spawn uses separate representations for generation intent, historical generation metadata and observed repository state. They must not be treated as interchangeable.
8. Canonical model#
ProjectConfig is the single model passed between stages.
| Field | Meaning |
|---|---|
name, template |
Project name; template slug ("custom" for pasted structures) |
framework, provider, cli_type, data_type |
Template options |
extras, license, generate_claude_md |
Optional tooling, license (mit/none), also write CLAUDE.md |
use_git, use_uv |
Toolchain steps |
custom_* |
Custom-structure entries, dependencies, dev setup, gitignore extras, source format |
destination |
Target directory (Path or None); excluded from equality |
to_dict() returns a JSON-serializable dict of every field (destination as a string).
.spawn/meta.json is a historical record, not authoritative: it stores intent, framework, provider, spawn_version, created_at, generator, git, uv and source only. It does not record name, cli_type, data_type, extras, license or generate_claude_md, and the project may have changed since. ProjectConfig is generation intent only; it cannot be reconstructed from metadata.
9. Extension boundary#
Code that analyses existing projects must not depend on the CLI. It obtains state through core/, generators/ and templates/:
| Need | Use |
|---|---|
| State of an existing project | core.project.read_project_metadata(path): a ProjectMetadata, or None if there is no .spawn/meta.json; raises ConfigError if the file is unreadable or invalid. Read-only; does not validate the intent against the registry |
| Resolve options into a config | core.planning.plan_project(...) |
| Template catalogue | core.registry.get_metadata(), list_templates() |
| Create a project | generators.pipeline.generate_project(config) |
Rule: no module under core/, generators/, templates/, utils/ or github/ may import spawn.cli. tests/test_boundaries.py enforces this.
To add a template: subclass BaseTemplate in templates/<slug>/ and add a TemplateMetadata entry to TEMPLATES (see section 5).
Inspection findings identify static indicators and carry repository-relative evidence. Onboarding projects inspection and workflow evidence into a separate versioned report. A declared command is not a verified command; a detected framework is not proof of runtime behavior.