@rpamis/comet 0.1.0

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.
@@ -0,0 +1,387 @@
1
+ /**
2
+ * Init Command
3
+ *
4
+ * Interactive setup for Comet workflow: platform selection, scope (global/project),
5
+ * OpenSpec + Superpowers install, and Comet skill deployment.
6
+ */
7
+ import path from 'path';
8
+ import os from 'os';
9
+ import { fileURLToPath } from 'url';
10
+ import { execSync } from 'child_process';
11
+ import { checkbox, select } from '@inquirer/prompts';
12
+ import { copyFile, fileExists, readJson, ensureDir, readDir } from '../utils/file-system.js';
13
+ import { PLATFORMS } from './platforms.js';
14
+ const __filename = fileURLToPath(import.meta.url);
15
+ const __dirname = path.dirname(__filename);
16
+ /**
17
+ * Resolve the path to the assets directory (shipped with the npm package).
18
+ */
19
+ function getAssetsDir() {
20
+ return path.resolve(__dirname, '..', '..', 'assets');
21
+ }
22
+ /**
23
+ * Get the base directory for a given scope.
24
+ * Global: home directory. Project: project directory.
25
+ */
26
+ function getBaseDir(scope, projectPath) {
27
+ return scope === 'global' ? os.homedir() : projectPath;
28
+ }
29
+ /**
30
+ * Detect which platforms have config directories in the project.
31
+ */
32
+ async function detectPlatforms(projectPath) {
33
+ const detected = new Set();
34
+ for (const platform of PLATFORMS) {
35
+ if (platform.detectionPaths && platform.detectionPaths.length > 0) {
36
+ for (const p of platform.detectionPaths) {
37
+ if (await fileExists(path.join(projectPath, p))) {
38
+ detected.add(platform.id);
39
+ break;
40
+ }
41
+ }
42
+ }
43
+ else {
44
+ const dirPath = path.join(projectPath, platform.skillsDir);
45
+ if (await fileExists(dirPath)) {
46
+ detected.add(platform.id);
47
+ }
48
+ }
49
+ }
50
+ return detected;
51
+ }
52
+ /**
53
+ * Superpowers skill directory names (used for detection).
54
+ */
55
+ const SUPERPOWERS_SKILLS = [
56
+ 'brainstorming',
57
+ 'using-superpowers',
58
+ 'writing-plans',
59
+ 'test-driven-development',
60
+ 'subagent-driven-development',
61
+ ];
62
+ /**
63
+ * Check if skills exist for a component pattern in a platform's skills dir.
64
+ */
65
+ async function hasSkills(baseDir, platform, component) {
66
+ const skillsDir = path.join(baseDir, platform.skillsDir, 'skills');
67
+ const entries = await readDir(skillsDir);
68
+ switch (component) {
69
+ case 'openspec':
70
+ return entries.some((e) => e.startsWith('openspec-'));
71
+ case 'superpowers':
72
+ return SUPERPOWERS_SKILLS.some((name) => entries.includes(name));
73
+ case 'comet':
74
+ return entries.some((e) => e.startsWith('comet'));
75
+ }
76
+ }
77
+ /**
78
+ * Check if a CLI command is available on PATH.
79
+ */
80
+ function isCommandAvailable(command) {
81
+ try {
82
+ const checkCmd = process.platform === 'win32' ? `where ${command}` : `which ${command}`;
83
+ execSync(checkCmd, { stdio: 'pipe' });
84
+ return true;
85
+ }
86
+ catch {
87
+ return false;
88
+ }
89
+ }
90
+ /**
91
+ * Ensure OpenSpec CLI is installed, install it if missing.
92
+ */
93
+ async function ensureOpenSpecCli(scope, projectPath) {
94
+ if (isCommandAvailable('openspec')) {
95
+ return true;
96
+ }
97
+ console.log(` Installing OpenSpec CLI...`);
98
+ try {
99
+ const npmCmd = scope === 'global'
100
+ ? 'npm install -g @fission-ai/openspec@latest'
101
+ : 'npm install @fission-ai/openspec@latest';
102
+ execSync(npmCmd, { cwd: projectPath, stdio: 'pipe', timeout: 120_000 });
103
+ return isCommandAvailable('openspec');
104
+ }
105
+ catch (error) {
106
+ console.error(` Failed to install OpenSpec CLI: ${error.message}`);
107
+ return false;
108
+ }
109
+ }
110
+ /**
111
+ * Install OpenSpec skills for multiple platforms in one call.
112
+ */
113
+ async function installOpenSpec(projectPath, toolIds, scope) {
114
+ const cliReady = await ensureOpenSpecCli(scope, projectPath);
115
+ if (!cliReady) {
116
+ console.error(` OpenSpec CLI not available. Install manually: npm install -g @fission-ai/openspec@latest`);
117
+ return 'failed';
118
+ }
119
+ try {
120
+ const flags = [
121
+ '--tools', toolIds.join(','),
122
+ scope === 'global' ? '--global' : '',
123
+ ].filter(Boolean).join(' ');
124
+ execSync(`openspec init ${flags}`, {
125
+ cwd: projectPath,
126
+ stdio: 'pipe',
127
+ timeout: 120_000,
128
+ });
129
+ return 'installed';
130
+ }
131
+ catch (error) {
132
+ console.error(` OpenSpec init failed: ${error.message}`);
133
+ return 'failed';
134
+ }
135
+ }
136
+ /**
137
+ * Install Superpowers skills for a specific platform.
138
+ */
139
+ async function installSuperpowersForPlatform(projectPath, scope) {
140
+ try {
141
+ const flags = [
142
+ '-y',
143
+ scope === 'global' ? '-g' : '',
144
+ ].filter(Boolean).join(' ');
145
+ execSync(`npx skills add obra/superpowers ${flags}`, {
146
+ cwd: projectPath,
147
+ stdio: 'pipe',
148
+ timeout: 120_000,
149
+ });
150
+ return 'installed';
151
+ }
152
+ catch (error) {
153
+ console.error(` Superpowers install failed: ${error.message}`);
154
+ return 'failed';
155
+ }
156
+ }
157
+ /**
158
+ * Copy Comet skill files from assets to a platform's skills directory.
159
+ */
160
+ async function copyCometSkillsForPlatform(baseDir, platform, overwrite) {
161
+ const assetsDir = getAssetsDir();
162
+ const manifestPath = path.join(assetsDir, 'manifest.json');
163
+ if (!(await fileExists(manifestPath))) {
164
+ throw new Error(`Manifest not found at ${manifestPath}`);
165
+ }
166
+ const manifest = await readJson(manifestPath);
167
+ let copied = 0;
168
+ let skippedCount = 0;
169
+ for (const skillRelPath of manifest.skills) {
170
+ const src = path.join(assetsDir, 'skills', skillRelPath);
171
+ const dest = path.join(baseDir, platform.skillsDir, 'skills', skillRelPath);
172
+ if (!overwrite && (await fileExists(dest))) {
173
+ skippedCount++;
174
+ continue;
175
+ }
176
+ await copyFile(src, dest);
177
+ copied++;
178
+ }
179
+ return { copied, skipped: skippedCount };
180
+ }
181
+ /**
182
+ * Create Superpowers working directories (project-level only).
183
+ */
184
+ async function createWorkingDirs(projectPath) {
185
+ const dirs = [
186
+ path.join(projectPath, 'docs', 'superpowers', 'specs'),
187
+ path.join(projectPath, 'docs', 'superpowers', 'plans'),
188
+ ];
189
+ for (const dir of dirs) {
190
+ await ensureDir(dir);
191
+ }
192
+ }
193
+ /**
194
+ * Prompt user to choose overwrite strategy for an existing installation.
195
+ */
196
+ async function promptOverwriteChoice(componentName, platformName) {
197
+ const answer = await select({
198
+ message: `${componentName} already installed on ${platformName}. What to do?`,
199
+ choices: [
200
+ { name: 'Overwrite', value: 'overwrite' },
201
+ { name: 'Skip', value: 'skip' },
202
+ ],
203
+ });
204
+ return answer;
205
+ }
206
+ /**
207
+ * Interactive installation scope selection.
208
+ */
209
+ async function selectScope(options) {
210
+ if (options.yes) {
211
+ return 'project';
212
+ }
213
+ const scope = await select({
214
+ message: 'Install scope:',
215
+ choices: [
216
+ { name: 'Project (current directory)', value: 'project' },
217
+ { name: 'Global (home directory)', value: 'global' },
218
+ ],
219
+ });
220
+ return scope;
221
+ }
222
+ /**
223
+ * Interactive platform selection.
224
+ */
225
+ async function selectPlatforms(detected, options) {
226
+ const choices = PLATFORMS.map((p) => ({
227
+ name: `${p.name}${detected.has(p.id) ? ' (detected)' : ''}`,
228
+ value: p.id,
229
+ checked: detected.has(p.id),
230
+ }));
231
+ if (options.yes) {
232
+ const selected = [...detected];
233
+ return selected.length > 0 ? selected : PLATFORMS.map((p) => p.id);
234
+ }
235
+ const selected = await checkbox({
236
+ message: 'Select platforms to set up:',
237
+ choices,
238
+ required: true,
239
+ });
240
+ return selected;
241
+ }
242
+ /**
243
+ * Display installation summary.
244
+ */
245
+ function displaySummary(results, scope) {
246
+ const scopeLabel = scope === 'global' ? os.homedir() : 'project';
247
+ console.log(`\n Comet setup complete! (scope: ${scopeLabel})\n`);
248
+ const installed = results.filter((r) => r.openspec === 'installed' || r.superpowers === 'installed' || r.comet === 'installed');
249
+ const skipped = results.filter((r) => r.openspec === 'skipped' && r.superpowers === 'skipped' && r.comet === 'skipped');
250
+ const failed = results.filter((r) => r.openspec === 'failed' || r.superpowers === 'failed');
251
+ if (installed.length > 0) {
252
+ console.log(` Installed:`);
253
+ for (const r of installed) {
254
+ console.log(` ${r.platform.name} -> ${r.platform.skillsDir}/skills/`);
255
+ }
256
+ }
257
+ if (skipped.length > 0) {
258
+ console.log(` Skipped: ${skipped.map((r) => r.platform.name).join(', ')}`);
259
+ }
260
+ if (failed.length > 0) {
261
+ console.log(` Failed: ${failed.map((r) => r.platform.name).join(', ')}`);
262
+ }
263
+ if (scope === 'project') {
264
+ console.log(`\n Working directories: docs/superpowers/specs/, docs/superpowers/plans/`);
265
+ }
266
+ console.log(`\n Get started:`);
267
+ console.log(` /comet "your idea" — Start a new change with full workflow`);
268
+ console.log(` /comet-hotfix — Quick bug fix (skip brainstorming)`);
269
+ console.log(` /comet-tweak — Small change (skip brainstorming and plan)\n`);
270
+ }
271
+ /**
272
+ * Resolve action for a component based on options and existing state.
273
+ */
274
+ function resolveAction(hasExisting, options) {
275
+ if (!hasExisting)
276
+ return 'install';
277
+ if (options.overwrite)
278
+ return 'overwrite';
279
+ if (options.skipExisting)
280
+ return 'skip';
281
+ if (options.yes)
282
+ return 'skip';
283
+ return 'install'; // will be prompted interactively
284
+ }
285
+ /**
286
+ * Main init command.
287
+ */
288
+ const COMET_BANNER = [
289
+ ` ██████╗ ██████╗ ███╗ ███╗███████╗████████╗`,
290
+ ` ██╔════╝██╔═══██╗████╗ ████║██╔════╝╚══██╔══╝`,
291
+ ` ██║ ██║ ██║██╔████╔██║█████╗ ██║ `,
292
+ ` ██║ ██║ ██║██║╚██╔╝██║██╔══╝ ██║ `,
293
+ ` ╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗ ██║ `,
294
+ ` ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ `,
295
+ ` OpenSpec + Superpowers Workflow `,
296
+ ].join('\n');
297
+ export async function initCommand(targetPath, options = {}) {
298
+ const projectPath = path.resolve(targetPath);
299
+ console.log(`\n${COMET_BANNER}\n`);
300
+ console.log(` Setting up Comet in ${projectPath}\n`);
301
+ // Step 1: Detect available platforms
302
+ const detected = await detectPlatforms(projectPath);
303
+ // Step 2: Select scope (global vs project)
304
+ const scope = await selectScope(options);
305
+ // Step 3: Platform selection
306
+ const selectedPlatformIds = await selectPlatforms(detected, options);
307
+ if (selectedPlatformIds.length === 0) {
308
+ console.log('\n No platforms selected. Exiting.\n');
309
+ return;
310
+ }
311
+ const selectedPlatforms = PLATFORMS.filter((p) => selectedPlatformIds.includes(p.id));
312
+ const baseDir = getBaseDir(scope, projectPath);
313
+ const plans = [];
314
+ for (const platform of selectedPlatforms) {
315
+ const hasOS = await hasSkills(baseDir, platform, 'openspec');
316
+ const hasSP = await hasSkills(baseDir, platform, 'superpowers');
317
+ const hasCM = await hasSkills(baseDir, platform, 'comet');
318
+ let osAction = resolveAction(hasOS, options);
319
+ let spAction = resolveAction(hasSP, options);
320
+ let cmAction = resolveAction(hasCM, options);
321
+ // Interactive prompts for existing components
322
+ if (!options.yes) {
323
+ if (osAction === 'install' && hasOS) {
324
+ osAction = await promptOverwriteChoice('OpenSpec', platform.name);
325
+ }
326
+ if (spAction === 'install' && hasSP) {
327
+ spAction = await promptOverwriteChoice('Superpowers', platform.name);
328
+ }
329
+ if (cmAction === 'install' && hasCM) {
330
+ cmAction = await promptOverwriteChoice('Comet', platform.name);
331
+ }
332
+ }
333
+ plans.push({ platform, osAction, spAction, cmAction });
334
+ }
335
+ // Step 5: Install OpenSpec (one call for all platforms that need it)
336
+ const osToolIds = plans
337
+ .filter((p) => p.osAction !== 'skip')
338
+ .map((p) => p.platform.openspecToolId);
339
+ let osGlobalStatus = 'skipped';
340
+ if (osToolIds.length > 0) {
341
+ console.log(`\n Installing OpenSpec for: ${osToolIds.join(', ')}`);
342
+ osGlobalStatus = await installOpenSpec(projectPath, osToolIds, scope);
343
+ console.log(` OpenSpec: ${osGlobalStatus}`);
344
+ }
345
+ else {
346
+ console.log(`\n OpenSpec: all skipped`);
347
+ }
348
+ // Step 6: Install Superpowers (one call, scope-aware)
349
+ const needsSP = plans.some((p) => p.spAction !== 'skip');
350
+ let spGlobalStatus = 'skipped';
351
+ if (needsSP) {
352
+ console.log(`\n Installing Superpowers...`);
353
+ spGlobalStatus = await installSuperpowersForPlatform(projectPath, scope);
354
+ console.log(` Superpowers: ${spGlobalStatus}`);
355
+ }
356
+ else {
357
+ console.log(`\n Superpowers: all skipped`);
358
+ }
359
+ // Step 7: Copy Comet skills (per-platform)
360
+ const results = [];
361
+ for (const plan of plans) {
362
+ const { platform, cmAction } = plan;
363
+ const skillsPath = `${scope === 'global' ? '~/' : ''}${platform.skillsDir}/skills/`;
364
+ let cmStatus = 'skipped';
365
+ if (cmAction !== 'skip') {
366
+ const { copied } = await copyCometSkillsForPlatform(baseDir, platform, cmAction === 'overwrite');
367
+ cmStatus = copied > 0 ? 'installed' : 'skipped';
368
+ console.log(` Comet -> ${platform.name}: ${cmStatus} (${copied} files) -> ${skillsPath}`);
369
+ }
370
+ else {
371
+ console.log(` Comet -> ${platform.name}: skipped (already exists)`);
372
+ }
373
+ results.push({
374
+ platform,
375
+ openspec: osToolIds.includes(platform.openspecToolId) ? osGlobalStatus : 'skipped',
376
+ superpowers: plan.spAction !== 'skip' ? spGlobalStatus : 'skipped',
377
+ comet: cmStatus,
378
+ });
379
+ }
380
+ // Step 8: Create working directories (project-level only)
381
+ if (scope === 'project') {
382
+ await createWorkingDirs(projectPath);
383
+ }
384
+ // Step 9: Summary
385
+ displaySummary(results, scope);
386
+ }
387
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/core/init.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAA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AC;QACxC,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;YACxB,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,0BAA0B,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,KAAK,WAAW,CAAC,CAAC;YACjG,QAAQ,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YAChD,OAAO,CAAC,GAAG,CAAC,cAAc,QAAQ,CAAC,IAAI,KAAK,QAAQ,KAAK,MAAM,cAAc,UAAU,EAAE,CAAC,CAAC;QAC7F,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,cAAc,QAAQ,CAAC,IAAI,4BAA4B,CAAC,CAAC;QACvE,CAAC;QAED,OAAO,CAAC,IAAI,CAAC;YACX,QAAQ;YACR,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS;YAClF,WAAW,EAAE,IAAI,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS;YAClE,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;IACL,CAAC;IAED,0DAA0D;IAC1D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAED,kBAAkB;IAClB,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Platform Definitions
3
+ *
4
+ * Supported AI coding platforms, mirroring OpenSpec's AI_TOOLS config.
5
+ * Reference: OpenSpec/src/core/config.ts
6
+ */
7
+ export interface Platform {
8
+ id: string;
9
+ name: string;
10
+ skillsDir: string;
11
+ detectionPaths?: string[];
12
+ openspecToolId: string;
13
+ }
14
+ export declare const PLATFORMS: Platform[];
15
+ //# sourceMappingURL=platforms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platforms.d.ts","sourceRoot":"","sources":["../../src/core/platforms.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,SAAS,EAAE,QAAQ,EAmC/B,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Platform Definitions
3
+ *
4
+ * Supported AI coding platforms, mirroring OpenSpec's AI_TOOLS config.
5
+ * Reference: OpenSpec/src/core/config.ts
6
+ */
7
+ export const PLATFORMS = [
8
+ { id: 'claude', name: 'Claude Code', skillsDir: '.claude', openspecToolId: 'claude' },
9
+ { id: 'cursor', name: 'Cursor', skillsDir: '.cursor', openspecToolId: 'cursor' },
10
+ { id: 'codex', name: 'Codex', skillsDir: '.codex', openspecToolId: 'codex' },
11
+ { id: 'opencode', name: 'OpenCode', skillsDir: '.opencode', openspecToolId: 'opencode' },
12
+ { id: 'windsurf', name: 'Windsurf', skillsDir: '.windsurf', openspecToolId: 'windsurf' },
13
+ { id: 'cline', name: 'Cline', skillsDir: '.cline', openspecToolId: 'cline' },
14
+ { id: 'roocode', name: 'RooCode', skillsDir: '.roo', openspecToolId: 'roocode' },
15
+ { id: 'continue', name: 'Continue', skillsDir: '.continue', openspecToolId: 'continue' },
16
+ {
17
+ id: 'github-copilot',
18
+ name: 'GitHub Copilot',
19
+ skillsDir: '.github',
20
+ detectionPaths: ['.github/copilot-instructions.md', '.github/instructions', '.github/prompts', '.github/skills'],
21
+ openspecToolId: 'github-copilot',
22
+ },
23
+ { id: 'gemini', name: 'Gemini CLI', skillsDir: '.gemini', openspecToolId: 'gemini' },
24
+ { id: 'amazon-q', name: 'Amazon Q Developer', skillsDir: '.amazonq', openspecToolId: 'amazon-q' },
25
+ { id: 'qwen', name: 'Qwen Code', skillsDir: '.qwen', openspecToolId: 'qwen' },
26
+ { id: 'kilocode', name: 'Kilo Code', skillsDir: '.kilocode', openspecToolId: 'kilocode' },
27
+ { id: 'auggie', name: 'Auggie (Augment CLI)', skillsDir: '.augment', openspecToolId: 'auggie' },
28
+ { id: 'kiro', name: 'Kiro', skillsDir: '.kiro', openspecToolId: 'kiro' },
29
+ { id: 'lingma', name: 'Lingma', skillsDir: '.lingma', openspecToolId: 'lingma' },
30
+ { id: 'junie', name: 'Junie', skillsDir: '.junie', openspecToolId: 'junie' },
31
+ { id: 'codebuddy', name: 'CodeBuddy Code', skillsDir: '.codebuddy', openspecToolId: 'codebuddy' },
32
+ { id: 'costrict', name: 'CoStrict', skillsDir: '.cospec', openspecToolId: 'costrict' },
33
+ { id: 'crush', name: 'Crush', skillsDir: '.crush', openspecToolId: 'crush' },
34
+ { id: 'factory', name: 'Factory Droid', skillsDir: '.factory', openspecToolId: 'factory' },
35
+ { id: 'iflow', name: 'iFlow', skillsDir: '.iflow', openspecToolId: 'iflow' },
36
+ { id: 'pi', name: 'Pi', skillsDir: '.pi', openspecToolId: 'pi' },
37
+ { id: 'qoder', name: 'Qoder', skillsDir: '.qoder', openspecToolId: 'qoder' },
38
+ { id: 'antigravity', name: 'Antigravity', skillsDir: '.agent', openspecToolId: 'antigravity' },
39
+ { id: 'bob', name: 'Bob Shell', skillsDir: '.bob', openspecToolId: 'bob' },
40
+ { id: 'forgecode', name: 'ForgeCode', skillsDir: '.forge', openspecToolId: 'forgecode' },
41
+ { id: 'trae', name: 'Trae', skillsDir: '.trae', openspecToolId: 'trae' },
42
+ ];
43
+ //# sourceMappingURL=platforms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platforms.js","sourceRoot":"","sources":["../../src/core/platforms.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,MAAM,CAAC,MAAM,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AE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE;IAC5E,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE;IAChE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE;IAC5E,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE;IAC9F,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE;IAC1E,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE;IACxF,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE;CACzE,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Ensure a directory exists, creating it recursively if needed.
3
+ */
4
+ export declare function ensureDir(dir: string): Promise<void>;
5
+ /**
6
+ * Copy a file from src to dest, creating parent directories if needed.
7
+ */
8
+ export declare function copyFile(src: string, dest: string): Promise<void>;
9
+ /**
10
+ * Check if a file or directory exists.
11
+ */
12
+ export declare function fileExists(filePath: string): Promise<boolean>;
13
+ /**
14
+ * Read and parse a JSON file.
15
+ */
16
+ export declare function readJson<T = unknown>(filePath: string): Promise<T>;
17
+ /**
18
+ * Write content to a file, creating parent directories if needed.
19
+ */
20
+ export declare function writeFile(filePath: string, content: string): Promise<void>;
21
+ /**
22
+ * List entries in a directory. Returns empty array if directory doesn't exist.
23
+ */
24
+ export declare function readDir(dirPath: string): Promise<string[]>;
25
+ //# sourceMappingURL=file-system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.d.ts","sourceRoot":"","sources":["../../src/utils/file-system.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1D;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvE;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOnE;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAGxE;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhF;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAMhE"}
@@ -0,0 +1,53 @@
1
+ import { promises as fs } from 'fs';
2
+ import path from 'path';
3
+ /**
4
+ * Ensure a directory exists, creating it recursively if needed.
5
+ */
6
+ export async function ensureDir(dir) {
7
+ await fs.mkdir(dir, { recursive: true });
8
+ }
9
+ /**
10
+ * Copy a file from src to dest, creating parent directories if needed.
11
+ */
12
+ export async function copyFile(src, dest) {
13
+ await ensureDir(path.dirname(dest));
14
+ await fs.copyFile(src, dest);
15
+ }
16
+ /**
17
+ * Check if a file or directory exists.
18
+ */
19
+ export async function fileExists(filePath) {
20
+ try {
21
+ await fs.access(filePath);
22
+ return true;
23
+ }
24
+ catch {
25
+ return false;
26
+ }
27
+ }
28
+ /**
29
+ * Read and parse a JSON file.
30
+ */
31
+ export async function readJson(filePath) {
32
+ const content = await fs.readFile(filePath, 'utf-8');
33
+ return JSON.parse(content);
34
+ }
35
+ /**
36
+ * Write content to a file, creating parent directories if needed.
37
+ */
38
+ export async function writeFile(filePath, content) {
39
+ await ensureDir(path.dirname(filePath));
40
+ await fs.writeFile(filePath, content, 'utf-8');
41
+ }
42
+ /**
43
+ * List entries in a directory. Returns empty array if directory doesn't exist.
44
+ */
45
+ export async function readDir(dirPath) {
46
+ try {
47
+ return await fs.readdir(dirPath);
48
+ }
49
+ catch {
50
+ return [];
51
+ }
52
+ }
53
+ //# sourceMappingURL=file-system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.js","sourceRoot":"","sources":["../../src/utils/file-system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,GAAW;IACzC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,GAAW,EAAE,IAAY;IACtD,MAAM,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACpC,MAAM,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,QAAgB;IAC/C,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAc,QAAgB;IAC1D,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAM,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,QAAgB,EAAE,OAAe;IAC/D,MAAM,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxC,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,OAAe;IAC3C,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@rpamis/comet",
3
+ "version": "0.1.0",
4
+ "description": "OpenSpec + Superpowers dual-star development workflow",
5
+ "keywords": [
6
+ "comet",
7
+ "openspec",
8
+ "superpowers",
9
+ "skills",
10
+ "workflow"
11
+ ],
12
+ "license": "MIT",
13
+ "author": "benym",
14
+ "type": "module",
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "bin": {
19
+ "comet": "./bin/comet.js"
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "bin",
24
+ "assets",
25
+ "scripts/postinstall.js",
26
+ "!dist/**/*.test.js",
27
+ "!dist/**/__tests__"
28
+ ],
29
+ "scripts": {
30
+ "build": "node build.js",
31
+ "dev": "tsc --watch",
32
+ "test": "vitest run",
33
+ "test:watch": "vitest",
34
+ "prepare": "pnpm run build",
35
+ "prepublishOnly": "pnpm run build",
36
+ "postinstall": "node scripts/postinstall.js"
37
+ },
38
+ "engines": {
39
+ "node": ">=18"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "^24.2.0",
43
+ "typescript": "^5.9.3",
44
+ "vitest": "^3.2.4"
45
+ },
46
+ "dependencies": {
47
+ "@inquirer/prompts": "^8.4.3",
48
+ "commander": "^14.0.0"
49
+ }
50
+ }
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Postinstall script that hints about comet init.
5
+ *
6
+ * The tip is suppressed when:
7
+ * - CI=true environment variable is set
8
+ * - COMET_NO_HINTS=1 environment variable is set
9
+ * - dist/ directory doesn't exist (dev setup scenario)
10
+ */
11
+
12
+ import { promises as fs } from 'fs';
13
+ import path from 'path';
14
+ import { fileURLToPath } from 'url';
15
+
16
+ const __filename = fileURLToPath(import.meta.url);
17
+ const __dirname = path.dirname(__filename);
18
+
19
+ function shouldSkip() {
20
+ if (process.env.CI === 'true' || process.env.CI === '1') return true;
21
+ if (process.env.COMET_NO_HINTS === '1') return true;
22
+ return false;
23
+ }
24
+
25
+ async function distExists() {
26
+ try {
27
+ const stat = await fs.stat(path.join(__dirname, '..', 'dist'));
28
+ return stat.isDirectory();
29
+ } catch {
30
+ return false;
31
+ }
32
+ }
33
+
34
+ async function main() {
35
+ try {
36
+ if (shouldSkip()) return;
37
+ if (!(await distExists())) return;
38
+ console.log(`\nTip: Run 'comet init' to set up Comet workflow in your project`);
39
+ } catch {
40
+ // Never break npm install
41
+ }
42
+ }
43
+
44
+ main().catch(() => process.exit(0));