@yemi33/minions 0.1.631 → 0.1.632

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,6 +1,9 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.631 (2026-04-08)
3
+ ## 0.1.632 (2026-04-08)
4
+
5
+ ### Features
6
+ - store _prdFilename on work item for deterministic completion check
4
7
 
5
8
  ### Fixes
6
9
  - PRD existence check scans by source_plan, not filename
@@ -1349,18 +1349,23 @@ async function runPostCompletionHooks(dispatchItem, agentId, code, stdout, confi
1349
1349
 
1350
1350
  // Detect plan-to-prd tasks that completed without creating a PRD file
1351
1351
  if (effectiveSuccess && type === WORK_TYPE.PLAN_TO_PRD && meta?.item?.planFile) {
1352
- // PRD filename may differ from plan filename scan prd/ for any file referencing this plan
1353
- const planFile = meta.item.planFile;
1352
+ // Check by stored filename first (deterministic), fall back to source_plan scan
1354
1353
  let prdFound = false;
1355
- try {
1356
- for (const f of fs.readdirSync(PRD_DIR)) {
1357
- if (!f.endsWith('.json')) continue;
1358
- try {
1359
- const prd = safeJson(path.join(PRD_DIR, f));
1360
- if (prd && prd.source_plan === planFile) { prdFound = true; break; }
1361
- } catch {}
1362
- }
1363
- } catch {}
1354
+ const expectedFile = meta.item._prdFilename;
1355
+ if (expectedFile) {
1356
+ prdFound = fs.existsSync(path.join(PRD_DIR, expectedFile));
1357
+ }
1358
+ if (!prdFound) {
1359
+ try {
1360
+ for (const f of fs.readdirSync(PRD_DIR)) {
1361
+ if (!f.endsWith('.json')) continue;
1362
+ try {
1363
+ const prd = safeJson(path.join(PRD_DIR, f));
1364
+ if (prd && prd.source_plan === meta.item.planFile) { prdFound = true; break; }
1365
+ } catch {}
1366
+ }
1367
+ } catch {}
1368
+ }
1364
1369
  if (!prdFound) {
1365
1370
  const hasOutput = stdout && stdout.length > 500;
1366
1371
  const wiPath = resolveWorkItemPath(meta);
package/engine.js CHANGED
@@ -2305,6 +2305,7 @@ function discoverCentralWorkItems(config) {
2305
2305
  let prdCounter = 2;
2306
2306
  while (prdExisting.has(prdFilename)) { prdFilename = prdBase + '-' + prdCounter + '.json'; prdCounter++; }
2307
2307
  vars.prd_filename = prdFilename;
2308
+ mutations.set(item.id, Object.assign(mutations.get(item.id) || {}, { _prdFilename: prdFilename }));
2308
2309
  vars.branch_strategy_hint = item.branchStrategy
2309
2310
  ? `The user requested **${item.branchStrategy}** strategy. Use this unless the analysis strongly suggests otherwise.`
2310
2311
  : 'Choose the best strategy based on your analysis of item dependencies.';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.631",
3
+ "version": "0.1.632",
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"