Skip to content

Multi-repo Coding Agent based on Plan/Execute example#190

Closed
alexlovelltroy wants to merge 8 commits intolanl:mainfrom
alexlovelltroy:feature/multi-repo-coding-agent
Closed

Multi-repo Coding Agent based on Plan/Execute example#190
alexlovelltroy wants to merge 8 commits intolanl:mainfrom
alexlovelltroy:feature/multi-repo-coding-agent

Conversation

@alexlovelltroy
Copy link
Copy Markdown
Contributor

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:

  • Using different models for planning and execution
  • Context and token count reporting during operation
  • validation and retry at each step
  • Parallel execution with support for dependent operations
  • All this stuff that the PR-bot assures me is included:

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

  • Added GitAgent class in src/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 function make_git_agent.
  • Introduced GitGoAgent in src/ursa/agents/git_go_agent.py, a convenience subclass of GitAgent preconfigured for Go repositories with Go tools and prompt.
  • Registered GitAgent, GitGoAgent, and make_git_agent in src/ursa/agents/__init__.py for import and usage.
  • Exported git and Go tools in src/ursa/tools/__init__.py for agent integration.

Prompt Library Enhancements

  • Added git_base_prompt and compose_git_prompt in src/ursa/prompt_library/git_prompts.py to provide clear, modular instructions for git agents.
  • Added go_language_prompt in src/ursa/prompt_library/go_prompts.py for Go-specific agent instructions.
  • Created a combined prompt for GitGoAgent in src/ursa/prompt_library/git_go_prompts.py.

Documentation and Examples

  • Added detailed documentation for GitGoAgent in docs/git_go_agent.md, including usage, available tools, workflows, configuration, and safety constraints.
  • Registered the new documentation page in mkdocs.yml navigation.
  • Added a practical example script for GitGoAgent in examples/single_agent_examples/git_go_agent/git_go_agent_example.py.

Multi-Repo Runner and Configuration

  • Added an example YAML configuration for multi-repo parallel execution in examples/two_agent_examples/plan_execute/multi_repo_example.yaml, detailing repo setup, planner/executor models, and a complex RBAC authorization problem.
  • Updated documentation in docs/Plan-Execute-Runner-Checkpointing-Guide.md to describe the new multi-repo runner and its features.

Miscellaneous Improvements

  • Updated pyproject.toml to bump pymupdf dependency version for compatibility.
  • Changed .python-version to use ursa_env for environment consistency.
  • Minor configuration and navigation tweaks in mkdocs.yml and 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.

alexlovelltroy and others added 7 commits February 21, 2026 08:07
- 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>
@alexlovelltroy
Copy link
Copy Markdown
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.

@mikegros mikegros marked this pull request as draft February 24, 2026 00:52
@mikegros
Copy link
Copy Markdown
Collaborator

We will definitely get this reviewed and merged soon. Just backed up preparing for the project appraisal. Just a heads up though.

@alexlovelltroy
Copy link
Copy Markdown
Contributor Author

This PR is superseded by a cleaner version at #196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants