Learn

Core Workflow

The practical Cuddler sequence: define the domain, validate the data, validate the template, and render only after both pass.

Workflow

The core Cuddler sequence

The order matters because each step reduces ambiguity before the next one begins.

1Choose the governing standards

Start from the Specification Root and the right Domain Specification.

2Understand the authoring contract

Use the shared Artifact Specification to frame how the artifact family should be authored.

3Draft aligned inputs

Shape the data JSON and template JSON for the same version family.

4Validate both contracts

Validate the data first and the template second.

5Render after both pass

Only render once the contracts are sound and aligned.

If a step fails, go back to that boundary instead of trying to push the workflow forward.

The Cuddler workflow is intentionally staged. Each step reduces ambiguity before the next one begins, which makes the final rendered output easier to trust and easier to review.

The sequence

  1. Start with the governing Specification Root and the relevant Domain Specification.
  2. Use the shared Artifact Specification to understand how Artifact Definitions should be authored.
  3. Shape the data JSON and template JSON so they stay aligned with the intended schema version.
  4. Validate the data first, then validate the template.
  5. Render only after both validations succeed.

What to keep in mind

  • Data validation and template validation solve different problems.
  • A versioned contract is easier to reason about than an implied one.
  • If validation fails, the issue should be fixed before rendering is attempted again.

Why the order matters

The order protects the document pipeline from hidden drift. When the data is validated first, the template is working against a known shape. When the template is validated second, it is checked independently instead of borrowing confidence from the data.