@yemi33/minions 0.1.819 → 0.1.821

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,9 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.819 (2026-04-11)
3
+ ## 0.1.821 (2026-04-11)
4
4
 
5
5
  ### Features
6
+ - add resume-plan CC action for diff-aware plan updates
6
7
  - verify workflow handles shared-branch plans and existing E2E PRs
7
8
  - doc-chat drag-to-resize, queued message UX, insertAdjacentHTML
8
9
  - re-open done work items when PRD item set to updated/missing
@@ -17,6 +18,7 @@
17
18
  - cap review→fix cycles at evalMaxIterations (default 3)
18
19
 
19
20
  ### Fixes
21
+ - prevent duplicate verify WIs per PRD, re-open on modified plan
20
22
  - strip ===ACTIONS=== server-side in streaming chunks (not client)
21
23
  - strip ===ACTIONS=== from CC streamed text during rendering
22
24
  - ccExecuteAction routes action status to correct tab via targetTabId
@@ -36,7 +38,6 @@
36
38
  - project-scoped skill work items instruct wrong file path format (closes #790) (#804)
37
39
  - move ignoredAuthors construction outside inner comment loop (ADO)
38
40
  - approved is permanent — no path can ever downgrade it
39
- - allow fix dispatch on approved PRs (only guard is in updatePrAfterFix)
40
41
 
41
42
  ### Other
42
43
  - docs: diff-aware PRD update playbook + prioritize team memory in shared rules
@@ -760,6 +760,27 @@ async function ccExecuteAction(action, targetTabId) {
760
760
  status.style.color = 'var(--green)';
761
761
  break;
762
762
  }
763
+ case 'resume-plan': {
764
+ // Update PRD items first (set modified→updated, new→missing), then approve
765
+ if (action.updates && action.updates.length > 0) {
766
+ for (var ui = 0; ui < action.updates.length; ui++) {
767
+ var u = action.updates[ui];
768
+ await _ccFetch('/api/prd-items/update', { source: action.file, itemId: u.id, status: u.status, name: u.name, description: u.description });
769
+ }
770
+ }
771
+ if (action.newItems && action.newItems.length > 0) {
772
+ for (var ni = 0; ni < action.newItems.length; ni++) {
773
+ var n = action.newItems[ni];
774
+ await _ccFetch('/api/prd-items', { source: action.file, id: n.id, name: n.name, description: n.description, priority: n.priority, estimated_complexity: n.complexity });
775
+ }
776
+ }
777
+ await _ccFetch('/api/plans/approve', { file: action.file });
778
+ var resumeCount = (action.updates || []).length + (action.newItems || []).length;
779
+ status.innerHTML = '&#10003; Resumed plan: <strong>' + escHtml(action.file) + '</strong>' + (resumeCount > 0 ? ' (' + resumeCount + ' item(s) updated)' : '');
780
+ status.style.color = 'var(--green)';
781
+ wakeEngine();
782
+ break;
783
+ }
763
784
  case 'edit-prd-item': {
764
785
  await _ccFetch('/api/prd-items/update', { source: action.source, itemId: action.itemId, name: action.name, description: action.description, priority: action.priority, estimated_complexity: action.complexity });
765
786
  status.innerHTML = '&#10003; Updated PRD item: <strong>' + escHtml(action.itemId) + '</strong>';
@@ -185,8 +185,11 @@ function checkPlanCompletion(meta, config) {
185
185
  }
186
186
 
187
187
  // 4. Create verification work item (build, test, start webapp, write testing guide)
188
+ // Only one verify per PRD — skip if pending/dispatched, re-open if done/failed (PRD was modified)
188
189
  const existingVerify = allWorkItems.find(w => w.sourcePlan === planFile && w.itemType === 'verify');
189
- if (!existingVerify && doneItems.length > 0) {
190
+ if (existingVerify && (existingVerify.status === WI_STATUS.PENDING || existingVerify.status === WI_STATUS.DISPATCHED)) {
191
+ log('info', `Plan ${planFile}: verify WI ${existingVerify.id} already ${existingVerify.status} — skipping`);
192
+ } else if (doneItems.length > 0) {
190
193
  const verifyId = 'PL-' + shared.uid();
191
194
  const planSlug = planFile.replace('.json', '');
192
195
 
@@ -301,6 +304,24 @@ function checkPlanCompletion(meta, config) {
301
304
  const teams = require('./teams');
302
305
  teams.teamsNotifyPlanEvent({ name: plan.plan_summary || planFile, file: planFile }, 'verify-created').catch(() => {});
303
306
  } catch {}
307
+ } else if (existingVerify && DONE_STATUSES.has(existingVerify.status) && doneItems.length > 0) {
308
+ // PRD was modified and re-completed — re-open the existing verify instead of creating a duplicate
309
+ const verifyProject = existingVerify.project || projectName;
310
+ const vWiPath = shared.projectWorkItemsPath(
311
+ projects.find(p => p.name?.toLowerCase() === verifyProject?.toLowerCase()) || primaryProject
312
+ );
313
+ mutateWorkItems(vWiPath, items => {
314
+ const v = items.find(w => w.id === existingVerify.id);
315
+ if (v && DONE_STATUSES.has(v.status)) {
316
+ v.status = WI_STATUS.PENDING;
317
+ v._reopened = true;
318
+ delete v.completedAt;
319
+ delete v.dispatched_to;
320
+ delete v.dispatched_at;
321
+ v._retryCount = 0;
322
+ }
323
+ });
324
+ log('info', `Re-opened verification work item ${existingVerify.id} for modified plan ${planFile}`);
304
325
  }
305
326
 
306
327
  // Archive deferred until verify completes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.819",
3
+ "version": "0.1.821",
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"
@@ -63,6 +63,12 @@ Core action types:
63
63
 
64
64
  Additional actions (all take `id` or `file` as primary key):
65
65
  - Plan lifecycle: pause-plan, approve-plan, reject-plan, archive-plan, unarchive-plan, execute-plan, regenerate-plan, trigger-verify
66
+ - **resume-plan**: Resume a completed/paused plan with PRD updates. Updates existing items and adds new ones, then approves.
67
+ `{"type": "resume-plan", "file": "prd-file.json", "updates": [{"id": "P-xxx", "status": "updated", "description": "new desc"}], "newItems": [{"id": "P-yyy", "name": "New feature", "description": "...", "priority": "high", "complexity": "medium"}]}`
68
+ - Set `status: "updated"` on done items whose requirements changed (engine re-opens the work item on existing branch)
69
+ - Set `status: "missing"` on done items that need full re-implementation
70
+ - `newItems` are added as new PRD items with `status: "missing"`
71
+ - After all updates, the plan is approved and the engine materializes on next tick
66
72
  - PRD items: edit-prd-item (source, itemId, name, description, priority, complexity), remove-prd-item (source, itemId)
67
73
  - Work items: delete-work-item (id, source)
68
74
  - Schedules: schedule (id, title, cron, workType, project, agent, description, priority, enabled), delete-schedule (id)