@boyingliu01/xp-gate 0.10.6 → 0.10.7
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 +2 -2
- package/mutation/AGENTS.md +2 -2
- package/package.json +4 -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/sprint-flow/AGENTS.md +2 -2
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +8 -4
- package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +35 -5
- package/plugins/claude-code/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +6 -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/sprint-flow/AGENTS.md +2 -2
- package/plugins/opencode/skills/sprint-flow/SKILL.md +8 -4
- package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +35 -5
- package/plugins/opencode/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +6 -0
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +2 -2
- 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/sprint-flow/AGENTS.md +2 -2
- package/skills/sprint-flow/SKILL.md +8 -4
- package/skills/sprint-flow/references/orchestration-rules.md +35 -5
- package/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +6 -0
- package/skills/test-specification-alignment/AGENTS.md +2 -2
package/mock-policy/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SRC/MOCK-POLICY KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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": "@boyingliu01/xp-gate",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.7",
|
|
4
4
|
"description": "AI-driven development workflow: 6 quality gates + Delphi review + Sprint Flow",
|
|
5
5
|
"bin": {
|
|
6
6
|
"xp-gate": "./bin/xp-gate.js"
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
"mock-policy/",
|
|
19
19
|
"build-integrity/"
|
|
20
20
|
],
|
|
21
|
+
"exports": {
|
|
22
|
+
"./tui": "./plugins/opencode/tui-plugin.ts"
|
|
23
|
+
},
|
|
21
24
|
"repository": {
|
|
22
25
|
"type": "git",
|
|
23
26
|
"url": "https://github.com/boyingliu01/xp-gate"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-gate",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.7",
|
|
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-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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.
|
|
@@ -231,13 +231,17 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
|
|
|
231
231
|
4. **所有路由必须产生** `delphi-reviewed.json` (verdict: APPROVED) 才能进入 Phase 2 BUILD
|
|
232
232
|
|
|
233
233
|
### Phase 0: THINK(需求探索与设计)
|
|
234
|
-
- **
|
|
234
|
+
- **Orchestrator 直接执行**: brainstorming 是交互式 skill,**必须由 orchestrator 直接调用** `skill(name="brainstorming")`,不可 dispatch 到 subagent(Issue #217, #225, #248)
|
|
235
235
|
- 输入: Phase -1 summary(worktree 路径)+ 用户原始需求
|
|
236
236
|
- 输出: 结构化设计文档 → 直接作为 Phase 1 PLAN 的输入
|
|
237
237
|
- **HARD-GATE**: 设计未批准 → 不可进入实现
|
|
238
238
|
|
|
239
239
|
### Phase 1: PLAN(共识评审)
|
|
240
|
-
-
|
|
240
|
+
- **注意**: `autoplan` 和 `to-issues` 是交互式 skill,**必须由 orchestrator 直接执行**(Issue #225, #248)
|
|
241
|
+
- **执行模式(三阶段)**:
|
|
242
|
+
1. **Orchestrator 直接执行 autoplan**: `skill(name="autoplan")` → 用户确认 taste_decisions
|
|
243
|
+
2. **Orchestrator 直接执行 to-issues**: `skill(name="to-issues")` → 用户确认 Issue 拆分方案
|
|
244
|
+
3. **Subagent 执行 delphi-review**: `task(category="deep", load_skills=["delphi-review"])` — 非交互式,可自动运行至 APPROVED
|
|
241
245
|
- 输入: phase-0-summary.md + 设计文档
|
|
242
246
|
- 输出: `specification.yaml`(含 user_stories[])+ `slices-manifest.json`
|
|
243
247
|
|
|
@@ -304,7 +308,7 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
|
|
|
304
308
|
**详细指令**: 参见 `references/phase-6-ship.md` — GITHOOKS-GATE / VERSION-GATE / VERSION CHANGESET (Issue #142) / changeset schema。
|
|
305
309
|
|
|
306
310
|
**快速参考**:
|
|
307
|
-
- **
|
|
311
|
+
- **Orchestrator 直接执行**: `finishing-a-development-branch` 和 `ship` 均为交互式 skill(4 选项菜单 + PR 确认),**必须由 orchestrator 直接调用** `skill(name="finishing-a-development-branch")` 和 `skill(name="ship")`
|
|
308
312
|
- 输入: phase-5-summary.md + feedback-log.md → 输出: PR URL
|
|
309
313
|
- **HARD-GATE**: Phase 5 未完成 → BLOCK。验证 `feedback-log.md` 存在。
|
|
310
314
|
- **GITHOOKS-GATE**: 验证 hooks 完整性,缺失则 `githooks/install.sh`
|
|
@@ -315,7 +319,7 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
|
|
|
315
319
|
**详细指令**: 参见 `references/phase-7-land.md` — 完整流程、SLA 指标、回滚策略。
|
|
316
320
|
|
|
317
321
|
**快速参考**:
|
|
318
|
-
- **
|
|
322
|
+
- **Orchestrator 直接执行**: `land-and-deploy` 包含 merge 确认和 rollback 决策,**必须由 orchestrator 直接调用** `skill(name="land-and-deploy")`
|
|
319
323
|
- 输入: phase-6-summary.md + PR URL → 输出: 部署状态 + Canary 报告
|
|
320
324
|
- 流程: Merge PR → 等待 CI (10min) → 等待 Deploy (10min) → Canary Health Check (5min)
|
|
321
325
|
- **回滚**: `git revert` 最后一次 merge commit
|
|
@@ -30,16 +30,32 @@
|
|
|
30
30
|
|-------|------|:---------:|----------|-------------|--------|
|
|
31
31
|
| -1 | ISOLATE | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
32
32
|
| -0.5 | AUTO-ESTIMATE | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
33
|
-
| 0 | THINK |
|
|
34
|
-
| 1 | PLAN |
|
|
35
|
-
| 2 | BUILD | ✅
|
|
33
|
+
| 0 | THINK | ❌ | orchestrator(直接执行) | `["brainstorming"]` | orchestrator |
|
|
34
|
+
| 1 | PLAN | ⚠️ | orchestrator 执行 autoplan + to-issues(交互)→ subagent 执行 delphi-review | 见下方说明 | orchestrator + subagent |
|
|
35
|
+
| 2 | BUILD | ✅ | ralph-loop | `["test-driven-development"]` | subagent |
|
|
36
36
|
| 3 | REVIEW | ✅ | `deep` | `["delphi-review", "test-specification-alignment"]` | subagent |
|
|
37
37
|
| 4 | USER ACCEPT | ❌ | **强制人工** | 无 | 用户 |
|
|
38
38
|
| 5 | FEEDBACK | ✅ | `quick` | `["learn", "retro", "systematic-debugging"]` | subagent |
|
|
39
|
-
| 6 | SHIP |
|
|
40
|
-
| 7 | LAND |
|
|
39
|
+
| 6 | SHIP | ❌ | orchestrator(直接执行) | `["finishing-a-development-branch", "ship"]` | orchestrator |
|
|
40
|
+
| 7 | LAND | ❌ | orchestrator(直接执行) | `["land-and-deploy"]` | orchestrator |
|
|
41
41
|
| 8 | CLEANUP | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
42
42
|
|
|
43
|
+
**⚠️ 交互式 skill 必须由 orchestrator 直接执行(不可 dispatch 到 subagent)**:
|
|
44
|
+
|
|
45
|
+
| Phase | Skill | 为什么不能在 subagent 中执行 |
|
|
46
|
+
|-------|-------|---------------------------|
|
|
47
|
+
| 0 | `brainstorming` | 需要与用户对话确认需求、提出澄清问题。Subagent 是 fire-and-forget 模式,无法暂停等待用户输入(Issue #217) |
|
|
48
|
+
| 1 | `autoplan` | taste_decisions 节点暂停等待用户确认。必须由 orchestrator 直接执行(Issue #225) |
|
|
49
|
+
| 1 | `to-issues` | Step 6 "向用户确认" — 展示拆分结果,等待用户批准后才生成 slices-manifest.json |
|
|
50
|
+
| 6 | `finishing-a-development-branch` | 4 选项菜单 (merge/PR/keep/discard) 需要用户选择;Option 4 (discard) 要求 typed confirmation |
|
|
51
|
+
| 6 | `ship` | PR 创建前需要用户确认;包含 AskUserQuestion STOP 点 |
|
|
52
|
+
| 7 | `land-and-deploy` | Merge 确认、rollback 决策 — 均为用户交互点 |
|
|
53
|
+
|
|
54
|
+
**Phase 1 执行模式(两阶段)**:
|
|
55
|
+
1. **Orchestrator 直接执行 autoplan**:`skill(name="autoplan")` → 等待用户确认 taste_decisions
|
|
56
|
+
2. **Orchestrator 直接执行 to-issues**:`skill(name="to-issues")` → 等待用户确认 Issue 拆分
|
|
57
|
+
3. **Subagent 执行 delphi-review**:`task(category="deep", load_skills=["delphi-review"])` — 非交互式,可自动运行至 APPROVED
|
|
58
|
+
|
|
43
59
|
**上下文隔离原则**:
|
|
44
60
|
- 每个 Subagent 在**独立 session** 中启动,不继承 orchestrator 的对话历史
|
|
45
61
|
- orchestrator session 仅接收 subagent 的最终结果摘要(~13,000 tokens/sprint)
|
|
@@ -98,6 +114,20 @@
|
|
|
98
114
|
- 时机:每个 Phase 完成后的 transition 阶段自动展示,用户无需请求
|
|
99
115
|
- 向后兼容:旧版 `sprint-state.json` 缺少 `phase_history` 时,从 `phase` 字段推断状态
|
|
100
116
|
|
|
117
|
+
### Background Task Resume Protocol (MANDATORY — Issue #248)
|
|
118
|
+
|
|
119
|
+
After dispatching background agents with `run_in_background=true` (e.g., Phase -0.5 AUTO-ESTIMATE explore agents, Phase 1 delphi-review subagent):
|
|
120
|
+
|
|
121
|
+
1. **END YOUR RESPONSE** — do NOT poll `background_output()` before receiving `<system-reminder>`
|
|
122
|
+
2. **On `<system-reminder>` notification**: collect ALL completed results via `background_output(task_id="bg_...")`
|
|
123
|
+
3. **When ALL tasks complete**: immediately resume by:
|
|
124
|
+
a. Synthesizing results into the current phase assessment
|
|
125
|
+
b. Executing the phase transition gate
|
|
126
|
+
c. Continuing to the next phase **WITHOUT waiting for human input**
|
|
127
|
+
4. **If any task failed**: collect partial results, log the failure, continue with available data (do NOT block the pipeline)
|
|
128
|
+
|
|
129
|
+
**The orchestrator MUST treat task completion notifications as an implicit "continue" signal.** This protocol prevents the "human-in-loop stall" where all background tasks complete but the orchestrator waits indefinitely for a human message (Issue #235, #248).
|
|
130
|
+
|
|
101
131
|
### Phase Summary 格式(YAML Frontmatter Schema)
|
|
102
132
|
|
|
103
133
|
每个 `phase-N-summary.md` 必须包含以下 YAML frontmatter:
|
|
@@ -228,6 +228,12 @@ git diff --stat HEAD 2>/dev/null # 如果有局部修改
|
|
|
228
228
|
|
|
229
229
|
---
|
|
230
230
|
|
|
231
|
+
## 编排注意事项
|
|
232
|
+
|
|
233
|
+
Phase -0.5 经常使用并行 background explore agents 评估代码影响范围。Agent dispatch 后必须遵循 **Background Task Resume Protocol**(参见 `orchestration-rules.md`),在所有 background task 返回后自动恢复继续,不得等待人工消息(Issue #248)。
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
231
237
|
## 与学习循环的集成
|
|
232
238
|
|
|
233
239
|
### 数据收集
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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.
|
|
@@ -231,13 +231,17 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
|
|
|
231
231
|
4. **所有路由必须产生** `delphi-reviewed.json` (verdict: APPROVED) 才能进入 Phase 2 BUILD
|
|
232
232
|
|
|
233
233
|
### Phase 0: THINK(需求探索与设计)
|
|
234
|
-
- **
|
|
234
|
+
- **Orchestrator 直接执行**: brainstorming 是交互式 skill,**必须由 orchestrator 直接调用** `skill(name="brainstorming")`,不可 dispatch 到 subagent(Issue #217, #225, #248)
|
|
235
235
|
- 输入: Phase -1 summary(worktree 路径)+ 用户原始需求
|
|
236
236
|
- 输出: 结构化设计文档 → 直接作为 Phase 1 PLAN 的输入
|
|
237
237
|
- **HARD-GATE**: 设计未批准 → 不可进入实现
|
|
238
238
|
|
|
239
239
|
### Phase 1: PLAN(共识评审)
|
|
240
|
-
-
|
|
240
|
+
- **注意**: `autoplan` 和 `to-issues` 是交互式 skill,**必须由 orchestrator 直接执行**(Issue #225, #248)
|
|
241
|
+
- **执行模式(三阶段)**:
|
|
242
|
+
1. **Orchestrator 直接执行 autoplan**: `skill(name="autoplan")` → 用户确认 taste_decisions
|
|
243
|
+
2. **Orchestrator 直接执行 to-issues**: `skill(name="to-issues")` → 用户确认 Issue 拆分方案
|
|
244
|
+
3. **Subagent 执行 delphi-review**: `task(category="deep", load_skills=["delphi-review"])` — 非交互式,可自动运行至 APPROVED
|
|
241
245
|
- 输入: phase-0-summary.md + 设计文档
|
|
242
246
|
- 输出: `specification.yaml`(含 user_stories[])+ `slices-manifest.json`
|
|
243
247
|
|
|
@@ -304,7 +308,7 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
|
|
|
304
308
|
**详细指令**: 参见 `references/phase-6-ship.md` — GITHOOKS-GATE / VERSION-GATE / VERSION CHANGESET (Issue #142) / changeset schema。
|
|
305
309
|
|
|
306
310
|
**快速参考**:
|
|
307
|
-
- **
|
|
311
|
+
- **Orchestrator 直接执行**: `finishing-a-development-branch` 和 `ship` 均为交互式 skill(4 选项菜单 + PR 确认),**必须由 orchestrator 直接调用** `skill(name="finishing-a-development-branch")` 和 `skill(name="ship")`
|
|
308
312
|
- 输入: phase-5-summary.md + feedback-log.md → 输出: PR URL
|
|
309
313
|
- **HARD-GATE**: Phase 5 未完成 → BLOCK。验证 `feedback-log.md` 存在。
|
|
310
314
|
- **GITHOOKS-GATE**: 验证 hooks 完整性,缺失则 `githooks/install.sh`
|
|
@@ -315,7 +319,7 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
|
|
|
315
319
|
**详细指令**: 参见 `references/phase-7-land.md` — 完整流程、SLA 指标、回滚策略。
|
|
316
320
|
|
|
317
321
|
**快速参考**:
|
|
318
|
-
- **
|
|
322
|
+
- **Orchestrator 直接执行**: `land-and-deploy` 包含 merge 确认和 rollback 决策,**必须由 orchestrator 直接调用** `skill(name="land-and-deploy")`
|
|
319
323
|
- 输入: phase-6-summary.md + PR URL → 输出: 部署状态 + Canary 报告
|
|
320
324
|
- 流程: Merge PR → 等待 CI (10min) → 等待 Deploy (10min) → Canary Health Check (5min)
|
|
321
325
|
- **回滚**: `git revert` 最后一次 merge commit
|
|
@@ -30,16 +30,32 @@
|
|
|
30
30
|
|-------|------|:---------:|----------|-------------|--------|
|
|
31
31
|
| -1 | ISOLATE | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
32
32
|
| -0.5 | AUTO-ESTIMATE | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
33
|
-
| 0 | THINK |
|
|
34
|
-
| 1 | PLAN |
|
|
35
|
-
| 2 | BUILD | ✅
|
|
33
|
+
| 0 | THINK | ❌ | orchestrator(直接执行) | `["brainstorming"]` | orchestrator |
|
|
34
|
+
| 1 | PLAN | ⚠️ | orchestrator 执行 autoplan + to-issues(交互)→ subagent 执行 delphi-review | 见下方说明 | orchestrator + subagent |
|
|
35
|
+
| 2 | BUILD | ✅ | ralph-loop | `["test-driven-development"]` | subagent |
|
|
36
36
|
| 3 | REVIEW | ✅ | `deep` | `["delphi-review", "test-specification-alignment"]` | subagent |
|
|
37
37
|
| 4 | USER ACCEPT | ❌ | **强制人工** | 无 | 用户 |
|
|
38
38
|
| 5 | FEEDBACK | ✅ | `quick` | `["learn", "retro", "systematic-debugging"]` | subagent |
|
|
39
|
-
| 6 | SHIP |
|
|
40
|
-
| 7 | LAND |
|
|
39
|
+
| 6 | SHIP | ❌ | orchestrator(直接执行) | `["finishing-a-development-branch", "ship"]` | orchestrator |
|
|
40
|
+
| 7 | LAND | ❌ | orchestrator(直接执行) | `["land-and-deploy"]` | orchestrator |
|
|
41
41
|
| 8 | CLEANUP | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
42
42
|
|
|
43
|
+
**⚠️ 交互式 skill 必须由 orchestrator 直接执行(不可 dispatch 到 subagent)**:
|
|
44
|
+
|
|
45
|
+
| Phase | Skill | 为什么不能在 subagent 中执行 |
|
|
46
|
+
|-------|-------|---------------------------|
|
|
47
|
+
| 0 | `brainstorming` | 需要与用户对话确认需求、提出澄清问题。Subagent 是 fire-and-forget 模式,无法暂停等待用户输入(Issue #217) |
|
|
48
|
+
| 1 | `autoplan` | taste_decisions 节点暂停等待用户确认。必须由 orchestrator 直接执行(Issue #225) |
|
|
49
|
+
| 1 | `to-issues` | Step 6 "向用户确认" — 展示拆分结果,等待用户批准后才生成 slices-manifest.json |
|
|
50
|
+
| 6 | `finishing-a-development-branch` | 4 选项菜单 (merge/PR/keep/discard) 需要用户选择;Option 4 (discard) 要求 typed confirmation |
|
|
51
|
+
| 6 | `ship` | PR 创建前需要用户确认;包含 AskUserQuestion STOP 点 |
|
|
52
|
+
| 7 | `land-and-deploy` | Merge 确认、rollback 决策 — 均为用户交互点 |
|
|
53
|
+
|
|
54
|
+
**Phase 1 执行模式(两阶段)**:
|
|
55
|
+
1. **Orchestrator 直接执行 autoplan**:`skill(name="autoplan")` → 等待用户确认 taste_decisions
|
|
56
|
+
2. **Orchestrator 直接执行 to-issues**:`skill(name="to-issues")` → 等待用户确认 Issue 拆分
|
|
57
|
+
3. **Subagent 执行 delphi-review**:`task(category="deep", load_skills=["delphi-review"])` — 非交互式,可自动运行至 APPROVED
|
|
58
|
+
|
|
43
59
|
**上下文隔离原则**:
|
|
44
60
|
- 每个 Subagent 在**独立 session** 中启动,不继承 orchestrator 的对话历史
|
|
45
61
|
- orchestrator session 仅接收 subagent 的最终结果摘要(~13,000 tokens/sprint)
|
|
@@ -98,6 +114,20 @@
|
|
|
98
114
|
- 时机:每个 Phase 完成后的 transition 阶段自动展示,用户无需请求
|
|
99
115
|
- 向后兼容:旧版 `sprint-state.json` 缺少 `phase_history` 时,从 `phase` 字段推断状态
|
|
100
116
|
|
|
117
|
+
### Background Task Resume Protocol (MANDATORY — Issue #248)
|
|
118
|
+
|
|
119
|
+
After dispatching background agents with `run_in_background=true` (e.g., Phase -0.5 AUTO-ESTIMATE explore agents, Phase 1 delphi-review subagent):
|
|
120
|
+
|
|
121
|
+
1. **END YOUR RESPONSE** — do NOT poll `background_output()` before receiving `<system-reminder>`
|
|
122
|
+
2. **On `<system-reminder>` notification**: collect ALL completed results via `background_output(task_id="bg_...")`
|
|
123
|
+
3. **When ALL tasks complete**: immediately resume by:
|
|
124
|
+
a. Synthesizing results into the current phase assessment
|
|
125
|
+
b. Executing the phase transition gate
|
|
126
|
+
c. Continuing to the next phase **WITHOUT waiting for human input**
|
|
127
|
+
4. **If any task failed**: collect partial results, log the failure, continue with available data (do NOT block the pipeline)
|
|
128
|
+
|
|
129
|
+
**The orchestrator MUST treat task completion notifications as an implicit "continue" signal.** This protocol prevents the "human-in-loop stall" where all background tasks complete but the orchestrator waits indefinitely for a human message (Issue #235, #248).
|
|
130
|
+
|
|
101
131
|
### Phase Summary 格式(YAML Frontmatter Schema)
|
|
102
132
|
|
|
103
133
|
每个 `phase-N-summary.md` 必须包含以下 YAML frontmatter:
|
|
@@ -228,6 +228,12 @@ git diff --stat HEAD 2>/dev/null # 如果有局部修改
|
|
|
228
228
|
|
|
229
229
|
---
|
|
230
230
|
|
|
231
|
+
## 编排注意事项
|
|
232
|
+
|
|
233
|
+
Phase -0.5 经常使用并行 background explore agents 评估代码影响范围。Agent dispatch 后必须遵循 **Background Task Resume Protocol**(参见 `orchestration-rules.md`),在所有 background task 返回后自动恢复继续,不得等待人工消息(Issue #248)。
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
231
237
|
## 与学习循环的集成
|
|
232
238
|
|
|
233
239
|
### 数据收集
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
package/principles/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# PRINCIPLES CHECKER MODULE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Clean Code & SOLID principles checker — **Gate 4** of pre-commit. 14 rules × 9 language adapters, SARIF 2.1.0 output. Houses the **Boy Scout Rule** enforcement engine (Gate 6) and warning-baseline storage.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.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.
|
|
@@ -231,13 +231,17 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
|
|
|
231
231
|
4. **所有路由必须产生** `delphi-reviewed.json` (verdict: APPROVED) 才能进入 Phase 2 BUILD
|
|
232
232
|
|
|
233
233
|
### Phase 0: THINK(需求探索与设计)
|
|
234
|
-
- **
|
|
234
|
+
- **Orchestrator 直接执行**: brainstorming 是交互式 skill,**必须由 orchestrator 直接调用** `skill(name="brainstorming")`,不可 dispatch 到 subagent(Issue #217, #225, #248)
|
|
235
235
|
- 输入: Phase -1 summary(worktree 路径)+ 用户原始需求
|
|
236
236
|
- 输出: 结构化设计文档 → 直接作为 Phase 1 PLAN 的输入
|
|
237
237
|
- **HARD-GATE**: 设计未批准 → 不可进入实现
|
|
238
238
|
|
|
239
239
|
### Phase 1: PLAN(共识评审)
|
|
240
|
-
-
|
|
240
|
+
- **注意**: `autoplan` 和 `to-issues` 是交互式 skill,**必须由 orchestrator 直接执行**(Issue #225, #248)
|
|
241
|
+
- **执行模式(三阶段)**:
|
|
242
|
+
1. **Orchestrator 直接执行 autoplan**: `skill(name="autoplan")` → 用户确认 taste_decisions
|
|
243
|
+
2. **Orchestrator 直接执行 to-issues**: `skill(name="to-issues")` → 用户确认 Issue 拆分方案
|
|
244
|
+
3. **Subagent 执行 delphi-review**: `task(category="deep", load_skills=["delphi-review"])` — 非交互式,可自动运行至 APPROVED
|
|
241
245
|
- 输入: phase-0-summary.md + 设计文档
|
|
242
246
|
- 输出: `specification.yaml`(含 user_stories[])+ `slices-manifest.json`
|
|
243
247
|
|
|
@@ -304,7 +308,7 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
|
|
|
304
308
|
**详细指令**: 参见 `references/phase-6-ship.md` — GITHOOKS-GATE / VERSION-GATE / VERSION CHANGESET (Issue #142) / changeset schema。
|
|
305
309
|
|
|
306
310
|
**快速参考**:
|
|
307
|
-
- **
|
|
311
|
+
- **Orchestrator 直接执行**: `finishing-a-development-branch` 和 `ship` 均为交互式 skill(4 选项菜单 + PR 确认),**必须由 orchestrator 直接调用** `skill(name="finishing-a-development-branch")` 和 `skill(name="ship")`
|
|
308
312
|
- 输入: phase-5-summary.md + feedback-log.md → 输出: PR URL
|
|
309
313
|
- **HARD-GATE**: Phase 5 未完成 → BLOCK。验证 `feedback-log.md` 存在。
|
|
310
314
|
- **GITHOOKS-GATE**: 验证 hooks 完整性,缺失则 `githooks/install.sh`
|
|
@@ -315,7 +319,7 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
|
|
|
315
319
|
**详细指令**: 参见 `references/phase-7-land.md` — 完整流程、SLA 指标、回滚策略。
|
|
316
320
|
|
|
317
321
|
**快速参考**:
|
|
318
|
-
- **
|
|
322
|
+
- **Orchestrator 直接执行**: `land-and-deploy` 包含 merge 确认和 rollback 决策,**必须由 orchestrator 直接调用** `skill(name="land-and-deploy")`
|
|
319
323
|
- 输入: phase-6-summary.md + PR URL → 输出: 部署状态 + Canary 报告
|
|
320
324
|
- 流程: Merge PR → 等待 CI (10min) → 等待 Deploy (10min) → Canary Health Check (5min)
|
|
321
325
|
- **回滚**: `git revert` 最后一次 merge commit
|
|
@@ -30,16 +30,32 @@
|
|
|
30
30
|
|-------|------|:---------:|----------|-------------|--------|
|
|
31
31
|
| -1 | ISOLATE | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
32
32
|
| -0.5 | AUTO-ESTIMATE | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
33
|
-
| 0 | THINK |
|
|
34
|
-
| 1 | PLAN |
|
|
35
|
-
| 2 | BUILD | ✅
|
|
33
|
+
| 0 | THINK | ❌ | orchestrator(直接执行) | `["brainstorming"]` | orchestrator |
|
|
34
|
+
| 1 | PLAN | ⚠️ | orchestrator 执行 autoplan + to-issues(交互)→ subagent 执行 delphi-review | 见下方说明 | orchestrator + subagent |
|
|
35
|
+
| 2 | BUILD | ✅ | ralph-loop | `["test-driven-development"]` | subagent |
|
|
36
36
|
| 3 | REVIEW | ✅ | `deep` | `["delphi-review", "test-specification-alignment"]` | subagent |
|
|
37
37
|
| 4 | USER ACCEPT | ❌ | **强制人工** | 无 | 用户 |
|
|
38
38
|
| 5 | FEEDBACK | ✅ | `quick` | `["learn", "retro", "systematic-debugging"]` | subagent |
|
|
39
|
-
| 6 | SHIP |
|
|
40
|
-
| 7 | LAND |
|
|
39
|
+
| 6 | SHIP | ❌ | orchestrator(直接执行) | `["finishing-a-development-branch", "ship"]` | orchestrator |
|
|
40
|
+
| 7 | LAND | ❌ | orchestrator(直接执行) | `["land-and-deploy"]` | orchestrator |
|
|
41
41
|
| 8 | CLEANUP | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
42
42
|
|
|
43
|
+
**⚠️ 交互式 skill 必须由 orchestrator 直接执行(不可 dispatch 到 subagent)**:
|
|
44
|
+
|
|
45
|
+
| Phase | Skill | 为什么不能在 subagent 中执行 |
|
|
46
|
+
|-------|-------|---------------------------|
|
|
47
|
+
| 0 | `brainstorming` | 需要与用户对话确认需求、提出澄清问题。Subagent 是 fire-and-forget 模式,无法暂停等待用户输入(Issue #217) |
|
|
48
|
+
| 1 | `autoplan` | taste_decisions 节点暂停等待用户确认。必须由 orchestrator 直接执行(Issue #225) |
|
|
49
|
+
| 1 | `to-issues` | Step 6 "向用户确认" — 展示拆分结果,等待用户批准后才生成 slices-manifest.json |
|
|
50
|
+
| 6 | `finishing-a-development-branch` | 4 选项菜单 (merge/PR/keep/discard) 需要用户选择;Option 4 (discard) 要求 typed confirmation |
|
|
51
|
+
| 6 | `ship` | PR 创建前需要用户确认;包含 AskUserQuestion STOP 点 |
|
|
52
|
+
| 7 | `land-and-deploy` | Merge 确认、rollback 决策 — 均为用户交互点 |
|
|
53
|
+
|
|
54
|
+
**Phase 1 执行模式(两阶段)**:
|
|
55
|
+
1. **Orchestrator 直接执行 autoplan**:`skill(name="autoplan")` → 等待用户确认 taste_decisions
|
|
56
|
+
2. **Orchestrator 直接执行 to-issues**:`skill(name="to-issues")` → 等待用户确认 Issue 拆分
|
|
57
|
+
3. **Subagent 执行 delphi-review**:`task(category="deep", load_skills=["delphi-review"])` — 非交互式,可自动运行至 APPROVED
|
|
58
|
+
|
|
43
59
|
**上下文隔离原则**:
|
|
44
60
|
- 每个 Subagent 在**独立 session** 中启动,不继承 orchestrator 的对话历史
|
|
45
61
|
- orchestrator session 仅接收 subagent 的最终结果摘要(~13,000 tokens/sprint)
|
|
@@ -98,6 +114,20 @@
|
|
|
98
114
|
- 时机:每个 Phase 完成后的 transition 阶段自动展示,用户无需请求
|
|
99
115
|
- 向后兼容:旧版 `sprint-state.json` 缺少 `phase_history` 时,从 `phase` 字段推断状态
|
|
100
116
|
|
|
117
|
+
### Background Task Resume Protocol (MANDATORY — Issue #248)
|
|
118
|
+
|
|
119
|
+
After dispatching background agents with `run_in_background=true` (e.g., Phase -0.5 AUTO-ESTIMATE explore agents, Phase 1 delphi-review subagent):
|
|
120
|
+
|
|
121
|
+
1. **END YOUR RESPONSE** — do NOT poll `background_output()` before receiving `<system-reminder>`
|
|
122
|
+
2. **On `<system-reminder>` notification**: collect ALL completed results via `background_output(task_id="bg_...")`
|
|
123
|
+
3. **When ALL tasks complete**: immediately resume by:
|
|
124
|
+
a. Synthesizing results into the current phase assessment
|
|
125
|
+
b. Executing the phase transition gate
|
|
126
|
+
c. Continuing to the next phase **WITHOUT waiting for human input**
|
|
127
|
+
4. **If any task failed**: collect partial results, log the failure, continue with available data (do NOT block the pipeline)
|
|
128
|
+
|
|
129
|
+
**The orchestrator MUST treat task completion notifications as an implicit "continue" signal.** This protocol prevents the "human-in-loop stall" where all background tasks complete but the orchestrator waits indefinitely for a human message (Issue #235, #248).
|
|
130
|
+
|
|
101
131
|
### Phase Summary 格式(YAML Frontmatter Schema)
|
|
102
132
|
|
|
103
133
|
每个 `phase-N-summary.md` 必须包含以下 YAML frontmatter:
|
|
@@ -228,6 +228,12 @@ git diff --stat HEAD 2>/dev/null # 如果有局部修改
|
|
|
228
228
|
|
|
229
229
|
---
|
|
230
230
|
|
|
231
|
+
## 编排注意事项
|
|
232
|
+
|
|
233
|
+
Phase -0.5 经常使用并行 background explore agents 评估代码影响范围。Agent dispatch 后必须遵循 **Background Task Resume Protocol**(参见 `orchestration-rules.md`),在所有 background task 返回后自动恢复继续,不得等待人工消息(Issue #248)。
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
231
237
|
## 与学习循环的集成
|
|
232
238
|
|
|
233
239
|
### 数据收集
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-06-23
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** c4873e5
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.10.
|
|
6
|
+
**Version:** 0.10.7.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|