@boyingliu01/xp-gate 0.41.70 → 0.41.72

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/gate-6-layers.sh CHANGED
@@ -43,6 +43,11 @@ set -uo pipefail
43
43
  LAYER_CONFIG="${XP_GATE_LAYER_CONFIG:-architecture.yaml}"
44
44
  LAYER_BASELINE="${XP_GATE_LAYER_BASELINE:-.layer-baseline.json}"
45
45
  LAYER_SCAN_ROOT="${XP_GATE_LAYER_SCAN_ROOT:-.}"
46
+ # stderr goes to a FILE, not to /dev/null: an awk syntax or runtime error yields
47
+ # "no findings", and in this script no findings means "everything is compliant".
48
+ # Swallowing it turned a broken scanner into a clean run.
49
+ LAYER_SCAN_ERR="${TMPDIR:-/tmp}/xp-layer-scan-err.$$"
50
+ trap 'rm -f "$LAYER_SCAN_ERR"' EXIT
46
51
 
47
52
  # ─── Output helpers ─────────────────────────────────────────────────────────
48
53
  _layers_say() { echo " $*"; }
@@ -172,7 +177,9 @@ LAYER_TSV=$(awk '
172
177
  if (indent == layerindent && body ~ /^- /) {
173
178
  if (body ~ /^-[ \t]*name:[ \t]*/) {
174
179
  flush()
175
- name = unq(substr(body, index(body, ":") + 1))
180
+ # A trailing comment must be stripped too: layer names here often carry
181
+ # `# explanation`, and keeping it makes the name match no path at all.
182
+ name = unq(substr(body, index(body, ":") + 1)); sub(/[ ]+#.*$/, "", name)
176
183
  listkey = ""
177
184
  }
178
185
  # A bare `-` opens a record whose `name:` comes on the next, deeper line; the
@@ -187,7 +194,10 @@ LAYER_TSV=$(awk '
187
194
  # naturally. Accepting only one of the two made a correct config parse to an
188
195
  # empty pattern list, which then matched no file and reported "0 violations"
189
196
  # — the silent-pass shape this gate exists to remove.
190
- else if (body ~ /^patterns?:/) { pattern = list_value("pattern", substr(body, index(body, ":") + 1)) }
197
+ # Both spellings: `patterns:` is what this repository writes, `paths:` is the
198
+ # synonym some projects use. Accepting only one silently classifies every file
199
+ # as "matches no layer", which reads as "nothing to check".
200
+ else if (body ~ /^(patterns?|paths?):/) { pattern = list_value("pattern", substr(body, index(body, ":") + 1)) }
191
201
  else if (body ~ /^allowedImports:/ || body ~ /^allowed_imports:/) { allowed = list_value("allowed", substr(body, index(body, ":") + 1)) }
192
202
  else if (body ~ /^forbiddenImports:/ || body ~ /^forbidden_imports:/) { forbidden = list_value("forbidden", substr(body, index(body, ":") + 1)) }
193
203
  else if (listkey != "" && body ~ /^- /) { append_item(listkey, body) }
@@ -234,12 +244,12 @@ LAYER_COUNT=$(printf '%s\n' "$LAYER_TSV" | grep -c . || true)
234
244
  # Fallback to find for non-git fixtures (the BATS suite uses bare temp dirs).
235
245
  if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
236
246
  FILE_LIST=$(git ls-files --cached --others --exclude-standard -- \
237
- '*.ts' '*.tsx' '*.js' '*.jsx' '*.mjs' '*.cjs' 2>/dev/null \
247
+ '*.ts' '*.tsx' '*.js' '*.jsx' '*.mjs' '*.cjs' '*.java' 2>/dev/null \
238
248
  | grep -v '^\.layer-fixture' || true)
239
249
  else
240
250
  FILE_LIST=$(find "$LAYER_SCAN_ROOT" -type f \
241
251
  \( -name '*.ts' -o -name '*.tsx' -o -name '*.js' -o -name '*.jsx' \
242
- -o -name '*.mjs' -o -name '*.cjs' \) \
252
+ -o -name '*.mjs' -o -name '*.cjs' -o -name '*.java' \) \
243
253
  -not -path '*/node_modules/*' -not -path '*/.git/*' \
244
254
  -not -path '*/dist/*' -not -path '*/coverage/*' \
245
255
  -not -path '*/.stryker-tmp/*' -not -path '*/.layer-fixture*' 2>/dev/null | sed 's|^\./||')
@@ -490,8 +500,14 @@ FINDINGS=$(XP_LAYER_TSV="$LAYER_TSV_FILE" XP_LAYER_STATS="$LAYER_STATS_FILE" awk
490
500
  close(ENVIRON["XP_LAYER_STATS"])
491
501
  }
492
502
  }
493
- ' $FILE_LIST 2>/dev/null)
503
+ ' $FILE_LIST 2>"$LAYER_SCAN_ERR")
494
504
  rm -f "$LAYER_TSV_FILE"
505
+ # A scanner that wrote to stderr may have produced partial findings, and partial
506
+ # findings here read as "compliant". Say so rather than letting the silence stand.
507
+ if [ -s "$LAYER_SCAN_ERR" ]; then
508
+ _layers_say " ⚠️ the scanner wrote to stderr — findings may be incomplete:"
509
+ sed 's/^/ /' "$LAYER_SCAN_ERR" | head -3
510
+ fi
495
511
 
496
512
  if [ -s "$LAYER_STATS_FILE" ]; then
497
513
  read -r LAYER_CLASSIFIED_FILES LAYER_CLASSIFIED < "$LAYER_STATS_FILE" || true
@@ -43,6 +43,11 @@ set -uo pipefail
43
43
  LAYER_CONFIG="${XP_GATE_LAYER_CONFIG:-architecture.yaml}"
44
44
  LAYER_BASELINE="${XP_GATE_LAYER_BASELINE:-.layer-baseline.json}"
45
45
  LAYER_SCAN_ROOT="${XP_GATE_LAYER_SCAN_ROOT:-.}"
46
+ # stderr goes to a FILE, not to /dev/null: an awk syntax or runtime error yields
47
+ # "no findings", and in this script no findings means "everything is compliant".
48
+ # Swallowing it turned a broken scanner into a clean run.
49
+ LAYER_SCAN_ERR="${TMPDIR:-/tmp}/xp-layer-scan-err.$$"
50
+ trap 'rm -f "$LAYER_SCAN_ERR"' EXIT
46
51
 
47
52
  # ─── Output helpers ─────────────────────────────────────────────────────────
48
53
  _layers_say() { echo " $*"; }
@@ -172,7 +177,9 @@ LAYER_TSV=$(awk '
172
177
  if (indent == layerindent && body ~ /^- /) {
173
178
  if (body ~ /^-[ \t]*name:[ \t]*/) {
174
179
  flush()
175
- name = unq(substr(body, index(body, ":") + 1))
180
+ # A trailing comment must be stripped too: layer names here often carry
181
+ # `# explanation`, and keeping it makes the name match no path at all.
182
+ name = unq(substr(body, index(body, ":") + 1)); sub(/[ ]+#.*$/, "", name)
176
183
  listkey = ""
177
184
  }
178
185
  # A bare `-` opens a record whose `name:` comes on the next, deeper line; the
@@ -187,7 +194,10 @@ LAYER_TSV=$(awk '
187
194
  # naturally. Accepting only one of the two made a correct config parse to an
188
195
  # empty pattern list, which then matched no file and reported "0 violations"
189
196
  # — the silent-pass shape this gate exists to remove.
190
- else if (body ~ /^patterns?:/) { pattern = list_value("pattern", substr(body, index(body, ":") + 1)) }
197
+ # Both spellings: `patterns:` is what this repository writes, `paths:` is the
198
+ # synonym some projects use. Accepting only one silently classifies every file
199
+ # as "matches no layer", which reads as "nothing to check".
200
+ else if (body ~ /^(patterns?|paths?):/) { pattern = list_value("pattern", substr(body, index(body, ":") + 1)) }
191
201
  else if (body ~ /^allowedImports:/ || body ~ /^allowed_imports:/) { allowed = list_value("allowed", substr(body, index(body, ":") + 1)) }
192
202
  else if (body ~ /^forbiddenImports:/ || body ~ /^forbidden_imports:/) { forbidden = list_value("forbidden", substr(body, index(body, ":") + 1)) }
193
203
  else if (listkey != "" && body ~ /^- /) { append_item(listkey, body) }
@@ -234,12 +244,12 @@ LAYER_COUNT=$(printf '%s\n' "$LAYER_TSV" | grep -c . || true)
234
244
  # Fallback to find for non-git fixtures (the BATS suite uses bare temp dirs).
235
245
  if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
236
246
  FILE_LIST=$(git ls-files --cached --others --exclude-standard -- \
237
- '*.ts' '*.tsx' '*.js' '*.jsx' '*.mjs' '*.cjs' 2>/dev/null \
247
+ '*.ts' '*.tsx' '*.js' '*.jsx' '*.mjs' '*.cjs' '*.java' 2>/dev/null \
238
248
  | grep -v '^\.layer-fixture' || true)
239
249
  else
240
250
  FILE_LIST=$(find "$LAYER_SCAN_ROOT" -type f \
241
251
  \( -name '*.ts' -o -name '*.tsx' -o -name '*.js' -o -name '*.jsx' \
242
- -o -name '*.mjs' -o -name '*.cjs' \) \
252
+ -o -name '*.mjs' -o -name '*.cjs' -o -name '*.java' \) \
243
253
  -not -path '*/node_modules/*' -not -path '*/.git/*' \
244
254
  -not -path '*/dist/*' -not -path '*/coverage/*' \
245
255
  -not -path '*/.stryker-tmp/*' -not -path '*/.layer-fixture*' 2>/dev/null | sed 's|^\./||')
@@ -490,8 +500,14 @@ FINDINGS=$(XP_LAYER_TSV="$LAYER_TSV_FILE" XP_LAYER_STATS="$LAYER_STATS_FILE" awk
490
500
  close(ENVIRON["XP_LAYER_STATS"])
491
501
  }
492
502
  }
493
- ' $FILE_LIST 2>/dev/null)
503
+ ' $FILE_LIST 2>"$LAYER_SCAN_ERR")
494
504
  rm -f "$LAYER_TSV_FILE"
505
+ # A scanner that wrote to stderr may have produced partial findings, and partial
506
+ # findings here read as "compliant". Say so rather than letting the silence stand.
507
+ if [ -s "$LAYER_SCAN_ERR" ]; then
508
+ _layers_say " ⚠️ the scanner wrote to stderr — findings may be incomplete:"
509
+ sed 's/^/ /' "$LAYER_SCAN_ERR" | head -3
510
+ fi
495
511
 
496
512
  if [ -s "$LAYER_STATS_FILE" ]; then
497
513
  read -r LAYER_CLASSIFIED_FILES LAYER_CLASSIFIED < "$LAYER_STATS_FILE" || true
@@ -2,6 +2,6 @@
2
2
  "verdict": "PASS",
3
3
  "license_type": "MIT",
4
4
  "sha256": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5",
5
- "checked_at": "2026-12-03T10:05:12.368Z",
5
+ "checked_at": "2026-12-03T11:37:37.279Z",
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.41.70",
3
+ "version": "0.41.72",
4
4
  "description": "Deterministic quality gates for AI-generated code: 15 gates, Delphi review, sprint flow. Works with Claude Code, OpenCode, Qoder.",
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.41.70",
3
+ "version": "0.41.72",
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.41.70.0
6
+ **Version:** 0.41.72.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.41.70.0
6
+ **Version:** 0.41.72.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.41.70.0
6
+ **Version:** 0.41.72.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.41.70",
3
+ "version": "0.41.72",
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.41.70.0
6
+ **Version:** 0.41.72.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.41.70.0
6
+ **Version:** 0.41.72.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.41.70.0
6
+ **Version:** 0.41.72.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.41.70",
3
+ "version": "0.41.72",
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.41.70.0
6
+ **Version:** 0.41.72.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.41.70.0
6
+ **Version:** 0.41.72.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.41.70.0
6
+ **Version:** 0.41.72.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.41.70",
3
+ "version": "0.41.72",
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.41.70.0
6
+ **Version:** 0.41.72.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.41.70.0
6
+ **Version:** 0.41.72.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.41.70.0
6
+ **Version:** 0.41.72.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.41.70.0
6
+ **Version:** 0.41.72.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.41.70.0
6
+ **Version:** 0.41.72.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.41.70.0
6
+ **Version:** 0.41.72.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.