@boyingliu01/xp-gate 0.15.3 → 0.15.4
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 +0 -0
- 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 +1 -1
- 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 +0 -0
- 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 +0 -0
- package/hooks/pre-commit +9 -0
- package/hooks/pre-push +0 -0
- package/lib/__tests__/install-cmd.test.js +0 -35
- package/lib/__tests__/phase-transition.test.js +272 -272
- package/lib/__tests__/sprint-audit.test.js +207 -207
- package/lib/doctor-tui.js +198 -0
- package/lib/doctor.js +95 -179
- package/lib/init.js +6 -4
- package/lib/install-cmd.js +31 -42
- package/lib/language-tools.js +833 -833
- package/lib/phase-transition.js +249 -249
- package/lib/sprint-audit.js +235 -235
- package/lib/uninstall.js +22 -0
- package/mock-policy/AGENTS.md +2 -2
- package/mutation/AGENTS.md +2 -2
- 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 +2 -2
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/claude-code/skills/sprint-flow/references/phase-4-verify.md +10 -0
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +2 -2
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/delphi-review/AGENTS.md +2 -2
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/opencode/skills/sprint-flow/references/phase-4-verify.md +10 -0
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +2 -2
- 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 +2 -2
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +2 -2
- package/principles/AGENTS.md +2 -2
- package/scripts/delphi-external-review.cjs +432 -432
- package/skills/delphi-review/AGENTS.md +2 -2
- package/skills/sprint-flow/AGENTS.md +2 -2
- package/skills/sprint-flow/references/phase-4-verify.md +10 -0
- package/skills/test-specification-alignment/AGENTS.md +2 -2
package/adapter-common.sh
CHANGED
|
File without changes
|
package/adapters/cpp.sh
CHANGED
|
File without changes
|
package/adapters/dart.sh
CHANGED
|
File without changes
|
package/adapters/flutter.sh
CHANGED
|
File without changes
|
package/adapters/go.sh
CHANGED
|
File without changes
|
package/adapters/iac.sh
CHANGED
|
File without changes
|
package/adapters/java.sh
CHANGED
|
File without changes
|
package/adapters/kotlin.sh
CHANGED
|
File without changes
|
package/adapters/objectivec.sh
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/adapters/powershell.sh
CHANGED
|
File without changes
|
package/adapters/python.sh
CHANGED
|
File without changes
|
package/adapters/shell.sh
CHANGED
|
File without changes
|
package/adapters/swift.sh
CHANGED
|
File without changes
|
package/adapters/typescript.sh
CHANGED
|
File without changes
|
package/bin/xp-gate.js
CHANGED
|
@@ -179,7 +179,7 @@ const COMMANDS = {
|
|
|
179
179
|
usage: 'xp-gate update-hooks [--global] [--force] [--dry-run] [--no-backup] [--scope hooks|adapters|all]'
|
|
180
180
|
},
|
|
181
181
|
'install': {
|
|
182
|
-
description: 'One-step install (init + bootstrap + doctor)',
|
|
182
|
+
description: 'One-step install (init + baseline + bootstrap + doctor --fix)',
|
|
183
183
|
run: subargs => {
|
|
184
184
|
const { install } = require('../lib/install-cmd');
|
|
185
185
|
install(subargs).then(code => process.exit(code));
|
package/gate-3.sh
CHANGED
|
File without changes
|
package/gate-4.sh
CHANGED
|
File without changes
|
package/gate-7.sh
CHANGED
|
File without changes
|
package/gate-8.sh
CHANGED
|
File without changes
|
package/gate-9.sh
CHANGED
|
File without changes
|
package/hooks/adapter-common.sh
CHANGED
|
File without changes
|
package/hooks/gate-3.sh
CHANGED
|
File without changes
|
package/hooks/gate-4.sh
CHANGED
|
File without changes
|
package/hooks/gate-7.sh
CHANGED
|
File without changes
|
package/hooks/gate-8.sh
CHANGED
|
File without changes
|
package/hooks/gate-9.sh
CHANGED
|
File without changes
|
package/hooks/pre-commit
CHANGED
|
@@ -174,6 +174,8 @@ echo ""
|
|
|
174
174
|
# ============================================================================
|
|
175
175
|
# Gate 0: Version Consistency Check (Protected Branches)
|
|
176
176
|
# ============================================================================
|
|
177
|
+
GATE_0_START=$(gate_start_ms)
|
|
178
|
+
GATE_0_STATUS="PASS"
|
|
177
179
|
|
|
178
180
|
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
179
181
|
PROTECTED_BRANCHES="master develop trunk mainline"
|
|
@@ -327,6 +329,8 @@ Or use --no-verify (discouraged) or include [skip-version-check] in commit messa
|
|
|
327
329
|
|
|
328
330
|
Staged files: $(echo "$STAGED_FILES" | tr '\n' ', ' | sed 's/,$//')
|
|
329
331
|
"
|
|
332
|
+
GATE_0_STATUS="BLOCK"
|
|
333
|
+
record_gate_audit "gate-0" "version-consistency" "$GATE_0_STATUS" "1" "$GATE_0_START"
|
|
330
334
|
exit 1
|
|
331
335
|
fi
|
|
332
336
|
fi
|
|
@@ -336,6 +340,8 @@ else
|
|
|
336
340
|
echo "✅ PASSED - Gate 0: Version Consistency Check (non-protected branch: $CURRENT_BRANCH)"
|
|
337
341
|
fi
|
|
338
342
|
|
|
343
|
+
record_gate_audit "gate-0" "version-consistency" "$GATE_0_STATUS" "0" "$GATE_0_START"
|
|
344
|
+
|
|
339
345
|
echo ""
|
|
340
346
|
|
|
341
347
|
# Get list of changed files
|
|
@@ -2345,6 +2351,7 @@ fi
|
|
|
2345
2351
|
GATE_9_END=$(date +%s)
|
|
2346
2352
|
GATE_9_DURATION=$((GATE_9_END - GATE_9_START))
|
|
2347
2353
|
echo "✅ Gate 9 completed in ${GATE_9_DURATION}s"
|
|
2354
|
+
record_gate_audit "gate-9" "build-integrity" "$GATE_9_STATUS" "0" "$GATE_9_START"
|
|
2348
2355
|
echo ""
|
|
2349
2356
|
# ============================================================================
|
|
2350
2357
|
|
|
@@ -2379,6 +2386,7 @@ if [ -n "$SPRINT_GATE_SCRIPT" ]; then
|
|
|
2379
2386
|
if ! bash "$SPRINT_GATE_SCRIPT" --pre-commit; then
|
|
2380
2387
|
GATE_11_STATUS="BLOCK"
|
|
2381
2388
|
echo "❌ BLOCKED - Gate 11: Sprint Flow Enforcement"
|
|
2389
|
+
record_gate_audit "gate-11" "sprint-flow" "$GATE_11_STATUS" "1" "$GATE_11_START"
|
|
2382
2390
|
# Sprint gate failure is a hard block — exit immediately
|
|
2383
2391
|
exit 1
|
|
2384
2392
|
fi
|
|
@@ -2390,6 +2398,7 @@ fi
|
|
|
2390
2398
|
GATE_11_END=$(date +%s)
|
|
2391
2399
|
GATE_11_DURATION=$((GATE_11_END - GATE_11_START))
|
|
2392
2400
|
echo "✅ Gate 11 completed in ${GATE_11_DURATION}s"
|
|
2401
|
+
record_gate_audit "gate-11" "sprint-flow" "$GATE_11_STATUS" "0" "$GATE_11_START"
|
|
2393
2402
|
echo ""
|
|
2394
2403
|
# ============================================================================
|
|
2395
2404
|
|
package/hooks/pre-push
CHANGED
|
File without changes
|
|
@@ -1,41 +1,6 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const os = require('os');
|
|
4
|
-
|
|
5
1
|
describe('install-cmd', () => {
|
|
6
|
-
let tmpDir;
|
|
7
|
-
let consoleLogSpy;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'xpgate-install-'));
|
|
11
|
-
consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {});
|
|
12
|
-
vi.resetModules();
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
afterEach(() => {
|
|
16
|
-
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
17
|
-
vi.restoreAllMocks();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
2
|
it('exports install function', () => {
|
|
21
3
|
const { install } = require('../install-cmd');
|
|
22
4
|
expect(typeof install).toBe('function');
|
|
23
5
|
});
|
|
24
|
-
|
|
25
|
-
it('install accepts --global flag', async () => {
|
|
26
|
-
const { install } = require('../install-cmd');
|
|
27
|
-
const code = await install(['--global'], tmpDir);
|
|
28
|
-
expect(typeof code).toBe('number');
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it('install runs without --global (local mode) in git repo', async () => {
|
|
32
|
-
// Simulate git repo
|
|
33
|
-
const gitDir = path.join(tmpDir, '.git');
|
|
34
|
-
fs.mkdirSync(gitDir, { recursive: true });
|
|
35
|
-
fs.mkdirSync(path.join(gitDir, 'hooks'), { recursive: true });
|
|
36
|
-
|
|
37
|
-
const { install } = require('../install-cmd');
|
|
38
|
-
const code = await install([], tmpDir);
|
|
39
|
-
expect(typeof code).toBe('number');
|
|
40
|
-
});
|
|
41
6
|
});
|