Skip to content

Git Workflow Strategies

The core workflow (Spec → Plan → Work → Compound) runs the same regardless of how you manage branches. This guide covers the two git strategies for isolating that work, and when to pick each one.

The default for most tasks. You create a feature branch, run the full workflow, ship, and return to main.

Terminal window
git switch -c feature/add-persistence
# Spec → Plan → Work → Compound
/act-git-push-make-pr
# Merge PR on GitHub
/act-git-switch-main-pull
git branch -d feature/add-persistence
Best forOne feature at a time
SetupNone — standard git
Context switchesStash or commit before switching
CLI sessionsOne

Each feature gets its own directory, branch, and AI client session. No stashing, no context switching — just open another terminal.

Terminal window
# Create worktrees/add-persistence/ — a sibling directory with its own branch
/act-git-worktree create add-persistence
# Open a new terminal at the worktree directory
cd worktrees/add-persistence
claude
# Spec → Plan → Work → Compound
/act-git-push-make-pr
# Merge PR on GitHub, then clean up
/act-git-worktree delete add-persistence
Best forParallel features or comparing approaches
SetupACT Pro (/act-git-worktree)
Context switchesSwitch terminals — no stashing needed
CLI sessionsOne per worktree
FactorBranchWorktree
One feature at a timeYesOverkill
Multiple features in parallelPainful (stash/switch)Yes
Comparing two models on the same featureNoYes — one worktree per model
Quick hotfix while mid-featureStash + switchCreate a second worktree
Disk space constrainedLighterEach worktree is a full checkout

When you want to evaluate two different models (e.g., Opus vs GPT) on the same feature, you can mix branch-based and worktree-based isolation depending on the artifact you are comparing.

For spec generation, staying on a single branch is often simpler because you are only producing a small number of markdown files in the same folder:

  1. Generate the initial spec with one model and save it as [feature-name]-opus-spec.md
  2. Generate the same spec with another model and save it as [feature-name]-gpt-spec.md
  3. Start a fresh session and ask Opus to review the differences and pick the stronger spec
  4. Start another fresh session and ask GPT to review the differences and pick the stronger spec

This gives you two independent proposals plus two review passes, while keeping everything easy to compare side by side in one directory.

Once you move from planning into implementation, worktrees become more useful because each model now needs its own full working directory:

  1. Create two worktrees from the same starting point
  2. Open separate AI client sessions, configured with Opus/GPT respectively
  3. Run the same spec and plan through /act-workflow-work in both
  4. Compare both implementations across the same criteria such as code quality, test coverage, and approach; if you want an extra layer of analysis, also ask each model to review both implementations and explain which one is stronger
  5. Keep the better result, delete the other worktree

In practice, a hybrid workflow works well: use one branch when comparing lightweight planning artifacts such as specs, then switch to worktrees when comparing full implementations that would otherwise conflict in the same checkout.

Whichever strategy you choose, the end-to-end cycle is broadly the same:

  1. Isolate — create a branch or worktree
  2. Build — run the core workflow (Spec → Plan → Work)
  3. Ship/act-git-push-make-pr to create a PR
  4. Merge — review and merge on GitHub
  5. Capture/act-workflow-compound to save insights
  6. Clean up — delete the branch or worktree, return to main