@boyingliu01/xp-gate 0.8.20 → 0.9.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.
@@ -214,17 +214,17 @@ describe('check-version.js — REQ-001-01', () => {
214
214
 
215
215
  it('returns safe defaults (outdated:false) without network', async () => {
216
216
  // Mock https to return the SAME version as local → outdated=false, no network dependency
217
- const result = await withMockedHttps('0.8.18', async (m) => m.checkUpgrade('@nonexistent/pkg-test-only'));
217
+ const result = await withMockedHttps('0.8.21', async (m) => m.checkUpgrade('@nonexistent/pkg-test-only'));
218
218
  expect(result.outdated).toBe(false);
219
- expect(result.local).toBe('0.8.18');
220
- expect(result.remote).toBe('0.8.18');
219
+ expect(result.local).toBe('0.8.21');
220
+ expect(result.remote).toBe('0.8.21');
221
221
  expect(result.lagDays).toBe(0);
222
222
  });
223
223
 
224
224
  it('returns outdated=true when remote > local', async () => {
225
225
  const result = await withMockedHttps('99.99.99', async (m) => m.checkUpgrade('@nonexistent/pkg-test-only'));
226
226
  expect(result.outdated).toBe(true);
227
- expect(result.local).toBe('0.8.18');
227
+ expect(result.local).toBe('0.8.21');
228
228
  expect(result.remote).toBe('99.99.99');
229
229
  });
230
230
  });
@@ -1,9 +1,9 @@
1
1
  # SRC/MOCK-POLICY KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.0.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.
@@ -1,9 +1,9 @@
1
1
  # SRC/MUTATION KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.0.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.8.20",
3
+ "version": "0.9.0",
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"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xp-gate",
3
- "version": "0.8.20",
3
+ "version": "0.9.0",
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
- **Generated:** 2026-06-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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.
@@ -479,6 +479,7 @@ REQ-001 开始 → 检查 test-utils.ts → 不存在
479
479
  - [ ] Test/implementation ratio ≥ 40% (L1b check: test_lines / total_lines ≥ 40%)
480
480
  - [ ] Mock usage justified (if >30% mock density)
481
481
  - [ ] Test files present in changeset (L1b-alt fallback)
482
+ - [ ] **TDD 合规检查**: 验证 test-first 原则(新增源文件必须有对应测试文件,或添加 `@no-test-required` 注解)
482
483
 
483
484
  **Verification Layers**:
484
485
  - [ ] L1: typecheck + lint pass
@@ -493,7 +494,7 @@ REQ-001 开始 → 检查 test-utils.ts → 不存在
493
494
 
494
495
  **State Updated**:
495
496
  - [ ] AGENTS.md updated (orchestrator)
496
- - [ ] progress.log atomically written
497
+ - [ ] progress.log atomically written (includes `test_first_compliant: true/false` — whether the REQ passed test-first validation)
497
498
  - [ ] Git commit created (if PASS)
498
499
 
499
500
  **Next Step**: [REQ-YYY title / COMPLETE / BLOCKED]
@@ -1,9 +1,9 @@
1
1
  # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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.
@@ -7,3 +7,37 @@
7
7
  **关键链路**: DELPHI-GATE → parallel-dispatch/ralph-loop → TDD → freeze → blind-review → unfreeze → verification → cost monitor
8
8
 
9
9
  **输出**: MVP v1
10
+
11
+ ---
12
+
13
+ ## Gate 参考表(Phase 2 相关)
14
+
15
+ | Gate | 名称 | 行为 |
16
+ |------|------|------|
17
+ | Gate 5 | 单元测试 + 覆盖率 | 全部通过 + ≥80% 覆盖率 |
18
+ | Gate 5a-BLOCK | 新增 .ts/.tsx 文件测试强制 | 新增 .ts/.tsx 文件无对应测试文件 → BLOCK;修改文件 → WARNING |
19
+ | Gate M2 | Mock 密度检查 | 30% WARNING (Phase 1); 可配置 via `.mockpolicyrc` |
20
+
21
+ ---
22
+
23
+ ## TDD 强制执行
24
+
25
+ ### Gate 5a-BLOCK: 新增文件测试强制
26
+
27
+ - **新增 `.ts/.tsx` 文件**必须有对应的测试文件(`*.test.ts`、`*.spec.ts`、`__tests__/` 目录),否则 **BLOCK** 提交
28
+ - **修改已有文件**仅触发 WARNING(不阻断)
29
+ - **Escape valve**: 非 main/master 分支可设置 `SKIP_GATE_5A_BLOCK=1` 跳过阻断(仅 WARNING)
30
+
31
+ ### Gate M2: Mock 密度阈值调整
32
+
33
+ - Mock 密度阈值从 50% 降低至 **30%**
34
+ - **Phase 1**: WARNING 模式(仅告警,不阻断)
35
+ - **Phase 2**: 将在基线分析后启用 BLOCK 模式
36
+ - 可通过 `.mockpolicyrc` 配置阈值和行为
37
+
38
+ ### Escape Valve
39
+
40
+ ```bash
41
+ # 非 main/master 分支临时跳过 Gate 5a-BLOCK
42
+ SKIP_GATE_5A_BLOCK=1 git commit -m "message"
43
+ ```
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/opencode-plugin",
3
- "version": "0.8.20",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "description": "XP-Gate quality gates + AI workflow skills for OpenCode",
@@ -1,9 +1,9 @@
1
1
  # SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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.
@@ -479,6 +479,7 @@ REQ-001 开始 → 检查 test-utils.ts → 不存在
479
479
  - [ ] Test/implementation ratio ≥ 40% (L1b check: test_lines / total_lines ≥ 40%)
480
480
  - [ ] Mock usage justified (if >30% mock density)
481
481
  - [ ] Test files present in changeset (L1b-alt fallback)
482
+ - [ ] **TDD 合规检查**: 验证 test-first 原则(新增源文件必须有对应测试文件,或添加 `@no-test-required` 注解)
482
483
 
483
484
  **Verification Layers**:
484
485
  - [ ] L1: typecheck + lint pass
@@ -493,7 +494,7 @@ REQ-001 开始 → 检查 test-utils.ts → 不存在
493
494
 
494
495
  **State Updated**:
495
496
  - [ ] AGENTS.md updated (orchestrator)
496
- - [ ] progress.log atomically written
497
+ - [ ] progress.log atomically written (includes `test_first_compliant: true/false` — whether the REQ passed test-first validation)
497
498
  - [ ] Git commit created (if PASS)
498
499
 
499
500
  **Next Step**: [REQ-YYY title / COMPLETE / BLOCKED]
@@ -1,9 +1,9 @@
1
1
  # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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.
@@ -7,3 +7,37 @@
7
7
  **关键链路**: DELPHI-GATE → parallel-dispatch/ralph-loop → TDD → freeze → blind-review → unfreeze → verification → cost monitor
8
8
 
9
9
  **输出**: MVP v1
10
+
11
+ ---
12
+
13
+ ## Gate 参考表(Phase 2 相关)
14
+
15
+ | Gate | 名称 | 行为 |
16
+ |------|------|------|
17
+ | Gate 5 | 单元测试 + 覆盖率 | 全部通过 + ≥80% 覆盖率 |
18
+ | Gate 5a-BLOCK | 新增 .ts/.tsx 文件测试强制 | 新增 .ts/.tsx 文件无对应测试文件 → BLOCK;修改文件 → WARNING |
19
+ | Gate M2 | Mock 密度检查 | 30% WARNING (Phase 1); 可配置 via `.mockpolicyrc` |
20
+
21
+ ---
22
+
23
+ ## TDD 强制执行
24
+
25
+ ### Gate 5a-BLOCK: 新增文件测试强制
26
+
27
+ - **新增 `.ts/.tsx` 文件**必须有对应的测试文件(`*.test.ts`、`*.spec.ts`、`__tests__/` 目录),否则 **BLOCK** 提交
28
+ - **修改已有文件**仅触发 WARNING(不阻断)
29
+ - **Escape valve**: 非 main/master 分支可设置 `SKIP_GATE_5A_BLOCK=1` 跳过阻断(仅 WARNING)
30
+
31
+ ### Gate M2: Mock 密度阈值调整
32
+
33
+ - Mock 密度阈值从 50% 降低至 **30%**
34
+ - **Phase 1**: WARNING 模式(仅告警,不阻断)
35
+ - **Phase 2**: 将在基线分析后启用 BLOCK 模式
36
+ - 可通过 `.mockpolicyrc` 配置阈值和行为
37
+
38
+ ### Escape Valve
39
+
40
+ ```bash
41
+ # 非 main/master 分支临时跳过 Gate 5a-BLOCK
42
+ SKIP_GATE_5A_BLOCK=1 git commit -m "message"
43
+ ```
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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
  # SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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.
@@ -479,6 +479,7 @@ REQ-001 开始 → 检查 test-utils.ts → 不存在
479
479
  - [ ] Test/implementation ratio ≥ 40% (L1b check: test_lines / total_lines ≥ 40%)
480
480
  - [ ] Mock usage justified (if >30% mock density)
481
481
  - [ ] Test files present in changeset (L1b-alt fallback)
482
+ - [ ] **TDD 合规检查**: 验证 test-first 原则(新增源文件必须有对应测试文件,或添加 `@no-test-required` 注解)
482
483
 
483
484
  **Verification Layers**:
484
485
  - [ ] L1: typecheck + lint pass
@@ -493,7 +494,7 @@ REQ-001 开始 → 检查 test-utils.ts → 不存在
493
494
 
494
495
  **State Updated**:
495
496
  - [ ] AGENTS.md updated (orchestrator)
496
- - [ ] progress.log atomically written
497
+ - [ ] progress.log atomically written (includes `test_first_compliant: true/false` — whether the REQ passed test-first validation)
497
498
  - [ ] Git commit created (if PASS)
498
499
 
499
500
  **Next Step**: [REQ-YYY title / COMPLETE / BLOCKED]
@@ -1,9 +1,9 @@
1
1
  # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.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.
@@ -7,3 +7,37 @@
7
7
  **关键链路**: DELPHI-GATE → parallel-dispatch/ralph-loop → TDD → freeze → blind-review → unfreeze → verification → cost monitor
8
8
 
9
9
  **输出**: MVP v1
10
+
11
+ ---
12
+
13
+ ## Gate 参考表(Phase 2 相关)
14
+
15
+ | Gate | 名称 | 行为 |
16
+ |------|------|------|
17
+ | Gate 5 | 单元测试 + 覆盖率 | 全部通过 + ≥80% 覆盖率 |
18
+ | Gate 5a-BLOCK | 新增 .ts/.tsx 文件测试强制 | 新增 .ts/.tsx 文件无对应测试文件 → BLOCK;修改文件 → WARNING |
19
+ | Gate M2 | Mock 密度检查 | 30% WARNING (Phase 1); 可配置 via `.mockpolicyrc` |
20
+
21
+ ---
22
+
23
+ ## TDD 强制执行
24
+
25
+ ### Gate 5a-BLOCK: 新增文件测试强制
26
+
27
+ - **新增 `.ts/.tsx` 文件**必须有对应的测试文件(`*.test.ts`、`*.spec.ts`、`__tests__/` 目录),否则 **BLOCK** 提交
28
+ - **修改已有文件**仅触发 WARNING(不阻断)
29
+ - **Escape valve**: 非 main/master 分支可设置 `SKIP_GATE_5A_BLOCK=1` 跳过阻断(仅 WARNING)
30
+
31
+ ### Gate M2: Mock 密度阈值调整
32
+
33
+ - Mock 密度阈值从 50% 降低至 **30%**
34
+ - **Phase 1**: WARNING 模式(仅告警,不阻断)
35
+ - **Phase 2**: 将在基线分析后启用 BLOCK 模式
36
+ - 可通过 `.mockpolicyrc` 配置阈值和行为
37
+
38
+ ### Escape Valve
39
+
40
+ ```bash
41
+ # 非 main/master 分支临时跳过 Gate 5a-BLOCK
42
+ SKIP_GATE_5A_BLOCK=1 git commit -m "message"
43
+ ```
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-17
4
- **Commit:** a697146
3
+ **Generated:** 2026-06-18
4
+ **Commit:** 5ee2fa4
5
5
  **Branch:** main
6
- **Version:** 0.8.20.0
6
+ **Version:** 0.9.0.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.