@boyingliu01/xp-gate 0.18.5 → 0.19.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.
- package/adapter-common.sh +27 -0
- package/adapters/gate-3.sh +0 -0
- package/adapters/gate-4.sh +0 -0
- package/adapters/gate-7.sh +0 -0
- package/adapters/gate-8.sh +0 -0
- package/adapters/gate-9.sh +0 -0
- package/adapters/powershell.sh +114 -35
- package/adapters/typescript.sh +8 -8
- package/build-integrity/__tests__/import-resolver.test.ts +22 -0
- package/build-integrity/__tests__/orchestrator.test.ts +1 -2
- package/build-integrity/gate-10.ts +7 -0
- package/gate-12-file-hygiene.sh +230 -0
- package/hooks/adapter-common.sh +27 -0
- package/hooks/gate-10.sh +105 -0
- package/hooks/gate-12-file-hygiene.sh +0 -0
- package/hooks/lib/validate-code-walkthrough.cjs +125 -0
- package/hooks/pre-commit +130 -33
- package/hooks/pre-push +15 -91
- package/lib/__tests__/check-version.test.js +67 -46
- package/lib/__tests__/doctor.test.js +7 -6
- package/lib/__tests__/gate-runner.test.js +267 -0
- package/lib/__tests__/init.test.js +32 -0
- package/lib/__tests__/npm-package.test.js +13 -0
- package/lib/__tests__/phase-transition.test.js +604 -12
- package/lib/__tests__/sprint-discovery.test.ts +0 -1
- package/lib/__tests__/sprint-status-rework.test.js +100 -1
- package/lib/__tests__/update-hooks.test.js +143 -10
- package/lib/__tests__/upgrade-exec.test.js +73 -45
- package/lib/__tests__/upgrade-skill-sync.test.js +1 -1
- package/lib/__tests__/upgrade.test.js +12 -11
- package/lib/doctor.js +2 -1
- package/lib/gate-runner.js +68 -23
- package/lib/init.js +34 -5
- package/lib/install-skill.js +1 -0
- package/lib/mattpocock-license-verdict.json +1 -1
- package/lib/phase-transition.js +203 -23
- package/lib/shared-paths.js +2 -0
- package/lib/sprint-status.js +15 -4
- package/lib/test-alignment.ts +3 -13
- package/lib/update-hooks.js +129 -15
- package/mock-policy/AGENTS.md +4 -4
- package/mock-policy/__tests__/gate-m3.test.ts +0 -5
- package/mock-policy/__tests__/scope-scanner.test.ts +8 -2
- package/mutation/AGENTS.md +3 -3
- package/mutation/__tests__/mutmut-runner.test.ts +443 -2
- package/mutation/__tests__/update-baseline.test.ts +0 -2
- package/mutation/runners/mutmut-runner.ts +67 -17
- package/package.json +9 -3
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/clipboard-vision/SKILL.md +47 -0
- package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/plugins/claude-code/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
- package/plugins/claude-code/skills/clipboard-vision/describe-clipboard.sh +161 -0
- package/plugins/claude-code/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/plugins/claude-code/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/plugins/claude-code/skills/delphi-review/.delphi-config.json.example +24 -27
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +12 -11
- package/plugins/claude-code/skills/delphi-review/INSTALL.md +15 -17
- package/plugins/claude-code/skills/delphi-review/SKILL.md +30 -29
- package/plugins/claude-code/skills/delphi-review/opencode.json.delphi.example +6 -10
- package/plugins/claude-code/skills/delphi-review/references/code-walkthrough.md +33 -49
- package/plugins/claude-code/skills/delphi-review/references/requirements.md +66 -54
- package/plugins/claude-code/skills/delphi-review/references/round-templates.md +7 -7
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +4 -4
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +4 -4
- package/plugins/claude-code/skills/sprint-flow/references/components/skill-invocations.md +2 -2
- package/plugins/claude-code/skills/sprint-flow/references/force-levels.md +37 -35
- package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/phase-1-prep.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/phase-2-design.md +24 -14
- package/plugins/claude-code/skills/sprint-flow/references/phase-4-verify.md +6 -6
- package/plugins/claude-code/skills/sprint-flow/references/phase-overview.md +2 -2
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/dsh/README.md +25 -0
- package/plugins/dsh/cordis.patch.yml +7 -0
- package/plugins/dsh/package.json +70 -0
- package/plugins/dsh/scripts/prepack.cjs +82 -0
- package/plugins/dsh/skills/admin-template-guidelines/SKILL.md +113 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-1.md +91 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-2.md +155 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-3.md +70 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-4.md +154 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-5.md +126 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-6.md +180 -0
- package/plugins/dsh/skills/batch-grill-me/SKILL.md +15 -0
- package/plugins/dsh/skills/clipboard-vision/SKILL.md +47 -0
- package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/plugins/dsh/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
- package/plugins/dsh/skills/clipboard-vision/describe-clipboard.sh +161 -0
- package/plugins/dsh/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/plugins/dsh/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/plugins/dsh/skills/delphi-review/.delphi-config.json.example +70 -0
- package/plugins/dsh/skills/delphi-review/AGENTS.md +67 -0
- package/plugins/dsh/skills/delphi-review/INSTALL.md +150 -0
- package/plugins/dsh/skills/delphi-review/SKILL.md +559 -0
- package/plugins/dsh/skills/delphi-review/hooks.md +19 -0
- package/plugins/dsh/skills/delphi-review/opencode.json.delphi.example +52 -0
- package/plugins/dsh/skills/delphi-review/references/code-walkthrough.md +470 -0
- package/plugins/dsh/skills/delphi-review/references/orchestrator-dispatch.md +64 -0
- package/plugins/dsh/skills/delphi-review/references/requirements.md +402 -0
- package/plugins/dsh/skills/delphi-review/references/round-templates.md +134 -0
- package/plugins/dsh/skills/delphi-review/scripts/verify-consensus.sh +43 -0
- package/plugins/dsh/skills/delphi-review/tools.md +29 -0
- package/plugins/dsh/skills/domain-modeling/ADR-FORMAT.md +64 -0
- package/plugins/dsh/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/plugins/dsh/skills/domain-modeling/SKILL.md +74 -0
- package/plugins/dsh/skills/grill-with-docs/SKILL.md +7 -0
- package/plugins/dsh/skills/grilling/SKILL.md +12 -0
- package/plugins/dsh/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/dsh/skills/ralph-loop/SKILL.md +198 -0
- package/plugins/dsh/skills/ralph-loop/references/components.md +113 -0
- package/plugins/dsh/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/dsh/skills/ralph-loop/references/workflow-details.md +99 -0
- package/plugins/dsh/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/dsh/skills/sprint-flow/AGENTS.md +103 -0
- package/plugins/dsh/skills/sprint-flow/SKILL.md +411 -0
- package/plugins/dsh/skills/sprint-flow/__tests__/sprint-flow.test.cjs +457 -0
- package/plugins/dsh/skills/sprint-flow/hooks.md +18 -0
- package/plugins/dsh/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/dsh/skills/sprint-flow/references/components/middleware.md +75 -0
- package/plugins/dsh/skills/sprint-flow/references/components/skill-invocations.md +105 -0
- package/plugins/dsh/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/dsh/skills/sprint-flow/references/components/tool-descriptions.md +95 -0
- package/plugins/dsh/skills/sprint-flow/references/force-levels.md +204 -0
- package/plugins/dsh/skills/sprint-flow/references/orchestration-rules.md +236 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-1-prep.md +294 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-2-design.md +273 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-3-build.md +348 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-4-verify.md +225 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-5-ship.md +222 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-6-close.md +266 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-overview.md +486 -0
- package/plugins/dsh/skills/sprint-flow/scripts/verify-sprint-state.sh +38 -0
- package/plugins/dsh/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/dsh/skills/sprint-flow/templates/auto-estimate-output-template.md +110 -0
- package/plugins/dsh/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/dsh/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/dsh/skills/sprint-flow/templates/sprint-progress-template.md +140 -0
- package/plugins/dsh/skills/sprint-flow/templates/sprint-summary-template.md +121 -0
- package/plugins/dsh/skills/sprint-flow/tools.md +29 -0
- package/plugins/dsh/skills/test-driven-development/SKILL.md +371 -0
- package/plugins/dsh/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/dsh/skills/test-specification-alignment/SKILL.md +205 -0
- package/plugins/dsh/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/dsh/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/dsh/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/dsh/skills/to-issues/SKILL.md +277 -0
- package/plugins/dsh/src/command.test.ts +102 -0
- package/plugins/dsh/src/command.ts +75 -0
- package/plugins/dsh/src/contract.test.ts +62 -0
- package/plugins/dsh/src/gate-runner.test.ts +100 -0
- package/plugins/dsh/src/gate-runner.ts +58 -0
- package/plugins/dsh/src/index.test.ts +97 -0
- package/plugins/dsh/src/index.ts +94 -0
- package/plugins/dsh/src/skills.test.ts +58 -0
- package/plugins/dsh/tsconfig.build.json +13 -0
- package/plugins/dsh/tsconfig.json +19 -0
- package/plugins/dsh/vitest.config.ts +8 -0
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/scripts/prepack.cjs +1 -0
- package/plugins/opencode/skills/clipboard-vision/SKILL.md +47 -0
- package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/plugins/opencode/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
- package/plugins/opencode/skills/clipboard-vision/describe-clipboard.sh +161 -0
- package/plugins/opencode/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/plugins/opencode/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/plugins/opencode/skills/delphi-review/.delphi-config.json.example +24 -27
- package/plugins/opencode/skills/delphi-review/AGENTS.md +12 -11
- package/plugins/opencode/skills/delphi-review/INSTALL.md +15 -17
- package/plugins/opencode/skills/delphi-review/SKILL.md +30 -29
- package/plugins/opencode/skills/delphi-review/opencode.json.delphi.example +6 -10
- package/plugins/opencode/skills/delphi-review/references/code-walkthrough.md +33 -49
- package/plugins/opencode/skills/delphi-review/references/requirements.md +66 -54
- package/plugins/opencode/skills/delphi-review/references/round-templates.md +7 -7
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +4 -4
- package/plugins/opencode/skills/sprint-flow/SKILL.md +4 -4
- package/plugins/opencode/skills/sprint-flow/references/components/skill-invocations.md +2 -2
- package/plugins/opencode/skills/sprint-flow/references/force-levels.md +37 -35
- package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/phase-1-prep.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/phase-2-design.md +24 -14
- package/plugins/opencode/skills/sprint-flow/references/phase-4-verify.md +6 -6
- package/plugins/opencode/skills/sprint-flow/references/phase-overview.md +2 -2
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/clipboard-vision/SKILL.md +47 -0
- package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/SKILL.md +47 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/plugins/qoder/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/plugins/qoder/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/plugins/qoder/skills/delphi-review/.delphi-config.json.example +3 -11
- package/plugins/qoder/skills/delphi-review/AGENTS.md +14 -16
- package/plugins/qoder/skills/delphi-review/INSTALL.md +12 -12
- package/plugins/qoder/skills/delphi-review/SKILL.md +58 -25
- package/plugins/qoder/skills/delphi-review/opencode.json.delphi.example +1 -1
- package/plugins/qoder/skills/delphi-review/references/code-walkthrough.md +33 -49
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +4 -4
- package/plugins/qoder/skills/sprint-flow/SKILL.md +2 -2
- package/plugins/qoder/skills/sprint-flow/references/force-levels.md +38 -35
- package/plugins/qoder/skills/sprint-flow/references/phase-1-prep.md +1 -1
- package/plugins/qoder/skills/sprint-flow/references/phase-2-design.md +48 -6
- package/plugins/qoder/skills/sprint-flow/references/phase-4-verify.md +5 -6
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
- package/principles/AGENTS.md +3 -3
- package/scripts/__tests__/sync-package-content.test.js +30 -0
- package/scripts/delphi-external-review.cjs +194 -63
- package/scripts/sync-package-content.js +9 -2
- package/skills/clipboard-vision/SKILL.md +47 -0
- package/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
- package/skills/clipboard-vision/describe-clipboard.sh +161 -0
- package/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/skills/delphi-review/.delphi-config.json.example +24 -27
- package/skills/delphi-review/AGENTS.md +12 -11
- package/skills/delphi-review/INSTALL.md +15 -17
- package/skills/delphi-review/SKILL.md +30 -29
- package/skills/delphi-review/opencode.json.delphi.example +6 -10
- package/skills/delphi-review/references/code-walkthrough.md +33 -49
- package/skills/delphi-review/references/requirements.md +66 -54
- package/skills/delphi-review/references/round-templates.md +7 -7
- package/skills/sprint-flow/AGENTS.md +4 -4
- package/skills/sprint-flow/SKILL.md +4 -4
- package/skills/sprint-flow/references/components/skill-invocations.md +2 -2
- package/skills/sprint-flow/references/force-levels.md +37 -35
- package/skills/sprint-flow/references/orchestration-rules.md +1 -1
- package/skills/sprint-flow/references/phase-1-prep.md +1 -1
- package/skills/sprint-flow/references/phase-2-design.md +24 -14
- package/skills/sprint-flow/references/phase-4-verify.md +6 -6
- package/skills/sprint-flow/references/phase-overview.md +2 -2
- package/skills/test-specification-alignment/AGENTS.md +3 -3
- package/sprint-gate.sh +291 -0
|
@@ -5,10 +5,10 @@ This guide walks you through setting up the Delphi consensus review skill in you
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
7
|
- OpenCode installed and configured
|
|
8
|
-
-
|
|
9
|
-
-
|
|
8
|
+
- Exactly **3 callable expert model configurations** are required.
|
|
9
|
+
- The three configurations must use distinct trimmed executable model IDs. They may share one provider and token plan.
|
|
10
10
|
|
|
11
|
-
>
|
|
11
|
+
> Provider, vendor, gateway, and model nationality are unrestricted. The enforced diversity boundary is three distinct requested model IDs, not provider diversity.
|
|
12
12
|
|
|
13
13
|
## Quick Setup (3 steps)
|
|
14
14
|
|
|
@@ -32,11 +32,8 @@ Then replace the provider/model placeholders:
|
|
|
32
32
|
"model": "YOUR_PROVIDER/YOUR_MODEL_A"
|
|
33
33
|
|
|
34
34
|
// After (your config):
|
|
35
|
-
"model": "
|
|
36
|
-
//
|
|
37
|
-
"model": "anthropic/claude-sonnet-4-20250514"
|
|
38
|
-
// or
|
|
39
|
-
"model": "bailian-coding-plan/qwen3.6-plus"
|
|
35
|
+
"model": "bailian-tp/qwen-plus"
|
|
36
|
+
// The other two role model fields must be different trimmed IDs.
|
|
40
37
|
```
|
|
41
38
|
|
|
42
39
|
### Step 3: Ensure provider configuration exists
|
|
@@ -73,7 +70,7 @@ For custom providers (like Ali Bailian), add a provider entry:
|
|
|
73
70
|
|
|
74
71
|
## Model Recommendations
|
|
75
72
|
|
|
76
|
-
The skill requires
|
|
73
|
+
The skill requires exactly three experts for every mode. Choose three models that are callable through your configured provider.
|
|
77
74
|
|
|
78
75
|
| Expert Role | Recommended | Alternatives |
|
|
79
76
|
|-------------|-------------|-------------|
|
|
@@ -81,10 +78,11 @@ The skill requires at least 2 experts for code changes, 3 for architecture decis
|
|
|
81
78
|
| **Technical (Expert B)** | Claude Haiku | Qwen-Coder, DeepSeek-Coder, GPT-4o-mini |
|
|
82
79
|
| **Feasibility (Expert C)** | Claude Opus | GPT-4, Gemini 2.5 Pro, Qwen-Max |
|
|
83
80
|
|
|
84
|
-
**Minimum viable setup
|
|
85
|
-
- Expert A:
|
|
86
|
-
- Expert B:
|
|
87
|
-
-
|
|
81
|
+
**Minimum viable setup**:
|
|
82
|
+
- Expert A: architecture model
|
|
83
|
+
- Expert B: technical model
|
|
84
|
+
- Expert C: feasibility model
|
|
85
|
+
- All three requested model IDs must be distinct. A `provider: local` fallback does not count.
|
|
88
86
|
|
|
89
87
|
## Configuration File Reference
|
|
90
88
|
|
|
@@ -92,13 +90,13 @@ The skill requires at least 2 experts for code changes, 3 for architecture decis
|
|
|
92
90
|
|
|
93
91
|
| Field | Description | Default |
|
|
94
92
|
|-------|-------------|---------|
|
|
95
|
-
| `num_experts` | Number of experts to use
|
|
93
|
+
| `num_experts` | Number of experts to use | 3, fixed |
|
|
96
94
|
| `experts.architecture` | Architecture reviewer configuration | Required |
|
|
97
95
|
| `experts.technical` | Technical reviewer configuration | Required |
|
|
98
96
|
| `experts.feasibility` | Feasibility reviewer configuration | Required for 3-expert mode |
|
|
99
97
|
| `consensus.threshold_percent` | Agreement threshold | 90 |
|
|
100
98
|
| `consensus.max_review_rounds` | Maximum review rounds | 5 |
|
|
101
|
-
| `consensus.cross_provider_required` |
|
|
99
|
+
| `consensus.cross_provider_required` | Deprecated and ignored; emits `cross_provider_required_ignored` | false or omitted |
|
|
102
100
|
|
|
103
101
|
### `opencode.json` agent block
|
|
104
102
|
|
|
@@ -133,11 +131,11 @@ You forgot to replace the placeholder. Search for `YOUR_PROVIDER` in your openco
|
|
|
133
131
|
|
|
134
132
|
### Both experts gave identical feedback
|
|
135
133
|
|
|
136
|
-
|
|
134
|
+
Shared providers are allowed. Configure three distinct executable model IDs and verify all three calls succeed.
|
|
137
135
|
|
|
138
136
|
### Review takes too long / costs too much
|
|
139
137
|
|
|
140
|
-
|
|
138
|
+
Do not reduce the expert count. Use three callable models and keep the threshold and round bounds unchanged.
|
|
141
139
|
|
|
142
140
|
## Advanced: JSON Schema Validation
|
|
143
141
|
|
|
@@ -4,8 +4,8 @@ version: 1.1.0
|
|
|
4
4
|
description: >
|
|
5
5
|
Performs multi-round anonymous expert consensus review using the Delphi method. Supports
|
|
6
6
|
design review (default), code-walkthrough (--mode code-walkthrough), and requirements
|
|
7
|
-
(lightweight, --mode requirements) modes. Uses
|
|
8
|
-
model
|
|
7
|
+
(lightweight, --mode requirements) modes. Uses exactly three experts with distinct executable
|
|
8
|
+
model IDs and a >=90% statistical consensus threshold.
|
|
9
9
|
Outputs structured verdict (APPROVED/PASS_WITH_CAVEATS/REQUEST_CHANGES/BLOCKED).
|
|
10
10
|
|
|
11
11
|
WHAT: Anonymous multi-expert review with iterative consensus building for designs, plans,
|
|
@@ -187,9 +187,9 @@ tools_denied:
|
|
|
187
187
|
|
|
188
188
|
**In Scope:**
|
|
189
189
|
- Multi-round anonymous expert consensus review (design + code-walkthrough modes)
|
|
190
|
-
-
|
|
190
|
+
- Exactly three experts with distinct normalized executable model IDs and statistical consensus (>= 90%)
|
|
191
191
|
- Structured verdict: APPROVED / PASS_WITH_CAVEATS / REQUEST_CHANGES
|
|
192
|
-
-
|
|
192
|
+
- Model nationality, vendor, provider, and gateway are unrestricted.
|
|
193
193
|
|
|
194
194
|
**Out of Scope:**
|
|
195
195
|
- Does NOT implement code changes (review only, implementation is separate)
|
|
@@ -248,12 +248,12 @@ tools_denied:
|
|
|
248
248
|
## Workflow
|
|
249
249
|
|
|
250
250
|
1. **Step 0: Input Validation** — Check input contains reviewable content (design doc/code/spec/diff). Empty input → `[DelphiReview:BLOCKED]`.
|
|
251
|
-
2. **Round 1: Anonymous Independent Review** —
|
|
252
|
-
3. **
|
|
253
|
-
4. **
|
|
254
|
-
5. **
|
|
255
|
-
6. **
|
|
256
|
-
7. **Generate Output** —
|
|
251
|
+
2. **Round 1: Anonymous Independent Review** — Invoke architecture, technical, and feasibility independently without exposing their opinions to one another. Every successful result must use `result_type=delphi_expert_result`.
|
|
252
|
+
3. **Execution Verification** — Verify that all three results succeeded and that their `requested_model` values are three distinct trimmed IDs. A local fallback (`provider: local`) is not an executed expert and cannot satisfy this check; a local hosted endpoint configured as an ordinary callable provider can.
|
|
253
|
+
4. **Consensus Check** — Aggregate all three successful expert results. Consensus >=90% AND all APPROVED → complete. One expert result is never global approval.
|
|
254
|
+
5. **Rounds 2-5: Exchange and Final Positions** — If needed, expose prior aggregate evidence, re-evaluate, and stop at the first approved consensus or after five rounds.
|
|
255
|
+
6. **Failure Handling** — Any expert failure, missing result, duplicate model ID, or unverifiable execution blocks the review. Do not substitute a local fallback or silently reduce the expert count.
|
|
256
|
+
7. **Generate Output** — Write the consensus report and mode-specific evidence only after aggregation. For code walkthrough, bind the exact-HEAD result after aggregation.
|
|
257
257
|
|
|
258
258
|
## Activation (MANDATORY for L1 Trigger Detection)
|
|
259
259
|
|
|
@@ -277,7 +277,7 @@ Each round MUST output a structured round marker:
|
|
|
277
277
|
|
|
278
278
|
**Rules**:
|
|
279
279
|
- Every round marker MUST appear as a separate, identifiable line
|
|
280
|
-
- Round numbering MUST be sequential (1
|
|
280
|
+
- Round numbering MUST be sequential (1 through at most 5)
|
|
281
281
|
- After each round, output consensus summary: `consensus_ratio=N/N`, `verdict_status: converging | stable | diverging`
|
|
282
282
|
- Final round MUST output verdict: `APPROVED | PASS_WITH_CAVEATS | REQUEST_CHANGES | PROCESS_BLOCK`
|
|
283
283
|
|
|
@@ -316,16 +316,16 @@ Each round MUST output a structured round marker:
|
|
|
316
316
|
|
|
317
317
|
| 配置 | 专家 | 适用场景 |
|
|
318
318
|
|------|------|---------|
|
|
319
|
-
|
|
|
320
|
-
| 3 专家 | A(架构) + B(实现) + C(可行性) | 架构决策、需求文档 |
|
|
319
|
+
| 3 专家(固定) | A(架构) + B(实现) + C(可行性) | 所有评审模式 |
|
|
321
320
|
|
|
322
321
|
### 模型选择策略(强制 — 平台适配)
|
|
323
322
|
|
|
324
323
|
**关键原则**:
|
|
325
|
-
- ✅
|
|
326
|
-
-
|
|
327
|
-
-
|
|
328
|
-
-
|
|
324
|
+
- ✅ 必须配置 architecture、technical、feasibility 三个专家角色
|
|
325
|
+
- ✅ 三个角色必须使用三个不同的 trimmed、可执行模型 ID
|
|
326
|
+
- ✅ 模型国籍、厂商、provider 和 gateway 不受限制
|
|
327
|
+
- ✅ 三个角色可以共享一个 provider 和 token 计划
|
|
328
|
+
- ❌ `provider: local` 的特殊 fallback 不能计为一次成功执行
|
|
329
329
|
|
|
330
330
|
#### Qoder 平台(推荐 — Custom Agent 模式)
|
|
331
331
|
|
|
@@ -345,7 +345,7 @@ Qoder 环境下使用 **Custom Agent** 机制,每个专家是一个独立的 c
|
|
|
345
345
|
|
|
346
346
|
OpenCode 环境下通过 `opencode.json` 的 agent 配置 + `.delphi-config.json` 调用外部 API:
|
|
347
347
|
- **MUST 从 `opencode.json` 的 agent 配置中读取模型**
|
|
348
|
-
- 通过 `scripts/delphi-external-review.cjs` 调用各 provider
|
|
348
|
+
- 通过 `scripts/delphi-external-review.cjs` 调用各 provider 的兼容 API
|
|
349
349
|
- 需要用户自行配置 API key(环境变量注入)
|
|
350
350
|
|
|
351
351
|
### 共识阈值
|
|
@@ -418,10 +418,7 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
418
418
|
|
|
419
419
|
## Output Format (MANDATORY for L3)
|
|
420
420
|
|
|
421
|
-
|
|
422
|
-
- **Multi-Expert Mode (default)**: MUST use the full JSON schema below. Each expert outputs independently; the orchestrator aggregates into `consensus_report`.
|
|
423
|
-
- **Single Reviewer Mode** (explicit `--single`): MAY use simplified text template: `[DelphiReview] verdict=APPROVED|REQUEST_CHANGES|BLOCKED confidence=N/10 issues=[critical:N, major:N, minor:N] summary: [1-2 sentences]`.
|
|
424
|
-
- **Never mix formats**.
|
|
421
|
+
Every Delphi mode MUST use the full JSON schema below. Architecture, technical, and feasibility each output independently; the orchestrator verifies all three executions before aggregating `consensus_report`. There is no single-reviewer Delphi approval path.
|
|
425
422
|
|
|
426
423
|
```json
|
|
427
424
|
{
|
|
@@ -451,13 +448,15 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
451
448
|
"mode": "requirements",
|
|
452
449
|
"verdict": "APPROVED|GAPS_FOUND",
|
|
453
450
|
"timestamp": "2026-07-25T10:30:00Z",
|
|
451
|
+
"consensus_ratio": 1.0,
|
|
454
452
|
"requirements_hash": "<SHA-256 hex digest>",
|
|
455
453
|
"head_commit": "<git rev-parse HEAD>",
|
|
456
454
|
"context_file_used": "CONTEXT.md",
|
|
457
455
|
"round": 1,
|
|
458
456
|
"expert_verdicts": [
|
|
459
|
-
{ "role": "architecture", "verdict": "APPROVED", "confidence": 9 },
|
|
460
|
-
{ "role": "
|
|
457
|
+
{ "role": "architecture", "verdict": "APPROVED", "confidence": 9, "result_type": "delphi_expert_result", "requested_model": "provider/model-a" },
|
|
458
|
+
{ "role": "technical", "verdict": "APPROVED", "confidence": 8, "result_type": "delphi_expert_result", "requested_model": "provider/model-b" },
|
|
459
|
+
{ "role": "feasibility", "verdict": "APPROVED", "confidence": 8, "result_type": "delphi_expert_result", "requested_model": "provider/model-c" }
|
|
461
460
|
],
|
|
462
461
|
"requirements_statement": "<short summary of what was reviewed>",
|
|
463
462
|
"gaps_found": [],
|
|
@@ -466,6 +465,8 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
466
465
|
}
|
|
467
466
|
```
|
|
468
467
|
|
|
468
|
+
Schema-v2 Phase 2 requires `requirements_statement`, `timestamp`, `consensus_ratio`, `expert_verdicts`, `head_commit`, and `requirements_hash`. The hash is SHA-256 of the exact concatenation `requirements_statement + project-relative context file UTF-8 content if used + timestamp YYYY-MM-DD`; context paths must remain inside the project after realpath resolution.
|
|
469
|
+
|
|
469
470
|
**Anti-patterns mapping:**
|
|
470
471
|
- `Round 1 → "评审完成"` → MUST NOT have `verdict: APPROVED` if `critical_issues` exist
|
|
471
472
|
- `只处理 Critical,忽略 Major` → MUST include `major_concerns` array
|
|
@@ -476,7 +477,7 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
476
477
|
## Terminal State Checklist
|
|
477
478
|
|
|
478
479
|
- [ ] Phase 0 完成(文档验证 + 专家分配)
|
|
479
|
-
- [ ]
|
|
480
|
+
- [ ] 已完成所需轮次(最多 5 轮,每轮三位专家均执行)
|
|
480
481
|
- [ ] 问题共识比例 >=90%
|
|
481
482
|
- [ ] 所有 Critical Issues 已解决,Major Concerns 已处理
|
|
482
483
|
- [ ] 最终裁决是 **APPROVED** 或 **APPROVED_WITH_MINOR**
|
|
@@ -512,11 +513,11 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
512
513
|
|---------|---------|
|
|
513
514
|
| Round 1 未 APPROVED 就"评审完成" | 迭代直到 APPROVED,修复后重新评审 |
|
|
514
515
|
| 只处理 Critical,忽略 Major | 零容忍:Critical/Major 全部必须处理 |
|
|
515
|
-
| 单专家自评 |
|
|
516
|
+
| 单专家自评 | 必须运行 architecture、technical、feasibility 三位专家,并聚合三份成功结果 |
|
|
516
517
|
| 用户说"时间紧急"就跳过 | 评审是投资不是开销 |
|
|
517
518
|
| "专家几乎一致"就通过 | "几乎" = 不一致,继续到 >=90% |
|
|
518
|
-
|
|
|
519
|
-
|
|
|
519
|
+
| 使用任何国籍或厂商的模型 | 模型国籍和厂商均不受限制,仍必须满足三个 distinct executable model IDs |
|
|
520
|
+
| 三个专家同一 provider | 允许共享 provider,只要三个 requested_model IDs distinct 且每个调用成功 |
|
|
520
521
|
|
|
521
522
|
**Code-walkthrough 专属 Anti-Patterns** → 详见 `references/code-walkthrough.md`
|
|
522
523
|
|
|
@@ -531,7 +532,7 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
531
532
|
| 要求跳过评审 | "skip review", "不用评审", "跳过评审" | → 提醒评审是投资而非开销 |
|
|
532
533
|
| 时间压力 | "来不及", "时间紧", "emergency" | → 提醒时间紧迫正是需要评审的时刻 |
|
|
533
534
|
| 提前终止 | Round 1 后用户说 "可以了", "够了" | → BLOCK: 评审未达终止条件 |
|
|
534
|
-
| 单专家自评 | 用户仅指定 1 个专家 | →
|
|
535
|
+
| 单专家自评 | 用户仅指定 1 个专家 | → BLOCK:Delphi 必须执行 architecture、technical、feasibility 三位专家 |
|
|
535
536
|
| 无文档输入 | 仅触发词,无设计/代码内容 | → `[DelphiReview:BLOCKED]` |
|
|
536
537
|
|
|
537
538
|
---
|
|
@@ -3,23 +3,19 @@
|
|
|
3
3
|
"Delphi Review Agent Configuration Template",
|
|
4
4
|
"===========================================",
|
|
5
5
|
"Copy the relevant 'agent' block below into your opencode.json.",
|
|
6
|
-
"Replace
|
|
7
|
-
"
|
|
6
|
+
"Replace the example model IDs with three callable IDs available through your configured provider.",
|
|
7
|
+
"The three model fields must be different after trimming; providers may be shared."
|
|
8
8
|
],
|
|
9
9
|
|
|
10
10
|
"$example_providers": {
|
|
11
|
-
"
|
|
12
|
-
"Anthropic": "anthropic/claude-sonnet-4-20250514",
|
|
13
|
-
"Ali_Bailian": "bailian-coding-plan/qwen3.6-plus",
|
|
14
|
-
"Google_Gemini": "google/gemini-2.5-pro",
|
|
15
|
-
"DeepSeek": "deepseek/deepseek-chat"
|
|
11
|
+
"SharedProviderExample": "bailian-tp/qwen-plus"
|
|
16
12
|
},
|
|
17
13
|
|
|
18
14
|
"agent": {
|
|
19
15
|
"delphi-reviewer-architecture": {
|
|
20
16
|
"description": "Delphi expert reviewer for architecture perspective. Focuses on requirements alignment, system design, and high-level coherence.",
|
|
21
17
|
"mode": "subagent",
|
|
22
|
-
"model": "
|
|
18
|
+
"model": "bailian-tp/qwen-plus",
|
|
23
19
|
"prompt": "You are a Delphi expert reviewer specializing in architecture and requirements alignment. Review the input for: 1) Alignment with stated goals 2) Architectural coherence 3) System-level implications 4) Trade-offs and alternatives. Output structured review with verdict (APPROVED/REQUEST_CHANGES/REJECTED) and confidence level.",
|
|
24
20
|
"tools": {
|
|
25
21
|
"read": true,
|
|
@@ -31,7 +27,7 @@
|
|
|
31
27
|
"delphi-reviewer-technical": {
|
|
32
28
|
"description": "Delphi expert reviewer for technical depth. Focuses on implementation details, code correctness, and edge cases. Used in delphi-review.",
|
|
33
29
|
"mode": "subagent",
|
|
34
|
-
"model": "
|
|
30
|
+
"model": "bailian-tp/deepseek-v3",
|
|
35
31
|
"prompt": "You are a Delphi expert reviewer specializing in technical implementation. Review the input for: 1) Implementation correctness 2) Code quality and patterns 3) Edge cases and error handling 4) Performance implications. Output structured review with verdict (APPROVED/REQUEST_CHANGES/REJECTED) and confidence level.",
|
|
36
32
|
"tools": {
|
|
37
33
|
"read": true,
|
|
@@ -43,7 +39,7 @@
|
|
|
43
39
|
"delphi-reviewer-feasibility": {
|
|
44
40
|
"description": "Delphi expert reviewer for feasibility analysis. Focuses on practical constraints, risks, and execution viability. Used in delphi-review.",
|
|
45
41
|
"mode": "subagent",
|
|
46
|
-
"model": "
|
|
42
|
+
"model": "bailian-tp/glm-4.5",
|
|
47
43
|
"prompt": "You are a Delphi expert reviewer specializing in feasibility and risk analysis. Review the input for: 1) Practical constraints (time, resources, dependencies) 2) Risk identification and mitigation 3) Execution complexity 4) Alternative approaches. Output structured review with verdict (APPROVED/REQUEST_CHANGES/REJECTED) and confidence level.",
|
|
48
44
|
"tools": {
|
|
49
45
|
"read": true,
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
## Five Core Properties
|
|
16
16
|
|
|
17
|
-
1. **匿名性** — Expert A/B 互不知道对方意见
|
|
17
|
+
1. **匿名性** — Expert A/B/C 在 Round 1 互不知道对方意见
|
|
18
18
|
2. **迭代共识** — 多轮直到 APPROVED
|
|
19
19
|
3. **零容忍** — Critical Issues 必须修复
|
|
20
20
|
4. **零降级** — 环境/资源问题必须阻断,通知用户解决
|
|
21
|
-
5. **强制覆盖** —
|
|
21
|
+
5. **强制覆盖** — 变更必须完整评审;大型变更由用户选择完整评审或在评审前拆分
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -72,11 +72,13 @@ pre-push hook
|
|
|
72
72
|
│ │
|
|
73
73
|
│ ├─→ Expert B (实现 + 代码质量) 匿名评审 (含 principles_findings)
|
|
74
74
|
│ │
|
|
75
|
+
│ ├─→ Expert C (可行性) 匿名评审 (含 principles_findings)
|
|
76
|
+
│ │
|
|
75
77
|
│ ├─→ 共识检查
|
|
76
78
|
│ │ │
|
|
77
|
-
│ │ ├─→
|
|
79
|
+
│ │ ├─→ 三份成功结果、三个 distinct requested_model、≥90% → 允许推送
|
|
78
80
|
│ │ │
|
|
79
|
-
│ │ ├─→ 分歧 →
|
|
81
|
+
│ │ ├─→ 分歧 → 继续下一轮(最多 5 轮)
|
|
80
82
|
│ │ │
|
|
81
83
|
│ │ └─→ REQUEST_CHANGES → 阻塞推送
|
|
82
84
|
│ │
|
|
@@ -93,9 +95,9 @@ pre-push hook
|
|
|
93
95
|
|------|------|------|
|
|
94
96
|
| Expert A | 架构 + 设计评审 | `.delphi-config.json` → `experts.architecture` |
|
|
95
97
|
| Expert B | 实现 + 代码质量 | `.delphi-config.json` → `experts.technical` |
|
|
96
|
-
| Expert C
|
|
98
|
+
| Expert C | 可行性评审 | `.delphi-config.json` → `experts.feasibility` |
|
|
97
99
|
|
|
98
|
-
>
|
|
100
|
+
> 必须成功执行三个专家角色,并验证三个 distinct trimmed requested_model。Provider、vendor、gateway 和模型国籍均不受限制。`provider: local` fallback 不能计数,local hosted endpoint 可作为普通 callable provider。
|
|
99
101
|
|
|
100
102
|
---
|
|
101
103
|
|
|
@@ -171,8 +173,9 @@ pre-push hook
|
|
|
171
173
|
│ │
|
|
172
174
|
│ └─→ Step 2: Delphi Code Walkthrough
|
|
173
175
|
│ │
|
|
174
|
-
│ ├─→ Expert A 评审 (含 principles_findings)
|
|
175
|
-
│ ├─→ Expert B 评审 (含 principles_findings)
|
|
176
|
+
│ ├─→ Expert A / architecture 评审 (含 principles_findings)
|
|
177
|
+
│ ├─→ Expert B / technical 评审 (含 principles_findings)
|
|
178
|
+
│ ├─→ Expert C / feasibility 评审 (含 principles_findings)
|
|
176
179
|
│ └─→ 共识检查
|
|
177
180
|
│
|
|
178
181
|
└─→ 允许/阻塞推送
|
|
@@ -237,10 +240,10 @@ pre-push hook
|
|
|
237
240
|
|
|
238
241
|
| 条件 | 结果 |
|
|
239
242
|
|------|------|
|
|
240
|
-
|
|
|
241
|
-
|
|
|
242
|
-
|
|
|
243
|
-
|
|
|
243
|
+
| 三份成功结果、三个 distinct requested_model、≥90% 且无 Critical Issues | ✅ 允许推送 |
|
|
244
|
+
| 三份成功结果、≥90% 且有 Minor Issues | ✅ 允许推送(记录问题) |
|
|
245
|
+
| 任一专家失败、缺失或模型重复 | ❌ 阻塞推送 |
|
|
246
|
+
| 共识不足或有 Critical Issues | ❌ 阻塞推送 |
|
|
244
247
|
| 有 Critical Issues | ❌ 阻塞推送 |
|
|
245
248
|
| 有 Major Issues 且未处理 | ❌ 阻塞推送 |
|
|
246
249
|
|
|
@@ -251,26 +254,9 @@ pre-push hook
|
|
|
251
254
|
| 指标 | 阈值 | 处理 |
|
|
252
255
|
|------|------|------|
|
|
253
256
|
| 单次走查成本 | ~$0.03 | 正常执行 |
|
|
254
|
-
|
|
|
255
|
-
| 最大 diff 行数 | 500 行 | 超过 → **BLOCK** |
|
|
257
|
+
| 变更规模 | 无硬性文件数或行数上限 | 大型变更必须完整评审或由用户选择拆分 |
|
|
256
258
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
```
|
|
260
|
-
IF 超过阈值:
|
|
261
|
-
→ BLOCK 推送
|
|
262
|
-
→ 通知用户:变更过大,无法有效评审
|
|
263
|
-
→ 用户选项:
|
|
264
|
-
A. 拆分变更(推荐)
|
|
265
|
-
B. 用户明确授权跳过走查(需书面确认风险)
|
|
266
|
-
|
|
267
|
-
❌ 禁止自动跳过走查
|
|
268
|
-
❌ 禁止自动分批并批准
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
**设计原则**:
|
|
272
|
-
- 大变更跳过评审 = 质量风险泄露到生产环境
|
|
273
|
-
- 用户有权决定是否接受风险,AI 不能自动跳过
|
|
259
|
+
大型变更没有自动跳过或绕过路径。用户可以选择完整评审,或在评审前主动拆分变更;每个变更仍须通过完整的走查和证据验证。
|
|
274
260
|
|
|
275
261
|
---
|
|
276
262
|
|
|
@@ -282,7 +268,7 @@ IF 超过阈值:
|
|
|
282
268
|
BEFORE code walkthrough:
|
|
283
269
|
├─ 检查 Expert A 模型可用性
|
|
284
270
|
├─ 检查 Expert B 模型可用性
|
|
285
|
-
├─ 检查 Expert C
|
|
271
|
+
├─ 检查 Expert C 模型可用性
|
|
286
272
|
└─ 检查 OpenCode CLI 可用性
|
|
287
273
|
|
|
288
274
|
IF 任何检查失败:
|
|
@@ -296,8 +282,7 @@ IF 任何检查失败:
|
|
|
296
282
|
|
|
297
283
|
| 情况 | 处理 |
|
|
298
284
|
|------|------|
|
|
299
|
-
|
|
|
300
|
-
| Expert B API 错误 | BLOCK + 提示用户检查 API key |
|
|
285
|
+
| 任一专家 API 错误 | BLOCK + 提示用户检查 provider/API key |
|
|
301
286
|
| OpenCode CLI 缺失 | BLOCK + 提示用户安装 OpenCode |
|
|
302
287
|
|
|
303
288
|
---
|
|
@@ -305,7 +290,7 @@ IF 任何检查失败:
|
|
|
305
290
|
## Expert 评审输出格式
|
|
306
291
|
|
|
307
292
|
```markdown
|
|
308
|
-
## Code Walkthrough - Expert [A/B]
|
|
293
|
+
## Code Walkthrough - Expert [A/B/C]
|
|
309
294
|
|
|
310
295
|
### 变更摘要
|
|
311
296
|
[变更的主要内容]
|
|
@@ -340,6 +325,7 @@ IF 任何检查失败:
|
|
|
340
325
|
### 专家意见汇总
|
|
341
326
|
- Expert A: [APPROVED / REQUEST_CHANGES]
|
|
342
327
|
- Expert B: [APPROVED / REQUEST_CHANGES]
|
|
328
|
+
- Expert C: [APPROVED / REQUEST_CHANGES]
|
|
343
329
|
|
|
344
330
|
### 共识结果
|
|
345
331
|
[CONSENSUS / DISAGREEMENT]
|
|
@@ -370,8 +356,9 @@ IF 任何检查失败:
|
|
|
370
356
|
"verdict": "APPROVED",
|
|
371
357
|
"confidence": 9,
|
|
372
358
|
"experts": [
|
|
373
|
-
{ "id": "Expert A", "verdict": "APPROVED", "confidence": 9 },
|
|
374
|
-
{ "id": "Expert B", "verdict": "APPROVED", "confidence": 8 }
|
|
359
|
+
{ "id": "Expert A", "role": "architecture", "verdict": "APPROVED", "confidence": 9, "result_type": "delphi_expert_result", "requested_model": "provider/model-a", "resolved_model": "provider/model-a" },
|
|
360
|
+
{ "id": "Expert B", "role": "technical", "verdict": "APPROVED", "confidence": 8, "result_type": "delphi_expert_result", "requested_model": "provider/model-b", "resolved_model": null },
|
|
361
|
+
{ "id": "Expert C", "role": "feasibility", "verdict": "APPROVED", "confidence": 8, "result_type": "delphi_expert_result", "requested_model": "provider/model-c", "resolved_model": "provider/model-c" }
|
|
375
362
|
],
|
|
376
363
|
"issues": [],
|
|
377
364
|
"consensus_ratio": 1.0,
|
|
@@ -409,7 +396,8 @@ Hook 验证以下条件(全部满足才允许 push):
|
|
|
409
396
|
2. JSON 格式有效
|
|
410
397
|
3. commit hash 匹配当前 HEAD
|
|
411
398
|
4. verdict = APPROVED
|
|
412
|
-
5. timestamp 未过期
|
|
399
|
+
5. timestamp 未过期
|
|
400
|
+
6. expires 必须是 timestamp 之后恰好 1 小时
|
|
413
401
|
|
|
414
402
|
---
|
|
415
403
|
|
|
@@ -430,8 +418,7 @@ Hook 验证以下条件(全部满足才允许 push):
|
|
|
430
418
|
| 错误 | 正确 |
|
|
431
419
|
|------|------|
|
|
432
420
|
| Expert 不可用时跳过走查 | BLOCK + 提示用户修复环境 |
|
|
433
|
-
|
|
|
434
|
-
| 超过阈值自动分批评审 | BLOCK + 用户决定是否拆分或授权跳过 |
|
|
421
|
+
| 大型变更 | 完整评审或由用户在评审前拆分 |
|
|
435
422
|
| OpenCode CLI 缺失时允许推送 | BLOCK + 提示用户安装 OpenCode |
|
|
436
423
|
| 模型 API 错误时降级单模型 | BLOCK + 提示用户检查 API 配置 |
|
|
437
424
|
| 未写入 `.code-walkthrough-result.json` 就声明完成 | MUST 写入结果文件后才能完成 |
|
|
@@ -443,15 +430,17 @@ Hook 验证以下条件(全部满足才允许 push):
|
|
|
443
430
|
|
|
444
431
|
**Pre-requisites (MANDATORY - BLOCK if missing):**
|
|
445
432
|
- [ ] OpenCode CLI 已安装且可用
|
|
446
|
-
- [ ]
|
|
447
|
-
- [ ]
|
|
448
|
-
- [ ] 变更大小在阈值内(文件 ≤20,行数 ≤500)
|
|
433
|
+
- [ ] 三个专家模型 API 均可用
|
|
434
|
+
- [ ] 变更已由用户选择完整评审或拆分为可审阅的变更
|
|
449
435
|
- [ ] Expert A 完成匿名评审
|
|
450
436
|
- [ ] Expert B 完成匿名评审
|
|
437
|
+
- [ ] Expert C 完成匿名评审
|
|
451
438
|
- [ ] 共识检查完成
|
|
452
439
|
|
|
453
440
|
**CRITICAL - 共识验证 (code-walkthrough):**
|
|
454
|
-
- [ ]
|
|
441
|
+
- [ ] 三个成功结果均为 `result_type=delphi_expert_result`
|
|
442
|
+
- [ ] 三个 `requested_model` trimmed 后 distinct
|
|
443
|
+
- [ ] 聚合共识 >=90%,并在 exact HEAD 上写入结果
|
|
455
444
|
- [ ] 无 Critical Issues 未解决
|
|
456
445
|
- [ ] 无 Major Issues 未处理(或有处理计划)
|
|
457
446
|
|
|
@@ -471,11 +460,6 @@ Hook 验证以下条件(全部满足才允许 push):
|
|
|
471
460
|
- **CANNOT 允许推送**
|
|
472
461
|
- **MUST 修复后重新走查**
|
|
473
462
|
|
|
474
|
-
**IF 超过大小阈值:**
|
|
475
|
-
- **CANNOT 允许推送**
|
|
476
|
-
- **MUST BLOCK 并提示拆分变更**
|
|
477
|
-
- **用户可明确授权跳过(需确认风险)**
|
|
478
|
-
|
|
479
463
|
**⭐ APPROVED 后必做 (code-walkthrough mode):写入结果文件**
|
|
480
464
|
|
|
481
465
|
IF mode == `code-walkthrough` AND 最终裁决是 APPROVED,评审完成后必须:
|