@yemi33/minions 0.1.233 → 0.1.234
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/CHANGELOG.md +5 -0
- package/engine/cleanup.js +2 -0
- package/engine/lifecycle.js +25 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/engine/cleanup.js
CHANGED
|
@@ -364,6 +364,7 @@ function runCleanup(config, verbose = false) {
|
|
|
364
364
|
for (const item of items) {
|
|
365
365
|
if (LEGACY_DONE_STATUSES.has(item.status)) {
|
|
366
366
|
item.status = 'done';
|
|
367
|
+
delete item._pendingReason;
|
|
367
368
|
migrated++;
|
|
368
369
|
}
|
|
369
370
|
}
|
|
@@ -381,6 +382,7 @@ function runCleanup(config, verbose = false) {
|
|
|
381
382
|
for (const item of centralItems) {
|
|
382
383
|
if (LEGACY_DONE_STATUSES.has(item.status)) {
|
|
383
384
|
item.status = 'done';
|
|
385
|
+
delete item._pendingReason;
|
|
384
386
|
migrated++;
|
|
385
387
|
}
|
|
386
388
|
}
|
package/engine/lifecycle.js
CHANGED
|
@@ -284,23 +284,33 @@ function checkPlanCompletion(meta, config) {
|
|
|
284
284
|
shared.safeWrite(planPath, plan);
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
// Also archive the source .md plan if it exists
|
|
287
|
+
// Also archive the source .md plan if it exists (use source_plan field, not content matching)
|
|
288
288
|
const planArchiveDir = path.join(PLANS_DIR, 'archive');
|
|
289
289
|
if (!fs.existsSync(planArchiveDir)) fs.mkdirSync(planArchiveDir, { recursive: true });
|
|
290
|
-
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
fs.renameSync(path.join(PLANS_DIR, md), path.join(planArchiveDir, md));
|
|
298
|
-
log('info', `Archived source plan: plans/archive/${md}`);
|
|
299
|
-
} catch (err) { log('warn', `Failed to archive plan ${md}: ${err.message}`); }
|
|
300
|
-
break;
|
|
301
|
-
}
|
|
290
|
+
if (plan.source_plan) {
|
|
291
|
+
const mdPath = path.join(PLANS_DIR, plan.source_plan);
|
|
292
|
+
if (fs.existsSync(mdPath)) {
|
|
293
|
+
try {
|
|
294
|
+
fs.renameSync(mdPath, path.join(planArchiveDir, plan.source_plan));
|
|
295
|
+
log('info', `Archived source plan: plans/archive/${plan.source_plan}`);
|
|
296
|
+
} catch (err) { log('warn', `Failed to archive source plan ${plan.source_plan}: ${err.message}`); }
|
|
302
297
|
}
|
|
303
|
-
}
|
|
298
|
+
} else {
|
|
299
|
+
// Fallback: scan for matching .md files (legacy PRDs without source_plan)
|
|
300
|
+
try {
|
|
301
|
+
const mdFiles = fs.readdirSync(PLANS_DIR).filter(f => f.endsWith('.md'));
|
|
302
|
+
for (const md of mdFiles) {
|
|
303
|
+
const mdContent = shared.safeRead(path.join(PLANS_DIR, md)) || '';
|
|
304
|
+
if (mdContent.includes(projectName) || mdContent.includes(plan.plan_summary?.slice(0, 40) || '___nomatch___')) {
|
|
305
|
+
try {
|
|
306
|
+
fs.renameSync(path.join(PLANS_DIR, md), path.join(planArchiveDir, md));
|
|
307
|
+
log('info', `Archived source plan: plans/archive/${md}`);
|
|
308
|
+
} catch (err) { log('warn', `Failed to archive plan ${md}: ${err.message}`); }
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
} catch (err) { log('warn', `Plan archive scan: ${err.message}`); }
|
|
313
|
+
}
|
|
304
314
|
|
|
305
315
|
// 6. Clean up ALL worktrees created for this plan's work items (shared-branch + per-item)
|
|
306
316
|
try {
|
|
@@ -791,6 +801,7 @@ async function handlePostMerge(pr, project, config, newStatus) {
|
|
|
791
801
|
log('info', `Post-merge: marking work item ${mergedItemId} as done (was ${item.status}) for ${pr.id}`);
|
|
792
802
|
item.status = 'done';
|
|
793
803
|
item.completedAt = ts();
|
|
804
|
+
delete item._pendingReason;
|
|
794
805
|
item._mergedVia = pr.id;
|
|
795
806
|
found = true;
|
|
796
807
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.234",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|