Repository navigation
feat(agent-farm): Add send command for architect-to-builder messaging - #31
Merged
Merged
Conversation
Implements spec 0020 - Send Instructions to Builder feature: - New 'af send' CLI command to send messages to running builders - Uses tmux buffer paste for reliable delivery (avoids shell escaping) - Supports --all flag for broadcast to all builders - Supports --file flag to include file content - Supports --interrupt flag to send Ctrl+C first - Supports --raw flag to skip structured formatting - Structured message format helps Claude identify architect instructions
Contributor
Author
Architect Review with Expert ConsultationReviewed with Gemini Pro and GPT-5 Codex. Overall implementation is solid - the buffer-based approach is the correct way to handle this. ✅ What's Good
🟡 Suggested Improvements (Minor)1. Variable naming (Line 78)
// Change from:
const stats = readFileSync(options.file);
// To:
const fileBuffer = readFileSync(options.file);2. Quote buffer name in tmux commands (Lines 97-98)Defensive fix in case builder IDs ever contain special characters: await run(`tmux load-buffer -b "${bufferName}" "${tempFile}"`);
await run(`tmux paste-buffer -b "${bufferName}" -t "${builder.tmuxSession}"`);3. Optional: Delete buffer after pasteReduces leakage of potentially sensitive instructions: await run(`tmux delete-buffer -b "${bufferName}"`);🟢 Notes (No Action Required)
VerdictReady to merge after addressing items 1 and 2 (minor fixes). Item 3 is optional but recommended. |
- Rename misleading 'stats' variable to 'fileBuffer' - Quote bufferName in tmux commands for safety - Add tmux delete-buffer cleanup after paste
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
af sendCLI command to send messages to running builders via tmux buffer paste--all), file attachments (--file), interrupt (--interrupt), and raw mode (--raw)Implementation Details
load-buffer+paste-bufferapproach for reliable delivery (avoids shell escaping issues)### [ARCHITECT INSTRUCTION | timestamp] ###) helps Claude identify architect instructionsTest Plan
af send 9999 "Test"- Shows clear error for non-existent builderaf send --all "Message"- Handles no active builders gracefullyaf send- Shows usage erroraf send 0009- Shows missing message erroraf send --help)Files Changed
agent-farm/src/commands/send.tsagent-farm/src/commands/index.tsagent-farm/src/index.tsagent-farm/src/types.tscodev/plans/0020-send-instructions-to-builder.md