@boyingliu01/xp-gate 0.38.45 → 0.38.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adapters/gate-8.sh +70 -1
- package/hooks/gate-entries/gate-13-entry.sh +20 -1
- package/lib/mattpocock-license-verdict.json +1 -1
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +1 -1
- package/plugins/dsh/package.json +1 -1
- package/plugins/dsh/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/dsh/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +1 -1
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +1 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +1 -1
- package/skills/delphi-review/AGENTS.md +1 -1
- package/skills/sprint-flow/AGENTS.md +1 -1
- package/skills/test-specification-alignment/AGENTS.md +1 -1
package/adapters/gate-8.sh
CHANGED
|
@@ -28,7 +28,72 @@ gate8_cleanup() {
|
|
|
28
28
|
rm -f "${GATE8_TEMP[@]}" 2>/dev/null
|
|
29
29
|
fi
|
|
30
30
|
}
|
|
31
|
-
trap
|
|
31
|
+
# CHAIN the previous EXIT trap instead of replacing it.
|
|
32
|
+
#
|
|
33
|
+
# Measured 2026-11-19: `trap gate8_cleanup EXIT` overwrote whatever trap was
|
|
34
|
+
# already installed. pre-commit installs `_quality_report_on_exit` at its top
|
|
35
|
+
# precisely so that a BLOCKED commit still writes its report, and Gate 8 runs
|
|
36
|
+
# before the blocking gates -- so from the moment Gate 8 ran, that trap was gone.
|
|
37
|
+
#
|
|
38
|
+
# The consequence is the worst possible shape: a commit that PASSES writes its
|
|
39
|
+
# report (the epilogue calls generate_quality_report directly), and a commit that
|
|
40
|
+
# is BLOCKED writes nothing. The one run an operator needs to diagnose is the one
|
|
41
|
+
# with no record.
|
|
42
|
+
#
|
|
43
|
+
# Reproduced in a go fixture: the chain stopped at Gate 5, and
|
|
44
|
+
#
|
|
45
|
+
# ls .xp-gate/reports/pre-commit | wc -l -> 0
|
|
46
|
+
#
|
|
47
|
+
# while the same fixture with XP_GATE_ONLY_GATE=8 (chain completes) produced 1.
|
|
48
|
+
# Reading the live trap at the end of the hook showed `trap -- 'gate8_cleanup'
|
|
49
|
+
# EXIT` -- the report trap had been replaced, not chained.
|
|
50
|
+
#
|
|
51
|
+
# `trap -p EXIT` prints a form that can be eval'd back, which is the same
|
|
52
|
+
# technique pre-commit's own source_gate_lib uses to survive a sourced library
|
|
53
|
+
# that installs a trap. The difference here: that library wants to REINSTALL the
|
|
54
|
+
# old trap, whereas this gate has to RUN it, so only the command body is kept.
|
|
55
|
+
#
|
|
56
|
+
# Stripping matters and was caught by the test, not by reading: evaluating the
|
|
57
|
+
# whole string ("trap -- 'cmd' EXIT") reinstalls the old trap instead of invoking
|
|
58
|
+
# it, so the chain silently did nothing and the report still went missing.
|
|
59
|
+
_GATE8_PREV_EXIT_TRAP=""
|
|
60
|
+
_gate8_raw_trap="$(trap -p EXIT 2>/dev/null || true)"
|
|
61
|
+
if [ -n "$_gate8_raw_trap" ]; then
|
|
62
|
+
_gate8_body="${_gate8_raw_trap#trap -- }" # drop 'trap -- '
|
|
63
|
+
_gate8_body="${_gate8_body% EXIT}" # drop the trailing ' EXIT'
|
|
64
|
+
_gate8_body="${_gate8_body#\'}" # drop the surrounding quotes
|
|
65
|
+
_gate8_body="${_gate8_body%\'}"
|
|
66
|
+
_GATE8_PREV_EXIT_TRAP="$_gate8_body"
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
gate8_cleanup_and_chain() {
|
|
70
|
+
# CAPTURE $? FIRST, then RESTORE it before handing control on.
|
|
71
|
+
#
|
|
72
|
+
# pre-commit's `_quality_report_on_exit` reads `$?` as its very first statement
|
|
73
|
+
# and exits with that status -- that is what makes the hook exit non-zero when a
|
|
74
|
+
# gate blocked. Running cleanup first overwrote $? with the status of `rm`, so
|
|
75
|
+
# the chained trap saw 0 and the hook exited 0.
|
|
76
|
+
#
|
|
77
|
+
# Measured 2026-11-19, go fixture, Gate 5 blocked (coverage 0%):
|
|
78
|
+
# before any fix : commit refused (rc=1), report NOT written
|
|
79
|
+
# chain without restoring : commit ALLOWED (rc=0), report written
|
|
80
|
+
#
|
|
81
|
+
# The second row is a WORSE bug than the one being fixed -- a chain that
|
|
82
|
+
# preserves the report by letting blocked commits through. `( exit N )` on its
|
|
83
|
+
# own does not help (the subshell's status is discarded), but it does set $? to
|
|
84
|
+
# N for the next command in this shell, which is what the eval below observes.
|
|
85
|
+
# Verified directly: a chained trap reading $? after this sequence sees the
|
|
86
|
+
# original status, and the hook still exits with it.
|
|
87
|
+
local _g8_saved=$?
|
|
88
|
+
gate8_cleanup
|
|
89
|
+
if [ -n "${_GATE8_PREV_EXIT_TRAP:-}" ]; then
|
|
90
|
+
(exit "$_g8_saved")
|
|
91
|
+
eval "$_GATE8_PREV_EXIT_TRAP"
|
|
92
|
+
return "$_g8_saved"
|
|
93
|
+
fi
|
|
94
|
+
return "$_g8_saved"
|
|
95
|
+
}
|
|
96
|
+
trap gate8_cleanup_and_chain EXIT
|
|
32
97
|
|
|
33
98
|
# Gitleaks availability check
|
|
34
99
|
GITLEAKS_CMD=""
|
|
@@ -90,9 +155,13 @@ GITLEAKS_REPORT="${TMPDIR:-/tmp}/gitleaks-report.json"
|
|
|
90
155
|
rm -f "$GITLEAKS_REPORT"
|
|
91
156
|
if [ "${GATE_SCOPE:-diff}" = "all" ]; then
|
|
92
157
|
echo " Scope: --all (scanning the working tree, not the index)"
|
|
158
|
+
# GITLEAKS_CONFIG is either empty or a single --config=PATH token; quoting it
|
|
159
|
+
# would pass an empty argument to gitleaks. It is split on purpose.
|
|
160
|
+
# shellcheck disable=SC2086
|
|
93
161
|
GITLEAKS_OUTPUT=$($GITLEAKS_CMD dir --no-git --redact --no-banner $GITLEAKS_CONFIG --report-format=json --report-path="$GITLEAKS_REPORT" 2>&1)
|
|
94
162
|
GITLEAKS_EXIT=$?
|
|
95
163
|
else
|
|
164
|
+
# shellcheck disable=SC2086 # see above: empty or one --config= token
|
|
96
165
|
GITLEAKS_OUTPUT=$($GITLEAKS_CMD git --staged --redact --no-banner $GITLEAKS_CONFIG --report-format=json --report-path="$GITLEAKS_REPORT" 2>&1)
|
|
97
166
|
GITLEAKS_EXIT=$?
|
|
98
167
|
fi
|
|
@@ -380,7 +380,26 @@ ENDJSON
|
|
|
380
380
|
fi
|
|
381
381
|
|
|
382
382
|
# ── Persistent per-run report (Issue #101) ────────────────────────────────────────
|
|
383
|
-
|
|
383
|
+
#
|
|
384
|
+
# The report directory is resolved against the REPOSITORY ROOT, not the current
|
|
385
|
+
# working directory.
|
|
386
|
+
#
|
|
387
|
+
# Measured 2026-11-19: this was `local REPORTS_DIR=".xp-gate/reports/pre-commit"`.
|
|
388
|
+
# It worked in the repository it was written in -- and silently wrote the report
|
|
389
|
+
# into /d/projects/xp-gate/.xp-gate/ when the hook ran from a different project
|
|
390
|
+
# (a fixture under /tmp). The commit itself was graded correctly; only the report
|
|
391
|
+
# went somewhere nobody would look, so a reader of the fixture saw "no report"
|
|
392
|
+
# and concluded the gates never ran.
|
|
393
|
+
#
|
|
394
|
+
# That is the same failure shape as the rest of this file: the behaviour was
|
|
395
|
+
# right and the record was unreachable. `generate_quality_report` is called from
|
|
396
|
+
# the EXIT trap, where the working directory is whatever the last gate left
|
|
397
|
+
# behind -- it is not a place to depend on relativity.
|
|
398
|
+
local _xp_report_root="${PROJECT_ROOT:-}"
|
|
399
|
+
if [ -z "$_xp_report_root" ] || [ ! -d "$_xp_report_root" ]; then
|
|
400
|
+
_xp_report_root=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
|
|
401
|
+
fi
|
|
402
|
+
local REPORTS_DIR="${_xp_report_root}/.xp-gate/reports/pre-commit"
|
|
384
403
|
local REPORT_TS
|
|
385
404
|
REPORT_TS=$(date -u +"%Y-%m-%d-%H%M%S")
|
|
386
405
|
local PERSISTED_REPORT_FILE="${REPORTS_DIR}/${REPORT_TS}.json"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-gate",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.46",
|
|
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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
package/plugins/dsh/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boyingliu01/dsh-plugin-xp-gate",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.46",
|
|
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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.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.
|
|
6
|
+
**Version:** 0.38.46.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|