@boyingliu01/xp-gate 0.36.1 → 0.37.1

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 (123) hide show
  1. package/adapters/cpp.sh +78 -10
  2. package/adapters/csharp.sh +58 -3
  3. package/adapters/gate-3.sh +15 -5
  4. package/adapters/gate-8.sh +131 -9
  5. package/adapters/typescript.sh +32 -8
  6. package/build-integrity/__tests__/import-resolver.test.ts +257 -0
  7. package/build-integrity/__tests__/quote-masker.test.ts +177 -0
  8. package/build-integrity/gate-10.ts +127 -9
  9. package/build-integrity/quote-masker.ts +266 -0
  10. package/gate-10.sh +66 -0
  11. package/gate-12-file-hygiene.sh +15 -7
  12. package/gate-13-compiler-strictness.sh +81 -1
  13. package/gate-3.sh +15 -5
  14. package/gate-6-layers.sh +375 -0
  15. package/gate-8.sh +131 -9
  16. package/hooks/gate-10.sh +66 -0
  17. package/hooks/gate-12-file-hygiene.sh +15 -7
  18. package/hooks/gate-13-compiler-strictness.sh +81 -1
  19. package/hooks/gate-3.sh +15 -5
  20. package/hooks/gate-6-layers.sh +375 -0
  21. package/hooks/gate-8.sh +131 -9
  22. package/hooks/gate-registry.sh +2 -2
  23. package/hooks/hook-module-resolution.sh +1 -1
  24. package/hooks/lib/assertion-quality.sh +8 -2
  25. package/hooks/lib/ccn-ratchet.sh +10 -0
  26. package/hooks/lib/layer-baseline.cjs +88 -0
  27. package/hooks/lib/typecheck.sh +28 -5
  28. package/hooks/pre-commit +376 -53
  29. package/hooks/pre-push +46 -13
  30. package/lib/__tests__/agent-runtime-journal.test.js +1 -1
  31. package/lib/__tests__/arch.test.js +9 -0
  32. package/lib/__tests__/audit-cli-contract.test.ts +1 -1
  33. package/lib/__tests__/check-alignment-reasons.test.mjs +11 -1
  34. package/lib/__tests__/check-all-skip-accounting.test.js +1 -1
  35. package/lib/__tests__/detect-deps-gate-identity.test.js +135 -0
  36. package/lib/__tests__/detect-deps.test.js +2 -1
  37. package/lib/__tests__/doctor-469-hook-env.test.js +7 -1
  38. package/lib/__tests__/doctor-arch-tools.test.js +169 -0
  39. package/lib/__tests__/doctor-delphi.test.js +1 -1
  40. package/lib/__tests__/doctor-drift-round2.test.js +4 -1
  41. package/lib/__tests__/doctor-executed-surface.test.js +45 -24
  42. package/lib/__tests__/doctor-module-drift.test.js +13 -7
  43. package/lib/__tests__/doctor-module-resolution-parity.test.js +74 -2
  44. package/lib/__tests__/doctor-tui-skill-freshness.test.js +21 -6
  45. package/lib/__tests__/doctor.test.js +17 -0
  46. package/lib/__tests__/gate-runner-tsx-invocation.test.js +149 -0
  47. package/lib/__tests__/gate-runner.test.js +23 -7
  48. package/lib/__tests__/init-gitignore.test.js +204 -0
  49. package/lib/__tests__/init.test.js +24 -3
  50. package/lib/__tests__/language-tools-build-file-install.test.js +82 -0
  51. package/lib/__tests__/language-tools-detect.test.js +61 -0
  52. package/lib/__tests__/mirror-sync.test.js +2 -0
  53. package/lib/__tests__/phase-transition.test.js +19 -1
  54. package/lib/__tests__/sprint-status-rework.test.js +32 -12
  55. package/lib/__tests__/test-alignment-range-guard.test.ts +82 -0
  56. package/lib/__tests__/test-alignment.test.ts +13 -3
  57. package/lib/__tests__/update-skill.test.js +2 -2
  58. package/lib/detect-deps.js +7 -1
  59. package/lib/doctor.js +81 -17
  60. package/lib/gate-runner.js +101 -7
  61. package/lib/hook-module-resolution.js +18 -6
  62. package/lib/init.js +136 -1
  63. package/lib/language-tools.js +217 -1
  64. package/lib/layer-baseline.cjs +88 -0
  65. package/lib/mattpocock-license-verdict.json +1 -1
  66. package/lib/principles.js +21 -6
  67. package/lib/test-alignment.ts +452 -55
  68. package/mock-policy/AGENTS.md +1 -1
  69. package/mutation/AGENTS.md +1 -1
  70. package/package.json +2 -1
  71. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  72. package/plugins/claude-code/skills/delphi-review/.delphi-config.json.example +34 -24
  73. package/plugins/claude-code/skills/delphi-review/AGENTS.md +1 -1
  74. package/plugins/claude-code/skills/delphi-review/INSTALL.md +29 -1
  75. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +1 -1
  76. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +1 -1
  77. package/plugins/dsh/package.json +1 -1
  78. package/plugins/dsh/skills/delphi-review/.delphi-config.json.example +34 -24
  79. package/plugins/dsh/skills/delphi-review/AGENTS.md +1 -1
  80. package/plugins/dsh/skills/delphi-review/INSTALL.md +29 -1
  81. package/plugins/dsh/skills/sprint-flow/AGENTS.md +1 -1
  82. package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +1 -1
  83. package/plugins/dsh/src/client.test.ts +1 -1
  84. package/plugins/dsh/src/command.test.ts +1 -1
  85. package/plugins/dsh/src/contract.test.ts +1 -1
  86. package/plugins/dsh/src/credentials.test.ts +1 -1
  87. package/plugins/opencode/package.json +1 -1
  88. package/plugins/opencode/skills/delphi-review/.delphi-config.json.example +34 -24
  89. package/plugins/opencode/skills/delphi-review/AGENTS.md +1 -1
  90. package/plugins/opencode/skills/delphi-review/INSTALL.md +29 -1
  91. package/plugins/opencode/skills/sprint-flow/AGENTS.md +1 -1
  92. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +1 -1
  93. package/plugins/qoder/plugin.json +1 -1
  94. package/plugins/qoder/skills/delphi-review/.delphi-config.json.example +34 -24
  95. package/plugins/qoder/skills/delphi-review/AGENTS.md +1 -1
  96. package/plugins/qoder/skills/delphi-review/INSTALL.md +29 -1
  97. package/plugins/qoder/skills/sprint-flow/AGENTS.md +1 -1
  98. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +1 -1
  99. package/principles/AGENTS.md +1 -1
  100. package/principles/__tests__/config-arch-group.test.ts +106 -0
  101. package/principles/__tests__/config-enforcement.test.ts +1 -1
  102. package/principles/adapters/control-nesting.ts +572 -0
  103. package/principles/adapters/csharp.ts +73 -42
  104. package/principles/adapters/java.ts +9 -5
  105. package/principles/adapters/typescript.ts +138 -176
  106. package/principles/config.ts +37 -2
  107. package/principles/index.ts +57 -4
  108. package/principles/reporter.ts +99 -65
  109. package/principles/rules/arch/__tests__/dependency.test.ts +180 -0
  110. package/principles/rules/arch/__tests__/naming.test.ts +133 -0
  111. package/principles/rules/arch/__tests__/shared.test.ts +113 -0
  112. package/principles/rules/arch/dependency.ts +264 -0
  113. package/principles/rules/arch/naming.ts +188 -0
  114. package/principles/rules/arch/shared.ts +169 -0
  115. package/principles/rules/exports.ts +26 -0
  116. package/principles/rules/index.ts +11 -18
  117. package/scripts/__tests__/sync-package-content.test.js +23 -1
  118. package/scripts/sync-package-content.js +8 -2
  119. package/skills/delphi-review/.delphi-config.json.example +34 -24
  120. package/skills/delphi-review/AGENTS.md +1 -1
  121. package/skills/delphi-review/INSTALL.md +29 -1
  122. package/skills/sprint-flow/AGENTS.md +1 -1
  123. package/skills/test-specification-alignment/AGENTS.md +1 -1
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.36.1.0
6
+ **Version:** 0.37.1.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.36.1",
3
+ "version": "0.37.1",
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"
@@ -22,6 +22,7 @@
22
22
  "scripts/",
23
23
  "gate-3.sh",
24
24
  "gate-4.sh",
25
+ "gate-6-layers.sh",
25
26
  "gate-7.sh",
26
27
  "gate-8.sh",
27
28
  "gate-9.sh",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xp-gate",
3
- "version": "0.36.1",
3
+ "version": "0.37.1",
4
4
  "displayName": "XP-Gate",
5
5
  "description": "Extreme Programming quality gates + AI workflow skills for Claude Code. Includes 12 pre-commit gates (Gate 0-11), 8 pre-push gates, Sprint Flow (6 phases), and Delphi multi-expert review (>=90% consensus).",
6
6
  "author": {
@@ -2,10 +2,20 @@
2
2
  "$comment": [
3
3
  "Delphi Review Configuration Template",
4
4
  "======================================",
5
- "Copy this file to .delphi-config.json and fill in your API keys.",
5
+ "Copy this file to .delphi-config.json and fill in your API key.",
6
6
  "Place this file alongside SKILL.md in the delphi-review skill directory.",
7
7
  "Exactly three roles are required, with distinct trimmed executable model IDs.",
8
8
  "",
9
+ "The default profile routes all three seats through one WhaleCloud gateway so a",
10
+ "single token plan covers the review. The three ids are deliberately different",
11
+ "FLASH-tier models (cheap, fast, and good enough for review):",
12
+ " architecture -> s-deepseek-v4.1-flash",
13
+ " technical -> s-glm-5.3-flash",
14
+ " feasibility -> g-ling-3.1-flash",
15
+ "Check that the seat ids resolve to three DISTINCT backend models on your",
16
+ "gateway -- two different ids can be aliased to the same backend, which defeats",
17
+ "the multi-model invariant while still looking correct in the config.",
18
+ "",
9
19
  "Provider and vendor are unrestricted. provider=local is a fallback and cannot count as a successful expert execution.",
10
20
  "cross_provider_required is deprecated and ignored with warning code cross_provider_required_ignored."
11
21
  ],
@@ -15,23 +25,23 @@
15
25
  "profiles": {
16
26
  "default": {
17
27
  "providers": {
18
- "bailian-tp": {
19
- "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
20
- "api_key": "YOUR_API_KEY"
28
+ "whalecloud": {
29
+ "base_url": "https://lab.iwhalecloud.com/gpt-proxy",
30
+ "api_key": "${WHALECLOUD_API_KEY}"
21
31
  }
22
32
  },
23
33
  "experts": {
24
34
  "architecture": {
25
- "provider": "bailian-tp",
26
- "model": "qwen-plus"
35
+ "provider": "whalecloud",
36
+ "model": "s-deepseek-v4.1-flash"
27
37
  },
28
38
  "technical": {
29
- "provider": "bailian-tp",
30
- "model": "deepseek-v3"
39
+ "provider": "whalecloud",
40
+ "model": "s-glm-5.3-flash"
31
41
  },
32
42
  "feasibility": {
33
- "provider": "bailian-tp",
34
- "model": "glm-4.5"
43
+ "provider": "whalecloud",
44
+ "model": "g-ling-3.1-flash"
35
45
  }
36
46
  }
37
47
  },
@@ -39,23 +49,23 @@
39
49
  "starter": {
40
50
  "$comment": "One provider and token plan serving three distinct models",
41
51
  "providers": {
42
- "bailian-tp": {
43
- "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
44
- "api_key": "YOUR_API_KEY"
52
+ "whalecloud": {
53
+ "base_url": "https://lab.iwhalecloud.com/gpt-proxy",
54
+ "api_key": "${WHALECLOUD_API_KEY}"
45
55
  }
46
56
  },
47
57
  "experts": {
48
58
  "architecture": {
49
- "provider": "bailian-tp",
50
- "model": "qwen-plus"
59
+ "provider": "whalecloud",
60
+ "model": "s-deepseek-v4.1-flash"
51
61
  },
52
62
  "technical": {
53
- "provider": "bailian-tp",
54
- "model": "deepseek-v3"
63
+ "provider": "whalecloud",
64
+ "model": "s-glm-5.3-flash"
55
65
  },
56
66
  "feasibility": {
57
- "provider": "bailian-tp",
58
- "model": "glm-4.5"
67
+ "provider": "whalecloud",
68
+ "model": "g-ling-3.1-flash"
59
69
  }
60
70
  }
61
71
  }
@@ -77,14 +87,14 @@
77
87
  "model or gateway changes. See docs/plans/2026-10-14-sprint-c-design.md section 2.",
78
88
  "Example expert entry:",
79
89
  " \"architecture\": {",
80
- " \"provider\": \"bailian-tp\",",
81
- " \"model\": \"qwen-plus\",",
90
+ " \"provider\": \"whalecloud\",",
91
+ " \"model\": \"s-deepseek-v4.1-flash\",",
82
92
  " \"seat_id\": \"architecture\",",
83
93
  " \"max_prompt_bytes\": 26624,",
84
94
  " \"prompt_calibration\": {",
85
- " \"measured_at\": \"2026-10-05\",",
86
- " \"model_id\": \"qwen-plus\",",
87
- " \"gateway\": \"bailian\",",
95
+ " \"measured_at\": \"2026-11-04\",",
96
+ " \"model_id\": \"s-deepseek-v4.1-flash\",",
97
+ " \"gateway\": \"whalecloud\",",
88
98
  " \"last_pass_bytes\": 26624,",
89
99
  " \"last_fail_bytes\": 36897",
90
100
  " }",
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.36.1.0
6
+ **Version:** 0.37.1.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
@@ -32,10 +32,38 @@ Then replace the provider/model placeholders:
32
32
  "model": "YOUR_PROVIDER/YOUR_MODEL_A"
33
33
 
34
34
  // After (your config):
35
- "model": "bailian-tp/qwen-plus"
35
+ "model": "whalecloud/s-deepseek-v4.1-flash"
36
36
  // The other two role model fields must be different trimmed IDs.
37
37
  ```
38
38
 
39
+ The shipped `.delphi-config.json.example` defaults to three cheap FLASH-tier
40
+ models on one WhaleCloud gateway, which is what most setups want:
41
+
42
+ | seat | model | purpose |
43
+ |------|-------|---------|
44
+ | architecture | `s-deepseek-v4.1-flash` | structure, boundaries, coupling |
45
+ | technical | `s-glm-5.3-flash` | correctness, implementation risk |
46
+ | feasibility | `g-ling-3.1-flash` | cost, schedule, operability |
47
+
48
+ Before trusting a profile, confirm the three ids resolve to three **distinct
49
+ backend** models on your gateway. Gateway aliases can map two different ids to
50
+ the same backend, which satisfies the "distinct ids" check while actually
51
+ running one model twice:
52
+
53
+ ```bash
54
+ # prints the backend each id really reached
55
+ for m in s-deepseek-v4.1-flash s-glm-5.3-flash g-ling-3.1-flash; do
56
+ curl -s https://YOUR_GATEWAY/v1/chat/completions \
57
+ -H "Authorization: Bearer $WHALECLOUD_API_KEY" -H 'Content-Type: application/json' \
58
+ -d "{\"model\":\"$m\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"max_tokens\":5}" \
59
+ | python -c 'import sys,json; print(json.load(sys.stdin).get("model"))'
60
+ done
61
+ ```
62
+
63
+ `xp-gate doctor delphi` reports the configured seats, and every expert result
64
+ records the gateway-reported `resolved_model` so a silent alias collision shows
65
+ up in the review evidence rather than passing unnoticed.
66
+
39
67
  ### Step 3: Ensure provider configuration exists
40
68
 
41
69
  Your `opencode.json` must have the provider definitions. If you're using OpenCode's built-in providers (OpenAI, Anthropic, etc.), you just need API keys set in your environment.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.36.1.0
6
+ **Version:** 0.37.1.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.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.36.1.0
6
+ **Version:** 0.37.1.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/dsh-plugin-xp-gate",
3
- "version": "0.36.1",
3
+ "version": "0.37.1",
4
4
  "description": "XP-Gate deterministic quality gates + AI workflow skills as a DeepSeek Harness (DSH) native plugin: gate-check / gate-principles / gate-arch tools + 12 SKILL.md skills",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -2,10 +2,20 @@
2
2
  "$comment": [
3
3
  "Delphi Review Configuration Template",
4
4
  "======================================",
5
- "Copy this file to .delphi-config.json and fill in your API keys.",
5
+ "Copy this file to .delphi-config.json and fill in your API key.",
6
6
  "Place this file alongside SKILL.md in the delphi-review skill directory.",
7
7
  "Exactly three roles are required, with distinct trimmed executable model IDs.",
8
8
  "",
9
+ "The default profile routes all three seats through one WhaleCloud gateway so a",
10
+ "single token plan covers the review. The three ids are deliberately different",
11
+ "FLASH-tier models (cheap, fast, and good enough for review):",
12
+ " architecture -> s-deepseek-v4.1-flash",
13
+ " technical -> s-glm-5.3-flash",
14
+ " feasibility -> g-ling-3.1-flash",
15
+ "Check that the seat ids resolve to three DISTINCT backend models on your",
16
+ "gateway -- two different ids can be aliased to the same backend, which defeats",
17
+ "the multi-model invariant while still looking correct in the config.",
18
+ "",
9
19
  "Provider and vendor are unrestricted. provider=local is a fallback and cannot count as a successful expert execution.",
10
20
  "cross_provider_required is deprecated and ignored with warning code cross_provider_required_ignored."
11
21
  ],
@@ -15,23 +25,23 @@
15
25
  "profiles": {
16
26
  "default": {
17
27
  "providers": {
18
- "bailian-tp": {
19
- "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
20
- "api_key": "YOUR_API_KEY"
28
+ "whalecloud": {
29
+ "base_url": "https://lab.iwhalecloud.com/gpt-proxy",
30
+ "api_key": "${WHALECLOUD_API_KEY}"
21
31
  }
22
32
  },
23
33
  "experts": {
24
34
  "architecture": {
25
- "provider": "bailian-tp",
26
- "model": "qwen-plus"
35
+ "provider": "whalecloud",
36
+ "model": "s-deepseek-v4.1-flash"
27
37
  },
28
38
  "technical": {
29
- "provider": "bailian-tp",
30
- "model": "deepseek-v3"
39
+ "provider": "whalecloud",
40
+ "model": "s-glm-5.3-flash"
31
41
  },
32
42
  "feasibility": {
33
- "provider": "bailian-tp",
34
- "model": "glm-4.5"
43
+ "provider": "whalecloud",
44
+ "model": "g-ling-3.1-flash"
35
45
  }
36
46
  }
37
47
  },
@@ -39,23 +49,23 @@
39
49
  "starter": {
40
50
  "$comment": "One provider and token plan serving three distinct models",
41
51
  "providers": {
42
- "bailian-tp": {
43
- "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
44
- "api_key": "YOUR_API_KEY"
52
+ "whalecloud": {
53
+ "base_url": "https://lab.iwhalecloud.com/gpt-proxy",
54
+ "api_key": "${WHALECLOUD_API_KEY}"
45
55
  }
46
56
  },
47
57
  "experts": {
48
58
  "architecture": {
49
- "provider": "bailian-tp",
50
- "model": "qwen-plus"
59
+ "provider": "whalecloud",
60
+ "model": "s-deepseek-v4.1-flash"
51
61
  },
52
62
  "technical": {
53
- "provider": "bailian-tp",
54
- "model": "deepseek-v3"
63
+ "provider": "whalecloud",
64
+ "model": "s-glm-5.3-flash"
55
65
  },
56
66
  "feasibility": {
57
- "provider": "bailian-tp",
58
- "model": "glm-4.5"
67
+ "provider": "whalecloud",
68
+ "model": "g-ling-3.1-flash"
59
69
  }
60
70
  }
61
71
  }
@@ -77,14 +87,14 @@
77
87
  "model or gateway changes. See docs/plans/2026-10-14-sprint-c-design.md section 2.",
78
88
  "Example expert entry:",
79
89
  " \"architecture\": {",
80
- " \"provider\": \"bailian-tp\",",
81
- " \"model\": \"qwen-plus\",",
90
+ " \"provider\": \"whalecloud\",",
91
+ " \"model\": \"s-deepseek-v4.1-flash\",",
82
92
  " \"seat_id\": \"architecture\",",
83
93
  " \"max_prompt_bytes\": 26624,",
84
94
  " \"prompt_calibration\": {",
85
- " \"measured_at\": \"2026-10-05\",",
86
- " \"model_id\": \"qwen-plus\",",
87
- " \"gateway\": \"bailian\",",
95
+ " \"measured_at\": \"2026-11-04\",",
96
+ " \"model_id\": \"s-deepseek-v4.1-flash\",",
97
+ " \"gateway\": \"whalecloud\",",
88
98
  " \"last_pass_bytes\": 26624,",
89
99
  " \"last_fail_bytes\": 36897",
90
100
  " }",
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.36.1.0
6
+ **Version:** 0.37.1.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
@@ -32,10 +32,38 @@ Then replace the provider/model placeholders:
32
32
  "model": "YOUR_PROVIDER/YOUR_MODEL_A"
33
33
 
34
34
  // After (your config):
35
- "model": "bailian-tp/qwen-plus"
35
+ "model": "whalecloud/s-deepseek-v4.1-flash"
36
36
  // The other two role model fields must be different trimmed IDs.
37
37
  ```
38
38
 
39
+ The shipped `.delphi-config.json.example` defaults to three cheap FLASH-tier
40
+ models on one WhaleCloud gateway, which is what most setups want:
41
+
42
+ | seat | model | purpose |
43
+ |------|-------|---------|
44
+ | architecture | `s-deepseek-v4.1-flash` | structure, boundaries, coupling |
45
+ | technical | `s-glm-5.3-flash` | correctness, implementation risk |
46
+ | feasibility | `g-ling-3.1-flash` | cost, schedule, operability |
47
+
48
+ Before trusting a profile, confirm the three ids resolve to three **distinct
49
+ backend** models on your gateway. Gateway aliases can map two different ids to
50
+ the same backend, which satisfies the "distinct ids" check while actually
51
+ running one model twice:
52
+
53
+ ```bash
54
+ # prints the backend each id really reached
55
+ for m in s-deepseek-v4.1-flash s-glm-5.3-flash g-ling-3.1-flash; do
56
+ curl -s https://YOUR_GATEWAY/v1/chat/completions \
57
+ -H "Authorization: Bearer $WHALECLOUD_API_KEY" -H 'Content-Type: application/json' \
58
+ -d "{\"model\":\"$m\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"max_tokens\":5}" \
59
+ | python -c 'import sys,json; print(json.load(sys.stdin).get("model"))'
60
+ done
61
+ ```
62
+
63
+ `xp-gate doctor delphi` reports the configured seats, and every expert result
64
+ records the gateway-reported `resolved_model` so a silent alias collision shows
65
+ up in the review evidence rather than passing unnoticed.
66
+
39
67
  ### Step 3: Ensure provider configuration exists
40
68
 
41
69
  Your `opencode.json` must have the provider definitions. If you're using OpenCode's built-in providers (OpenAI, Anthropic, etc.), you just need API keys set in your environment.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.36.1.0
6
+ **Version:** 0.37.1.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.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.36.1.0
6
+ **Version:** 0.37.1.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -5,7 +5,7 @@
5
5
  * key, and — most importantly — the settings write op format
6
6
  * `{ op: 'set', path: [...], value }`, which a shipped third-party plugin got
7
7
  * wrong (it sent `{ type, key, value }`, so every save failed silently).
8
- * @covers AC-DSH-018-01 AC-DSH-018-02 AC-DSH-018-03
8
+ * @covers AC-DSH-018
9
9
  *
10
10
  * The bundle is plain CommonJS executed by DSH's own module loader, not by Node, so
11
11
  * these tests evaluate it with a minimal `window.__ModuleLoader__` and a stub
@@ -20,7 +20,7 @@ describe("shq (POSIX single-quote escaping)", () => {
20
20
  /**
21
21
  * @test REQ-DSH-009
22
22
  * @intent 验证 shq() 对命令替换/反引号等 shell 元字符做 POSIX 单引号转义,防止命令注入
23
- * @covers AC-DSH-009-01
23
+ * @covers AC-DSH-009-01 AC-DSH-013-04
24
24
  */
25
25
  it("neutralizes shell metacharacters by quoting them literally", () => {
26
26
  const payload = "$(touch /tmp/pwned); `id`"
@@ -26,7 +26,7 @@ describe("packaging contract", () => {
26
26
  /**
27
27
  * @test REQ-DSH-001
28
28
  * @intent 验证 package.json 声明 dsh.bundle.patch 且 cordis.patch.yml 插入 id=tool-xp-gate + 包名
29
- * @covers AC-DSH-001-01
29
+ * @covers AC-DSH-001-01, AC-DSH-019
30
30
  */
31
31
  it("declares dsh.bundle.patch and a cordis patch entry", () => {
32
32
  expect(readPkg().dsh?.bundle?.patch).toBe("./cordis.patch.yml")
@@ -3,7 +3,7 @@
3
3
  * @intent Verify the plugin can obtain the Delphi API key from DSH's credential store
4
4
  * when the process environment does not carry it, and that resolution is
5
5
  * single-layer — a store miss must not silently fall back to process.env.
6
- * @covers AC-DSH-014-01 AC-DSH-014-02 AC-DSH-014-03
6
+ * @covers AC-DSH-014-01 AC-DSH-014-02 AC-DSH-014-03 AC-DSH-014-07
7
7
  *
8
8
  * Why this exists: the machine that motivated this release has WHALECLOUD_API_KEY in
9
9
  * a user-level environment variable and in ~/.dsh/.credentials.yaml, but NOT in the
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/opencode-plugin",
3
- "version": "0.36.1",
3
+ "version": "0.37.1",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "description": "XP-Gate quality gates + AI workflow skills for OpenCode",
@@ -2,10 +2,20 @@
2
2
  "$comment": [
3
3
  "Delphi Review Configuration Template",
4
4
  "======================================",
5
- "Copy this file to .delphi-config.json and fill in your API keys.",
5
+ "Copy this file to .delphi-config.json and fill in your API key.",
6
6
  "Place this file alongside SKILL.md in the delphi-review skill directory.",
7
7
  "Exactly three roles are required, with distinct trimmed executable model IDs.",
8
8
  "",
9
+ "The default profile routes all three seats through one WhaleCloud gateway so a",
10
+ "single token plan covers the review. The three ids are deliberately different",
11
+ "FLASH-tier models (cheap, fast, and good enough for review):",
12
+ " architecture -> s-deepseek-v4.1-flash",
13
+ " technical -> s-glm-5.3-flash",
14
+ " feasibility -> g-ling-3.1-flash",
15
+ "Check that the seat ids resolve to three DISTINCT backend models on your",
16
+ "gateway -- two different ids can be aliased to the same backend, which defeats",
17
+ "the multi-model invariant while still looking correct in the config.",
18
+ "",
9
19
  "Provider and vendor are unrestricted. provider=local is a fallback and cannot count as a successful expert execution.",
10
20
  "cross_provider_required is deprecated and ignored with warning code cross_provider_required_ignored."
11
21
  ],
@@ -15,23 +25,23 @@
15
25
  "profiles": {
16
26
  "default": {
17
27
  "providers": {
18
- "bailian-tp": {
19
- "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
20
- "api_key": "YOUR_API_KEY"
28
+ "whalecloud": {
29
+ "base_url": "https://lab.iwhalecloud.com/gpt-proxy",
30
+ "api_key": "${WHALECLOUD_API_KEY}"
21
31
  }
22
32
  },
23
33
  "experts": {
24
34
  "architecture": {
25
- "provider": "bailian-tp",
26
- "model": "qwen-plus"
35
+ "provider": "whalecloud",
36
+ "model": "s-deepseek-v4.1-flash"
27
37
  },
28
38
  "technical": {
29
- "provider": "bailian-tp",
30
- "model": "deepseek-v3"
39
+ "provider": "whalecloud",
40
+ "model": "s-glm-5.3-flash"
31
41
  },
32
42
  "feasibility": {
33
- "provider": "bailian-tp",
34
- "model": "glm-4.5"
43
+ "provider": "whalecloud",
44
+ "model": "g-ling-3.1-flash"
35
45
  }
36
46
  }
37
47
  },
@@ -39,23 +49,23 @@
39
49
  "starter": {
40
50
  "$comment": "One provider and token plan serving three distinct models",
41
51
  "providers": {
42
- "bailian-tp": {
43
- "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
44
- "api_key": "YOUR_API_KEY"
52
+ "whalecloud": {
53
+ "base_url": "https://lab.iwhalecloud.com/gpt-proxy",
54
+ "api_key": "${WHALECLOUD_API_KEY}"
45
55
  }
46
56
  },
47
57
  "experts": {
48
58
  "architecture": {
49
- "provider": "bailian-tp",
50
- "model": "qwen-plus"
59
+ "provider": "whalecloud",
60
+ "model": "s-deepseek-v4.1-flash"
51
61
  },
52
62
  "technical": {
53
- "provider": "bailian-tp",
54
- "model": "deepseek-v3"
63
+ "provider": "whalecloud",
64
+ "model": "s-glm-5.3-flash"
55
65
  },
56
66
  "feasibility": {
57
- "provider": "bailian-tp",
58
- "model": "glm-4.5"
67
+ "provider": "whalecloud",
68
+ "model": "g-ling-3.1-flash"
59
69
  }
60
70
  }
61
71
  }
@@ -77,14 +87,14 @@
77
87
  "model or gateway changes. See docs/plans/2026-10-14-sprint-c-design.md section 2.",
78
88
  "Example expert entry:",
79
89
  " \"architecture\": {",
80
- " \"provider\": \"bailian-tp\",",
81
- " \"model\": \"qwen-plus\",",
90
+ " \"provider\": \"whalecloud\",",
91
+ " \"model\": \"s-deepseek-v4.1-flash\",",
82
92
  " \"seat_id\": \"architecture\",",
83
93
  " \"max_prompt_bytes\": 26624,",
84
94
  " \"prompt_calibration\": {",
85
- " \"measured_at\": \"2026-10-05\",",
86
- " \"model_id\": \"qwen-plus\",",
87
- " \"gateway\": \"bailian\",",
95
+ " \"measured_at\": \"2026-11-04\",",
96
+ " \"model_id\": \"s-deepseek-v4.1-flash\",",
97
+ " \"gateway\": \"whalecloud\",",
88
98
  " \"last_pass_bytes\": 26624,",
89
99
  " \"last_fail_bytes\": 36897",
90
100
  " }",
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.36.1.0
6
+ **Version:** 0.37.1.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
@@ -32,10 +32,38 @@ Then replace the provider/model placeholders:
32
32
  "model": "YOUR_PROVIDER/YOUR_MODEL_A"
33
33
 
34
34
  // After (your config):
35
- "model": "bailian-tp/qwen-plus"
35
+ "model": "whalecloud/s-deepseek-v4.1-flash"
36
36
  // The other two role model fields must be different trimmed IDs.
37
37
  ```
38
38
 
39
+ The shipped `.delphi-config.json.example` defaults to three cheap FLASH-tier
40
+ models on one WhaleCloud gateway, which is what most setups want:
41
+
42
+ | seat | model | purpose |
43
+ |------|-------|---------|
44
+ | architecture | `s-deepseek-v4.1-flash` | structure, boundaries, coupling |
45
+ | technical | `s-glm-5.3-flash` | correctness, implementation risk |
46
+ | feasibility | `g-ling-3.1-flash` | cost, schedule, operability |
47
+
48
+ Before trusting a profile, confirm the three ids resolve to three **distinct
49
+ backend** models on your gateway. Gateway aliases can map two different ids to
50
+ the same backend, which satisfies the "distinct ids" check while actually
51
+ running one model twice:
52
+
53
+ ```bash
54
+ # prints the backend each id really reached
55
+ for m in s-deepseek-v4.1-flash s-glm-5.3-flash g-ling-3.1-flash; do
56
+ curl -s https://YOUR_GATEWAY/v1/chat/completions \
57
+ -H "Authorization: Bearer $WHALECLOUD_API_KEY" -H 'Content-Type: application/json' \
58
+ -d "{\"model\":\"$m\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"max_tokens\":5}" \
59
+ | python -c 'import sys,json; print(json.load(sys.stdin).get("model"))'
60
+ done
61
+ ```
62
+
63
+ `xp-gate doctor delphi` reports the configured seats, and every expert result
64
+ records the gateway-reported `resolved_model` so a silent alias collision shows
65
+ up in the review evidence rather than passing unnoticed.
66
+
39
67
  ### Step 3: Ensure provider configuration exists
40
68
 
41
69
  Your `opencode.json` must have the provider definitions. If you're using OpenCode's built-in providers (OpenAI, Anthropic, etc.), you just need API keys set in your environment.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.36.1.0
6
+ **Version:** 0.37.1.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.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.36.1.0
6
+ **Version:** 0.37.1.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": "xp-gate",
3
- "version": "0.36.1",
3
+ "version": "0.37.1",
4
4
  "displayName": "XP-Gate",
5
5
  "description": "Extreme Programming quality gates + AI workflow skills for Qoder. Includes 12 pre-commit gates (Gate 0-11), 8 pre-push gates, Sprint Flow (6 phases), and Delphi multi-expert review (>=90% consensus).",
6
6
  "author": {