Routine Design
Routines are autonomous scheduled tasks owned by individual minions. They execute skill pipelines on a cron schedule without HQ involvement.
Routine structure
Section titled “Routine structure”{ "name": "morning-report", "pipeline": ["write-daily-report", "send-to-slack"], "content": "Write a daily report and post it to the team Slack channel", "cron_expression": "0 9 * * 1-5", "minion_id": "<uuid>", "workspace_id": "<uuid|null>"}| Field | Type | Description |
|---|---|---|
name | string | Routine name |
pipeline | string[] | Ordered list of skill IDs to execute |
content | string|null | Description (Markdown) |
cron_expression | string|null | Cron schedule |
minion_id | string | UUID of the owning minion |
workspace_id | string|null | Optional workspace this routine is bound to. null runs the routine in minion-wide context (only minion-wide secrets/vars are injected); a UUID binds it to a workspace, so workspace variables and workspace-scoped secrets are also exposed at execution time. MINION_ROUTINE_WORKSPACE_ID is exported to the session in either case |
Pipeline execution
Section titled “Pipeline execution”All skills in a routine pipeline run within a single CLI session. This means context is preserved across steps — the output of one skill is available to the next.
flowchart LR A["write-daily-report"] --> B["send-to-slack"]When the CLI session completes, the runner reports the outcome (success/failure and a log-tail summary) to the minion’s local outcome API automatically.
Routines vs Workflows
Section titled “Routines vs Workflows”Both routines and workflows execute skills on a schedule, but they differ in scope and governance. A routine runs a linear skill pipeline within one minion; a workflow is a project-scoped DAG (node/edge graph) that can branch, fan out, and span multiple minions.
The core distinction
Section titled “The core distinction”Think of routines as a personal crontab and workflows as a CI/CD pipeline.
| Aspect | Routine | Workflow (DAG) |
|---|---|---|
| Scope | One minion, self-contained | Project-wide, multi-minion coordination |
| Shape | Linear skill pipeline | Node/edge graph (parallel, fan-out/join, conditional) |
| Owner | Individual minion | Project |
| Role assignment | None — the owning minion runs everything | Per-node roles (PM / Engineer) |
| Review gates | None | Review nodes with human/minion approval and revision loops |
| Versioning | None — always uses latest skill versions | Full version history with immutable snapshots |
| Execution tracking | Local only (minion-side, last 200 runs) | Full audit trail in HQ database |
| Trigger | Cron on minion (autonomous) | Cron or on-demand from HQ |
When to use which
Section titled “When to use which”Use a routine when:
- A single minion can complete the entire task
- No human review is needed between steps
- The task is a personal habit (daily standup prep, end-of-day review, inbox triage)
- You want lightweight, autonomous execution
Use a workflow when:
- Multiple minions need to collaborate (e.g., engineer analyzes, PM reviews)
- Human approval gates are required before certain nodes
- The task has real dependencies — parallel branches, fan-out over a list, or conditional routing
- You need an audit trail of every execution with node-level tracking
- Reproducibility matters — pinning exact skill versions is important
Example: daily report
Section titled “Example: daily report”The same skills can be used in both routines and workflows depending on the required governance level.
As a routine (one minion, autonomous):
flowchart LR subgraph "Routine: morning-report (weekdays 9:00)" A["write-daily-report"] --> B["send-to-slack"] endAs a workflow (project-coordinated DAG, with a review gate):
flowchart LR subgraph "Workflow: team-daily-report" A["Skill: write-daily-report<br/><i>engineer</i>"] --> R{"Review<br/><i>pm</i>"} R -->|approved| C["Skill: send-to-slack<br/><i>pm</i>"] R -. revision .-> A endNotice that write-daily-report and send-to-slack are the same skills in both cases. The difference is how they are orchestrated — a workflow can add review gates, branches, and fan-out — not what the skills do.
Cron schedules
Section titled “Cron schedules”Standard cron expressions are supported (same syntax as workflow schedules).
| Expression | Execution timing |
|---|---|
0 9 * * * | Every day at 9:00 |
0 9 * * 1-5 | Weekdays at 9:00 |
0 18 * * * | Every day at 18:00 |
0 0 * * 1 | Every Monday at 0:00 |