@xulthekl/team-flow 0.32.2 → 0.34.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/AGENTS.md +2 -0
- package/CHANGELOG.md +56 -0
- package/CONTRIBUTING.md +44 -0
- package/GEMINI.md +1 -1
- package/INSTALL.md +1 -1
- package/README.md +1 -1
- package/agents/architecture-design.md +1 -34
- package/agents/architecture-reviewer.md +1 -42
- package/agents/bug-investigator.md +1 -37
- package/agents/build-executor.md +1 -22
- package/agents/change-split-auditor.md +1 -42
- package/agents/code-reviewer.md +1 -42
- package/agents/contract-builder.md +1 -22
- package/agents/cross-change-consistency-checker.md +2 -43
- package/agents/need-explorer.md +1 -22
- package/agents/prd-completeness-reviewer.md +1 -47
- package/agents/prototype-builder.md +1 -41
- package/agents/prototype-env-scout.md +1 -26
- package/agents/prototype-reviewer.md +1 -41
- package/agents/release-archivist.md +1 -22
- package/agents/spec-writer.md +1 -22
- package/docs/README_en.md +1 -1
- package/docs/solutions/INDEX.md +1 -0
- package/docs/solutions/cross-phase/2026-08-04-no-summary.md +17 -0
- package/gemini-extension.json +1 -1
- package/hooks/session-start +2 -2
- package/llms.txt +1 -1
- package/package.json +5 -4
- package/plugin.json +1 -1
- package/scripts/lib/conventions-generator.mjs +350 -0
- package/scripts/lib/test-record.mjs +65 -2
- package/skills/e2e/SKILL.md +1 -1
- package/skills/test-strategy/SKILL.md +38 -1
- package/skills/test-strategy/references/integration-test-contracts.md +237 -0
- package/skills/test-strategy/references/integration-test-isolation.md +346 -0
- package/skills/test-strategy/references/test-quality-rules.md +292 -0
- package/skills/workflow-bootstrap/SKILL.md +40 -3
- package/templates/agent-template.md +41 -0
- package/templates/conventions/_manifest.json +39 -0
- package/templates/conventions/glaf4-compliant/java-testing.md +367 -0
- package/templates/conventions/glaf4-compliant/spring-patterns.md +415 -0
- package/templates/conventions/js-testing.md +261 -0
- package/templates/conventions/python-testing.md +333 -0
|
@@ -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.
|
|
12
|
+
"version": "0.34.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.34.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). 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.
|
|
5
|
+
"version": "0.34.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.34.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.34.0",
|
|
16
16
|
"source": ".",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "LT",
|
package/AGENTS.md
CHANGED
|
@@ -210,6 +210,8 @@ STRATEGY.md CONCEPTS.md 产品策略(BA) / 领域词汇
|
|
|
210
210
|
|
|
211
211
|
### Agents 索引(v0.7 新增,v0.30.0 增至 15 个)
|
|
212
212
|
|
|
213
|
+
> **agent 文件设计规范见 CONTRIBUTING.md §6 + `templates/agent-template.md`**(v0.33.0):frontmatter 必须合法 YAML(非法时 Claude Code 静默降级,skills: 预加载与 tools: 限制全部失效);description 单句、禁 `<example>` 块;新增/修改 agent 必过 frontmatter-lint + 实证探针。
|
|
214
|
+
|
|
213
215
|
| Agent | 职责 | Tools | 触发场景 |
|
|
214
216
|
|-------|------|-------|---------|
|
|
215
217
|
| architecture-design | 架构设计门控 agent——五项检查 + 三件套产出 + SQL 制品(workflow-start 子代理调用,判断+执行一体化) | Read/Bash/Grep/Glob/Write | workflow-start exploring→specifying 状态转换时(架构设计门控,v0.27.2) |
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,62 @@ The format loosely follows Keep a Changelog.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.34.0] - 2026-08-04
|
|
10
|
+
|
|
11
|
+
### Added(测试能力增强——吸收 glaf4-test 通用能力 + conventions 机制,设计见工作区级文档 team-flow-workspace/docs/plan/test-capability-enhancement-design.md)
|
|
12
|
+
|
|
13
|
+
#### P0:组合覆盖声明(test-strategy SKILL.md)
|
|
14
|
+
- **§8 组合覆盖声明**:多参数方法(param_count > 1)必须声明 `pairwise`,有分支逻辑必须声明 `branch`;contract-builder 生成矩阵后强制对账
|
|
15
|
+
|
|
16
|
+
#### P1:测试质量规则 + failure 分类法
|
|
17
|
+
- **skills/test-strategy/references/test-quality-rules.md**:从 glaf4-test scan-generated-tests.py 抽取 16 条通用规则(断言质量、调试代码残留、测试状态、测试数据、测试结构、矩阵对账、语言特定)
|
|
18
|
+
- **scripts/lib/test-record.mjs**:新增 `classifyFailure` 函数,测试失败时自动分类为 6 类(assertion_failure / runtime_error / framework_error / compile_error / dependency_blocker / unknown),记录到 test_result
|
|
19
|
+
|
|
20
|
+
#### P2:社交测试契约 + 测试隔离分级
|
|
21
|
+
- **skills/test-strategy/references/integration-test-contracts.md**:5 种契约类型(入口/协作者/数据/中间件/清理),集成测试的组织方法论
|
|
22
|
+
- **skills/test-strategy/references/integration-test-isolation.md**:4 级隔离策略(L1 进程内 / L2 事务 / L3 手动清理 / L4 无隔离),基础设施隔离策略
|
|
23
|
+
|
|
24
|
+
#### P2:conventions 机制建设(v0.34.0 核心特性)
|
|
25
|
+
- **templates/conventions/**:plugin 内置 conventions 模板
|
|
26
|
+
- `glaf4-compliant/java-testing.md`:Java 测试规范(JUnit 5 + Mockito),符合 glaf4-test 要求
|
|
27
|
+
- `glaf4-compliant/spring-patterns.md`:Spring Boot 测试规范,符合 glaf4-test 要求
|
|
28
|
+
- `js-testing.md`:JavaScript 测试规范(Jest/Vitest)
|
|
29
|
+
- `python-testing.md`:Python 测试规范(Pytest)
|
|
30
|
+
- `_manifest.json`:模板清单(版本、描述、适用技术栈)
|
|
31
|
+
- **scripts/lib/conventions-generator.mjs**:conventions 生成器脚本
|
|
32
|
+
- 技术栈自动检测(Java/JavaScript/Python)
|
|
33
|
+
- conventions 模板选择和生成
|
|
34
|
+
- 版本管理机制(.versions.json)
|
|
35
|
+
- team-flow.config.json 自动更新
|
|
36
|
+
- 支持存量项目(自动识别)和全新项目(交互式引导)
|
|
37
|
+
- **skills/workflow-bootstrap/SKILL.md**:增加 B1.5 阶段(Conventions Generator)
|
|
38
|
+
|
|
39
|
+
### Tests
|
|
40
|
+
- **tests/lib/conventions-generator.test.mjs**:15 个测试(detectTechStack/selectTemplates/generateConventions/updateConfig)
|
|
41
|
+
- 全量回归:571/571 通过(含 15 个新增测试)
|
|
42
|
+
- check-versions ✅
|
|
43
|
+
|
|
44
|
+
## [0.33.0] - 2026-08-03
|
|
45
|
+
|
|
46
|
+
### Fixed(skills 注入恢复——frontmatter YAML 非法导致预加载静默失效,设计见工作区级文档 team-flow-workspace/docs/architecture-api-db-design-enhancement-v0.13.md §54)
|
|
47
|
+
|
|
48
|
+
#### 根因(P2-41)
|
|
49
|
+
- 全部 15 个 agent .md 的 frontmatter 是非法 YAML:`description` 块标量内顶格书写 `<example>`,缩进断裂 → Claude Code 解析静默降级:`skills:` 预加载被丢弃、`tools:` 限制失效、description 回退泛化标签,且无任何警告。插件诞生至今 SKILL.md 方法论从未被注入子代理(v0.32.1 的 contract-builder test-strategy 预加载修复同样未生效)
|
|
50
|
+
- **agents/*.md(15 个)**:description 单句化 + 删除 `<example>` 块(LT 决策,学 glaf4 合法写法);`skills:`/`tools:` 声明保持
|
|
51
|
+
- **skills/e2e/SKILL.md**、**skills/test-strategy/SKILL.md**:description 含裸 `: `(非法 YAML)→ 加引号/改写修复;test-strategy 顺带修正预加载主体表述(build-executor / contract-builder)
|
|
52
|
+
|
|
53
|
+
#### 行为变更
|
|
54
|
+
- `skills:` 预加载开始真实生效:dispatch 时 SKILL.md 全文注入子代理上下文
|
|
55
|
+
- `tools:` 限制开始真实生效:子代理工具集从全量(117 个,含全部 MCP)收紧为 frontmatter 声明集
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
- **tests/lib/frontmatter-lint.test.mjs**(P3-12):frontmatter 合法性长效门禁——js-yaml 严格解析全部 agents/skills/commands frontmatter + name/description 必填断言 + agent name 与文件名一致 + skills: 引用必须解析到真实 skills/<name>/SKILL.md;进 npm test(58 例),杜绝同类缺陷复发
|
|
59
|
+
- devDependency:js-yaml
|
|
60
|
+
|
|
61
|
+
### Tests
|
|
62
|
+
- 全量回归:556/556(lib 498 + lint 58)+ Tier1 e2e + check-versions ✅
|
|
63
|
+
- 变异验证:门禁对旧式病态 frontmatter 样本可捕获
|
|
64
|
+
|
|
9
65
|
## [0.32.2] - 2026-08-03
|
|
10
66
|
|
|
11
67
|
### Fixed(C1 死锁链修复三件套,设计见工作区级文档 team-flow-workspace/docs/plan/v0.32.2-hook-and-gate-fix.md)
|
package/CONTRIBUTING.md
CHANGED
|
@@ -86,6 +86,50 @@ Skill text should help an agent decide:
|
|
|
86
86
|
|
|
87
87
|
Avoid vague motivational language when an operational rule would be clearer.
|
|
88
88
|
|
|
89
|
+
### 6. Agent file design spec (v0.33.0+)
|
|
90
|
+
|
|
91
|
+
Background: before v0.33.0, every agent's YAML frontmatter was invalid (an
|
|
92
|
+
`<example>` block at column 0 inside the `description` field). Claude Code
|
|
93
|
+
degrades SILENTLY on invalid frontmatter — `skills:` preload and `tools:`
|
|
94
|
+
restrictions are dropped with no warning, and the agent body alone is kept.
|
|
95
|
+
The defect survived the entire plugin lifetime. `tests/lib/frontmatter-lint.test.mjs`
|
|
96
|
+
(npm test) is the machine gate; this spec is the human gate.
|
|
97
|
+
|
|
98
|
+
Copy `templates/agent-template.md` when creating a new agent. Hard rules:
|
|
99
|
+
|
|
100
|
+
1. **`description` is a single-line string.** No `>-` block scalars, no
|
|
101
|
+
`<example>` blocks — the official Anthropic plugin-dev agents use that
|
|
102
|
+
pattern and it is a trap (it breaks YAML indentation and silently disables
|
|
103
|
+
the whole frontmatter). If the text must contain an ASCII `: `, wrap the
|
|
104
|
+
entire value in double quotes. team-flow agents are dispatched explicitly
|
|
105
|
+
by `workflow-start`, so example-driven auto-triggering buys nothing.
|
|
106
|
+
2. **`name` must equal the file name** (minus `.md`). On degraded parsing the
|
|
107
|
+
registry falls back to the file name — a mismatch means silent mislabeling.
|
|
108
|
+
3. **Declare `tools` explicitly.** Since v0.33.0 the restriction is enforced;
|
|
109
|
+
the subagent holds ONLY the declared tools (no MCP tools unless listed).
|
|
110
|
+
4. **`skills` entries must resolve.** Each entry must match an existing
|
|
111
|
+
`skills/<name>/SKILL.md` (bare name, same as glaf4-test's proven pattern).
|
|
112
|
+
A dangling entry means a silent no-preload.
|
|
113
|
+
5. **Body ≤ 100 lines, WHO/WHAT only.** No SOP/methodology in the body — that
|
|
114
|
+
belongs to the preloaded Skill. If the body says "Your preloaded Skill
|
|
115
|
+
contains the detailed methodology", the `skills:` field MUST declare it.
|
|
116
|
+
|
|
117
|
+
Anti-patterns (forbidden):
|
|
118
|
+
|
|
119
|
+
- `<example>` blocks anywhere in frontmatter
|
|
120
|
+
- Unquoted ASCII `: ` inside `description` values
|
|
121
|
+
- Copying frontmatter style from other plugins without running the lint
|
|
122
|
+
|
|
123
|
+
Verification (mandatory for new/changed agents):
|
|
124
|
+
|
|
125
|
+
1. `npm test` — the frontmatter-lint gate must pass.
|
|
126
|
+
2. **Empirical probe** — dispatch the agent once and verify with a BEHAVIORAL
|
|
127
|
+
probe (ask it to recite a rule that exists only in the preloaded Skill or
|
|
128
|
+
the agent body). Do NOT rely on exact-string introspection questions — they
|
|
129
|
+
produce false negatives. Do not write "mechanism works" claims into any doc
|
|
130
|
+
without this probe. See design doc §54.6 (workspace-level
|
|
131
|
+
`docs/architecture-api-db-design-enhancement-v0.13.md`).
|
|
132
|
+
|
|
89
133
|
## Pull Request Guidance
|
|
90
134
|
|
|
91
135
|
When opening a change, explain:
|
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.34.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.34.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
|
|
|
@@ -1,39 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: architecture-design
|
|
3
|
-
description:
|
|
4
|
-
架构设计门控 agent——基于 4A+DDD 执行五项检查,判断是否需要架构增量设计,
|
|
5
|
-
若需要则产出三件套(architecture.md + database.md + api.md)+ SQL 制品。
|
|
6
|
-
在 workflow-start 编排中作为子代理调用,承担判断+执行一体化职责。
|
|
7
|
-
Examples:
|
|
8
|
-
|
|
9
|
-
<example>
|
|
10
|
-
Context: workflow-start 在 exploring 完成后,需要判断本 change 是否涉及架构变更。
|
|
11
|
-
user: "exploring 完成了,帮我做架构设计判断"
|
|
12
|
-
assistant: "我来启动 architecture-design agent,执行五项检查判定是否需要架构增量设计。"
|
|
13
|
-
<commentary>
|
|
14
|
-
architecture-design 是 exploring→specifying 之间的门控 agent。五项检查全部为否则 skipped,
|
|
15
|
-
任一为是则 required 并产出三件套。workflow-start 负责后续的 auto-review + reasonableness check。
|
|
16
|
-
</commentary>
|
|
17
|
-
</example>
|
|
18
|
-
|
|
19
|
-
<example>
|
|
20
|
-
Context: hotfix 模式下仍需要经过架构设计判断门(hotfix 可能正是架构缺陷导致)。
|
|
21
|
-
user: "这是一个 hotfix,需要过架构设计门控吗?"
|
|
22
|
-
assistant: "需要。architecture-design 判断门对 hotfix/tweak 不豁免——启动 agent 执行五项检查。"
|
|
23
|
-
<commentary>
|
|
24
|
-
v0.9 §26 明确要求 hotfix/tweak 同样过 architecture-design 子代理判断门。
|
|
25
|
-
</commentary>
|
|
26
|
-
</example>
|
|
27
|
-
|
|
28
|
-
<example>
|
|
29
|
-
Context: 五项检查判定为 skipped,但 change-brief 中包含"新增 API"字样。
|
|
30
|
-
user: "brief 里说新增 API,但 agent 说 skipped,这不合理吧?"
|
|
31
|
-
assistant: "workflow-start 的 reasonableness check 检测到不一致——skipped + brief 含架构变更关键词 → BLOCK。需要重新执行架构设计。"
|
|
32
|
-
<commentary>
|
|
33
|
-
reasonableness check 是 workflow-start 的职责,不是 architecture-design agent 的。
|
|
34
|
-
agent 只负责判断+产出,workflow-start 负责确认合理性。
|
|
35
|
-
</commentary>
|
|
36
|
-
</example>
|
|
3
|
+
description: 架构设计门控 agent——基于 4A+DDD 执行五项检查判断是否需要架构增量设计,需要则产出三件套(architecture.md + database.md + api.md)+ SQL 制品。在 workflow-start 编排中作为子代理调用,承担判断+执行一体化职责。
|
|
37
4
|
|
|
38
5
|
model: inherit
|
|
39
6
|
color: blue
|
|
@@ -1,47 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: architecture-reviewer
|
|
3
|
-
description:
|
|
4
|
-
架构设计自动审查 agent——独立上下文、只读审查,对照 PRD/plan/change-brief + 全局基线 +
|
|
5
|
-
conventions 审查架构产出质量(6 维度 A1-A6)。填补 architecture-design 阶段
|
|
6
|
-
"设计完无审查"的缺口。循环修正 ≤3 轮 + 收敛检测。
|
|
7
|
-
Examples:
|
|
8
|
-
|
|
9
|
-
<example>
|
|
10
|
-
Context: architecture-design agent 刚产出三件套,workflow-start 需要自动审查质量。
|
|
11
|
-
user: "架构设计完成了,帮我审查一下产出质量"
|
|
12
|
-
assistant: "我来启动 architecture-reviewer agent,独立审查架构产出的 6 维度质量。"
|
|
13
|
-
<commentary>
|
|
14
|
-
architecture-reviewer 在独立上下文中运行,未参与架构设计产出,规避锚定效应。
|
|
15
|
-
审查报告写在 response 中,由编排层落盘到 changes/<name>/architecture/auto-review.md。
|
|
16
|
-
</commentary>
|
|
17
|
-
</example>
|
|
18
|
-
|
|
19
|
-
<example>
|
|
20
|
-
Context: 架构产出经过修正后需要重新审查(第 2 轮)。
|
|
21
|
-
user: "架构设计修正完了,重新跑一下审查"
|
|
22
|
-
assistant: "我启动 architecture-reviewer agent 进行第 2 轮审查,对比修正前后不一致项是否收敛。"
|
|
23
|
-
<commentary>
|
|
24
|
-
FAIL 后修正→重新审查,最多 3 轮。连续两轮不一致项集合无缩小则转人工,避免死循环。
|
|
25
|
-
</commentary>
|
|
26
|
-
</example>
|
|
27
|
-
|
|
28
|
-
<example>
|
|
29
|
-
Context: 用户想确认架构产出是否覆盖了 change-brief 中的所有需求。
|
|
30
|
-
user: "brief 里定义了 5 个功能点,架构设计是不是都覆盖了?"
|
|
31
|
-
assistant: "让 architecture-reviewer agent 做 A4 需求覆盖的结构化检查。"
|
|
32
|
-
<commentary>
|
|
33
|
-
A4 需求覆盖是最关键的维度——遗漏意味着需求在架构层面丢失,下游 spec/code 无法弥补。
|
|
34
|
-
</commentary>
|
|
35
|
-
</example>
|
|
36
|
-
|
|
37
|
-
<example>
|
|
38
|
-
Context: 想检查架构产出是否遵循项目级 conventions。
|
|
39
|
-
user: "帮我看看架构设计是否符合项目的 DB 命名规范和 API 规范"
|
|
40
|
-
assistant: "我启动 architecture-reviewer agent 做 A6 conventions 合规检查。"
|
|
41
|
-
<commentary>
|
|
42
|
-
A6 读取 .team-flow/conventions/ 下的规范文件,逐项比对架构产出是否遵循。
|
|
43
|
-
</commentary>
|
|
44
|
-
</example>
|
|
3
|
+
description: 架构设计自动审查 agent——独立上下文、只读审查,对照 PRD/plan/change-brief + 全局基线 + conventions 审查架构产出质量(6 维度 A1-A6),填补 architecture-design 阶段"设计完无审查"的缺口。循环修正 ≤3 轮 + 收敛检测。
|
|
45
4
|
|
|
46
5
|
model: inherit
|
|
47
6
|
color: yellow
|
|
@@ -1,42 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bug-investigator
|
|
3
|
-
description: Use this agent when the user encounters a bug, test failure, unexpected behavior, build failure, or performance issue and wants autonomous root-cause investigation. The agent explores the codebase, forms hypotheses, tests them, and produces a structured root-cause analysis report.
|
|
4
|
-
|
|
5
|
-
<example>
|
|
6
|
-
Context: A test is failing and the user wants to understand why before attempting a fix.
|
|
7
|
-
user: "This test has been failing since yesterday, can you investigate why?"
|
|
8
|
-
assistant: "I'll launch the bug-investigator agent to systematically trace the root cause of the test failure."
|
|
9
|
-
<commentary>
|
|
10
|
-
The user wants root-cause analysis, not a quick patch. The bug-investigator agent follows a scientific method: read errors → reproduce → trace data flow → form hypothesis → test → report. It writes investigation notes but does not fix the code.
|
|
11
|
-
</commentary>
|
|
12
|
-
</example>
|
|
13
|
-
|
|
14
|
-
<example>
|
|
15
|
-
Context: Unexpected behavior in production that doesn't reproduce easily.
|
|
16
|
-
user: "用户在生产环境报了一个诡异的 bug,偶发性的,帮我排查一下"
|
|
17
|
-
assistant: "我来启动 bug-investigator agent,系统性地排查这个偶发问题的根因。"
|
|
18
|
-
<commentary>
|
|
19
|
-
Intermittent bugs require structured investigation — gathering evidence, checking component boundaries, tracing data flow. The agent excels at methodical root-cause analysis for hard-to-reproduce issues.
|
|
20
|
-
</commentary>
|
|
21
|
-
</example>
|
|
22
|
-
|
|
23
|
-
<example>
|
|
24
|
-
Context: Multiple fix attempts have failed and the user suspects a deeper issue.
|
|
25
|
-
user: "I've tried fixing this three times and it keeps breaking in different ways — something is fundamentally wrong"
|
|
26
|
-
assistant: "This sounds like an architectural issue. Let me dispatch the bug-investigator agent to do a deep root-cause investigation."
|
|
27
|
-
<commentary>
|
|
28
|
-
Multiple failed fixes indicate the symptom is being addressed, not the cause. The agent's DP-5 escalation logic specifically handles this: 3+ failures = question the architecture.
|
|
29
|
-
</commentary>
|
|
30
|
-
</example>
|
|
31
|
-
|
|
32
|
-
<example>
|
|
33
|
-
Context: A build failure with unclear error messages.
|
|
34
|
-
user: "The build broke and the error message doesn't make sense, can you figure out what's going on?"
|
|
35
|
-
assistant: "I'll use the bug-investigator agent to trace the build failure to its root cause."
|
|
36
|
-
<commentary>
|
|
37
|
-
Unclear errors require careful reading of stack traces, checking recent changes, and tracing dependency chains. The agent systematically narrows down the cause.
|
|
38
|
-
</commentary>
|
|
39
|
-
</example>
|
|
3
|
+
description: Use this agent when the user encounters a bug, test failure, unexpected behavior, build failure, or performance issue and wants autonomous root-cause investigation. The agent explores the codebase, forms hypotheses, tests them, and produces a structured root-cause analysis report without implementing fixes.
|
|
40
4
|
|
|
41
5
|
model: inherit
|
|
42
6
|
color: yellow
|
package/agents/build-executor.md
CHANGED
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: build-executor
|
|
3
|
-
description:
|
|
4
|
-
构建执行 agent——在 execution-contract.md 经 DP-3 批准之后、release-archivist 之前,
|
|
5
|
-
以契约为权威驱动 TDD 批次实施(SDD/Inline/Batch Inline)。可写型,负责实施代码产出。
|
|
6
|
-
Examples:
|
|
7
|
-
|
|
8
|
-
<example>
|
|
9
|
-
Context: 契约已批准,用户希望按纪律逐批实施。
|
|
10
|
-
user: "契约批了,开始按 TDD 实施"
|
|
11
|
-
assistant: "I'll launch the build-executor agent to govern the batch-by-batch TDD build."
|
|
12
|
-
<commentary>
|
|
13
|
-
build-executor 是 executing 阶段的实施 agent,守 TDD Iron Law 与契约优先,产出实施代码。
|
|
14
|
-
</commentary>
|
|
15
|
-
</example>
|
|
16
|
-
|
|
17
|
-
<example>
|
|
18
|
-
Context: 实施中出现契约外新行为,需要回退而非硬做。
|
|
19
|
-
user: "做着做着发现要加一个契约里没有的能力"
|
|
20
|
-
assistant: "I'll have build-executor rewind to specifying/bridging instead of silently expanding scope."
|
|
21
|
-
<commentary>
|
|
22
|
-
Law 4 Rewind on Contract Break:新行为/接口实质变化/设计假设失效 → 回退规划,不私自扩 scope。
|
|
23
|
-
</commentary>
|
|
24
|
-
</example>
|
|
3
|
+
description: 构建执行 agent——在 execution-contract.md 经 DP-3 批准之后、release-archivist 之前,以契约为权威驱动 TDD 批次实施(SDD/Inline/Batch Inline)。可写型,负责实施代码产出。
|
|
25
4
|
|
|
26
5
|
model: inherit
|
|
27
6
|
color: green
|
|
@@ -1,47 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: change-split-auditor
|
|
3
|
-
description:
|
|
4
|
-
plan.md 拆分质量审计。在 ce-plan 产出 plan.md 后、change 脚手架前,
|
|
5
|
-
独立审计拆分质量:PRD 需求覆盖矩阵、DAG 无环、粒度均衡、字段完整性、所有权粒度合规(v0.9 根因判据硬门禁:切碎检测/无设计单元/跨单元臃肿)。
|
|
6
|
-
输出 PASS/FAIL verdict。只读审查。
|
|
7
|
-
Examples:
|
|
8
|
-
|
|
9
|
-
<example>
|
|
10
|
-
Context: ce-plan 刚产出 plan.md,orchestrator 需要在创建 change 目录前验证拆分质量。
|
|
11
|
-
user: "plan.md 写好了,帮我检查一下拆分是否合理"
|
|
12
|
-
assistant: "我来启动 change-split-auditor agent,独立审计 plan.md 的拆分质量。"
|
|
13
|
-
<commentary>
|
|
14
|
-
拆分质量审计是 orchestrator S4 阶段的前置门禁。审计失败时编排层携 findings
|
|
15
|
-
回退 ce-plan 加深,避免有缺陷的拆分进入执行。
|
|
16
|
-
</commentary>
|
|
17
|
-
</example>
|
|
18
|
-
|
|
19
|
-
<example>
|
|
20
|
-
Context: 用户担心 plan 遗漏了 PRD 中的某些需求。
|
|
21
|
-
user: "PRD 里有 12 个功能点,plan 的 change 是不是都覆盖了?"
|
|
22
|
-
assistant: "让 change-split-auditor agent 构建 PRD→change 覆盖矩阵,检查有无遗漏或重叠。"
|
|
23
|
-
<commentary>
|
|
24
|
-
需求覆盖矩阵是 5 维度审计中最关键的一环——遗漏意味着需求丢失,重叠意味着重复工作。
|
|
25
|
-
</commentary>
|
|
26
|
-
</example>
|
|
27
|
-
|
|
28
|
-
<example>
|
|
29
|
-
Context: plan 中有多组依赖关系,用户想确认不存在循环依赖。
|
|
30
|
-
user: "change-3 依赖 change-1,change-1 又依赖 change-3,这不是死循环了吗?"
|
|
31
|
-
assistant: "我启动 change-split-auditor agent 做 DAG 无环验证和依赖完整性检查。"
|
|
32
|
-
<commentary>
|
|
33
|
-
循环依赖会导致所有涉及的 change 永远无法启动。DAG 验证是机械化的拓扑排序检查。
|
|
34
|
-
</commentary>
|
|
35
|
-
</example>
|
|
36
|
-
|
|
37
|
-
<example>
|
|
38
|
-
Context: plan 修订后需要重新审计。
|
|
39
|
-
user: "plan 改过了,重新跑一下拆分审计"
|
|
40
|
-
assistant: "我启动 change-split-auditor agent 对修订后的 plan.md 重新做 5 维度审计。"
|
|
41
|
-
<commentary>
|
|
42
|
-
FAIL 后 ce-plan 加深→重新审计,直到 PASS 才进入 change 脚手架。
|
|
43
|
-
</commentary>
|
|
44
|
-
</example>
|
|
3
|
+
description: plan.md 拆分质量审计。在 ce-plan 产出 plan.md 后、change 脚手架前,独立审计拆分质量——PRD 需求覆盖矩阵、DAG 无环、粒度均衡、字段完整性、所有权粒度合规(v0.9 根因判据硬门禁:切碎检测/无设计单元/跨单元臃肿)。输出 PASS/FAIL verdict。只读审查。
|
|
45
4
|
|
|
46
5
|
model: inherit
|
|
47
6
|
color: cyan
|
package/agents/code-reviewer.md
CHANGED
|
@@ -1,47 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-reviewer
|
|
3
|
-
description:
|
|
4
|
-
代码审查 agent——审查代码质量、规格合规性、架构合理性、实现完整性。在 build-executor
|
|
5
|
-
执行后、release-archivist 归档前,独立审查实现质量。只读审查,不修改任何文件。
|
|
6
|
-
Examples:
|
|
7
|
-
|
|
8
|
-
<example>
|
|
9
|
-
Context: build-executor 刚完成一个 wave 的实现,orchestrator 需要审查代码质量。
|
|
10
|
-
user: "wave-1 实现完了,帮我 review 一下代码"
|
|
11
|
-
assistant: "我来启动 code-reviewer agent,独立审查 wave-1 的代码质量。"
|
|
12
|
-
<commentary>
|
|
13
|
-
代码审查是 build-executor 完成后、release-archivist 归档前的关键门禁。本 agent 在独立上下文中运行,
|
|
14
|
-
未参与实现,规避锚定效应。审查报告写在 response 中,由编排层落盘。
|
|
15
|
-
</commentary>
|
|
16
|
-
</example>
|
|
17
|
-
|
|
18
|
-
<example>
|
|
19
|
-
Context: 用户担心实现偏离了规格说明。
|
|
20
|
-
user: "帮我看看实现有没有偏离 design.md 和 specs/"
|
|
21
|
-
assistant: "让 code-reviewer agent 做规格合规性检查,逐项核对实现与 spec 的一致性。"
|
|
22
|
-
<commentary>
|
|
23
|
-
规格合规性是审查的核心维度——实现必须忠实反映 design.md 的决策和 specs/ 的要求。
|
|
24
|
-
偏离必须有明确理由(如技术约束),否则是 Critical finding。
|
|
25
|
-
</commentary>
|
|
26
|
-
</example>
|
|
27
|
-
|
|
28
|
-
<example>
|
|
29
|
-
Context: 实现经过修正后需要重新审查(第 2 轮)。
|
|
30
|
-
user: "按上一轮 review 意见改了,重新跑一下审查"
|
|
31
|
-
assistant: "我启动 code-reviewer agent 进行第 2 轮审查,对比修正前后问题是否收敛。"
|
|
32
|
-
<commentary>
|
|
33
|
-
FAIL→修正→重新审查,最多 3 轮。连续两轮问题集合无缩小则转人工,避免死循环。
|
|
34
|
-
</commentary>
|
|
35
|
-
</example>
|
|
36
|
-
|
|
37
|
-
<example>
|
|
38
|
-
Context: 复杂架构变更需要专项审查。
|
|
39
|
-
user: "这次改了 3 个聚合的边界,帮我重点看看架构是否合理"
|
|
40
|
-
assistant: "我启动 code-reviewer agent,重点审查架构决策、模块边界、依赖方向。"
|
|
41
|
-
<commentary>
|
|
42
|
-
架构审查关注分离关注点、依赖方向、接口设计、可扩展性。复杂变更需要专项深度审查。
|
|
43
|
-
</commentary>
|
|
44
|
-
</example>
|
|
3
|
+
description: 代码审查 agent——审查代码质量、规格合规性、架构合理性、实现完整性。在 build-executor 执行后、release-archivist 归档前,独立审查实现质量。只读审查,不修改任何文件。
|
|
45
4
|
|
|
46
5
|
model: inherit
|
|
47
6
|
color: blue
|
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: contract-builder
|
|
3
|
-
description:
|
|
4
|
-
执行契约 agent——在 spec-writer 产出规划制品并通过 DP-2 之后、build-executor 之前,
|
|
5
|
-
将规划制品压缩为单一执行握手 execution-contract.md。可写型,负责执行契约文件。
|
|
6
|
-
Examples:
|
|
7
|
-
|
|
8
|
-
<example>
|
|
9
|
-
Context: 四件规划制品已稳定且 DP-2 已记录,准备进入实施。
|
|
10
|
-
user: "规划都确认了,帮我生成执行契约,准备开干"
|
|
11
|
-
assistant: "I'll launch the contract-builder agent to convert the artifacts into execution-contract.md."
|
|
12
|
-
<commentary>
|
|
13
|
-
contract-builder 是 bridging 阶段的核心 agent,产出 execution-contract.md 并守 DP-3 批准门。
|
|
14
|
-
</commentary>
|
|
15
|
-
</example>
|
|
16
|
-
|
|
17
|
-
<example>
|
|
18
|
-
Context: 既有契约因 scope 变更而过期,需要刷新。
|
|
19
|
-
user: "specs 改了,执行契约好像对不上了"
|
|
20
|
-
assistant: "I'll have contract-builder detect staleness and refresh the contract."
|
|
21
|
-
<commentary>
|
|
22
|
-
契约过期检测:scope/requirements/constraints/batches 变化即刷新,不静默放行陈旧契约。
|
|
23
|
-
</commentary>
|
|
24
|
-
</example>
|
|
3
|
+
description: 执行契约 agent——在 spec-writer 产出规划制品并通过 DP-2 之后、build-executor 之前,将规划制品压缩为单一执行握手 execution-contract.md。可写型,负责执行契约文件。
|
|
25
4
|
|
|
26
5
|
model: inherit
|
|
27
6
|
color: magenta
|
|
@@ -1,48 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cross-change-consistency-checker
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
检测共享聚合/实体被多个 change 修改、API 签名变更影响、
|
|
6
|
-
与全局架构锚点漂移、与原型 testid 契约漂移。只读审查。
|
|
7
|
-
Examples:
|
|
8
|
-
|
|
9
|
-
<example>
|
|
10
|
-
Context: 两个 change 正在并行开发,orchestrator 在 S5 监控阶段触发一致性检测。
|
|
11
|
-
user: "change-1 和 change-2 都在跑,帮我看看有没有冲突"
|
|
12
|
-
assistant: "我来启动 cross-change-consistency-checker agent,检测跨 change 的 4 维度冲突。"
|
|
13
|
-
<commentary>
|
|
14
|
-
多 change 并行执行时,共享聚合/API/架构锚点可能被不同 change 独立修改导致冲突。
|
|
15
|
-
S5 全局监控阶段(change≥2 时必选)定期触发此检测。
|
|
16
|
-
</commentary>
|
|
17
|
-
</example>
|
|
18
|
-
|
|
19
|
-
<example>
|
|
20
|
-
Context: 一个 change 即将 closing,需要检查它的修改是否与其他 change 矛盾。
|
|
21
|
-
user: "change-3 要合并了,先检查一下跟其他 change 有没有冲突"
|
|
22
|
-
assistant: "我启动 cross-change-consistency-checker agent 做 closing 前的跨 change 冲突检测。"
|
|
23
|
-
<commentary>
|
|
24
|
-
Change closing 是冲突检测的关键时机——合并后再发现冲突代价更高。
|
|
25
|
-
</commentary>
|
|
26
|
-
</example>
|
|
27
|
-
|
|
28
|
-
<example>
|
|
29
|
-
Context: 用户怀疑某个 change 的实现偏离了全局架构文档。
|
|
30
|
-
user: "change-2 改的数据模型跟 DATABASE.md 里定义的对不上"
|
|
31
|
-
assistant: "让 cross-change-consistency-checker agent 检测 change-2 与全局架构锚点的漂移。"
|
|
32
|
-
<commentary>
|
|
33
|
-
架构锚点漂移检测(Dim 3)比对 change 实际修改与 ARCHITECTURE.md/DATABASE.md
|
|
34
|
-
的声明,发现未回写的结构性变更。
|
|
35
|
-
</commentary>
|
|
36
|
-
</example>
|
|
37
|
-
|
|
38
|
-
<example>
|
|
39
|
-
Context: 原型中定义了 data-testid 契约,需要检查各 change 是否遵守。
|
|
40
|
-
user: "原型里定义了 testid,看看各个 change 有没有按契约来"
|
|
41
|
-
assistant: "我启动 cross-change-consistency-checker agent 做 testid 契约漂移检测。"
|
|
42
|
-
<commentary>
|
|
43
|
-
Dim 4 检测原型 testid 契约是否被 change 实现正确引用,保障 E2E 测试基础。
|
|
44
|
-
</commentary>
|
|
45
|
-
</example>
|
|
3
|
+
description: 跨 change 冲突检测。在多 change 并行执行期或 change closing 时,检测共享聚合/实体被多个 change 修改、API 签名变更影响、与全局架构锚点漂移、与原型 testid 契约漂移。只读审查。
|
|
4
|
+
|
|
46
5
|
|
|
47
6
|
model: inherit
|
|
48
7
|
color: red
|
package/agents/need-explorer.md
CHANGED
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: need-explorer
|
|
3
|
-
description:
|
|
4
|
-
需求探索 agent——在 workflow-start 路由后、spec-writer 之前,于 change 上下文内交互式
|
|
5
|
-
澄清意图/scope/约束/成功标准,稳定 change 定义并守 DP-1 门。只读型,不产出制品不写代码。
|
|
6
|
-
Examples:
|
|
7
|
-
|
|
8
|
-
<example>
|
|
9
|
-
Context: change 上下文内请求模糊,需要先澄清再写制品。
|
|
10
|
-
user: "我想给这块加点东西,但还没想清楚"
|
|
11
|
-
assistant: "I'll launch the need-explorer agent to clarify intent and scope before any artifact."
|
|
12
|
-
<commentary>
|
|
13
|
-
need-explorer 是 exploring 阶段的澄清 agent,一次一问、偏好选择题,稳定 change 定义。
|
|
14
|
-
</commentary>
|
|
15
|
-
</example>
|
|
16
|
-
|
|
17
|
-
<example>
|
|
18
|
-
Context: 本 change 由 workflow-orchestrator S4 分发,change-brief.md 已存在。
|
|
19
|
-
user: "这是 orchestrator 拆出来的 change,帮我确认下范围"
|
|
20
|
-
assistant: "I'll have need-explorer read the brief first and only probe what it leaves open."
|
|
21
|
-
<commentary>
|
|
22
|
-
brief 存在时先读再问,把 brief 的 Scope/约束/AC 作为默认值,默认不再二次拆分。
|
|
23
|
-
</commentary>
|
|
24
|
-
</example>
|
|
3
|
+
description: 需求探索 agent——在 workflow-start 路由后、spec-writer 之前,于 change 上下文内交互式澄清意图/scope/约束/成功标准,稳定 change 定义并守 DP-1 门。只读型,不产出制品不写代码。
|
|
25
4
|
|
|
26
5
|
model: inherit
|
|
27
6
|
color: blue
|