You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2352509
Browse filesBrowse the repository at this point in the historyBrowse files
Rewrite prose across all 8 relayflows pages to read as plain human
technical writing:
- Cut heavy em-dash use down to occasional, purposeful asides instead
of a clause-joining crutch in nearly every sentence.
- Removed the repeated 'X, not Y' contrastive tic (used dozens of
times: 'not a mockup', 'not vibes', 'not undone', 'not completed',
etc.) in favor of direct positive statements.
- Removed the rhetorical-question opener in reliability.mdx ('what
makes that true?').
- Removed mid-sentence **bold-for-drama** emphasis on ordinary words
(dirty not undone, before a journal entry is ever written, exactly-
once means exactly-once effects).
- Renamed punchy contrarian section headers to plain descriptive ones:
'Verification instead of vibes' / 'Verification, not vibes' (used
on two different pages) -> 'Verification'; 'Kill it mid-step. Resume
it. Nothing doubles.' -> 'Crashing mid-step'; 'A SaaS is a directory,
not an API client' -> 'Integrations'; 'The daemon doesn't leave you
guessing either' -> 'The daemon'.
- Removed repeated 'That's a real captured run' / 'That's the whole
kernel-level vocabulary' sentence-opener scaffolding.
- Fixed 'Memory: recall, cite, learn' header to just 'Memory' (the
three real methods are recall/why/learn, not recall/cite/learn).
No technical claims, code samples, captured CLI output, or evidence
changed. Verified with:
cd web && npx tsc --noEmit -p . -> exit 0, no errors
cd web && npx vitest run -> 11 files, 32 passed
cd web && npm run build -> exit 0, all 8 relayflows pages
prerendered
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: web/content/docs/relayflows/build.mdx
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@ title: 'Build a flow'
3
3
description: 'Write your own steps, verification, and permissions — TypeScript or YAML, same journal underneath.'
4
4
---
5
5
6
-
Start with the job in one sentence: what runs, in what order, and what proves each step actually did its job. If you can't state that proof yet, figure it out before you wire the step up, not after.
6
+
Start with the job in one sentence: what runs, in what order, and what proves each step did its job. If you can't state that proof yet, figure it out first, before wiring the step up.
7
7
8
8
## Two ways to author the same thing
9
9
10
-
**YAML** describes a fixed set of steps and their dependencies as data — nothing runs, so `flows check` or a CI gate can read and validate it. **TypeScript** calls the same primitives imperatively, as ordinary code. Both compile down to the same journal.
10
+
**YAML** describes a fixed set of steps and their dependencies as data, so `flows check` or a CI gate can read and validate it without running anything. **TypeScript** calls the same primitives imperatively, as ordinary code. Both compile down to the same journal.
11
11
12
12
<CodeGroup>
13
13
```typescript TypeScript
@@ -48,14 +48,14 @@ steps:
48
48
```
49
49
</CodeGroup>
50
50
51
-
Reach for YAML when you want the whole flow readable at a glance and checkable in CI. Reach for TypeScript when a step's next move depends on what a previous one returned — an `f.human` approval, ordinary `if`/`for` logic, an `f.dispatch` to a child flow.
51
+
Reach for YAML when you want the whole flow readable at a glance and checkable in CI. Reach for TypeScript when a step's next move depends on what a previous one returned: an `f.human` approval, ordinary `if`/`for` logic, an `f.dispatch` to a child flow.
52
52
53
53
<Note>
54
-
`recoveryMode`, `permissions`, `surfaces`, and `budget` — the richer
55
-
fields covered in the next section — are YAML/JSON fields only today.
56
-
TypeScript's `Ctx.agent` takes just `{ task, workspace }`. If a step needs
57
-
them, author it in YAML and either run it directly or have a TypeScript
58
-
flow reach it with `f.dispatch`.
54
+
`recoveryMode`, `permissions`, `surfaces`, and `budget`, the richer
55
+
fields covered further down, are YAML/JSON fields only today.
56
+
TypeScript's `Ctx.agent` takes just `{ task, workspace }`. If a step
57
+
needs them, author it in YAML and either run it directly or have a
58
+
TypeScript flow reach it with `f.dispatch`.
59
59
</Note>
60
60
61
61
## The context a flow body gets
@@ -71,16 +71,16 @@ interface Ctx {
71
71
}
72
72
```
73
73
74
-
That's the whole kernel-level vocabulary a step body speaks: `run`, `llm`, `agent` for work; `human`, `dispatch`, `done` for control. `human` parks the run on a durable await — it isn't a blocking call that ties up a process, it's a wait the journal can survive a restart across. `dispatch` hands work to a named child flow and returns its typed result.
74
+
This is the whole kernel-level vocabulary a step body speaks: `run`, `llm`, `agent` for work, `human`, `dispatch`, `done` for control. `human` parks the run on a durable await instead of a blocking call — it's a wait the journal can survive a restart across. `dispatch` hands work to a named child flow and returns its typed result.
75
75
76
-
## Verification, not vibes
76
+
## Verification
77
77
78
78
Every step's exit code is checked automatically. On top of that:
79
79
80
80
- **`output_contains`** — an opt-in string match against the step's output. Fast to write, good for a smoke check.
81
81
- **`json_schema`** on an `llm` step — the model's reply must parse and validate against the schema before anything downstream sees it.
82
82
83
-
A step that fails its check doesn't get to report success. It's `verification_failed`, journaled with exactly which check failed — never a silent pass because the agent said it was fine.
83
+
A step that fails its check is recorded as `verification_failed`, with exactly which check failed. The agent insisting it went fine doesn't override that.
84
84
85
85
## Permissions and recovery
86
86
@@ -106,11 +106,11 @@ An `agent` step declares what it's allowed to touch — `fileGlobs`, `accessPres
106
106
value: agent-ok
107
107
```
108
108
109
-
- **`reset`** (the default) — the next attempt starts from the pinned workspace revision. Clean slate, no half-finished edit left lying around.
109
+
- **`reset`** (the default) — the next attempt starts fresh from the pinned workspace revision, with no half-finished edit left behind.
110
110
- **`inspect`** — the next attempt starts inside the dirty workspace, with the failed attempt's trajectory tail injected as context, and decides whether to continue or redo.
111
111
- **`manual`** — parks the run as `needs_human` with a diff of the pinned revision against whatever's actually there.
112
112
113
-
`maxIterations`caps how many attempts a step gets before one of those three outcomes has to happen. A run-level `budget` (`maxTokensIn`, `maxTokensOut`, `maxDollars`) caps the whole flow the same way — declared once, enforced by the kernel, not tracked by hand.
113
+
`maxIterations`caps how many attempts a step gets before one of those three outcomes has to happen. A run-level `budget` (`maxTokensIn`, `maxTokensOut`, `maxDollars`) caps the whole flow the same way, declared once and enforced by the kernel instead of tracked by hand.
Validates the spec — schema, step graph, verification blocks, and whether every declared CLI actually exists and is authenticated. Nothing runs; nothing is spawned. This is the same preflight a run does before its first step, exposed on its own so a broken spec fails in CI, not at minute 27 of a real run.
23
+
Validates the spec: schema, step graph, verification blocks, and whether every declared CLI actually exists and is authenticated. Nothing runs and nothing is spawned. This is the same preflight a run does before its first step, exposed on its own so a broken spec fails in CI instead of at minute 27 of a real run.
24
24
25
25
`check` takes a declarative `flow.yaml` or `spec.json` — it validates data, so an authored `.flow.ts` file isn't a valid argument here. A TypeScript flow gets the same preflight automatically, run inline at the top of `flows run`.
`tick` is a durable schedule: each interval gets a unique ID, so a restart can't fire the same interval twice, and `--max-catch-up` bounds how many missed intervals get replayed if the process was down. `hn-monitor` is a narrower, named trigger built the same way. Both report whether they're still alive — neither can silently stop firing for weeks and go unnoticed.
64
+
`tick` is a durable schedule. Each interval gets a unique ID, so a restart can't fire the same interval twice, and `--max-catch-up` bounds how many missed intervals get replayed if the process was down. `hn-monitor` is a narrower, named trigger built the same way. Both report whether they're still alive, instead of quietly going dark for weeks without anyone noticing.
Copy file name to clipboardExpand all lines: web/content/docs/relayflows/cloud.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: 'Cloud'
3
3
description: 'Run a flow on hosted infrastructure instead of your own machine — the same verification, the same journal.'
4
4
---
5
5
6
-
A flow doesn't need your laptop up to run. `flows run --cloud` submits the exact same spec to hosted infrastructure — the Rust runtime still executes and verifies every step; only where it runs changes.
6
+
A flow doesn't need your laptop up to run. `flows run --cloud` submits the exact same spec to hosted infrastructure. The Rust runtime still executes and verifies every step; only where it runs is different.
7
7
8
8
## Run it
9
9
@@ -12,7 +12,7 @@ flows run --cloud examples/ship-feature.flow.yaml
12
12
flows run --cloud --wait --json examples/ship-feature.flow.yaml
13
13
```
14
14
15
-
Without `--wait`, exit `0` means the run was **accepted**, not completed — you get a run ID back and the run continues on its own. With `--wait`, exit `0` means Cloud reported the run `completed` with a validated `success` reason. A failed or cancelled run, or an observation failure, exits `1`.
15
+
Without `--wait`, exit `0` means the run was **accepted**. You get a run ID back and the run continues on its own; it hasn't completed yet. With `--wait`, exit `0` means Cloud reported the run `completed` with a validated `success` reason. A failed or cancelled run, or an observation failure, exits `1`.
Copy file name to clipboardExpand all lines: web/content/docs/relayflows/introduction.mdx
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,22 @@
1
1
---
2
2
title: 'Relayflows'
3
-
description: 'A deterministic script over agentic primitives — steps you can inspect, verify, and resume, not a prompt and a hope.'
3
+
description: 'A deterministic script over agentic primitives: steps you can inspect, verify, and resume.'
4
4
---
5
5
6
-
Relayflows turns a coding-agent task into steps you can inspect and verify. A flow combines shell commands, model calls, and coding agents with a journal that records what each step did and why it completed. Start with a small local flow; add verification as the task grows.
6
+
Relayflows turns a coding-agent task into steps you can inspect and verify. A flow combines shell commands, model calls, and coding agents with a journal that records what each step did and why it completed. Start with a small local flow, then add verification as the task grows.
7
7
8
-
Every effect is journaled before it's real. If a step's write to that journal fails, the step fails — there's no silent fallback and no "it probably worked." That's the trade Relayflows makes everywhere: less magic, more evidence.
8
+
Every effect is journaled before it's treated as real. If a step's journal write fails, the step fails. There's no silent fallback and no "it probably worked." Relayflows makes that trade everywhere: less magic, more evidence.
9
9
10
10
## The ladder
11
11
12
12
Every flow is built from the same small set of rungs, and you only climb as high as the task needs:
13
13
14
-
1.**`run`** — a shell command. No model anywhere.
15
-
2.**`llm`** — a bare model call. Prompt in, verified output out — no workspace, no tool use.
14
+
1.**`run`** — a shell command. No model involved.
15
+
2.**`llm`** — a bare model call. Prompt in, verified output out, no workspace, no tool use.
16
16
3.**`agent`** — a harnessed coding agent in a workspace. Returns an artifact, not just text.
17
17
4.**`human` / `dispatch` / `done`** — durable approval, handing work to a child flow, and a typed finish.
18
18
19
-
Most flows on day one are just `run` and `llm`. `agent`is the rung you climb to when the step needs hands on a real workspace.
19
+
Most flows only need `run` and `llm`. Climb to `agent`once a step needs hands on a real workspace.
20
20
21
21
## A whole flow
22
22
@@ -50,11 +50,11 @@ steps:
50
50
```
51
51
</CodeGroup>
52
52
53
-
Running a shell command (`f.run` in TypeScript, a `deterministic` step in YAML) returns its output. Handing a task to a coding agent (`f.agent` / an `agent` step) returns a summary, not a raw transcript. And finishing closes the run with one reason from a closed set — `success`, `step_failed`, `canceled`, or `budget_exceeded` — so there's no fifth option a caller has to guess about.
53
+
`f.run` (a `deterministic` step in YAML) executes a shell command and returns its output. `f.agent` (an `agent` step) hands a task to a coding agent and returns a summary rather than a raw transcript. `f.done` finishes the run with one reason from a closed set: `success`, `step_failed`, `canceled`, or `budget_exceeded`. There's no fifth option to guess about.
54
54
55
-
## Verification instead of vibes
55
+
## Verification
56
56
57
-
An agent's failure mode is wrong output, not no output — a retry built for "it crashed" doesn't catch "it returned something plausible and wrong." So a step's completion isn't the agent's opinion; it's a check the kernel runs on what came back.
57
+
An agent rarely fails by crashing. It fails by returning something plausible and wrong, which a plain retry-on-error never catches. So a step's completion is decided by a check the kernel runs against the real output, not by the agent's own account of what happened.
58
58
59
59
```yaml
60
60
version: '0.1.0'
@@ -81,13 +81,13 @@ steps:
81
81
value: agent-ok
82
82
```
83
83
84
-
Every step's exit code is checked automatically. On top of that, `output_contains` is an opt-in string match, and an `llm` step can instead require its output to match a `json_schema`. Either way, a step that fails verification doesn't get to report success — it's `verification_failed`, journaled and visible.
84
+
The exit code is always checked. On top of that, `output_contains` adds an opt-in string match, and an `llm` step can require its output to match a `json_schema` instead. A step that fails verification is recorded as `verification_failed` in the journal — it doesn't get to report success on its own say.
85
85
86
-
`recoveryMode: reset` is the agent step's crash contract: if this step dies mid-edit, the next attempt starts from the pinned workspace revision, not from whatever half-finished state was left behind. `permissions` bounds what that attempt can touch while it runs.
86
+
`recoveryMode: reset` governs what happens if this step dies mid-edit: the next attempt starts over from the pinned workspace revision instead of picking up whatever half-finished state got left behind. `permissions` limits what that attempt is allowed to touch while it runs.
87
87
88
88
## Resumable by construction
89
89
90
-
Kill the process mid-run and start it again — completed steps aren't re-executed, and their effects aren't re-sent:
90
+
Kill the process mid-run and start it again. Steps that already completed don't run a second time, and their effects don't get resent.
91
91
92
92
```text
93
93
$ npx --no-install flows run hello.flow.ts --local-agent --input '{}'
@@ -102,7 +102,7 @@ Hello! How can I help you today?
102
102
RUN 01M20JYM4T9FNGNFX4NQCK34JK completed (3 steps) completionReason: success
103
103
```
104
104
105
-
That's a real captured run, not a mockup. Every step carries a `completionReason` from a closed, nine-value vocabulary — the journal always says which one it was, and no raw stack trace ever stands in for it.
105
+
This is a real run, captured directly from the terminal. Every step carries a `completionReason` from a closed, nine-value vocabulary, so the journal always says exactly which one applied — no raw stack trace has to stand in for an answer.
Copy file name to clipboardExpand all lines: web/content/docs/relayflows/memory-and-integrations.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ description: 'Relayhistory-backed memory and Relayfile-backed integrations — t
5
5
6
6
A flow doesn't carry its own database or its own Slack client. Two existing systems back it instead: [Relayloop](/docs/loop) for memory across runs, and [Relayfile](/docs/file) for everything a flow reads from or writes to outside itself.
7
7
8
-
## Memory: recall, cite, learn
8
+
## Memory
9
9
10
-
A step declares what it needs from prior runs, and whatever comes back is charged to that step's own budget, itemized in its own journal entry — never pulled from some shared pool:
10
+
A step declares what it needs from prior runs, and whatever comes back is charged to that step's own budget, itemized in its own journal entry. There's no shared pool it draws from:
Under the hood this is [Relayloop](/docs/loop)'s `ai-hist pack` — the same searchable, local-first history your team already builds just by using Claude Code, Codex, and Agent Relay. A flow's memory queries hit that same corpus, so an agent step can cite a fix an engineer already worked out by hand, instead of rediscovering it from scratch.
27
27
28
28
<Note>
29
-
Retrieval quality is the acceptance bar here, not the wiring: the target is
29
+
What this feature is judged on is retrieval quality, not the plumbing:
30
30
an agent visibly avoiding a mistake a prior run already made, citation
31
31
included. Today's shipped provider is a fixed stub while real `ai-hist
32
-
pack` retrieval lands — the`memory.injected` journal entry and its
32
+
pack` retrieval lands. The`memory.injected` journal entry and its
33
33
per-step budget accounting are real regardless of which provider answers
34
34
the query.
35
35
</Note>
36
36
37
-
## Integrations: a SaaS is a directory, not an API client
37
+
## Integrations
38
38
39
39
Reaching Slack, GitHub, or Linear from a flow doesn't mean writing a provider SDK call and hoping the token scope is right. [Relayfile](/docs/file) mounts each provider as a directory a flow reads and writes:
Copy file name to clipboardExpand all lines: web/content/docs/relayflows/multi-agent.mdx
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,13 +36,14 @@ steps:
36
36
value: 'APPROVED'
37
37
```
38
38
39
-
Each step's `agent:` selector resolves to that named `{ cli, model }` pair at compile time — the kernel never guesses a default. `flows check` also flags a named agent nobody ever selects, and one that a step overrides without using, so a stale declaration doesn't quietly rot in the spec.
39
+
Each step's `agent:` selector resolves to that named `{ cli, model }` pair at compile time, from an explicit declaration. `flows check` also flags a named agent nobody ever selects, and one that a step overrides without using, so a stale declaration doesn't quietly rot in the spec.
40
40
41
41
<Note>
42
42
The named-agent map (`agents:` plus a step's `agent:` selector) is
43
43
YAML/JSON authoring only today. In TypeScript, `f.agent(name, options)`
44
-
takes `{ task, workspace }` — `name` just labels the call in the journal.
45
-
It doesn't select a `cli`/`model` pair the way a YAML `agent:` selector does.
44
+
takes `{ task, workspace }`. The `name` argument just labels the call in
45
+
the journal; it doesn't select a `cli`/`model` pair the way YAML's
Copy file name to clipboardExpand all lines: web/content/docs/relayflows/quickstart.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: 'Quickstart'
3
3
description: 'From zero to a verified, resumable run: write a flow, run it, and pick it back up after a crash.'
4
4
---
5
5
6
-
This walks you from a fresh install to a real run in a few commands, using nothing but the published `relayflows` CLI — no scaffolder, no project template.
6
+
This walks you from a fresh install to a real run in a few commands, using nothing but the published `relayflows` CLI. No scaffolder, no project template.
7
7
8
8
## 1. Install
9
9
@@ -64,7 +64,7 @@ npx flows run hello.flow.yaml
64
64
```
65
65
</CodeGroup>
66
66
67
-
That's a real, captured run:
67
+
This is a real, captured run:
68
68
69
69
<CodeGroup>
70
70
```text TypeScript
@@ -81,7 +81,7 @@ Every step's outcome is in the journal now, keyed by that run ID. `flows check`
81
81
82
82
## 4. If it gets interrupted
83
83
84
-
`flows run` starts a background daemon, `relayflowd`, and that's where the journal actually lives — not in the CLI process you typed the command into. Close the terminal, lose power, or kill the daemon itself mid-run, and nothing is lost:
84
+
`flows run` starts a background daemon, `relayflowd`. The journal lives there, not in the CLI process you typed the command into. Close the terminal, lose power, or kill the daemon itself mid-run: nothing is lost.
0 commit comments