From 4fb9f0b94929017e5478e128f2e406ba6e675ac5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 08:02:45 +0000 Subject: [PATCH] docs: fix rig/globals incremental migration example to export workflow The 'Incremental migration with rig/globals' section in claude-workflow-conversion.md ended with `export default summaries` (a raw array), which violated the construction rule that a program must export an agent or a workflow. Replace with `export default workflow({ meta, body: async () => summaries })`, consistent with 340-flat-workflow-port.md and the SKILL.md canonical export rule. Also add the missing `workflow` import. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- skills/rig/references/claude-workflow-conversion.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/skills/rig/references/claude-workflow-conversion.md b/skills/rig/references/claude-workflow-conversion.md index 46c3ca5..25f9cce 100644 --- a/skills/rig/references/claude-workflow-conversion.md +++ b/skills/rig/references/claude-workflow-conversion.md @@ -239,7 +239,7 @@ destructuring them from `workflow({ body })`. The launcher runs every program inside a workflow context, so ambient calls are live at module top level: ```ts -import { agent, phase, log, s } from "rig"; +import { agent, phase, log, s, workflow } from "rig"; import { call, pipeline } from "rig/globals"; // Agent role: summarize one file. @@ -257,7 +257,13 @@ const files = (raw ?? "").split("\n").map((f) => f.trim()).filter(Boolean); phase("Summarize"); const summaries = await pipeline(files, (file) => call(summarize, { file }, { label: file })); -export default summaries; + +// Workflow role: expose metadata for progress displays and tooling. +// `body` returns the already-resolved value — no extra calls needed. +export default workflow({ + meta: { name: "summarize-files", description: "Summarize TypeScript source files", phases: ["Discover", "Summarize"] }, + body: async () => summaries, +}); ``` Move `call` and `pipeline` calls inside `workflow({ body })` once the port is