@yemi33/minions 0.1.835 → 0.1.837

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,11 +1,13 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.835 (2026-04-11)
3
+ ## 0.1.837 (2026-04-11)
4
4
 
5
5
  ### Features
6
+ - per-item Re-open button on done PRD items (deterministic fallback)
6
7
  - stale PRD shows Regenerate PRD + Resume as-is buttons
7
8
 
8
9
  ### Fixes
10
+ - use structured marker for diff-aware PRD update detection
9
11
  - match playbook trigger phrase for diff-aware PRD updates
10
12
  - engine only flags stale on plan revision, never auto-regenerates
11
13
  - only 'updated' re-opens done work items, remove 'planned' status
@@ -193,6 +193,12 @@ function renderPrdProgress(prog) {
193
193
  requeueBtn = '<span onclick="event.stopPropagation();prdItemRequeue(\'' + escHtml(wi ? wi.id : i.id) + '\',\'' + escHtml(wi ? (wi._source || '') : '') + '\',\'' + escHtml(i.source || '') + '\')" style="color:var(--green);cursor:pointer;font-size:9px;padding:1px 5px;background:rgba(63,185,80,0.1);border:1px solid rgba(63,185,80,0.3);border-radius:3px" title="Requeue this work item">retry</span>';
194
194
  }
195
195
 
196
+ // Re-open button for done items — sets PRD item to "updated" so engine re-dispatches
197
+ const isDone = i.status === 'done' || (wi && wi.status === 'done');
198
+ const reopenBtn = isDone
199
+ ? '<span onclick="event.stopPropagation();prdItemReopen(\'' + escHtml(i.source || '') + '\',\'' + escHtml(i.id) + '\')" style="color:var(--blue);cursor:pointer;font-size:9px;padding:1px 5px;background:rgba(56,139,253,0.1);border:1px solid rgba(56,139,253,0.3);border-radius:3px" title="Re-open: set to updated so engine re-dispatches on existing branch">re-open</span>'
200
+ : '';
201
+
196
202
  return '<div class="prd-item-row st-' + (i.status || 'missing') + '" style="flex-wrap:wrap;cursor:pointer" onclick="prdItemEdit(\'' + src + '\',\'' + iid + '\')">' +
197
203
  statusBadge(i.status, i.id) +
198
204
  '<span class="prd-item-id">' + escHtml(i.id) + '</span>' +
@@ -200,6 +206,7 @@ function renderPrdProgress(prog) {
200
206
  wiLabel +
201
207
  agentLabel +
202
208
  requeueBtn +
209
+ reopenBtn +
203
210
  (projBadges ? '<span>' + projBadges + '</span>' : '') +
204
211
  (prLinks ? '<span>' + prLinks + '</span>' : '') +
205
212
  branchLabel +
@@ -766,6 +773,23 @@ async function prdItemRequeue(workItemId, source, prdFile) {
766
773
  }
767
774
  }
768
775
 
776
+ async function prdItemReopen(source, itemId) {
777
+ if (!confirm('Re-open this item? It will be set to "updated" and the engine will re-dispatch it on the existing branch.')) return;
778
+ try {
779
+ const res = await fetch('/api/prd-items/update', {
780
+ method: 'POST', headers: { 'Content-Type': 'application/json' },
781
+ body: JSON.stringify({ source, itemId, status: 'updated' })
782
+ });
783
+ if (res.ok) {
784
+ showToast('cmd-toast', 'Item re-opened — will dispatch on next tick', true);
785
+ refresh();
786
+ } else {
787
+ const d = await res.json().catch(() => ({}));
788
+ alert('Re-open failed: ' + (d.error || 'unknown'));
789
+ }
790
+ } catch (e) { alert('Error: ' + e.message); }
791
+ }
792
+
769
793
  async function _planApproveAction(prdFile, skipRegen, confirmMsg, successMsg) {
770
794
  if (!confirm(confirmMsg)) return;
771
795
  try {
@@ -866,4 +890,4 @@ function openArchive(i) {
866
890
  document.getElementById('modal').classList.add('open');
867
891
  }
868
892
 
869
- window.MinionsPrd = { renderPrd, renderPrdProgress, openArchivedPrdModal, showArchivedPrdDetail, prdItemEdit, prdItemSave, prdItemRemove, prdItemRequeue, prdRegenerate, openArchive };
893
+ window.MinionsPrd = { renderPrd, renderPrdProgress, openArchivedPrdModal, showArchivedPrdDetail, prdItemEdit, prdItemSave, prdItemRemove, prdItemRequeue, prdItemReopen, prdRegenerate, openArchive };
package/dashboard.js CHANGED
@@ -2250,10 +2250,10 @@ If nothing to do: { "duplicates": [], "reclassify": [], "remove": [] }`;
2250
2250
  diffAwareQueued = shared.queuePlanToPrd({
2251
2251
  planFile: plan.source_plan, prdFile: body.file,
2252
2252
  title: `Update PRD from revised plan: ${plan.source_plan}`,
2253
- description: `Plan file: plans/${plan.source_plan}\nPRD file: prd/${body.file}\n\n` +
2254
- `Source plan was revised. This is a diff-aware update — read the existing PRD and compare against the updated plan.\n\n` +
2253
+ description: `mode: diff-aware-update\nPlan file: plans/${plan.source_plan}\nPRD file: prd/${body.file}\n\n` +
2254
+ `Source plan was revised. Read the existing PRD and compare against the updated plan.\n\n` +
2255
2255
  `**Existing implementation state:**\n${implContext}\n\n` +
2256
- `Follow the "Updating an Existing PRD" section in the playbook. Key: items whose requirements changed must be set to status "updated" (not "done") so the engine re-opens them.`,
2256
+ `Follow the "Updating an Existing PRD" section in the playbook. Items whose requirements changed MUST be set to status "updated" (not "done") so the engine re-opens them.`,
2257
2257
  project: targetProject.name, createdBy: 'dashboard:plan-resume',
2258
2258
  extra: { _existingPrdFile: body.file },
2259
2259
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.835",
3
+ "version": "0.1.837",
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"
@@ -93,7 +93,7 @@ Rules for items:
93
93
 
94
94
  ## Updating an Existing PRD
95
95
 
96
- If the task description mentions **"existing implementation state"**, you are updating an existing PRD, not creating one from scratch. The plan was revised and you need to produce an updated PRD that reflects the changes while preserving existing work.
96
+ If the task description contains `mode: diff-aware-update`, you are updating an existing PRD, not creating one from scratch. The plan was revised and you need to produce an updated PRD that reflects the changes while preserving existing work.
97
97
 
98
98
  **Rules for diff-aware updates:**
99
99
  - **Read the existing PRD file first** — it's at `{{team_root}}/prd/{{prd_filename}}`