@boyingliu01/xp-gate 0.8.18 → 0.8.20
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/lib/init.js +2 -2
- package/lib/install-skill.js +13 -4
- package/lib/principles.js +5 -0
- package/mock-policy/AGENTS.md +2 -2
- package/mutation/AGENTS.md +2 -2
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +2 -2
- package/plugins/claude-code/skills/delphi-review/SKILL.md +76 -0
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +133 -1083
- package/plugins/claude-code/skills/sprint-flow/references/components/middleware.md +5 -2
- package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +333 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-2-build.md +4 -193
- package/plugins/claude-code/skills/sprint-flow/references/phase-6-ship.md +4 -188
- package/plugins/claude-code/skills/sprint-flow/references/phase-7-land.md +4 -135
- package/plugins/claude-code/skills/sprint-flow/references/phase-8-cleanup.md +4 -187
- package/plugins/claude-code/skills/sprint-flow/references/phase-minus-1-isolate.md +58 -0
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +2 -2
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/delphi-review/AGENTS.md +2 -2
- package/plugins/opencode/skills/delphi-review/SKILL.md +76 -0
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/opencode/skills/sprint-flow/SKILL.md +133 -1083
- package/plugins/opencode/skills/sprint-flow/references/components/middleware.md +5 -2
- package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +333 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-2-build.md +4 -193
- package/plugins/opencode/skills/sprint-flow/references/phase-6-ship.md +4 -188
- package/plugins/opencode/skills/sprint-flow/references/phase-7-land.md +4 -135
- package/plugins/opencode/skills/sprint-flow/references/phase-8-cleanup.md +4 -187
- package/plugins/opencode/skills/sprint-flow/references/phase-minus-1-isolate.md +58 -0
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +2 -2
- package/plugins/qoder/bin/xp-gate-check +5 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +2 -2
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +2 -2
- package/principles/AGENTS.md +2 -2
- package/skills/delphi-review/AGENTS.md +2 -2
- package/skills/delphi-review/SKILL.md +76 -0
- package/skills/sprint-flow/AGENTS.md +2 -2
- package/skills/sprint-flow/SKILL.md +133 -1083
- package/skills/sprint-flow/references/components/middleware.md +5 -2
- package/skills/sprint-flow/references/orchestration-rules.md +333 -0
- package/skills/sprint-flow/references/phase-2-build.md +4 -193
- package/skills/sprint-flow/references/phase-6-ship.md +4 -188
- package/skills/sprint-flow/references/phase-7-land.md +4 -135
- package/skills/sprint-flow/references/phase-8-cleanup.md +4 -187
- package/skills/sprint-flow/references/phase-minus-1-isolate.md +58 -0
- package/skills/test-specification-alignment/AGENTS.md +2 -2
|
@@ -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:**
|
|
4
|
+
**Commit:** a697146
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.8.
|
|
6
|
+
**Version:** 0.8.20.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.
|