@xulthekl/team-flow 0.61.0 → 0.63.0

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.
Files changed (57) hide show
  1. package/.claude/always/phase-guard.md +1 -1
  2. package/.claude-plugin/marketplace.json +1 -1
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +1 -1
  5. package/.cursor-plugin/marketplace.json +1 -1
  6. package/.cursor-plugin/plugin.json +1 -1
  7. package/.github/plugin/marketplace.json +2 -2
  8. package/AGENTS.md +6 -4
  9. package/CHANGELOG.md +60 -0
  10. package/GEMINI.md +1 -1
  11. package/INSTALL.md +1 -1
  12. package/README.md +2 -2
  13. package/agents/prd-completeness-reviewer.md +49 -11
  14. package/agents/prd-writer.md +47 -13
  15. package/docs/README_en.md +1 -1
  16. package/docs/decision-points.md +29 -0
  17. package/docs/team-flow /344/275/277/347/224/250/350/257/264/346/230/216/357/274/210/347/240/224/345/217/221/345/233/242/351/230/237/347/211/210/357/274/211.md" +6 -6
  18. package/gemini-extension.json +1 -1
  19. package/hooks/session-start +2 -2
  20. package/llms.txt +1 -1
  21. package/package.json +1 -1
  22. package/plugin.json +1 -1
  23. package/scripts/check-project-config.mjs +52 -1
  24. package/scripts/guard/checks/contract-fresh.mjs +48 -4
  25. package/scripts/guard/checks/gates-probed.mjs +175 -0
  26. package/scripts/guard/guard.mjs +17 -2
  27. package/scripts/lib/cmd-config.mjs +9 -5
  28. package/scripts/lib/cmd-prd.mjs +225 -0
  29. package/scripts/lib/cmd-state.mjs +4 -0
  30. package/scripts/lib/cmd-version.mjs +3 -1
  31. package/scripts/lib/config-loader.mjs +39 -0
  32. package/scripts/lib/state-loader.mjs +12 -0
  33. package/scripts/lib/template-hash.mjs +95 -0
  34. package/scripts/team-flow.mjs +1 -0
  35. package/skills/build-executor/SKILL.md +6 -11
  36. package/skills/build-executor/references/wave-delivery-selfcheck.md +92 -0
  37. package/skills/ce-brainstorm/SKILL.md +91 -27
  38. package/skills/ce-brainstorm/references/brainstorm-sections.md +26 -8
  39. package/skills/ce-brainstorm/references/evidence-chain-validation.md +1 -1
  40. package/skills/ce-brainstorm/references/prd-84-authoring-spec.md +182 -0
  41. package/skills/ce-brainstorm/references/prd-mapping.md +9 -4
  42. package/skills/ce-brainstorm/references/prototype-loop.md +2 -2
  43. package/skills/code-reviewer/SKILL.md +4 -0
  44. package/skills/contract-builder/SKILL.md +21 -0
  45. package/skills/contract-builder/references/bridging-gate-dry-run.md +89 -0
  46. package/skills/contract-builder/references/freeze-and-errata.md +81 -0
  47. package/skills/prototype/references/orchestration-flow.md +1 -1
  48. package/skills/release-archivist/SKILL.md +9 -0
  49. package/skills/spec-writer/SKILL.md +3 -0
  50. package/skills/spec-writer/references/facts-referencing.md +64 -0
  51. package/skills/workflow-orchestrator/SKILL.md +1 -1
  52. package/skills/workflow-orchestrator/references/feedback-loops.md +10 -5
  53. package/skills/workflow-orchestrator/references/s2-prd-prototype-loop.md +3 -3
  54. package/skills/workflow-orchestrator/references/state-model.md +1 -1
  55. package/skills/workflow-start/SKILL.md +1 -0
  56. package/templates/prd-brainstorm-profile.md +9 -3
  57. package/templates/prd.md +76 -49
@@ -1,3 +1,3 @@
1
- # team-flow v0.61.0 | 阶段: {{state}} | 工作流: {{workflow}}
1
+ # team-flow v0.63.0 | 阶段: {{state}} | 工作流: {{workflow}}
2
2
  当前阶段允许的操作由 workflow-start 路由规则定义。
3
3
  禁止跨越 DP gate 进入下一阶段。变更范围以 execution-contract.md 的 Intent Lock 为准。
@@ -9,7 +9,7 @@
9
9
  {
10
10
  "name": "team-flow",
11
11
  "description": "8-state spec workflow + compound global compounding + architecture-design (4A/DDD) + local HTML prototype + product-level orchestration + bootstrap + e2e + session handoff + workflow feedback + independent business analysis. 28 skills + 17 agents with embedded TDD, SDD, code review, debugging, delta spec sync, and design-system-driven prototyping.",
12
- "version": "0.61.0",
12
+ "version": "0.63.0",
13
13
  "source": "./",
14
14
  "author": {
15
15
  "name": "LT",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "team-flow",
3
- "version": "0.61.0",
3
+ "version": "0.63.0",
4
4
  "description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking) + business-analysis (independent requirement/scenario artifact) + design-system (design tokens + component contract + AI primer + showcase) + test-strategy (test strategy design) + project-initialize (new service onboarding) + jarvis (team-flow decision agent, opt-in). 28 skills + 17 agents, one install.",
5
5
  "source": "./",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "team-flow",
3
- "version": "0.61.0",
3
+ "version": "0.63.0",
4
4
  "description": "Spec-first workflow that bridges OpenSpec-style planning and Superpowers-style execution discipline.",
5
5
  "author": {
6
6
  "name": "MageByte",
@@ -5,7 +5,7 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "Unified workflow plugin marketplace for Cursor (team-flow: team-flow + compound + architecture-design + prototype).",
8
- "version": "0.61.0"
8
+ "version": "0.63.0"
9
9
  },
10
10
  "plugins": [
11
11
  {
@@ -2,7 +2,7 @@
2
2
  "name": "team-flow",
3
3
  "displayName": "team-flow",
4
4
  "description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking) + business-analysis (independent requirement/scenario artifact) + jarvis (team-flow decision agent, opt-in). 28 skills + 17 agents, one install.",
5
- "version": "0.61.0",
5
+ "version": "0.63.0",
6
6
  "author": {
7
7
  "name": "LT",
8
8
  "url": "https://github.com/LT"
@@ -6,13 +6,13 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Unified workflow plugins and skills for AI coding agents (team-flow: team-flow + compound + architecture-design + prototype).",
9
- "version": "0.61.0"
9
+ "version": "0.63.0"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "team-flow",
14
14
  "description": "Unified workflow with planning artifacts, execution contracts, TDD, review gates, systematic debugging, delta spec sync, architecture-design, independent business analysis, and local HTML prototyping.",
15
- "version": "0.61.0",
15
+ "version": "0.63.0",
16
16
  "source": ".",
17
17
  "author": {
18
18
  "name": "LT",
package/AGENTS.md CHANGED
@@ -154,7 +154,7 @@ STRATEGY.md CONCEPTS.md 产品策略(BA) / 领域词汇
154
154
  冻结前 PRD 完整性评审(prd-completeness-reviewer,v0.15.0)
155
155
  原型循环由 orchestrator 直接编排(prototype skill 内部编排器,主代理只编排):
156
156
  env-scout → builder 绘制 → reviewer 评审 → 人工评审 → 冻结
157
- PRD vN 内修订 + 变更履历(不升版);反馈环路:scope 问题可回退修订
157
+ PRD 正文就地更新为最新态(不累积历史)+ 变更记录写 dialogue-log.md(不升版);反馈环路:scope 问题可回退修订
158
158
  S3 计划阶段 → ce-plan(pipeline 快速路径,入口问定 plan_mode)
159
159
  plan.md:change 拆分 + 依赖 DAG + 高阶技术方向(不含接口清单)
160
160
  反馈环路:plan 暴露 PRD 问题可回退 S2
@@ -252,8 +252,8 @@ STRATEGY.md CONCEPTS.md 产品策略(BA) / 领域词汇
252
252
  | change-split-auditor | plan.md 拆分质量审计 | Read/Bash/Grep/Glob | orchestrator S4 脚手架前(必选门禁,PASS 方可继续) |
253
253
  | code-reviewer | spec 合规审查(批次完成/合并门禁) | Read/Bash/Grep/Glob | build-executor 批次完成、release-archivist 合并前 |
254
254
  | cross-change-consistency-checker | 跨 change 冲突检测 | Read/Bash/Grep/Glob | orchestrator S5 多 change 并行/closing 时 |
255
- | prd-completeness-reviewer | PRD 完整性评审(能否支撑 plan/spec,6 维度含 §8.4 契约级细节 D6) | Read/Bash/Grep/Glob | orchestrator S2 / ce-brainstorm 冻结前门禁(v0.15.0,v0.47.0 并入 D6) |
256
- | prd-writer | PRD 撰写 agent——契约级 §8.4 逐功能详述(ce-brainstorm Phase 3 委托;可写型,PRD 唯一所有者,先读模板检查清单) | Read/Bash/Grep/Glob/Write/Edit | ce-brainstorm Phase 3 委托(v0.47.0) |
255
+ | prd-completeness-reviewer | PRD 完整性评审(能否支撑 plan/spec,6 维度含 §8.4 信息齐备性与业务可读形态 D6 + 形态核验 G7) | Read/Bash/Grep/Glob | orchestrator S2 / ce-brainstorm 冻结前门禁(v0.15.0,v0.47.0 并入 D6,v0.62.0 改信息齐备性 + 形态核验) |
256
+ | prd-writer | PRD 撰写 agent——**业务可读** §8.4 逐功能详述(ce-brainstorm Phase 3 委托;可写型,PRD 唯一所有者,**先读 `prd-84-authoring-spec.md`**;v0.62.0 起含模板一致性前置断言) | Read/Bash/Grep/Glob/Write/Edit | ce-brainstorm Phase 3 委托(v0.47.0,v0.62.0 重写) |
257
257
  | prototype-builder | 原型绘制执行者(种子优先:template.html+layouts.md 组合;**v0.20.0 产物落盘硬闸门**:index.html 未落盘非空禁返 done + 大产出分片;**v0.21.0 决策点 SendMessage stop-and-resume**) | Read/Write/Edit/Bash/Grep/Glob | prototype skill 内部编排步骤③/⑤修正轮(v0.15.0,v0.18.0 种子优先) |
258
258
  | prototype-env-scout | 原型环境探查 + 2-3 差异化方向(direction-picker;**v0.20.0 简报完整性闸门**:简报未完整禁返 done) | Read/Bash/Grep/Glob | prototype skill 内部编排步骤①(v0.15.0,v0.18.0 direction-picker) |
259
259
  | prototype-reviewer | PRD 6 维度 + P0 grep + craft 4 席 rubric 评审 | Read/Bash/Grep/Glob | orchestrator S2 原型循环每轮产出后 |
@@ -303,7 +303,9 @@ docs/solutions/
303
303
 
304
304
  项目 `team-flow.config.json` 可注入(**插件层扩展字段,非 team-flow 原生 schema**;原生仅 `artifacts.order` / `artifacts.skip`):
305
305
 
306
- - `prd.template`:PRD 模板路径(默认 `templates/prd.md`,GTMC D7 业务要件 11 章结构)。ce-brainstorm Phase 0.0 首次运行时若未配置,会交互式询问用户选择默认模板或自定义路径,并自动写入配置。自定义模板应配套 brainstorm profile(`<模板名>-brainstorm-profile.md`),否则回退使用内置默认的 GTMC D7 profile
306
+ - `prd.template`:PRD 模板路径(默认**插件内置** `templates/prd.md`,GTMC D7 业务要件 11 章结构;**按插件根解析**,项目根同名路径不构成回退)。**v0.62.0(F2)起默认不再往项目内拷贝副本**——直接用插件内置;仅当用户明确选择「项目内留副本以便定制」时才 cp,并**必须同时写入该配置指向副本**。自定义模板应配套 brainstorm profile(`<模板名>-brainstorm-profile.md`,**成对处置**)
307
+ - `prd.spec`:§8.4 撰写规范文件路径(默认 `skills/ce-brainstorm/references/prd-84-authoring-spec.md`)。**规范唯一权威**——与模板骨架解耦(F1),故项目内持有旧骨架副本**不影响规范**
308
+ - `prd.template_ack`:模板一致性确认记忆(v0.62.0 G2)。由 `tf prd ack set` **原子写入**,含 `in_use_hash` / `plugin_hash` / `spec_hash` / `mode` / `diff_digest` / `plugin_version` / `acknowledged_at` / `acknowledged_by`;三个 hash 全等时静默,任一变化触发 DP-8 重新提问
307
309
  - `prototype.designSystem`:项目 `design-system.md` 路径
308
310
  - `prototype.entry`:原型入口(默认 `prototype/index.html`)
309
311
 
package/CHANGELOG.md CHANGED
@@ -4,6 +4,66 @@ All notable changes to `team-flow` will be documented in this file.
4
4
 
5
5
  The format loosely follows Keep a Changelog.
6
6
 
7
+ ## [0.63.0] - 2026-09-23
8
+
9
+ ### Added(sop-flow 效率八项改进 S1–S6 + E1/E2;来源:emp-auth workflow-feedback 20260923-013114,经 308 行独立专家评审定稿)
10
+
11
+ **新增 guard 维度 `gates-probed`(S2,本版本核心代码变更)**
12
+ - 挂 `bridging → approved-for-build`:契约声明的 G 类闸门必须已在主工作区当前态跑过 dry-run(预期 FAIL = RED 基线)并留档 `.superpowers/test-evidence/bridging-gates-red.txt`。
13
+ - 检查五件:evidence 存在 / 首行逐字 `EXPECTED: FAIL (RED baseline)` / `CONTRACT_HASH` **值**新鲜(不用 mtime——契约字节等价重生成或 git 恢复会让 mtime 变新而内容未变)/ 契约 `## Gate Registry` 的 id 逐 id 覆盖 / **段缺失或解析失败 = FAIL(fail-closed)**。
14
+ - **段存在性是硬要求**:缺段与「零闸门」不可区分——v0.13 RC-1 已删除的内容型豁免不得复活。确无闸门须写 `N/A: <理由>`;另有 `gates_probed_skipped` + 理由作可审计豁免(hotfix 走转移表天然豁免,tweak 会继承故必须靠该键放行)。
15
+ - 三处状态管道同步注册(`state-loader` BUILTIN_DEFAULTS + `writeState` + `cmd-state` SETTABLE_FIELDS)——缺一即「回显成功却零写入」(v0.59.0 同型教训)。
16
+ - 把 `design.md` R-7「闸门命令已实测可跑」长期的**文字自证**物化为机械证据。
17
+
18
+ **`executing:closing` 补挂 `contract-fresh`(S3 反查锚)**
19
+ - 原状 closing 的反查走 `execution-plan-ready`(`validatePlan` 比对 plan 内嵌 hash),而该比对可被 `tf execution refresh-hash` 一键刷平(只改 plan JSON、revision 不升),且 `wave_fingerprint` 不含 `artifacts_hash` → 把 gate-affecting 变更伪记为陈述性勘误后可**静默通过**。
20
+ - 新挂载直接比对 `state.artifacts_hash` 与制品实算值,`refresh-hash` 无法清屏。
21
+ - 失败信息按时间点分流(P4 评审补强):冻结前改动可裸 `tf state rebuild`;**冻结后必须走勘误登记/例外 2**,明文禁止用 rebuild 抹平差异。
22
+
23
+ **新增 references**:`contract-builder/references/freeze-and-errata.md`(勘误登记段模板 + 六条冻结例外 + 三分处方表)、`contract-builder/references/bridging-gate-dry-run.md`(Gate Registry 模板 + dry-run 六条硬要求 + Facts Recheck)、`spec-writer/references/facts-referencing.md`(facts 三件套 + 判据四条 + 跨仓结构)、`build-executor/references/wave-delivery-selfcheck.md`(case↔test 对账三层判据 + Gate-Only receipt 协议)。
24
+
25
+ ### Changed(纪律写入 6 个 skill)
26
+
27
+ - **S1 事实前置**:制品引用 `facts.json` 键而非裸写数字(基线数字须写成 `<值>(facts:<键>,ts=…)`);bridging 期由 contract-builder 复测一次,差异摘要**并入 DP-3 ask 呈报**(裁决权归 LT,不得由实施方自行解释掉)。强度如实声明:纪律条款,`tf facts probe` 与 WARNING lint 归远期。
28
+ - **S3 冻结纪律**:DP-3 后 planning 四件默认冻结,陈述性订正记入契约 `## Errata Register`;勘误段写入后 **MUST `tf execution refresh-hash`**(否则卡 `execution-plan-ready`,恰复活 revision 回路)。例外 2 判定权**升格至审查侧**(自判错判方向即伪绿出口)。
29
+ - **S4 对账左移**:build-executor 每 wave 产出 `<wave>-case-test-reconciliation.md`;完成门 = 机械层 + 半机械层通过,**断言点层归 code-reviewer,不构成本步条件**(防卡死、防自填假证据)。code-reviewer Step 5b 独立复核权不减免,且新增「根仓 planning 制品 diff 单列」(多仓下子仓 range 看不到根仓 planning 改动)。
30
+ - **S5 攒批与预批复**:同根因发现攒成一次 ask;DP-6 与 roadmap/push 边界并入 closing 确认;**门禁类 DP(dp_3/dp_4)禁超时代答**(二者是 `dp-gate-passed` 数据源)。
31
+ - **S6 环境清单注入**:`.team-flow/environment.md` 存在则全文附入 dispatch prompt,并**追加元指令要求下游继续附入**(子代理不继承 skills,规则否则到不了第二跳)。
32
+ - **E1 tasks checkbox 形态**:spec-writer 校验清单与 contract-builder 的 hotfix tasks 产出路径**双路径**强制 `- [ ]`——同时消掉 closing 死锁与 hash 漂移重签双源头。
33
+ - **E2 receipt 协议**:零代码/纯闸门波次以根仓 planning commit 作 base..head;**若 G4 未执行须先完成其阻塞询问再 publish**,不得静默代替用户选择。
34
+
35
+ ### Fixed
36
+
37
+ - `contract-fresh` 失败信息区分「缺 artifacts_hash(状态文件异常)」与「真漂移」,并给出可执行出路——避免 closing 死锁无指示。
38
+
39
+ ### 验证
40
+
41
+ - `npm test` 1237/1237(新增 `guard-gates-probed` 15 例 + `guard-closing-contract-fresh` 3 例);`npm run test:e2e` 77/77。
42
+ - **反向验证 ×2**(改门禁后须能证明它有效):移除 `gates-probed` 挂载 → 测试变红 1 项;移除 closing 的 `contract-fresh` → 变红 2 项(含「删 `## Gate Registry` 段必 FAIL」)。
43
+ - P1.5 标准档两轮对抗验证:第一轮 2C+14M+8m、第二轮 2C+6M+1m(**其中 2 个 Critical 是上一轮修复自身引入的**),全部闭合后进 P2;P4 双评审(plugin-validator / skill-reviewer)12 项发现全部修复。
44
+ - 横展同步 3 处维度计数宣称(`guard-dimensions.test.mjs` 覆盖映射 19→20 维 + `test-matrix.md` + 团队版使用说明)。
45
+
46
+ ## [0.62.0] - 2026-09-22
47
+
48
+ ### Changed(PRD 业务可读性改造:§8.4 形态重写 + 规范与体例解耦 + 模板一致性确认门)
49
+
50
+ **背景**:三条诉求——① 正式产物只留最新态、变更历史独立文件;② §8.4 改为「一功能一表 + 业务视角说明」;③ 业务语汇优先,非技术评审人看得懂。经方法论评审(ISO 29148 / ASPICE / DDD 三线)+ 五路交叉评审后落地,共 60 项改造点。
51
+
52
+ 1. **§8.4 形态重写(A 类 6 项)**:`templates/prd.md` §8.4 由「功能形态表 + 11 维/7 维 checkbox 清单」改为**骨架 + 填空槽位**——一个功能模块**一张两列表格**(UI 用 `原型/UI`,非 UI 用 `触发入口`)+ **编号业务叙述**(定义 → 条件或触发 → 内容或要素 → 业务规则 → 异常与边界)。§1.2 修订记录收敛为四列**极简版本行**(单行要点 ≤ 200 字、禁「已被 X 推翻」式反转注记);§8.2 新增**受控句式范围边界**(挂 proposal 条款号实现双向可追溯);§6 术语字典增「**代码标识**」列并定位为「业务与代码共享词汇表」;**§9.1.9 要件阅读体验**空表填为指向规范文件的指针式自查表;范围标记列改**受控枚举**(`本期新增 / 本期变更 / 本期不变`,禁版本锚点与日期)。
53
+ 2. **规范与体例解耦(F1,根治)**:新增插件侧权威文件 `skills/ce-brainstorm/references/prd-84-authoring-spec.md`,承载 §8.4 生成规范(目标形态 / 六原则 / 三类内容判定 / 弱词规则 / 内部校验清单 / 范围标记 / 反填充约束 / 可读性自查 / **形态核验 6 条** / **可解析性硬约束**)。**根因**:模板同时承担「客户可能强制的 D7 体例骨架」与「team-flow 维护的生成规范」,一旦被 cp 进项目,规范即被连带冻结。解耦后**骨架副本可以旧、规范永远新**。全部「模板 §8.4 为唯一权威」表述(`prd-writer` / `prd-completeness-reviewer` / `brainstorm-sections` / `ce-brainstorm SKILL` / `prd-mapping` / `evidence-chain-validation` / `prototype-loop` / `s2-prd-prototype-loop`)已改指规范文件。
54
+ 3. **项目空间模板同步(F2–F5)**:**F2** Phase 0.0 语义澄清——「默认模板」= 直接用插件内置,**不再 cp 副本**;仅当用户明确定制时才 cp 且必须同时写 `prd.template`;默认值基准显式化(一律按**插件根**解析,项目根同名路径不构成回退);模板与 profile **成对**处置。**F3** `check-project-config.mjs` 增「PRD 模板漂移」维度(真消费点比对 + 影子副本提示,exit 0 不阻断)。**F4** 升级说明。**F5** 新增 `scripts/lib/template-hash.mjs`——hash 判据收敛为**唯一实现**(sha256 + CRLF→LF 归一化),F3 与 G1 共用。
55
+ 4. **模板一致性确认门(G 类 8 项,DP-8)**:撰写前比对「实际使用模板 / 插件内置模板 / **规范文件**」三个 hash,不一致则**阻塞提问**(A 按最新 / B 保留当前 / C 先看差异);确认结果由**新增原子命令 `tf prd ack set`**(`scripts/lib/cmd-prd.mjs`,子命令分发照 `cmd-arch.mjs` 惯例)写入 `prd.template_ack`,三 hash 全等则静默;选 A 时**先做历史文档就地升级**(不归档改名,留痕由 dialogue-log 记升级前摘要值)再放行撰写。**新增撰写后形态核验(G7)**——在既有 `prd-completeness-reviewer` D6 内增 6 条形态判据(左列须为画面/入口锚点、§1.2 量化、范围标记受控枚举、无历史痕迹、无技术标识符越界、**维度清单未入正文**)。本门已登记 **DP-8**(默认动作=挂起)。
56
+ 5. **既有缺陷修复(G5)**:`tf config --set` 原固定写 `<cwd>/team-flow.config.json`(legacy 第 2 顺位),而读取**首选** `<cwd>/.team-flow/team-flow.config.json` 且首个命中即返回 → 在已有 `.team-flow/` 配置的项目里 `--set` **静默无效**。改为写入 `findConfigFile()` 命中的文件(`resolveConfigWritePath()`)。
57
+ 6. **agent 与 skill 规则同步(B 类 14 项 / C 类 17 项 / D 类 4 项)**:`prd-writer` 重写(Iron Law 由 4 条扩为 **10 条**,含模板一致性前置断言、业务认知顺序、清单不入正文、反填充双判据、精确性指针;输入表补 `plugin_root` 与 `template_ack`);`prd-completeness-reviewer` D6 由「契约级细节」改为「**信息齐备性 + 业务可读形态**」并补形态核验表;变更记录结构迁 `dialogue-log.md` 并新增**可追溯字段**(变更编号 / 受影响需求 ID / 受影响功能 ID / 理由 / 决策人)。
58
+
59
+ ### Added(验证与证据)
60
+
61
+ - **P1.5-A 对抗验证(3 项高价值项实测,报告见工作区 `docs/plan/prd-p15a-verification.md`)**:**⑨ 撰写后形态核验可行性**——用 1806 行存量 PRD 做样本,实测**原 5 条判据会被绕过**(形态确为两列表 + 编号叙述但**左列为「维度」**;§1.2 表头合规但**单行要点 7,156 字**;**完全漏掉「维度清单入正文」**),据此补 3 条判据。**⑦ GUARDRAIL 方向冲突确认**——`ce-brainstorm/SKILL.md` 原写「模板文件:`.team-flow/templates/`」与 F2 相反,且位于模板解析步骤**之前**,改为「默认使用插件内置;项目内副本非权威、不得直接读取」。**⑤ Phase 0.0 读取路径**——正常路径不读副本(解析层不成立),但 e2e 日志实证有子代理直读项目副本(行为层成立)。**④ F3 实测**——在 `emp-auth` / `fytx-agreement` 两个真实项目成功报出未被消费的影子副本。
62
+
63
+ ### Changed(存量项目处置:不清理副本)
64
+
65
+ - 两个存量项目的 `.team-flow/templates/` 副本**保留不清理**(决策 DEC-22)。前提:清理并非「启用新版规范」的开关(config 未配 `prd.template` → 默认即解析插件内置,升级即生效)。代价已记账:影子副本误导(F1/F2 兜底)、落后无提示(F3 闭合)、agent 直读(改 GUARDRAIL 闭合)。
66
+
7
67
  ## [0.61.0] - 2026-09-21
8
68
 
9
69
  ### Added(三优化点:决策话术人类化 / Hotfix 命中源 change / 拆分粗粒度优先)
package/GEMINI.md CHANGED
@@ -8,7 +8,7 @@ The workflow is self-contained and does not require OpenSpec or Superpowers at r
8
8
 
9
9
 
10
10
  <!-- team-flow-phase-guard-start -->
11
- # team-flow v0.61.0 | 阶段: {{state}} | 工作流: {{workflow}}
11
+ # team-flow v0.63.0 | 阶段: {{state}} | 工作流: {{workflow}}
12
12
  当前阶段允许的操作由 workflow-start 路由规则定义。
13
13
  禁止跨越 DP gate 进入下一阶段。变更范围以 execution-contract.md 的 Intent Lock 为准。
14
14
  <!-- team-flow-phase-guard-end -->
package/INSTALL.md CHANGED
@@ -7,7 +7,7 @@
7
7
  - [Fission-AI/OpenSpec](https://github.com/Fission-AI/OpenSpec) — 规划引擎(Schema 验证、Delta Spec、工件解析)
8
8
  - [obra/superpowers](https://github.com/obra/superpowers) — 执行纪律(TDD 铁律、SDD、系统化调试、代码审查)
9
9
 
10
- 当前发布版本:**v0.61.0**。
10
+ 当前发布版本:**v0.63.0**。
11
11
 
12
12
  ---
13
13
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # team-flow
2
2
 
3
- > 当前版本:`v0.61.0`
3
+ > 当前版本:`v0.63.0`
4
4
 
5
5
  > 统一插件:**team-flow**(spec 驱动开发)+ **compound-engineering 核心子集**(全局复利)+ **architecture-design**(4A+DDD 增量设计)+ **prototype**(本地 HTML 原型)+ **e2e**(AC 驱动 E2E)+ **workflow-orchestrator**(产品级编排)+ **workflow-bootstrap**(既有项目接入)。一次安装,十三套能力协同(详见下文「十三套能力」)。
6
6
 
@@ -88,7 +88,7 @@ STRATEGY.md CONCEPTS.md 策略 / 领域词汇
88
88
 
89
89
  ### 配套 agents(17 个,v0.47.0 增至 17)
90
90
 
91
- 全部由编排层 dispatch(主代理只编排,need-explorer 为主进程交互式澄清):architecture-design(架构设计门控)/ architecture-reviewer(架构自动审查)/ bug-investigator(bug 根因调查)/ change-split-auditor(拆分质量审计)/ code-reviewer(代码审查)/ cross-change-consistency-checker(跨 change 一致性)/ prd-completeness-reviewer(PRD 完整性评审,含 §8.4 契约级细节 D6)/ prd-writer(PRD 契约级撰写)/ prototype-builder(原型绘制)/ prototype-env-scout(原型环境探查)/ prototype-reviewer(原型评审)/ need-explorer(需求探索)/ spec-writer(规格编写)/ contract-builder(执行契约构建)/ build-executor(TDD 构建执行)/ release-archivist(发布归档)/ business-analysis(独立业务分析)。
91
+ 全部由编排层 dispatch(主代理只编排,need-explorer 为主进程交互式澄清):architecture-design(架构设计门控)/ architecture-reviewer(架构自动审查)/ bug-investigator(bug 根因调查)/ change-split-auditor(拆分质量审计)/ code-reviewer(代码审查)/ cross-change-consistency-checker(跨 change 一致性)/ prd-completeness-reviewer(PRD 完整性评审,含 §8.4 信息齐备性与业务可读形态 D6)/ prd-writer(PRD 业务可读撰写)/ prototype-builder(原型绘制)/ prototype-env-scout(原型环境探查)/ prototype-reviewer(原型评审)/ need-explorer(需求探索)/ spec-writer(规格编写)/ contract-builder(执行契约构建)/ build-executor(TDD 构建执行)/ release-archivist(发布归档)/ business-analysis(独立业务分析)。
92
92
 
93
93
  ### 命名约定
94
94
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: prd-completeness-reviewer
3
- description: PRD 完整性自动评审。在 PRD 写入后、冻结前,独立检查"需求描述是否完整到能支撑后续 plan/spec 实施"(6 维度,含 §8.4 契约级细节 D6),输出分级完整性报告。直接写审查报告文件,返回摘要 + 文件路径。与 claim verifier 分工——claim verifier 管"说得对不对"(核查事实声明),本 agent 管"说得全不全、能否落地"。由编排层在 PRD 冻结前显式派发(workflow-orchestrator S2 / ce-brainstorm Phase 3.6 前)。
3
+ description: PRD 完整性自动评审。在 PRD 写入后、冻结前,独立检查"需求描述是否完整到能支撑后续 plan/spec 实施"(6 维度,含 §8.4 信息齐备性与业务可读形态 D6),输出分级完整性报告。直接写审查报告文件,返回摘要 + 文件路径。与 claim verifier 分工——claim verifier 管"说得对不对"(核查事实声明),本 agent 管"说得全不全、能否落地"以及"形态是否符合规范"(撰写后形态核验 G7)。由编排层在 PRD 冻结前显式派发(workflow-orchestrator S2 / ce-brainstorm Phase 3.6 前)。
4
4
 
5
5
  model: inherit
6
6
  color: yellow
@@ -26,7 +26,8 @@ Do NOT duplicate claim verification. A statement can be factually correct yet st
26
26
  |-----------|-------------|
27
27
  | `prd_path` | PRD 文件路径(e.g., `requirement/v1/prd.md`) |
28
28
  | `concepts_path` | (可选)CONCEPTS.md 路径,用于术语一致性比对 |
29
- | `template_path` | PRD 模板路径(可选,默认 `templates/prd.md`;§8.4 检查清单单一权威,以解析后的模板为基准) |
29
+ | `template_path` | PRD 模板路径(可选,默认插件内置 `templates/prd.md`;模板只承载骨架与槽位) |
30
+ | `spec_path` | **(v0.62.0 新增,可选)** 撰写规范文件路径,默认 `${CLAUDE_PLUGIN_ROOT}/skills/ce-brainstorm/references/prd-84-authoring-spec.md`——**§8.4 规范唯一权威**,D6 与形态核验均以它为基准 |
30
31
  | `detail_ledger_path` | (可选)detail_ledger 路径(功能细节澄清产出;存在时用于 D6 交叉核对 NA 标注一致性) |
31
32
 
32
33
  If `prd_path` is missing or unreadable, report `FAIL` with reason `INPUT_ERROR`.
@@ -40,7 +41,7 @@ If `prd_path` is missing or unreadable, report `FAIL` with reason `INPUT_ERROR`.
40
41
  | D3 | 边界与非功能 | 空/错/异常状态、性能/兼容约束 | Important |
41
42
  | D4 | 术语一致性 | 与 CONCEPTS.md / §6 业务术语一致 | Minor |
42
43
  | D5 | 范围闭环 | in/out scope 明确,无悬空功能 | Important |
43
- | D6 | §8.4 契约级细节 | 逐功能模块按模板检查清单覆盖适用维度(UI 11 维/非 UI 7 维);§7↔§8.4 交叉核对无悬空功能。**基准 = 模板 §8.4 检查清单(单一权威)** | Critical(核心维度缺失/悬空)/ Important(辅助维度缺失) |
44
+ | D6 | §8.4 信息齐备性与业务可读形态 | **(a)信息齐备性**:逐功能模块核对业务信息是否**可定位**(不核对"正文里有没有该维度标题");§7↔§8.4 交叉核对无悬空功能。**(b)形态核验(v0.62.0 G7)**:按 6 条判据核验产出形态是否符合规范(见下方 D6 执行细则)。**基准 = `prd-84-authoring-spec.md`(唯一权威,不是模板 §8.4)** | Critical(核心信息缺失 / 悬空功能)/ Important(辅助信息缺失、**形态核验命中**) |
44
45
 
45
46
  ## Review Process
46
47
 
@@ -74,13 +75,37 @@ If `prd_path` is missing or unreadable, report `FAIL` with reason `INPUT_ERROR`.
74
75
  - Any out-of-scope item that other requirements implicitly depend on?
75
76
  Missing scope declaration or dangling feature = Important.
76
77
 
77
- 8. **D6 §8.4 契约级细节完整度**:Read the template §8.4 checklist FIRST — `template_path`(默认 `templates/prd.md`)is the single authority (UI 11 维 / 非 UI 7 维), never judge against your own expectations. Then for each function module in the PRD §8.4:
78
- - 判定功能形态(UI/非 UI),按对应维度清单核对覆盖度;**未标注 NA 且未覆盖的适用维度 = 缺失**
79
- - **核心维度缺失 = Critical**:功能概述缺失;UI 页面布局/表格列定义缺失;非 UI 输入输出/处理步骤/异常处理缺失
80
- - **辅助维度缺失 = Important**:UI 权限规则/搜索模块/弹层结构/动态字段/导入导出/状态操作差异/异常边界;非 UI 触发条件/权限角色/幂等并发/性能约束
78
+ 8. **D6 §8.4 信息齐备性与业务可读形态**:Read the **spec file** FIRST — `spec_path`
79
+ (默认 `${CLAUDE_PLUGIN_ROOT}/skills/ce-brainstorm/references/prd-84-authoring-spec.md`)
80
+ is the **single authority**——never judge against your own expectations,
81
+ and never against the template skeleton(模板只承载骨架与槽位).
82
+
83
+ **(a)信息齐备性**(核对**信息是否可定位**,**不**核对"正文里有没有该维度标题"):
84
+
85
+ - 逐功能模块按**业务认知顺序**(定义 / 条件或触发 / 内容或要素 / 业务规则 / 异常与边界)核对信息是否齐备
86
+ - **核心信息缺失 = Critical**:功能定义缺失;UI 展示内容与可操作项缺失;非 UI 输入输出 / 处理 / 异常处理缺失
87
+ - **辅助信息缺失 = Important**:权限、并发、性能、状态差异等
81
88
  - **§7 系统功能清单 ↔ §8.4 详述块交叉核对**:§7 列出但 §8.4 无详述 = **悬空功能 = Critical**
82
- - 维度不适用但已显式标注 `NA + 理由` 的模块 = 不视为缺失(但需抽查 NA 理由合理性)
83
- - **detail_ledger 交叉核对(可选)**:若 `detail_ledger_path` 提供,对比澄清期确认的维度状态与 PRD §8.4 覆盖/NA 标注——澄清已确认内容但 PRD 缺失或标 NA = Critical;澄清标 NA 但 PRD 有详述 = 记录不阻断
89
+ - 维度不适用的模块:查 `detail-ledger.md` 是否有 `NA + 理由`(**正文不该出现 NA 标注**);
90
+ 有理由 = 不视为缺失,无理由 = Important
91
+ - **detail_ledger 交叉核对(可选)**:澄清已确认内容但 PRD 缺失或标 NA = Critical;
92
+ 澄清标 NA 但 PRD 有详述 = 记录不阻断
93
+
94
+ **(b)形态核验(v0.62.0 · G7)——判据必须同时查「形态」与「内容」**:
95
+
96
+ | # | 核验项 | 判级 |
97
+ |---|---|---|
98
+ | 1 | §8.4 是否「一功能一表 + 编号业务叙述」,且**左列为画面/入口锚点**(出现「维度 / 字段 / 类型」等技术维度名 = 违规) | Important |
99
+ | 2 | §1.2 是否极简版本行:单版本行要点 **≤ 200 字**;**无**「已被 X 推翻」式反转注记;功能级历史指向 `dialogue-log.md` | Important |
100
+ | 3 | 范围标记是否受控枚举(`本期新增 / 本期变更 / 本期不变`;无版本锚点、澄清轮次锚点、日期) | Important |
101
+ | 4 | 有无历史痕迹残留(删除线、版本锚点、章节名带版本、「原口径作废」「已被推翻」) | Important |
102
+ | 5 | 有无技术标识符越界(类名 / 方法名 / 表名 / 注解 / 字段名 / 行号出现在正文主干) | Important |
103
+ | 6 | 有无把维度清单写入正文(「按 … 维覆盖,不适用标 NA」式转述) | Important |
104
+
105
+ > **实证提醒**:只查形态会被"形似神不似"绕过——某存量 PRD **确为**两列表 + 编号叙述,但**左列是「维度」**;
106
+ > §1.2 表头合规但**单行要点达 7,156 字**。**形态对了 ≠ 语义对了。**
107
+
108
+ **(c)精确性**:主观词 / 歧义词命中 = Minor;关键规则因弱词不可验证 = Important。
84
109
 
85
110
  ### Phase 3: 汇总判定
86
111
 
@@ -133,7 +158,20 @@ Aggregate findings → final verdict per the Judgment Criteria.
133
158
  ### D5 范围闭环 — {PASS/WARN}
134
159
  [in/out scope 声明状态 + 悬空功能列表]
135
160
 
136
- ### D6 §8.4 契约级细节 — {PASS/FAIL} ({m}/{n} modules contract-grade)
161
+ ### D6 §8.4 信息齐备性与业务可读形态 — {PASS/FAIL} ({m}/{n} modules)
162
+
163
+ #### D6-(a) 信息齐备性
164
+ [逐模块检查:模块 id | 定义 | 条件/触发 | 内容/要素 | 业务规则 | 异常与边界 | 状态]
165
+
166
+ #### D6-(b) 形态核验(G7)
167
+ | 核验项 | 命中 | 判级 | 证据(章节 + 摘录) |
168
+ |---|---|---|---|
169
+ | 1 一功能一表 + 左列为画面/入口锚点 | {是/否} | {Important/—} | |
170
+ | 2 §1.2 极简版本行(≤200 字、无反转注记) | {是/否} | {Important/—} | |
171
+ | 3 范围标记受控枚举 | {是/否} | {Important/—} | |
172
+ | 4 无历史痕迹残留 | {是/否} | {Important/—} | |
173
+ | 5 无技术标识符越界 | {是/否} | {Important/—} | |
174
+ | 6 维度清单未写入正文 | {是/否} | {Important/—} | |
137
175
  [逐功能模块检查:功能形态 | 适用维度覆盖 | NA 标注 | 悬空功能 | 状态]
138
176
 
139
177
  ## Findings
@@ -160,7 +198,7 @@ Aggregate findings → final verdict per the Judgment Criteria.
160
198
  - Distinguish "missing" from "present-but-unverifiable" (both Critical for D2, but different fixes)
161
199
  - Give a clear, unambiguous verdict
162
200
  - Treat vague AC ("表现良好"/"快速响应" without threshold) as a D2 Critical
163
- - Read the template §8.4 checklist BEFORE assessing D6 — the template is the single authority, not your expectations
201
+ - Read the **spec file**(`prd-84-authoring-spec.md`)BEFORE assessing D6 — **it** is the single authority, not your expectations and **not** the template skeleton(模板只承载骨架与槽位;项目内模板副本非权威)
164
202
  - Distinguish "维度不适用(已标注 NA)" from "维度缺失(未标注 NA 且未覆盖)" in D6
165
203
 
166
204
  **DON'T:**
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: prd-writer
3
- description: PRD 撰写 agent——在 ce-brainstorm 主会话完成交互澄清(Phase 0-2.6 + 功能细节澄清)之后、QA-4 审查之前,按 PRD 模板 §8.4 契约级检查清单将已确认产出整理为契约级 PRD 草稿(requirement/vN/prd.md)。可写型,负责 PRD 文档。
3
+ description: PRD 撰写 agent——在 ce-brainstorm 主会话完成交互澄清(Phase 0-2.6 + 功能细节澄清)之后、QA-4 审查之前,按 `prd-84-authoring-spec.md` 规范将已确认产出整理为**业务可读**的 PRD 草稿(requirement/vN/prd.md)。可写型,负责 PRD 文档。
4
4
 
5
5
  model: inherit
6
6
  color: green
@@ -9,7 +9,10 @@ skills:
9
9
  - ce-brainstorm
10
10
  ---
11
11
 
12
- You are an independent PRD Writer. You turn the confirmed brainstorm outputs (business-analysis.md, dialogue-log.md, detail_ledger, synthesis summary) into a contract-grade PRD document at `requirement/vN/prd.md`. You execute ONLY the PRD writing phase — interactive clarification (Phase 0-2.6) is ALREADY DONE by the main conversation.
12
+ You are an independent PRD Writer. You turn the confirmed brainstorm outputs (business-analysis.md, dialogue-log.md, detail_ledger, synthesis summary) into a **business-readable** PRD document at `requirement/vN/prd.md`. You execute ONLY the PRD writing phase — interactive clarification (Phase 0-2.6) is ALREADY DONE by the main conversation.
13
+
14
+ > **业务可读** = 面向**业务评审人**撰写——读 PRD 的人不需要懂技术。
15
+ > 业务语汇为主干,技术标识符不进正文主干;完整性走内部清单,**清单本身不写入正文**。
13
16
 
14
17
  ## Scope Boundary
15
18
 
@@ -19,50 +22,81 @@ You write PRD documents only. You do NOT run interactive phases, do NOT ask the
19
22
 
20
23
  **You are the sole owner of `requirement/vN/prd.md`.** No other agent or the orchestration layer may directly edit it. Modification requests (review feedback) MUST be routed through you via `SendMessage` resume.
21
24
 
22
- **Your preloaded Skill (ce-brainstorm) contains the detailed methodology** — PRD template resolution, `references/brainstorm-sections.md` chapter mapping (incl. §8.4 功能模块提取规则), `references/prd-mapping.md` version format. Follow it for HOW. This prompt defines WHO you are and WHAT you must deliver.
25
+ **Your preloaded Skill (ce-brainstorm) contains the detailed methodology** — PRD template resolution, `references/brainstorm-sections.md` chapter mapping, `references/prd-mapping.md` version format. Follow it for HOW. This prompt defines WHO you are and WHAT you must deliver.
23
26
 
24
27
  ## Iron Law
25
28
 
26
- 1. **先读模板 §8.4 检查清单再撰写**:定位 `template_path`(默认 `templates/prd.md`)§8.4(UI 11 维 / 非 UI 7 维),以解析后的模板为逐功能详述的强制基准,不在他处猜测规范。
27
- 2. **逐功能模块契约级详述**:每个功能按「功能形态」(UI/非 UI)覆盖对应必含维度;维度不适用时标注 `NA + 一句理由`;**未标注 NA 且未覆盖 = PRD 不完整**。
28
- 3. **无信息章节保留模板占位,不虚构**:data source 未覆盖的内容保留 `{占位}`,并列入 `missing_info`。
29
- 4. **不写实现契约**:接口路径/表字段/类结构/算法实现属 change 级 spec/design,PRD 只写产品行为与规则。
29
+ **0. 模板一致性前置断言(v0.62.0 · G3)**:收到 `template_path` 后**先**比对 hash——
30
+ 对「实际使用模板」与「插件内置模板 + 规范文件 `prd-84-authoring-spec.md`」取 hash
31
+ (算法见 `scripts/lib/template-hash.mjs`,**不得自行另写判据**)。
32
+ 若不一致且无有效 `template_ack` → 返回 `status: blocked`、`reason: TEMPLATE_MISMATCH` + 差异摘要,
33
+ **不撰写、不静默、不自行裁决**。(你是"不提问"的子代理——确认动作一律回主会话 Phase 0.0 / S2。)
34
+
35
+ 1. **先读规范文件再撰写**:规范唯一权威是插件内置 **`prd-84-authoring-spec.md`**
36
+ ——**不是**模板 §8.4、**不是**项目内的模板副本。撰写前必须读取它,不在他处猜测规范。
37
+ 2. **按业务认知顺序呈现**:§8.4 每个功能模块 = **一张两列表格 + 编号业务叙述**
38
+ (定义 → 条件或触发 → 内容或要素 → 业务规则 → 异常与边界)。
39
+ **左列必须是画面/入口锚点**(`原型/UI` 或 `触发入口`),不得写成「维度 / 字段 / 类型」。
40
+ 3. **完整性走内部清单,清单不入正文**:撰写**前**用 11 维 / 7 维清单核对信息是否齐备;
41
+ 撰写**时**按业务认知顺序重组进正文叙述。**不得**把清单本身写进正文。
42
+ 维度不适用时在 `detail-ledger.md` 标 `NA + 理由`,**不在正文标注 NA**。
43
+ 4. **业务语汇为主干**:正文主干用 §6 术语字典的**业务名**;类名 / 方法名 / 表名 / 行号不得出现,
44
+ 确需时以括注附于业务名后。
45
+ 5. **无信息章节保留模板占位,不虚构**:data source 未覆盖的内容保留 `{占位}`,并列入 `missing_info`。
46
+ 6. **不写实现契约**:接口路径 / 表字段 / 类结构 / 算法实现属 change 级 spec/design,PRD 只写产品行为与规则。
47
+ 7. **rationale 按需保留**:澄清中确实产生过重要取舍时,随规则保留**一句话**理由;
48
+ **已失效的旧结论、版本演变轨迹、被推翻的论证一律不写进正文**(迁 `dialogue-log.md`)。
49
+ 判定测试见规范文件 §3.1。
50
+ 8. **反填充**:不得为「看起来完整」而填充。可核对判据——
51
+ ① **可指回来源**:正文每条业务规则必须能指回需求来源或澄清记录,**指不回去的即删**;
52
+ ② **NA 必附理由且可被挑战**:`detail-ledger.md` 的 NA 须写一句理由,
53
+ **冲突时以「有理由的 NA」优先**(防止为消灭 NA 而反向填充)。
54
+ 9. **精确性自检**:交付前按 `prd-84-authoring-spec.md` **§4 弱词清单**扫一遍正文——
55
+ 禁用比较级 / 主观词 / 歧义词 / 开放式 / 漏洞词。(清单正文见规范文件,**不在此重复**。)
30
56
 
31
57
  ## Inputs
32
58
 
33
59
  | Parameter | Description |
34
60
  |-----------|-------------|
35
61
  | `prd_path` | 目标 PRD 路径(e.g., `requirement/v1/prd.md`) |
36
- | `template_path` | PRD 模板路径(默认 `templates/prd.md`) |
62
+ | `template_path` | PRD 模板路径(默认插件内置 `templates/prd.md`) |
63
+ | `plugin_root` | **(v0.62.0 新增)** 插件根目录(`${CLAUDE_PLUGIN_ROOT}`),用于定位内置模板与 `prd-84-authoring-spec.md` |
64
+ | `template_ack` | **(v0.62.0 新增)** 模板一致性确认记忆(hash 组 + mode),供 Iron Law 0 断言 |
37
65
  | `business_analysis_path` | business-analysis.md 路径(§2/§3/§7/§8 数据源) |
38
66
  | `dialogue_log_path` | dialogue-log.md 路径(§1.2 修订记录引用) |
39
67
  | `detail_ledger_path` | detail_ledger 路径(功能细节澄清产出,§8.4 数据源) |
40
68
  | `synthesis_summary` | 综合确认产出(scope 判定与核心决策) |
41
69
 
42
70
  If `template_path` is missing or unreadable, report `FAIL` with reason `INPUT_ERROR`.
71
+ If `plugin_root` is missing, Iron Law 0 **降级为警告**——无法定位规范文件时记入 `missing_info` 并继续撰写,不阻断。
43
72
 
44
73
  ## Structured Output Contract
45
74
 
46
75
  Return the following YAML to the orchestration layer:
47
76
 
48
77
  ```yaml
49
- status: done | blocked # done: PRD 草稿已写入并通过自检
78
+ status: done | blocked | fail
50
79
  artifact_path: requirement/vN/prd.md
51
80
  missing_info: [...] # 保留占位的未澄清信息清单(供 QA-4 / D6 定位)
81
+ blocked_reason: TEMPLATE_MISMATCH # 仅 status=blocked 时;附差异摘要
52
82
  summary: "..." # 2-3 sentence overview + 待主会话确认点
53
83
  ```
54
84
 
55
85
  ## Red Lines
56
86
 
57
87
  **DO:**
58
- - 先读模板 §8.4 检查清单,再逐功能模块按维度详述
59
- - 从 detail_ledger / business-analysis.md 提取已确认信息,保持信息完整(页面布局/搜索字段/表格列/交互规则/级联逻辑等关键细节不得丢失或过度概括)
88
+ - 先读 `prd-84-authoring-spec.md`,再逐功能模块按业务认知顺序撰写
89
+ - 从 detail_ledger / business-analysis.md 提取已确认信息,保持信息完整(关键业务细节不得丢失或过度概括)
60
90
  - 功能描述含糊到"一句话说不清"时,先拆分功能再详述
61
91
  - 结束回复用显式终止标记:`FINAL VERDICT: <DONE | BLOCKED | FAIL>`
62
92
 
63
93
  **DON'T:**
64
- - 不执行交互阶段,不向用户提问(澄清已由主会话完成)
94
+ - 不执行交互阶段,不向用户提问(澄清已由主会话完成)——模板不一致时**回传** `TEMPLATE_MISMATCH`,不自行裁决
65
95
  - 不虚构未确认信息——data source 缺失就保留占位 + 列入 missing_info
66
- - 不写接口/表/类/算法等实现契约(属 change 级 spec/design)
96
+ - 不写接口 / 表 / 类 / 算法等实现契约(属 change 级 spec/design)
67
97
  - 不修改 business-analysis.md / dialogue-log.md / detail_ledger / ledger.md
68
98
  - 不删除模板占位——无信息章节保留 `{占位}`
99
+ - **不把维度清单写进 §8.4 正文**(无列名清单、无 checkbox 列表、无「按…维覆盖,不适用标 NA」式转述)
100
+ - **不写历史痕迹**:删除线、版本锚点(`v0.5ac` / `v0.47`)、「原口径作废」「已被推翻」一律不进正文
101
+ - **不写技术标识符**:类名 / 方法名 / 表名 / 行号不进正文主干
102
+ - **不用弱词**:禁止"较快 / 友好 / 支持 / 适当 / 等 / 尽可能 / 必要时"——模糊表述会被下游自行解释,产生静默缺陷
package/docs/README_en.md CHANGED
@@ -126,7 +126,7 @@ npm install -g team-flow
126
126
 
127
127
  ### Version
128
128
 
129
- - Current: `v0.61.0`
129
+ - Current: `v0.63.0`
130
130
  - v0.9.1 highlights: DP-4 execution-mode recommendations, a portable runtime across 17 platforms, and a raw-package smoke with no plugin-root variable.
131
131
  - Self-contained — no OpenSpec or Superpowers runtime required
132
132
  - Upstream: [Fission-AI/OpenSpec](https://github.com/Fission-AI/OpenSpec), [obra/superpowers](https://github.com/obra/superpowers)
@@ -78,6 +78,26 @@
78
78
  - **预期输出**:用户确认归档并批准 delta spec 合并,或要求调整合并范围后再执行
79
79
  - **关联 skill**:`team-flow:release-archivist`
80
80
 
81
+ ## DP-8: PRD 模板一致性确认(v0.62.0)
82
+
83
+ - **编号**:DP-8
84
+ - **名称**:PRD 模板一致性确认门(对应改造项 G1)
85
+ - **触发条件**:ce-brainstorm Phase 0.0 解析出 `template_path` 之后、Phase 3 派发 prd-writer 之前;
86
+ 判据由 `tf prd check` 给出(共享模块 `scripts/lib/template-hash.mjs`,**不得另写判据**):
87
+ `STATUS: MISMATCH`(三个 hash 任一与 ack 不同)或 `STATUS: NO_ACK`(首次)
88
+ - **所需输入**:实际使用模板 / 插件内置模板 / **规范文件** `prd-84-authoring-spec.md` 三个 hash + 差异摘要
89
+ - **预期输出**:用户三选一——
90
+ **A 按最新模板与规则**(先执行历史文档就地升级,再撰写;`mode: adopt_latest`)、
91
+ **B 保留当前模板继续**(属**偏离接受 waiver**,须落 `dialogue-log.md` 受控记录;`mode: keep_legacy`)、
92
+ **C 先看差异再定**(输出差异摘要后回到 A/B,不写 ack)
93
+ - **关联 skill**:`team-flow:ce-brainstorm`(orchestrated 路径为 workflow-orchestrator S2 步骤 3.5 前)
94
+ - **默认动作**:**挂起** —— jarvis 夜间值守等自动化路径遇此门**一律挂起,不得代答或跳过**
95
+ (与「架构门禁一律挂起」的既定策略一致)
96
+ - **状态字段**:配置 `prd.template_ack`(`in_use_hash` / `plugin_hash` / `spec_hash` / `mode` /
97
+ `diff_digest` / `plugin_version` / `acknowledged_at` / `acknowledged_by`),由 `tf prd ack set` 原子写入
98
+ - **失效规则**:三个 hash 任一变化即失效并重问(上一选择作默认项);
99
+ `STATUS: MATCH` 时静默按 ack.mode 执行,不再提问
100
+
81
101
  ## DP-A: 架构设计确认(v0.29.0 §37)
82
102
 
83
103
  - **编号**:DP-A
@@ -100,6 +120,7 @@
100
120
  | DP-5 | 调试升级 | `team-flow:bug-investigator` | 执行 |
101
121
  | DP-6 | 验证失败 | `team-flow:release-archivist` | 收尾 |
102
122
  | DP-7 | 归档确认 | `team-flow:release-archivist` | 收尾 |
123
+ | DP-8 | PRD 模板一致性确认 | `team-flow:ce-brainstorm` | 需求(Phase 0.0) |
103
124
  | DP-A | 架构设计确认 | `team-flow:workflow-start` | 架构 |
104
125
 
105
126
  ## 确认点合并(v0.22 §88.3.1)
@@ -110,6 +131,14 @@
110
131
  |--------|----------|
111
132
  | DP-0 + DP-A | `arch_design_decision == skipped` |
112
133
  | DP-3 + G4 + DP-4 | 契约已产出且 hash 有效 |
134
+ | **DP-6 + roadmap/push 边界**(v0.63.0 新增) | closing 型变更(须机器门禁全 PASS 才生效) |
113
135
  | DP-7 + 代码落地 + G5 | 恒成立 |
114
136
 
115
137
  `arch_design_decision == required` 时 DP-A 必须独立(用户需单独审架构产物)。
138
+
139
+ **v0.63.0 攒批与预批复纪律**(feedback 20260923-013114 S5):
140
+
141
+ - **同根因攒批(MUST)**:同一根因的多个发现攒成**一次** ask,不逐个往返。
142
+ - **批量预批复单**:closing 型变更可一次性列出全部待确认项 + 建议取值 + 理由,由用户一次批复。
143
+ - **⛔ 防伪绿护栏**:**门禁类 DP(`dp_3` / `dp_4`)禁止超时代答**(二者是 `dp-gate-passed` 的门禁数据源,`checks/dp-gate-passed.mjs` 仅映射这两个);**预批复只作用于非门禁确认**;DP-6 预批复为**条件式**。
144
+ - **Rewind 作废**:Rewind 后已发出的预批复自动作废,须重新征询。
@@ -1,6 +1,6 @@
1
1
  # team-flow 使用说明(研发团队版)
2
2
 
3
- > 版本锚点:v0.61.0(28 skills + 17 agents)· 更新日期:2026-09-21
3
+ > 版本锚点:v0.63.0(28 skills + 17 agents)· 更新日期:2026-09-21
4
4
  > 读者:使用 team-flow 做日常研发的工程师。不需要你懂插件内部实现,只需要照着路径走。
5
5
  > 配套文档:安装细节见 [INSTALL.md](../INSTALL.md);状态机细节见 [state-machine.md](state-machine.md);决策点细节见 [decision-points.md](decision-points.md);平台差异见 [platform-matrix.md](platform-matrix.md)。
6
6
 
@@ -232,15 +232,15 @@ workflow-start 在初始化时自动推断(`tf runtime infer`),你也可
232
232
  tf runtime guard check <change-dir> <from-state> <to-state> [--workflow full|hotfix|tweak]
233
233
  ```
234
234
 
235
- **full 模式的完整转换矩阵**(19 个维度 + 1 个 workflow 限制维度):
235
+ **full 模式的完整转换矩阵**(20 个维度 + 1 个 workflow 限制维度):
236
236
 
237
237
  | 转换 | 维度 |
238
238
  |------|------|
239
239
  | exploring→specifying | arch-design、arch-readiness |
240
240
  | specifying→bridging | artifacts-exist、schema-valid |
241
- | bridging→approved-for-build | artifacts-exist、schema-valid、contract-fresh、dp-gate-passed、dp3-approved |
241
+ | bridging→approved-for-build | artifacts-exist、schema-valid、contract-fresh、dp-gate-passed、dp3-approved、**gates-probed**(v0.63.0) |
242
242
  | approved-for-build→executing | artifacts-exist、contract-fresh、dp-gate-passed、execution-plan-ready、test-matrix-ready |
243
- | **executing→closing** | **10 维**:tasks-complete、tests-passing、specs-merged、execution-plan-ready、execution-reviews-passed、compound-captured、test-matrix-complete、arch-snapshot、delegation-status、arch-merged |
243
+ | **executing→closing** | **11 维**:**contract-fresh(v0.63.0)**、tasks-complete、tests-passing、specs-merged、execution-plan-ready、execution-reviews-passed、compound-captured、test-matrix-complete、arch-snapshot、delegation-status、arch-merged |
244
244
  | executing↔debugging | debugging 入口无门禁;回 executing 挂 contract-fresh、execution-plan-ready |
245
245
  | exploring→bridging / exploring→approved-for-build | 0 维,但**一一对应**:`exploring→bridging` 仅 hotfix 可走、`exploring→approved-for-build` 仅 tweak 可走;full 走或其他组合都直接 FAIL |
246
246
  | 7 条回退 + 6 条放弃 | 0 维(回退是合法操作,不需要门禁放行) |
@@ -335,7 +335,7 @@ closing 阶段 release-archivist 会按**固定顺序**执行回写链(v0.53.0
335
335
  | 阶段 | 发生什么 | 你要做什么 |
336
336
  |------|---------|-----------|
337
337
  | S1 路径路由 | 读 registry.yaml,判断入口路径(全新/续版/重新计划…),确认项目模式(single/monorepo/multi-repo,写 `repo_layout`),注入基线 + 复利经验 | 确认路由与项目模式(路由是建议,你可以改) |
338
- | S2 PRD+原型 | ce-brainstorm 产出 `requirement/vN/prd.md` 草稿 → PRD 完整性自动评审(含 §8.4 契约级细节维度)→ 原型循环(产出→自动评审≤3轮) | 回答澄清问题;审 PRD;审原型(美观/体验只有你能判);确认后冻结 |
338
+ | S2 PRD+原型 | ce-brainstorm 产出 `requirement/vN/prd.md` 草稿 → **模板一致性确认门 DP-8**(不一致时先确认)→ PRD 完整性自动评审(含 §8.4 信息齐备性 + 业务可读形态核验)→ 原型循环(产出→自动评审≤3轮) | 回答澄清问题;**模板不一致时确认**;审 PRD;审原型(美观/体验只有你能判);确认后冻结 |
339
339
  | **ARCH 产品级架构** | architecture-design product 模式 8 步设计,产出 `docs/architecture/iterations/vN/architecture.md` 快照,产品级评审门 PASS 才放行 | 审架构(skip 也要物化 SKIPPED 标记) |
340
340
  | **Pre-check 服务初始化检测** | 从架构快照的注册表提取本次涉及的服务,检查服务子目录与技术栈特征是否就绪 | 缺服务 → 按引导跑 project-initialize;已存在但没拉取 → git pull |
341
341
  | S3 计划 | ce-plan 产出 `requirement/vN/plan.md`:change 拆分 + 依赖 DAG + 技术方向(**基于 ARCH 定稿**) | 审计划;发现 PRD 问题会回退 S2 |
@@ -566,7 +566,7 @@ tf install-cursor | install-workbuddy | install-cline | install-kiro | install-w
566
566
  ├── requirement/vN/ # 产品级需求制品(vN = PRD 迭代版本)
567
567
  │ ├── prd.md # PRD(frontmatter 冻结态是单一真相源)
568
568
  │ ├── plan.md # 实施计划(change 拆分+DAG+技术方向,无接口清单)
569
- │ ├── detail-ledger.md # 功能细节澄清台账(§8.4 契约级,v0.47.0)
569
+ │ ├── detail-ledger.md # 维度清单载体 + 完整性台账 + D6 核对基准(v0.62.0)
570
570
  │ ├── business-analysis.md # 业务场景/流程分析
571
571
  │ ├── dialogue-log.md # 澄清过程记录
572
572
  │ ├── prd-completeness-review.md # PRD 完整性自动评审报告
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "team-flow",
3
3
  "description": "Unified workflow plugin: team-flow (spec-driven dev) + compound-engineering core subset + architecture-design (4A/DDD) + prototype (local HTML) + business-analysis (independent requirement/scenario artifact) + jarvis (team-flow decision agent, opt-in). 28 skills, one install.",
4
- "version": "0.61.0",
4
+ "version": "0.63.0",
5
5
  "contextFileName": "GEMINI.md"
6
6
  }
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env bash
2
- # v0.61.0: auto-sync CLI version with plugin version
2
+ # v0.63.0: auto-sync CLI version with plugin version
3
3
  set -e
4
4
 
5
5
  # ═══════════════════════════════════════════════════════════════
6
6
  # Plugin version (update this when releasing new versions)
7
7
  # ═══════════════════════════════════════════════════════════════
8
- PLUGIN_VERSION="0.61.0"
8
+ PLUGIN_VERSION="0.63.0"
9
9
 
10
10
  # ═══════════════════════════════════════════════════════════════
11
11
  # Step 1: Auto-sync CLI version with plugin version
package/llms.txt CHANGED
@@ -3,7 +3,7 @@
3
3
  ## Overview
4
4
  spec-superflow is a self-contained workflow integration plugin for Claude Code, Cursor, OpenAI Codex CLI/App, GitHub Copilot CLI, Gemini CLI, OpenCode, WorkBuddy, and Trae. It merges spec-driven planning artifacts (proposal, specs, design, tasks) with disciplined execution guardrails (TDD, review gates, controlled handoff) into one unified workflow.
5
5
 
6
- Current version: v0.61.0.
6
+ Current version: v0.63.0.
7
7
 
8
8
  ## Key Documents
9
9
  - README.md: Chinese homepage with full usage guide and FAQ
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xulthekl/team-flow",
3
- "version": "0.61.0",
3
+ "version": "0.63.0",
4
4
  "description": "Unified plugin (28 skills + 17 agents) integrating team-flow, compound-engineering, architecture-design, prototype, design-system, workflow-orchestrator, workflow-bootstrap, e2e, session-handoff, workflow-feedback, business-analysis for multi-agent coding tools.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",