xdrs-core 0.14.3 → 0.14.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.
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"Review xdr 001-xdrs-core-ac1c8339": {
|
|
3
3
|
"result": "success",
|
|
4
4
|
"contextFiles": [
|
|
5
|
+
".github/skills/001-lint/SKILL.md",
|
|
5
6
|
".xdrs/_core/adrs/index.md",
|
|
6
7
|
".xdrs/_core/adrs/principles/001-xdrs-core.md",
|
|
7
8
|
".xdrs/_core/adrs/principles/002-xdr-standards.md",
|
|
8
|
-
".xdrs/
|
|
9
|
-
".xdrs/_local/bdrs/index.md",
|
|
9
|
+
".xdrs/_local/adrs/index.md",
|
|
10
10
|
".xdrs/index.md",
|
|
11
11
|
"AGENTS.md"
|
|
12
12
|
],
|
|
13
|
-
"contextHash": "
|
|
13
|
+
"contextHash": "080ea010bbb924d74c9196e7c3e0f6af"
|
|
14
14
|
},
|
|
15
15
|
"Reply ONLY with \"READY\" after checking i-a61b0904": {
|
|
16
16
|
"result": "success",
|
package/.xdrs/_core/adrs/principles/skills/004-write-article/004-write-article.test.int.report
CHANGED
|
@@ -4,14 +4,17 @@
|
|
|
4
4
|
"contextFiles": [
|
|
5
5
|
".xdrs/_core/adrs/index.md",
|
|
6
6
|
".xdrs/_core/adrs/principles/001-xdrs-core.md",
|
|
7
|
+
".xdrs/_core/adrs/principles/002-xdr-standards.md",
|
|
8
|
+
".xdrs/_core/adrs/principles/003-skill-standards.md",
|
|
7
9
|
".xdrs/_core/adrs/principles/004-article-standards.md",
|
|
10
|
+
".xdrs/_core/adrs/principles/006-research-standards.md",
|
|
11
|
+
".xdrs/_core/adrs/principles/007-plan-standards.md",
|
|
8
12
|
".xdrs/_core/adrs/principles/articles/001-xdrs-overview.md",
|
|
9
|
-
".xdrs/_local/
|
|
10
|
-
".xdrs/_local/
|
|
13
|
+
".xdrs/_local/adrs/index.md",
|
|
14
|
+
".xdrs/_local/adrs/principles/researches/001-research-and-decision-lifecycle.md",
|
|
11
15
|
".xdrs/index.md",
|
|
12
|
-
"AGENTS.md"
|
|
13
|
-
"README.md"
|
|
16
|
+
"AGENTS.md"
|
|
14
17
|
],
|
|
15
|
-
"contextHash": "
|
|
18
|
+
"contextHash": "4935b72a3613a4fad7cc72e477afed7a"
|
|
16
19
|
}
|
|
17
20
|
}
|
package/lib/testPrompt.js
CHANGED
|
@@ -28,7 +28,7 @@ async function runPromptTest(config, inputPrompt, judgePrompt, verbose) {
|
|
|
28
28
|
try {
|
|
29
29
|
if (options.workspaceMode === 'copy') {
|
|
30
30
|
tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'xdrs-core-test-'));
|
|
31
|
-
effectiveWorkspace = copyWorkspace(originalWorkspace, path.join(tempRoot, 'workspace'), options.workspaceFilter, verbose);
|
|
31
|
+
effectiveWorkspace = copyWorkspace(originalWorkspace, path.join(tempRoot, 'workspace'), options.workspaceFilter, options.workspaceExclude, verbose);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
if(verbose) {
|
|
@@ -113,7 +113,9 @@ function copilotCmd(workspaceRoot = findGitRoot(process.cwd())) {
|
|
|
113
113
|
'-p',
|
|
114
114
|
'{PROMPT}'
|
|
115
115
|
],
|
|
116
|
-
promptCmdContinueFlag: '--continue'
|
|
116
|
+
promptCmdContinueFlag: '--continue',
|
|
117
|
+
workspaceFilter: ['AGENTS.md', '.xdrs/index.md', '.xdrs/_core/**'],
|
|
118
|
+
workspaceExclude: ['**/*.test.js', '**/*.test.int.js', '**/*.test.int.report']
|
|
117
119
|
};
|
|
118
120
|
}
|
|
119
121
|
|
|
@@ -153,6 +155,7 @@ function normalizeConfig(config) {
|
|
|
153
155
|
workspaceRoot: config.workspaceRoot ? path.resolve(config.workspaceRoot) : null,
|
|
154
156
|
workspaceMode,
|
|
155
157
|
workspaceFilter: normalizeWorkspaceFilter(config.workspaceFilter),
|
|
158
|
+
workspaceExclude: normalizeWorkspaceFilter(config.workspaceExclude),
|
|
156
159
|
env: normalizeEnv(config.env),
|
|
157
160
|
taskTimeoutMs: readTimeout(config.taskTimeoutMs, 'taskTimeoutMs'),
|
|
158
161
|
judgeTimeoutMs: readTimeout(config.judgeTimeoutMs, 'judgeTimeoutMs'),
|
|
@@ -725,7 +728,7 @@ function findGitRoot(startPath) {
|
|
|
725
728
|
}
|
|
726
729
|
}
|
|
727
730
|
|
|
728
|
-
function copyWorkspace(sourcePath, targetPath, workspaceFilter, verbose) {
|
|
731
|
+
function copyWorkspace(sourcePath, targetPath, workspaceFilter, workspaceExclude, verbose) {
|
|
729
732
|
if(verbose) {
|
|
730
733
|
console.log(`Copying workspace from ${sourcePath} to ${targetPath}`);
|
|
731
734
|
}
|
|
@@ -736,12 +739,13 @@ function copyWorkspace(sourcePath, targetPath, workspaceFilter, verbose) {
|
|
|
736
739
|
rootPath: sourcePath,
|
|
737
740
|
ignoreContexts: [],
|
|
738
741
|
activeRealDirectories: new Set(),
|
|
739
|
-
workspaceFilter
|
|
742
|
+
workspaceFilter,
|
|
743
|
+
workspaceExclude
|
|
740
744
|
});
|
|
741
745
|
return targetPath;
|
|
742
746
|
}
|
|
743
747
|
|
|
744
|
-
function copyWorkspaceDirectory({ sourceDir, targetDir, rootPath, ignoreContexts, activeRealDirectories, workspaceFilter }) {
|
|
748
|
+
function copyWorkspaceDirectory({ sourceDir, targetDir, rootPath, ignoreContexts, activeRealDirectories, workspaceFilter, workspaceExclude }) {
|
|
745
749
|
const realSourceDir = fs.realpathSync(sourceDir);
|
|
746
750
|
if (activeRealDirectories.has(realSourceDir)) {
|
|
747
751
|
return;
|
|
@@ -782,7 +786,8 @@ function copyWorkspaceDirectory({ sourceDir, targetDir, rootPath, ignoreContexts
|
|
|
782
786
|
rootPath,
|
|
783
787
|
ignoreContexts: nextIgnoreContexts,
|
|
784
788
|
activeRealDirectories,
|
|
785
|
-
workspaceFilter
|
|
789
|
+
workspaceFilter,
|
|
790
|
+
workspaceExclude
|
|
786
791
|
});
|
|
787
792
|
continue;
|
|
788
793
|
}
|
|
@@ -791,6 +796,10 @@ function copyWorkspaceDirectory({ sourceDir, targetDir, rootPath, ignoreContexts
|
|
|
791
796
|
continue;
|
|
792
797
|
}
|
|
793
798
|
|
|
799
|
+
if (workspaceExclude && workspaceExclude.some((pattern) => minimatch(entryRelativePath, pattern, { dot: true }))) {
|
|
800
|
+
continue;
|
|
801
|
+
}
|
|
802
|
+
|
|
794
803
|
fs.copyFileSync(sourceEntryPath, targetEntryPath);
|
|
795
804
|
fs.chmodSync(targetEntryPath, (entryStats || fs.statSync(sourceEntryPath)).mode);
|
|
796
805
|
}
|
package/lib/testPrompt.test.js
CHANGED
|
@@ -89,6 +89,19 @@ test('workspaceFilter copies only files matching the glob pattern to temp worksp
|
|
|
89
89
|
expect(err).toBe('');
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
+
test('workspaceExclude removes files matching glob patterns from copied workspace', async () => {
|
|
93
|
+
const workspaceRoot = createWorkspace('exclude-pass');
|
|
94
|
+
fs.writeFileSync(path.join(workspaceRoot, 'notes.md'), 'notes content\n', 'utf8');
|
|
95
|
+
|
|
96
|
+
const err = await testPrompt(
|
|
97
|
+
createConfig(workspaceRoot, { workspaceExclude: ['*.md'] }),
|
|
98
|
+
'workspace-exclude-check: list files in the workspace',
|
|
99
|
+
'workspace-exclude-check: notes.md should not exist in the copied workspace, seed.txt should exist'
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
expect(err).toBe('');
|
|
103
|
+
});
|
|
104
|
+
|
|
92
105
|
test('copilotCmd defaults to the git repository root', () => {
|
|
93
106
|
const result = copilotCmd();
|
|
94
107
|
const command = result.promptCmd;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xdrs-core",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.4",
|
|
4
4
|
"description": "A standard way to organize Decision Records (XDRs) across scopes, subjects, and teams so that AI agents can reliably query and follow them.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
],
|
|
45
45
|
"exclude": [
|
|
46
46
|
"**/*.test.js",
|
|
47
|
-
"**/*.test.int.js"
|
|
47
|
+
"**/*.test.int.js",
|
|
48
|
+
"**/*.test.int.report"
|
|
48
49
|
]
|
|
49
50
|
},
|
|
50
51
|
"output": {
|