fraim-framework 1.0.5 ā 1.0.7
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/package.json +1 -1
- package/setup.js +64 -19
package/package.json
CHANGED
package/setup.js
CHANGED
|
@@ -128,6 +128,30 @@ function createGitHubLabels() {
|
|
|
128
128
|
logSuccess('GitHub labels created');
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
function createLabelsConfigFile() {
|
|
132
|
+
const labels = [
|
|
133
|
+
{ name: 'phase:design', color: '0e8a16', description: 'Design phase - RFC creation and review' },
|
|
134
|
+
{ name: 'phase:impl', color: '1d76db', description: 'Implementation phase - coding and testing' },
|
|
135
|
+
{ name: 'phase:tests', color: 'fef2c0', description: 'Testing phase - validation and QA' },
|
|
136
|
+
{ name: 'status:wip', color: 'fbca04', description: 'Work in progress' },
|
|
137
|
+
{ name: 'status:needs-review', color: 'd93f0b', description: 'Ready for review' },
|
|
138
|
+
{ name: 'status:complete', color: '0e8a16', description: 'Completed and approved' },
|
|
139
|
+
{ name: 'status:approved', color: '0e8a16', description: 'Approved and ready to merge' },
|
|
140
|
+
{ name: 'status:changes-requested', color: 'd93f0b', description: 'Changes requested in review' },
|
|
141
|
+
{ name: 'ai-agent:cursor', color: '5319e7', description: 'Assigned to Cursor AI agent' },
|
|
142
|
+
{ name: 'ai-agent:claude', color: 'c2e0c6', description: 'Assigned to Claude AI agent' },
|
|
143
|
+
{ name: 'ai-agent:windsurf', color: 'bfdadc', description: 'Assigned to Windsurf AI agent' }
|
|
144
|
+
];
|
|
145
|
+
|
|
146
|
+
const labelsContent = JSON.stringify(labels, null, 2);
|
|
147
|
+
writeFile('.github/labels.json', labelsContent);
|
|
148
|
+
|
|
149
|
+
logSuccess('GitHub labels configuration file created');
|
|
150
|
+
logInfo('You can import these labels using:');
|
|
151
|
+
logInfo('1. GitHub web interface: Settings > Labels > Import labels');
|
|
152
|
+
logInfo('2. Or manually create each label with the provided colors and descriptions');
|
|
153
|
+
}
|
|
154
|
+
|
|
131
155
|
function createGitHubWorkflows() {
|
|
132
156
|
// Phase change workflow
|
|
133
157
|
const phaseChangeWorkflow = `name: Phase Change Automation
|
|
@@ -224,29 +248,35 @@ jobs:
|
|
|
224
248
|
}
|
|
225
249
|
|
|
226
250
|
function createAgentFolders() {
|
|
251
|
+
// Get the directory where this script is located (FRAIM package directory)
|
|
252
|
+
const fraimDir = __dirname;
|
|
253
|
+
|
|
227
254
|
// Create .cursor folder at top level with all contents
|
|
228
|
-
|
|
229
|
-
|
|
255
|
+
const cursorSrc = path.join(fraimDir, 'agents', 'cursor');
|
|
256
|
+
if (fs.existsSync(cursorSrc)) {
|
|
257
|
+
copyDirectory(cursorSrc, '.cursor');
|
|
230
258
|
logSuccess('Created .cursor folder with all contents');
|
|
231
259
|
} else {
|
|
232
|
-
logWarning(
|
|
260
|
+
logWarning(`agents/cursor directory not found at ${cursorSrc}, skipping .cursor creation`);
|
|
233
261
|
}
|
|
234
262
|
|
|
235
263
|
// Create .windsurf folder at top level with all contents
|
|
236
|
-
|
|
237
|
-
|
|
264
|
+
const windsurfSrc = path.join(fraimDir, 'agents', 'windsurf');
|
|
265
|
+
if (fs.existsSync(windsurfSrc)) {
|
|
266
|
+
copyDirectory(windsurfSrc, '.windsurf');
|
|
238
267
|
logSuccess('Created .windsurf folder with all contents');
|
|
239
268
|
} else {
|
|
240
|
-
logWarning(
|
|
269
|
+
logWarning(`agents/windsurf directory not found at ${windsurfSrc}, skipping .windsurf creation`);
|
|
241
270
|
}
|
|
242
271
|
|
|
243
272
|
// Create CLAUDE.md at top level
|
|
244
|
-
|
|
245
|
-
|
|
273
|
+
const claudeSrc = path.join(fraimDir, 'agents', 'claude', 'CLAUDE.md');
|
|
274
|
+
if (fs.existsSync(claudeSrc)) {
|
|
275
|
+
const claudeContent = fs.readFileSync(claudeSrc, 'utf8');
|
|
246
276
|
writeFile('CLAUDE.md', claudeContent);
|
|
247
277
|
logSuccess('Created CLAUDE.md at top level');
|
|
248
278
|
} else {
|
|
249
|
-
logWarning(
|
|
279
|
+
logWarning(`agents/claude/CLAUDE.md not found at ${claudeSrc}, skipping CLAUDE.md creation`);
|
|
250
280
|
}
|
|
251
281
|
}
|
|
252
282
|
|
|
@@ -259,13 +289,16 @@ async function runWizard() {
|
|
|
259
289
|
logStep('Step 1: Checking Prerequisites');
|
|
260
290
|
|
|
261
291
|
// Check if gh CLI is available
|
|
292
|
+
let ghAvailable = false;
|
|
262
293
|
try {
|
|
263
294
|
execSync('gh --version', { stdio: 'pipe' });
|
|
264
295
|
logSuccess('GitHub CLI (gh) is available');
|
|
296
|
+
ghAvailable = true;
|
|
265
297
|
} catch (error) {
|
|
266
|
-
|
|
267
|
-
logInfo('
|
|
268
|
-
|
|
298
|
+
logWarning('GitHub CLI (gh) is not installed or not available');
|
|
299
|
+
logInfo('You can still set up FRAIM, but GitHub labels will need to be created manually');
|
|
300
|
+
logInfo('Install GitHub CLI: https://cli.github.com/');
|
|
301
|
+
ghAvailable = false;
|
|
269
302
|
}
|
|
270
303
|
|
|
271
304
|
// Check if we're in a git repository
|
|
@@ -301,12 +334,17 @@ async function runWizard() {
|
|
|
301
334
|
|
|
302
335
|
// Step 4: GitHub Labels
|
|
303
336
|
logStep('Step 4: GitHub Labels');
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
337
|
+
if (ghAvailable) {
|
|
338
|
+
const setupLabels = await askQuestion('Would you like to create GitHub labels for FRAIM?', 'y');
|
|
339
|
+
|
|
340
|
+
if (setupLabels === 'y' || setupLabels === 'yes') {
|
|
341
|
+
createGitHubLabels();
|
|
342
|
+
} else {
|
|
343
|
+
logInfo('Skipping GitHub label setup');
|
|
344
|
+
}
|
|
308
345
|
} else {
|
|
309
|
-
logInfo('
|
|
346
|
+
logInfo('GitHub CLI not available - creating labels configuration file instead');
|
|
347
|
+
createLabelsConfigFile();
|
|
310
348
|
}
|
|
311
349
|
|
|
312
350
|
// Step 5: Summary
|
|
@@ -315,8 +353,15 @@ async function runWizard() {
|
|
|
315
353
|
logSuccess('FRAIM has been successfully set up in your repository!');
|
|
316
354
|
logInfo('Next steps:');
|
|
317
355
|
logInfo('1. Commit and push these files to GitHub');
|
|
318
|
-
|
|
319
|
-
|
|
356
|
+
|
|
357
|
+
if (ghAvailable) {
|
|
358
|
+
logInfo('2. GitHub labels have been created automatically');
|
|
359
|
+
} else {
|
|
360
|
+
logInfo('2. Import GitHub labels from .github/labels.json using the web interface');
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
logInfo('3. Create your first issue with phase labels');
|
|
364
|
+
logInfo('4. Start coordinating your AI agents!');
|
|
320
365
|
|
|
321
366
|
logInfo('\nš Learn more about FRAIM:');
|
|
322
367
|
logInfo('https://github.com/mathursrus/Ashley-Calendar-AI/tree/master/FRAIM');
|