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: Edit /workspaces/claude-code-flow/src/cli/simple-commands/automation-executor.js

rUva8b8b6d3fdfa
diff --git a/.claude/checkpoints/1754335264.json b/.claude/checkpoints/1754335264.json
new file mode 100644
index 0000000000..23aace486d
--- /dev/null
+++ b/.claude/checkpoints/1754335264.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250804-192104", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/automation-executor.js", "timestamp": "2025-08-04T19:21:04Z", "type": "pre-edit", "original_branch": "alpha-85"}
diff --git a/.claude/checkpoints/1754335266.json b/.claude/checkpoints/1754335266.json
new file mode 100644
index 0000000000..914cdd3cc1
--- /dev/null
+++ b/.claude/checkpoints/1754335266.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250804-192106", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/automation-executor.js", "timestamp": "2025-08-04T19:21:06Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 60 +++++++++ .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/1754335216.json | 1 + .claude/checkpoints/1754335218.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/automation-executor.js | 175 +++++++++++++++++++------ 7 files changed, 202 insertions(+), 43 deletions(-) "}
diff --git a/src/cli/simple-commands/automation-executor.js b/src/cli/simple-commands/automation-executor.js
index 806ca1422a..afb326fd63 100644
--- a/src/cli/simple-commands/automation-executor.js
+++ b/src/cli/simple-commands/automation-executor.js
@@ -346,6 +346,36 @@ export class WorkflowExecutor {
}
}
+ /**
+ * Create task-specific Claude prompt
+ */
+ createTaskPrompt(task, agent, workflow) {
+ // Use the claudePrompt from the task if available
+ if (task.claudePrompt) {
+ // Apply variable substitutions to the prompt
+ let prompt = task.claudePrompt;
+ const allVariables = { ...workflow.variables, ...task.input };
+
+ for (const [key, value] of Object.entries(allVariables)) {
+ const pattern = new RegExp(`\\$\\{${key}\\}`, 'g');
+ prompt = prompt.replace(pattern, value);
+ }
+
+ // Add coordination instructions
+ return `${prompt}
+
+COORDINATION REQUIREMENTS:
+- Session ID: ${this.sessionId}
+- Task ID: ${task.id}
+- Use hooks for coordination: npx claude-flow@alpha hooks [command]
+- Store results in memory: npx claude-flow@alpha memory store
+- This is an automated workflow execution - complete the task and exit when done`;
+ } else {
+ // Fallback to agent prompt
+ return this.createAgentPrompt(agent);
+ }
+ }
+
/**
* Create agent-specific Claude prompt
*/