@boyingliu01/xp-gate 0.9.4 → 0.10.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.
Files changed (35) hide show
  1. package/adapters/python.sh +61 -1
  2. package/lib/doctor.js +34 -18
  3. package/lib/shared-phase-constants.js +23 -9
  4. package/mock-policy/AGENTS.md +3 -3
  5. package/mutation/AGENTS.md +3 -3
  6. package/mutation/gate-m.ts +209 -274
  7. package/mutation/runners/index.ts +22 -0
  8. package/mutation/runners/mutmut-runner.ts +220 -0
  9. package/mutation/runners/stryker-runner.ts +146 -0
  10. package/mutation/runners/types.ts +99 -0
  11. package/package.json +1 -1
  12. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  13. package/plugins/claude-code/skills/delphi-review/AGENTS.md +3 -3
  14. package/plugins/claude-code/skills/delphi-review/SKILL.md +34 -0
  15. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +3 -3
  16. package/plugins/claude-code/skills/sprint-flow/SKILL.md +53 -1
  17. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
  18. package/plugins/opencode/__tests__/xp-gate-update.test.ts +1 -11
  19. package/plugins/opencode/index.ts +0 -1
  20. package/plugins/opencode/package.json +1 -1
  21. package/plugins/opencode/skills/delphi-review/AGENTS.md +3 -3
  22. package/plugins/opencode/skills/delphi-review/SKILL.md +34 -0
  23. package/plugins/opencode/skills/sprint-flow/AGENTS.md +3 -3
  24. package/plugins/opencode/skills/sprint-flow/SKILL.md +53 -1
  25. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
  26. package/plugins/opencode/tui-plugin.ts +69 -6
  27. package/plugins/qoder/skills/delphi-review/AGENTS.md +3 -3
  28. package/plugins/qoder/skills/sprint-flow/AGENTS.md +3 -3
  29. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
  30. package/principles/AGENTS.md +3 -3
  31. package/skills/delphi-review/AGENTS.md +3 -3
  32. package/skills/delphi-review/SKILL.md +34 -0
  33. package/skills/sprint-flow/AGENTS.md +3 -3
  34. package/skills/sprint-flow/SKILL.md +53 -1
  35. package/skills/test-specification-alignment/AGENTS.md +3 -3
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/opencode-plugin",
3
- "version": "0.9.4",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "description": "XP-Gate quality gates + AI workflow skills + Sprint Flow TUI sidebar for OpenCode",
@@ -1,9 +1,9 @@
1
1
  # SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-19
4
- **Commit:** b67f7f9
3
+ **Generated:** 2026-06-22
4
+ **Commit:** 984d568
5
5
  **Branch:** main
6
- **Version:** 0.9.4.0
6
+ **Version:** 0.10.0.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,6 +1,7 @@
1
1
  ---
2
2
  name: delphi-review
3
3
  description: "Use when asked to review a design, plan, or architecture; before implementation starts; or when multi-expert consensus is needed. Triggers: 'review this design', '评审这个需求', 'design review', '多专家评审', 'consensus review', 'code walkthrough', 'push review', 'architecture review', 'PR review', or any request for multi-expert evaluation of requirements, design docs, or PRs."
4
+ auto_continue: true
4
5
  ---
5
6
 
6
7
  # Delphi Consensus Review
@@ -109,6 +110,39 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
109
110
 
110
111
  **Automatic re-review**: 对于常见可控问题(措辞模糊、AC 缺失、格式问题),subagent 应自行修复后自动重评审,无需等待用户。
111
112
 
113
+ ### ⭐ 自动延续规则(MANDATORY — 防止流程卡住)
114
+
115
+ 当 Delphi Review 启动多轮评审(Round 2+)时,**orchestrator 必须自动延续流程,不得等待用户输入**。
116
+
117
+ **触发条件**:
118
+ - Round N 完成,但未达到终止条件(100% approved + ≥90% consensus + 所有 Critical/Major 已处理)
119
+ - 存在待处理的背景任务(subagent dispatched tasks)
120
+
121
+ **自动延续动作**:
122
+ 1. **收集背景任务结果**:等待 `<system-reminder>` 通知后,立即调用 `background_output(task_id="bg_...")` 获取所有 subagent 输出
123
+ 2. **合成 Round N 总结**:汇总专家意见、共识度、待处理问题
124
+ 3. **自动启动 Round N+1**:立即 dispatch 新一轮 subagent 任务,携带上一轮总结作为上下文
125
+ 4. **循环直至终止**:重复步骤 1-3,直到达到终止条件
126
+
127
+ **终止条件**(满足全部):
128
+ - ✅ 所有专家状态 = APPROVED
129
+ - ✅ 共识度 ≥ 90%
130
+ - ✅ 所有 Critical 级别问题已解决
131
+ - ✅ 所有 Major 级别问题已处理(或已记录为已知问题)
132
+
133
+ **例外情况**(直接输出,不进入下一轮):
134
+ - Round 1 即达到 100% approved + 100% consensus → 直接输出最终报告
135
+ - 已达最大轮数(5 轮)→ 输出"未达成共识"报告,标记为 PROCESS_BLOCK
136
+
137
+ **禁止行为**:
138
+ - ❌ 询问用户"要继续吗?"
139
+ - ❌ 等待用户手动触发 Round N+1
140
+ - ❌ 在未达到终止条件时停止流程
141
+
142
+ **错误处理**:
143
+ - 背景任务超时(>10min)→ 标记为 TIMEOUT,输出部分结果并终止
144
+ - 背景任务失败(subagent 错误)→ 重试 1 次,仍失败则输出错误报告并终止
145
+
112
146
  ---
113
147
 
114
148
  ## 修复与重新评审
@@ -1,9 +1,9 @@
1
1
  # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-19
4
- **Commit:** b67f7f9
3
+ **Generated:** 2026-06-22
4
+ **Commit:** 984d568
5
5
  **Branch:** main
6
- **Version:** 0.9.4.0
6
+ **Version:** 0.10.0.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.
@@ -408,6 +408,58 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
408
408
 
409
409
  ---
410
410
 
411
+ ### ⭐ Phase State Persistence(阶段状态持久化 — MANDATORY)
412
+
413
+ **编排器必须在每个 Phase 完成后更新 `.sprint-state/sprint-state.json`**:
414
+
415
+ 1. **Phase 完成后立即更新**(每个 Phase 结束前):
416
+ - `phase`: 更新为当前 Phase 编号(如 `0`, `1`, `2`...)
417
+ - `status`: 更新为 `"completed"`(已完成 Phase)
418
+ - `phase_history`: 追加新条目
419
+
420
+ 2. **`phase_history` 数组条目 schema**:
421
+ ```json
422
+ {
423
+ "phase": 0,
424
+ "phase_name": "THINK",
425
+ "status": "completed",
426
+ "timestamp": "2026-06-20T10:30:00Z"
427
+ }
428
+ ```
429
+
430
+ 3. **检查点**:
431
+ - `--status` 参数读取 `sprint-state.json` 并渲染进度看板
432
+ - TUI panel 显示当前 Phase 和历史
433
+ - `--resume-from` 校验 `phase_history` 中的最后完成 Phase
434
+
435
+ 4. **完整 sprint-state.json 示例**:
436
+ ```json
437
+ {
438
+ "id": "sprint-2026-06-20-01",
439
+ "phase": 2,
440
+ "status": "in_progress",
441
+ "phase_history": [
442
+ {"phase": -1, "phase_name": "ISOLATE", "status": "completed", "timestamp": "2026-06-20T10:00:00Z"},
443
+ {"phase": -0.5, "phase_name": "AUTO-ESTIMATE", "status": "completed", "timestamp": "2026-06-20T10:05:00Z"},
444
+ {"phase": 0, "phase_name": "THINK", "status": "completed", "timestamp": "2026-06-20T10:15:00Z"},
445
+ {"phase": 1, "phase_name": "PLAN", "status": "completed", "timestamp": "2026-06-20T10:30:00Z"}
446
+ ],
447
+ "isolation": {
448
+ "worktree_path": "/home/boyingliu01/projects/xp-gate/.worktrees/sprint/sprint-2026-06-20-01",
449
+ "branch": "sprint/2026-06-20-01"
450
+ },
451
+ "outputs": {
452
+ "pain_document": "phase-outputs/phase-0-summary.md",
453
+ "specification": "phase-outputs/specification.yaml"
454
+ },
455
+ "metrics": {
456
+ "coverage_pct": 85.5
457
+ }
458
+ }
459
+ ```
460
+
461
+ ---
462
+
411
463
  ## 使用示例
412
464
 
413
465
  | 场景 | 命令 | 说明 |
@@ -447,7 +499,7 @@ See [Output Contract](#output-contract) below for the canonical machine-readable
447
499
 
448
500
  **Phase Summary** (每个 Phase 必须输出 YAML frontmatter): `phase/N`, `phase_name`, `status`, `outputs[]`, `decisions[]`, `next_phase_context` + markdown body (≤50 lines)
449
501
 
450
- **Sprint State JSON**: `{id, phase, status, isolation {worktree_path, branch}, outputs, metrics}` — 存储于 `.sprint-state/sprint-state.json`
502
+ **Sprint State JSON**: `{id, phase, status, phase_history[], isolation {worktree_path, branch}, outputs, metrics}` — 存储于 `.sprint-state/sprint-state.json`
451
503
 
452
504
  **Final User-Facing Output**: Phase/status, file paths, validation results, next user decision, PR URL or cleanup report
453
505
 
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-19
4
- **Commit:** b67f7f9
3
+ **Generated:** 2026-06-22
4
+ **Commit:** 984d568
5
5
  **Branch:** main
6
- **Version:** 0.9.4.0
6
+ **Version:** 0.10.0.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -15,7 +15,67 @@
15
15
  import { existsSync, readFileSync } from "node:fs"
16
16
  import { join } from "node:path"
17
17
  import type { TuiPlugin, TuiSlotPlugin, TuiSlotProps } from "@opencode-ai/plugin/tui"
18
- import { PHASE_NAMES, PHASE_ORDER, getLatestTimestamp, isStale } from "../../src/npm-package/lib/shared-phase-constants.js"
18
+ // ── Phase constants (inlined from ../../src/npm-package/lib/shared-phase-constants.js)
19
+ // This file is inlined because the installed npm package does not bundle src/ at publish time. ──
20
+
21
+ const PHASE_NAMES: Record<string, string> = {
22
+ '-1': 'ISOLATE',
23
+ '-0.5': 'AUTO-ESTIMATE',
24
+ '0': 'THINK',
25
+ '1': 'PLAN',
26
+ '2': 'BUILD',
27
+ '3': 'REVIEW',
28
+ '4': 'USER ACCEPT',
29
+ '5': 'FEEDBACK',
30
+ '6': 'SHIP',
31
+ '7': 'LAND',
32
+ '8': 'CLEANUP',
33
+ };
34
+
35
+ const PHASE_ORDER = ['-1', '-0.5', '0', '1', '2', '3', '4', '5', '6', '7', '8'];
36
+
37
+ function parseTime(value: unknown): number {
38
+ return new Date(value as string).getTime();
39
+ }
40
+
41
+ function maxValid(current: number, candidate: unknown): number {
42
+ if (!candidate) return current;
43
+ const t = parseTime(candidate);
44
+ return !isNaN(t) && t > current ? t : current;
45
+ }
46
+
47
+ function getLatestTimestamp(state: Record<string, unknown> | null): number {
48
+ if (!state || !state.started_at) return 0;
49
+ const started = parseTime(state.started_at);
50
+ if (isNaN(started)) return 0;
51
+ let latest = started;
52
+ if (Array.isArray(state.phase_history)) {
53
+ for (const ph of state.phase_history) {
54
+ latest = maxValid(maxValid(latest, (ph as Record<string, unknown>).completed_at), (ph as Record<string, unknown>).started_at);
55
+ }
56
+ }
57
+ return latest;
58
+ }
59
+
60
+ function isStale(state: SprintState | null): boolean {
61
+ if (!state || !state.started_at) return false;
62
+ const latest = sprintTimestamp(state);
63
+ return latest > 0 && Date.now() - latest > 3600000;
64
+ }
65
+
66
+ function sprintTimestamp(state: SprintState | null): number {
67
+ if (!state || !state.started_at) return 0;
68
+ const started = parseTime(state.started_at);
69
+ if (isNaN(started)) return 0;
70
+ let latest = started;
71
+ if (Array.isArray(state.phase_history)) {
72
+ for (const ph of state.phase_history) {
73
+ latest = ph.completed_at ? Math.max(latest, parseTime(ph.completed_at)) : latest;
74
+ latest = ph.started_at ? Math.max(latest, parseTime(ph.started_at)) : latest;
75
+ }
76
+ }
77
+ return latest;
78
+ }
19
79
 
20
80
  // ── Sprint state schema ──
21
81
 
@@ -101,6 +161,12 @@ function renderBuildReqs(history: SprintPhaseHistory): string[] {
101
161
  .map(([id, r]) => ` ${statusSymbol(r.status, id, undefined)} ${r.name}`)
102
162
  }
103
163
 
164
+ function appendBuildReqs(lines: string[], key: string, history: SprintPhaseHistory | undefined): void {
165
+ if (key === "2" && history?.reqs) {
166
+ lines.push(...renderBuildReqs(history))
167
+ }
168
+ }
169
+
104
170
  function renderPhaseLines(
105
171
  historyByPhase: Record<string, SprintPhaseHistory>,
106
172
  currentPhase: string | number | undefined,
@@ -110,9 +176,7 @@ function renderPhaseLines(
110
176
  const history = historyByPhase[key]
111
177
  if (!history && String(currentPhase) !== key) continue
112
178
  lines.push(renderPhaseLine(key, history, currentPhase))
113
- if (key === "2" && history?.reqs) {
114
- lines.push(...renderBuildReqs(history))
115
- }
179
+ appendBuildReqs(lines, key, history)
116
180
  }
117
181
  return lines
118
182
  }
@@ -143,8 +207,7 @@ const tuiPlugin: TuiSlotPlugin = {
143
207
  if (!state) return null
144
208
  const text = renderSprintSidebar(state)
145
209
  if (!text) return null
146
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
147
- return text as any
210
+ return text
148
211
  },
149
212
  },
150
213
  }
@@ -1,9 +1,9 @@
1
1
  # SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-19
4
- **Commit:** b67f7f9
3
+ **Generated:** 2026-06-22
4
+ **Commit:** 984d568
5
5
  **Branch:** main
6
- **Version:** 0.9.4.0
6
+ **Version:** 0.10.0.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
- **Generated:** 2026-06-19
4
- **Commit:** b67f7f9
3
+ **Generated:** 2026-06-22
4
+ **Commit:** 984d568
5
5
  **Branch:** main
6
- **Version:** 0.9.4.0
6
+ **Version:** 0.10.0.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
- **Generated:** 2026-06-19
4
- **Commit:** b67f7f9
3
+ **Generated:** 2026-06-22
4
+ **Commit:** 984d568
5
5
  **Branch:** main
6
- **Version:** 0.9.4.0
6
+ **Version:** 0.10.0.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
  # PRINCIPLES CHECKER MODULE
2
2
 
3
- **Generated:** 2026-06-19
4
- **Commit:** b67f7f9
3
+ **Generated:** 2026-06-22
4
+ **Commit:** 984d568
5
5
  **Branch:** main
6
- **Version:** 0.9.4.0
6
+ **Version:** 0.10.0.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
- **Generated:** 2026-06-19
4
- **Commit:** b67f7f9
3
+ **Generated:** 2026-06-22
4
+ **Commit:** 984d568
5
5
  **Branch:** main
6
- **Version:** 0.9.4.0
6
+ **Version:** 0.10.0.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,6 +1,7 @@
1
1
  ---
2
2
  name: delphi-review
3
3
  description: "Use when asked to review a design, plan, or architecture; before implementation starts; or when multi-expert consensus is needed. Triggers: 'review this design', '评审这个需求', 'design review', '多专家评审', 'consensus review', 'code walkthrough', 'push review', 'architecture review', 'PR review', or any request for multi-expert evaluation of requirements, design docs, or PRs."
4
+ auto_continue: true
4
5
  ---
5
6
 
6
7
  # Delphi Consensus Review
@@ -109,6 +110,39 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
109
110
 
110
111
  **Automatic re-review**: 对于常见可控问题(措辞模糊、AC 缺失、格式问题),subagent 应自行修复后自动重评审,无需等待用户。
111
112
 
113
+ ### ⭐ 自动延续规则(MANDATORY — 防止流程卡住)
114
+
115
+ 当 Delphi Review 启动多轮评审(Round 2+)时,**orchestrator 必须自动延续流程,不得等待用户输入**。
116
+
117
+ **触发条件**:
118
+ - Round N 完成,但未达到终止条件(100% approved + ≥90% consensus + 所有 Critical/Major 已处理)
119
+ - 存在待处理的背景任务(subagent dispatched tasks)
120
+
121
+ **自动延续动作**:
122
+ 1. **收集背景任务结果**:等待 `<system-reminder>` 通知后,立即调用 `background_output(task_id="bg_...")` 获取所有 subagent 输出
123
+ 2. **合成 Round N 总结**:汇总专家意见、共识度、待处理问题
124
+ 3. **自动启动 Round N+1**:立即 dispatch 新一轮 subagent 任务,携带上一轮总结作为上下文
125
+ 4. **循环直至终止**:重复步骤 1-3,直到达到终止条件
126
+
127
+ **终止条件**(满足全部):
128
+ - ✅ 所有专家状态 = APPROVED
129
+ - ✅ 共识度 ≥ 90%
130
+ - ✅ 所有 Critical 级别问题已解决
131
+ - ✅ 所有 Major 级别问题已处理(或已记录为已知问题)
132
+
133
+ **例外情况**(直接输出,不进入下一轮):
134
+ - Round 1 即达到 100% approved + 100% consensus → 直接输出最终报告
135
+ - 已达最大轮数(5 轮)→ 输出"未达成共识"报告,标记为 PROCESS_BLOCK
136
+
137
+ **禁止行为**:
138
+ - ❌ 询问用户"要继续吗?"
139
+ - ❌ 等待用户手动触发 Round N+1
140
+ - ❌ 在未达到终止条件时停止流程
141
+
142
+ **错误处理**:
143
+ - 背景任务超时(>10min)→ 标记为 TIMEOUT,输出部分结果并终止
144
+ - 背景任务失败(subagent 错误)→ 重试 1 次,仍失败则输出错误报告并终止
145
+
112
146
  ---
113
147
 
114
148
  ## 修复与重新评审
@@ -1,9 +1,9 @@
1
1
  # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-19
4
- **Commit:** b67f7f9
3
+ **Generated:** 2026-06-22
4
+ **Commit:** 984d568
5
5
  **Branch:** main
6
- **Version:** 0.9.4.0
6
+ **Version:** 0.10.0.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.
@@ -408,6 +408,58 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
408
408
 
409
409
  ---
410
410
 
411
+ ### ⭐ Phase State Persistence(阶段状态持久化 — MANDATORY)
412
+
413
+ **编排器必须在每个 Phase 完成后更新 `.sprint-state/sprint-state.json`**:
414
+
415
+ 1. **Phase 完成后立即更新**(每个 Phase 结束前):
416
+ - `phase`: 更新为当前 Phase 编号(如 `0`, `1`, `2`...)
417
+ - `status`: 更新为 `"completed"`(已完成 Phase)
418
+ - `phase_history`: 追加新条目
419
+
420
+ 2. **`phase_history` 数组条目 schema**:
421
+ ```json
422
+ {
423
+ "phase": 0,
424
+ "phase_name": "THINK",
425
+ "status": "completed",
426
+ "timestamp": "2026-06-20T10:30:00Z"
427
+ }
428
+ ```
429
+
430
+ 3. **检查点**:
431
+ - `--status` 参数读取 `sprint-state.json` 并渲染进度看板
432
+ - TUI panel 显示当前 Phase 和历史
433
+ - `--resume-from` 校验 `phase_history` 中的最后完成 Phase
434
+
435
+ 4. **完整 sprint-state.json 示例**:
436
+ ```json
437
+ {
438
+ "id": "sprint-2026-06-20-01",
439
+ "phase": 2,
440
+ "status": "in_progress",
441
+ "phase_history": [
442
+ {"phase": -1, "phase_name": "ISOLATE", "status": "completed", "timestamp": "2026-06-20T10:00:00Z"},
443
+ {"phase": -0.5, "phase_name": "AUTO-ESTIMATE", "status": "completed", "timestamp": "2026-06-20T10:05:00Z"},
444
+ {"phase": 0, "phase_name": "THINK", "status": "completed", "timestamp": "2026-06-20T10:15:00Z"},
445
+ {"phase": 1, "phase_name": "PLAN", "status": "completed", "timestamp": "2026-06-20T10:30:00Z"}
446
+ ],
447
+ "isolation": {
448
+ "worktree_path": "/home/boyingliu01/projects/xp-gate/.worktrees/sprint/sprint-2026-06-20-01",
449
+ "branch": "sprint/2026-06-20-01"
450
+ },
451
+ "outputs": {
452
+ "pain_document": "phase-outputs/phase-0-summary.md",
453
+ "specification": "phase-outputs/specification.yaml"
454
+ },
455
+ "metrics": {
456
+ "coverage_pct": 85.5
457
+ }
458
+ }
459
+ ```
460
+
461
+ ---
462
+
411
463
  ## 使用示例
412
464
 
413
465
  | 场景 | 命令 | 说明 |
@@ -447,7 +499,7 @@ See [Output Contract](#output-contract) below for the canonical machine-readable
447
499
 
448
500
  **Phase Summary** (每个 Phase 必须输出 YAML frontmatter): `phase/N`, `phase_name`, `status`, `outputs[]`, `decisions[]`, `next_phase_context` + markdown body (≤50 lines)
449
501
 
450
- **Sprint State JSON**: `{id, phase, status, isolation {worktree_path, branch}, outputs, metrics}` — 存储于 `.sprint-state/sprint-state.json`
502
+ **Sprint State JSON**: `{id, phase, status, phase_history[], isolation {worktree_path, branch}, outputs, metrics}` — 存储于 `.sprint-state/sprint-state.json`
451
503
 
452
504
  **Final User-Facing Output**: Phase/status, file paths, validation results, next user decision, PR URL or cleanup report
453
505
 
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-19
4
- **Commit:** b67f7f9
3
+ **Generated:** 2026-06-22
4
+ **Commit:** 984d568
5
5
  **Branch:** main
6
- **Version:** 0.9.4.0
6
+ **Version:** 0.10.0.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.