@yemi33/minions 0.1.511 → 0.1.513

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.513 (2026-04-07)
4
+
5
+ ### Fixes
6
+ - retroactively recover failed work items that have linked PRs
7
+ - decomposed items count as done in PRD progress and plan status
8
+
3
9
  ## 0.1.511 (2026-04-07)
4
10
 
5
11
  ### Features
@@ -73,7 +73,7 @@ function derivePlanStatus(prdFile, mdFile, prdJsonStatus, workItems) {
73
73
  const implementWi = wi.filter(w => w.type !== 'plan-to-prd' && w.type !== 'verify');
74
74
  const hasPendingPrd = wi.some(w => w.type === 'plan-to-prd' && (w.status === 'pending' || w.status === 'dispatched'));
75
75
  const hasActiveWork = implementWi.some(w => w.status === 'pending' || w.status === 'dispatched');
76
- const allDone = implementWi.length > 0 && implementWi.every(w => w.status === 'done');
76
+ const allDone = implementWi.length > 0 && implementWi.every(w => w.status === 'done' || w.status === 'decomposed');
77
77
  const hasFailed = implementWi.some(w => w.status === 'failed');
78
78
 
79
79
  // User-set statuses take priority when no work has started
@@ -1114,6 +1114,8 @@ function handleDecompositionResult(stdout, meta, config) {
1114
1114
  p.status = WI_STATUS.DECOMPOSED;
1115
1115
  p._decomposed = true;
1116
1116
  delete p._decomposing;
1117
+ // Sync to PRD so dashboard shows decomposed status
1118
+ if (p.sourcePlan) syncPrdItemStatus(p.id, WI_STATUS.DECOMPOSED, p.sourcePlan);
1117
1119
  p._subItemIds = subItems.map(s => s.id);
1118
1120
 
1119
1121
  // Create child work items
@@ -1368,8 +1370,8 @@ function syncPrdFromPrs(config) {
1368
1370
  for (const project of allProjects) {
1369
1371
  const wiPath = shared.projectWorkItemsPath(project);
1370
1372
  const items = safeJson(wiPath) || [];
1371
- const hasPending = items.some(wi => wi.status === WI_STATUS.PENDING && !wi._pr);
1372
- if (!hasPending) continue;
1373
+ const hasReconcilable = items.some(wi => (wi.status === WI_STATUS.PENDING || wi.status === WI_STATUS.FAILED) && !wi._pr);
1374
+ if (!hasReconcilable) continue;
1373
1375
  let reconciled = 0;
1374
1376
  const reconciledItems = mutateJsonFileLocked(wiPath, data => {
1375
1377
  if (!Array.isArray(data)) return data;
package/engine/queries.js CHANGED
@@ -796,7 +796,7 @@ function getPrdInfo(config) {
796
796
 
797
797
  const byStatus = {};
798
798
  items.forEach(item => { const s = item.status || 'missing'; byStatus[s] = byStatus[s] || []; byStatus[s].push(item); });
799
- const complete = (byStatus['done'] || []).length;
799
+ const complete = (byStatus['done'] || []).length + (byStatus['decomposed'] || []).length;
800
800
  const inProgress = (byStatus['dispatched'] || []).length;
801
801
  const paused = (byStatus['paused'] || []).length;
802
802
  const missing = (byStatus['missing'] || []).length;
package/engine.js CHANGED
@@ -876,6 +876,10 @@ function reconcileItemsWithPrs(items, allPrs, { onlyIds } = {}) {
876
876
  const linkedPrId = Object.keys(prLinks).find(prId => prLinks[prId] === wi.id);
877
877
  if (linkedPrId) exactPr = allPrs.find(pr => pr.id === linkedPrId) || { id: linkedPrId };
878
878
  }
879
+ // Branch-based matching: PR branch contains the work item ID (e.g. work/P-k7m2v9a1)
880
+ if (!exactPr) {
881
+ exactPr = allPrs.find(pr => pr.branch && pr.branch.includes(wi.id));
882
+ }
879
883
  if (exactPr) {
880
884
  wi.status = WI_STATUS.DONE;
881
885
  wi._pr = exactPr.id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.511",
3
+ "version": "0.1.513",
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"