@boyingliu01/xp-gate 0.14.16 → 0.14.18

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.
@@ -1,9 +1,9 @@
1
1
  # SRC/MOCK-POLICY KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-07-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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-07-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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.14.16",
3
+ "version": "0.14.18",
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"
@@ -38,7 +38,7 @@
38
38
  "node": ">=18.0.0"
39
39
  },
40
40
  "scripts": {
41
- "version": "0.14.16",
41
+ "version": "0.14.18",
42
42
  "prepack": "node scripts/sync-package-content.js",
43
43
  "test": "echo \"Run tests\" && exit 0"
44
44
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xp-gate",
3
- "version": "0.14.16",
3
+ "version": "0.14.18",
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,45 +1,73 @@
1
1
  {
2
- "$schema": "./.delphi-config.schema.json",
3
- "version": 1,
4
- "description": "Delphi review expert mapping — customize with your own models. Copy to .delphi-config.json and edit.",
5
- "num_experts": 3,
6
- "model_policy": {
7
- "domestic_only": true,
8
- "description": "Only domestic Chinese open-source models are allowed. NEVER use Anthropic, OpenAI, Google, or other foreign expensive models.",
9
- "allowed_models": [
10
- "glm-5.1", "glm-5.0",
11
- "kimi-k2.6", "kimi-k2.5",
12
- "minimax-m2.7", "minimax-m2.5",
13
- "qwen3.6-plus", "qwen3.5-plus",
14
- "deepseek-v4-pro", "deepseek-v4-lite"
15
- ]
16
- },
17
- "experts": {
18
- "architecture": {
19
- "agent_name": "delphi-reviewer-architecture",
20
- "perspective": "Architecture and requirements alignment",
21
- "requirements_alignment": true,
22
- "recommended_model": "deepseek-v4-pro",
23
- "alternatives": ["qwen3.6-plus", "glm-5.1"]
24
- },
25
- "technical": {
26
- "agent_name": "delphi-reviewer-technical",
27
- "perspective": "Technical implementation, code correctness, edge cases",
28
- "requirements_alignment": true,
29
- "recommended_model": "kimi-k2.6",
30
- "alternatives": ["deepseek-v4-pro", "minimax-m2.7"]
2
+ "$comment": [
3
+ "Delphi Review Configuration Template",
4
+ "======================================",
5
+ "Copy this file to .delphi-config.json and fill in your API keys.",
6
+ "Place this file alongside SKILL.md in the delphi-review skill directory.",
7
+ "At least 2 of the 3 experts should use different providers for cross-bias protection.",
8
+ "",
9
+ "Provider field: set provider to \"local\" to use the orchestrator model (mixed mode)."
10
+ ],
11
+
12
+ "active_profile": "default",
13
+
14
+ "profiles": {
15
+ "default": {
16
+ "providers": {
17
+ "deepseek": {
18
+ "base_url": "https://api.deepseek.com/v1",
19
+ "api_key": "YOUR_DEEPSEEK_API_KEY"
20
+ },
21
+ "zhipu": {
22
+ "base_url": "https://open.bigmodel.cn/api/paas/v4",
23
+ "api_key": "YOUR_ZHIPU_API_KEY"
24
+ },
25
+ "dashscope": {
26
+ "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
27
+ "api_key": "YOUR_DASHSCOPE_API_KEY"
28
+ }
29
+ },
30
+ "experts": {
31
+ "architecture": {
32
+ "provider": "deepseek",
33
+ "model": "deepseek-chat"
34
+ },
35
+ "technical": {
36
+ "provider": "zhipu",
37
+ "model": "glm-5.2"
38
+ },
39
+ "feasibility": {
40
+ "provider": "dashscope",
41
+ "model": "qwen-3.8-plus"
42
+ }
43
+ }
31
44
  },
32
- "feasibility": {
33
- "agent_name": "delphi-reviewer-feasibility",
34
- "perspective": "Feasibility analysis, risk assessment, execution complexity",
35
- "requirements_alignment": true,
36
- "recommended_model": "qwen3.6-plus",
37
- "alternatives": ["kimi-k2.6", "glm-5.1"]
45
+
46
+ "starter": {
47
+ "$comment": "Mixed mode: only 1 external API, others use orchestrator model",
48
+ "providers": {
49
+ "deepseek": {
50
+ "base_url": "https://api.deepseek.com/v1",
51
+ "api_key": "YOUR_DEEPSEEK_API_KEY"
52
+ }
53
+ },
54
+ "experts": {
55
+ "architecture": {
56
+ "provider": "deepseek",
57
+ "model": "deepseek-chat"
58
+ },
59
+ "technical": {
60
+ "provider": "local"
61
+ },
62
+ "feasibility": {
63
+ "provider": "local"
64
+ }
65
+ }
38
66
  }
39
67
  },
68
+
40
69
  "consensus": {
41
- "threshold_percent": 95,
42
- "max_review_rounds": 5,
43
- "cross_provider_required": true
70
+ "threshold_percent": 90,
71
+ "max_review_rounds": 5
44
72
  }
45
73
  }
@@ -1,9 +1,9 @@
1
1
  # SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-07-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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.14.16",
3
+ "version": "0.14.18",
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,45 +1,73 @@
1
1
  {
2
- "$schema": "./.delphi-config.schema.json",
3
- "version": 1,
4
- "description": "Delphi review expert mapping — customize with your own models. Copy to .delphi-config.json and edit.",
5
- "num_experts": 3,
6
- "model_policy": {
7
- "domestic_only": true,
8
- "description": "Only domestic Chinese open-source models are allowed. NEVER use Anthropic, OpenAI, Google, or other foreign expensive models.",
9
- "allowed_models": [
10
- "glm-5.1", "glm-5.0",
11
- "kimi-k2.6", "kimi-k2.5",
12
- "minimax-m2.7", "minimax-m2.5",
13
- "qwen3.6-plus", "qwen3.5-plus",
14
- "deepseek-v4-pro", "deepseek-v4-lite"
15
- ]
16
- },
17
- "experts": {
18
- "architecture": {
19
- "agent_name": "delphi-reviewer-architecture",
20
- "perspective": "Architecture and requirements alignment",
21
- "requirements_alignment": true,
22
- "recommended_model": "deepseek-v4-pro",
23
- "alternatives": ["qwen3.6-plus", "glm-5.1"]
24
- },
25
- "technical": {
26
- "agent_name": "delphi-reviewer-technical",
27
- "perspective": "Technical implementation, code correctness, edge cases",
28
- "requirements_alignment": true,
29
- "recommended_model": "kimi-k2.6",
30
- "alternatives": ["deepseek-v4-pro", "minimax-m2.7"]
2
+ "$comment": [
3
+ "Delphi Review Configuration Template",
4
+ "======================================",
5
+ "Copy this file to .delphi-config.json and fill in your API keys.",
6
+ "Place this file alongside SKILL.md in the delphi-review skill directory.",
7
+ "At least 2 of the 3 experts should use different providers for cross-bias protection.",
8
+ "",
9
+ "Provider field: set provider to \"local\" to use the orchestrator model (mixed mode)."
10
+ ],
11
+
12
+ "active_profile": "default",
13
+
14
+ "profiles": {
15
+ "default": {
16
+ "providers": {
17
+ "deepseek": {
18
+ "base_url": "https://api.deepseek.com/v1",
19
+ "api_key": "YOUR_DEEPSEEK_API_KEY"
20
+ },
21
+ "zhipu": {
22
+ "base_url": "https://open.bigmodel.cn/api/paas/v4",
23
+ "api_key": "YOUR_ZHIPU_API_KEY"
24
+ },
25
+ "dashscope": {
26
+ "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
27
+ "api_key": "YOUR_DASHSCOPE_API_KEY"
28
+ }
29
+ },
30
+ "experts": {
31
+ "architecture": {
32
+ "provider": "deepseek",
33
+ "model": "deepseek-chat"
34
+ },
35
+ "technical": {
36
+ "provider": "zhipu",
37
+ "model": "glm-5.2"
38
+ },
39
+ "feasibility": {
40
+ "provider": "dashscope",
41
+ "model": "qwen-3.8-plus"
42
+ }
43
+ }
31
44
  },
32
- "feasibility": {
33
- "agent_name": "delphi-reviewer-feasibility",
34
- "perspective": "Feasibility analysis, risk assessment, execution complexity",
35
- "requirements_alignment": true,
36
- "recommended_model": "qwen3.6-plus",
37
- "alternatives": ["kimi-k2.6", "glm-5.1"]
45
+
46
+ "starter": {
47
+ "$comment": "Mixed mode: only 1 external API, others use orchestrator model",
48
+ "providers": {
49
+ "deepseek": {
50
+ "base_url": "https://api.deepseek.com/v1",
51
+ "api_key": "YOUR_DEEPSEEK_API_KEY"
52
+ }
53
+ },
54
+ "experts": {
55
+ "architecture": {
56
+ "provider": "deepseek",
57
+ "model": "deepseek-chat"
58
+ },
59
+ "technical": {
60
+ "provider": "local"
61
+ },
62
+ "feasibility": {
63
+ "provider": "local"
64
+ }
65
+ }
38
66
  }
39
67
  },
68
+
40
69
  "consensus": {
41
- "threshold_percent": 95,
42
- "max_review_rounds": 5,
43
- "cross_provider_required": true
70
+ "threshold_percent": 90,
71
+ "max_review_rounds": 5
44
72
  }
45
73
  }
@@ -1,9 +1,9 @@
1
1
  # SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-07-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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.14.16",
3
+ "version": "0.14.18",
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-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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.
@@ -26,15 +26,18 @@ skills/delphi-review/
26
26
  |------|----------|-------|
27
27
  | Core methodology | SKILL.md | Delphi process, expert roles, consensus rules |
28
28
  | Code-walkthrough | references/code-walkthrough.md | Pre-push mode: 20 files/500 LOC limit |
29
- | Config example | .delphi-config.json.example | 3 experts, domestic models |
29
+ | Config example | .delphi-config.json.example | 3 experts, providers + API keys |
30
+ | External API script | scripts/delphi-external-review.cjs | Calls model APIs, returns JSON verdict |
30
31
 
31
32
  ## CONVENTIONS
32
33
  - 3 experts anonymous in Round 1 (no cross-expert bias)
33
34
  - ≥90% consensus threshold (was 95%, now unified to 90%)
34
35
  - Max 5 rounds before forcing decision
35
- - Cross-provider required: experts from ≥2 different providers (model list read from `opencode.json` agent config, not hardcoded)
36
- - Model selection: reads `delphi-reviewer-*` agent `model` fields from `opencode.json`
37
- - No hardcoded model lists — models defined by user's `opencode.json` configuration
36
+ - Cross-provider required: experts from ≥2 different providers (config read from `.delphi-config.json`, not hardcoded)
37
+ - Model selection: reads provider/model from `.delphi-config.json` active profile
38
+ - Mixed mode: `provider: "local"` falls back to orchestrator model (reduced diversity warning)
39
+ - No hardcoded model lists — models defined by user's `.delphi-config.json` configuration
40
+ - Execution: via Bash tool calling `delphi-external-review.cjs` script (not subagent dispatch)
38
41
  - Code-walkthrough mode: triggered on git push, stores result in .code-walkthrough-result.json
39
42
  - Code-walkthrough skipped on main/master pushes (by design)
40
43
 
@@ -1,152 +1,151 @@
1
- # Installing and Configuring Delphi Review
1
+ # Installing and Configuring Delphi Review (Qoder)
2
2
 
3
- This guide walks you through setting up the Delphi consensus review skill in your OpenCode environment.
3
+ This guide walks you through setting up the Delphi consensus review skill in your Qoder environment.
4
4
 
5
5
  ## Prerequisites
6
6
 
7
- - OpenCode installed and configured
8
- - At least **2 different model providers** available (cross-provider requirement prevents homogenized blind spots)
9
- - Access to at least 3 different models (for 3-expert mode) or 2 models (for 2-expert mode)
7
+ - **Node.js >= 18** (script uses built-in `fetch`)
8
+ - At least **2 different model providers** with API access (cross-provider requirement prevents homogenized blind spots)
9
+ - `@boyingliu01/xp-gate` npm package installed (for the `delphi-external-review.cjs` script)
10
10
 
11
- > **Why cross-provider?** Using models from the same vendor (e.g., all OpenAI) means they share training data and biases, defeating the purpose of multi-expert consensus.
11
+ > **Why cross-provider?** Using models from the same vendor means they share training data and biases, defeating the purpose of multi-expert consensus.
12
12
 
13
- ## Quick Setup (3 steps)
13
+ ## Quick Setup (4 steps)
14
14
 
15
15
  ### Step 1: Copy the configuration template
16
16
 
17
17
  ```bash
18
- # From your project root (where opencode.json lives):
19
- cp skills/delphi-review/.delphi-config.json.example .delphi-config.json
18
+ # From your project root:
19
+ cp skills/delphi-review/.delphi-config.json.example skills/delphi-review/.delphi-config.json
20
20
  ```
21
21
 
22
- This file maps abstract expert roles to agent names. You typically don't need to edit this unless you want custom agent names.
22
+ Or if installed globally:
23
23
 
24
- ### Step 2: Add agent definitions to opencode.json
25
-
26
- Copy the `agent` block from `skills/delphi-review/opencode.json.delphi.example` into your `opencode.json`.
27
-
28
- Then replace the provider/model placeholders:
29
-
30
- ```json
31
- // Before (template):
32
- "model": "YOUR_PROVIDER/YOUR_MODEL_A"
33
-
34
- // After (your config):
35
- "model": "openai/gpt-4o"
36
- // or
37
- "model": "anthropic/claude-sonnet-4-20250514"
38
- // or
39
- "model": "bailian-coding-plan/qwen3.6-plus"
24
+ ```bash
25
+ cp ~/.qoder/skills/delphi-review/.delphi-config.json.example ~/.qoder/skills/delphi-review/.delphi-config.json
40
26
  ```
41
27
 
42
- ### Step 3: Ensure provider configuration exists
28
+ ### Step 2: Edit the configuration
43
29
 
44
- 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.
45
-
46
- For custom providers (like Ali Bailian), add a provider entry:
30
+ Open `.delphi-config.json` and fill in your API keys and model preferences:
47
31
 
48
32
  ```json
49
- "provider": {
50
- "my-custom-provider": {
51
- "npm": "@ai-sdk/anthropic",
52
- "name": "My Custom Provider",
53
- "options": {
54
- "baseURL": "https://your-api-endpoint.com/v1",
55
- "apiKey": "your-api-key"
56
- },
57
- "models": {
58
- "my-model-name": {
59
- "name": "My Model Name",
60
- "modalities": {
61
- "input": ["text"],
62
- "output": ["text"]
33
+ {
34
+ "active_profile": "default",
35
+ "profiles": {
36
+ "default": {
37
+ "providers": {
38
+ "deepseek": {
39
+ "base_url": "https://api.deepseek.com/v1",
40
+ "api_key": "sk-your-key-here"
63
41
  },
64
- "limit": {
65
- "context": 128000,
66
- "output": 8192
42
+ "zhipu": {
43
+ "base_url": "https://open.bigmodel.cn/api/paas/v4",
44
+ "api_key": "your-key-here"
67
45
  }
46
+ },
47
+ "experts": {
48
+ "architecture": { "provider": "deepseek", "model": "deepseek-chat" },
49
+ "technical": { "provider": "zhipu", "model": "glm-5.2" },
50
+ "feasibility": { "provider": "local" }
68
51
  }
69
52
  }
70
53
  }
71
54
  }
72
55
  ```
73
56
 
74
- ## Model Recommendations
57
+ ### Step 3: Verify Node.js version
75
58
 
76
- The skill requires at least 2 experts for code changes, 3 for architecture decisions. Here are recommended model selections:
59
+ ```bash
60
+ node --version # Must be >= 18.0.0
61
+ ```
77
62
 
78
- | Expert Role | Recommended | Alternatives |
79
- |-------------|-------------|-------------|
80
- | **Architecture (Expert A)** | Claude Sonnet 4 | GPT-4o, Qwen-Plus, Gemini 2.5 Pro |
81
- | **Technical (Expert B)** | Claude Haiku | Qwen-Coder, DeepSeek-Coder, GPT-4o-mini |
82
- | **Feasibility (Expert C)** | Claude Opus | GPT-4, Gemini 2.5 Pro, Qwen-Max |
63
+ ### Step 4: Verify configuration
83
64
 
84
- **Minimum viable setup** (2-expert mode):
85
- - Expert A: Any reasoning-strong model
86
- - Expert B: Any code-understanding-strong model
87
- - **Must be from different providers**
65
+ Test that the script can read your config and the API is reachable:
88
66
 
89
- ## Configuration File Reference
67
+ ```bash
68
+ node <script-path> --expert architecture --input "Test review: verify connectivity" --round 1 --config skills/delphi-review/.delphi-config.json
69
+ ```
70
+
71
+ Where `<script-path>` is located (in priority order):
72
+ 1. `node_modules/@boyingliu01/xp-gate/scripts/delphi-external-review.cjs`
73
+ 2. `$(npm root -g)/@boyingliu01/xp-gate/scripts/delphi-external-review.cjs`
74
+
75
+ ## Configuration Reference
90
76
 
91
77
  ### `.delphi-config.json`
92
78
 
93
- | Field | Description | Default |
94
- |-------|-------------|---------|
95
- | `num_experts` | Number of experts to use (2 or 3) | 3 |
96
- | `experts.architecture` | Architecture reviewer configuration | Required |
97
- | `experts.technical` | Technical reviewer configuration | Required |
98
- | `experts.feasibility` | Feasibility reviewer configuration | Required for 3-expert mode |
99
- | `consensus.threshold_percent` | Agreement threshold | 90 |
100
- | `consensus.max_review_rounds` | Maximum review rounds | 5 |
101
- | `consensus.cross_provider_required` | Require different providers | true |
102
-
103
- ### `opencode.json` agent block
104
-
105
- | Field | Description |
106
- |-------|-------------|
107
- | `model` | Provider/model identifier (e.g., `openai/gpt-4o`) |
108
- | `mode` | Must be `"subagent"` |
109
- | `prompt` | Expert role instructions |
110
- | `tools` | Tool permissions (read: true, write: false recommended) |
79
+ | Field | Required | Description |
80
+ |-------|----------|-------------|
81
+ | `active_profile` | ✅ | Name of the active configuration profile |
82
+ | `profiles` | ✅ | Named configuration profiles (for easy switching) |
83
+ | `profiles.<name>.providers` | ✅ | Provider definitions: base_url + api_key |
84
+ | `profiles.<name>.experts` | ✅ | Expert-to-provider/model mapping |
85
+ | `profiles.<name>.experts.<role>.provider` | ✅ | Provider name, or `"local"` for orchestrator fallback |
86
+ | `consensus.threshold_percent` | ❌ | Consensus threshold (default: 90) |
87
+ | `consensus.max_review_rounds` | ❌ | Max review rounds (default: 5) |
88
+
89
+ ### Switching profiles
90
+
91
+ Edit `active_profile` in the config, or use the `--profile <name>` CLI argument to override temporarily.
92
+
93
+ ### Mixed mode (gradual setup)
94
+
95
+ You can start with just 1 external API and use the orchestrator model for other experts:
96
+
97
+ ```json
98
+ {
99
+ "active_profile": "starter",
100
+ "profiles": {
101
+ "starter": {
102
+ "providers": {
103
+ "deepseek": { "base_url": "https://api.deepseek.com/v1", "api_key": "sk-xxx" }
104
+ },
105
+ "experts": {
106
+ "architecture": { "provider": "deepseek", "model": "deepseek-chat" },
107
+ "technical": { "provider": "local" },
108
+ "feasibility": { "provider": "local" }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ ```
114
+
115
+ > This works but produces a WARNING about reduced cross-model diversity. Add more external APIs over time.
111
116
 
112
117
  ## Usage
113
118
 
114
119
  Once configured, invoke the skill via:
115
120
 
116
- ```bash
121
+ ```
117
122
  /delphi-review
118
123
  ```
119
124
 
120
- Or reference it in your workflows. The skill will automatically use the agents defined in your `opencode.json`.
125
+ The skill will:
126
+ 1. Read `.delphi-config.json` to find expert configurations
127
+ 2. Call external model APIs via `delphi-external-review.cjs` script
128
+ 3. For `provider: "local"` experts, use the orchestrator model
129
+ 4. Aggregate verdicts and compute consensus
121
130
 
122
131
  ## Troubleshooting
123
132
 
124
- ### "Agent delphi-reviewer-xxx not found"
125
-
126
- The agent definitions in `opencode.json` don't match the names in `.delphi-config.json`. Verify:
127
- 1. Agent names in `.delphi-config.json` match keys in `opencode.json` `agent` block
128
- 2. opencode.js is valid JSON (use `jq . opencode.json` to verify)
129
-
130
- ### "Model YOUR_PROVIDER/YOUR_MODEL not available"
133
+ ### "Config file not found"
131
134
 
132
- You forgot to replace the placeholder. Search for `YOUR_PROVIDER` in your opencode.json and replace with actual values.
135
+ Copy `.delphi-config.json.example` to `.delphi-config.json` and fill in your API keys.
133
136
 
134
- ### Both experts gave identical feedback
137
+ ### "Script not found"
135
138
 
136
- Your models are from the same provider. Configure agents to use different providers.
139
+ Install the npm package: `npm install -g @boyingliu01/xp-gate`
137
140
 
138
- ### Review takes too long / costs too much
141
+ ### "Authentication failed (401)"
139
142
 
140
- Reduce to 2-expert mode in `.delphi-config.json`: set `num_experts: 2`.
143
+ Check your API key in `.delphi-config.json`. Ensure the key matches the provider.
141
144
 
142
- ## Advanced: JSON Schema Validation
145
+ ### "All experts use the same provider"
143
146
 
144
- For IDE autocompletion and validation, reference the schema in your `.delphi-config.json`:
147
+ Configure at least 2 different providers, or use `provider: "local"` for mixed mode.
145
148
 
146
- ```json
147
- {
148
- "$schema": "https://example.com/delphi-config.schema.json"
149
- }
150
- ```
149
+ ### "Node.js >= 18 required"
151
150
 
152
- The schema file is available at `.delphi-config.schema.json` in this directory.
151
+ Upgrade Node.js. The script uses the built-in `fetch` API.
@@ -88,44 +88,44 @@ Permitted variants (all satisfy L1 trigger):
88
88
  | 2 专家(默认) | A(架构) + B(实现) | 代码变更、小型设计 |
89
89
  | 3 专家 | A(架构) + B(实现) + C(可行性) | 架构决策、需求文档 |
90
90
 
91
- ### 模型选择策略(强制 — 从 opencode.json 读取)
91
+ ### 模型选择策略(Qoder — 从 .delphi-config.json 读取 + 外部 API 调用)
92
92
 
93
- **MUST 从 `opencode.json` 的 agent 配置中读取模型**,**严禁** hardcode 模型名称。
93
+ **MUST 从 `.delphi-config.json` 读取 API 配置**,通过 Bash 工具调用 `delphi-external-review.cjs` 脚本实现真正的跨模型评审。
94
94
 
95
- 模型选择流程:
96
- 1. 读取 `opencode.json` 中 `agent` 字段下 `delphi-reviewer-architecture`、`delphi-reviewer-technical`、`delphi-reviewer-feasibility` 三个 agent 定义
97
- 2. 提取每个 agent 的 `model` 字段(格式:`provider/model-name`)
98
- 3. 分别作为 Expert A(架构)、Expert B(技术)、Expert C(可行性) 的模型
95
+ **配置定位优先级**:
96
+ 1. 当前项目 `skills/delphi-review/.delphi-config.json`(Qoder 已安装 skill)
97
+ 2. `~/.qoder/skills/delphi-review/.delphi-config.json`(全局安装)
98
+
99
+ **脚本定位优先级**:
100
+ 1. `node_modules/@boyingliu01/xp-gate/scripts/delphi-external-review.cjs`(npm 安装后)
101
+ 2. `$(npm root -g)/@boyingliu01/xp-gate/scripts/delphi-external-review.cjs`(全局安装)
102
+ 3. xp-gate 仓库中的 `scripts/delphi-external-review.cjs`(开发环境)
99
103
 
100
104
  **关键原则**:
101
- - ✅ 三个专家必须来自 **至少 2 家不同 provider**(通过 `model` 字段的 `provider/` 前缀判断)
102
- - ❌ 禁止 hardcode 模型名称(模型列表以 `opencode.json` 为准)
103
- - ❌ 禁止三个专家全部使用同一 provider 的模型
105
+ - ✅ 三个专家必须来自 **至少 2 家不同 provider**(按 `base_url` 判断)
106
+ - ✅ 支持混合模式:`provider: "local"` 表示由 Orchestrator 自身模型扮演
107
+ - ❌ 禁止三个专家全部使用同一 provider 的模型(除非使用混合模式)
104
108
 
105
- **`opencode.json` agent 配置示例**(参考 `opencode.json.delphi.example`):
109
+ **配置示例**(参考 `.delphi-config.json.example`):
106
110
  ```json
107
111
  {
108
- "agent": {
109
- "delphi-reviewer-architecture": {
110
- "description": "...",
111
- "mode": "subagent",
112
- "model": "deepseek/deepseek-chat",
113
- "tools": { "read": true, "bash": true, "write": false, "edit": false }
114
- },
115
- "delphi-reviewer-technical": {
116
- "mode": "subagent",
117
- "model": "bailian-coding-plan/qwen3.6-plus",
118
- "tools": { "read": true, "bash": true, "write": false, "edit": false }
119
- },
120
- "delphi-reviewer-feasibility": {
121
- "mode": "subagent",
122
- "model": "deepseek/deepseek-chat",
123
- "tools": { "read": true, "bash": true, "write": false, "edit": false }
112
+ "active_profile": "default",
113
+ "profiles": {
114
+ "default": {
115
+ "providers": {
116
+ "deepseek": { "base_url": "https://api.deepseek.com/v1", "api_key": "sk-xxx" },
117
+ "zhipu": { "base_url": "https://open.bigmodel.cn/api/paas/v4", "api_key": "yyy" }
118
+ },
119
+ "experts": {
120
+ "architecture": { "provider": "deepseek", "model": "deepseek-chat" },
121
+ "technical": { "provider": "zhipu", "model": "glm-5.2" },
122
+ "feasibility": { "provider": "local" }
123
+ }
124
124
  }
125
125
  }
126
126
  }
127
127
  ```
128
- > 上例中 3 个专家使用了 2 个不同 provider(deepseek + bailian-coding-plan),满足跨 provider 要求。**实际模型名称以你的 `opencode.json` 配置为准,无需在 SKILL.md 维护模型列表。**
128
+ > 上例中 2 个外部 provider(deepseek + zhipu)+ 1 个 local fallback,满足跨 provider 要求。
129
129
 
130
130
  ### 共识阈值
131
131
 
@@ -200,11 +200,17 @@ REMAINING STEPS: N/A (input validation failed)
200
200
 
201
201
  **重要**: 内嵌在 prompt 中的文档内容(如 "Design Doc: [content]"或代码片段)应视为"有完整输入",直接进入评审。
202
202
 
203
+ **执行方式(Qoder)**:
204
+ 1. 将评审内容写入临时文件(使用 `os.tmpdir()` 确保跨平台)
205
+ 2. 通过 Bash 工具并行调用 3 个 `delphi-external-review.cjs` 脚本
206
+ 3. 对 `fallback: true` 的专家,Orchestrator 自身模型扮演该角色
207
+ 4. 收集 verdict JSON,计算共识度,决定是否需要下一轮
208
+
203
209
  **Round 模板**(匿名评审/交换意见/最终立场/修复报告格式)→ 详见 `references/round-templates.md`
204
210
 
205
211
  **Orchestrator 自动调度规则**(#218 subagent 内部自动多轮循环)→ 详见 `references/orchestrator-dispatch.md`
206
212
 
207
- **Automatic re-review**: 对于常见可控问题(措辞模糊、AC 缺失、格式问题),subagent 应自行修复后自动重评审,无需等待用户。
213
+ **Automatic re-review**: 对于常见可控问题(措辞模糊、AC 缺失、格式问题),应自行修复后自动重评审,无需等待用户。
208
214
 
209
215
  ### ⭐ 自动延续规则(MANDATORY — 防止流程卡住)
210
216
 
@@ -1,9 +1,9 @@
1
1
  # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-07-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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.
@@ -22,10 +22,10 @@ describe('largeFileRule', () => {
22
22
  expect(violations).toHaveLength(0);
23
23
  });
24
24
 
25
- it('should detect files exceeding 1000 lines', () => {
25
+ it('should detect files exceeding 1150 lines', () => {
26
26
  const largeFileAdapter = {
27
27
  ...mockAdapter,
28
- countLines: () => 1001
28
+ countLines: () => 1151
29
29
  };
30
30
 
31
31
  const violations = largeFileRule.check('test-large.ts', largeFileAdapter);
@@ -34,7 +34,7 @@ describe('largeFileRule', () => {
34
34
  file: 'test-large.ts',
35
35
  line: 1,
36
36
  ruleId: 'clean-code.large-file',
37
- message: 'File is too large: 1001 lines (maximum: 1000)',
37
+ message: 'File is too large: 1151 lines (maximum: 1150)',
38
38
  severity: 'warning'
39
39
  });
40
40
  });
@@ -42,7 +42,7 @@ describe('largeFileRule', () => {
42
42
  it('should handle exactly threshold lines as not violating', () => {
43
43
  const thresholdFileAdapter = {
44
44
  ...mockAdapter,
45
- countLines: () => 1000
45
+ countLines: () => 1150
46
46
  };
47
47
 
48
48
  const violations = largeFileRule.check('test-threshold.ts', thresholdFileAdapter);
@@ -58,7 +58,7 @@ describe('largeFileRule', () => {
58
58
  });
59
59
 
60
60
  it('should use the correct threshold', () => {
61
- expect(largeFileRule.threshold).toEqual(1000);
61
+ expect(largeFileRule.threshold).toEqual(1150);
62
62
  });
63
63
 
64
64
  it('should return empty violations when adapter throws error', () => {
@@ -1,45 +1,73 @@
1
1
  {
2
- "$schema": "./.delphi-config.schema.json",
3
- "version": 1,
4
- "description": "Delphi review expert mapping — customize with your own models. Copy to .delphi-config.json and edit.",
5
- "num_experts": 3,
6
- "model_policy": {
7
- "domestic_only": true,
8
- "description": "Only domestic Chinese open-source models are allowed. NEVER use Anthropic, OpenAI, Google, or other foreign expensive models.",
9
- "allowed_models": [
10
- "glm-5.1", "glm-5.0",
11
- "kimi-k2.6", "kimi-k2.5",
12
- "minimax-m2.7", "minimax-m2.5",
13
- "qwen3.6-plus", "qwen3.5-plus",
14
- "deepseek-v4-pro", "deepseek-v4-lite"
15
- ]
16
- },
17
- "experts": {
18
- "architecture": {
19
- "agent_name": "delphi-reviewer-architecture",
20
- "perspective": "Architecture and requirements alignment",
21
- "requirements_alignment": true,
22
- "recommended_model": "deepseek-v4-pro",
23
- "alternatives": ["qwen3.6-plus", "glm-5.1"]
24
- },
25
- "technical": {
26
- "agent_name": "delphi-reviewer-technical",
27
- "perspective": "Technical implementation, code correctness, edge cases",
28
- "requirements_alignment": true,
29
- "recommended_model": "kimi-k2.6",
30
- "alternatives": ["deepseek-v4-pro", "minimax-m2.7"]
2
+ "$comment": [
3
+ "Delphi Review Configuration Template",
4
+ "======================================",
5
+ "Copy this file to .delphi-config.json and fill in your API keys.",
6
+ "Place this file alongside SKILL.md in the delphi-review skill directory.",
7
+ "At least 2 of the 3 experts should use different providers for cross-bias protection.",
8
+ "",
9
+ "Provider field: set provider to \"local\" to use the orchestrator model (mixed mode)."
10
+ ],
11
+
12
+ "active_profile": "default",
13
+
14
+ "profiles": {
15
+ "default": {
16
+ "providers": {
17
+ "deepseek": {
18
+ "base_url": "https://api.deepseek.com/v1",
19
+ "api_key": "YOUR_DEEPSEEK_API_KEY"
20
+ },
21
+ "zhipu": {
22
+ "base_url": "https://open.bigmodel.cn/api/paas/v4",
23
+ "api_key": "YOUR_ZHIPU_API_KEY"
24
+ },
25
+ "dashscope": {
26
+ "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
27
+ "api_key": "YOUR_DASHSCOPE_API_KEY"
28
+ }
29
+ },
30
+ "experts": {
31
+ "architecture": {
32
+ "provider": "deepseek",
33
+ "model": "deepseek-chat"
34
+ },
35
+ "technical": {
36
+ "provider": "zhipu",
37
+ "model": "glm-5.2"
38
+ },
39
+ "feasibility": {
40
+ "provider": "dashscope",
41
+ "model": "qwen-3.8-plus"
42
+ }
43
+ }
31
44
  },
32
- "feasibility": {
33
- "agent_name": "delphi-reviewer-feasibility",
34
- "perspective": "Feasibility analysis, risk assessment, execution complexity",
35
- "requirements_alignment": true,
36
- "recommended_model": "qwen3.6-plus",
37
- "alternatives": ["kimi-k2.6", "glm-5.1"]
45
+
46
+ "starter": {
47
+ "$comment": "Mixed mode: only 1 external API, others use orchestrator model",
48
+ "providers": {
49
+ "deepseek": {
50
+ "base_url": "https://api.deepseek.com/v1",
51
+ "api_key": "YOUR_DEEPSEEK_API_KEY"
52
+ }
53
+ },
54
+ "experts": {
55
+ "architecture": {
56
+ "provider": "deepseek",
57
+ "model": "deepseek-chat"
58
+ },
59
+ "technical": {
60
+ "provider": "local"
61
+ },
62
+ "feasibility": {
63
+ "provider": "local"
64
+ }
65
+ }
38
66
  }
39
67
  },
68
+
40
69
  "consensus": {
41
- "threshold_percent": 95,
42
- "max_review_rounds": 5,
43
- "cross_provider_required": true
70
+ "threshold_percent": 90,
71
+ "max_review_rounds": 5
44
72
  }
45
73
  }
@@ -1,9 +1,9 @@
1
1
  # SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-07-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.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-20
4
- **Commit:** b11c74c
3
+ **Generated:** 2026-07-21
4
+ **Commit:** 6815d40
5
5
  **Branch:** main
6
- **Version:** 0.14.16.0
6
+ **Version:** 0.14.18.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.