Learn

Use Learn to understand and apply the system. Use Standards when you need the governing contract.

Create a Template Schema

Author a Cuddler Template Schema that defines a markdown-compliant template document without weakening data validation.

Tutorial path

How a Template Schema should be authored

The Template Schema starts from validated data and then describes the final markdown-template structure that should be rendered.

1Start from the report shape

Do not invent the markdown-template contract from vague layout ideas alone.

2Map sections and markdown blocks

Constrain headings, tables, lists, and other structure directly in schema logic.

3Keep template rules local

Describe rendering behavior without trying to redefine the data contract.

4Validate the template document on its own

Check the markdown-template contract after the data contract is already sound.

Presentation is a separate contract, not an override for bad data.

A Template Schema defines the template document contract, not the source-of-truth facts. It should describe the final markdown-compliant template structure that will be rendered later, while leaving the data contract intact.

  1. Start from the final reader-visible template structure you need to publish.
  2. Constrain headings, paragraphs, tables, lists, images, and other markdown blocks directly in schema logic.
  3. Keep template-specific instructions focused on the authored template document and renderer behavior.
  4. Validate the template document on its own after the data contract is already sound.

Keep the boundary clean

  • Data validation comes first.
  • Template validation comes second.
  • Template rules should not override a bad or missing data contract.
  • Rendered output should stay predictable once the template document validates.

Good template habits

  • Make the markdown structure explicit instead of leaving headings or sections implied.
  • Keep table headers, list types, and renderer options deterministic.
  • Write safe rendering behavior as the default, not the exception.