Multi-repo Coding Agent based on Plan/Execute example#190
Closed
alexlovelltroy wants to merge 8 commits intolanl:mainfrom
Closed
Multi-repo Coding Agent based on Plan/Execute example#190alexlovelltroy wants to merge 8 commits intolanl:mainfrom
alexlovelltroy wants to merge 8 commits intolanl:mainfrom
Conversation
- Introduced new Git and Go tooling functions in git_tools.py for repository management and code formatting. - Added validation for file paths in write_code and edit_code functions to ensure they remain within specified workspace and repository boundaries. - Created new prompt for Git Go executor to guide code modifications. - Implemented comprehensive tests for Git Go agent and Go tooling functions, including error handling and path validation. - Enhanced test suite for planning agent and added fixtures for mocking chat models and embeddings. - Updated HITL class to simplify MCP initialization by consolidating duplicate parameters. Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…e store non-go-related files in git Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
- Implemented functions to parse GitHub repository URLs. - Added functionality to check for the availability of the `gh` CLI. - Created methods to format issues and pull requests for output. - Developed a function to fetch recent issues and PRs from specified GitHub repositories. - Included error handling for network and authentication issues. - Enabled gathering of context for multiple repositories in a formatted text block. Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…pendency validation Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
…tion Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
… ruff errors - Updated type hints to use the new union syntax (e.g., `str | None`). - Improved error handling by changing `RuntimeError` to `TypeError` in `mcp.py`. - Removed unnecessary `Optional` imports and replaced them with direct type hints. - Enhanced exception handling in various functions to be more specific. - Adjusted test cases for consistency and clarity, including assertions and formatting. - Made minor formatting changes for better readability in several test files. Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
…d output management Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
Contributor
Author
|
Still working with this codebase as I find additional errors in the usage or output. Definitely ready to share, but we may want to move this to a draft as we work through all the changes. |
Collaborator
|
We will definitely get this reviewed and merged soon. Just backed up preparing for the project appraisal. Just a heads up though. |
Contributor
Author
|
This PR is superseded by a cleaner version at #196 |
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.
I found the planning/execution example very informative. It almost worked for my usecase. In my initial testing, the model got confused about where it was in the codebase(s) I had checked out. That led me to add some file location logic and git skills. That led to a git-aware agent that can be subclassed as a language specific agent. And, after a bit of trial and error, I added:
This pull request introduces a new Git-aware agent architecture with language extensibility, adds a specialized Go agent, and provides comprehensive documentation and examples for their use. The changes also include updates to dependencies, configuration files, and documentation to support these new agents and their workflows.
New Git Agent Architecture and Language Extensibility
GitAgentclass insrc/ursa/agents/git_agent.py, providing a git-aware execution agent with pluggable language tools and prompts. Includes a registry for language-specific extensions and a factory functionmake_git_agent.GitGoAgentinsrc/ursa/agents/git_go_agent.py, a convenience subclass ofGitAgentpreconfigured for Go repositories with Go tools and prompt.GitAgent,GitGoAgent, andmake_git_agentinsrc/ursa/agents/__init__.pyfor import and usage.src/ursa/tools/__init__.pyfor agent integration.Prompt Library Enhancements
git_base_promptandcompose_git_promptinsrc/ursa/prompt_library/git_prompts.pyto provide clear, modular instructions for git agents.go_language_promptinsrc/ursa/prompt_library/go_prompts.pyfor Go-specific agent instructions.src/ursa/prompt_library/git_go_prompts.py.Documentation and Examples
GitGoAgentindocs/git_go_agent.md, including usage, available tools, workflows, configuration, and safety constraints.mkdocs.ymlnavigation.GitGoAgentinexamples/single_agent_examples/git_go_agent/git_go_agent_example.py.Multi-Repo Runner and Configuration
examples/two_agent_examples/plan_execute/multi_repo_example.yaml, detailing repo setup, planner/executor models, and a complex RBAC authorization problem.docs/Plan-Execute-Runner-Checkpointing-Guide.mdto describe the new multi-repo runner and its features.Miscellaneous Improvements
pyproject.tomlto bumppymupdfdependency version for compatibility..python-versionto useursa_envfor environment consistency.mkdocs.ymland CLI server setup. [1] [2]These changes collectively enable robust, language-extensible git agents, provide specialized support for Go repositories, and enhance documentation and usability for end users.