specsmd 0.1.3 → 0.1.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.
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
const ToolInstaller = require('./ToolInstaller');
|
|
2
|
-
const fs = require('fs-extra');
|
|
3
2
|
const path = require('path');
|
|
4
|
-
const CLIUtils = require('../cli-utils');
|
|
5
|
-
const { theme } = CLIUtils;
|
|
6
3
|
|
|
7
4
|
class WindsurfInstaller extends ToolInstaller {
|
|
8
5
|
get key() {
|
|
@@ -20,57 +17,6 @@ class WindsurfInstaller extends ToolInstaller {
|
|
|
20
17
|
get detectPath() {
|
|
21
18
|
return '.windsurf';
|
|
22
19
|
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Override to add frontmatter for Windsurf workflows
|
|
26
|
-
*/
|
|
27
|
-
async installCommands(flowPath, config) {
|
|
28
|
-
const targetCommandsDir = this.commandsDir;
|
|
29
|
-
console.log(theme.dim(` Installing workflows to ${targetCommandsDir}/...`));
|
|
30
|
-
await fs.ensureDir(targetCommandsDir);
|
|
31
|
-
|
|
32
|
-
const commandsSourceDir = path.join(flowPath, 'commands');
|
|
33
|
-
|
|
34
|
-
if (!await fs.pathExists(commandsSourceDir)) {
|
|
35
|
-
console.log(theme.warning(` No commands folder found at ${commandsSourceDir}`));
|
|
36
|
-
return [];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const commandFiles = await fs.readdir(commandsSourceDir);
|
|
40
|
-
const installedFiles = [];
|
|
41
|
-
|
|
42
|
-
for (const cmdFile of commandFiles) {
|
|
43
|
-
if (cmdFile.endsWith('.md')) {
|
|
44
|
-
const sourcePath = path.join(commandsSourceDir, cmdFile);
|
|
45
|
-
const prefix = (config && config.command && config.command.prefix) ? `${config.command.prefix}-` : '';
|
|
46
|
-
|
|
47
|
-
const targetFileName = `specsmd-${prefix}${cmdFile}`;
|
|
48
|
-
const targetPath = path.join(targetCommandsDir, targetFileName);
|
|
49
|
-
|
|
50
|
-
// Extract agent name from target filename (e.g., "specsmd-master-agent.md" -> "specsmd-master-agent")
|
|
51
|
-
const agentName = targetFileName.replace(/\.md$/, '');
|
|
52
|
-
|
|
53
|
-
// Read source content and add Windsurf frontmatter
|
|
54
|
-
let content = await fs.readFile(sourcePath, 'utf8');
|
|
55
|
-
|
|
56
|
-
// Add Windsurf-specific frontmatter if not present
|
|
57
|
-
if (!content.startsWith('---')) {
|
|
58
|
-
const frontmatter = `---
|
|
59
|
-
description: ${agentName}
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
`;
|
|
63
|
-
content = frontmatter + content;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
await fs.writeFile(targetPath, content);
|
|
67
|
-
installedFiles.push(targetFileName);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
CLIUtils.displayStatus('', `Installed ${installedFiles.length} workflows for ${this.name}`, 'success');
|
|
72
|
-
return installedFiles;
|
|
73
|
-
}
|
|
74
20
|
}
|
|
75
21
|
|
|
76
22
|
module.exports = WindsurfInstaller;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specsmd",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Multi-agent orchestration system for AI-native software development. Delivers AI-DLC, Agile, and custom SDLC flows as markdown-based agent systems.",
|
|
5
5
|
"main": "lib/installer.js",
|
|
6
6
|
"bin": {
|