← UniformCONTENT HISTORY

Update to Uniform

Snapshot Sep 30, 2026 · 23:15 UTC · version 1.0.0

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "Uniform Automations (`defineAutomation`, `defineScoutAutomation`, `ScoutClient`, `*.automation.ts`). Use when handling a Uniform content event, a schedule, an inbound webhook, an `aiTool`, a Scout workflow-stage job, a Uniform sync with an external system, or reviewing a `*.automation.ts` module.",
  "included_files": [
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 184
    },
    {
      "relative_path": "references/best-practices.md",
      "size_in_bytes": 8319
    },
    {
      "relative_path": "references/review-checklist.md",
      "size_in_bytes": 2345
    },
    {
      "relative_path": "references/scout.md",
      "size_in_bytes": 7252
    },
    {
      "relative_path": "references/sdk-api.md",
      "size_in_bytes": 6261
    },
    {
      "relative_path": "templates/on-workflow-stage.automation.ts",
      "size_in_bytes": 3928
    },
    {
      "relative_path": "templates/scout-client.automation.ts",
      "size_in_bytes": 5829
    },
    {
      "relative_path": "templates/scout-workflow-stage.automation.ts",
      "size_in_bytes": 2428
    }
  ],
  "name": "uniform-automations",
  "skill_md_contents": "---\nname: uniform-automations\ndescription: >-\n  Uniform Automations (`defineAutomation`, `defineScoutAutomation`, `ScoutClient`, `*.automation.ts`). Use when handling a Uniform content event, a schedule, an inbound webhook, an `aiTool`, a Scout workflow-stage job, a Uniform sync with an external system, or reviewing a `*.automation.ts` module.\nlicense: MIT\n---\n\n# Uniform automations\n\nServerless functions authored in the user's repo and deployed with the Uniform CLI. This skill is the judgement the SDK types don't give you. Product surface: [automations guide](https://docs.uniform.app/docs/guides/automations). Signatures: JSDoc in `@uniformdev/automations-sdk` and `@uniformdev/canvas`.\n\n## Mental model\n\nOne automation is one TypeScript module that default-exports the result of a define function. Everything else it imports is just modules.\n\n| | `defineAutomation({ metadata, handler })` | `defineScoutAutomation(metadata, instructions)` |\n|---|---|---|\n| You write | code | natural-language instructions |\n| The actions are | whatever your handler does | the tool calls the Scout agent makes |\n| Runs as | your bundled code, in Uniform's sandbox | Uniform's Scout agent, headlessly |\n| `permissions` | optional | required — the agent has no authority without a role |\n| Cost | compute only | consumes AI credits per run |\n\nBoth live in `*.automation.ts`; the CLI infers which from the default export. The public ID is the filename: `send-welcome.automation.ts` deploys as `send-welcome`. Renaming orphans the deployed automation; deleting the old one is a separate `uniform automation delete`.\n\n## Decision procedure\n\nState, in order, before opening any file: Kind (`handler` | `scout` | `hybrid`), Binding (`stage <id>` | `event <name>` | `none`), Triggers (the array), Filter (the CEL, or `none`), Identity (`role <name from the user>` | `none`).\n\n**1. Kind.** Handler for deterministic work. Reach for AI only where the task is judgement-shaped. `defineScoutAutomation` when the whole job is agentic; `defineAutomation` plus `ScoutClient` when you need control around one AI step. [Code automations](https://docs.uniform.app/docs/guides/automations/code-automations) are this skill's path.\n\n**2. Binding.** Work *to* content binds to a `workflow.transition` on a stage the automation owns. A save is not a binding. One owning automation per auto-transitioning stage. [workflows](https://docs.uniform.app/docs/guides/composition/workflows).\n\n**3. Triggers.** Always an array. Events, `schedule`, and `incomingWebhook` compose and reduce to one `eventType`-discriminated `input` union. `aiTool` is exclusive — it runs as the invoking caller. At most one `schedule`, at most one `incomingWebhook`, no duplicate event names. Event names and payloads: `@uniformdev/webhooks`, [webhooks](https://docs.uniform.app/docs/guides/webhooks), [event catalog](https://www.svix.com/event-types/us/org_2HgMLYs57QWpjfM80UPmW98qTgT/).\n\n**4. Filter.** Cheap predicates go in the CEL `filter`; keep filters total (only fields the payload schema guarantees). Expensive predicates and authenticity checks stay in the handler. A miss records no run. [filtering](https://docs.uniform.app/docs/guides/automations/triggers#filtering).\n\n**5. Identity.** No `permissions` means no Uniform API access. Role names are not discoverable: ask the user which role to grant, or to create one. They can only grant roles they hold; automations cannot run as a team admin. [the automation identity](https://docs.uniform.app/docs/guides/automations/code-automations#the-automation-identity).\n\nWhen Kind is `scout` or `hybrid`, read [references/scout.md](references/scout.md). Then read [references/best-practices.md](references/best-practices.md) — workflow-stage, filters, outcomes, delivery, limits, and webhook auth if Triggers includes `incomingWebhook`.\n\nThen write:\n\n6. Module shape: [references/sdk-api.md](references/sdk-api.md). Copy a [template](templates/) when the types don't lead you there — stage (`on-workflow-stage`), Scout in a handler (`scout-client`), Scout instructions (`scout-workflow-stage`).\n7. Filter first, then handler. Explicit outcome on every path.\n8. Unit test by calling the default export; invoke contract in [references/sdk-api.md](references/sdk-api.md).\n9. Walk [references/review-checklist.md](references/review-checklist.md) before deploying.\n10. Leave deploy to the user: `npx uniform automation deploy` (or a project npm script). [CLI automation](https://docs.uniform.app/docs/guides/cli/commands/automation).\n\n## Guardrails\n\n- Reads that will be written back: invoke `uniform-sdk`, then return here.\n- Secrets: literal `process.env.UNIFORM_ENV_*`.\n- Logs: operation + entity id.\n- Notifications: wrap, continue.\n- Handlers: idempotent.\n"
}

SHA-256 of public snapshot: 3ca7f2122e0ff76a1521a8a5975faaf940825d24508ecb68ca7c6bf9bf1c1bb0