@boyingliu01/xp-gate 0.38.11 → 0.38.12

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 (35) hide show
  1. package/gate-registry.sh +13 -0
  2. package/hooks/gate-entries/gate-10-entry.sh +11 -0
  3. package/hooks/gate-entries/gate-12b-entry.sh +15 -0
  4. package/hooks/gate-entries/gate-12c-entry.sh +9 -19
  5. package/hooks/gate-entries/gate-13-entry.sh +20 -0
  6. package/hooks/gate-entries/gate-7-entry.sh +15 -1
  7. package/hooks/gate-entries/gate-8-entry.sh +7 -0
  8. package/hooks/gate-registry.sh +13 -0
  9. package/lib/__tests__/detect-deps-dsh-profile.test.js +177 -3
  10. package/lib/detect-deps.js +8 -3
  11. package/lib/doctor.js +9 -5
  12. package/lib/gate-runner.js +14 -0
  13. package/lib/install-skill.js +15 -9
  14. package/lib/mattpocock-license-verdict.json +1 -1
  15. package/lib/shared-paths.js +44 -8
  16. package/package.json +1 -1
  17. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  18. package/plugins/claude-code/skills/delphi-review/AGENTS.md +1 -1
  19. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +1 -1
  20. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +1 -1
  21. package/plugins/dsh/package.json +1 -1
  22. package/plugins/dsh/skills/delphi-review/AGENTS.md +1 -1
  23. package/plugins/dsh/skills/sprint-flow/AGENTS.md +1 -1
  24. package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +1 -1
  25. package/plugins/opencode/package.json +1 -1
  26. package/plugins/opencode/skills/delphi-review/AGENTS.md +1 -1
  27. package/plugins/opencode/skills/sprint-flow/AGENTS.md +1 -1
  28. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +1 -1
  29. package/plugins/qoder/plugin.json +1 -1
  30. package/plugins/qoder/skills/delphi-review/AGENTS.md +1 -1
  31. package/plugins/qoder/skills/sprint-flow/AGENTS.md +1 -1
  32. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +1 -1
  33. package/skills/delphi-review/AGENTS.md +1 -1
  34. package/skills/sprint-flow/AGENTS.md +1 -1
  35. package/skills/test-specification-alignment/AGENTS.md +1 -1
package/gate-registry.sh CHANGED
@@ -76,6 +76,19 @@ GATE_REGISTRY_ROWS=(
76
76
  "sast|10|gate-10.sh|YES|pre-commit"
77
77
  "sprint-flow|11|sprint-gate.sh|YES|pre-commit"
78
78
  "file-hygiene|12|gate-12-file-hygiene.sh|NO|pre-commit"
79
+ # 12b and 12c were named in XP_GATE_ORDER and their bodies ran, but they had
80
+ # no row here. Everything that reads the registry therefore could not see them:
81
+ # `gate-list` and `gate-capability` omitted both, so nothing told a user the
82
+ # mirror-parity or probe-discipline checks existed. The project's own rule is
83
+ # explicit -- "an unregistered gate still runs ... the registry row is what
84
+ # makes it real" -- so the fix is the row, not prose elsewhere.
85
+ #
86
+ # `gate.sh` is the deciding file for both: each entry sources the real work
87
+ # from scripts/ (check-hook-mirror.sh, check-no-npx-probe.sh), and neither can
88
+ # run standalone in the sense the column asks about -- they need the staged
89
+ # change set the driver assembles.
90
+ "mirror-parity|12b|inline|NO|pre-commit"
91
+ "probe-discipline|12c|inline|NO|pre-commit"
79
92
  "compiler-strictness|13|gate-13-compiler-strictness.sh|YES|pre-commit"
80
93
  # pre-push. Registering these is identity bookkeeping only — pre-push keeps
81
94
  # deciding its own execution order and skip semantics. Before this the
@@ -27,10 +27,19 @@
27
27
  # stop: see scripts/wrap-gate-entries.cjs for why the two are equivalent
28
28
  # here, and why sub-shell exits are deliberately left as `exit`.
29
29
  gate_10_run() {
30
+ # #806 G10x: the SKIP arm below set GATE_10_STATUS and returned without a journal
31
+ # line. The gate's real work is delegated to $GATE_DIR/gate-10.sh, which records
32
+ # its own verdict -- so every path that does NOT reach it (deselected, script
33
+ # missing, nothing to scan) left no trace at all. Measured: `xp-gate audit` holds
34
+ # thousands of gate-10 rows and none of them came from these three arms, which
35
+ # made "skipped" and "never ran" the same thing. One start stamp, recorded in
36
+ # each arm that returns before the delegate.
37
+ GATE_10_START=$(gate_start_ms)
30
38
  if ! gate_enabled 10; then
31
39
  echo "⏭️ SKIPPED - Gate 10: SAST security (not selected by XP_GATE_ONLY_GATE)"
32
40
  GATE_10_STATUS="SKIP"
33
41
  GATE_10_DETAIL="not_selected"
42
+ record_gate_audit "gate-10" "sast" "$GATE_10_STATUS" "0" "$GATE_10_START"
34
43
  return 0
35
44
  fi
36
45
 
@@ -41,6 +50,7 @@ if any_changed_files_match "\.(ts|tsx|js|jsx|py|go|java|kt|cpp|c|swift|m|dart|sh
41
50
  echo "⏭️ SKIPPED - SAST (gate-10.sh not found)"
42
51
  GATE_10_STATUS="SKIP"
43
52
  GATE_10_REASON="gate_script_missing"
53
+ record_gate_audit "gate-10" "sast" "$GATE_10_STATUS" "0" "$GATE_10_START"
44
54
  fi
45
55
  else
46
56
  echo "⏭️ SKIPPED - No code files changed, skipping SAST scan."
@@ -48,6 +58,7 @@ else
48
58
  # reason so the quality report never renders this path as a PASS claim.
49
59
  GATE_10_STATUS="SKIP"
50
60
  GATE_10_REASON="no_code_files_changed"
61
+ record_gate_audit "gate-10" "sast" "$GATE_10_STATUS" "0" "$GATE_10_START"
51
62
  fi
52
63
  # ============================================================================
53
64
  return 0
@@ -34,10 +34,19 @@
34
34
  # stop: see scripts/wrap-gate-entries.cjs for why the two are equivalent
35
35
  # here, and why sub-shell exits are deliberately left as `exit`.
36
36
  gate_12b_run() {
37
+ # #806 G12b: this body set GATE_12B_STATUS and never recorded it. Nothing in the
38
+ # repository reads that variable either, so the gate's verdict went nowhere: it
39
+ # could block a commit (that path does `return 1`, which the driver turns into an
40
+ # exit status) but a PASS or a SKIP left no journal line at all. `xp-gate audit`
41
+ # therefore showed 12 / 13 and never 12b, making "ran and passed" indistinguishable
42
+ # from "does not exist" -- the defect family the githooks AGENTS.md records for
43
+ # four other gates. One start stamp, recorded on every exit path below.
44
+ GATE_12B_START=$(gate_start_ms)
37
45
  if ! gate_enabled 12b; then
38
46
  echo "⏭️ SKIPPED - Gate 12b: Vendor exclusion (not selected by XP_GATE_ONLY_GATE)"
39
47
  GATE_12B_STATUS="SKIP"
40
48
  GATE_12B_DETAIL="not_selected"
49
+ record_gate_audit "gate-12b" "mirror-parity" "$GATE_12B_STATUS" "0" "$GATE_12B_START"
41
50
  return 0
42
51
  fi
43
52
 
@@ -176,6 +185,12 @@ if [ -n "$MIRROR_STAGED" ] && printf '%s
176
185
  fi
177
186
  fi
178
187
  fi
188
+ # Reached only when nothing blocked, so this is the PASS record. The blocking
189
+ # arms `return 1` before getting here, which is deliberate: the driver turns
190
+ # that into the hook's exit status, and an audit line written after an exit
191
+ # would never run (the same dead-assignment trap the block above documents).
192
+ GATE_12B_STATUS="PASS"
193
+ record_gate_audit "gate-12b" "mirror-parity" "$GATE_12B_STATUS" "0" "$GATE_12B_START"
179
194
  return 0
180
195
  }
181
196
 
@@ -22,6 +22,10 @@
22
22
  # stop: see scripts/wrap-gate-entries.cjs for why the two are equivalent
23
23
  # here, and why sub-shell exits are deliberately left as `exit`.
24
24
  gate_12c_run() {
25
+ # #806 G12c: same defect as 12b -- the body set GATE_12C_STATUS and no consumer
26
+ # ever read it, so a PASS or SKIP left no journal line. `xp-gate audit` showed
27
+ # 12 and 13 but never 12c. One start stamp, recorded on every exit path below.
28
+ GATE_12C_START=$(gate_start_ms)
25
29
  # Gate 12c: probe discipline
26
30
  #
27
31
  # A command that could not RUN is not a command that found problems. The hooks
@@ -40,6 +44,7 @@ if ! gate_enabled 12c; then
40
44
  echo "⏭️ SKIPPED - Gate 12c: Worktree hygiene (not selected by XP_GATE_ONLY_GATE)"
41
45
  GATE_12C_STATUS="SKIP"
42
46
  GATE_12C_DETAIL="not_selected"
47
+ record_gate_audit "gate-12c" "probe-discipline" "$GATE_12C_STATUS" "0" "$GATE_12C_START"
43
48
  return 0
44
49
  fi
45
50
 
@@ -59,26 +64,11 @@ if printf '%s\n' "$STAGED_FILES" 2>/dev/null | grep -qE '^githooks/(adapters/|li
59
64
  fi
60
65
  fi
61
66
  fi
62
- # ============================================================================
63
67
 
64
- # The compiler is the first and cheapest static analyser for a compiled language
65
- # and XP-Gate never used it as one: cpp.sh only runs clang-tidy/cppcheck over the
66
- # first 20 files, and Gate 9's build-integrity half is TypeScript-and-Maven only.
67
- # A measured `g++ -Wall -Wextra` pass reports -Wnon-virtual-dtor, -Wreorder,
68
- # -Wparentheses and -Wclass-memaccess on an innocuous-looking file; bare `javac`
69
- # reports NOTHING for a raw type where `-Xlint:all` reports [rawtypes].
70
- #
71
- # Verdicts: 0 PASS, 1 FAIL (new findings -> blocked), 2 BLOCK (ran but output
72
- # untrustworthy), 3 WARN (tool absent / cross-compiling / timeout / warn-only).
73
- # A missing compiler is a SKIP-class WARN per the project convention, NOT a block.
74
- #
75
- # Escape hatches: XP_GATE_DISABLE_13=1 (kill switch),
76
- # XP_GATE_COMPILER_STRICTNESS=strict|balanced|warn-only,
77
- # XP_GATE_COMPILER_ANALYZER=1 (gcc -fanalyzer, C only, opt-in).
78
- # Design: docs/plans/2026-10-26-gate-13-compiler-strictness-design.md
79
- #
80
- # NOTE: this block is a TAIL APPEND after Gate 12 and intentionally touches no
81
- # line of the gates above it.
68
+ # Nothing blocked, so this is the PASS record (see the note in 12b's body for
69
+ # why blocking paths return before reaching here).
70
+ GATE_12C_STATUS="PASS"
71
+ record_gate_audit "gate-12c" "probe-discipline" "$GATE_12C_STATUS" "0" "$GATE_12C_START"
82
72
  return 0
83
73
  }
84
74
 
@@ -509,6 +509,26 @@ ENDJSON
509
509
  }
510
510
 
511
511
  gate_13_run() {
512
+ # Design rationale. This block used to sit at the bottom of gate-12c-entry.sh,
513
+ # where it documented a different gate: the reasoning was invisible to whoever
514
+ # edits this file, and gate 12c carried 20 lines of prose about a gate it does
515
+ # not run. Moved here unchanged.
516
+ #
517
+ # The compiler is the first and cheapest static analyser for a compiled language
518
+ # and XP-Gate never used it as one: cpp.sh only runs clang-tidy/cppcheck over the
519
+ # first 20 files, and Gate 9's build-integrity half is TypeScript-and-Maven only.
520
+ # A measured `g++ -Wall -Wextra` pass reports -Wnon-virtual-dtor, -Wreorder,
521
+ # -Wparentheses and -Wclass-memaccess on an innocuous-looking file; bare `javac`
522
+ # reports NOTHING for a raw type where `-Xlint:all` reports [rawtypes].
523
+ #
524
+ # Verdicts: 0 PASS, 1 FAIL (new findings -> blocked), 2 BLOCK (ran but output
525
+ # untrustworthy), 3 WARN (tool absent / cross-compiling / timeout / warn-only).
526
+ # A missing compiler is a SKIP-class WARN per the project convention, NOT a block.
527
+ #
528
+ # Escape hatches: XP_GATE_DISABLE_13=1 (kill switch),
529
+ # XP_GATE_COMPILER_STRICTNESS=strict|balanced|warn-only,
530
+ # XP_GATE_COMPILER_ANALYZER=1 (gcc -fanalyzer, C only, opt-in).
531
+ # Design: docs/plans/2026-10-26-gate-13-compiler-strictness-design.md
512
532
  if ! gate_enabled 13; then
513
533
  echo "⏭️ SKIPPED - Gate 13: Compiler strictness (not selected by XP_GATE_ONLY_GATE)"
514
534
  GATE_13_STATUS="SKIP"
@@ -26,17 +26,31 @@
26
26
  # stop: see scripts/wrap-gate-entries.cjs for why the two are equivalent
27
27
  # here, and why sub-shell exits are deliberately left as `exit`.
28
28
  gate_7_run() {
29
+ # #806 G7x: two defects in one small body.
30
+ #
31
+ # (a) Every path that did not reach $GATE_DIR/gate-7.sh -- deselect, and "no IaC
32
+ # files changed" -- returned without a journal line, so `xp-gate audit`
33
+ # could not distinguish "skipped" from "never ran".
34
+ # (b) The no-IaC arm printed "✅ PASSED". Nothing was scanned: there was nothing
35
+ # to scan. This is the exact wording rule this project keeps re-learning --
36
+ # "not checked" must never be printed as "passed". It is now SKIP with a
37
+ # reason, matching Gate 10's #536 precedent for the same situation.
38
+ GATE_7_START=$(gate_start_ms)
29
39
  if ! gate_enabled 7; then
30
40
  echo "⏭️ SKIPPED - Gate 7: IaC security (not selected by XP_GATE_ONLY_GATE)"
31
41
  GATE_7_STATUS="SKIP"
32
42
  GATE_7_DETAIL="not_selected"
43
+ record_gate_audit "gate-7" "iac-security" "$GATE_7_STATUS" "0" "$GATE_7_START"
33
44
  return 0
34
45
  fi
35
46
 
36
47
  if any_changed_files_match "\.tf$" "\.tfvars$" "Dockerfile" "\.kube/" "\.ya?ml$"; then
37
48
  source "$GATE_DIR/gate-7.sh"
38
49
  else
39
- echo "✅ PASSED - No IaC files changed, skipping Gate 7."
50
+ echo "⏭️ SKIPPED - No IaC files changed, skipping Gate 7."
51
+ GATE_7_STATUS="SKIP"
52
+ GATE_7_REASON="no_iac_files_changed"
53
+ record_gate_audit "gate-7" "iac-security" "$GATE_7_STATUS" "0" "$GATE_7_START"
40
54
  fi
41
55
  return 0
42
56
  }
@@ -24,10 +24,17 @@
24
24
  # stop: see scripts/wrap-gate-entries.cjs for why the two are equivalent
25
25
  # here, and why sub-shell exits are deliberately left as `exit`.
26
26
  gate_8_run() {
27
+ # #806 G8x: the deselect arm set GATE_8_STATUS and returned without a journal
28
+ # line. This is the fail-closed security gate, so an unrecorded skip is the worst
29
+ # place to have one: "secret scanning was not selected" and "secret scanning does
30
+ # not exist in this chain" must not look the same. The delegate
31
+ # ($GATE_DIR/gate-8.sh) records its own verdicts; only this arm was silent.
32
+ GATE_8_START=$(gate_start_ms)
27
33
  if ! gate_enabled 8; then
28
34
  echo "⏭️ SKIPPED - Gate 8: Secret scanning (not selected by XP_GATE_ONLY_GATE)"
29
35
  GATE_8_STATUS="SKIP"
30
36
  GATE_8_DETAIL="not_selected"
37
+ record_gate_audit "gate-8" "secret-scanning" "$GATE_8_STATUS" "0" "$GATE_8_START"
31
38
  return 0
32
39
  fi
33
40
 
@@ -76,6 +76,19 @@ GATE_REGISTRY_ROWS=(
76
76
  "sast|10|gate-10.sh|YES|pre-commit"
77
77
  "sprint-flow|11|sprint-gate.sh|YES|pre-commit"
78
78
  "file-hygiene|12|gate-12-file-hygiene.sh|NO|pre-commit"
79
+ # 12b and 12c were named in XP_GATE_ORDER and their bodies ran, but they had
80
+ # no row here. Everything that reads the registry therefore could not see them:
81
+ # `gate-list` and `gate-capability` omitted both, so nothing told a user the
82
+ # mirror-parity or probe-discipline checks existed. The project's own rule is
83
+ # explicit -- "an unregistered gate still runs ... the registry row is what
84
+ # makes it real" -- so the fix is the row, not prose elsewhere.
85
+ #
86
+ # `gate.sh` is the deciding file for both: each entry sources the real work
87
+ # from scripts/ (check-hook-mirror.sh, check-no-npx-probe.sh), and neither can
88
+ # run standalone in the sense the column asks about -- they need the staged
89
+ # change set the driver assembles.
90
+ "mirror-parity|12b|inline|NO|pre-commit"
91
+ "probe-discipline|12c|inline|NO|pre-commit"
79
92
  "compiler-strictness|13|gate-13-compiler-strictness.sh|YES|pre-commit"
80
93
  # pre-push. Registering these is identity bookkeeping only — pre-push keeps
81
94
  # deciding its own execution order and skip semantics. Before this the
@@ -1,9 +1,11 @@
1
1
  /**
2
- * @test REQ-635
2
+ * @test REQ-DSH-020
3
3
  * @intent `xp-gate init` 会向 ~/.dsh/skills 部署技能、npm 包也带 plugins/dsh,
4
4
  * 但 PLATFORM_PROFILES 里没有 dsh 条目,getSkillsDirs('dsh') 静默回落到
5
- * opencode 的路径,导致 DSH 机器的技能从不被解析(#635)
6
- * @covers AC-635-04, AC-635-05
5
+ * opencode 的路径,导致 DSH 机器的技能从不被解析(#635)。
6
+ * 原注释写的 @covers AC-635-04/05 在 spec 里从未存在(REQ-635 是
7
+ * normalize-lock-registry 的 lockfile 路径需求),已改指真实条目。
8
+ * @covers AC-DSH-020-01, AC-DSH-020-02, AC-DSH-020-03, AC-DSH-020-04
7
9
  */
8
10
  const fs = require('fs');
9
11
  const path = require('path');
@@ -147,3 +149,175 @@ describe('detectInstalledPlatforms (#725 detect-all)', () => {
147
149
  expect(detectInstalledPlatforms()).toEqual([]);
148
150
  });
149
151
  });
152
+
153
+ /**
154
+ * @test REQ-DSH-020
155
+ * @intent #635 只给 PLATFORM_PROFILES 补了 dsh 条目,detectPlatform() 本身仍只
156
+ * 可能返回 qoder / claude-code / opencode。只有 DSH 的机器上,所有持有
157
+ * 该结果的调用方(install-skill、checkDeps、getTemplateDir)都瞄向
158
+ * ~/.config/opencode —— 一个 running agent 不读、也可能不存在的位置。
159
+ * `~/.dsh/profiles` 与 `~/.dsh/.shim` 是 DSH 独有目录,可作为可靠标记。
160
+ * @covers AC-DSH-020-01, AC-DSH-020-02, AC-DSH-020-03, AC-DSH-020-04
161
+ */
162
+ describe('detectPlatform() resolves dsh (#635 follow-up)', () => {
163
+ let tmpHome;
164
+ let originalHome;
165
+
166
+ const load = () => {
167
+ vi.resetModules();
168
+ delete require.cache[require.resolve('../shared-paths')];
169
+ return require('../shared-paths');
170
+ };
171
+
172
+ beforeEach(() => {
173
+ originalHome = process.env.HOME;
174
+ tmpHome = fs.mkdtempSync(path.join(os.tmpdir(), 'xpgate-platdsh-'));
175
+ process.env.HOME = tmpHome;
176
+ });
177
+
178
+ afterEach(() => {
179
+ process.env.HOME = originalHome;
180
+ fs.rmSync(tmpHome, { recursive: true, force: true });
181
+ });
182
+
183
+ // AC-DSH-020-01
184
+ it('returns dsh when ~/.dsh/profiles exists', () => {
185
+ fs.mkdirSync(path.join(tmpHome, '.dsh', 'profiles'), { recursive: true });
186
+ expect(load().detectPlatform()).toBe('dsh');
187
+ });
188
+
189
+ it('returns dsh when only ~/.dsh/.shim exists', () => {
190
+ fs.mkdirSync(path.join(tmpHome, '.dsh', '.shim'), { recursive: true });
191
+ expect(load().detectPlatform()).toBe('dsh');
192
+ });
193
+
194
+ it('does not return dsh when neither dsh marker exists', () => {
195
+ // A bare ~/.dsh/skills is NOT a marker: every platform has a skills/ dir,
196
+ // so keying on it would steal opencode/qoder machines.
197
+ fs.mkdirSync(path.join(tmpHome, '.dsh', 'skills'), { recursive: true });
198
+ expect(load().detectPlatform()).not.toBe('dsh');
199
+ });
200
+
201
+ it('still falls back to opencode on an empty home', () => {
202
+ expect(load().detectPlatform()).toBe('opencode');
203
+ });
204
+
205
+ // AC-DSH-020-02: DSH wins over the other markers — it is the agent whose
206
+ // skills/ the user is actually reading, so installs must land there.
207
+ it('prefers dsh over qoder and claude-code when all markers coexist', () => {
208
+ fs.mkdirSync(path.join(tmpHome, '.dsh', 'profiles'), { recursive: true });
209
+ fs.mkdirSync(path.join(tmpHome, '.qoder'), { recursive: true });
210
+ fs.mkdirSync(path.join(tmpHome, '.claude', 'skills'), { recursive: true });
211
+ expect(load().detectPlatform()).toBe('dsh');
212
+ });
213
+
214
+ // AC-DSH-020-02: the pre-existing precedence must survive — removing the DSH
215
+ // markers must restore qoder > claude-code > opencode exactly as before.
216
+ it('leaves qoder/claude-code/opencode precedence intact without dsh markers', () => {
217
+ fs.mkdirSync(path.join(tmpHome, '.qoder'), { recursive: true });
218
+ fs.mkdirSync(path.join(tmpHome, '.claude', 'skills'), { recursive: true });
219
+ expect(load().detectPlatform()).toBe('qoder');
220
+
221
+ fs.rmSync(path.join(tmpHome, '.qoder'), { recursive: true, force: true });
222
+ expect(load().detectPlatform()).toBe('claude-code');
223
+
224
+ fs.rmSync(path.join(tmpHome, '.claude'), { recursive: true, force: true });
225
+ expect(load().detectPlatform()).toBe('opencode');
226
+ });
227
+
228
+ // AC-DSH-020-04
229
+ it('getTemplateDir() targets ~/.dsh, not the opencode fallback', () => {
230
+ fs.mkdirSync(path.join(tmpHome, '.dsh', 'profiles'), { recursive: true });
231
+ const dir = load().getTemplateDir();
232
+ expect(dir).toBe(path.join(tmpHome, '.dsh', 'git-hooks-template'));
233
+ expect(dir).not.toContain(path.join('.config', 'opencode'));
234
+ });
235
+ });
236
+
237
+ /**
238
+ * @test REQ-DSH-020
239
+ * @intent install-skill 曾维护第二份平台→目录表(getSkillsDir),#635 给
240
+ * PLATFORM_PROFILES 加 dsh 后它没跟着改,仍在 DSH-only 机器上返回
241
+ * ~/.config/opencode/skills。改为从 getSkillsDirs() 派生,消除第二事实源。
242
+ * @covers AC-DSH-020-03
243
+ */
244
+ describe('install-skill resolves its target through PLATFORM_PROFILES', () => {
245
+ let tmpHome;
246
+ let originalHome;
247
+
248
+ beforeEach(() => {
249
+ originalHome = process.env.HOME;
250
+ tmpHome = fs.mkdtempSync(path.join(os.tmpdir(), 'xpgate-installdsh-'));
251
+ process.env.HOME = tmpHome;
252
+ vi.resetModules();
253
+ delete require.cache[require.resolve('../install-skill')];
254
+ delete require.cache[require.resolve('../detect-deps')];
255
+ delete require.cache[require.resolve('../shared-paths')];
256
+ });
257
+
258
+ afterEach(() => {
259
+ process.env.HOME = originalHome;
260
+ fs.rmSync(tmpHome, { recursive: true, force: true });
261
+ });
262
+
263
+ // The regression that actually bit (#635 follow-up), pinned end-to-end:
264
+ // `installSkill()` calls `checkDeps(detectPlatform())` BEFORE it resolves any
265
+ // target directory. When detection fell through to opencode on a DSH machine,
266
+ // the dependency probe looked in `~/.config/opencode/skills`, found nothing,
267
+ // and the command aborted with "superpowers is required but not installed" --
268
+ // no skill was ever written, so a test that only asserted the write target
269
+ // would have passed while the reported bug stayed live.
270
+ //
271
+ // Mutation-checked: making detectPlatform() skip the DSH markers turns the
272
+ // `code` assertion back to 1 with "superpowers is required".
273
+ it('passes the dependency check when deps live under a DSH-only ~/.dsh/skills', async () => {
274
+ const BUNDLED = path.join(__dirname, '..', '..', 'skills');
275
+ if (!fs.existsSync(BUNDLED)) return; // packaged build not generated in this tree
276
+
277
+ const home = fs.mkdtempSync(path.join(os.tmpdir(), 'xpgate-depcheck-'));
278
+ try {
279
+ fs.mkdirSync(path.join(home, '.dsh', 'profiles'), { recursive: true });
280
+ const dshSkills = path.join(home, '.dsh', 'skills');
281
+ // Deps are installed where DSH keeps skills -- and nowhere else. The old
282
+ // opencode fallback therefore cannot see them.
283
+ for (const dep of ['superpowers', 'gstack']) {
284
+ const dir = path.join(dshSkills, dep);
285
+ fs.mkdirSync(dir, { recursive: true });
286
+ fs.writeFileSync(path.join(dir, 'package.json'), JSON.stringify({ version: '2.0.0' }));
287
+ }
288
+
289
+ process.env.HOME = home;
290
+ vi.resetModules();
291
+ delete require.cache[require.resolve('../install-skill')];
292
+ delete require.cache[require.resolve('../detect-deps')];
293
+ delete require.cache[require.resolve('../shared-paths')];
294
+
295
+ const { detectPlatform } = require('../shared-paths');
296
+ const { checkDeps } = require('../detect-deps');
297
+ // The load-bearing assertion: detection must name dsh so the probe looks
298
+ // in the tree the deps were actually installed into.
299
+ expect(detectPlatform()).toBe('dsh');
300
+ expect(await checkDeps(detectPlatform())).toEqual({ ok: true });
301
+ // Anti-vacuity: the same tree is invisible to the platform the pre-fix
302
+ // code would have selected.
303
+ expect(await checkDeps('opencode')).toEqual({ ok: false, missing: 'superpowers' });
304
+ } finally {
305
+ process.env.HOME = originalHome;
306
+ fs.rmSync(home, { recursive: true, force: true });
307
+ vi.resetModules();
308
+ delete require.cache[require.resolve('../install-skill')];
309
+ delete require.cache[require.resolve('../detect-deps')];
310
+ delete require.cache[require.resolve('../shared-paths')];
311
+ }
312
+ });
313
+
314
+ // A bare ~/.dsh/skills must not steal an opencode machine — restated here
315
+ // because this is exactly the case the duplicated table got wrong.
316
+ it('does not target ~/.dsh/skills when only that directory exists', () => {
317
+ fs.mkdirSync(path.join(tmpHome, '.dsh', 'skills'), { recursive: true });
318
+ const { detectPlatform } = require('../shared-paths');
319
+ const { getSkillsDirs } = require('../detect-deps');
320
+
321
+ expect(getSkillsDirs(detectPlatform())[0]).not.toBe(path.join(tmpHome, '.dsh', 'skills'));
322
+ });
323
+ });
@@ -278,9 +278,14 @@ const PLATFORM_PROFILES = {
278
278
  // plugins/dsh (`@boyingliu01/dsh-plugin-xp-gate`), and
279
279
  // scripts/sync-package-content.js lists `dsh` among PLUGINS — but this entry
280
280
  // was missing, so getSkillsDirs('dsh') fell through to the opencode paths and
281
- // DSH skills were never resolved. detectPlatform() still never returns 'dsh'
282
- // (there is no marker it could key on that opencode's would not also match),
283
- // so callers that must cover DSH ask for it by name.
281
+ // DSH skills were never resolved.
282
+ //
283
+ // #635 follow-up: detectPlatform() now returns 'dsh' too (it keys on
284
+ // `~/.dsh/profiles` / `~/.dsh/.shim`, which no other platform writes). Before
285
+ // that, callers holding its result still targeted `~/.config/opencode` on a
286
+ // DSH-only machine, and `install-skill` failed its dependency check against
287
+ // that phantom directory. Callers that must cover every platform regardless
288
+ // of which one is "current" still ask by name, via detectInstalledPlatforms().
284
289
  dsh: {
285
290
  skillsDirs: [
286
291
  ['.dsh', 'skills'],
package/lib/doctor.js CHANGED
@@ -3427,12 +3427,16 @@ async function doctorDelphi(options = {}) {
3427
3427
  // an old local repo" became a downgrade (#414 B4). Every bundled file is
3428
3428
  // compared, not just SKILL.md — the install script copies *.json and
3429
3429
  // references/ too, and B4-style drift hits those equally (#414 R1 MI-03).
3430
+ //
3431
+ // #635 follow-up: this was a THIRD hand-written platform→directory table
3432
+ // (after PLATFORM_PROFILES and install-skill's own), and it had no `dsh` arm,
3433
+ // so on a DSH machine it resolved to `~/.config/opencode/skills/delphi-review`
3434
+ // — a directory that does not exist. `otherDeployedSkillDirs()` below rescued
3435
+ // the parity check, but the runner-locate check further down read this path
3436
+ // directly and never consulted the full platform set. Derive it instead, so
3437
+ // the mapping has one source of truth and a new platform needs no edit here.
3430
3438
  const platform = detectPlatform();
3431
- const installedSkillDir = platform === 'qoder'
3432
- ? path.join(HOME_DIR(), '.qoder', 'skills', 'delphi-review')
3433
- : platform === 'claude-code'
3434
- ? path.join(HOME_DIR(), '.claude', 'skills', 'delphi-review')
3435
- : path.join(HOME_DIR(), '.config', 'opencode', 'skills', 'delphi-review');
3439
+ const installedSkillDir = path.join(getSkillsDirs(platform)[0], 'delphi-review');
3436
3440
  // Injectable for tests (#414 R3 FC-01/FC-02): the empty-bundle branch is a
3437
3441
  // real failure mode and must be drivable without mutating the package.
3438
3442
  const bundledSkillDir = options.bundledSkillDir || path.join(PKG_DIR, 'skills', 'delphi-review');
@@ -697,6 +697,20 @@ const GATE_REGISTRY = {
697
697
  preCommitOnly: true,
698
698
  reason: 'File hygiene inspects the staged diff, which only exists inside the hook',
699
699
  },
700
+ '12b': {
701
+ name: 'Mirror Parity',
702
+ description: 'canonical hook sources match their published src/npm-package mirrors (#654)',
703
+ aliases: ['mirror', 'mirror-parity', '12b'],
704
+ preCommitOnly: true,
705
+ reason: 'Mirror parity compares the staged pair of files against their canonical copies',
706
+ },
707
+ '12c': {
708
+ name: 'Probe Discipline',
709
+ description: 'no gate answers "is this tool installed?" by querying a registry',
710
+ aliases: ['probe', 'probe-discipline', '12c'],
711
+ preCommitOnly: true,
712
+ reason: 'Probe discipline scans hook sources in the staged change set',
713
+ },
700
714
  '13': {
701
715
  name: 'Compiler Strictness',
702
716
  description: 'gcc/g++ -Wall -Wextra, javac -Xlint, Maven/Gradle warnings on changed files',
@@ -2,18 +2,24 @@ const fs = require('fs');
2
2
  const path = require('path');
3
3
  const { checkDeps, detectInstalledPlatforms, getSkillsDirs } = require('./detect-deps.js');
4
4
  const { rollback } = require('./rollback.js');
5
- const { HOME_DIR, CONFIG_DIR, detectPlatform } = require('./shared-paths.js');
5
+ const { CONFIG_DIR, detectPlatform } = require('./shared-paths.js');
6
6
  const { copyDirRecursive } = require('./shared-utils');
7
7
 
8
+ /**
9
+ * The skills directory for the platform `detectPlatform()` selects.
10
+ *
11
+ * This used to be a second, hand-written platform→directory table
12
+ * (`.qoder` / `.claude` / `~/.config/opencode`). It drifted from
13
+ * `PLATFORM_PROFILES` the moment `dsh` was added there in #635: the fallback row
14
+ * kept returning `~/.config/opencode` on a DSH-only machine, so a plain
15
+ * `install-skill` on a machine with no agent directory yet wrote the skill where
16
+ * the running agent never reads it. Delegate to `getSkillsDirs()` so the mapping
17
+ * has exactly one source of truth (Delphi R1 CI-01 / MA-01 on #635).
18
+ *
19
+ * @returns {string} absolute path to the detected platform's skills directory
20
+ */
8
21
  function getSkillsDir() {
9
- const platform = detectPlatform();
10
- if (platform === 'qoder') {
11
- return path.join(HOME_DIR, '.qoder', 'skills');
12
- }
13
- if (platform === 'claude-code') {
14
- return path.join(HOME_DIR, '.claude', 'skills');
15
- }
16
- return path.join(HOME_DIR, '.config', 'opencode', 'skills');
22
+ return getSkillsDirs(detectPlatform())[0];
17
23
  }
18
24
 
19
25
  /**
@@ -2,6 +2,6 @@
2
2
  "verdict": "PASS",
3
3
  "license_type": "MIT",
4
4
  "sha256": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5",
5
- "checked_at": "2026-11-18T04:28:13.939Z",
5
+ "checked_at": "2026-11-18T05:33:53.225Z",
6
6
  "source": "network"
7
7
  }
@@ -21,10 +21,35 @@ function resolveHomeDir() {
21
21
  /**
22
22
  * Detect which AI agent platform is currently in use.
23
23
  * This is the single implementation; detect-deps.js re-exports it (#424).
24
- * @returns {'opencode' | 'claude-code' | 'qoder'}
24
+ *
25
+ * #635 follow-up: DSH used to be undetectable here. The original reasoning was
26
+ * "there is no marker it could key on that opencode's would not also match",
27
+ * which is true of `<root>/skills` (every platform has one) but false of DSH's
28
+ * own bookkeeping directories. `~/.dsh/profiles` and `~/.dsh/.shim` are created
29
+ * by DSH alone. Without a `dsh` branch this function could never return 'dsh'
30
+ * even on a DSH-only machine, so every caller holding its result —
31
+ * `install-skill`, `checkDeps`, `getTemplateDir` — targeted `~/.config/opencode`
32
+ * instead: skills landed in a directory the running agent never reads, and
33
+ * `install-skill` failed outright with "superpowers is required but not
34
+ * installed" because the dependency check looked in that same phantom tree.
35
+ *
36
+ * DSH is checked BEFORE the others: a machine running DSH alongside Qoder or
37
+ * OpenCode must still resolve to DSH when `~/.dsh` carries its profile/shim
38
+ * state, because that is the agent whose `skills/` the user is actually reading.
39
+ *
40
+ * @returns {'opencode' | 'claude-code' | 'qoder' | 'dsh'}
25
41
  */
26
42
  function detectPlatform() {
27
43
  const homeDir = resolveHomeDir();
44
+ // DSH markers: `profiles` (profile system) and `.shim` (bash shims). Both are
45
+ // written by DSH itself and by nothing else, so unlike `<root>/skills` they
46
+ // cannot collide with opencode/qoder/claude installs (#635 follow-up).
47
+ if (
48
+ fs.existsSync(path.join(homeDir, '.dsh', 'profiles')) ||
49
+ fs.existsSync(path.join(homeDir, '.dsh', '.shim'))
50
+ ) {
51
+ return 'dsh';
52
+ }
28
53
  // Any ~/.qoder content counts as Qoder: a brand-new install has no skills/
29
54
  // subdirectory yet, so a skills-only marker misdetects it as opencode and
30
55
  // configureQoderDelphiAgents deploys zero Delphi agents (#424).
@@ -36,22 +61,33 @@ function detectPlatform() {
36
61
  /**
37
62
  * Get the git hooks template directory for the current platform.
38
63
  * Each AI agent platform has its own config directory:
39
- * - opencode: ~/.config/opencode/git-hooks-template
64
+ * - opencode: ~/.config/opencode/git-hooks-template
40
65
  * - claude-code: ~/.claude/git-hooks-template
41
- * - qoder: ~/.qoder/git-hooks-template
66
+ * - qoder: ~/.qoder/git-hooks-template
67
+ * - dsh: ~/.dsh/git-hooks-template
42
68
  *
43
69
  * This prevents templateDir from pointing to a stale platform's directory
44
70
  * after migrating from one AI agent to another (e.g., OpenCode → Qoder).
45
71
  *
72
+ * #635 follow-up: `dsh` needs its own row rather than falling through to
73
+ * `~/.config/opencode`. On a DSH-only machine that fallback wrote the templates
74
+ * into a directory the agent never reads and left the config's `templateDir`
75
+ * pointing at a path that does not exist — `doctor` then reported `templateDir`
76
+ * as a hard FAIL on an otherwise healthy install.
77
+ *
46
78
  * @returns {string} Path to the platform-specific git hooks template directory
47
79
  */
80
+ const PLATFORM_CONFIG_SEGMENTS = {
81
+ 'claude-code': ['.claude'],
82
+ qoder: ['.qoder'],
83
+ dsh: ['.dsh'],
84
+ opencode: ['.config', 'opencode'],
85
+ };
86
+
48
87
  function getTemplateDir() {
49
88
  const homeDir = resolveHomeDir();
50
- const platform = detectPlatform();
51
- const configDir = platform === 'claude-code' ? '.claude' :
52
- platform === 'qoder' ? '.qoder' :
53
- path.join('.config', 'opencode');
54
- return path.join(homeDir, configDir, 'git-hooks-template');
89
+ const segments = PLATFORM_CONFIG_SEGMENTS[detectPlatform()] || ['.config', 'opencode'];
90
+ return path.join(homeDir, ...segments, 'git-hooks-template');
55
91
  }
56
92
 
57
93
  // ---------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/xp-gate",
3
- "version": "0.38.11",
3
+ "version": "0.38.12",
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"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xp-gate",
3
- "version": "0.38.11",
3
+ "version": "0.38.12",
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.38.11.0
6
+ **Version:** 0.38.12.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.11.0
6
+ **Version:** 0.38.12.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.11.0
6
+ **Version:** 0.38.12.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/dsh-plugin-xp-gate",
3
- "version": "0.38.11",
3
+ "version": "0.38.12",
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.11.0
6
+ **Version:** 0.38.12.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.11.0
6
+ **Version:** 0.38.12.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.11.0
6
+ **Version:** 0.38.12.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/opencode-plugin",
3
- "version": "0.38.11",
3
+ "version": "0.38.12",
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.38.11.0
6
+ **Version:** 0.38.12.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.11.0
6
+ **Version:** 0.38.12.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.11.0
6
+ **Version:** 0.38.12.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xp-gate",
3
- "version": "0.38.11",
3
+ "version": "0.38.12",
4
4
  "displayName": "XP-Gate",
5
5
  "description": "Extreme Programming quality gates + AI workflow skills for Qoder. 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.38.11.0
6
+ **Version:** 0.38.12.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.11.0
6
+ **Version:** 0.38.12.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.11.0
6
+ **Version:** 0.38.12.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -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.11.0
6
+ **Version:** 0.38.12.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.11.0
6
+ **Version:** 0.38.12.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.11.0
6
+ **Version:** 0.38.12.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.