@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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.234 (2026-04-03)
4
+
5
+ ### Fixes
6
+ - clean _pendingReason on all status→done transitions, not just updateWorkItemStatus
7
+
3
8
  ## 0.1.233 (2026-04-03)
4
9
 
5
10
  ### Fixes
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
  }
@@ -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
- try {
291
- const mdFiles = fs.readdirSync(PLANS_DIR).filter(f => f.endsWith('.md'));
292
- for (const md of mdFiles) {
293
- const mdContent = shared.safeRead(path.join(PLANS_DIR, md)) || '';
294
- // Match by project name or plan summary appearing in the .md content
295
- if (mdContent.includes(projectName) || mdContent.includes(plan.plan_summary?.slice(0, 40) || '___nomatch___')) {
296
- try {
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
- } catch (err) { log('warn', `Plan archive scan: ${err.message}`); }
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.233",
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"