Learn

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

Schemas and Template

A compact explanation of the three parts of a Cuddler document workflow and how each one behaves.

These three terms describe the shape of the workflow and the result it produces.

The three parts

  • Data Schema: validates the source data JSON that informs the report.
  • Template Schema: validates the markdown-compliant template JSON separately from the data.
  • Report: the finished HTML output created after both inputs have passed validation.

How they differ

The Data Schema answers whether the source data is acceptable. The Template Schema answers whether the template document is shaped correctly. The Report is the final artifact that appears only after both checks succeed.

A useful mental model

Think of the data and template document as two different contracts that must stay aligned. They are related, but they do not do the same job. That separation is a strength because it lets you diagnose issues more precisely.

How the two contracts stay aligned

The Data Schema and Template Schema stay separate while they validate their own inputs. The Data Schema validates source facts, the Template Schema validates the markdown-compliant template document, and the rendered output appears only after the template document is valid.

Validation path one Data Schema

Checks that the data JSON has the right structure, fields, and values for the source facts that feed the report.

Validation path two Template Schema

Checks that the markdown-compliant template JSON is shaped correctly and is ready to render.

Render result Report

The final HTML output appears only after the template document validates and the renderer can safely emit the chosen output target.

Separate contracts. One validated template document. One finished report.