@yemi33/minions 0.1.2171 → 0.1.2172
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/engine.js +33 -9
- package/package.json +1 -1
package/engine.js
CHANGED
|
@@ -4793,15 +4793,39 @@ function materializePlansAsWorkItems(config) {
|
|
|
4793
4793
|
if (desiredFileName && desiredFileName.toLowerCase() !== String(fileName).toLowerCase()) {
|
|
4794
4794
|
const fromPath = path.join(PRD_DIR, fileName);
|
|
4795
4795
|
const desiredPath = shared.sanitizePath(desiredFileName, PRD_DIR);
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4796
|
+
// W-mq8qdai6 — refuse to rename into a name owned by an archived PRD.
|
|
4797
|
+
// `shared.uniquePath` only scans the live `prd/` directory; without this
|
|
4798
|
+
// guard, an archived PRD with the canonical "<project>-<date>.json" name
|
|
4799
|
+
// would silently collide with the rename target. The dashboard joins
|
|
4800
|
+
// work items to PRDs by basename (sourcePlan === <prd filename>), so a
|
|
4801
|
+
// live↔archive name collision bleeds the archived PRD's done items,
|
|
4802
|
+
// verify task, and PRs into the live PRD's view (the bug-fix-plan vs
|
|
4803
|
+
// minions-opg-2026-06-10 incident).
|
|
4804
|
+
const archiveBasenames = new Set(
|
|
4805
|
+
safeReadDir(path.join(PRD_DIR, 'archive'))
|
|
4806
|
+
.filter(f => f.endsWith('.json'))
|
|
4807
|
+
.map(f => f.toLowerCase())
|
|
4808
|
+
);
|
|
4809
|
+
if (archiveBasenames.has(desiredFileName.toLowerCase())) {
|
|
4810
|
+
log('warn', `Plan project enforcement: skipping rename of ${fileName} to ${desiredFileName} — would collide with archived PRD`);
|
|
4811
|
+
} else {
|
|
4812
|
+
const toPath = shared.uniquePath(desiredPath);
|
|
4813
|
+
const toBasename = path.basename(toPath);
|
|
4814
|
+
if (archiveBasenames.has(toBasename.toLowerCase())) {
|
|
4815
|
+
// uniquePath bumped past a live conflict (e.g. <name>-2.json) but
|
|
4816
|
+
// the bumped name itself is owned by an archived PRD — same risk.
|
|
4817
|
+
log('warn', `Plan project enforcement: skipping rename of ${fileName} to ${toBasename} — would collide with archived PRD`);
|
|
4818
|
+
} else {
|
|
4819
|
+
try {
|
|
4820
|
+
fs.renameSync(fromPath, toPath);
|
|
4821
|
+
nextFileName = toBasename;
|
|
4822
|
+
const migrated = migratePrdFilenameReferences(fileName, nextFileName);
|
|
4823
|
+
if (migrated > 0) log('info', `Plan project enforcement: migrated ${migrated} PRD reference(s) from ${fileName} to ${nextFileName}`);
|
|
4824
|
+
changed = true;
|
|
4825
|
+
} catch (e) {
|
|
4826
|
+
log('warn', `Plan project enforcement: could not rename ${fileName} to ${toBasename}: ${e.message}`);
|
|
4827
|
+
}
|
|
4828
|
+
}
|
|
4805
4829
|
}
|
|
4806
4830
|
}
|
|
4807
4831
|
if (changed) log('info', `Plan project enforcement: preserved declared project "${declaredProject}" for ${nextFileName}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2172",
|
|
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"
|