返回资讯中心
外部精选
软件工程
#开发者实时流

Dot factory – a spec to describe complex (agentic) workflows

dotFactory is a small language for automations with and without AI agents.

Hacker News 最新siscia2026/10/18 · 2026/10/187 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

dotFactory is a small language for automations with and without AI agents. You write the dataflow — typed values moving through triggers, steps and sinks — and leave the object models, async runtimes and dependency-injection frameworks behind.

an issue in · a slack post out · a review loop in between

A trigger feeds a step, the step calls an agent, the output feeds another step, maybe a retry, then a sink. That picture is simple. But the moment you open an editor, the language makes you manage machinery that has nothing to do with it.

Every idea earns its place by being needed to describe how work flows through a graph. This is the entire language.

Structural records. Fields and shapes — no classes, inheritance, or constructors.

type Issue = { number: int }

▶Trigger

Admits one seed value and holds it constant for the whole run. The host supplies the kind.

trigger issue_opened: kind: github config: { path: "/api/github/webhook", target: { one: { repo: "acme/widgets" } } }

▸Step

Where work happens. Invokes a unit and binds its typed outputs.

step draft: runner: agent

⚙Runner

How a step runs: a shell command, a container, or an agent behind a typed interface.

runner agent: kind: opencode

↦Binding

Named edges that move values between ports. The bindings are the program.

in: { issue: in.issue }

⟲Loop

A prev (loop-carried) binding re-fires a step with feedback — a retry, not control flow.

prev feedback: review.result

■Sink

An effect. Inside a loop it fires each pass; downstream it fires once.

sink result: kind: file config: { path: "out/result.json" }

⇥External port

A bridge to the outside, implemented by the host. Secrets are opaque — redacted everywhere.

external port credential (key: text) -> secret

Anatomy of a factory

The smallest factory that still shows the three things a factory is for: a credential, an agent runner, and a review loop with a bounded retry. Pick a part to see what it does.

Press play. The trigger admits a GitHub issue, the loop runs draft → review, the reviewer sends the draft back once, then approves. The progress sink fires inside the loop — once per pass — while notify waits downstream and fires once.

The factory describes what should happen. The host supplies how: which trigger kinds exist, which runner backends run, where sinks write, how ports resolve. Those are adapter concerns — so they can compete without locking in your workflows.

The spec defines the concepts; implementations follow. Tooling — validators, diagrammers, editors — can be built against the interface, independently of any one host.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →