Skip to content

Transition to Git-Native Workflow (Branch-per-Track & Worktrees) #55

@sherzat3

Description

@sherzat3

Context & Problem

Currently, Conductor operates as a file-based state manager. When a user creates a new track, the artifacts (spec.md, plan.md) and the implementation changes all live in the current working directory (under conductor/tracks/).

This presents a few limitations:

  • Context Contamination: It is difficult to work on multiple tracks simultaneously without artifacts or code changes from one track bleeding into another.
  • Serial Workflow: Users cannot easily run an agent on a long-running implementation task in the background while manually working on a different feature.

Proposal: Git-Native Architecture

The proposal is to move Conductor to a Branch-per-Track model, where every "Track" is synonymous with a specific Git branch.

1. Branch-per-Track

When running /conductor:newTrack, the extension should:

  1. Create a new branch (e.g., conductor/track-<id>-<slug>).
  2. Switch to that branch immediately.
  3. Generate the spec.md and plan.md inside that branch.

This ensures that the "Planning" phase becomes part of the feature's commit history, and the main branch remains clean of work-in-progress artifacts.

2. Experimental: Git Worktree Support

To enable true parallelism, we should explore supporting Git Worktrees.
Instead of just switching branches (which updates the current directory), Conductor could offer a mode to spin up a worktree.

This would create a sibling directory (e.g., ../project-track-01) checked out to that track's branch. This allows a user to run one track in the worktree folder while continuing to work on another track in the main folder.

Open Design Questions

The biggest challenge with this approach is Discovery/Registry.
Currently, conductor/tracks.md acts as a central registry of all work. If we move to a branch-based model, the main branch will technically not know that track-02 exists on a divergent branch.

Possible solutions to discuss:

  • Dynamic Discovery: The /conductor:status command stops reading tracks.md and instead scans git branch --list conductor/*, parsing the metadata from the tip of those branches.
  • Hybrid: We continue to commit a registry line to main when a track is created, even if the work happens elsewhere.

Discussion points:

I am looking for feedback on:

  1. Does the worktree complexity outweigh the benefits for your workflow?
  2. How should we handle the "Global Status" view if state is scattered across branches?
  3. Are there edge cases in CI/CD pipelines we need to consider?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:implementRelated to conductor:implement commandarea:newTrackRelated to conductor:newTrack commanddiscussionProposals or architectural changes that require consensus or further research.featureNew feature or requestmaintainer onlyReserved for project maintainers. Not open for external contributionsp2Normal priority. Scheduled for the standard backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions