@boyingliu01/xp-gate 0.14.31 → 0.15.0
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/adapter-common.sh +0 -0
- package/adapters/cpp.sh +0 -0
- package/adapters/dart.sh +0 -0
- package/adapters/flutter.sh +0 -0
- package/adapters/go.sh +0 -0
- package/adapters/iac.sh +0 -0
- package/adapters/java.sh +33 -4
- package/adapters/kotlin.sh +0 -0
- package/adapters/objectivec.sh +0 -0
- package/adapters/plugins/book299-20132-python/scripts/install-gradle.sh +0 -0
- package/adapters/plugins/book299-20132-python/scripts/install-maven.sh +0 -0
- package/adapters/plugins/book299-4081-c/scripts/install-gradle.sh +0 -0
- package/adapters/plugins/book299-4081-c/scripts/install-maven.sh +0 -0
- package/adapters/plugins/book299-4083-javascriptes5/scripts/install-gradle.sh +0 -0
- package/adapters/plugins/book299-4083-javascriptes5/scripts/install-maven.sh +0 -0
- package/adapters/powershell.sh +0 -0
- package/adapters/python.sh +0 -0
- package/adapters/shell.sh +0 -0
- package/adapters/swift.sh +0 -0
- package/adapters/typescript.sh +0 -0
- package/bin/xp-gate.js +0 -0
- package/gate-3.sh +0 -0
- package/gate-4.sh +0 -0
- package/gate-7.sh +0 -0
- package/gate-8.sh +0 -0
- package/gate-9.sh +22 -48
- package/hooks/adapter-common.sh +0 -0
- package/hooks/gate-3.sh +0 -0
- package/hooks/gate-4.sh +0 -0
- package/hooks/gate-7.sh +0 -0
- package/hooks/gate-8.sh +0 -0
- package/hooks/gate-9.sh +22 -48
- package/hooks/pre-commit +102 -44
- package/hooks/pre-push +1 -33
- package/lib/__tests__/doctor.test.js +34 -31
- package/lib/__tests__/phase-transition.test.js +272 -272
- package/lib/__tests__/sprint-audit.test.js +207 -207
- package/lib/detect-deps.js +12 -0
- package/lib/phase-transition.js +249 -249
- package/lib/sprint-audit.js +235 -235
- package/mock-policy/AGENTS.md +3 -3
- package/mutation/AGENTS.md +3 -3
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/bin/delphi-review-guard.sh +0 -0
- package/plugins/claude-code/bin/xp-gate-check +0 -0
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +1 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-3-build.md +71 -0
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/opencode/skills/sprint-flow/SKILL.md +1 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-3-build.md +71 -0
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/qoder/agents/delphi-architecture.md +48 -48
- package/plugins/qoder/agents/delphi-feasibility.md +48 -48
- package/plugins/qoder/agents/delphi-technical.md +48 -48
- package/plugins/qoder/bin/sprint-flow-guard.sh +0 -0
- package/plugins/qoder/bin/xp-gate-check +0 -0
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
- package/principles/AGENTS.md +3 -3
- package/principles/adapters/python.ts +39 -6
- package/scripts/__tests__/sync-package-content.test.js +36 -17
- package/scripts/delphi-external-review.cjs +432 -432
- package/scripts/sync-package-content.js +5 -4
- package/skills/delphi-review/AGENTS.md +3 -3
- package/skills/sprint-flow/AGENTS.md +3 -3
- package/skills/sprint-flow/SKILL.md +1 -0
- package/skills/sprint-flow/references/phase-3-build.md +71 -0
- package/skills/test-specification-alignment/AGENTS.md +3 -3
|
@@ -299,10 +299,7 @@ describe('doctor', () => {
|
|
|
299
299
|
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('All checks passed'));
|
|
300
300
|
});
|
|
301
301
|
|
|
302
|
-
|
|
303
|
-
// This test fails because doctor.js now uses execAsync (util.promisify(exec))
|
|
304
|
-
// but the test mocks execSync. Need to update mock strategy to handle both.
|
|
305
|
-
it.skip('AC-05: doctor reports all checks passed for healthy global install', async () => {
|
|
302
|
+
it('AC-05: doctor reports all checks passed for healthy global install', async () => {
|
|
306
303
|
setupGlobalInstall();
|
|
307
304
|
ensureTuiRegistered();
|
|
308
305
|
seedVersionCache();
|
|
@@ -319,10 +316,7 @@ describe('doctor', () => {
|
|
|
319
316
|
|
|
320
317
|
// === AC-08: partial uninstall detection ===
|
|
321
318
|
|
|
322
|
-
|
|
323
|
-
// This test fails because doctor.js now uses execAsync (util.promisify(exec))
|
|
324
|
-
// but the test mocks execSync. Need to update mock strategy to handle both.
|
|
325
|
-
it.skip('AC-08: doctor detects missing hooks in partial install', async () => {
|
|
319
|
+
it('AC-08: doctor detects missing hooks in partial install', async () => {
|
|
326
320
|
setupLocalInstall();
|
|
327
321
|
seedVersionCache();
|
|
328
322
|
// Remove hooks to simulate partial state
|
|
@@ -368,10 +362,7 @@ describe('doctor', () => {
|
|
|
368
362
|
);
|
|
369
363
|
});
|
|
370
364
|
|
|
371
|
-
|
|
372
|
-
// This test fails because doctor.js now uses execAsync (util.promisify(exec))
|
|
373
|
-
// but the test mocks execSync. Need to update mock strategy to handle both.
|
|
374
|
-
it.skip('AC-08: doctor detects missing adapters', async () => {
|
|
365
|
+
it('AC-08: doctor detects missing adapters', async () => {
|
|
375
366
|
setupLocalInstall();
|
|
376
367
|
seedVersionCache();
|
|
377
368
|
// Remove adapters dir
|
|
@@ -390,12 +381,10 @@ describe('doctor', () => {
|
|
|
390
381
|
);
|
|
391
382
|
});
|
|
392
383
|
|
|
393
|
-
|
|
394
|
-
// This test fails because doctor.js now uses execAsync (util.promisify(exec))
|
|
395
|
-
// but the test mocks execSync. Need to update mock strategy to handle both.
|
|
396
|
-
it.skip('AC-08: doctor detects wrong core.hooksPath in global mode', async () => {
|
|
384
|
+
it('AC-08: doctor detects wrong core.hooksPath in global mode', async () => {
|
|
397
385
|
setupGlobalInstall();
|
|
398
386
|
seedVersionCache();
|
|
387
|
+
// Custom mock: returns wrong hooksPath to trigger detection
|
|
399
388
|
cp.execSync = (cmd) => {
|
|
400
389
|
if (cmd.includes('git config --global core.hooksPath')) {
|
|
401
390
|
if (cmd.includes('--unset')) {
|
|
@@ -417,6 +406,32 @@ describe('doctor', () => {
|
|
|
417
406
|
}
|
|
418
407
|
return '';
|
|
419
408
|
};
|
|
409
|
+
// Async mock matching execSync above
|
|
410
|
+
const mockAsyncExec = (cmd, opts, callback) => {
|
|
411
|
+
if (typeof opts === 'function') { callback = opts; opts = {}; }
|
|
412
|
+
if (cmd.includes('git config --global core.hooksPath')) {
|
|
413
|
+
callback(null, cmd.includes('--unset') ? '' : '/wrong/path\n', '');
|
|
414
|
+
} else if (cmd === 'git rev-parse --git-dir') {
|
|
415
|
+
callback(null, path.join(tmpProject, '.git') + '\n', '');
|
|
416
|
+
} else if (cmd === 'node --version') {
|
|
417
|
+
callback(null, 'v20.0.0\n', '');
|
|
418
|
+
} else if (cmd === 'git --version') {
|
|
419
|
+
callback(null, 'git version 2.39.0\n', '');
|
|
420
|
+
} else if (cmd === 'bash --version') {
|
|
421
|
+
callback(null, 'GNU bash, version 5.1.16\n', '');
|
|
422
|
+
} else {
|
|
423
|
+
callback(null, '', '');
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
mockAsyncExec[util.promisify.custom] = (cmd, options) => {
|
|
427
|
+
return new Promise((resolve, reject) => {
|
|
428
|
+
mockAsyncExec(cmd, options, (err, stdout, stderr) => {
|
|
429
|
+
if (err) { err.stdout = stdout || ''; err.stderr = stderr || ''; reject(err); }
|
|
430
|
+
else { resolve({ stdout, stderr }); }
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
};
|
|
434
|
+
cp.exec = mockAsyncExec;
|
|
420
435
|
const { doctor } = require('../doctor');
|
|
421
436
|
const result = await doctor([]);
|
|
422
437
|
expect(result).toBe(1);
|
|
@@ -551,11 +566,7 @@ describe('doctor', () => {
|
|
|
551
566
|
expect(result).toBe(1);
|
|
552
567
|
});
|
|
553
568
|
|
|
554
|
-
|
|
555
|
-
// This test fails because doctor.js now uses execAsync (util.promisify(exec))
|
|
556
|
-
// to detect missing environment dependencies, but the test mocks execSync.
|
|
557
|
-
// Need to update mock strategy to handle asynchronous environment checks.
|
|
558
|
-
it.skip('detects missing environment dependencies', async () => {
|
|
569
|
+
it('detects missing environment dependencies', async () => {
|
|
559
570
|
setupLocalInstall();
|
|
560
571
|
seedVersionCache();
|
|
561
572
|
mockExecFail();
|
|
@@ -772,11 +783,7 @@ describe('doctor', () => {
|
|
|
772
783
|
|
|
773
784
|
// === Issue #186: --fix syncs global hooks from package source ===
|
|
774
785
|
|
|
775
|
-
|
|
776
|
-
// This test fails because doctor.js now uses execAsync (util.promisify(exec))
|
|
777
|
-
// for --fix operations, but the test mocks execSync. Need to update mock
|
|
778
|
-
// strategy to handle asynchronous fix operations.
|
|
779
|
-
it.skip('--fix syncs global hooks when they are outdated', async () => {
|
|
786
|
+
it('--fix syncs global hooks when they are outdated', async () => {
|
|
780
787
|
setupGlobalInstall();
|
|
781
788
|
seedVersionCache();
|
|
782
789
|
// Write an outdated pre-commit hook (different content)
|
|
@@ -961,11 +968,7 @@ describe('doctor', () => {
|
|
|
961
968
|
);
|
|
962
969
|
});
|
|
963
970
|
|
|
964
|
-
|
|
965
|
-
// This test fails because doctor.js now uses execAsync (util.promisify(exec))
|
|
966
|
-
// to check gate scripts, but the test mocks execSync. Need to update mock
|
|
967
|
-
// strategy to handle asynchronous gate script validation.
|
|
968
|
-
it.skip('gate scripts: FAIL when gate scripts are missing', async () => {
|
|
971
|
+
it('gate scripts: FAIL when gate scripts are missing', async () => {
|
|
969
972
|
setupLocalInstall();
|
|
970
973
|
seedVersionCache();
|
|
971
974
|
// Clear adapters dir and create with only language adapters, no gate scripts
|