Skip to Content
We are live but in Staging 🎉
RecipesAuthoring to Publish

Authoring to Publish

Goal. Take a new workflow from nothing to a published, immutable version.

When to use. Onboarding a new automation, migrating a one-off script into the managed lifecycle, or shipping the first release of a workflow.

1. Write the script

Save this as invoice_parser.scriptum. It reads an invoice with the managed LLM, gates on a confidence threshold, and emits structured fields. The syntax — do … with … -> binding, check … on pass/on fail, emit, indentation-based blocks — is covered in Scriptum Language.

script "Invoice Parser" Extract structured fields from a raw invoice. version "0.1.0" input invoice_text : text -- raw invoice body output invoice_id : text total : number confidence : number do "Extract fields" with llm prompt = "Extract invoice_id, total, and a 0-1 confidence from:\n\n{invoice_text}" system = "You are a precise invoice parser. Return only the requested fields." -> parsed check "Confident enough?" parsed.confidence >= 0.6 on pass: continue on fail: fail "Low-confidence extraction; needs review" emit "Result" invoice_id = parsed.invoice_id total = parsed.total confidence = parsed.confidence

Validate it locally before touching the server — no connection needed:

dodil scriptum draft validate ./invoice_parser.scriptum dodil scriptum draft fmt ./invoice_parser.scriptum

2. Create the script container

dodil scriptum script create invoice-parser \ --description "Invoice extraction workflow" \ --tags "invoice,etl"

3. Save, compile, test

# Upload the draft source dodil scriptum draft save invoice-parser -f ./invoice_parser.scriptum # Type-check against tool schemas; fix any diagnostics dodil scriptum draft compile invoice-parser # Run the draft with a sample input and the merged environment dodil scriptum draft test invoice-parser \ --input @./samples/invoice_42.json \ --env

compile reports diagnostics with line and column, and lists the tools the script requires. draft test runs the draft as a thread without publishing.

4. Publish and confirm

dodil scriptum draft publish invoice-parser dodil scriptum version list invoice-parser

Publishing snapshots the compiled draft as a new immutable, numbered version and makes it active.

Verification checklist

  1. draft compile returns success with no diagnostics.
  2. The draft test thread reaches a terminal completed status.
  3. The published version appears in version list as active.
  4. The tools reported by compile are present in dodil scriptum tool list.

See also