Divio type: Explanation
This document explains why Spec Kitty recommends jujutsu (jj) for multi-agent parallel development workflows, and when git remains the appropriate choice.
When multiple AI agents (or humans) work on a feature simultaneously, each in their own workspace, three coordination problems emerge:
Git handles these problems, but requires manual intervention. Jujutsu automates them.
In git, when a parent work package changes, dependent workspaces must be manually rebased:
# Git: Manual rebase required
cd .worktrees/###-feature-WP02/
git fetch origin
git rebase origin/###-feature-WP01
# May have conflicts - blocks agent
In jj, dependent changes are automatically rebased when you sync:
# jj: Automatic rebase
cd .worktrees/###-feature-WP02/
spec-kitty sync
# Changes automatically rebased - agent continues
This matters because multi-agent workflows involve frequent dependency updates. With three agents and five work packages, manual rebasing becomes a significant overhead.
Git conflicts halt work. When git rebase encounters a conflict, you must resolve it before continuing:
# Git: Conflicts block progress
git rebase origin/main
# CONFLICT (content): Merge conflict in config.py
# Agent is stuck until conflict is resolved
jj stores conflicts in the working copy without blocking:
# jj: Conflicts stored, work continues
spec-kitty sync
# Conflict in config.py - stored as conflict markers
# Agent can continue working on other files
The agent can finish implementing other parts of the work package, then address conflicts when ready. This keeps momentum and allows human review of complex conflicts.
Git’s reflog exists but is difficult to use safely:
# Git: Recovery requires expertise
git reflog
# a1b2c3d HEAD@{0}: rebase: finish
# e4f5g6h HEAD@{1}: commit: Add feature
git reset --hard HEAD@{1} # Dangerous - loses commits
jj provides a clear operation log with safe undo:
# jj: Clear history, safe undo
spec-kitty ops log
# @ 12345abc 2024-01-15 10:30 (current operation)
# │ commit working copy
# ○ 67890def 2024-01-15 10:15
# │ edit commit 87654321
spec-kitty ops undo
# Safely reverts to previous state
Agents can experiment freely, knowing mistakes are recoverable.
Git worktrees are an afterthought—a way to have multiple checkouts of the same repository. They work, but branch handling is manual.
jj workspaces are first-class:
# jj: Native workspace support
jj workspace add ../feature-WP01
# Automatically tracks the right commit
# Auto-rebases when dependencies change
This aligns perfectly with Spec Kitty’s workspace-per-WP model.
Git remains the right choice when:
If your team knows git and is unfamiliar with jj, the learning curve may slow initial productivity. Git works—jj optimizes.
If your CI/CD pipeline is deeply integrated with git-specific features (branch protection rules, required checks on branches, GitHub Actions branch triggers), jj’s colocated mode helps but adds complexity.
If you collaborate with teams that use git exclusively, a pure git workflow reduces friction. Colocated mode (jj + git) works but requires understanding both tools.
If your work packages rarely have dependencies, or you typically work on one package at a time, git’s manual rebasing is infrequent enough to not matter.
Spec Kitty detects your VCS based on CLI flags, feature locks, and tool availability. See VCS Detection Order for the full algorithm.
In most cases:
meta.json--vcs git or --vcs jj overrides auto-detection (and errors if it conflicts)When both .jj/ and .git/ exist, Spec Kitty uses jj while maintaining git compatibility:
my-project/
├── .jj/ # jj operations
├── .git/ # git compatibility
└── kitty-specs/ # Feature specs
This allows gradual migration—start with git, add jj later, keep both.
Spec Kitty commands work the same regardless of backend:
# Same command, different implementations
spec-kitty sync # jj: update-stale + auto-rebase, git: rebase base branch
spec-kitty ops log # jj: operation log, git: reflog
spec-kitty ops undo # jj only (not supported for git)
Consider a typical multi-agent scenario:
WP01 (Schema)
/ \
WP02 WP03
(API) (UI)
\ /
WP04
(Integration)
The git workflow requires 3+ manual interventions. The jj workflow requires zero—agents focus on implementation.
For new projects, initialize with jj:
spec-kitty init --vcs jj
Enable colocated mode:
cd my-git-project
jj git init --colocate
Now both tools work. Spec Kitty prefers jj when .jj/ exists.