@yemi33/minions 0.1.833 → 0.1.835

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.833 (2026-04-11)
3
+ ## 0.1.835 (2026-04-11)
4
4
 
5
5
  ### Features
6
6
  - stale PRD shows Regenerate PRD + Resume as-is buttons
7
7
 
8
8
  ### Fixes
9
+ - match playbook trigger phrase for diff-aware PRD updates
10
+ - engine only flags stale on plan revision, never auto-regenerates
9
11
  - only 'updated' re-opens done work items, remove 'planned' status
10
12
  - revert doc-chat MAX_HEIGHT to 500px
11
13
  - hide plan card action buttons when stale banner is showing
package/dashboard.js CHANGED
@@ -2251,14 +2251,9 @@ If nothing to do: { "duplicates": [], "reclassify": [], "remove": [] }`;
2251
2251
  planFile: plan.source_plan, prdFile: body.file,
2252
2252
  title: `Update PRD from revised plan: ${plan.source_plan}`,
2253
2253
  description: `Plan file: plans/${plan.source_plan}\nPRD file: prd/${body.file}\n\n` +
2254
- `Source plan was revised. Compare the updated plan against existing PRD and produce an updated version.\n\n` +
2255
- `**Current PRD implementation state:**\n${implContext}\n\n` +
2256
- `**Rules for updating:**\n` +
2257
- `- Items that are done and unchanged in the plan → keep status "done" (preserve their ID)\n` +
2258
- `- Items that are done but modified in the plan (new requirements) → set status "updated" (engine will re-open)\n` +
2259
- `- New items in the plan → set status "missing" (engine will materialize)\n` +
2260
- `- Items removed from the plan → drop from PRD (engine will cancel pending WIs)\n` +
2261
- `- Preserve all existing item IDs for unchanged/modified items — do NOT generate new IDs for them`,
2254
+ `Source plan was revised. This is a diff-aware update — read the existing PRD and compare against the updated plan.\n\n` +
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.`,
2262
2257
  project: targetProject.name, createdBy: 'dashboard:plan-resume',
2263
2258
  extra: { _existingPrdFile: body.file },
2264
2259
  });
package/engine.js CHANGED
@@ -1331,43 +1331,10 @@ function materializePlansAsWorkItems(config) {
1331
1331
  // Handle PRD based on current status
1332
1332
  const prdStatus = plan.status || (plan.requires_approval ? 'awaiting-approval' : null);
1333
1333
 
1334
- // Approved/completed/paused PRDs: flag stale — user clicks Resume to trigger diff-aware update
1335
- if (prdStatus && prdStatus !== 'awaiting-approval') {
1334
+ // Flag stale for all statuses — user decides when to regenerate/resume from dashboard
1335
+ if (prdStatus) {
1336
1336
  plan.planStale = true;
1337
- log('info', `PRD ${file} flagged as stale (plan revised while ${prdStatus}) — user can resume from dashboard`);
1338
- }
1339
-
1340
- // Awaiting-approval PRDs: auto-regenerate (no work started yet, safe to replace)
1341
- if (prdStatus === 'awaiting-approval') {
1342
- log('info', `PRD ${file} invalidated (was awaiting-approval) — queuing regeneration from revised plan`);
1343
-
1344
- const completedStatuses = new Set(['done', 'in-pr', 'implemented']);
1345
- const completedItems = (plan.missing_features || [])
1346
- .filter(f => completedStatuses.has(f.status))
1347
- .map(f => ({ id: f.id, name: f.name, status: f.status }));
1348
-
1349
- const completedContext = completedItems.length > 0
1350
- ? `\nPreviously completed items (preserve their status in the new PRD):\n${completedItems.map(i => `- ${i.id}: ${i.name} [${i.status}]`).join('\n')}`
1351
- : '';
1352
-
1353
- try { fs.unlinkSync(path.join(PRD_DIR, file)); } catch { /* cleanup */ }
1354
-
1355
- const planContent = safeRead(path.join(PLANS_DIR, plan.source_plan));
1356
- if (planContent) {
1357
- const projectName = plan.project || file.replace(/-\d{4}-\d{2}-\d{2}\.json$/, '');
1358
- const allProjects = getProjects(config);
1359
- const targetProject = allProjects.find(p => p.name?.toLowerCase() === projectName.toLowerCase()) || allProjects[0];
1360
- if (targetProject) {
1361
- const queued = shared.queuePlanToPrd({
1362
- planFile: plan.source_plan, prdFile: file,
1363
- title: `Generate PRD from plan: ${plan.source_plan}`,
1364
- description: `Plan file: plans/${plan.source_plan}\nSource plan was updated while PRD was awaiting approval — generating fresh PRD.${completedContext}`,
1365
- project: targetProject.name, createdBy: 'engine:plan-revision',
1366
- });
1367
- if (queued) log('info', `Queued plan-to-prd regeneration for revised plan ${plan.source_plan} (${completedItems.length} completed items to carry over)`);
1368
- }
1369
- }
1370
- continue; // Old PRD deleted — skip safeWrite below
1337
+ log('info', `PRD ${file} flagged as stale (plan revised while ${prdStatus}) — user can regenerate from dashboard`);
1371
1338
  }
1372
1339
 
1373
1340
  safeWrite(path.join(PRD_DIR, file), plan);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.833",
3
+ "version": "0.1.835",
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"