Repository navigation
TeamFlow v0.3.5
发布日期:2026-11-18。变更清单按 release-npm-package 铁律 1 由
git log v0.3.4..HEAD生成(1 笔提交 / 4 文件 / +38 −2),不凭会话记忆。
本版焦点:dev 拆任务依赖缺失的可观测与源头补强(issue #19)。
逐笔归属与真机取证见docs/devlog.md的 v0.3.5 批次。本文件面向使用者;内部流水不在正文里。
中文
⬆️ 升级要点
engines无变化:engines.dsh仍为>=0.2.1-rc.5 <0.3.0,无需迁移。- 行为变化仅两处:dev 阶段在「技术方案没给任务标依赖」时出一条新 warn;
tech/architect拆任务提示词更严(依赖标注从「可省略」改为「有先后必须标」)。 - 无
teamflow_*工具 schema / journal / 任务夹契约改动。
🔎 修复:dev 任务依赖缺失导致执行顺序失控(issue #19)
现象:技术方案产出的架构蓝图若没有给任务标注依赖,dev 会把这些任务全部放进同一波并发执行,执行顺序不受保证——存在真实先后关系的任务可能被同时起跑,下游读不到上游产物,表现为「顺序乱」甚至下游拿到半成品。
根因:dev 的调度顺序只来自蓝图 tasks[].reads(及 dependsOn)。调度器 planDevWaves 在无任何依赖边时把所有任务归入单波(实测:8 个互不标 reads 的任务 → 1 波全并发)。而 tech/architect 原提示词是「Omit reads when unsure(不确定就省略)」——鼓励省略依赖,这是一个不安全的默认,弱模型上尤其容易踩。
注:issue 原帖基于 teamflow 0.2.8 / dsh 0.2.1-alpha.1,描述的「跳过若干 agent 且下游死锁」是当时版本的现象;当前版本的机制是「全并发、顺序不可控」而非死锁。根因(缺依赖标注 → 顺序失控)一致。
修复(两条,均不改动调度语义):
- 可观测(host 侧):蓝图
tasks≥ 2 且无任一标注reads⇒ 记一条log.blueprintNoDepswarn(「依赖缺失 → 退化全并发、顺序不受保证;若任务间确有先后,技术方案须为下游任务标注 reads」)。只告警、不拦截——确证彼此独立的任务全并行是合法且更快的,不该被硬拦。 - 源头补强(提示词):
techPrompt/architectPrompt把「Omit reads when unsure」改为「凡任务间有先后关系,下游必须标注reads(上游产物文件)——这是唯一的排序信号;省略 = 全并发、顺序不受保证;仅确证独立的任务可留空」。
回归:新增两条断言——多任务全无 reads 必出该 warn;有任务标了 reads 时不误报(正例)。
English
⬆️ Upgrade highlights
- No
engineschange:engines.dshstays>=0.2.1-rc.5 <0.3.0. No migration needed. - Two behavior changes only: the dev stage emits a new warn when the technical design gives tasks no dependencies; the
tech/architecttask-splitting prompts are stricter (dependency marking changes from "omit when unsure" to "must mark when ordering matters"). - No
teamflow_*tool schema / journal / task-folder contract changes.
🔎 Fix: missing task dependencies produced uncontrolled dev execution order (issue #19)
Symptom: when the technical-design blueprint gives tasks no dependency markings, dev runs them all in one parallel wave with no ordering guarantee — tasks with a real order may start together, and a downstream task cannot read its upstream artifact, showing up as "random order" or a downstream task working from a half-done state.
Root cause: dev ordering comes only from the blueprint's tasks[].reads (and dependsOn). The scheduler planDevWaves puts all tasks into a single wave when there are no dependency edges (measured: 8 tasks with no reads → 1 wave, all parallel). Meanwhile the tech/architect prompts said "Omit reads when unsure" — an unsafe default that encourages omitting dependencies, especially likely on weaker models.
Note: the original issue was filed on teamflow 0.2.8 / dsh 0.2.1-alpha.1, where the reported symptom was "skips some agents and deadlocks downstream". On the current version the mechanism is "all parallel, uncontrolled order" rather than a deadlock. The root cause (missing dependency markings ⇒ uncontrolled order) is the same.
Fix (two parts, neither changes scheduler semantics):
- Observability (host side): if the blueprint has ≥ 2
tasksand none declaresreads, emit alog.blueprintNoDepswarn ("dependencies missing → all run in one parallel wave, order not guaranteed; if tasks have real ordering, the design must mark downstream tasks with reads"). Warn only, never blocks — provably independent tasks running fully parallel is valid and faster, and must not be hard-blocked. - Source hardening (prompts):
techPrompt/architectPromptchanged "Omit reads when unsure" to "whenever one task must run after another, the downstream task MUST declarereads(the upstream artifact files) — this is the ONLY signal that sequences tasks; omitting it means one parallel wave with no ordering guarantee; only tasks proven independent may leave it empty".
Regression: two new assertions — ≥2 tasks with no reads must warn; tasks that declare reads must not warn (no false positives).