Add --agents-file flag to hive-mind spawn command for directive injection - #4
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
clduab11
self-requested a review
September 12, 2025 05:37
clduab11
marked this pull request as ready for review
September 12, 2025 05:37
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
clduab11
deleted the
copilot/fix-b8599f0d-eb63-481f-b27d-31be7254408c
branch
September 12, 2025 05:38
Copilot
AI
changed the title
[WIP] feat(cli): add --agents-file flag to hive-mind spawn for directive file injection
Add --agents-file flag to hive-mind spawn command for directive injection
Sep 12, 2025
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.
This PR implements the requested
--agents-file <path>flag for thecodex-beta hive-mind spawncommand, allowing users to automatically inject large directive files (like AGENTS.md) into their prompts without manual copy-pasting.🎯 Problem Solved
Previously, users had to manually copy and paste the contents of directive files like AGENTS.md into their hive-mind spawn prompts, which was cumbersome and error-prone for large files. This enhancement streamlines the workflow by automating the injection process.
🚀 Implementation Details
Core Functionality
--agents-file <path>added tohive-mind spawncommandfileContent + "\n\n" + promptUser Experience Enhancements
🔗 Injected agents file: <abs path>)Example Usage
📚 Documentation & Examples
hive-mind-results.jsonto prevent tracking generated output files🧪 Testing
All acceptance criteria have been thoroughly tested:
🔧 Technical Implementation
The implementation uses Node.js
fsandpathmodules with proper TypeScript error handling. The file reading logic is placed strategically before the existingexecuteHiveMindSpawncall, with inline comments explaining the injection process. The solution is minimal and focused, changing only what's necessary to implement the feature.This enhancement significantly improves the developer experience when working with complex agent directives, making the hive-mind spawn command more powerful and user-friendly.
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.