@boyingliu01/xp-gate 0.14.8 → 0.14.10

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 (50) hide show
  1. package/bin/xp-gate.js +23 -2
  2. package/lib/__tests__/install-skill.test.js +2 -1
  3. package/lib/__tests__/sprint-discovery.test.ts +6 -4
  4. package/lib/__tests__/sprint-state-manager.test.js +279 -0
  5. package/lib/__tests__/sprint-status.test.js +10 -13
  6. package/lib/__tests__/sprint-status.test.ts +4 -3
  7. package/lib/__tests__/update-hooks.test.js +12 -0
  8. package/lib/__tests__/upgrade-skill-sync.test.js +65 -0
  9. package/lib/check.js +115 -20
  10. package/lib/doctor.js +63 -0
  11. package/lib/gate-runner.js +209 -0
  12. package/lib/install-skill.js +14 -1
  13. package/lib/next-sprint.js +3 -4
  14. package/lib/shared-utils.js +1 -1
  15. package/lib/sprint-discovery.js +4 -4
  16. package/lib/sprint-state-manager.js +122 -0
  17. package/lib/sprint-state-migrator.js +153 -0
  18. package/lib/sprint-status.js +7 -5
  19. package/lib/update-hooks.js +1 -1
  20. package/lib/upgrade.js +8 -0
  21. package/mock-policy/AGENTS.md +4 -4
  22. package/mutation/AGENTS.md +4 -4
  23. package/mutation/__tests__/init-baseline.test.ts +347 -0
  24. package/mutation/__tests__/mutmut-runner.test.ts +561 -0
  25. package/mutation/__tests__/runners-index.test.ts +134 -0
  26. package/mutation/__tests__/stryker-runner.test.ts +455 -0
  27. package/mutation/__tests__/update-baseline.test.ts +393 -0
  28. package/package.json +1 -1
  29. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  30. package/plugins/claude-code/skills/delphi-review/AGENTS.md +4 -4
  31. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +4 -4
  32. package/plugins/claude-code/skills/sprint-flow/SKILL.md +1 -1
  33. package/plugins/claude-code/skills/sprint-flow/references/phase-2-design.md +34 -8
  34. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +4 -4
  35. package/plugins/opencode/package.json +1 -1
  36. package/plugins/opencode/skills/delphi-review/AGENTS.md +4 -4
  37. package/plugins/opencode/skills/sprint-flow/AGENTS.md +4 -4
  38. package/plugins/opencode/skills/sprint-flow/SKILL.md +1 -1
  39. package/plugins/opencode/skills/sprint-flow/references/phase-2-design.md +34 -8
  40. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +4 -4
  41. package/plugins/qoder/plugin.json +1 -1
  42. package/plugins/qoder/skills/delphi-review/AGENTS.md +4 -4
  43. package/plugins/qoder/skills/sprint-flow/AGENTS.md +4 -4
  44. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +4 -4
  45. package/principles/AGENTS.md +4 -4
  46. package/skills/delphi-review/AGENTS.md +4 -4
  47. package/skills/sprint-flow/AGENTS.md +4 -4
  48. package/skills/sprint-flow/SKILL.md +1 -1
  49. package/skills/sprint-flow/references/phase-2-design.md +34 -8
  50. package/skills/test-specification-alignment/AGENTS.md +4 -4
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xp-gate",
3
- "version": "0.14.8",
3
+ "version": "0.14.10",
4
4
  "displayName": "XP-Gate",
5
5
  "description": "Extreme Programming quality gates + AI workflow skills for Qoder. 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
- **Generated:** 2026-07-13
4
- **Commit:** d83bb96
5
- **Branch:** main
6
- **Version:** 0.14.8.0
3
+ **Generated:** 2026-07-16
4
+ **Commit:** 6193b64
5
+ **Branch:** sprint/2026-07-14-01
6
+ **Version:** 0.14.10.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-07-13
4
- **Commit:** d83bb96
5
- **Branch:** main
6
- **Version:** 0.14.8.0
3
+ **Generated:** 2026-07-16
4
+ **Commit:** 6193b64
5
+ **Branch:** sprint/2026-07-14-01
6
+ **Version:** 0.14.10.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): 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-07-13
4
- **Commit:** d83bb96
5
- **Branch:** main
6
- **Version:** 0.14.8.0
3
+ **Generated:** 2026-07-16
4
+ **Commit:** 6193b64
5
+ **Branch:** sprint/2026-07-14-01
6
+ **Version:** 0.14.10.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-07-13
4
- **Commit:** d83bb96
5
- **Branch:** main
6
- **Version:** 0.14.8.0
3
+ **Generated:** 2026-07-16
4
+ **Commit:** 6193b64
5
+ **Branch:** sprint/2026-07-14-01
6
+ **Version:** 0.14.10.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-07-13
4
- **Commit:** d83bb96
5
- **Branch:** main
6
- **Version:** 0.14.8.0
3
+ **Generated:** 2026-07-16
4
+ **Commit:** 6193b64
5
+ **Branch:** sprint/2026-07-14-01
6
+ **Version:** 0.14.10.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-07-13
4
- **Commit:** d83bb96
5
- **Branch:** main
6
- **Version:** 0.14.8.0
3
+ **Generated:** 2026-07-16
4
+ **Commit:** 6193b64
5
+ **Branch:** sprint/2026-07-14-01
6
+ **Version:** 0.14.10.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
@@ -167,7 +167,7 @@ PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE
167
167
  | Phase | Name | Key Actions | Output |
168
168
  |-------|------|-------------|--------|
169
169
  | 1/6 | PREP | Detect protected branch → Create git worktree → AUTO-ESTIMATE sizing → Classify (lightweight/standard/complex) | Worktree path + impact assessment |
170
- | 2/6 | DESIGN | brainstorming → autoplan → delphi-review (HARD-GATE ≥90% consensus) → to-issues → specification.yaml | specification.yaml + slices-manifest.json |
170
+ | 2/6 | DESIGN | CONTEXT.md 预检 (#322) → brainstorming (如需要) → autoplan → delphi-review (HARD-GATE ≥90% consensus) → to-issues → specification.yaml | specification.yaml + slices-manifest.json |
171
171
  | 3/6 | BUILD | GITHOOKS-GATE → DELPHI-GATE → ralph-loop (default) or parallel → TDD → freeze → blind review → verification | MVP code |
172
172
  | 4/6 | VERIFY | delphi-review --mode code-walkthrough → test-specification-alignment → browse QA → learn + retro | Review report + feedback-log.md |
173
173
  | 5/6 | SHIP | VERSION-GATE → finishing-a-development-branch → ship (create PR) → land-and-deploy → merge to main + CI + canary | PR URL + deploy status + merge confirmation |
@@ -11,6 +11,27 @@
11
11
 
12
12
  ## Part A: THINK(需求探索与设计)
13
13
 
14
+ ### Step 0: CONTEXT.md 预检(v0.14.9+ — Issue #322)
15
+
16
+ 在进入 brainstorming 前,检查 `CONTEXT.md` 是否已存在:
17
+
18
+ ```
19
+ IF CONTEXT.md 存在于项目根目录:
20
+ → 读取已有设计上下文
21
+ → SKIP brainstorming(设计已存在,避免重复探索)
22
+ → 直接进入 Part B PLAN(使用已有 CONTEXT.md 和设计文档作为输入)
23
+ → 输出: "[sprint-flow] CONTEXT.md 已存在,跳过需求探索,直接进入共识评审"
24
+ ELSE:
25
+ → 继续执行 Step 1(结构化需求探索)
26
+ ```
27
+
28
+ **CONTEXT.md 预检路由表**:
29
+
30
+ | CONTEXT.md 状态 | brainstorming | 输入到 Part B | 说明 |
31
+ |----------------|---------------|---------------|------|
32
+ | 不存在 | ✅ 执行 | brainstorming 输出 + autoplan 输出 | 标准路径 |
33
+ | 存在 | ❌ SKIP | 已有 CONTEXT.md + 设计文档 | 快速路径 (Issue #322) |
34
+
14
35
  ### 调用 Skills
15
36
 
16
37
  - `brainstorming` (superpowers) — **HARD-GATE**: 设计未批准 → 不可进入实现
@@ -102,14 +123,18 @@ skill(name="brainstorming", user_message="[需求描述]")
102
123
  skill(name="design-shotgun", user_message="[Pain Document 内容 + 需求描述]")
103
124
  ```
104
125
 
105
- #### Step 0.5: DESIGN 路由分叉(v0.14.0+ — Issue #306)
126
+ #### Step 0.5: DESIGN 路由分叉(v0.14.0+ — Issue #306, #322)
106
127
 
107
- 根据 Phase 1/6 PREP (AUTO-ESTIMATE) 的 `change_type` 决定走哪条路径:
128
+ 根据 Phase 1/6 PREP (AUTO-ESTIMATE) 的 `change_type` 以及 Part A 的 CONTEXT.md 预检结果,决定走哪条路径:
108
129
 
109
130
  ```
110
131
  读取 .sprint-state/sprint-state.json → auto_estimate.change_type
132
+ 读取 CONTEXT.md 存在状态
111
133
 
112
- IF change_type == "修改已存在代码":
134
+ IF CONTEXT.md 存在(Part A Step 0 预检结果):
135
+ → 快速路径: SKIP brainstorming, 使用已有 CONTEXT.md + 设计文档
136
+ → 直接进入 autoplan (标准) 或 delphi-review (增量)
137
+ ELSE IF change_type == "修改已存在代码":
113
138
  → 增量优化路径: SKIP autoplan
114
139
  → 直接进入 Step 2b: delphi-review (lightweight: 2 专家, 1 轮)
115
140
  ELSE (change_type == "新增功能" 或 未定义):
@@ -118,11 +143,12 @@ ELSE (change_type == "新增功能" 或 未定义):
118
143
 
119
144
  **路由决策表**:
120
145
 
121
- | change_type | 路径 | autoplan | delphi-review |
122
- |------------|------|----------|---------------|
123
- | `修改已存在代码` | 增量优化 | ❌ SKIP | lightweight (2 专家, 1 轮) |
124
- | `新增功能` | 标准 | ✅ 执行 | 标准 (3 专家) |
125
- | `undefined` / 缺失 | 标准 (fail-safe) | ✅ 执行 | 标准 (3 专家) |
146
+ | CONTEXT.md | change_type | brainstorming | autoplan | delphi-review |
147
+ |-----------|------------|---------------|----------|---------------|
148
+ | 存在 | 任意 | ❌ SKIP | ✅ 执行 (标准) | 标准 (3 专家) |
149
+ | 不存在 | `修改已存在代码` | ✅ 执行 | ❌ SKIP | lightweight (2 专家, 1 轮) |
150
+ | 不存在 | `新增功能` | ✅ 执行 | ✅ 执行 | 标准 (3 专家) |
151
+ | 不存在 | `undefined` / 缺失 | ✅ 执行 | ✅ 执行 | 标准 (3 专家) |
126
152
 
127
153
  **HARD-GATE 不变**: 两条路径最终都必须产出 APPROVED 的 delphi-reviewed.json。
128
154
 
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-07-13
4
- **Commit:** d83bb96
5
- **Branch:** main
6
- **Version:** 0.14.8.0
3
+ **Generated:** 2026-07-16
4
+ **Commit:** 6193b64
5
+ **Branch:** sprint/2026-07-14-01
6
+ **Version:** 0.14.10.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.