@boyingliu01/xp-gate 0.38.36 → 0.38.38

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.
@@ -81,6 +81,12 @@ if [ -n "$SPRINT_GATE_SCRIPT" ]; then
81
81
  skip)
82
82
  echo "⏭️ SKIPPED - Gate 11: Sprint Flow (${SPRINT_GATE_DETAIL:-no reason given})"
83
83
  GATE_11_STATUS="SKIP"
84
+ # The reason was printed and then dropped: the single audit call at the end
85
+ # of this body passed no detail argument, so every SKIP row landed in the
86
+ # journal with an empty reason. "SKIP must be recorded, not merely printed"
87
+ # is the most repeated rule in githooks/AGENTS.md, and it was violated here
88
+ # for all three declining arms.
89
+ GATE_11_DETAIL="${SPRINT_GATE_DETAIL:-sprint_gate_skipped}"
84
90
  ;;
85
91
  allow)
86
92
  # #584: `allow` covered three different outcomes and all of them became
@@ -90,9 +96,13 @@ if [ -n "$SPRINT_GATE_SCRIPT" ]; then
90
96
  SPRINT_GATE_ALLOW_REASON=$(sprint_gate_allow_reason "$SPRINT_GATE_OUTPUT")
91
97
  if [ "$SPRINT_GATE_ALLOW_REASON" = "checks-passed" ]; then
92
98
  echo "✅ PASSED - Gate 11: Sprint Flow (${SPRINT_GATE_DETAIL:-sprint state validated})"
99
+ GATE_11_DETAIL="checks-passed: ${SPRINT_GATE_DETAIL:-sprint state validated}"
93
100
  else
94
101
  echo "⏭️ SKIPPED - Gate 11: Sprint Flow (${SPRINT_GATE_ALLOW_REASON}: ${SPRINT_GATE_DETAIL:-not evaluated})"
95
102
  GATE_11_STATUS="SKIP"
103
+ # WHICH allow it was is the fact that matters: "phase-not-reached" and
104
+ # "checks-passed" are opposite statements about the sprint.
105
+ GATE_11_DETAIL="${SPRINT_GATE_ALLOW_REASON}: ${SPRINT_GATE_DETAIL:-not evaluated}"
96
106
  fi
97
107
  ;;
98
108
  deny)
@@ -107,6 +117,7 @@ if [ -n "$SPRINT_GATE_SCRIPT" ]; then
107
117
  # defensive -- it exists for a consumer's older/patching/failing copy, which
108
118
  # is exactly the copy a gate cannot inspect.
109
119
  GATE_11_STATUS="BLOCK"
120
+ GATE_11_DETAIL="{SPRINT_GATE_DETAIL:-sprint gate denied}"
110
121
  echo "❌ BLOCKED - Gate 11: Sprint Flow (${SPRINT_GATE_DETAIL:-sprint gate denied})"
111
122
  echo " sprint-gate.sh reported decision=deny but exited 0; blocking because a"
112
123
  echo " deny that contradicts its exit status cannot be treated as consent."
@@ -127,6 +138,7 @@ if [ -n "$SPRINT_GATE_SCRIPT" ]; then
127
138
  # keeps the raw output visible rather than inventing a decision. Exit 1 was
128
139
  # already handled above and still BLOCKs, so this does not weaken it.
129
140
  GATE_11_STATUS="SKIP"
141
+ GATE_11_DETAIL="no recognisable decision in the gate output"
130
142
  echo "⏭️ SKIPPED - Gate 11: Sprint Flow (no recognisable decision in the gate output — not evaluated)"
131
143
  printf '%s\n' "$SPRINT_GATE_OUTPUT" | sed 's/^/ /'
132
144
  ;;
@@ -148,7 +160,7 @@ if [ "$GATE_11_DURATION_MS" -lt 0 ] 2>/dev/null; then
148
160
  fi
149
161
  GATE_11_DURATION=$((GATE_11_DURATION_MS / 1000))
150
162
  echo " Gate 11 ($GATE_11_STATUS) completed in ${GATE_11_DURATION}s"
151
- record_gate_audit "gate-11" "sprint-flow" "$GATE_11_STATUS" "0" "$GATE_11_START"
163
+ record_gate_audit "gate-11" "sprint-flow" "$GATE_11_STATUS" "0" "$GATE_11_START" "${GATE_11_DETAIL:-}"
152
164
  echo ""
153
165
  # ============================================================================
154
166
  return 0
@@ -37,7 +37,13 @@ if ! gate_enabled 9; then
37
37
  echo "⏭️ SKIPPED - Gate 9: Build integrity (not selected by XP_GATE_ONLY_GATE)"
38
38
  GATE_9_STATUS="SKIP"
39
39
  GATE_9_DETAIL="not_selected"
40
- record_gate_audit "gate-9" "build-integrity" "$GATE_9_STATUS" "0" "$(gate_start_ms)"
40
+ # The detail was assigned and then dropped: this call omitted the sixth
41
+ # argument, so `grep -rn GATE_9_DETAIL` found exactly one line -- the
42
+ # assignment -- and shellcheck flagged it SC2034. The row was written, but
43
+ # without the reason, which is the half that separates "deselected on purpose"
44
+ # from "the chain never reached here". githooks/AGENTS.md: a SKIP row with no
45
+ # reason is a bug, not a pass.
46
+ record_gate_audit "gate-9" "build-integrity" "$GATE_9_STATUS" "0" "$(gate_start_ms)" "$GATE_9_DETAIL"
41
47
  return 0
42
48
  fi
43
49
 
@@ -325,6 +331,80 @@ fi
325
331
  # single-variable guard: with explicit sub-statuses a Java PASS no longer
326
332
  # "resurrects" a TS SKIP -- each half keeps its own record and the gate
327
333
  # reflects the union of what was actually verified.
334
+ #
335
+ # DEFECT C: GATE_9_UNVERIFIED promised more than it delivered. Its comment says
336
+ # "a value means 'this commit contains code nobody built'", and the aggregation
337
+ # below says an unverified part "must SAY so" -- but only the Gradle arm ever set
338
+ # it. Measured 2026-11-19 on a Go fixture with a deliberate type error
339
+ # (`var x int = "not an int"`): Gate 9 skipped with "Not a TypeScript project",
340
+ # Gate 13 passed with "No staged C/C++ source files", and no gate built the file.
341
+ #
342
+ # Collected HERE, driven by PROJECT_LANGS rather than by listing the languages
343
+ # this gate cannot build: such a list can only cover what someone remembered,
344
+ # which is how the defect arose. Every language in the change set that is not one
345
+ # of the two halves that can run is, by definition, unverified.
346
+ #
347
+ # --- What this block does NOT do, and why ---
348
+ #
349
+ # githooks/AGENTS.md forbids hand-maintained language lists, and the extension
350
+ # table below looks like one. It is a deliberate exception with a named cost, so
351
+ # it is written down rather than discovered later:
352
+ #
353
+ # * PROJECT_LANGS is the authority for WHICH languages exist in this repo, and
354
+ # the loop is driven by it. A language missing from the table cannot be
355
+ # invented here; at worst one that IS present gets no note.
356
+ # * The table only maps language -> extension for languages already in
357
+ # PROJECT_LANGS. It cannot route work to an adapter -- the drift that rule
358
+ # exists to prevent. A new adapter that is added to PROJECT_LANGS but not
359
+ # here degrades to "no unverified note for that language", which is the
360
+ # PRE-EXISTING behaviour, not a new failure.
361
+ # * The real extension authority is src/npm-package/lib/language-tools.js,
362
+ # which is JavaScript and reachable only from the CLI. Calling node from this
363
+ # bash hot path to read it would cost a process spawn (measured >150ms cold
364
+ # on this machine) on every commit, to improve a message. That trade is
365
+ # wrong for a gate on the commit path.
366
+ #
367
+ # Known cost: a future adapter's extension must be added here or its commits get
368
+ # no unverified note. AC-GATE9-VERDICT-04/05 pin the behaviour for go; the
369
+ # fallback `*)` arm below is what keeps an unknown language from producing a
370
+ # meaningless blanket warning.
371
+ #
372
+ # Scoped to the CHANGE SET, not the project: a repo that happens to contain a
373
+ # .py file must not warn on a TypeScript-only commit. AC-GATE9-VERDICT-03 pins
374
+ # that a fully verified change carries no note.
375
+ if [ "${DOCS_ONLY_COMMIT:-false}" != "true" ]; then
376
+ for _g9_lang in $PROJECT_LANGS; do
377
+ case "$_g9_lang" in
378
+ typescript|java) continue ;; # these have real halves above
379
+ esac
380
+ # Only when the change set actually touches that language.
381
+ case "$_g9_lang" in
382
+ python) _g9_rx='\.py$' ;;
383
+ go) _g9_rx='\.go$' ;;
384
+ rust) _g9_rx='\.rs$' ;;
385
+ csharp) _g9_rx='\.cs$' ;;
386
+ cpp|c) _g9_rx='\.(c|cc|cpp|cxx|h|hpp)$' ;;
387
+ kotlin) _g9_rx='\.kts?$' ;;
388
+ swift) _g9_rx='\.swift$' ;;
389
+ dart) _g9_rx='\.dart$' ;;
390
+ php) _g9_rx='\.php$' ;;
391
+ ruby) _g9_rx='\.rb$' ;;
392
+ shell) _g9_rx='\.(sh|bash)$' ;;
393
+ powershell) _g9_rx='\.ps1$' ;;
394
+ objectivec) _g9_rx='\.m$' ;;
395
+ iac) _g9_rx='\.(tf|tfvars)$' ;;
396
+ *) _g9_rx="" ;;
397
+ esac
398
+ # An unrecognised language with no pattern cannot be confirmed absent, and
399
+ # claiming "unverified" for every language would make the note meaningless.
400
+ [ -n "$_g9_rx" ] || continue
401
+ if printf '%s\n' "${CHANGED_FILES:-}" | grep -qE "$_g9_rx"; then
402
+ GATE_9_UNVERIFIED="${GATE_9_UNVERIFIED:+${GATE_9_UNVERIFIED}, }${_g9_lang}:no_build_integrity_half"
403
+ fi
404
+ done
405
+ unset _g9_lang _g9_rx
406
+ fi
407
+
328
408
  GATE_9_STATUS="SKIP"
329
409
  if [ "$GATE_9_TS_STATUS" = "PASS" ] || [ "$GATE_9_JAVA_STATUS" = "PASS" ]; then
330
410
  GATE_9_STATUS="PASS"
@@ -355,7 +435,19 @@ GATE_9_DURATION=$((GATE_9_DURATION_MS / 1000))
355
435
  # human reads said success. The tick now follows the verdict it summarises.
356
436
  case "$GATE_9_STATUS" in
357
437
  PASS) echo "✅ Gate 9 completed in ${GATE_9_DURATION}s" ;;
358
- SKIP) echo "⏭️ Gate 9 skipped in ${GATE_9_DURATION}s (nothing was verified)" ;;
438
+ # The SKIP line must name the languages it could not build, when there are any.
439
+ # "nothing was verified" is true but not actionable: on a Go commit it does not
440
+ # say WHICH language went unchecked, and the reader has no way to tell this
441
+ # apart from a docs-only commit where there was genuinely nothing to build.
442
+ # GATE_9_UNVERIFIED is already computed for the PASS note above and the journal;
443
+ # the SKIP line was the one place it still went unsaid.
444
+ SKIP)
445
+ if [ -n "${GATE_9_UNVERIFIED:-}" ]; then
446
+ echo "⏭️ Gate 9 skipped in ${GATE_9_DURATION}s — no build-integrity half for: ${GATE_9_UNVERIFIED}"
447
+ else
448
+ echo "⏭️ Gate 9 skipped in ${GATE_9_DURATION}s (nothing was verified)"
449
+ fi
450
+ ;;
359
451
  *) echo "❌ Gate 9 blocked in ${GATE_9_DURATION}s" ;;
360
452
  esac
361
453
  record_gate_audit "gate-9" "build-integrity" "$GATE_9_STATUS" "0" "$GATE_9_START" "${GATE_9_UNVERIFIED:-}"
@@ -2,6 +2,6 @@
2
2
  "verdict": "PASS",
3
3
  "license_type": "MIT",
4
4
  "sha256": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5",
5
- "checked_at": "2026-11-19T14:14:36.712Z",
5
+ "checked_at": "2026-11-19T14:38:03.787Z",
6
6
  "source": "network"
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/xp-gate",
3
- "version": "0.38.36",
3
+ "version": "0.38.38",
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.36",
3
+ "version": "0.38.38",
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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.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.36",
3
+ "version": "0.38.38",
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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.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.36",
3
+ "version": "0.38.38",
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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.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.36.0
6
+ **Version:** 0.38.38.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.