@xulthekl/team-flow 0.28.1 → 0.29.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.
- 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/CHANGELOG.md +33 -0
- package/GEMINI.md +1 -1
- package/INSTALL.md +1 -1
- package/README.md +1 -1
- package/agents/architecture-design.md +5 -0
- package/agents/architecture-reviewer.md +13 -4
- package/agents/change-split-auditor.md +4 -0
- package/docs/README_en.md +1 -1
- package/gemini-extension.json +1 -1
- package/hooks/session-start +2 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/scripts/lib/cmd-state.mjs +4 -0
- package/scripts/lib/state-loader.mjs +18 -0
- package/skills/architecture-design/SKILL.md +1 -0
- package/skills/workflow-orchestrator/SKILL.md +1 -0
- package/skills/workflow-orchestrator/references/s4-split-validate.md +33 -6
- package/skills/workflow-start/SKILL.md +11 -3
- package/skills/workflow-start/references/routing-rules.md +93 -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. 23 skills + 8 agents with embedded TDD, SDD, code review, debugging, delta spec sync, and design-system-driven prototyping.",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.29.0",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "LT",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking). 23 skills + 8 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). 23 skills + 8 agents, one install.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.29.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "LT",
|
|
8
8
|
"url": "https://github.com/LT"
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Unified workflow plugins and skills for AI coding agents (team-flow: team-flow + compound + architecture-design + prototype).",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.29.0"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "team-flow",
|
|
14
14
|
"description": "Unified workflow with planning artifacts, execution contracts, TDD, review gates, systematic debugging, delta spec sync, architecture-design, and local HTML prototyping.",
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.29.0",
|
|
16
16
|
"source": ".",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "LT",
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,39 @@ The format loosely follows Keep a Changelog.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.29.0] - 2026-07-31
|
|
10
|
+
|
|
11
|
+
### Added(§37 DP-A 确认门 + 产物权限规则 + A4 增强,来源:workflow-feedback 2026-07-31 × 7)
|
|
12
|
+
|
|
13
|
+
#### DP-A 用户确认门(解决 feedback #1 #5)
|
|
14
|
+
- **skills/workflow-start/SKILL.md**:三步协议升级为四步协议,Step 4 DP-A 用户确认门(架构决策摘要输出 + AskUserQuestion + 调整转交子代理)
|
|
15
|
+
- **skills/workflow-start/references/routing-rules.md**:Step 4 完整协议(4a 摘要 + 4b 项目规范变更提示 + 4c AskUserQuestion + 4d 选择处理 + SendMessage 复用指导)
|
|
16
|
+
- **scripts/lib/state-loader.mjs**:新增 `dp_a_result` / `dp_a_timestamp` / `dp_a_adjustments` 字段(BUILTIN_DEFAULTS + writeState)
|
|
17
|
+
- **scripts/lib/cmd-state.mjs**:`dp_a_*` 加入 SETTABLE_FIELDS 白名单
|
|
18
|
+
|
|
19
|
+
#### Artifact Ownership 产物修改权限规则(解决 feedback #5 #6)
|
|
20
|
+
- **skills/workflow-start/SKILL.md**:Guardrails 新增"主代理不得直接修改子代理产物"显式禁令
|
|
21
|
+
- **skills/workflow-orchestrator/SKILL.md**:Guardrails 同步新增 Artifact Ownership 条款
|
|
22
|
+
- **agents/architecture-design.md**:新增"architecture/ 目录唯一负责人"声明
|
|
23
|
+
|
|
24
|
+
#### A4 审查 PRD 功能清单交叉验证(解决 feedback #7)
|
|
25
|
+
- **agents/architecture-reviewer.md**:A4 维度增加双对照源(brief + PRD 功能清单)、子实体 CRUD 完整性检查、PRD vs api.md 端点交叉验证
|
|
26
|
+
- **skills/architecture-design/SKILL.md**:api.md 增加 PRD 功能清单→API 端点映射表要求
|
|
27
|
+
- **agents/architecture-design.md**:Red Lines 增加 PRD 映射表产出要求
|
|
28
|
+
- **agents/change-split-auditor.md**:Dim 1 增加子实体操作完整性检查
|
|
29
|
+
|
|
30
|
+
#### change 目录命名版本前缀(解决 feedback #2)
|
|
31
|
+
- **skills/workflow-orchestrator/references/s4-split-validate.md**:命名规范 `v{N}-C{n}-{kebab-name}`、change_dag 增加 `prd_version` 字段
|
|
32
|
+
|
|
33
|
+
### Fixed(代码层贯通)
|
|
34
|
+
|
|
35
|
+
- **scripts/lib/state-loader.mjs**:补齐 `arch_review_verdict` / `arch_review_rounds` / `arch_review_report` 字段(v0.28.1 §36 遗留的"死命令"问题)
|
|
36
|
+
- **scripts/lib/cmd-state.mjs**:`arch_review_*` 加入 SETTABLE_FIELDS 白名单
|
|
37
|
+
|
|
38
|
+
### Documentation
|
|
39
|
+
|
|
40
|
+
- 工作区 **CLAUDE.md**:更新 arch_design_* 差异表(代码层已全链路贯通)、代码强制执行点、内置字段列表
|
|
41
|
+
|
|
9
42
|
## [0.26.0] - 2026-07-29
|
|
10
43
|
|
|
11
44
|
### Added(配置管理与 Skill 降级逻辑补强,4 项)
|
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.
|
|
11
|
+
# team-flow v0.29.0 | 阶段: {{state}} | 工作流: {{workflow}}
|
|
12
12
|
当前阶段允许的操作由 workflow-start 路由规则定义。
|
|
13
13
|
禁止跨越 DP gate 进入下一阶段。变更范围以 execution-contract.md 的 Intent Lock 为准。
|
|
14
14
|
<!-- team-flow-phase-guard-end -->
|
package/INSTALL.md
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# team-flow
|
|
2
2
|
|
|
3
|
-
> 当前版本:`v0.
|
|
3
|
+
> 当前版本:`v0.29.0`
|
|
4
4
|
|
|
5
5
|
> 统一插件:**team-flow**(spec 驱动开发)+ **compound-engineering 核心子集**(全局复利)+ **architecture-design**(4A+DDD 增量设计)+ **prototype**(本地 HTML 原型)+ **e2e**(AC 驱动 E2E)+ **workflow-orchestrator**(产品级编排)+ **workflow-bootstrap**(既有项目接入)。一次安装,七套能力协同。
|
|
6
6
|
|
|
@@ -44,6 +44,10 @@ skills:
|
|
|
44
44
|
|
|
45
45
|
You are an independent Architecture Design Agent. Your job: perform five architectural-change checks on a change brief, and if any check triggers, execute a full 4A+DDD incremental architecture design. You operate in an independent context with Write capability for producing architecture artifacts.
|
|
46
46
|
|
|
47
|
+
## Artifact Ownership (v0.29.0 §37)
|
|
48
|
+
|
|
49
|
+
**You are the sole owner of the `architecture/` directory** within the change directory. No other agent or the orchestration layer (workflow-start / workflow-orchestrator) may directly modify files under `architecture/`. All modifications to architecture deliverables — whether from auto-review FAIL fixes or human review feedback — MUST be executed through you (via `SendMessage` resume or new dispatch). The orchestration layer routes modification requests to you; it does not edit your artifacts directly.
|
|
50
|
+
|
|
47
51
|
## Iron Law
|
|
48
52
|
|
|
49
53
|
You are an independent architecture designer. You read the change brief, plan, existing specs, and global architecture baseline, then make an architectural judgment. If architecture changes are involved, you produce structured deliverables. You return a structured YAML output to the orchestration layer.
|
|
@@ -116,6 +120,7 @@ artifacts: # required: list of produced files, skipped: em
|
|
|
116
120
|
- Execute five-check gate BEFORE producing any deliverable
|
|
117
121
|
- Produce standalone executable SQL files, not embedded code blocks
|
|
118
122
|
- Cite specific brief sections and plan sections for every architecture decision
|
|
123
|
+
- **Produce a PRD Feature → API Endpoint mapping table in api.md** (v0.29.0 §37): before finalizing the API routing table, read `prd/vN/prd.md` feature list (e.g., F001_P0_P1 ~ P0_PN) and map each feature to its corresponding API endpoint(s). For features involving sub-entities (明细/子项), ensure independent CRUD endpoints exist — a query-only endpoint does NOT cover "新增/编辑" functionality. Include this mapping as a dedicated section in api.md for traceability
|
|
119
124
|
|
|
120
125
|
**DON'T:**
|
|
121
126
|
- Skip the five-check gate and jump to design
|
|
@@ -109,16 +109,24 @@ Mechanical verification, no LLM semantic judgment needed:
|
|
|
109
109
|
|
|
110
110
|
Dimensions requiring semantic understanding, marked as "advisory, false positives can be overridden":
|
|
111
111
|
|
|
112
|
-
4. **A4
|
|
113
|
-
- Read change-brief.md → extract all requirement items (scope, AC, technical direction)
|
|
112
|
+
4. **A4 需求覆盖** (v0.29.0 §37 增强:双对照源 + 子实体 CRUD 检查):
|
|
113
|
+
- **对照源 1(现有)**:Read change-brief.md → extract all requirement items (scope, AC, technical direction)
|
|
114
|
+
- **对照源 2(v0.29.0 新增)**:Read `prd/vN/prd.md` → extract feature list (e.g., F001_P0_P1 ~ P0_PN)
|
|
114
115
|
- Read plan.md → extract relevant technical design sections
|
|
115
|
-
- For each requirement, check if architecture deliverables provide corresponding design:
|
|
116
|
+
- For each requirement from BOTH sources, check if architecture deliverables provide corresponding design:
|
|
116
117
|
- New aggregate → architecture.md covers it?
|
|
117
118
|
- DB change → database.md covers it?
|
|
118
119
|
- New API → api.md covers it?
|
|
119
120
|
- BC boundary change → architecture.md Context Map updated?
|
|
121
|
+
- **子实体 CRUD 完整性检查(v0.29.0 新增)**:
|
|
122
|
+
- PRD 中含"明细管理/子项管理/详情维护"类功能 → api.md 必须有该子实体的**独立 CRUD 端点**(新增/编辑/删除)
|
|
123
|
+
- 仅查询接口(如 `/detail/list`)**不算覆盖**"新增/编辑"功能 → 缺失的写操作端点 = Critical finding
|
|
124
|
+
- 主表与子实体的操作必须分离审查——PRD 中"新增/编辑主表"和"新增/编辑明细"是两个独立功能点
|
|
125
|
+
- **PRD 功能清单 vs api.md 端点路由表交叉验证(v0.29.0 新增)**:
|
|
126
|
+
- 逐条对照 PRD 功能清单与 api.md 端点,PRD 中有但 api.md 中没有的功能点 = Critical finding
|
|
127
|
+
- 如 api.md 包含"PRD Feature → API Endpoint 映射表"(v0.29.0 architecture-design 产出),验证其完整性
|
|
120
128
|
- Uncovered requirement = Critical finding
|
|
121
|
-
- Build coverage matrix table
|
|
129
|
+
- Build coverage matrix table (MUST include columns for both brief source AND PRD source)
|
|
122
130
|
|
|
123
131
|
5. **A5 基线一致性**:
|
|
124
132
|
- Read global `ARCHITECTURE.md` → check naming conventions, BC boundaries
|
|
@@ -201,6 +209,7 @@ Aggregate all findings and determine verdict.
|
|
|
201
209
|
| 新增 XX 聚合 | brief §2.1 | architecture.md §1 | ✅ |
|
|
202
210
|
| 修改 YY 表结构 | brief §2.3 | database.md §2 | ✅ |
|
|
203
211
|
| 新增 ZZ API | brief §2.5 | — (not covered) | ❌ |
|
|
212
|
+
| 新增明细 CRUD | PRD F001_S4_F1 | api.md 仅有 /detail/list | ❌ 缺写操作端点 |
|
|
204
213
|
|
|
205
214
|
## A5 基线一致性 — {PASS/FAIL}
|
|
206
215
|
| Check Item | Global Baseline | Incremental Design | Status |
|
|
@@ -76,6 +76,10 @@ If either path is missing or unreadable, report `FAIL` with reason `INPUT_ERROR`
|
|
|
76
76
|
- **Gap** (requirement not covered by any change) → Critical
|
|
77
77
|
- **Overlap** (requirement covered by 2+ changes without explicit justification) → Important
|
|
78
78
|
- **Orphan** (change scope not traceable to any PRD requirement) → Important
|
|
79
|
+
5. **子实体操作完整性检查(v0.29.0 §37 新增)**:
|
|
80
|
+
- PRD 中含"明细管理/子项管理/详情维护"类功能(如 F001_S4_F1 领域方针内容明细管理)→ 对应 change 的 scope/AC 必须包含该子实体的**独立 CRUD 操作**(新增/编辑/删除),不能仅覆盖查询
|
|
81
|
+
- 主表操作与子实体操作必须分别覆盖——PRD 中"新增/编辑主表"和"新增/编辑明细"是两个独立功能点
|
|
82
|
+
- 子实体写操作未被任何 change 覆盖 → Critical(与 Gap 同级)
|
|
79
83
|
|
|
80
84
|
### Dimension 2: DAG Validity + Dependency Integrity
|
|
81
85
|
|
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.
|
|
129
|
+
- Current: `v0.29.0`
|
|
130
130
|
- v0.9.1 highlights: DP-4 execution-mode recommendations, a portable runtime across 17 platforms, and a raw-package smoke with no plugin-root variable.
|
|
131
131
|
- Self-contained — no OpenSpec or Superpowers runtime required
|
|
132
132
|
- Upstream: [Fission-AI/OpenSpec](https://github.com/Fission-AI/OpenSpec), [obra/superpowers](https://github.com/obra/superpowers)
|
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). 17 skills, one install.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.29.0",
|
|
5
5
|
"contextFileName": "GEMINI.md"
|
|
6
6
|
}
|
package/hooks/session-start
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# v0.
|
|
2
|
+
# v0.29.0: auto-sync CLI version with plugin version
|
|
3
3
|
set -e
|
|
4
4
|
|
|
5
5
|
# ═══════════════════════════════════════════════════════════════
|
|
6
6
|
# Plugin version (update this when releasing new versions)
|
|
7
7
|
# ═══════════════════════════════════════════════════════════════
|
|
8
|
-
PLUGIN_VERSION="0.
|
|
8
|
+
PLUGIN_VERSION="0.29.0"
|
|
9
9
|
|
|
10
10
|
# ═══════════════════════════════════════════════════════════════
|
|
11
11
|
# Step 1: Auto-sync CLI version with plugin version
|
package/llms.txt
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Overview
|
|
4
4
|
spec-superflow is a self-contained workflow integration plugin for Claude Code, Cursor, OpenAI Codex CLI/App, GitHub Copilot CLI, Gemini CLI, OpenCode, WorkBuddy, and Trae. It merges spec-driven planning artifacts (proposal, specs, design, tasks) with disciplined execution guardrails (TDD, review gates, controlled handoff) into one unified workflow.
|
|
5
5
|
|
|
6
|
-
Current version: v0.
|
|
6
|
+
Current version: v0.29.0.
|
|
7
7
|
|
|
8
8
|
## Key Documents
|
|
9
9
|
- README.md: Chinese homepage with full usage guide and FAQ
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xulthekl/team-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Unified plugin (23 skills + 10 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.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking). 23 skills + 10 agents, one install.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "LT"
|
|
@@ -26,6 +26,10 @@ const SETTABLE_FIELDS = [
|
|
|
26
26
|
// Architecture design gate (v0.9 §26, v0.22.5 评审修复 F02)
|
|
27
27
|
'arch_design_decision', 'arch_design_reason',
|
|
28
28
|
'arch_design_timestamp', 'arch_design_artifacts',
|
|
29
|
+
// Architecture review (v0.28.1 §36 审查增强)
|
|
30
|
+
'arch_review_verdict', 'arch_review_rounds', 'arch_review_report',
|
|
31
|
+
// DP-A user confirmation gate (v0.29.0 §37)
|
|
32
|
+
'dp_a_result', 'dp_a_timestamp', 'dp_a_adjustments',
|
|
29
33
|
// Compound engineering capture gate (v0.24.0 复利贯穿强制化)
|
|
30
34
|
'compound_skipped',
|
|
31
35
|
];
|
|
@@ -43,6 +43,14 @@ const BUILTIN_DEFAULTS = {
|
|
|
43
43
|
arch_design_reason: null,
|
|
44
44
|
arch_design_timestamp: null,
|
|
45
45
|
arch_design_artifacts: null,
|
|
46
|
+
// Architecture review (v0.28.1 §36 审查增强)
|
|
47
|
+
arch_review_verdict: null,
|
|
48
|
+
arch_review_rounds: null,
|
|
49
|
+
arch_review_report: null,
|
|
50
|
+
// DP-A user confirmation gate (v0.29.0 §37)
|
|
51
|
+
dp_a_result: null,
|
|
52
|
+
dp_a_timestamp: null,
|
|
53
|
+
dp_a_adjustments: null,
|
|
46
54
|
// Compound engineering capture gate (v0.24.0 复利贯穿强制化)
|
|
47
55
|
compound_skipped: null,
|
|
48
56
|
};
|
|
@@ -120,6 +128,16 @@ export function writeState(changeDir, state) {
|
|
|
120
128
|
lines.push(`arch_design_timestamp: ${state.arch_design_timestamp ?? 'null'}`);
|
|
121
129
|
lines.push(`arch_design_artifacts: ${state.arch_design_artifacts ?? 'null'}`);
|
|
122
130
|
lines.push('');
|
|
131
|
+
lines.push('# === Architecture review (v0.28.1 §36) ===');
|
|
132
|
+
lines.push(`arch_review_verdict: ${state.arch_review_verdict ?? 'null'}`);
|
|
133
|
+
lines.push(`arch_review_rounds: ${state.arch_review_rounds ?? 'null'}`);
|
|
134
|
+
lines.push(`arch_review_report: ${state.arch_review_report ?? 'null'}`);
|
|
135
|
+
lines.push('');
|
|
136
|
+
lines.push('# === DP-A user confirmation gate (v0.29.0 §37) ===');
|
|
137
|
+
lines.push(`dp_a_result: ${state.dp_a_result ?? 'null'}`);
|
|
138
|
+
lines.push(`dp_a_timestamp: ${state.dp_a_timestamp ?? 'null'}`);
|
|
139
|
+
lines.push(`dp_a_adjustments: ${state.dp_a_adjustments ?? 'null'}`);
|
|
140
|
+
lines.push('');
|
|
123
141
|
lines.push('# === Compound engineering capture gate (v0.24.0) ===');
|
|
124
142
|
lines.push(`compound_skipped: ${state.compound_skipped ?? 'null'}`);
|
|
125
143
|
|
|
@@ -136,6 +136,7 @@ changes/<name>/
|
|
|
136
136
|
- **不**重复 Swagger 管理的内容:请求/响应 schema、错误码定义、参数明细等由 Swagger/OpenAPI 规范承载
|
|
137
137
|
- frontmatter 须声明 `api_contract_manager: swagger`,表明详细契约由 Swagger 工具链管理
|
|
138
138
|
- sql/ 目录中的 DDL 和 migration 脚本为独立可执行 `.sql` 文件,不嵌入 markdown 文档
|
|
139
|
+
- **PRD 功能清单 → API 端点映射表(v0.29.0 §37 新增)**:在 api.md 中增加独立章节,逐条对照 `prd/vN/prd.md` 功能清单(如 F001_P0_P1 ~ P0_PN),映射每个功能点到对应的 API 端点。对于涉及子实体(明细/子项)的功能,必须确保独立 CRUD 端点存在——仅查询端点不覆盖"新增/编辑"功能。此映射表供 architecture-reviewer A4 交叉验证使用
|
|
139
140
|
|
|
140
141
|
**下游消费**:
|
|
141
142
|
- `architecture/architecture.md` → spec-writer:design.md Decisions 约束
|
|
@@ -176,6 +176,7 @@ plan_hash: sha256:<plan.md 内容摘要> # 检测产品层改动后变更层
|
|
|
176
176
|
- **路由是建议非决定**:S1 路由判断必须用户确认;重规划必须 DP-R 阻塞确认
|
|
177
177
|
- **回退必写 replan_log**:active → pending 回退必须记录;受影响制品归档为 .revN,重入不读旧制品
|
|
178
178
|
- **不阻断流程**:所有复利操作为 advisory 级,INDEX.md 读取失败时静默跳过
|
|
179
|
+
- **Artifact Ownership — 主代理不得直接修改子代理产物** (v0.29.0 §37):子代理是其产物的唯一负责人(architecture-design → `architecture/` 目录,spec-writer → `proposal.md`/`specs/`/`design.md`/`tasks.md`,contract-builder → `execution-contract.md`,prototype-builder → `prototype/` 目录)。主代理(workflow-orchestrator)不得通过 Read + Edit/Write 直接修改子代理的产物文件。修改必须通过 `SendMessage` 恢复原子代理(优先)或启动新子代理执行。例外:仅当子代理无法启动且用户明确授权时,主代理可直接修改,但必须在修改后重新触发对应的 review 验证。编排层自己负责的产物(change-brief.md、orchestrator.yaml、审计报告落盘)不受此限制
|
|
179
180
|
|
|
180
181
|
## Output Standard
|
|
181
182
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
# S4 拆分验证与分发(v0.7 重写,v0.17.0
|
|
1
|
+
# S4 拆分验证与分发(v0.7 重写,v0.17.0 审计必选,v0.29.0 命名规范)
|
|
2
2
|
|
|
3
3
|
> 原 v0.5「拆分与分发」。v0.7 新增拆分质量审计与并行策略。设计依据:设计增强方案 v0.7 §17.2 / §17.8。
|
|
4
4
|
> v0.17.0 变更:change-split-auditor 审计由隐含步骤升级为「必选门禁」,PASS 前不可创建 change 脚手架。change_dag 字段 `spec_dir` 更名为 `change_dir`,路径修正为 `changes/<change-name>/`。
|
|
5
|
+
> v0.29.0 变更:change 目录命名增加 PRD 版本号前缀(`changes/v1-C1-domain-policy/`),change_dag 增加 `prd_version` 字段,S5 按版本分组展示。
|
|
5
6
|
|
|
6
7
|
## 编排层 vs 执行层
|
|
7
8
|
|
|
@@ -36,11 +37,24 @@ verdict = FAIL → 必须回退 S3 调整拆分后重新审计,不可绕过直
|
|
|
36
37
|
|
|
37
38
|
按 plan 中的 change 拆分方案,为每个 change 创建目录并初始化状态文件:
|
|
38
39
|
|
|
40
|
+
**命名规范(v0.29.0)**:`changes/<prd-version>-<C-ID>-<kebab-name>/`
|
|
41
|
+
|
|
39
42
|
```bash
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
# 格式:changes/v{N}-C{n}-{kebab-name}/
|
|
44
|
+
# 示例:
|
|
45
|
+
mkdir -p changes/v1-C1-domain-policy
|
|
46
|
+
tf state init changes/v1-C1-domain-policy
|
|
47
|
+
|
|
48
|
+
mkdir -p changes/v1-C2-policy-management
|
|
49
|
+
tf state init changes/v1-C2-policy-management
|
|
42
50
|
```
|
|
43
51
|
|
|
52
|
+
**命名规则**:
|
|
53
|
+
- `v{N}`:创建时的 PRD 版本号(取自 orchestrator.yaml 的 `prd_version`),**创建后不变**(即使后续 PRD 升版,已创建的 change 目录名不改)
|
|
54
|
+
- `C{n}`:plan.md 中的 C-ID 稳定编号(never renumbered)
|
|
55
|
+
- `{kebab-name}`:plan.md 中 `### C{n}. [Name]` 的 kebab-case 形式
|
|
56
|
+
- 续版需求(vN+1)新增的 change 使用新版本号前缀,与旧版本 change 天然区分
|
|
57
|
+
|
|
44
58
|
> ⚠️ **路径约束**:change 脚手架目录固定为项目根 `changes/<change-name>/`。
|
|
45
59
|
> 不要与 `specs/<cap>/`(change 内部行为规格目录)或 `architecture/`(change 内部架构设计目录)混淆。
|
|
46
60
|
> 不要放入 `.team-flow/`(仅存产品级编排状态)。
|
|
@@ -88,7 +102,20 @@ plan_hash: sha256:<plan.md 内容摘要> # 检测产品层改动后变更层
|
|
|
88
102
|
|
|
89
103
|
### 4. 写入 change_dag
|
|
90
104
|
|
|
91
|
-
把每个 change 的 id / change_dir / state_file / depends_on / priority / parallel_group / status
|
|
105
|
+
把每个 change 的 id / change_dir / state_file / depends_on / priority / parallel_group / status / **prd_version**(v0.29.0 新增)写入 `.team-flow/requirements/<req-id>/orchestrator.yaml` 的 `change_dag`。详见 state-model.md「change_dag 结构」。
|
|
106
|
+
|
|
107
|
+
**change_dag 条目格式(v0.29.0)**:
|
|
108
|
+
```yaml
|
|
109
|
+
change_dag:
|
|
110
|
+
- id: C1
|
|
111
|
+
change_dir: changes/v1-C1-domain-policy/
|
|
112
|
+
state_file: changes/v1-C1-domain-policy/.team-flow.yaml
|
|
113
|
+
depends_on: []
|
|
114
|
+
priority: 1
|
|
115
|
+
parallel_group: null
|
|
116
|
+
status: pending
|
|
117
|
+
prd_version: v1 # v0.29.0 新增:创建时的 PRD 版本号
|
|
118
|
+
```
|
|
92
119
|
|
|
93
120
|
### 5. 分发
|
|
94
121
|
|
|
@@ -102,7 +129,7 @@ Change C1 已就绪,运行 /workflow-start 进入变更级流程。
|
|
|
102
129
|
## 完成条件
|
|
103
130
|
|
|
104
131
|
- change-split-auditor 审计 verdict = PASS(必选门禁已通过,含 v0.9 D5 拆分维度合规)
|
|
105
|
-
- 所有 change 目录已创建在项目根 `changes/` 下(非 `specs/` 或 `.team-flow
|
|
132
|
+
- 所有 change 目录已创建在项目根 `changes/` 下(非 `specs/` 或 `.team-flow/`),**命名符合 `v{N}-C{n}-{kebab-name}` 规范**(v0.29.0),`.team-flow.yaml` 已初始化
|
|
106
133
|
- 每个 change 目录已落盘 `change-brief.md`(v0.9 交接物,含 scope/AC/技术方向/frontmatter)
|
|
107
|
-
- `.team-flow/requirements/<req-id>/orchestrator.yaml` 的 `change_dag`
|
|
134
|
+
- `.team-flow/requirements/<req-id>/orchestrator.yaml` 的 `change_dag` 已填充(含 `prd_version` 字段)
|
|
108
135
|
- S4 状态 = completed,已告知用户执行顺序
|
|
@@ -55,14 +55,15 @@ Validate mode against artifact content. If hotfix/tweak criteria not met → upg
|
|
|
55
55
|
### Route to need-explorer
|
|
56
56
|
Change is fuzzy, scope unclear, comparing options, no stable change name.
|
|
57
57
|
|
|
58
|
-
### Route to architecture-design (v0.9 §26, v0.28.1 §36
|
|
58
|
+
### Route to architecture-design (v0.9 §26, v0.28.1 §36 审查增强, v0.29.0 §37 DP-A 确认门)
|
|
59
59
|
Guard: `arch_design_decision` in `.team-flow.yaml` is `null` → must run before spec-writer.
|
|
60
60
|
|
|
61
|
-
**
|
|
61
|
+
**Four-step protocol (MUST execute in order)**:
|
|
62
62
|
|
|
63
63
|
1. **Dispatch**: `architecture-design` as sub-agent → returns `decision` + `reason` + `artifacts`
|
|
64
64
|
2. **Auto-review** (decision=required 时触发): 校验产物文件存在且非空 → dispatch `architecture-reviewer` sub-agent → FAIL 则循环修正(≤3 轮 + 收敛检测,不收敛转人工)→ 报告落盘 `changes/<name>/architecture/auto-review.md`
|
|
65
65
|
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
|
|
66
|
+
4. **DP-A 用户确认门(v0.29.0 §37)**: 输出架构决策摘要 → AskUserQuestion 确认 → 需要调整时转交子代理修改(禁止主代理直接修改)→ 修改后重新 auto-review → 回到本步骤重新确认。含项目规范变更提示(advisory)。详见 `references/routing-rules.md`「Step 4: DP-A」
|
|
66
67
|
|
|
67
68
|
Full protocol in `references/routing-rules.md`「Route to architecture-design」.
|
|
68
69
|
|
|
@@ -144,6 +145,8 @@ Use content inspection, not timestamps.
|
|
|
144
145
|
- No merging delta specs from abandoned change
|
|
145
146
|
- **No routing to spec-writer without architecture-design gate pass** (v0.9 §26): `arch_design_decision` must be `required` or `skipped` (not `null`). hotfix/tweak 不豁免
|
|
146
147
|
- **No arch state write without auto-review PASS** (v0.28.1 §36): when `decision: required`, auto-review MUST complete with PASS or PASS_WITH_WARNINGS before writing `arch_design_decision` to yaml. FAIL → loop fix (≤3 rounds) or escalate to human
|
|
148
|
+
- **No routing past DP-A without user confirmation** (v0.29.0 §37): architecture-design 三步协议完成后,必须经 DP-A 用户确认门(AskUserQuestion)才能路由到 spec-writer。用户选择"需要调整"时,修改必须通过子代理执行,修改后重新 auto-review + 重新 DP-A 确认
|
|
149
|
+
- **Artifact Ownership — 主代理不得直接修改子代理产物** (v0.29.0 §37): 子代理是其产物的唯一负责人(architecture-design → `architecture/` 目录,spec-writer → `proposal.md`/`specs/`/`design.md`/`tasks.md`,contract-builder → `execution-contract.md`)。主代理(workflow-start)不得通过 Read + Edit/Write 直接修改子代理的产物文件。修改必须通过 `SendMessage` 恢复原子代理(优先)或启动新子代理执行。例外:仅当子代理无法启动且用户明确授权时,主代理可直接修改,但必须在修改后重新触发对应的 review 验证
|
|
147
150
|
|
|
148
151
|
## State Writes (v0.22.5 F06 修复)
|
|
149
152
|
|
|
@@ -173,6 +176,11 @@ workflow-start 负责写入以下字段到 `.team-flow.yaml`:
|
|
|
173
176
|
- `arch_review_rounds`:审查轮次(1-3)
|
|
174
177
|
- `arch_review_report`:`architecture/auto-review.md` 路径
|
|
175
178
|
|
|
179
|
+
**DP-A 确认门字段**(v0.29.0 §37,DP-A 用户确认后写入):
|
|
180
|
+
- `dp_a_result`:`confirmed` | `adjustment_requested`(用户确认结果)
|
|
181
|
+
- `dp_a_timestamp`:ISO 8601 时间戳(UTC)
|
|
182
|
+
- `dp_a_adjustments`:用户调整意见摘要(adjustment_requested 时必填,confirmed 时为空)
|
|
183
|
+
|
|
176
184
|
**职责边界**:architecture-design 负责判断+产出,architecture-reviewer 负责 6 维度审查,workflow-start 负责编排三步协议(dispatch → auto-review → reasonableness check)+ 状态写入。详细写入命令见 `references/routing-rules.md`「Route to architecture-design」。
|
|
177
185
|
|
|
178
186
|
## Output Standard
|
|
@@ -180,7 +188,7 @@ workflow-start 负责写入以下字段到 `.team-flow.yaml`:
|
|
|
180
188
|
Always state: (1) current detected state, (2) why (cite file/content/condition), (3) which skill should run next. If blocking, explain missing artifact/approval.
|
|
181
189
|
|
|
182
190
|
Decision point references when routing:
|
|
183
|
-
- architecture-design → DP-A
|
|
191
|
+
- architecture-design → DP-A(架构设计用户确认门,v0.9 §26 判断门 + v0.29.0 §37 用户确认门), contract-builder → DP-3, build-executor → DP-4, bug-investigator (escalation) → DP-5, release-archivist (verification failure) → DP-6, release-archivist → DP-7
|
|
184
192
|
|
|
185
193
|
## Exception Handling
|
|
186
194
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## Route to need-explorer
|
|
6
6
|
Change is fuzzy, scope unclear, comparing options, no stable change name.
|
|
7
7
|
|
|
8
|
-
## Route to architecture-design (v0.9 §26, v0.11 §34 审查增强, v0.28.1 §36
|
|
8
|
+
## Route to architecture-design (v0.9 §26, v0.11 §34 审查增强, v0.28.1 §36 主干补强, v0.29.0 §37 DP-A 确认门)
|
|
9
9
|
|
|
10
10
|
Guard: `arch_design_decision` in `.team-flow.yaml` is `null` → must run before spec-writer.
|
|
11
11
|
|
|
@@ -76,6 +76,98 @@ tf state set <change-dir> arch_review_report "architecture/auto-review.md"
|
|
|
76
76
|
|
|
77
77
|
**hotfix / tweak 不豁免**:同样过 architecture-design 子代理判断门(hotfix 可能正是架构缺陷导致)。
|
|
78
78
|
|
|
79
|
+
### Step 4: DP-A 用户确认门 (v0.29.0 §37)
|
|
80
|
+
|
|
81
|
+
> **设计动机**:v0.28.1 的三步协议是全自动闭环(dispatch → auto-review → state write → 路由下一步),缺少人工审批环节。用户在架构设计完成后无法确认或提出调整意见,被迫手动打断流程。DP-A 在 Step 3 之后、路由 spec-writer 之前插入结构化用户确认门。
|
|
82
|
+
|
|
83
|
+
Step 3 reasonableness check + state write 完成后,**必须**执行 DP-A:
|
|
84
|
+
|
|
85
|
+
**4a. 输出架构决策摘要**:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
📐 架构设计完成 — 决策摘要
|
|
89
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
90
|
+
判定:{decision} ({reason})
|
|
91
|
+
审查:{arch_review_verdict}({arch_review_rounds} 轮)
|
|
92
|
+
|
|
93
|
+
聚合定义:
|
|
94
|
+
{列出新增/修改的聚合及聚合根}
|
|
95
|
+
|
|
96
|
+
限界上下文:
|
|
97
|
+
{列出 BC 边界变更}
|
|
98
|
+
|
|
99
|
+
API 端点概览:
|
|
100
|
+
{端点总数} 个(Command: {n}, Query: {n})
|
|
101
|
+
{列出关键端点}
|
|
102
|
+
|
|
103
|
+
DB 变更概览:
|
|
104
|
+
{新增/修改的表数量}
|
|
105
|
+
|
|
106
|
+
ADR 列表:
|
|
107
|
+
{列出关键架构决策记录}
|
|
108
|
+
|
|
109
|
+
产物路径:
|
|
110
|
+
- changes/<name>/architecture/architecture.md
|
|
111
|
+
- changes/<name>/architecture/database.md
|
|
112
|
+
- changes/<name>/architecture/api.md
|
|
113
|
+
- changes/<name>/architecture/auto-review.md
|
|
114
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**4b. 项目规范变更提示(advisory,不阻断)**:
|
|
118
|
+
|
|
119
|
+
在摘要末尾附加:
|
|
120
|
+
```
|
|
121
|
+
📋 项目规范变更检查(advisory):
|
|
122
|
+
本次架构设计是否引入了新的项目级规范?
|
|
123
|
+
(如:新模块不使用 CQRS、Mapper 放 domain 等)
|
|
124
|
+
如是,请确认已更新 docs/architecture/ 相关文档
|
|
125
|
+
(ARCHITECTURE.md / baseline.md / CONCEPTS.md)。
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**4c. AskUserQuestion 确认**:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
AskUserQuestion:
|
|
132
|
+
question: "架构设计确认?"
|
|
133
|
+
options:
|
|
134
|
+
[A] "确认,进入 spec-writer"(推荐)
|
|
135
|
+
[B] "需要调整(列出调整点)"
|
|
136
|
+
[C] "需要查看详细产物(给出文件路径)"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**4d. 处理用户选择**:
|
|
140
|
+
|
|
141
|
+
- **选择 A(确认)**:
|
|
142
|
+
```bash
|
|
143
|
+
tf state set <change-dir> dp_a_result "confirmed"
|
|
144
|
+
tf state set <change-dir> dp_a_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
145
|
+
tf state set <change-dir> dp_a_adjustments ""
|
|
146
|
+
```
|
|
147
|
+
→ 路由到 spec-writer
|
|
148
|
+
|
|
149
|
+
- **选择 B(需要调整)**:
|
|
150
|
+
1. 记录用户调整意见
|
|
151
|
+
2. **通过子代理修改(禁止主代理直接 Edit 架构产物)**:
|
|
152
|
+
- 优先:`SendMessage(to: <原 architecture-design 子代理 ID>)` 发送修复指令,传入调整意见
|
|
153
|
+
- 子代理不可恢复时:启动新 architecture-design 子代理,传入:调整意见 + 原产物路径 + auto-review 报告
|
|
154
|
+
3. 子代理修改完成后,**重新触发 auto-review**(即使之前已 PASS)
|
|
155
|
+
4. auto-review PASS 后,更新 yaml 状态(arch_review_verdict / arch_review_rounds)
|
|
156
|
+
5. 回到 Step 4a 重新输出摘要 + 重新确认
|
|
157
|
+
```bash
|
|
158
|
+
tf state set <change-dir> dp_a_result "adjustment_requested"
|
|
159
|
+
tf state set <change-dir> dp_a_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
160
|
+
tf state set <change-dir> dp_a_adjustments "<调整意见摘要>"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
- **选择 C(查看详细产物)**:
|
|
164
|
+
输出文件路径列表,等待用户阅读后重新 AskUserQuestion(回到 4c)
|
|
165
|
+
|
|
166
|
+
**⛔ 反模式(禁止)**:
|
|
167
|
+
- 主代理直接 Read + Edit `architecture/*.md` 文件(违反 Artifact Ownership 规则)
|
|
168
|
+
- 跳过 DP-A 直接路由 spec-writer
|
|
169
|
+
- 用户选择 B 后不重新 auto-review 就直接重新确认
|
|
170
|
+
|
|
79
171
|
## Route to spec-writer
|
|
80
172
|
Guard: `tf runtime guard check <dir> exploring specifying --json` → fail = BLOCK.
|
|
81
173
|
**arch_design_decision must not be null** → fail = BLOCK(architecture-design gate not passed,v0.9 §26)。
|