All articles

Templates

Generate from a prompt

Tell Buddy — the assistant built into Weft — what document you need, and it produces an editable Weft template. Not an image of a document, and not a locked file: real blocks you can select, restyle and rebind exactly as if you had placed them yourself.

Before you start

  • In the hosted app, asking Buddy needs the editor role or higher (roles run viewer, editor, admin, owner). Local mode — one person, documents kept in the browser — has no roles. Buddy works there too, as long as the designer can reach the AI service.
  • Load the data you design against from the data pill, in the bar above the document. Buddy is sent that data and asked to bind only to fields that exist in it, so even one sample record whose fields match the document you want gives a better result. If nothing in your data fits, there is little for Buddy to bind to, and you attach fields yourself afterwards.
  • Accepting a generated document replaces the one on the canvas. If you want to keep your latest changes to the document you have open, save it first.

Describe what you need

  1. Press Generate in the app bar. The Delegate to Buddy dialog opens.
  2. In the box under "What should Buddy build?", describe the document the way you would to a colleague.
  3. Press Plan it.

Concrete beats clever. For example: "A commercial invoice for a UK consultancy. Logo top left, invoice number and date top right, a line-items table with description, quantity, unit price and amount, a totals block with VAT at 20%, and payment terms in the footer."

Name the sections you know you need. Buddy builds what you describe, so a purchase-order reference you never mention may well not be there.

The first screen of the dialog also offers:

  • Making one of these? — a row of document types; see below.
  • Recent — your last few descriptions in this browser, shown while the box is empty. Click one to reuse it.
  • Upload a document instead → — start from a file you already send; see Upload a document.
  • Change the document I have open instead → — ask for a change to the open document rather than a new one; see Ask Buddy about the document.
The Delegate to Buddy dialog. Under Making one of these? (optional) are nine document-type buttons, from Sales quote to Certificate, and a More types… search box. Under What should Buddy build?, the box holds a description of a commercial invoice. Below it are the links Upload a document instead → and Change the document I have open instead →, and Plan it sits at the bottom right.

Approve the plan before it builds

While Buddy plans, the button reads Planning… and a Cancel button appears. Buddy then returns an outline — the blocks it intends to create, in order, each with a label and, where it proposes one, the field it would bind to — and stops there. Nothing has been generated yet.

This is the moment to steer. In the outline you can:

  • change a block's label in its box;
  • change, add or clear the field in the box beneath it;
  • remove a block with its ✕.

Each row with a field is checked against your loaded data: ✓ in data means the field exists, ⚠ not in data means Buddy proposed a field you do not have. Correct it or clear it here.

When the outline is right, press Approve & generate. Buddy is told to follow it block by block, in order, so the result keeps the shape you approved. Back returns to your description.

When Weft skips the plan

Some requests are a single step on the document you have open: "set page size to A4", "set the font to Georgia", "add a page break". When Weft recognises one, a line marked ⚡ appears under the box, starting "Quick command:", and the button changes from Plan it to Run. Run makes the change straight away, without Buddy. If that is not what you meant, press Ask Buddy to plan instead.

Weft offers this only when it is sure what you mean. A negative, two requests at once or an unclear value leaves the button on Plan it. The full list is in Quick commands.

Start from a document type

Instead of writing a description, pick a type under Making one of these? — such as Sales quote, Invoice or Certificate — or search for one in More types…. Buddy then asks you a few questions about the document, with the plan building up beside the conversation.

  1. Answer in the reply box and press Send (or Enter). See all options lists every choice for that type, to set directly.
  2. Edit the plan on the right in the same way as above.
  3. Press Approve & generate, or Draft without AI for a plain document assembled from the plan without Buddy writing it.

Back returns to the first screen. If Buddy cannot ask questions right now, the dialog shows every option instead, and Draft without AI becomes the main button.

A document made this way is built against a sample record for its type rather than the data you were previewing, and that record becomes the preview data when you accept. In the hosted app, a line at the top of the plan says which data Buddy is working from. Your workspace branding is applied to the result; see Workspace branding.

Watch it build

In the hosted app, the dialog closes when you approve, and the new document takes shape on the canvas under Buddy is drafting…, block by block, while the status chip beside Generate says what Buddy is doing. In local mode the dialog stays open, with Generating… on its button, until the document is ready.

To give up, press Stop beside the status chip or on the Buddy is drafting… bar, or Cancel in the dialog. Your document is unchanged, though Buddy may finish the step it is on.

Review before you accept

The result arrives as a proposal: the canvas shows the new document, read-only, under a review bar headed Proposed template. Your document is untouched underneath it. A generated document almost always replaces the whole document, so the bar has no list of individual changes and reads "Preview only — your document is untouched until you accept." Switch to Paged, in the bar above the canvas, to see it as printed pages.

  • Accept all takes the new document.
  • Discard leaves your document exactly as it was.

The full walk-through is in Review proposed changes.

After you accept

  • The new document replaces the one on the canvas in one step. For a "Preview only" proposal — almost every generated document — the undo history is cleared too, so Undo cannot bring back what you had. To go back, press the status chip beside Generate to open the activity feed, and press Rewind on the row "Before generating" ("Before drafting" for a draft made without AI).
  • Taken whole — which is almost always how a generated document arrives — the new document is unsaved. Saving it creates a new template; the template you had open stays in your library as it was last saved.

Treat the result as a first draft — it is a real template, so everything in Create a template applies to it. Common next moves:

  • Check the fields. A field Buddy bound that your loaded data does not have is flagged in the notices dock at the bottom left of the canvas. See Fix flagged issues and Bind fields.
  • Refine a part of it. Select a block; if the toolbar above it shows only a grip, press its button (tooltip Formatting options) to expand it, then press the ✨ to ask Buddy to change just that block. See Ask Buddy to edit.
  • Change the whole document. Press Generate, then Change the document I have open instead →. See Ask Buddy about the document.

If Generate opens a different dialog

If Generate opens a dialog titled Generate a template instead of Delegate to Buddy, the delegation dialog is turned off in your setup. Describe the document under Describe the template you want and press Generate template →. There is no plan step: Buddy builds straight from your description, and the result comes back for review in the same way. Add your logo (optional) puts your logo in the document's first empty picture and uses its main colour as the document's primary colour.

What next