@boyingliu01/xp-gate 0.32.0 → 0.32.2
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/powershell.sh +33 -7
- package/gate-3.sh +54 -5
- package/hooks/gate-3.sh +54 -5
- package/hooks/lib/jscpd-run.sh +92 -0
- package/hooks/pre-commit +111 -56
- package/lib/mattpocock-license-verdict.json +1 -1
- package/mock-policy/AGENTS.md +3 -3
- package/mutation/AGENTS.md +3 -3
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/dsh/README.md +51 -2
- package/plugins/dsh/client/client.js +760 -0
- package/plugins/dsh/lib/client.js +760 -0
- package/plugins/dsh/lib/delphi-settings.d.ts +52 -0
- package/plugins/dsh/lib/delphi-settings.d.ts.map +1 -0
- package/plugins/dsh/lib/delphi-settings.js +76 -0
- package/plugins/dsh/lib/hooks.d.ts +14 -1
- package/plugins/dsh/lib/hooks.d.ts.map +1 -1
- package/plugins/dsh/lib/hooks.js +44 -5
- package/plugins/dsh/lib/index.d.ts +63 -0
- package/plugins/dsh/lib/index.d.ts.map +1 -1
- package/plugins/dsh/lib/index.js +126 -21
- package/plugins/dsh/package.json +13 -3
- package/plugins/dsh/scripts/copy-client.cjs +32 -0
- package/plugins/dsh/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/dsh/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/dsh/src/client.test.ts +231 -0
- package/plugins/dsh/src/delphi-settings.test.ts +101 -0
- package/plugins/dsh/src/delphi-settings.ts +111 -0
- package/plugins/dsh/src/hooks.test.ts +48 -0
- package/plugins/dsh/src/hooks.ts +45 -5
- package/plugins/dsh/src/index.test.ts +3 -2
- package/plugins/dsh/src/index.ts +147 -25
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
- 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/skills/delphi-review/AGENTS.md +3 -3
- package/skills/sprint-flow/AGENTS.md +3 -3
- package/skills/test-specification-alignment/AGENTS.md +3 -3
package/mock-policy/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SRC/MOCK-POLICY KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-10-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-10-30
|
|
4
|
+
**Commit:** 78786c3f
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.32.
|
|
6
|
+
**Version:** 0.32.2.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-10-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-10-30
|
|
4
|
+
**Commit:** 78786c3f
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.32.
|
|
6
|
+
**Version:** 0.32.2.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": "xp-gate",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.2",
|
|
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": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-10-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-10-30
|
|
4
|
+
**Commit:** 78786c3f
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.32.
|
|
6
|
+
**Version:** 0.32.2.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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-10-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-10-30
|
|
4
|
+
**Commit:** 78786c3f
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.32.
|
|
6
|
+
**Version:** 0.32.2.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, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-10-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-10-30
|
|
4
|
+
**Commit:** 78786c3f
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.32.
|
|
6
|
+
**Version:** 0.32.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
package/plugins/dsh/README.md
CHANGED
|
@@ -124,6 +124,48 @@ Delphi 方法的价值**完全建立在「评审者是不同模型」之上**。
|
|
|
124
124
|
`{ ok: true }` 是**无条件**返回的常量,"把退出码契约换成了一个常量,而不是真正的结果信号"。
|
|
125
125
|
机制**拒绝**给出共识,而不是盖章通过 —— 这正是它该有的行为。
|
|
126
126
|
|
|
127
|
+
## 配置界面(Plugins 页)
|
|
128
|
+
|
|
129
|
+
插件声明了 `dsh.client`(`platform: web`),在 Web GUI 里注册一个**行配置页**:
|
|
130
|
+
|
|
131
|
+
**侧边栏 Plugins → `@boyingliu01/dsh-plugin-xp-gate` → 组件 `tool-xp-gate` → 配置**
|
|
132
|
+
|
|
133
|
+
该页面可以编辑 Delphi 三席(角色 / 模型)、网关、密钥引用与共识参数;模型可从
|
|
134
|
+
**宿主已配置的 provider 目录**下拉选择,也可手填。
|
|
135
|
+
|
|
136
|
+
### 来源优先级
|
|
137
|
+
|
|
138
|
+
| 优先级 | 来源 | 说明 |
|
|
139
|
+
|---|---|---|
|
|
140
|
+
| 1 | 本插件配置里的 `delphi` 段(本页写入) | 一旦保存了席位,评审就用它 |
|
|
141
|
+
| 2 | 项目根 `.delphi-config.json` | 席位为空时自动回落,老项目**无需改动** |
|
|
142
|
+
|
|
143
|
+
页面上如果 `seats` 为空,评审继续走 `.delphi-config.json`,所以**打开页面不会静默改变行为**。
|
|
144
|
+
|
|
145
|
+
### 宿主强制的不变量(不是表单装饰)
|
|
146
|
+
|
|
147
|
+
表单只是方便,**宿主是权威**。每次评审前 `seatsFromSettings` 重新校验:
|
|
148
|
+
|
|
149
|
+
- 恰好 3 席
|
|
150
|
+
- 3 个 model 去空白后两两不同
|
|
151
|
+
- 模型不得为空或未展开的 `${...}` 占位符
|
|
152
|
+
- 配了席位就必须有 `base_url`
|
|
153
|
+
- `api_key` 必须是**凭据引用**(`${VAR}` / `{env:VAR}`);写入明文 token 会被拒绝,
|
|
154
|
+
因为那会把密钥落到 profile 文件里
|
|
155
|
+
|
|
156
|
+
> 为什么不在表单里就拦死:DSH 的 settings 表单只能编辑 `.volatile()` 字段,
|
|
157
|
+
> 而 volatile 意味着**保存即热生效**。对"每次运行都花钱"的配置来说,前端校验不够,
|
|
158
|
+
> 所以校验放在宿主、在发出任何请求之前。
|
|
159
|
+
|
|
160
|
+
### 关于 `bash` 守卫
|
|
161
|
+
|
|
162
|
+
`delphiGuard` 用**只读工具白名单**判定:只有 `read` / `grep` / `glob` / `read_image` /
|
|
163
|
+
XP-Gate 自己的报告类工具算只读,**其余一律视为可写**(包括 `bash`、`pwsh` 和将来新增的工具)。
|
|
164
|
+
|
|
165
|
+
早期版本用"已知写工具黑名单"(`write` / `edit` / `str_replace_editor`),
|
|
166
|
+
`bash` 一条命令就能改文件,等于这道 HARD-GATE 可绕过。白名单的代价是可能**误拦**新加的
|
|
167
|
+
只读工具——那会表现为"拦得太狠",而不是"悄悄放行"。
|
|
168
|
+
|
|
127
169
|
## Skills
|
|
128
170
|
|
|
129
171
|
本包在 publish 时通过 `scripts/prepack.cjs` 捆绑仓库 `skills/`(当前 12 个)。
|
|
@@ -171,7 +213,7 @@ subagent model selection:
|
|
|
171
213
|
|
|
172
214
|
```bash
|
|
173
215
|
npm install --ignore-scripts # --ignore-scripts 绕过 esbuild postinstall(受限环境会 EBUSY)
|
|
174
|
-
npm run build # tsc -> lib/
|
|
216
|
+
npm run build # tsc -> lib/,并把 client/client.js 复制成 lib/client.js
|
|
175
217
|
npm run prepare-skills # 从仓库 skills/ 复制
|
|
176
218
|
npm test # vitest
|
|
177
219
|
```
|
|
@@ -182,9 +224,16 @@ npm test # vitest
|
|
|
182
224
|
npm run build:dsh-plugin # = node scripts/build-plugin.mjs --platform dsh
|
|
183
225
|
```
|
|
184
226
|
|
|
227
|
+
> `client/client.js` 是**手写**的浏览器 bundle,不走 tsc:它以 DSH 的客户端模块格式
|
|
228
|
+
> (`window.__ModuleLoader__.load`) 编写,引用了浏览器全局,不是 TypeScript 模块。
|
|
229
|
+
> `npm run build` 的第二步(`scripts/copy-client.cjs`)负责把它放进 `lib/`。
|
|
230
|
+
|
|
185
231
|
## 注意
|
|
186
232
|
|
|
187
|
-
- `lib/` 与 `skills/` 是**构建产物**(已 gitignore
|
|
233
|
+
- `lib/` 与 `skills/` 是**构建产物**(已 gitignore),不提交;`client/client.js` 是**源文件**,要提交。
|
|
188
234
|
- `scripts/prepack.cjs` 的 skill 列表为**动态发现**(读取仓库 `skills/`),不硬编码。
|
|
189
235
|
- `plugins/dsh/package.json` 的 peerDeps 仍 pin `0.1.1-rc.2`,但实测运行在 `0.2.0-rc.2` 上
|
|
190
236
|
`defineTool` / `TOOL_ABORTED` / `HarnessError` 签名未变,无需改写。
|
|
237
|
+
- **配置项只有在导出 `Config` 之后才会显示。** 0.31.4 及更早的构建没有导出
|
|
238
|
+
`Config`,所以 `dsh --profile <name> --dump-config-schema` 里该行落在
|
|
239
|
+
`unknownConfig`,Plugins 页也就没有可编辑的字段。安装 0.32.x 后这一项自愈。
|