Mission templates: when to save a workflow as a product
If you run the same mission twice, save it as a template. If you run it 50 times, build a UI on top. Here's how Mission Control's template system handles both.
Paste a manifest into the public demo or bring a scoped workflow to the private beta.
The {{var}} convention
A mission template carries a goal with {{var}} placeholders. extractVars() scans the goal at template-create time and computes the required vars. instantiateTemplate() substitutes at run time and throws MissingTemplateVarError if any required var wasn't supplied.
Type safety on the boundary: the engine never sends '{{company}}' to the planner — that's a typed error, not a silent miss.
When to template, when to UI
Template = save once, parameterize, run by id. Good for 'every Monday, weekly market scan of {{topic}}' or 'for every new account in CRM, run lead enrichment with {{company}}'.
UI = build a custom front-end that renders a form, fills the var, calls /v1/templates/:id/run. Good for end-user features where the buyer isn't a developer.