350 Git-Based Agent Collaboration Workflow

350: Git-Based Agent Collaboration Workflow

1. Goal

To enable agents to collaborate on the codebase in a structured, auditable, and scalable manner using git. This involves creating the necessary tools and processes for agents to autonomously create branches, commit changes, create pull requests, and review each other’s work.

2. Proposed Plan

  1. Create a “Workspace” class in Python. This class will encapsulate git operations, providing a clean API for the workflows (e.g., workspace.create_branch("my-branch"), workspace.commit("My changes")). This will abstract away subprocess calls, making the workflows more robust and easier to test.

  2. Refactor the workflows to use the Workspace class. The existing feature_workflow.py and reviewer_workflow.py will be updated to use this new class.

  3. Create a “Conductor” workflow. This will be a higher-level workflow that orchestrates the feature_workflow and reviewer_workflow in a single, end-to-end process. It will be responsible for creating a test repository, running the full workflow, and then cleaning up after itself.

  4. Integrate with the main process. Once we have a reliable, testable, and autonomous workflow, we will integrate it into the main ai/process/README.md. This will involve updating the process to encourage agents to use the git-based workflow for all code changes.