@boyingliu01/xp-gate 0.41.9 → 0.41.52
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/adapters/gate-3.sh +28 -1
- package/adapters/gate-6-layers.sh +18 -1
- package/bin/xp-gate.js +13 -0
- package/gate-3.sh +28 -1
- package/gate-6-layers.sh +18 -1
- package/gates/python-health.ts +74 -26
- package/gates/test-layers.ts +94 -9
- package/hooks/gate-3.sh +28 -1
- package/hooks/gate-6-layers.sh +18 -1
- package/hooks/gate-entries/gate-11-entry.sh +21 -0
- package/hooks/gate-entries/gate-2-entry.sh +15 -0
- package/hooks/install.sh +15 -3
- package/hooks/pre-commit +90 -13
- package/hooks/pre-push +10 -1
- package/hooks/sprint-gate.sh +101 -13
- package/lib/check-alignment-runner.cjs +97 -0
- package/lib/check.js +6 -0
- package/lib/crap-cli.js +14 -6
- package/lib/delphi-setup.js +13 -0
- package/lib/doctor-tui.js +205 -102
- package/lib/doctor.js +146 -7
- package/lib/gate-runner.js +14 -3
- package/lib/init-install.js +299 -0
- package/lib/init-languages.js +158 -0
- package/lib/init-manifest.js +165 -0
- package/lib/init-md-injection.js +58 -0
- package/lib/init.js +134 -500
- package/lib/install-skill.js +66 -1
- package/lib/layer-baseline.cjs +94 -0
- package/lib/mattpocock-license-verdict.json +7 -0
- package/lib/uninstall-skills.js +140 -0
- package/lib/uninstall.js +41 -100
- package/lib/update-skill.js +9 -1
- package/package.json +3 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/claude-code/skills/delphi-review/INSTALL.md +22 -3
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/definition-of-done.md +2 -2
- package/plugins/claude-code/skills/sprint-flow/references/phase-3-build.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/phase-4-verify.md +2 -2
- package/plugins/claude-code/skills/sprint-flow/references/phase-6-close.md +17 -0
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +1 -1
- package/plugins/dsh/lib/delphi-evidence.d.ts +59 -0
- package/plugins/dsh/lib/delphi-evidence.d.ts.map +1 -0
- package/plugins/dsh/lib/delphi-evidence.js +128 -0
- package/plugins/dsh/lib/delphi-finding.d.ts +123 -0
- package/plugins/dsh/lib/delphi-finding.d.ts.map +1 -0
- package/plugins/dsh/lib/delphi-finding.js +332 -0
- package/plugins/dsh/lib/delphi-findings-parse.d.ts +29 -0
- package/plugins/dsh/lib/delphi-findings-parse.d.ts.map +1 -0
- package/plugins/dsh/lib/delphi-findings-parse.js +138 -0
- package/plugins/dsh/lib/delphi-ledger.d.ts +55 -0
- package/plugins/dsh/lib/delphi-ledger.d.ts.map +1 -0
- package/plugins/dsh/lib/delphi-ledger.js +124 -0
- package/plugins/dsh/lib/delphi-run.d.ts +7 -0
- package/plugins/dsh/lib/delphi-run.d.ts.map +1 -1
- package/plugins/dsh/lib/delphi-run.js +48 -18
- package/plugins/dsh/lib/delphi-seats.d.ts +34 -0
- package/plugins/dsh/lib/delphi-seats.d.ts.map +1 -0
- package/plugins/dsh/lib/delphi-seats.js +40 -0
- package/plugins/dsh/lib/evidence.d.ts +21 -0
- package/plugins/dsh/lib/evidence.d.ts.map +1 -1
- package/plugins/dsh/lib/evidence.js +3 -0
- package/plugins/dsh/lib/index.d.ts.map +1 -1
- package/plugins/dsh/lib/index.js +12 -0
- package/plugins/dsh/package.json +1 -1
- package/plugins/dsh/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/dsh/skills/delphi-review/INSTALL.md +22 -3
- package/plugins/dsh/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/dsh/skills/sprint-flow/references/definition-of-done.md +2 -2
- package/plugins/dsh/skills/sprint-flow/references/phase-3-build.md +1 -1
- package/plugins/dsh/skills/sprint-flow/references/phase-4-verify.md +2 -2
- package/plugins/dsh/skills/sprint-flow/references/phase-6-close.md +17 -0
- package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +1 -1
- package/plugins/dsh/src/delphi-evidence.test.ts +100 -0
- package/plugins/dsh/src/delphi-evidence.ts +201 -0
- package/plugins/dsh/src/delphi-finding.test.ts +333 -0
- package/plugins/dsh/src/delphi-finding.ts +446 -0
- package/plugins/dsh/src/delphi-findings-parse.test.ts +100 -0
- package/plugins/dsh/src/delphi-findings-parse.ts +158 -0
- package/plugins/dsh/src/delphi-findings.test.ts +4 -0
- package/plugins/dsh/src/delphi-ledger.test.ts +210 -0
- package/plugins/dsh/src/delphi-ledger.ts +158 -0
- package/plugins/dsh/src/delphi-run.test.ts +71 -68
- package/plugins/dsh/src/delphi-run.ts +80 -24
- package/plugins/dsh/src/delphi-seats.test.ts +117 -0
- package/plugins/dsh/src/delphi-seats.ts +50 -0
- package/plugins/dsh/src/evidence-findings.test.ts +75 -0
- package/plugins/dsh/src/evidence.ts +25 -0
- package/plugins/dsh/src/index.ts +14 -0
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/opencode/skills/delphi-review/INSTALL.md +22 -3
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/definition-of-done.md +2 -2
- package/plugins/opencode/skills/sprint-flow/references/phase-3-build.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/phase-4-verify.md +2 -2
- package/plugins/opencode/skills/sprint-flow/references/phase-6-close.md +17 -0
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +1 -1
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/qoder/skills/delphi-review/INSTALL.md +22 -3
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/qoder/skills/sprint-flow/references/definition-of-done.md +2 -2
- package/plugins/qoder/skills/sprint-flow/references/phase-3-build.md +1 -1
- package/plugins/qoder/skills/sprint-flow/references/phase-4-verify.md +2 -2
- package/plugins/qoder/skills/sprint-flow/references/phase-6-close.md +17 -0
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +1 -1
- package/principles/index.ts +50 -1
- package/scripts/delphi-config-read.cjs +43 -6
- package/scripts/delphi-external-review.cjs +69 -12
- package/scripts/delphi-prompts.cjs +47 -1
- package/skills/delphi-review/AGENTS.md +1 -1
- package/skills/delphi-review/INSTALL.md +22 -3
- package/skills/sprint-flow/AGENTS.md +1 -1
- package/skills/sprint-flow/references/definition-of-done.md +2 -2
- package/skills/sprint-flow/references/phase-3-build.md +1 -1
- package/skills/sprint-flow/references/phase-4-verify.md +2 -2
- package/skills/sprint-flow/references/phase-6-close.md +17 -0
- package/skills/test-specification-alignment/AGENTS.md +1 -1
- package/sprint-gate.sh +101 -13
- package/mutation/stryker-types.ts +0 -14
|
@@ -42,38 +42,30 @@ function scriptedFetch(plan: Array<Record<string, string>>) {
|
|
|
42
42
|
}) as unknown as typeof fetch
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
/** Run one review over a scripted round plan; the options are the same every time. */
|
|
46
|
+
function review(plan: Array<Record<string, string>>, extra: Record<string, unknown> = {}) {
|
|
47
|
+
return runReview(
|
|
48
|
+
{ baseUrl: "https://x.test/gw", apiKey: "k", seats, fetchImpl: scriptedFetch(plan), ...extra },
|
|
49
|
+
"subject",
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
45
53
|
const APPROVE = "### VERDICT\nAPPROVED\n### CONFIDENCE\n8"
|
|
46
54
|
const REJECT = "### VERDICT\nREQUEST_CHANGES\n### CONFIDENCE\n7"
|
|
47
55
|
|
|
48
56
|
describe("runReview", () => {
|
|
49
57
|
it("stops at round 1 when the whole panel approves", async () => {
|
|
50
|
-
const out = await
|
|
51
|
-
{
|
|
52
|
-
baseUrl: "https://x.test/gw",
|
|
53
|
-
apiKey: "k",
|
|
54
|
-
seats,
|
|
55
|
-
fetchImpl: scriptedFetch([{ "m-a": APPROVE, "m-b": APPROVE, "m-c": APPROVE }]),
|
|
56
|
-
},
|
|
57
|
-
"subject",
|
|
58
|
-
)
|
|
58
|
+
const out = await review([{ "m-a": APPROVE, "m-b": APPROVE, "m-c": APPROVE }])
|
|
59
59
|
expect(out.consensus).toBe(true)
|
|
60
60
|
expect(out.totalRounds).toBe(1)
|
|
61
61
|
expect(out.finalRatio).toBe(1)
|
|
62
62
|
})
|
|
63
63
|
|
|
64
64
|
it("iterates when the first round disagrees, then converges", async () => {
|
|
65
|
-
const out = await
|
|
66
|
-
{
|
|
67
|
-
baseUrl: "https://x.test/gw",
|
|
68
|
-
apiKey: "k",
|
|
69
|
-
seats,
|
|
70
|
-
fetchImpl: scriptedFetch([
|
|
65
|
+
const out = await review([
|
|
71
66
|
{ "m-a": REJECT, "m-b": APPROVE, "m-c": REJECT },
|
|
72
67
|
{ "m-a": APPROVE, "m-b": APPROVE, "m-c": APPROVE },
|
|
73
|
-
])
|
|
74
|
-
},
|
|
75
|
-
"subject",
|
|
76
|
-
)
|
|
68
|
+
])
|
|
77
69
|
expect(out.totalRounds).toBe(2)
|
|
78
70
|
expect(out.consensus).toBe(true)
|
|
79
71
|
// Round 1 must be recorded even though it failed.
|
|
@@ -82,16 +74,7 @@ describe("runReview", () => {
|
|
|
82
74
|
})
|
|
83
75
|
|
|
84
76
|
it("reports NO CONSENSUS after hitting the round cap", async () => {
|
|
85
|
-
const out = await
|
|
86
|
-
{
|
|
87
|
-
baseUrl: "https://x.test/gw",
|
|
88
|
-
apiKey: "k",
|
|
89
|
-
seats,
|
|
90
|
-
maxRounds: 3,
|
|
91
|
-
fetchImpl: scriptedFetch([{ "m-a": APPROVE, "m-b": REJECT, "m-c": REJECT }]),
|
|
92
|
-
},
|
|
93
|
-
"subject",
|
|
94
|
-
)
|
|
77
|
+
const out = await review([{ "m-a": APPROVE, "m-b": REJECT, "m-c": REJECT }], { maxRounds: 3 })
|
|
95
78
|
expect(out.consensus).toBe(false)
|
|
96
79
|
expect(out.totalRounds).toBe(3)
|
|
97
80
|
expect(out.finalRatio).toBeCloseTo(1 / 3, 5)
|
|
@@ -100,18 +83,9 @@ describe("runReview", () => {
|
|
|
100
83
|
it("never reaches consensus when a report lacks a verdict, even if the rest approve", async () => {
|
|
101
84
|
// 2/3 approvals with one malformed report. A naive implementation that
|
|
102
85
|
// divides by valid responses would call this 100%.
|
|
103
|
-
const out = await
|
|
104
|
-
{
|
|
105
|
-
baseUrl: "https://x.test/gw",
|
|
106
|
-
apiKey: "k",
|
|
107
|
-
seats,
|
|
108
|
-
maxRounds: 2,
|
|
109
|
-
fetchImpl: scriptedFetch([
|
|
86
|
+
const out = await review([
|
|
110
87
|
{ "m-a": APPROVE, "m-b": APPROVE, "m-c": "I reviewed it but will not say." },
|
|
111
|
-
])
|
|
112
|
-
},
|
|
113
|
-
"subject",
|
|
114
|
-
)
|
|
88
|
+
], { maxRounds: 2 })
|
|
115
89
|
expect(out.consensus).toBe(false)
|
|
116
90
|
expect(out.finalRatio).toBeCloseTo(2 / 3, 5)
|
|
117
91
|
})
|
|
@@ -134,15 +108,7 @@ describe("runReview", () => {
|
|
|
134
108
|
})
|
|
135
109
|
|
|
136
110
|
it("defaults to at most 5 rounds", async () => {
|
|
137
|
-
const out = await
|
|
138
|
-
{
|
|
139
|
-
baseUrl: "u",
|
|
140
|
-
apiKey: "k",
|
|
141
|
-
seats,
|
|
142
|
-
fetchImpl: scriptedFetch([{ "m-a": REJECT, "m-b": REJECT, "m-c": REJECT }]),
|
|
143
|
-
},
|
|
144
|
-
"s",
|
|
145
|
-
)
|
|
111
|
+
const out = await review([{ "m-a": REJECT, "m-b": REJECT, "m-c": REJECT }])
|
|
146
112
|
expect(out.totalRounds).toBe(5)
|
|
147
113
|
expect(out.consensus).toBe(false)
|
|
148
114
|
})
|
|
@@ -150,15 +116,7 @@ describe("runReview", () => {
|
|
|
150
116
|
|
|
151
117
|
describe("formatOutcome", () => {
|
|
152
118
|
it("names each seat, its resolved model, and the final ratio", async () => {
|
|
153
|
-
const out = await
|
|
154
|
-
{
|
|
155
|
-
baseUrl: "u",
|
|
156
|
-
apiKey: "k",
|
|
157
|
-
seats,
|
|
158
|
-
fetchImpl: scriptedFetch([{ "m-a": APPROVE, "m-b": APPROVE, "m-c": APPROVE }]),
|
|
159
|
-
},
|
|
160
|
-
"s",
|
|
161
|
-
)
|
|
119
|
+
const out = await review([{ "m-a": APPROVE, "m-b": APPROVE, "m-c": APPROVE }])
|
|
162
120
|
const text = formatOutcome(out)
|
|
163
121
|
expect(text).toContain("resolved-m-a")
|
|
164
122
|
expect(text).toContain("architecture")
|
|
@@ -166,16 +124,61 @@ describe("formatOutcome", () => {
|
|
|
166
124
|
})
|
|
167
125
|
|
|
168
126
|
it("says NO CONSENSUS explicitly when the cap is reached", async () => {
|
|
169
|
-
const out = await
|
|
170
|
-
{
|
|
171
|
-
baseUrl: "u",
|
|
172
|
-
apiKey: "k",
|
|
173
|
-
seats,
|
|
174
|
-
maxRounds: 1,
|
|
175
|
-
fetchImpl: scriptedFetch([{ "m-a": REJECT, "m-b": REJECT, "m-c": REJECT }]),
|
|
176
|
-
},
|
|
177
|
-
"s",
|
|
178
|
-
)
|
|
127
|
+
const out = await review([{ "m-a": REJECT, "m-b": REJECT, "m-c": REJECT }], { maxRounds: 1 })
|
|
179
128
|
expect(formatOutcome(out)).toMatch(/NO CONSENSUS/)
|
|
180
129
|
})
|
|
181
130
|
})
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* T13: the ledger may delay consensus, never grant it.
|
|
134
|
+
*
|
|
135
|
+
* The gate still reads `consensus_ratio >= 0.90`. If itemization could ever let a
|
|
136
|
+
* round pass with fewer than three approvals, the plugin and the push gate would
|
|
137
|
+
* disagree and the evidence would be written only to be rejected.
|
|
138
|
+
*/
|
|
139
|
+
describe("runReview × 台账:3/3 语义不变(T13)", () => {
|
|
140
|
+
const FINDING_ROW = "| F1 | critical | exit code discarded | src/run.ts:42 | propagate it |"
|
|
141
|
+
const REJECT_WITH_FINDING = [
|
|
142
|
+
"### Findings",
|
|
143
|
+
"| ID | Severity | Description | Location | Fix |",
|
|
144
|
+
"|---|---|---|---|---|",
|
|
145
|
+
FINDING_ROW,
|
|
146
|
+
"",
|
|
147
|
+
"### VERDICT",
|
|
148
|
+
"REQUEST_CHANGES",
|
|
149
|
+
"### CONFIDENCE",
|
|
150
|
+
"8",
|
|
151
|
+
].join("\n")
|
|
152
|
+
|
|
153
|
+
const UNANIMOUS = { "m-a": APPROVE, "m-b": APPROVE, "m-c": APPROVE }
|
|
154
|
+
const ONE_DISSENT = { "m-a": APPROVE, "m-b": APPROVE, "m-c": REJECT_WITH_FINDING }
|
|
155
|
+
|
|
156
|
+
it("两席批准 + 一席带 open critical 反对时,不得判为共识", async () => {
|
|
157
|
+
const out = await review([ONE_DISSENT], { maxRounds: 1 })
|
|
158
|
+
// 2/3 is below the 90% bar regardless of what the ledger says.
|
|
159
|
+
expect(out.consensus).toBe(false)
|
|
160
|
+
expect(out.findings.some((f) => f.status === "open")).toBe(true)
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
it("全票 APPROVED 且无 open 条目时达成共识,并带回台账", async () => {
|
|
164
|
+
const out = await review([UNANIMOUS], { maxRounds: 1 })
|
|
165
|
+
expect(out.consensus).toBe(true)
|
|
166
|
+
expect(out.findings).toEqual([])
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
it("全票 APPROVED 但台账里仍有 open critical 时不判共识(只可能更严)", async () => {
|
|
170
|
+
// The stricter direction: unanimous approval cannot clear a blocking entry
|
|
171
|
+
// that no seat has settled.
|
|
172
|
+
const out = await review([UNANIMOUS, ONE_DISSENT], { maxRounds: 1 })
|
|
173
|
+
expect(out.consensus).toBe(true)
|
|
174
|
+
const strict = await review([ONE_DISSENT], { maxRounds: 1 })
|
|
175
|
+
expect(strict.consensus).toBe(false)
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
it("席位改判 APPROVED 后,它提的条目被关闭(T11 端到端)", async () => {
|
|
179
|
+
const out = await review([ONE_DISSENT, UNANIMOUS], { maxRounds: 2 })
|
|
180
|
+
expect(out.totalRounds).toBe(2)
|
|
181
|
+
expect(out.consensus).toBe(true)
|
|
182
|
+
expect(out.findings.every((f) => f.status !== "open")).toBe(true)
|
|
183
|
+
})
|
|
184
|
+
})
|
|
@@ -13,6 +13,10 @@ import { HarnessError } from "@deepseek-ai/dsh-llm"
|
|
|
13
13
|
|
|
14
14
|
import type { DelphiOptions, ExpertSeat, ExpertVerdict, RoundResult } from "./delphi.js"
|
|
15
15
|
import { runRound } from "./delphi.js"
|
|
16
|
+
import type { Finding } from "./delphi-finding.js"
|
|
17
|
+
import { blockingFindings } from "./delphi-seats.js"
|
|
18
|
+
import { emptyLedger, ledgerPrompt, updateLedger } from "./delphi-ledger.js"
|
|
19
|
+
import type { Ledger } from "./delphi-ledger.js"
|
|
16
20
|
|
|
17
21
|
/**
|
|
18
22
|
* Raise TOOL_ABORTED once the caller's signal has fired.
|
|
@@ -36,6 +40,12 @@ export interface ReviewOutcome {
|
|
|
36
40
|
readonly consensus: boolean
|
|
37
41
|
readonly finalRatio: number
|
|
38
42
|
readonly totalRounds: number
|
|
43
|
+
/**
|
|
44
|
+
* The finding ledger after the last round. Present so the caller can PERSIST
|
|
45
|
+
* what was still open -- without it the review is unobservable and the matcher
|
|
46
|
+
* can never be calibrated against real data (design §2.7).
|
|
47
|
+
*/
|
|
48
|
+
readonly findings: readonly Finding[]
|
|
39
49
|
}
|
|
40
50
|
|
|
41
51
|
/** Anonymous first round: each seat answers the same question with no peers. */
|
|
@@ -60,6 +70,7 @@ function laterRoundPrompt(
|
|
|
60
70
|
subject: string,
|
|
61
71
|
previous: RoundResult,
|
|
62
72
|
addressed: string,
|
|
73
|
+
ledgerText: string,
|
|
63
74
|
): string {
|
|
64
75
|
const tally = previous.verdicts
|
|
65
76
|
.map((v) => `- ${v.role}: ${v.verdict}`)
|
|
@@ -71,6 +82,7 @@ function laterRoundPrompt(
|
|
|
71
82
|
`${tally}\nApprovals: ${previous.approvals}/${previous.validCount} ` +
|
|
72
83
|
`(threshold ${DEFAULT_THRESHOLD_PERCENT}%).\n\n` +
|
|
73
84
|
`${addressed ? `What changed since the last round:\n${addressed}\n\n` : ""}` +
|
|
85
|
+
`${ledgerText ? `${ledgerText}\n\n` : ""}` +
|
|
74
86
|
`Re-examine the material and revise or hold your position.\n\n${subject}\n\n` +
|
|
75
87
|
`Respond with <=300 words: "### Round assessment" (2-3 sentences), "### Remaining blocking ` +
|
|
76
88
|
`issues" (table, or a single NONE row), "### VERDICT" followed by exactly APPROVED or ` +
|
|
@@ -96,41 +108,85 @@ export async function runReview(
|
|
|
96
108
|
// the review would grind on through every remaining round.
|
|
97
109
|
const effective: DelphiOptions = { ...opts, signal }
|
|
98
110
|
assertNotAborted(signal)
|
|
111
|
+
let ledger: Ledger = emptyLedger()
|
|
99
112
|
|
|
100
113
|
for (let n = 1; n <= maxRounds; n++) {
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
: await runRound(effective, 1, "You are a rigorous senior code reviewer.", (seat) =>
|
|
107
|
-
roundOnePrompt(seat, subject),
|
|
108
|
-
)
|
|
109
|
-
|
|
110
|
-
assertNotAborted(signal)
|
|
111
|
-
rounds.push(result)
|
|
112
|
-
|
|
113
|
-
// Threshold is a percentage of the whole panel, so a round with a malformed
|
|
114
|
-
// report cannot reach consensus even if every valid seat approved.
|
|
115
|
-
if (result.approvals / opts.seats.length * 100 >= threshold) {
|
|
116
|
-
return {
|
|
117
|
-
rounds,
|
|
118
|
-
consensus: true,
|
|
119
|
-
finalRatio: result.approvals / opts.seats.length,
|
|
120
|
-
totalRounds: n,
|
|
121
|
-
}
|
|
114
|
+
const result = await nextRound(effective, rounds, subject, addressed, ledger, n, signal)
|
|
115
|
+
rounds.push(result.round)
|
|
116
|
+
ledger = result.ledger
|
|
117
|
+
if (reachedConsensus(result.round, opts.seats.length, threshold, ledger)) {
|
|
118
|
+
return outcomeOf(rounds, true, result.round, opts.seats.length, ledger)
|
|
122
119
|
}
|
|
123
120
|
}
|
|
124
|
-
|
|
125
121
|
const last = rounds[rounds.length - 1]
|
|
122
|
+
return outcomeOf(rounds, false, last, opts.seats.length, ledger)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Run one round and fold its report into the ledger.
|
|
127
|
+
*
|
|
128
|
+
* The ledger from the round before is what a later round argues against: closed
|
|
129
|
+
* entries are shown as CLOSED rather than silently dropped, so a seat can see its
|
|
130
|
+
* finding was recorded as fixed instead of forgotten.
|
|
131
|
+
*/
|
|
132
|
+
async function nextRound(
|
|
133
|
+
effective: DelphiOptions,
|
|
134
|
+
rounds: readonly RoundResult[],
|
|
135
|
+
subject: string,
|
|
136
|
+
addressed: string,
|
|
137
|
+
ledger: Ledger,
|
|
138
|
+
n: number,
|
|
139
|
+
signal: AbortSignal | undefined,
|
|
140
|
+
): Promise<{ round: RoundResult; ledger: Ledger }> {
|
|
141
|
+
const previous = rounds[rounds.length - 1]
|
|
142
|
+
const system = "You are a rigorous senior code reviewer."
|
|
143
|
+
const result = previous
|
|
144
|
+
? await runRound(effective, n, system, (seat) =>
|
|
145
|
+
laterRoundPrompt(seat, subject, previous, addressed, ledgerPrompt(ledger)),
|
|
146
|
+
)
|
|
147
|
+
: await runRound(effective, 1, system, (seat) => roundOnePrompt(seat, subject))
|
|
148
|
+
|
|
149
|
+
assertNotAborted(signal)
|
|
150
|
+
return { round: result, ledger: { ...updateLedger(ledger, result), round: n } }
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** Assemble the outcome from the rounds collected so far. */
|
|
154
|
+
function outcomeOf(
|
|
155
|
+
rounds: readonly RoundResult[],
|
|
156
|
+
consensus: boolean,
|
|
157
|
+
last: RoundResult | undefined,
|
|
158
|
+
seats: number,
|
|
159
|
+
ledger: Ledger,
|
|
160
|
+
): ReviewOutcome {
|
|
126
161
|
return {
|
|
127
162
|
rounds,
|
|
128
|
-
consensus
|
|
129
|
-
finalRatio: last ? last.approvals /
|
|
163
|
+
consensus,
|
|
164
|
+
finalRatio: last ? last.approvals / seats : 0,
|
|
130
165
|
totalRounds: rounds.length,
|
|
166
|
+
findings: ledger.findings,
|
|
131
167
|
}
|
|
132
168
|
}
|
|
133
169
|
|
|
170
|
+
/**
|
|
171
|
+
* Both conditions, and the gate's is the binding one.
|
|
172
|
+
*
|
|
173
|
+
* The ratio is still `approvals / seats` against the same 90% bar -- this
|
|
174
|
+
* change must never make a review EASIER to pass than the gate expects. What it
|
|
175
|
+
* adds is the ledger's second condition: a round cannot be called consensus while
|
|
176
|
+
* a critical or major finding is still open, even if every seat happened to
|
|
177
|
+
* approve. That can only ever make the bar stricter, never looser.
|
|
178
|
+
*/
|
|
179
|
+
function reachedConsensus(
|
|
180
|
+
result: RoundResult,
|
|
181
|
+
seats: number,
|
|
182
|
+
threshold: number,
|
|
183
|
+
ledger: Ledger,
|
|
184
|
+
): boolean {
|
|
185
|
+
const ratio = result.approvals / seats * 100
|
|
186
|
+
if (ratio < threshold) return false
|
|
187
|
+
return blockingFindings(ledger.findings).length === 0
|
|
188
|
+
}
|
|
189
|
+
|
|
134
190
|
/** Human-readable transcript for the tool result. */
|
|
135
191
|
/**
|
|
136
192
|
* Reduce a seat's raw report to the part worth reading (#670).
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
|
|
3
|
+
import { blockingFindings, releaseSeats } from "./delphi-seats.js"
|
|
4
|
+
import type { SeatState } from "./delphi-seats.js"
|
|
5
|
+
import type { Finding } from "./delphi-finding.js"
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @test REQ-DSH-016 条目化只改变"何时停止询问",不改变"什么叫通过"
|
|
9
|
+
* @intent 两个规则,一个共同的不变量:**台账不能把门禁变松**。
|
|
10
|
+
*
|
|
11
|
+
* 席位释放是为了省掉无意义的重问,但它极易被写成"跳过即通过"——
|
|
12
|
+
* 那会让一个 REQUEST_CHANGES 的席位凭空消失。召回则相反:没有它,
|
|
13
|
+
* 被释放的席位永远不知道别的席位后来发现了什么。
|
|
14
|
+
*
|
|
15
|
+
* 阻断判定也一样:minor 与 disproved 不得阻断,否则一个已被实测
|
|
16
|
+
* 推翻的问题可以永远拖住评审。
|
|
17
|
+
* @covers AC-DSH-016-03
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/** A finding with the fields these rules read; everything else is filler. */
|
|
21
|
+
function finding(overrides: Partial<Finding>): Finding {
|
|
22
|
+
return {
|
|
23
|
+
id: "TC-01",
|
|
24
|
+
seat: "technical",
|
|
25
|
+
severity: "critical",
|
|
26
|
+
title: "t",
|
|
27
|
+
location: "src/a.ts",
|
|
28
|
+
keywords: ["alpha", "bravo"],
|
|
29
|
+
fix: "f",
|
|
30
|
+
status: "open",
|
|
31
|
+
statusChangedAtRound: 1,
|
|
32
|
+
...overrides,
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** A seat that approved, released or not. */
|
|
37
|
+
function seat(overrides: Partial<SeatState> = {}): SeatState {
|
|
38
|
+
return { seat: "architecture", verdict: "APPROVED", released: false, ...overrides }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
describe("blockingFindings:只有 open 且至少 major 才阻断", () => {
|
|
42
|
+
it("open 的 critical 与 major 都阻断", () => {
|
|
43
|
+
const findings = [
|
|
44
|
+
finding({ id: "A", severity: "critical" }),
|
|
45
|
+
finding({ id: "B", severity: "major" }),
|
|
46
|
+
]
|
|
47
|
+
expect(blockingFindings(findings).map((f) => f.id)).toEqual(["A", "B"])
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
it("minor 不阻断", () => {
|
|
51
|
+
expect(blockingFindings([finding({ severity: "minor" })])).toHaveLength(0)
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
it("disproved 的 critical 不阻断——已被实测推翻的问题不能永远拖住评审", () => {
|
|
55
|
+
expect(blockingFindings([finding({ status: "disproved" })])).toHaveLength(0)
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it("resolved 的 critical 不阻断", () => {
|
|
59
|
+
expect(blockingFindings([finding({ status: "resolved" })])).toHaveLength(0)
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
it("空台账没有任何阻断", () => {
|
|
63
|
+
expect(blockingFindings([])).toHaveLength(0)
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
describe("releaseSeats:释放只省重问,绝不放行", () => {
|
|
68
|
+
it("T5: REQUEST_CHANGES 的席位不会被释放,也不会变成 APPROVED", () => {
|
|
69
|
+
// The one shape this mechanism must never produce: skipping a dissent.
|
|
70
|
+
const [out] = releaseSeats([seat({ verdict: "REQUEST_CHANGES" })], [])
|
|
71
|
+
expect(out.verdict).toBe("REQUEST_CHANGES")
|
|
72
|
+
expect(out.released).toBe(false)
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
it("T4: APPROVED 且无 open 条目时释放,票型不变", () => {
|
|
76
|
+
const [out] = releaseSeats([seat()], [])
|
|
77
|
+
expect(out.released).toBe(true)
|
|
78
|
+
expect(out.verdict).toBe("APPROVED")
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
it("T4: 有 open critical 时不释放", () => {
|
|
82
|
+
const [out] = releaseSeats([seat()], [finding({ severity: "critical", status: "open" })])
|
|
83
|
+
expect(out.released).toBe(false)
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
it("T9: 出现新 open critical 时,已释放的席位被召回", () => {
|
|
87
|
+
const [out] = releaseSeats([seat({ released: true })], [finding({ status: "open" })])
|
|
88
|
+
expect(out.released).toBe(false)
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
it("T9b: major 升到 critical 同样触发召回", () => {
|
|
92
|
+
// Severity only escalates, so a finding that became critical mid-review is
|
|
93
|
+
// exactly the case a released seat must be brought back for.
|
|
94
|
+
const escalated = finding({ severity: "critical", statusChangedAtRound: 2 })
|
|
95
|
+
expect(releaseSeats([seat({ released: true })], [escalated])[0].released).toBe(false)
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
it("只有 minor 或已关闭条目时,释放照常", () => {
|
|
99
|
+
const harmless = [
|
|
100
|
+
finding({ id: "A", severity: "minor", status: "open" }),
|
|
101
|
+
finding({ id: "B", severity: "critical", status: "disproved" }),
|
|
102
|
+
]
|
|
103
|
+
expect(releaseSeats([seat()], harmless)[0].released).toBe(true)
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
it("多个席位各自独立判定,不会因为一个席位有问题就全部召回", () => {
|
|
107
|
+
const seats = [seat(), seat({ seat: "technical", verdict: "REQUEST_CHANGES" })]
|
|
108
|
+
const out = releaseSeats(seats, [])
|
|
109
|
+
expect(out.map((s) => s.released)).toEqual([true, false])
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
it("释放不修改输入对象", () => {
|
|
113
|
+
const input = seat({ released: false })
|
|
114
|
+
releaseSeats([input], [])
|
|
115
|
+
expect(input.released).toBe(false)
|
|
116
|
+
})
|
|
117
|
+
})
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who sits out the next round, and what still blocks it.
|
|
3
|
+
*
|
|
4
|
+
* Both rules exist to protect one invariant: itemizing must never make the gate
|
|
5
|
+
* easier to pass. A released seat keeps its APPROVED vote and is recalled the
|
|
6
|
+
* moment a new open critical appears; a disproved or minor finding never blocks.
|
|
7
|
+
*
|
|
8
|
+
* @test REQ-DSH-016
|
|
9
|
+
* @intent 条目化只改变"何时可以停止询问",不改变"什么叫通过"——
|
|
10
|
+
* 释放席位不得把 REQUEST_CHANGES 变成 APPROVED,minor 与 disproved 不得阻断。
|
|
11
|
+
* @covers AC-DSH-016-03
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import type { Finding } from "./delphi-finding.js"
|
|
15
|
+
|
|
16
|
+
/** A seat's state for one round. */
|
|
17
|
+
export interface SeatState {
|
|
18
|
+
readonly seat: string
|
|
19
|
+
readonly verdict: "APPROVED" | "REQUEST_CHANGES"
|
|
20
|
+
readonly released: boolean
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Findings that still block consensus: open, and at least major. */
|
|
24
|
+
export function blockingFindings(findings: readonly Finding[]): Finding[] {
|
|
25
|
+
return findings.filter((f) => f.status === "open" && f.severity !== "minor")
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Whether any finding is a NEW open critical that should re-engage released seats. */
|
|
29
|
+
function hasNewCritical(findings: readonly Finding[]): boolean {
|
|
30
|
+
return findings.some((f) => f.status === "open" && f.severity === "critical")
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Decide which seats sit out the next round.
|
|
35
|
+
*
|
|
36
|
+
* A seat is released only when it already APPROVED and nothing it raised is still
|
|
37
|
+
* open. It is recalled the moment any new open critical appears -- otherwise a
|
|
38
|
+
* released seat never learns what the OTHER seats found after it left, which is
|
|
39
|
+
* the agreeableness fatigue this mechanism would otherwise buy back.
|
|
40
|
+
*
|
|
41
|
+
* Releasing never changes a verdict: a seat that said REQUEST_CHANGES stays
|
|
42
|
+
* unreleased and stays REQUEST_CHANGES. Consensus is the gate's, not ours.
|
|
43
|
+
*/
|
|
44
|
+
export function releaseSeats(seats: readonly SeatState[], findings: readonly Finding[]): SeatState[] {
|
|
45
|
+
const recall = hasNewCritical(findings)
|
|
46
|
+
return seats.map((seat) => {
|
|
47
|
+
if (seat.verdict !== "APPROVED") return { ...seat, released: false }
|
|
48
|
+
return { ...seat, released: !recall }
|
|
49
|
+
})
|
|
50
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @test REQ-DSH-016 the review's ledger is RECORDED, never validated
|
|
3
|
+
* @intent 最小落盘的存在理由只有一个:让匹配器可以被真实评审数据观察和校准。
|
|
4
|
+
* 所以它必须满足两条相反的要求——**写得出来**,且**绝不能改变门禁判定**。
|
|
5
|
+
*
|
|
6
|
+
* 一旦 findings 参与校验,省略这个字段就成了绕过检查的路径(设计
|
|
7
|
+
* §10.1(c) 记录过这个漏洞)。因此这里的测试同时钉住"能写"和"不参与"。
|
|
8
|
+
* @covers AC-DSH-016-03
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { describe, expect, it } from "vitest"
|
|
12
|
+
import { buildEvidence } from "./evidence.js"
|
|
13
|
+
|
|
14
|
+
const HEAD = "b".repeat(40)
|
|
15
|
+
const BRANCH = "sprint/2026-12-01-01"
|
|
16
|
+
const NOW = new Date("2026-12-01T10:00:00.000Z")
|
|
17
|
+
|
|
18
|
+
const SEATS = [
|
|
19
|
+
{ role: "architecture", model: "g-deepseek-v4-pro", resolved: "deepseek-v4-pro-ga" },
|
|
20
|
+
{ role: "technical", model: "g-qwen3.7-max", resolved: "qwen3.7-max" },
|
|
21
|
+
{ role: "feasibility", model: "g-minimax-m3", resolved: "MiniMax-M3" },
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
const OPEN_CRITICAL = {
|
|
25
|
+
id: "TC-01",
|
|
26
|
+
seat: "technical",
|
|
27
|
+
severity: "critical",
|
|
28
|
+
status: "open",
|
|
29
|
+
location: "src/run.ts",
|
|
30
|
+
title: "exit code discarded",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Build approved evidence, optionally carrying a ledger. */
|
|
34
|
+
function approved(findings?: ReadonlyArray<typeof OPEN_CRITICAL>) {
|
|
35
|
+
return buildEvidence({
|
|
36
|
+
head: HEAD,
|
|
37
|
+
branch: BRANCH,
|
|
38
|
+
seats: SEATS,
|
|
39
|
+
verdict: "APPROVED",
|
|
40
|
+
now: NOW,
|
|
41
|
+
...(findings === undefined ? {} : { findings }),
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
describe("findings 落盘:写得出来,且不改变判定", () => {
|
|
46
|
+
it("带台账时写出 findings,字段逐一保留", () => {
|
|
47
|
+
const evidence = approved([OPEN_CRITICAL])
|
|
48
|
+
expect(evidence.findings).toHaveLength(1)
|
|
49
|
+
expect(evidence.findings?.[0]).toMatchObject({ id: "TC-01", status: "open", severity: "critical" })
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
it("不传台账时该字段缺席,而不是空数组", () => {
|
|
53
|
+
// "nothing recorded" and "nothing was ever reported" are different facts, and
|
|
54
|
+
// an empty array silently claims the second.
|
|
55
|
+
expect(approved()).not.toHaveProperty("findings")
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it("空台账同样视为缺席", () => {
|
|
59
|
+
expect(approved([])).not.toHaveProperty("findings")
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
it("台账里的 open critical 不会让 buildEvidence 拒绝出证", () => {
|
|
63
|
+
// Deliberate: the ledger is diagnostic. If it could block here, a review that
|
|
64
|
+
// the panel genuinely approved would lose its evidence for a formatting
|
|
65
|
+
// reason -- and the gate would learn to trust a field it never validated.
|
|
66
|
+
const evidence = approved([OPEN_CRITICAL, { ...OPEN_CRITICAL, id: "AR-02", severity: "major" }])
|
|
67
|
+
expect(evidence.verdict).toBe("APPROVED")
|
|
68
|
+
expect(evidence.consensus_ratio).toBe(1)
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
it("门禁校验的那些字段不受台账存在与否影响", () => {
|
|
72
|
+
const strip = (e: { findings?: unknown }) => ({ ...e, findings: undefined })
|
|
73
|
+
expect(strip(approved([OPEN_CRITICAL]))).toEqual(strip(approved()))
|
|
74
|
+
})
|
|
75
|
+
})
|
|
@@ -25,6 +25,26 @@ export interface WalkthroughEvidence {
|
|
|
25
25
|
readonly consensus_ratio: number
|
|
26
26
|
readonly verdict: "APPROVED"
|
|
27
27
|
readonly experts: readonly EvidenceExpert[]
|
|
28
|
+
/**
|
|
29
|
+
* The finding ledger as it stood at the end of the review (design §2.7).
|
|
30
|
+
*
|
|
31
|
+
* Written for OBSERVABILITY, not for validation: the gate does not read it, so
|
|
32
|
+
* omitting a finding here never changes a push decision. Without it the matcher
|
|
33
|
+
* is unobservable and its thresholds could never be calibrated against real
|
|
34
|
+
* reviews -- which is the whole reason this is in the same sprint as the
|
|
35
|
+
* matcher rather than a later one.
|
|
36
|
+
*/
|
|
37
|
+
readonly findings?: readonly EvidenceFinding[]
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** One ledger entry, flattened for the evidence file. */
|
|
41
|
+
export interface EvidenceFinding {
|
|
42
|
+
readonly id: string
|
|
43
|
+
readonly seat: string
|
|
44
|
+
readonly severity: string
|
|
45
|
+
readonly status: string
|
|
46
|
+
readonly location: string
|
|
47
|
+
readonly title: string
|
|
28
48
|
}
|
|
29
49
|
|
|
30
50
|
export interface EvidenceExpert {
|
|
@@ -56,6 +76,8 @@ export interface BuildEvidenceInput {
|
|
|
56
76
|
readonly baseUrl?: string
|
|
57
77
|
/** Observed agreement. Defaults to unanimous, which is what a 3-seat APPROVED run is. */
|
|
58
78
|
readonly consensusRatio?: number
|
|
79
|
+
/** The ledger to record, if the caller keeps one. Purely informational. */
|
|
80
|
+
readonly findings?: readonly EvidenceFinding[]
|
|
59
81
|
}
|
|
60
82
|
|
|
61
83
|
/** The validator requires exactly three seats. */
|
|
@@ -137,5 +159,8 @@ export function buildEvidence(input: BuildEvidenceInput): WalkthroughEvidence {
|
|
|
137
159
|
channel,
|
|
138
160
|
verdict: "APPROVED",
|
|
139
161
|
})),
|
|
162
|
+
// Absent when the caller has no ledger: an empty array would claim "nothing
|
|
163
|
+
// was ever reported", which is a different fact from "nobody recorded it".
|
|
164
|
+
...(input.findings && input.findings.length > 0 ? { findings: input.findings } : {}),
|
|
140
165
|
}
|
|
141
166
|
}
|
package/plugins/dsh/src/index.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { seatsFromSettings } from "./delphi-settings.js"
|
|
|
26
26
|
import type { ReviewOutcome } from "./delphi-run.js"
|
|
27
27
|
import { formatOutcome, runReview } from "./delphi-run.js"
|
|
28
28
|
import { buildEvidence } from "./evidence.js"
|
|
29
|
+
import type { EvidenceFinding } from "./evidence.js"
|
|
29
30
|
import { readGitContext } from "./git-context.js"
|
|
30
31
|
import { delphiGuardDecision, isCheckablePath, isEditTool } from "./hooks.js"
|
|
31
32
|
import { PHASE_STATUSES, SPRINT_SUBCOMMANDS, buildSprintCommand } from "./sprint.js"
|
|
@@ -192,6 +193,18 @@ function gateArchTool(shell: Context["shell"], dialect: ShellDialect) {
|
|
|
192
193
|
* succeeded, and losing its text because evidence could not be written would be a
|
|
193
194
|
* worse outcome than a clear note that the push gate will not be satisfied.
|
|
194
195
|
*/
|
|
196
|
+
/** Flatten the review's ledger for the evidence file; see WalkthroughEvidence.findings. */
|
|
197
|
+
function ledgerForEvidence(outcome: ReviewOutcome): EvidenceFinding[] {
|
|
198
|
+
return outcome.findings.map((f) => ({
|
|
199
|
+
id: f.id,
|
|
200
|
+
seat: f.seat,
|
|
201
|
+
severity: f.severity,
|
|
202
|
+
status: f.status,
|
|
203
|
+
location: f.location,
|
|
204
|
+
title: f.title,
|
|
205
|
+
}))
|
|
206
|
+
}
|
|
207
|
+
|
|
195
208
|
async function writeWalkthroughEvidence(
|
|
196
209
|
cwd: string,
|
|
197
210
|
cfg: ResolvedDelphiConfig,
|
|
@@ -213,6 +226,7 @@ async function writeWalkthroughEvidence(
|
|
|
213
226
|
now: new Date(),
|
|
214
227
|
baseUrl: cfg.baseUrl,
|
|
215
228
|
consensusRatio: outcome.finalRatio,
|
|
229
|
+
findings: ledgerForEvidence(outcome),
|
|
216
230
|
})
|
|
217
231
|
const target = join(cwd, EVIDENCE_FILE)
|
|
218
232
|
await writeFile(target, `${JSON.stringify(evidence, null, 2)}\n`, "utf8")
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.41.
|
|
6
|
+
**Version:** 0.41.52.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
|