@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.
@@ -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
- V1_ADDON_DIR_NAME,
13
- V1_SKILL_NAMES,
14
- detectV1Installation,
15
- } = require('../core/v1-detect');
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.split(/\r?\n/).filter((l) => !l.includes('@AGENTS.md')).join('\n');
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(pc.yellow(`Skipped ${V1_ADDON_DIR_NAME}/ — no v1 signature found (not a Sprintpilot v1 artifact).`));
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(pc.green(`Sprintpilot uninstalled (${totalRemoved} skills removed). BMad Method skills are unaffected.`));
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 };
@@ -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 yaml = require('js-yaml');
@@ -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, { overwrite: true, dereference: false, preserveTimestamps: false });
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) {
@@ -1,5 +1,3 @@
1
- 'use strict';
2
-
3
1
  const path = require('node:path');
4
2
  const fs = require('fs-extra');
5
3
 
@@ -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 { await fs.remove(tmp); } catch { /* best effort */ }
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
- 'cursor': '.cursor',
6
- 'windsurf': '.windsurf',
7
- 'cline': '.cline',
8
- 'roo': '.roo',
9
- 'trae': '.trae',
10
- 'kiro': '.kiro',
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
- 'cursor': '.cursor/rules/bmad.md',
18
- 'windsurf': '.windsurfrules',
19
- 'cline': '.clinerules',
20
- 'roo': '.roo/rules/bmad.md',
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
- 'kiro': '.kiro/rules/bmad.md',
24
- 'trae': '.trae/rules/bmad.md',
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
- 'cursor': 'own-file',
30
- 'roo': 'own-file',
31
- 'kiro': 'own-file',
32
- 'trae': 'own-file',
33
- 'windsurf': 'append',
34
- 'cline': 'append',
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.prototype.hasOwnProperty.call(TOOL_DIRS, tool);
62
+ return Object.hasOwn(TOOL_DIRS, tool);
65
63
  }
66
64
 
67
65
  module.exports = {
@@ -1,5 +1,3 @@
1
- 'use strict';
2
-
3
1
  const { execFile } = require('node:child_process');
4
2
  const semver = require('semver');
5
3
 
@@ -1,5 +1,3 @@
1
- 'use strict';
2
-
3
1
  const path = require('node:path');
4
2
  const fs = require('fs-extra');
5
3
 
package/lib/prompts.js CHANGED
@@ -1,5 +1,3 @@
1
- 'use strict';
2
-
3
1
  let clackPromise;
4
2
 
5
3
  function loadClack() {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikunin/sprintpilot",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Sprintpilot — autopilot and multi-agent addon for BMad Method v6: git workflow, parallel agents, autonomous story execution",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {