multi-agents-cli 1.1.28 → 1.1.30
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/core/workflow/agent.js
CHANGED
|
@@ -1315,7 +1315,26 @@ const main = async () => {
|
|
|
1315
1315
|
fs.writeFileSync(path.join(beWorktreePath, '.claude-scope'), beScope, 'utf8');
|
|
1316
1316
|
|
|
1317
1317
|
const beTask = AGENT_DESCRIPTIONS.backend?.INIT || 'scaffolds backend architecture, folder structure, DB setup, wiring config and contracts';
|
|
1318
|
-
const
|
|
1318
|
+
const beRemoteSetupNeeded = fs.existsSync(path.join(ROOT, '.scaffold', '.remote-setup-needed'));
|
|
1319
|
+
const beRemoteSetupSection = beRemoteSetupNeeded ? `
|
|
1320
|
+
---
|
|
1321
|
+
|
|
1322
|
+
## ⚠ Pre-Task: Remote Setup Required
|
|
1323
|
+
This project has no GitHub remote configured yet.
|
|
1324
|
+
Complete ALL steps below BEFORE starting task implementation.
|
|
1325
|
+
|
|
1326
|
+
- [ ] Check: \`git remote get-url origin\`
|
|
1327
|
+
- [ ] Detect gh CLI: \`gh auth status\`
|
|
1328
|
+
- [ ] Configure remote (gh create or manual - see Root CLAUDE.md)
|
|
1329
|
+
- [ ] Validate: \`git ls-remote origin HEAD\`
|
|
1330
|
+
- [ ] Push: \`git push -u origin main\`
|
|
1331
|
+
- [ ] Delete \`.scaffold/.remote-setup-needed\`
|
|
1332
|
+
|
|
1333
|
+
Mark each step complete. Only proceed to the task below when all are checked.
|
|
1334
|
+
|
|
1335
|
+
---
|
|
1336
|
+
` : '';
|
|
1337
|
+
const beTaskMd = generateTaskMd({ project: 'backend', agent: 'INIT', task: beTask, branchName: beBranchName, contextSection: '', remoteSetupSection: beRemoteSetupSection });
|
|
1319
1338
|
fs.writeFileSync(path.join(beWorktreePath, 'TASK.md'), beTaskMd, 'utf8');
|
|
1320
1339
|
|
|
1321
1340
|
const bePkg = {
|
|
@@ -1334,6 +1353,34 @@ const main = async () => {
|
|
|
1334
1353
|
const beGitignore = ['# Framework files — never commit these to the agent branch', 'package.json', '.claude-scope', 'scope.json', 'TASK.md', '.vscode/', '.idea/', '.zed/', 'node_modules/'].join('\n') + '\n';
|
|
1335
1354
|
fs.writeFileSync(path.join(beWorktreePath, '.gitignore'), beGitignore, 'utf8');
|
|
1336
1355
|
|
|
1356
|
+
// IDE settings for backend/INIT worktree
|
|
1357
|
+
const beFoldersToHide = ['client/', 'shared/', 'worktrees/', '.scaffold/', '.workflow/', 'CLAUDE.md', 'BUILD_STATE.md', 'CLOUD_STATE.md', 'CONTRACTS.md', 'TASKS_HISTORY.md', 'package-lock.json'];
|
|
1358
|
+
const beVscodeDir = path.join(beWorktreePath, '.vscode');
|
|
1359
|
+
fs.mkdirSync(beVscodeDir, { recursive: true });
|
|
1360
|
+
fs.writeFileSync(path.join(beVscodeDir, 'settings.json'), JSON.stringify({
|
|
1361
|
+
'files.exclude': {
|
|
1362
|
+
...Object.fromEntries(beFoldersToHide.map(f => [f, true])),
|
|
1363
|
+
'.idea/': true, '.zed/': true, '.agents/': true, '.frameworks/': true,
|
|
1364
|
+
'**/node_modules': true, '.git': true, '.gitignore': true,
|
|
1365
|
+
'.claude-scope': true, 'scope.json': true, 'package.json': true, '.vscode/': true,
|
|
1366
|
+
},
|
|
1367
|
+
'search.exclude': { '**/node_modules': true },
|
|
1368
|
+
'explorer.excludeGitIgnore': false,
|
|
1369
|
+
}, null, 2), 'utf8');
|
|
1370
|
+
|
|
1371
|
+
const beIdeaDir = path.join(beWorktreePath, '.idea');
|
|
1372
|
+
fs.mkdirSync(beIdeaDir, { recursive: true });
|
|
1373
|
+
const beAllExcluded = [...beFoldersToHide, '.agents/', '.frameworks/', 'node_modules/', '.git/', '.claude-scope', 'scope.json', 'package.json', '.gitignore'];
|
|
1374
|
+
const beExcludedUrls = beAllExcluded.map(f => ' <excludeFolder url="file://$MODULE_DIR$/' + f.replace(/\/$/, '') + '" />').join('\n');
|
|
1375
|
+
fs.writeFileSync(path.join(beIdeaDir, 'module.iml'), '<?xml version="1.0" encoding="UTF-8"?>\n<module type="WEB_MODULE" version="4">\n <component name="NewModuleRootManager">\n <content url="file://$MODULE_DIR$">\n' + beExcludedUrls + '\n </content>\n <orderEntry type="inheritedJdk" />\n <orderEntry type="sourceFolder" forTests="false" />\n </component>\n</module>', 'utf8');
|
|
1376
|
+
fs.writeFileSync(path.join(beIdeaDir, 'modules.xml'), '<?xml version="1.0" encoding="UTF-8"?>\n<project version="4">\n <component name="ProjectModuleManager">\n <modules>\n <module fileurl="file://$PROJECT_DIR$/.idea/module.iml" filepath="$PROJECT_DIR$/.idea/module.iml" />\n </modules>\n </component>\n</project>', 'utf8');
|
|
1377
|
+
|
|
1378
|
+
const beZedDir = path.join(beWorktreePath, '.zed');
|
|
1379
|
+
fs.mkdirSync(beZedDir, { recursive: true });
|
|
1380
|
+
const beZedExclusions = ['**/.git', '**/.idea', '**/.zed', '**/.agents', '**/.frameworks', '**/node_modules', '**/.gitignore'].concat(beFoldersToHide.map(f => '**/' + f.replace(/\/$/, '')));
|
|
1381
|
+
fs.writeFileSync(path.join(beZedDir, 'settings.json'), JSON.stringify({ 'file_scan_exclusions': beZedExclusions }, null, 2), 'utf8');
|
|
1382
|
+
console.log(green('✓') + ' IDE settings generated for backend/INIT worktree');
|
|
1383
|
+
|
|
1337
1384
|
// Tracking
|
|
1338
1385
|
guards.updateTrackingSlot(tracking, 'backend', 'INIT', {
|
|
1339
1386
|
branch: beBranchName,
|
|
@@ -568,12 +568,17 @@ const main = async () => {
|
|
|
568
568
|
'Skip — I will handle it manually',
|
|
569
569
|
]);
|
|
570
570
|
|
|
571
|
-
if (launchIdx ===
|
|
571
|
+
if (launchIdx === 0) {
|
|
572
572
|
console.log(`\n ${green('✓')} Launching backend/INIT...\n`);
|
|
573
573
|
_spawn('node', [path.join(ROOT, '.workflow', 'agent.js'), '--scope=backend', '--agent=INIT'], {
|
|
574
574
|
cwd: ROOT, stdio: 'inherit',
|
|
575
575
|
});
|
|
576
576
|
return;
|
|
577
|
+
} else {
|
|
578
|
+
// User skipped - mark so prompt doesn't repeat
|
|
579
|
+
guards.updateTrackingSlot(_tracking, 'backend', 'INIT', {
|
|
580
|
+
backendLaunchTiming: 'skipped',
|
|
581
|
+
}, ROOT);
|
|
577
582
|
}
|
|
578
583
|
}
|
|
579
584
|
} catch { /* best-effort */ }
|
package/core/workflow/reset.js
CHANGED
|
@@ -239,12 +239,12 @@ const main = async () => {
|
|
|
239
239
|
|
|
240
240
|
separator();
|
|
241
241
|
console.log(`${green(bold(' Project wiped successfully.'))}\n`);
|
|
242
|
-
console.log(`
|
|
243
|
-
console.log(` ${cyan('npm run init')}
|
|
244
|
-
`);
|
|
242
|
+
console.log(` Starting fresh initialization...\n`);
|
|
245
243
|
separator();
|
|
246
244
|
|
|
247
|
-
|
|
245
|
+
const { spawn } = require('child_process');
|
|
246
|
+
const initProc = spawn('node', [path.join(ROOT, '.workflow', 'run.js')], { stdio: 'inherit', cwd: ROOT });
|
|
247
|
+
initProc.on('exit', (code) => process.exit(code || 0));
|
|
248
248
|
};
|
|
249
249
|
|
|
250
250
|
main().catch((err) => {
|
package/package.json
CHANGED