@boyingliu01/xp-gate 0.41.71 → 0.41.74

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.
Files changed (52) hide show
  1. package/adapters/java.sh +153 -10
  2. package/adapters/typescript.sh +5 -2
  3. package/gate-6-layers.sh +21 -5
  4. package/hooks/gate-6-layers.sh +21 -5
  5. package/hooks/gate-entries/gate-12b-entry.sh +8 -0
  6. package/hooks/gate-entries/gate-2-entry.sh +16 -10
  7. package/hooks/gate-entries/gate-5-entry.sh +41 -11
  8. package/hooks/gate-entries/gate-6-entry.sh +3 -0
  9. package/hooks/hook-module-resolution.sh +1 -0
  10. package/hooks/lib/validate-code-walkthrough.cjs +9 -1
  11. package/lib/hook-module-resolution.js +11 -0
  12. package/lib/mattpocock-license-verdict.json +1 -1
  13. package/mutation/AGENTS.md +9 -5
  14. package/package.json +1 -1
  15. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  16. package/plugins/claude-code/skills/delphi-review/AGENTS.md +1 -1
  17. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +1 -1
  18. package/plugins/claude-code/skills/sprint-flow/references/phase-3-build.md +3 -3
  19. package/plugins/claude-code/skills/sprint-flow/references/phase-overview.md +2 -2
  20. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +1 -1
  21. package/plugins/dsh/lib/evidence.d.ts +15 -0
  22. package/plugins/dsh/lib/evidence.d.ts.map +1 -1
  23. package/plugins/dsh/lib/evidence.js +28 -0
  24. package/plugins/dsh/lib/index.d.ts.map +1 -1
  25. package/plugins/dsh/lib/index.js +25 -8
  26. package/plugins/dsh/package.json +1 -1
  27. package/plugins/dsh/skills/delphi-review/AGENTS.md +1 -1
  28. package/plugins/dsh/skills/sprint-flow/AGENTS.md +1 -1
  29. package/plugins/dsh/skills/sprint-flow/references/phase-3-build.md +3 -3
  30. package/plugins/dsh/skills/sprint-flow/references/phase-overview.md +2 -2
  31. package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +1 -1
  32. package/plugins/dsh/src/evidence-reviewed-paths.test.ts +63 -0
  33. package/plugins/dsh/src/evidence.ts +42 -0
  34. package/plugins/dsh/src/index.ts +33 -8
  35. package/plugins/opencode/package.json +1 -1
  36. package/plugins/opencode/skills/delphi-review/AGENTS.md +1 -1
  37. package/plugins/opencode/skills/sprint-flow/AGENTS.md +1 -1
  38. package/plugins/opencode/skills/sprint-flow/references/phase-3-build.md +3 -3
  39. package/plugins/opencode/skills/sprint-flow/references/phase-overview.md +2 -2
  40. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +1 -1
  41. package/plugins/qoder/plugin.json +1 -1
  42. package/plugins/qoder/skills/delphi-review/AGENTS.md +1 -1
  43. package/plugins/qoder/skills/sprint-flow/AGENTS.md +1 -1
  44. package/plugins/qoder/skills/sprint-flow/references/phase-3-build.md +3 -3
  45. package/plugins/qoder/skills/sprint-flow/references/phase-overview.md +2 -2
  46. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +1 -1
  47. package/scripts/sync-package-content.js +11 -1
  48. package/skills/delphi-review/AGENTS.md +1 -1
  49. package/skills/sprint-flow/AGENTS.md +1 -1
  50. package/skills/sprint-flow/references/phase-3-build.md +3 -3
  51. package/skills/sprint-flow/references/phase-overview.md +2 -2
  52. package/skills/test-specification-alignment/AGENTS.md +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xp-gate",
3
- "version": "0.41.71",
3
+ "version": "0.41.74",
4
4
  "displayName": "XP-Gate",
5
5
  "description": "Extreme Programming quality gates + AI workflow skills for Claude Code. Includes 12 pre-commit gates (Gate 0-11), 8 pre-push gates, Sprint Flow (6 phases), and Delphi multi-expert review (>=90% consensus).",
6
6
  "author": {
@@ -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.71.0
6
+ **Version:** 0.41.74.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.
@@ -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.71.0
6
+ **Version:** 0.41.74.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration; each REQ starts from a clean context instead of accumulating one across REQs). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
@@ -18,7 +18,7 @@
18
18
  |------|------|------|
19
19
  | Gate 5 | 单元测试 + 覆盖率 | 全部通过 + ≥80% 覆盖率 |
20
20
  | Gate 5a-BLOCK | 新增 .ts/.tsx 文件测试强制 | 新增 .ts/.tsx 文件无对应测试文件 → BLOCK;修改文件 → WARNING |
21
- | Gate M2 | Mock 密度检查 | 30% WARNING (Phase 1); 可配置 via `.mockpolicyrc` |
21
+ | Gate 5b | Mock 密度检查(Gate 5 的一个子步骤) | 30% advisory,不阻断 |
22
22
 
23
23
  ---
24
24
 
@@ -350,12 +350,12 @@ tools: [Read, Grep, Glob] # 只读 — 禁止 Write/Edit/Bash 写操作
350
350
  - **修改已有文件**仅触发 WARNING(不阻断)
351
351
  - **Escape valve**: 非 main/master 分支可设置 `SKIP_GATE_5A_BLOCK=1` 跳过阻断(仅 WARNING)
352
352
 
353
- ### Gate M2: Mock 密度阈值调整
353
+ ### Gate 5b: Mock 密度阈值调整
354
354
 
355
355
  - Mock 密度阈值从 50% 降低至 **30%**
356
356
  - **Phase 1**: WARNING 模式(仅告警,不阻断)
357
357
  - **Phase 2**: 将在基线分析后启用 BLOCK 模式
358
- - 可通过 `.mockpolicyrc` 配置阈值和行为
358
+ - Mock 密度的阈值写在 Gate 5 的 adapter 里;`.mockpolicyrc` 配置的是 **Gate ML(Mock 分层策略)**,不是本节
359
359
 
360
360
  ### Escape Valve
361
361
 
@@ -29,7 +29,7 @@ Sprint Flow is NOT just a sequential launcher of existing skills. Here's what ma
29
29
  | **Gate Enforcement** | No enforcement — easy to skip Delphi, skip TDD, skip UAT | HARD-GATE: design must be APPROVED (≥90% Delphi consensus) before coding; UAT is mandatory (no bypass) |
30
30
  | **Context Growth** | Linear context accumulation across phases — one growing shared context | Ralph-loop default: each REQ starts from a clean context instead of inheriting everything before it |
31
31
  | **Emergent Requirements** | Discovered late, silently ignored or merged | Phase 6 CLOSE explicitly captures emergent issues via template; triggers Sprint 2 for critical issues |
32
- | **Quality Ecosystem** | No integration with quality gates | Integrated with xp-gate's full quality ecosystem: Gate 5 (coverage), Gate M2 (mock density), Delphi code-walkthrough |
32
+ | **Quality Ecosystem** | No integration with quality gates | Integrated with xp-gate's full quality ecosystem: Gate 5 (coverage + mock density, as Gate 5b), Delphi code-walkthrough |
33
33
  | **Progress Tracking** | Ad-hoc, memory-based | `.sprint-state/` persistence with phase history, timing, and metrics — `--status` renders progress dashboard |
34
34
 
35
35
  ### Key Differentiators
@@ -40,7 +40,7 @@ Sprint Flow is NOT just a sequential launcher of existing skills. Here's what ma
40
40
 
41
41
  3. **Emergent Requirements Acknowledgment**: Based on research showing 78% of failures are invisible to AI (arXiv study), Phase 6 CLOSE includes mandatory manual UAT verification — cannot be automated, skipped, or bypassed.
42
42
 
43
- 4. **XP-Gate Quality Ecosystem Integration**: Sprint Flow is part of the broader xp-gate ecosystem. Phase 3 BUILD integrates with Gate 5 (test coverage ≥80%), Gate M2 (mock density ≤30%), and Gate MW (code-walkthrough validation). Phase 4 VERIFY runs Delphi code-walkthrough that generates `.code-walkthrough-result.json` for pre-push enforcement.
43
+ 4. **XP-Gate Quality Ecosystem Integration**: Sprint Flow is part of the broader xp-gate ecosystem. Phase 3 BUILD integrates with Gate 5 (test coverage; threshold is in `vitest.config.ts`) and its Gate 5b mock-density advisory, and with Gate MW (code-walkthrough validation). Phase 4 VERIFY runs Delphi code-walkthrough that generates `.code-walkthrough-result.json` for pre-push enforcement.
44
44
 
45
45
  5. **Full Lifecycle Coverage**: From worktree isolation (PREP) to cleanup (CLOSE), sprint-flow covers the entire development lifecycle — not just the "write code" part. PREP (Phase 1/6) prevents over-engineering by routing lightweight changes through simplified workflows.
46
46
 
@@ -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.71.0
6
+ **Version:** 0.41.74.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -34,6 +34,11 @@ export interface WalkthroughEvidence {
34
34
  * matcher rather than a later one.
35
35
  */
36
36
  readonly findings?: readonly EvidenceFinding[];
37
+ /**
38
+ * Gate MW's coverage record (#902): the paths this walkthrough read. Checked as
39
+ * a SUPERSET of what the push changes; omitted when the caller cannot say.
40
+ */
41
+ readonly reviewed_paths?: readonly string[];
37
42
  }
38
43
  /** One ledger entry, flattened for the evidence file. */
39
44
  export interface EvidenceFinding {
@@ -73,6 +78,16 @@ export interface BuildEvidenceInput {
73
78
  readonly consensusRatio?: number;
74
79
  /** The ledger to record, if the caller keeps one. Purely informational. */
75
80
  readonly findings?: readonly EvidenceFinding[];
81
+ /**
82
+ * The paths this review actually read (#902).
83
+ *
84
+ * Gate MW checks this as a SUPERSET of `git diff --name-only <commit>..HEAD`, so
85
+ * a value that lists every changed path unconditionally would make the check
86
+ * vacuously true -- the fail-open shape `validateCoverage` exists to prevent.
87
+ * Callers that cannot say what was read must pass `undefined`, and
88
+ * `buildEvidence` then REFUSES to write rather than inventing coverage.
89
+ */
90
+ readonly reviewedPaths?: readonly string[];
76
91
  }
77
92
  /**
78
93
  * Label a gateway as local or external.
@@ -1 +1 @@
1
- {"version":3,"file":"evidence.d.ts","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,CAAC,GAAG,EAAE,IAAI,CAAA;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,yFAAyF;IACzF,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,eAAe,EAAE,CAAA;IAC9C;;;;;;;;OAQG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC3C;AAWD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAKrE;AAwBD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,mBAAmB,CAmC5E"}
@@ -72,6 +72,7 @@ export function buildEvidence(input) {
72
72
  }
73
73
  const channel = evidenceChannel(input.baseUrl ?? "");
74
74
  const expires = new Date(input.now.getTime() + VALIDITY_MS);
75
+ const reviewedPaths = normaliseReviewedPaths(input.reviewedPaths);
75
76
  return {
76
77
  commit: input.head,
77
78
  branch: input.branch,
@@ -90,6 +91,33 @@ export function buildEvidence(input) {
90
91
  // Absent when the caller has no ledger: an empty array would claim "nothing
91
92
  // was ever reported", which is a different fact from "nobody recorded it".
92
93
  ...(input.findings && input.findings.length > 0 ? { findings: input.findings } : {}),
94
+ ...(reviewedPaths.length > 0 ? { reviewed_paths: reviewedPaths } : {}),
93
95
  };
94
96
  }
97
+ /**
98
+ * Validate and de-duplicate the reviewed path list (#902).
99
+ *
100
+ * Returns an empty array when the caller supplied nothing, which makes
101
+ * `buildEvidence` omit the field. The validator then fails the push with
102
+ * "reviewed_paths must be an array" -- the correct outcome: evidence that cannot
103
+ * say what it read is not evidence, and inventing a list would switch the coverage
104
+ * check off for every future push.
105
+ */
106
+ function normaliseReviewedPaths(paths) {
107
+ if (!Array.isArray(paths))
108
+ return [];
109
+ const out = [];
110
+ const seen = new Set();
111
+ for (const raw of paths) {
112
+ const path = String(raw).trim().replace(/\\/g, "/").replace(/^\.\//, "");
113
+ if (path === "" || path.startsWith("/") || path.split("/").includes("..")) {
114
+ throw new Error(`reviewed_paths entry "${raw}" must be a repository-relative path`);
115
+ }
116
+ if (seen.has(path))
117
+ continue;
118
+ seen.add(path);
119
+ out.push(path);
120
+ }
121
+ return out;
122
+ }
95
123
  //# sourceMappingURL=evidence.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,CAAC,MAAM,0BAA0B,CAAA;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AA2BlD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM;;;GAA6C,CAAA;AAElG,eAAO,MAAM,IAAI,iBAAiB,CAAA;AAGlC,eAAO,MAAM,MAAM,UAA+B,CAAA;AA+QlD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKrE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAQtC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE9E;AA8ID;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA4BjB,CAAA;AAEF,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,OAAY,GAAG,IAAI,CAmC9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,CAAC,MAAM,0BAA0B,CAAA;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AA2BlD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM;;;GAA6C,CAAA;AAElG,eAAO,MAAM,IAAI,iBAAiB,CAAA;AAGlC,eAAO,MAAM,MAAM,UAA+B,CAAA;AAmRlD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKrE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAQtC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE9E;AAmKD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA4BjB,CAAA;AAEF,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,OAAY,GAAG,IAAI,CAmC9D"}
@@ -172,7 +172,7 @@ function ledgerForEvidence(outcome) {
172
172
  title: f.title,
173
173
  }));
174
174
  }
175
- async function writeWalkthroughEvidence(cwd, cfg, outcome) {
175
+ async function writeWalkthroughEvidence(cwd, cfg, outcome, reviewedPaths) {
176
176
  try {
177
177
  const lastRound = outcome.rounds[outcome.rounds.length - 1];
178
178
  const seats = lastRound.verdicts.map((v) => ({
@@ -190,6 +190,7 @@ async function writeWalkthroughEvidence(cwd, cfg, outcome) {
190
190
  baseUrl: cfg.baseUrl,
191
191
  consensusRatio: outcome.finalRatio,
192
192
  findings: ledgerForEvidence(outcome),
193
+ reviewedPaths,
193
194
  });
194
195
  const target = join(cwd, EVIDENCE_FILE);
195
196
  await writeFile(target, `${JSON.stringify(evidence, null, 2)}\n`, "utf8");
@@ -323,12 +324,12 @@ export function formatPluginFooter(provider, described) {
323
324
  return `Provider: ${provider} | plugin: ${pluginVersion()}\nSeats: ${described}`;
324
325
  }
325
326
  async function runDelphiReview(subject, request) {
326
- const { addressed, cwd, resolveApiKey, signal, writeEvidence } = request;
327
+ const { addressed, cwd, resolveApiKey, signal, writeEvidence, reviewedPaths } = request;
327
328
  try {
328
329
  const { options, provider, described, cfg } = await reviewOptions(request, resolveApiKey);
329
330
  const outcome = await runReview(options, subject, addressed, signal);
330
331
  const suffix = writeEvidence && cfg !== undefined
331
- ? await writeWalkthroughEvidence(cwd, cfg, outcome)
332
+ ? await writeWalkthroughEvidence(cwd, cfg, outcome, reviewedPaths)
332
333
  : "";
333
334
  return `${formatOutcome(outcome)}\n\n${formatPluginFooter(provider, described)}${suffix}`;
334
335
  }
@@ -342,10 +343,27 @@ async function runDelphiReview(subject, request) {
342
343
  throw e;
343
344
  }
344
345
  }
346
+ /** Hoisted so `delphiReviewTool` stays inside the 50-line rule after #902 added a parameter. */
347
+ const DELPHI_REVIEW_DESCRIPTION = "Run a Delphi cross-review of a subject (a diff, a design, a spec) using three DISTINCT models from an external OpenAI-compatible provider. The seats come from the plugin's settings page (Plugins -> xp-gate -> Configure) when it holds any, otherwise from .delphi-config.json. Round 1 is anonymous and concurrent; later rounds feed back the aggregate until the approval ratio reaches the configured threshold (default 90%) or the round cap (default 5). Use this whenever a change needs independent multi-model review rather than a single model's opinion.";
348
+ /**
349
+ * The `reviewedPaths` parameter (#902), hoisted so `delphiReviewTool` stays inside
350
+ * the 50-line rule: the description carries the whole contract, and inlining it
351
+ * pushed the tool definition to 57 lines.
352
+ */
353
+ /** The `writeEvidence` parameter, hoisted for the same length reason as below. */
354
+ const WRITE_EVIDENCE_PARAM = {
355
+ type: "boolean",
356
+ description: "Write .code-walkthrough-result.json for the Gate MW pre-push check. Off by default because it is a file side effect; requires an APPROVED review.",
357
+ };
358
+ const REVIEWED_PATHS_PARAM = {
359
+ type: "array",
360
+ items: { type: "string" },
361
+ description: "Repository-relative paths this review actually read (#902). Gate MW requires this as a SUPERSET of the paths the push changes, so evidence written without it is rejected at push time. Pass the files you put into `subject` -- NOT every changed path, which would make the coverage check vacuously true.",
362
+ };
345
363
  function delphiReviewTool(resolveApiKey, settings) {
346
364
  return defineTool({
347
365
  name: "delphi-review",
348
- description: "Run a Delphi cross-review of a subject (a diff, a design, a spec) using three DISTINCT models from an external OpenAI-compatible provider. The seats come from the plugin's settings page (Plugins -> xp-gate -> Configure) when it holds any, otherwise from .delphi-config.json. Round 1 is anonymous and concurrent; later rounds feed back the aggregate until the approval ratio reaches the configured threshold (default 90%) or the round cap (default 5). Use this whenever a change needs independent multi-model review rather than a single model's opinion.",
366
+ description: DELPHI_REVIEW_DESCRIPTION,
349
367
  parameters: {
350
368
  subject: {
351
369
  type: "string",
@@ -364,10 +382,8 @@ function delphiReviewTool(resolveApiKey, settings) {
364
382
  type: "string",
365
383
  description: "Project root containing .delphi-config.json (defaults to the session cwd).",
366
384
  },
367
- writeEvidence: {
368
- type: "boolean",
369
- description: "Write .code-walkthrough-result.json for the Gate MW pre-push check. Off by default because it is a file side effect; requires an APPROVED review.",
370
- },
385
+ writeEvidence: WRITE_EVIDENCE_PARAM,
386
+ reviewedPaths: REVIEWED_PATHS_PARAM,
371
387
  },
372
388
  output: {
373
389
  schema: { type: "string" },
@@ -383,6 +399,7 @@ function delphiReviewTool(resolveApiKey, settings) {
383
399
  resolveApiKey,
384
400
  signal: exec.signal,
385
401
  writeEvidence: args.writeEvidence ?? false,
402
+ reviewedPaths: args.reviewedPaths,
386
403
  settings,
387
404
  });
388
405
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/dsh-plugin-xp-gate",
3
- "version": "0.41.71",
3
+ "version": "0.41.74",
4
4
  "description": "XP-Gate deterministic quality gates + AI workflow skills as a DeepSeek Harness (DSH) native plugin: gate-check / gate-principles / gate-arch tools + 12 SKILL.md skills",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -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.71.0
6
+ **Version:** 0.41.74.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.
@@ -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.71.0
6
+ **Version:** 0.41.74.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration; each REQ starts from a clean context instead of accumulating one across REQs). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
@@ -18,7 +18,7 @@
18
18
  |------|------|------|
19
19
  | Gate 5 | 单元测试 + 覆盖率 | 全部通过 + ≥80% 覆盖率 |
20
20
  | Gate 5a-BLOCK | 新增 .ts/.tsx 文件测试强制 | 新增 .ts/.tsx 文件无对应测试文件 → BLOCK;修改文件 → WARNING |
21
- | Gate M2 | Mock 密度检查 | 30% WARNING (Phase 1); 可配置 via `.mockpolicyrc` |
21
+ | Gate 5b | Mock 密度检查(Gate 5 的一个子步骤) | 30% advisory,不阻断 |
22
22
 
23
23
  ---
24
24
 
@@ -350,12 +350,12 @@ tools: [Read, Grep, Glob] # 只读 — 禁止 Write/Edit/Bash 写操作
350
350
  - **修改已有文件**仅触发 WARNING(不阻断)
351
351
  - **Escape valve**: 非 main/master 分支可设置 `SKIP_GATE_5A_BLOCK=1` 跳过阻断(仅 WARNING)
352
352
 
353
- ### Gate M2: Mock 密度阈值调整
353
+ ### Gate 5b: Mock 密度阈值调整
354
354
 
355
355
  - Mock 密度阈值从 50% 降低至 **30%**
356
356
  - **Phase 1**: WARNING 模式(仅告警,不阻断)
357
357
  - **Phase 2**: 将在基线分析后启用 BLOCK 模式
358
- - 可通过 `.mockpolicyrc` 配置阈值和行为
358
+ - Mock 密度的阈值写在 Gate 5 的 adapter 里;`.mockpolicyrc` 配置的是 **Gate ML(Mock 分层策略)**,不是本节
359
359
 
360
360
  ### Escape Valve
361
361
 
@@ -29,7 +29,7 @@ Sprint Flow is NOT just a sequential launcher of existing skills. Here's what ma
29
29
  | **Gate Enforcement** | No enforcement — easy to skip Delphi, skip TDD, skip UAT | HARD-GATE: design must be APPROVED (≥90% Delphi consensus) before coding; UAT is mandatory (no bypass) |
30
30
  | **Context Growth** | Linear context accumulation across phases — one growing shared context | Ralph-loop default: each REQ starts from a clean context instead of inheriting everything before it |
31
31
  | **Emergent Requirements** | Discovered late, silently ignored or merged | Phase 6 CLOSE explicitly captures emergent issues via template; triggers Sprint 2 for critical issues |
32
- | **Quality Ecosystem** | No integration with quality gates | Integrated with xp-gate's full quality ecosystem: Gate 5 (coverage), Gate M2 (mock density), Delphi code-walkthrough |
32
+ | **Quality Ecosystem** | No integration with quality gates | Integrated with xp-gate's full quality ecosystem: Gate 5 (coverage + mock density, as Gate 5b), Delphi code-walkthrough |
33
33
  | **Progress Tracking** | Ad-hoc, memory-based | `.sprint-state/` persistence with phase history, timing, and metrics — `--status` renders progress dashboard |
34
34
 
35
35
  ### Key Differentiators
@@ -40,7 +40,7 @@ Sprint Flow is NOT just a sequential launcher of existing skills. Here's what ma
40
40
 
41
41
  3. **Emergent Requirements Acknowledgment**: Based on research showing 78% of failures are invisible to AI (arXiv study), Phase 6 CLOSE includes mandatory manual UAT verification — cannot be automated, skipped, or bypassed.
42
42
 
43
- 4. **XP-Gate Quality Ecosystem Integration**: Sprint Flow is part of the broader xp-gate ecosystem. Phase 3 BUILD integrates with Gate 5 (test coverage ≥80%), Gate M2 (mock density ≤30%), and Gate MW (code-walkthrough validation). Phase 4 VERIFY runs Delphi code-walkthrough that generates `.code-walkthrough-result.json` for pre-push enforcement.
43
+ 4. **XP-Gate Quality Ecosystem Integration**: Sprint Flow is part of the broader xp-gate ecosystem. Phase 3 BUILD integrates with Gate 5 (test coverage; threshold is in `vitest.config.ts`) and its Gate 5b mock-density advisory, and with Gate MW (code-walkthrough validation). Phase 4 VERIFY runs Delphi code-walkthrough that generates `.code-walkthrough-result.json` for pre-push enforcement.
44
44
 
45
45
  5. **Full Lifecycle Coverage**: From worktree isolation (PREP) to cleanup (CLOSE), sprint-flow covers the entire development lifecycle — not just the "write code" part. PREP (Phase 1/6) prevents over-engineering by routing lightweight changes through simplified workflows.
46
46
 
@@ -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.71.0
6
+ **Version:** 0.41.74.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @test REQ-902 the evidence WRITER must produce `reviewed_paths`
3
+ * @intent Gate MW's `validateCoverage` requires `reviewed_paths` as a superset of
4
+ * the paths a push changes, and before this the writer never produced it
5
+ * (`plugins/dsh/src/evidence.ts` had no such field at all). Every
6
+ * functional-branch push was therefore blocked by a field nobody could
7
+ * generate -- and the gate's own tests hid it, because they hand-built
8
+ * evidence JSON containing the field instead of calling the writer.
9
+ *
10
+ * Two properties are load-bearing, and they pull in opposite directions:
11
+ *
12
+ * 1. the field must be EMITTED when the caller says what was read, or
13
+ * the gate stays unsatisfiable;
14
+ * 2. it must NOT be filled with "every changed path", which would make
15
+ * the superset check vacuously true -- the fail-open shape
16
+ * `validateCoverage` exists to prevent.
17
+ *
18
+ * So an absent list produces an absent field (and the push fails with a
19
+ * message that now points at a real remedy), never an invented one.
20
+ *
21
+ * @covers AC-902-01 a supplied list is emitted, normalised and de-duplicated
22
+ * @covers AC-902-02 an absent list omits the field rather than inventing coverage
23
+ * @covers AC-902-03 absolute and escaping paths are refused
24
+ */
25
+ import { describe, expect, it } from "vitest"
26
+ import { buildEvidence } from "./evidence.js"
27
+
28
+ const seats = [
29
+ { role: "architecture", model: "m1", resolved: "r1" },
30
+ { role: "technical", model: "m2", resolved: "r2" },
31
+ { role: "feasibility", model: "m3", resolved: "r3" },
32
+ ]
33
+
34
+ const base = {
35
+ head: "a".repeat(40),
36
+ branch: "feature/x",
37
+ seats,
38
+ verdict: "APPROVED" as const,
39
+ now: new Date("2026-12-04T00:00:00Z"),
40
+ }
41
+
42
+ describe("evidence writer: reviewed_paths (#902)", () => {
43
+ it("AC-902-01: emits a normalised, de-duplicated list", () => {
44
+ const evidence = buildEvidence({ ...base, reviewedPaths: ["./src/a.ts", "src/a.ts", "src/b.ts"] })
45
+ expect(evidence.reviewed_paths).toEqual(["src/a.ts", "src/b.ts"])
46
+ })
47
+
48
+ it("AC-902-02: omits the field when nothing was supplied, instead of inventing coverage", () => {
49
+ const evidence = buildEvidence(base)
50
+ expect(evidence.reviewed_paths).toBeUndefined()
51
+ // An empty ARRAY would also be wrong: it reads as "this review read no files".
52
+ expect(Object.keys(evidence)).not.toContain("reviewed_paths")
53
+ })
54
+
55
+ it("AC-902-02b: an empty list is treated as absent", () => {
56
+ expect(buildEvidence({ ...base, reviewedPaths: [] }).reviewed_paths).toBeUndefined()
57
+ })
58
+
59
+ it("AC-902-03: refuses absolute paths and paths escaping the repository", () => {
60
+ expect(() => buildEvidence({ ...base, reviewedPaths: ["/etc/passwd"] })).toThrow(/repository-relative/)
61
+ expect(() => buildEvidence({ ...base, reviewedPaths: ["../outside.ts"] })).toThrow(/repository-relative/)
62
+ })
63
+ })
@@ -35,6 +35,11 @@ export interface WalkthroughEvidence {
35
35
  * matcher rather than a later one.
36
36
  */
37
37
  readonly findings?: readonly EvidenceFinding[]
38
+ /**
39
+ * Gate MW's coverage record (#902): the paths this walkthrough read. Checked as
40
+ * a SUPERSET of what the push changes; omitted when the caller cannot say.
41
+ */
42
+ readonly reviewed_paths?: readonly string[]
38
43
  }
39
44
 
40
45
  /** One ledger entry, flattened for the evidence file. */
@@ -78,6 +83,16 @@ export interface BuildEvidenceInput {
78
83
  readonly consensusRatio?: number
79
84
  /** The ledger to record, if the caller keeps one. Purely informational. */
80
85
  readonly findings?: readonly EvidenceFinding[]
86
+ /**
87
+ * The paths this review actually read (#902).
88
+ *
89
+ * Gate MW checks this as a SUPERSET of `git diff --name-only <commit>..HEAD`, so
90
+ * a value that lists every changed path unconditionally would make the check
91
+ * vacuously true -- the fail-open shape `validateCoverage` exists to prevent.
92
+ * Callers that cannot say what was read must pass `undefined`, and
93
+ * `buildEvidence` then REFUSES to write rather than inventing coverage.
94
+ */
95
+ readonly reviewedPaths?: readonly string[]
81
96
  }
82
97
 
83
98
  /** The validator requires exactly three seats. */
@@ -143,6 +158,7 @@ export function buildEvidence(input: BuildEvidenceInput): WalkthroughEvidence {
143
158
 
144
159
  const channel = evidenceChannel(input.baseUrl ?? "")
145
160
  const expires = new Date(input.now.getTime() + VALIDITY_MS)
161
+ const reviewedPaths = normaliseReviewedPaths(input.reviewedPaths)
146
162
 
147
163
  return {
148
164
  commit: input.head,
@@ -162,5 +178,31 @@ export function buildEvidence(input: BuildEvidenceInput): WalkthroughEvidence {
162
178
  // Absent when the caller has no ledger: an empty array would claim "nothing
163
179
  // was ever reported", which is a different fact from "nobody recorded it".
164
180
  ...(input.findings && input.findings.length > 0 ? { findings: input.findings } : {}),
181
+ ...(reviewedPaths.length > 0 ? { reviewed_paths: reviewedPaths } : {}),
182
+ }
183
+ }
184
+
185
+ /**
186
+ * Validate and de-duplicate the reviewed path list (#902).
187
+ *
188
+ * Returns an empty array when the caller supplied nothing, which makes
189
+ * `buildEvidence` omit the field. The validator then fails the push with
190
+ * "reviewed_paths must be an array" -- the correct outcome: evidence that cannot
191
+ * say what it read is not evidence, and inventing a list would switch the coverage
192
+ * check off for every future push.
193
+ */
194
+ function normaliseReviewedPaths(paths: readonly string[] | undefined): string[] {
195
+ if (!Array.isArray(paths)) return []
196
+ const out: string[] = []
197
+ const seen = new Set<string>()
198
+ for (const raw of paths) {
199
+ const path = String(raw).trim().replace(/\\/g, "/").replace(/^\.\//, "")
200
+ if (path === "" || path.startsWith("/") || path.split("/").includes("..")) {
201
+ throw new Error(`reviewed_paths entry "${raw}" must be a repository-relative path`)
202
+ }
203
+ if (seen.has(path)) continue
204
+ seen.add(path)
205
+ out.push(path)
165
206
  }
207
+ return out
166
208
  }
@@ -209,6 +209,7 @@ async function writeWalkthroughEvidence(
209
209
  cwd: string,
210
210
  cfg: ResolvedDelphiConfig,
211
211
  outcome: ReviewOutcome,
212
+ reviewedPaths: readonly string[] | undefined,
212
213
  ): Promise<string> {
213
214
  try {
214
215
  const lastRound = outcome.rounds[outcome.rounds.length - 1]
@@ -227,6 +228,7 @@ async function writeWalkthroughEvidence(
227
228
  baseUrl: cfg.baseUrl,
228
229
  consensusRatio: outcome.finalRatio,
229
230
  findings: ledgerForEvidence(outcome),
231
+ reviewedPaths,
230
232
  })
231
233
  const target = join(cwd, EVIDENCE_FILE)
232
234
  await writeFile(target, `${JSON.stringify(evidence, null, 2)}\n`, "utf8")
@@ -244,6 +246,8 @@ interface ReviewRequest {
244
246
  readonly resolveApiKey: ApiKeyResolver
245
247
  readonly signal: AbortSignal | undefined
246
248
  readonly writeEvidence: boolean
249
+ /** Paths this review read; required for Gate MW coverage (#902). */
250
+ readonly reviewedPaths: readonly string[] | undefined
247
251
  /** Seats from the settings page; empty means "read .delphi-config.json". */
248
252
  readonly settings: DelphiSettingsLayer | undefined
249
253
  }
@@ -380,12 +384,12 @@ export function formatPluginFooter(provider: string, described: string): string
380
384
  }
381
385
 
382
386
  async function runDelphiReview(subject: string, request: ReviewRequest): Promise<string> {
383
- const { addressed, cwd, resolveApiKey, signal, writeEvidence } = request
387
+ const { addressed, cwd, resolveApiKey, signal, writeEvidence, reviewedPaths } = request
384
388
  try {
385
389
  const { options, provider, described, cfg } = await reviewOptions(request, resolveApiKey)
386
390
  const outcome = await runReview(options, subject, addressed, signal)
387
391
  const suffix = writeEvidence && cfg !== undefined
388
- ? await writeWalkthroughEvidence(cwd, cfg, outcome)
392
+ ? await writeWalkthroughEvidence(cwd, cfg, outcome, reviewedPaths)
389
393
  : ""
390
394
  return `${formatOutcome(outcome)}\n\n${formatPluginFooter(provider, described)}${suffix}`
391
395
  } catch (e) {
@@ -397,11 +401,34 @@ async function runDelphiReview(subject: string, request: ReviewRequest): Promise
397
401
  }
398
402
  }
399
403
 
404
+ /** Hoisted so `delphiReviewTool` stays inside the 50-line rule after #902 added a parameter. */
405
+ const DELPHI_REVIEW_DESCRIPTION =
406
+ "Run a Delphi cross-review of a subject (a diff, a design, a spec) using three DISTINCT models from an external OpenAI-compatible provider. The seats come from the plugin's settings page (Plugins -> xp-gate -> Configure) when it holds any, otherwise from .delphi-config.json. Round 1 is anonymous and concurrent; later rounds feed back the aggregate until the approval ratio reaches the configured threshold (default 90%) or the round cap (default 5). Use this whenever a change needs independent multi-model review rather than a single model's opinion."
407
+
408
+ /**
409
+ * The `reviewedPaths` parameter (#902), hoisted so `delphiReviewTool` stays inside
410
+ * the 50-line rule: the description carries the whole contract, and inlining it
411
+ * pushed the tool definition to 57 lines.
412
+ */
413
+ /** The `writeEvidence` parameter, hoisted for the same length reason as below. */
414
+ const WRITE_EVIDENCE_PARAM = {
415
+ type: "boolean",
416
+ description:
417
+ "Write .code-walkthrough-result.json for the Gate MW pre-push check. Off by default because it is a file side effect; requires an APPROVED review.",
418
+ } as const
419
+
420
+ const REVIEWED_PATHS_PARAM = {
421
+ type: "array",
422
+ items: { type: "string" },
423
+ description:
424
+ "Repository-relative paths this review actually read (#902). Gate MW requires this as a SUPERSET of the paths the push changes, so evidence written without it is rejected at push time. Pass the files you put into `subject` -- NOT every changed path, which would make the coverage check vacuously true.",
425
+ } as const
426
+
400
427
  function delphiReviewTool(resolveApiKey: ApiKeyResolver, settings: DelphiSettingsLayer | undefined) {
401
428
  return defineTool({
402
429
  name: "delphi-review",
403
430
  description:
404
- "Run a Delphi cross-review of a subject (a diff, a design, a spec) using three DISTINCT models from an external OpenAI-compatible provider. The seats come from the plugin's settings page (Plugins -> xp-gate -> Configure) when it holds any, otherwise from .delphi-config.json. Round 1 is anonymous and concurrent; later rounds feed back the aggregate until the approval ratio reaches the configured threshold (default 90%) or the round cap (default 5). Use this whenever a change needs independent multi-model review rather than a single model's opinion.",
431
+ DELPHI_REVIEW_DESCRIPTION,
405
432
  parameters: {
406
433
  subject: {
407
434
  type: "string",
@@ -422,11 +449,8 @@ function delphiReviewTool(resolveApiKey: ApiKeyResolver, settings: DelphiSetting
422
449
  type: "string",
423
450
  description: "Project root containing .delphi-config.json (defaults to the session cwd).",
424
451
  },
425
- writeEvidence: {
426
- type: "boolean",
427
- description:
428
- "Write .code-walkthrough-result.json for the Gate MW pre-push check. Off by default because it is a file side effect; requires an APPROVED review.",
429
- },
452
+ writeEvidence: WRITE_EVIDENCE_PARAM,
453
+ reviewedPaths: REVIEWED_PATHS_PARAM,
430
454
  },
431
455
  output: {
432
456
  schema: { type: "string" },
@@ -442,6 +466,7 @@ function delphiReviewTool(resolveApiKey: ApiKeyResolver, settings: DelphiSetting
442
466
  resolveApiKey,
443
467
  signal: exec.signal,
444
468
  writeEvidence: args.writeEvidence ?? false,
469
+ reviewedPaths: args.reviewedPaths,
445
470
  settings,
446
471
  })
447
472
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/opencode-plugin",
3
- "version": "0.41.71",
3
+ "version": "0.41.74",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "description": "XP-Gate quality gates + AI workflow skills for OpenCode",
@@ -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.71.0
6
+ **Version:** 0.41.74.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.
@@ -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.71.0
6
+ **Version:** 0.41.74.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration; each REQ starts from a clean context instead of accumulating one across REQs). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
@@ -18,7 +18,7 @@
18
18
  |------|------|------|
19
19
  | Gate 5 | 单元测试 + 覆盖率 | 全部通过 + ≥80% 覆盖率 |
20
20
  | Gate 5a-BLOCK | 新增 .ts/.tsx 文件测试强制 | 新增 .ts/.tsx 文件无对应测试文件 → BLOCK;修改文件 → WARNING |
21
- | Gate M2 | Mock 密度检查 | 30% WARNING (Phase 1); 可配置 via `.mockpolicyrc` |
21
+ | Gate 5b | Mock 密度检查(Gate 5 的一个子步骤) | 30% advisory,不阻断 |
22
22
 
23
23
  ---
24
24
 
@@ -350,12 +350,12 @@ tools: [Read, Grep, Glob] # 只读 — 禁止 Write/Edit/Bash 写操作
350
350
  - **修改已有文件**仅触发 WARNING(不阻断)
351
351
  - **Escape valve**: 非 main/master 分支可设置 `SKIP_GATE_5A_BLOCK=1` 跳过阻断(仅 WARNING)
352
352
 
353
- ### Gate M2: Mock 密度阈值调整
353
+ ### Gate 5b: Mock 密度阈值调整
354
354
 
355
355
  - Mock 密度阈值从 50% 降低至 **30%**
356
356
  - **Phase 1**: WARNING 模式(仅告警,不阻断)
357
357
  - **Phase 2**: 将在基线分析后启用 BLOCK 模式
358
- - 可通过 `.mockpolicyrc` 配置阈值和行为
358
+ - Mock 密度的阈值写在 Gate 5 的 adapter 里;`.mockpolicyrc` 配置的是 **Gate ML(Mock 分层策略)**,不是本节
359
359
 
360
360
  ### Escape Valve
361
361