@boyingliu01/xp-gate 0.38.4 → 0.38.6
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-10.sh +478 -0
- package/adapters/gate-12-file-hygiene.sh +315 -0
- package/adapters/gate-13-compiler-strictness.sh +1443 -0
- package/adapters/gate-6-layers.sh +375 -0
- package/adapters/gate-8.sh +13 -1
- package/adapters/iac.sh +60 -27
- package/adapters/shell.sh +50 -2
- package/build-integrity/gate-10.ts +63 -4
- package/gate-12-file-hygiene.sh +15 -7
- package/gate-8.sh +13 -1
- package/hooks/gate-12-file-hygiene.sh +15 -7
- package/hooks/gate-8.sh +13 -1
- package/hooks/gate-entries/gate-1-entry.sh +44 -3
- package/hooks/gate-entries/gate-10-entry.sh +7 -0
- package/hooks/gate-entries/gate-11-entry.sh +7 -0
- package/hooks/gate-entries/gate-12-entry.sh +7 -0
- package/hooks/gate-entries/gate-12b-entry.sh +7 -0
- package/hooks/gate-entries/gate-12c-entry.sh +7 -0
- package/hooks/gate-entries/gate-13-entry.sh +7 -0
- package/hooks/gate-entries/gate-5-entry.sh +56 -2
- package/hooks/gate-entries/gate-6-entry.sh +93 -2
- package/hooks/gate-entries/gate-7-entry.sh +7 -0
- package/hooks/gate-entries/gate-8-entry.sh +7 -0
- package/hooks/gate-entries/gate-9-entry.sh +7 -0
- package/hooks/post-commit +9 -0
- package/hooks/pre-push +11 -2
- package/lib/mattpocock-license-verdict.json +1 -1
- package/mock-policy/AGENTS.md +1 -1
- package/mutation/AGENTS.md +1 -1
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/bin/xp-gate-version-check.sh +6 -0
- 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/sprint-flow/__tests__/verify-sprint-state.test.bats +23 -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/sprint-flow/__tests__/verify-sprint-state.test.bats +23 -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/sprint-flow/__tests__/verify-sprint-state.test.bats +23 -1
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +1 -1
- package/plugins/qoder/plugin.json +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/sprint-flow/__tests__/verify-sprint-state.test.bats +23 -1
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +1 -1
- package/principles/AGENTS.md +1 -1
- package/scripts/generate-mirrors.cjs +85 -28
- package/scripts/sync-package-content.js +5 -0
- 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/build-integrity/__tests__/ccn-refactor-gate10.test.ts +0 -133
- package/build-integrity/__tests__/gate-10.test.ts +0 -340
- package/build-integrity/__tests__/import-resolver.test.ts +0 -747
- package/build-integrity/__tests__/orchestrator.test.ts +0 -302
- package/build-integrity/__tests__/quote-masker.test.ts +0 -177
- package/skills/sprint-flow/__tests__/sprint-flow.test.cjs +0 -457
- package/skills/sprint-flow/__tests__/verify-sprint-state.test.bats +0 -48
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-gate",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.6",
|
|
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": {
|
|
@@ -19,6 +19,12 @@ flock -n 200 2>/dev/null || exit 0 # another instance is already checking
|
|
|
19
19
|
|
|
20
20
|
# ── Check cache validity ──
|
|
21
21
|
if [[ -f "$CACHE_FILE" ]]; then
|
|
22
|
+
# CACHED_VERSION is read but not consulted: only the timestamp drives the TTL.
|
|
23
|
+
# It must stay in this `read`, because the cache file is written as
|
|
24
|
+
# `<remote-version> <epoch>` below and the FIRST field is the version. Dropping
|
|
25
|
+
# it would bind the version string to CACHED_TS, making the arithmetic below
|
|
26
|
+
# compare against a number that is not a timestamp.
|
|
27
|
+
# shellcheck disable=SC2034 # positional read: field 1 is the cache format
|
|
22
28
|
read -r CACHED_VERSION CACHED_TS < "$CACHE_FILE" 2>/dev/null || true
|
|
23
29
|
NOW=$(date +%s 2>/dev/null || echo 0)
|
|
24
30
|
if [[ -n "$CACHED_TS" && -n "$NOW" ]]; then
|
|
@@ -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.6.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.6.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, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -10,7 +10,23 @@
|
|
|
10
10
|
# 错就一起绿。只有让生产方真的产出、校验方真的读,才能发现这类偏差。
|
|
11
11
|
|
|
12
12
|
setup() {
|
|
13
|
-
|
|
13
|
+
# #814: this used to be a hard-coded `../../..`, which resolves to the repo
|
|
14
|
+
# root only for THIS copy (skills/sprint-flow/__tests__). The same file also
|
|
15
|
+
# ships under plugins/<p>/skills/ and src/npm-package/**/skills/, three and four
|
|
16
|
+
# levels deep, where the fixed depth points at plugins/claude-code or
|
|
17
|
+
# src/npm-package -- so 6 of the 7 copies failed under Gate 5 and, once this
|
|
18
|
+
# repo's own hooks are installed, made every commit impossible.
|
|
19
|
+
#
|
|
20
|
+
# Walk up until the markers of the repo are both present instead of counting
|
|
21
|
+
# `..`. Depth-counting is what broke: it encodes "where this file lives" into a
|
|
22
|
+
# constant, and every new mirror location re-breaks it.
|
|
23
|
+
REPO_ROOT="$(cd "$BATS_TEST_DIRNAME" && pwd)"
|
|
24
|
+
while [ "$REPO_ROOT" != "/" ] && [ -n "$REPO_ROOT" ]; do
|
|
25
|
+
if [ -f "$REPO_ROOT/VERSION" ] && [ -f "$REPO_ROOT/src/npm-package/bin/xp-gate.js" ]; then
|
|
26
|
+
break
|
|
27
|
+
fi
|
|
28
|
+
REPO_ROOT="$(dirname "$REPO_ROOT")"
|
|
29
|
+
done
|
|
14
30
|
VERIFY="$REPO_ROOT/skills/sprint-flow/scripts/verify-sprint-state.sh"
|
|
15
31
|
CLI="$REPO_ROOT/src/npm-package/bin/xp-gate.js"
|
|
16
32
|
WORK="$(mktemp -d)"
|
|
@@ -23,6 +39,12 @@ teardown() {
|
|
|
23
39
|
@test "AC-688-01: accepts state written by xp-gate sprint-init" {
|
|
24
40
|
cd "$WORK"
|
|
25
41
|
git init -q .
|
|
42
|
+
# The developer machine sets a GLOBAL core.hooksPath at the installed hooks, so
|
|
43
|
+
# a bare `git commit` in the fixture would run the whole gate suite instead of
|
|
44
|
+
# creating the fixture commit. Pin it to an empty dir: this suite tests the
|
|
45
|
+
# verify script, not the hook chain.
|
|
46
|
+
mkdir -p "$WORK/empty-hooks"
|
|
47
|
+
git config core.hooksPath "$WORK/empty-hooks"
|
|
26
48
|
echo '{}' > package.json
|
|
27
49
|
git add -A
|
|
28
50
|
git -c user.email=t@t -c user.name=t commit -q -m init
|
|
@@ -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.6.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.5",
|
|
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.6.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.6.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, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -10,7 +10,23 @@
|
|
|
10
10
|
# 错就一起绿。只有让生产方真的产出、校验方真的读,才能发现这类偏差。
|
|
11
11
|
|
|
12
12
|
setup() {
|
|
13
|
-
|
|
13
|
+
# #814: this used to be a hard-coded `../../..`, which resolves to the repo
|
|
14
|
+
# root only for THIS copy (skills/sprint-flow/__tests__). The same file also
|
|
15
|
+
# ships under plugins/<p>/skills/ and src/npm-package/**/skills/, three and four
|
|
16
|
+
# levels deep, where the fixed depth points at plugins/claude-code or
|
|
17
|
+
# src/npm-package -- so 6 of the 7 copies failed under Gate 5 and, once this
|
|
18
|
+
# repo's own hooks are installed, made every commit impossible.
|
|
19
|
+
#
|
|
20
|
+
# Walk up until the markers of the repo are both present instead of counting
|
|
21
|
+
# `..`. Depth-counting is what broke: it encodes "where this file lives" into a
|
|
22
|
+
# constant, and every new mirror location re-breaks it.
|
|
23
|
+
REPO_ROOT="$(cd "$BATS_TEST_DIRNAME" && pwd)"
|
|
24
|
+
while [ "$REPO_ROOT" != "/" ] && [ -n "$REPO_ROOT" ]; do
|
|
25
|
+
if [ -f "$REPO_ROOT/VERSION" ] && [ -f "$REPO_ROOT/src/npm-package/bin/xp-gate.js" ]; then
|
|
26
|
+
break
|
|
27
|
+
fi
|
|
28
|
+
REPO_ROOT="$(dirname "$REPO_ROOT")"
|
|
29
|
+
done
|
|
14
30
|
VERIFY="$REPO_ROOT/skills/sprint-flow/scripts/verify-sprint-state.sh"
|
|
15
31
|
CLI="$REPO_ROOT/src/npm-package/bin/xp-gate.js"
|
|
16
32
|
WORK="$(mktemp -d)"
|
|
@@ -23,6 +39,12 @@ teardown() {
|
|
|
23
39
|
@test "AC-688-01: accepts state written by xp-gate sprint-init" {
|
|
24
40
|
cd "$WORK"
|
|
25
41
|
git init -q .
|
|
42
|
+
# The developer machine sets a GLOBAL core.hooksPath at the installed hooks, so
|
|
43
|
+
# a bare `git commit` in the fixture would run the whole gate suite instead of
|
|
44
|
+
# creating the fixture commit. Pin it to an empty dir: this suite tests the
|
|
45
|
+
# verify script, not the hook chain.
|
|
46
|
+
mkdir -p "$WORK/empty-hooks"
|
|
47
|
+
git config core.hooksPath "$WORK/empty-hooks"
|
|
26
48
|
echo '{}' > package.json
|
|
27
49
|
git add -A
|
|
28
50
|
git -c user.email=t@t -c user.name=t commit -q -m init
|
|
@@ -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.6.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.6.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.6.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, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -10,7 +10,23 @@
|
|
|
10
10
|
# 错就一起绿。只有让生产方真的产出、校验方真的读,才能发现这类偏差。
|
|
11
11
|
|
|
12
12
|
setup() {
|
|
13
|
-
|
|
13
|
+
# #814: this used to be a hard-coded `../../..`, which resolves to the repo
|
|
14
|
+
# root only for THIS copy (skills/sprint-flow/__tests__). The same file also
|
|
15
|
+
# ships under plugins/<p>/skills/ and src/npm-package/**/skills/, three and four
|
|
16
|
+
# levels deep, where the fixed depth points at plugins/claude-code or
|
|
17
|
+
# src/npm-package -- so 6 of the 7 copies failed under Gate 5 and, once this
|
|
18
|
+
# repo's own hooks are installed, made every commit impossible.
|
|
19
|
+
#
|
|
20
|
+
# Walk up until the markers of the repo are both present instead of counting
|
|
21
|
+
# `..`. Depth-counting is what broke: it encodes "where this file lives" into a
|
|
22
|
+
# constant, and every new mirror location re-breaks it.
|
|
23
|
+
REPO_ROOT="$(cd "$BATS_TEST_DIRNAME" && pwd)"
|
|
24
|
+
while [ "$REPO_ROOT" != "/" ] && [ -n "$REPO_ROOT" ]; do
|
|
25
|
+
if [ -f "$REPO_ROOT/VERSION" ] && [ -f "$REPO_ROOT/src/npm-package/bin/xp-gate.js" ]; then
|
|
26
|
+
break
|
|
27
|
+
fi
|
|
28
|
+
REPO_ROOT="$(dirname "$REPO_ROOT")"
|
|
29
|
+
done
|
|
14
30
|
VERIFY="$REPO_ROOT/skills/sprint-flow/scripts/verify-sprint-state.sh"
|
|
15
31
|
CLI="$REPO_ROOT/src/npm-package/bin/xp-gate.js"
|
|
16
32
|
WORK="$(mktemp -d)"
|
|
@@ -23,6 +39,12 @@ teardown() {
|
|
|
23
39
|
@test "AC-688-01: accepts state written by xp-gate sprint-init" {
|
|
24
40
|
cd "$WORK"
|
|
25
41
|
git init -q .
|
|
42
|
+
# The developer machine sets a GLOBAL core.hooksPath at the installed hooks, so
|
|
43
|
+
# a bare `git commit` in the fixture would run the whole gate suite instead of
|
|
44
|
+
# creating the fixture commit. Pin it to an empty dir: this suite tests the
|
|
45
|
+
# verify script, not the hook chain.
|
|
46
|
+
mkdir -p "$WORK/empty-hooks"
|
|
47
|
+
git config core.hooksPath "$WORK/empty-hooks"
|
|
26
48
|
echo '{}' > package.json
|
|
27
49
|
git add -A
|
|
28
50
|
git -c user.email=t@t -c user.name=t commit -q -m init
|
|
@@ -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.6.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.
|
|
3
|
+
"version": "0.38.5",
|
|
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.
|
|
6
|
+
**Version:** 0.38.6.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.6.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, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -10,7 +10,23 @@
|
|
|
10
10
|
# 错就一起绿。只有让生产方真的产出、校验方真的读,才能发现这类偏差。
|
|
11
11
|
|
|
12
12
|
setup() {
|
|
13
|
-
|
|
13
|
+
# #814: this used to be a hard-coded `../../..`, which resolves to the repo
|
|
14
|
+
# root only for THIS copy (skills/sprint-flow/__tests__). The same file also
|
|
15
|
+
# ships under plugins/<p>/skills/ and src/npm-package/**/skills/, three and four
|
|
16
|
+
# levels deep, where the fixed depth points at plugins/claude-code or
|
|
17
|
+
# src/npm-package -- so 6 of the 7 copies failed under Gate 5 and, once this
|
|
18
|
+
# repo's own hooks are installed, made every commit impossible.
|
|
19
|
+
#
|
|
20
|
+
# Walk up until the markers of the repo are both present instead of counting
|
|
21
|
+
# `..`. Depth-counting is what broke: it encodes "where this file lives" into a
|
|
22
|
+
# constant, and every new mirror location re-breaks it.
|
|
23
|
+
REPO_ROOT="$(cd "$BATS_TEST_DIRNAME" && pwd)"
|
|
24
|
+
while [ "$REPO_ROOT" != "/" ] && [ -n "$REPO_ROOT" ]; do
|
|
25
|
+
if [ -f "$REPO_ROOT/VERSION" ] && [ -f "$REPO_ROOT/src/npm-package/bin/xp-gate.js" ]; then
|
|
26
|
+
break
|
|
27
|
+
fi
|
|
28
|
+
REPO_ROOT="$(dirname "$REPO_ROOT")"
|
|
29
|
+
done
|
|
14
30
|
VERIFY="$REPO_ROOT/skills/sprint-flow/scripts/verify-sprint-state.sh"
|
|
15
31
|
CLI="$REPO_ROOT/src/npm-package/bin/xp-gate.js"
|
|
16
32
|
WORK="$(mktemp -d)"
|
|
@@ -23,6 +39,12 @@ teardown() {
|
|
|
23
39
|
@test "AC-688-01: accepts state written by xp-gate sprint-init" {
|
|
24
40
|
cd "$WORK"
|
|
25
41
|
git init -q .
|
|
42
|
+
# The developer machine sets a GLOBAL core.hooksPath at the installed hooks, so
|
|
43
|
+
# a bare `git commit` in the fixture would run the whole gate suite instead of
|
|
44
|
+
# creating the fixture commit. Pin it to an empty dir: this suite tests the
|
|
45
|
+
# verify script, not the hook chain.
|
|
46
|
+
mkdir -p "$WORK/empty-hooks"
|
|
47
|
+
git config core.hooksPath "$WORK/empty-hooks"
|
|
26
48
|
echo '{}' > package.json
|
|
27
49
|
git add -A
|
|
28
50
|
git -c user.email=t@t -c user.name=t commit -q -m init
|
|
@@ -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.6.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
package/principles/AGENTS.md
CHANGED
|
@@ -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.6.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Clean Code & SOLID principles checker — **Gate 4** of pre-commit. 14 rules × 9 language adapters, SARIF 2.1.0 output. Houses the **Boy Scout Rule** enforcement engine (Gate 6) and warning-baseline storage.
|
|
@@ -13,6 +13,16 @@
|
|
|
13
13
|
* mirror-only fix that the next publish rolled back, and #717 sent a C#
|
|
14
14
|
* SAST fix into a file no hook sourced.
|
|
15
15
|
*
|
|
16
|
+
* P1-E step 2 adds the three trees that were still committed twice and are
|
|
17
|
+
* already byte-identical mirrors: `hooks/lib/` (21), `build-integrity/`
|
|
18
|
+
* (9) and `skills/` (67). Same argument, same contract, 97 more files that
|
|
19
|
+
* stop having an editorial second copy.
|
|
20
|
+
*
|
|
21
|
+
* `src/principles/` is NOT here yet, and the omission is deliberate: it is
|
|
22
|
+
* still being edited in place by another workstream, and two producers
|
|
23
|
+
* writing one tree means the content depends on which process ran last.
|
|
24
|
+
* It joins once that work lands.
|
|
25
|
+
*
|
|
16
26
|
* P1-E step 1 moves the largest tree (`adapters/`, 199 files) out of
|
|
17
27
|
* version control. Once it is generated, "edit the wrong copy" stops being
|
|
18
28
|
* detectable-but-possible and becomes physically impossible: there is no
|
|
@@ -48,7 +58,10 @@ const REPO_ROOT = path.resolve(PKG_ROOT, '..', '..');
|
|
|
48
58
|
|
|
49
59
|
/** Mirrors generated here, each with the canonical tree it comes from. */
|
|
50
60
|
const GENERATED_TREES = Object.freeze([
|
|
51
|
-
{ mirror: 'adapters', canonical: path.join(REPO_ROOT, 'githooks', 'adapters') },
|
|
61
|
+
{ mirror: 'adapters', canonical: path.join(REPO_ROOT, 'githooks', 'adapters'), sync: 'adapters' },
|
|
62
|
+
{ mirror: 'hooks/lib', canonical: path.join(REPO_ROOT, 'githooks', 'lib'), sync: 'hooks' },
|
|
63
|
+
{ mirror: 'build-integrity', canonical: path.join(REPO_ROOT, 'src', 'build-integrity'), sync: 'module' },
|
|
64
|
+
{ mirror: 'skills', canonical: path.join(REPO_ROOT, 'skills'), sync: 'skills' },
|
|
52
65
|
]);
|
|
53
66
|
|
|
54
67
|
function quiet(argv) {
|
|
@@ -75,46 +88,90 @@ function main(argv = process.argv.slice(2)) {
|
|
|
75
88
|
if (!silent) process.stderr.write(`${message}\n`);
|
|
76
89
|
};
|
|
77
90
|
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
// The canonical source of `adapters` is the tree this module was built for, so
|
|
92
|
+
// its absence is a defect in the checkout and fails. The other three are
|
|
93
|
+
// best-effort: `prepare` runs on every `npm install`, including from a sdist-less
|
|
94
|
+
// checkout where a sibling tree may legitimately be absent, and an install must
|
|
95
|
+
// not fail because of that. It must not SILENTLY SKIP either -- a package that
|
|
96
|
+
// ships without the files it promises is worse than a loud warning.
|
|
97
|
+
const REQUIRED = 'adapters';
|
|
98
|
+
const failures = [];
|
|
99
|
+
let syncSkillsHook;
|
|
100
|
+
let syncAdaptersHook;
|
|
101
|
+
let syncModulesHook;
|
|
102
|
+
let syncHooksHook;
|
|
90
103
|
|
|
91
|
-
let sync;
|
|
92
104
|
try {
|
|
93
105
|
// Required lazily: sync-package-content.js runs its own main at require-time
|
|
94
106
|
// when invoked directly, and the eager import would make every caller pay for
|
|
95
107
|
// the skills/plugin discovery even when only the adapters mirror is wanted.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
108
|
+
const mod = require('./sync-package-content.js');
|
|
109
|
+
syncAdaptersHook = mod.syncAdapters;
|
|
110
|
+
syncModulesHook = mod.syncModules;
|
|
111
|
+
syncSkillsHook = mod.syncSkills;
|
|
112
|
+
syncHooksHook = mod.syncHooks;
|
|
100
113
|
} catch (error) {
|
|
101
114
|
process.stderr.write(`[generate-mirrors] cannot load sync-package-content.js: ${error.message}\n`);
|
|
102
115
|
return 1;
|
|
103
116
|
}
|
|
104
117
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
118
|
+
for (const tree of GENERATED_TREES) {
|
|
119
|
+
if (!fs.existsSync(tree.canonical)) {
|
|
120
|
+
if (tree.mirror === REQUIRED) {
|
|
121
|
+
process.stderr.write(
|
|
122
|
+
`[generate-mirrors] CANNOT GENERATE: canonical tree missing: ${tree.canonical}\n`
|
|
123
|
+
+ ' The package would build without its adapters. Refusing to continue '
|
|
124
|
+
+ 'silently -- a package missing the files it ships is the failure this\n'
|
|
125
|
+
+ ' generator exists to prevent.\n',
|
|
126
|
+
);
|
|
127
|
+
return 1;
|
|
128
|
+
}
|
|
129
|
+
process.stderr.write(
|
|
130
|
+
`[generate-mirrors] WARNING: canonical tree missing, skipping ${tree.mirror}/: ${tree.canonical}\n`
|
|
131
|
+
+ ' The published package would be missing these files. This is tolerated '
|
|
132
|
+
+ 'only because `prepare` runs on installs from partial checkouts.\n',
|
|
133
|
+
);
|
|
134
|
+
failures.push(tree.mirror);
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
109
137
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
138
|
+
let produced = 0;
|
|
139
|
+
try {
|
|
140
|
+
if (tree.sync === 'adapters') {
|
|
141
|
+
syncAdaptersHook();
|
|
142
|
+
produced = 1;
|
|
143
|
+
} else if (tree.sync === 'hooks') {
|
|
144
|
+
// syncHooks copies githooks/* plus the whole githooks/lib/ subtree.
|
|
145
|
+
syncHooksHook();
|
|
146
|
+
produced = 1;
|
|
147
|
+
} else if (tree.sync === 'module') {
|
|
148
|
+
produced = syncModulesHook(tree.mirror);
|
|
149
|
+
} else if (tree.sync === 'skills') {
|
|
150
|
+
syncSkillsHook();
|
|
151
|
+
produced = 1;
|
|
152
|
+
}
|
|
153
|
+
} catch (error) {
|
|
154
|
+
process.stderr.write(`[generate-mirrors] ERROR generating ${tree.mirror}/: ${error.message}\n`);
|
|
155
|
+
return 1;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (!produced) {
|
|
159
|
+
process.stderr.write(`[generate-mirrors] ERROR: sync for ${tree.mirror}/ reported nothing copied\n`);
|
|
160
|
+
return 1;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const mirrorDir = tree.mirror === 'hooks/lib'
|
|
164
|
+
? path.join(PKG_ROOT, 'hooks', 'lib')
|
|
165
|
+
: path.join(PKG_ROOT, tree.mirror);
|
|
166
|
+
const files = countFiles(mirrorDir);
|
|
167
|
+
if (files === 0) {
|
|
168
|
+
process.stderr.write(`[generate-mirrors] ERROR: ${tree.mirror}/ generated 0 files from ${tree.canonical}\n`);
|
|
169
|
+
return 1;
|
|
170
|
+
}
|
|
171
|
+
say(`[generate-mirrors] ${tree.mirror}/ (${files} files)`);
|
|
115
172
|
}
|
|
116
|
-
say(`[generate-mirrors] ${mirror}/ (${entries} entries, ${files} files)`);
|
|
117
173
|
|
|
174
|
+
if (failures.length > 0) say(`[generate-mirrors] best-effort trees skipped: ${failures.join(', ')}`);
|
|
118
175
|
return 0;
|
|
119
176
|
}
|
|
120
177
|
|
|
@@ -609,5 +609,10 @@ if (require.main === module) {
|
|
|
609
609
|
checkPreCommitDrift,
|
|
610
610
|
syncHooks,
|
|
611
611
|
syncAdapters,
|
|
612
|
+
// P1-E step 2: generate-mirrors.cjs produces these trees too, so the mirror
|
|
613
|
+
// stops being a second committed copy. Exported for that caller only; the
|
|
614
|
+
// require-time guards above stay untouched.
|
|
615
|
+
syncSkills,
|
|
616
|
+
syncModules,
|
|
612
617
|
};
|
|
613
618
|
}
|
|
@@ -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.6.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.6.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, 40-67% token savings vs parallel). 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.6.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|