@xulthekl/team-flow 0.22.4 → 0.24.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 (72) 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 +3 -2
  9. package/CHANGELOG.md +103 -0
  10. package/GEMINI.md +1 -1
  11. package/HANDOFF.md +123 -98
  12. package/INSTALL.md +1 -1
  13. package/README.md +1 -1
  14. package/docs/README_en.md +1 -1
  15. package/docs/solutions/INDEX.md +5 -0
  16. package/docs/solutions/cross-phase/2026-07-28-no-summary.md +17 -0
  17. package/gemini-extension.json +1 -1
  18. package/hooks/pre-tool-use-guard +9 -9
  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/guard/checks/arch-design.mjs +79 -0
  24. package/scripts/guard/checks/compound-captured.mjs +70 -0
  25. package/scripts/guard/guard.mjs +6 -2
  26. package/scripts/lib/arch-merge.mjs +459 -0
  27. package/scripts/lib/cmd-state.mjs +5 -0
  28. package/scripts/lib/hash.mjs +18 -0
  29. package/scripts/lib/solutions-promote.mjs +1 -1
  30. package/scripts/lib/state-loader.mjs +16 -0
  31. package/scripts/team-flow.mjs +3 -0
  32. package/skills/architecture-design/SKILL.md +42 -3
  33. package/skills/architecture-design/templates/api.md +71 -0
  34. package/skills/architecture-design/templates/architecture.md +82 -0
  35. package/skills/architecture-design/templates/change-brief.md +29 -0
  36. package/skills/architecture-design/templates/database.md +69 -0
  37. package/skills/architecture-design/templates/index.md +33 -0
  38. package/skills/architecture-design/templates/physical-model.md +93 -0
  39. package/skills/bug-investigator/SKILL.md +1 -1
  40. package/skills/build-executor/SKILL.md +23 -19
  41. package/skills/build-executor/implementer-prompt.md +1 -1
  42. package/skills/build-executor/references/execution-modes.md +6 -6
  43. package/skills/build-executor/task-reviewer-prompt.md +1 -1
  44. package/skills/ce-brainstorm/SKILL.md +6 -0
  45. package/skills/code-reviewer/SKILL.md +6 -2
  46. package/skills/code-reviewer/code-reviewer-prompt.md +1 -1
  47. package/skills/contract-builder/SKILL.md +6 -6
  48. package/skills/need-explorer/SKILL.md +2 -2
  49. package/skills/release-archivist/SKILL.md +25 -12
  50. package/skills/release-archivist/references/closing-procedures.md +8 -8
  51. package/skills/spec-merger/SKILL.md +2 -2
  52. package/skills/spec-writer/SKILL.md +11 -9
  53. package/skills/workflow-bootstrap/SKILL.md +39 -5
  54. package/skills/workflow-bootstrap/references/b1-reconnaissance.md +22 -1
  55. package/skills/workflow-bootstrap/scripts/recon-probe.sh +122 -1
  56. package/skills/workflow-orchestrator/references/s2-prd-prototype-loop.md +1 -1
  57. package/skills/workflow-orchestrator/references/s4-split-validate.md +1 -1
  58. package/skills/workflow-orchestrator/references/s5-monitoring.md +1 -1
  59. package/skills/workflow-start/SKILL.md +44 -16
  60. package/skills/workflow-start/references/routing-rules.md +17 -17
  61. package/templates/api.md +177 -0
  62. package/templates/architecture.md +122 -0
  63. package/templates/change-brief.md +24 -0
  64. package/templates/database.md +114 -0
  65. package/tests/lib/guard-compound-captured.test.mjs +92 -0
  66. package/tests/lib/guard-specs-merged.test.mjs +2 -0
  67. package/tests/lib/guard-tests-passing.test.mjs +2 -0
  68. package/tests/lib/guard.test.mjs +2 -0
  69. package/tests/lib/solutions-capture.test.mjs +108 -0
  70. package/tests/lib/solutions-index-gen.test.mjs +147 -0
  71. package/tests/lib/solutions-inject.test.mjs +115 -0
  72. package/tests/lib/solutions-promote.test.mjs +200 -0
@@ -0,0 +1,71 @@
1
+ ---
2
+ change_id: <change-name>
3
+ date: YYYY-MM-DD
4
+ arch_design_decision: required | skipped
5
+ api_contract_manager: swagger
6
+ ---
7
+ # API 增量设计: <change-name>
8
+
9
+ > **定位**:架构路由表——记录端点的分流归属、聚合归属、存在理由。
10
+ > 精确的请求/响应 Schema、错误码、参数定义由 Swagger 管理,本文档不重复。
11
+
12
+ ## 1. As-Is 基线(冻结复制)
13
+
14
+ > 从 API-INDEX.md 复制变更涉及的端点到此处。
15
+
16
+ ### 1.1 现有 Command API
17
+
18
+ | 端点 | 方法 | 聚合 | 事务边界 | 说明 |
19
+ |------|------|------|---------|------|
20
+
21
+ ### 1.2 现有 Read API
22
+
23
+ | 端点 | 方法 | 聚合 | 数据来源 | 说明 |
24
+ |------|------|------|---------|------|
25
+
26
+ ### 1.3 现有 Query API
27
+
28
+ | 端点 | 方法 | 查询模型 | 阻断测试 | 说明 |
29
+ |------|------|---------|---------|------|
30
+
31
+ ## 2. To-Be 增量设计
32
+
33
+ ### 2.1 Command API(改状态)
34
+
35
+ | 端点 | 方法 | 聚合 | 事务边界 | 说明 |
36
+ |------|------|------|---------|------|
37
+ | /api/xxx | POST | XxxAggregate | t_xxx 事务 | 简要说明 |
38
+
39
+ ### 2.2 Read API(有逻辑不改状态)
40
+
41
+ | 端点 | 方法 | 聚合 | 数据来源 | 说明 |
42
+ |------|------|------|---------|------|
43
+ | /api/xxx/{id}/detail | GET | XxxAggregate | t_xxx + JOIN | 简要说明 |
44
+
45
+ ### 2.3 Query API(纯查询)
46
+
47
+ | 端点 | 方法 | 查询模型 | 阻断测试 | 说明 |
48
+ |------|------|---------|---------|------|
49
+ | /api/dashboard/xxx-stats | GET | XxxStatsView | 阻断=继续 → 数据服务 | 简要说明 |
50
+
51
+ > **阻断测试说明**:将服务阻断 1h,下游不能继续 → 业务服务;能继续 → 数据服务
52
+
53
+ ## 3. 跨域一致性检查
54
+
55
+ > 检查 API 端点与数据实体的对齐情况。
56
+
57
+ | API 端点 | 对应数据实体 | 对齐状态 | 不一致说明 |
58
+ |---------|------------|---------|-----------|
59
+ | /api/xxx | t_xxx | ✅ 对齐 | — |
60
+
61
+ ### 3.1 术语命名统一性
62
+
63
+ | 术语 | API 层命名 | 数据层命名 | 一致性 |
64
+ |------|-----------|-----------|-------|
65
+ | xxx | xxxId | xxx_id | ✅ 统一 |
66
+
67
+ ## 4. 演进日志
68
+
69
+ | 日期 | 变更 ID | 内容 | 影响范围 |
70
+ |------|---------|------|---------|
71
+ | YYYY-MM-DD | <change-name> | 初始设计 | 新建 |
@@ -0,0 +1,82 @@
1
+ ---
2
+ change_id: <change-name>
3
+ date: YYYY-MM-DD
4
+ arch_design_decision: required | skipped
5
+ ---
6
+ # Architecture 增量设计: <change-name>
7
+
8
+ ## 1. As-Is 基线(冻结复制)
9
+
10
+ > 从全局 ARCHITECTURE.md 复制当前相关 BC/聚合/Context Map 到此处。
11
+
12
+ ### 1.1 现有聚合
13
+
14
+ | 聚合名称 | 聚合根 | 所属限界上下文 | 事务边界 |
15
+ |---------|-------|-------------|---------|
16
+
17
+ ### 1.2 现有限界上下文
18
+
19
+ | 上下文名称 | 职责 | 包含聚合 | 语言类型 |
20
+ |-----------|------|---------|---------|
21
+
22
+ ### 1.3 现有 Context Map
23
+
24
+ | 上游 | 下游 | 映射类型 | 说明 |
25
+ |------|------|---------|------|
26
+
27
+ ## 2. To-Be 增量设计(DDD)
28
+
29
+ ### 2.1 聚合变更
30
+
31
+ | 聚合名称 | 操作 | 聚合根 | 实体/值对象 | 事务边界 | 所属 BC |
32
+ |---------|------|-------|-----------|---------|--------|
33
+
34
+ ### 2.2 限界上下文变更
35
+
36
+ | 上下文名称 | 操作 | 职责 | 包含聚合 | 语言类型 |
37
+ |-----------|------|------|---------|---------|
38
+
39
+ ### 2.3 Context Map 变更
40
+
41
+ | 上游 | 下游 | 操作 | 映射类型 | 说明 |
42
+ |------|------|------|---------|------|
43
+
44
+ ### 2.4 CQRS 写/读模型变更
45
+
46
+ | 聚合 | 操作类型 | 命令/查询 | 事务边界 | 说明 |
47
+ |------|---------|---------|---------|------|
48
+
49
+ ## 3. 变更分叉级联分析
50
+
51
+ ### 3.1 直接依赖
52
+
53
+ | 依赖项 | 影响说明 | 处理方式 |
54
+ |-------|---------|---------|
55
+
56
+ ### 3.2 间接依赖
57
+
58
+ | 依赖项 | 影响说明 | 处理方式 |
59
+ |-------|---------|---------|
60
+
61
+ ### 3.3 隐式依赖(最危险)
62
+
63
+ | 依赖项 | 影响说明 | 处理方式 |
64
+ |-------|---------|---------|
65
+
66
+ ## 4. 跨域一致性检查
67
+
68
+ ### 4.1 结构一致性(AA ↔ IA)
69
+
70
+ | AA 功能 | IA 实体 | 对齐状态 | 说明 |
71
+ |--------|--------|---------|------|
72
+
73
+ ### 4.2 语义一致性(命名统一)
74
+
75
+ | 概念 | AA 命名 | IA 命名 | 一致性 |
76
+ |------|--------|--------|-------|
77
+
78
+ ## 5. 演进日志
79
+
80
+ | 日期 | 变更 ID | 内容 | 影响范围 |
81
+ |------|---------|------|---------|
82
+ | YYYY-MM-DD | <change-name> | 初始设计 | 新建 |
@@ -0,0 +1,29 @@
1
+ ---
2
+ upstream_source: orchestrator | manual | null
3
+ upstream_req_id: <req-id>
4
+ upstream_plan_ref: prd/vN/plan.md
5
+ upstream_change_id: C2
6
+ plan_hash: sha256:<plan.md 内容摘要>
7
+ ---
8
+ # Change Brief: <change-name>
9
+
10
+ ## Scope
11
+
12
+ <用户故事/功能模块级 scope,与 plan.md 该 change 的 Scope 一致>
13
+
14
+ ## 约束
15
+
16
+ <来自 plan.md 的全局约束 / 该 change 的已知约束>
17
+
18
+ ## AC 列表
19
+
20
+ <取自 auditor 报告 Dim1 覆盖矩阵中映射到本 change 的 AC,逐条>
21
+
22
+ ## 全局技术方向
23
+
24
+ <取自 plan.md 高阶技术设计段要点:模块边界/技术选型/数据流方向>
25
+
26
+ ## PRD & plan 引用
27
+
28
+ - PRD: prd/vN/prd.md §<相关章节>
29
+ - Plan: prd/vN/plan.md ### <C-ID>
@@ -0,0 +1,69 @@
1
+ ---
2
+ change_id: <change-name>
3
+ date: YYYY-MM-DD
4
+ arch_design_decision: required | skipped
5
+ ---
6
+ # Database 增量设计: <change-name>
7
+
8
+ ## 1. As-Is 基线(冻结复制)
9
+
10
+ > 从 PHYSICAL-MODEL.md 复制变更涉及的表的当前字段定义到此处。
11
+ > 仅复制涉及的表,不要全量复制。
12
+
13
+ ### 1.1 现有写模型
14
+
15
+ | 表名 | 所属聚合 | 写模型类型 | 关键字段 |
16
+ |------|---------|-----------|---------|
17
+ | t_xxx | XxxAggregate | 事务型 | ... |
18
+
19
+ ### 1.2 现有读模型
20
+
21
+ | 视图/表名 | 所属查询 | 读模型类型 | 数据来源 |
22
+ |----------|---------|-----------|---------|
23
+ | v_xxx | XxxQuery | 分析型 | t_xxx JOIN t_yyy |
24
+
25
+ ## 2. To-Be 增量设计
26
+
27
+ ### 2.1 写模型变更(事务型)
28
+
29
+ | 表名 | 操作 | 聚合 | 事务边界 | 变更说明 |
30
+ |------|------|------|---------|---------|
31
+ | t_xxx | ALTER | XxxAggregate | 现有事务 | 新增字段 xxx_type |
32
+
33
+ ### 2.2 读模型变更(分析型)
34
+
35
+ | 视图/表名 | 操作 | 查询 | 阻断测试结果 | 变更说明 |
36
+ |----------|------|------|------------|---------|
37
+ | v_xxx | CREATE | XxxStatsQuery | 阻断=继续 → 数据服务 | 新增统计视图 |
38
+
39
+ ## 3. Schema 变更详情
40
+
41
+ > 可执行脚本位于 `sql/ddl/` 目录,以下为变更概要。
42
+
43
+ | 脚本文件 | 操作类型 | 目标表 | 说明 |
44
+ |---------|---------|-------|------|
45
+ | `sql/ddl/YYYYMMDD_desc.sql` | CREATE TABLE / ALTER TABLE | t_xxx | 简要说明 |
46
+
47
+ ### 3.1 变更影响
48
+
49
+ <对现有物理模型的影响说明:哪些表受影响、是否有数据迁移需求>
50
+
51
+ ## 4. 实体关系变更
52
+
53
+ | 实体 | 操作 | 聚合 | 类型 | 唯一标识 | 说明 |
54
+ |------|------|------|------|---------|------|
55
+ | XxxEntity | 新增 | XxxAggregate | 实体 | id (bigint) | ... |
56
+
57
+ ## 5. 数据迁移脚本
58
+
59
+ > 可执行脚本位于 `sql/migration/` 目录。
60
+
61
+ | 脚本文件 | 说明 | 幂等性 | 回滚方式 |
62
+ |---------|------|-------|---------|
63
+ | `sql/migration/YYYYMMDD_desc.sql` | 简要说明 | 是/否 | DROP + 重跑 / 反向 DML |
64
+
65
+ ## 6. 演进日志
66
+
67
+ | 日期 | 变更 ID | 内容 | 影响范围 |
68
+ |------|---------|------|---------|
69
+ | YYYY-MM-DD | <change-name> | 初始设计 | 新建 |
@@ -0,0 +1,33 @@
1
+ # Architecture Index
2
+
3
+ > 本文件始终加载,各产物按需 Read。
4
+ > Last updated: change=<change-name>, YYYY-MM-DD
5
+
6
+ ## ARCHITECTURE.md
7
+ - 限界上下文: <数量>
8
+ - 聚合数量: <数量>
9
+ - 最后更新: change=<change-name>, YYYY-MM-DD
10
+ - 读取建议: 按 BC 段落读取
11
+
12
+ ## PHYSICAL-MODEL.md
13
+ - 表数量: <数量>
14
+ - 业务域:
15
+ - <域名1>: <表名列表> (N表)
16
+ - <域名2>: <表名列表> (N表)
17
+ - 最后更新: change=<change-name>, YYYY-MM-DD
18
+ - 读取建议: 按业务域段落读取
19
+
20
+ ## schema-baseline.sql
21
+ - 表数量: <数量>
22
+ - 最后更新: change=<change-name>, YYYY-MM-DD
23
+ - 读取建议: 通常不需加载,DDL 由 sql/ 目录独立管理
24
+
25
+ ## API-INDEX.md
26
+ - 端点数量: <数量>
27
+ - 分流统计: Command=N / Read=N / Query=N
28
+ - 最后更新: change=<change-name>, YYYY-MM-DD
29
+ - 读取建议: 按分流区域读取
30
+
31
+ ## CONCEPTS.md
32
+ - 术语数量: <数量>
33
+ - 最后更新: bootstrap, YYYY-MM-DD
@@ -0,0 +1,93 @@
1
+ # <项目名>数据库物理模型
2
+
3
+ > 生成时间: YYYY-MM-DD
4
+ > 最后更新: change=<change-name>, YYYY-MM-DD
5
+
6
+ ---
7
+
8
+ ## <业务域名1>(限界上下文)
9
+
10
+ ### 1. <表中文名> (<表名>)
11
+
12
+ | ID | | 表名 | <表名> | | | | | | | | |
13
+ | ---- | ---- | -------------- | ------------ | ---- | ---- | ----------- | ------ | ---- | ---- | ---- | ---- |
14
+ | No | 字段名 | 字段ID | NOTN | UNIQ | 属性 | 字节数 | PK | EK | 索引 | 索引 | 索引 | 说明 |
15
+ | 1 | 主键ID | id | N | | bigint | | Y | | | | | auto_increment |
16
+ | 2 | <字段中文名> | <field_id> | N | | <type> | | | | | | | <说明> |
17
+ | 3 | 创建者 | create_by | Y | | bigint | | | | | | | |
18
+ | 4 | 创建时间 | create_time | Y | | datetime | | | | | | | |
19
+ | 5 | 更新者 | update_by | Y | | bigint | | | | | | | |
20
+ | 6 | 更新时间 | update_time | Y | | datetime | | | | | | | 默认CURRENT_TIMESTAMP |
21
+ | 7 | 删除标识 | del_flag | Y | | tinyint(1) | | | | | | | 默认0:未删除 1已删除 |
22
+ | 8 | 备注 | remark | Y | | varchar(500) | | | | | | | |
23
+
24
+ ---
25
+
26
+ ### 2. <表中文名> (<表名>)
27
+
28
+ | ID | | 表名 | <表名> | | | | | | | | |
29
+ | ---- | ---- | -------------- | ------------ | ---- | ---- | ----------- | ------ | ---- | ---- | ---- | ---- |
30
+ | No | 字段名 | 字段ID | NOTN | UNIQ | 属性 | 字节数 | PK | EK | 索引 | 索引 | 索引 | 说明 |
31
+ | 1 | 主键ID | id | N | | bigint | | Y | | | | | auto_increment |
32
+ | 2 | <关联表>ID | <fk_field_id> | N | | bigint | | | Y | Y | | | FK→<关联表名> |
33
+ | 3 | <字段中文名> | <field_id> | N | | <type> | | | | | | | <说明> |
34
+ | 4 | <JSON字段中文名> | <json_field_id> | Y | | json | | | | | | | 条件必填 |
35
+ | 5 | 创建者 | create_by | Y | | bigint | | | | | | | |
36
+ | 6 | 创建时间 | create_time | Y | | datetime | | | | | | | |
37
+ | 7 | 更新者 | update_by | Y | | bigint | | | | | | | |
38
+ | 8 | 更新时间 | update_time | Y | | datetime | | | | | | | 默认CURRENT_TIMESTAMP |
39
+ | 9 | 删除标识 | del_flag | Y | | tinyint(1) | | | | | | | 默认0:未删除 1已删除 |
40
+ | 10 | 备注 | remark | Y | | varchar(500) | | | | | | | |
41
+
42
+ ---
43
+
44
+ ## <业务域名2>(限界上下文)
45
+
46
+ ### 3. <表中文名> (<表名>)
47
+
48
+ | ID | | 表名 | <表名> | | | | | | | | |
49
+ | ---- | ---- | -------------- | ------------ | ---- | ---- | ----------- | ------ | ---- | ---- | ---- | ---- |
50
+ | No | 字段名 | 字段ID | NOTN | UNIQ | 属性 | 字节数 | PK | EK | 索引 | 索引 | 索引 | 说明 |
51
+ | 1 | 主键ID | id | N | | bigint | | Y | | | | | auto_increment |
52
+ | 2 | <字段中文名> | <field_id> | N | | varchar(100) | | | | | | | <说明> |
53
+ | 3 | <枚举字段中文名> | <enum_field_id> | N | | char | 1 | | | | | | <枚举说明,如 1:是 0:否> |
54
+ | 4 | 创建者 | create_by | Y | | bigint | | | | | | | |
55
+ | 5 | 创建时间 | create_time | Y | | datetime | | | | | | | |
56
+ | 6 | 更新者 | update_by | Y | | bigint | | | | | | | |
57
+ | 7 | 更新时间 | update_time | Y | | datetime | | | | | | | 默认CURRENT_TIMESTAMP |
58
+ | 8 | 删除标识 | del_flag | Y | | tinyint(1) | | | | | | | 默认0:未删除 1已删除 |
59
+ | 9 | 备注 | remark | Y | | varchar(500) | | | | | | | |
60
+
61
+ ---
62
+
63
+ ## 附录:物理模型图例说明
64
+
65
+ | 标识 | 含义 |
66
+ |------|------|
67
+ | **NOTN** | NOT NULL,Y=可为空,N=不可为空 |
68
+ | **UNIQ** | UNIQUE,Y=唯一约束 |
69
+ | **PK** | Primary Key,主键 |
70
+ | **EK** | External Key,外键(关联其他表) |
71
+ | **索引** | 该字段上有索引 |
72
+ | **属性** | 数据类型,如 bigint、varchar(50)、decimal(15,4) 等 |
73
+ | **说明** | 字段业务含义、枚举值、默认值等说明 |
74
+
75
+ ### 通用字段说明
76
+
77
+ 所有表均包含以下标准字段(审计字段):
78
+
79
+ | 字段名 | 字段ID | 属性 | 说明 |
80
+ |--------|--------|------|------|
81
+ | 创建者 | create_by | bigint | 创建人ID |
82
+ | 创建时间 | create_time | datetime | |
83
+ | 更新者 | update_by | bigint | 更新人ID |
84
+ | 更新时间 | update_time | datetime | 默认CURRENT_TIMESTAMP,自动更新 |
85
+ | 删除标识 | del_flag | tinyint(1) | 默认0:0未删除 1已删除(逻辑删除) |
86
+ | 备注 | remark | varchar(500) | |
87
+
88
+ ### 枚举字段速查
89
+
90
+ | 表名 | 字段名 | 枚举值 |
91
+ |------|--------|--------|
92
+ | <表中文名1> | <字段中文名1> | <枚举值说明> |
93
+ | <表中文名2> | <字段中文名2> | <枚举值说明> |
@@ -49,7 +49,7 @@ Scientific method: form a single hypothesis ("I think X is the root cause becaus
49
49
 
50
50
  ### DP-5: Debug Escalation (3+ Failures)
51
51
 
52
- 3+ failed fixes = architectural problem. Each fix revealing new problems elsewhere = wrong architecture. Record: `npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> dp_5_result <decision>`. Discuss with user before attempting more fixes.
52
+ 3+ failed fixes = architectural problem. Each fix revealing new problems elsewhere = wrong architecture. Record: `npx --yes --package @xulthekl/team-flow@0.24.0 tf state set <change-dir> dp_5_result <decision>`. Discuss with user before attempting more fixes.
53
53
 
54
54
  ## Red Flags — Return to Phase 1
55
55
 
@@ -11,18 +11,22 @@ Controls the implementation phase. Uses `execution-contract.md` as the workflow
11
11
 
12
12
  Read: `execution-contract.md`, `tasks.md`, relevant `specs/`, relevant `design.md`. (Skip contract/spec requirements when workflow is `tweak`.)
13
13
 
14
- Check workflow mode first: `npx --yes --package @xulthekl/team-flow@0.22.4 tf state get <change-dir> workflow`. If `tweak` → direct edit mode. If `hotfix` or `full` → standard contract-first discipline.
14
+ When `architecture/sql/` exists, also read:
15
+ - `architecture/sql/ddl/*.sql` — executable DDL scripts; reference directly for DB schema change tasks instead of hand-writing DDL
16
+ - `architecture/sql/migration/*.sql` — data migration scripts; execute as-is for data transformation tasks
17
+
18
+ Check workflow mode first: `npx --yes --package @xulthekl/team-flow@0.24.0 tf state get <change-dir> workflow`. If `tweak` → direct edit mode. If `hotfix` or `full` → standard contract-first discipline.
15
19
 
16
20
  Branch/worktree preflight before ANY implementation edit (mandatory — do not skip):
17
21
  1. Run the isolation check:
18
22
  ```bash
19
- npx --yes --package @xulthekl/team-flow@0.22.4 tf isolate <change-dir>
23
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf isolate <change-dir>
20
24
  ```
21
25
  This script enforces git isolation: if you are on `main`/`master` it creates a
22
26
  git worktree (preferred) or a new branch, and exits non-zero if it cannot and you
23
27
  have not approved `--force`.
24
- 2. If `npx --yes --package @xulthekl/team-flow@0.22.4 tf isolate` exits non-zero: STOP. Do not edit `main`/`master` in place.
25
- Ask the user for explicit approval (and re-run with `npx --yes --package @xulthekl/team-flow@0.22.4 tf isolate <change-dir> --force`
28
+ 2. If `npx --yes --package @xulthekl/team-flow@0.24.0 tf isolate` exits non-zero: STOP. Do not edit `main`/`master` in place.
29
+ Ask the user for explicit approval (and re-run with `npx --yes --package @xulthekl/team-flow@0.24.0 tf isolate <change-dir> --force`
26
30
  only after they approve).
27
31
  3. If it succeeds, report the chosen branch/worktree and make all implementation
28
32
  edits there.
@@ -48,15 +52,15 @@ Return to `specifying` or `bridging` if: new behavior appears, interfaces change
48
52
  For `full`/`hotfix`, generate proposed waves from the approved contract, then use the recommendation as a decision aid rather than silently defaulting a mode:
49
53
 
50
54
  ```bash
51
- npx --yes --package @xulthekl/team-flow@0.22.4 tf execution recommend <change-dir> \
55
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf execution recommend <change-dir> \
52
56
  --wave <wave-id>:<parallel|serial>:<task,...>[:<depends-on,...>] --json
53
57
  # Show every available mode, the observed facts, and the recommendation to the user.
54
58
  # The command writes a receipt tied to the artifacts, contract, and waves. After the user chooses, record that explicit confirmation:
55
- npx --yes --package @xulthekl/team-flow@0.22.4 tf execution plan <change-dir> \
59
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf execution plan <change-dir> \
56
60
  --mode <selected-mode> --confirm --reason "user-selected execution mode" \
57
61
  --wave <wave-id>:<parallel|serial>:<task,...>[:<depends-on,...>]
58
62
  # Add --acknowledge-recommendation when the selection differs from the recommendation.
59
- npx --yes --package @xulthekl/team-flow@0.22.4 tf execution show <change-dir> --json
63
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf execution show <change-dir> --json
60
64
  ```
61
65
 
62
66
  The optional fourth `--wave` segment names prerequisite wave IDs. `execution show --json` reports `current`, plus each wave's `depends_on`, `receipt`, `blockers`, `retryable`, and `eligible` status. A wave with `retryable: true` has a current `fail` receipt and is eligible only for its focused repair and re-review; its dependents remain blocked until its replacement `pass` receipt. Report the saved plan revision, selected mode, ordered waves, dependencies, and whether every `parallel` wave can actually be dispatched concurrently on the current platform. If concurrency is unavailable, state the capability and reason plainly; retain the planned `parallel` strategy and do not silently execute it as a serial or Batch Inline plan.
@@ -69,7 +73,7 @@ The recommendation uses task count, configured `execution.inlineThreshold`, and
69
73
  | **Inline** | Recommended for a single sequential task; always available for a user-confirmed choice |
70
74
  | **Batch Inline** | Recommended for a bounded sequential batch; it remains serial and is never presented as parallel |
71
75
 
72
- Do not transition to `executing` until `execution show` reports `current: true` and the phase guard passes. A revised plan must repeat `npx --yes --package @xulthekl/team-flow@0.22.4 tf execution recommend` and use `npx --yes --package @xulthekl/team-flow@0.22.4 tf execution revise --confirm`; it creates a new revision and invalidates receipts from the prior revision.
76
+ Do not transition to `executing` until `execution show` reports `current: true` and the phase guard passes. A revised plan must repeat `npx --yes --package @xulthekl/team-flow@0.24.0 tf execution recommend` and use `npx --yes --package @xulthekl/team-flow@0.24.0 tf execution revise --confirm`; it creates a new revision and invalidates receipts from the prior revision.
73
77
 
74
78
  ## Batch Inline Execution
75
79
 
@@ -84,21 +88,21 @@ Boundaries: if any task touches >1 module, involves schema/API/config changes, o
84
88
  For full/hotfix by default. Dispatch according to the persisted plan, review each planned wave, and run a final broad review after all waves.
85
89
 
86
90
  ### Planned-Wave Loop
87
- 1. Read the current plan with `npx --yes --package @xulthekl/team-flow@0.22.4 tf execution show <change-dir> --json`; only waves shown with `current: true` and `eligible: true` may start. A `retryable: true` wave may only be repaired and re-reviewed; do not dispatch its dependents until its replacement receipt is `pass`. The CLI encodes dependencies in `--wave <id>:<strategy>:<tasks>[:<depends-on,...>]` and rejects a review receipt for a wave whose prerequisites lack current `pass` receipts.
91
+ 1. Read the current plan with `npx --yes --package @xulthekl/team-flow@0.24.0 tf execution show <change-dir> --json`; only waves shown with `current: true` and `eligible: true` may start. A `retryable: true` wave may only be repaired and re-reviewed; do not dispatch its dependents until its replacement receipt is `pass`. The CLI encodes dependencies in `--wave <id>:<strategy>:<tasks>[:<depends-on,...>]` and rejects a review receipt for a wave whose prerequisites lack current `pass` receipts.
88
92
  2. A `parallel` wave may dispatch independent tasks simultaneously only when the platform supports concurrent dispatch. If it does not, disclose the unavailable capability and execute the same wave one task at a time without changing its stored strategy.
89
93
  3. A `serial` wave dispatches one task at a time in listed order.
90
94
  4. After every wave, write a non-empty persisted regular-file review report (separate from the implementer's report), then record exactly one receipt that names that review report:
91
95
  ```bash
92
- npx --yes --package @xulthekl/team-flow@0.22.4 tf execution review <change-dir> \
96
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf execution review <change-dir> \
93
97
  --wave <wave-id> --base <sha> --head <sha> --report <review-report-path> --verdict <pass|fail>
94
98
  ```
95
99
  Do not begin a dependent wave until its predecessor receipt is `pass`.
96
100
  5. Critical/Important findings require a `fail` receipt, a focused repair, re-review, then a replacement `pass` receipt. Never advance or close with a missing or failed receipt.
97
101
 
98
102
  ### Per-Task Loop
99
- 1. **Dispatch implementer**: Load the template with `npx --yes --package @xulthekl/team-flow@0.22.4 tf runtime asset read skills/build-executor/implementer-prompt.md`. Extract task brief with `scripts/task-brief PLAN_FILE N`. Include: where task fits, brief path, interfaces from prior tasks, report file path.
103
+ 1. **Dispatch implementer**: Load the template with `npx --yes --package @xulthekl/team-flow@0.24.0 tf runtime asset read skills/build-executor/implementer-prompt.md`. Extract task brief with `scripts/task-brief PLAN_FILE N`. Include: where task fits, brief path, interfaces from prior tasks, report file path.
100
104
  2. **Handle response**: DONE → generate review package + dispatch reviewer. DONE_WITH_CONCERNS → assess. NEEDS_CONTEXT → provide context. BLOCKED → re-dispatch with better model or escalate.
101
- 3. **Review**: Load `npx --yes --package @xulthekl/team-flow@0.22.4 tf runtime asset read skills/build-executor/task-reviewer-prompt.md`. Reviewer returns spec compliance + code quality verdicts with the wave ID, git range, report path, and `pass`/`fail` receipt command.
105
+ 3. **Review**: Load `npx --yes --package @xulthekl/team-flow@0.24.0 tf runtime asset read skills/build-executor/task-reviewer-prompt.md`. Reviewer returns spec compliance + code quality verdicts with the wave ID, git range, report path, and `pass`/`fail` receipt command.
102
106
  4. **Fix**: If Critical or Important issues, write the `fail` receipt, dispatch fix subagent, re-review, and write the replacement `pass` receipt.
103
107
  5. **Mark complete**: Append to `.superpowers/sdd/progress.md`: `Task N: complete (commits <base7>..<head7>, review clean)`
104
108
 
@@ -106,7 +110,7 @@ For full/hotfix by default. Dispatch according to the persisted plan, review eac
106
110
  Use the configured profile that matches the task role. Resolve it before dispatch:
107
111
 
108
112
  ```bash
109
- npx --yes --package @xulthekl/team-flow@0.22.4 tf runtime config --resolve-model <profile>
113
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf runtime config --resolve-model <profile>
110
114
  ```
111
115
 
112
116
  | Profile | Role |
@@ -119,11 +123,11 @@ npx --yes --package @xulthekl/team-flow@0.22.4 tf runtime config --resolve-model
119
123
  For platforms whose dispatch supports a `model` field, explicitly pass the resolved `model` value. If the result is `configured: false`, automatic selection is unavailable: do not invent a provider model and do not bypass the existing requirement to specify `model` explicitly. Resolution only reads configuration; it does not switch models.
120
124
 
121
125
  ### Progress Ledger
122
- Track in `.superpowers/sdd/progress.md`. Check for existing ledger — completed tasks are done. After each batch: `npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> batches_completed <N>`.
126
+ Track in `.superpowers/sdd/progress.md`. Check for existing ledger — completed tasks are done. After each batch: `npx --yes --package @xulthekl/team-flow@0.24.0 tf state set <change-dir> batches_completed <N>`.
123
127
 
124
128
  ## Inline Execution Mode
125
129
 
126
- Only after a user-confirmed `inline` selection is recorded by `npx --yes --package @xulthekl/team-flow@0.22.4 tf execution plan --confirm`; a non-recommended selection also records `--acknowledge-recommendation`. Executes in the current session and still writes one review receipt per planned wave.
130
+ Only after a user-confirmed `inline` selection is recorded by `npx --yes --package @xulthekl/team-flow@0.24.0 tf execution plan --confirm`; a non-recommended selection also records `--acknowledge-recommendation`. Executes in the current session and still writes one review receipt per planned wave.
127
131
 
128
132
  Per-task: extract brief → write failing test → confirm failure → implement → confirm green → checkpoint review (done-when criteria, SHALL/MUST verification) → commit → save a task-level recovery checkpoint when another task remains → append to progress ledger.
129
133
 
@@ -131,7 +135,7 @@ After a task is committed and reviewed, when another task remains, save the
131
135
  recovery context with real evidence:
132
136
 
133
137
  ```bash
134
- npx --yes --package @xulthekl/team-flow@0.22.4 tf checkpoint save <change-dir> \
138
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf checkpoint save <change-dir> \
135
139
  --task <completed-task-id> --next "<next task>" --completed "<completed work>" \
136
140
  --verification "<verification report path>" --review "<review report path>" \
137
141
  --risk "<open risk or None>" --commit-start <base-sha> --commit-end <head-sha>
@@ -139,7 +143,7 @@ npx --yes --package @xulthekl/team-flow@0.22.4 tf checkpoint save <change-dir> \
139
143
 
140
144
  This augments `.superpowers/sdd/progress.md`; it does not replace the progress
141
145
  ledger or add a new core workflow state. Do not claim a checkpoint is current
142
- when `npx --yes --package @xulthekl/team-flow@0.22.4 tf checkpoint list` reports it as stale.
146
+ when `npx --yes --package @xulthekl/team-flow@0.24.0 tf checkpoint list` reports it as stale.
143
147
 
144
148
  If task hits BLOCKED (3+ fix failures or changes outside declared scope), escalate to SDD.
145
149
 
@@ -149,8 +153,8 @@ Skip TDD. Apply changes directly. Verify file integrity (exists, non-empty, vali
149
153
 
150
154
  ## DP Records
151
155
 
152
- DP-4 is written by `npx --yes --package @xulthekl/team-flow@0.22.4 tf execution plan`; do not write it with raw `state set`.
153
- DP-5 (debug escalation): `npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> dp_5_result "<resolution>"` + timestamp.
156
+ DP-4 is written by `npx --yes --package @xulthekl/team-flow@0.24.0 tf execution plan`; do not write it with raw `state set`.
157
+ DP-5 (debug escalation): `npx --yes --package @xulthekl/team-flow@0.24.0 tf state set <change-dir> dp_5_result "<resolution>"` + timestamp.
154
158
 
155
159
  ## Completion Standard
156
160
 
@@ -22,7 +22,7 @@ Subagent (general-purpose):
22
22
  ## Planned Wave
23
23
 
24
24
  You are assigned to planned wave [WAVE_ID] with strategy [WAVE_STRATEGY].
25
- Read `npx --yes --package @xulthekl/team-flow@0.22.4 tf execution show <change-dir> --json` before editing. Do not start
25
+ Read `npx --yes --package @xulthekl/team-flow@0.24.0 tf execution show <change-dir> --json` before editing. Do not start
26
26
  unless all declared dependencies have `pass` review receipts. A `parallel`
27
27
  label permits concurrent dispatch only when the controller confirms the
28
28
  platform supports it; never change the saved wave strategy yourself.
@@ -7,14 +7,14 @@
7
7
  For `full`/`hotfix`, generate proposed waves from the approved contract, then use the recommendation as a decision aid:
8
8
 
9
9
  ```bash
10
- npx --yes --package @xulthekl/team-flow@0.22.4 tf execution recommend <change-dir> \
10
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf execution recommend <change-dir> \
11
11
  --wave <wave-id>:<parallel|serial>:<task,...>[:<depends-on,...>] --json
12
12
  # Show every available mode, the observed facts, and the recommendation to the user.
13
- npx --yes --package @xulthekl/team-flow@0.22.4 tf execution plan <change-dir> \
13
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf execution plan <change-dir> \
14
14
  --mode <selected-mode> --confirm --reason "user-selected execution mode" \
15
15
  --wave <wave-id>:<parallel|serial>:<task,...>[:<depends-on,...>]
16
16
  # Add --acknowledge-recommendation when the selection differs from the recommendation.
17
- npx --yes --package @xulthekl/team-flow@0.22.4 tf execution show <change-dir> --json
17
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf execution show <change-dir> --json
18
18
  ```
19
19
 
20
20
  The optional fourth `--wave` segment names prerequisite wave IDs. `execution show --json` reports `current`, plus each wave's `depends_on`, `receipt`, `blockers`, `retryable`, and `eligible` status.
@@ -37,7 +37,7 @@ Dispatch according to the persisted plan, review each planned wave, and run a fi
37
37
  3. A `serial` wave dispatches one task at a time in listed order.
38
38
  4. After every wave, write a review report, then record one receipt:
39
39
  ```bash
40
- npx --yes --package @xulthekl/team-flow@0.22.4 tf execution review <change-dir> \
40
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf execution review <change-dir> \
41
41
  --wave <wave-id> --base <sha> --head <sha> --report <review-report-path> --verdict <pass|fail>
42
42
  ```
43
43
  5. Critical/Important findings require a `fail` receipt, focused repair, re-review, then replacement `pass` receipt.
@@ -66,7 +66,7 @@ Per-task: extract brief → write failing test → confirm failure → implement
66
66
  ## Model Selection
67
67
 
68
68
  ```bash
69
- npx --yes --package @xulthekl/team-flow@0.22.4 tf runtime config --resolve-model <profile>
69
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf runtime config --resolve-model <profile>
70
70
  ```
71
71
 
72
72
  | Profile | Role |
@@ -79,7 +79,7 @@ npx --yes --package @xulthekl/team-flow@0.22.4 tf runtime config --resolve-model
79
79
  ## Recovery Checkpoint
80
80
 
81
81
  ```bash
82
- npx --yes --package @xulthekl/team-flow@0.22.4 tf checkpoint save <change-dir> \
82
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf checkpoint save <change-dir> \
83
83
  --task <completed-task-id> --next "<next task>" --completed "<completed work>" \
84
84
  --verification "<verification report path>" --review "<review report path>" \
85
85
  --risk "<open risk or None>" --commit-start <base-sha> --commit-end <head-sha>
@@ -146,7 +146,7 @@ Subagent (general-purpose):
146
146
  command for the controller:
147
147
 
148
148
  ```bash
149
- npx --yes --package @xulthekl/team-flow@0.22.4 tf execution review <change-dir> --wave [WAVE_ID] --base [BASE_SHA] --head [HEAD_SHA] --report [REVIEW_REPORT_FILE] --verdict <pass|fail>
149
+ npx --yes --package @xulthekl/team-flow@0.24.0 tf execution review <change-dir> --wave [WAVE_ID] --base [BASE_SHA] --head [HEAD_SHA] --report [REVIEW_REPORT_FILE] --verdict <pass|fail>
150
150
  ```
151
151
 
152
152
  Use `fail` for any Critical/Important finding. A repair must be re-reviewed
@@ -54,12 +54,18 @@ These rules apply to every brainstorm, including the universal (non-software) fl
54
54
 
55
55
  Sub-agent dispatch is tiered by task shape, never hardcoded to a model name. When dispatching the Phase 1.1 grounding scout, the Phase 2.6 claim verifier, or the opt-in Slack researcher, read `references/model-tiers.md` for the tier definitions (extraction / generation / ceiling) and the degradation rule for platforms without per-agent model selection or with no subagent primitive at all.
56
56
 
57
+ ## Optional Inputs
58
+
59
+ - `docs/ideation/*.md`(可选):如果 ce-ideate 已产出 ideation artifact,读取作为 brainstorm 的起点。若文件不存在,则从用户提供的 feature description 获取输入。
60
+
57
61
  ## Feature Description
58
62
 
59
63
  The **feature description** is the input this skill was invoked with — what to explore, present in the current prompt or conversation, whether the user provided it directly or a calling skill passed it.
60
64
 
61
65
  **If no feature description was provided, ask the user:** "What would you like to explore? Please describe the feature, problem, or improvement you're thinking about."
62
66
 
67
+ **If `docs/ideation/*.md` exists**, read it first and use its ranked ideation content as the starting point for the brainstorm.
68
+
63
69
  Do not proceed until you have a feature description from the user.
64
70
 
65
71
  **Session-settled decisions.** The invoking conversation, or a distilled brief passed as invocation input — from the user or a calling skill — may carry decisions already examined-and-chosen. Read `references/settled-decisions.md` before classifying conversation-carried decisions — it carries the settlement test, the two provenance classes, the annotation shape, and capture rules. Skipping the classification fails in both directions: re-asking a decision the user already made, or promoting an unexamined assertion to settled.
@@ -16,7 +16,7 @@ Two responsibilities: requesting review (dispatching a reviewer subagent) and re
16
16
  1. Get SHAs: `BASE_SHA=$(git rev-parse HEAD~1)` and `HEAD_SHA=$(git rev-parse HEAD)`
17
17
  2. Dispatch `general-purpose` subagent using template at `skills/code-reviewer/code-reviewer-prompt.md`
18
18
  3. Fill placeholders: `[DESCRIPTION]` (what was built), `[PLAN_OR_REQUIREMENTS]` (contract/spec reference), `[BASE_SHA]`, `[HEAD_SHA]`, `[WAVE_ID]`, and a distinct `[REVIEW_REPORT_FILE]`.
19
- 4. Require the reviewer to write a non-empty persisted review report at `[REVIEW_REPORT_FILE]`, then record that exact path in the wave receipt: `npx --yes --package @xulthekl/team-flow@0.22.4 tf execution review <change-dir> --wave <id> --base <sha> --head <sha> --report <review-report-path> --verdict <pass|fail>`.
19
+ 4. Require the reviewer to write a non-empty persisted review report at `[REVIEW_REPORT_FILE]`, then record that exact path in the wave receipt: `npx --yes --package @xulthekl/team-flow@0.24.0 tf execution review <change-dir> --wave <id> --base <sha> --head <sha> --report <review-report-path> --verdict <pass|fail>`.
20
20
  5. Act on feedback: Critical/Important findings require a `fail` receipt, focused repair, re-review, and replacement `pass` receipt before a dependent wave or closing can proceed. Note Minor for later, push back with reasoning if reviewer is wrong.
21
21
 
22
22
  ### Minimality And Scope
@@ -43,6 +43,10 @@ behavior-neutral redundancy; never score by line count.
43
43
  | Important | Architecture problems, missing features, poor error handling, test gaps | Fix before next batch |
44
44
  | Minor | Code style, optimization, documentation polish | Note for later |
45
45
 
46
+ ### Architecture Cross-Domain Consistency (v0.10 §28-§31)
47
+
48
+ When `architecture/api.md` exists, verify the implementation against its **cross-domain consistency** section — specifically the API↔data entity alignment (Command/Read/Query routing vs actual DB entity usage). Flag mismatches as Important.
49
+
46
50
  ### Forbidden Responses
47
51
  Never: performative agreement ("You're right!", "Great point!"), blind implementation before verification, thanking the reviewer. Instead: restate the requirement, ask clarifying questions, push back with reasoning, or just fix it (actions > words).
48
52
 
@@ -72,7 +76,7 @@ Suggestion breaks existing functionality, reviewer lacks context, violates YAGNI
72
76
  | Performative agreement | State requirement or just act |
73
77
  | Blind implementation | Verify against codebase first |
74
78
  | Batch without testing | One at a time, test each |
75
- | Proceeding without a wave receipt | Record `pass`/`fail` via `npx --yes --package @xulthekl/team-flow@0.22.4 tf execution review` before the next dependent wave |
79
+ | Proceeding without a wave receipt | Record `pass`/`fail` via `npx --yes --package @xulthekl/team-flow@0.24.0 tf execution review` before the next dependent wave |
76
80
  | Assuming reviewer is right | Check if breaks things |
77
81
  | Avoiding pushback | Technical correctness > comfort |
78
82
  | Partial implementation | Clarify all items first |