@boyingliu01/xp-gate 0.7.0 → 0.8.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.
- package/bin/xp-gate.js +4 -9
- package/lib/__tests__/audit-log.test.ts +107 -0
- package/lib/__tests__/detect-deps.test.js +212 -42
- package/lib/__tests__/doctor.test.js +1 -0
- package/lib/__tests__/gate-audit.test.ts +59 -0
- package/lib/__tests__/init.test.js +47 -1
- package/lib/__tests__/install-skill.test.js +1 -45
- package/lib/__tests__/ui-detector.test.ts +186 -26
- package/lib/__tests__/ui-review.test.ts +119 -0
- package/lib/__tests__/uninstall.test.js +1 -0
- package/lib/detect-deps.js +180 -37
- package/lib/doctor.js +7 -9
- package/lib/gate-audit.ts +26 -42
- package/lib/init.js +42 -13
- package/lib/install-skill.js +20 -48
- package/lib/rollback.js +1 -16
- package/lib/shared-paths.js +30 -0
- package/lib/shared-utils.js +25 -0
- package/lib/ui-detector.ts +20 -14
- package/lib/ui-review.ts +58 -53
- package/lib/uninstall.js +8 -9
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/claude-code/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/claude-code/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/claude-code/skills/delphi-review/SKILL.md +454 -0
- package/plugins/claude-code/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/claude-code/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/claude-code/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/claude-code/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/claude-code/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/claude-code/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/claude-code/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/claude-code/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/claude-code/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/claude-code/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/claude-code/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/claude-code/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/claude-code/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/claude-code/skills/to-issues/SKILL.md +277 -0
- package/plugins/opencode/README.md +38 -0
- package/plugins/opencode/index.ts +85 -0
- package/plugins/opencode/package.json +18 -0
- package/plugins/opencode/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/opencode/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/opencode/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/opencode/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/opencode/skills/delphi-review/SKILL.md +454 -0
- package/plugins/opencode/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/opencode/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/opencode/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/opencode/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/opencode/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/opencode/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/opencode/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/opencode/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/opencode/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/opencode/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/opencode/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/opencode/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/opencode/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/opencode/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/opencode/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/opencode/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/opencode/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/opencode/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/opencode/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/opencode/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/opencode/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/opencode/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/opencode/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/opencode/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/opencode/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/opencode/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/opencode/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/opencode/skills/to-issues/SKILL.md +277 -0
- package/plugins/opencode/tsconfig.json +15 -0
- package/plugins/qoder/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/qoder/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/qoder/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/qoder/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/qoder/skills/delphi-review/SKILL.md +454 -0
- package/plugins/qoder/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/qoder/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/qoder/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/qoder/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/qoder/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/qoder/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/qoder/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/qoder/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/qoder/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/qoder/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/qoder/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/qoder/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/qoder/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/qoder/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/qoder/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/qoder/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/qoder/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/qoder/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/qoder/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/qoder/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/qoder/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/qoder/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/qoder/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/qoder/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/qoder/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/qoder/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/qoder/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/qoder/skills/to-issues/SKILL.md +277 -0
- package/skills/admin-template-guidelines/SKILL.md +904 -0
- package/skills/delphi-review/SKILL.md +112 -77
- package/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/skills/ralph-loop/SKILL.md +165 -34
- package/skills/sprint-flow/SKILL.md +448 -107
- package/skills/sprint-flow/references/components/skill-invocations.md +1 -1
- package/skills/sprint-flow/references/components/tool-descriptions.md +1 -1
- package/skills/sprint-flow/references/force-levels.md +203 -0
- package/skills/sprint-flow/references/phase-1-plan.md +4 -4
- package/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +20 -1
- package/skills/sprint-flow/templates/auto-estimate-output-template.md +7 -5
- package/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/skills/test-driven-development/SKILL.md +71 -0
- package/skills/test-specification-alignment/SKILL.md +98 -24
- package/skills/to-issues/SKILL.md +277 -0
- package/plugins/qoder/AGENTS.md +0 -93
- package/plugins/qoder/README.md +0 -87
- package/plugins/qoder/widgets/quality-report.html +0 -163
- package/plugins/qoder/widgets/sprint-dashboard.html +0 -172
- package/skills/delphi-review/evals/evals.json +0 -82
- package/skills/delphi-review/references/qoder-multi-model.md +0 -191
- package/skills/ralph-loop/evals/evals.json +0 -311
- package/skills/ralph-loop/evolution-history.json +0 -59
- package/skills/ralph-loop/evolution-log.md +0 -16
- package/skills/sprint-flow/evals/evals.json +0 -130
- package/skills/sprint-flow/evolution-history.json +0 -39
- package/skills/sprint-flow/evolution-log.md +0 -23
- package/skills/sprint-flow/references/qoder-adaptation.md +0 -173
- package/skills/test-specification-alignment/evals/evals.json +0 -75
|
@@ -0,0 +1,45 @@
|
|
|
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"]
|
|
31
|
+
},
|
|
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"]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"consensus": {
|
|
41
|
+
"threshold_percent": 95,
|
|
42
|
+
"max_review_rounds": 5,
|
|
43
|
+
"cross_provider_required": true
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
|
+
|
|
3
|
+
**Generated:** 2026-05-30
|
|
4
|
+
**Commit:** 4517f2b
|
|
5
|
+
**Branch:** main
|
|
6
|
+
**Version:** v0.5.1
|
|
7
|
+
|
|
8
|
+
## OVERVIEW
|
|
9
|
+
Delphi Consensus Review — multi-round anonymous expert review (≥91% threshold, 3 experts from ≥2 providers, domestic models only). Supports design + code-walkthrough modes.
|
|
10
|
+
|
|
11
|
+
## STRUCTURE
|
|
12
|
+
```
|
|
13
|
+
skills/delphi-review/
|
|
14
|
+
├── SKILL.md # Core Delphi methodology + output contract
|
|
15
|
+
├── INSTALL.md # Setup instructions
|
|
16
|
+
├── AGENTS.md # This file
|
|
17
|
+
├── evals/ # Evaluation test cases
|
|
18
|
+
├── opencode.json.delphi.example # OpenCode delphi config example
|
|
19
|
+
├── references/
|
|
20
|
+
│ └── code-walkthrough.md # Code-walkthrough mode specification
|
|
21
|
+
└── .delphi-config.json.example # 3-expert config template
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## WHERE TO LOOK
|
|
25
|
+
| Task | Location | Notes |
|
|
26
|
+
|------|----------|-------|
|
|
27
|
+
| Core methodology | SKILL.md | Delphi process, expert roles, consensus rules |
|
|
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 |
|
|
30
|
+
|
|
31
|
+
## CONVENTIONS
|
|
32
|
+
- 3 experts anonymous in Round 1 (no cross-expert bias)
|
|
33
|
+
- ≥91% consensus threshold (was 95%, lowered to 91%)
|
|
34
|
+
- Max 5 rounds before forcing decision
|
|
35
|
+
- Cross-provider required: experts from ≥2 different providers
|
|
36
|
+
- Domestic models only: glm, kimi, minimax, qwen, deepseek
|
|
37
|
+
- Foreign models forbidden: Anthropic, OpenAI, Google
|
|
38
|
+
- Code-walkthrough mode: triggered on git push, stores result in .code-walkthrough-result.json
|
|
39
|
+
- Code-walkthrough skipped on main/master pushes (by design)
|
|
40
|
+
|
|
41
|
+
## ANTI-PATTERNS (THIS PROJECT)
|
|
42
|
+
- Do NOT terminate before achieving true consensus (≥91%)
|
|
43
|
+
- Do NOT reveal other experts' opinions during Round 1
|
|
44
|
+
- Do NOT accept partial agreement without resolution
|
|
45
|
+
- Do NOT skip code-walkthrough when over thresholds (BLOCK + user decision)
|
|
46
|
+
- Do NOT degrade to single model on API errors (BLOCK)
|
|
47
|
+
- Do NOT declare complete without writing .code-walkthrough-result.json
|
|
48
|
+
- Do NOT use foreign models (Anthropic/GPT/Gemini)
|
|
49
|
+
|
|
50
|
+
## UNIQUE STYLES
|
|
51
|
+
- Anonymous expert reviews (Round 1)
|
|
52
|
+
- Statistical consensus measurement (≥91% threshold)
|
|
53
|
+
- Two modes: design review + code-walkthrough
|
|
54
|
+
- Pre-push integration: .code-walkthrough-result.json stores commit hash + verdict
|
|
55
|
+
- Delphi guard in claude-code plugin: blocks Edit/Write before APPROVAL
|
|
56
|
+
|
|
57
|
+
## COMMANDS
|
|
58
|
+
```bash
|
|
59
|
+
/delphi-review # Design review mode
|
|
60
|
+
/delphi-review --mode code-walkthrough # Pre-push code walkthrough
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## NOTES
|
|
64
|
+
- Used by pre-push hook for code-walkthrough validation
|
|
65
|
+
- Delphi guard (claude-code plugin) reads .sprint-state/delphi-reviewed.json
|
|
66
|
+
- Code-walkthrough result must match commit hash for verification
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Installing and Configuring Delphi Review
|
|
2
|
+
|
|
3
|
+
This guide walks you through setting up the Delphi consensus review skill in your OpenCode environment.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
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)
|
|
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.
|
|
12
|
+
|
|
13
|
+
## Quick Setup (3 steps)
|
|
14
|
+
|
|
15
|
+
### Step 1: Copy the configuration template
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# From your project root (where opencode.json lives):
|
|
19
|
+
cp skills/delphi-review/.delphi-config.json.example .delphi-config.json
|
|
20
|
+
```
|
|
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.
|
|
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"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Step 3: Ensure provider configuration exists
|
|
43
|
+
|
|
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:
|
|
47
|
+
|
|
48
|
+
```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"]
|
|
63
|
+
},
|
|
64
|
+
"limit": {
|
|
65
|
+
"context": 128000,
|
|
66
|
+
"output": 8192
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Model Recommendations
|
|
75
|
+
|
|
76
|
+
The skill requires at least 2 experts for code changes, 3 for architecture decisions. Here are recommended model selections:
|
|
77
|
+
|
|
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 |
|
|
83
|
+
|
|
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**
|
|
88
|
+
|
|
89
|
+
## Configuration File Reference
|
|
90
|
+
|
|
91
|
+
### `.delphi-config.json`
|
|
92
|
+
|
|
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 | 95 |
|
|
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) |
|
|
111
|
+
|
|
112
|
+
## Usage
|
|
113
|
+
|
|
114
|
+
Once configured, invoke the skill via:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
/delphi-review
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Or reference it in your workflows. The skill will automatically use the agents defined in your `opencode.json`.
|
|
121
|
+
|
|
122
|
+
## Troubleshooting
|
|
123
|
+
|
|
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"
|
|
131
|
+
|
|
132
|
+
You forgot to replace the placeholder. Search for `YOUR_PROVIDER` in your opencode.json and replace with actual values.
|
|
133
|
+
|
|
134
|
+
### Both experts gave identical feedback
|
|
135
|
+
|
|
136
|
+
Your models are from the same provider. Configure agents to use different providers.
|
|
137
|
+
|
|
138
|
+
### Review takes too long / costs too much
|
|
139
|
+
|
|
140
|
+
Reduce to 2-expert mode in `.delphi-config.json`: set `num_experts: 2`.
|
|
141
|
+
|
|
142
|
+
## Advanced: JSON Schema Validation
|
|
143
|
+
|
|
144
|
+
For IDE autocompletion and validation, reference the schema in your `.delphi-config.json`:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"$schema": "https://example.com/delphi-config.schema.json"
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
The schema file is available at `.delphi-config.schema.json` in this directory.
|