1. Define a schema using `defineSchema` to specify the structure of specs and catalogs.
2. Create a catalog using `defineCatalog` to map component/action names to their definitions.
3. Generate AI prompts using `catalog.prompt()` based on the schema's promptTemplate.
4. Process streaming AI responses using `createSpecStreamCompiler`.
5. Resolve dynamic prop expressions using `$state`, `$bindState`, `$cond`, and `$template`.
6. Implement state watchers to trigger actions when state values change.
7. Validate the spec using `validateSpec` and auto-fix issues using `autoFixSpec`.