flow-comet 1.5.0-rc.3
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/rules/flow-comet-orchestration.md +13 -0
- package/.flow-comet/skills/flow-comet/GUIDANCE.md +196 -0
- package/.flow-comet/skills/flow-comet/INSTALLED_VERSION +1 -0
- package/.flow-comet/skills/flow-comet/SKILL.md +196 -0
- package/.flow-comet/skills/flow-comet/reference/KNOWN-ISSUES-template.md +19 -0
- package/.flow-comet/skills/flow-comet/reference/TEST-MATRIX.md +115 -0
- package/.flow-comet/skills/flow-comet/reference/authoring-lanes.json +33 -0
- package/.flow-comet/skills/flow-comet/reference/composition-report.md +65 -0
- package/.flow-comet/skills/flow-comet/reference/decision-points.md +64 -0
- package/.flow-comet/skills/flow-comet/reference/dirty-worktree.md +30 -0
- package/.flow-comet/skills/flow-comet/reference/dsh-platform.md +169 -0
- package/.flow-comet/skills/flow-comet/reference/init-detection.md +58 -0
- package/.flow-comet/skills/flow-comet/reference/recovery.md +20 -0
- package/.flow-comet/skills/flow-comet/reference/resolved-skills.json +661 -0
- package/.flow-comet/skills/flow-comet/reference/skill-review.md +13 -0
- package/.flow-comet/skills/flow-comet/reference/subagents/script-author.md +7 -0
- package/.flow-comet/skills/flow-comet/reference/workflow-protocol.json +681 -0
- package/.flow-comet/skills/flow-comet/reference/worktree-notes.md +52 -0
- package/.flow-comet/skills/flow-comet/scripts/comet-check.mjs +61 -0
- package/.flow-comet/skills/flow-comet/scripts/comet-hook-guard.mjs +909 -0
- package/.flow-comet/skills/flow-comet/scripts/comet-plan.mjs +2 -0
- package/.flow-comet/skills/flow-comet/scripts/context-init.mjs +312 -0
- package/.flow-comet/skills/flow-comet/scripts/contract-check.mjs +136 -0
- package/.flow-comet/skills/flow-comet/scripts/guard-self-test.mjs +7331 -0
- package/.flow-comet/skills/flow-comet/scripts/protocol-utils.mjs +376 -0
- package/.flow-comet/skills/flow-comet/scripts/route-node.mjs +230 -0
- package/.flow-comet/skills/flow-comet/scripts/state-schema.mjs +99 -0
- package/.flow-comet/skills/flow-comet/scripts/system-test.mjs +4017 -0
- package/.flow-comet/skills/flow-comet/scripts/task-parsing.mjs +28 -0
- package/.flow-comet/skills/flow-comet/scripts/workflow-guard.mjs +2396 -0
- package/.flow-comet/skills/flow-comet/scripts/workflow-handoff.mjs +378 -0
- package/.flow-comet/skills/flow-comet/scripts/workflow-state.mjs +1263 -0
- package/.flow-comet/skills/flow-comet-archive/SKILL.md +195 -0
- package/.flow-comet/skills/flow-comet-change/SKILL.md +29 -0
- package/.flow-comet/skills/flow-comet-compose/SKILL.md +249 -0
- package/.flow-comet/skills/flow-comet-design/GUIDANCE.md +23 -0
- package/.flow-comet/skills/flow-comet-design/SKILL.md +161 -0
- package/.flow-comet/skills/flow-comet-dev/SKILL.md +51 -0
- package/.flow-comet/skills/flow-comet-evolve/SKILL.md +26 -0
- package/.flow-comet/skills/flow-comet-execute/SKILL.md +182 -0
- package/.flow-comet/skills/flow-comet-health/SKILL.md +31 -0
- package/.flow-comet/skills/flow-comet-integration/SKILL.md +45 -0
- package/.flow-comet/skills/flow-comet-open/GUIDANCE.md +36 -0
- package/.flow-comet/skills/flow-comet-open/SKILL.md +161 -0
- package/.flow-comet/skills/flow-comet-plan/GUIDANCE.md +33 -0
- package/.flow-comet/skills/flow-comet-plan/SKILL.md +169 -0
- package/.flow-comet/skills/flow-comet-requirement/SKILL.md +27 -0
- package/.flow-comet/skills/flow-comet-review/SKILL.md +204 -0
- package/.flow-comet/skills/flow-comet-subagent-execute/GUIDANCE.md +29 -0
- package/.flow-comet/skills/flow-comet-subagent-execute/SKILL.md +214 -0
- package/.flow-comet/skills/flow-comet-task/SKILL.md +33 -0
- package/.flow-comet/skills/flow-comet-test/SKILL.md +41 -0
- package/.flow-comet/skills/flow-comet-ui-design/SKILL.md +26 -0
- package/.flow-comet/skills/flow-comet-verify/SKILL.md +164 -0
- package/LICENSE +21 -0
- package/README.md +255 -0
- package/package.json +27 -0
- package/scripts/dsh-bridge.mjs +461 -0
- package/scripts/prepare-env.mjs +1526 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-comet-subagent-execute
|
|
3
|
+
description: "Use only when explicitly invoked as /flow-comet-subagent-execute or routed by the flow-comet entry/runtime to the subagent-execute Node; complete Subagent Execute for flow-comet. Do not use for ordinary standalone tasks or as the workflow entry."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- 手写区详细协议见 GUIDANCE.md(可选阅读) -->
|
|
7
|
+
|
|
8
|
+
# Subagent Execute
|
|
9
|
+
|
|
10
|
+
## Node Goal
|
|
11
|
+
|
|
12
|
+
Complete the `subagent-execute` Node for `flow-comet`.
|
|
13
|
+
|
|
14
|
+
Responsibility: 委托 [P] 并行任务给子代理,要求加载 flow-comet-dev 并回传 evidence。
|
|
15
|
+
|
|
16
|
+
职责分工(趟次协作):本节点负责**并行委托**(`parallel="true"` 且依赖已满足的任务,同一趟内同时发出)——委托节点可多次往返:每趟委托当时全部依赖已满足的并行任务,趟间由 execute 节点串行消化,直至不存在依赖已满足的可并行 pending 且无串行残留。execute 节点负责**串行委托**(非 parallel 任务,一次一个)。两者共用同一委托证据库(handoff 记录在 subagent-execute evidence)。序列形态不是本节点的关注点:全并行、全串行、串→并、并→串及任意混排均合法(合法性只取决于 `depends_on` 无环且引用存在;依赖环与缺失依赖已在 plan 出口拦截并附恢复指引),到达本节点的任务序列由多趟路由按依赖拓扑自动分趟消化。
|
|
17
|
+
|
|
18
|
+
> **Codex 平台委托方式(2026-08-13 调研修正 + 实测)**:Codex CLI 无 `--worktree` 一键 flag(openai/codex#12862 跟踪中),但 git worktree 是标准支持方式(Codex App 内置 worktree;子代理运行时自动创建 worktree 隔离)——本节点委托与 Claude Code 的 worktree 隔离语义对齐:协调者对每个 parallel 任务 `git worktree add <worktree路径> -b <分支>` → 在 worktree 内 `codex exec` 委托(fresh-context,prompt 内联任务块 + AC + 强制加载 flow-comet-dev 与回传 Return Contract,`</dev/null>` 防 stdin 卡住)→ 子代理回报 commitHash 后校验存在性 + 任务完成回收(`git worktree remove`)。
|
|
19
|
+
> **沙箱要求(实测 2026-08-13)**: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` 是宿主级信任边界(不隔离凭据/网络访问)——仅委托可信子代理,并移除委托环境中的不必要凭据。
|
|
20
|
+
> **hook 会话 root 继承(实测 2026-08-15;2026-09-12 修订)**:Codex worktree 子代理的会话 root 仍是主仓库,hook 以主仓库状态判定——`execute`/`subagent-execute` 阶段协调者白名单 `.specs/` 会拦截子代理在 worktree 内写源码。**两平台的判据不同,覆盖范围也不同**:CC 的守卫按路径前缀识别隔离区(写入落在 `.claude/worktrees/**` 内即放行,`file_path` 与 Bash 命令两条判定路径同语义);Codex 靠手工 `git worktree add <任意路径>` 建隔离区,那些路径不在该前缀下,**不被放行覆盖,写入会被协调者白名单拦截**。
|
|
21
|
+
> **出路(受支持路径,二选一)**:① **CC 平台**——用 `Agent` 工具的 `isolation: "worktree"` 委托(守卫已覆盖该区,见步骤 3);② **Codex 平台**——**串行执行**:不使用并行委托,任务逐个走 `execute` 节点交付,直到守卫也能识别手工 worktree(属机制变更,超出本节点范围)。
|
|
22
|
+
> **不提供/不使用规避通道**:绕开守卫命令级检测的写法(如用 Python `open()` 等 File API 直写)**不是受支持路径**——它绕过的是写入防线本身(防线失效时无拦截、无记录),与三层防御的设计相反。遇到拦截一律走上面的出路,或如实上报 BLOCKED,**不得以更换工具形态绕过**。handoff 记录(workflow-handoff request/result)与 Return Contract 校验机制不变。
|
|
23
|
+
|
|
24
|
+
## Guidance
|
|
25
|
+
|
|
26
|
+
### 必填段清单(结构+存在级)
|
|
27
|
+
|
|
28
|
+
| 文件 | guard 强制段(缺失 = BLOCKED) | 其余模板段(模板要求,guard 不拦) |
|
|
29
|
+
|------|-------------------------------|-----------------------------------|
|
|
30
|
+
| SUMMARY.md | `## verify 输出` / `## 6 维自查`(须含实质内容)/ `## 越界检查` / `## 自检方法` | `## 做了什么` / `## 改动文件` 等(执行纪律,review 把关) |
|
|
31
|
+
|
|
32
|
+
> **注意**:flow-kit 的 SUMMARY 模板**不含 `## 自检方法` 段**——该段是 flow-comet 的强制增量(guard 校验自检方法声明)。使用 `flow-kit/templates/SUMMARY.md` 填写后,**必须按上方必填段清单补写 `## 自检方法` 段**,否则新 change 的 exit 会被 BLOCKED。
|
|
33
|
+
>
|
|
34
|
+
> **无 parallel 任务时**:若路由到此节点但 TASK.md 无 `parallel="true" status="pending"` 任务(如全部任务已被 execute 串行处理),按常规流程记录证据后直接退出(entry → record → exit),不要空转等待。
|
|
35
|
+
|
|
36
|
+
加载声明(阶段层 · 双步硬规则)见下文 Required Skill Calls 节。
|
|
37
|
+
|
|
38
|
+
guard 校验见 workflow-guard.mjs NODE_TRANSITION_GATES / W1-B;「填得好不好」由 review 把关。
|
|
39
|
+
|
|
40
|
+
# Subagent Execute
|
|
41
|
+
|
|
42
|
+
## Node Goal
|
|
43
|
+
|
|
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.
|
|
45
|
+
|
|
46
|
+
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
|
+
|
|
48
|
+
## Guidance
|
|
49
|
+
|
|
50
|
+
### 协调者禁令(最高优先级)
|
|
51
|
+
|
|
52
|
+
主会话是协调者,不是执行者。禁止在主会话直接修改源码或执行实现。源码只能通过 `Agent` 工具以 `isolation: "worktree"` 委托子代理完成。子代理派发失败时,主会话**不得接管实现**——记录当前任务为 BLOCKED 并走 Recovery。协调者只允许更新:TASK.md(标记 done)、`<task>-SUMMARY.md`、handoff evidence(workflow-handoff.mjs result)。
|
|
53
|
+
|
|
54
|
+
### Prerequisites
|
|
55
|
+
|
|
56
|
+
- `.specs/<change-id>/TASK.md` must exist with at least one task marked `parallel="true"` and `status="pending"`.
|
|
57
|
+
- `.specs/<change-id>/DESIGN.md` or `DESIGN-lite.md` must exist.
|
|
58
|
+
- `.specs/LESSONS.md` must exist (or be created).
|
|
59
|
+
- The orchestrating agent must have the `Agent` tool available for spawning subagents.
|
|
60
|
+
|
|
61
|
+
### Steps
|
|
62
|
+
|
|
63
|
+
0. **委托前检查清单(必做——未 commit 的工件不会被 worktree 子代理看到,曾导致子代理空上下文运行)**:
|
|
64
|
+
- ① `git status --short`:change 工件(`.specs/<change-id>/`)**必须已 commit**——未 commit 时 worktree 子代理看不到工件(harness 从已提交 HEAD 创建 worktree)
|
|
65
|
+
- ② `git log --oneline -1`:确认 HEAD 位置(change 分支)
|
|
66
|
+
- ③ 委托 prompt **必须内联任务块全文 + 相关 AC**(worktree 基线可能不是 change 分支——harness 行为不可控,内联是唯一可靠路径)
|
|
67
|
+
- **Red Flag**:worktree 工件不可见/基线不确定时**禁止继续委托**——先 commit 或内联上下文
|
|
68
|
+
- 委托后:子代理回报 commitHash 后校验存在性(`git cat-file -e <commitHash>`,workflow-handoff result 已有 W2-D git show 校验兜底)
|
|
69
|
+
|
|
70
|
+
1. **Identify parallel tasks**: Read TASK.md and find all tasks with `parallel="true"` and `status="pending"`. Verify they are genuinely independent (no file conflicts between them — check `write_files` do not overlap).
|
|
71
|
+
|
|
72
|
+
2. **For each parallel task, create handoff request**: Use `workflow-handoff.mjs request <task-id>` to register the handoff. **委托即记 request**——直接记录 result 而无对应 request 时,write_files 允许列表为空会被 BLOCKED(新 change 强制委托边界),补 request 后再重录 result 即可。
|
|
73
|
+
> 若不传 `--write-files`,脚本会自动从 TASK.md 对应 task 的 `<write_files>` 块解析(orchestrator 无需手动从 TASK.md 提取文件列表)。
|
|
74
|
+
The handoff prompt must include:
|
|
75
|
+
- The task's full XML block from TASK.md.
|
|
76
|
+
- DESIGN.md sections 0 and 0.5 for context.
|
|
77
|
+
- REQUIREMENT.md ACs relevant to this task.
|
|
78
|
+
- Explicit instruction to **use the Skill 工具** to load `flow-comet-dev` and follow its full protocol `flow-kit/prompts/4-dev.md`(不得跳过——读取 SKILL.md 文件不叫加载,跑声明命令也不叫加载;加载 = Skill 工具把 skill 注入会话)。
|
|
79
|
+
- Explicit requirement to return `completedChecks` in the Return Contract containing `required-skill:subagent-execute.flow-comet-dev`(证明已加载 implementation skill;guard W1-D 严格校验,缺失 → exit BLOCKED,无旧 change 豁免)。
|
|
80
|
+
- The task's `read_files` and `write_files` boundaries.
|
|
81
|
+
- Instruction to produce `<task-id>-SUMMARY.md` in `.specs/<change-id>/` following the `flow-kit/templates/SUMMARY.md` template(标题/首部/段序保真,另补 flow-comet 增量 `## 自检方法` 段)。
|
|
82
|
+
- **提交边界警告**:提交**只含该任务 write_files 范围内的文件**(含测试文件)——不得包含 TASK.md 与其他协调者维护的 .specs 工件(新 change 提交越界 BLOCKED;实测子代理提交含 TASK.md 被 W2-D 拦截)。**提交从属规则**:任务专属的 `<task-id>-SUMMARY.md`(位于 `.specs/<change-id>/`,是 flow-comet 强制产物)允许随任务提交属流程默认豁免——目标仓库的既有规定优先,若目标仓库忽略清单等既有规定拒绝其入库,被拒即为正确行为,严禁 force-add 强加越库提交;委托校验对任务摘要的豁免属于校验宽容度,不是入库指令。
|
|
83
|
+
|
|
84
|
+
3. **Delegate to subagents**(平台相关——强制隔离的要求只对 CC 成立,见下): **Claude Code 平台**:所有并行子代理**必须**使用 `Agent` 工具的 `isolation: "worktree"`,**禁止共享 cwd 直接委托**——hook 白名单依赖 worktree 隔离:守卫对归一化后位于 `.claude/worktrees/**`(worktree 隔离区)的写入直接放行(`file_path` 与 Bash 命令两条判定路径同语义),共享 cwd 的子代理写入落在该区之外,会被 subagent-execute 协调者白名单误拦。**Codex 平台**:`isolation: "worktree"` 是 CC 的 `Agent` 工具能力,Codex 无等价参数,手工 `git worktree add <任意路径>` 的路径**不被守卫识别**(见上方「Codex 平台委托方式」的出路)——故本节点在 Codex 上**不委托并行子代理**:任务改为串行交付(`execute` 节点逐个处理);**不得用 File API 直写等规避通道代替**(绕过写入防线不是受支持路径)。Each subagent (CC):
|
|
85
|
+
- Reads TASK.md for its specific task block.
|
|
86
|
+
- Executes the full TDD protocol (RED/GREEN/REFACTOR). **纯文档/纯配置任务无生产代码可测时,`redEvidence` 与 `greenEvidence` 均允许 `{"command":"N/A (non-code task)","output":"..."}` 形态**(guard W1-D 接受此形状;不得伪造测试输出)。
|
|
87
|
+
- Greps existing abstractions (R6.4).
|
|
88
|
+
- Scans LESSONS (R1.8).
|
|
89
|
+
- Runs verify command and records real output.
|
|
90
|
+
- Performs self-review (brooks-lint or 6-dimension quick check).
|
|
91
|
+
- Performs diff boundary check (R6.5).
|
|
92
|
+
- Makes atomic commit with format `<type>(<scope>): <subject>` (scope optional: short subsystem noun; change-id, dates and task ids must NOT be used as scope; task id goes in the commit body as a `Task: <task-id>` trailer).
|
|
93
|
+
- Writes `<task-id>-SUMMARY.md` to `.specs/<change-id>/`.
|
|
94
|
+
- Returns evidence via `workflow-handoff.mjs result <task-id>`.
|
|
95
|
+
|
|
96
|
+
4. **Collect evidence**: After all subagents complete, verify each returned:
|
|
97
|
+
- SUMMARY.md exists in `.specs/<change-id>/` and is **模板保真**(按 `flow-kit/templates/SUMMARY.md`:标题 `# SUMMARY:` / 首部 4 字段 / 段序一致,含 `## 自检方法` 段)。
|
|
98
|
+
- Verify output is real (not fabricated).
|
|
99
|
+
- Handoff evidence is recorded.
|
|
100
|
+
|
|
101
|
+
5. **Mark done**: Update TASK.md — set `status="done"` for all completed parallel tasks.
|
|
102
|
+
|
|
103
|
+
6. **Record overall evidence**: Run `node .claude/skills/flow-comet/scripts/workflow-state.mjs record subagent-execute '<evidence JSON>'` to record completion.
|
|
104
|
+
|
|
105
|
+
7. **Exit check**: Run exit check.
|
|
106
|
+
|
|
107
|
+
## Return Contract(子代理必须回传)
|
|
108
|
+
|
|
109
|
+
每个被委托的子代理,完成时必须在最终回复中回传以下结构化信息(缺任一项,orchestrator 不得记录 handoff result):
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"status": "DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT",
|
|
114
|
+
"taskId": "T0X",
|
|
115
|
+
"commitHash": "<git commit sha>",
|
|
116
|
+
"changedFiles": ["<file>", "..."],
|
|
117
|
+
"completedChecks": ["required-skill:subagent-execute.flow-comet-dev"],
|
|
118
|
+
"redEvidence": { "command": "<RED 失败测试命令>", "output": "<真实失败输出片段>" },
|
|
119
|
+
"greenEvidence": { "command": "<GREEN 通过测试命令>", "output": "<真实通过输出片段>" },
|
|
120
|
+
"riskSignals": ["cross-module | security | concurrency | migration | public-api | 200+lines | none"],
|
|
121
|
+
"concerns": "<可选:未解决的疑虑>"
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- `status=DONE` 才视为完成;`BLOCKED` / `NEEDS_CONTEXT` 需 orchestrator 处理。
|
|
126
|
+
- `redEvidence` / `greenEvidence` 缺任一 → 视为未执行 TDD,orchestrator 拒绝记录;**新 change 下 guard 强制 BLOCKED**(旧 change WARN 渐进)。
|
|
127
|
+
- `completedChecks` 必须含 `required-skill:subagent-execute.flow-comet-dev`(子代理加载 implementation skill 的证明);缺任一项 → guard exit 严格 BLOCKED(W1-D,无旧 change 豁免),orchestrator 不得以旧格式/补录方式绕过。
|
|
128
|
+
- `riskSignals` 非 `none` 时,orchestrator 应将该任务标记为 review 节点的高优先级审查对象。
|
|
129
|
+
- 子代理回传后,orchestrator 用 `workflow-handoff.mjs result <task-id> '<JSON>'` 记录;guard exit subagent-execute 会校验 commitHash + greenEvidence + completedChecks(W1-D,严格)。
|
|
130
|
+
|
|
131
|
+
### Completion reasoning
|
|
132
|
+
|
|
133
|
+
This node is truly done when:
|
|
134
|
+
- All delegated parallel tasks have `status="done"` in TASK.md.
|
|
135
|
+
- Every delegated task has a `<task-id>-SUMMARY.md` that is template-faithful (title `# SUMMARY:`, header fields, section order — per `flow-kit/templates/SUMMARY.md`, plus the `## 自检方法` section) in `.specs/<change-id>/`.
|
|
136
|
+
- Handoff evidence (request + result) is recorded for each task.
|
|
137
|
+
- No subagent exceeded its `write_files` boundary.
|
|
138
|
+
- No serial tasks were delegated (only `parallel="true"` tasks).
|
|
139
|
+
|
|
140
|
+
### Red flags
|
|
141
|
+
|
|
142
|
+
- **Agent thought**: "This task looks independent, I'll delegate it." **Actual risk**: Delegating tasks that are not marked `parallel="true"` bypasses the wave division logic. execute 的串行委托走 execute 节点,本节点只并行委托 parallel 任务。
|
|
143
|
+
- **Agent thought**: "Subagent can figure out what to do from context." **Actual risk**: Subagent not loading `flow-comet-dev` means it skips TDD, LESSONS scan, diff boundary check, and self-review. The handoff prompt must explicitly require flow-comet-dev.
|
|
144
|
+
- **Agent thought**: "Subagent might need to touch related files for context." **Actual risk**: Subagent exceeding `write_files` boundaries creates merge conflicts with other parallel subagents. Strict boundary enforcement is mandatory.
|
|
145
|
+
- **Agent thought**: "One subagent finished, mark it done immediately." **Actual risk**: Marking tasks done before all subagents complete can cause issues if a later subagent fails and needs to reference completed work. Wait for all, then batch mark.
|
|
146
|
+
|
|
147
|
+
## Entry Check
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
node .claude/skills/flow-comet/scripts/workflow-guard.mjs entry subagent-execute
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Skill Implementation
|
|
154
|
+
|
|
155
|
+
The subagent-execute node identifies all `parallel="true"` pending tasks in TASK.md, creates handoff requests via `workflow-handoff.mjs`, and delegates each to an isolated subagent (worktree isolation) with `flow-comet-dev` loaded. Each subagent executes the full dev protocol independently. The orchestrator collects evidence and marks tasks done after all subagents complete.
|
|
156
|
+
|
|
157
|
+
## Required Skill Calls
|
|
158
|
+
|
|
159
|
+
| Skill | Enforcement | Reason |
|
|
160
|
+
|-------|-------------|--------|
|
|
161
|
+
| `flow-comet-dev` | Required in each subagent's prompt | Provides TDD, LESSONS scan, diff boundary, self-review protocol for each parallel task |
|
|
162
|
+
|
|
163
|
+
**加载声明(阶段层 · 双步硬规则)**:本节点技能已由入口路由经 Skill 工具加载(你正在阅读的就是它);本节点 Required Skill Calls 的加载与声明同样不可跳过:
|
|
164
|
+
|
|
165
|
+
1. **用 Skill 工具加载** `flow-comet-dev`。**不得跳过**——只读取 SKILL.md 文件不叫加载;真正让 flow-comet-dev 指令生效的是 Skill 工具把它注入本次会话。本节点的 flow-comet-dev 为 handoff scope——协调者在此声明(声明标记的自动补写不覆盖 handoff scope,必须手动声明),各子代理在各自会话按 `flow-kit/prompts/4-dev.md` 协议用 Skill 工具加载并执行;协调者构造 handoff prompt 时按 `flow-kit/prompts/4-dev.md` + `flow-kit/templates/SUMMARY.md` 引用子代理的 dev 协议与交付模板。
|
|
166
|
+
2. 加载完成后**立即**运行声明命令(节点退出与证据记录会核对声明标记;声明如实记录加载动作,不等于产出证明):
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
node .claude/skills/flow-comet/scripts/workflow-state.mjs skill-load subagent-execute flow-comet-dev --prompt flow-kit/prompts/4-dev.md
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
> **跑 skill-load 声明命令 ≠ 加载**:声明只把“哪次会话加载了哪个 skill、按哪份协议工作”写进状态供 exit/record 核对;真正加载只有第 1 步的 Skill 工具能做到。
|
|
173
|
+
|
|
174
|
+
## Output Schemas
|
|
175
|
+
|
|
176
|
+
Schema: `flowkit.handoff.v1`
|
|
177
|
+
|
|
178
|
+
| Schema ID | Artifact Kind | Required | Path |
|
|
179
|
+
|-----------|--------------|----------|------|
|
|
180
|
+
| `task-summaries` | file | yes | `.specs/<change-id>/*-SUMMARY.md` (one per delegated task) |
|
|
181
|
+
| `handoff-evidence` | evidence | yes | Recorded via workflow-handoff.mjs |
|
|
182
|
+
|
|
183
|
+
Evidence: `handoff-request` (required per task), `handoff-result` (required per task)
|
|
184
|
+
|
|
185
|
+
## Evidence Record
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
node .claude/skills/flow-comet/scripts/workflow-state.mjs record subagent-execute '{"summary":"N parallel tasks delegated and completed, handoff evidence recorded for each"}'
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Guardrails
|
|
192
|
+
|
|
193
|
+
| Guardrail ID | Label | Validation Type |
|
|
194
|
+
|--------------|-------|-----------------|
|
|
195
|
+
| `handoff-evidence` | Handoff evidence recorded for each task | evidence-only |
|
|
196
|
+
| `parallel-only` | Only parallel="true" tasks delegated | 执行纪律(review 把关),guard 不校验 |
|
|
197
|
+
| `boundary-safe` | No subagent exceeded write_files | 新 change 提交越界 BLOCKED(handoff 记录时校验),旧 change WARN 渐进 |
|
|
198
|
+
| `summaries-exist` | SUMMARY.md exists for each delegated task | artifact-exists |
|
|
199
|
+
|
|
200
|
+
## Exit Check
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
node .claude/skills/flow-comet/scripts/workflow-guard.mjs exit subagent-execute --apply
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
If the script prints `SKILL: flow-comet-review`, load that Skill next.
|
|
207
|
+
|
|
208
|
+
## Recovery
|
|
209
|
+
|
|
210
|
+
1. Re-run entry check to confirm workflow state.
|
|
211
|
+
2. Read `.specs/<change-id>/TASK.md` — identify which parallel tasks are still `status="pending"`.
|
|
212
|
+
3. Check for existing `<task-id>-SUMMARY.md` files — tasks with summaries are done even if TASK.md not updated.
|
|
213
|
+
4. Re-delegate only the remaining pending parallel tasks.
|
|
214
|
+
5. If a subagent failed mid-execution, check for `<task-id>-PROGRESS.md` and use its "excluded solutions" to avoid repeating failures.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-comet-task
|
|
3
|
+
description: "flow-kit TASK 阶段协议:拆原子任务(XML 格式)、read_files/write_files 边界、波次划分、并行标记 [P]。flow-comet plan 节点的 flow-kit 实现。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# flow-kit TASK Protocol
|
|
7
|
+
|
|
8
|
+
本 Skill 为 flow-comet 的 plan 节点提供 flow-kit 的 TASK 拆解流程。
|
|
9
|
+
|
|
10
|
+
## 加载
|
|
11
|
+
|
|
12
|
+
读取 `flow-kit/prompts/3-task.md` 并按其执行。关键步骤:
|
|
13
|
+
|
|
14
|
+
1. **Artifact Preflight**:检查 REQUIREMENT.md + DESIGN.md 存在
|
|
15
|
+
2. **拆解原则**:
|
|
16
|
+
- 大小:fresh context 2~10 分钟可完成
|
|
17
|
+
- 粒度:按文件冲突切(垂直切片),不按层切
|
|
18
|
+
- 并行标记 `[P]`:互不冲突的任务
|
|
19
|
+
- 波次形态:依赖驱动多趟语义——每个并行任务显式声明 `depends_on`(后波依赖前波任务),引擎按依赖拓扑自动分趟消化(每趟委托全部依赖已满足的并行任务,趟间回串行),混排序列(串→并→串/并→串→并等交错形态)合法,无需压扁成单一连续块;唯一硬性拦截是依赖环(如 A→B→A,规划出口 BLOCKED 并附恢复指引——调整涉环任务的 depends_on 后重新 exit 即可通过),跳过未满足依赖先跑并行同样被拦。落笔时先画依赖方向再标 [P]。flow-kit 上游模板未载此约束,以本条为准
|
|
20
|
+
- 依赖:`depends_on: <task-id>`
|
|
21
|
+
3. **每任务 7 字段**:id / name / read_files / write_files / action / verify / done
|
|
22
|
+
- **write_files 必须包含关联测试文件**:若任务修改组件/函数,且有关联测试直接 import 其本地导出(如 `src/**/__tests__/*.test.ts` 从组件文件 import),该测试文件**必须纳入该任务 write_files**。否则组件删除本地导出/改 import 后,关联测试会编译失败或断言失效(实测:改组件时破坏了关联测试文件)。
|
|
23
|
+
4. **波次划分**:同层并行,跨层串行
|
|
24
|
+
5. **XML 格式**:便于 AI 解析与执行
|
|
25
|
+
|
|
26
|
+
## 产物
|
|
27
|
+
|
|
28
|
+
- `.specs/<change-id>/TASK.md`(XML 格式任务列表 + 波次划分图)
|
|
29
|
+
|
|
30
|
+
## 状态推进
|
|
31
|
+
|
|
32
|
+
本 Skill 满足 `flowkit.plan.v1` Output Schema。TASK.md 完成后由 flow-comet 状态机推进到 execute 阶段。
|
|
33
|
+
并行任务由 subagent-execute 节点按依赖分趟委托执行——委托节点可多次往返,直至无依赖已满足的可并行 pending 且无串行残留。
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-comet-test
|
|
3
|
+
description: "flow-kit TEST 阶段协议:5 轮测试金字塔(功能/性能/安全/兼容/可观测)+ 测试质量 6 维自检。flow-comet review 节点的 flow-kit 增强。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# flow-kit TEST Protocol
|
|
7
|
+
|
|
8
|
+
本 Skill 为 flow-comet 的 review 节点提供 flow-kit 的 5 轮测试金字塔。
|
|
9
|
+
|
|
10
|
+
## 加载
|
|
11
|
+
|
|
12
|
+
读取 `flow-kit/prompts/5-test.md` 并按其执行。
|
|
13
|
+
|
|
14
|
+
### 5 轮测试金字塔
|
|
15
|
+
|
|
16
|
+
| 轮次 | 内容 | 适用性 |
|
|
17
|
+
|------|------|--------|
|
|
18
|
+
| 第 1 轮 · 功能 | AC→测试映射 + 覆盖率 + 边界用例 + T1~T6 测试质量自检 | ✅ 必跑 |
|
|
19
|
+
| 第 2 轮 · 性能 | Lighthouse / k6 / locust + 慢查询审计 + N+1 检测 | 按项目 |
|
|
20
|
+
| 第 3 轮 · 安全 | 依赖漏洞 + 秘钥扫描 + SAST + OWASP Top 10 | 按项目 |
|
|
21
|
+
| 第 4 轮 · 兼容 | 跨浏览器 + 数据迁移验证 + 跨版本 | 按项目 |
|
|
22
|
+
| 第 5 轮 · 可观测 | 日志 + 指标 + 告警 + 健康检查 | 按项目 |
|
|
23
|
+
|
|
24
|
+
### 测试质量 6 维自检(T1~T6)
|
|
25
|
+
|
|
26
|
+
| 编号 | 风险 | 来源 |
|
|
27
|
+
|------|------|------|
|
|
28
|
+
| T1 | Test Obscurity 测试晦涩 | xUnit Test Patterns |
|
|
29
|
+
| T2 | Test Brittleness 测试脆弱 | The Art of Unit Testing |
|
|
30
|
+
| T3 | Test Duplication 测试重复 | How Google Tests Software |
|
|
31
|
+
| T4 | Mock Abuse Mock 滥用 | Working Effectively with Legacy Code |
|
|
32
|
+
| T5 | Coverage Illusion 覆盖率幻觉 | xUnit Test Patterns |
|
|
33
|
+
| T6 | Architecture Mismatch 架构错配 | How Google Tests Software |
|
|
34
|
+
|
|
35
|
+
## 产物
|
|
36
|
+
|
|
37
|
+
- `.specs/<change-id>/TEST.md`(使用 `flow-kit/templates/TEST.md`)
|
|
38
|
+
|
|
39
|
+
## 使用范围
|
|
40
|
+
|
|
41
|
+
TEST.md 的完整性由 review 节点第 2 轮检查。brooks-lint 已装时用 `/brooks-test`(Codex 用 `$brooks-test`),未装时用内置清单。
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-comet-ui-design
|
|
3
|
+
description: "flow-kit 2a UI-DESIGN 阶段协议:美学方向 + design tokens + 反 AI-slop 自检。仅前端项目触发。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# flow-kit UI-DESIGN Protocol
|
|
7
|
+
|
|
8
|
+
本 Skill 为前端项目提供 flow-kit 的 2a UI-DESIGN 阶段。
|
|
9
|
+
|
|
10
|
+
## 加载
|
|
11
|
+
|
|
12
|
+
读取 `flow-kit/prompts/2a-ui-design.md` 并按其执行。
|
|
13
|
+
|
|
14
|
+
## 关键检查
|
|
15
|
+
|
|
16
|
+
- `flow-kit/reference/ui-anti-patterns.md`(75 行可全读)
|
|
17
|
+
- `flow-kit/reference/ui-aesthetics.md`(仅查「5 维度」+ 「给 AI 的模板」节)
|
|
18
|
+
- 装了 ui-ux-pro-max / impeccable 时优先用它们
|
|
19
|
+
|
|
20
|
+
## 产物
|
|
21
|
+
|
|
22
|
+
- `.specs/<change-id>/UI-DESIGN.md`(含 design tokens frontmatter)
|
|
23
|
+
|
|
24
|
+
## 触发范围
|
|
25
|
+
|
|
26
|
+
仅前端项目触发。非前端项目跳过。
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-comet-verify
|
|
3
|
+
description: "Use only when explicitly invoked as /flow-comet-verify or routed by the flow-comet entry/runtime to the verify Node; complete Verify for flow-comet. Do not use for ordinary standalone tasks or as the workflow entry."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verify
|
|
7
|
+
|
|
8
|
+
## Node Goal
|
|
9
|
+
|
|
10
|
+
Complete the `verify` Node for `flow-comet`.
|
|
11
|
+
|
|
12
|
+
Responsibility: 集成验证 + UAT + 失败诊断(自动重试 ≤ 3 次,第 4 次失败暂停)。生成 UAT.md(TEST.md 前置已有)。
|
|
13
|
+
|
|
14
|
+
This node performs the final integration verification: running all automated tests, type checks, and builds, then guiding the human through UAT scripts from TEST.md. It produces UAT.md with pass/fail results for each item. If failures occur, it diagnoses root causes, generates fix tasks, and auto-retries ≤ 3 times (machine-counted verifyFailures); on the 4th failure it must pause and ask the user「继续修 / 停止」. This node is the final quality gate before archiving.
|
|
15
|
+
|
|
16
|
+
## Guidance
|
|
17
|
+
|
|
18
|
+
### 必填段清单(结构+存在级)
|
|
19
|
+
|
|
20
|
+
| 文件 | guard 强制段(缺失 = BLOCKED) | 其余模板段(模板要求,guard 不拦) |
|
|
21
|
+
|------|-------------------------------|-----------------------------------|
|
|
22
|
+
| TEST.md | `## 验证命令`(exit verify 真实执行) | `## 测试矩阵` 等段(5 轮金字塔,review 把关) |
|
|
23
|
+
| UAT.md | `## 验收结果` | 其余(执行纪律,review 把关) |
|
|
24
|
+
|
|
25
|
+
> **注意**:flow-kit 的 TEST 模板**不含 `## 验证命令` 段**——该段是 flow-comet 的强制增量(exit verify 会真实执行其中的命令并计数失败)。使用 `flow-kit/templates/TEST.md` 填写后,**必须按上方必填段清单补写 `## 验证命令` 段**,否则 exit verify 会被 BLOCKED。**排版约束**:`## 验证命令` 标题后必须**紧跟**代码块(` ``` `),标题与代码块之间**不得插入任何说明行**(如 blockquote 说明——guard 正则要求标题后直接是代码块);段名可带括号后缀。UAT.md 同理:flow-kit 无独立 UAT 模板(UAT 脚本格式见 5-test.md 1.2 节),产出时按上方必填段清单写 `## 验收结果` 段。
|
|
26
|
+
|
|
27
|
+
guard 校验见 workflow-guard.mjs NODE_TRANSITION_GATES / W1-B;「填得好不好」由 review 把关。
|
|
28
|
+
|
|
29
|
+
### Prerequisites
|
|
30
|
+
|
|
31
|
+
- `.specs/<change-id>/REVIEW.md` must exist (from review node).
|
|
32
|
+
- All Critical items from REVIEW.md must be resolved (fixed or explicitly accepted).
|
|
33
|
+
- `.specs/<change-id>/TEST.md` must exist with UAT scripts.
|
|
34
|
+
- `.specs/<change-id>/REQUIREMENT.md` must exist for AC reference.
|
|
35
|
+
|
|
36
|
+
### Steps
|
|
37
|
+
|
|
38
|
+
1. **Run full automation**: Execute all automated checks and paste real output:
|
|
39
|
+
- Full unit tests: `pytest tests/ -q` (or equivalent).
|
|
40
|
+
- Integration/e2e tests: if available.
|
|
41
|
+
- Type check: `tsc --noEmit` / `mypy` / equivalent.
|
|
42
|
+
- Build: `npm run build` / `vite build` / equivalent.
|
|
43
|
+
- Any failure -> immediately enter failure diagnosis (step 3).
|
|
44
|
+
|
|
45
|
+
2. **Guide human UAT**: Read TEST.md UAT scripts one by one. For each UAT item:
|
|
46
|
+
- Present the scenario, preconditions, steps, and expected results.
|
|
47
|
+
- Ask user: "Pass / Fail / Describe issue".
|
|
48
|
+
- Record result in `.specs/<change-id>/UAT.md`.
|
|
49
|
+
|
|
50
|
+
3. **Failure diagnosis**: For any failure (automated test or UAT):
|
|
51
|
+
- Switch to "Diagnose sub-role" — identify root cause, not symptom.
|
|
52
|
+
- Produce fix-plan: append to TASK.md as numbered fix tasks with full 7 fields and verify command.
|
|
53
|
+
- Return to execute node for fix execution.
|
|
54
|
+
- Re-run verification after fix.
|
|
55
|
+
|
|
56
|
+
4. **Auto-retry limit (R2.6)**: verify 失败自动重试 ≤ 3 次(机器计数 verifyFailures);第 4 次失败必须暂停问用户「继续修 / 停止」。Do not auto-retry beyond 3 times.
|
|
57
|
+
|
|
58
|
+
5. **LESSONS nomination**: Before archiving, scan all `*-SUMMARY.md` "decisions and deviations" sections and any `*-PROGRESS.md` "excluded solutions" sections. Apply nomination criteria:
|
|
59
|
+
- Debugging/trial-and-error took > 30 minutes -> nominate.
|
|
60
|
+
- Error is not task-specific, other tasks would hit it too -> nominate.
|
|
61
|
+
- Reasonable probability of retry within 6 months -> nominate.
|
|
62
|
+
- Otherwise do not nominate (avoid pollution).
|
|
63
|
+
- Add qualifying lessons to `.specs/LESSONS.md` with next L-NNN number — 新条目编号 = 当前最大编号 + 1,插入 `## 条目区` 末尾(文件内升序,继续现有编号),**禁止文件尾追加与乱序插入**.
|
|
64
|
+
- Check existing active lessons for superseded/deprecated status.
|
|
65
|
+
|
|
66
|
+
The full verification protocol, UAT format, and failure diagnosis are in:
|
|
67
|
+
- `flow-kit/prompts/7-integration.md` (INTEGRATION phase, verification + UAT sections)
|
|
68
|
+
- `flow-kit/prompts/5-test.md` (TEST phase, for UAT script format)
|
|
69
|
+
|
|
70
|
+
### Completion reasoning
|
|
71
|
+
|
|
72
|
+
This node is truly done when:
|
|
73
|
+
- All automated checks pass with real output pasted.
|
|
74
|
+
- All UAT items have pass/fail recorded in `.specs/<change-id>/UAT.md`.
|
|
75
|
+
- verify 失败自动重试 ≤ 3 次(机器计数 verifyFailures),第 4 次失败已暂停问用户。
|
|
76
|
+
- All failures have been diagnosed and fix tasks generated.
|
|
77
|
+
- LESSONS have been nominated from SUMMARY.md files.
|
|
78
|
+
|
|
79
|
+
### Red flags
|
|
80
|
+
|
|
81
|
+
- **Agent thought**: "Tests passed last time, no need to run again." **Actual risk**: Claiming pass without pasting real output (R4.4 violation) means failures go undetected. Must run and paste.
|
|
82
|
+
- **Agent thought**: "This UAT item is similar to the last one, marking pass." **Actual risk**: UAT must be executed by the human, not assumed. Each item needs explicit human confirmation.
|
|
83
|
+
- **Agent thought**: "Auto-retry 4th time, maybe it'll work now." **Actual risk**: On the 4th failure (R2.6 violation), the problem is likely systematic, not transient. Must pause and ask the user「继续修 / 停止」.
|
|
84
|
+
- **Agent thought**: "Fix the failure directly, no need for a fix task." **Actual risk**: Bypassing the fix-task -> execute -> re-verify cycle means the fix is not properly tracked or tested. Must go through the proper loop.
|
|
85
|
+
|
|
86
|
+
## Entry Check
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
node .claude/skills/flow-comet/scripts/workflow-guard.mjs entry verify
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Skill Implementation
|
|
93
|
+
|
|
94
|
+
Load `flow-comet-verify` for this Node. Operation: `require`.
|
|
95
|
+
|
|
96
|
+
The verify node loads `flow-comet-integration` for the verification protocol. It runs all automated checks (tests, type check, build), guides the human through UAT scripts from TEST.md, performs failure diagnosis with ≤3 auto-retries (4th failure pauses for human decision), and produces UAT.md. It also nominates lessons from SUMMARY.md files before the archive step.
|
|
97
|
+
|
|
98
|
+
## Required Skill Calls
|
|
99
|
+
|
|
100
|
+
| Skill | Enforcement | Reason |
|
|
101
|
+
|-------|-------------|--------|
|
|
102
|
+
| `flow-comet-integration` | Required for verification protocol | Provides automation execution, UAT guidance, failure diagnosis, LESSONS nomination |
|
|
103
|
+
|
|
104
|
+
Load `flow-comet-integration` during this Node and record completed check `required-skill:verify.flow-comet-integration`. Reason: 集成验证 + UAT + LESSONS 提名
|
|
105
|
+
|
|
106
|
+
**加载声明(阶段层 · 双步硬规则)**:本节点技能已由入口路由经 Skill 工具加载(你正在阅读的就是它);本节点 Required Skill Calls 的加载与声明同样不可跳过:
|
|
107
|
+
|
|
108
|
+
1. **用 Skill 工具加载** `flow-comet-integration`(本节点 Required Skill Call)。**不得跳过**——只读取 SKILL.md 文件不叫加载;真正让 flow-comet-integration 指令生效的是 Skill 工具把它注入本次会话。
|
|
109
|
+
2. 加载完成后**立即**运行声明命令(节点退出与证据记录会核对声明标记;声明如实记录加载动作,不等于产出证明):
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
node .claude/skills/flow-comet/scripts/workflow-state.mjs skill-load verify flow-comet-integration --prompt flow-kit/prompts/7-integration.md
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
> **跑 skill-load 声明命令 ≠ 加载**:声明只把“哪次会话加载了哪个 skill、按哪份协议工作”写进状态供 exit/record 核对;真正加载只有第 1 步的 Skill 工具能做。
|
|
116
|
+
|
|
117
|
+
## Augmentations
|
|
118
|
+
|
|
119
|
+
This Node has no declared augmentations.
|
|
120
|
+
|
|
121
|
+
## Output Schemas
|
|
122
|
+
|
|
123
|
+
Schema: `flowkit.verify.v1`
|
|
124
|
+
|
|
125
|
+
| Schema ID | Artifact Kind | Required | Path |
|
|
126
|
+
|-----------|--------------|----------|------|
|
|
127
|
+
| `uat-doc` | file | yes | `.specs/<change-id>/UAT.md` |
|
|
128
|
+
| `test-doc` | file | yes | `.specs/<change-id>/TEST.md` (must already exist) |
|
|
129
|
+
| `lessons-updated` | file | conditional | `.specs/LESSONS.md` (if new lessons nominated;无合格条目时扫描本身即完成,不新增条目) |
|
|
130
|
+
|
|
131
|
+
Evidence: `verification-result` (required)
|
|
132
|
+
|
|
133
|
+
## Evidence Record
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
node .claude/skills/flow-comet/scripts/workflow-state.mjs record verify '{"summary":"All automation passed, N UAT items verified (X pass, Y fail), Z lessons nominated"}'
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Guardrails
|
|
140
|
+
|
|
141
|
+
| Guardrail ID | Label | Validation Type |
|
|
142
|
+
|--------------|-------|-----------------|
|
|
143
|
+
| `verify-evidence` | UAT.md exists | artifact-exists |
|
|
144
|
+
| `automation-passed` | All automated checks pass (real output) | 执行纪律(review 把关),guard 不校验 |
|
|
145
|
+
| `retry-limit` | No more than 3 auto-retries(机器计数 verifyFailures,第 4 次 BLOCKED) | process-check |
|
|
146
|
+
| `lessons-nominated` | LESSONS.md updated with new entries(完成提名扫描;仅当有合格条目时更新——无合格条目不强制新增,避免噪音条目) | 执行纪律(review 把关),guard 不校验 |
|
|
147
|
+
|
|
148
|
+
## Exit Check
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
node .claude/skills/flow-comet/scripts/workflow-guard.mjs exit verify --apply
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
If the script prints `SKILL: flow-comet-archive`, load that Skill next.
|
|
155
|
+
|
|
156
|
+
## Recovery
|
|
157
|
+
|
|
158
|
+
1. Re-run entry check to confirm workflow state.
|
|
159
|
+
2. Read `.specs/<change-id>/UAT.md` — check which items have results.
|
|
160
|
+
3. If UAT.md exists with all items passing, verification is done.
|
|
161
|
+
4. If UAT.md has failures, check if fix tasks were generated in TASK.md.
|
|
162
|
+
5. If fix tasks exist but not executed, return to execute node.
|
|
163
|
+
6. Count previous auto-retries (from UAT.md / machine-counted verifyFailures) to enforce R2.6 limit.
|
|
164
|
+
7. Resume from the first incomplete verification step.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 baobaolaodie
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|