@boyingliu01/xp-gate 0.8.18 → 0.8.19
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/mock-policy/AGENTS.md +3 -3
- package/mutation/AGENTS.md +3 -3
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/claude-code/skills/delphi-review/SKILL.md +76 -0
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +11 -5
- package/plugins/claude-code/skills/sprint-flow/references/components/middleware.md +5 -2
- package/plugins/claude-code/skills/sprint-flow/references/phase-1-plan.md +46 -17
- package/plugins/claude-code/skills/sprint-flow/references/phase-3-review.md +30 -13
- package/plugins/claude-code/skills/sprint-flow/references/phase-6-ship.md +14 -21
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/opencode/skills/delphi-review/SKILL.md +76 -0
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/opencode/skills/sprint-flow/SKILL.md +11 -5
- package/plugins/opencode/skills/sprint-flow/references/components/middleware.md +5 -2
- package/plugins/opencode/skills/sprint-flow/references/phase-1-plan.md +46 -17
- package/plugins/opencode/skills/sprint-flow/references/phase-3-review.md +30 -13
- package/plugins/opencode/skills/sprint-flow/references/phase-6-ship.md +14 -21
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/qoder/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
- package/principles/AGENTS.md +3 -3
- package/skills/delphi-review/AGENTS.md +3 -3
- package/skills/delphi-review/SKILL.md +76 -0
- package/skills/sprint-flow/AGENTS.md +3 -3
- package/skills/sprint-flow/SKILL.md +11 -5
- package/skills/sprint-flow/references/components/middleware.md +5 -2
- package/skills/sprint-flow/references/phase-1-plan.md +46 -17
- package/skills/sprint-flow/references/phase-3-review.md +30 -13
- package/skills/sprint-flow/references/phase-6-ship.md +14 -21
- package/skills/test-specification-alignment/AGENTS.md +3 -3
package/mock-policy/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SRC/MOCK-POLICY KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-17
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.8.
|
|
4
|
+
**Commit:** d8388b4
|
|
5
|
+
**Branch:** sprint/2026-06-17-01
|
|
6
|
+
**Version:** 0.8.19.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Mock layering policy enforcement — Gate M3 of pre-push hook. Ensures integration tests use real implementations for internal dependencies, mock external dependencies, and annotate pending mocks with removal plans. Combines project scope scanning, mock decision engine, and per-file validation into a single pipeline.
|
package/mutation/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SRC/MUTATION KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-17
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.8.
|
|
4
|
+
**Commit:** d8388b4
|
|
5
|
+
**Branch:** sprint/2026-06-17-01
|
|
6
|
+
**Version:** 0.8.19.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
**Gate M** (incremental mutation testing) + **Gate M2** helpers (test-layer detection used by `src/mock-policy/`). Pre-push quality gate. TypeScript-only; uses Stryker.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-gate",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.19",
|
|
4
4
|
"displayName": "XP-Gate",
|
|
5
5
|
"description": "Extreme Programming quality gates + AI workflow skills for Claude Code. Includes 10 quality gates (Gate 0-9), Sprint Flow (11 phases), and Delphi multi-expert review (>=90% consensus).",
|
|
6
6
|
"author": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-17
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.8.
|
|
4
|
+
**Commit:** d8388b4
|
|
5
|
+
**Branch:** sprint/2026-06-17-01
|
|
6
|
+
**Version:** 0.8.19.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, 3 experts from ≥2 providers, domestic models only). Supports design + code-walkthrough modes.
|
|
@@ -190,6 +190,80 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
190
190
|
|
|
191
191
|
---
|
|
192
192
|
|
|
193
|
+
## Orchestrator Dispatch Rules(#218 自动多轮调度)
|
|
194
|
+
|
|
195
|
+
### 背景
|
|
196
|
+
|
|
197
|
+
Delphi review 在 sprint-flow 中通过 subagent 调用时,Round 1→Round 2→Round 3 的调度**必须在 subagent 内部自动完成**,不能每轮暂停等待 orchestrator 或用户干预。只有在以下情况才需要 orchestrator 暂停:
|
|
198
|
+
|
|
199
|
+
### 自动调度规则
|
|
200
|
+
|
|
201
|
+
| 场景 | 自动处理 | 需暂停 |
|
|
202
|
+
|------|---------|--------|
|
|
203
|
+
| Round 1 完成,需 Round 2 | ✅ subagent 自动继续 | ❌ |
|
|
204
|
+
| Round 2 完成,需 Round 3 | ✅ subagent 自动继续 | ❌ |
|
|
205
|
+
| Round 3+ 完成,仍需更多轮 | ✅ subagent 自动继续,直到 max_rounds | ❌ |
|
|
206
|
+
| 最终 APPROVED (>=90%) | ✅ subagent 输出结果后退出 | ❌ |
|
|
207
|
+
| 最终 REQUEST_CHANGES(可自动修复) | ✅ subagent 尝试修复措辞、AC 缺失等常见问题后自动重评审 | ❌ |
|
|
208
|
+
| 最终 REQUEST_CHANGES(无法自动修复) | ✅ subagent 输出详细失败报告 | **✅ orchestrator 暂停等用户** |
|
|
209
|
+
| 超过 max_rounds (5) 仍无共识 | ✅ subagent 输出"未达成共识报告" | **✅ orchestrator 暂停等用户决策** |
|
|
210
|
+
|
|
211
|
+
### Subagent 内部 Round 循环
|
|
212
|
+
|
|
213
|
+
当 delphi-review 以 subagent 启动时(非交互式),应执行以下自动循环:
|
|
214
|
+
|
|
215
|
+
```python
|
|
216
|
+
round = 1
|
|
217
|
+
while round <= max_review_rounds:
|
|
218
|
+
# 执行当前 round(所有专家匿名/半匿名评审)
|
|
219
|
+
results = execute_round(round)
|
|
220
|
+
|
|
221
|
+
# 检查共识
|
|
222
|
+
consensus = check_consensus(results)
|
|
223
|
+
|
|
224
|
+
if consensus.verdict == "APPROVED" and consensus.ratio >= 0.9:
|
|
225
|
+
emit_verdict("APPROVED", consensus)
|
|
226
|
+
break
|
|
227
|
+
|
|
228
|
+
if round == max_review_rounds:
|
|
229
|
+
# 已达最大轮数仍无共识
|
|
230
|
+
emit_verdict("NO_CONSENSUS", consensus)
|
|
231
|
+
break
|
|
232
|
+
|
|
233
|
+
round += 1
|
|
234
|
+
|
|
235
|
+
if verdict == "REQUEST_CHANGES":
|
|
236
|
+
# 尝试自动修复常见问题
|
|
237
|
+
auto_fix_result = attempt_auto_fix(issues)
|
|
238
|
+
if auto_fix_result.success:
|
|
239
|
+
# 自动修复后,从 Round 2 起步重新评审
|
|
240
|
+
round = 2
|
|
241
|
+
continue # 重新进入循环
|
|
242
|
+
else:
|
|
243
|
+
# 无法自动修复,交给 orchestrator
|
|
244
|
+
emit_verdict("REQUEST_CHANGES", auto_fix_result.failed_issues)
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### 终止结果输出
|
|
248
|
+
|
|
249
|
+
当 subagent 因终态退出时,必须输出清晰的裁决:
|
|
250
|
+
|
|
251
|
+
- **APPROVED**: 共识报告 + specification.yaml
|
|
252
|
+
- **REQUEST_CHANGES(可自动修复)**: 自动修复后再次评审
|
|
253
|
+
- **REQUEST_CHANGES(不可自动修复)**: 失败报告 + 建议修复方向
|
|
254
|
+
- **NO_CONSENSUS**: 分歧详情报告
|
|
255
|
+
|
|
256
|
+
### 与 orchestrator 的交互约定
|
|
257
|
+
|
|
258
|
+
| 状态 | Subagent 输出 | Orchestrator 动作 |
|
|
259
|
+
|------|--------------|------------------|
|
|
260
|
+
| APPROVED | `{verdict:"APPROVED", consensus_ratio: N, ...}` | 自动进入下一 Phase |
|
|
261
|
+
| REQUEST_CHANGES (auto-fixed) | `{verdict:"APPROVED", auto_fixed: ["..."]}` | 自动进入下一 Phase |
|
|
262
|
+
| REQUEST_CHANGES (unfixable) | `{verdict:"REQUEST_CHANGES", failed_issues: [...]}` | ⚠️ 暂停等用户修复后,通过 task_id 重新 dispatch |
|
|
263
|
+
| NO_CONSENSUS | `{verdict:"NO_CONSENSUS", disagreements: [...]}` | ⚠️ 暂停等用户决策(可继续/中止/强制通过) |
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
193
267
|
## 修复与重新评审
|
|
194
268
|
|
|
195
269
|
如果最终裁决是 REQUEST_CHANGES 或 REJECTED:
|
|
@@ -197,6 +271,8 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
197
271
|
2. 重新评审(从 Round 2 起步,不是 Round 1)
|
|
198
272
|
3. 迭代直到 APPROVED
|
|
199
273
|
|
|
274
|
+
**Automatic re-review(#218)**: 当 delphi-review 以 subagent 运行时,对于常见的自动可控问题(措辞模糊、AC 缺失、格式问题等),subagent 应自行修复后自动重评审,无需等待用户。
|
|
275
|
+
|
|
200
276
|
修复报告格式:
|
|
201
277
|
```markdown
|
|
202
278
|
## 修复报告
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-17
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.8.
|
|
4
|
+
**Commit:** d8388b4
|
|
5
|
+
**Branch:** sprint/2026-06-17-01
|
|
6
|
+
**Version:** 0.8.19.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
**11-phase** development pipeline: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW → USER ACCEPTANCE → FEEDBACK → SHIP → LAND → CLEANUP. Phase 2 default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE in Phase 1: design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -181,8 +181,7 @@ Phase -0.5: AUTO-ESTIMATE → 自动评估需求规模 → ⚠️ 展示评估
|
|
|
181
181
|
→ 标准:正常流程 Phase 0-4
|
|
182
182
|
→ 复杂:完整流程 Phase 0-8 + 风险警告
|
|
183
183
|
Phase 0: THINK → brainstorming → ⚠️ HARD-GATE: 设计未批准 → 不可进入实现 → Design Document (AI编辑行为约束: 原则3 Surgical Changes, 验证循环要求: 原则4 Goal-Driven Execution - 见 AGENTS.md "## AI CODING DISCIPLINE (Karpathy Principles)")
|
|
184
|
-
Phase 1: PLAN → autoplan →
|
|
185
|
-
→ delphi-review → ⚠️ (等待 APPROVED)
|
|
184
|
+
Phase 1: PLAN → autoplan (orchestrator直执行,taste_decisions交互确认) → delphi-review (subagent自动多轮至APPROVED)
|
|
186
185
|
→ 自动生成 specification.yaml(无需独立 skill)
|
|
187
186
|
Phase 2: BUILD → ⚠️ GITHOOKS-GATE: 检查并安装 Git Hooks(缺失→阻断)
|
|
188
187
|
→ dispatching-parallel-agents (并行检测) + executing-plans (隔离执行)
|
|
@@ -232,7 +231,7 @@ Phase 8: CLEANUP → git worktree remove + branch delete + sprint-state.json upd
|
|
|
232
231
|
| 1 | **-1** | **ISOLATE** | Detect protected branch → Create git worktree → Setup project → Validate .gitignore → Record sprint state | Worktree path |
|
|
233
232
|
| 2 | **-0.5** | **AUTO-ESTIMATE** | Analyze code structure → Count references → Assess cross-module impact → Classify (lightweight/standard/complex) | Impact assessment + flow recommendation |
|
|
234
233
|
| 3 | **0** | **THINK** | brainstorming → Generate design doc + CONTEXT.md + ADR | Design document |
|
|
235
|
-
| 4 | **1** | **PLAN** | autoplan → delphi-review (
|
|
234
|
+
| 4 | **1** | **PLAN** | **Orchestrator: autoplan → Subagent: delphi-review (auto multi-round) → to-issues → Generate specification.yaml + slices-manifest.json** | specification.yaml |
|
|
236
235
|
| 5 | **2** | **BUILD** | GITHOOKS-GATE → ralph-loop (default) or parallel → TDD → freeze → blind review → verification | MVP code |
|
|
237
236
|
| 6 | **3** | **REVIEW** | delphi-review --mode code-walkthrough → test-specification-alignment → browse QA → benchmark (optional) | Review report |
|
|
238
237
|
| 7 | **4** | **USER ACCEPT** | **Manual verification** → Capture emergent issues | Emergent issues list |
|
|
@@ -412,7 +411,11 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
|
|
|
412
411
|
- **HARD-GATE**: 设计未批准 → 不可进入实现
|
|
413
412
|
|
|
414
413
|
### Phase 1: PLAN(共识评审)
|
|
415
|
-
-
|
|
414
|
+
- **注意**: `autoplan` 是交互式 skill(可能在 taste_decisions 节点暂停等待用户输入),**必须由 orchestrator 直接执行**,不可 dispatch 到 subagent(Issue #225)。
|
|
415
|
+
- **子流程**:
|
|
416
|
+
1. **Orchestrator** 直接调用 `task(category="deep", load_skills=["autoplan"], ...)` 执行 autoplan(可交互式等待用户确认 taste_decisions)
|
|
417
|
+
2. Autoplan 完成后,将结果(设计文档 + taste_decisions 确认)传给 subagent
|
|
418
|
+
3. **Subagent** 执行 delphi-review + to-issues: `task(category="deep", load_skills=["delphi-review", "to-issues"], prompt="autoplan 结果: ...")`
|
|
416
419
|
- 输入: phase-0-summary.md + 设计文档
|
|
417
420
|
- 输出: `specification.yaml`(含 user_stories[])+ `slices-manifest.json`
|
|
418
421
|
|
|
@@ -656,7 +659,8 @@ Phase 2 第一步必须执行 DELPHI-GATE 检查。没有 delphi-review APPROVED
|
|
|
656
659
|
| -1 | ISOLATE | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
657
660
|
| -0.5 | AUTO-ESTIMATE | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
658
661
|
| 0 | THINK | ✅ | `unspecified-high` | `[]` | subagent |
|
|
659
|
-
| 1 | PLAN |
|
|
662
|
+
| 1 | PLAN (**autoplan**) | **❌** | **orchestrator 直接执行** | `["autoplan"]` | **orchestrator** |
|
|
663
|
+
| 1 | PLAN (**delphi-review + to-issues**) | ✅ | `deep` | `["delphi-review", "to-issues"]` | **subagent(仅处理评审+切片)** |
|
|
660
664
|
| 2 | BUILD | ✅(已有) | ralph-loop | `["test-driven-development"]` | subagent |
|
|
661
665
|
| 3 | REVIEW | ✅ | `deep` | `["delphi-review", "test-specification-alignment"]` | subagent |
|
|
662
666
|
| 4 | USER ACCEPT | ❌ | **强制人工** | 无 | 用户 |
|
|
@@ -665,6 +669,8 @@ Phase 2 第一步必须执行 DELPHI-GATE 检查。没有 delphi-review APPROVED
|
|
|
665
669
|
| 7 | LAND | ✅ | `deep` | `["land-and-deploy"]` | subagent |
|
|
666
670
|
| 8 | CLEANUP | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
667
671
|
|
|
672
|
+
> **#225 关键规则**: `autoplan` 是交互式 skill(可能在 taste_decisions 节点暂停等待用户输入),因此**必须由 orchestrator 直接执行**,不可 dispatch 到 subagent。只有 delphi-review 和 to-issues 这种非交互式步骤可以 dispatch 到 subagent。
|
|
673
|
+
|
|
668
674
|
**上下文隔离原则**:
|
|
669
675
|
- 每个 Subagent 在**独立 session** 中启动,不继承 orchestrator 的对话历史
|
|
670
676
|
- orchestrator session 仅接收 subagent 的最终结果摘要(~13,000 tokens/sprint)
|
|
@@ -27,7 +27,7 @@ Phase 6: SHIP → finishing-a-development-branch → canary → Sprint Summary
|
|
|
27
27
|
|-------|-----------|---------|---------|-------------|
|
|
28
28
|
| Phase 0 | **HARD-GATE** | 设计未 APPROVED | 修改设计文档 | 设计 APPROVED 后继续 |
|
|
29
29
|
| Phase 1 | taste_decisions | autoplan 发现未决议事项 | 用户确认每个决策 | 确认后自动继续 |
|
|
30
|
-
| Phase 1 | delphi-review |
|
|
30
|
+
| Phase 1 | delphi-review | 最终 REQUEST_CHANGES(subagent 自动修复仍失败) | 修复并重新 dispatch | APPROVED 后自动继续 |
|
|
31
31
|
| **Phase 2** | **DELPHI-GATE** | delphi-reviewed.json 不存在或 verdict != APPROVED | 返回 Phase 1 完成 delphi-review | APPROVED 后继续 |
|
|
32
32
|
| Phase 2 | 验证失败 | 超过 max 3 次失败 | 用户决定修复或放弃 | 验证通过后自动继续 |
|
|
33
33
|
| Phase 2 | 成本超阈值 | token 成本 > 阈值 | 用户决定继续或暂停 | 用户确认后自动继续 |
|
|
@@ -36,7 +36,10 @@ Phase 6: SHIP → finishing-a-development-branch → canary → Sprint Summary
|
|
|
36
36
|
| **Phase 5** | **FEEDBACK 硬门禁** | Phase 4 完成后进入 | 执行 learn + retro → 生成 feedback-log.md | feedback-log.md 存在后继续 |
|
|
37
37
|
| **Phase 6** | **Phase 5 门禁验证** | Phase 5 未完成 | 验证 feedback-log.md → 不存在 → 返回 Phase 5 | feedback-log.md 存在后继续 |
|
|
38
38
|
| Phase 6 | finishing-a-branch | 分支收尾 | 用户 4 选 1 | 确认后自动继续 |
|
|
39
|
-
|
|
39
|
+
|
|
40
|
+
> **#218 变更**: Delphi review Round 1→2→3 的自动调度在 subagent 内部完成,不暂停。`delphi-review` 暂停点仅当 subagent 自动修复仍失败时才触发。
|
|
41
|
+
> **#225 变更**: `taste_decisions` 暂停点由 orchestrator 直接执行 autoplan,不 dispatch 到 subagent。
|
|
42
|
+
> **PR 确认冗余移除**: ship PR 创建后不再暂停确认 — 用户已通过 finishing-a-development-branch 选择了 PR 路径。
|
|
40
43
|
|
|
41
44
|
## 状态转换规则
|
|
42
45
|
|
|
@@ -4,12 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
多模型评审,达成 APPROVED 共识。后续步骤自动从 APPROVED 设计文档提取 specification.yaml。
|
|
6
6
|
|
|
7
|
+
> **#225**: `autoplan` 是交互式 skill,**必须由 orchestrator 直接执行**。只有 delphi-review 和 to-issues 可以 dispatch 到 subagent。
|
|
8
|
+
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## 调用 Skills
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
- `
|
|
13
|
+
**Orchestrator 直接执行(可交互)**:
|
|
14
|
+
- `autoplan` (gstack) — CEO → Design → Eng 自动流水线(orchestrator 级,支持 taste_decisions 交互)
|
|
15
|
+
|
|
16
|
+
**Subagent 执行(非交互,fire-and-forget)**:
|
|
17
|
+
- `delphi-review` — 多轮匿名评审直到共识(**自动多轮,无需人工中断**)
|
|
13
18
|
- specification.yaml 从 APPROVED 设计文档自动生成(无需独立 skill)
|
|
14
19
|
|
|
15
20
|
**Web 前端项目额外注入**:
|
|
@@ -74,13 +79,15 @@ autoplan_result:
|
|
|
74
79
|
│ │
|
|
75
80
|
│ IF autoplan_result.verdict == "NEEDS_REVIEW" │
|
|
76
81
|
│ OR autoplan_result.taste_decisions.length > 0 │
|
|
77
|
-
│ → ⚠️ 暂停等待用户确认 taste_decisions
|
|
82
|
+
│ → ⚠️ 暂停等待用户确认 taste_decisions │
|
|
78
83
|
│ → 用户确认后,调用标准 delphi-review │
|
|
79
84
|
│ → 场景: 存在关键决策分歧或 autoplan 未完全自动通过 │
|
|
80
85
|
│ │
|
|
81
86
|
└───────────────────────────────────────────────────────────────────┘
|
|
82
87
|
```
|
|
83
88
|
|
|
89
|
+
> **#218**: Delphi review 的 Round 1→Round 2→Round 3 自动调度在 subagent 内部完成,无需 orchestrator 每轮暂停等待。只有当 Round 结果 REQUEST_CHANGES 时,才在 orchestrator 层面暂停等待用户修复。
|
|
90
|
+
|
|
84
91
|
---
|
|
85
92
|
|
|
86
93
|
### Step 2a: 如果需要用户确认 taste_decisions
|
|
@@ -101,28 +108,48 @@ Decision 2: [决策描述]
|
|
|
101
108
|
请选择每个决策的选项,或提供您的观点。
|
|
102
109
|
```
|
|
103
110
|
|
|
104
|
-
用户确认后,继续 Step
|
|
111
|
+
用户确认后,继续 Step **2c**(直接 dispatch subagent 执行 delphi-review + to-issues)。
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### Step 2b: 无 taste_decisions,直接进入 subagent dispatch
|
|
116
|
+
|
|
117
|
+
**IF** autoplan_result.verdict == "AUTO_APPROVED" AND taste_decisions == []:
|
|
118
|
+
- 设计文档 + autoplan 评审结论 → 传给 subagent
|
|
119
|
+
- 直接进入 Step 2c
|
|
105
120
|
|
|
106
121
|
---
|
|
107
122
|
|
|
108
|
-
### Step
|
|
123
|
+
### Step 2c: 调用 delphi-review(subagent 自动多轮)
|
|
124
|
+
|
|
125
|
+
Dispatch subagent 一次性处理 delphi-review 和 to-issues:
|
|
109
126
|
|
|
110
127
|
```bash
|
|
111
|
-
|
|
128
|
+
task(
|
|
129
|
+
category="deep",
|
|
130
|
+
load_skills=["delphi-review", "to-issues"],
|
|
131
|
+
run_in_background=false,
|
|
132
|
+
prompt="[设计文档 + autoplan 评审结论 + taste_decisions 确认结果(如有)]"
|
|
133
|
+
)
|
|
112
134
|
```
|
|
113
135
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- Round
|
|
117
|
-
-
|
|
136
|
+
**Subagent 内部流程(#218 自动多轮,无需人工中断)**:
|
|
137
|
+
1. 调用 delphi-review:
|
|
138
|
+
- Round 1: 3 专家匿名独立评审
|
|
139
|
+
- Round 2: 自动交换意见,自动展开下一轮
|
|
140
|
+
- Round 3+: 自动继续直到 ≥90% 共识或 5 轮上限
|
|
141
|
+
- **不暂停等待用户确认每一轮**
|
|
142
|
+
- 如果最终结果 REQUEST_CHANGES: subagent 自行尝试修复常见问题(措辞模糊、AC 缺失等)后自动重评审
|
|
143
|
+
- 如果仍无法达成 APPROVED: subagent 输出详细失败报告,orchestrator 暂停等待用户介入
|
|
144
|
+
2. 调用 to-issues(从 APPROVED 设计文档切片)
|
|
145
|
+
3. 输出: specification.yaml(含 user_stories[])+ slices-manifest.json
|
|
146
|
+
|
|
147
|
+
**如果 delphi-review 返回 APPROVED**:
|
|
148
|
+
- 自动进入 Step 3
|
|
118
149
|
|
|
119
|
-
**如果 REQUEST_CHANGES**:
|
|
150
|
+
**如果 delphi-review 最终 REQUEST_CHANGES**:
|
|
120
151
|
- ⚠️ 暂停等待用户修复
|
|
121
|
-
-
|
|
122
|
-
- 直到 APPROVED
|
|
123
|
-
|
|
124
|
-
**如果 APPROVED**:
|
|
125
|
-
- 自动进入 Step 3
|
|
152
|
+
- 用户修复后重新调用 subagent(通过 task_id 延续)
|
|
126
153
|
|
|
127
154
|
---
|
|
128
155
|
|
|
@@ -168,7 +195,9 @@ specification:
|
|
|
168
195
|
| 暂停点 | 触发条件 | 用户操作 |
|
|
169
196
|
|--------|---------|---------|
|
|
170
197
|
| taste_decisions 确认 | autoplan 无法自动决策 | 用户确认每个决策 |
|
|
171
|
-
| delphi-review
|
|
198
|
+
| delphi-review 最终 REQUEST_CHANGES | subagent 无法自动修复且经过 max_rounds | 用户修复并重新 dispatch |
|
|
199
|
+
|
|
200
|
+
> **#218 规则**: 只有 `taste_decisions 确认` 和 `delphi-review 最终 REQUEST_CHANGES(subagent 已尝试自动修复仍失败)` 两个暂停点需要用户介入。Delphi review Round 1→2→3 的自动调度在 subagent 内部完成,不暂停。
|
|
172
201
|
|
|
173
202
|
---
|
|
174
203
|
|
|
@@ -34,22 +34,37 @@ Web 前端项目额外增加:系统化 QA、视觉审计、性能基线。
|
|
|
34
34
|
|
|
35
35
|
### Step 1: 调用 delphi-review --mode code-walkthrough
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
delphi code-walkthrough 在 subagent 中自动执行多轮调度(#218 自动多轮,无需人工中断):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
task(
|
|
41
|
+
category="deep",
|
|
42
|
+
load_skills=["delphi-review"],
|
|
43
|
+
run_in_background=false,
|
|
44
|
+
prompt="--mode code-walkthrough (设计文档 + MVP 代码)"
|
|
45
|
+
)
|
|
39
46
|
```
|
|
40
47
|
|
|
41
|
-
delphi code-walkthrough
|
|
48
|
+
delphi code-walkthrough 内部自动执行:
|
|
42
49
|
- 2-3 位国内模型专家匿名独立评审(DeepSeek-v4-pro + Kimi-K2.6 + Qwen3.6-Plus)
|
|
43
50
|
- Round 1: 匿名独立评审(防止 anchoring bias)
|
|
44
|
-
- Round 2:
|
|
45
|
-
- Round 3:
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
- Round 2: 自动交换意见,响应关切
|
|
52
|
+
- Round 3: 自动最终立场(如需)
|
|
53
|
+
- **≥90% 共识 + APPROVED 才通过**
|
|
54
|
+
|
|
55
|
+
**自动 Round 调度(#218)**:
|
|
56
|
+
- 每轮结束后自动检查共识,自动展开下一轮
|
|
57
|
+
- subagent 内部循环,无需每轮暂停等待 orchestrator
|
|
58
|
+
- 只有最终裁决需要 orchestrator 处理
|
|
59
|
+
|
|
60
|
+
**如果最终 REQUEST_CHANGES(subagent 尝试自动修复)**:
|
|
61
|
+
- subagent 尝试自动修复常见问题(措辞不清晰、缺少用例覆盖等)
|
|
62
|
+
- 修复成功后自动回到 Round 2 重新评审
|
|
63
|
+
- 如果仍然 REQUEST_CHANGES → subagent 输出详细失败报告
|
|
64
|
+
- ⚠️ Orchestrator 暂停等待用户修复 Critical Issues + 处理 Major Concerns
|
|
65
|
+
- 用户修复后通过 task_id 延续 subagent 重新评审
|
|
66
|
+
|
|
67
|
+
**如果最终 APPROVED**:
|
|
53
68
|
- 写入 `.code-walkthrough-result.json`(1 小时有效期)
|
|
54
69
|
- 进入 Step 2
|
|
55
70
|
|
|
@@ -194,13 +209,15 @@ browse 执行:
|
|
|
194
209
|
|
|
195
210
|
| 暂停点 | 触发条件 | 用户操作 |
|
|
196
211
|
|--------|---------|---------|
|
|
197
|
-
| delphi code-walkthrough REQUEST_CHANGES
|
|
212
|
+
| delphi code-walkthrough REQUEST_CHANGES(不可自动修复)| subagent 尝试自动修复后仍 REQUEST_CHANGES | 用户修复 → 重新 dispatch subagent → APPROVED → 继续 |
|
|
198
213
|
| test-alignment 失败 | 自动回退 Phase 2(不暂停) | 自动迭代 |
|
|
199
214
|
| qa 发现问题 (web) | 自动回退修复(不暂停) | 自动迭代 |
|
|
200
215
|
| design-review 发现问题 (web) | 自动回退修复(不暂停) | 自动迭代 |
|
|
201
216
|
| api-test 失败 (backend) | 自动回退 Phase 2(不暂停) | 自动迭代 |
|
|
202
217
|
| browse 发现问题 | 自动回退 Phase 2(不暂停) | 自动迭代 |
|
|
203
218
|
|
|
219
|
+
> **#218 规则**: Delphi code-walkthrough 的 Round 1→2→3 自动调度在 subagent 内部完成,不暂停。只有 subagent 尝试自动修复后仍 REQUEST_CHANGES 时才需要用户介入。
|
|
220
|
+
|
|
204
221
|
---
|
|
205
222
|
|
|
206
223
|
## 输出
|
|
@@ -66,31 +66,23 @@ finishing-a-development-branch 执行 4 选项决策:
|
|
|
66
66
|
|
|
67
67
|
**决策逻辑**:
|
|
68
68
|
```
|
|
69
|
-
IF 测试全部通过 + 用户确信 → merge → land-and-deploy
|
|
70
|
-
IF 测试全部通过 + 需要 review → PR → ship
|
|
69
|
+
IF 测试全部通过 + 用户确信 → merge → land-and-deploy (Step 4)
|
|
70
|
+
IF 测试全部通过 + 需要 review → PR → ship (Step 3a) → land-and-deploy (Step 4)
|
|
71
71
|
IF 实验失败 → discard → 清理 worktree → 结束 Sprint
|
|
72
72
|
IF 半成品 → keep → 保留分支 → 结束 Sprint
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
### Step 3: 用户确认合并/发布
|
|
78
|
-
|
|
79
|
-
提示用户:
|
|
80
|
-
```
|
|
81
|
-
⚠️ 分支完成决策:
|
|
82
|
-
|
|
83
|
-
- [merge] → 直接合并 + 部署
|
|
84
|
-
- [PR] → PR 已创建: [URL],请确认合并
|
|
85
|
-
- [discard] → 清理分支,结束 Sprint
|
|
86
|
-
- [keep] → 保留分支,待后续处理
|
|
75
|
+
> **#218**: `finishing-a-development-branch` 的 4 选项决策已包含用户确认(Step 2),不再需要独立的 Step 3 重复确认。用户选择后直接路由到对应步骤。
|
|
87
76
|
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
**discard/keep**: 进入 Step 5(清理 + 生成 Summary)
|
|
77
|
+
**worktree 清理**: finishing-a-development-branch 自动清理不再需要的 worktree。
|
|
92
78
|
|
|
93
|
-
|
|
79
|
+
**分支完成选项路由**:
|
|
80
|
+
| 用户选择 | 路由 |
|
|
81
|
+
|---------|------|
|
|
82
|
+
| **merge** | → Step 4 (land-and-deploy) |
|
|
83
|
+
| **PR** | → Step 3a (ship) → PR URL → Step 4 (land-and-deploy) |
|
|
84
|
+
| **discard** | → Step 5 (cleanup + summary) |
|
|
85
|
+
| **keep** | → Step 5 (cleanup + summary) |
|
|
94
86
|
|
|
95
87
|
### Step 3a: 调用 ship skill(PR 路径)
|
|
96
88
|
|
|
@@ -108,7 +100,7 @@ ship 执行:
|
|
|
108
100
|
|
|
109
101
|
**输出**: PR URL
|
|
110
102
|
|
|
111
|
-
|
|
103
|
+
> **注意**: PR 创建后不暂停等待用户确认合并。用户已通过 finishing-a-development-branch 选择了 PR 路径(Step 2),ship 自动完成后直接进入 Step 4 land-and-deploy 继续执行。如果用户需要暂停审查 PR,应在 Sprint 开始时指定 `--stop-at ship`。
|
|
112
104
|
|
|
113
105
|
### Step 4: 调用 land-and-deploy(用户确认后)
|
|
114
106
|
|
|
@@ -166,9 +158,10 @@ skill(name="canary", user_message="--url [production URL]")
|
|
|
166
158
|
| 暂停点 | 触发条件 | 用户操作 |
|
|
167
159
|
|--------|---------|---------|
|
|
168
160
|
| finishing-a-development-branch | 4 选项决策 | 用户选择 merge/PR/discard/keep |
|
|
169
|
-
| ship PR 创建(PR 路径) | PR 已创建 | 用户确认合并 |
|
|
170
161
|
| land-and-deploy 失败 | CI 或部署失败 | 用户处理问题 |
|
|
171
162
|
|
|
163
|
+
> **#218**: PR 创建后不再暂停等待确认 — 用户已通过 finishing-a-development-branch 选择了 PR 路径,ship 自动完成后直接进入 land-and-deploy。如果用户需要暂停审查 PR,应在 Sprint 开始时指定 `--stop-at ship`。
|
|
164
|
+
|
|
172
165
|
---
|
|
173
166
|
|
|
174
167
|
## Sprint 2 提示
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-17
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.8.
|
|
4
|
+
**Commit:** d8388b4
|
|
5
|
+
**Branch:** sprint/2026-06-17-01
|
|
6
|
+
**Version:** 0.8.19.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-17
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.8.
|
|
4
|
+
**Commit:** d8388b4
|
|
5
|
+
**Branch:** sprint/2026-06-17-01
|
|
6
|
+
**Version:** 0.8.19.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, 3 experts from ≥2 providers, domestic models only). Supports design + code-walkthrough modes.
|
|
@@ -190,6 +190,80 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
190
190
|
|
|
191
191
|
---
|
|
192
192
|
|
|
193
|
+
## Orchestrator Dispatch Rules(#218 自动多轮调度)
|
|
194
|
+
|
|
195
|
+
### 背景
|
|
196
|
+
|
|
197
|
+
Delphi review 在 sprint-flow 中通过 subagent 调用时,Round 1→Round 2→Round 3 的调度**必须在 subagent 内部自动完成**,不能每轮暂停等待 orchestrator 或用户干预。只有在以下情况才需要 orchestrator 暂停:
|
|
198
|
+
|
|
199
|
+
### 自动调度规则
|
|
200
|
+
|
|
201
|
+
| 场景 | 自动处理 | 需暂停 |
|
|
202
|
+
|------|---------|--------|
|
|
203
|
+
| Round 1 完成,需 Round 2 | ✅ subagent 自动继续 | ❌ |
|
|
204
|
+
| Round 2 完成,需 Round 3 | ✅ subagent 自动继续 | ❌ |
|
|
205
|
+
| Round 3+ 完成,仍需更多轮 | ✅ subagent 自动继续,直到 max_rounds | ❌ |
|
|
206
|
+
| 最终 APPROVED (>=90%) | ✅ subagent 输出结果后退出 | ❌ |
|
|
207
|
+
| 最终 REQUEST_CHANGES(可自动修复) | ✅ subagent 尝试修复措辞、AC 缺失等常见问题后自动重评审 | ❌ |
|
|
208
|
+
| 最终 REQUEST_CHANGES(无法自动修复) | ✅ subagent 输出详细失败报告 | **✅ orchestrator 暂停等用户** |
|
|
209
|
+
| 超过 max_rounds (5) 仍无共识 | ✅ subagent 输出"未达成共识报告" | **✅ orchestrator 暂停等用户决策** |
|
|
210
|
+
|
|
211
|
+
### Subagent 内部 Round 循环
|
|
212
|
+
|
|
213
|
+
当 delphi-review 以 subagent 启动时(非交互式),应执行以下自动循环:
|
|
214
|
+
|
|
215
|
+
```python
|
|
216
|
+
round = 1
|
|
217
|
+
while round <= max_review_rounds:
|
|
218
|
+
# 执行当前 round(所有专家匿名/半匿名评审)
|
|
219
|
+
results = execute_round(round)
|
|
220
|
+
|
|
221
|
+
# 检查共识
|
|
222
|
+
consensus = check_consensus(results)
|
|
223
|
+
|
|
224
|
+
if consensus.verdict == "APPROVED" and consensus.ratio >= 0.9:
|
|
225
|
+
emit_verdict("APPROVED", consensus)
|
|
226
|
+
break
|
|
227
|
+
|
|
228
|
+
if round == max_review_rounds:
|
|
229
|
+
# 已达最大轮数仍无共识
|
|
230
|
+
emit_verdict("NO_CONSENSUS", consensus)
|
|
231
|
+
break
|
|
232
|
+
|
|
233
|
+
round += 1
|
|
234
|
+
|
|
235
|
+
if verdict == "REQUEST_CHANGES":
|
|
236
|
+
# 尝试自动修复常见问题
|
|
237
|
+
auto_fix_result = attempt_auto_fix(issues)
|
|
238
|
+
if auto_fix_result.success:
|
|
239
|
+
# 自动修复后,从 Round 2 起步重新评审
|
|
240
|
+
round = 2
|
|
241
|
+
continue # 重新进入循环
|
|
242
|
+
else:
|
|
243
|
+
# 无法自动修复,交给 orchestrator
|
|
244
|
+
emit_verdict("REQUEST_CHANGES", auto_fix_result.failed_issues)
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### 终止结果输出
|
|
248
|
+
|
|
249
|
+
当 subagent 因终态退出时,必须输出清晰的裁决:
|
|
250
|
+
|
|
251
|
+
- **APPROVED**: 共识报告 + specification.yaml
|
|
252
|
+
- **REQUEST_CHANGES(可自动修复)**: 自动修复后再次评审
|
|
253
|
+
- **REQUEST_CHANGES(不可自动修复)**: 失败报告 + 建议修复方向
|
|
254
|
+
- **NO_CONSENSUS**: 分歧详情报告
|
|
255
|
+
|
|
256
|
+
### 与 orchestrator 的交互约定
|
|
257
|
+
|
|
258
|
+
| 状态 | Subagent 输出 | Orchestrator 动作 |
|
|
259
|
+
|------|--------------|------------------|
|
|
260
|
+
| APPROVED | `{verdict:"APPROVED", consensus_ratio: N, ...}` | 自动进入下一 Phase |
|
|
261
|
+
| REQUEST_CHANGES (auto-fixed) | `{verdict:"APPROVED", auto_fixed: ["..."]}` | 自动进入下一 Phase |
|
|
262
|
+
| REQUEST_CHANGES (unfixable) | `{verdict:"REQUEST_CHANGES", failed_issues: [...]}` | ⚠️ 暂停等用户修复后,通过 task_id 重新 dispatch |
|
|
263
|
+
| NO_CONSENSUS | `{verdict:"NO_CONSENSUS", disagreements: [...]}` | ⚠️ 暂停等用户决策(可继续/中止/强制通过) |
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
193
267
|
## 修复与重新评审
|
|
194
268
|
|
|
195
269
|
如果最终裁决是 REQUEST_CHANGES 或 REJECTED:
|
|
@@ -197,6 +271,8 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
197
271
|
2. 重新评审(从 Round 2 起步,不是 Round 1)
|
|
198
272
|
3. 迭代直到 APPROVED
|
|
199
273
|
|
|
274
|
+
**Automatic re-review(#218)**: 当 delphi-review 以 subagent 运行时,对于常见的自动可控问题(措辞模糊、AC 缺失、格式问题等),subagent 应自行修复后自动重评审,无需等待用户。
|
|
275
|
+
|
|
200
276
|
修复报告格式:
|
|
201
277
|
```markdown
|
|
202
278
|
## 修复报告
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-17
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.8.
|
|
4
|
+
**Commit:** d8388b4
|
|
5
|
+
**Branch:** sprint/2026-06-17-01
|
|
6
|
+
**Version:** 0.8.19.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
**11-phase** development pipeline: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW → USER ACCEPTANCE → FEEDBACK → SHIP → LAND → CLEANUP. Phase 2 default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE in Phase 1: design must pass Delphi review (≥90% consensus) before any coding.
|