flow-comet 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.flow-comet/skills/flow-comet/GUIDANCE.md +26 -5
- package/.flow-comet/skills/flow-comet/INSTALLED_VERSION +1 -1
- package/.flow-comet/skills/flow-comet/SKILL.md +51 -2
- package/.flow-comet/skills/flow-comet/reference/KNOWN-ISSUES-template.md +3 -3
- package/.flow-comet/skills/flow-comet/reference/TEST-MATRIX.md +15 -15
- package/.flow-comet/skills/flow-comet/reference/dsh-platform.md +19 -11
- package/.flow-comet/skills/flow-comet/reference/recovery.md +1 -7
- package/.flow-comet/skills/flow-comet/reference/workflow-protocol.json +1 -1
- package/.flow-comet/skills/flow-comet/reference/worktree-notes.md +21 -3
- package/.flow-comet/skills/flow-comet/scripts/context-init.mjs +129 -3
- package/.flow-comet/skills/flow-comet/scripts/context-scan.mjs +396 -0
- package/.flow-comet/skills/flow-comet/scripts/contract-check.mjs +41 -31
- package/.flow-comet/skills/flow-comet/scripts/evolve.mjs +778 -0
- package/.flow-comet/skills/flow-comet/scripts/guard-self-test.mjs +5499 -596
- package/.flow-comet/skills/flow-comet/scripts/health.mjs +664 -0
- package/.flow-comet/skills/flow-comet/scripts/protocol-utils.mjs +1 -1
- package/.flow-comet/skills/flow-comet/scripts/route-node.mjs +459 -11
- package/.flow-comet/skills/flow-comet/scripts/state-schema.mjs +58 -3
- package/.flow-comet/skills/flow-comet/scripts/system-test.mjs +1024 -11
- package/.flow-comet/skills/flow-comet/scripts/time-utils.mjs +133 -0
- package/.flow-comet/skills/flow-comet/scripts/workflow-guard.mjs +285 -227
- package/.flow-comet/skills/flow-comet/scripts/workflow-handoff.mjs +6 -4
- package/.flow-comet/skills/flow-comet/scripts/workflow-state.mjs +515 -31
- package/.flow-comet/skills/flow-comet-archive/SKILL.md +2 -0
- package/.flow-comet/skills/flow-comet-change/SKILL.md +13 -1
- package/.flow-comet/skills/flow-comet-design/SKILL.md +6 -2
- package/.flow-comet/skills/flow-comet-dev/SKILL.md +3 -1
- package/.flow-comet/skills/flow-comet-evolve/SKILL.md +46 -11
- package/.flow-comet/skills/flow-comet-execute/SKILL.md +6 -4
- package/.flow-comet/skills/flow-comet-health/SKILL.md +57 -16
- package/.flow-comet/skills/flow-comet-integration/SKILL.md +2 -0
- package/.flow-comet/skills/flow-comet-open/SKILL.md +2 -0
- package/.flow-comet/skills/flow-comet-plan/SKILL.md +17 -6
- package/.flow-comet/skills/flow-comet-requirement/SKILL.md +2 -0
- package/.flow-comet/skills/flow-comet-review/SKILL.md +7 -5
- package/.flow-comet/skills/flow-comet-subagent-execute/SKILL.md +12 -9
- package/.flow-comet/skills/flow-comet-task/SKILL.md +7 -3
- package/.flow-comet/skills/flow-comet-test/SKILL.md +2 -0
- package/.flow-comet/skills/flow-comet-ui-design/SKILL.md +28 -3
- package/.flow-comet/skills/flow-comet-verify/SKILL.md +7 -5
- package/README.md +45 -119
- package/package.json +1 -1
- package/scripts/dsh-bridge.mjs +2 -2
|
@@ -15,6 +15,8 @@ This node finalizes a completed change by extracting reusable lessons from the d
|
|
|
15
15
|
|
|
16
16
|
## Guidance
|
|
17
17
|
|
|
18
|
+
> **模板权威**:本节点产出工件的段形唯一权威 = `flow-kit/templates/**`;`.specs/archive/**` 是历史证据、**不是模板来源**——不得以「上一轮就是这么写的」对齐段形。
|
|
19
|
+
|
|
18
20
|
### Prerequisites
|
|
19
21
|
|
|
20
22
|
- `.specs/<change-id>/UAT.md` must exist with all items passed (from verify node).
|
|
@@ -7,13 +7,15 @@ description: "flow-kit CHANGE 阶段协议:反问澄清、change-id 自动生
|
|
|
7
7
|
|
|
8
8
|
本 Skill 为 flow-comet 的 open 节点提供 flow-kit 的 CHANGE 反问协议。
|
|
9
9
|
|
|
10
|
+
> **模板权威**:本技能产出工件的段形唯一权威 = `flow-kit/templates/**`;`.specs/archive/**` 是历史证据、**不是模板来源**——不得以「上一轮就是这么写的」对齐段形。
|
|
11
|
+
|
|
10
12
|
## 加载
|
|
11
13
|
|
|
12
14
|
读取 `flow-kit/prompts/0-change.md` 并按其执行。关键步骤:
|
|
13
15
|
|
|
14
16
|
1. **自动生成 change-id**(kebab-case,2~4 词,检查 `.specs/<id>/` 不冲突)
|
|
15
17
|
2. **架构级变更检测**(步骤 0.4):命中 5 类信号时暂停,引导先跑 A-architect
|
|
16
|
-
3. **前端项目识别**(步骤 0.5
|
|
18
|
+
3. **前端项目识别**(步骤 0.5):关键词判定是否为前端项目;判定结果按「视觉调性段的标记约定」落盘(非前端以**结构形态**在该段标注「不适用」)
|
|
17
19
|
4. **视觉调性预选**(步骤 0.6,仅前端):9 张调性卡片 + 推荐
|
|
18
20
|
5. **结构化反问**(步骤 1):每轮最多 3 个问题
|
|
19
21
|
6. **影响面判定 + 范围排除**
|
|
@@ -24,6 +26,16 @@ description: "flow-kit CHANGE 阶段协议:反问澄清、change-id 自动生
|
|
|
24
26
|
|
|
25
27
|
- `.specs/<change-id>/CHANGE.md`
|
|
26
28
|
|
|
29
|
+
## 视觉调性段的标记约定(前端 / 非前端)
|
|
30
|
+
|
|
31
|
+
`CHANGE.md` 的 `## 视觉调性` 段(段名取自 `flow-kit/templates/CHANGE.md`)不只承载调性选择,还是下游 design 出口判定「是否前端」的**结构级判据**——它的在场状态必须与项目实情一致:
|
|
32
|
+
|
|
33
|
+
- **结构形态**(判据口径,与引擎的 design 出口适用性门控一致;本节只描述契约,两者不一致时以引擎的输出行为为准):`不适用` 标记**独立行**、居**行首**(可带列表符号 / 引用 / 加粗),或写在适用性类标签(`适用性` / `适用范围` / `是否前端` / `视觉调性` / `前端` / `界面` / `适用`)的**字段值位**;标记之后须成**词形边界**(紧跟空白、标点或行尾),命中即回显**命中片段**。段内其它位置顺带提到「不适用」(例如句子里写「不适用于暗色主题」)不算标注,仍判前端。
|
|
34
|
+
- **前端项目**:按步骤 0.6 的预选结果填段(选定 / 理由 / 参考产品 / 明确排除),不要以结构形态标注「不适用」。
|
|
35
|
+
- **非前端项目**:保留该段并以**结构形态**标注「不适用」(可附一句理由,例如「CLI 工具,无用户可见界面」)。段缺席同样按非前端处理,但缺席不留可读证据,故约定**显式标注**。
|
|
36
|
+
- **判据与强制等级**(下游据此分派):`flow-comet-ui-design` 在 design 节点的绑定等级为 `guarded`——段在场且无结构形态标记 ⇒ 判前端 ⇒ design 出口要求 `.specs/<change-id>/UI-DESIGN.md` 在场,并要求 `required-skill:design.flow-comet-ui-design` 真实声明(先加载、再声明);段缺席或有结构形态标记 ⇒ 判非前端 ⇒ 出口打印 `UI-DESIGN: skipped(非前端)` 与命中片段后放行,不要求 UI-DESIGN.md。
|
|
37
|
+
- **改判走本阶段**:change 进行中要改前端 / 非前端判定,回到这里改这一个段,不在 design / execute / verify 里就地绕开判据——改段即改变了 design 出口的判据输入。
|
|
38
|
+
|
|
27
39
|
## 状态推进
|
|
28
40
|
|
|
29
41
|
CHANGE.md 生成后,由 flow-comet 状态机(workflow-state/guard)推进节点。不需要手动维护 STATE.md。
|
|
@@ -25,6 +25,8 @@ Responsibility: 技术栈选型 + ADR + 数据流。生成 DESIGN.md(轻量流
|
|
|
25
25
|
|
|
26
26
|
guard 校验见 workflow-guard.mjs NODE_TRANSITION_GATES / templateSectionPatterns;「填得好不好」由 review 把关。
|
|
27
27
|
|
|
28
|
+
> **模板权威**:本节点产出工件的段形唯一权威 = `flow-kit/templates/**`;`.specs/archive/**` 是历史证据、**不是模板来源**——不得以「上一轮就是这么写的」对齐段形。
|
|
29
|
+
|
|
28
30
|
# Design
|
|
29
31
|
|
|
30
32
|
## Node Goal
|
|
@@ -105,11 +107,13 @@ The design node reads CHANGE.md and REQUIREMENT.md, then produces DESIGN.md thro
|
|
|
105
107
|
|
|
106
108
|
| Skill | Enforcement | Reason |
|
|
107
109
|
|-------|-------------|--------|
|
|
108
|
-
| `flow-comet-ui-design` |
|
|
110
|
+
| `flow-comet-ui-design` | Guarded(仅前端项目触发) | Produces UI-DESIGN.md with design tokens, anti-AI-slop check, visual north star——前端 change 须先 `skill-load` 建标记并在 record 载荷带 `required-skill:design.flow-comet-ui-design`(出口不再自动补写);非前端项目不加载不声明;旧 change 渐进 WARN |
|
|
109
111
|
|
|
110
112
|
**加载声明(阶段层 · 双步硬规则)**:本节点技能已由入口路由经 Skill 工具加载(你正在阅读的就是它);本节点 Required Skill Calls 的加载与声明同样不可跳过:
|
|
111
113
|
|
|
112
|
-
1. 本节点的同名条目已随路由加载——同名 required 条目(`flow-comet-design`)无需重复加载,仅需运行下方声明命令(只读取 SKILL.md 文件不叫加载,**不得跳过**真正的 Skill 工具注入步骤)。`flow-comet-ui-design` 为
|
|
114
|
+
1. 本节点的同名条目已随路由加载——同名 required 条目(`flow-comet-design`)无需重复加载,仅需运行下方声明命令(只读取 SKILL.md 文件不叫加载,**不得跳过**真正的 Skill 工具注入步骤)。`flow-comet-ui-design` 为 **guarded 但仅前端适用**的条目——前端项目用 Skill 工具加载其已装副本后**必须**运行对应 `skill-load` 声明建标记,并在 record 载荷带 `required-skill:design.flow-comet-ui-design`(出口不再自动补写该条目,缺声明即拦截);非前端项目不加载不声明(出口打印可见的 `UI-DESIGN: skipped(非前端)` 后放行);旧 change 保持渐进,缺件仅 WARN。
|
|
115
|
+
|
|
116
|
+
> **前端判据(结构级 · 与引擎同口径)**:`CHANGE.md` 的「视觉调性」段在场,且段内的「不适用」标记成**结构形态**时才判非前端——标记**独立行**、居**行首**(可带列表符号 / 引用 / 加粗),或写在适用性类标签(`适用性` / `适用范围` / `是否前端` / `视觉调性` / `前端` / `界面` / `适用`)的**字段值位**;标记之后须成**词形边界**(紧跟空白、标点或行尾),命中即回显**命中片段**。段内其它位置顺带提到「不适用」(如「不适用于暗色主题」)不算标注,仍判前端、仍要求 UI-DESIGN.md 与 `guarded` 声明。
|
|
113
117
|
2. 加载完成后**立即**运行声明命令(节点退出与证据记录会核对声明标记;声明如实记录加载动作,不等于产出证明):
|
|
114
118
|
|
|
115
119
|
```bash
|
|
@@ -7,6 +7,8 @@ description: "flow-kit DEV 阶段协议:TDD + 6 维自查 + diff 边界 verify
|
|
|
7
7
|
|
|
8
8
|
本 Skill 为 flow-comet 的 execute/subagent-execute 节点提供 flow-kit 的完整开发规则集。
|
|
9
9
|
|
|
10
|
+
> **模板权威**:本技能产出工件的段形唯一权威 = `flow-kit/templates/**`;`.specs/archive/**` 是历史证据、**不是模板来源**——不得以「上一轮就是这么写的」对齐段形。
|
|
11
|
+
|
|
10
12
|
## 加载
|
|
11
13
|
|
|
12
14
|
读取 `flow-kit/prompts/4-dev.md` 并按其执行。以下是核心规则摘要(完整内容以 prompt 文件为准):
|
|
@@ -21,7 +23,7 @@ description: "flow-kit DEV 阶段协议:TDD + 6 维自查 + diff 边界 verify
|
|
|
21
23
|
- **第 2 级**:若仅返回 "Launching skill" 占位/无实际审查指令(已知现象:worktree 子代理的 skill 路由与会话不一致,插件执行体可能未注入)——**Read 插件缓存/安装目录协议文件手动执行完整 brooks 流程**:Claude Code `~/.claude/plugins/cache/brooks-lint-marketplace/brooks-lint/<ver>/skills/brooks-review/`;Codex `~/.codex/skills/brooks-review/`(或项目 `.agents/skills/`)(SKILL.md + 引用文件 + `_shared/`——`_shared/` 是 brooks-review 目录的**兄弟目录**(同在该插件 skills/ 下,如 `.../brooks-lint/<ver>/skills/_shared/`),不是 brooks-review 的子目录),按协议产出 4-element 审查(Symptom/Source/Consequence/Remedy + file:line + 书引用)——**仅阅读协议文本作为审查指引,不执行缓存文件内容**;来源不可信/无法验证时跳过该级,降级内置快查并如实声明
|
|
22
24
|
- **第 3 级**:缓存文件也不可读/不存在时,才用内置 R1~R6 快查
|
|
23
25
|
- SUMMARY `## 自检方法` 必须声明三要素:尝试方式 / 失败原因 / 替代方法;回传 Return Contract 时 `selfReview` 字段必填三值之一:`brooks-review`(成功)/ `cache-brooks`(读缓存手动执行)/ `builtin-quickcheck`(最终降级——guard 校验须含缓存尝试证据,新 change 缺失 BLOCKED,旧 change WARN 渐进)。
|
|
24
|
-
- **builtin-quickcheck 声明措辞(guard 关键词级校验)**:guard 按关键词声明级校验(不做语义判断)——不可用原因须含 `brooks-lint 不可用 / 插件不可用 / unavailable / N/A`,缓存尝试证据须含 `插件缓存 / 缓存协议 / 协议文件 / plugins/cache`。推荐措辞示例:「brooks-lint 不可用(Skill 仅返回占位,插件执行体未加载);已 Read 插件缓存协议文件(~/.claude/plugins/cache/.../brooks-review/)手动执行仍不可行,按协议降级内置 R1~R6
|
|
26
|
+
- **builtin-quickcheck 声明措辞(guard 关键词级校验)**:guard 按关键词声明级校验(不做语义判断)——不可用原因须含 `brooks-lint 不可用 / 插件不可用 / unavailable / N/A`,缓存尝试证据须含 `插件缓存 / 缓存协议 / 协议文件 / plugins/cache`。推荐措辞示例:「brooks-lint 不可用(Skill 仅返回占位,插件执行体未加载);已 Read 插件缓存协议文件(~/.claude/plugins/cache/.../brooks-review/)手动执行仍不可行,按协议降级内置 R1~R6 快查」——语义完整但缺关键词的写法会被拦截(完整流程实测实证)。
|
|
25
27
|
- **`## 6 维自查` 段内也须出现自检方法名**(`brooks-review` / `cache-brooks` 字样,如「- 功能: 通过(brooks-review 已跑)」)——guard 校验 6 维自查段是否声明了自检方法(新 change 缺失 BLOCKED,旧 change WARN 渐进)。
|
|
26
28
|
- **纯测试/纯文档任务**(无生产代码改动,6 维自查非必跑)仍须满足自检方法声明与 builtin 缓存证据——可**引用同 change 其他 SUMMARY 已声明的缓存尝试**(如「自检证据见 T01-SUMMARY(cache-brooks 已读插件缓存)」)满足 guard 校验。
|
|
27
29
|
5. **diff 边界 verify(R6.5)**:`git diff --name-only` 与 TASK write_files 比对,越界必须回滚
|
|
@@ -1,26 +1,61 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow-comet-evolve
|
|
3
|
-
description: "Use only when explicitly invoked as /flow-comet-evolve; scan archived changes' DESIGN.md section 9,
|
|
3
|
+
description: "Use only when explicitly invoked as /flow-comet-evolve; scan archived changes' DESIGN.md section 9 through the engine command, review sediment candidates one by one, then patch CONTEXT.md with the approved ones. Not part of the 8-node flow."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# flow-comet-evolve(横向命令 · 架构沉淀)
|
|
7
7
|
|
|
8
8
|
## 触发
|
|
9
9
|
|
|
10
|
-
用户说「同步架构 / 整理沉淀 / evolve / 同步 CONTEXT
|
|
10
|
+
用户说「同步架构 / 整理沉淀 / evolve / 同步 CONTEXT」。本命令**只按显式调用与用户意图触发**——到期提示是提醒,不是自动加载条件。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
**覆盖声明(上游 vendored 只读)**:上游对应物 = `flow-kit/prompts/A-evolve.md`(只读基准,不修改)。**以下上游语义不采用**:① 载体 = 仓库根 `STATE.md` 的 `last_evolve_at` / `last_evolve_promoted` → 本仓载体 = **引擎 state**(`last_evolve_at`)+ `.specs/CONTEXT.md` 的 `## evolve 元数据` 段(本仓 `docs/internal/ARCHITECTURE.md` §六明确**不吸收** STATE.md 式跨会话状态跟踪);② 已扫 change 清单写回 `STATE.md` 数组 → 本仓写进 `.specs/evolve/<日期>-EVOLVE.md` 报告,**不进 state**。**沿用上游**:只扫 `DESIGN.md` §9、逐项人工确认、禁止批量 promote、报告落 `.specs/evolve/`、60 天 / ≥5 个带沉淀段 change 的建议阈值。`## evolve 元数据` 段的**段形权威 = `flow-kit/templates/CONTEXT.md`**(`## intel-scan 元数据` 为同源先例;校验实现在 `context-init.mjs`)。本命令语义与产物形态**以本节为准**。
|
|
13
|
+
|
|
14
|
+
**到期提示(引擎输出面)**:`node .claude/skills/flow-comet/scripts/workflow-state.mjs status` 在下列任一条件成立时输出一行 `EVOLVE-DUE:`(含上次沉淀时间、命中原因与「建议显式调用 evolve」指引):`last_evolve_at` 距今 > 60 天,或该时刻之后新增 ≥ 5 个带 `§9` 的归档 change。未达阈值**不输出**(零噪音);`last_evolve_at` 缺席(从未沉淀过)同样不提示——需要时手动跑本命令即可。
|
|
15
|
+
|
|
16
|
+
## 时间戳载体:引擎 state(不使用 STATE.md)
|
|
17
|
+
|
|
18
|
+
- **唯一真相** = `.flow-comet/flow-comet-state.json` 的 `last_evolve_at`,形态为**本地时间 + 显式偏移**(`YYYY-MM-DDTHH:mm:ss±HH:mm`;历史 `Z` 形态仍可解析,比较一律按解析后的时刻差值)
|
|
19
|
+
- **写入通道唯一** = `node .claude/skills/flow-comet/scripts/workflow-state.mjs config set last_evolve_at <值>`(脚本不直写 state 文件)
|
|
20
|
+
- **双落点**:同批更新 `.specs/CONTEXT.md` 的 `## evolve 元数据` 段(`last_evolve_at` / `scanner` / `下次建议` 三字段,对齐 `## intel-scan 元数据` 的字段语义)。两处取值必须一致,**冲突以 state 为准**
|
|
21
|
+
- 旧项目若在 `STATE.md` 维护过该字段:以引擎 state 为准;首次运行按「无基线」全量扫描并建立新基线
|
|
13
22
|
|
|
14
23
|
## 流程
|
|
15
24
|
|
|
16
|
-
1.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
### 1. 扫描(只读,工作区零改动)
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
node .claude/skills/flow-comet/scripts/evolve.mjs scan --root .
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- 扫描范围 = `last_evolve_at` **之后归档**的 change(无基线 → 全部归档 change);归档时刻取归档目录名的日期前缀(随提交固化,跨 clone / 检出稳定)
|
|
32
|
+
- **只读**每个 `.specs/archive/<日期>-<change-id>/DESIGN.md` 的架构沉淀段(第 9 节)——**不读该文档的其它段**,防 change 级冻结决策被错误升级为项目级
|
|
33
|
+
- 输出候选清单:`<归档目录名>#<序号>` + 条目 + 目标文档;并列出本次已扫的 change(含无沉淀段、无 `DESIGN.md` 的目录),扫描范围对用户完全可见
|
|
34
|
+
- 候选落点按沉淀子段归类:可复用抽象 / 禁动清单 → `CONTEXT.md`「既有抽象索引」;项目级技术决策 → `CONTEXT.md`「已锁决策」;依赖 → `CONTEXT.md`「技术栈」;跨模块契约 → `ARCHITECTURE.md`「跨模块契约」(该文档不在场时需先建立,否则应用会被拒绝且零改动)
|
|
35
|
+
|
|
36
|
+
### 2. 逐项 review(用户参与,不可跳过)
|
|
37
|
+
|
|
38
|
+
把候选清单贴给用户,**逐条**确认:接受 / 跳过(记理由)/ 编辑后接受。**严禁**一次性把整批直接写入。与 `CONTEXT.md` 现有条目重叠的冲突项必须显式提问,不允许默默接受。
|
|
39
|
+
|
|
40
|
+
### 3. 应用(只写批准的项)
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
node .claude/skills/flow-comet/scripts/evolve.mjs apply <候选 id> [<候选 id> ...] --root . --scanner "<执行工具>"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- 只 patch 批准的条目:写入前先备份目标文档(`.specs/CONTEXT.md.bak-<日期>`),只追加不删除既有内容,条目带来源标注(`来源 @.specs/archive/<目录>/DESIGN.md`)
|
|
47
|
+
- 重复应用同一条目按**幂等**处理(目标段已在场则不重复写入)
|
|
48
|
+
- 同批写双落点时间戳(`config set` 通道 + `## evolve 元数据` 段,取值一致)
|
|
49
|
+
- 落 `.specs/evolve/<日期>-EVOLVE.md` 报告:扫描范围 + 已扫 change 清单 + 候选处置 + 未应用项 + 双落点取值 + 下次建议
|
|
50
|
+
- 输出 `EVOLVE-OK` 才算应用成功;失败输出 `BLOCKED:` 原因且不留下半成品(文档写入与 state 写入同一命令内完成,失败可幂等重跑)
|
|
51
|
+
|
|
52
|
+
### 4. 收尾
|
|
53
|
+
|
|
54
|
+
把报告路径与写入清单交给用户复核;**未应用的候选**保留在报告里,可凭候选 id 继续 `apply`。下次建议时间 = 约 60 天后,或新增 ≥ 5 个带沉淀内容的 change 之后。
|
|
21
55
|
|
|
22
56
|
## 边界
|
|
23
57
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
58
|
+
- 不写业务代码;写入面只有项目级文档、`.specs/evolve/` 报告与 `last_evolve_at`
|
|
59
|
+
- **只读沉淀段**:扫描与解析都不触碰设计文档的其它段
|
|
60
|
+
- 只追加 / 更新,**不删除**既有内容;发现需要改架构(决策推翻 / ADR 弃用 / 依赖规则变更)→ 停下来提示用户走架构重审
|
|
61
|
+
- `CONTEXT.md` 的更新统一走本命令或 `context-scan`,不在 change 内直接改
|
|
@@ -25,6 +25,8 @@ In subagent mode (default) this node is a coordinator: it does not write impleme
|
|
|
25
25
|
|
|
26
26
|
guard 校验见 workflow-guard.mjs NODE_TRANSITION_GATES / W1-B;「填得好不好」由 review 把关。
|
|
27
27
|
|
|
28
|
+
> **模板权威**:本节点产出工件的段形唯一权威 = `flow-kit/templates/**`;`.specs/archive/**` 是历史证据、**不是模板来源**——不得以「上一轮就是这么写的」对齐段形。
|
|
29
|
+
|
|
28
30
|
### 执行模型(按 executionMode,用户显式选择)
|
|
29
31
|
|
|
30
32
|
- **subagent(默认)**: 统一委托子代理——协调者流程(构造 handoff → Agent worktree 委托 → 收集 Return Contract → 验收标 done)
|
|
@@ -40,7 +42,7 @@ execute 节点**只处理 `parallel="false"`(或未标注 parallel)的 pendi
|
|
|
40
42
|
|
|
41
43
|
**归属纪律**:request 会校验任务的并行属性与原始 `currentNode`——串行 pending 任务只归属本节点,并行 pending 任务归属 `subagent-execute`;错误节点的新 change 请求会被 BLOCK,并按输出运行 `workflow-state next` 与 `entry <目标节点>` 恢复后再重试。
|
|
42
44
|
|
|
43
|
-
**TASK 签名校验(C3,execute 期间)**:entry execute 时记录任务集签名(行尾规范化 + 标记属性剥离);exit 时比对——execute 期间 TASK.md **只允许改开标签的标记属性**(`status` done/pending;时间戳如需记录写在开标签属性如 `completed_at`——签名剥离白名单允许;**禁止写入 action/其他 task 内容**),增删任务/改 action/改边界/改其他内容会在 exit 被 BLOCKED(签名不匹配)。回退修复任务(review/verify 发现缺陷追加)须先经 review 流程追加到 `## Fix 任务`
|
|
45
|
+
**TASK 签名校验(C3,execute 期间)**:entry execute 时记录任务集签名(行尾规范化 + 标记属性剥离);exit 时比对——execute 期间 TASK.md **只允许改开标签的标记属性**(`status` done/pending;时间戳如需记录写在开标签属性如 `completed_at`——签名剥离白名单允许;**禁止写入 action/其他 task 内容**),增删任务/改 action/改边界/改其他内容会在 exit 被 BLOCKED(签名不匹配)。回退修复任务(review/verify 发现缺陷追加)须先经 review 流程追加到 `## Fix 任务` 段,再按下方「修复回路状态机路径」受控归位 execute,并由 entry execute 刷新签名(端到端验证实证:直接注入任务会被签名拦截)。
|
|
44
46
|
|
|
45
47
|
本节点**不直接写实现代码**。所有 pending 任务统一通过 Agent 工具委托 fresh-context 子代理执行(加载 flow-comet-dev + 回传 Return Contract)。
|
|
46
48
|
|
|
@@ -103,7 +105,7 @@ This node is truly done when:
|
|
|
103
105
|
- **Agent thought**: "This task is taking long, let me skip the self-review." **Actual risk**: Skipping self-review defers quality issues to the review node, where they become Critical items requiring fix tasks. Better to catch early.
|
|
104
106
|
- **Agent thought**: "这个 parallel 任务小,我顺手在主会话做了。" **Actual risk**: 违反并行委托设计——subagent-execute 节点被静默跳过,丢失并行隔离与 write_files 冲突防护;且 execute 出口的 all-tasks-done 校验会 BLOCKED(parallel 无 handoffResult)。parallel="true" 任务只能由 subagent-execute 委托。
|
|
105
107
|
|
|
106
|
-
##
|
|
108
|
+
## 修复回路状态机路径
|
|
107
109
|
|
|
108
110
|
review / verify 发现缺陷后的修复必须回到 `execute` 节点生命周期内完成,禁止驻留源节点「顺手修完」;引擎按以下路径强制闭环(`<源节点>` 为 review 或 verify):
|
|
109
111
|
|
|
@@ -111,10 +113,10 @@ review / verify 发现缺陷后的修复必须回到 `execute` 节点生命周
|
|
|
111
113
|
2. **受控归位 execute**:运行 `workflow-state next`(完整命令:`node .claude/skills/flow-comet/scripts/workflow-state.mjs next`),或运行 `workflow-guard entry execute`(完整命令:`node .claude/skills/flow-comet/scripts/workflow-guard.mjs entry execute`)。处于 Fix 回退态(源节点驻留 + 存在 pending Fix 任务 + 当前路由判定为 execute)时,引擎把当前节点受控归位为 `execute`(`currentNode=execute`),并输出 `FIX-BATCH` 审计行(`next` 同时输出 `NODE: execute`);用 `workflow-state.mjs status` 确认 `stateCurrentNode` 已是 `execute` 再开工;若未归位,先按 `next` / `status` 的输出核对任务状态与路由,不要未经归位硬开工。
|
|
112
114
|
3. **执行修复**:按 execute 节点生命周期完成全部 Fix 任务(委托/直写规则不变);`entry execute` 刷新任务集签名,锁定追加后的任务集——归位后不得再增删任务或修改任务内容。
|
|
113
115
|
4. **跑 execute 四类出口**:`record execute` → `exit execute --apply`。四类出口门禁真实执行——**全任务 done / 逐任务 SUMMARY 完备 / 6 维自查 + 自检方法声明 / 任务集签名一致**;任一缺失即 BLOCKED 并给出恢复指引。通过后,引擎在 Fix 二次完成时把当前节点推回源节点(review 或 verify)。
|
|
114
|
-
- **guard exit 回源审计行语义(Fix vs RETURN
|
|
116
|
+
- **guard exit 回源审计行语义(Fix vs RETURN)**:真实修复回路二次完成保留 `FIX-BATCH: 回源节点 <源节点>`(真实 Fix 回炉的机器锚);正常多趟收尾(任务集签名全等且无 Fix 标记)输出中性 `RETURN: 回源节点 <源节点>`(非 Fix 回修);旧 state 缺闭合/修复证据(无签名事件且无 Fix 标记)输出 `RETURN: 回源节点 <源节点>(旧 state 缺闭合/修复证据,未分类)`,不冒充 Fix、不 BLOCK;上述分类只改审计行文本,路由与 state 写入零变化。此处 `RETURN:` 仅指审计行前缀,与子代理 handoff 的 Return Contract 无关。
|
|
115
117
|
5. **回源节点跑出口**:回到源节点后运行 `next`,Fix 回程豁免生效时应输出 `NODE: review` 或 `NODE: verify`(不会因源节点产物已存在而跳过);若仍输出后续节点,说明回程条件未满足,先核对状态机归属与任务状态,不要继续推进。随后执行 `entry <源节点>` → `exit <源节点> --apply` 跑源节点出口门禁(即 entry/exit 源节点);通过后继续正常路由(review → verify;verify → archive),必要时进入下一轮 Fix 闭环。
|
|
116
118
|
- **`next` 回程审计行语义**:回程豁免行始终输出中性 `RETURN: 回程源节点 <源节点>`(源节点产物在场且未出口;保留源节点跑出口),不再输出 FIX-BATCH;受控归位行的 `FIX-BATCH: 归位 <execute 家族>` 保留(真实 Fix 回退行),两者不得混同。
|
|
117
|
-
6. **禁止绕过**:驻留源节点不归位、顺手改完后直接跑源节点 exit 收场会被 BLOCKED
|
|
119
|
+
6. **禁止绕过**:驻留源节点不归位、顺手改完后直接跑源节点 exit 收场会被 BLOCKED(存在未归位/未跑出口的修复回路),必须按上述路径恢复;不得用跳过归位或出口门禁的手段(含手动改写 `.flow-comet/flow-comet-state.json`)替代本路径。
|
|
118
120
|
|
|
119
121
|
**由受控重入打开的场景(archive 源)**:缺陷在归档后才暴露、且归档移动尚未发生时,可先由用户显式授权把工作归属退回 `execute` / `subagent-execute` / `review` / `verify` 之一,再按本节路径回到 execute 生命周期完成修复。重入命令:`node .claude/skills/flow-comet/scripts/workflow-state.mjs reenter <target> --authorized-by <source> --reason <text> [--continue-round <n>]`——每次调用都需要用户显式授权,每 change 上限 3 轮(达上限后凭显式续轮授权 `--continue-round <n>`(n ≥ 已用轮次 + 1)可继续并计入下一轮);重入前自动落 state 备份快照(`.specs/<change-id>/.reentry-backups/`);成功打印 `REENTRY: archive → <target>(授权源 <source>;第 n/3 轮;备份 <file>)` 与 `REASON: <text>` 行(续轮审计行为 `第 n 轮(显式授权续轮,上限 3)`),与 Fix 回炉的 `FIX-BATCH` 行、正常多趟收尾的 `RETURN` 行三态可区分。归档移动已发生或 change 已 `completed` 时重入 BLOCKED,须走人工处置或新 change,不得静默跳过。重入只改工作归属,不写任何闭合标记,也不跳过目标节点入口 / 出口与源节点出口门禁;重复调用同一目标为空操作(输出 `REENTRY: 空操作——…`,不备份、不计数、不改写 state)。
|
|
120
122
|
|
|
@@ -1,31 +1,72 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow-comet-health
|
|
3
|
-
description: "Use only when explicitly invoked as /flow-comet-health; periodic codebase health check
|
|
3
|
+
description: "Use only when explicitly invoked as /flow-comet-health; periodic codebase health check driven by a deterministic collector (CONTEXT consistency, LESSONS numbering continuity, tech-debt count, redundancy tool probe, git history) plus an optional brooks-lint supplement layer with explicit degradation notes. Not part of the 8-node flow."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# flow-comet-health(横向命令 · 巡检)
|
|
7
7
|
|
|
8
8
|
## 触发
|
|
9
9
|
|
|
10
|
-
用户说「健康检查 / health / 体检 / 技术债扫描 /
|
|
10
|
+
用户说「健康检查 / health / 体检 / 技术债扫描 / 巡检 / 代码库健康度」。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
**只按显式调用触发**:本命令不属于 8 节点流程,不被节点路由进入,也不在流程里自动跑(路由里的到期提示指向的是架构沉淀命令,不是本命令)。
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
**覆盖声明(上游 vendored 只读)**:上游对应物 = `flow-kit/prompts/M-health.md`(只读基准,不修改)。
|
|
15
|
+
|
|
16
|
+
**沿用上游**:① 不属于任何 change、不写 `CHANGE.md` / `REQUIREMENT.md`,直接产出健康报告;② 角色边界 = 只产报告 + 改造建议清单,不直接改代码;③ 报告落点 `.specs/health/<YYYY-MM-DD>-HEALTH.md`;④ 装了 `brooks-lint` 时走其体检并把结果并入报告(本仓作为**可选增补层**并入**同一份**报告并标注来源);⑤ 冗余巡检**优先用工具**(`jscpd` / `knip` / `vulture` 等)并在报告里记明工具落点;⑥ 报告含**技术债优先级(Pain × Spread)**维度。
|
|
17
|
+
|
|
18
|
+
**以下上游语义不采用**:① 由 agent 现场巡检产出定性结论 → 本仓改为**确定性收集器**(脚本采集可复现项,每项带计数与复现命令);② 自动改写 `.specs/CONTEXT.md` 技术债段 / 自动开 change → 本仓**只读**(仅写体检报告,不改 CONTEXT、不开 change);③ 无可选工具时以主观评分填空 → 本仓**显式降级声明**,不产出替代性评分;④ 未装工具时走「现场 grep 抓样」的低精度回退 → 本仓**直接记降级原因**,不产出替代性读数。
|
|
19
|
+
|
|
20
|
+
本命令语义与报告形态**以本节为准**。
|
|
21
|
+
|
|
22
|
+
## 分层结构(防「绿报告」)
|
|
23
|
+
|
|
24
|
+
一份报告三层,落在同一个文件 `.specs/health/<日期>-HEALTH.md`:
|
|
25
|
+
|
|
26
|
+
| 层 | 内容 | 产出者 |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| 确定性层 | 项目上下文一致性 · 经验条目编号连续性 · 技术债表项数 · 冗余工具在场判定 · 版本历史统计 | `health.mjs`(逐项带计数与判据) |
|
|
29
|
+
| 增补层 | 代码体检工具的 4 维结果(代码质量 / 架构 / 技术债 / 测试质量) | agent:工具在场时执行体检技能,结果**并入同一份报告**并标注来源 |
|
|
30
|
+
| 降级声明 | 可选工具不在场的原因 + 判据说明 | `health.mjs`(每份报告都有) |
|
|
31
|
+
|
|
32
|
+
判据只锚「**确定性层完整 + 降级声明可见**」:可选工具缺席不构成失败,但**不能**用主观评分去填它的空位。
|
|
16
33
|
|
|
17
34
|
## 流程
|
|
18
35
|
|
|
19
|
-
1.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
36
|
+
1. 跑确定性收集器(命令路径以安装平台为准,下同):
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
node .claude/skills/flow-comet/scripts/health.mjs --root . --stdout
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
落盘 `.specs/health/<日期>-HEALTH.md`;`--stdout` 打印与落盘**逐字节相同**的内容,便于两次运行对照。
|
|
43
|
+
|
|
44
|
+
2. 看报告「增补层」的在场判定:
|
|
45
|
+
- **在场**:执行代码体检技能(`brooks-health`),把 4 维结果填进增补层的四个槽位,并在来源标注行写明命中落点;
|
|
46
|
+
- **不在场**:保留降级声明,不产出替代性评分——报告以确定性层为全部内容。用户要求定性判断时另走代码审查流程,不把主观分写进这份报告。
|
|
47
|
+
|
|
48
|
+
3. 读「与上次对比」段:与最近一份**日期不同**的历史报告逐项对读数。首份报告会显式声明「无差异可比」,不是静默省略。
|
|
49
|
+
|
|
50
|
+
4. 把需要动手的发现整理成改造建议清单交给用户(按优先级分组)。本命令不改代码;要落地时另开 change。
|
|
51
|
+
|
|
52
|
+
## 复现性纪律
|
|
53
|
+
|
|
54
|
+
- 报告里每个机器可判项都带计数与判据;同一冻结树连续两次运行,除报告末尾「易变行声明」列出的差异集合(生成时刻行 / 最近 30 天统计行 / 跨日时的文件名与基线选择)外**逐字节一致**。
|
|
55
|
+
- 出现差异集合之外的差异 → 按缺陷处理:先 `git status` 确认是否有人在此期间改了树,再查收集器判据是否引入了环境依赖。
|
|
56
|
+
- 报告由脚本整份重写:agent 填进增补层的内容会在下次运行时被覆盖;需要长期留档时把报告复制到项目自己的归档位置。
|
|
57
|
+
|
|
58
|
+
## 降级纪律(可选工具)
|
|
59
|
+
|
|
60
|
+
可选工具(代码体检工具、字面重复块 / 未用导出 / 未用依赖 / 死代码扫描器)**不在依赖面**:缺席、不可用、版本不符,一律走「显式声明原因 + 只出确定性子集」。
|
|
61
|
+
|
|
62
|
+
- 报告「降级声明」段逐项写明缺席工具与探面(扫描器:`node_modules/.bin/` 与 `PATH`;代码体检工具另含用户级缓存 / 用户技能目录与项目内三平台技能目录)。
|
|
63
|
+
- 工具在场但运行未完成(版本差异 / 平台包装器限制 / 超时)同样记进该段——**不静默降级**,也不让命令失败。
|
|
64
|
+
- 要让某个维度从「未采集」变成「有读数」,装工具后重跑本命令即可:不需要改流程,也不需要改运行状态。
|
|
27
65
|
|
|
28
|
-
##
|
|
66
|
+
## 只读边界
|
|
29
67
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
68
|
+
- **读**:`.specs/CONTEXT.md`、`.specs/LESSONS.md`、`.specs/health/*.md`(基线)、版本历史、可选工具的在场探测。
|
|
69
|
+
- **写**:只写 `.specs/health/<日期>-HEALTH.md` 一份报告。
|
|
70
|
+
- **不写运行状态**:不触碰 `.flow-comet/flow-comet-state.json`,本命令不新增任何状态字段(横向命令不进 change 生命周期)。
|
|
71
|
+
- **不改业务代码**,也不自动改写 `.specs/CONTEXT.md` / `.specs/LESSONS.md`:发现项只进报告与建议清单——就地改写会让「巡检」变成隐式写入通道。
|
|
72
|
+
- **不自动开 change**:是否立项由用户决定。
|
|
@@ -7,6 +7,8 @@ description: "flow-kit INTEGRATION 阶段协议:集成验证 + UAT + 失败诊
|
|
|
7
7
|
|
|
8
8
|
本 Skill 为 flow-comet 的 verify 和 archive 节点提供 flow-kit 的集成验证和归档流程。
|
|
9
9
|
|
|
10
|
+
> **模板权威**:本技能产出工件的段形唯一权威 = `flow-kit/templates/**`;`.specs/archive/**` 是历史证据、**不是模板来源**——不得以「上一轮就是这么写的」对齐段形。
|
|
11
|
+
|
|
10
12
|
## 加载
|
|
11
13
|
|
|
12
14
|
读取 `flow-kit/prompts/7-integration.md` 并按其执行。
|
|
@@ -24,6 +24,8 @@ Responsibility: CHANGE 反问 + REQUIREMENT 需求分析。生成 CHANGE.md 和
|
|
|
24
24
|
|
|
25
25
|
guard 校验见 workflow-guard.mjs NODE_TRANSITION_GATES / templateSectionPatterns;「填得好不好」由 review 把关。
|
|
26
26
|
|
|
27
|
+
> **模板权威**:本节点产出工件的段形唯一权威 = `flow-kit/templates/**`;`.specs/archive/**` 是历史证据、**不是模板来源**——不得以「上一轮就是这么写的」对齐段形。
|
|
28
|
+
|
|
27
29
|
# Open
|
|
28
30
|
|
|
29
31
|
## Node Goal
|
|
@@ -23,6 +23,8 @@ Responsibility: 拆原子任务(XML 格式)+ 波次划分。生成 TASK.md
|
|
|
23
23
|
|
|
24
24
|
guard 校验见 workflow-guard.mjs NODE_TRANSITION_GATES / W1-B;「填得好不好」由 review 把关。
|
|
25
25
|
|
|
26
|
+
> **模板权威**:本节点产出工件的段形唯一权威 = `flow-kit/templates/**`;`.specs/archive/**` 是历史证据、**不是模板来源**——不得以「上一轮就是这么写的」对齐段形。
|
|
27
|
+
|
|
26
28
|
波次散文一致性:`## 波次划分` 中标记为并行([P])的任务必须与 XML 任务 `parallel="true"` 一致——新 change 不一致 BLOCKED(旧 change WARN 渐进)。
|
|
27
29
|
|
|
28
30
|
### 波次形态约束(依赖驱动多趟 · 规划期必守)
|
|
@@ -35,6 +37,14 @@ guard 校验见 workflow-guard.mjs NODE_TRANSITION_GATES / W1-B;「填得好
|
|
|
35
37
|
|
|
36
38
|
**理由**:引擎委托节点为多趟访问设计——按依赖分趟循环消化,序列形态自由度交给依赖声明表达。flow-kit 上游模板未载此约束,以本条为准。
|
|
37
39
|
|
|
40
|
+
### 规划期任务边界与 [P] 语义
|
|
41
|
+
|
|
42
|
+
- **① 同一文件 ⇒ 同一任务**:一个文件只能有一个任务 owner;必须拆分时,在波次划分中显式排序并写明拆分理由与依赖方向,不得把同一文件的两处改动拆成无依赖的两个任务。
|
|
43
|
+
- **② [P] 只给本波确有并发同伴的任务**:`parallel="true"` 仅适用于同波确有其他可并行同伴、且 write_files 互不重叠的任务;孤立任务一律串行——「互不冲突」只是必要条件,不等于应标 `[P]`。
|
|
44
|
+
- **③ [P] × direct 模式**:`[P]` 任务只在 `subagent-execute` 节点委托消化;direct 模式只放行**串行任务**的主代理直写,`parallel="true"` 任务在 direct 下仍必须委托——direct 不是并行任务的逃生口。共享工作区下以 `write_files` 互斥 + 提交时点(提交前 diff 边界)作为并行子代理的相互隔离纪律。
|
|
45
|
+
|
|
46
|
+
**上游语义显式覆盖**:flow-kit 上游(`flow-kit/prompts/3-task.md` 等 vendored 只读文件)的宽松语义——「无冲突即可标 [P]」「同层即同波并行」——以本节为准(显式覆盖;上游只读,不做修改)。
|
|
47
|
+
|
|
38
48
|
# Plan
|
|
39
49
|
|
|
40
50
|
## Node Goal
|
|
@@ -57,9 +67,9 @@ This node decomposes the technical design into atomic, executable tasks with cle
|
|
|
57
67
|
|
|
58
68
|
2. **Read DESIGN.md sections 0 and 0.5**: Understand the tech stack (for verify commands) and the architecture alignment (for file boundaries — touched modules, reuse targets, forbidden list).
|
|
59
69
|
|
|
60
|
-
3. **Decompose by file conflict (vertical slices)**: Split tasks by file conflict, NOT by horizontal layers. Each task should be a vertical slice (one feature through model/API/UI) not a horizontal layer (all models first, then all APIs). Target: 2-10 minutes per task in fresh context.
|
|
70
|
+
3. **Decompose by file conflict (vertical slices)**: Split tasks by file conflict, NOT by horizontal layers. Each task should be a vertical slice (one feature through model/API/UI) not a horizontal layer (all models first, then all APIs). Target: 2-10 minutes per task in fresh context. Do not split one file across tasks; if unavoidable, declare explicit order and reason.
|
|
61
71
|
|
|
62
|
-
4. **Mark parallel tasks with [P]**:
|
|
72
|
+
4. **Mark parallel tasks with [P]**: only tasks with a genuine concurrent companion in the same wave and non-overlapping write_files get `parallel="true"`; isolated tasks are serial; under direct mode `[P]` tasks are still delegated at subagent-execute.
|
|
63
73
|
|
|
64
74
|
5. **Declare depends_on**: Each task explicitly declares which tasks it depends on.
|
|
65
75
|
|
|
@@ -73,9 +83,10 @@ This node decomposes the technical design into atomic, executable tasks with cle
|
|
|
73
83
|
- `done`: One sentence completion criteria, corresponding to an AC sub-item.
|
|
74
84
|
|
|
75
85
|
7. **Wave division**: Group tasks by dependency graph:
|
|
76
|
-
- Same layer = same wave (parallel execution).
|
|
77
86
|
- Cross layer = sequential execution.
|
|
78
|
-
-
|
|
87
|
+
- Same-layer tasks may carry `parallel="true"` only when the wave genuinely contains a concurrent companion and their `write_files` do not overlap; an isolated task stays serial.
|
|
88
|
+
- Flow-comet override: the permissive flow-kit upstream semantics — "no conflict ⇒ [P]" and "same layer = same wave, parallel" — are superseded by this node's rule; the vendored upstream files stay read-only and are not modified.
|
|
89
|
+
- Output wave diagram: `Wave 1: T01[P], T02[P]` etc.; isolated tasks appear as serial steps.
|
|
79
90
|
|
|
80
91
|
8. **LESSONS scan**: Grep `.specs/LESSONS.md` for keywords related to planned file paths or actions. If active lessons hit, declare difference or confirm still applies.
|
|
81
92
|
|
|
@@ -89,7 +100,7 @@ This node is truly done when:
|
|
|
89
100
|
- At least one `<task>` block exists; every task carries a `<verify>` field (the full seven-field shape — id/name/read_files/write_files/action/verify/done — is the execution discipline, review-checked; guard enforces the subset).
|
|
90
101
|
- Every `verify` field is an executable command (not a description).
|
|
91
102
|
- Every `write_files` is strictly within DESIGN.md touched + new modules range (not in forbidden list).
|
|
92
|
-
-
|
|
103
|
+
- Every `[P]` mark has a genuine concurrent companion in its wave with non-overlapping `write_files`; isolated tasks are serial (a fully serial plan is valid when no genuine companion exists).
|
|
93
104
|
- Wave division diagram is clear and has no circular dependencies.
|
|
94
105
|
- Task numbering is continuous.
|
|
95
106
|
|
|
@@ -98,7 +109,7 @@ This node is truly done when:
|
|
|
98
109
|
- **Agent thought**: "Split by layer first — models, then services, then endpoints." **Actual risk**: Horizontal layering creates artificial dependencies and blocks parallel execution. Always slice vertically by file conflict.
|
|
99
110
|
- **Agent thought**: "verify: tests should pass" is good enough. **Actual risk**: Vague verify commands cannot be executed. Must be specific: `pytest tests/test_x.py -v` not "tests should pass".
|
|
100
111
|
- **Agent thought**: "write_files can include any file the task might touch." **Actual risk**: Including DESIGN forbidden list modules in write_files bypasses R7.3 + R6.5 boundary enforcement. Strict control is mandatory.
|
|
101
|
-
- **Agent thought**: "
|
|
112
|
+
- **Agent thought**: "Same layer means these tasks can all be marked [P]." **Actual risk**: A same-layer task with no concurrent companion, or with overlapping `write_files`, would be delegated as parallel in violation of this node's rule. Mark `[P]` by companion and write boundaries, never by layer alone.
|
|
102
113
|
- **Agent thought**: "read_files and write_files are the same thing." **Actual risk**: read_files includes reuse targets and reference modules; write_files is strictly the modification boundary. They serve different purposes (B3 old-project guardrail).
|
|
103
114
|
|
|
104
115
|
## Entry Check
|
|
@@ -7,6 +7,8 @@ description: "flow-kit REQUIREMENT 阶段协议:AC(Given/When/Then)+ v1·v
|
|
|
7
7
|
|
|
8
8
|
本 Skill 为 flow-comet 的 open 节点提供 flow-kit 的 REQUIREMENT 需求分析。
|
|
9
9
|
|
|
10
|
+
> **模板权威**:本技能产出工件的段形唯一权威 = `flow-kit/templates/**`;`.specs/archive/**` 是历史证据、**不是模板来源**——不得以「上一轮就是这么写的」对齐段形。
|
|
11
|
+
|
|
10
12
|
## 加载
|
|
11
13
|
|
|
12
14
|
读取 `flow-kit/prompts/1-requirement.md` 并按其执行。关键步骤:
|
|
@@ -23,6 +23,8 @@ This node performs a structured multi-round review of the implemented change, ch
|
|
|
23
23
|
|
|
24
24
|
guard 校验见 workflow-guard.mjs NODE_TRANSITION_GATES / W1-B;「填得好不好」由 review 把关。
|
|
25
25
|
|
|
26
|
+
> **模板权威**:本节点产出工件的段形唯一权威 = `flow-kit/templates/**`;`.specs/archive/**` 是历史证据、**不是模板来源**——不得以「上一轮就是这么写的」对齐段形。
|
|
27
|
+
|
|
26
28
|
### 必查清单(review 逐项核对 · 执行者交付纪律)
|
|
27
29
|
|
|
28
30
|
- [ ] **工件模板保真**:每份交付工件(`*-SUMMARY.md` / TASK / CHANGE / REQUIREMENT / DESIGN)的**标题 / 首部字段 / 段序**与对应模板一致——SUMMARY 按 `flow-kit/templates/SUMMARY.md` 填写并含 `## 自检方法` 段;执行者按 `flow-kit/prompts/4-dev.md` 协议交付。
|
|
@@ -91,7 +93,7 @@ guard 校验见 workflow-guard.mjs NODE_TRANSITION_GATES / W1-B;「填得好
|
|
|
91
93
|
- Major (should fix: design issues, significant regression)
|
|
92
94
|
- Minor (optional: naming, style, small refactor)
|
|
93
95
|
|
|
94
|
-
8. **Generate fix tasks**: For all Critical and decided-to-fix Major findings, append to `.specs/<change-id>/TASK.md` as numbered fix tasks with full 7 fields — 追加到 TASK.md 的 `## Fix 任务` 段内(**禁止文件尾追加**), then follow the
|
|
96
|
+
8. **Generate fix tasks**: For all Critical and decided-to-fix Major findings, append to `.specs/<change-id>/TASK.md` as numbered fix tasks with full 7 fields — 追加到 TASK.md 的 `## Fix 任务` 段内(**禁止文件尾追加**), then follow the「修复回路状态机路径」section below: home back to execute and run its four exit gates before review can be closed.
|
|
95
97
|
|
|
96
98
|
9. **Disposition markers (problem-handling principle)**: Every finding entry in the `## 发现` section of REVIEW.md — including Minor — must carry a **disposition marker** so findings never silently disappear after being recorded:
|
|
97
99
|
- `[已修]` — fixed via a fix task (linked in the entry)
|
|
@@ -124,7 +126,7 @@ This node is truly done when:
|
|
|
124
126
|
- **Agent thought**: "I'll record this Minor and move on." **Actual risk**: Findings (especially Minor) that are recorded without a disposition marker silently disappear — the exit guard warns on missing markers; every finding must be `[已修]`, `[升级]` (user decision), or `[转待办]` (tracked for archive).
|
|
125
127
|
- **Agent thought**: "This Major is not for this batch, I'll defer it to backlog myself." **Actual risk**: Major 延期属用户决策点——reviewer 自行 `[转待办]` 会被退出守卫拦截(新 change BLOCKED / 旧 change WARN);须先 `[升级]` 等用户裁决,用户接受延期后才可记录裁决并转待办。
|
|
126
128
|
|
|
127
|
-
##
|
|
129
|
+
## 修复回路状态机路径
|
|
128
130
|
|
|
129
131
|
review / verify 发现缺陷后的修复必须回到 `execute` 节点生命周期内完成,禁止驻留源节点「顺手修完」;引擎按以下路径强制闭环(`<源节点>` 为 review 或 verify):
|
|
130
132
|
|
|
@@ -132,10 +134,10 @@ review / verify 发现缺陷后的修复必须回到 `execute` 节点生命周
|
|
|
132
134
|
2. **受控归位 execute**:运行 `workflow-state next`(完整命令:`node .claude/skills/flow-comet/scripts/workflow-state.mjs next`),或运行 `workflow-guard entry execute`(完整命令:`node .claude/skills/flow-comet/scripts/workflow-guard.mjs entry execute`)。处于 Fix 回退态(源节点驻留 + 存在 pending Fix 任务 + 当前路由判定为 execute)时,引擎把当前节点受控归位为 `execute`(`currentNode=execute`),并输出 `FIX-BATCH` 审计行(`next` 同时输出 `NODE: execute`);用 `workflow-state.mjs status` 确认 `stateCurrentNode` 已是 `execute` 再开工;若未归位,先按 `next` / `status` 的输出核对任务状态与路由,不要未经归位硬开工。
|
|
133
135
|
3. **执行修复**:按 execute 节点生命周期完成全部 Fix 任务(委托/直写规则不变);`entry execute` 刷新任务集签名,锁定追加后的任务集——归位后不得再增删任务或修改任务内容。
|
|
134
136
|
4. **跑 execute 四类出口**:`record execute` → `exit execute --apply`。四类出口门禁真实执行——**全任务 done / 逐任务 SUMMARY 完备 / 6 维自查 + 自检方法声明 / 任务集签名一致**;任一缺失即 BLOCKED 并给出恢复指引。通过后,引擎在 Fix 二次完成时把当前节点推回源节点(review 或 verify)。
|
|
135
|
-
- **guard exit 回源审计行语义(Fix vs RETURN
|
|
137
|
+
- **guard exit 回源审计行语义(Fix vs RETURN)**:真实修复回路二次完成保留 `FIX-BATCH: 回源节点 <源节点>`(真实 Fix 回炉的机器锚);正常多趟收尾(任务集签名全等且无 Fix 标记)输出中性 `RETURN: 回源节点 <源节点>`(非 Fix 回修);旧 state 缺闭合/修复证据(无签名事件且无 Fix 标记)输出 `RETURN: 回源节点 <源节点>(旧 state 缺闭合/修复证据,未分类)`,不冒充 Fix、不 BLOCK;上述分类只改审计行文本,路由与 state 写入零变化。此处 `RETURN:` 仅指审计行前缀,与子代理 handoff 的 Return Contract 无关。
|
|
136
138
|
5. **回源节点跑出口**:回到源节点后运行 `next`,Fix 回程豁免生效时应输出 `NODE: review` 或 `NODE: verify`(不会因源节点产物已存在而跳过);若仍输出后续节点,说明回程条件未满足,先核对状态机归属与任务状态,不要继续推进。随后执行 `entry <源节点>` → `exit <源节点> --apply` 跑源节点出口门禁(即 entry/exit 源节点);通过后继续正常路由(review → verify;verify → archive),必要时进入下一轮 Fix 闭环。
|
|
137
139
|
- **`next` 回程审计行语义**:回程豁免行始终输出中性 `RETURN: 回程源节点 <源节点>`(源节点产物在场且未出口;保留源节点跑出口),不再输出 FIX-BATCH;受控归位行的 `FIX-BATCH: 归位 <execute 家族>` 保留(真实 Fix 回退行),两者不得混同。
|
|
138
|
-
6. **禁止绕过**:驻留源节点不归位、顺手改完后直接跑源节点 exit 收场会被 BLOCKED
|
|
140
|
+
6. **禁止绕过**:驻留源节点不归位、顺手改完后直接跑源节点 exit 收场会被 BLOCKED(存在未归位/未跑出口的修复回路),必须按上述路径恢复;不得用跳过归位或出口门禁的手段(含手动改写 `.flow-comet/flow-comet-state.json`)替代本路径。
|
|
139
141
|
|
|
140
142
|
**由受控重入打开的场景(archive 源)**:缺陷在归档后才暴露、且归档移动尚未发生时,可先由用户显式授权把工作归属退回 `execute` / `subagent-execute` / `review` / `verify` 之一,再按本节路径回到 execute 生命周期完成修复。重入命令:`node .claude/skills/flow-comet/scripts/workflow-state.mjs reenter <target> --authorized-by <source> --reason <text> [--continue-round <n>]`——每次调用都需要用户显式授权,每 change 上限 3 轮(达上限后凭显式续轮授权 `--continue-round <n>`(n ≥ 已用轮次 + 1)可继续并计入下一轮);重入前自动落 state 备份快照(`.specs/<change-id>/.reentry-backups/`);成功打印 `REENTRY: archive → <target>(授权源 <source>;第 n/3 轮;备份 <file>)` 与 `REASON: <text>` 行(续轮审计行为 `第 n 轮(显式授权续轮,上限 3)`),与 Fix 回炉的 `FIX-BATCH` 行、正常多趟收尾的 `RETURN` 行三态可区分。归档移动已发生或 change 已 `completed` 时重入 BLOCKED,须走人工处置或新 change,不得静默跳过。重入只改工作归属,不写任何闭合标记,也不跳过目标节点入口 / 出口与源节点出口门禁;重复调用同一目标为空操作(输出 `REENTRY: 空操作——…`,不备份、不计数、不改写 state)。
|
|
141
143
|
|
|
@@ -218,5 +220,5 @@ If the script prints `SKILL: flow-comet-verify`, load that Skill next.
|
|
|
218
220
|
2. Read `.specs/<change-id>/REVIEW.md` — if exists with all rounds completed and Critical resolved, review is done.
|
|
219
221
|
3. If REVIEW.md exists but incomplete, check which rounds are missing and resume from there.
|
|
220
222
|
4. If Critical items were found but fix tasks not yet generated, generate them now.
|
|
221
|
-
5. If fix tasks were generated but not executed, follow the
|
|
223
|
+
5. If fix tasks were generated but not executed, follow the「修复回路状态机路径」section below to home back to execute and run its four exit gates; return here only after execute exit passes, then run review's own exit.
|
|
222
224
|
6. Do not repeat completed review rounds.
|
|
@@ -15,11 +15,12 @@ Responsibility: 委托 [P] 并行任务给子代理,要求加载 flow-comet-de
|
|
|
15
15
|
|
|
16
16
|
职责分工(趟次协作):本节点负责**并行委托**(`parallel="true"` 且依赖已满足的任务,同一趟内同时发出)——委托节点可多次往返:每趟委托当时全部依赖已满足的并行任务,趟间由 execute 节点串行消化,直至不存在依赖已满足的可并行 pending 且无串行残留。execute 节点负责**串行委托**(非 parallel 任务,一次一个)。两者共用同一委托证据库(handoff 记录在 subagent-execute evidence)。序列形态不是本节点的关注点:全并行、全串行、串→并、并→串及任意混排均合法(合法性只取决于 `depends_on` 无环且引用存在;依赖环与缺失依赖已在 plan 出口拦截并附恢复指引),到达本节点的任务序列由多趟路由按依赖拓扑自动分趟消化。
|
|
17
17
|
|
|
18
|
-
> **Codex
|
|
19
|
-
>
|
|
20
|
-
>
|
|
21
|
-
>
|
|
22
|
-
>
|
|
18
|
+
> **Codex 平台事实与 flow-comet 当前支持面(2026-09-30 记录)**:**平台事实**——Codex 的常规用法是交互式 CLI(`codex` 无子命令)与会话内 agent,`codex exec` 只是 headless 子面;原生多代理 `multi_agent` 为 stable、默认启用(`codex features list` 可查),本机真实交互式会话日志中记录到 `spawn_agent` / `wait_agent` / `close_agent` 的实际调用——因此「Codex 不能委派 / 不使用并行委托」**不是平台事实**。**flow-comet 当前支持面(机制缺口)**——现有守卫 / 白名单 / 隔离模型未覆盖 Codex 原生子代理形态;在后续契约(须先由覆盖交互式会话与原生子代理的探针得出结论,再据此决定是否修改引擎)落地前,本节点在 Codex 上**不派遣并行子代理**,任务逐个走 `execute` 节点串行交付——这是 flow-comet 现阶段的**支持面限制,不是平台能力边界**;headless 子面实测见下(仅 `codex exec`,不得外推)。
|
|
19
|
+
> **dsh 平台委托方式(实测核对)**:dsh 的子代理是平台**进程内子代理**(不创建独立工作区)——写入守卫按**会话身份分派**:子代理 `delegationDepth` 大于 0 直接放行、**项目内任意路径可写(含 gitignored)**,因此**无需隔离区**;直接委托即可,不需要 worktree 隔离。**通用边界**:同一工作区内的并行子代理会看到彼此未提交的中间态——任务的 `write_files` 边界与提交时点即相互隔离纪律(本节点第 1 步的 write_files 互斥检查因此仍是硬前置)。
|
|
20
|
+
> **旧结论(实测 2026-08-13;证据已不可复核,未纳入 2026-09-30 重测矩阵——不得作为现行结论)**:worktree 的 `.git` 是主仓共享——`workspace-write`/`git-write-access` 沙箱均被 Codex 硬拦截(index.lock / objects / COMMIT_EDITMSG Permission denied);子代理必须用 `sandbox_mode="danger-full-access"` 才能完成 git 提交(worktree 隔离已限定写范围,full-access 仅用于让 git 提交可行)。**信任边界**:`danger-full-access` 是宿主级信任边界(不隔离凭据/网络访问)——仅委托可信子代理,并移除委托环境中的不必要凭据。以上仅作历史留档;现行结论以探针结论与后续契约为准。
|
|
21
|
+
> **headless 子面实测与 hook 会话 root 订正(依据 2026-09-30 真机重测;codex-cli 0.146.0 / Windows;仅 `codex exec --json --ephemeral` headless 子面;不得外推为平台结论)**:旧结论「手工 worktree 内的写入会被协调者白名单拦住、会话 root 仍是主仓库」被**推翻并收窄**——实测 hook 进程 cwd == 载荷 `cwd` == 会话工作根(cwd=项目 / `-C` / 手工 worktree 三形态);**Codex 原生子代理(`spawn_agent`)形态未覆盖,不得外推**。手工 worktree 形态下相对路径写入**不会**被拦:worktree 通常缺 gitignored 运行态 state → 守卫走「无活跃 workflow」放行;若 hook 命令仍指向主仓安装副本(runRoot 外),守卫因「workflow protocol file must stay inside the project root」报错退出,Codex 将 hook 失败降级为非阻塞 → 写入照常落地。**静态喂测(独立复现)**:守卫白名单只覆盖**解析后仍在 runRoot 内**的目标;`Write/Edit` 的 `file_path` 解析为 runRoot 外时跳过判定(**fail-open**,已知缺口、未闭合),而 Bash 写命令同目标仍 `decision:block`(两分支不对称)。**`apply_patch`**:会触发 PreToolUse,但 `tool_name="Bash"`、补丁正文在 `tool_input.command`(heredoc)、**无 `file_path`**;守卫不解析补丁体 → 目标不被提取、放行(独立复验复现了载荷与守卫盲区;「文件确实落盘」子项在复验环境因 apply_patch shim 失败未复现,首次真机重测环境曾落盘——按此差异如实理解)。**hook 触发条件**:隔离 `CODEX_HOME` 无持久信任时默认 headless **不执行**项目 hook;`hooks` 特性默认 enabled、可被项目配置/开关覆盖;`codex_hooks` 是 deprecated 别名;per-invocation 信任是必要因素之一,但独立复验显示 trust-only 触发**不稳定**(3/21;补 `--dangerously-bypass-approvals-and-sandbox` 后 5/5)——**不得写成稳定/确定性保证**;持久信任与交互式 TUI 形态未覆盖。**CC 的判据不同**:CC 的守卫按路径前缀识别隔离区(写入落在 `.claude/worktrees/**` 内即放行,`file_path` 与 Bash 命令两条判定路径同语义)。
|
|
22
|
+
> **出路(受支持路径,三平台各一条)**:① **CC 平台**——用 `Agent` 工具的 `isolation: "worktree"` 委托(守卫已覆盖该区,见步骤 3);② **dsh 平台**——直接委托平台进程内子代理(写入守卫按会话身份分派放行,**无需隔离区**;保持 `write_files` 边界与提交时点纪律);③ **Codex 平台**——**本节点暂不派遣并行子代理**:任务逐个走 `execute` 节点串行交付。依据是 flow-comet 当前支持面(原生子代理形态未被守卫 / 白名单 / 隔离模型覆盖,属机制缺口;待探针结论决定后续契约),**不是「Codex 不能委派 / 不使用并行委托」的平台边界**;headless 子面实测见上(仅 `codex exec`,不得外推)。
|
|
23
|
+
> **不提供/不使用规避通道**:绕开守卫命令级检测的写法(如用 Python `open()` 等 File API 直写)**不是受支持路径**——它绕过的是写入防线本身(防线失效时无拦截、无记录),与三层防御的设计相反。需要越出边界时一律走上面的出路,或如实上报 BLOCKED,**不得以更换工具形态绕过**。handoff 记录(workflow-handoff request/result)与 Return Contract 校验机制不变。
|
|
23
24
|
|
|
24
25
|
## Guidance
|
|
25
26
|
|
|
@@ -37,11 +38,13 @@ Responsibility: 委托 [P] 并行任务给子代理,要求加载 flow-comet-de
|
|
|
37
38
|
|
|
38
39
|
guard 校验见 workflow-guard.mjs NODE_TRANSITION_GATES / W1-B;「填得好不好」由 review 把关。
|
|
39
40
|
|
|
41
|
+
> **模板权威**:本节点产出工件的段形唯一权威 = `flow-kit/templates/**`;`.specs/archive/**` 是历史证据、**不是模板来源**——不得以「上一轮就是这么写的」对齐段形。
|
|
42
|
+
|
|
40
43
|
# Subagent Execute
|
|
41
44
|
|
|
42
45
|
## Node Goal
|
|
43
46
|
|
|
44
|
-
This node parallelizes execution by delegating independent tasks (marked `parallel="true"` in TASK.md) to separate subagents. Each subagent loads the full `flow-comet-dev` protocol and operates within its task's `read_files`/`write_files` boundaries. This node produces handoff evidence for each delegated task and marks them done in TASK.md after all subagents complete. It exists to exploit parallelism when tasks have no file conflicts.
|
|
47
|
+
This node parallelizes execution by delegating independent tasks (marked `parallel="true"` in TASK.md) to separate subagents. Each subagent loads the full `flow-comet-dev` protocol and operates within its task's `read_files`/`write_files` boundaries. This node produces handoff evidence for each delegated task and marks them done in TASK.md after all subagents complete. It exists to exploit parallelism when tasks have no file conflicts. On Codex, whose native subagent shape the guard model does not yet cover, this node's current support surface delivers serially through the `execute` node instead (see the platform notes above).
|
|
45
48
|
|
|
46
49
|
Division of labor (pass-based collaboration): this node handles parallel delegation (`parallel="true"` tasks whose dependencies are satisfied — all of them dispatched concurrently within a pass) and may be entered multiple times across passes: each pass delegates every currently eligible parallel task, serial tasks are digested by the `execute` node between passes, and the node counts as complete only when no dependency-satisfied parallel task and no serial task remains. The `execute` node handles serial delegation (non-parallel tasks, one at a time). Both share the same delegation evidence library (handoff recorded under subagent-execute evidence). Sequence shape is not this node's concern: all-parallel, all-serial, serial→parallel, parallel→serial, and any mixed interleaving are all legal (legality depends only on an acyclic `depends_on` graph whose references all exist; cycles and missing dependencies are already intercepted at the plan exit with recovery guidance), and any sequence reaching this node is digested pass by pass by multi-pass routing along the dependency topology.
|
|
47
50
|
|
|
@@ -49,7 +52,7 @@ Division of labor (pass-based collaboration): this node handles parallel delegat
|
|
|
49
52
|
|
|
50
53
|
### 协调者禁令(最高优先级)
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
主会话是协调者,不是执行者。禁止在主会话直接修改源码或执行实现。源码只能委托子代理完成,**委托形态按平台**:**CC = 用 `Agent` 工具的 `isolation: "worktree"` 委托**;**dsh = 直接委托平台进程内子代理(无需隔离区)**;**Codex = 本节点当前支持面下不派遣并行子代理,任务逐个走 `execute` 节点串行交付**(原生多代理为平台已启用能力,未覆盖属机制缺口而非平台边界,见上方「Codex 平台事实与 flow-comet 当前支持面」段)。子代理派发失败时,主会话**不得接管实现**——记录当前任务为 BLOCKED 并走 Recovery。协调者只允许更新:TASK.md(标记 done)、`<task>-SUMMARY.md`、handoff evidence(workflow-handoff.mjs result)。
|
|
53
56
|
|
|
54
57
|
### 受控重入打开的修复场景(archive 源)
|
|
55
58
|
|
|
@@ -60,7 +63,7 @@ Division of labor (pass-based collaboration): this node handles parallel delegat
|
|
|
60
63
|
- `.specs/<change-id>/TASK.md` must exist with at least one task marked `parallel="true"` and `status="pending"`.
|
|
61
64
|
- `.specs/<change-id>/DESIGN.md` or `DESIGN-lite.md` must exist.
|
|
62
65
|
- `.specs/LESSONS.md` must exist (or be created).
|
|
63
|
-
-
|
|
66
|
+
- Delegation capability, split by platform: **Claude Code** requires the `Agent` tool (the platform creates the worktree automatically, and subagents are delegated with `isolation: "worktree"`); **dsh** requires the platform's in-process delegation capability (subagents carry `delegationDepth > 0`, share the workspace, and need no isolation directory); **Codex** has a real, default-enabled native multi-agent capability — its regular usage is the interactive CLI — but flow-comet's guard/whitelist/isolation model does not yet cover that native subagent shape. Until the contract that follows a probe covering interactive sessions and native subagents is settled, this node does not dispatch parallel subagents on Codex and delivers serially through the `execute` node — a current support-surface limit, not a platform boundary. A manually created `git worktree` is not a supported path (see the "出路" section above).
|
|
64
67
|
|
|
65
68
|
### Steps
|
|
66
69
|
|
|
@@ -88,7 +91,7 @@ Division of labor (pass-based collaboration): this node handles parallel delegat
|
|
|
88
91
|
- Instruction to produce `<task-id>-SUMMARY.md` in `.specs/<change-id>/` following the `flow-kit/templates/SUMMARY.md` template(标题/首部/段序保真,另补 flow-comet 增量 `## 自检方法` 段)。
|
|
89
92
|
- **提交边界警告**:提交**只含该任务 write_files 范围内的文件**(含测试文件)——不得包含 TASK.md 与其他协调者维护的 .specs 工件(新 change 提交越界 BLOCKED;实测子代理提交含 TASK.md 被 W2-D 拦截)。**提交从属规则**:任务专属的 `<task-id>-SUMMARY.md`(位于 `.specs/<change-id>/`,是 flow-comet 强制产物)允许随任务提交属流程默认豁免——目标仓库的既有规定优先,若目标仓库忽略清单等既有规定拒绝其入库,被拒即为正确行为,严禁 force-add 强加越库提交;委托校验对任务摘要的豁免属于校验宽容度,不是入库指令。
|
|
90
93
|
|
|
91
|
-
3. **Delegate to subagents**(平台相关——强制隔离的要求只对 CC 成立,见下): **Claude Code 平台**:所有并行子代理**必须**使用 `Agent` 工具的 `isolation: "worktree"`,**禁止共享 cwd 直接委托**——hook 白名单依赖 worktree 隔离:守卫对归一化后位于 `.claude/worktrees/**`(worktree 隔离区)的写入直接放行(`file_path` 与 Bash 命令两条判定路径同语义),共享 cwd 的子代理写入落在该区之外,会被 subagent-execute 协调者白名单误拦。**Codex
|
|
94
|
+
3. **Delegate to subagents**(平台相关——强制隔离的要求只对 CC 成立,见下): **Claude Code 平台**:所有并行子代理**必须**使用 `Agent` 工具的 `isolation: "worktree"`,**禁止共享 cwd 直接委托**——hook 白名单依赖 worktree 隔离:守卫对归一化后位于 `.claude/worktrees/**`(worktree 隔离区)的写入直接放行(`file_path` 与 Bash 命令两条判定路径同语义),共享 cwd 的子代理写入落在该区之外,会被 subagent-execute 协调者白名单误拦。**dsh 平台**:直接委托平台进程内子代理——写入守卫按会话身份分派(子代理 `delegationDepth > 0` 直接放行、项目内任意路径可写(含 gitignored)),**无需隔离区**;同一工作区的并行子代理会看到彼此未提交中间态,靠 `write_files` 边界互斥与提交时点作相互隔离纪律。**Codex 平台**:原生多代理(`multi_agent`,默认启用)不在本节点当前委托面内——现有守卫 / 白名单 / 隔离模型未覆盖该原生子代理形态(机制缺口,非平台边界);在探针结论决定的后续契约落地前,本节点在 Codex 上**不派遣并行子代理**:任务逐个走 `execute` 节点串行交付。`isolation: "worktree"` 是 CC 的 `Agent` 工具能力,手工 `git worktree add <任意路径>` **不是受支持路径**、不得作为绕过手段;**不得用 File API 直写等规避通道代替**(绕过写入防线不是受支持路径)。Each subagent (CC / dsh):
|
|
92
95
|
- Reads TASK.md for its specific task block.
|
|
93
96
|
- Executes the full TDD protocol (RED/GREEN/REFACTOR). **纯文档/纯配置任务无生产代码可测时,`redEvidence` 与 `greenEvidence` 均允许 `{"command":"N/A (non-code task)","output":"..."}` 形态**(guard W1-D 接受此形状;不得伪造测试输出)。
|
|
94
97
|
- Greps existing abstractions (R6.4).
|