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

rUv37ab6383630c
diff --git a/.claude/helpers/context-persistence-hook.mjs b/.claude/helpers/context-persistence-hook.mjs
index 29631954c4..ad2cd95b6a 100644
--- a/.claude/helpers/context-persistence-hook.mjs
+++ b/.claude/helpers/context-persistence-hook.mjs
@@ -47,6 +47,18 @@ const COMPACT_INSTRUCTION_BUDGET = parseInt(process.env.CLAUDE_FLOW_COMPACT_INST
const RETENTION_DAYS = parseInt(process.env.CLAUDE_FLOW_RETENTION_DAYS || '30', 10);
const AUTO_OPTIMIZE = process.env.CLAUDE_FLOW_AUTO_OPTIMIZE !== 'false'; // on by default
+// ============================================================================
+// Context Autopilot — prevent compaction by managing context size in real-time
+// ============================================================================
+const AUTOPILOT_ENABLED = process.env.CLAUDE_FLOW_CONTEXT_AUTOPILOT !== 'false'; // on by default
+const CONTEXT_WINDOW_TOKENS = parseInt(process.env.CLAUDE_FLOW_CONTEXT_WINDOW || '200000', 10);
+const AUTOPILOT_WARN_PCT = parseFloat(process.env.CLAUDE_FLOW_AUTOPILOT_WARN || '0.70');
+const AUTOPILOT_PRUNE_PCT = parseFloat(process.env.CLAUDE_FLOW_AUTOPILOT_PRUNE || '0.85');
+const AUTOPILOT_STATE_PATH = join(DATA_DIR, 'autopilot-state.json');
+
+// Approximate tokens per character (Claude averages ~3.5 chars per token)
+const CHARS_PER_TOKEN = 3.5;
+
// Ensure data dir
if (!existsSync(DATA_DIR)) mkdirSync(DATA_DIR, { recursive: true });
diff --git a/agents/architect.yaml b/agents/architect.yaml
index f8f828bea3..e8287fb517 100644
--- a/agents/architect.yaml
+++ b/agents/architect.yaml
@@ -8,4 +8,4 @@ capabilities:
optimizations:
- context-caching
- memory-persistence
-createdAt: "2026-02-10T17:26:25.327Z"
+createdAt: "2026-02-10T18:18:25.215Z"
diff --git a/agents/coder.yaml b/agents/coder.yaml
index eece25cc66..d2d44dd046 100644
--- a/agents/coder.yaml
+++ b/agents/coder.yaml
@@ -8,4 +8,4 @@ capabilities:
optimizations:
- flash-attention
- token-reduction
-createdAt: "2026-02-10T17:26:25.327Z"
+createdAt: "2026-02-10T18:18:25.215Z"
diff --git a/agents/reviewer.yaml b/agents/reviewer.yaml
index 12bd23e6d9..ac2cd63939 100644
--- a/agents/reviewer.yaml
+++ b/agents/reviewer.yaml
@@ -7,4 +7,4 @@ capabilities:
- best-practices
optimizations:
- incremental-analysis
-createdAt: "2026-02-10T17:26:25.327Z"
+createdAt: "2026-02-10T18:18:25.215Z"
diff --git a/agents/security-architect.yaml b/agents/security-architect.yaml
index a5bf4dcc77..83f2d6494a 100644
--- a/agents/security-architect.yaml
+++ b/agents/security-architect.yaml
@@ -7,4 +7,4 @@ capabilities:
- security-review
optimizations:
- pattern-matching
-createdAt: "2026-02-10T17:26:25.327Z"
+createdAt: "2026-02-10T18:18:25.215Z"
diff --git a/agents/tester.yaml b/agents/tester.yaml
index e3db974a5e..9de88d0838 100644
--- a/agents/tester.yaml
+++ b/agents/tester.yaml
@@ -7,4 +7,4 @@ capabilities:
- coverage
optimizations:
- parallel-execution
-createdAt: "2026-02-10T17:26:25.327Z"
+createdAt: "2026-02-10T18:18:25.215Z"