# Claude Dynamic Workflows (not only) for PMs: The Ultimate Guide
**作者**: Paweł Huryn
**日期**: 2026-06-08T20:17:58.000Z
**来源**: [https://x.com/PawelHuryn/status/2064079508689358857](https://x.com/PawelHuryn/status/2064079508689358857)
---

Anthropic just shipped dynamic workflows. I ran one: 113 agents, 1.95M tokens, 3 prototypes, in 12 minutes. The code that coordinated them spent zero. That zero is the upgrade.
I gave Claude a product-discovery job and one keyword: ultracode.
It didn't answer me. It wrote a JavaScript, then used it to spin up a fleet of agents and point them at the work.
Twelve minutes later: 113 agents had read 100 synthetic customer interviews on 1.95M tokens. 622 raw opportunities, clustered to 11 needs, scored, then turned into 3 clickable prototypes, built and verified.
The JavaScript that coordinated all of it spent zero model tokens. The model did the judgment. The code did the coordination.
The orchestrator moved off the model and into code.

The agents do the work; the code that coordinates them spends zero model tokens.
## What a dynamic workflow is
A short JavaScript program Claude writes on the fly to coordinate subagents. You trigger it with ultracode, or by asking Claude to use a workflow.
Fan out N agents. The orchestrator is what decides what each one does, gathers the outputs, drops the repeats, and routes the survivors.
Until now the orchestrator was the model. Every routing decision was a paid turn. Now it's plain code: loops, filters, a sort. The agents still cost tokens, because agents reason. The glue between them doesn't.
Agents cost tokens. The glue is fast, free, and deterministic.
## n8n already does workflows. This is one level up.

n8n glues your tools; a dynamic workflow glues your agents.
This isn't an n8n replacement. n8n asks: how do I connect tools I already know? A dynamic workflow asks: how do I let the agent build the procedure for this run?
You could already ask Claude to write code that coordinates agents with the Agent SDK, but those are embedded agents: the ones you build into your own app or product. A dynamic workflow coordinates workspace agents: the ones doing your actual work (coding, research, knowledge work) inside Claude Code. The SDK is for the agents you ship; dynamic workflows are for the agent you work with.
## When a workflow beats a subagent
A single fan-out and merge is a subagent job. A competitor teardown is the case: ten agents, one synthesis, no decisions in between.
A workflow earns its keep when stage N's output decides stage N+1. Route, then score. Score, then filter. Generate, then verify, then build.
A mental model:
- Use a subagent when the job is one round of parallel judgment.
- Use a workflow when the steps talk to each other.
## Why move the orchestrator off the model

Same model. The plan moves somewhere it can't tire, grade itself, or forget.
Long jobs the model runs itself fail three predictable ways, all because the model is holding the plan. This framing, and the pattern names below, come from Thariq Shihipar and Sid Bidasaria's Anthropic post:
- Laziness. Ask it to review 50 items, it does 35 and calls it done. A loop runs until the list is empty. A loop doesn't get tired.
- Self-preferential bias. Ask it to grade its own work, it grades generously. The harness spawns a separate judge in its own context, sometimes a different model, and requires a majority. The grader is no longer the thing being graded.
- Goal drift. Over a long session "don't touch auth" can evaporate by turn 80. When the goal lives in the script it can't drift, because the script isn't in the context getting squeezed.
## The six patterns

You don't invent these per task. You learn to recognize which one the task already is.
Once the orchestrator is code, six shapes recur. Learn the names; they're how you recognize what a task wants.
1. Classify-and-act: one agent decides the type, the script routes it. Example: bug vs feature vs noise.
2. Fan-out-and-synthesize: one agent per piece, merged in code. Examples: market research, competitor teardown.
3. Adversarial verification: a separate agent checks the output against a rubric. Example: fact-checking a PRD against the sources.
4. Generate-and-filter: many candidates, deduped, the survivors kept. Examples: naming, positioning, ideation.
5. Tournament (compare): agents attempt the task different ways, judges compare until one wins. Example: product strategy.
6. Loop-until-done: spawn until a stop condition. Example: implement, document, and test a feature in one shot.
For PMs, on your actual work:
- Synthesize 100 customer interviews → one agent per transcript, merged into a themes-and-JTBD table. Every interview read, not the first 20.
- Check 80 user stories against INVEST → a loop that runs until every story is checked, not until the model tires at 50.
- Pressure-test a PRD before the review → a separate agent red-teams it against your goal and surfaces the assumption you'd otherwise defend at launch.
> You're not learning to code. You're learning which weekly PM jobs can become standing workflows: set the goal once, save the procedure as a skill, and let it run end to end with the /goal.
## A worked example: 100 interviews

100 interviews in, three prototypes out. The agents reason; the code routes, scores, and loops for free.
Six stages, each feeding the next:
- Extract → one cheap-model agent per interview; each returns structured opportunities, the persona, and verbatims. Bounded, repetitive: Haiku or Sonnet, not Opus.
- Canonicalize → one agent clusters the raw opportunities into a canonical set. The same need arrives under a dozen names; merging synonyms is judgment, so it's a model, not code.
- Score (code, no model) → rank each canonical opportunity by frequency × importance × (5 − satisfaction).

622 raw opportunities clustered to 11 needs, scored frequency × importance × (5 − satisfaction). No model in the loop.
- Generate and triage → for the top opportunities, an agent proposes solution ideas; a separate judge ranks them by ROI and keeps the top 3 to build.
- Build → an agent uses the frontend-design skill to write a clickable HTML prototype.
- Inspect and rerun → a smoke check reruns any prototype that fails to render or any extraction that came back low-confidence. This is the real loop: one stage's output decides whether an earlier stage runs again.

One of the three winners, as an interactive prototype.
The canonicalize stage wasn't in my first prompt. I'd written "merge and dedupe," and the counts came back fragmented: 11 real needs read like 30-something. I added one line, cluster synonyms before counting, and Claude rewrote the harness with a clustering agent in front of the scorer. Even the fix lived off the model.

The run: 113 agents fanning out, live.
113 agents, 1.95M tokens, 12.5 minutes. 3 of 3 prototypes built and verified. The JavaScript that routed, scored, gated, and looped spent zero.
## More: what's in the full guide
The pieces above are the what and the why. The buildable parts are in this week's The Product Compass:
- The full run on video, start to finish.
- How to ship it as a saved skill your team runs on a schedule, with a goal and a spend cap without coding.
- The containment playbook. A workflow runs unattended and won't stop to ask. During my run the agents wrote files and ran shell commands on their own. How to box that in before you point it at real work.
You can read it here: https://www.productcompass.pm/p/claude-code-dynamic-workflows
Next time you want Claude to process 100 messy inputs, don't ask it to try harder. Give it the goal and let it write the harness.
## Resources
- The failure-mode framing and the pattern names come from "A harness for every task: dynamic workflows in Claude Code" by @trq212 and @sidbid (Anthropic). The firsthand run and the PM translation are mine. claude.com/blog
- Try it: type ultracode in a Claude Code prompt, or ask Claude to use a workflow.
## 相关链接
- [Paweł Huryn](https://x.com/PawelHuryn)
- [@PawelHuryn](https://x.com/PawelHuryn)
- [14K](https://x.com/PawelHuryn/status/2064079508689358857/analytics)
- [Agent SDK](https://www.productcompass.pm/p/claude-agent-sdk-production-agent)
- [Anthropic post](https://claude.com/blog/a-harness-for-every-task-dynamic-workflows-in-claude-code)
- [https://www.productcompass.pm/p/claude-code-dynamic-workflows](https://www.productcompass.pm/p/claude-code-dynamic-workflows)
- [@trq212](https://x.com/@trq212)
- [@sidbid](https://x.com/@sidbid)
- [claude.com/blog](https://claude.com/blog/a-harness-for-every-task-dynamic-workflows-in-claude-code)
- [Upgrade to Premium](https://x.com/i/premium_sign_up)
- [4:17 AM · Jun 9, 2026](https://x.com/PawelHuryn/status/2064079508689358857)
- [14K Views](https://x.com/PawelHuryn/status/2064079508689358857/analytics)
- [View quotes](https://x.com/PawelHuryn/status/2064079508689358857/quotes)
---
*导出时间: 2026/6/9 13:22:46*
---
## 中文翻译
# Claude 动态工作流(不仅)适合产品经理:终极指南
**作者**: Paweł Huryn
**日期**: 2026-06-08T20:17:58.000Z
**来源**: [https://x.com/PawelHuryn/status/2064079508689358857](https://x.com/PawelHuryn/status/2064079508689358857)
---

Anthropic 刚刚推出了动态工作流。我运行了一个:113 个智能体,195 万个 Token,3 个原型,耗时 12 分钟。用于协调它们的代码消耗为零。那个“零”就是这次升级的核心。
我给 Claude 分配了一个产品探索任务和一个关键词:ultracode。
它没有直接回答我。它写了一段 JavaScript,然后用它启动了一群智能体并指派工作。
十二分钟后:113 个智能体阅读了 100 份合成客户访谈,消耗了 195 万个 Token。生成了 622 个原始机会,聚类成 11 个需求,进行评分,然后转化为 3 个可点击的原型,构建并验证完成。
用于协调所有这一切的 JavaScript 消耗的模型 Token 为零。模型负责判断。代码负责协调。
编排器从模型转移到了代码中。

智能体负责工作;用于协调它们的代码消耗零模型 Token。
## 什么是动态工作流
这是 Claude 现场编写的一段简短 JavaScript 程序,用于协调子智能体。你可以使用 ultracode 触发它,或者让 Claude 使用工作流。
分发 N 个智能体。编排器负责决定每个智能体做什么,收集输出,剔除重复项,并路由幸存者。
在此之前,编排器就是模型本身。每一次路由决策都是一次付费的轮转。现在它是普通的代码:循环、过滤器、排序。智能体仍然消耗 Token,因为智能体需要推理。但连接它们的胶水代码不需要。
智能体消耗 Token。胶水代码快速、免费且确定性。
## n8n 已经有了工作流。这高了一个维度。

n8n 连接你的工具;动态工作流连接你的智能体。
这不是 n8n 的替代品。n8n 问的是:我如何连接我已知的工具?动态工作流问的是:我如何让智能体为本次运行构建流程?
你之前就可以让 Claude 编写代码,通过 Agent SDK 来协调智能体,但那些是嵌入式智能体:即你构建到自己应用程序或产品中的智能体。动态工作流协调的是工作区智能体:即在 Claude Code 内部做你实际工作(编程、研究、知识工作)的智能体。SDK 是为你交付的智能体准备的;动态工作流是为你共事的智能体准备的。
## 何时工作流优于子智能体
单次分发和合并是子智能体的工作。竞品分析就是典型案例:十个智能体,一个综合分析,中间没有决策环节。
当第 N 阶段的输出决定第 N+1 阶段时,工作流才物有所值。路由,然后评分。评分,然后过滤。生成,然后验证,然后构建。
一个心智模型:
- 当任务是一轮并行判断时,使用子智能体。
- 当步骤之间需要相互对话时,使用工作流。
## 为什么要把编排器从模型中移除

同样的模型。计划移到了一个它不会疲倦、不会自我打分、也不会遗忘的地方。
模型自己运行的长任务会以三种可预测的方式失败,都是因为模型在“拿捏”计划。这种框架以及下面的模式名称,来自 Thariq Shihipar 和 Sid Bidasaria 的 Anthropic 文章:
- 偷懒。让它审查 50 个项目,它做了 35 个就说完成了。循环会一直运行直到列表为空。循环不会累。
- 自利偏差。让它给自己的工作打分,它会打得很宽厚。硬连接会在其自己的上下文中生成一个独立的评判者,有时是不同的模型,并要求多数票。评分者不再是被评分的对象。
- 目标漂移。在漫长的对话中,“不要动 auth”可能在第 80 轮时消失。当目标存在于脚本中时,它就不会漂移,因为脚本不在不断被挤压的上下文中。
## 六种模式

你不需要为每个任务发明这些。你要学习识别任务本质上属于哪一种。
一旦编排器变成代码,六种形态就会反复出现。记住这些名字;它们是你识别任务需求的钥匙。
1. 分类并行动:一个智能体决定类型,脚本进行路由。例如:Bug vs 功能 vs 噪音。
2. 分发并综合:每个片段一个智能体,在代码中合并。例如:市场研究、竞品分析。
3. 对抗性验证:一个独立的智能体根据标准检查输出。例如:根据来源核实 PRD。
4. 生成并过滤:许多候选者,去重,保留幸存者。例如:命名、定位、头脑风暴。
5. 锦标赛(比较):智能体以不同方式尝试任务,评判者进行比较直到决出胜者。例如:产品战略。
6. 循环直到完成:生成直到满足停止条件。例如:一次性实现、记录和测试一个功能。
对于产品经理,在你的实际工作中:
- 综合 100 次客户访谈 → 每个访谈一个智能体,合并为一个主题和 JTBD 表格。每一场访谈都被阅读,而不仅仅是前 20 场。
- 根据 INVEST 检查 80 个用户故事 → 一个循环运行,直到检查完每个故事,而不是模型在 50 个时疲劳了。
- 在审查前对 PRD 进行压力测试 → 一个独立的智能体根据你的目标对其进行红队测试,并揭示你否则会在发布时捍卫的假设。
> 你不是在学写代码。你是在学习哪些每周的产品经理工作可以变成常驻工作流:设定一次目标,将流程保存为技能,然后用 /goal 让它端到端运行。
## 实战示例:100 次访谈

输入 100 次访谈,输出 3 个原型。智能体负责推理;代码负责路由、评分和循环,且免费。
六个阶段,每个阶段衔接下一个:
- 提取 → 每次访谈一个便宜的模型智能体;每个返回结构化的机会、人物画像和原话。有界、重复:Haiku 或 Sonnet,而不是 Opus。
- 规范化 → 一个智能体将原始机会聚类为一个规范集合。同样的需求会以十几种名称出现;合并同义词需要判断,所以是模型,不是代码。
- 评分(代码,无模型)→ 按频率 × 重要性 × (5 − 满意度) 对每个规范机会进行排名。

622 个原始机会聚类为 11 个需求,按频率 × 重要性 × (5 − 满意度) 评分。循环中没有模型参与。
- 生成并分流 → 对于顶级机会,一个智能体提出解决方案想法;一个独立的评判者按 ROI 对它们进行排名,并保留前 3 个进行构建。
- 构建 → 一个智能体使用前端设计技能编写可点击的 HTML 原型。
- 检查并重跑 → 烟检会重跑任何渲染失败的原型或低置信度的提取结果。这是真正的循环:一个阶段的输出决定早期阶段是否再次运行。

三个获胜者之一,作为交互式原型。
规范化阶段最初并不在我的提示词中。我写了“合并并去重”,结果返回的数据支离破碎:11 个真实需求看起来像 30 多个。我加了一行,在计数前聚类同义词,Claude 就用聚类智能体重写了硬连接,放在评分器前面。甚至连修复也是在模型之外完成的。

运行现场:113 个智能体分发,实时演示。
113 个智能体,195 万个 Token,12.5 分钟。3 个原型全部构建并验证。负责路由、评分、门控和循环的 JavaScript 消耗为零。
## 更多:完整指南中有哪些内容
上述部分是“是什么”和“为什么”。可构建的部分在本周的 The Product Compass 中:
- 从头到尾的完整运行视频。
- 如何将其作为团队按计划运行的已保存技能交付,设定目标和支出上限,无需编码。
- 隔离操作手册。工作流在无人看管的情况下运行,不会停下来询问。在我的运行过程中,智能体自己编写文件并运行 Shell 命令。如何在将其用于实际工作之前将其限制在沙箱中。
你可以在这里阅读:https://www.productcompass.pm/p/claude-code-dynamic-workflows
下次你想让 Claude 处理 100 个杂乱的输入时,不要只让它“再努力一点”。给它目标,让它写硬连接。
## 资源
- 失败模式框架和模式名称来自 Anthropic 的 @trq212 和 @sidbid 的文章“A harness for every task: dynamic workflows in Claude Code”。 firsthand 运行和产品经理视角的转化归功于我。claude.com/blog
- 试试看:在 Claude Code 提示词中输入 ultracode,或者让 Claude 使用工作流。
## 相关链接
- [Paweł Huryn](https://x.com/PawelHuryn)
- [@PawelHuryn](https://x.com/PawelHuryn)
- [14K](https://x.com/PawelHuryn/status/2064079508689358857/analytics)
- [Agent SDK](https://www.productcompass.pm/p/claude-agent-sdk-production-agent)
- [Anthropic post](https://claude.com/blog/a-harness-for-every-task-dynamic-workflows-in-claude-code)
- [https://www.productcompass.pm/p/claude-code-dynamic-workflows](https://www.productcompass.pm/p/claude-code-dynamic-workflows)
- [@trq212](https://x.com/@trq212)
- [@sidbid](https://x.com/@sidbid)
- [claude.com/blog](https://claude.com/blog/a-harness-for-every-task-dynamic-workflows-in-claude-code)
- [Upgrade to Premium](https://x.com/i/premium_sign_up)
- [4:17 AM · Jun 9, 2026](https://x.com/PawelHuryn/status/2064079508689358857)
- [14K Views](https://x.com/PawelHuryn/status/2064079508689358857/analytics)
- [View quotes](https://x.com/PawelHuryn/status/2064079508689358857/quotes)
---
*导出时间: 2026/6/9 13:22:46*