@boyingliu01/dsh-plugin-xp-gate 0.38.16 → 0.38.36
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/lib/hooks.d.ts
CHANGED
|
@@ -34,8 +34,10 @@ export declare function isEditTool(name: string): boolean;
|
|
|
34
34
|
/**
|
|
35
35
|
* Must this tool be gated by the sprint review guard?
|
|
36
36
|
*
|
|
37
|
-
* The inverse of {@link
|
|
38
|
-
* capable of writing, which is what closes the `bash` hole.
|
|
37
|
+
* The inverse of {@link UNGATED_TOOLS}: an unrecognised tool is treated as
|
|
38
|
+
* capable of writing, which is what closes the `bash` hole. The name is kept
|
|
39
|
+
* for its call sites even though an exempt tool such as `delphi-review` can
|
|
40
|
+
* write — see {@link UNGATED_TOOLS} for why membership is not "cannot write".
|
|
39
41
|
*/
|
|
40
42
|
export declare function mayModifyFiles(name: string): boolean;
|
|
41
43
|
/**
|
package/lib/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAyDH,kFAAkF;AAClF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAsBD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKrD;AAgBD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CA8B3F"}
|
package/lib/hooks.js
CHANGED
|
@@ -21,16 +21,33 @@
|
|
|
21
21
|
import { existsSync, readFileSync } from "node:fs";
|
|
22
22
|
import { join } from "node:path";
|
|
23
23
|
/**
|
|
24
|
-
* Tools
|
|
24
|
+
* Tools the sprint guard must never block. Everything else is gated.
|
|
25
25
|
*
|
|
26
26
|
* This is an ALLOWLIST on purpose. The guard used to name the write tools
|
|
27
27
|
* instead (`write`, `edit`, `str_replace_editor`), which let `bash` through —
|
|
28
28
|
* one shell command writes a file, so the guard was bypassable by the very tool
|
|
29
29
|
* a model reaches for first. A write-blacklist loses again on every new
|
|
30
|
-
* file-touching tool;
|
|
31
|
-
*
|
|
30
|
+
* file-touching tool; an allowlist loses only by being too strict, which
|
|
31
|
+
* surfaces as an over-eager denial rather than a silent hole.
|
|
32
|
+
*
|
|
33
|
+
* Membership is NOT "cannot write" — it is "cannot be used to sidestep this
|
|
34
|
+
* guard". Two groups qualify:
|
|
35
|
+
*
|
|
36
|
+
* 1. Tools that cannot modify a file at all (read, grep, todo_write, ...).
|
|
37
|
+
* 2. Tools that ARE the guard's exit. `delphi-review` runs the review this
|
|
38
|
+
* guard waits for, and `sprint`/`phase-transition` update the sprint state
|
|
39
|
+
* that carries the verdict. Gating them is a deadlock: the only way to
|
|
40
|
+
* satisfy the guard is to call a tool the guard rejects. Observed in
|
|
41
|
+
* practice — a repository with `.sprint-state/` but no verdict could not
|
|
42
|
+
* run `delphi-review` (or anything else) again, and had to be unblocked by
|
|
43
|
+
* hand-editing the state directory outside the session.
|
|
44
|
+
*
|
|
45
|
+
* Exempting `delphi-review` does not open a hole. It does not accept a caller-
|
|
46
|
+
* supplied verdict; it runs the three seats and derives one. The gate still
|
|
47
|
+
* stands between a model and the code until that review actually returns
|
|
48
|
+
* APPROVED, which is the behaviour it was built to enforce.
|
|
32
49
|
*/
|
|
33
|
-
const
|
|
50
|
+
const UNGATED_TOOLS = new Set([
|
|
34
51
|
"read",
|
|
35
52
|
"read_image",
|
|
36
53
|
"grep",
|
|
@@ -45,6 +62,10 @@ const READ_ONLY_TOOLS = new Set([
|
|
|
45
62
|
"gate-check",
|
|
46
63
|
"gate-principles",
|
|
47
64
|
"gate-arch",
|
|
65
|
+
// The guard's own exit. See the block comment above: without these the guard
|
|
66
|
+
// cannot be satisfied in a sprint that has state but no recorded verdict.
|
|
67
|
+
"delphi-review",
|
|
68
|
+
"sprint",
|
|
48
69
|
]);
|
|
49
70
|
/** Where Sprint Flow records the review verdict. */
|
|
50
71
|
const SPRINT_STATE_DIR = ".sprint-state";
|
|
@@ -81,11 +102,13 @@ export function isEditTool(name) {
|
|
|
81
102
|
/**
|
|
82
103
|
* Must this tool be gated by the sprint review guard?
|
|
83
104
|
*
|
|
84
|
-
* The inverse of {@link
|
|
85
|
-
* capable of writing, which is what closes the `bash` hole.
|
|
105
|
+
* The inverse of {@link UNGATED_TOOLS}: an unrecognised tool is treated as
|
|
106
|
+
* capable of writing, which is what closes the `bash` hole. The name is kept
|
|
107
|
+
* for its call sites even though an exempt tool such as `delphi-review` can
|
|
108
|
+
* write — see {@link UNGATED_TOOLS} for why membership is not "cannot write".
|
|
86
109
|
*/
|
|
87
110
|
export function mayModifyFiles(name) {
|
|
88
|
-
return !
|
|
111
|
+
return !UNGATED_TOOLS.has(name);
|
|
89
112
|
}
|
|
90
113
|
/**
|
|
91
114
|
* Should a save-time check run for this path?
|
package/lib/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CA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AI,EAAE,MAAM;YACZ,MAAM,EACJ,gFAAgF;gBAChF,oCAAoC;SACvC,CAAA;IACH,CAAC;IAED,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC,IAAI,CAAC,CAAA;IACjD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,GAAG,YAAY,6BAA6B,UAAU,0BAA0B;SACzF,CAAA;IACH,CAAC;IACD,IAAI,OAAO,KAAK,UAAU,EAAE,CAAC;QAC3B,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,MAAM,EACJ,6BAA6B,OAAO,IAAI,WAAW,mBAAmB;gBACtE,4DAA4D;SAC/D,CAAA;IACH,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boyingliu01/dsh-plugin-xp-gate",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.36",
|
|
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.38.
|
|
6
|
+
**Version:** 0.38.36.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.38.
|
|
6
|
+
**Version:** 0.38.36.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.
|
|
@@ -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.38.
|
|
6
|
+
**Version:** 0.38.36.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|