Skip to content

feat(isolation): introduce Git worktree isolation and MCP server#158

Draft
moisgobg wants to merge 2 commits intomainfrom
feature/isolation-worktree
Draft

feat(isolation): introduce Git worktree isolation and MCP server#158
moisgobg wants to merge 2 commits intomainfrom
feature/isolation-worktree

Conversation

@moisgobg
Copy link
Copy Markdown
Contributor

@moisgobg moisgobg commented Apr 1, 2026

Description

This PR introduces an MCP (Model Context Protocol) server to manage isolated Git worktrees and integrates this isolation mechanism into the core Conductor commands.

Changes

  1. MCP Server for Worktree Management:

    • Bootstraps a new Node.js MCP server in src/ to expose Git worktree operations.
    • Provides create_worktree, delete_worktree, and list_worktrees tools.
    • Includes full unit test coverage for the Git isolation logic (src/isolation.test.ts).
    • Configures gemini-extension.json to register the conductor MCP server.
  2. Integration into Conductor Commands:

    • implement: Checks for existing worktrees or creates a new one using the create_worktree tool. Instructs the agent to perform all execution and file reads within this isolated context.
    • review: Detects if an isolated worktree exists for the track being reviewed. Ensures pre-checks (linting, building, testing) and diff analysis run within the context of the worktree. Provides options to discard the isolated work or merge it into the base branch.
    • revert: Integrates awareness of active worktrees, offering pre-merge options like aborting the track (destroying the worktree), rolling back the last commit within the worktree, or rolling back to a checkpoint.

@moisgobg moisgobg force-pushed the feature/isolation-worktree branch 2 times, most recently from 0a4bc84 to 16f3055 Compare April 3, 2026 20:17
@moisgobg moisgobg force-pushed the feature/isolation-worktree branch from 16f3055 to 13515bd Compare April 3, 2026 20:18
@moisgobg moisgobg changed the title Feature/isolation worktree feat(isolation): introduce Git worktree isolation and MCP server Apr 3, 2026
@moisgobg moisgobg requested review from anj-s and mahimashanware April 3, 2026 20:23
@moisgobg moisgobg self-assigned this Apr 3, 2026
@moisgobg moisgobg added feature New feature or request area:implement Related to conductor:implement command area:revert Related to conductor:revert command maintainer only Reserved for project maintainers. Not open for external contributions area:review Related to conductor:review command area:mcp Updates on the MCP server and its tools labels Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:implement Related to conductor:implement command area:mcp Updates on the MCP server and its tools area:revert Related to conductor:revert command area:review Related to conductor:review command feature New feature or request maintainer only Reserved for project maintainers. Not open for external contributions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant