@boyingliu01/xp-gate 0.38.83 → 0.38.85

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 (32) hide show
  1. package/adapters/gate-4.sh +44 -0
  2. package/adapters/gate-7.sh +11 -0
  3. package/adapters/gate-8.sh +11 -0
  4. package/adapters/python.sh +27 -1
  5. package/gate-4.sh +44 -0
  6. package/gate-7.sh +11 -0
  7. package/gate-8.sh +11 -0
  8. package/hooks/gate-4.sh +44 -0
  9. package/hooks/gate-7.sh +11 -0
  10. package/hooks/gate-8.sh +11 -0
  11. package/hooks/gate-entries/gate-13-entry.sh +3 -0
  12. package/lib/mattpocock-license-verdict.json +1 -1
  13. package/package.json +1 -1
  14. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  15. package/plugins/claude-code/skills/delphi-review/AGENTS.md +1 -1
  16. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +1 -1
  17. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +1 -1
  18. package/plugins/dsh/package.json +1 -1
  19. package/plugins/dsh/skills/delphi-review/AGENTS.md +1 -1
  20. package/plugins/dsh/skills/sprint-flow/AGENTS.md +1 -1
  21. package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +1 -1
  22. package/plugins/opencode/package.json +1 -1
  23. package/plugins/opencode/skills/delphi-review/AGENTS.md +1 -1
  24. package/plugins/opencode/skills/sprint-flow/AGENTS.md +1 -1
  25. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +1 -1
  26. package/plugins/qoder/plugin.json +1 -1
  27. package/plugins/qoder/skills/delphi-review/AGENTS.md +1 -1
  28. package/plugins/qoder/skills/sprint-flow/AGENTS.md +1 -1
  29. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +1 -1
  30. package/skills/delphi-review/AGENTS.md +1 -1
  31. package/skills/sprint-flow/AGENTS.md +1 -1
  32. package/skills/test-specification-alignment/AGENTS.md +1 -1
@@ -219,6 +219,50 @@ else
219
219
  ERROR_COUNT=${ERROR_COUNT:-0}
220
220
  WARNING_COUNT=$(grep -cE '"severity"[[:space:]]*:[[:space:]]*"warning"' "$PRINCIPLES_JSON" 2>/dev/null || true)
221
221
  WARNING_COUNT=${WARNING_COUNT:-0}
222
+
223
+ # Languages the checker COULD NOT read. The reporter has always printed
224
+ # this to the console ("⚠️ NOT ANALYSED: python — an adapter exists but no
225
+ # clean-code rule can read it"), and the JSON has always carried it in
226
+ # summary.unanalysedLanguages. The gate read neither, so a commit whose
227
+ # only changed file was a .py went out as
228
+ #
229
+ # {"name":"Clean Code + SOLID","status":"PASS","reason":"","warnings":0}
230
+ #
231
+ # MEASURED 2026-11-22 on a probe repo holding one .py file: the commit
232
+ # console showed NOT ANALYSED, the report recorded PASS with an empty
233
+ # reason, and nothing in the journal distinguished that from a commit
234
+ # whose TypeScript was genuinely reviewed.
235
+ #
236
+ # This is the family's exact shape -- "not checked" recorded as "passed"
237
+ # -- one level down from the verdict: the verdict is honest on the console
238
+ # and dishonest in the record a later reader actually consults.
239
+ #
240
+ # The status stays PASS rather than SKIP: some files WERE analysed, and
241
+ # demoting a real review to SKIP because a sibling file's language has no
242
+ # rules would trade one wrong record for another. What must survive is the
243
+ # REASON, which is what this assignment adds.
244
+ # The reporter pretty-prints with `JSON.stringify(out, null, 2)`, so the
245
+ # array arrives SPLIT ACROSS LINES:
246
+ #
247
+ # "unanalysedLanguages": [
248
+ # "python"
249
+ # ]
250
+ #
251
+ # A single-line `sed` range silently matches nothing and the bug would
252
+ # look fixed while recording nothing -- the exact failure this change
253
+ # exists to remove. Flatten first, then extract; both steps are needed.
254
+ _PJ_FLAT=$(tr -d "
255
+ " < "$PRINCIPLES_JSON" 2>/dev/null | tr -s " ")
256
+ UNANALYSED_LANGS=$(printf '%s' "$_PJ_FLAT" \
257
+ | sed -n 's/.*"unanalysedLanguages"[[:space:]]*:[[:space:]]*\[\([^]]*\)\].*/\1/p' \
258
+ | tr -d '"' | tr ',' ' ' | tr -s ' ' | sed 's/^ *//; s/ *$//')
259
+ unset _PJ_FLAT
260
+ if [ -n "$UNANALYSED_LANGS" ]; then
261
+ echo "⚠️ Not analysed: ${UNANALYSED_LANGS} — an adapter exists but no clean-code rule reads it."
262
+ echo " Those files were NOT checked; this PASS covers only the rest."
263
+ GATE_4_REASON="unanalysed:${UNANALYSED_LANGS// /,}"
264
+ fi
265
+
222
266
  rm -f "$PRINCIPLES_JSON"
223
267
 
224
268
  if [ "$ERROR_COUNT" -gt 0 ]; then
@@ -18,6 +18,13 @@ GATE_7_SCANNED_FILES=0
18
18
  # Initialised here, not only inside the adapter branch: the journal line at the
19
19
  # bottom runs on EVERY path, and an unset variable there is an error under set -u.
20
20
  IAC_ISSUE_COUNT=0
21
+ # Why this gate is not checking anything, recorded for the quality report and
22
+ # the audit journal. Gate 7 had NO reason variable at all: both SKIP arms
23
+ # printed a sentence to the console and the journal then recorded a bare SKIP
24
+ # -- this codebase's oldest defect family, "not checked" with nothing saying
25
+ # why. Each arm below sets it.
26
+ # shellcheck disable=SC2034
27
+ GATE_7_REASON=""
21
28
  if [ -z "$IAC_FILES" ]; then
22
29
  # #800: "nothing to scan" must never be rendered as "scanned and clean".
23
30
  # This branch used to print PASSED and set GATE_7_STATUS=PASS, while the report
@@ -26,6 +33,8 @@ if [ -z "$IAC_FILES" ]; then
26
33
  # a SKIP with a reason, exactly like the no-adapter branch below.
27
34
  echo "⏭️ SKIPPED - IaC security (no IaC files in this change set)."
28
35
  GATE_7_STATUS="SKIP"
36
+ # shellcheck disable=SC2034
37
+ GATE_7_REASON="no_iac_files_changed"
29
38
  else
30
39
  # Consumed by the sourcing parent, not here (see #548).
31
40
  # shellcheck disable=SC2034
@@ -88,6 +97,8 @@ else
88
97
  echo "ℹ️ SKIP - IaC adapter not found"
89
98
  echo "⏭️ SKIPPED - IaC security (no IaC adapter found)"
90
99
  GATE_7_STATUS="SKIP"
100
+ # shellcheck disable=SC2034
101
+ GATE_7_REASON="adapter_not_found"
91
102
  fi
92
103
  fi
93
104
  # The single exit point for the journal, reached on every path now that the
@@ -189,6 +189,13 @@ if [ "$GITLEAKS_EXIT" -eq 0 ]; then
189
189
  if [ "$GITLEAKS_FINDINGS" = "0" ]; then
190
190
  echo " ✅ PASSED - No secrets detected."
191
191
  GATE_8_STATUS="PASS"
192
+ # Why the gate is not claiming a pass. Gate 8 had no reason variable, so its
193
+ # SKIP arms printed the distinction to the console ("no artifact" vs "no
194
+ # evidence") and the journal recorded a bare SKIP for both -- unreadable
195
+ # afterwards. Assigning it here keeps the two arms distinguishable in the
196
+ # record.
197
+ # shellcheck disable=SC2034
198
+ GATE_8_REASON=""
192
199
  elif [ "$GITLEAKS_FINDINGS" = "?" ]; then
193
200
  # #592: exit 0 with no usable report has TWO very different causes, and the
194
201
  # operator can only act if we tell them which one happened:
@@ -221,9 +228,13 @@ if [ "$GITLEAKS_EXIT" -eq 0 ]; then
221
228
  echo " ⚠️ gitleaks scanned and reported no leaks, but wrote no report file"
222
229
  echo " (${GITLEAKS_REPORT} missing). No artifact means no PASS (#449)."
223
230
  echo " ⏭️ SKIPPED - secret scanning produced no artifact (scan reported clean)."
231
+ # shellcheck disable=SC2034
232
+ GATE_8_REASON="no_artifact_scan_reported_clean"
224
233
  else
225
234
  echo " ⚠️ gitleaks exited 0 but produced no readable report and no scan summary"
226
235
  echo " ⏭️ SKIPPED - secret scanning produced no evidence (not a pass)"
236
+ # shellcheck disable=SC2034
237
+ GATE_8_REASON="no_evidence_no_report_no_summary"
227
238
  fi
228
239
  GATE_8_STATUS="SKIP"
229
240
  else
@@ -30,7 +30,10 @@ unset _ac_candidate
30
30
  # scope declaration may name a single .py file.
31
31
  _mypy_target_usable() {
32
32
  [ -e "$1" ] || return 1
33
- [ -n "$(find "$1" -name '*.py' -print 2>/dev/null | grep .)" ]
33
+ # SC2143: the exit status IS the answer, so `grep -q` -- it also stops at the
34
+ # first hit instead of buffering every match in a large target. No `-print`
35
+ # needed either: grep only needs to know that a line exists.
36
+ find "$1" -name '*.py' 2>/dev/null | grep -q .
34
37
  }
35
38
 
36
39
  run_static_analysis() {
@@ -233,6 +236,29 @@ run_tests() {
233
236
  return $PYTEST_EXIT
234
237
  }
235
238
 
239
+ # run_coverage() below executes and judges every test: `pytest ... --cov=src`
240
+ # runs the suite, sets PYTEST_EXIT, and returns 1 on any of the three non-verdict
241
+ # arms it already inspects. So the separate run_tests() pass adds no verdict,
242
+ # only a second full pytest start.
243
+ #
244
+ # MEASURED 2026-11-20 on this machine, a probe repo holding ONE test:
245
+ #
246
+ # run_tests 7016 / 10669 / 15237 ms (pytest -n auto, no --cov)
247
+ # run_coverage 16660 / 11221 / 14485 ms (pytest -n auto --cov=src)
248
+ # both 23676 / 21890 / 29722 ms
249
+ #
250
+ # The suite is ONE test. Half of that wall clock was the same two-second test
251
+ # being started twice, and the proportion only grows on a repo whose tests are
252
+ # fast: what dominates is pytest start-up plus, on Windows, xdist spawning one
253
+ # worker per core (a single test went from 3935 ms serial to 10604 ms under
254
+ # `-n auto`, so the parallelism is itself a cost at small test counts).
255
+ #
256
+ # Which is why the declaration matters most HERE: python's tests are commonly the
257
+ # cheapest per commit, so the doubled start-up is the largest share of its cost.
258
+ #
259
+ # Undeclared adapters keep the safe double-run default -- see adapter-common.sh.
260
+ coverage_runs_tests() { return 0; }
261
+
236
262
  run_coverage() {
237
263
  require_tool pytest "pytest" || return 1
238
264
 
package/gate-4.sh CHANGED
@@ -219,6 +219,50 @@ else
219
219
  ERROR_COUNT=${ERROR_COUNT:-0}
220
220
  WARNING_COUNT=$(grep -cE '"severity"[[:space:]]*:[[:space:]]*"warning"' "$PRINCIPLES_JSON" 2>/dev/null || true)
221
221
  WARNING_COUNT=${WARNING_COUNT:-0}
222
+
223
+ # Languages the checker COULD NOT read. The reporter has always printed
224
+ # this to the console ("⚠️ NOT ANALYSED: python — an adapter exists but no
225
+ # clean-code rule can read it"), and the JSON has always carried it in
226
+ # summary.unanalysedLanguages. The gate read neither, so a commit whose
227
+ # only changed file was a .py went out as
228
+ #
229
+ # {"name":"Clean Code + SOLID","status":"PASS","reason":"","warnings":0}
230
+ #
231
+ # MEASURED 2026-11-22 on a probe repo holding one .py file: the commit
232
+ # console showed NOT ANALYSED, the report recorded PASS with an empty
233
+ # reason, and nothing in the journal distinguished that from a commit
234
+ # whose TypeScript was genuinely reviewed.
235
+ #
236
+ # This is the family's exact shape -- "not checked" recorded as "passed"
237
+ # -- one level down from the verdict: the verdict is honest on the console
238
+ # and dishonest in the record a later reader actually consults.
239
+ #
240
+ # The status stays PASS rather than SKIP: some files WERE analysed, and
241
+ # demoting a real review to SKIP because a sibling file's language has no
242
+ # rules would trade one wrong record for another. What must survive is the
243
+ # REASON, which is what this assignment adds.
244
+ # The reporter pretty-prints with `JSON.stringify(out, null, 2)`, so the
245
+ # array arrives SPLIT ACROSS LINES:
246
+ #
247
+ # "unanalysedLanguages": [
248
+ # "python"
249
+ # ]
250
+ #
251
+ # A single-line `sed` range silently matches nothing and the bug would
252
+ # look fixed while recording nothing -- the exact failure this change
253
+ # exists to remove. Flatten first, then extract; both steps are needed.
254
+ _PJ_FLAT=$(tr -d "
255
+ " < "$PRINCIPLES_JSON" 2>/dev/null | tr -s " ")
256
+ UNANALYSED_LANGS=$(printf '%s' "$_PJ_FLAT" \
257
+ | sed -n 's/.*"unanalysedLanguages"[[:space:]]*:[[:space:]]*\[\([^]]*\)\].*/\1/p' \
258
+ | tr -d '"' | tr ',' ' ' | tr -s ' ' | sed 's/^ *//; s/ *$//')
259
+ unset _PJ_FLAT
260
+ if [ -n "$UNANALYSED_LANGS" ]; then
261
+ echo "⚠️ Not analysed: ${UNANALYSED_LANGS} — an adapter exists but no clean-code rule reads it."
262
+ echo " Those files were NOT checked; this PASS covers only the rest."
263
+ GATE_4_REASON="unanalysed:${UNANALYSED_LANGS// /,}"
264
+ fi
265
+
222
266
  rm -f "$PRINCIPLES_JSON"
223
267
 
224
268
  if [ "$ERROR_COUNT" -gt 0 ]; then
package/gate-7.sh CHANGED
@@ -18,6 +18,13 @@ GATE_7_SCANNED_FILES=0
18
18
  # Initialised here, not only inside the adapter branch: the journal line at the
19
19
  # bottom runs on EVERY path, and an unset variable there is an error under set -u.
20
20
  IAC_ISSUE_COUNT=0
21
+ # Why this gate is not checking anything, recorded for the quality report and
22
+ # the audit journal. Gate 7 had NO reason variable at all: both SKIP arms
23
+ # printed a sentence to the console and the journal then recorded a bare SKIP
24
+ # -- this codebase's oldest defect family, "not checked" with nothing saying
25
+ # why. Each arm below sets it.
26
+ # shellcheck disable=SC2034
27
+ GATE_7_REASON=""
21
28
  if [ -z "$IAC_FILES" ]; then
22
29
  # #800: "nothing to scan" must never be rendered as "scanned and clean".
23
30
  # This branch used to print PASSED and set GATE_7_STATUS=PASS, while the report
@@ -26,6 +33,8 @@ if [ -z "$IAC_FILES" ]; then
26
33
  # a SKIP with a reason, exactly like the no-adapter branch below.
27
34
  echo "⏭️ SKIPPED - IaC security (no IaC files in this change set)."
28
35
  GATE_7_STATUS="SKIP"
36
+ # shellcheck disable=SC2034
37
+ GATE_7_REASON="no_iac_files_changed"
29
38
  else
30
39
  # Consumed by the sourcing parent, not here (see #548).
31
40
  # shellcheck disable=SC2034
@@ -88,6 +97,8 @@ else
88
97
  echo "ℹ️ SKIP - IaC adapter not found"
89
98
  echo "⏭️ SKIPPED - IaC security (no IaC adapter found)"
90
99
  GATE_7_STATUS="SKIP"
100
+ # shellcheck disable=SC2034
101
+ GATE_7_REASON="adapter_not_found"
91
102
  fi
92
103
  fi
93
104
  # The single exit point for the journal, reached on every path now that the
package/gate-8.sh CHANGED
@@ -189,6 +189,13 @@ if [ "$GITLEAKS_EXIT" -eq 0 ]; then
189
189
  if [ "$GITLEAKS_FINDINGS" = "0" ]; then
190
190
  echo " ✅ PASSED - No secrets detected."
191
191
  GATE_8_STATUS="PASS"
192
+ # Why the gate is not claiming a pass. Gate 8 had no reason variable, so its
193
+ # SKIP arms printed the distinction to the console ("no artifact" vs "no
194
+ # evidence") and the journal recorded a bare SKIP for both -- unreadable
195
+ # afterwards. Assigning it here keeps the two arms distinguishable in the
196
+ # record.
197
+ # shellcheck disable=SC2034
198
+ GATE_8_REASON=""
192
199
  elif [ "$GITLEAKS_FINDINGS" = "?" ]; then
193
200
  # #592: exit 0 with no usable report has TWO very different causes, and the
194
201
  # operator can only act if we tell them which one happened:
@@ -221,9 +228,13 @@ if [ "$GITLEAKS_EXIT" -eq 0 ]; then
221
228
  echo " ⚠️ gitleaks scanned and reported no leaks, but wrote no report file"
222
229
  echo " (${GITLEAKS_REPORT} missing). No artifact means no PASS (#449)."
223
230
  echo " ⏭️ SKIPPED - secret scanning produced no artifact (scan reported clean)."
231
+ # shellcheck disable=SC2034
232
+ GATE_8_REASON="no_artifact_scan_reported_clean"
224
233
  else
225
234
  echo " ⚠️ gitleaks exited 0 but produced no readable report and no scan summary"
226
235
  echo " ⏭️ SKIPPED - secret scanning produced no evidence (not a pass)"
236
+ # shellcheck disable=SC2034
237
+ GATE_8_REASON="no_evidence_no_report_no_summary"
227
238
  fi
228
239
  GATE_8_STATUS="SKIP"
229
240
  else
package/hooks/gate-4.sh CHANGED
@@ -219,6 +219,50 @@ else
219
219
  ERROR_COUNT=${ERROR_COUNT:-0}
220
220
  WARNING_COUNT=$(grep -cE '"severity"[[:space:]]*:[[:space:]]*"warning"' "$PRINCIPLES_JSON" 2>/dev/null || true)
221
221
  WARNING_COUNT=${WARNING_COUNT:-0}
222
+
223
+ # Languages the checker COULD NOT read. The reporter has always printed
224
+ # this to the console ("⚠️ NOT ANALYSED: python — an adapter exists but no
225
+ # clean-code rule can read it"), and the JSON has always carried it in
226
+ # summary.unanalysedLanguages. The gate read neither, so a commit whose
227
+ # only changed file was a .py went out as
228
+ #
229
+ # {"name":"Clean Code + SOLID","status":"PASS","reason":"","warnings":0}
230
+ #
231
+ # MEASURED 2026-11-22 on a probe repo holding one .py file: the commit
232
+ # console showed NOT ANALYSED, the report recorded PASS with an empty
233
+ # reason, and nothing in the journal distinguished that from a commit
234
+ # whose TypeScript was genuinely reviewed.
235
+ #
236
+ # This is the family's exact shape -- "not checked" recorded as "passed"
237
+ # -- one level down from the verdict: the verdict is honest on the console
238
+ # and dishonest in the record a later reader actually consults.
239
+ #
240
+ # The status stays PASS rather than SKIP: some files WERE analysed, and
241
+ # demoting a real review to SKIP because a sibling file's language has no
242
+ # rules would trade one wrong record for another. What must survive is the
243
+ # REASON, which is what this assignment adds.
244
+ # The reporter pretty-prints with `JSON.stringify(out, null, 2)`, so the
245
+ # array arrives SPLIT ACROSS LINES:
246
+ #
247
+ # "unanalysedLanguages": [
248
+ # "python"
249
+ # ]
250
+ #
251
+ # A single-line `sed` range silently matches nothing and the bug would
252
+ # look fixed while recording nothing -- the exact failure this change
253
+ # exists to remove. Flatten first, then extract; both steps are needed.
254
+ _PJ_FLAT=$(tr -d "
255
+ " < "$PRINCIPLES_JSON" 2>/dev/null | tr -s " ")
256
+ UNANALYSED_LANGS=$(printf '%s' "$_PJ_FLAT" \
257
+ | sed -n 's/.*"unanalysedLanguages"[[:space:]]*:[[:space:]]*\[\([^]]*\)\].*/\1/p' \
258
+ | tr -d '"' | tr ',' ' ' | tr -s ' ' | sed 's/^ *//; s/ *$//')
259
+ unset _PJ_FLAT
260
+ if [ -n "$UNANALYSED_LANGS" ]; then
261
+ echo "⚠️ Not analysed: ${UNANALYSED_LANGS} — an adapter exists but no clean-code rule reads it."
262
+ echo " Those files were NOT checked; this PASS covers only the rest."
263
+ GATE_4_REASON="unanalysed:${UNANALYSED_LANGS// /,}"
264
+ fi
265
+
222
266
  rm -f "$PRINCIPLES_JSON"
223
267
 
224
268
  if [ "$ERROR_COUNT" -gt 0 ]; then
package/hooks/gate-7.sh CHANGED
@@ -18,6 +18,13 @@ GATE_7_SCANNED_FILES=0
18
18
  # Initialised here, not only inside the adapter branch: the journal line at the
19
19
  # bottom runs on EVERY path, and an unset variable there is an error under set -u.
20
20
  IAC_ISSUE_COUNT=0
21
+ # Why this gate is not checking anything, recorded for the quality report and
22
+ # the audit journal. Gate 7 had NO reason variable at all: both SKIP arms
23
+ # printed a sentence to the console and the journal then recorded a bare SKIP
24
+ # -- this codebase's oldest defect family, "not checked" with nothing saying
25
+ # why. Each arm below sets it.
26
+ # shellcheck disable=SC2034
27
+ GATE_7_REASON=""
21
28
  if [ -z "$IAC_FILES" ]; then
22
29
  # #800: "nothing to scan" must never be rendered as "scanned and clean".
23
30
  # This branch used to print PASSED and set GATE_7_STATUS=PASS, while the report
@@ -26,6 +33,8 @@ if [ -z "$IAC_FILES" ]; then
26
33
  # a SKIP with a reason, exactly like the no-adapter branch below.
27
34
  echo "⏭️ SKIPPED - IaC security (no IaC files in this change set)."
28
35
  GATE_7_STATUS="SKIP"
36
+ # shellcheck disable=SC2034
37
+ GATE_7_REASON="no_iac_files_changed"
29
38
  else
30
39
  # Consumed by the sourcing parent, not here (see #548).
31
40
  # shellcheck disable=SC2034
@@ -88,6 +97,8 @@ else
88
97
  echo "ℹ️ SKIP - IaC adapter not found"
89
98
  echo "⏭️ SKIPPED - IaC security (no IaC adapter found)"
90
99
  GATE_7_STATUS="SKIP"
100
+ # shellcheck disable=SC2034
101
+ GATE_7_REASON="adapter_not_found"
91
102
  fi
92
103
  fi
93
104
  # The single exit point for the journal, reached on every path now that the
package/hooks/gate-8.sh CHANGED
@@ -189,6 +189,13 @@ if [ "$GITLEAKS_EXIT" -eq 0 ]; then
189
189
  if [ "$GITLEAKS_FINDINGS" = "0" ]; then
190
190
  echo " ✅ PASSED - No secrets detected."
191
191
  GATE_8_STATUS="PASS"
192
+ # Why the gate is not claiming a pass. Gate 8 had no reason variable, so its
193
+ # SKIP arms printed the distinction to the console ("no artifact" vs "no
194
+ # evidence") and the journal recorded a bare SKIP for both -- unreadable
195
+ # afterwards. Assigning it here keeps the two arms distinguishable in the
196
+ # record.
197
+ # shellcheck disable=SC2034
198
+ GATE_8_REASON=""
192
199
  elif [ "$GITLEAKS_FINDINGS" = "?" ]; then
193
200
  # #592: exit 0 with no usable report has TWO very different causes, and the
194
201
  # operator can only act if we tell them which one happened:
@@ -221,9 +228,13 @@ if [ "$GITLEAKS_EXIT" -eq 0 ]; then
221
228
  echo " ⚠️ gitleaks scanned and reported no leaks, but wrote no report file"
222
229
  echo " (${GITLEAKS_REPORT} missing). No artifact means no PASS (#449)."
223
230
  echo " ⏭️ SKIPPED - secret scanning produced no artifact (scan reported clean)."
231
+ # shellcheck disable=SC2034
232
+ GATE_8_REASON="no_artifact_scan_reported_clean"
224
233
  else
225
234
  echo " ⚠️ gitleaks exited 0 but produced no readable report and no scan summary"
226
235
  echo " ⏭️ SKIPPED - secret scanning produced no evidence (not a pass)"
236
+ # shellcheck disable=SC2034
237
+ GATE_8_REASON="no_evidence_no_report_no_summary"
227
238
  fi
228
239
  GATE_8_STATUS="SKIP"
229
240
  else
@@ -468,6 +468,7 @@ generate_quality_report() {
468
468
  "gate2_dup_code": {
469
469
  "name": "Duplicate Code",
470
470
  "status": "$(gate_key_status 2)",
471
+ "reason": "${GATE_2_DETAIL:-}",
471
472
  "metric": "similarity <= 5%"
472
473
  },
473
474
  "gate3_complexity": {
@@ -503,12 +504,14 @@ generate_quality_report() {
503
504
  "gate7_iac_security": {
504
505
  "name": "IaC Security Scanning",
505
506
  "status": "$(gate_key_status 7)",
507
+ "reason": "${GATE_7_REASON:-}",
506
508
  "scanned_files": ${GATE_7_SCANNED_FILES:-0},
507
509
  "tools": "checkov, hadolint, kube-score, tflint"
508
510
  },
509
511
  "gate8_secret_scanning": {
510
512
  "name": "Secret Scanning",
511
513
  "status": "$(gate_key_status 8)",
514
+ "reason": "${GATE_8_REASON:-}",
512
515
  "tool": "gitleaks"
513
516
  },
514
517
  "gate9_build_integrity": {
@@ -2,6 +2,6 @@
2
2
  "verdict": "PASS",
3
3
  "license_type": "MIT",
4
4
  "sha256": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5",
5
- "checked_at": "2026-11-22T03:19:13.021Z",
5
+ "checked_at": "2026-11-22T06:37:20.137Z",
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.83",
3
+ "version": "0.38.85",
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.83",
3
+ "version": "0.38.85",
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.83.0
6
+ **Version:** 0.38.85.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.83.0
6
+ **Version:** 0.38.85.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.83.0
6
+ **Version:** 0.38.85.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.83",
3
+ "version": "0.38.85",
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.83.0
6
+ **Version:** 0.38.85.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.83.0
6
+ **Version:** 0.38.85.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.83.0
6
+ **Version:** 0.38.85.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.83",
3
+ "version": "0.38.85",
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.83.0
6
+ **Version:** 0.38.85.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.83.0
6
+ **Version:** 0.38.85.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.83.0
6
+ **Version:** 0.38.85.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.83",
3
+ "version": "0.38.85",
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.83.0
6
+ **Version:** 0.38.85.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.83.0
6
+ **Version:** 0.38.85.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.83.0
6
+ **Version:** 0.38.85.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.83.0
6
+ **Version:** 0.38.85.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.83.0
6
+ **Version:** 0.38.85.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.83.0
6
+ **Version:** 0.38.85.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.