@yemi33/minions 0.1.162 → 0.1.163

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.163 (2026-04-02)
4
+
5
+ ### Engine
6
+ - engine/lifecycle.js
7
+
3
8
  ## 0.1.162 (2026-04-02)
4
9
 
5
10
  ### Other
@@ -1250,40 +1250,48 @@ function runPostCompletionHooks(dispatchItem, agentId, code, stdout, config) {
1250
1250
 
1251
1251
  if (isSuccess && meta?.item?.id && !skipDoneStatus) updateWorkItemStatus(meta, 'done', '');
1252
1252
 
1253
- // Auto-dispatch review work item after implement completes successfully
1254
- if (isSuccess && !skipDoneStatus && type === 'implement' && meta?.item?.id) {
1253
+ // Auto-dispatch review work item after implement or fix completes successfully
1254
+ // For 'fix' items, only trigger when they were created by the eval loop (_evalParentId set)
1255
+ const isEvalEligible = type === 'implement' || (type === 'fix' && meta?.item?._evalParentId);
1256
+ if (isSuccess && !skipDoneStatus && isEvalEligible && meta?.item?.id) {
1255
1257
  const autoReview = config.engine?.autoReview ?? shared.ENGINE_DEFAULTS.autoReview;
1256
1258
  if (autoReview) {
1257
1259
  try {
1258
1260
  const wiPath = resolveWiPath(meta);
1259
1261
  if (wiPath) {
1260
1262
  const items = safeJson(wiPath) || [];
1263
+ // For fix items, the eval parent is the original implement item
1264
+ const evalParentId = type === 'fix' ? meta.item._evalParentId : meta.item.id;
1261
1265
  // Dedup: skip if a review item already exists for this parent
1262
- const existing = items.find(i => i._evalParentId === meta.item.id && i.type === 'review');
1266
+ const existing = items.find(i => i._evalParentId === evalParentId && i.type === 'review' && i.status !== 'done' && i.status !== 'failed');
1263
1267
  if (existing) {
1264
- log('info', `Eval loop: review item ${existing.id} already exists for ${meta.item.id}, skipping`);
1268
+ log('info', `Eval loop: review item ${existing.id} already exists for ${evalParentId}, skipping`);
1265
1269
  } else {
1266
- const parentItem = items.find(i => i.id === meta.item.id);
1267
- const evalItem = {
1268
- id: 'W-' + shared.uid(),
1269
- title: `Review: ${meta.item.title || meta.item.id}`,
1270
- type: 'review',
1271
- priority: meta.item.priority || 'high',
1272
- status: 'pending',
1273
- created: ts(),
1274
- createdBy: 'engine:eval-loop',
1275
- project: meta.project?.name || meta.item.project,
1276
- branch_name: parentItem?.branch_name || meta.branch || null,
1277
- pr_url: parentItem?.pr_url || null,
1278
- acceptance_criteria: parentItem?.acceptance_criteria || meta.item.acceptance_criteria || null,
1279
- _evalParentId: meta.item.id,
1280
- };
1281
- if (parentItem?.sourcePlan) evalItem.sourcePlan = parentItem.sourcePlan;
1282
- // Mark parent as eval-dispatched before writing to prevent duplicates on re-run
1283
- if (parentItem) parentItem._evalDispatched = true;
1284
- items.push(evalItem);
1285
- shared.safeWrite(wiPath, items);
1286
- log('info', `Eval loop: created ${evalItem.id} for completed implement ${meta.item.id}`);
1270
+ const parentItem = items.find(i => i.id === evalParentId);
1271
+ if (parentItem?._evalDispatched) {
1272
+ log('info', `Eval loop: parent ${evalParentId} already has _evalDispatched set, skipping`);
1273
+ } else {
1274
+ const evalItem = {
1275
+ id: 'W-' + shared.uid(),
1276
+ title: `Review: ${parentItem?.title || meta.item.title || evalParentId}`,
1277
+ type: 'review',
1278
+ priority: parentItem?.priority || meta.item.priority || 'high',
1279
+ status: 'pending',
1280
+ created: ts(),
1281
+ createdBy: 'engine:eval-loop',
1282
+ project: meta.project?.name || meta.item.project,
1283
+ branch_name: parentItem?.branch_name || meta.branch || null,
1284
+ pr_url: parentItem?.pr_url || null,
1285
+ acceptance_criteria: parentItem?.acceptance_criteria || meta.item.acceptance_criteria || null,
1286
+ _evalParentId: evalParentId,
1287
+ };
1288
+ if (parentItem?.sourcePlan) evalItem.sourcePlan = parentItem.sourcePlan;
1289
+ // Mark parent as eval-dispatched before writing to prevent duplicates on re-run
1290
+ if (parentItem) parentItem._evalDispatched = true;
1291
+ items.push(evalItem);
1292
+ shared.safeWrite(wiPath, items);
1293
+ log('info', `Eval loop: created ${evalItem.id} for completed ${type} ${meta.item.id} (parent: ${evalParentId})`);
1294
+ }
1287
1295
  }
1288
1296
  }
1289
1297
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.162",
3
+ "version": "0.1.163",
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"