MCPcopy Create free account
hub / github.com/Pimzino/claude-code-spec-workflow / setupAgents

Method setupAgents

src/setup.ts:248–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

246 // NOTE: Script creation removed in v1.2.5 - task command generation now uses NPX command
247
248 async setupAgents(): Promise<void> {
249 // Agents are now mandatory - always create them
250 const agentFiles = [
251 'spec-requirements-validator.md',
252 'spec-design-validator.md',
253 'spec-task-validator.md',
254 'spec-task-executor.md',
255 ];
256
257 for (const agentFile of agentFiles) {
258 const sourceFile = join(this.markdownAgentsDir, agentFile);
259 const destFile = join(this.agentsDir, agentFile);
260
261 try {
262 // Delete existing file if it exists to ensure clean replacement
263 try {
264 await fs.unlink(destFile);
265 } catch {
266 // File might not exist, which is fine
267 }
268
269 const agentContent = await fs.readFile(sourceFile, 'utf-8');
270 await fs.writeFile(destFile, agentContent, 'utf-8');
271 } catch (error) {
272 console.error(`Failed to copy agent ${agentFile}:`, error);
273 throw error;
274 }
275 }
276 }
277
278
279

Callers 1

runSetupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected