@boyingliu01/xp-gate 0.38.52 → 0.38.54
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/dart.sh +12 -8
- package/adapters/flutter.sh +12 -8
- package/adapters/swift.sh +49 -10
- package/hooks/gate-driver.sh +19 -0
- package/hooks/gate-entries/gate-13-entry.sh +187 -11
- package/hooks/gate-entries/gate-7-entry.sh +2 -2
- 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/dart.sh
CHANGED
|
@@ -3,30 +3,33 @@
|
|
|
3
3
|
run_static_analysis() {
|
|
4
4
|
if command -v dart &>/dev/null; then
|
|
5
5
|
dart analyze 2>&1 | sed -n '1,30p; 30q'
|
|
6
|
-
return
|
|
6
|
+
return "${PIPESTATUS[0]}"
|
|
7
7
|
else
|
|
8
|
+
echo "XP_G1_REASON: dart: Dart SDK not installed -- nothing was checked"
|
|
8
9
|
echo "Dart SDK not available"
|
|
9
|
-
return
|
|
10
|
+
return 3
|
|
10
11
|
fi
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
run_lint() {
|
|
14
15
|
if command -v dart &>/dev/null; then
|
|
15
16
|
dart format --output=none --set-exit-if-changed . 2>&1 | sed -n '1,30p; 30q'
|
|
16
|
-
return
|
|
17
|
+
return "${PIPESTATUS[0]}"
|
|
17
18
|
else
|
|
19
|
+
echo "XP_G1_REASON: dart: Dart SDK not installed -- nothing was checked"
|
|
18
20
|
echo "Dart SDK not available"
|
|
19
|
-
return
|
|
21
|
+
return 3
|
|
20
22
|
fi
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
run_tests() {
|
|
24
26
|
if command -v dart &>/dev/null; then
|
|
25
27
|
dart test 2>&1 | tail -20
|
|
26
|
-
return
|
|
28
|
+
return "${PIPESTATUS[0]}"
|
|
27
29
|
else
|
|
30
|
+
echo "XP_G1_REASON: dart: Dart SDK not installed -- nothing was checked"
|
|
28
31
|
echo "Dart SDK not available"
|
|
29
|
-
return
|
|
32
|
+
return 3
|
|
30
33
|
fi
|
|
31
34
|
}
|
|
32
35
|
|
|
@@ -51,9 +54,10 @@ compiler_check_command() { printf "%s" "dart analyze"; }
|
|
|
51
54
|
run_coverage() {
|
|
52
55
|
if command -v dart &>/dev/null; then
|
|
53
56
|
dart test --coverage=coverage 2>&1 | tail -10
|
|
54
|
-
return
|
|
57
|
+
return "${PIPESTATUS[0]}"
|
|
55
58
|
else
|
|
59
|
+
echo "XP_G1_REASON: dart: Dart SDK not installed -- nothing was checked"
|
|
56
60
|
echo "Dart SDK not available"
|
|
57
|
-
return
|
|
61
|
+
return 3
|
|
58
62
|
fi
|
|
59
63
|
}
|
package/adapters/flutter.sh
CHANGED
|
@@ -3,40 +3,44 @@
|
|
|
3
3
|
run_static_analysis() {
|
|
4
4
|
if command -v flutter &>/dev/null; then
|
|
5
5
|
flutter analyze 2>&1 | sed -n '1,30p; 30q'
|
|
6
|
-
return
|
|
6
|
+
return "${PIPESTATUS[0]}"
|
|
7
7
|
else
|
|
8
|
+
echo "XP_G1_REASON: flutter: Flutter SDK not installed -- nothing was checked"
|
|
8
9
|
echo "Flutter SDK not available"
|
|
9
|
-
return
|
|
10
|
+
return 3
|
|
10
11
|
fi
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
run_lint() {
|
|
14
15
|
if command -v flutter &>/dev/null; then
|
|
15
16
|
flutter format --output=none --set-exit-if-changed . 2>&1 | sed -n '1,30p; 30q'
|
|
16
|
-
return
|
|
17
|
+
return "${PIPESTATUS[0]}"
|
|
17
18
|
else
|
|
19
|
+
echo "XP_G1_REASON: flutter: Flutter SDK not installed -- nothing was checked"
|
|
18
20
|
echo "Flutter SDK not available"
|
|
19
|
-
return
|
|
21
|
+
return 3
|
|
20
22
|
fi
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
run_tests() {
|
|
24
26
|
if command -v flutter &>/dev/null; then
|
|
25
27
|
flutter test 2>&1 | tail -20
|
|
26
|
-
return
|
|
28
|
+
return "${PIPESTATUS[0]}"
|
|
27
29
|
else
|
|
30
|
+
echo "XP_G1_REASON: flutter: Flutter SDK not installed -- nothing was checked"
|
|
28
31
|
echo "Flutter SDK not available"
|
|
29
|
-
return
|
|
32
|
+
return 3
|
|
30
33
|
fi
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
run_coverage() {
|
|
34
37
|
if command -v flutter &>/dev/null; then
|
|
35
38
|
flutter test --coverage 2>&1 | tail -10
|
|
36
|
-
return
|
|
39
|
+
return "${PIPESTATUS[0]}"
|
|
37
40
|
else
|
|
41
|
+
echo "XP_G1_REASON: flutter: Flutter SDK not installed -- nothing was checked"
|
|
38
42
|
echo "Flutter SDK not available"
|
|
39
|
-
return
|
|
43
|
+
return 3
|
|
40
44
|
fi
|
|
41
45
|
}
|
|
42
46
|
|
package/adapters/swift.sh
CHANGED
|
@@ -1,29 +1,68 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
|
|
3
|
+
# Swift adapter.
|
|
4
|
+
#
|
|
5
|
+
# VERDICT CONTRACT (#806 G1a): Gate 1 reads these exit codes as
|
|
6
|
+
# 0 = PASS / 1|2 = BLOCK (findings or fail-closed) / 3 = WARN, NOT verified
|
|
7
|
+
#
|
|
8
|
+
# "Tool not installed" is 3, never 1.
|
|
9
|
+
#
|
|
10
|
+
# Measured 2026-11-20, language matrix, swift fixture on a machine without
|
|
11
|
+
# SwiftLint:
|
|
12
|
+
#
|
|
13
|
+
# -> Gate 1: Code Quality
|
|
14
|
+
# -- Checking swift --
|
|
15
|
+
# Running static analysis for swift...
|
|
16
|
+
# SwiftLint not available
|
|
17
|
+
# Running lint check for swift...
|
|
18
|
+
# SwiftLint not available
|
|
19
|
+
# BLOCKED - swift code quality violations (fix or add suppressions)
|
|
20
|
+
# chain stopped at Gate 1 -- gates 2 3 8 10 7 5 6 4 never reached
|
|
21
|
+
#
|
|
22
|
+
# Both functions returned 1, and Gate 1 reads 1 as "the analyzer found problems".
|
|
23
|
+
# A machine without SwiftLint therefore blocked EVERY Swift commit with a message
|
|
24
|
+
# claiming code-quality violations that no tool had looked for -- and it stopped
|
|
25
|
+
# the chain, so eight later gates never ran either.
|
|
26
|
+
#
|
|
27
|
+
# This is the inverse of the usual defect in this series. The others reported a
|
|
28
|
+
# pass they had not earned; this one reports a failure it did not find. Both come
|
|
29
|
+
# from the same place: an exit code chosen for its value rather than for what the
|
|
30
|
+
# caller does with it.
|
|
31
|
+
#
|
|
32
|
+
# The reason is emitted as XP_G1_REASON, which Gate 1 lifts out of the output and
|
|
33
|
+
# stores as GATE_1_DETAIL -- without it the WARN would be as unreasoned as the
|
|
34
|
+
# BLOCK was.
|
|
35
|
+
|
|
3
36
|
run_static_analysis() {
|
|
4
37
|
if command -v swiftlint &>/dev/null; then
|
|
5
38
|
swiftlint lint 2>&1 | sed -n '1,30p; 30q'
|
|
6
|
-
return
|
|
7
|
-
else
|
|
8
|
-
echo "SwiftLint not available"
|
|
9
|
-
return 1
|
|
39
|
+
return "${PIPESTATUS[0]}"
|
|
10
40
|
fi
|
|
41
|
+
# 3 = "did not evaluate", not "found problems".
|
|
42
|
+
echo "XP_G1_REASON: swift: SwiftLint not installed -- nothing was linted"
|
|
43
|
+
echo "SwiftLint not available (install: brew install swiftlint)"
|
|
44
|
+
return 3
|
|
11
45
|
}
|
|
12
46
|
|
|
13
47
|
run_lint() {
|
|
14
48
|
if command -v swiftlint &>/dev/null; then
|
|
15
49
|
swiftlint lint --strict 2>&1 | sed -n '1,30p; 30q'
|
|
16
|
-
return
|
|
17
|
-
else
|
|
18
|
-
echo "SwiftLint not available"
|
|
19
|
-
return 1
|
|
50
|
+
return "${PIPESTATUS[0]}"
|
|
20
51
|
fi
|
|
52
|
+
echo "XP_G1_REASON: swift: SwiftLint not installed -- strict lint not run"
|
|
53
|
+
echo "SwiftLint not available (install: brew install swiftlint)"
|
|
54
|
+
return 3
|
|
21
55
|
}
|
|
22
56
|
|
|
57
|
+
# run_tests / run_coverage keep returning non-zero when there is genuinely nothing
|
|
58
|
+
# to run: Gate 5's contract distinguishes "tests failed" (block) from "no tests"
|
|
59
|
+
# through its own skip markers, and a non-zero here is the "could not run" signal
|
|
60
|
+
# it already understands. Only the two Gate 1 arms above needed changing, because
|
|
61
|
+
# only Gate 1 maps a bare 1 to "violations found".
|
|
23
62
|
run_tests() {
|
|
24
63
|
if command -v swift &>/dev/null && [ -f "Package.swift" ]; then
|
|
25
64
|
swift test 2>&1 | tail -20
|
|
26
|
-
return
|
|
65
|
+
return "${PIPESTATUS[0]}"
|
|
27
66
|
elif [ -f "*.xcodeproj" ] || [ -f "*.xcworkspace" ]; then
|
|
28
67
|
echo "Xcode project detected — use xcodebuild for tests"
|
|
29
68
|
return 1
|
|
@@ -42,7 +81,7 @@ coverage_runs_tests() { return 0; }
|
|
|
42
81
|
run_coverage() {
|
|
43
82
|
if command -v swift &>/dev/null && [ -f "Package.swift" ]; then
|
|
44
83
|
swift test --enable-code-coverage 2>&1 | tail -10
|
|
45
|
-
return
|
|
84
|
+
return "${PIPESTATUS[0]}"
|
|
46
85
|
else
|
|
47
86
|
echo "No Swift test framework detected"
|
|
48
87
|
return 1
|
package/hooks/gate-driver.sh
CHANGED
|
@@ -131,6 +131,25 @@ _xp_gate_run_chain() {
|
|
|
131
131
|
if [ -n "$_rest" ]; then
|
|
132
132
|
echo "⚠️ Chain stopped at Gate $key — these gates were NOT reached:$_rest"
|
|
133
133
|
fi
|
|
134
|
+
# Export the same fact for the REPORT, not just for the reader.
|
|
135
|
+
#
|
|
136
|
+
# The message above fixed the console; the JSON kept saying "SKIP" for every
|
|
137
|
+
# gate below the stop, because the report writer defaults each status with
|
|
138
|
+
# ${GATE_N_STATUS:-SKIP} and an unreached body never sets the variable. So
|
|
139
|
+
# `xp-gate audit`, the matrix analyser and anything else reading the report
|
|
140
|
+
# still saw "each later gate chose to skip" -- the exact distinction this
|
|
141
|
+
# message was added to draw.
|
|
142
|
+
#
|
|
143
|
+
# Measured 2026-11-20 on the iac fixture, Gate 1 blocked:
|
|
144
|
+
# console: "Chain stopped at Gate 1 -- NOT reached: 2 3 8 10 7 5 6 4"
|
|
145
|
+
# report : gate7_iac_security {"status":"SKIP","scanned_files":0}
|
|
146
|
+
# and the matrix analyser then reported "iac: planted defect not caught by
|
|
147
|
+
# G7" against a gate whose body had never been invoked.
|
|
148
|
+
#
|
|
149
|
+
# Must be exported, not merely set: the report writer runs from a later EXIT
|
|
150
|
+
# trap and reads it in that context.
|
|
151
|
+
XP_GATE_NOT_REACHED="$(printf '%s' "$_rest" | sed 's/^ *//')"
|
|
152
|
+
export XP_GATE_NOT_REACHED
|
|
134
153
|
exit "$rc"
|
|
135
154
|
fi
|
|
136
155
|
|
|
@@ -256,6 +256,182 @@ generate_quality_report() {
|
|
|
256
256
|
local GATE_TIMINGS_JSON
|
|
257
257
|
GATE_TIMINGS_JSON=$(gate_timings_json)
|
|
258
258
|
|
|
259
|
+
# --- gate_key_status: NOT_REACHED vs SKIP ------------------------------------
|
|
260
|
+
# A gate the chain never reached is NOT a gate that decided to skip.
|
|
261
|
+
#
|
|
262
|
+
# Every status below is written as ${GATE_N_STATUS:-SKIP}, and a body that never
|
|
263
|
+
# ran never sets the variable -- so "the chain stopped before this gate" and
|
|
264
|
+
# "this gate chose to skip" produced the identical report row. Gate-driver.sh
|
|
265
|
+
# had already fixed the CONSOLE half of this ("Chain stopped at Gate 1 -- these
|
|
266
|
+
# gates were NOT reached"); the JSON half was never done.
|
|
267
|
+
#
|
|
268
|
+
# Measured 2026-11-20, iac fixture, Gate 1 blocked:
|
|
269
|
+
# console: chain stopped, NOT reached: 2 3 8 10 7 5 6 4
|
|
270
|
+
# report : gate7_iac_security {"status":"SKIP","scanned_files":0}
|
|
271
|
+
# and the matrix analyser then flagged "the planted defect was not caught by
|
|
272
|
+
# G7" against a gate whose body had never been invoked. The wrong verdict was
|
|
273
|
+
# produced by the REPORT, not by the gate.
|
|
274
|
+
#
|
|
275
|
+
# gate_key_status KEY DEFAULT:
|
|
276
|
+
# - the variable is set -> report it verbatim (the gate ran and decided)
|
|
277
|
+
# - the key is in the NOT-REACHED list -> NOT_REACHED
|
|
278
|
+
# - otherwise -> the caller-supplied default
|
|
279
|
+
# A gate the chain never reached is NOT a gate that decided to skip.
|
|
280
|
+
#
|
|
281
|
+
# The console has drawn that distinction since the driver was fixed ("Chain
|
|
282
|
+
# stopped at Gate N -- these gates were NOT reached"), but the JSON did not:
|
|
283
|
+
# every status below was written as ${GATE_N_STATUS:-SKIP}, and a body that never
|
|
284
|
+
# ran never sets the variable. So the report said "SKIP" for gates whose bodies
|
|
285
|
+
# had never been invoked -- the exact confusion the console message exists to
|
|
286
|
+
# prevent, surviving in the machine-readable output.
|
|
287
|
+
#
|
|
288
|
+
# Measured 2026-11-20, iac fixture, Gate 1 blocked the chain:
|
|
289
|
+
# console: chain stopped, NOT reached: 2 3 8 10 7 5 6 4
|
|
290
|
+
# report : gate7_iac_security {"status":"SKIP","scanned_files":0}
|
|
291
|
+
# and the matrix analyser then reported "the planted defect was not caught by
|
|
292
|
+
# G7" -- a wrong verdict produced by the report, against a gate whose body had
|
|
293
|
+
# never run.
|
|
294
|
+
gate_key_status() {
|
|
295
|
+
case "$1" in
|
|
296
|
+
1)
|
|
297
|
+
if [ -n "${GATE_1_STATUS:-}" ]; then
|
|
298
|
+
printf %s "${GATE_1_STATUS}"
|
|
299
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 1 '; then
|
|
300
|
+
printf %s "NOT_REACHED"
|
|
301
|
+
else
|
|
302
|
+
printf %s "SKIP"
|
|
303
|
+
fi
|
|
304
|
+
;;
|
|
305
|
+
2)
|
|
306
|
+
if [ -n "${GATE_2_STATUS:-}" ]; then
|
|
307
|
+
printf %s "${GATE_2_STATUS}"
|
|
308
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 2 '; then
|
|
309
|
+
printf %s "NOT_REACHED"
|
|
310
|
+
else
|
|
311
|
+
printf %s "SKIP"
|
|
312
|
+
fi
|
|
313
|
+
;;
|
|
314
|
+
3)
|
|
315
|
+
if [ -n "${GATE_3_STATUS:-}" ]; then
|
|
316
|
+
printf %s "${GATE_3_STATUS}"
|
|
317
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 3 '; then
|
|
318
|
+
printf %s "NOT_REACHED"
|
|
319
|
+
else
|
|
320
|
+
printf %s "SKIP"
|
|
321
|
+
fi
|
|
322
|
+
;;
|
|
323
|
+
4)
|
|
324
|
+
if [ -n "${GATE_4_STATUS:-}" ]; then
|
|
325
|
+
printf %s "${GATE_4_STATUS}"
|
|
326
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 4 '; then
|
|
327
|
+
printf %s "NOT_REACHED"
|
|
328
|
+
else
|
|
329
|
+
printf %s "SKIP"
|
|
330
|
+
fi
|
|
331
|
+
;;
|
|
332
|
+
5)
|
|
333
|
+
if [ -n "${GATE_5_STATUS:-}" ]; then
|
|
334
|
+
printf %s "${GATE_5_STATUS}"
|
|
335
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 5 '; then
|
|
336
|
+
printf %s "NOT_REACHED"
|
|
337
|
+
else
|
|
338
|
+
printf %s "SKIP"
|
|
339
|
+
fi
|
|
340
|
+
;;
|
|
341
|
+
6)
|
|
342
|
+
if [ -n "${GATE_6_STATUS:-}" ]; then
|
|
343
|
+
printf %s "${GATE_6_STATUS}"
|
|
344
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 6 '; then
|
|
345
|
+
printf %s "NOT_REACHED"
|
|
346
|
+
else
|
|
347
|
+
printf %s "SKIP"
|
|
348
|
+
fi
|
|
349
|
+
;;
|
|
350
|
+
7)
|
|
351
|
+
if [ -n "${GATE_7_STATUS:-}" ]; then
|
|
352
|
+
printf %s "${GATE_7_STATUS}"
|
|
353
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 7 '; then
|
|
354
|
+
printf %s "NOT_REACHED"
|
|
355
|
+
else
|
|
356
|
+
printf %s "SKIP"
|
|
357
|
+
fi
|
|
358
|
+
;;
|
|
359
|
+
8)
|
|
360
|
+
if [ -n "${GATE_8_STATUS:-}" ]; then
|
|
361
|
+
printf %s "${GATE_8_STATUS}"
|
|
362
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 8 '; then
|
|
363
|
+
printf %s "NOT_REACHED"
|
|
364
|
+
else
|
|
365
|
+
printf %s "SKIP"
|
|
366
|
+
fi
|
|
367
|
+
;;
|
|
368
|
+
9)
|
|
369
|
+
if [ -n "${GATE_9_STATUS:-}" ]; then
|
|
370
|
+
printf %s "${GATE_9_STATUS}"
|
|
371
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 9 '; then
|
|
372
|
+
printf %s "NOT_REACHED"
|
|
373
|
+
else
|
|
374
|
+
printf %s "SKIP"
|
|
375
|
+
fi
|
|
376
|
+
;;
|
|
377
|
+
10)
|
|
378
|
+
if [ -n "${GATE_10_STATUS:-}" ]; then
|
|
379
|
+
printf %s "${GATE_10_STATUS}"
|
|
380
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 10 '; then
|
|
381
|
+
printf %s "NOT_REACHED"
|
|
382
|
+
else
|
|
383
|
+
printf %s "SKIP"
|
|
384
|
+
fi
|
|
385
|
+
;;
|
|
386
|
+
11)
|
|
387
|
+
if [ -n "${GATE_11_STATUS:-}" ]; then
|
|
388
|
+
printf %s "${GATE_11_STATUS}"
|
|
389
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 11 '; then
|
|
390
|
+
printf %s "NOT_REACHED"
|
|
391
|
+
else
|
|
392
|
+
printf %s "SKIP"
|
|
393
|
+
fi
|
|
394
|
+
;;
|
|
395
|
+
12)
|
|
396
|
+
if [ -n "${GATE_12_STATUS:-}" ]; then
|
|
397
|
+
printf %s "${GATE_12_STATUS}"
|
|
398
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 12 '; then
|
|
399
|
+
printf %s "NOT_REACHED"
|
|
400
|
+
else
|
|
401
|
+
printf %s "SKIP"
|
|
402
|
+
fi
|
|
403
|
+
;;
|
|
404
|
+
12b)
|
|
405
|
+
if [ -n "${GATE_12b_STATUS:-}" ]; then
|
|
406
|
+
printf %s "${GATE_12b_STATUS}"
|
|
407
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 12b '; then
|
|
408
|
+
printf %s "NOT_REACHED"
|
|
409
|
+
else
|
|
410
|
+
printf %s "SKIP"
|
|
411
|
+
fi
|
|
412
|
+
;;
|
|
413
|
+
12c)
|
|
414
|
+
if [ -n "${GATE_12c_STATUS:-}" ]; then
|
|
415
|
+
printf %s "${GATE_12c_STATUS}"
|
|
416
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 12c '; then
|
|
417
|
+
printf %s "NOT_REACHED"
|
|
418
|
+
else
|
|
419
|
+
printf %s "SKIP"
|
|
420
|
+
fi
|
|
421
|
+
;;
|
|
422
|
+
13)
|
|
423
|
+
if [ -n "${GATE_13_STATUS:-}" ]; then
|
|
424
|
+
printf %s "${GATE_13_STATUS}"
|
|
425
|
+
elif printf ' %s ' "${XP_GATE_NOT_REACHED:-}" | grep -q ' 13 '; then
|
|
426
|
+
printf %s "NOT_REACHED"
|
|
427
|
+
else
|
|
428
|
+
printf %s "SKIP"
|
|
429
|
+
fi
|
|
430
|
+
;;
|
|
431
|
+
*) printf %s "SKIP" ;;
|
|
432
|
+
esac
|
|
433
|
+
}
|
|
434
|
+
|
|
259
435
|
cat > "$REPORT_FILE" << ENDJSON
|
|
260
436
|
{
|
|
261
437
|
"reportVersion": "2.0",
|
|
@@ -286,17 +462,17 @@ generate_quality_report() {
|
|
|
286
462
|
"gates": {
|
|
287
463
|
"gate1_static_analysis": {
|
|
288
464
|
"name": "Code Quality (Static + Lint + Shell)",
|
|
289
|
-
"status": "$
|
|
465
|
+
"status": "$(gate_key_status 1)",
|
|
290
466
|
"tool": "${GATE_1_TOOL:-auto}"
|
|
291
467
|
},
|
|
292
468
|
"gate2_dup_code": {
|
|
293
469
|
"name": "Duplicate Code",
|
|
294
|
-
"status": "$
|
|
470
|
+
"status": "$(gate_key_status 2)",
|
|
295
471
|
"metric": "similarity <= 5%"
|
|
296
472
|
},
|
|
297
473
|
"gate3_complexity": {
|
|
298
474
|
"name": "Cyclomatic Complexity",
|
|
299
|
-
"status": "$
|
|
475
|
+
"status": "$(gate_key_status 3)",
|
|
300
476
|
"reason": "${GATE_3_REASON:-}",
|
|
301
477
|
"threshold": "${CCN_THRESHOLD:-5}",
|
|
302
478
|
"blockThreshold": "${CCN_THRESHOLD:-5}",
|
|
@@ -304,13 +480,13 @@ generate_quality_report() {
|
|
|
304
480
|
},
|
|
305
481
|
"gate4_principles": {
|
|
306
482
|
"name": "Clean Code + SOLID",
|
|
307
|
-
"status": "$
|
|
483
|
+
"status": "$(gate_key_status 4)",
|
|
308
484
|
"reason": "${GATE_4_REASON:-}",
|
|
309
485
|
"warnings": ${WARNING_COUNT:-0}
|
|
310
486
|
},
|
|
311
487
|
"gate5_tests": {
|
|
312
488
|
"name": "Tests + Coverage",
|
|
313
|
-
"status": "$
|
|
489
|
+
"status": "$(gate_key_status 5)",
|
|
314
490
|
"reason": "${GATE_5_DETAIL:-}",
|
|
315
491
|
"thresholds": { "lines": ${COVERAGE_THRESHOLD}, "functions": null, "branches": null, "statements": null },
|
|
316
492
|
"threshold_source": "${COVERAGE_THRESHOLD_SOURCE}",
|
|
@@ -319,30 +495,30 @@ generate_quality_report() {
|
|
|
319
495
|
},
|
|
320
496
|
"gate6_arch_boyscout": {
|
|
321
497
|
"name": "Architecture + Boy Scout Rule",
|
|
322
|
-
"status": "$
|
|
498
|
+
"status": "$(gate_key_status 6)",
|
|
323
499
|
"reason": "${GATE_6_REASON:-}",
|
|
324
500
|
"boyScoutPassed": $BS_PASSED,
|
|
325
501
|
"boyScoutBlocked": $BS_BLOCKED
|
|
326
502
|
},
|
|
327
503
|
"gate7_iac_security": {
|
|
328
504
|
"name": "IaC Security Scanning",
|
|
329
|
-
"status": "$
|
|
505
|
+
"status": "$(gate_key_status 7)",
|
|
330
506
|
"scanned_files": ${GATE_7_SCANNED_FILES:-0},
|
|
331
507
|
"tools": "checkov, hadolint, kube-score, tflint"
|
|
332
508
|
},
|
|
333
509
|
"gate8_secret_scanning": {
|
|
334
510
|
"name": "Secret Scanning",
|
|
335
|
-
"status": "$
|
|
511
|
+
"status": "$(gate_key_status 8)",
|
|
336
512
|
"tool": "gitleaks"
|
|
337
513
|
},
|
|
338
514
|
"gate9_build_integrity": {
|
|
339
515
|
"name": "Build Integrity",
|
|
340
|
-
"status": "$
|
|
516
|
+
"status": "$(gate_key_status 9)",
|
|
341
517
|
"tool": "tsc + npm pack + import check"
|
|
342
518
|
},
|
|
343
519
|
"gate10_sast": {
|
|
344
520
|
"name": "SAST Security Scan",
|
|
345
|
-
"status": "$
|
|
521
|
+
"status": "$(gate_key_status 10)",
|
|
346
522
|
"reason": "${GATE_10_REASON:-}",
|
|
347
523
|
"scanned_files": ${GATE_10_SCANNED_FILES:-0},
|
|
348
524
|
"path": "${GATE_10_SEMGREP_PATH:-direct}",
|
|
@@ -351,7 +527,7 @@ generate_quality_report() {
|
|
|
351
527
|
},
|
|
352
528
|
"gate11_sprint_flow": {
|
|
353
529
|
"name": "Sprint Flow Enforcement",
|
|
354
|
-
"status": "$
|
|
530
|
+
"status": "$(gate_key_status 11)",
|
|
355
531
|
"tool": "sprint-gate.sh"
|
|
356
532
|
},
|
|
357
533
|
"gate12_file_hygiene": {
|
|
@@ -40,7 +40,7 @@ if ! gate_enabled 7; then
|
|
|
40
40
|
echo "⏭️ SKIPPED - Gate 7: IaC security (not selected by XP_GATE_ONLY_GATE)"
|
|
41
41
|
GATE_7_STATUS="SKIP"
|
|
42
42
|
GATE_7_DETAIL="not_selected"
|
|
43
|
-
record_gate_audit "gate-7" "iac-security" "$GATE_7_STATUS" "0" "$GATE_7_START"
|
|
43
|
+
record_gate_audit "gate-7" "iac-security" "$GATE_7_STATUS" "0" "$GATE_7_START" "$GATE_7_DETAIL"
|
|
44
44
|
return 0
|
|
45
45
|
fi
|
|
46
46
|
|
|
@@ -50,7 +50,7 @@ else
|
|
|
50
50
|
echo "⏭️ SKIPPED - No IaC files changed, skipping Gate 7."
|
|
51
51
|
GATE_7_STATUS="SKIP"
|
|
52
52
|
GATE_7_REASON="no_iac_files_changed"
|
|
53
|
-
record_gate_audit "gate-7" "iac-security" "$GATE_7_STATUS" "0" "$GATE_7_START"
|
|
53
|
+
record_gate_audit "gate-7" "iac-security" "$GATE_7_STATUS" "0" "$GATE_7_START" "$GATE_7_REASON"
|
|
54
54
|
fi
|
|
55
55
|
return 0
|
|
56
56
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-gate",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.54",
|
|
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.54.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.54.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.54.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.54",
|
|
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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|