@yemi33/minions 0.1.630 → 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,8 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.630 (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
9
+ - PRD existence check scans by source_plan, not filename
6
10
  - add 'When to Stop' to remaining 5 playbooks
7
11
  - hold _ccSending during abort delay, check wasAborted per queue item
8
12
  - abort+queue sends queued message after brief delay, not discard
@@ -1349,9 +1349,24 @@ 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
- const prdFile = meta.item.planFile.replace(/\.md$/, '.json');
1353
- const prdPath = path.join(PRD_DIR, prdFile);
1354
- if (!fs.existsSync(prdPath)) {
1352
+ // Check by stored filename first (deterministic), fall back to source_plan scan
1353
+ let prdFound = false;
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
+ }
1369
+ if (!prdFound) {
1355
1370
  const hasOutput = stdout && stdout.length > 500;
1356
1371
  const wiPath = resolveWorkItemPath(meta);
1357
1372
  if (wiPath) {
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.630",
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"