@boyingliu01/xp-gate 0.7.0 → 0.8.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/bin/xp-gate.js +4 -9
- package/lib/__tests__/audit-log.test.ts +107 -0
- package/lib/__tests__/detect-deps.test.js +212 -42
- package/lib/__tests__/doctor.test.js +1 -0
- package/lib/__tests__/gate-audit.test.ts +59 -0
- package/lib/__tests__/init.test.js +47 -1
- package/lib/__tests__/install-skill.test.js +1 -45
- package/lib/__tests__/ui-detector.test.ts +186 -26
- package/lib/__tests__/ui-review.test.ts +119 -0
- package/lib/__tests__/uninstall.test.js +1 -0
- package/lib/detect-deps.js +180 -37
- package/lib/doctor.js +7 -9
- package/lib/gate-audit.ts +26 -42
- package/lib/init.js +42 -13
- package/lib/install-skill.js +20 -48
- package/lib/rollback.js +1 -16
- package/lib/shared-paths.js +30 -0
- package/lib/shared-utils.js +25 -0
- package/lib/ui-detector.ts +20 -14
- package/lib/ui-review.ts +58 -53
- package/lib/uninstall.js +8 -9
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/claude-code/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/claude-code/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/claude-code/skills/delphi-review/SKILL.md +454 -0
- package/plugins/claude-code/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/claude-code/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/claude-code/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/claude-code/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/claude-code/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/claude-code/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/claude-code/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/claude-code/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/claude-code/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/claude-code/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/claude-code/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/claude-code/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/claude-code/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/claude-code/skills/to-issues/SKILL.md +277 -0
- package/plugins/opencode/README.md +38 -0
- package/plugins/opencode/index.ts +85 -0
- package/plugins/opencode/package.json +18 -0
- package/plugins/opencode/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/opencode/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/opencode/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/opencode/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/opencode/skills/delphi-review/SKILL.md +454 -0
- package/plugins/opencode/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/opencode/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/opencode/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/opencode/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/opencode/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/opencode/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/opencode/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/opencode/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/opencode/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/opencode/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/opencode/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/opencode/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/opencode/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/opencode/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/opencode/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/opencode/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/opencode/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/opencode/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/opencode/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/opencode/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/opencode/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/opencode/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/opencode/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/opencode/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/opencode/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/opencode/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/opencode/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/opencode/skills/to-issues/SKILL.md +277 -0
- package/plugins/opencode/tsconfig.json +15 -0
- package/plugins/qoder/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/qoder/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/qoder/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/qoder/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/qoder/skills/delphi-review/SKILL.md +454 -0
- package/plugins/qoder/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/qoder/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/qoder/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/qoder/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/qoder/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/qoder/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/qoder/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/qoder/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/qoder/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/qoder/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/qoder/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/qoder/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/qoder/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/qoder/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/qoder/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/qoder/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/qoder/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/qoder/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/qoder/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/qoder/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/qoder/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/qoder/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/qoder/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/qoder/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/qoder/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/qoder/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/qoder/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/qoder/skills/to-issues/SKILL.md +277 -0
- package/skills/admin-template-guidelines/SKILL.md +904 -0
- package/skills/delphi-review/SKILL.md +112 -77
- package/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/skills/ralph-loop/SKILL.md +165 -34
- package/skills/sprint-flow/SKILL.md +448 -107
- package/skills/sprint-flow/references/components/skill-invocations.md +1 -1
- package/skills/sprint-flow/references/components/tool-descriptions.md +1 -1
- package/skills/sprint-flow/references/force-levels.md +203 -0
- package/skills/sprint-flow/references/phase-1-plan.md +4 -4
- package/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +20 -1
- package/skills/sprint-flow/templates/auto-estimate-output-template.md +7 -5
- package/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/skills/test-driven-development/SKILL.md +71 -0
- package/skills/test-specification-alignment/SKILL.md +98 -24
- package/skills/to-issues/SKILL.md +277 -0
- package/plugins/qoder/AGENTS.md +0 -93
- package/plugins/qoder/README.md +0 -87
- package/plugins/qoder/widgets/quality-report.html +0 -163
- package/plugins/qoder/widgets/sprint-dashboard.html +0 -172
- package/skills/delphi-review/evals/evals.json +0 -82
- package/skills/delphi-review/references/qoder-multi-model.md +0 -191
- package/skills/ralph-loop/evals/evals.json +0 -311
- package/skills/ralph-loop/evolution-history.json +0 -59
- package/skills/ralph-loop/evolution-log.md +0 -16
- package/skills/sprint-flow/evals/evals.json +0 -130
- package/skills/sprint-flow/evolution-history.json +0 -39
- package/skills/sprint-flow/evolution-log.md +0 -23
- package/skills/sprint-flow/references/qoder-adaptation.md +0 -173
- package/skills/test-specification-alignment/evals/evals.json +0 -75
package/lib/ui-detector.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { spawnSync } from 'child_process';
|
|
2
2
|
import { readFileSync, existsSync } from 'fs';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
|
|
@@ -45,11 +45,11 @@ export function isExcluded(filePath: string, exclusions: string[]): boolean {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
function matchGlob(filePath: string, pattern: string): boolean {
|
|
48
|
-
//
|
|
48
|
+
// Escape literal dots first, then replace placeholders with regex
|
|
49
49
|
const regex = pattern
|
|
50
|
+
.replace(/\./g, '\\.')
|
|
50
51
|
.replace(/_STARSTAR_/g, '.*')
|
|
51
|
-
.replace(/_STAR_/g, '[^/]*')
|
|
52
|
-
.replace(/\./g, '\\.');
|
|
52
|
+
.replace(/_STAR_/g, '[^/]*');
|
|
53
53
|
const re = new RegExp(`^${regex}$`);
|
|
54
54
|
return re.test(filePath);
|
|
55
55
|
}
|
|
@@ -75,6 +75,19 @@ function getFullExclusions(repoRoot?: string): string[] {
|
|
|
75
75
|
return [...UI_GATE_DEFAULT_EXCLUSIONS, ...loadUiGateIgnore(repoRoot)];
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
function runGitDiff(baseBranch: string): string {
|
|
79
|
+
const result = spawnSync(
|
|
80
|
+
'git',
|
|
81
|
+
['diff', '--name-only', `${baseBranch}..HEAD`],
|
|
82
|
+
{ stdio: ['pipe', 'pipe', 'pipe'], shell: false, encoding: 'utf8' }
|
|
83
|
+
);
|
|
84
|
+
if (result.status !== 0) {
|
|
85
|
+
const stderr = String(result.stderr ?? '').trim();
|
|
86
|
+
throw new Error(stderr || `git diff exited with status ${result.status}`);
|
|
87
|
+
}
|
|
88
|
+
return String(result.stdout ?? '').trim();
|
|
89
|
+
}
|
|
90
|
+
|
|
78
91
|
export function detectUiSprint(baseBranch: string = 'main'): UiDetectionResult {
|
|
79
92
|
try {
|
|
80
93
|
const files = getChangedFiles(baseBranch);
|
|
@@ -88,18 +101,11 @@ export function detectUiSprint(baseBranch: string = 'main'): UiDetectionResult {
|
|
|
88
101
|
}
|
|
89
102
|
|
|
90
103
|
export function getChangedFiles(baseBranch: string): string[] {
|
|
91
|
-
const diffOutput =
|
|
92
|
-
|
|
93
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
94
|
-
}).trim();
|
|
95
|
-
|
|
96
|
-
if (diffOutput === '') {
|
|
97
|
-
return [];
|
|
98
|
-
}
|
|
99
|
-
|
|
104
|
+
const diffOutput = runGitDiff(baseBranch);
|
|
105
|
+
if (diffOutput === '') return [];
|
|
100
106
|
return diffOutput
|
|
101
107
|
.split('\n')
|
|
102
|
-
.filter((f) => f.length > 0)
|
|
108
|
+
.filter((f: string) => f.length > 0)
|
|
103
109
|
.map(parseRenamedFile);
|
|
104
110
|
}
|
|
105
111
|
|
package/lib/ui-review.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { collectUiMatches, parseRenamedFile } from './ui-detector';
|
|
|
5
5
|
|
|
6
6
|
const RESULT_FILE = '.ui-gate-result.json';
|
|
7
7
|
|
|
8
|
-
interface UiReviewResult {
|
|
8
|
+
export interface UiReviewResult {
|
|
9
9
|
commit: string;
|
|
10
10
|
verdict: string;
|
|
11
11
|
expires: string;
|
|
@@ -14,96 +14,101 @@ interface UiReviewResult {
|
|
|
14
14
|
ui_changes_detected: string[];
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
console.log('═══ xp-gate ui-review ═══');
|
|
20
|
-
|
|
21
|
-
console.log('');
|
|
22
|
-
|
|
23
|
-
// Get staged + modified files
|
|
17
|
+
export function getChangedFilesForReview(): string[] {
|
|
24
18
|
let files = '';
|
|
25
19
|
try {
|
|
26
20
|
files = execSync('git diff --cached --name-only && git diff --name-only', { encoding: 'utf8' }).trim();
|
|
27
21
|
} catch {
|
|
28
|
-
|
|
29
22
|
console.log('⚠️ No git repo or no changes. Running in current directory.');
|
|
30
23
|
}
|
|
31
24
|
|
|
32
|
-
const fileList = files
|
|
25
|
+
const fileList = parseFileList(files);
|
|
26
|
+
if (fileList.length > 0) {
|
|
27
|
+
return fileList;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
console.log('No files staged or modified. Checking all tracked files.');
|
|
31
|
+
return getFallbackFileList();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function parseFileList(files: string): string[] {
|
|
35
|
+
return files
|
|
33
36
|
.split('\n')
|
|
34
37
|
.map(parseRenamedFile)
|
|
35
38
|
.filter(f => f.length > 0);
|
|
39
|
+
}
|
|
36
40
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
export function getFallbackFileList(): string[] {
|
|
42
|
+
try {
|
|
43
|
+
return parseFileList(execSync('git ls-files', { encoding: 'utf8' }).trim());
|
|
44
|
+
} catch {
|
|
45
|
+
const output = execSync(
|
|
46
|
+
'find . -maxdepth 3 -type f -name "*.ts" -o -name "*.html" -o -name "*.css" -o -name "*.scss" -o -name "*.tsx" -o -name "*.vue" -o -name "*.svelte" 2>/dev/null | grep -v node_modules | grep -v .git',
|
|
47
|
+
{ encoding: 'utf8' },
|
|
48
|
+
).trim();
|
|
49
|
+
return parseFileList(output);
|
|
46
50
|
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function buildUiReviewResult(matchedFiles: string[], now: Date = new Date()): UiReviewResult {
|
|
54
|
+
const commit = getCurrentCommit();
|
|
55
|
+
const expires = new Date(now.getTime() + 24 * 60 * 60 * 1000).toISOString();
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
commit,
|
|
59
|
+
verdict: 'APPROVED',
|
|
60
|
+
expires,
|
|
61
|
+
design_review: 'APPROVED',
|
|
62
|
+
browser_qa: 'APPROVED',
|
|
63
|
+
ui_changes_detected: matchedFiles,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function writeUiReviewResult(result: UiReviewResult, repoRoot: string = process.cwd()): void {
|
|
68
|
+
writeFileSync(join(repoRoot, RESULT_FILE), JSON.stringify(result, null, 2) + '\n', 'utf8');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function getCurrentCommit(): string {
|
|
72
|
+
return execSync('git rev-parse HEAD 2>/dev/null || echo "no-commit"', { encoding: 'utf8' }).trim();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function main(): void {
|
|
76
|
+
console.log('═══ xp-gate ui-review ═══');
|
|
77
|
+
console.log('');
|
|
47
78
|
|
|
79
|
+
const fileList = getChangedFilesForReview();
|
|
48
80
|
const result = collectUiMatches(fileList);
|
|
49
81
|
|
|
50
82
|
if (!result.isUiSprint) {
|
|
51
|
-
|
|
52
83
|
console.log('ℹ️ No UI changes detected in staged/modified files.');
|
|
53
|
-
|
|
54
84
|
console.log(' Nothing to review. Exiting.');
|
|
55
85
|
process.exit(0);
|
|
56
86
|
}
|
|
57
87
|
|
|
58
|
-
|
|
59
88
|
console.log(`🎨 UI changes detected (${result.matchedFiles.length} files):`);
|
|
60
89
|
result.matchedFiles.forEach(f => console.log(` - ${f}`));
|
|
61
|
-
|
|
62
90
|
console.log('');
|
|
63
91
|
|
|
64
|
-
|
|
65
92
|
console.log('Next steps required before push:');
|
|
66
|
-
|
|
67
93
|
console.log(' 1. Run /design-review in your AI agent session');
|
|
68
|
-
|
|
69
94
|
console.log(' 2. Run /qa or /qa-only in your AI agent session');
|
|
70
|
-
|
|
71
95
|
console.log(' 3. Ensure you have .delphi-config.json configured for Delphi review');
|
|
72
|
-
|
|
73
96
|
console.log('');
|
|
74
97
|
|
|
75
|
-
const
|
|
76
|
-
|
|
98
|
+
const uiResult = buildUiReviewResult(result.matchedFiles);
|
|
99
|
+
writeUiReviewResult(uiResult);
|
|
77
100
|
|
|
78
|
-
const uiResult: UiReviewResult = {
|
|
79
|
-
commit,
|
|
80
|
-
verdict: 'APPROVED',
|
|
81
|
-
expires,
|
|
82
|
-
design_review: 'APPROVED',
|
|
83
|
-
browser_qa: 'APPROVED',
|
|
84
|
-
ui_changes_detected: result.matchedFiles,
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
writeFileSync(join(process.cwd(), RESULT_FILE), JSON.stringify(uiResult, null, 2) + '\n', 'utf8');
|
|
88
|
-
|
|
89
|
-
|
|
90
101
|
console.log(`✅ Generated ${RESULT_FILE} with APPROVED verdict (template)`);
|
|
91
|
-
|
|
92
|
-
console.log(`
|
|
93
|
-
|
|
94
|
-
console.log(` Expires: ${expires}`);
|
|
95
|
-
|
|
102
|
+
console.log(` Commit: ${uiResult.commit}`);
|
|
103
|
+
console.log(` Expires: ${uiResult.expires}`);
|
|
96
104
|
console.log('');
|
|
97
|
-
|
|
98
105
|
console.log('⚠️ REVIEW THIS FILE before push:');
|
|
99
|
-
|
|
100
106
|
console.log(' - Ensure design_review and browser_qa are actually APPROVED');
|
|
101
|
-
|
|
102
107
|
console.log(' - Edit verdict to REJECTED if issues found');
|
|
103
|
-
|
|
104
108
|
console.log('');
|
|
105
|
-
|
|
106
109
|
console.log('Then: git push (pre-push will validate this file)');
|
|
107
110
|
}
|
|
108
111
|
|
|
109
|
-
main
|
|
112
|
+
if (require.main === module) {
|
|
113
|
+
main();
|
|
114
|
+
}
|
package/lib/uninstall.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
|
-
const os = require('os');
|
|
4
3
|
const crypto = require('crypto');
|
|
4
|
+
const {
|
|
5
|
+
HOME_DIR,
|
|
6
|
+
CONFIG_DIR,
|
|
7
|
+
CONFIG_FILE,
|
|
8
|
+
TEMPLATE_DIR,
|
|
9
|
+
GLOBAL_HOOKS_DIR,
|
|
10
|
+
GLOBAL_ADAPTERS_DIR,
|
|
11
|
+
} = require('./shared-paths.js');
|
|
5
12
|
|
|
6
|
-
// Cross-platform home directory resolution
|
|
7
|
-
const HOME_DIR = process.env.HOME || process.env.USERPROFILE || os.homedir();
|
|
8
|
-
|
|
9
|
-
const CONFIG_DIR = path.join(HOME_DIR, '.config', 'xp-gate');
|
|
10
|
-
const CONFIG_FILE = path.join(CONFIG_DIR, 'xp-gate.json');
|
|
11
|
-
const TEMPLATE_DIR = path.join(HOME_DIR, '.config', 'opencode', 'git-hooks-template');
|
|
12
|
-
const GLOBAL_HOOKS_DIR = path.join(CONFIG_DIR, 'hooks');
|
|
13
|
-
const GLOBAL_ADAPTERS_DIR = path.join(CONFIG_DIR, 'adapters');
|
|
14
13
|
const BACKUP_DIR = path.join(CONFIG_DIR, '.uninstall-backup');
|
|
15
14
|
|
|
16
15
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-gate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"displayName": "XP-Gate",
|
|
5
5
|
"description": "Extreme Programming quality gates + AI workflow skills for Claude Code. Includes 6 quality gates, Sprint Flow, and Delphi multi-expert review.",
|
|
6
6
|
"author": {
|