Skip to content

Instantly share code, notes, and snippets.

@galligan
Created October 24, 2025 16:00
Show Gist options
  • Save galligan/4387985e770c8bb30fa6af77f4e49419 to your computer and use it in GitHub Desktop.
Save galligan/4387985e770c8bb30fa6af77f4e49419 to your computer and use it in GitHub Desktop.
Comprehensive prompt for analyzing GitButler in agentic development workflows

GitButler for Agentic Development: Comprehensive Analysis and Ideation

Context

I've been evaluating GitButler as a replacement for Graphite in my AI-agent-driven development workflows. Through extensive hands-on testing with multiple AI agents (Claude Code and Droid), we've documented GitButler's capabilities, limitations, and potential for agentic collaboration.

Materials Provided

You have access to:

  • GITBUTLER.md: Comprehensive CLI reference and workflow patterns
  • CLAUDE-GITBUTLER-EXPERIENCE.md: Claude's technical assessment and multi-agent testing insights
  • DROID-GITBUTLER-EXPERIENCE.md: Droid's perspective on automation challenges
  • GITBUTLER-FEEDBACK.md: Prioritized feedback for GitButler team with identified gaps

Your Mission

Create a comprehensive Canvas document that serves as the definitive guide for using GitButler in agentic development environments.

Phase 1: Synthesize & Expand (Foundation)

Objective: Build upon the provided documentation with additional research.

  1. Core Concepts Deep Dive

    • Virtual branches architecture and internals
    • Integration branch (gitbutler/workspace) mechanics
    • Stacked branches implementation vs. Graphite
    • Operation log (oplog) snapshot system
    • How GitButler differs fundamentally from git worktrees
  2. CLI Completeness Audit

    • Document ALL but commands comprehensively (go beyond what we tested)
    • Identify any commands/flags we missed in our exploration
    • Research GitButler's JSON API structure in depth
    • Find any undocumented CLI capabilities
  3. Additional Research Areas

    • GitButler's conflict resolution mechanisms
    • Performance characteristics (large repos, many branches)
    • GitButler Cloud integration and API capabilities
    • Webhook/automation possibilities
    • Recent changelogs and roadmap items relevant to CLI/automation

Phase 2: Agentic Development Patterns (Innovation)

Objective: Design novel workflows enabled by GitButler's unique architecture.

  1. Multi-Agent Collaboration Patterns

    • Parallel Feature Development: Multiple agents, separate virtual branches, same workspace
    • Review-Driven Development: Agent writes code in branch A, reviewer agent creates fixes in branch B, commits swapped post-review
    • Exploration Trees: Parent branch with multiple child branches testing different approaches, easy rollup
    • Test-Driven Collaboration: Test-writing agent and implementation agent working in lockstep
    • Refactor Sandboxing: Safe refactoring in virtual branch while feature work continues elsewhere
  2. Commit Choreography Workflows

    • Just-In-Time Commit Organization: Agents commit freely, then use but rub to reorganize commits by feature/concern
    • Cross-Agent Commit Handoffs: Agent A starts work, Agent B picks up specific commits mid-flight
    • Atomic Feature Assembly: Build features from commits across multiple agents/sessions
    • Time-Travel Debugging: Use oplog to bisect agent decisions
  3. Agent-Specific Use Cases Think through workflows for specialized agent roles:

    • Code generation agents
    • Test-writing agents
    • Documentation agents
    • Security/audit agents
    • Performance optimization agents
    • Migration/refactoring agents

Phase 3: Tooling Ecosystem (Pragmatic Solutions)

Objective: Design missing tooling and automation to make GitButler production-ready for agents.

  1. Critical Automation Gaps (from GITBUTLER-FEEDBACK.md) Design solutions for:

    • ID Discovery: Better alternatives to text-parsing but status
    • Filename Handling: Workarounds or wrappers for files with dashes/special chars
    • JSON Improvements: What a comprehensive JSON API should expose
    • Batch Operations: Scripts for bulk commit/file manipulation
  2. Agent Helper Tools Propose tools that would dramatically improve agent workflows:

    • Smart Wrappers: but-agent CLI that provides agent-friendly abstractions
    • Status Parsers: Reliable JSON/structured output extraction
    • Conflict Detectors: Pre-flight checks before operations
    • Stack Visualizers: ASCII/JSON representations of branch topology
    • Oplog Query Tools: Search/filter operation history
    • Branch Templates: Pre-configured branch structures for common patterns
    • Commit Analyzers: Tools to suggest optimal commit organization
  3. Integration Opportunities

    • GitButler + Linear/Jira integration patterns
    • GitButler + CI/CD pipeline orchestration
    • GitButler + code review tools (GitHub, GitLab)
    • GitButler + MCP server possibilities
    • GitButler + agent orchestration platforms

Phase 4: Workflow Documentation (The Manual)

Objective: Create step-by-step guides for common agentic scenarios.

Document complete workflows for:

  1. Single Agent, Multiple Features (independent virtual branches)
  2. Dual Agent, Stacked Features (parent-child dependencies)
  3. Agent Swarm, Single Feature (multiple agents contributing to one branch)
  4. Agent Code Review Cycle (one agent codes, another reviews/fixes)
  5. Exploratory Development (trying multiple approaches in parallel)
  6. Commit Cleanup & Organization (post-development housekeeping)
  7. Emergency Hotfix (while feature work continues in virtual branches)
  8. Dependency Updates (isolating updates from feature work)

Each workflow should include:

  • Setup steps
  • Example commands
  • Expected outputs
  • Common pitfalls
  • Recovery procedures

Phase 5: Vision & Future State (Blue Sky)

Objective: Imagine GitButler's evolution for agentic development.

  1. Agent-Native Features What would GitButler look like if designed from the ground up for AI agents?

    • Semantic commit APIs (intent-based, not ID-based)
    • Natural language branch operations
    • Agent-to-agent coordination primitives
    • Conflict prediction and prevention
    • Automatic commit optimization
  2. Workflow Innovations Novel possibilities unique to GitButler + agents:

    • Speculative Execution: Agents explore multiple solutions in virtual branches, merge winner
    • Parallel Test Strategies: Different test approaches in different branches
    • Architecture Explorations: Multiple architectural patterns side-by-side
    • Performance Bake-Offs: Race different implementations
  3. Ecosystem Integrations

    • Agent marketplaces with GitButler-native workflows
    • IDE plugins for visualizing agent branch activity
    • Collaborative coding platforms built on virtual branches
    • LLM-native git operations

Output Requirements

Canvas Structure

Organize the Canvas document into clear sections:

  1. Executive Summary (TL;DR of GitButler for agentic workflows)
  2. Core Concepts (Phase 1 synthesis)
  3. Workflow Patterns (Phase 2 & 4 combined)
  4. Tooling & Automation (Phase 3)
  5. Vision & Future State (Phase 5)
  6. Quick Reference (Command cheat sheets, common patterns)
  7. Appendices (Research links, related tools, comparisons)

Style Guidelines

  • Be specific: Show concrete examples, not abstractions
  • Be pragmatic: Note what works today vs. what requires tooling
  • Be visual: Include ASCII diagrams of branch structures, workflows
  • Be comparative: Reference Graphite, git worktrees, plain git where relevant
  • Be critical: Note limitations and workarounds honestly

Depth Expectations

  • Go deep on technical mechanisms (how virtual branches work internally)
  • Go wide on workflow possibilities (cover many scenarios)
  • Go practical on tooling (propose buildable solutions)
  • Go creative on vision (but flag as speculative)

Key Questions to Answer

As you create this Canvas, explicitly address:

  1. What makes GitButler transformative for agent workflows? (vs. incremental improvement)
  2. What are the 3 killer workflows only possible with GitButler?
  3. What's the minimum viable tooling needed for production agent use?
  4. Where does GitButler fall short, and what are workarounds?
  5. What's the migration path from Graphite to GitButler for agent teams?
  6. How does GitButler change the agent development mental model?

Success Criteria

This Canvas document should enable someone to:

  • Understand GitButler's core value for agents immediately
  • Implement common agent workflows confidently
  • Build missing tooling with clear requirements
  • Evaluate GitButler vs. alternatives with full context
  • Contribute ideas back to GitButler team
  • Onboard new agents to GitButler-based workflows

Research Methodology

When doing additional research:

  • Prioritize GitButler's official documentation
  • Check recent GitHub issues/PRs for undocumented features
  • Look for community workflows and patterns
  • Cite sources for any new information
  • Flag assumptions vs. verified facts

Note: You don't need to focus on the specific tmux coordination or how we controlled multiple agents during testing. Extract the insights and patterns, not the specific testing apparatus.

Go deep. Be thorough. Think creatively. This is the definitive guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment