@buildr-ai/buildr 0.1.0-rc.1
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/LICENSE +21 -0
- package/README.md +15 -0
- package/docs/cli-architecture.md +62 -0
- package/docs/cli-reference.md +67 -0
- package/docs/known-limitations.md +13 -0
- package/examples/minimal-workspace/README.md +24 -0
- package/package/README.md +28 -0
- package/package/bootstrap/contract.yml +122 -0
- package/package/bootstrap/guide.md +79 -0
- package/package/manifest.yml +144 -0
- package/package/targets/runtime/skills/buildr/SKILL.md +151 -0
- package/package/targets/workspace/.buildr/workspace.yml +5 -0
- package/package/targets/workspace/AGENTS.md +5 -0
- package/package/targets/workspace/commands/buildr/openspec/manifest.yml +15 -0
- package/package/targets/workspace/commands/manifest.yml +2 -0
- package/package/targets/workspace/components/buildr/openspec/component.yml +16 -0
- package/package/targets/workspace/components/buildr/openspec/contributions/openspec-apply-sidebar.md +3 -0
- package/package/targets/workspace/components/buildr/openspec/contributions/openspec-archive-sidebar.md +3 -0
- package/package/targets/workspace/components/buildr/openspec/contributions/openspec-explore-sidebar.md +3 -0
- package/package/targets/workspace/components/buildr/openspec/contributions/openspec-propose-sidebar.md +3 -0
- package/package/targets/workspace/components/buildr/openspec/contributions/openspec-sync-sidebar.md +3 -0
- package/package/targets/workspace/components/buildr/openspec/contributions/task-finish-post-sync.md +1 -0
- package/package/targets/workspace/components/buildr/openspec/contributions/task-finish-pre-sync.md +1 -0
- package/package/targets/workspace/components/buildr/openspec/contributions/task-triage-change-ready.md +10 -0
- package/package/targets/workspace/components/manifest.yml +2 -0
- package/package/targets/workspace/gitignore +13 -0
- package/package/targets/workspace/projects/AGENTS.project.md +25 -0
- package/package/targets/workspace/projects/manifest.yml +2 -0
- package/package/targets/workspace/projects/services/manifest.yml +3 -0
- package/package/targets/workspace/projects/skills/manifest.yml +2 -0
- package/package/targets/workspace/rules/buildr/core.md +63 -0
- package/package/targets/workspace/rules/manifest.yml +9 -0
- package/package/targets/workspace/skills/buildr/git-ops/SKILL.md +73 -0
- package/package/targets/workspace/skills/buildr/openspec-contract-guard/SKILL.md +67 -0
- package/package/targets/workspace/skills/buildr/task-finish/SKILL.md +104 -0
- package/package/targets/workspace/skills/buildr/task-triage/SKILL.md +103 -0
- package/package/targets/workspace/skills/buildr/task-worktree/SKILL.md +104 -0
- package/package/targets/workspace/skills/manifest.yml +38 -0
- package/package/targets/workspace/skills/openspec/openspec-apply-change/SKILL.md +159 -0
- package/package/targets/workspace/skills/openspec/openspec-archive-change/SKILL.md +117 -0
- package/package/targets/workspace/skills/openspec/openspec-explore/SKILL.md +287 -0
- package/package/targets/workspace/skills/openspec/openspec-propose/SKILL.md +111 -0
- package/package/targets/workspace/skills/openspec/openspec-sync-specs/SKILL.md +147 -0
- package/package.json +67 -0
- package/tools/buildr +11 -0
- package/tools/cli/application/cli-update.mjs +219 -0
- package/tools/cli/application/compose-runtime.mjs +38 -0
- package/tools/cli/application/doctor/runtime-diagnostics.mjs +226 -0
- package/tools/cli/application/doctor/scope-diagnostics.mjs +440 -0
- package/tools/cli/application/doctor/service-diagnostics.mjs +184 -0
- package/tools/cli/application/doctor.mjs +201 -0
- package/tools/cli/application/package-maintenance/builtin-receipts.mjs +73 -0
- package/tools/cli/application/package-maintenance/output.mjs +148 -0
- package/tools/cli/application/package-maintenance/smoke-checks.mjs +469 -0
- package/tools/cli/application/package-maintenance/static-validation.mjs +678 -0
- package/tools/cli/application/package-maintenance.mjs +538 -0
- package/tools/cli/application/runtime.mjs +118 -0
- package/tools/cli/application/workspace-operations.mjs +310 -0
- package/tools/cli/bootstrap.mjs +6 -0
- package/tools/cli/command/help.mjs +292 -0
- package/tools/cli/command/registry.mjs +97 -0
- package/tools/cli/domains/commands.mjs +661 -0
- package/tools/cli/domains/components.mjs +922 -0
- package/tools/cli/domains/openspec.mjs +603 -0
- package/tools/cli/domains/package-assets.mjs +652 -0
- package/tools/cli/domains/rules.mjs +380 -0
- package/tools/cli/domains/runtime.mjs +94 -0
- package/tools/cli/domains/skills.mjs +647 -0
- package/tools/cli/domains/workspace.mjs +571 -0
- package/tools/cli/shared/infrastructure.mjs +411 -0
- package/tools/cli/shared/json-contracts.mjs +22 -0
- package/tools/cli/shared/platform.mjs +52 -0
- package/tools/runtime/adapter-contract.mjs +330 -0
- package/tools/runtime/check-claude-code.mjs +26 -0
- package/tools/runtime/check-codex.mjs +26 -0
- package/tools/runtime/projection.mjs +163 -0
- package/tools/runtime/render-claude-code-rules.mjs +459 -0
- package/tools/runtime/render-claude-code.mjs +59 -0
- package/tools/runtime/skills/arguments.mjs +51 -0
- package/tools/runtime/skills/contributions.mjs +171 -0
- package/tools/runtime/skills/manifests.mjs +167 -0
- package/tools/runtime/skills/primitives.mjs +86 -0
- package/tools/runtime/skills/render-plan.mjs +244 -0
- package/tools/runtime/skills/sources.mjs +276 -0
- package/tools/shared/fetch-remote-text.mjs +78 -0
- package/tools/verification/integrity/managed-data-integrity.mjs +107 -0
- package/tools/verification/integrity/managed-mutations.mjs +72 -0
- package/tools/verification/openspec/contract.mjs +212 -0
- package/tools/verification/runtime/adapter-contract.mjs +102 -0
- package/tools/verification/runtime/adapter-parity.mjs +99 -0
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
export function createPackageSmokeChecks(deps) {
|
|
2
|
+
const {
|
|
3
|
+
BUILDR_REQUIRED_BLOCK_START,
|
|
4
|
+
buildRuleDiscoveryPlan,
|
|
5
|
+
checkClaudeCodeRuntime,
|
|
6
|
+
checkCodexRuntime,
|
|
7
|
+
collectFiles,
|
|
8
|
+
commandsCheck,
|
|
9
|
+
ensureDirectory,
|
|
10
|
+
execFileSync,
|
|
11
|
+
existsDirectory,
|
|
12
|
+
existsFile,
|
|
13
|
+
fs,
|
|
14
|
+
hasManagedRulesMarker,
|
|
15
|
+
os,
|
|
16
|
+
parseCommandsManifestYaml,
|
|
17
|
+
parseManifestFileEntry,
|
|
18
|
+
parseProjectsYaml,
|
|
19
|
+
parseRulesManifestYaml,
|
|
20
|
+
path,
|
|
21
|
+
process,
|
|
22
|
+
readSkillManifest,
|
|
23
|
+
renderClaudeCodeRules,
|
|
24
|
+
resolveRuleScope,
|
|
25
|
+
spawnSync,
|
|
26
|
+
toPosixRelative,
|
|
27
|
+
writeServicesManifest,
|
|
28
|
+
} = deps;
|
|
29
|
+
|
|
30
|
+
function verifyRecursiveRules(context, tempRoot, buildrScript) {
|
|
31
|
+
const { root, problems } = context;
|
|
32
|
+
const recursiveRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'buildr-package-rules-'));
|
|
33
|
+
try {
|
|
34
|
+
execFileSync(process.execPath, [buildrScript, 'init', '--target', recursiveRoot, '--name', 'recursive', '--profile', 'team'], { cwd: root, stdio: 'ignore' });
|
|
35
|
+
execFileSync(process.execPath, [buildrScript, 'project', 'create', 'demo', '--target', recursiveRoot], { cwd: root, stdio: 'ignore' });
|
|
36
|
+
const recursiveProjectRoot = path.join(recursiveRoot, 'projects', 'demo');
|
|
37
|
+
const apiRoot = path.join(recursiveProjectRoot, 'services', 'api');
|
|
38
|
+
const webRoot = path.join(recursiveProjectRoot, 'services', 'web');
|
|
39
|
+
const customRoot = path.join(apiRoot, 'modules', 'custom');
|
|
40
|
+
const ordersRoot = path.join(apiRoot, 'modules', 'orders');
|
|
41
|
+
for (const directory of [apiRoot, webRoot, customRoot, ordersRoot]) fs.mkdirSync(directory, { recursive: true });
|
|
42
|
+
writeServicesManifest(recursiveProjectRoot, {
|
|
43
|
+
schemaVersion: 'buildr.services/v1',
|
|
44
|
+
project: 'demo',
|
|
45
|
+
services: {
|
|
46
|
+
api: { title: 'api', description: 'API service', type: 'backend', path: 'services/api', repo: { kind: 'workspace' } },
|
|
47
|
+
web: { title: 'web', description: 'Web service', type: 'frontend', path: 'services/web', repo: { kind: 'workspace' } },
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
fs.writeFileSync(path.join(apiRoot, 'AGENTS.md'), '# API rules\n', 'utf8');
|
|
51
|
+
fs.writeFileSync(path.join(webRoot, 'AGENTS.md'), '# Web rules\n', 'utf8');
|
|
52
|
+
fs.writeFileSync(path.join(customRoot, 'AGENTS.md'), '# Custom module rules\n', 'utf8');
|
|
53
|
+
fs.writeFileSync(path.join(ordersRoot, 'AGENTS.md'), '# Orders rules\n', 'utf8');
|
|
54
|
+
|
|
55
|
+
const excludedRoot = path.join(apiRoot, 'node_modules', 'dependency');
|
|
56
|
+
const unregisteredGitRoot = path.join(apiRoot, 'external-repo');
|
|
57
|
+
const linkedRoot = path.join(apiRoot, 'linked-rules');
|
|
58
|
+
const taskWorktreeRoot = path.join(recursiveRoot, '.worktrees', 'ignored-task');
|
|
59
|
+
fs.mkdirSync(excludedRoot, { recursive: true });
|
|
60
|
+
fs.mkdirSync(path.join(unregisteredGitRoot, '.git'), { recursive: true });
|
|
61
|
+
fs.mkdirSync(path.join(ordersRoot, 'deep'), { recursive: true });
|
|
62
|
+
fs.mkdirSync(taskWorktreeRoot, { recursive: true });
|
|
63
|
+
fs.writeFileSync(path.join(excludedRoot, 'AGENTS.md'), '# Excluded rules\n', 'utf8');
|
|
64
|
+
fs.writeFileSync(path.join(unregisteredGitRoot, 'AGENTS.md'), '# External rules\n', 'utf8');
|
|
65
|
+
fs.writeFileSync(path.join(taskWorktreeRoot, 'AGENTS.md'), '# Task copy rules\n', 'utf8');
|
|
66
|
+
fs.symlinkSync(ordersRoot, linkedRoot, 'dir');
|
|
67
|
+
|
|
68
|
+
const rootPlan = buildRuleDiscoveryPlan(recursiveRoot, resolveRuleScope(recursiveRoot, '.'));
|
|
69
|
+
if (rootPlan.files.some((file) => file.startsWith(path.join(recursiveRoot, '.worktrees')))
|
|
70
|
+
|| !rootPlan.boundaries.some((boundary) => boundary.path === '.worktrees' && boundary.reason === 'excluded-directory')) {
|
|
71
|
+
problems.push('Rules discovery must treat workspace .worktrees as an excluded task-copy boundary.');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const serviceScope = resolveRuleScope(recursiveRoot, 'projects/demo/services/api');
|
|
75
|
+
const servicePlan = buildRuleDiscoveryPlan(recursiveRoot, serviceScope);
|
|
76
|
+
const serviceSources = servicePlan.files.map((file) => toPosixRelative(recursiveRoot, file));
|
|
77
|
+
const expectedSources = [
|
|
78
|
+
'AGENTS.md',
|
|
79
|
+
'projects/demo/AGENTS.md',
|
|
80
|
+
'projects/demo/services/api/AGENTS.md',
|
|
81
|
+
'projects/demo/services/api/modules/custom/AGENTS.md',
|
|
82
|
+
'projects/demo/services/api/modules/orders/AGENTS.md',
|
|
83
|
+
];
|
|
84
|
+
if (JSON.stringify(serviceSources) !== JSON.stringify(expectedSources)) {
|
|
85
|
+
problems.push(`Rules discovery order or Service subtree isolation is invalid: ${JSON.stringify(serviceSources)}`);
|
|
86
|
+
}
|
|
87
|
+
for (const reason of ['excluded-directory', 'symbolic-link', 'unregistered-nested-git-repository']) {
|
|
88
|
+
if (!servicePlan.boundaries.some((boundary) => boundary.reason === reason)) {
|
|
89
|
+
problems.push(`Rules discovery did not report ${reason} boundary.`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const legacyScope = resolveRuleScope(recursiveRoot, 'projects/demo/api');
|
|
93
|
+
if (legacyScope.scope !== 'projects/demo/services/api' || legacyScope.warnings.length !== 1) {
|
|
94
|
+
problems.push('Legacy Service scope must resolve to one canonical workspace path with a warning.');
|
|
95
|
+
}
|
|
96
|
+
for (const invalidScope of ['../outside', '/tmp/outside', '.worktrees/ignored-task', 'projects/demo/node_modules', 'projects/demo/services/api/linked-rules/deep']) {
|
|
97
|
+
try {
|
|
98
|
+
resolveRuleScope(recursiveRoot, invalidScope);
|
|
99
|
+
problems.push(`Invalid Rules scope unexpectedly resolved: ${invalidScope}`);
|
|
100
|
+
} catch {
|
|
101
|
+
// Expected rejection.
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
fs.mkdirSync(path.join(recursiveProjectRoot, 'api'), { recursive: true });
|
|
105
|
+
try {
|
|
106
|
+
resolveRuleScope(recursiveRoot, 'projects/demo/api');
|
|
107
|
+
problems.push('Ambiguous legacy Service scope unexpectedly resolved.');
|
|
108
|
+
} catch (error) {
|
|
109
|
+
if (!error.message.includes('Ambiguous legacy Service scope')) problems.push(`Ambiguous legacy Service scope returned the wrong error: ${error.message}`);
|
|
110
|
+
}
|
|
111
|
+
fs.rmSync(path.join(recursiveProjectRoot, 'api'), { recursive: true, force: true });
|
|
112
|
+
|
|
113
|
+
const codexBefore = collectFiles(recursiveRoot).map((file) => toPosixRelative(recursiveRoot, file)).sort();
|
|
114
|
+
const codexRules = checkCodexRuntime(['--scope', 'projects/demo/services/api', '--target', recursiveRoot], {
|
|
115
|
+
repoRoot: recursiveRoot,
|
|
116
|
+
command: 'buildr package check',
|
|
117
|
+
}).findings.filter((finding) => finding.code === 'runtime.codex_rules_ok').map((finding) => finding.path);
|
|
118
|
+
const codexAfter = collectFiles(recursiveRoot).map((file) => toPosixRelative(recursiveRoot, file)).sort();
|
|
119
|
+
if (JSON.stringify(codexRules) !== JSON.stringify(expectedSources) || JSON.stringify(codexBefore) !== JSON.stringify(codexAfter)) {
|
|
120
|
+
problems.push('Codex Rules diagnostics must report recursive native sources without writing a bridge.');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
fs.writeFileSync(path.join(recursiveRoot, 'CLAUDE.md'), '# Custom root Claude rules\n', 'utf8');
|
|
124
|
+
fs.writeFileSync(path.join(recursiveProjectRoot, 'CLAUDE.md'), '# Custom Project Claude rules\n', 'utf8');
|
|
125
|
+
try {
|
|
126
|
+
renderClaudeCodeRules(['--scope', 'projects/demo/services/api', '--target', recursiveRoot], {
|
|
127
|
+
repoRoot: recursiveRoot,
|
|
128
|
+
command: 'buildr package check',
|
|
129
|
+
});
|
|
130
|
+
problems.push('Claude Rules render unexpectedly accepted a non-managed conflict.');
|
|
131
|
+
} catch (error) {
|
|
132
|
+
if (!error.message.includes('no files were changed')) problems.push(`Claude Rules conflict did not report atomic reconcile: ${error.message}`);
|
|
133
|
+
if (!error.message.includes('2 conflict(s)')) problems.push('Claude Rules render must report every conflict in the selected scope.');
|
|
134
|
+
}
|
|
135
|
+
if (fs.readFileSync(path.join(recursiveRoot, 'CLAUDE.md'), 'utf8') !== '# Custom root Claude rules\n'
|
|
136
|
+
|| fs.readFileSync(path.join(recursiveProjectRoot, 'CLAUDE.md'), 'utf8') !== '# Custom Project Claude rules\n'
|
|
137
|
+
|| existsFile(path.join(apiRoot, 'CLAUDE.md'))) {
|
|
138
|
+
problems.push('Claude Rules conflict must leave every planned target unchanged.');
|
|
139
|
+
}
|
|
140
|
+
fs.rmSync(path.join(recursiveRoot, 'CLAUDE.md'));
|
|
141
|
+
fs.rmSync(path.join(recursiveProjectRoot, 'CLAUDE.md'));
|
|
142
|
+
|
|
143
|
+
const firstRender = renderClaudeCodeRules(['--scope', 'projects/demo/services/api', '--target', recursiveRoot], {
|
|
144
|
+
repoRoot: recursiveRoot,
|
|
145
|
+
command: 'buildr package check',
|
|
146
|
+
});
|
|
147
|
+
if (firstRender.actions.some((action) => action.action !== 'created') || existsFile(path.join(webRoot, 'CLAUDE.md'))) {
|
|
148
|
+
problems.push('Claude Service render must create only ancestor and selected Service subtree bridges.');
|
|
149
|
+
}
|
|
150
|
+
fs.appendFileSync(path.join(customRoot, 'CLAUDE.md'), '\nCustom Claude-only content.\n', 'utf8');
|
|
151
|
+
fs.rmSync(path.join(customRoot, 'AGENTS.md'));
|
|
152
|
+
fs.rmSync(path.join(ordersRoot, 'AGENTS.md'));
|
|
153
|
+
const orphanRender = renderClaudeCodeRules(['--scope', 'projects/demo/services/api', '--target', recursiveRoot], {
|
|
154
|
+
repoRoot: recursiveRoot,
|
|
155
|
+
command: 'buildr package check',
|
|
156
|
+
});
|
|
157
|
+
if (!orphanRender.actions.some((action) => action.action === 'removed' && action.targetFile === path.join(ordersRoot, 'CLAUDE.md')) || existsFile(path.join(ordersRoot, 'CLAUDE.md'))) {
|
|
158
|
+
problems.push('Claude Rules reconcile must remove managed orphan bridges.');
|
|
159
|
+
}
|
|
160
|
+
const preservedOrphan = fs.readFileSync(path.join(customRoot, 'CLAUDE.md'), 'utf8');
|
|
161
|
+
if (!orphanRender.actions.some((action) => action.action === 'updated' && action.targetFile === path.join(customRoot, 'CLAUDE.md'))
|
|
162
|
+
|| hasManagedRulesMarker(preservedOrphan)
|
|
163
|
+
|| !preservedOrphan.includes('Custom Claude-only content.')) {
|
|
164
|
+
problems.push('Claude Rules reconcile must preserve custom content outside an orphan managed block.');
|
|
165
|
+
}
|
|
166
|
+
} finally {
|
|
167
|
+
fs.rmSync(recursiveRoot, { recursive: true, force: true });
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function verifyWorkspaceAssetLifecycle(context, tempRoot, buildrScript) {
|
|
172
|
+
const { root, manifest, problems, parseJsonOutput } = context;
|
|
173
|
+
execFileSync(process.execPath, [buildrScript, 'rules', 'render', 'claude-code', '--scope', 'projects/demo', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
174
|
+
const oldReferenceBlock = [
|
|
175
|
+
'<!-- BEGIN Buildr managed Claude Code rules bridge; hash: 0000000000000000000000000000000000000000000000000000000000000000 -->',
|
|
176
|
+
'@AGENTS.md',
|
|
177
|
+
'<!-- END Buildr managed Claude Code rules bridge -->',
|
|
178
|
+
'',
|
|
179
|
+
].join('\n');
|
|
180
|
+
fs.writeFileSync(path.join(tempRoot, 'CLAUDE.md'), `# CLAUDE.md\n\n${oldReferenceBlock}`, 'utf8');
|
|
181
|
+
fs.writeFileSync(path.join(tempRoot, 'projects', 'demo', 'CLAUDE.md'), `# CLAUDE.md\n\n${oldReferenceBlock}`, 'utf8');
|
|
182
|
+
const referenceRuntime = checkClaudeCodeRuntime(['--scope', 'projects/demo', '--target', tempRoot], {
|
|
183
|
+
repoRoot: tempRoot,
|
|
184
|
+
command: 'buildr package check',
|
|
185
|
+
});
|
|
186
|
+
const referenceFindings = referenceRuntime.findings.filter((finding) => finding.path === 'CLAUDE.md' || finding.path === 'projects/demo/CLAUDE.md');
|
|
187
|
+
if (referenceFindings.some((finding) => finding.status === 'stale')) {
|
|
188
|
+
problems.push('reference bridge hash drift must not make rules bridge stale.');
|
|
189
|
+
}
|
|
190
|
+
if (referenceFindings.filter((finding) => finding.code === 'runtime.reference_bridge_metadata_stale').length !== 2) {
|
|
191
|
+
problems.push('reference bridge hash drift must be reported as metadata info for both root and project bridges.');
|
|
192
|
+
}
|
|
193
|
+
if (referenceRuntime.repairCommands.some((command) => command.includes('rules render'))) {
|
|
194
|
+
problems.push('reference bridge metadata info must not suggest required rules render.');
|
|
195
|
+
}
|
|
196
|
+
const doctorWithoutInfo = parseJsonOutput('doctor without info', execFileSync(process.execPath, [buildrScript, 'doctor', '--target', tempRoot, '--scope', 'projects/demo', '--json'], { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }));
|
|
197
|
+
if (doctorWithoutInfo.findings.some((finding) => finding.code === 'runtime.reference_bridge_metadata_stale')) {
|
|
198
|
+
problems.push('doctor --json must not include reference bridge metadata info by default.');
|
|
199
|
+
}
|
|
200
|
+
if (doctorWithoutInfo.runtime.claudeCode.some((entry) => entry.findings.some((finding) => finding.status === 'info'))) {
|
|
201
|
+
problems.push('doctor --json runtime details must not include info findings by default.');
|
|
202
|
+
}
|
|
203
|
+
const doctorWithInfo = parseJsonOutput('doctor with info', execFileSync(process.execPath, [buildrScript, 'doctor', '--target', tempRoot, '--scope', 'projects/demo', '--json', '--include-info'], { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }));
|
|
204
|
+
if (!doctorWithInfo.findings.some((finding) => finding.code === 'runtime.reference_bridge_metadata_stale' && finding.userActionRequired === false)) {
|
|
205
|
+
problems.push('doctor --json --include-info must include non-actionable reference bridge metadata info.');
|
|
206
|
+
}
|
|
207
|
+
if (doctorWithInfo.nextSteps.some((step) => step.code === 'runtime.reference_bridge_metadata_stale')) {
|
|
208
|
+
problems.push('reference bridge metadata info must not be listed as a doctor next step.');
|
|
209
|
+
}
|
|
210
|
+
const installedCommandsManifest = path.join(tempRoot, 'commands', 'manifest.yml');
|
|
211
|
+
if (!existsFile(installedCommandsManifest)) {
|
|
212
|
+
problems.push('buildr init did not install commands/manifest.yml.');
|
|
213
|
+
} else {
|
|
214
|
+
const commandsCheckJson = execFileSync(process.execPath, [buildrScript, 'commands', 'check', '--target', tempRoot, '--json'], { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
|
|
215
|
+
const commandsCheck = parseJsonOutput('commands check', commandsCheckJson);
|
|
216
|
+
if (!commandsCheck.ok || !commandsCheck.manifest.valid) {
|
|
217
|
+
problems.push(`Default commands manifest check failed: ${JSON.stringify(commandsCheck.summary)}`);
|
|
218
|
+
}
|
|
219
|
+
if (commandsCheck.commands.length !== 1 || commandsCheck.commands[0].id !== 'openspec'
|
|
220
|
+
|| !commandsCheck.commands[0].sources.includes('commands/buildr/openspec/manifest.yml')) {
|
|
221
|
+
problems.push('Default workspace must aggregate the OpenSpec Component command collection.');
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
execFileSync(process.execPath, [buildrScript, 'commands', 'add', 'demo-tool', '--purpose', '测试命令行工具维护', '--description', 'package check temporary command', '--install-hint', 'https://example.com/demo-tool', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
225
|
+
const commandsAfterAdd = parseJsonOutput('commands check after add', execFileSync(process.execPath, [buildrScript, 'commands', 'check', '--target', tempRoot, '--json'], { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }));
|
|
226
|
+
if (commandsAfterAdd.commands[0]?.installHint !== 'https://example.com/demo-tool' || Object.hasOwn(commandsAfterAdd.commands[0] ?? {}, 'install')) {
|
|
227
|
+
problems.push('commands add/check must use installHint and must not emit install.');
|
|
228
|
+
}
|
|
229
|
+
execFileSync(process.execPath, [buildrScript, 'commands', 'remove', 'demo-tool', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
230
|
+
const commandsAfterRemove = parseCommandsManifestYaml(fs.readFileSync(installedCommandsManifest, 'utf8'));
|
|
231
|
+
if (!Array.isArray(commandsAfterRemove.commands) || commandsAfterRemove.commands.length !== 0) {
|
|
232
|
+
problems.push('commands remove must keep an empty commands array.');
|
|
233
|
+
}
|
|
234
|
+
const rulesManifestFile = path.join(tempRoot, 'rules', 'manifest.yml');
|
|
235
|
+
const packageCheckRuleFile = path.join(tempRoot, 'rules', 'package-check-rule.md');
|
|
236
|
+
const claudeBeforeRulesAdd = existsFile(path.join(tempRoot, 'CLAUDE.md')) ? fs.readFileSync(path.join(tempRoot, 'CLAUDE.md'), 'utf8') : null;
|
|
237
|
+
fs.writeFileSync(packageCheckRuleFile, '# Package Check Rule\n', 'utf8');
|
|
238
|
+
const missingDescription = spawnSync(process.execPath, [buildrScript, 'rules', 'add', 'missing-description', '--target', tempRoot], { cwd: root, encoding: 'utf8' });
|
|
239
|
+
if (missingDescription.status === 0 || !missingDescription.stderr.includes('Missing required option: --description')) {
|
|
240
|
+
problems.push('rules add must require a non-empty description.');
|
|
241
|
+
}
|
|
242
|
+
const missingRuleFile = spawnSync(process.execPath, [buildrScript, 'rules', 'add', 'missing-rule-file', '--description', 'missing file', '--target', tempRoot], { cwd: root, encoding: 'utf8' });
|
|
243
|
+
if (missingRuleFile.status === 0 || !missingRuleFile.stderr.includes('registers an existing root Rule file')) {
|
|
244
|
+
problems.push('rules add must reject missing Rule source files.');
|
|
245
|
+
}
|
|
246
|
+
const projectRulesScope = spawnSync(process.execPath, [buildrScript, 'rules', 'add', 'project-rule', '--scope', 'projects/demo', '--description', 'project scope', '--target', tempRoot], { cwd: root, encoding: 'utf8' });
|
|
247
|
+
if (projectRulesScope.status === 0 || !projectRulesScope.stderr.includes('Project rules are maintained through projects/<project>/AGENTS.md')) {
|
|
248
|
+
problems.push('rules add must reject Project scope usage with Project AGENTS.md guidance.');
|
|
249
|
+
}
|
|
250
|
+
execFileSync(process.execPath, [buildrScript, 'rules', 'add', 'package-check-rule', '--description', 'package check temporary rule', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
251
|
+
let packageCheckRules = parseRulesManifestYaml(fs.readFileSync(rulesManifestFile, 'utf8'));
|
|
252
|
+
let packageCheckRule = packageCheckRules.rules.find((rule) => rule.id === 'package-check-rule');
|
|
253
|
+
if (packageCheckRule?.path !== 'rules/package-check-rule.md' || packageCheckRule?.description !== 'package check temporary rule' || packageCheckRule?.source !== 'workspace') {
|
|
254
|
+
problems.push('rules add must default to rules/<id>.md and register a workspace Rule with description.');
|
|
255
|
+
}
|
|
256
|
+
if (claudeBeforeRulesAdd !== null && fs.readFileSync(path.join(tempRoot, 'CLAUDE.md'), 'utf8') !== claudeBeforeRulesAdd) {
|
|
257
|
+
problems.push('rules add must not write Agent runtime output.');
|
|
258
|
+
}
|
|
259
|
+
const requiredRuleRemove = spawnSync(process.execPath, [buildrScript, 'rules', 'remove', 'buildr-core', '--target', tempRoot], { cwd: root, encoding: 'utf8' });
|
|
260
|
+
if (requiredRuleRemove.status === 0 || !requiredRuleRemove.stderr.includes('Required Buildr Rule cannot be removed')) {
|
|
261
|
+
problems.push('rules remove must protect required Buildr Rules.');
|
|
262
|
+
}
|
|
263
|
+
execFileSync(process.execPath, [buildrScript, 'rules', 'remove', 'package-check-rule', '--keep-file', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
264
|
+
if (!existsFile(packageCheckRuleFile)) {
|
|
265
|
+
problems.push('rules remove --keep-file must keep the Rule source file.');
|
|
266
|
+
}
|
|
267
|
+
packageCheckRules = parseRulesManifestYaml(fs.readFileSync(rulesManifestFile, 'utf8'));
|
|
268
|
+
if (packageCheckRules.rules.some((rule) => rule.id === 'package-check-rule')) {
|
|
269
|
+
problems.push('rules remove --keep-file must remove the manifest entry.');
|
|
270
|
+
}
|
|
271
|
+
const doctorAfterKeepRule = parseJsonOutput('doctor after rules remove --keep-file', execFileSync(process.execPath, [buildrScript, 'doctor', '--target', tempRoot, '--agent', 'codex', '--json'], { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }));
|
|
272
|
+
if (!doctorAfterKeepRule.findings.some((finding) => finding.code === 'rules.unregistered' && finding.path === 'rules/package-check-rule.md')) {
|
|
273
|
+
problems.push('doctor must report a Rule file kept by rules remove --keep-file as unregistered.');
|
|
274
|
+
}
|
|
275
|
+
execFileSync(process.execPath, [buildrScript, 'rules', 'add', 'package-check-rule', '--description', 'package check temporary rule', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
276
|
+
execFileSync(process.execPath, [buildrScript, 'rules', 'remove', 'package-check-rule', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
277
|
+
if (existsFile(packageCheckRuleFile)) {
|
|
278
|
+
problems.push('rules remove must delete the Rule source file by default.');
|
|
279
|
+
}
|
|
280
|
+
packageCheckRules = parseRulesManifestYaml(fs.readFileSync(rulesManifestFile, 'utf8'));
|
|
281
|
+
if (packageCheckRules.rules.some((rule) => rule.id === 'package-check-rule')) {
|
|
282
|
+
problems.push('rules remove must remove the manifest entry.');
|
|
283
|
+
}
|
|
284
|
+
const packageCheckSkillSource = path.join(tempRoot, 'package-check-skill-source');
|
|
285
|
+
ensureDirectory(path.join(packageCheckSkillSource, 'scripts'));
|
|
286
|
+
fs.writeFileSync(path.join(packageCheckSkillSource, 'SKILL.md'), [
|
|
287
|
+
'---',
|
|
288
|
+
'name: package-check-skill',
|
|
289
|
+
'description: package check temporary skill',
|
|
290
|
+
'---',
|
|
291
|
+
'',
|
|
292
|
+
'# Package Check Skill',
|
|
293
|
+
'',
|
|
294
|
+
].join('\n'));
|
|
295
|
+
fs.writeFileSync(path.join(packageCheckSkillSource, 'scripts', 'run.sh'), 'echo package-check\n');
|
|
296
|
+
execFileSync(process.execPath, [buildrScript, 'skills', 'add', '--source', packageCheckSkillSource, '--scope', '.', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
297
|
+
const packageCheckSkills = readSkillManifest(path.join(tempRoot, 'skills', 'manifest.yml'));
|
|
298
|
+
const packageCheckSkill = packageCheckSkills.find((skill) => skill.id === 'package-check-skill');
|
|
299
|
+
if (!packageCheckSkill || packageCheckSkill.description !== 'package check temporary skill') {
|
|
300
|
+
problems.push('skills add must write manifest description for loaded Skill source.');
|
|
301
|
+
}
|
|
302
|
+
if (!existsFile(path.join(tempRoot, 'skills', 'package-check-skill', 'scripts', 'run.sh'))) {
|
|
303
|
+
problems.push('skills add must load supported Skill source directories.');
|
|
304
|
+
}
|
|
305
|
+
if (existsDirectory(path.join(tempRoot, '.claude', 'skills', 'package-check-skill'))) {
|
|
306
|
+
problems.push('skills add must not write Agent runtime output.');
|
|
307
|
+
}
|
|
308
|
+
execFileSync(process.execPath, [buildrScript, 'skills', 'remove', 'package-check-skill', '--scope', '.', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
309
|
+
if (existsDirectory(path.join(tempRoot, 'skills', 'package-check-skill'))) {
|
|
310
|
+
problems.push('skills remove must delete the loaded Skill source directory.');
|
|
311
|
+
}
|
|
312
|
+
execFileSync(process.execPath, [buildrScript, 'skills', 'add', 'package-check-remote', '--remote-source', 'https://example.com/package-check-remote', '--description', 'remote info source', '--scope', '.', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
313
|
+
let remoteSkills = readSkillManifest(path.join(tempRoot, 'skills', 'manifest.yml'));
|
|
314
|
+
let remoteSkill = remoteSkills.find((skill) => skill.id === 'package-check-remote');
|
|
315
|
+
if (remoteSkill?.source?.kind !== 'url' || remoteSkill?.install?.mode !== 'agent') {
|
|
316
|
+
problems.push('skills add --remote-source must write source.kind=url and install.mode=agent.');
|
|
317
|
+
}
|
|
318
|
+
execFileSync(process.execPath, [buildrScript, 'skills', 'add', 'package-check-remote', '--remote-source', 'https://example.com/package-check-remote', '--resolved-source', 'https://example.com/package-check-remote/SKILL.md', '--integrity', 'sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', '--replace', '--scope', '.', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
319
|
+
remoteSkills = readSkillManifest(path.join(tempRoot, 'skills', 'manifest.yml'));
|
|
320
|
+
remoteSkill = remoteSkills.find((skill) => skill.id === 'package-check-remote');
|
|
321
|
+
if (remoteSkill?.resolved?.kind !== 'skill-url' || remoteSkill?.install?.mode !== 'buildr' || remoteSkill?.source?.url !== 'https://example.com/package-check-remote') {
|
|
322
|
+
problems.push('skills add --resolved-source must preserve source and write resolved.kind=skill-url with install.mode=buildr.');
|
|
323
|
+
}
|
|
324
|
+
execFileSync(process.execPath, [buildrScript, 'skills', 'remove', 'package-check-remote', '--scope', '.', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
325
|
+
for (const rawEntry of manifest.workspaceFiles) {
|
|
326
|
+
const entry = parseManifestFileEntry(rawEntry, 'workspaceFiles');
|
|
327
|
+
if (!existsFile(path.join(tempRoot, entry.target))) {
|
|
328
|
+
problems.push(`buildr init did not install workspace file: ${entry.target}`);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
const doctorJson = execFileSync(process.execPath, [buildrScript, 'doctor', '--target', tempRoot, '--json'], { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
|
|
332
|
+
const doctorResult = parseJsonOutput('doctor final', doctorJson);
|
|
333
|
+
if (!doctorResult.ok) {
|
|
334
|
+
problems.push(`Temporary init doctor failed: ${JSON.stringify(doctorResult.summary)}`);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
function verifyInitializedWorkspace(context, tempRoot, buildrScript) {
|
|
339
|
+
const { root, problems, bootstrapContract, parseJsonOutput } = context;
|
|
340
|
+
if (existsDirectory(path.join(tempRoot, 'practices'))) {
|
|
341
|
+
problems.push('buildr init must not create the removed root practices/ baseline.');
|
|
342
|
+
}
|
|
343
|
+
if (!existsFile(path.join(tempRoot, 'projects', 'manifest.yml'))) {
|
|
344
|
+
problems.push('buildr init did not install projects/manifest.yml.');
|
|
345
|
+
} else {
|
|
346
|
+
const initialProjects = parseProjectsYaml(fs.readFileSync(path.join(tempRoot, 'projects', 'manifest.yml'), 'utf8'));
|
|
347
|
+
if (Object.keys(initialProjects.projects).length !== 0) {
|
|
348
|
+
problems.push('Default projects/manifest.yml must start with an empty Project registry.');
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
execFileSync(process.execPath, [buildrScript, 'project', 'create', 'demo', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
352
|
+
if (existsDirectory(path.join(tempRoot, 'projects', 'demo', 'practices'))) {
|
|
353
|
+
problems.push('project create must not create the removed Project practices/ baseline.');
|
|
354
|
+
}
|
|
355
|
+
const projectsAfterCreate = parseProjectsYaml(fs.readFileSync(path.join(tempRoot, 'projects', 'manifest.yml'), 'utf8'));
|
|
356
|
+
if (projectsAfterCreate.projects.demo?.title !== 'demo' || projectsAfterCreate.projects.demo?.repo?.kind !== 'workspace') {
|
|
357
|
+
problems.push('project create must register workspace-managed Project metadata in projects/manifest.yml.');
|
|
358
|
+
}
|
|
359
|
+
if (!existsFile(path.join(tempRoot, 'projects', 'demo', 'services', 'manifest.yml'))) {
|
|
360
|
+
problems.push('project create must install services/manifest.yml.');
|
|
361
|
+
}
|
|
362
|
+
if (!existsFile(path.join(tempRoot, 'projects', 'demo', 'skills', 'manifest.yml'))) {
|
|
363
|
+
problems.push('project create must install project skills/manifest.yml.');
|
|
364
|
+
}
|
|
365
|
+
const legacyRootPractices = path.join(tempRoot, 'practices');
|
|
366
|
+
const legacyProjectPractices = path.join(tempRoot, 'projects', 'demo', 'practices');
|
|
367
|
+
ensureDirectory(legacyRootPractices);
|
|
368
|
+
ensureDirectory(legacyProjectPractices);
|
|
369
|
+
const rootPracticeSentinel = path.join(legacyRootPractices, 'keep-root.md');
|
|
370
|
+
const projectPracticeSentinel = path.join(legacyProjectPractices, 'keep-project.md');
|
|
371
|
+
fs.writeFileSync(rootPracticeSentinel, 'root legacy content\n', 'utf8');
|
|
372
|
+
fs.writeFileSync(projectPracticeSentinel, 'project legacy content\n', 'utf8');
|
|
373
|
+
execFileSync(process.execPath, [buildrScript, 'project', 'create', 'demo', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
374
|
+
execFileSync(process.execPath, [buildrScript, 'sync', 'codex', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
375
|
+
if (fs.readFileSync(rootPracticeSentinel, 'utf8') !== 'root legacy content\n'
|
|
376
|
+
|| fs.readFileSync(projectPracticeSentinel, 'utf8') !== 'project legacy content\n') {
|
|
377
|
+
problems.push('sync and Project repair must preserve legacy practices/ content unchanged.');
|
|
378
|
+
}
|
|
379
|
+
const legacyPracticesDoctor = parseJsonOutput('doctor legacy practices', execFileSync(process.execPath, [buildrScript, 'doctor', '--target', tempRoot, '--agent', 'codex', '--json', '--include-info'], { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }));
|
|
380
|
+
const legacyPracticeFindings = legacyPracticesDoctor.findings.filter((finding) => finding.code === 'practices.legacy_directory_present');
|
|
381
|
+
if (legacyPracticeFindings.length !== 2
|
|
382
|
+
|| legacyPracticeFindings.some((finding) => finding.status !== 'info' || finding.userActionRequired !== false)
|
|
383
|
+
|| legacyPracticesDoctor.nextSteps.some((step) => step.code === 'practices.legacy_directory_present')) {
|
|
384
|
+
problems.push('doctor --include-info must report root and Project legacy practices/ as non-actionable info only.');
|
|
385
|
+
}
|
|
386
|
+
execFileSync(process.execPath, [buildrScript, 'skill', 'install', 'claude-code', '--target', tempRoot], { cwd: root, stdio: 'ignore' });
|
|
387
|
+
const installedBuildrSkill = path.join(tempRoot, '.claude', 'skills', 'buildr', 'SKILL.md');
|
|
388
|
+
if (!existsFile(installedBuildrSkill)) {
|
|
389
|
+
problems.push('buildr skill install did not install Buildr Skill runtime.');
|
|
390
|
+
} else {
|
|
391
|
+
const installedContent = fs.readFileSync(installedBuildrSkill, 'utf8');
|
|
392
|
+
for (const required of bootstrapContract?.generatedSkillRequiredText ?? []) {
|
|
393
|
+
if (!installedContent.includes(required)) {
|
|
394
|
+
problems.push(`Generated Buildr Skill required text ${JSON.stringify(required)} is missing.`);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
if (existsFile(path.join(tempRoot, 'ASSETS.md'))) {
|
|
399
|
+
problems.push('buildr init generated ASSETS.md, but ASSETS.md is not part of the default root baseline.');
|
|
400
|
+
}
|
|
401
|
+
if (existsFile(path.join(tempRoot, 'skills', 'buildr', 'SKILL.md'))) {
|
|
402
|
+
problems.push('buildr init copied product Agent Skill into workspace skills source.');
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
verifyRecursiveRules(context, tempRoot, buildrScript);
|
|
406
|
+
verifyWorkspaceAssetLifecycle(context, tempRoot, buildrScript);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
function verifyExistingAgentsCompatibility(context) {
|
|
410
|
+
const { root, problems } = context;
|
|
411
|
+
const compatRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'buildr-package-check-existing-agents-'));
|
|
412
|
+
try {
|
|
413
|
+
const buildrScript = path.join(root, 'tools', 'buildr');
|
|
414
|
+
const existingAgents = path.join(compatRoot, 'AGENTS.md');
|
|
415
|
+
fs.writeFileSync(existingAgents, '# Existing root entry\n');
|
|
416
|
+
execFileSync(process.execPath, [buildrScript, 'init', '--target', compatRoot, '--name', 'demo', '--profile', 'team'], { cwd: root, stdio: 'ignore' });
|
|
417
|
+
const existingContent = fs.readFileSync(existingAgents, 'utf8');
|
|
418
|
+
if (!existingContent.includes('# Existing root entry') || !existingContent.includes(BUILDR_REQUIRED_BLOCK_START) || !existingContent.includes('rules/buildr/core.md')) {
|
|
419
|
+
problems.push('buildr init must preserve existing root AGENTS.md body and add only the Buildr required block.');
|
|
420
|
+
}
|
|
421
|
+
if (existsFile(path.join(compatRoot, 'AGENTS.workspace.md'))) {
|
|
422
|
+
problems.push('buildr init must not write AGENTS.workspace.md for existing root AGENTS.md.');
|
|
423
|
+
}
|
|
424
|
+
} finally {
|
|
425
|
+
fs.rmSync(compatRoot, { recursive: true, force: true });
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
function verifyPackageSupportTools(context) {
|
|
430
|
+
const { root, problems, files } = context;
|
|
431
|
+
const contractFixture = path.join(root, 'tools', 'verification', 'openspec', 'contract.mjs');
|
|
432
|
+
if (!existsFile(contractFixture)) {
|
|
433
|
+
problems.push('OpenSpec contract fixture verifier is missing.');
|
|
434
|
+
} else {
|
|
435
|
+
files.push(contractFixture);
|
|
436
|
+
const fixtureResult = spawnSync(process.execPath, [contractFixture], { cwd: root, encoding: 'utf8', timeout: 30000 });
|
|
437
|
+
if (fixtureResult.status !== 0) {
|
|
438
|
+
problems.push(`OpenSpec contract fixture verifier failed: ${(fixtureResult.stderr || fixtureResult.stdout || 'unknown error').trim()}`);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
const mutationVerifier = path.join(root, 'tools', 'verification', 'integrity', 'managed-mutations.mjs');
|
|
443
|
+
if (!existsFile(mutationVerifier)) {
|
|
444
|
+
problems.push('Managed mutation verifier is missing.');
|
|
445
|
+
} else {
|
|
446
|
+
files.push(mutationVerifier);
|
|
447
|
+
const mutationResult = spawnSync(process.execPath, [mutationVerifier], { cwd: root, encoding: 'utf8', timeout: 30000 });
|
|
448
|
+
if (mutationResult.status !== 0) problems.push(`Managed mutation verifier failed: ${(mutationResult.stderr || mutationResult.stdout || 'unknown error').trim()}`);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
function runPackageSmokeChecks(context) {
|
|
453
|
+
const { root } = context;
|
|
454
|
+
const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'buildr-package-check-'));
|
|
455
|
+
const buildrScript = path.join(root, 'tools', 'buildr');
|
|
456
|
+
try {
|
|
457
|
+
execFileSync(process.execPath, [buildrScript, 'init', '--target', tempRoot, '--name', 'demo', '--profile', 'team'], { cwd: root, stdio: 'ignore' });
|
|
458
|
+
verifyInitializedWorkspace(context, tempRoot, buildrScript);
|
|
459
|
+
} finally {
|
|
460
|
+
fs.rmSync(tempRoot, { recursive: true, force: true });
|
|
461
|
+
}
|
|
462
|
+
verifyExistingAgentsCompatibility(context);
|
|
463
|
+
verifyPackageSupportTools(context);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return {
|
|
467
|
+
runPackageSmokeChecks,
|
|
468
|
+
};
|
|
469
|
+
}
|