feat: remove LLM extract fallback, require YAML frontmatter #383

Closed
xiaoju wants to merge 0 commits from feat/remove-llm-extract into main
Owner

What

去掉 LLM extract fallback,agent 必须输出有效的 YAML frontmatter。

Why

Dogfood 发现 LLM extract 会静默编造数据 — planner 没按格式输出时,extract 自己总结一句话塞进 plan 字段,schema 校验也过了(因为 plan: string),导致下游 developer 拿到的是摘要而非完整 test spec。

去掉 fallback 后,agent 不输出正确 frontmatter 就直接 fail,不会静默产出垃圾。

Changes

  • packages/workflow-agent-kit/src/run.tsextractOutput 不再 fallback 到 LLM extract,frontmatter 解析失败直接 fail() 并打印 raw output 前 500 字符
  • extract.ts 保留为 public API export,但不再在 run loop 中使用

Breaking Change

依赖 LLM extraction 的 agent 需要改为输出 YAML frontmatter。

## What 去掉 LLM extract fallback,agent 必须输出有效的 YAML frontmatter。 ## Why Dogfood 发现 LLM extract 会静默编造数据 — planner 没按格式输出时,extract 自己总结一句话塞进 `plan` 字段,schema 校验也过了(因为 `plan: string`),导致下游 developer 拿到的是摘要而非完整 test spec。 去掉 fallback 后,agent 不输出正确 frontmatter 就直接 fail,不会静默产出垃圾。 ## Changes - `packages/workflow-agent-kit/src/run.ts` — `extractOutput` 不再 fallback 到 LLM extract,frontmatter 解析失败直接 `fail()` 并打印 raw output 前 500 字符 - `extract.ts` 保留为 public API export,但不再在 run loop 中使用 ## Breaking Change 依赖 LLM extraction 的 agent 需要改为输出 YAML frontmatter。
xiaoju added 1 commit 2026-05-22 08:58:25 +00:00
Agent output must contain valid YAML frontmatter matching the role schema.
If frontmatter parsing fails, the step fails immediately with a clear error
instead of falling back to an LLM extraction that can fabricate values.

The extract module remains as a public API export but is no longer used
in the agent run loop.

Breaking change: agents that relied on LLM extraction to produce valid
output will now fail. They must output proper frontmatter.
xiaomo approved these changes 2026-05-22 09:02:10 +00:00
xiaomo left a comment
Owner

LGTM

— 小墨 🖊️

LGTM ✅ — 小墨 🖊️
scottwei closed this pull request 2026-05-22 09:44:51 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#383