@xulthekl/team-flow 0.36.1 → 0.36.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/always/phase-guard.md +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/marketplace.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/.github/plugin/marketplace.json +2 -2
- package/AGENTS.md +4 -4
- package/CHANGELOG.md +21 -0
- package/GEMINI.md +1 -1
- package/INSTALL.md +1 -1
- package/README.md +2 -2
- package/agents/architecture-design.md +24 -4
- package/agents/architecture-reviewer.md +11 -6
- package/agents/cross-change-consistency-checker.md +2 -1
- package/docs/README_en.md +1 -1
- package/gemini-extension.json +1 -1
- package/hooks/pre-tool-use-guard +15 -0
- package/hooks/session-start +2 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/scripts/guard/checks/arch-gate-exemptions.mjs +32 -17
- package/scripts/guard/checks/arch-snapshot.mjs +7 -0
- package/scripts/lib/arch-merge.mjs +22 -6
- package/scripts/lib/cmd-doctor.mjs +27 -0
- package/scripts/lib/solutions-capture.mjs +1 -1
- package/skills/architecture-design/SKILL.md +14 -0
- package/skills/architecture-design/chapters/ch06-integration.md +2 -2
- package/skills/architecture-design/references/s3.5-architecture-template.md +1 -1
- package/skills/architecture-design/references/s3.5-loading-protocol.md +1 -1
- package/skills/architecture-design/references/s3.5-product-architecture.md +13 -1
- package/skills/ce-compound/references/v0.5-upgrade.md +3 -0
- package/skills/release-archivist/SKILL.md +2 -0
- package/skills/workflow-bootstrap/SKILL.md +8 -5
- package/skills/workflow-bootstrap/references/b1-reconnaissance.md +2 -2
- package/skills/workflow-orchestrator/SKILL.md +1 -1
- package/skills/workflow-orchestrator/references/s4-split-validate.md +2 -1
- package/skills/workflow-orchestrator/references/s5-monitoring.md +1 -0
- package/skills/workflow-orchestrator/references/state-model.md +1 -1
- package/skills/workflow-start/SKILL.md +1 -1
- package/skills/workflow-start/references/routing-rules.md +5 -1
|
@@ -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. 24 skills + 15 agents with embedded TDD, SDD, code review, debugging, delta spec sync, and design-system-driven prototyping.",
|
|
12
|
-
"version": "0.36.
|
|
12
|
+
"version": "0.36.3",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "LT",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-flow",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.3",
|
|
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": {
|
|
@@ -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). 24 skills + 15 agents, one install.",
|
|
5
|
-
"version": "0.36.
|
|
5
|
+
"version": "0.36.3",
|
|
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.36.
|
|
9
|
+
"version": "0.36.3"
|
|
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.36.
|
|
15
|
+
"version": "0.36.3",
|
|
16
16
|
"source": ".",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "LT",
|
package/AGENTS.md
CHANGED
|
@@ -100,13 +100,13 @@ prd/ PRD(有版本 v1→v2→v3,git 分支隔离)
|
|
|
100
100
|
├── prd-completeness-review.md # PRD 完整性评审报告(prd-completeness-reviewer 产出,v0.15.0 新增)
|
|
101
101
|
prototype/ 全局原型系统(UI 契约真相源):index.html / pages / components / assets / design-system.md / flow.md
|
|
102
102
|
docs/
|
|
103
|
-
├── architecture/
|
|
103
|
+
├── architecture/ 全局架构三层(v0.36.0):L1 当前态(ARCHITECTURE.md marker 区 / PHYSICAL-MODEL.md / DATABASE.md / API-INDEX.md / INDEX.md / domains/<bc>.md / diagrams/ / schema-baseline.sql / baseline.md)+ L2 changelog/ + L3 iterations/vN/architecture.md(产品级快照,archived 退役)
|
|
104
104
|
└── solutions/ 复利经验库(v0.5 新增,三层索引)
|
|
105
105
|
├── INDEX.md # L1 轻量索引(≤150行,每条一行摘要+标签)
|
|
106
|
-
├── prd/ plan/ prototype/ spec/ build/ review/ cross-phase/ # L2
|
|
106
|
+
├── prd/ plan/ architecture/ prototype/ spec/ build/ review/ cross-phase/ # L2 分阶段目录(v0.36.0 加 architecture)
|
|
107
107
|
└── <file>.md # L3 经验文件(YAML frontmatter: phase/domain/type/severity)
|
|
108
|
-
changes/<name>/ 变更脚手架(S4 创建):.team-flow.yaml
|
|
109
|
-
specs/<cap>/ 每变更设计/任务/契约:spec.md / design.md / tasks.md / execution-contract.md /
|
|
108
|
+
changes/<name>/ 变更脚手架(S4 创建):.team-flow.yaml(变更级状态文件)/ change-brief.md(产品级交接物,含 upstream_arch_ref)/ architecture/(变更级三件套 + sql/)
|
|
109
|
+
specs/<cap>/ 每变更设计/任务/契约:spec.md / design.md / tasks.md / execution-contract.md / learnings.md(v0.9 起 architecture/ 三件套已迁至 changes/<name>/architecture/)
|
|
110
110
|
STRATEGY.md CONCEPTS.md 产品策略(BA) / 领域词汇
|
|
111
111
|
```
|
|
112
112
|
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,27 @@ The format loosely follows Keep a Changelog.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.36.3] - 2026-08-05
|
|
10
|
+
|
|
11
|
+
### Fixed(v0.14 全链路缺口修复——27 项,复利链路 + agent 契约 + 门禁时序 + 交接/决策门 + guard hook + 快照生命周期 + 旧项目 + 文档同步 + 横展)
|
|
12
|
+
|
|
13
|
+
- **复利链路(严重 #4)**:solutions PHASES 加 architecture;architecture-design 加载协议加复利注入(`tf solutions inject --phase architecture`);S3.5 SOP 加复利捕获(Step 9);ce-compound 补架构自动捕获场景
|
|
14
|
+
- **agent 契约(严重 #1 #2)**:architecture-design / architecture-reviewer agent 加 product 模式(mode 参数/快照输入/INPUT_ERROR 分 mode/Phase1-A3 分叉/报告落盘 iterations/vN/auto-review.md)
|
|
15
|
+
- **门禁触发点(严重 #3)**:`tf arch init` 打戳加 SOP 触发点(S3.5 完成条件 + orchestrator ARCH 节)——arch_baseline 从此可建立,arch 门禁不再永久空转
|
|
16
|
+
- **门禁时序(重要 #5 + 一般 #16 #21)**:skip 物化限定最新迭代(防旧 SKIPPED 错误豁免);iterations 数字排序(v10+);FAIL 提示文案修正
|
|
17
|
+
- **arch 门禁测试(重要 #10)**:新增 tests/lib/guard-arch-gates.test.mjs(7 例);guard-dimensions 更新 16 维度 + arch-readiness 断言
|
|
18
|
+
- **交接/决策门(重要 #12 #7 #6)**:change-brief 加 upstream_arch_ref;架构修订决策门 SOP 定义(deviation 登记);API-INDEX 只扫已关闭 change;首轮特例状态标注;arch-snapshot 在途兜底
|
|
19
|
+
- **guard hook + 门禁说明(重要 #9 #11)**:pre-tool-use-guard 豁免 docs/architecture/iterations/ + .team-flow/;workflow-start/release-archivist 补 arch 门禁说明 + FAIL 升级路径
|
|
20
|
+
- **快照生命周期(重要 #8 + 一般 #17)**:s5-monitoring 迭代收尾标 archived;S3.5 补 domains/ + diagrams/ 产出 SOP
|
|
21
|
+
- **旧项目链路(重要 #14 + 一般 #22)**:workflow-bootstrap 感知 arch-reverse-analyst/逆向重建(B5 + 修正陈旧指引);recon-probe.sh 路径修正
|
|
22
|
+
- **文档同步(一般 #15 #19 #20)**:AGENTS.md/README 目录树三层化;ch06/state-model/loading-protocol/模板 marker 陈旧修正;workspace 登记(design-doc-system/roadmap)
|
|
23
|
+
- **横展(一般 #13 + 建议 #24 #25)**:arch-merge 白名单补 changelog/;doctor 加 arch-state 体检;cross-change 对照产品级注册表
|
|
24
|
+
|
|
25
|
+
## [0.36.2] - 2026-08-05
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- **变更级架构设计输入链缺口修复**:0.36.0 在 architecture-design/SKILL.md 声明产品级快照(`iterations/vN/architecture.md`)为主输入,但 workflow-start 实际 dispatch 子代理的输入列表(`routing-rules.md`)未传该路径——变更级架构设计不会将产品级架构设计作为输入。已同步:routing-rules.md(architecture-design + architecture-reviewer dispatch 输入)、workflow-start/SKILL.md(Step 1)、architecture-reviewer(A5 基线一致性对照产品级快照)
|
|
29
|
+
|
|
9
30
|
## [0.36.1] - 2026-08-05
|
|
10
31
|
|
|
11
32
|
### Fixed
|
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.36.
|
|
11
|
+
# team-flow v0.36.3 | 阶段: {{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
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# team-flow
|
|
2
2
|
|
|
3
|
-
> 当前版本:`v0.36.
|
|
3
|
+
> 当前版本:`v0.36.3`
|
|
4
4
|
|
|
5
5
|
> 统一插件:**team-flow**(spec 驱动开发)+ **compound-engineering 核心子集**(全局复利)+ **architecture-design**(4A+DDD 增量设计)+ **prototype**(本地 HTML 原型)+ **e2e**(AC 驱动 E2E)+ **workflow-orchestrator**(产品级编排)+ **workflow-bootstrap**(既有项目接入)。一次安装,七套能力协同。
|
|
6
6
|
|
|
@@ -64,7 +64,7 @@ cp -r <plugin>/skills/prototype/references/prototype-scaffold/ <project>/prototy
|
|
|
64
64
|
prd/ PRD + 实施方案 + 原型审查记录(v1→v2,分支隔离)
|
|
65
65
|
prototype/ 全局原型(UI 契约真相源)
|
|
66
66
|
docs/
|
|
67
|
-
├── architecture/
|
|
67
|
+
├── architecture/ 全局架构三层(v0.36.0):ARCHITECTURE.md / PHYSICAL-MODEL.md / DATABASE.md / API-INDEX.md / INDEX.md / domains/<bc>.md / iterations/vN/(产品级快照)/ baseline.md
|
|
68
68
|
└── solutions/ 复利经验库(三层索引:INDEX.md → 分阶段目录 → 经验文件)
|
|
69
69
|
specs/<cap>/ 每变更设计/任务/契约 + learnings.md
|
|
70
70
|
STRATEGY.md CONCEPTS.md 策略 / 领域词汇
|
|
@@ -21,16 +21,27 @@ You are an independent architecture designer. You read the change brief, plan, e
|
|
|
21
21
|
|
|
22
22
|
**Your preloaded Skill contains the detailed methodology** (F1-F8 frameworks, chapter knowledge, templates, conventions protocol, context loading protocol). Follow it for HOW. This prompt defines WHO you are and WHAT you must deliver.
|
|
23
23
|
|
|
24
|
+
## Call Mode(v0.36.0:变更级 / 产品级)
|
|
25
|
+
|
|
26
|
+
| 模式 | 编排入口 | 判定 | 产出 | 唯一事实源 |
|
|
27
|
+
|------|---------|------|------|-----------|
|
|
28
|
+
| change(默认) | workflow-start(exploring→specifying) | 五项检查 | `changes/<name>/architecture/` 三件套 + sql/ | 产品级快照(BC 边界/聚合注册表),只引用不重定义 |
|
|
29
|
+
| product | workflow-orchestrator S3.5(ARCH 阶段) | 8 步全系统结构级设计(无五项检查) | `docs/architecture/iterations/vN/architecture.md`(6 产物) | 本快照是产品级唯一事实源 |
|
|
30
|
+
|
|
31
|
+
**product 模式**:按 `references/s3.5-product-architecture.md` SOP(8 步)+ `references/s3.5-architecture-template.md` 模板 + `references/s3.5-loading-protocol.md` 加载协议;产出经 architecture-reviewer product 视角评审(`review_mode: product`)PASS 才进 S4;时序 P1:只写快照不写全局。
|
|
32
|
+
|
|
24
33
|
## Inputs
|
|
25
34
|
|
|
26
35
|
| Parameter | Description |
|
|
27
36
|
|-----------|-------------|
|
|
28
|
-
| `
|
|
37
|
+
| `mode` | `change`(默认,workflow-start 五项检查)\| `product`(v0.36.0,S3.5 产品级架构设计) |
|
|
38
|
+
| `change_brief_path` | change-brief.md 路径(scope / AC / 技术方向;change 模式必填) |
|
|
29
39
|
| `plan_path` | prd/vN/plan.md 路径(高阶技术设计段) |
|
|
40
|
+
| `snapshot_path` | docs/architecture/iterations/vN/architecture.md(产品级快照;change 模式主输入,product 模式产出目标) |
|
|
30
41
|
| `specs_dir` | changes/<name>/specs/ 路径(现有规格,如有) |
|
|
31
42
|
| `global_arch_dir` | docs/architecture/ 路径(As-Is 基线) |
|
|
32
43
|
|
|
33
|
-
If change_brief_path is missing or unreadable
|
|
44
|
+
If change_brief_path is missing or unreadable **in change mode**, report `decision: skipped` with reason `INPUT_ERROR: change-brief missing`. In product mode change_brief_path is optional(产品级设计发生在 change 存在之前); 缺少时正常执行 8 步设计。
|
|
34
45
|
|
|
35
46
|
## Five-Check Gate (Architecture Change Determination)
|
|
36
47
|
|
|
@@ -44,7 +55,7 @@ Check the following five items in order. **All negative** → `decision: skipped
|
|
|
44
55
|
|
|
45
56
|
## Output Directory
|
|
46
57
|
|
|
47
|
-
|
|
58
|
+
**change 模式**(默认):架构产出在 change 目录的 `architecture/` 子目录:
|
|
48
59
|
|
|
49
60
|
```
|
|
50
61
|
changes/<name>/
|
|
@@ -57,11 +68,14 @@ changes/<name>/
|
|
|
57
68
|
└── migration/ # Incremental migration scripts
|
|
58
69
|
```
|
|
59
70
|
|
|
71
|
+
**product 模式**(v0.36.0):产出在 `docs/architecture/iterations/vN/architecture.md`(6 产物:Context Map / 聚合注册表 / 指令事件 / 状态机 / 概念 ER / 时序),`snapshot_status: in-flight`,provenance 标注。**不写全局**(P1:预测态不进实际态)。
|
|
72
|
+
|
|
60
73
|
## Structured Output Contract
|
|
61
74
|
|
|
62
75
|
Return the following YAML to the orchestration layer:
|
|
63
76
|
|
|
64
77
|
```yaml
|
|
78
|
+
# change 模式
|
|
65
79
|
decision: required | skipped
|
|
66
80
|
reason: "..." # skipped: why no architecture changes
|
|
67
81
|
# required: summary of architecture changes
|
|
@@ -71,6 +85,12 @@ artifacts: # required: list of produced files, skipped: em
|
|
|
71
85
|
- architecture/api.md
|
|
72
86
|
- architecture/sql/ddl/...
|
|
73
87
|
- architecture/sql/migration/...
|
|
88
|
+
|
|
89
|
+
# product 模式(v0.36.0)
|
|
90
|
+
decision: completed | skipped # completed: 8 步设计完成;skipped: 迭代无结构性变更(须物化 SKIPPED 标记)
|
|
91
|
+
reason: "..."
|
|
92
|
+
snapshot_path: docs/architecture/iterations/vN/architecture.md
|
|
93
|
+
verdict: pending_review # 评审门(architecture-reviewer product 视角)在产出后进行
|
|
74
94
|
```
|
|
75
95
|
|
|
76
96
|
## api.md Positioning — Architecture Routing Table
|
|
@@ -92,7 +112,7 @@ artifacts: # required: list of produced files, skipped: em
|
|
|
92
112
|
|
|
93
113
|
**DON'T:**
|
|
94
114
|
- Skip the five-check gate and jump to design
|
|
95
|
-
- Load `baseline.md
|
|
115
|
+
- Load `baseline.md`(change 模式遵循 Skill 加载协议;**product 模式**须读 baseline.md + CONCEPTS.md 作输入,见 s3.5-product-architecture.md)
|
|
96
116
|
- Embed SQL in markdown code blocks (use sql/ directory)
|
|
97
117
|
- Produce api.md with Swagger-level detail (that's Swagger's job)
|
|
98
118
|
- Produce artifacts when decision is `skipped`
|
|
@@ -11,7 +11,7 @@ You are an independent Architecture Consistency Reviewer. You check whether arch
|
|
|
11
11
|
|
|
12
12
|
## The Iron Law
|
|
13
13
|
|
|
14
|
-
You are an independent reviewer. You did NOT participate in producing the architecture design. You read the deliverables fresh, compare them against the baseline and requirements, and report findings. You must NEVER write, edit, create, or delete any file. Your report is delivered in your response — the orchestration layer persists it to `changes/<name>/architecture/auto-review.md
|
|
14
|
+
You are an independent reviewer. You did NOT participate in producing the architecture design. You read the deliverables fresh, compare them against the baseline and requirements, and report findings. You must NEVER write, edit, create, or delete any file. Your report is delivered in your response — the orchestration layer persists it to `changes/<name>/architecture/auto-review.md`(change 模式)或 `docs/architecture/iterations/vN/auto-review.md`(product 模式,v0.36.0).
|
|
15
15
|
|
|
16
16
|
## Inputs
|
|
17
17
|
|
|
@@ -23,20 +23,24 @@ You are an independent reviewer. You did NOT participate in producing the archit
|
|
|
23
23
|
| `architecture_dir` | 架构产出目录(e.g., `changes/<name>/architecture/`) |
|
|
24
24
|
| `global_arch_dir` | 全局架构目录(e.g., `docs/architecture/`) |
|
|
25
25
|
| `conventions_config` | conventions 配置(从 team-flow.config.json 读取的路径映射) |
|
|
26
|
-
| `review_mode` | `change`(默认,审查 `changes/<name>/architecture/` 三件套)\| `product`(v0.
|
|
26
|
+
| `review_mode` | `change`(默认,审查 `changes/<name>/architecture/` 三件套)\| `product`(v0.36.0,审查 `docs/architecture/iterations/vN/architecture.md` 产品级快照) |
|
|
27
|
+
| `product_snapshot_path` | docs/architecture/iterations/vN/architecture.md(product 模式审查对象;v0.36.2 起 dispatch 传入) |
|
|
27
28
|
|
|
28
|
-
If change_brief_path or architecture_dir is missing or unreadable
|
|
29
|
+
If change_brief_path or architecture_dir is missing or unreadable **in change mode**, report `FAIL` with reason `INPUT_ERROR`. In product mode,`change_brief_path` 可选(A4 对照源是 PRD 非 change-brief),审查对象是 `product_snapshot_path`;`product_snapshot_path` 缺失 → FAIL `INPUT_ERROR`。
|
|
29
30
|
|
|
30
|
-
## Product Mode(v0.
|
|
31
|
+
## Product Mode(v0.36.0,v0.14 §60.5)
|
|
31
32
|
|
|
32
33
|
`review_mode: product` 时(S3.5 产品级评审门),审查对象与维度适配变化:
|
|
33
34
|
|
|
34
|
-
- **审查对象**:`docs/architecture/iterations/vN/architecture.md
|
|
35
|
-
- **A1**:6 产物章节存在 + marker 成对 + anchor id
|
|
35
|
+
- **审查对象**:`product_snapshot_path`(`docs/architecture/iterations/vN/architecture.md`,6 产物:Context Map / 聚合注册表 / 指令事件 / 状态机 / 概念 ER / 时序)+ `domains/` 按域详细页;**不审查** change 内三件套。
|
|
36
|
+
- **A1**:6 产物章节存在 + marker 成对 + anchor id 可解析(机械预检);**不执行** change 模式的 `test -f architecture/{architecture,database,api}.md`。
|
|
37
|
+
- **A2**:SQL/结构有效(若快照含 sql/ 引用;机械 grep)。
|
|
38
|
+
- **A3**:对照 `references/s3.5-architecture-template.md`(产品级模板),非 `templates/architecture.md`(变更级模板)。
|
|
36
39
|
- **A4**:对照 PRD 功能清单(F001_P0 逐条)→ BC/聚合/API 全覆盖映射;对照源是 PRD(非 change-brief——change-brief 是变更级输入)。
|
|
37
40
|
- **A5**:旧项目逆向重建场景对照现状代码/全局基线;正向设计场景仅检查与既有基线无矛盾。
|
|
38
41
|
- **A6**:conventions 合规(同 change 模式)。
|
|
39
42
|
- **skip 处理**:S3.5 显式跳过(`iterations/vN/SKIPPED` 标记)时本 agent 不执行。
|
|
43
|
+
- **报告落盘**:product 模式评审报告落盘 `docs/architecture/iterations/vN/auto-review.md`(非 `changes/<name>/architecture/auto-review.md`——product 模式无 change 目录)。
|
|
40
44
|
|
|
41
45
|
## 6-Dimension Checklist
|
|
42
46
|
|
|
@@ -103,6 +107,7 @@ Dimensions requiring semantic understanding, marked as "advisory, false positive
|
|
|
103
107
|
- Read global `ARCHITECTURE.md` → check naming conventions, BC boundaries
|
|
104
108
|
- Read global `PHYSICAL-MODEL.md` → check table naming patterns, field conventions
|
|
105
109
|
- Read global `API-INDEX.md` → check API routing patterns
|
|
110
|
+
- Read product snapshot `docs/architecture/iterations/<vN>/architecture.md`(若存在,v0.36.0)→ 对照产品级 BC 边界/聚合注册表(变更级增量不得与产品级决策矛盾)
|
|
106
111
|
- Compare incremental design against baseline:
|
|
107
112
|
- Aggregate naming conflicts with existing aggregates → Critical
|
|
108
113
|
- Table naming conflicts with PHYSICAL-MODEL → Critical
|
|
@@ -20,6 +20,7 @@ You are a read-only checker. You did NOT implement any change. You read all chan
|
|
|
20
20
|
|-----------|-------------|
|
|
21
21
|
| `change_dirs[]` | 多个 change 目录路径(e.g., `changes/change-1/`, `changes/change-2/`) |
|
|
22
22
|
| `arch_path` | 全局架构目录(e.g., `docs/architecture/`,含 ARCHITECTURE.md / DATABASE.md) |
|
|
23
|
+
| `product_snapshot_path` | 产品级架构快照 `docs/architecture/iterations/vN/architecture.md`(v0.36.3;聚合注册表唯一事实源,若存在) |
|
|
23
24
|
| `prototype_path` | 全局原型目录(e.g., `prototype/`) |
|
|
24
25
|
|
|
25
26
|
If `change_dirs` has fewer than 2 entries, Dim 1/2 are skipped (single change has no cross-change conflict). If `arch_path` or `prototype_path` is missing, the corresponding dimension is skipped with a note.
|
|
@@ -81,7 +82,7 @@ Use `grep` to search for API references across change specs and design docs.
|
|
|
81
82
|
1. **Enumerate changes**: read each change directory's spec/design/tasks files
|
|
82
83
|
2. **Dim 1**: Extract modified domain files per change, build mutation map, identify overlaps
|
|
83
84
|
3. **Dim 2**: Extract API surface changes per change, cross-reference dependencies
|
|
84
|
-
4. **Dim 3**: Read architecture anchors
|
|
85
|
+
4. **Dim 3**: Read architecture anchors **+ 产品级快照聚合注册表**(`product_snapshot_path`,v0.36.3——聚合注册表是唯一事实源,跨 change 冲突检测以它为准),compare each change against them
|
|
85
86
|
5. **Dim 4**: Scan prototype testids, compare against change implementations
|
|
86
87
|
6. **Aggregate**: collect all findings, grade by severity, produce report
|
|
87
88
|
|
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.36.
|
|
129
|
+
- Current: `v0.36.3`
|
|
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)
|
package/gemini-extension.json
CHANGED
|
@@ -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). 24 skills, one install.",
|
|
4
|
-
"version": "0.36.
|
|
4
|
+
"version": "0.36.3",
|
|
5
5
|
"contextFileName": "GEMINI.md"
|
|
6
6
|
}
|
package/hooks/pre-tool-use-guard
CHANGED
|
@@ -142,6 +142,21 @@ if [ -n "$file_path" ] && [ "${file_path##*/}" != ".team-flow.yaml" ]; then
|
|
|
142
142
|
esac
|
|
143
143
|
fi
|
|
144
144
|
|
|
145
|
+
# --- v0.36.3 (§7.3): product-level architecture dir exemption ---------------
|
|
146
|
+
# ARCH 阶段(S3.5)写 docs/architecture/iterations/ 快照、SKIPPED 标记、
|
|
147
|
+
# .team-flow/ 产品级状态(orchestrator.yaml)是合法非 build 态写入。
|
|
148
|
+
# .team-flow.yaml(change 状态)不在豁免内(state 禁写红线保留)。
|
|
149
|
+
if [ -n "$file_path" ]; then
|
|
150
|
+
case "$file_path" in
|
|
151
|
+
*/docs/architecture/iterations/*) allow ;;
|
|
152
|
+
*/.team-flow/*) allow ;;
|
|
153
|
+
esac
|
|
154
|
+
case "${file_path#/private}" in
|
|
155
|
+
*/docs/architecture/iterations/*) allow ;;
|
|
156
|
+
*/.team-flow/*) allow ;;
|
|
157
|
+
esac
|
|
158
|
+
fi
|
|
159
|
+
|
|
145
160
|
# --- decision --------------------------------------------------------------
|
|
146
161
|
case "$state" in
|
|
147
162
|
approved-for-build|executing|debugging)
|
package/hooks/session-start
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# v0.36.
|
|
2
|
+
# v0.36.3: 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.36.
|
|
8
|
+
PLUGIN_VERSION="0.36.3"
|
|
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.36.
|
|
6
|
+
Current version: v0.36.3.
|
|
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.36.
|
|
3
|
+
"version": "0.36.3",
|
|
4
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",
|
package/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-flow",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.3",
|
|
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"
|
|
@@ -39,30 +39,45 @@ export function isLegacyArch(state) {
|
|
|
39
39
|
return state?.arch_baseline == null;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
/**
|
|
43
|
-
export function
|
|
42
|
+
/** 列出所有迭代目录(数字排序,v10 正确处理——字典序 v10 < v2 会取错最新)。 */
|
|
43
|
+
export function listIterationDirs(root) {
|
|
44
44
|
const iterationsDir = root && path.join(root, 'docs', 'architecture', 'iterations');
|
|
45
|
-
if (!iterationsDir || !fs.existsSync(iterationsDir)) return
|
|
45
|
+
if (!iterationsDir || !fs.existsSync(iterationsDir)) return [];
|
|
46
46
|
return fs.readdirSync(iterationsDir, { withFileTypes: true })
|
|
47
47
|
.filter(d => d.isDirectory())
|
|
48
|
-
.
|
|
48
|
+
.map(d => d.name)
|
|
49
|
+
.sort((a, b) => {
|
|
50
|
+
const na = parseInt(a.replace(/\D/g, ''), 10) || 0;
|
|
51
|
+
const nb = parseInt(b.replace(/\D/g, ''), 10) || 0;
|
|
52
|
+
return na - nb;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** 最新迭代目录路径(数字排序后最后)。无迭代 → null。 */
|
|
57
|
+
export function findLatestIterationDir(root) {
|
|
58
|
+
const dirs = listIterationDirs(root);
|
|
59
|
+
if (dirs.length === 0) return null;
|
|
60
|
+
return path.join(root, 'docs', 'architecture', 'iterations', dirs[dirs.length - 1]);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* skip 物化检查:只认最新迭代目录的 SKIPPED(v0.36.3 修复——防旧迭代陈旧标记
|
|
65
|
+
* 错误豁免新迭代的结构性变更,P3 原则要防的失效模式)。
|
|
66
|
+
*/
|
|
67
|
+
export function isArchSkipMaterialized(root) {
|
|
68
|
+
const latest = findLatestIterationDir(root);
|
|
69
|
+
if (!latest) return false;
|
|
70
|
+
return fs.existsSync(path.join(latest, 'SKIPPED'));
|
|
49
71
|
}
|
|
50
72
|
|
|
51
73
|
/** 最近一个迭代的产品级架构快照路径(iterations/<latest>/architecture.md)。不存在 → null。 */
|
|
52
74
|
export function findLatestIterationSnapshot(root) {
|
|
53
|
-
const
|
|
54
|
-
if (!
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
.map(d => d.name)
|
|
58
|
-
.sort();
|
|
59
|
-
for (let i = dirs.length - 1; i >= 0; i--) {
|
|
60
|
-
const snap = path.join(iterationsDir, dirs[i], 'architecture.md');
|
|
61
|
-
if (fs.existsSync(snap)) return snap;
|
|
62
|
-
}
|
|
63
|
-
return null;
|
|
75
|
+
const latest = findLatestIterationDir(root);
|
|
76
|
+
if (!latest) return null;
|
|
77
|
+
const snap = path.join(latest, 'architecture.md');
|
|
78
|
+
return fs.existsSync(snap) ? snap : null;
|
|
64
79
|
}
|
|
65
80
|
|
|
66
81
|
export const ARCH_READINESS_FAIL_HINT =
|
|
67
|
-
'iterations
|
|
68
|
-
+ '或显式 skip 物化(iterations
|
|
82
|
+
'iterations/<vN>/architecture.md missing — 回 ARCH 阶段补快照,'
|
|
83
|
+
+ '或显式 skip 物化(iterations/<vN>/SKIPPED 标记 + 理由)';
|
|
@@ -31,5 +31,12 @@ export function checkArchSnapshot(changeDir) {
|
|
|
31
31
|
const snap = findLatestIterationSnapshot(root);
|
|
32
32
|
if (snap) return { pass: true, failures: [] };
|
|
33
33
|
|
|
34
|
+
// v0.36.3 §63.4 在途 change 兜底:快照缺失但 change 已有增量产物 → 以 change 产物为实际态(存量升级场景)
|
|
35
|
+
const archDir = join(changeDir, 'architecture');
|
|
36
|
+
if (existsSync(archDir) && existsSync(join(archDir, 'architecture.md'))) {
|
|
37
|
+
console.warn(' [WARN] arch-snapshot: 产品级快照缺失,以 change 增量产物兜底(存量升级在途 change,快照后补为 v0)');
|
|
38
|
+
return { pass: true, failures: [] };
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
return { pass: false, failures: [ARCH_READINESS_FAIL_HINT] };
|
|
35
42
|
}
|
|
@@ -120,9 +120,10 @@ function buildCurrentStateSection(aggregates, changeName) {
|
|
|
120
120
|
lines.push(`| ${bc} | ${aggs.length} |`);
|
|
121
121
|
}
|
|
122
122
|
lines.push('', '### 聚合注册表');
|
|
123
|
-
|
|
123
|
+
// v0.36.3 §62.1 首轮特例:全局聚合全部来自已合并 change(=已落地态);状态列标注
|
|
124
|
+
lines.push('| 聚合ID | 上下文 | 根实体 | 来源 | 状态 | 关键不变量 |', '|--------|--------|--------|------|------|-----------|');
|
|
124
125
|
for (const a of aggregates) {
|
|
125
|
-
lines.push(`| ${a.id} | ${a.context} | ${a.root} | change:${changeName} | ${a.invariants || '—'} |`);
|
|
126
|
+
lines.push(`| ${a.id} | ${a.context} | ${a.root} | change:${changeName} | 已落地 | ${a.invariants || '—'} |`);
|
|
126
127
|
}
|
|
127
128
|
return lines.join('\n');
|
|
128
129
|
}
|
|
@@ -224,10 +225,19 @@ function generateDatabase(globalArchDir, schemaPath) {
|
|
|
224
225
|
return { generated: true, file: 'DATABASE.md', tables: tables.length };
|
|
225
226
|
}
|
|
226
227
|
|
|
228
|
+
/** v0.36.3 §62.4:判断 change 是否已关闭(读 .team-flow.yaml state)。 */
|
|
229
|
+
function isChangeClosed(changeRoot) {
|
|
230
|
+
const stateFile = join(changeRoot, '.team-flow.yaml');
|
|
231
|
+
if (!existsSync(stateFile)) return false;
|
|
232
|
+
const m = readFileSync(stateFile, 'utf-8').match(/^state:\s*(.*)$/m);
|
|
233
|
+
const state = m ? m[1].trim() : '';
|
|
234
|
+
return state === 'closed' || state === 'closing';
|
|
235
|
+
}
|
|
236
|
+
|
|
227
237
|
/**
|
|
228
238
|
* Step 6: API-INDEX.md 生成式(api-scan 核心)。
|
|
229
239
|
* 扫描项目根下所有已关闭 change 的 architecture/api.md + domains/,归一化端点重建。
|
|
230
|
-
*
|
|
240
|
+
* 保护:①重建结果为空 → 拒绝覆盖(防历史手工端点被抹);②只扫已关闭 change(v0.36.3,在途半成品端点不得入全局)。
|
|
231
241
|
*/
|
|
232
242
|
function generateApiIndex(projectRoot, globalArchDir, changeName) {
|
|
233
243
|
const changesDir = join(projectRoot, 'changes');
|
|
@@ -237,7 +247,9 @@ function generateApiIndex(projectRoot, globalArchDir, changeName) {
|
|
|
237
247
|
const endpoints = [];
|
|
238
248
|
if (existsSync(changesDir)) {
|
|
239
249
|
for (const changeDirName of readdirSync(changesDir)) {
|
|
240
|
-
const
|
|
250
|
+
const changeRoot = join(changesDir, changeDirName);
|
|
251
|
+
if (!isChangeClosed(changeRoot)) continue; // v0.36.3:只扫已关闭 change
|
|
252
|
+
const apiPath = join(changeRoot, 'architecture', 'api.md');
|
|
241
253
|
if (!existsSync(apiPath)) continue;
|
|
242
254
|
const ep = extractEndpoints(readFileSync(apiPath, 'utf-8'));
|
|
243
255
|
for (const e of ep) endpoints.push({ ...e, source: changeDirName });
|
|
@@ -378,14 +390,17 @@ function preCheck(changeDir, archDir, projectRoot) {
|
|
|
378
390
|
/* ============ Step 5: 变更脚本归档(保留) ============ */
|
|
379
391
|
|
|
380
392
|
function archiveChangeScripts(changeDir, archDir, globalArchDir, changeName) {
|
|
381
|
-
const report = { ddl: 0, migration: 0 };
|
|
393
|
+
const report = { ddl: 0, migration: 0, files: [] };
|
|
382
394
|
for (const subDir of ['ddl', 'migration']) {
|
|
383
395
|
const srcDir = join(archDir, 'sql', subDir);
|
|
384
396
|
const dstDir = join(globalArchDir, 'changelog', subDir);
|
|
385
397
|
if (!existsSync(srcDir)) continue;
|
|
386
398
|
if (!existsSync(dstDir)) makeDir(dstDir);
|
|
387
399
|
const files = readdirSync(srcDir).filter(f => f.endsWith('.sql'));
|
|
388
|
-
for (const f of files)
|
|
400
|
+
for (const f of files) {
|
|
401
|
+
copyFile(join(srcDir, f), join(dstDir, f));
|
|
402
|
+
report.files.push(join(dstDir, f)); // v0.36.3:changelog 文件入白名单(防自我制造脏文件告警)
|
|
403
|
+
}
|
|
389
404
|
report[subDir] += files.length;
|
|
390
405
|
}
|
|
391
406
|
return report;
|
|
@@ -513,6 +528,7 @@ export function run(args = {}) {
|
|
|
513
528
|
join(globalArchDir, 'schema-baseline.sql'),
|
|
514
529
|
join(globalArchDir, 'API-INDEX.md'),
|
|
515
530
|
join(globalArchDir, 'INDEX.md'),
|
|
531
|
+
...(archiveResult.files || []), // v0.36.3:changelog/ 复制文件入白名单
|
|
516
532
|
].filter(p => existsSync(p));
|
|
517
533
|
const dirty = detectUntouchedDirtyFiles(globalArchDir, touchedFiles);
|
|
518
534
|
if (dirty.length > 0) {
|
|
@@ -299,6 +299,32 @@ function checkChangeTestGates(root) {
|
|
|
299
299
|
return { pass: true, message: `${checked} change(s) pass test-gate hygiene (skip reasons + artifact references)` };
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
+
// v0.36.3 建议项:arch-state / iterations 一致性体检
|
|
303
|
+
// 1. arch_baseline 已打戳但 iterations/ 无任何产品级快照 → arch 门禁将 FAIL(需回 ARCH 补快照)
|
|
304
|
+
// 2. SKIPPED 与快照并存 → 语义矛盾
|
|
305
|
+
function checkArchState(root) {
|
|
306
|
+
const warnings = [];
|
|
307
|
+
const archStatePath = join(root, '.team-flow', 'arch-state.json');
|
|
308
|
+
const iterationsDir = join(root, 'docs', 'architecture', 'iterations');
|
|
309
|
+
if (existsSync(archStatePath)) {
|
|
310
|
+
const hasSnapshot = existsSync(iterationsDir)
|
|
311
|
+
&& readdirSync(iterationsDir, { withFileTypes: true })
|
|
312
|
+
.filter(d => d.isDirectory())
|
|
313
|
+
.some(d => existsSync(join(iterationsDir, d.name, 'architecture.md')));
|
|
314
|
+
if (!hasSnapshot) {
|
|
315
|
+
warnings.push('arch_baseline 已打戳但 iterations/ 无产品级快照——arch-readiness/arch-snapshot 门禁将 FAIL,需回 ARCH 阶段补快照');
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
if (existsSync(iterationsDir)) {
|
|
319
|
+
for (const d of readdirSync(iterationsDir, { withFileTypes: true }).filter(x => x.isDirectory())) {
|
|
320
|
+
const hasSkip = existsSync(join(iterationsDir, d.name, 'SKIPPED'));
|
|
321
|
+
const hasSnap = existsSync(join(iterationsDir, d.name, 'architecture.md'));
|
|
322
|
+
if (hasSkip && hasSnap) warnings.push(`${d}: SKIPPED 与快照并存,语义矛盾`);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return { pass: warnings.length === 0, message: warnings.length ? warnings.join('; ') : 'arch-state/iterations 一致' };
|
|
326
|
+
}
|
|
327
|
+
|
|
302
328
|
export async function run(args) {
|
|
303
329
|
const root = process.cwd();
|
|
304
330
|
const config = loadConfig(root);
|
|
@@ -317,6 +343,7 @@ export async function run(args) {
|
|
|
317
343
|
['Docs', checkDocs(root)],
|
|
318
344
|
['Change states', checkChangeStates(root)],
|
|
319
345
|
['Change test gates', checkChangeTestGates(root)],
|
|
346
|
+
['Arch state', checkArchState(root)],
|
|
320
347
|
];
|
|
321
348
|
|
|
322
349
|
// Config check
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import { readFileSync, writeFileSync, existsSync, mkdirSync, appendFileSync } from 'node:fs';
|
|
15
15
|
import { join } from 'node:path';
|
|
16
16
|
|
|
17
|
-
const PHASES = ['prd', 'plan', 'prototype', 'spec', 'build', 'review', 'cross-phase'];
|
|
17
|
+
const PHASES = ['prd', 'plan', 'architecture', 'prototype', 'spec', 'build', 'review', 'cross-phase'];
|
|
18
18
|
const MAX_INDEX_LINES = 150;
|
|
19
19
|
|
|
20
20
|
function slugify(text) {
|
|
@@ -90,6 +90,16 @@ description: 基于 4A 企业架构 + DDD 领域驱动设计的架构/API/DB 设
|
|
|
90
90
|
|
|
91
91
|
变更级聚合动作限三类:`extend`(既有聚合加字段/指令/事件/状态)、`new`(新增聚合,flag 登记待产品级晋升)、`refactor`(需决策门)。聚合 id 一律引用产品级注册表,不重定义(防重发明,v0.14 §61.3)。
|
|
92
92
|
|
|
93
|
+
### 架构修订决策门(v0.36.3 定义,v0.14 §61.3/§61.4)
|
|
94
|
+
|
|
95
|
+
**触发**:change 级设计触及产品级决策(BC 边界变更 / 聚合所有权变更 / 全局契约变更),或 arch-merge 冲突预检阻断聚合重定义。
|
|
96
|
+
|
|
97
|
+
**流程**(不硬阻断,显式确认 + 登记 deviation):
|
|
98
|
+
1. **呈现变更摘要**:涉及的产品级决策 + 影响范围(引用快照章节)
|
|
99
|
+
2. **用户确认**(阻塞问题工具):接受 → 执行变更;拒绝 → 保持产品级定义,change 内走增量
|
|
100
|
+
3. **登记 deviation**:确认后写入 `orchestrator.yaml` 的 `replan_log`(`seq/trigger: arch-deviation/before/after/approved_by`)+ 在 `iterations/vN/architecture.md` 演进日志追加修订记录(迭代收尾 S3.5 确认晋升)
|
|
101
|
+
4. **`new` 聚合 flag**:在 `iterations/vN/architecture.md` 聚合注册表标注 `[pending-promotion]`,待下一迭代产品级晋升
|
|
102
|
+
|
|
93
103
|
### 执行流程
|
|
94
104
|
|
|
95
105
|
```
|
|
@@ -182,6 +192,10 @@ architecture-design 执行时的上下文组装:
|
|
|
182
192
|
3. 读取匹配的 `.team-flow/conventions/*.md` 文件
|
|
183
193
|
4. 注入为架构决策约束(advisory 级)
|
|
184
194
|
|
|
195
|
+
**架构复利注入(v0.36.3,复利链路修复)**:
|
|
196
|
+
1. 执行 `tf solutions inject --phase architecture`(失败静默)——注入 `docs/solutions/` 中 phase=architecture 的历史架构决策经验(BC 边界取舍/聚合划分理由/事件投影设计踩坑)
|
|
197
|
+
2. 读取失败 / 无条目 → 静默跳过,不阻断(advisory 级,与 S1 复利注入同语义)
|
|
198
|
+
|
|
185
199
|
**始终加载**:
|
|
186
200
|
1. `Read docs/architecture/INDEX.md`(~50行摘要)
|
|
187
201
|
2. `Read changes/<name>/change-brief.md`(如有)
|
|
@@ -38,14 +38,14 @@ changes/<name>/ # change 容器
|
|
|
38
38
|
|
|
39
39
|
## 复利回写(借鉴 ce-compound,已正名)
|
|
40
40
|
- **one change per run**:一次回写一个变更 delta,可追溯、不混杂。
|
|
41
|
-
- 全局 ARCHITECTURE.md
|
|
41
|
+
- 全局 ARCHITECTURE.md 维护双视图(v0.36.0 实现为 marker 区 + 演进日志):`<!-- arch:current-state:begin/end -->` marker 区(覆盖式,arch-merge 代码独占写 + 成对校验,每 BC/聚合仅留最新有效定义)+ `## 演进日志`(changeName 去重,替代原 append-only 重复标题)。
|
|
42
42
|
- **架构一致性/漂移检查**(独立于 Discoverability):①结构冲突(重复 BC/聚合 key)②语义冲突(同义异名,如客户vs用户)③跨域一致性门禁(AA≥1 IA 实体,反之亦然)。
|
|
43
43
|
- **Discoverability 正名**:在 AGENTS.md/CLAUDE.md 暴露 `docs/architecture/`,使代理设计前"发现并查阅"(存在/结构/何时检索)——这是 compound 原义,勿与内容冲突检查混淆。
|
|
44
44
|
- 下游检索复用:下一 change 设计前从 `docs/architecture/` 检索相关上下文/聚合(grounding 用 CONCEPTS.md)。
|
|
45
45
|
|
|
46
46
|
## 集成纪律(来自 team-flow 源码事实)
|
|
47
47
|
- **design.md 不可变**:原型覆盖层 never mutate design.md/tasks.md。原型结论走 `handoff --type prototype` → 新 requirement delta → 正常 `specifying→closing→spec-merger` 闭环,不得直接改 design.md。
|
|
48
|
-
- **guard
|
|
48
|
+
- **guard 软集成**:三份增量文档为推荐产出、非阻断;全局回写经 `tf arch-merge` 命令(v0.36.0 重构:当前态幂等 upsert + 生成式 PHYSICAL-MODEL/DATABASE/API-INDEX + 冲突预检 + 并发安全,原 arch-compound skill/overlay 概念已由该命令承接);frontmatter 校验仅 advisory 脚本(正则提取 key,不引第三方 YAML 依赖),保全零依赖。
|
|
49
49
|
- **术语正名**:IA/AA 非"技术架构"(仅 TA 是);4A 是四域非三层;技术架构对 STRATEGY.md 是"补位 compound 缺位"而非"修正其错误",且 ARCHITECTURE.md 是 anchor 而非评审巨著。
|
|
50
50
|
|
|
51
51
|
## 第二大脑整合(ima「LT的知识库」)
|
|
@@ -142,7 +142,7 @@ flowchart LR
|
|
|
142
142
|
| v1 | <date> | 初始设计 |
|
|
143
143
|
|
|
144
144
|
<!-- arch:current-state:begin -->
|
|
145
|
-
<!-- 此 marker
|
|
145
|
+
<!-- 此 marker 区是 arch-merge 全局覆盖写机制的模板约定(v0.36.0);快照本身不被 arch-merge 写(P1:预测态不进实际态),迭代收尾由 S5 标 snapshot_status=archived -->
|
|
146
146
|
<!-- arch:current-state:end -->
|
|
147
147
|
````
|
|
148
148
|
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
|
|
36
36
|
## 与既有加载协议的关系
|
|
37
37
|
|
|
38
|
-
- 本协议**扩展** architecture-design SKILL.md
|
|
38
|
+
- 本协议**扩展** architecture-design SKILL.md「上下文加载协议」,不替代(引用标题而非行号,防漂移)。
|
|
39
39
|
- 变更级 architecture-design 的输入 = 本协议 ① + ②(产品级)+ ③(变更增量);语义层(五项检查判定、评审)仍走既有流程。
|
|
40
40
|
- S3.5 产品级评审门(architecture-reviewer product 视角 A1-A6)验证产物结构满足本协议(A1 结构完备 + A2 marker/锚点可解析),保证下游可按域加载。
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
|
|
32
32
|
**顺序纪律**:聚合在前、ER 在后(ER 是派生产物,禁止先画 ER 再定聚合);BC 边界/聚合所有权/全局契约是**产品级唯一事实源**(聚合注册表),变更级只引用。
|
|
33
33
|
|
|
34
|
+
**按域详细页产出(v0.36.3,domains/ 生产者)**:Step 1 识别 BC 后、Step 2-6 每个触及域细化时,同步产出 `domains/<bc>.md`(职责/聚合明细/指令事件/状态迁移/ER 局部/时序/对外契约)与 `diagrams/`(erd/sequences)——它们是按域分段加载(`s3.5-loading-protocol.md` 第②段)与 reviewer product A1 的审查对象;单文件 ≤1500 token。
|
|
35
|
+
|
|
34
36
|
**模板**:按 `references/s3.5-architecture-template.md` 骨架产出(6 产物 + 厚锚点 + marker + provenance)。
|
|
35
37
|
|
|
36
38
|
## 产品级评审门(Step 8)
|
|
@@ -49,6 +51,15 @@
|
|
|
49
51
|
规则:≤3 轮修复循环 + 收敛检测(连续两轮不一致项不缩小 → 转人工);PASS 才进 S4。
|
|
50
52
|
**skip 时**:architecture-reviewer 不执行,但 skip 必须物化(iterations/vN/SKIPPED 标记 + 理由)。
|
|
51
53
|
|
|
54
|
+
### 复利捕获(Step 9,v0.36.3 复利链路修复)
|
|
55
|
+
|
|
56
|
+
评审 PASS 后,捕获本次架构设计产生的可复用决策经验(advisory 级,捕获失败不阻断):
|
|
57
|
+
|
|
58
|
+
- **触发场景**:BC 边界取舍、聚合划分理由、事件/读模型投影设计模式、技术选型决策、逆向重建低置信度修正
|
|
59
|
+
- **命令**:`tf solutions capture --phase architecture --domain <触及BC> --type pitfall|pattern --severity medium --summary "<经验>"`(source: `iterations/vN/architecture.md`)
|
|
60
|
+
- **注入端**:后续架构设计(变更级/产品级)执行时 `tf solutions inject --phase architecture` 自动注入这些经验(architecture-design 加载协议,v0.36.3)
|
|
61
|
+
- **晋升说明**:产品级架构经验直接 capture 写 `docs/solutions/`(不走 change 级 promote——promote 只认 `learnings.md`,是变更级机制)
|
|
62
|
+
|
|
52
63
|
## 正向设计 vs 逆向重建
|
|
53
64
|
|
|
54
65
|
| 维度 | 正向设计(全新/已建档) | 逆向重建(旧项目首轮) |
|
|
@@ -59,7 +70,7 @@
|
|
|
59
70
|
| provenance | forward-designed | reverse-engineered + 置信度(high/medium/low) |
|
|
60
71
|
| 深度 | L0 骨架 + 触及域深化 | 同(首轮强制 L0 骨架,见 v0.14 §63.3) |
|
|
61
72
|
|
|
62
|
-
逆向重建工具:`workflow-bootstrap` 的 recon-probe.sh(--ddl-out
|
|
73
|
+
逆向重建工具:`workflow-bootstrap` 的 recon-probe.sh(--ddl-out,路径 `${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh`)+ codebase-recon-analyst + 新增 `arch-reverse-analyst`(v0.14 §63.2)。
|
|
63
74
|
|
|
64
75
|
## 完成条件
|
|
65
76
|
|
|
@@ -67,6 +78,7 @@
|
|
|
67
78
|
- 产品级评审门 verdict = PASS(或 skip 已物化)
|
|
68
79
|
- orchestrator.yaml 中 ARCH 阶段状态 = completed(workflow_phase: architecture)
|
|
69
80
|
- **未触发** arch-merge 全局覆盖写(预测态不进实际态,P1)
|
|
81
|
+
- **架构基线打戳(v0.36.3)**:首轮项目(`arch_baseline` 缺失)评审 PASS 后执行 `tf arch init --mode reconstruction --baseline-ref prd/vN/`(旧项目逆向重建)或 `--mode design`(全新项目正向设计)——arch-readiness/arch-snapshot 门禁的豁免键在此建立,项目进入「已建档」正轨
|
|
70
82
|
|
|
71
83
|
## 常见陷阱
|
|
72
84
|
|
|
@@ -20,6 +20,9 @@ ce-compound 从"手动触发的记录工具"升级为"复利贯穿引擎的执
|
|
|
20
20
|
- change 执行中超出原始 scope(phase=build, type=pitfall)
|
|
21
21
|
- re-bridge 触发(phase=spec, type=pitfall)
|
|
22
22
|
- mandatory rewind 触发(phase=cross-phase, type=pitfall)
|
|
23
|
+
- 架构评审 FAIL 反复修正(phase=architecture, type=pitfall,v0.36.3 新增)
|
|
24
|
+
- 架构修订决策门触发(phase=architecture, type=pattern,v0.36.3 新增)
|
|
25
|
+
- 逆向重建低置信度决策(phase=architecture, type=pattern,v0.36.3 新增)
|
|
23
26
|
|
|
24
27
|
## 被流程自动调用
|
|
25
28
|
|
|
@@ -125,6 +125,8 @@ If implementation diverged from the contract, return to `bridging` before closur
|
|
|
125
125
|
|
|
126
126
|
Run `tf state transition <change-dir> closing`. If delta specs exist, route to `spec-merger`.
|
|
127
127
|
|
|
128
|
+
**架构快照门禁(arch-snapshot,v0.36.0 / v0.36.3)**:`executing→closing` 挂 `arch-snapshot` 维度——本轮迭代产品级架构快照 `iterations/vN/architecture.md` 必须已落盘("先快照后回写"强制化)。**FAIL 升级路径**:回 orchestrator 的 ARCH 阶段补快照;存量升级在途 change(快照缺失但 change 有增量产物)→ WARN 兜底放行;`arch_baseline` 缺失 → WARN 不阻断。hotfix/tweak 豁免(不挂该维度)。判定逻辑见 `scripts/guard/checks/arch-gate-exemptions.mjs`。
|
|
129
|
+
|
|
128
130
|
### Architecture Merge (v0.10 §28-§31) — MUST run first
|
|
129
131
|
|
|
130
132
|
Merge change-level architecture artifacts to the global `docs/architecture/` baseline **before** any other post-verification step:
|
|
@@ -56,7 +56,7 @@ Do NOT invoke for:
|
|
|
56
56
|
> **硬原则**:主代理只编排(派发 + 汇总 + 写 baseline.md),侦察执行下沉子代理(§18.1 交接协议)。先跑确定性脚本固定化采集基底,再派子代理做语义增强——**可复现、可横展对比**。
|
|
57
57
|
|
|
58
58
|
- **模式**(询问用户):Quick(默认,技术栈+模块+架构模式+测试文档,~2 分钟)/ Deep(+数据模型+API 表面,~10 分钟)。
|
|
59
|
-
- **B1.1 脚本采集**:`bash scripts/recon-probe.sh --root <根> --out /tmp/recon-<slug>.json`(固定化,两次接入结果一致)。
|
|
59
|
+
- **B1.1 脚本采集**:`bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --root <根> --out /tmp/recon-<slug>.json`(固定化,两次接入结果一致)。
|
|
60
60
|
- **B1.2 并行子代理**:读 `references/agents/codebase-recon-analyst.md`,把 JSON 路径作 `recon_json` 入参,按维度并行派发(§18.1 返回)。
|
|
61
61
|
- **B1.3 主代理汇总**:只汇总不重新侦察,整合已有文档(合并而非覆盖,标注来源),写 `docs/architecture/baseline.md`。
|
|
62
62
|
|
|
@@ -124,7 +124,7 @@ Step 1: 询问用户是否有既有成果物
|
|
|
124
124
|
|
|
125
125
|
Step 2: 确定性提取(兜底)
|
|
126
126
|
├── recon-probe.sh DDL 提取能力(v0.24.0 已实现:SQL 文件 / Java Entity / 占位)
|
|
127
|
-
│ bash scripts/recon-probe.sh --root <根> --ddl-out docs/architecture/schema-baseline.sql
|
|
127
|
+
│ bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --root <根> --ddl-out docs/architecture/schema-baseline.sql
|
|
128
128
|
├── 从 schema-baseline.sql 反向生成 PHYSICAL-MODEL.md
|
|
129
129
|
└── 扫描 Controller/Router 类 → 生成 API-INDEX.md
|
|
130
130
|
|
|
@@ -142,8 +142,8 @@ Step 2: 确定性提取(兜底)
|
|
|
142
142
|
|
|
143
143
|
**轻量 vs 完整**:
|
|
144
144
|
- bootstrap 产出的是**基线快照**(As-Is 当前态),不是完整的 4A+DDD 设计
|
|
145
|
-
-
|
|
146
|
-
- 如果用户需要完整架构设计,B2 结束后建议:"
|
|
145
|
+
- 完整的架构演进:既有代码库的**逆向重建**走 workflow-orchestrator 的 ARCH 阶段(S3.5 reconstruction 模式,`arch-reverse-analyst`,v0.36.0);全新架构设计走 ARCH 正向设计
|
|
146
|
+
- 如果用户需要完整架构设计,B2 结束后建议:"基线已建立。如需完整架构设计(逆向重建或正向设计),请进入 workflow-orchestrator 的 ARCH 阶段"(v0.36.3 修正——原指引导向 change 级 skill 已过时)
|
|
147
147
|
|
|
148
148
|
**已有架构文档处理**:
|
|
149
149
|
- 如果 `docs/architecture/ARCHITECTURE.md` 已存在 → 读取并整合,不覆盖
|
|
@@ -190,9 +190,12 @@ Step 2: 确定性提取(兜底)
|
|
|
190
190
|
询问用户:
|
|
191
191
|
|
|
192
192
|
> 您希望从哪个需求开始使用 team-flow?
|
|
193
|
-
> - A) 我有一个具体的功能需求(→ 进入 workflow-orchestrator S1
|
|
193
|
+
> - A) 我有一个具体的功能需求(→ 进入 workflow-orchestrator S1,S3 后进 ARCH 产品级架构设计)
|
|
194
194
|
> - B) 我有一个模糊的产品方向(→ ce-brainstorm)
|
|
195
195
|
> - C) 我只是想建立架构基线,暂不开发新需求(→ 结束)
|
|
196
|
+
> - D) 我想从既有代码逆向重建完整架构(→ 进入 workflow-orchestrator ARCH 阶段 reconstruction 模式,arch-reverse-analyst,v0.36.0;重建 PASS 后 `tf arch init` 打戳)
|
|
197
|
+
|
|
198
|
+
**逆向重建衔接(v0.36.3)**:ARCH 阶段 reconstruction 模式复用本 bootstrap 的 recon-probe.sh(--ddl-out)+ codebase-recon-analyst,并派发 `arch-reverse-analyst` 补 BC/状态/指令事件维度(见 `references/agents/arch-reverse-analyst.md`)。
|
|
196
199
|
|
|
197
200
|
**上下文传递**:
|
|
198
201
|
- 将 `docs/architecture/baseline.md` 和 `docs/architecture/CONCEPTS.md` 的路径传递给 workflow-orchestrator S1
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
## B1.1 确定性脚本采集(先跑,固定化探查)
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
bash scripts/recon-probe.sh --root <项目根> --out /tmp/recon-<slug>.json
|
|
13
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --root <项目根> --out /tmp/recon-<slug>.json
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
固定采集(不依赖 LLM,两次接入结果一致):目录树(限深 4 层)、依赖清单(pom/package.json/requirements/go.mod/build.gradle)、LOC 与文件类型分布、测试文件计数(含 `.test.mjs`/`.spec.mjs`)、DB 迁移文件清单、README/docs 探测。输出结构化 JSON 供子代理消费。脚本只做确定性机械采集(§17.8 第四类载体),语义判断交给子代理 LLM。
|
|
@@ -25,7 +25,7 @@ bash scripts/recon-probe.sh --root <项目根> --out /tmp/recon-<slug>.json
|
|
|
25
25
|
|
|
26
26
|
**用法**:
|
|
27
27
|
```bash
|
|
28
|
-
bash scripts/recon-probe.sh --root <根> --ddl-out docs/architecture/schema-baseline.sql --out /tmp/recon-<slug>.json
|
|
28
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --root <根> --ddl-out docs/architecture/schema-baseline.sql --out /tmp/recon-<slug>.json
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
**JSON 输出字段**:`ddl_extraction.source`(sql_files / java_entity / none)、`ddl_extraction.table_count`、`ddl_extraction.tables[]`、`ddl_extraction.ddl_statements`
|
|
@@ -83,7 +83,7 @@ prd_draft → user_review → prototype_loop → prd_frozen → completed
|
|
|
83
83
|
|
|
84
84
|
**评审门**:产出经 architecture-reviewer product 视角(`review_mode: product`,A1-A6)评审,**PASS 才进 S4**。
|
|
85
85
|
|
|
86
|
-
**输出契约**:`docs/architecture/iterations/vN/architecture.md` + 评审 verdict;`orchestrator.yaml` 中 ARCH phase 状态 = completed(`workflow_phase: architecture
|
|
86
|
+
**输出契约**:`docs/architecture/iterations/vN/architecture.md` + 评审 verdict;`orchestrator.yaml` 中 ARCH phase 状态 = completed(`workflow_phase: architecture`)。**首轮项目(`arch_baseline` 缺失)评审 PASS 后执行 `tf arch init --mode reconstruction|design --baseline-ref prd/vN/` 打戳**(v0.36.3)——arch 门禁豁免键由此建立,项目进入「已建档」正轨。
|
|
87
87
|
|
|
88
88
|
### S4: 拆分验证与分发
|
|
89
89
|
|
|
@@ -84,6 +84,7 @@ tf state init changes/v1-C2-policy-management
|
|
|
84
84
|
upstream_source: orchestrator # orchestrator | manual | null
|
|
85
85
|
upstream_req_id: <req-id> # 对应 .team-flow/requirements/<req-id>/
|
|
86
86
|
upstream_plan_ref: prd/vN/plan.md # hotfix/快速通道为 null
|
|
87
|
+
upstream_arch_ref: docs/architecture/iterations/vN/architecture.md # 产品级架构快照(v0.36.3);ARCH skip 或 hotfix 为 null
|
|
87
88
|
upstream_change_id: C2 # 对应 change_dag.id
|
|
88
89
|
plan_hash: sha256:<plan.md 内容摘要> # 检测产品层改动后变更层未同步
|
|
89
90
|
---
|
|
@@ -99,7 +100,7 @@ plan_hash: sha256:<plan.md 内容摘要> # 检测产品层改动后变更层
|
|
|
99
100
|
<取自 auditor 报告 Dim1 覆盖矩阵中映射到本 change 的 AC,逐条列出>
|
|
100
101
|
|
|
101
102
|
## 全局技术方向
|
|
102
|
-
<取自 plan.md 高阶技术设计段的要点指针:模块边界/技术选型/数据流方向,供 spec-writer 作 design.md
|
|
103
|
+
<取自 plan.md 高阶技术设计段的要点指针:模块边界/技术选型/数据流方向,供 spec-writer 作 design.md 约束;**BC 边界/聚合所有权以 `upstream_arch_ref` 产品级快照为准**(v0.36.3),plan.md 仅高阶方向>
|
|
103
104
|
|
|
104
105
|
## PRD & plan 引用
|
|
105
106
|
- PRD: prd/vN/prd.md §<相关章节>
|
|
@@ -58,4 +58,5 @@ S5 是动态重规划的主要触发点。当检测到需要重新拆分(跨 c
|
|
|
58
58
|
- 所有 change closed
|
|
59
59
|
- 复利晋升已完成
|
|
60
60
|
- 跨 change 一致性已确认(无未解决冲突)
|
|
61
|
+
- **架构迭代收尾(v0.36.3,快照生命周期)**:本轮迭代 `docs/architecture/iterations/vN/architecture.md` 的 `snapshot_status` 标 `archived`(预测态退役,全局当前态 = 唯一权威,P1)——已建档项目的迭代收尾动作
|
|
61
62
|
- S5 状态 = completed
|
|
@@ -111,7 +111,7 @@ phases:
|
|
|
111
111
|
| 门禁 | 挂点 | 校验 | 豁免 |
|
|
112
112
|
|------|------|------|------|
|
|
113
113
|
| 产品级评审门 | ARCH→S4 | architecture-reviewer product 视角 PASS | skip 时仍要物化标记 |
|
|
114
|
-
| arch-readiness | S4
|
|
114
|
+
| arch-readiness | exploring:specifying(guard 存在性)+ S4 拆分(LLM 覆盖校验) | iterations/vN/ 快照覆盖 change 触及的 BC | arch_baseline 缺失 → WARN 不 FAIL |
|
|
115
115
|
| arch-snapshot | executing→closing | 本轮快照已落盘 | 在途 change legacy 豁免 |
|
|
116
116
|
|
|
117
117
|
## arch_baseline 豁免键(v0.35.0 新增)
|
|
@@ -76,7 +76,7 @@ Guard: `arch_design_decision` in `.team-flow.yaml` is `null` → must run before
|
|
|
76
76
|
|
|
77
77
|
> **⛔ 串行约束(v0.30.0)**:四步严格串行。**修复子代理(architecture-design)完成前 MUST NOT dispatch 审查子代理(architecture-reviewer)**——并行会使审查跑在修复之前、误报"全部未修复"FAIL(来源:workflow-feedback 2026-08-01)。并行白名单:仅多个独立 change 的工作可并行;修复→审查、设计→审查必须串行。
|
|
78
78
|
|
|
79
|
-
1. **Dispatch**: `architecture-design` as sub-agent
|
|
79
|
+
1. **Dispatch**: `architecture-design` as sub-agent(**输入含 `docs/architecture/iterations/<vN>/architecture.md` 产品级架构快照**,v0.36.0——变更级只引用产品级聚合注册表,不重定义)→ returns `decision` + `reason` + `artifacts`。**⛔ 记录子代理 ID**(后续循环修正和 DP-A 调整必须通过此 ID 恢复,禁止启动新子代理)
|
|
80
80
|
2. **Auto-review** (decision=required 时触发): 校验产物文件存在且非空 → dispatch `architecture-reviewer` sub-agent(**记录子代理 ID**)→ FAIL 则通过 **SendMessage 恢复原 architecture-design 子代理**修正(≤3 轮 + 收敛检测,不收敛转人工)→ 报告落盘 `changes/<name>/architecture/auto-review.md`
|
|
81
81
|
3. **Reasonableness check + state write**: PASS/PASS_WITH_WARNINGS → write `arch_design_decision` + `arch_review_*` to yaml; skipped + brief 含架构关键词 → BLOCK; required + artifacts 缺失 → BLOCK; required + auto-review FAIL → BLOCK
|
|
82
82
|
4. **DP-A 用户确认门(v0.29.0 §37)**: 输出架构决策摘要 → AskUserQuestion 确认 → 需要调整时**必须通过 SendMessage 恢复原子代理**修改(禁止主代理直接修改,禁止启动新子代理)→ 修改后 SendMessage 恢复原 reviewer 重新 auto-review → 回到本步骤重新确认。含项目规范变更提示(advisory)。详见 `references/routing-rules.md`「Step 4: DP-A」
|
|
@@ -9,13 +9,16 @@ Change is fuzzy, scope unclear, comparing options, no stable change name.
|
|
|
9
9
|
|
|
10
10
|
Guard: `arch_design_decision` in `.team-flow.yaml` is `null` → must run before spec-writer.
|
|
11
11
|
|
|
12
|
+
**架构门禁(v0.36.0 / v0.36.3)**:`exploring→specifying` 还挂 `arch-readiness` 维度(产品级架构快照 `iterations/vN/architecture.md` 存在 或 ARCH skip 物化 或 在途兜底)。**FAIL 升级路径**:回 orchestrator 的 ARCH 阶段补快照(或确认 ARCH skip 物化);`arch_baseline` 缺失(存量项目)→ WARN 不阻断。判定逻辑见 `scripts/guard/checks/arch-gate-exemptions.mjs`。
|
|
13
|
+
|
|
12
14
|
### Step 1: Dispatch architecture-design sub-agent
|
|
13
15
|
|
|
14
16
|
Dispatch `architecture-design` as sub-agent with inputs:
|
|
15
17
|
- `change-brief.md`(scope / AC / 技术方向)
|
|
16
18
|
- `prd/vN/plan.md` 高阶技术设计段
|
|
19
|
+
- `docs/architecture/iterations/<vN>/architecture.md`(**产品级架构快照,主输入**,v0.36.0)——BC 边界/聚合所有权/全局契约唯一事实源;vN 从 change-brief 的 `upstream_plan_ref`(prd/vN/plan.md)推导;变更级只引用不重定义(触及产品级决策 → 架构修订决策门;仅 change 内细节 → 增量设计)
|
|
17
20
|
- existing `specs/`
|
|
18
|
-
- global `docs/architecture/`(As-Is
|
|
21
|
+
- global `docs/architecture/`(As-Is 基线 + 已落地部分)
|
|
19
22
|
|
|
20
23
|
**⛔ 子代理 ID 记录(v0.29.0 §37,必须执行)**:dispatch 后**立即记录**子代理 ID(Agent 工具返回的 `agentId` 或 task-notification 中的 `task-id`),后续 Step 2 审查循环和 Step 4 DP-A 调整**必须通过此 ID 恢复子代理**,不得启动新子代理。记录格式:
|
|
21
24
|
```
|
|
@@ -41,6 +44,7 @@ artifacts: # required 时必填
|
|
|
41
44
|
When `decision: required`, dispatch `architecture-reviewer` as sub-agent with inputs:
|
|
42
45
|
- `prd_path`, `plan_path`, `change_brief_path`
|
|
43
46
|
- `architecture_dir`(Step 1 产出目录)
|
|
47
|
+
- `product_snapshot_path`(`docs/architecture/iterations/<vN>/architecture.md`,v0.36.0——A5 基线一致性对照产品级决策)
|
|
44
48
|
- `global_arch_dir`(`docs/architecture/`)
|
|
45
49
|
- `conventions_config`(从 `team-flow.config.json` 读取)
|
|
46
50
|
|