← Files UniformARCHIVED FILE
skills/uniform-automations/templates/scout-workflow-stage.automation.ts
2.37 KB · Oct 5, 2026 · 18:33 UTC
/**
* Scout automation — no handler. Adapt: the role the user named, workflow and stage IDs, and the instructions.
* A later automated stage must be a different automation. Structure and outcome contract: [scout.md](../references/scout.md).
*/
import { defineScoutAutomation } from '@uniformdev/automations-sdk';
const AI_WORKFLOW_ID = '00000000-0000-0000-0000-000000000001';
const AI_REVIEW_STAGE_ID = '00000000-0000-0000-0000-000000000004';
export default defineScoutAutomation(
{
name: 'AI workflow: content review',
description: 'Reviews content entering the AI Review stage and approves or rejects it via Scout.',
triggers: [
{
type: 'workflow.transition',
filter: `input.newStage.workflowId == "${AI_WORKFLOW_ID}" && input.newStage.stageId == "${AI_REVIEW_STAGE_ID}"`,
},
],
permissions: { role: 'contentReviewerAutomation' },
},
`## Step 1: Review the content
You are an expert copy editor responsible for approving or rejecting content edits.
The content ready for your review is the entity in the preceding trigger payload.
You check the en-US content only (as well as non-localized values), and you ignore non-prose content (URLs, dropdown lists, etc).
Check for:
- Completeness: no placeholder/lorem-ipsum/TODO/dummy text, empty fields, or obviously truncated content.
- Coherence: the content makes sense overall and has a consistent message. When something is ambiguous but plausibly intentional, approve.
- Quality: grammar, clarity, etc.
If an issue is unambiguously fixable (e.g. a typo), fix it directly. Any edits you make must not change meaning; if meaning must be changed, reject.
The bar for rejection is high — you must be confident that the content is not appropriate for publication to reject it.
## Step 2: Execute the workflow transition
Execute the Approve or Reject workflow transition on the content entity.
## Step 3: Report the outcome
If you reject the content, first post the rejection to Slack via the Slack notification tool, passing the entity's name and \`entity.url\` from the trigger payload.
Lead the message with a concise overall summary, then one bullet point per blocking issue. You must specifically state reasons for rejection.
Reporting your run outcome: report \`failure\` if you could not execute the transition. Report \`rejected\` only if the trigger payload was not something you were asked to review.`
);
SHA-256: f03e27b2c29e3d2e4264e4f62d3ca53ff7531b4b77be623b0e803f070362f569