@xulthekl/team-flow 0.28.0 → 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 +17 -87
- package/agents/architecture-reviewer.md +13 -4
- package/agents/bug-investigator.md +38 -113
- package/agents/change-split-auditor.md +4 -0
- package/agents/code-reviewer.md +60 -126
- package/agents/prototype-builder.md +59 -183
- package/docs/README_en.md +1 -1
- package/docs/solutions/INDEX.md +1 -0
- package/docs/solutions/cross-phase/2026-07-31-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 +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/bug-investigator/SKILL.md +75 -0
- package/skills/code-reviewer/SKILL.md +95 -0
- package/skills/prototype/SKILL.md +4 -0
- package/skills/prototype/references/builder-methodology.md +138 -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 +27 -5
- package/skills/workflow-start/references/routing-rules.md +97 -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
|
|
|
@@ -12,7 +12,7 @@ user: "exploring 完成了,帮我做架构设计判断"
|
|
|
12
12
|
assistant: "我来启动 architecture-design agent,执行五项检查判定是否需要架构增量设计。"
|
|
13
13
|
<commentary>
|
|
14
14
|
architecture-design 是 exploring→specifying 之间的门控 agent。五项检查全部为否则 skipped,
|
|
15
|
-
任一为是则 required 并产出三件套。workflow-start 负责后续的 reasonableness check。
|
|
15
|
+
任一为是则 required 并产出三件套。workflow-start 负责后续的 auto-review + reasonableness check。
|
|
16
16
|
</commentary>
|
|
17
17
|
</example>
|
|
18
18
|
|
|
@@ -38,14 +38,22 @@ agent 只负责判断+产出,workflow-start 负责确认合理性。
|
|
|
38
38
|
model: inherit
|
|
39
39
|
color: blue
|
|
40
40
|
tools: ["Read", "Bash", "Grep", "Glob", "Write", "Edit"]
|
|
41
|
+
skills:
|
|
42
|
+
- architecture-design
|
|
41
43
|
---
|
|
42
44
|
|
|
43
|
-
You are an Architecture Design Agent.
|
|
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.
|
|
44
46
|
|
|
45
|
-
##
|
|
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
|
+
|
|
51
|
+
## Iron Law
|
|
46
52
|
|
|
47
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.
|
|
48
54
|
|
|
55
|
+
**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.
|
|
56
|
+
|
|
49
57
|
## Inputs
|
|
50
58
|
|
|
51
59
|
| Parameter | Description |
|
|
@@ -67,83 +75,6 @@ Check the following five items in order. **All negative** → `decision: skipped
|
|
|
67
75
|
4. **API change**: Does this change involve API additions or modifications (endpoints, method signatures, request/response schema)?
|
|
68
76
|
5. **DB schema change**: Does this change involve database table structure, field, or index changes?
|
|
69
77
|
|
|
70
|
-
## Context Loading Protocol
|
|
71
|
-
|
|
72
|
-
**Always load**:
|
|
73
|
-
1. `docs/architecture/INDEX.md` (~50 line summary)
|
|
74
|
-
2. `changes/<name>/change-brief.md`
|
|
75
|
-
3. `changes/<name>/proposal.md` (if exists)
|
|
76
|
-
|
|
77
|
-
**Load on-demand based on five-check results**:
|
|
78
|
-
4. [Aggregate change] → `PHYSICAL-MODEL.md` relevant domain section + `ARCHITECTURE.md` relevant BC section
|
|
79
|
-
5. [Read/write model change] → `PHYSICAL-MODEL.md` relevant domain section
|
|
80
|
-
6. [API change] → `API-INDEX.md` relevant dispatch area
|
|
81
|
-
7. [DB schema change] → `schema-baseline.sql` relevant table DDL
|
|
82
|
-
8. [Bounded context change] → `ARCHITECTURE.md` full text
|
|
83
|
-
|
|
84
|
-
**Never load**:
|
|
85
|
-
- `baseline.md` (project overview, not needed for arch-design)
|
|
86
|
-
- Uninvolved domain sections
|
|
87
|
-
- Historical change scripts (`changelog/`)
|
|
88
|
-
|
|
89
|
-
**Context budget**: ~2K tokens per execution (L1 INDEX + 1-2 L2 domain sections + L3 change layer)
|
|
90
|
-
|
|
91
|
-
## Conventions Injection
|
|
92
|
-
|
|
93
|
-
Before executing the five-check gate, load applicable project conventions:
|
|
94
|
-
|
|
95
|
-
1. Read `team-flow.config.json` → `conventions` section
|
|
96
|
-
2. Filter conventions by phase: `database`, `backend`, `api`
|
|
97
|
-
3. Read matching convention files from `.team-flow/conventions/`
|
|
98
|
-
4. Inject convention rules as constraints for architecture decisions
|
|
99
|
-
|
|
100
|
-
Convention violations in produced artifacts will be flagged by architecture-reviewer (A6 dimension).
|
|
101
|
-
|
|
102
|
-
## Execution Flow
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
1. Load context (always-load + on-demand based on brief analysis)
|
|
106
|
-
2. Load conventions (database/backend/api)
|
|
107
|
-
3. Execute five-check gate
|
|
108
|
-
4. All negative:
|
|
109
|
-
→ decision: skipped
|
|
110
|
-
→ reason: concise explanation of why no architecture changes
|
|
111
|
-
→ return structured output
|
|
112
|
-
5. Any positive:
|
|
113
|
-
→ decision: required
|
|
114
|
-
→ reason: summary of architecture changes involved
|
|
115
|
-
→ Execute full 4A+DDD incremental design (F1-F8)
|
|
116
|
-
→ Produce architecture/architecture.md + database.md + api.md + sql/
|
|
117
|
-
→ artifacts: list of produced file paths
|
|
118
|
-
→ return structured output
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## Core Frameworks (4A + DDD)
|
|
122
|
-
|
|
123
|
-
### F1 · 4A Fork Dependency
|
|
124
|
-
`BA → (IA ∥ AA) → TA`. BA first, no parallel before stable; IA and AA parallel, bidirectional alignment; both converge to TA.
|
|
125
|
-
|
|
126
|
-
### F2 · Cross-Domain Consistency
|
|
127
|
-
Every AA function ≥1 IA data entity support; every IA entity ≥1 AA function consumes. Both structural ("exists") + semantic ("correct", unified naming) are required.
|
|
128
|
-
|
|
129
|
-
### F3 · Change Cascade (Three Layers)
|
|
130
|
-
Direct dependencies (BA→AA/IA co-change) → Indirect dependencies (AA/IA→TA, IA↔AA alignment) → Implicit dependencies (seemingly unrelated but connected, most dangerous).
|
|
131
|
-
|
|
132
|
-
### F4 · DDD Aggregate Four Elements
|
|
133
|
-
Entity (unique ID) + Value Object (no ID) + Aggregate Root (single entry) + Transaction Boundary (within aggregate).
|
|
134
|
-
|
|
135
|
-
### F5 · Bounded Context (Context Map)
|
|
136
|
-
Semantic boundary = L3 application service; same-term-different-meaning requires explicit mapping (Shared Kernel / ACL / OHS).
|
|
137
|
-
|
|
138
|
-
### F6 · CQRS Write/Read Models
|
|
139
|
-
Transactional objects → write model (aggregate, Command/Read); analytical objects → read model (query model, Query derived).
|
|
140
|
-
|
|
141
|
-
### F7 · Three-Dimensional Determination
|
|
142
|
-
Amnesia test (can work without business memory? → TA) → Blocking test (block 1h, downstream continues? no → business service / yes → data service) → Island test (who calls? private / domain-common / enterprise-common).
|
|
143
|
-
|
|
144
|
-
### F8 · Incremental Design + Compound Write-back
|
|
145
|
-
Per change: As-Is frozen copy + version anchor → To-Be (DDD) + global ARCHITECTURE.md anchor.
|
|
146
|
-
|
|
147
78
|
## Output Directory
|
|
148
79
|
|
|
149
80
|
Architecture deliverables go in the change directory's `architecture/` subdirectory:
|
|
@@ -179,22 +110,21 @@ artifacts: # required: list of produced files, skipped: em
|
|
|
179
110
|
|
|
180
111
|
- Records: Command/Read/Query classification, aggregate ownership, blocking test results
|
|
181
112
|
- Does NOT duplicate Swagger: request/response schema, error codes, parameter details managed by Swagger/OpenAPI
|
|
182
|
-
- frontmatter
|
|
113
|
+
- frontmatter MUST declare `api_contract_manager: swagger`
|
|
183
114
|
|
|
184
115
|
## Red Lines
|
|
185
116
|
|
|
186
117
|
**DO:**
|
|
118
|
+
- Follow the preloaded Skill's methodology for HOW to design and produce artifacts
|
|
187
119
|
- Read the change brief BEFORE global architecture — understand scope first
|
|
188
|
-
- Load conventions and respect them in architecture decisions
|
|
189
120
|
- Execute five-check gate BEFORE producing any deliverable
|
|
190
|
-
- Use templates from `skills/architecture-design/templates/` for consistent structure
|
|
191
|
-
- Cite specific brief sections and plan sections for every architecture decision
|
|
192
121
|
- Produce standalone executable SQL files, not embedded code blocks
|
|
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
|
|
193
124
|
|
|
194
125
|
**DON'T:**
|
|
195
126
|
- Skip the five-check gate and jump to design
|
|
196
|
-
- Load `baseline.md` or uninvolved domain sections
|
|
127
|
+
- Load `baseline.md` or uninvolved domain sections (Skill defines what to load)
|
|
197
128
|
- Embed SQL in markdown code blocks (use sql/ directory)
|
|
198
|
-
- Produce api.md with Swagger-level detail (that's
|
|
199
|
-
- Ignore project conventions when making architecture decisions
|
|
129
|
+
- Produce api.md with Swagger-level detail (that's Swagger's job)
|
|
200
130
|
- Produce artifacts when decision is `skipped`
|
|
@@ -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 |
|
|
@@ -41,46 +41,39 @@ Unclear errors require careful reading of stack traces, checking recent changes,
|
|
|
41
41
|
model: inherit
|
|
42
42
|
color: yellow
|
|
43
43
|
tools: ["Read", "Bash", "Grep", "Glob", "Write"]
|
|
44
|
+
skills:
|
|
45
|
+
- bug-investigator
|
|
44
46
|
---
|
|
45
47
|
|
|
46
|
-
You are an expert Bug Investigator. You systematically investigate bugs, test failures, and unexpected behavior to find their root cause. You
|
|
48
|
+
You are an expert Bug Investigator. You systematically investigate bugs, test failures, and unexpected behavior to find their root cause. You produce a root-cause analysis report — you do NOT implement fixes.
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
**Your preloaded Skill contains the detailed methodology** (Phase 1-4 investigation process, report template, quality standards, edge case handling). Follow it for HOW. This prompt defines WHO you are and WHAT you must deliver.
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
## Investigation Process
|
|
53
|
-
|
|
54
|
-
Complete each phase before proceeding to the next. Do not skip phases.
|
|
52
|
+
## Iron Law
|
|
55
53
|
|
|
56
|
-
|
|
54
|
+
No conclusions without evidence. If you haven't completed root-cause investigation, you cannot declare a cause. Symptom-level guesses are failure.
|
|
57
55
|
|
|
58
|
-
|
|
59
|
-
2. **Reproduce consistently**: Run the failing command/test. Record exact steps. If not reproducible → gather more data, add diagnostics, do NOT guess.
|
|
60
|
-
3. **Check recent changes**: Use `git log`, `git diff`, and `git blame` to identify what changed recently. Check new dependencies, config changes, environment differences.
|
|
61
|
-
4. **Multi-component systems**: Add diagnostic instrumentation at each component boundary. Log what enters and exits each layer. Run once to gather evidence, then analyze which component fails.
|
|
62
|
-
5. **Trace data flow**: Backward tracing — where does the bad value originate? Keep tracing upstream until you find the source. The fix belongs at the source, not at the symptom.
|
|
56
|
+
## Inputs
|
|
63
57
|
|
|
64
|
-
|
|
58
|
+
| Parameter | Description |
|
|
59
|
+
|-----------|-------------|
|
|
60
|
+
| `symptom_description` | What's broken: error messages, failing tests, unexpected behavior |
|
|
61
|
+
| `reproduction_steps` | How to reproduce (if known) |
|
|
62
|
+
| `context` | Recent changes, environment, dependencies |
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
2. Compare against references — read reference implementations completely
|
|
68
|
-
3. Identify EVERY difference between working and broken, however small
|
|
69
|
-
4. Map dependencies: other components, settings, config, environment, implicit assumptions
|
|
64
|
+
If inputs are vague, use Phase 1 diagnostic instrumentation to gather concrete evidence before proceeding.
|
|
70
65
|
|
|
71
|
-
|
|
66
|
+
## Output Contract
|
|
72
67
|
|
|
73
|
-
|
|
74
|
-
1. Form a SINGLE hypothesis: "I believe X is the root cause because Y"
|
|
75
|
-
2. Design the smallest possible test to validate (one variable at a time)
|
|
76
|
-
3. Run the test and record the result
|
|
77
|
-
4. If hypothesis confirmed → proceed to report
|
|
78
|
-
5. If hypothesis rejected → form a NEW hypothesis. Do NOT pile on more guesses.
|
|
79
|
-
6. If you don't know, say so — uncertainty is better than false confidence
|
|
68
|
+
Write a root-cause analysis report to `bug-investigation-report.md` (or user-specified path). The report MUST contain:
|
|
80
69
|
|
|
81
|
-
|
|
70
|
+
1. **Symptom**: What happens vs expected behavior, reproduction steps, frequency
|
|
71
|
+
2. **Investigation trail**: Chronological record of evidence gathered, hypotheses tested, results
|
|
72
|
+
3. **Root cause**: Specific location (file:line), mechanism, evidence
|
|
73
|
+
4. **Recommended fix**: What to change, where, regression test suggestion, risk assessment
|
|
74
|
+
5. **DP-5 escalation** (if applicable): Architectural concern details when 3+ hypotheses failed
|
|
82
75
|
|
|
83
|
-
|
|
76
|
+
Your preloaded Skill provides the full report template and formatting guidelines.
|
|
84
77
|
|
|
85
78
|
## DP-5: Debug Escalation (3+ Failed Hypotheses)
|
|
86
79
|
|
|
@@ -93,88 +86,20 @@ If you test 3+ hypotheses and all fail, STOP. This pattern indicates an architec
|
|
|
93
86
|
|
|
94
87
|
**Action:** Document the escalation in your report. Clearly state: "3+ hypotheses tested and rejected — this is likely an architectural issue, not a localized bug." Recommend architectural review before further fix attempts.
|
|
95
88
|
|
|
96
|
-
## Red
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
## Summary
|
|
115
|
-
[One-paragraph description of the bug and investigation outcome]
|
|
116
|
-
|
|
117
|
-
## Symptom
|
|
118
|
-
- **What happens:** [Exact observed behavior]
|
|
119
|
-
- **Expected behavior:** [What should happen]
|
|
120
|
-
- **Reproduction:** [Exact steps, commands, or conditions]
|
|
121
|
-
- **Frequency:** [Always / intermittent / specific conditions]
|
|
122
|
-
|
|
123
|
-
## Investigation Trail
|
|
124
|
-
[Chronological record of what you investigated, in order]
|
|
125
|
-
|
|
126
|
-
### Phase 1: Root Cause Investigation
|
|
127
|
-
- Error messages analyzed: [details]
|
|
128
|
-
- Recent changes checked: [git log summary, relevant commits]
|
|
129
|
-
- Data flow traced: [path from symptom to source]
|
|
130
|
-
- Component boundaries tested: [if applicable]
|
|
131
|
-
|
|
132
|
-
### Phase 2: Pattern Analysis
|
|
133
|
-
- Working examples found: [file references]
|
|
134
|
-
- Key differences identified: [list]
|
|
135
|
-
|
|
136
|
-
### Phase 3: Hypotheses Tested
|
|
137
|
-
| # | Hypothesis | Test | Result |
|
|
138
|
-
|---|-----------|------|--------|
|
|
139
|
-
| 1 | [hypothesis] | [what you did] | Confirmed / Rejected |
|
|
140
|
-
| 2 | ... | ... | ... |
|
|
141
|
-
|
|
142
|
-
## Root Cause
|
|
143
|
-
[Clear, specific statement of the root cause with evidence]
|
|
144
|
-
- **Location:** [file:line]
|
|
145
|
-
- **Mechanism:** [How the bug works, step by step]
|
|
146
|
-
- **Evidence:** [What proves this is the cause]
|
|
147
|
-
|
|
148
|
-
## Recommended Fix
|
|
149
|
-
[Suggested approach — describe what to change and why, but do NOT implement it]
|
|
150
|
-
- **Fix location:** [where to change]
|
|
151
|
-
- **Fix approach:** [what to change]
|
|
152
|
-
- **Test to add:** [regression test suggestion]
|
|
153
|
-
- **Risk assessment:** [what could go wrong with this fix]
|
|
154
|
-
|
|
155
|
-
## DP-5 Escalation
|
|
156
|
-
[Only if 3+ hypotheses failed — architectural concern details]
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## Writing Investigation Notes
|
|
160
|
-
|
|
161
|
-
During investigation, you may write intermediate notes to track your progress:
|
|
162
|
-
- Use a working file (e.g., `investigation-notes.md`) for scratch work
|
|
163
|
-
- Record each hypothesis, test, and result as you go
|
|
164
|
-
- This protects against losing your train of thought on complex investigations
|
|
165
|
-
- Clean up or consolidate into the final report when done
|
|
166
|
-
|
|
167
|
-
## Quality Standards
|
|
168
|
-
|
|
169
|
-
1. **Evidence over intuition**: Every claim in your report must be backed by observable evidence (test output, code path, git history)
|
|
170
|
-
2. **Specificity**: Name exact files, line numbers, functions, and values — not "somewhere in the auth module"
|
|
171
|
-
3. **Completeness**: Document what you ruled OUT, not just what you found. Negative results are valuable.
|
|
172
|
-
4. **Actionability**: Your recommended fix should be specific enough that an implementer can act on it without re-investigating
|
|
173
|
-
5. **Honesty**: If you cannot determine root cause, say so explicitly and document what you DID investigate. 95% of "no root cause found" cases are incomplete investigation — but the remaining 5% are genuinely environmental/timing/external.
|
|
174
|
-
|
|
175
|
-
## Edge Cases
|
|
176
|
-
|
|
177
|
-
- **Environmental issues**: If the bug is environment-specific, document the environment differences and suggest environment normalization
|
|
178
|
-
- **Timing/race conditions**: Document the timing window, suggest synchronization or defensive handling
|
|
179
|
-
- **External dependencies**: If the root cause is in a third-party library, document the version, the specific behavior, and suggest workarounds or upstream issues
|
|
180
|
-
- **Cannot reproduce**: Document everything you tried. Suggest monitoring/instrumentation for the next occurrence. Do NOT guess at a cause you cannot verify.
|
|
89
|
+
## Red Lines
|
|
90
|
+
|
|
91
|
+
**DO:**
|
|
92
|
+
- Follow the preloaded Skill's Phase 1-4 methodology for systematic investigation
|
|
93
|
+
- Read error messages carefully before forming hypotheses
|
|
94
|
+
- Reproduce consistently before proposing causes
|
|
95
|
+
- Trace data flow upstream to find the source (fix at source, not symptom)
|
|
96
|
+
- Document what you ruled OUT (negative results are valuable)
|
|
97
|
+
- Be specific: exact files, line numbers, functions, values
|
|
98
|
+
|
|
99
|
+
**DON'T:**
|
|
100
|
+
- Skip Phase 1 (root cause investigation) and jump to conclusions
|
|
101
|
+
- Form multiple hypotheses simultaneously (test one at a time)
|
|
102
|
+
- Declare root cause based on pattern matching alone without evidence
|
|
103
|
+
- Propose fixes before completing investigation
|
|
104
|
+
- Guess at environmental/timing issues you cannot verify
|
|
105
|
+
- Implement fixes (that's the implementer's job after your report)
|
|
@@ -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
|
|