---
name: workflow-designer
description: Design a new durable AI agent workflow, or tune an existing one, so it runs reliably with a clear trigger, inputs, approval gate, output contract, state log, and quiet path. Use when the user asks to "create a workflow", "automate this recurring task", "turn this playbook into something an agent runs", "make this cron less noisy", or points at an existing automation that is brittle, spammy, vague, or ignored. Produces a written workflow spec and, for existing workflows, a keep / tune / merge / retire decision with a migration plan. It does not install schedulers or deploy anything; it designs and documents.
license: MIT
metadata:
  title: Workflow Designer
  summary: Turn a recurring task into a durable agent worker with a trigger, approval gate, output contract, state log, and quiet path.
  category: agent-ops
  tags: [automation, agents, workflows, operations]
  version: "1.0.0"
  author: Austin Christensen
  publisher: Christensen Equity
  related: [skill-authoring, promise-ledger, agent-task-brief, sop-writer]
---

# Workflow Designer

Do not design "an AI chat". Design a worker. A durable workflow is one another agent can run next week without asking what to read, what to produce, when to speak up, or when to stay quiet.

## When to use

- The user wants a recurring task (daily triage, weekly report, lead research, CI watch) handled by an agent.
- A playbook, post, or habit should become a repeatable procedure.
- An existing workflow is noisy, duplicated, stale, or produces output nobody reads.

## The durable-worker contract

Every workflow needs all ten:

- **Role**: what the agent owns, and what it does not.
- **Trigger**: what starts it (schedule with timezone, event, webhook, manual phrase, state condition).
- **Inputs**: sources of truth it reads, plus prior state.
- **Tools**: the exact skills, scripts, and systems it may use, and the ones that are off-limits.
- **Process**: repeatable steps with explicit decision points.
- **Approval gate**: which actions need a human yes before they happen.
- **Output**: the smallest useful deliverable, in a fixed format.
- **Review log**: where each run records what it checked, decided, sent, or skipped.
- **Quiet path**: when the run ends in `NO_ACTION` and notifies nobody.
- **Failure mode**: what happens when data is missing, a tool fails, or the result is not worth sending.

## Workflow

### Designing a new workflow

1. **Name the worker** concretely. "Daily Inbound Lead Triage" beats "Sales Automation".
2. **Define the job** in one sentence, plus what it explicitly does not own.
3. **Choose one trigger.** Use a schedule for exact timing, a batched periodic check for low-urgency polling, an event for reactions. Avoid several overlapping reminders for the same job.
4. **Map existing assets** (skills, scripts, tables, repos, calendars, issue trackers) and reuse them before inventing new plumbing.
5. **Set the approval boundary.** Internal, reversible work can run directly. Emails, posts, customer messages, purchases, merges, and deletions default to "prepared and waiting for approval".
6. **Write the output contract.** Short enough to read on a phone; link to the full artifact instead of pasting it.
7. **Add state** so the workflow knows what it already checked, sent, or skipped, and only reports what changed.
8. **Define the quiet path** precisely: the conditions under which the run logs and stays silent.
9. **Add verification**: how the agent proves the run completed (log written, rows queued, drafts saved, checks passed).
10. **Hand over the spec for review** before anyone installs or schedules it.

### Optimizing an existing workflow

1. **Inventory reality first.** Read the actual config, script, schedule, and recent output. Do not optimize from memory.
2. **Score it** against the contract: trigger quality, input freshness, tool fit, approval boundary, output usefulness, statefulness, quiet path, failure handling.
3. **Pick one move**:
   - **Keep**: it works; just document it.
   - **Tune**: same workflow, better output, state, quiet path, or approvals. Prefer this when unsure.
   - **Merge**: fold overlapping checks into one ranked summary.
   - **Retire**: it creates noise, duplicates another workflow, or no longer matters.
4. **Fix the weakest link**:
   - Too frequent: raise the notification bar and add a quiet path.
   - Ignored: make the output smaller and decision-first.
   - Repeats stale facts: add state and change detection.
   - Asks too much of the user: prepare the artifact or approval queue first.
   - Acts externally too freely: add an approval gate.
   - Fails silently: log degraded runs and send one short blocker alert.
5. **Write a migration plan**: what changes, what old trigger gets disabled, how the first run avoids duplicate notifications, how to verify, and how to roll back.

## Output

Write the spec in this shape (as a markdown file wherever the user keeps workflows, or in chat):

```markdown
# <Workflow name>
## Purpose
## Owner / role
## Trigger            (include timezone; say if it replaces an existing trigger)
## Inputs             (required, optional, state to read first, known-stale sources)
## Tools              (allowed; off-limits)
## Process            (numbered, with decision points)
## Approval rules
## Output contract    (exact format, including the NO_ACTION path)
## Review log         (location; fields: time, trigger, inputs checked, decisions, sent/suppressed, blockers)
## Failure handling
```

Useful output patterns:

- **Command center**: status, top item, ready for review, needs you, safely ignored.
- **Approval queue**: item, why it is ready, draft link, risk notes, the exact approve action.
- **Blocker monitor**: ranked blockers with next moves, plus a one-line list of clean checks.

For an optimization, finish with: decision (keep/tune/merge/retire), main fix, new output, state location, and what still waits for approval.

## Guardrails

- Do not fabricate research, metrics, prior state, or tool results. Missing data marks the run blocked or degraded.
- No external action (send, post, buy, merge, delete) without approval unless the user has explicitly granted that authority for this workflow.
- Escalate decisions and blockers, not activity logs. A workflow must not become another inbox.
- Do not add a new trigger when an existing workflow can batch the check.
- Do not remove behavior the user may rely on without naming it and giving a rollback path.
- Keep private context out of shared outputs and artifacts.

## Done when

Another agent could run the workflow without asking what to read, which tools to use, when to run, what to produce, when to ask, when to stay quiet, where to record state, and how to verify or roll back.
