@ikunin/sprintpilot 1.0.1 → 1.0.2
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/README.md +2 -2
- package/_Sprintpilot/lib/runtime/args.js +0 -2
- package/_Sprintpilot/lib/runtime/git.js +0 -2
- package/_Sprintpilot/lib/runtime/http.js +12 -5
- package/_Sprintpilot/lib/runtime/log.js +0 -2
- package/_Sprintpilot/lib/runtime/secrets.js +14 -16
- package/_Sprintpilot/lib/runtime/spawn.js +21 -8
- package/_Sprintpilot/lib/runtime/text.js +0 -2
- package/_Sprintpilot/lib/runtime/yaml-lite.js +9 -5
- package/_Sprintpilot/manifest.yaml +1 -1
- package/_Sprintpilot/scripts/create-pr.js +76 -38
- package/_Sprintpilot/scripts/detect-platform.js +35 -10
- package/_Sprintpilot/scripts/health-check.js +17 -8
- package/_Sprintpilot/scripts/lint-changed.js +35 -16
- package/_Sprintpilot/scripts/lock.js +22 -6
- package/_Sprintpilot/scripts/sanitize-branch.js +4 -2
- package/_Sprintpilot/scripts/stage-and-commit.js +15 -7
- package/_Sprintpilot/scripts/sync-status.js +16 -6
- package/bin/sprintpilot.js +11 -4
- package/lib/commands/check-update.js +0 -2
- package/lib/commands/install.js +139 -49
- package/lib/commands/uninstall.js +21 -11
- package/lib/core/bmad-config.js +0 -2
- package/lib/core/file-ops.js +6 -6
- package/lib/core/gitignore.js +0 -2
- package/lib/core/markers.js +5 -3
- package/lib/core/tool-registry.js +19 -21
- package/lib/core/update-check.js +0 -2
- package/lib/core/v1-detect.js +0 -2
- package/lib/prompts.js +0 -2
- package/lib/substitute.js +1 -5
- package/package.json +1 -1
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
const path = require('node:path');
|
|
4
2
|
const { execFile } = require('node:child_process');
|
|
5
3
|
const { promisify } = require('node:util');
|
|
6
4
|
const fs = require('fs-extra');
|
|
7
5
|
const pc = require('picocolors');
|
|
8
6
|
|
|
9
|
-
const { ALL_TOOLS, getToolDir, getSystemPromptFile, getSystemPromptMode } = require('../core/tool-registry');
|
|
10
|
-
const { stripBlock, hasBlock, writeAtomic } = require('../core/markers');
|
|
11
7
|
const {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
ALL_TOOLS,
|
|
9
|
+
getToolDir,
|
|
10
|
+
getSystemPromptFile,
|
|
11
|
+
getSystemPromptMode,
|
|
12
|
+
} = require('../core/tool-registry');
|
|
13
|
+
const { stripBlock, hasBlock, writeAtomic } = require('../core/markers');
|
|
14
|
+
const { V1_ADDON_DIR_NAME, V1_SKILL_NAMES, detectV1Installation } = require('../core/v1-detect');
|
|
16
15
|
|
|
17
16
|
const execFileAsync = promisify(execFile);
|
|
18
17
|
const ADDON_DIR = path.resolve(__dirname, '..', '..', '_Sprintpilot');
|
|
@@ -46,7 +45,10 @@ async function removeSystemPrompt(tool, projectRoot) {
|
|
|
46
45
|
if (await fs.pathExists(claudeFile)) {
|
|
47
46
|
const content = await fs.readFile(claudeFile, 'utf8');
|
|
48
47
|
if (content.includes('@AGENTS.md')) {
|
|
49
|
-
const newContent = content
|
|
48
|
+
const newContent = content
|
|
49
|
+
.split(/\r?\n/)
|
|
50
|
+
.filter((l) => !l.includes('@AGENTS.md'))
|
|
51
|
+
.join('\n');
|
|
50
52
|
if (!newContent.trim()) {
|
|
51
53
|
await fs.remove(claudeFile);
|
|
52
54
|
console.log(`${tool}: removed CLAUDE.md (was Sprintpilot-only)`);
|
|
@@ -200,7 +202,11 @@ async function runUninstall(options = {}) {
|
|
|
200
202
|
} else {
|
|
201
203
|
const legacyAddonDir = path.join(projectRoot, V1_ADDON_DIR_NAME);
|
|
202
204
|
if (await fs.pathExists(legacyAddonDir)) {
|
|
203
|
-
console.log(
|
|
205
|
+
console.log(
|
|
206
|
+
pc.yellow(
|
|
207
|
+
`Skipped ${V1_ADDON_DIR_NAME}/ — no v1 signature found (not a Sprintpilot v1 artifact).`,
|
|
208
|
+
),
|
|
209
|
+
);
|
|
204
210
|
}
|
|
205
211
|
}
|
|
206
212
|
|
|
@@ -212,7 +218,11 @@ async function runUninstall(options = {}) {
|
|
|
212
218
|
}
|
|
213
219
|
|
|
214
220
|
console.log('');
|
|
215
|
-
console.log(
|
|
221
|
+
console.log(
|
|
222
|
+
pc.green(
|
|
223
|
+
`Sprintpilot uninstalled (${totalRemoved} skills removed). BMad Method skills are unaffected.`,
|
|
224
|
+
),
|
|
225
|
+
);
|
|
216
226
|
}
|
|
217
227
|
|
|
218
228
|
module.exports = { runUninstall };
|
package/lib/core/bmad-config.js
CHANGED
package/lib/core/file-ops.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
const path = require('node:path');
|
|
4
2
|
const fs = require('fs-extra');
|
|
5
3
|
const { isTextFile, renderString } = require('../substitute');
|
|
@@ -43,7 +41,11 @@ async function copyDirWithSubstitution(src, dest, ctx, { dryRun = false } = {})
|
|
|
43
41
|
// chmod best-effort
|
|
44
42
|
}
|
|
45
43
|
} else {
|
|
46
|
-
await fs.copy(file, target, {
|
|
44
|
+
await fs.copy(file, target, {
|
|
45
|
+
overwrite: true,
|
|
46
|
+
dereference: false,
|
|
47
|
+
preserveTimestamps: false,
|
|
48
|
+
});
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -71,9 +73,7 @@ async function pruneBackups(backupDir, skillName, max = 3) {
|
|
|
71
73
|
if (!(await fs.pathExists(backupDir))) return;
|
|
72
74
|
const prefix = `${skillName}.`;
|
|
73
75
|
const entries = await fs.readdir(backupDir);
|
|
74
|
-
const matches = entries
|
|
75
|
-
.filter((e) => e.startsWith(prefix))
|
|
76
|
-
.sort();
|
|
76
|
+
const matches = entries.filter((e) => e.startsWith(prefix)).sort();
|
|
77
77
|
if (matches.length <= max) return;
|
|
78
78
|
const toRemove = matches.slice(0, matches.length - max);
|
|
79
79
|
for (const name of toRemove) {
|
package/lib/core/gitignore.js
CHANGED
package/lib/core/markers.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
const path = require('node:path');
|
|
4
2
|
const crypto = require('node:crypto');
|
|
5
3
|
const fs = require('fs-extra');
|
|
@@ -105,7 +103,11 @@ async function writeAtomic(filePath, content) {
|
|
|
105
103
|
await fs.writeFile(tmp, content, 'utf8');
|
|
106
104
|
await fs.move(tmp, filePath, { overwrite: true });
|
|
107
105
|
} catch (e) {
|
|
108
|
-
try {
|
|
106
|
+
try {
|
|
107
|
+
await fs.remove(tmp);
|
|
108
|
+
} catch {
|
|
109
|
+
/* best effort */
|
|
110
|
+
}
|
|
109
111
|
throw e;
|
|
110
112
|
}
|
|
111
113
|
}
|
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
const TOOL_DIRS = {
|
|
4
2
|
'claude-code': '.claude',
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
cursor: '.cursor',
|
|
4
|
+
windsurf: '.windsurf',
|
|
5
|
+
cline: '.cline',
|
|
6
|
+
roo: '.roo',
|
|
7
|
+
trae: '.trae',
|
|
8
|
+
kiro: '.kiro',
|
|
11
9
|
'github-copilot': '.github/copilot',
|
|
12
10
|
'gemini-cli': '.gemini',
|
|
13
11
|
};
|
|
14
12
|
|
|
15
13
|
const SYSTEM_PROMPT_FILES = {
|
|
16
14
|
'claude-code': 'AGENTS.md',
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
cursor: '.cursor/rules/bmad.md',
|
|
16
|
+
windsurf: '.windsurfrules',
|
|
17
|
+
cline: '.clinerules',
|
|
18
|
+
roo: '.roo/rules/bmad.md',
|
|
21
19
|
'gemini-cli': 'GEMINI.md',
|
|
22
20
|
'github-copilot': '.github/copilot-instructions.md',
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
kiro: '.kiro/rules/bmad.md',
|
|
22
|
+
trae: '.trae/rules/bmad.md',
|
|
25
23
|
};
|
|
26
24
|
|
|
27
25
|
const SYSTEM_PROMPT_MODES = {
|
|
28
26
|
'claude-code': 'claude-code',
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
cursor: 'own-file',
|
|
28
|
+
roo: 'own-file',
|
|
29
|
+
kiro: 'own-file',
|
|
30
|
+
trae: 'own-file',
|
|
31
|
+
windsurf: 'append',
|
|
32
|
+
cline: 'append',
|
|
35
33
|
'gemini-cli': 'append',
|
|
36
34
|
'github-copilot': 'append',
|
|
37
35
|
};
|
|
@@ -61,7 +59,7 @@ function getSystemPromptMode(tool) {
|
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
function isKnownTool(tool) {
|
|
64
|
-
return Object.
|
|
62
|
+
return Object.hasOwn(TOOL_DIRS, tool);
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
module.exports = {
|
package/lib/core/update-check.js
CHANGED
package/lib/core/v1-detect.js
CHANGED
package/lib/prompts.js
CHANGED
package/lib/substitute.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
const path = require('node:path');
|
|
4
2
|
|
|
5
|
-
const TEXT_EXTENSIONS = new Set([
|
|
6
|
-
'.md', '.yaml', '.yml', '.json', '.sh', '.txt',
|
|
7
|
-
]);
|
|
3
|
+
const TEXT_EXTENSIONS = new Set(['.md', '.yaml', '.yml', '.json', '.sh', '.txt']);
|
|
8
4
|
|
|
9
5
|
function isTextFile(filePath) {
|
|
10
6
|
return TEXT_EXTENSIONS.has(path.extname(filePath).toLowerCase());
|
package/package.json
CHANGED