40.3 Schema evolution and backwards compatibility

Overview and links for this section of the guide.

Schema Drift

If you change your app's code to expect `firstName`, but your prompt still asks for `name`, your app breaks.

Rule: Your Zod/Pydantic schema is the source of truth. Generate the Prompt from the Schema.

Versioning Prompts & Schemas

When you update the schema, you must update the prompt. 1. `Schema V1` -> `Prompt V1`. 2. `Schema V2` (adds `email`) -> `Prompt V2`. Do not mix and match. Keep them tightly coupled in your codebase.

Where to go next