| Package metadata | slug must be lowercase kebab-case; site_types, status, pricing_type, currency, version, version_number, release_status, and compatibility_range are schema validated. | Defaults exist for author_name, site_types, status, pricing_type, price, currency, version_number, release_status, and compatibility_range. | packages/theme-engine/src/theme-bundle.ts:140 |
| Template order references | Each template order entry must reference an existing section ID in that template. | Invalid entries produce a custom issue at template.order. | packages/theme-engine/src/theme-bundle.ts:81 |
| Template block order references | Each section block_order entry must reference an existing block ID under that template section. | Invalid entries produce a custom issue at sections.<sectionId>.block_order. | packages/theme-engine/src/theme-bundle.ts:98 |
| Section key/type match | Each section definition map key must match the section.type value. | A mismatched key/type pair is rejected during ThemePackageBundleSchema superRefine. | packages/theme-engine/src/theme-bundle.ts:191 |
| Block key/type match | Each block definition map key must match the block.type value. | A mismatched block definition key/type pair is rejected during bundle validation. | packages/theme-engine/src/theme-bundle.ts:212 |
| Section block type references | Every section.block_types entry must reference an existing block definition. | Missing block definitions are reported against sections.<sectionType>.block_types. | packages/theme-engine/src/theme-bundle.ts:201 |
| Template section definitions | Every template section type must reference an existing section definition in the bundle. | Missing section definitions are reported against templates.<templateKey>.sections.<sectionId>.type. | packages/theme-engine/src/theme-bundle.ts:222 |
| Template block definitions | Every template block type must reference an existing block definition in the bundle. | Missing block definitions are reported against templates.<templateKey>.sections.<sectionId>.blocks.<blockId>.type. | packages/theme-engine/src/theme-bundle.ts:233 |
| Allowed blocks per section | When a section definition declares block_types, template blocks inside that section must use one of those types. | The constraint is skipped only when the section definition has an empty block_types list. | packages/theme-engine/src/theme-bundle.ts:243 |
| Validation issue formatting | validateThemeBundle returns { ok, bundle?, issues } and formats Zod issues as path-prefixed strings. | This is the current machine-readable validation result shape; no CLI wrapper exists yet. | packages/theme-engine/src/theme-bundle.ts:450 |
| Locale lookup | Locales normalize underscores to dashes, prefer exact normalized locale, lowercase variant, language, then en. | Translation strings use the t: prefix and resolve dotted dictionary paths. | packages/theme-engine/src/theme-bundle.ts:282 + :339 |