@boyingliu01/xp-gate 0.38.21 → 0.38.22
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/lib/__tests__/arch.test.js +17 -5
- package/lib/arch.js +38 -0
- 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/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
|
@@ -73,7 +73,19 @@ afterEach(() => {
|
|
|
73
73
|
fs.rmSync(sandbox, { recursive: true, force: true });
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
function writeCleanSandbox() {
|
|
76
|
+
function writeCleanSandbox({ withConfig = false } = {}) {
|
|
77
|
+
// Architecture config is REQUIRED before lib/arch.js will scan
|
|
78
|
+
// (REQ-GATE6-CONFIG-PARITY, mirroring the hook), so every case that expects a
|
|
79
|
+
// scan must declare one. Opt-in rather than unconditional: the --use-config
|
|
80
|
+
// group runs `archlint init` and asserts the file appears, and pre-creating it
|
|
81
|
+
// made init refuse to overwrite and exit non-zero (measured: that group went
|
|
82
|
+
// from green to 1 failed | 34 passed when the config was written here always).
|
|
83
|
+
if (withConfig) {
|
|
84
|
+
fs.writeFileSync(
|
|
85
|
+
path.join(sandbox, '.archlint.yaml'),
|
|
86
|
+
['rules:', ' code-clone:', ' severity: high', ' cyclic-dependency:', ' severity: high', ''].join(String.fromCharCode(10)),
|
|
87
|
+
);
|
|
88
|
+
}
|
|
77
89
|
fs.mkdirSync(path.join(sandbox, 'src'), { recursive: true });
|
|
78
90
|
fs.writeFileSync(path.join(sandbox, 'src', 'a.js'), 'module.exports = { a: 1 };\n');
|
|
79
91
|
fs.writeFileSync(
|
|
@@ -323,7 +335,7 @@ describe('stripExtendedPrefix', () => {
|
|
|
323
335
|
|
|
324
336
|
describe('arch — real archlint integration (anti-noop)', () => {
|
|
325
337
|
it('exits 0 on a clean sandbox (zero-tolerance mode, no baseline)', () => {
|
|
326
|
-
writeCleanSandbox();
|
|
338
|
+
writeCleanSandbox({ withConfig: true });
|
|
327
339
|
const run = runArchInChild(sandbox, []);
|
|
328
340
|
expect(run.status).toBe(0);
|
|
329
341
|
expect(run.stdout).toContain('Zero-tolerance mode');
|
|
@@ -331,7 +343,7 @@ describe('arch — real archlint integration (anti-noop)', () => {
|
|
|
331
343
|
}, 60000);
|
|
332
344
|
|
|
333
345
|
it('BLOCKS a planted high-severity violation — exit 0 is a real scan, not a no-op', () => {
|
|
334
|
-
writeCleanSandbox();
|
|
346
|
+
writeCleanSandbox({ withConfig: true });
|
|
335
347
|
plantHighClone();
|
|
336
348
|
const run = runArchInChild(sandbox, []);
|
|
337
349
|
expect(run.status).toBe(1);
|
|
@@ -340,7 +352,7 @@ describe('arch — real archlint integration (anti-noop)', () => {
|
|
|
340
352
|
}, 60000);
|
|
341
353
|
|
|
342
354
|
it('baseline ratchet: snapshot of a clean tree then re-scan exits 0', () => {
|
|
343
|
-
writeCleanSandbox();
|
|
355
|
+
writeCleanSandbox({ withConfig: true });
|
|
344
356
|
const snapshot = runRealArchlint(['snapshot', '-o', path.join(sandbox, '.architecture-baseline.json'), '-p', sandbox], sandbox);
|
|
345
357
|
expect(snapshot.status).toBe(0);
|
|
346
358
|
const run = runArchInChild(sandbox, []);
|
|
@@ -349,7 +361,7 @@ describe('arch — real archlint integration (anti-noop)', () => {
|
|
|
349
361
|
}, 120000);
|
|
350
362
|
|
|
351
363
|
it('baseline ratchet: a NEW high finding against the baseline blocks', () => {
|
|
352
|
-
writeCleanSandbox();
|
|
364
|
+
writeCleanSandbox({ withConfig: true });
|
|
353
365
|
const snapshot = runRealArchlint(['snapshot', '-o', path.join(sandbox, '.architecture-baseline.json'), '-p', sandbox], sandbox);
|
|
354
366
|
expect(snapshot.status).toBe(0);
|
|
355
367
|
plantHighClone();
|
package/lib/arch.js
CHANGED
|
@@ -550,6 +550,44 @@ function arch(args) {
|
|
|
550
550
|
}
|
|
551
551
|
|
|
552
552
|
const projectRoot = findProjectRoot(process.cwd());
|
|
553
|
+
|
|
554
|
+
// Architecture config is REQUIRED, exactly as gate-6-entry.sh says: without an
|
|
555
|
+
// explicit constraint file there is nothing to validate against, and a scan
|
|
556
|
+
// that scores 1.3/10 "Critical" while reporting "no high/critical findings" is
|
|
557
|
+
// the worst kind of green -- a number nobody can act on, printed next to a
|
|
558
|
+
// checkmark.
|
|
559
|
+
//
|
|
560
|
+
// Measured before this check existed, on a repo holding only package.json and
|
|
561
|
+
// two .ts files:
|
|
562
|
+
//
|
|
563
|
+
// git commit -> ❌ ARCHITECTURE CONFIG MISSING - COMMIT BLOCKED
|
|
564
|
+
// xp-gate check 6 -> ✅ arch: no high/critical architecture findings, exit 0
|
|
565
|
+
//
|
|
566
|
+
// `check 6` is the command a user runs to PRE-FLIGHT the gate, so being more
|
|
567
|
+
// forgiving than the gate it previews is precisely backwards.
|
|
568
|
+
//
|
|
569
|
+
// Only when no explicit --use-config/--config was given: an explicit path is
|
|
570
|
+
// already validated below, and second-guessing it here would block a
|
|
571
|
+
// deliberate one-off scan.
|
|
572
|
+
if (!config) {
|
|
573
|
+
const CONFIG_NAMES = ['.archlint.yaml', 'architecture.yaml', '.architecturerc'];
|
|
574
|
+
const hasConfig = CONFIG_NAMES.some((name) => fs.existsSync(path.join(projectRoot, name)));
|
|
575
|
+
if (!hasConfig) {
|
|
576
|
+
// The hook's escape valve, honoured here too so the two agree.
|
|
577
|
+
if (fs.existsSync(path.join(projectRoot, '.architecture-skip'))) {
|
|
578
|
+
console.warn('[xp-gate arch] ⚠️ Architecture config missing but .architecture-skip present — skipping.');
|
|
579
|
+
return Promise.resolve(0);
|
|
580
|
+
}
|
|
581
|
+
console.error('');
|
|
582
|
+
console.error('[xp-gate arch] ❌ ARCHITECTURE CONFIG MISSING');
|
|
583
|
+
console.error(`[xp-gate arch] Required: one of ${CONFIG_NAMES.join(' / ')} in ${projectRoot}`);
|
|
584
|
+
console.error('[xp-gate arch] Without it there are no declared constraints to validate against.');
|
|
585
|
+
console.error('[xp-gate arch] Create one with: npx archlint init --no-interactive');
|
|
586
|
+
console.error('[xp-gate arch] Or accept that it is not checked: create .architecture-skip');
|
|
587
|
+
return Promise.resolve(1);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
553
591
|
const resolved = resolveArchlint(projectRoot);
|
|
554
592
|
|
|
555
593
|
if (config) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-gate",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.22",
|
|
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.22.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.22.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.22.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.22.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.22.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.22.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.22.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.22.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.22.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.22.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.22.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.22.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.22.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.22.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.22.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|