Reference

What Templait exports, and what each format is for

Two text formats to hand to an assistant, and two image formats for the artwork itself. Both text formats carry the same document - every zone, where it sits, what it is for, and the instruction you wrote for it - written two ways, with a guide that says how to read it.

The four formats

A template can be exported as Markdown or XML for an assistant, and as SVG or PNG for the artwork. The first two describe the design; the last two are the design, rendered by the app in your browser.

FormatWhat it isReach for it when
MarkdownThe same facts as prose, grouped under headings - one section per element.You are pasting into a chat window and want to be able to read what you pasted.
XMLThe same facts with each element's type, design role and semantic role written on the tag itself.You want the structure to be explicit, or you are working with something that expects a schema-shaped document.
JSONThe same facts as data - one object per element, with nothing in front of it so the file still parses.A tool or a script is going to read the document, rather than a chat.
SVGThe artwork as vectors, at the canvas's own coordinates.You are printing, or you want the layout to survive being scaled.
PNGThe artwork as a raster image. The print presets render at 300 DPI.You are posting it somewhere, or you need a fixed pixel size.

SVG and PNG are not for the assistant - they are the finished picture. What you paste into a chat is Markdown or XML.

JSON is the third text format, and the one that carries no guide: a file that ends in } is one people expect to parse, and a guide in front of it stops it parsing. So it travels as data for a tool that reads the document, not as something to paste into a chat - which is what Markdown and XML are for.

What every text export carries

Whichever of the three you pick, the same facts travel. A field cannot be present in one and missing from another: the contracts package has a test that walks every element kind's schema and fails if a field changes the document without changing the export.

  • The canvas - its size and background, which is what the assistant needs to know about the frame it is filling.
  • Every element, in order, with its geometry: where it sits, how big it is, and its rotation.
  • Its appearance - fill, border, corner radius, shadow, text colour and opacity, as far as the element can carry them.
  • Its type and its roles. The design role is read off what the elementis (a heading is a headline, a chart is a data visualisation); the semantic role is what you said it is for, which is the one an assistant should be reading.
  • Your instruction for it, plus any notes, limits like a word budget, and the attributes the panel still asks for - where the content comes from, and for an image or a chart, what the picture or the numbers should show.
  • A guide the document carries - the text addressed to the assistant that says what the document is and how to read it. It is written by the exporter, and where it sits follows the format: Markdown pages it above the document, and an XML export keeps it inside as <task> and <globalInstructions>, so the file is one well-formed document. Either way the paste explains itself.
  • No comments of any kind. The guide is the only prose in a text export; everything around it is the document itself. A file handed to an assistant is read as content, so a line explaining a field can be mistaken for instruction - and a comment per element, repeated eleven times, is most of the file.
  • Coordinates rounded to sensible precision - whole canvas units for position and size, two decimals for rotation and scale - so the numbers stay readable instead of arriving as long floating-point tails.
  • The document's own variables and attachments, when a template declares them, so a placeholder like {{company_name}} arrives with its value rather than as a puzzle.

Copy to AI

The button for this is the one accented control in the editor's top bar, because it is the one people reach for. Copy to AI builds the export, copies the whole thing to the clipboard and ticks the button. It does not open a dialog to confirm itself.

Markdown

The same export document, printed as prose rather than as data: a heading per element, a line per fact. It is the format to read over somebody's shoulder, and the one that survives being pasted into a window that renders Markdown. Your own prompt for the whole document arrives as a Global prompt section, and nothing in the file is a comment.

Markdown export, trimmed
# Task

Create exactly one complete poster / flyer artifact by following the specification below.

- **Canvas:** 1080 × 1080 pixels.
- **Language:** English.
- **Country:** United Kingdom. Apply appropriate local conventions for currency, dates, numbers, units, and spelling.
- **Specification:** Read the entire specification before generating. …
- **Output:** Generate the final visual artifact only. …

# Global Instructions

- **Interpretation:** Treat the canvas, variables, attachments, and elements as one
  cohesive specification. …
- **Element content:** Where the element's contentSource says the content is provided,
  reproduce what this section states; otherwise infer the intended behavior. …
- **Composition and layering:** Render all elements together as one cohesive
  artifact. … Use zIndex for front-to-back order; higher values appear in front. …
…

# Launch Banner Brief

## Canvas

### Global prompt

A calm, editorial poster. No exclamation marks.

### General

- Width: 1080
- Height: 1080
- Unit: px

## Elements

### 1. Headline

- Type: text
- Semantic role: hero

#### Geometry

- Z index: 1
- …

#### Generation

- User prompt: One sentence, under twelve words.

XML

The same facts again, with roles on the tags. An element opens with its id, name, type, design role and semantic role, so a reader that stops at the opening tag already knows what it is looking at - which is what makes this the format to use when the structure itself matters. A document-level prompt sits inside the canvas as its own element, because prose in an attribute is where escaping goes wrong. The stacking order sits inside the geometry, beside the placement it describes.

XML export, trimmed
<?xml version="1.0" encoding="UTF-8"?>
<templaitDocument schemaVersion="tdf.v1alpha1" id="doc-launch-banner-brief" name="Launch Banner Brief">
  <task>
    <instruction>Create exactly one complete poster / flyer artifact by following the XML specification below.</instruction>
    <requirement name="Canvas">1080 × 1080 pixels.</requirement>
    <requirement name="Language">English.</requirement>
    <requirement name="Country">United Kingdom. Apply appropriate local conventions for currency, dates, numbers, units, and spelling.</requirement>
    <requirement name="XML specification">Read the entire XML before generating. …</requirement>
    <requirement name="Output">Generate the final visual artifact only. …</requirement>
  </task>
  <globalInstructions>
    <rule name="Interpretation">Treat the canvas, variables, attachments, and elements as one cohesive specification. …</rule>
    <rule name="Precedence">Current user prompt &gt; element instructions &gt; canvas settings and defaults &gt; creative judgment. …</rule>
    …
  </globalInstructions>
  <canvas>
    <globalPrompt>A calm, editorial poster. No exclamation marks.</globalPrompt>
    <general type="Poster / Flyer" width="1080" height="1080" unit="px" elementCount="4" />
    <background type="SolidColor" color="#f6f3ee" />
  </canvas>
  <elements>
    <element id="text-headline" name="Headline" type="text" designRole="headline" semanticRole="hero">
      <geometry zIndex="1">
        <position x="72" y="500" />
        <size width="936" height="180" />
        <transform rotation="0" scaleX="1" scaleY="1" />
      </geometry>
      <generation locked="false">
        <userPrompt>One sentence, under twelve words.</userPrompt>
      </generation>
    </element>
  </elements>
</templaitDocument>

What is deliberately not in an export

A format is as much a decision about what to leave out. These are absent on purpose rather than because nobody got to them:

  • A design brief or a layout narrative. The elements describe the layout; a generated paragraph describing the layout again is a second source of truth that can contradict the first.
  • Relationships between elements. The document is a flat list of zones - there is no parent, no group and no hierarchy - so an export that implied one would be describing a model the app does not have.
  • An accessibility block. Contrast, alt text and reading order are things the app does not measure, and inventing plausible values for them would be worse than the gap.
  • Any rating or usage figure. Nothing here is derived from how many people used a template, because nothing collects that.

How to use one

  1. Design the template: the canvas, then a zone for each part of the composition.
  2. Give every zone an instruction, and say what it is for. A zone with no instruction is a box, and a described zone is a brief.
  3. Export to one of the text formats and copy the whole thing.
  4. Paste it into your assistant and ask for the content. Leave the guide where it is - it is what tells the assistant to treat the document as one composition rather than as a list of unrelated requests.
  5. Put the answer back into the template, or export the artwork as SVG or PNG.

One document produces one artifact. If you want four different posts, that is four templates - asking for all four in one paste is the fastest way to get a document that answers half of each.