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

rUv31ec6f0388aa
diff --git a/v3/@claude-flow/cli/src/commands/hooks.ts b/v3/@claude-flow/cli/src/commands/hooks.ts
index 20c93b0a90..96ac81e4a5 100644
--- a/v3/@claude-flow/cli/src/commands/hooks.ts
+++ b/v3/@claude-flow/cli/src/commands/hooks.ts
@@ -1505,6 +1505,35 @@ const preTaskCommand: Command = {
output.printList(result.recommendations);
}
+ // Dynamic model routing based on task complexity
+ try {
+ const { getModelRouter } = await import('../ruvector/model-router.js');
+ const router = getModelRouter();
+ const modelResult = await router.route(description);
+
+ output.writeln();
+ output.writeln(output.bold('Model Recommendation'));
+ output.writeln(` ${output.highlight(`model: "${modelResult.model}"`)} - ${modelResult.reasoning}`);
+ output.writeln();
+
+ // Output clear instruction for Claude to use
+ output.writeln(output.dim('─'.repeat(60)));
+ output.writeln(output.bold(output.success(`[TASK_MODEL_RECOMMENDATION] Use model="${modelResult.model}" for this task`)));
+ output.writeln(output.dim(`Complexity: ${(modelResult.complexity * 100).toFixed(0)}% | Confidence: ${(modelResult.confidence * 100).toFixed(0)}%`));
+ output.writeln(output.dim('─'.repeat(60)));
+
+ // Add model to result for programmatic use
+ (result as Record<string, unknown>).recommendedModel = modelResult.model;
+ (result as Record<string, unknown>).modelRouting = {
+ model: modelResult.model,
+ confidence: modelResult.confidence,
+ complexity: modelResult.complexity,
+ reasoning: modelResult.reasoning
+ };
+ } catch {
+ // Model router not available, skip recommendation
+ }
+
return { success: true, data: result };
} catch (error) {
if (error instanceof MCPClientError) {