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

rUv774a4a3b3c73
diff --git a/README.md b/README.md
index 9ea20b201d..cf3bf52784 100644
--- a/README.md
+++ b/README.md
@@ -2886,6 +2886,101 @@ Performance: <1ms (352x faster than LLM)
Cost: $0
```
+### Intelligence Loop (ADR-050)
+
+The intelligence loop wires PageRank-ranked memory into the hook system. Every session builds a knowledge graph that improves over time:
+
+```
+SessionStart:
+ session-restore β†’ intelligence.init()
+ β†’ Read MEMORY.md / auto-memory-store.json
+ β†’ Build graph (nodes + similarity/temporal edges)
+ β†’ Compute PageRank
+ β†’ "[INTELLIGENCE] Loaded 13 patterns, 12 edges"
+
+UserPrompt:
+ route β†’ intelligence.getContext(prompt)
+ β†’ Jaccard-match prompt against pre-ranked entries
+ β†’ Inject top-5 patterns into Claude's context:
+
+ [INTELLIGENCE] Relevant patterns for this task:
+ * (0.95) HNSW gives 150x-12,500x speedup [rank #1, 12x accessed]
+ * (0.88) London School TDD preferred [rank #3, 8x accessed]
+
+PostEdit:
+ post-edit β†’ intelligence.recordEdit(file)
+ β†’ Append to pending-insights.jsonl (<2ms)
+
+SessionEnd:
+ session-end β†’ intelligence.consolidate()
+ β†’ Process pending insights (3+ edits β†’ new entry)
+ β†’ Confidence boost for accessed patterns (+0.03)
+ β†’ Confidence decay for unused patterns (-0.005/day)
+ β†’ Recompute PageRank, rebuild edges
+ β†’ Save snapshot for trend tracking
+```
+
+**Measuring improvement:**
+
+```bash
+# Human-readable diagnostics
+node .claude/helpers/hook-handler.cjs stats
+
+# JSON output for scripting
+node .claude/helpers/hook-handler.cjs stats --json
+
+# Or via intelligence.cjs directly
+node .claude/helpers/intelligence.cjs stats
+```
+
+The stats command shows:
+
+| Section | What It Tells You |
+|---------|-------------------|
+| **Graph** | Node/edge count, density % |
+| **Confidence** | Min/max/mean/median across all patterns |
+| **Access** | Total accesses, patterns used vs never accessed |
+| **PageRank** | Sum (~1.0), highest-ranked node |
+| **Top Patterns** | Top 10 by composite score with access counts |
+| **Last Delta** | Changes since previous session (confidence shift, access delta) |
+| **Trend** | Over all sessions: IMPROVING / DECLINING / STABLE |
+
+**Example output:**
+```
++--------------------------------------------------------------+
+| Intelligence Diagnostics (ADR-050) |
++--------------------------------------------------------------+
+
+ Graph
+ Nodes: 9
+ Edges: 8 (7 temporal, 1 similar)
+ Density: 22.2%
+
+ Confidence
+ Min: 0.490 Max: 0.600
+ Mean: 0.556 Median: 0.580
+
+ Access
+ Total accesses: 11
+ Patterns used: 6/9
+ Never accessed: 3
+
+ Top Patterns (by composite score)
+ #1 HNSW gives 150x-12,500x speedup
+ conf=0.600 pr=0.2099 score=0.3659 accessed=2x
+ #2 London School TDD preferred
+ conf=0.600 pr=0.1995 score=0.3597 accessed=2x
+
+ Last Delta (5m ago)
+ Confidence: +0.0300
+ Accesses: +6
+
+ Trend (3 snapshots)
+ Confidence drift: +0.0422
+ Direction: IMPROVING
++--------------------------------------------------------------+
+```
+
### All 27 Hooks by Category
#### πŸ”§ Tool Lifecycle Hooks (6 hooks)
diff --git a/package-lock.json b/package-lock.json
index 98a7e63393..5b1a59cb45 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "claude-flow",
- "version": "3.1.0-alpha.25",
+ "version": "3.1.0-alpha.26",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "claude-flow",
- "version": "3.1.0-alpha.25",
+ "version": "3.1.0-alpha.26",
"license": "MIT",
"dependencies": {
"semver": "^7.6.0",
diff --git a/package.json b/package.json
index c2d28dde0a..8ecf62ca23 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "claude-flow",
- "version": "3.1.0-alpha.25",
+ "version": "3.1.0-alpha.26",
"description": "Enterprise AI agent orchestration for Claude Code - Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
"main": "dist/index.js",
"type": "module",
diff --git a/v3/@claude-flow/cli/package.json b/v3/@claude-flow/cli/package.json
index b1003f76a8..e5485699cb 100644
--- a/v3/@claude-flow/cli/package.json
+++ b/v3/@claude-flow/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@claude-flow/cli",
- "version": "3.1.0-alpha.25",
+ "version": "3.1.0-alpha.26",
"type": "module",
"description": "Claude Flow CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
"main": "dist/src/index.js",