Workflows
Authors and operates Workflows v2 definitions through the `workflow` CLI: scaffold a definition, validate it until clean, graph it, run it locally, put a schedule on it, link workflows with after triggers or workflow steps, and inspect definitions and runs. USE WHEN new workflow, create a workflow, make a workflow, I want a workflow for, workflow for doing this, define a workflow, remind me, set a reminder, follow up on, check back on, scheduled task, recurring job, schedule this, run this every, run it nightly, run workflow, run the workflow, link these workflows, chain workflows, run after, when this finishes run, validate workflow, workflow graph, list workflows, what workflows do I have, did the workflow run, pause workflow. NOT FOR the inventory of everything LifeOS runs, missing or orphaned jobs and acknowledgements (use Workflows.ts in LIFEOS/WORKFLOWS), Cloudflare Worker deploys (Cloudflare), or building a whole skill (CreateSkill).
By- name:
- Workflows
- description:
- Authors and operates Workflows v2 definitions through the `workflow` CLI: scaffold a definition, validate it until clean, graph it, run it locally, put a schedule on it, link workflows with after triggers or workflow steps, and inspect definitions and runs. USE WHEN new workflow, create a workflow, make a workflow, I want a workflow for, workflow for doing this, define a workflow, remind me, set a reminder, follow up on, check back on, scheduled task, recurring job, schedule this, run this every, run it nightly, run workflow, run the workflow, link these workflows, chain workflows, run after, when this finishes run, validate workflow, workflow graph, list workflows, what workflows do I have, did the workflow run, pause workflow. NOT FOR the inventory of everything LifeOS runs, missing or orphaned jobs and acknowledgements (use Workflows.ts in LIFEOS/WORKFLOWS), Cloudflare Worker deploys (Cloudflare), or building a whole skill (CreateSkill).
Workflows
The principal says "I want a new workflow for doing this." This skill turns that into a definition in the definitions home, validated by the workflow CLI, and visible on the Workflows page in Pulse.
The CLI is the source of truth: bun LIFEOS/WORKFLOWS/workflow.ts help --json lists the commands that exist, their usage strings and exit codes. The format and the system doctrine are in LIFEOS/DOCUMENTATION/Workflows/WorkflowsSystem.md. This skill names only commands that help --json lists, plus LIFEOS/WORKFLOWS/engine/schedule-install.ts, which after a hand edit checks the schedule compiles and the dispatcher is loaded, and is not in that catalog.
Ideal State
- Every definition passes
workflow validate(exit 0) before it is reported done, and any deploy, send or pay step declares itsside_effectsand sits under ahumanapproval upstream. - A scheduled or reminder request becomes a
<name>.workflow.yamldefinition with its trigger enabled for the dispatcher, never an issue alone, and shows inworkflow listand Pulse. - Every report states the validate-vs-run distinction that applies:
validatechecks shape,runexecutes for real and may spend money or park on a human gate.
Intent Routing
| Workflow | Trigger | File |
|---|---|---|
| Create | "new workflow", "I want a workflow for", "make a workflow that", "define a workflow" | Intents/Create.md |
| Run | "run workflow", "run it", "run the workflow", "dry run" | Intents/Run.md |
| Reminder | "remind me to", "set a reminder", "follow up on", "check back on", any one-off thing due later | Intents/Reminder.md |
| Schedule | "schedule this", "run this every night", "run it once at", "pause workflow" | Intents/Schedule.md |
| Link | "link these workflows", "run B after A", "chain workflows", "call a workflow from a workflow" | Intents/Link.md |
| Inspect | "list workflows", "did it run", "what does this workflow do", "why did it fail" | Intents/Inspect.md |
| File | Read when |
|---|---|
Format.md |
authoring reference — load before writing any definition |
EvalState.md |
the latest authoring-eval scores (auto-generated, machine-owned) |
Quick Reference
- Definitions live in
LIFEOS/USER/WORKFLOWS/as<name>.workflow.yaml; the file stem equalsname:. - Core commands:
new,list,validate,graph,next,run,runs,schedule,pause,resume,link,show,step,put,remove;help --jsonhas the full catalog. Every one takes--json. Exit 0 success, 1 invalid or failed, 2 usage. - Every
commandstep declaresside_effects([none]when it touches nothing). A command line that deploys, sends or pays (anydeploysubcommand or deploy script, a git push,gmail.ts send, Relaysend.ts,YouTubeUploadupload,dd-cli orderand the ordering skill's maintainer-side submit wrapper) must declare the matching effect, orvalidaterefuses it. - Money, deploy and outbound steps need a
humanapproval upstream (a human step with the default output,{approved, note}). Outbound to the principal only (recipient: principal) is exempt. At run time a decline stops the gated step even without awhen; addwhen: { ref: steps.<human>.output.approved, equals: true }so a decline skips it and the run ends cleanly. - Local
runexecutes all seven step kinds (RUNNABLE_KINDSinengine/runner.ts). Ahumanstep parks the run on disk and texts a 👍/👎 approval;modelandagentsteps call the OpenAI lanes and cost money; aworkflowstep runs the child as its own ledger run. Onlyruns_on: cloudis refused locally. - Scratch runs use
LIFEOS_WORKFLOWS_DIRandLIFEOS_WORKFLOWS_LEDGERso they leave the real home and ledger alone.
Data & Config
Customizations, when present: <configRoot>/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/Workflows/ (configRoot is $CLAUDE_CONFIG_DIR when set, else ~/.claude).
Setup
Nothing to configure for authoring. The skill needs bun and the LIFEOS/WORKFLOWS/ engine that ships with LifeOS. Definitions go in LIFEOS/USER/WORKFLOWS/ (create the folder if it is missing; LIFEOS_WORKFLOWS_DIR points the CLI at another one). Status check: bun LIFEOS/WORKFLOWS/workflow.ts help --json prints the command catalog and exits 0. Local schedules are evaluated by one launchd job, com.lifeos.workflows-dispatcher, so scheduled and reminder workflows that run on this machine need macOS; defining and validating a workflow does not use launchd.
Gotchas
- Validator refusals are the design, not obstacles (2026-09-28).
Step "deploy" declares side effects deploy but no human step is among its ancestors.is the fix-the-design signal. Add thehumanstep; do not removeside_effectsto pass. - An
afterlink needs its upstream on disk (2026-09-28).after: upstream workflow "no-such-flow" does not existappears when the trigger names a workflow that has no definition file yet. Create or fix the upstream first. - Lanes are a closed list (2026-09-28).
Step "summarize" lane must be one of openaiLow, openaiMedium, sol, astra.A model name inlane:fails. - Validating is not running (updated 2026-10-09).
validatechecks shape;runexecutes for real. Every step kind runs locally, so amodeloragentstep spends money and ahumanstep parks the run until it is answered. Onlyruns_on: cloudis refused by a local run; it runs on its Worker afterworkflow deploy. Say which applies when reporting. - A command step with no
side_effectsis refused (2026-10-09).Step "x" is a command step and must declare side_effectsmeans say what it touches;[none]is fine for a step that only computes. Declaring less than the command line does, such as a send declared as[read], is refused too. - A schedule fires only while the dispatcher is alive (updated 2026-10-24). No workflow has its own launchd job. One job,
com.lifeos.workflows-dispatcher, runsengine/dispatcher.ts serveunder KeepAlive, evaluates every localschedule,intervalandoncetrigger each minute, and startsafter:andeventworkflows; cloud workflows are scheduled by their own runner.workflow schedule|pause|resume|putreportscheduled by com.lifeos.workflows-dispatcherorthe dispatcher skips it. After a hand edit oftriggers,schedule-install.ts install <name>only checks the schedule compiles, removes any leftover per-workflow job and makes sure the dispatcher is loaded. Claim a schedule is live only when the definition validates with the trigger enabled,launchctl list | grep com.lifeos.workflows-dispatchershows the dispatcher,bun LIFEOS/VIGIL/Vigil.ts heartbeat --jsonshows itsworkflows-dispatcherrow not stale, andworkflow next <name> --jsonshows the next fire. The direction is Cloudflare as the clock and the Mac as a worker (Workflows ISA F27). - A reminder goes to Vigil as
--class prep, never by severity (moved from Reminder.md, 2026-10-12). The class, not the severity, decides Vigil delivery:prepis a fixed-rule class, so the next Vigil tick texts it as written. It skips the 72h story hold, quiet hours and the daily text budget, and the editor never rewords or demotes it. Anopstext can be held, and a held text is never sent later. - Clock times follow the principal, not the identity file (2026-10-12). A clock-time trigger takes its zone from
principalTimezone(), the current-location zone. A zone copied from the identity file would make "remind me at 9" fire at 06:00 local for a principal travelling three zones west of home. A stored schedule keeps the zone it was written with, so the report names that zone. - Reminders and scheduled work are workflows, never issues alone (2026-10-07). An issue has no schedule and nothing that texts the principal, so a reminder filed only as an issue never fires. Every reminder, follow-up and recurring job is a definition here; an issue may only link to it.
- Two systems share the word "workflow." This skill authors definitions with the
workflowCLI. The inventory of every job LifeOS runs, with missing and orphan reconciliation, isWorkflows.ts. Route "what is broken or missing" there. - A command step gets only PATH, HOME, USER and LOGNAME, plus the names listed under
env:(2026-09-30; USER and LOGNAME added 2026-10-25 so the claude CLI can find its login). A variable set on a test run, such asNODE_ENV=testmeant to stop a send, never reaches the step unless the step declares it, so an undeclared test flag lets a test run send for real. Before testing any step with outbound side effects, declare the test flag underenv:and confirm the test output shows the skip. - No interpolation (2026-09-28).
"Hello ${name}"in an argv or prompt is a literal string. Pass values throughwithand$ref, and let the command build text from its stdin JSON.
Examples
Example 1: create
User: "I want a new workflow that builds the site, waits for my OK, then deploys it"
→ Create.md: workflow new, author build (command) → approve (human) → deploy (command, side_effects: [deploy], when approve said yes)
→ workflow validate exits 0, workflow graph summarised in four lines
→ reports the file path and what runs locally
Example 2: schedule
User: "schedule this to run every morning at 7"
→ Schedule.md: adds a schedule trigger in the principal's current zone (principalTimezone()), validates, prints the next fire times with workflow next
→ workflow schedule writes the trigger and reports scheduled by com.lifeos.workflows-dispatcher; the loaded dispatcher, a fresh heartbeat and workflow next confirm it will fire
Example 3: link
User: "run the report workflow after the export finishes"
→ Link.md: adds an after trigger on the report, checks the export's output schema fits the report's input, validates both, reads the connection class from workflow graph
More in this playbook
Safe to turn on
Use this skill when an agent or person is about to create, change or enable an automation inside someone else's account or a shared environment: "create this workflow", "build it in the customer's account", "turn it on", "go live", "deploy this automation". Produces a proposal the human approves, an automation created in the off state, and a short list of what only the human can finish.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.


