@boyingliu01/xp-gate 0.15.5 → 0.18.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 +0 -0
- package/adapters/cpp.sh +0 -0
- package/adapters/dart.sh +0 -0
- package/adapters/flutter.sh +0 -0
- package/adapters/go.sh +0 -0
- package/adapters/iac.sh +0 -0
- package/adapters/java.sh +0 -0
- package/adapters/kotlin.sh +0 -0
- package/adapters/objectivec.sh +0 -0
- package/adapters/plugins/book299-20132-python/scripts/install-gradle.sh +0 -0
- package/adapters/plugins/book299-20132-python/scripts/install-maven.sh +0 -0
- package/adapters/plugins/book299-4081-c/scripts/install-gradle.sh +0 -0
- package/adapters/plugins/book299-4081-c/scripts/install-maven.sh +0 -0
- package/adapters/plugins/book299-4083-javascriptes5/scripts/install-gradle.sh +0 -0
- package/adapters/plugins/book299-4083-javascriptes5/scripts/install-maven.sh +0 -0
- package/adapters/powershell.sh +0 -0
- package/adapters/python.sh +0 -0
- package/adapters/shell.sh +0 -0
- package/adapters/swift.sh +0 -0
- package/adapters/typescript.sh +0 -0
- package/bin/xp-gate.js +29 -1
- package/gate-3.sh +0 -0
- package/gate-4.sh +0 -0
- package/gate-7.sh +0 -0
- package/gate-8.sh +0 -0
- package/gate-9.sh +0 -0
- package/hooks/adapter-common.sh +0 -0
- package/hooks/gate-3.sh +0 -0
- package/hooks/gate-4.sh +0 -0
- package/hooks/gate-7.sh +0 -0
- package/hooks/gate-8.sh +0 -0
- package/hooks/gate-9.sh +0 -0
- package/hooks/lib/now-ms.sh +33 -0
- package/hooks/pre-commit +63 -47
- package/hooks/pre-push +0 -0
- package/hooks/sprint-gate.sh +291 -0
- package/lib/__tests__/check-version.test.js +122 -0
- package/lib/__tests__/doctor.test.js +13 -15
- package/lib/__tests__/gate-audit.test.ts +38 -0
- package/lib/__tests__/phase-transition.test.js +512 -272
- package/lib/__tests__/retro.test.js +131 -0
- package/lib/__tests__/sprint-audit.test.js +207 -207
- package/lib/__tests__/sprint-status-rework.test.js +184 -0
- package/lib/check-version.js +9 -0
- package/lib/doctor-tui.js +268 -198
- package/lib/doctor.js +15 -3
- package/lib/gate-audit.ts +18 -7
- package/lib/gate-runner.js +77 -30
- package/lib/init.js +10 -0
- package/lib/language-tools.js +833 -833
- package/lib/mattpocock-license-verdict.json +7 -0
- package/lib/phase-transition.js +499 -249
- package/lib/retro.js +222 -0
- package/lib/shared-utils.js +7 -0
- package/lib/sprint-audit.js +235 -235
- package/lib/sprint-init.js +207 -0
- package/lib/sprint-state-migrator.js +1 -0
- package/lib/sprint-status.js +111 -0
- package/mock-policy/AGENTS.md +3 -3
- package/mutation/AGENTS.md +3 -3
- package/package.json +3 -2
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/bin/delphi-review-guard.sh +0 -0
- package/plugins/claude-code/bin/xp-gate-check +0 -0
- package/plugins/claude-code/skills/batch-grill-me/SKILL.md +15 -0
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/claude-code/skills/delphi-review/SKILL.md +59 -4
- package/plugins/claude-code/skills/delphi-review/references/requirements.md +390 -0
- package/plugins/claude-code/skills/delphi-review/references/round-templates.md +67 -0
- package/plugins/claude-code/skills/domain-modeling/ADR-FORMAT.md +64 -0
- package/plugins/claude-code/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/plugins/claude-code/skills/domain-modeling/SKILL.md +74 -0
- package/plugins/claude-code/skills/grill-with-docs/SKILL.md +7 -0
- package/plugins/claude-code/skills/grilling/SKILL.md +12 -0
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +168 -43
- package/plugins/claude-code/skills/sprint-flow/references/components/memory.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/components/middleware.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/components/skill-invocations.md +21 -20
- package/plugins/claude-code/skills/sprint-flow/references/components/tool-descriptions.md +22 -23
- package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +14 -12
- package/plugins/claude-code/skills/sprint-flow/references/phase-2-design.md +145 -133
- package/plugins/claude-code/skills/sprint-flow/references/phase-3-build.md +69 -2
- package/plugins/claude-code/skills/sprint-flow/references/phase-4-verify.md +93 -31
- package/plugins/claude-code/skills/sprint-flow/references/phase-5-ship.md +99 -14
- package/plugins/claude-code/skills/sprint-flow/references/phase-6-close.md +37 -5
- package/plugins/claude-code/skills/sprint-flow/references/phase-overview.md +58 -53
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/claude-code/skills/test-specification-alignment/SKILL.md +8 -3
- package/plugins/claude-code/skills/to-issues/SKILL.md +1 -1
- package/plugins/opencode/index.ts +1 -0
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/batch-grill-me/SKILL.md +15 -0
- package/plugins/opencode/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/opencode/skills/delphi-review/SKILL.md +59 -4
- package/plugins/opencode/skills/delphi-review/references/requirements.md +390 -0
- package/plugins/opencode/skills/delphi-review/references/round-templates.md +67 -0
- package/plugins/opencode/skills/domain-modeling/ADR-FORMAT.md +64 -0
- package/plugins/opencode/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/plugins/opencode/skills/domain-modeling/SKILL.md +74 -0
- package/plugins/opencode/skills/grill-with-docs/SKILL.md +7 -0
- package/plugins/opencode/skills/grilling/SKILL.md +12 -0
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/opencode/skills/sprint-flow/SKILL.md +168 -43
- package/plugins/opencode/skills/sprint-flow/references/components/memory.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/components/middleware.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/components/skill-invocations.md +21 -20
- package/plugins/opencode/skills/sprint-flow/references/components/tool-descriptions.md +22 -23
- package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +14 -12
- package/plugins/opencode/skills/sprint-flow/references/phase-2-design.md +145 -133
- package/plugins/opencode/skills/sprint-flow/references/phase-3-build.md +69 -2
- package/plugins/opencode/skills/sprint-flow/references/phase-4-verify.md +93 -31
- package/plugins/opencode/skills/sprint-flow/references/phase-5-ship.md +99 -14
- package/plugins/opencode/skills/sprint-flow/references/phase-6-close.md +37 -5
- package/plugins/opencode/skills/sprint-flow/references/phase-overview.md +58 -53
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/opencode/skills/test-specification-alignment/SKILL.md +8 -3
- package/plugins/opencode/skills/to-issues/SKILL.md +1 -1
- package/plugins/qoder/agents/delphi-architecture.md +48 -48
- package/plugins/qoder/agents/delphi-feasibility.md +48 -48
- package/plugins/qoder/agents/delphi-technical.md +48 -48
- package/plugins/qoder/bin/sprint-flow-guard.sh +0 -0
- package/plugins/qoder/bin/xp-gate-check +0 -0
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
- package/principles/AGENTS.md +3 -3
- package/scripts/__tests__/check-mattpocock-license.test.js +229 -0
- package/scripts/__tests__/sync-package-content.test.js +50 -0
- package/scripts/check-mattpocock-license.cjs +302 -0
- package/scripts/delphi-external-review.cjs +432 -432
- package/scripts/migrate-audit-anomalies.mjs +78 -0
- package/scripts/sync-package-content.js +52 -5
- package/skills/batch-grill-me/SKILL.md +15 -0
- package/skills/delphi-review/AGENTS.md +3 -3
- package/skills/delphi-review/SKILL.md +59 -4
- package/skills/delphi-review/references/requirements.md +390 -0
- package/skills/delphi-review/references/round-templates.md +67 -0
- package/skills/domain-modeling/ADR-FORMAT.md +64 -0
- package/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/skills/domain-modeling/SKILL.md +74 -0
- package/skills/grill-with-docs/SKILL.md +7 -0
- package/skills/grilling/SKILL.md +12 -0
- package/skills/sprint-flow/AGENTS.md +3 -3
- package/skills/sprint-flow/SKILL.md +168 -43
- package/skills/sprint-flow/references/components/memory.md +1 -1
- package/skills/sprint-flow/references/components/middleware.md +1 -1
- package/skills/sprint-flow/references/components/skill-invocations.md +21 -20
- package/skills/sprint-flow/references/components/tool-descriptions.md +22 -23
- package/skills/sprint-flow/references/orchestration-rules.md +14 -12
- package/skills/sprint-flow/references/phase-2-design.md +145 -133
- package/skills/sprint-flow/references/phase-3-build.md +69 -2
- package/skills/sprint-flow/references/phase-4-verify.md +93 -31
- package/skills/sprint-flow/references/phase-5-ship.md +99 -14
- package/skills/sprint-flow/references/phase-6-close.md +37 -5
- package/skills/sprint-flow/references/phase-overview.md +58 -53
- package/skills/test-specification-alignment/AGENTS.md +3 -3
- package/skills/test-specification-alignment/SKILL.md +8 -3
- package/skills/to-issues/SKILL.md +1 -1
- package/adapters/gate-3.sh +0 -68
- package/adapters/gate-4.sh +0 -80
- package/adapters/gate-7.sh +0 -45
- package/adapters/gate-8.sh +0 -56
- package/adapters/gate-9.sh +0 -104
package/lib/sprint-status.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
const fs = require('fs');
|
|
11
11
|
const path = require('path');
|
|
12
|
+
const { execSync } = require('child_process');
|
|
12
13
|
const { discoverActiveSprints } = require('./sprint-discovery');
|
|
13
14
|
const { SprintStateManager } = require('./sprint-state-manager');
|
|
14
15
|
|
|
@@ -216,6 +217,109 @@ function jsonMode(state) {
|
|
|
216
217
|
return JSON.stringify(state, null, 2);
|
|
217
218
|
}
|
|
218
219
|
|
|
220
|
+
// #369: fix commit matching — conventional commits + keyword boundary
|
|
221
|
+
const FIX_RE = /^(fix(\(.+\))?:)|\b(fix|bugfix|hotfix|patch|修复)\b/i;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Count fix commits in a git repo since a given date (#369).
|
|
225
|
+
* Scans all branches (--all) per Round 1 repo-wide decision.
|
|
226
|
+
* @param {string} repoDir - Repository root
|
|
227
|
+
* @param {string} sinceDate - ISO 8601 date string
|
|
228
|
+
* @returns {number} Count of fix commits
|
|
229
|
+
*/
|
|
230
|
+
function getFixCommitCount(repoDir, sinceDate) {
|
|
231
|
+
try {
|
|
232
|
+
const out = execSync(
|
|
233
|
+
`git log --all --since="${sinceDate}" --pretty=format:"%s"`,
|
|
234
|
+
{ cwd: repoDir, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }
|
|
235
|
+
);
|
|
236
|
+
return out.split('\n').filter(l => l.trim() && FIX_RE.test(l.trim())).length;
|
|
237
|
+
} catch {
|
|
238
|
+
return 0;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Handle --rework-check mode: compute rework rate for recently closed sprints (#369).
|
|
244
|
+
* @param {string} searchDir - Project root directory
|
|
245
|
+
* @param {number} windowDays - Window in days after completed_at
|
|
246
|
+
* @returns {Promise<number>} Exit code
|
|
247
|
+
*/
|
|
248
|
+
async function handleReworkCheck(searchDir, windowDays) {
|
|
249
|
+
const stateDir = path.join(searchDir, '.sprint-state');
|
|
250
|
+
const historyDir = path.join(stateDir, 'sprint-history');
|
|
251
|
+
const sprintStateFile = path.join(stateDir, 'sprint-state.json');
|
|
252
|
+
|
|
253
|
+
const sprints = [];
|
|
254
|
+
|
|
255
|
+
// Current sprint-state.json
|
|
256
|
+
if (fs.existsSync(sprintStateFile)) {
|
|
257
|
+
try {
|
|
258
|
+
const state = JSON.parse(fs.readFileSync(sprintStateFile, 'utf8'));
|
|
259
|
+
if (state.metrics && state.metrics.completed_at) {
|
|
260
|
+
sprints.push({ id: state.id || 'unknown', state, file: sprintStateFile });
|
|
261
|
+
}
|
|
262
|
+
} catch { /* skip malformed */ }
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// History files
|
|
266
|
+
if (fs.existsSync(historyDir)) {
|
|
267
|
+
for (const f of fs.readdirSync(historyDir).filter(f => f.endsWith('.json'))) {
|
|
268
|
+
try {
|
|
269
|
+
const fp = path.join(historyDir, f);
|
|
270
|
+
const state = JSON.parse(fs.readFileSync(fp, 'utf8'));
|
|
271
|
+
if (state.metrics && state.metrics.completed_at) {
|
|
272
|
+
sprints.push({ id: state.id || f.replace('.json', ''), state, file: fp });
|
|
273
|
+
}
|
|
274
|
+
} catch { /* skip malformed */ }
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const now = Date.now();
|
|
279
|
+
const windowMs = windowDays * 86400000;
|
|
280
|
+
const inWindow = sprints.filter(s => {
|
|
281
|
+
const t = new Date(s.state.metrics.completed_at).getTime();
|
|
282
|
+
return !isNaN(t) && (now - t) <= windowMs;
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
if (inWindow.length === 0) {
|
|
286
|
+
console.log(`No closed sprints within ${windowDays} day${windowDays === 1 ? '' : 's'}`);
|
|
287
|
+
return 0;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
console.log(`Rework Rate Check (window: ${windowDays} days)`);
|
|
291
|
+
console.log('─'.repeat(60));
|
|
292
|
+
|
|
293
|
+
let hasAlert = false;
|
|
294
|
+
for (const { id, state, file } of inWindow) {
|
|
295
|
+
const totalCommits = state.metrics.total_sprint_commits || 0;
|
|
296
|
+
const fixCommits = getFixCommitCount(searchDir, state.metrics.completed_at);
|
|
297
|
+
const rate = fixCommits / Math.max(totalCommits, 1);
|
|
298
|
+
|
|
299
|
+
// Write rework_rate back to the source file
|
|
300
|
+
state.metrics.rework_rate = rate;
|
|
301
|
+
try {
|
|
302
|
+
fs.writeFileSync(file, JSON.stringify(state, null, 2));
|
|
303
|
+
} catch { /* non-fatal */ }
|
|
304
|
+
|
|
305
|
+
const pct = (rate * 100).toFixed(1);
|
|
306
|
+
console.log(` ${id}: ${pct}% (${fixCommits} fix / ${totalCommits} total commits)`);
|
|
307
|
+
if (rate > 0.30) {
|
|
308
|
+
console.log(` ⚠️ ${id}: ${pct}% rework — exceeds 30% threshold`);
|
|
309
|
+
hasAlert = true;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
console.log('─'.repeat(60));
|
|
314
|
+
if (hasAlert) {
|
|
315
|
+
console.log('⚠️ Rework rate alert: one or more sprints exceed 30% threshold');
|
|
316
|
+
} else {
|
|
317
|
+
console.log('All sprints within acceptable rework rate (≤30%)');
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
return 0;
|
|
321
|
+
}
|
|
322
|
+
|
|
219
323
|
/**
|
|
220
324
|
* CLI entry point. Parses args and executes the appropriate mode.
|
|
221
325
|
* @param {string[]} args - CLI subargs (without 'sprint-status')
|
|
@@ -237,6 +341,13 @@ async function handleSprintStatus(args = []) {
|
|
|
237
341
|
}
|
|
238
342
|
}
|
|
239
343
|
|
|
344
|
+
// #369: --rework-check is mutually exclusive with regular status view
|
|
345
|
+
if (args.includes('--rework-check')) {
|
|
346
|
+
const wdIdx = args.indexOf('--window-days');
|
|
347
|
+
const windowDays = (wdIdx >= 0 && args[wdIdx + 1]) ? parseInt(args[wdIdx + 1], 10) : 7;
|
|
348
|
+
return handleReworkCheck(searchDir, isNaN(windowDays) ? 7 : windowDays);
|
|
349
|
+
}
|
|
350
|
+
|
|
240
351
|
if (allFlag) {
|
|
241
352
|
return handleAllSprints(searchDir, jsonFlag, watchFlag);
|
|
242
353
|
}
|
package/mock-policy/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SRC/MOCK-POLICY KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-25
|
|
4
|
+
**Commit:** 3150b22
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.18.0.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Mock layering policy enforcement — Gate M3 of pre-push hook. Ensures integration tests use real implementations for internal dependencies, mock external dependencies, and annotate pending mocks with removal plans. Combines project scope scanning, mock decision engine, and per-file validation into a single pipeline.
|
package/mutation/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SRC/MUTATION KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-25
|
|
4
|
+
**Commit:** 3150b22
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.18.0.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
**Gate M** (incremental mutation testing) + **Gate M2** helpers (test-layer detection used by `src/mock-policy/`). Pre-push quality gate. TypeScript-only; uses Stryker.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boyingliu01/xp-gate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"description": "AI-driven development workflow: 6 quality gates + Delphi review + Sprint Flow",
|
|
5
5
|
"bin": {
|
|
6
6
|
"xp-gate": "./bin/xp-gate.js"
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"version": "0.14.31",
|
|
43
|
-
"
|
|
43
|
+
"license-check": "node scripts/check-mattpocock-license.cjs",
|
|
44
|
+
"prepack": "node scripts/check-mattpocock-license.cjs && node scripts/sync-package-content.js",
|
|
44
45
|
"test": "echo \"Run tests\" && exit 0"
|
|
45
46
|
},
|
|
46
47
|
"keywords": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-gate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"displayName": "XP-Gate",
|
|
5
5
|
"description": "Extreme Programming quality gates + AI workflow skills for Claude Code. Includes 10 quality gates (Gate 0-9), Sprint Flow (11 phases), and Delphi multi-expert review (>=90% consensus).",
|
|
6
6
|
"author": {
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: batch-grill-me
|
|
3
|
+
description: A relentless interview that asks every frontier question at once, round by round.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Interview the user relentlessly until you reach a shared understanding. Map this as a **design tree**: every decision branches into the decisions that hang off it.
|
|
8
|
+
|
|
9
|
+
Work the tree in **rounds**. The **frontier** is every decision whose prerequisites are already settled — the questions you can ask *now* without guessing at answers you haven't heard yet. Ask the whole frontier in one round: number each question and give your recommended answer. Then wait for the user's answers before the next round.
|
|
10
|
+
|
|
11
|
+
Each round the user answers reshapes the tree — settled decisions push the frontier outward and unblock questions that depended on them. Recompute the frontier and ask the next round. A question whose answer depends on another question still open in this round belongs to a *later* round, not this one.
|
|
12
|
+
|
|
13
|
+
Finding *facts* is your job, never the user's. When a frontier question needs a fact from the environment (filesystem, tools, etc.), dispatch a sub-agent to find it — don't ask the user for anything you could look up yourself. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the sub-agent to report — ask the rest of the frontier now. The *decisions* are the user's — put each to them and wait.
|
|
14
|
+
|
|
15
|
+
The session is done when the frontier is empty: every branch of the design tree visited, nothing left silently assumed. Do not act on it until the user confirms you have reached a shared understanding.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-25
|
|
4
|
+
**Commit:** 3150b22
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.18.0.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, 3 experts from ≥2 providers, domestic models only). Supports design + code-walkthrough modes.
|
|
@@ -3,8 +3,9 @@ name: delphi-review
|
|
|
3
3
|
version: 1.1.0
|
|
4
4
|
description: >
|
|
5
5
|
Performs multi-round anonymous expert consensus review using the Delphi method. Supports
|
|
6
|
-
design review (default)
|
|
7
|
-
|
|
6
|
+
design review (default), code-walkthrough (--mode code-walkthrough), and requirements
|
|
7
|
+
(lightweight, --mode requirements) modes. Uses 2-3 experts from at least 2 different domestic
|
|
8
|
+
model providers with a >=90% statistical consensus threshold.
|
|
8
9
|
Outputs structured verdict (APPROVED/PASS_WITH_CAVEATS/REQUEST_CHANGES/BLOCKED).
|
|
9
10
|
|
|
10
11
|
WHAT: Anonymous multi-expert review with iterative consensus building for designs, plans,
|
|
@@ -20,12 +21,13 @@ description: >
|
|
|
20
21
|
"多专家评审", "consensus review", "code walkthrough", "push review", "architecture review",
|
|
21
22
|
"delphi review", "run delphi", "start delphi", "评审这个架构", "review this architecture",
|
|
22
23
|
"评审PR", "review this PR with delphi", "delphi评审", "delphi 评审", "run delphi review",
|
|
23
|
-
"执行delphi", "启动delphi评审"
|
|
24
|
+
"执行delphi", "启动delphi评审", "review the requirements", "评审需求", "requirements review",
|
|
25
|
+
"/requirements-review".
|
|
24
26
|
NEGATIVE TRIGGERS: "how does delphi work", "what is delphi review", "code review checklist",
|
|
25
27
|
"review my code quickly", "can you review this", "peer review", "I need a review",
|
|
26
28
|
"explain the review process", "review guidelines", "how to review a design",
|
|
27
29
|
"code review template", "review format", "PR review", "帮我review一下",
|
|
28
|
-
"just review this", "quick review", "review steps".
|
|
30
|
+
"just review this", "quick review", "review steps", "review my requirements document".
|
|
29
31
|
maturity: beta
|
|
30
32
|
auto_continue: true
|
|
31
33
|
triggers:
|
|
@@ -51,6 +53,10 @@ triggers:
|
|
|
51
53
|
- "run delphi review"
|
|
52
54
|
- "执行delphi"
|
|
53
55
|
- "启动delphi评审"
|
|
56
|
+
- "review the requirements"
|
|
57
|
+
- "评审需求"
|
|
58
|
+
- "requirements review"
|
|
59
|
+
- "/requirements-review"
|
|
54
60
|
triggers_negative_examples:
|
|
55
61
|
- "how does delphi work" # educational question about the process
|
|
56
62
|
- "what is delphi review" # asking for explanation, not execution
|
|
@@ -72,6 +78,7 @@ triggers_negative_examples:
|
|
|
72
78
|
- "review format" # asking about format, not executing
|
|
73
79
|
- "show me how to review" # educational request about reviewing
|
|
74
80
|
- "review checklist example" # asking for examples, not running review
|
|
81
|
+
- "review my requirements document" # educational discussion about requirements, not executing review
|
|
75
82
|
triggers_negative_test_cases:
|
|
76
83
|
- input: "how does delphi work"
|
|
77
84
|
expect: "NOT triggered"
|
|
@@ -129,6 +136,16 @@ triggers_negative_test_cases:
|
|
|
129
136
|
expect: "NOT triggered"
|
|
130
137
|
- input: "run delphi"
|
|
131
138
|
expect: "triggered"
|
|
139
|
+
- input: "review the requirements"
|
|
140
|
+
expect: "triggered"
|
|
141
|
+
- input: "评审需求"
|
|
142
|
+
expect: "triggered"
|
|
143
|
+
- input: "requirements review"
|
|
144
|
+
expect: "triggered"
|
|
145
|
+
- input: "/requirements-review"
|
|
146
|
+
expect: "triggered"
|
|
147
|
+
- input: "review my requirements document"
|
|
148
|
+
expect: "NOT triggered"
|
|
132
149
|
workflow_steps:
|
|
133
150
|
- "Step 0: Input Validation → Output: [DelphiReview] or [DelphiReview:BLOCKED]"
|
|
134
151
|
- "Round 1: Anonymous Independent Review → Output: [DelphiReview Round 1] expert JSON verdicts"
|
|
@@ -203,6 +220,10 @@ tools_denied:
|
|
|
203
220
|
- run delphi review
|
|
204
221
|
- 执行delphi
|
|
205
222
|
- 启动delphi评审
|
|
223
|
+
- review the requirements
|
|
224
|
+
- 评审需求
|
|
225
|
+
- requirements review
|
|
226
|
+
- /requirements-review
|
|
206
227
|
|
|
207
228
|
**NOT triggered by:**
|
|
208
229
|
- "how does delphi work" (educational)
|
|
@@ -222,6 +243,7 @@ tools_denied:
|
|
|
222
243
|
- "code review template" (asking for template)
|
|
223
244
|
- "review format" (asking about format)
|
|
224
245
|
- "show me how to review" (educational)
|
|
246
|
+
- "review my requirements document" (educational discussion, not execution)
|
|
225
247
|
|
|
226
248
|
## Workflow
|
|
227
249
|
|
|
@@ -280,9 +302,12 @@ Each round MUST output a structured round marker:
|
|
|
280
302
|
|------|------|------|------|
|
|
281
303
|
| `design`(默认) | `/delphi-review` | 需求/设计/架构/PR 评审 | 共识报告 + specification.yaml |
|
|
282
304
|
| `code-walkthrough` | `--mode code-walkthrough` | git push 前代码走查 | `.code-walkthrough-result.json` |
|
|
305
|
+
| `requirements` | `--mode requirements` | Phase 2 THINK 阶段需求评审 | `.sprint-state/phase-outputs/requirements-reviewed.json` |
|
|
283
306
|
|
|
284
307
|
**Code Walkthrough 模式**的完整规范 → 详见 `references/code-walkthrough.md`
|
|
285
308
|
|
|
309
|
+
**Requirements 模式**的完整规范 → 详见 `references/requirements.md`
|
|
310
|
+
|
|
286
311
|
---
|
|
287
312
|
|
|
288
313
|
## 参数配置
|
|
@@ -419,6 +444,28 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
419
444
|
|
|
420
445
|
**For code-walkthrough mode**, output follows `.code-walkthrough-result.json` schema (see `references/code-walkthrough.md`).
|
|
421
446
|
|
|
447
|
+
**For requirements mode**, output follows `requirements-reviewed.json` schema (see `references/requirements.md`):
|
|
448
|
+
|
|
449
|
+
```json
|
|
450
|
+
{
|
|
451
|
+
"mode": "requirements",
|
|
452
|
+
"verdict": "APPROVED|GAPS_FOUND",
|
|
453
|
+
"timestamp": "2026-07-25T10:30:00Z",
|
|
454
|
+
"requirements_hash": "<SHA-256 hex digest>",
|
|
455
|
+
"head_commit": "<git rev-parse HEAD>",
|
|
456
|
+
"context_file_used": "CONTEXT.md",
|
|
457
|
+
"round": 1,
|
|
458
|
+
"expert_verdicts": [
|
|
459
|
+
{ "role": "architecture", "verdict": "APPROVED", "confidence": 9 },
|
|
460
|
+
{ "role": "feasibility", "verdict": "APPROVED", "confidence": 8 }
|
|
461
|
+
],
|
|
462
|
+
"requirements_statement": "<short summary of what was reviewed>",
|
|
463
|
+
"gaps_found": [],
|
|
464
|
+
"rounds_used": 1,
|
|
465
|
+
"escalation_needed": false
|
|
466
|
+
}
|
|
467
|
+
```
|
|
468
|
+
|
|
422
469
|
**Anti-patterns mapping:**
|
|
423
470
|
- `Round 1 → "评审完成"` → MUST NOT have `verdict: APPROVED` if `critical_issues` exist
|
|
424
471
|
- `只处理 Critical,忽略 Major` → MUST include `major_concerns` array
|
|
@@ -452,6 +499,11 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
452
499
|
{"mode":"code-walkthrough","commit":"abc123...","timestamp":"...","verdict":"APPROVED","consensus_ratio":1.0}
|
|
453
500
|
```
|
|
454
501
|
|
|
502
|
+
**Requirements mode APPROVED** → `.sprint-state/delphi-reviewed.json`:
|
|
503
|
+
```json
|
|
504
|
+
{"mode":"requirements","timestamp":"...","verdict":"APPROVED","consensus_ratio":1.0}
|
|
505
|
+
```
|
|
506
|
+
|
|
455
507
|
---
|
|
456
508
|
|
|
457
509
|
## Anti-Patterns
|
|
@@ -468,6 +520,8 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
468
520
|
|
|
469
521
|
**Code-walkthrough 专属 Anti-Patterns** → 详见 `references/code-walkthrough.md`
|
|
470
522
|
|
|
523
|
+
**Requirements 专属 Anti-Patterns** → 详见 `references/requirements.md`
|
|
524
|
+
|
|
471
525
|
---
|
|
472
526
|
|
|
473
527
|
## Red Flags
|
|
@@ -499,5 +553,6 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
|
|
|
499
553
|
| File | Content |
|
|
500
554
|
|------|---------|
|
|
501
555
|
| `@references/code-walkthrough.md` | Code-walkthrough mode specification |
|
|
556
|
+
| `@references/requirements.md` | Requirements mode specification |
|
|
502
557
|
| `@references/orchestrator-dispatch.md` | Orchestrator auto-dispatch rules (#218 subagent multi-round loop) |
|
|
503
558
|
| `@references/round-templates.md` | Round templates (anonymous/exchange/final/fix report formats) |
|