@xulthekl/team-flow 0.31.0 → 0.32.1

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 (88) hide show
  1. package/.claude/always/phase-guard.md +1 -1
  2. package/.claude-plugin/marketplace.json +3 -3
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +2 -2
  5. package/.cursor-plugin/marketplace.json +2 -2
  6. package/.cursor-plugin/plugin.json +2 -2
  7. package/.github/plugin/marketplace.json +2 -2
  8. package/AGENTS.md +3 -3
  9. package/CHANGELOG.md +47 -0
  10. package/GEMINI.md +1 -1
  11. package/HANDOFF.md +1 -1
  12. package/INSTALL.md +1 -1
  13. package/README.md +2 -2
  14. package/agents/contract-builder.md +6 -1
  15. package/docs/README_en.md +1 -1
  16. package/docs/solutions/INDEX.md +2 -0
  17. package/docs/solutions/cross-phase/2026-08-01-no-summary.md +17 -0
  18. package/docs/solutions/cross-phase/2026-08-03-no-summary.md +17 -0
  19. package/gemini-extension.json +2 -2
  20. package/hooks/session-start +2 -2
  21. package/llms.txt +1 -1
  22. package/package.json +6 -2
  23. package/plugin.json +1 -1
  24. package/scripts/guard/checks/test-gate-exemptions.mjs +53 -0
  25. package/scripts/guard/checks/test-matrix-complete.mjs +54 -30
  26. package/scripts/guard/checks/test-matrix-ready.mjs +60 -0
  27. package/scripts/guard/checks/tests-passing.mjs +112 -24
  28. package/scripts/guard/guard.mjs +5 -1
  29. package/scripts/lib/cmd-doctor.mjs +43 -1
  30. package/scripts/lib/cmd-execution.mjs +24 -1
  31. package/scripts/lib/cmd-state.mjs +28 -5
  32. package/scripts/lib/cmd-validate.mjs +42 -0
  33. package/scripts/lib/execution-plan.mjs +23 -0
  34. package/scripts/lib/state-loader.mjs +16 -2
  35. package/scripts/lib/test-record.mjs +212 -0
  36. package/scripts/team-flow.mjs +3 -0
  37. package/skills/contract-builder/SKILL.md +9 -10
  38. package/skills/release-archivist/SKILL.md +16 -9
  39. package/skills/session-handoff/SKILL.md +1 -0
  40. package/skills/workflow-start/SKILL.md +5 -3
  41. package/skills/workflow-start/references/routing-rules.md +10 -6
  42. package/tests/e2e.test.mjs +0 -266
  43. package/tests/lib/cmd-audit.test.mjs +0 -202
  44. package/tests/lib/cmd-checkpoint.test.mjs +0 -98
  45. package/tests/lib/cmd-config.test.mjs +0 -101
  46. package/tests/lib/cmd-doctor.test.mjs +0 -450
  47. package/tests/lib/cmd-execution.test.mjs +0 -647
  48. package/tests/lib/cmd-handoff.test.mjs +0 -137
  49. package/tests/lib/cmd-inject.test.mjs +0 -218
  50. package/tests/lib/cmd-install-workbuddy.test.mjs +0 -113
  51. package/tests/lib/cmd-install-zcode.test.mjs +0 -42
  52. package/tests/lib/cmd-isolate.test.mjs +0 -68
  53. package/tests/lib/cmd-list.test.mjs +0 -127
  54. package/tests/lib/cmd-runtime.test.mjs +0 -83
  55. package/tests/lib/cmd-state-missing.test.mjs +0 -65
  56. package/tests/lib/cmd-state.test.mjs +0 -365
  57. package/tests/lib/cmd-sync-paths.test.mjs +0 -84
  58. package/tests/lib/cmd-validate-paths.test.mjs +0 -90
  59. package/tests/lib/config-loader.test.mjs +0 -175
  60. package/tests/lib/ensure-branch.test.mjs +0 -110
  61. package/tests/lib/execution-control-plane.test.mjs +0 -168
  62. package/tests/lib/execution-plan.test.mjs +0 -474
  63. package/tests/lib/guard-compound-captured.test.mjs +0 -92
  64. package/tests/lib/guard-specs-merged.test.mjs +0 -110
  65. package/tests/lib/guard-tests-passing.test.mjs +0 -114
  66. package/tests/lib/guard-transitions.test.mjs +0 -262
  67. package/tests/lib/guard.test.mjs +0 -613
  68. package/tests/lib/hash.test.mjs +0 -138
  69. package/tests/lib/infer-workflow.test.mjs +0 -161
  70. package/tests/lib/install-git-hooks.test.mjs +0 -20
  71. package/tests/lib/marketplace-release-docs.test.mjs +0 -31
  72. package/tests/lib/minimality-discipline.test.mjs +0 -37
  73. package/tests/lib/model-profiles-docs.test.mjs +0 -33
  74. package/tests/lib/node20-compatibility.test.mjs +0 -73
  75. package/tests/lib/node20-test-entry.test.mjs +0 -17
  76. package/tests/lib/platform-runtime-distribution.test.mjs +0 -157
  77. package/tests/lib/raw-mode-smoke.test.mjs +0 -42
  78. package/tests/lib/sdd-overlay.test.mjs +0 -118
  79. package/tests/lib/solutions-capture.test.mjs +0 -108
  80. package/tests/lib/solutions-index-gen.test.mjs +0 -147
  81. package/tests/lib/solutions-inject.test.mjs +0 -115
  82. package/tests/lib/solutions-promote.test.mjs +0 -200
  83. package/tests/lib/spec-paths.test.mjs +0 -80
  84. package/tests/lib/state-loader.test.mjs +0 -251
  85. package/tests/lib/token-baseline.test.mjs +0 -72
  86. package/tests/lib/token-rules.test.mjs +0 -94
  87. package/tests/lib/verify-marketplace-release.test.mjs +0 -128
  88. package/tests/tsconfig.json +0 -12
@@ -1,3 +1,3 @@
1
- # team-flow v0.31.0 | 阶段: {{state}} | 工作流: {{workflow}}
1
+ # team-flow v0.32.1 | 阶段: {{state}} | 工作流: {{workflow}}
2
2
  当前阶段允许的操作由 workflow-start 路由规则定义。
3
3
  禁止跨越 DP gate 进入下一阶段。变更范围以 execution-contract.md 的 Intent Lock 为准。
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "team-flow",
3
- "description": "Unified workflow plugin: team-flow + compound-engineering core subset + architecture-design + prototype + workflow-orchestrator + workflow-bootstrap + e2e + session-handoff + workflow-feedback. 23 skills + 15 agents, one install.",
3
+ "description": "Unified workflow plugin: team-flow + compound-engineering core subset + architecture-design + prototype + workflow-orchestrator + workflow-bootstrap + e2e + session-handoff + workflow-feedback. 24 skills + 15 agents, one install.",
4
4
  "owner": {
5
5
  "name": "LT",
6
6
  "url": "https://github.com/LT"
@@ -8,8 +8,8 @@
8
8
  "plugins": [
9
9
  {
10
10
  "name": "team-flow",
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. 23 skills + 15 agents with embedded TDD, SDD, code review, debugging, delta spec sync, and design-system-driven prototyping.",
12
- "version": "0.31.0",
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. 24 skills + 15 agents with embedded TDD, SDD, code review, debugging, delta spec sync, and design-system-driven prototyping.",
12
+ "version": "0.32.1",
13
13
  "source": "./",
14
14
  "author": {
15
15
  "name": "LT",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "team-flow",
3
- "version": "0.31.0",
3
+ "version": "0.32.1",
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). 24 skills + 15 agents, one install.",
5
5
  "source": "./",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "team-flow",
3
- "version": "0.31.0",
3
+ "version": "0.32.1",
4
4
  "description": "Spec-first workflow that bridges OpenSpec-style planning and Superpowers-style execution discipline.",
5
5
  "author": {
6
6
  "name": "MageByte",
@@ -26,7 +26,7 @@
26
26
  "interface": {
27
27
  "displayName": "team-flow",
28
28
  "shortDescription": "Spec-first workflow with guarded execution.",
29
- "longDescription": "A self-contained Codex workflow plugin with nine skills for intent exploration, planning artifacts, execution contracts, TDD execution, review gates, systematic debugging, closure, and delta spec sync.",
29
+ "longDescription": "A self-contained Codex workflow plugin with 24 skills for intent exploration, planning artifacts, execution contracts, TDD execution, review gates, systematic debugging, closure, and delta spec sync.",
30
30
  "developerName": "MageByte",
31
31
  "category": "Developer Tools",
32
32
  "composerIcon": "./assets/icon.svg",
@@ -5,13 +5,13 @@
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.31.0"
8
+ "version": "0.32.1"
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "team-flow",
13
13
  "source": ".",
14
- "description": "Unified workflow plugin: team-flow + compound-engineering core subset + architecture-design + prototype. 17 collaborative skills."
14
+ "description": "Unified workflow plugin: team-flow + compound-engineering core subset + architecture-design + prototype. 24 skills + 15 agents."
15
15
  }
16
16
  ]
17
17
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "team-flow",
3
3
  "displayName": "team-flow",
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). 23 skills + 15 agents, one install.",
5
- "version": "0.31.0",
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). 24 skills + 15 agents, one install.",
5
+ "version": "0.32.1",
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.31.0"
9
+ "version": "0.32.1"
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, and local HTML prototyping.",
15
- "version": "0.31.0",
15
+ "version": "0.32.1",
16
16
  "source": ".",
17
17
  "author": {
18
18
  "name": "LT",
package/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGENTS.md · team-flow
2
2
 
3
- > team-flow 统一插件 = **team-flow**(spec 驱动开发)+ **compound-engineering 核心子集**(全局复利)+ **architecture-design**(4A+DDD 增量设计)+ **prototype**(本地 HTML 原型)+ **e2e**(AC 驱动 Playwright E2E)+ **workflow-orchestrator**(产品级编排)+ **workflow-bootstrap**(既有项目接入)。一次安装,七套能力协同(23 skills + 15 agents),支持 9 安装面(Claude Code, Cursor, OpenAI Codex CLI/App, GitHub Copilot CLI, Gemini CLI, OpenCode, WorkBuddy, Trae, ima-copilot)。
3
+ > team-flow 统一插件 = **team-flow**(spec 驱动开发)+ **compound-engineering 核心子集**(全局复利)+ **architecture-design**(4A+DDD 增量设计)+ **prototype**(本地 HTML 原型)+ **e2e**(AC 驱动 Playwright E2E)+ **workflow-orchestrator**(产品级编排)+ **workflow-bootstrap**(既有项目接入)。一次安装,七套能力协同(24 skills + 15 agents),支持 9 安装面(Claude Code, Cursor, OpenAI Codex CLI/App, GitHub Copilot CLI, Gemini CLI, OpenCode, WorkBuddy, Trae, ima-copilot)。
4
4
 
5
5
  ## What This Is
6
6
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  ### 身份与依赖关系
14
14
 
15
- - **team-flow**(本插件):Claude Code / Cursor 等宿主的插件实体(`plugin.json` name = `team-flow`),包含 23 个 skills + 15 个 agents + hooks + templates
15
+ - **team-flow**(本插件):Claude Code / Cursor 等宿主的插件实体(`plugin.json` name = `team-flow`),包含 24 个 skills + 15 个 agents + hooks + templates
16
16
  - **@xulthekl/team-flow**(npm 底座包):team-flow 的 CLI 工具层(`package.json` name = `@xulthekl/team-flow`,bin = `tf` / `team-flow`),提供状态机、校验、复利 CLI 等运行时能力
17
17
  - 关系:team-flow 插件 **包含** @xulthekl/team-flow npm 包作为底座(同一仓库、同一版本)。skills 中的 `tf ...` 调用的是已全局安装的 @xulthekl/team-flow CLI,版本由 session-start hook 自动同步
18
18
  - 历史身份(已废弃):`spec-superflow`(npm 包名,0.11.0 后停止发布)/ `ssf`(CLI 前缀)/ `.spec-superflow.yaml`(状态文件)—— 详见设计增强方案 v0.9 §27
@@ -33,7 +33,7 @@ node --test tests/e2e.test.mjs --test-name-pattern="parseDeltaSpec"
33
33
  npm run validate
34
34
  ```
35
35
 
36
- ## 能力概览(九套合一,23 skills)
36
+ ## 能力概览(九套合一,24 skills)
37
37
 
38
38
  ### 1. team-flow(底座,9 skills)
39
39
  spec 驱动开发过程。8 态变更机:`exploring → specifying → bridging → approved-for-build → executing → closing`(另有 `debugging` 侧路径 + `abandoned` 终态)。
package/CHANGELOG.md CHANGED
@@ -6,6 +6,53 @@ The format loosely follows Keep a Changelog.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.32.1] - 2026-08-03
10
+
11
+ > 版本号说明:0.32.0 因 `.npmignore` 缺失 `/tests/` 排除项,误将 61.8M e2e 基线归档打入 tarball(72MB),发布后 30 分钟内撤回;npm 版本号一经发布不可复用,故以 **0.32.1** 重发(内容完全一致 + 打包修复)。
12
+
13
+ ### Added(设计增强方案 v0.13 §47-§53 测试门禁硬化——C1-domain-policy 事件修复)
14
+
15
+ #### 豁免键修正(v0.13 §48)
16
+ - **scripts/lib/state-loader.mjs**:BUILTIN_DEFAULTS 新增 `test_matrix_skip_reason` / `test_evidence_path`;`schema_version` 不进 defaults(字段缺失 = 存量信号);writeState 条件序列化 `schema_version`
17
+ - **scripts/lib/cmd-state.mjs**:init 分支仅在 change 创建(状态文件尚不存在)时打戳 `schema_version: 1`(rebuild/set 不追加);SETTABLE_FIELDS 移除 `test_result`、新增 `test_matrix_skip_reason`;`test_result`/`schema_version` 手工 set 被拒并给引导
18
+ - **scripts/guard/checks/test-gate-exemptions.mjs**:新建共享豁免判定模块(legacy/skip 语义唯一真相源,防三个测试门禁漂移)
19
+ - **scripts/guard/checks/test-matrix-complete.mjs**:重写——legacy/skip 双豁免;删除内容型豁免(contract 无 `## Test Matrix` 段即 PASS)与"无 contract → PASS";删除 hash null 短路;skip 必附理由
20
+
21
+ #### 门禁前移(v0.13 §49)
22
+ - **scripts/guard/checks/test-matrix-ready.mjs**:新建入口维度(矩阵存在非空 + contract 声明段 OR 显式 skip 附理由;legacy 豁免)
23
+ - **scripts/guard/guard.mjs**:full `approved-for-build:executing` 新增 `test-matrix-ready`(hotfix/tweak 沿用 §45.3 豁免不挂)
24
+
25
+ #### tests-passing 证据程序化(v0.13 §50,BUG-A 政策修正)
26
+ - **scripts/lib/test-record.mjs**:新建 `tf test record` 命令——maven-surefire(控制台汇总行 + XML 报告目录)/jest(--json)/pytest 解析器 + auto 识别;结构化 `test_result`(recorded-by=tf-test-record)+ 证据落盘 `.superpowers/test-evidence/`;fail 结果 exit 1;无手工自述通道
27
+ - **scripts/guard/checks/tests-passing.mjs**:重写——非存量 change 只认程序化结构化记录 + 证据文件存在性;dp_6_result 去证据化(BUG-A 通道仅存量保留);total=0 空真拒绝;skip 必附理由
28
+ - **scripts/team-flow.mjs**:注册 `test` 命令 + HELP
29
+
30
+ #### review 硬化 + 巡检扩展(v0.13 §51-§52)
31
+ - **scripts/lib/execution-plan.mjs**:validateReviewRange 禁止 base==head(空 diff review 非法,C1 现场 6 个 receipt 全为空 diff);receipt 新增可选 `tests` 统计字段(非负整数校验)
32
+ - **scripts/lib/cmd-execution.mjs**:review 新增 `--tests-total/--tests-passed/--tests-failed`(须同时提供)
33
+ - **scripts/lib/cmd-doctor.mjs**:新增 checkChangeTestGates 巡检(skip_reason 配对 + arch_review_report/test_evidence_path 引用完整性)
34
+ - **scripts/lib/cmd-validate.mjs**:test-matrix 双向互锁(契约段↔矩阵文件,非存量非 skip 时 ERROR)+ hash 漂移警告
35
+
36
+ ### Changed(SOP 硬化批次,v0.13 §52)
37
+ - **agents/contract-builder.md**:skills 补 test-strategy 预加载(修复矩阵生成者的预加载断点)+ test-matrix.md 所有权声明
38
+ - **skills/contract-builder/SKILL.md**:Test Matrix Generation 升 MUST(full workflow)+ skip 必附理由
39
+ - **skills/release-archivist/SKILL.md**:Step 1 零测试条款(0 tests ≠ PASS)+ tf test record 程序化记录;Step 2b 矩阵缺失对非存量 change FAIL(删除静默 SKIP);dp_6 去证据化说明
40
+ - **skills/workflow-start/SKILL.md**:build-executor 返回验证补测试文件检查(SDD/full);contract-builder 路由声明矩阵必产;入口门禁前移引导
41
+ - **skills/workflow-start/references/routing-rules.md**:Route to glaf4-tests 归位(触发主体 = contract-builder;可选的是工具选择,矩阵生成本身强制)
42
+ - **skills/session-handoff/SKILL.md**:Guardrail #6 报告生成纪律(LLM 重构报告必须现场核对,C1 报告 10+ 处失真教训)
43
+
44
+ ### Fixed(P3 审查横展修复)
45
+ - **skills/workflow-start/SKILL.md**:路由优先级块修正 v0.30.0 引入的存量矛盾——删除"hotfix/tweak 架构设计可跳过(自动写 skipped)"例外句(与 Fast-Path 5 处"不豁免"条款及 v0.9 §26 冲突,且无对应代码行为);skill-reviewer F-1
46
+ - **skills/release-archivist/SKILL.md** + **skills/contract-builder/SKILL.md**:Lightweight Closure / Hotfix Mode 补非存量 change tests-passing 门禁指引(skip+reason 或 tf test record),修复轻量收尾必然撞门禁的断点;skill-reviewer W-0
47
+ - **agents/contract-builder.md**:DON'T 列表终态标记条款反向措辞修正;skill-reviewer W-2
48
+ - **计数同步**:12 处 manifest/文档的 skill 计数修正为 24 skills(v0.31.0 新增 test-strategy 时漏更的遗留债);plugin-validator
49
+
50
+ ### Tests
51
+ - tests/lib/schema-version.test.mjs(打戳语义 5 例)、test-record.test.mjs(解析器 9 例 + CLI 6 例)、review-hardening.test.mjs(base==head 拒绝 + 统计字段 4 例)
52
+ - tests/e2e/deterministic/guard-dimensions.test.mjs:test-matrix-complete 重写为 v0.13 六步判定(9 例)+ test-matrix-ready 新 describe(6 例)+ tests-passing 程序化/skip/负向用例
53
+ - tests/lib/cmd-state.test.mjs:test_result/schema_version 拒设用例 + skip_reason 可设用例;tests/lib/guard.test.mjs:closing 前置夹具适配(legacy 夹具直写 yaml 模拟旧 CLI)
54
+ - 全量回归:lib 486/486 + Tier1 e2e 67/67
55
+
9
56
  ## [0.31.0] - 2026-08-01
10
57
 
11
58
  ### Added(设计增强方案 v0.12 §40-§46 测试矩阵驱动开发 + 测试复利闭环)
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.31.0 | 阶段: {{state}} | 工作流: {{workflow}}
11
+ # team-flow v0.32.1 | 阶段: {{state}} | 工作流: {{workflow}}
12
12
  当前阶段允许的操作由 workflow-start 路由规则定义。
13
13
  禁止跨越 DP gate 进入下一阶段。变更范围以 execution-contract.md 的 Intent Lock 为准。
14
14
  <!-- team-flow-phase-guard-end -->
package/HANDOFF.md CHANGED
@@ -23,7 +23,7 @@
23
23
  | **e2e**(端到端测试) | 整个 skill | 1 |
24
24
  | **session-handoff**(session 交接) | 整个 skill | 1 |
25
25
  | **workflow-feedback**(反馈闭环) | 整个 skill | 1 |
26
- | **合计** | | **23 skills + 15 agents** |
26
+ | **合计** | | **24 skills + 15 agents** |
27
27
 
28
28
  - 零运行时外部依赖(team-flow 底座自包含)。
29
29
  - prototype 额外**零外部依赖、可离线**(自包含 HTML + 页面内 Tweaks 控件,无 CDN)。
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.31.0**。
10
+ 当前发布版本:**v0.32.1**。
11
11
 
12
12
  ---
13
13
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # team-flow
2
2
 
3
- > 当前版本:`v0.31.0`
3
+ > 当前版本:`v0.32.1`
4
4
 
5
5
  > 统一插件:**team-flow**(spec 驱动开发)+ **compound-engineering 核心子集**(全局复利)+ **architecture-design**(4A+DDD 增量设计)+ **prototype**(本地 HTML 原型)+ **e2e**(AC 驱动 E2E)+ **workflow-orchestrator**(产品级编排)+ **workflow-bootstrap**(既有项目接入)。一次安装,七套能力协同。
6
6
 
@@ -34,7 +34,7 @@
34
34
  git clone <your-repo> && <cli> plugin install ./team-flow
35
35
  ```
36
36
 
37
- > 不同宿主 CLI 的安装子命令略有差异(如 Claude Code 为 `/plugin add`,Cursor 为 `plugin install`)。以宿主文档为准;本插件提供单一 `plugin.json`,一次安装即加载全部 23 个 skills。
37
+ > 不同宿主 CLI 的安装子命令略有差异(如 Claude Code 为 `/plugin add`,Cursor 为 `plugin install`)。以宿主文档为准;本插件提供单一 `plugin.json`,一次安装即加载全部 24 个 skills。
38
38
 
39
39
  ## 配置(插件层扩展字段)
40
40
 
@@ -28,6 +28,9 @@ color: magenta
28
28
  tools: ["Read", "Bash", "Grep", "Glob", "Write", "Edit"]
29
29
  skills:
30
30
  - contract-builder
31
+ # v0.13 §52 B1:test-matrix.md 由本 agent 生成,需预加载测试设计方法论
32
+ #(design_method 选择/复杂度分级/对抗验证),修复 v0.31.0 的预加载断点。
33
+ - test-strategy
31
34
  ---
32
35
 
33
36
  You are an independent Contract Builder. You compress approved planning artifacts into a single execution handshake: `execution-contract.md`. You operate in an independent context with Write capability for the contract file only.
@@ -36,6 +39,8 @@ You are an independent Contract Builder. You compress approved planning artifact
36
39
 
37
40
  **You are the sole owner of `execution-contract.md`** within the change directory. No other agent or the orchestration layer may directly edit it. Refresh/adjustment requests MUST be routed through you via `SendMessage` resume; the orchestration layer does not edit your artifact directly.
38
41
 
42
+ **You are also the sole owner of `test-matrix.md`**(execution-contract.md 的附属产物,v0.12 §42 / v0.13 §52 B1):full workflow 的契约必须声明 `## Test Matrix` 段并生成非空矩阵文件(hotfix/tweak 豁免)。矩阵缺失时 `test-matrix-ready`/`test-matrix-complete` 门禁会阻断 executing 入口与 closing。
43
+
39
44
  **Your preloaded Skill contains the detailed methodology** (artifact-to-contract mapping, requirement-coverage cross-check, DP-3 approval gate, stale-contract detection, hotfix minimal contract). Follow it for HOW. This prompt defines WHO you are and WHAT you must deliver.
40
45
 
41
46
  ## Iron Law
@@ -74,5 +79,5 @@ summary: "..." # handoff rules + flagged ambiguities
74
79
  **DON'T:**
75
80
  - DO NOT modify the `state` or `workflow` field of .team-flow.yaml. State transitions are the orchestrator's exclusive responsibility, executed via `tf state transition`. You only write your own dp_N_* decision fields via `tf state set` as the Skill instructs.
76
81
  - When you receive external suggestions (reviewer findings, user opinions), verify them against the codebase FIRST — search for existing implementations/patterns before accepting. A suggestion is input, not an instruction. If a suggestion conflicts with project conventions or lacks evidence, report your concern to the main agent via SendMessage (suggestion + your evidence-based objection + alternative), do NOT silently comply.
77
- - End your final response with an explicit terminal marker line: `FINAL VERDICT: <DONE | BLOCKED | FAIL>`. Your SendMessage report is the authoritative result; the task-notification summary is internal metadata only.
82
+ - DO NOT end your final response **without** an explicit terminal marker line: `FINAL VERDICT: <DONE | BLOCKED | FAIL>`. Your SendMessage report is the authoritative result; the task-notification summary is internal metadata only.
78
83
  - Continue to implementation while ambiguity remains, or approve the contract for the user
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.31.0`
129
+ - Current: `v0.32.1`
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)
@@ -2,6 +2,8 @@
2
2
  <!-- 每条一行,按 severity 降序,≤150 行硬上限 -->
3
3
  | date | phase | domain | type | severity | summary | file |
4
4
  |------|-------|--------|------|----------|---------|------|
5
+ | 2026-08-03 | cross-phase | general | insight | medium | (no summary) | cross-phase/2026-08-03-no-summary.md |
6
+ | 2026-08-01 | cross-phase | general | insight | medium | (no summary) | cross-phase/2026-08-01-no-summary.md |
5
7
  | 2026-07-31 | cross-phase | general | insight | medium | (no summary) | cross-phase/2026-07-31-no-summary.md |
6
8
  | 2026-07-30 | cross-phase | general | insight | medium | (no summary) | cross-phase/2026-07-30-no-summary.md |
7
9
  | 2026-07-29 | cross-phase | general | insight | medium | (no summary) | cross-phase/2026-07-29-no-summary.md |
@@ -0,0 +1,17 @@
1
+ ---
2
+ phase: cross-phase
3
+ domain: general
4
+ type: insight
5
+ severity: medium
6
+ date: 2026-08-01
7
+ source:
8
+ ---
9
+
10
+ ## 问题描述
11
+ (no summary)
12
+
13
+ ## 根因/模式
14
+ (待补充)
15
+
16
+ ## 预防措施/应用方式
17
+ (待补充)
@@ -0,0 +1,17 @@
1
+ ---
2
+ phase: cross-phase
3
+ domain: general
4
+ type: insight
5
+ severity: medium
6
+ date: 2026-08-03
7
+ source:
8
+ ---
9
+
10
+ ## 问题描述
11
+ (no summary)
12
+
13
+ ## 根因/模式
14
+ (待补充)
15
+
16
+ ## 预防措施/应用方式
17
+ (待补充)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "team-flow",
3
- "description": "Unified workflow plugin: team-flow (spec-driven dev) + compound-engineering core subset + architecture-design (4A/DDD) + prototype (local HTML). 17 skills, one install.",
4
- "version": "0.31.0",
3
+ "description": "Unified workflow plugin: team-flow (spec-driven dev) + compound-engineering core subset + architecture-design (4A/DDD) + prototype (local HTML). 24 skills, one install.",
4
+ "version": "0.32.1",
5
5
  "contextFileName": "GEMINI.md"
6
6
  }
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env bash
2
- # v0.31.0: auto-sync CLI version with plugin version
2
+ # v0.32.1: 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.31.0"
8
+ PLUGIN_VERSION="0.32.1"
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.31.0.
6
+ Current version: v0.32.1.
7
7
 
8
8
  ## Key Documents
9
9
  - README.md: Chinese homepage with full usage guide and FAQ
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xulthekl/team-flow",
3
- "version": "0.31.0",
4
- "description": "Unified plugin (23 skills + 15 agents) integrating team-flow, compound-engineering, architecture-design, prototype, design-system, workflow-orchestrator, workflow-bootstrap, e2e, session-handoff, workflow-feedback for multi-agent coding tools.",
3
+ "version": "0.32.1",
4
+ "description": "Unified plugin (24 skills + 15 agents) integrating team-flow, compound-engineering, architecture-design, prototype, design-system, workflow-orchestrator, workflow-bootstrap, e2e, session-handoff, workflow-feedback for multi-agent coding tools.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "bin": {
@@ -13,6 +13,10 @@
13
13
  "build": "tsc",
14
14
  "test": "node --test tests/e2e.test.mjs tests/lib/*.test.mjs",
15
15
  "test:raw-mode": "node --test tests/lib/raw-mode-smoke.test.mjs",
16
+ "test:e2e": "node --test tests/e2e/deterministic/*.test.mjs",
17
+ "test:e2e:baseline": "node tests/e2e/scripts/make-baseline.mjs",
18
+ "test:e2e:plugin-sync": "node tests/e2e/scripts/plugin-sync.mjs",
19
+ "test:e2e:llm": "TF_E2E_LLM=1 node --test --test-concurrency=1 tests/e2e/workflow/*.test.mjs",
16
20
  "validate": "node scripts/validate-artifacts",
17
21
  "version": "node scripts/team-flow.mjs version $npm_new_version && node scripts/check-version-consistency.mjs && git add -A",
18
22
  "check-versions": "node scripts/check-version-consistency.mjs",
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "team-flow",
3
- "version": "0.31.0",
3
+ "version": "0.32.1",
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). 24 skills + 15 agents, one install.",
5
5
  "author": {
6
6
  "name": "LT"
@@ -0,0 +1,53 @@
1
+ // scripts/guard/checks/test-gate-exemptions.mjs — shared exemption logic for v0.13 test gates
2
+ //
3
+ // v0.13 §48/§49(设计增强方案 v0.13,C1-domain-policy 事件修复):
4
+ // test-matrix-complete / test-matrix-ready / tests-passing 三个测试门禁共享同一套
5
+ // legacy/skip 豁免语义,抽取到本模块作为唯一真相源,防止三处判定漂移。
6
+ //
7
+ // 豁免键修正背景(RC-1):v0.12 §45.3 的"存量兼容"豁免以 contract 内容为键
8
+ //(无 '## Test Matrix' 段即放行),无法区分"真存量"与"新 change 漏生成矩阵",
9
+ // 导致 v0.31.0 发布当天 C1-domain-policy 零测试通过全部门禁。v0.13 将豁免键改为
10
+ // state 初始化版本标记(schema_version),内容型豁免整体删除。
11
+ import fs from 'node:fs';
12
+ import path from 'node:path';
13
+
14
+ /**
15
+ * v0.13 §48.1:legacy = v0.32.0 之前创建的 change(状态文件无 schema_version 打戳)。
16
+ * 打戳只发生在 `tf state init` 创建 change 时;rebuild/doctor/set 一律不追加,
17
+ * 因此"字段缺失"是可靠的存量信号,不会被新 CLI 重写状态文件而污染。
18
+ */
19
+ export function isLegacyChange(state) {
20
+ return state?.schema_version == null;
21
+ }
22
+
23
+ /** v0.13 §48.2:显式 skip 必须附理由(可审计豁免)。 */
24
+ export function hasExplicitSkip(state) {
25
+ return state?.test_matrix_skipped === 'true'
26
+ && typeof state?.test_matrix_skip_reason === 'string'
27
+ && state.test_matrix_skip_reason.trim().length > 0;
28
+ }
29
+
30
+ /** skip 已置但理由缺失 → 门禁拒绝并引导补理由。 */
31
+ export function skipMissingReason(state) {
32
+ return state?.test_matrix_skipped === 'true' && !hasExplicitSkip(state);
33
+ }
34
+
35
+ export const SKIP_REASON_HINT =
36
+ "test_matrix_skipped=true requires test_matrix_skip_reason — record it: "
37
+ + "tf state set <dir> test_matrix_skip_reason '<why this change needs no test matrix>'";
38
+
39
+ /** contract 是否声明 '## Test Matrix' 段(不存在时 exists=false)。 */
40
+ export function contractDeclaresTestMatrix(changeDir) {
41
+ const contractPath = path.join(changeDir, 'execution-contract.md');
42
+ if (!fs.existsSync(contractPath)) return { exists: false, declares: false };
43
+ const contract = fs.readFileSync(contractPath, 'utf-8');
44
+ return { exists: true, declares: contract.includes('## Test Matrix') };
45
+ }
46
+
47
+ /** test-matrix.md 存在性与非空性。 */
48
+ export function readTestMatrixFile(changeDir) {
49
+ const matrixPath = path.join(changeDir, 'test-matrix.md');
50
+ if (!fs.existsSync(matrixPath)) return { exists: false, empty: true };
51
+ const content = fs.readFileSync(matrixPath, 'utf-8');
52
+ return { exists: true, empty: content.trim().length === 0 };
53
+ }
@@ -1,60 +1,84 @@
1
1
  // scripts/guard/checks/test-matrix-complete.mjs — verify test matrix exists and is consistent
2
- import fs from 'node:fs';
3
- import path from 'node:path';
2
+ //
3
+ // v0.13 §48 重写(C1-domain-policy 事件修复,RC-1/RC-3):
4
+ // 豁免键由 contract 内容改为 state schema_version;删除 v0.12 的两条结构性豁免:
5
+ // ✗ "contract 无 '## Test Matrix' 段 → PASS"(内容型豁免,新 change 漏生成矩阵同样命中)
6
+ // ✗ "stored hash 为 null 时短路跳过一致性校验"(矩阵生成后未 rebuild 即无保护)
7
+ // 判定顺序见设计增强方案 v0.13 §48.3。
4
8
  import { readState } from '../../lib/state-loader.mjs';
5
9
  import { computeTestMatrixHash } from '../../lib/hash.mjs';
10
+ import {
11
+ isLegacyChange,
12
+ skipMissingReason,
13
+ SKIP_REASON_HINT,
14
+ contractDeclaresTestMatrix,
15
+ readTestMatrixFile,
16
+ } from './test-gate-exemptions.mjs';
6
17
 
7
18
  /**
8
- * Check that test-matrix.md exists and its hash is consistent with state.
9
- *
10
- * Exemption paths (v0.12 §45.3):
11
- * 1. Legacy: execution-contract.md has no "## Test Matrix" section → PASS
12
- * 2. Explicit skip: test_matrix_skipped === 'true' → PASS
13
- * 3. test-matrix.md exists and hash matches → PASS
14
- * 4. test-matrix.md missing or hash mismatch → FAIL
15
- *
16
19
  * Returns { pass, failures[], reason? }.
17
20
  */
18
21
  export function checkTestMatrixComplete(changeDir) {
19
22
  const state = readState(changeDir);
20
23
 
21
- // Exemption 1: explicit skip
22
- if (state.test_matrix_skipped === 'true') {
23
- return { pass: true, failures: [], reason: 'explicitly skipped via test_matrix_skipped' };
24
+ // Step 1 legacy:v0.32.0 之前初始化的 change(无 schema_version 打戳)保留旧行为。
25
+ if (isLegacyChange(state)) {
26
+ return { pass: true, failures: [], reason: 'legacy change initialized before v0.32.0' };
24
27
  }
25
28
 
26
- // Exemption 2: legacy contract without Test Matrix section
27
- const contractPath = path.join(changeDir, 'execution-contract.md');
28
- if (fs.existsSync(contractPath)) {
29
- const contract = fs.readFileSync(contractPath, 'utf-8');
30
- if (!contract.includes('## Test Matrix')) {
31
- return { pass: true, failures: [], reason: 'legacy contract — no test matrix section' };
29
+ // Step 2 显式 skip:必须附理由(可审计豁免)。
30
+ if (state.test_matrix_skipped === 'true') {
31
+ if (skipMissingReason(state)) {
32
+ return { pass: false, failures: [SKIP_REASON_HINT] };
32
33
  }
33
- } else {
34
- // No contract at all — nothing to check
35
- return { pass: true, failures: [], reason: 'no execution contract — skipping test matrix check' };
34
+ return { pass: true, failures: [], reason: `explicitly skipped: ${state.test_matrix_skip_reason}` };
36
35
  }
37
36
 
38
- // Check test-matrix.md exists and is non-empty
39
- const matrixPath = path.join(changeDir, 'test-matrix.md');
40
- if (!fs.existsSync(matrixPath)) {
37
+ // Step 3 非存量 change 的契约必须声明矩阵(v0.13:内容型豁免删除)。
38
+ const contract = contractDeclaresTestMatrix(changeDir);
39
+ if (!contract.exists) {
41
40
  return {
42
41
  pass: false,
43
- failures: ['test-matrix.md is missing — contract declares ## Test Matrix but no matrix file found'],
42
+ failures: ['execution-contract.md is missing — a non-legacy change must have a contract declaring ## Test Matrix'],
43
+ };
44
+ }
45
+ if (!contract.declares) {
46
+ return {
47
+ pass: false,
48
+ failures: [
49
+ 'non-legacy contract must declare ## Test Matrix — return to bridging so contract-builder generates test-matrix.md, '
50
+ + 'or explicitly skip (test_matrix_skipped=true + test_matrix_skip_reason)',
51
+ ],
44
52
  };
45
53
  }
46
54
 
47
- const content = fs.readFileSync(matrixPath, 'utf-8');
48
- if (content.trim().length === 0) {
55
+ // Step 4 — test-matrix.md 存在且非空。
56
+ const matrix = readTestMatrixFile(changeDir);
57
+ if (!matrix.exists) {
58
+ return {
59
+ pass: false,
60
+ failures: ['test-matrix.md is missing — contract declares ## Test Matrix but no matrix file found'],
61
+ };
62
+ }
63
+ if (matrix.empty) {
49
64
  return {
50
65
  pass: false,
51
66
  failures: ['test-matrix.md is empty — must contain at least a Summary section and Cases table'],
52
67
  };
53
68
  }
54
69
 
55
- // Hash consistency check
70
+ // Step 5 — hash 必须已记录(v0.13:删除 state.test_matrix_hash && 的空值短路)。
71
+ // 矩阵在 bridging 阶段生成(晚于 state init),contract-builder 生成后必须 tf state rebuild 捕获 hash。
56
72
  const computed = computeTestMatrixHash(changeDir);
57
- if (state.test_matrix_hash && state.test_matrix_hash !== computed) {
73
+ if (!state.test_matrix_hash) {
74
+ return {
75
+ pass: false,
76
+ failures: ["test_matrix_hash not recorded — run 'tf state rebuild' after generating test-matrix.md"],
77
+ };
78
+ }
79
+
80
+ // Step 6 — hash 一致性。
81
+ if (state.test_matrix_hash !== computed) {
58
82
  return {
59
83
  pass: false,
60
84
  failures: [
@@ -0,0 +1,60 @@
1
+ // scripts/guard/checks/test-matrix-ready.mjs — test preparedness gate before executing
2
+ //
3
+ // v0.13 §49(设计增强方案 v0.13,C1-domain-policy 事件修复,RC-3 声明驱动型绕过):
4
+ // full workflow 的 approved-for-build→executing 新增本维度——进入执行前强制
5
+ // "带着矩阵开工",缺陷在开工前暴露,而不是等 45 个文件写完才在 closing 发现。
6
+ // 与 test-matrix-complete(出口)共用 legacy/skip 豁免语义(test-gate-exemptions.mjs)。
7
+ import { readState } from '../../lib/state-loader.mjs';
8
+ import {
9
+ isLegacyChange,
10
+ skipMissingReason,
11
+ SKIP_REASON_HINT,
12
+ contractDeclaresTestMatrix,
13
+ readTestMatrixFile,
14
+ } from './test-gate-exemptions.mjs';
15
+
16
+ /**
17
+ * Returns { pass, failures[], reason? }.
18
+ */
19
+ export function checkTestMatrixReady(changeDir) {
20
+ const state = readState(changeDir);
21
+
22
+ // Exemption 1:legacy change(v0.32.0 之前初始化,无 schema_version 打戳)。
23
+ if (isLegacyChange(state)) {
24
+ return { pass: true, failures: [], reason: 'legacy change — initialized before v0.32.0' };
25
+ }
26
+
27
+ // Exemption 2:显式 skip(必须附理由)。
28
+ if (state.test_matrix_skipped === 'true') {
29
+ if (skipMissingReason(state)) {
30
+ return { pass: false, failures: [SKIP_REASON_HINT] };
31
+ }
32
+ return { pass: true, failures: [], reason: `explicitly skipped: ${state.test_matrix_skip_reason}` };
33
+ }
34
+
35
+ // 正常路径:契约声明 ## Test Matrix 且 test-matrix.md 存在非空。
36
+ const contract = contractDeclaresTestMatrix(changeDir);
37
+ const matrix = readTestMatrixFile(changeDir);
38
+ if (contract.declares && matrix.exists && !matrix.empty) {
39
+ return { pass: true, failures: [] };
40
+ }
41
+
42
+ const failures = [];
43
+ if (!contract.exists) {
44
+ failures.push('execution-contract.md is missing — run contract-builder first');
45
+ } else if (!contract.declares) {
46
+ failures.push('contract does not declare ## Test Matrix — return to bridging so contract-builder generates test-matrix.md');
47
+ }
48
+ if (contract.declares) {
49
+ if (!matrix.exists) {
50
+ failures.push('test-matrix.md is missing — generate it during bridging (contract-builder Test Matrix Generation), then run tf state rebuild');
51
+ } else if (matrix.empty) {
52
+ failures.push('test-matrix.md is empty — must contain at least a Summary section and Cases table');
53
+ }
54
+ }
55
+ failures.push(
56
+ "if this change legitimately needs no test matrix, skip explicitly: "
57
+ + "tf state set <dir> test_matrix_skipped true + test_matrix_skip_reason '<reason>'"
58
+ );
59
+ return { pass: false, failures };
60
+ }