@yemi33/minions 0.1.2354 → 0.1.2355
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/docs/kb-sweep.md +1 -1
- package/engine/kb-sweep.js +14 -4
- package/package.json +1 -1
package/docs/kb-sweep.md
CHANGED
|
@@ -72,7 +72,7 @@ Each batch prompt asks for three lists in JSON:
|
|
|
72
72
|
|
|
73
73
|
Each action archives the file via the same `_archiveKbFile()` helper used by Pass 1; reclassification rewrites the `category:` frontmatter line and moves the file into the new category directory (source: [`engine/kb-sweep.js:323-340`](../engine/kb-sweep.js#L323)).
|
|
74
74
|
|
|
75
|
-
**
|
|
75
|
+
**changedIdx guard.** All three actions are only actioned against indices the LLM actually content-analyzed this batch (i.e. members of `changedIdx`). `remove` and `reclassify` require their own referenced `index` to be in `changedIdx`; a `duplicates` pair is actioned if the pair references at least one index in `changedIdx` (a pair where every referenced index is roster-only, `unchangedIdx`, is skipped). Roster-only entries are sent to the LLM with title/date/category only (no content — see the "existing entries" roster section), so an index outside `changedIdx` cannot have been genuinely compared/analyzed this batch; acting on it would mean acting on a hallucinated or stale LLM reference rather than a real comparison (source: [`engine/kb-sweep.js`](../engine/kb-sweep.js) `_applyLlmPlan`, PR #739, W-mrc9y5y000063033).
|
|
76
76
|
|
|
77
77
|
Reclassification targets are validated against `shared.KB_CATEGORIES` (`architecture`, `conventions`, `project-notes`, `build-reports`, `reviews` — source: [`engine/shared.js`](../engine/shared.js) `KB_CATEGORIES`); unknown categories are silently dropped.
|
|
78
78
|
|
package/engine/kb-sweep.js
CHANGED
|
@@ -661,12 +661,18 @@ ${body}`;
|
|
|
661
661
|
function _applyLlmPlan(plan, manifest, changedIdx, opts = {}) {
|
|
662
662
|
let removed = 0, merged = 0, reclassified = 0;
|
|
663
663
|
// changedIdx is the set of manifest indices actually content-analyzed by
|
|
664
|
-
// the LLM this batch (see _llmBatchSweep's scannedIdx).
|
|
665
|
-
// referencing only unanalyzed
|
|
666
|
-
// mis-reference) must never be
|
|
667
|
-
//
|
|
664
|
+
// the LLM this batch (see _llmBatchSweep's scannedIdx). remove/reclassify/
|
|
665
|
+
// duplicates entries referencing only unanalyzed (roster-only) indices
|
|
666
|
+
// (LLM hallucination / stale index mis-reference) must never be acted on —
|
|
667
|
+
// remove/reclassify require their referenced index to be analyzed this
|
|
668
|
+
// batch, and a duplicate pair is only trustworthy if at least one side was
|
|
669
|
+
// actually analyzed this batch (W-mrb447th00062813, W-mrc9y5y000063033).
|
|
668
670
|
const changedSet = new Set(changedIdx || []);
|
|
669
671
|
for (const r of (plan.remove || [])) {
|
|
672
|
+
if (!changedSet.has(r.index)) {
|
|
673
|
+
log('warn', `[kb-sweep] skipping remove for index ${r.index} — not in analyzed (changedIdx) batch, likely a hallucinated/stale LLM reference`);
|
|
674
|
+
continue;
|
|
675
|
+
}
|
|
670
676
|
const entry = manifest[r.index];
|
|
671
677
|
if (!entry) continue;
|
|
672
678
|
if (opts.dryRun) { removed++; continue; }
|
|
@@ -686,6 +692,10 @@ function _applyLlmPlan(plan, manifest, changedIdx, opts = {}) {
|
|
|
686
692
|
}
|
|
687
693
|
}
|
|
688
694
|
for (const r of (plan.reclassify || [])) {
|
|
695
|
+
if (!changedSet.has(r.index)) {
|
|
696
|
+
log('warn', `[kb-sweep] skipping reclassify for index ${r.index} — not in analyzed (changedIdx) batch, likely a hallucinated/stale LLM reference`);
|
|
697
|
+
continue;
|
|
698
|
+
}
|
|
689
699
|
const entry = manifest[r.index];
|
|
690
700
|
if (!entry || !shared.KB_CATEGORIES.includes(r.to)) continue;
|
|
691
701
|
if (opts.dryRun) { reclassified++; continue; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2355",
|
|
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"
|