@boyingliu01/dsh-plugin-xp-gate 0.38.8 → 0.38.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/dsh-plugin-xp-gate",
3
- "version": "0.38.8",
3
+ "version": "0.38.10",
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.8.0
6
+ **Version:** 0.38.10.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.
@@ -7,7 +7,7 @@ maturity: stable
7
7
 
8
8
  # Ralph Loop — Default REQ-Level Iterative Build
9
9
 
10
- Core principles: **isolated context per REQ**, **TDD-first**, **full regression every iteration**, **token efficiency** (40-67% savings vs parallel).
10
+ Core principles: **isolated context per REQ**, **TDD-first**, **full regression every iteration**, **no cross-REQ context accumulation** (each REQ starts clean instead of inheriting an ever-growing shared context).
11
11
 
12
12
  ## Triggers
13
13
 
@@ -5,7 +5,7 @@
5
5
  | # | 原则 | 说明 |
6
6
  |---|------|------|
7
7
  | 1 | 逐 REQ 迭代 | 一次处理一个 REQ/切片,干净上下文,避免上下文线性膨胀 |
8
- | 2 | Token 节约 | 比旧并行模式节约 40-67% token |
8
+ | 2 | 上下文不累积 | 比旧的并行模式少一层**线性累积**:并行模式下所有 REQ 共享同一条不断变长的上下文,逐 REQ 模式每个 REQ 从干净上下文开始 |
9
9
  | 3 | 全量回归 | 每个 REQ 完成后跑全量测试 |
10
10
  | 4 | 进度持久化 | progress.log 持久化 learnings/permanent/contextual |
11
11
  | 5 | 可中断续传 | 中断后可从最后完成 REQ 继续 |
@@ -3,10 +3,10 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.8.0
6
+ **Version:** 0.38.10.0
7
7
 
8
8
  ## OVERVIEW
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.
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.
10
10
 
11
11
  > **v2.0 Compact Redesign (Issue #290)**: Merged from 11 phases to 6. PREP = old ISOLATE + AUTO-ESTIMATE. DESIGN = old THINK + PLAN. BUILD = old BUILD. VERIFY = old REVIEW + FEEDBACK. SHIP = old SHIP + LAND. CLOSE = old USER ACCEPTANCE + CLEANUP.
12
12
 
@@ -63,7 +63,7 @@ skills/sprint-flow/
63
63
  | 6/6 | CLOSE | USER ACCEPT + CLEANUP | Manual UAT → emergent issues → cleanup | HARD-GATE: UAT mandatory manual |
64
64
 
65
65
  ## CONVENTIONS
66
- - **ralph-loop is Phase 3/6 BUILD default**. Each REQ runs in a clean context, saving 40-67% tokens.
66
+ - **ralph-loop is Phase 3/6 BUILD default**. Each REQ runs in a clean context, so context does not accumulate across REQs.
67
67
  - **delphi-review HARD-GATE in Phase 2/6 DESIGN**: all three expert roles must execute with three distinct requested model IDs, then aggregate ≥90% consensus within 5 rounds. Unapproved or unverifiable → BLOCK coding.
68
68
  - **`learn` is called twice**: once per REQ in Phase 3/6 (ralph-loop internal) and once in Phase 4/6 VERIFY (Sprint-level retro).
69
69
  - **Phase isolation**: each phase has explicit entry/exit criteria documented in its `references/phase-*.md` file.
@@ -260,12 +260,30 @@ function testUniqueValuePropositionExists() {
260
260
  console.log(' ✓ Unique Value Proposition section exists');
261
261
  }
262
262
 
263
- function testUvpMentionsTokenSavings() {
263
+ function testUvpMentionsContextIsolation() {
264
264
  const section = contentSplit('Unique Value Proposition');
265
- if (!section.includes('40') || !section.includes('67') || !section.includes('token')) {
266
- throw new Error('Unique Value Proposition must mention 40-67% token savings');
267
- }
268
- console.log(' ✓ UVP mentions 40-67% token savings');
265
+ // Guards the MECHANISM, not a number. This assertion used to require the
266
+ // literal '40' and '67' -- a figure with no measurement behind it anywhere in
267
+ // the repo, copied between docs and pinned here so it could never be corrected.
268
+ // What actually distinguishes ralph-loop is that a REQ starts from a clean
269
+ // context instead of inheriting one: that is checkable and does not rot.
270
+ const mentionsIsolation =
271
+ /clean context|context (?:does not|doesn't) accumulate|no cross-REQ context accumulation|Context Growth/i.test(
272
+ section
273
+ );
274
+ if (!mentionsIsolation) {
275
+ throw new Error(
276
+ 'Unique Value Proposition must explain the per-REQ clean-context mechanism'
277
+ );
278
+ }
279
+ // And it must not resurrect an unsourced percentage as if it were measured.
280
+ const unsourcedPercentage = /\b\d{1,3}\s*[-–]\s*\d{1,3}%\s*(?:token|Token)/.test(section);
281
+ if (unsourcedPercentage) {
282
+ throw new Error(
283
+ 'UVP states a token-savings percentage range; no measurement backs it, so do not reinstate one without data'
284
+ );
285
+ }
286
+ console.log(' ✓ UVP explains per-REQ clean context without an unsourced figure');
269
287
  }
270
288
 
271
289
  function testUvpMentionsHardGate() {
@@ -353,7 +371,7 @@ function runTests(opts = {}) {
353
371
  { name: 'force-levels.md exists with three levels', fn: testForceLevelsDocumentExists },
354
372
  { name: 'force-levels.md requires Delphi review', fn: testForceLevelsRequiresDelphi },
355
373
  { name: 'Unique Value Proposition exists', fn: testUniqueValuePropositionExists },
356
- { name: 'UVP mentions 40-67% token savings', fn: testUvpMentionsTokenSavings },
374
+ { name: 'UVP explains per-REQ clean context (no unsourced figure)', fn: testUvpMentionsContextIsolation },
357
375
  { name: 'UVP mentions HARD-GATE', fn: testUvpMentionsHardGate },
358
376
  { name: 'UVP mentions emergent requirements', fn: testUvpMentionsEmergentRequirements },
359
377
  { name: 'Timing & Stability section exists', fn: testTimingSectionExists },
@@ -436,7 +454,7 @@ describe('sprint-flow SKILL.md', () => {
436
454
  { name: 'force-levels.md exists with three levels', fn: testForceLevelsDocumentExists },
437
455
  { name: 'force-levels.md requires Delphi review', fn: testForceLevelsRequiresDelphi },
438
456
  { name: 'Unique Value Proposition exists', fn: testUniqueValuePropositionExists },
439
- { name: 'UVP mentions 40-67% token savings', fn: testUvpMentionsTokenSavings },
457
+ { name: 'UVP explains per-REQ clean context (no unsourced figure)', fn: testUvpMentionsContextIsolation },
440
458
  { name: 'UVP mentions HARD-GATE', fn: testUvpMentionsHardGate },
441
459
  { name: 'UVP mentions emergent requirements', fn: testUvpMentionsEmergentRequirements },
442
460
  { name: 'Timing & Stability section exists', fn: testTimingSectionExists },
@@ -27,14 +27,14 @@ Sprint Flow is NOT just a sequential launcher of existing skills. Here's what ma
27
27
  |-----------|-----------------|-------------|
28
28
  | **Context Continuity** | Each skill starts fresh; lost design decisions between phases | Phase summaries + sprint-state.json maintain full traceability across 6 phases |
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
- | **Token Efficiency** | Linear context accumulation across phases — ~150K+ tokens | Ralph-loop default: 40-67% token savings via clean REQ-level contexts |
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
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 |
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
36
36
 
37
- 1. **40-67% Token Savings via Ralph Loop**: Phase 3 BUILD default (`ralph-loop`) processes one REQ at a time with clean context, avoiding the linear context accumulation that costs 150K+ tokens in parallel mode.
37
+ 1. **No Cross-REQ Context Accumulation via Ralph Loop**: Phase 3 BUILD default (`ralph-loop`) processes one REQ at a time with a clean context, instead of carrying every earlier REQ in one growing context as parallel mode does. The benefit is qualitative — earlier REQs stop competing for room with the current one — and no measured token figure is claimed here.
38
38
 
39
39
  2. **HARD-GATE Discipline**: Design must pass Delphi review with all three expert roles executed successfully, three distinct requested model IDs verified, and ≥90% aggregate consensus within five rounds before Phase 3 BUILD can start. This is enforced both in SKILL.md instructions and via the Claude Code plugin's PreToolUse hook.
40
40
 
@@ -190,7 +190,7 @@ Sprint Flow: PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE
190
190
  2. **DELPHI-GATE**: 验证 `.sprint-state/delphi-reviewed.json` 存在且 `verdict = "APPROVED"` → 否则 BLOCK
191
191
  3. **TDD-GATE (MANDATORY — v0.14.0+)**: 在 delegation 前验证每个 REQ 存在 failing test。无 test → mark `[TDD-RED]`(ralph-loop 创建)。有 test 且 GREEN 且无实现 → BLOCK(TDD bypass)。详见 `references/phase-3-build.md#tdd-gate-pre-implementation-tdd-check-mandatory`。
192
192
  4. **输入**: `slices-manifest.json`(Phase 2/6 生成),按 `execution_order` 逐个执行
193
- 5. **模式**: 默认 `ralph-loop`(逐 REQ 迭代,token 节约 40-67%),可选 `--mode parallel`
193
+ 5. **模式**: 默认 `ralph-loop`(逐 REQ 迭代,每个 REQ 独立干净上下文,不与之前的 REQ 累积),可选 `--mode parallel`
194
194
  6. **Skill 步骤**: BUILD-ENTRY-CONTRACT → hooks-install → TDD-GATE → TDD (RED/GREEN/REFACTOR) → blind-review (read-only subagent, tools: [Read, Grep, Glob]) → verification-before-completion → 成本监控 → learnings.md 写入
195
195
  7. **Mock Minimization**: integration-first, mock 仅限 external services, 密度 > 30% 需 `@mock-justified`
196
196
 
@@ -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.8.0
6
+ **Version:** 0.38.10.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.