Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUvc8e2ea3db9f3
diff --git a/v3/@claude-flow/cli/.claude/helpers/intelligence.cjs b/v3/@claude-flow/cli/.claude/helpers/intelligence.cjs
index 50c43e93eb..fa305cecc5 100644
--- a/v3/@claude-flow/cli/.claude/helpers/intelligence.cjs
+++ b/v3/@claude-flow/cli/.claude/helpers/intelligence.cjs
@@ -344,14 +344,18 @@ function getContext(prompt) {
scored.sort((a, b) => b.score - a.score);
const topEntries = scored.slice(0, TOP_K);
- // Store matched IDs in session state for feedback
+ // Boost previously matched patterns (implicit success: user continued working)
+ const prevMatched = sessionGet('lastMatchedPatterns');
+
+ // Store NEW matched IDs in session state for feedback
const matchedIds = topEntries.map(e => e.id);
sessionSet('lastMatchedPatterns', matchedIds);
- // Boost previously matched patterns (implicit success: user continued working)
- const prevMatched = sessionGet('lastMatchedPatterns');
+ // Only boost previous if they differ from current (avoid double-boosting)
if (prevMatched && Array.isArray(prevMatched)) {
- boostConfidence(prevMatched, 0.03);
+ const newSet = new Set(matchedIds);
+ const toBoost = prevMatched.filter(id => !newSet.has(id));
+ if (toBoost.length > 0) boostConfidence(toBoost, 0.03);
}
// Format output