feat: detect and run build commands from subdirectories#43
Merged
wesbillman merged 2 commits intomainfrom Feb 11, 2026
Merged
Conversation
Enhanced action detection to recursively search subdirectories for justfiles and makefiles (up to 2 levels deep). The AI detection prompt now instructs to create actions with "cd <subpath> && <cmd>" format for commands from nested build files. Changes: - Updated DETECTION_PROMPT_TEMPLATE with subdirectory instructions - Added collect_subdirectory_build_files() to recursively find build files - Modified collect_file_list() to show directory structure recursively - Added example actions showing "cd subdir && just dev" pattern - Build file discovery now includes subdirectories like "staged/justfile" This allows detecting and running build commands from nested project structures, making it easier to work with monorepos and multi-component projects. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Removed explicit file searching logic for subdirectory build files (justfiles/makefiles). The action detector now only collects root-level files, relying on the AI agent to discover and analyze subdirectory build files based on the directory structure and prompt instructions. Changes: - Removed collect_subdirectory_build_files() recursive search function - Updated collect_relevant_files() to only check root directory - AI agent still instructed via prompt to detect subdirectory build files - Directory structure shown to AI via collect_file_list() allows discovery This simplifies the detector code and delegates file discovery to the AI agent where it belongs, making the system more flexible and reducing hardcoded search logic. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
wesbillman
approved these changes
Feb 11, 2026
loganj
added a commit
that referenced
this pull request
Feb 26, 2026
## Summary - Add `tools_test.go` testing all 7 MCP tools via the Go SDK client - Tests use `httptest.NewServer` + `StreamableClientTransport` for real MCP protocol - Covers: find_project, create_thread, list_threads, read_thread, reply, files_in_review, wait_for_changes **Stack**: Group B base — PR 4 stacks on this. ## Test plan - [x] `go test ./internal/mcpserver/ -v` — all 10 tests pass - [x] `go test -race ./internal/mcpserver/` passes
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
Changes
This PR includes two commits that implement subdirectory build file detection:
The final implementation shows the directory structure to the AI agent and provides prompt instructions to detect and create actions for build files in subdirectories. This makes the system more flexible and reduces hardcoded search logic.
Test plan
cd staged && just fmt🤖 Generated with Claude Code