Glean 拾遗
Daily /2026-08-09 / Cloudflare ADLC: Workflow-based CI/CD for agent software factories

Cloudflare ADLC: Workflow-based CI/CD for agent software factories

Source blog.cloudflare.com Glean’d 2026-08-09 06:00 Read 14 min
AI summary

Cloudflare argues the bottleneck in software development has moved from implementation to every other SDLC stage, now that AI makes code generation cheap. Their answer: let agents drive more of the lifecycle, not just codegen. The post introduces @cloudflare/ci, local OTel traces for Wrangler, Agent Traces, and a set of primitives meant to turn the SDLC into an 'Agent Development Lifecycle' for software factories. It includes Workflow code that parallelizes lint/test/typecheck/build and then deploys, plus guidance that CI/CD is just one kind of Workflow—workflows can spawn containers, agents, and browsers and persist state for days. The article also lists seven platform requirements for agent-driven delivery: programmatic, horizontally scalable, reproducible, push-based, atomic, permissioned, and self-improving. Useful for engineers building agent infrastructure on Cloudflare or exploring autonomous delivery pipelines.

Original · 14 min
blog.cloudflare.com ↗
§ 1

Engineering managers spent the past few decades figuring out ways for many programmers to work together on a shared codebase. This work dates all the way back to the “Systems Development Lifecycle” (RAND, 1975) - today commonly referred to as the “Software Development Lifecycle” (SDLC), which defines the following phases:

Plan

Design

Implement

Test

Deploy

Maintain

Retire

工程管理者在过去几十年里,一直在寻找让众多程序员在共享代码库上协作的方法。这项工作最早可追溯到 RAND 公司 1975 年提出的“系统开发生命周期”(Systems Development Lifecycle),也就是今天常说的“软件开发生命周期”(SDLC)。SDLC 定义了以下阶段:

计划

设计

实现

测试

部署

维护

退役

§ 2

AI has made the step that was previously the slowest and most expensive — implementation — the fastest and cheapest. That, in turn, has had an impact downstream: overwhelming the people responsible for all the other steps in the SDLC. This ranges from open-source maintainers bombarded with thousands of pull requests and issues, to production engineers trying to save production from falling over as the rate of software delivery increases orders of magnitude.

We are all trying to save our systems, our customers, and ourselves from slop.

AI 让原本最慢、最贵的环节——实现——变得最快、最便宜。这反过来给下游带来了冲击:负责 SDLC 其他所有步骤的人被压得喘不过气。从被成千上万个 pull request 和 issue 淹没的开源维护者,到在软件交付速度提升数个数量级时拼命保住生产系统的运维工程师,都是如此。

我们都在努力拯救我们的系统、我们的客户,以及我们自己,免于被“slop”淹没。

§ 3

image1.png

image1.png

§ 4

The answer — paradoxically — is to empower agents to do more. It’s only fair! You’d never let an engineer on your team write code, expect someone else to validate it, merge it, deploy it, hold the pager in production, and triage incoming bugs. But that’s what most companies are doing right now with agents. Models have improved remarkably, and agents are running over longer time horizons, able to take on much larger tasks. But they are not yet used evenly across the SDLC.

答案——看似矛盾——恰恰是让 Agent 做更多事。这很公平!你绝不会让自己团队里的工程师只负责写代码,然后指望别人去验证、合并、部署、在生产环境值班,并处理新来的 bug。但现在大多数公司对 Agent 就是这么做的。模型已经显著改善,Agent 的运行时间窗口更长,能够承担更大的任务,但它们还没能均匀地用于 SDLC 的各个环节。

§ 5

Cloudflare treats agents as our customers. They can buy domains, create temporary accounts and use the entire Cloudflare API. We know that agents need APIs and tools to be able to manage the full SDLC on behalf of our customers — not just the start of it.

Cloudflare 把 Agent 当作我们的客户。它们可以购买域名、创建临时账户、使用完整的 Cloudflare API。我们知道,Agent 需要 API 和工具来代表我们的客户管理完整的 SDLC——而不只是第一步。

§ 6

And so today we’re introducing the start of a new set of tools that let agents step beyond just generating code and take on more of the SDLC. We’re sharing what we’ve built and learned trying to solve this for ourselves:

@cloudflare/ci — a new way to run CI/CD across millions of repos, that can self-heal and spawn agents to do much more complex tasks, build on Cloudflare Workflows.

OpenTelemetry traces in local dev — giving agents the same observability they have in production, built into Wrangler and the Cloudflare Vite plugin.

Introducing: Cloudflare Agents and Agent Traces — a new home for observing, maintaining and improving agents, centered around OpenTelemetry traces from agents.

How Cloudflare enforces engineering standards using AI — our own experience enforcing best practices across all of our products’ and systems’ repositories and specs.

How we built a software factory to drive Astro’s GitHub issue count to zero — our own experience building systems to automatically triage, reproduce, verify and fix issues for a large and growing open source project.

所以今天,我们推出了一套新工具的起点,让 Agent 不再只生成代码,而是承担更多 SDLC 工作。我们分享的是我们为了解决自身问题而构建和学到的东西:

@cloudflare/ci —— 一种在数百万仓库上运行 CI/CD 的新方式,可自愈,并可派生 Agent 执行更复杂的任务,构建于 Cloudflare Workflows 之上。

本地开发中的 OpenTelemetry 追踪 —— 让 Agent 在本地获得与生产环境相同的可观测性,内置于 Wrangler 和 Cloudflare Vite 插件。

发布:Cloudflare Agents 和 Agent Traces —— 一个围绕 Agent 的 OpenTelemetry 追踪,用于观察、维护和改进 Agent 的新家园。

Cloudflare 如何用 AI 强制执行工程标准 —— 我们在所有产品和系统仓库及规范中推行最佳实践的经验。

我们如何构建软件工厂,把 Astro 的 GitHub issue 数降到零 —— 我们为大型且不断增长的开源项目构建自动分流、复现、验证和修复 issue 系统的经验。

§ 7

There’s something bigger here though. When we look at the SDLC, even with the best automation, its assumptions do not scale for the volume of code agents can write and the pace at which software teams must move to compete. We think it’s time to replace the SDLC with the ADLC — the Agent Development Lifecycle.

The SDLC is for software teams. The ADLC is for software factories.

不过这里还有更大的意义。当我们审视 SDLC 时,即使有了最好的自动化,它的假设也无法适应 Agent 能编写的代码量以及软件团队为竞争而必须保持的节奏。我们认为,是时候用 ADLC——Agent 开发生命周期——取代 SDLC 了。

SDLC 是为软件团队设计的,ADLC 是为软件工厂设计的。

§ 8

Right now, everyone is talking about building “software factories” — agent-driven systems that take input and autonomously build, improve, deploy and manage software. Take an input, whether it’s a production error, a bug report from a customer, or an idea for a new feature, and delegate it entirely to an agent.

现在,每个人都在谈论构建“软件工厂”——由 Agent 驱动的系统,它们接受输入,自主构建、改进、部署和管理软件。接受一个输入,无论是生产错误、客户的 bug 报告,还是新功能的想法,然后把它完全委托给一个 Agent。

§ 9

Even with agents, most software projects are constrained by human-in-the-loop steps. Humans prompting agents, telling them to keep going, instructing agents to apply feedback from a code review, constantly babysitting many agents and giving them instruction. On most software teams, the human still manages each step in the SDLC model — the only change is that they delegate tasks within each step to an agent.

即使有了 Agent,大多数软件项目仍然受到人在环内步骤的约束。人类提示 Agent,告诉它们继续,指示它们应用代码审查的反馈,不断地照看许多 Agent 并给它们下达指令。在大多数软件团队中,人仍然管理着 SDLC 模型中的每一步——唯一的变化是,他们现在把每一步中的任务委托给了 Agent。

§ 10

And so the dream behind software factories is: what if you reimagined this approach and built a factory for the entire process of building software? How can we shift more human time towards the things that truly require human inspiration, taste, and judgement? It would leave us more time to design, to talk to customers, and to dream bigger.

软件工厂背后的梦想是:如果你重新构想这种方法,为构建软件的整个过程建造一座工厂呢?我们如何把更多人类时间转移到真正需要人类灵感、品味和判断力的事情上?这会让我们有更多时间去设计、与客户交谈,以及梦想更大的事。

§ 11

A software factory has to manage the same steps in the SDLC, but it demands much more from the platform it is built on. Because when you hand over the keys and let the agent drive, every manual step that previously relied on a human must be adapted to be:

Programmatic — ”ClickOps” was bad practice for humans, but it’s a non-starter for agents. Every last operation needs APIs that agents can call, debug, and rely on.

软件工厂必须管理 SDLC 中同样的步骤,但这对它赖以构建的平台提出了更高要求。因为当你把钥匙交给 Agent 并让它来驾驶时,每一个以前依赖人的手动步骤都必须被改造为:

可编程 —— “ClickOps”对人类来说是不好的实践,但对 Agent 来说根本行不通。每一个操作都需要 Agent 可以调用、调试和依赖的 API。

§ 12

Horizontally scalable — preview deployments were a nice-to-have when humans stared at the screen while building or manually took over a staging server to catch issues before production. For agents to drive, every agent must have its own preview that matches production.

水平可扩展 —— 预览部署对人类来说是一种“有则更好”,人类在构建时盯着屏幕,或手动接管预发服务器以在发布前发现问题。对 Agent 来说,每个 Agent 都必须拥有自己的、与生产环境匹配的预览环境。

§ 13

Reproducible — what happens if there’s a bug that you can only reproduce when simulating 4G on an iPhone 15? Or from an IP in a certain country? Typical unit testing and integration testing tools aren’t going to help here.

可复现 —— 如果一个 bug 只能在 iPhone 15 的 4G 模拟环境下复现怎么办?或者来自某个国家的 IP?典型的单元测试和集成测试工具在这里起不了作用。

§ 14

Real-time, push based — relying on humans to look at the right dashboard has always been a bad way to know if things are working, but it completely breaks down with agents. You need an event that triggers an agent to do work.

实时、基于推送 —— 依赖人类查看正确的仪表盘来判断系统是否正常,从来都不是好办法,但在 Agent 这里完全行不通。你需要一个事件来触发 Agent 去工作。

§ 15

Atomic — every change needs to be independently testable, releasable, observable, and reversible without affecting unrelated behavior.

原子性 —— 每个变更都需要可独立测试、可发布、可观察、可回滚,并且不会影响无关行为。

§ 16

Permissioned — you know you probably shouldn’t, but today you give a few trusted engineers the keys to SSH into prod in case things really go haywire. There’s no way you let an agent do that — but without the ability to escalate and get more permissions, how can it do its job?

权限分级 —— 你知道可能不应该,但今天你会给少数可信工程师 SSH 到生产环境的钥匙,以备真正出大问题时使用。你绝不会让 Agent 这么做——但如果没有提升权限的能力,它又怎么能做好工作呢?

§ 17

Self-improving — people learn from experience. The first week ship or the first on-call rotation, humans are slow and need to shadow someone else, but then get better and faster. Agents, too, need ways to learn from experience.

自我改进 —— 人们从经验中学习。第一次上线第一周,第一个 on-call 轮值,人类很慢,需要跟着别人学习,然后会变得更好更快。Agent 也需要从经验中学习的方法。

§ 18

We need something new if we are going to make software factories safe to use for real production software. Software factories face the same challenge that other autonomous systems like self-driving cars do — the challenge of going from working successfully 80% of the time, to some number of nines past 99%.

如果我们想让软件工厂能安全地用于真正的生产软件,就需要一些新的东西。软件工厂面临着与其他自治系统(如自动驾驶汽车)相同的挑战——从 80% 的时间工作正常,到超过 99% 的多个九。

§ 19

To give agents the keys to drive the SDLC, you can’t give them a car designed for humans

An autonomous vehicle is loaded with sensors and technology that a regular car doesn’t have. Lidar sensors, cameras, powerful compute to run inference, and connectivity to a central command system that can take over remotely if needed.

For an autonomous vehicle to be 80% as good as a human at driving, we probably don’t need all of this. Self-driving got to around 80% as good as humans 10 years ago. But that’s not the bar to clear — the bar is to be much better and safer than a human driver. That’s what we expect when we hand over the keys to a machine, in order to feel safe taking a nap driving down the 101 at 60 mph. And that’s why autonomous vehicles have technology that is purpose-built for self-driving — it’s what builds trust and handles the edge cases that cannot be designed for upfront.

要想给 Agent 驾驶 SDLC 的钥匙,你给它们的不能是一辆为人类设计的汽车

自动驾驶汽车装载了普通汽车没有的传感器和技术。激光雷达、摄像头、强大的推理计算能力,以及与中央指挥系统的连接,以便在必要时远程接管。

要让自动驾驶汽车达到人类驾驶水平的 80%,我们可能不需要这些东西。自动驾驶在 10 年前就达到了人类的 80% 左右。但那不是要跨越的标杆——标杆是要比人类驾驶更好、更安全。这正是我们交出钥匙时的期望:在 101 号公路上以 60 英里时速行驶时可以安心打盹。这也是为什么自动驾驶汽车拥有专门为自动驾驶而设计的技术——它建立了信任,并处理那些无法预先设计的边缘情况。

§ 20

The same is true of self-driving software. Ask yourself — why haven’t you yet just let your agent auto-approve and merge its own PRs to your production services? The higher the stakes of what you build, the longer your list of reasons almost surely is.

When you start to unpack not only all the things that can go catastrophically wrong in this process, but also that are necessary to building the right thing for customers, it is remarkably complex. It doesn’t fit into a linear set of steps in a GitHub Actions YAML file, and it goes way beyond running traditional automated tests. Even a small change to a dashboard can span roles, specializations and org structures, and subjective changes are the hardest to test and to delegate. Most of these things are probably not part of your CI/CD pipeline at all today. But they will need to be, if you want them to still happen, while giving full control to the agents running the software factory.

自驱软件也是如此。问问自己——为什么你还没有让你的 Agent 自动批准并合并它自己的 PR 到生产服务?你要构建的东西越重要,你的理由清单几乎肯定就越长。

当你开始拆解这个过程中不仅可能出灾难性错误的所有事,以及为构建对客户正确的东西所必需的所有事时,它非常复杂。它不适合放进 GitHub Actions YAML 文件的线性步骤集,也远不止运行传统自动化测试。即使对仪表盘的一处小改动,也可能跨越角色、专业领域和组织结构,而主观性改动是最难测试和最难委托的。今天,这些事情大多可能不在你的 CI/CD 流程中。但如果你希望它们继续发生,同时把完全控制权交给运行软件工厂的 Agent,它们就必须纳入流程。

§ 21

To let agents drive the whole process, we need a better way to orchestrate these dynamic series of steps. We think that is a Workflow, with the capability to spawn containers, agents and browsers. A Workflow that can set feature flags and enable them for a test user, investigate logs and traces, observe production metrics as a change gradually rolls out, and do everything else that is needed in order to ship safely.

A CI/CD pipeline is just a Workflow. But a Workflow can be so much more than a CI/CD pipeline.

Cloudflare Workflows let you chain together multiple steps, automatically retry failed tasks, and persist state for minutes, hours, or even weeks. They are designed to encode complex and dynamic business processes in a logical and well-understood program. This blog post breaks down why Workflows, in tandem with Artifacts, make defining and triggering CI/CD pipelines fundamentally simpler. For example:

import { CIWorkflow } from `@cloudflare/ci`

const deps: CiRunnerResult = await ci.runner({
name: 'install',
command: 'bun install --frozen-lockfile',
cache: { inputs: ['package.json', 'bun.lock'] },
});

await Promise.all([
deps.runner({ name: 'lint', command: 'bun run lint' }),
deps.runner({ name: 'test', command: 'bun run test' }),
deps.runner({ name: 'typecheck', command: 'bun run typecheck' }),
deps.runner({ name: 'build', command: 'bun run build' }),
]);

await deps.runner({
name: 'deploy',
command: 'bun wrangler deploy',
cloudflareCredentials: {
accountId: this.env.CLOUDFLARE_DEPLOY_ACCOUNT_ID,
},
});

要让 Agent 驱动整个过程,我们需要一种更好的方式来编排这些动态的步骤序列。我们认为那就是 Workflow,它能够派生容器、Agent 和浏览器。一个 Workflow 可以设置特性开关并为测试用户启用它们,调查日志和追踪,在变更逐步推出时观察生产指标,以及做一切安全上线所需的事情。

CI/CD 流水线只是一个 Workflow,但 Workflow 可以远不止 CI/CD 流水线。

Cloudflare Workflows 允许你串联多个步骤、自动重试失败的任务,并将状态持久化数分钟、数小时甚至数周。它们被设计用来以逻辑清晰、易于理解的程序来编码复杂动态的业务流程。这篇博文拆解了为什么 Workflows 与 Artifacts 配合,能从本质上简化 CI/CD 流水线的定义和触发。例如:

import { CIWorkflow } from `@cloudflare/ci`

const deps: CiRunnerResult = await ci.runner({
name: 'install',
command: 'bun install --frozen-lockfile',
cache: { inputs: ['package.json', 'bun.lock'] },
});

await Promise.all([
deps.runner({ name: 'lint', command: 'bun run lint' }),
deps.runner({ name: 'test', command: 'bun run test' }),
deps.runner({ name: 'typecheck', command: 'bun run typecheck' }),
deps.runner({ name: 'build', command: 'bun run build' }),
]);

await deps.runner({
name: 'deploy',
command: 'bun wrangler deploy',
cloudflareCredentials: {
accountId: this.env.CLOUDFLARE_DEPLOY_ACCOUNT_ID,
},
});
§ 22

Workflows go beyond a series of linear steps though. They can be defined dynamically, and they can spawn agents or other Workflows. This example shows a Workflow that reviews new data from the past day. The Workflow has full control over when and how the agent is prompted, and can pass along context between steps:

import { WorkflowEntrypoint, type WorkflowEvent, type WorkflowStep } from 'cloudflare:workers';
import { init } from '@flue/runtime';
import { Reviewer } from './agents/reviewer.ts';
import { collectFindings } from './shared/nightly.ts';

type Params = { date: string };

export class NightlyReview extends WorkflowEntrypoint {
async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
const findings = await step.do('collect findings', () => collectFindings(event.payload.date));

const agent = init(Reviewer, { id: `nightly-${event.payload.date}` });

const receipt = await step.do('dispatch review', () =>
agent.dispatch(`Review these findings:\n${findings}`),
);

const review = await step.do('read review', async () => {
const reply = await agent.read(receipt);
return { text: reply.text, data: reply.data };
});

// ...
}
}

Once you see this pattern, and are “Workflow-pilled” as Cloudflare is, you start to ask: what else could I have a Workflow handle for me? What other human-bottlenecked steps could I delegate to this combination of Workflow + Flue agents?

不过,Workflow 并不只是一系列线性步骤。它们可以被动态定义,还可以派生 Agent 或其他 Workflow。这个例子展示了一个 Workflow,它审查过去一天的新数据。Workflow 完全控制何时以及如何提示 Agent,并可以在步骤之间传递上下文:

import { WorkflowEntrypoint, type WorkflowEvent, type WorkflowStep } from 'cloudflare:workers';
import { init } from '@flue/runtime';
import { Reviewer } from './agents/reviewer.ts';
import { collectFindings } from './shared/nightly.ts';

type Params = { date: string };

export class NightlyReview extends WorkflowEntrypoint {
async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
const findings = await step.do('collect findings', () => collectFindings(event.payload.date));

const agent = init(Reviewer, { id: `nightly-${event.payload.date}` });

const receipt = await step.do('dispatch review', () =>
agent.dispatch(`Review these findings:\n${findings}`),
);

const review = await step.do('read review', async () => {
const reply = await agent.read(receipt);
return { text: reply.text, data: reply.data };
});

// ...
}
}

一旦你看到这种模式,并且像 Cloudflare 一样“Workflow 上头”了,你就会开始问:我还能让 Workflow 处理什么?我还应该把哪些人类瓶颈步骤委托给 Workflow + Flue Agent 的组合?

§ 23

The full ADLC, on the Cloudflare stack

With Workflows able to orchestrate complex steps, and Artifacts as the storage layer for code, when you look at the SDLC stages, everything an agent needs to own the whole process of building, shipping, and maintaining software is on Cloudflare:

SDLC stage Cloudflare

Plan

Design

Implement Vite, Rolldown, and Oxc — the fastest toolchain for your agent

Local dev for everything — what your agent sees locally, is the same runtime and environment that will run in production

Local Explorer, Local Traces — your agent has the same APIs to debug locally as it does in production

Remote bindings — let agents run code locally, while using real production resources running on Cloudflare

Preview URLs — give every pull request a preview for the agent to validate and use

Test Browser Run — programmable headless browsers in the cloud

Vitest — run tests in the Workers runtime

Deploy Flagship — every change gets its own feature flag

Gradual Deployments — roll out code changes to a percentage of traffic, ramp up over time

Maintain

Retire Workers Logs — let agents tail live logs or query adhoc to identify issues to automatically fix

Agent Traces — capture every agent session and use it to improve

Cloudflare MCP Server - powered by Code Mode and Dynamic Workers

Analytics Engine — high cardinality analytics built on Clickhouse, to let agents query who is using what

完整 ADLC,跑在 Cloudflare 栈上

有了能编排复杂步骤的 Workflows,以及作为代码存储层的 Artifacts,当你审视 SDLC 各阶段时,Agent 拥有构建、发布和维护软件整个过程所需的一切都在 Cloudflare 上:

SDLC 阶段 Cloudflare

计划

设计

实现 Vite、Rolldown 和 Oxc —— 为你的 Agent 打造的最快工具链

本地开发一切都对应生产 —— Agent 在本地看到的运行时和环境,就是生产环境中将要运行的同一套

本地 Explorer、本地 Traces —— Agent 在本地拥有与生产环境相同的调试 API

远程绑定 —— 让 Agent 在本地运行代码,同时使用 Cloudflare 上运行的真实生产资源

预览 URL —— 为每个 pull request 提供一个预览,供 Agent 验证和使用

测试 Browser Run —— 云中的可编程无头浏览器

Vitest —— 在 Workers 运行时中运行测试

部署 Flagship —— 每个变更都有自己的特性开关

渐进式部署 —— 将代码变更按流量百分比推出,随时间逐步增加

维护

退役 Workers Logs —— 让 Agent 尾随实时日志或进行临时查询,以识别问题并自动修复

Agent Traces —— 捕获每次 Agent 会话并用于改进

Cloudflare MCP Server —— 由 Code Mode 和 Dynamic Workers 提供支持

Analytics Engine —— 基于 Clickhouse 的高基数分析,让 Agent 查询谁在使用什么

§ 24

Primitives to build your software factory

Right now, the people on the bleeding edge are building the software factories of the future. Eventually software factories will become, just like agents and AI, the normal way people build software. But for most people and most organizations, we’re not there yet.

We want to change that.

In order to do so, the questions we’ve asked ourselves are: how can we make things simple and accessible so that everyone on the Internet can benefit from a paradigm shift like this? And what are the base layer primitives that we can open up to everyone, from the smallest startup to the largest platforms in the world?

In this case, we think the primitives are here. There’s more to do to connect them, to keep building our own software factory and learn from it, but right now, today, we’re ready for you to build your machine that builds the machine, on Cloudflare. Get started with @cloudflare/ci, build an agent, and see how much of the SDLC you can make autonomous.

构建软件工厂的原语

现在,处于前沿的人正在构建未来的软件工厂。最终,软件工厂会像 Agent 和 AI 一样,成为人们构建软件的正常方式。但对大多数人和大多数组织来说,我们还没到那一步。

我们想改变这一点。

为此,我们问自己的问题是:我们如何让事情变得简单易用,让互联网上的每个人都能从这样的范式转变中受益?以及我们可以向所有人开放哪些基础层原语,从最小的初创公司到世界上最大的平台?

在这一点上,我们认为原语已经就绪。要连接它们,继续构建我们自己的软件工厂并从中学习,还有很多工作要做,但现在,就是今天,我们已经准备好让你在 Cloudflare 上构建你的“制造机器的机器”。从 @cloudflare/ci 开始,构建一个 Agent,看看你能让 SDLC 的多少部分实现自主。

Open source ↗