Never Lose an AI Coding Session Again - Introducing JJ AI Workflow

The Problem Every AI Developer Faces

Picture this: You're deep in a coding session with Claude, GitHub Copilot, or another AI assistant. The AI suggests a refactoring. You apply it. Then another suggestion. And another. Suddenly, something breaks.

"Wait, which change caused this? What was the code like three iterations ago?"

Sound familiar?

When working with AI coding assistants, we often make rapid iterationsβ€”trying different approaches, experimenting with suggestions, and evolving our code quickly. But this speed comes with a cost: we lose track of what worked and what didn't.

Enter SnapJJ

SnapJJ is a dead-simple automation toolkit that solves this problem. Built on top of Jujutsu (jj)β€”a powerful Git-compatible version control systemβ€”it gives you one-command snapshots of every AI iteration.

Why This Matters

Traditional Git workflows are too heavy for AI pair programming:

SnapJJ reduces this to a single command: snap

How It Works

The Two-Command Workflow

  1. Let AI make changes in your editor
  2. Type snap to save that iteration

That's it. Every AI suggestion is now safely tracked.

Real-World Example

# Start working on a new feature
$ ai_start "building user authentication"
πŸš€ Started AI session: building user authentication

# AI suggests adding a login form
# You implement it, then:
$ snap "added login form"
βœ… Snapshotted: added login form

# AI suggests improving validation
# You apply the changes:
$ snap "improved validation logic"
βœ… Snapshotted: improved validation logic

# Something breaks! No problem:
$ oops
⚑ Undid last operation

# Want to see your history?
$ back
πŸ“š Recent history:
@  abc123  πŸ€– AI: improved validation logic
β—‹  def456  πŸ€– AI: added login form
β—‹  ghi789  πŸš€ Session: building user authentication

Key Features That Make a Difference

πŸ€– One-Command Snapshots

No more git add -A && git commit -m "..."
Just snap "what changed" and continue coding.

⚑ Instant Undo

Made a mistake? oops instantly reverts it.
No googling "how to undo last git commit."

πŸ”„ Time Travel

Jump to any previous iteration with ai_goto.
Compare different approaches side-by-side.

πŸ“š AI-Focused History

ai_history shows only your AI sessions.
No clutter, just the iterations that matter.

🍎 Zero Learning Curve

Commands are designed to be memorable:

Installation: 3 Minutes to Safety

Step 1: Install Jujutsu

# macOS
brew install jj

# Linux/Windows
cargo install --locked --bin jj jj-cli

Step 2: Run the Setup Script

git clone https://github.com/dimitrimissoh/snapjj
cd snapjj
./setup-jj-ai.sh

Step 3: Start Using It

cd your-project
jj init --git  # Initialize jj (works with existing Git repos!)
ai_start "working with AI"

Why Jujutsu?

You might wonder: why not just use Git aliases?

Jujutsu offers unique advantages:

Real Developer, Real Benefits

After using SnapJJ for months, I've found it transforms how I work with AI:

  1. More Experimental: I'm not afraid to try wild AI suggestions
  2. Better Learning: I can review what worked and what didn't
  3. Faster Development: No mental overhead about version control
  4. Peace of Mind: Every state is saved automatically

Beyond Basic Usage

The toolkit grows with you:

# Compare two different AI approaches
ai_compare abc123 def456

# Start a new experimental branch
ai_start "trying reactive approach"

# View changes before snapshotting
ai_what

# See only AI-related commits
ai_history

Visual History with GUI Tools

Want to see your AI iterations visually? These tools provide graphical interfaces for Jujutsu:

With these tools, you can see your entire AI collaboration history as a visual graph, making it even easier to jump between different approaches and understand how your code evolved.

Who Is This For?

Getting Started Today

The beauty of SnapJJ is its simplicity. You don't need to change how you workβ€”just add snap to your muscle memory.

Ready to never lose an AI coding session again?

Get SnapJJ on GitHub β†’


Quick Reference

Command What it does When to use it
snap Save current state After each AI change
oops Undo last action When something breaks
back View recent history To see what you've done
ai_goto Jump to specific state To try a different approach
ai_what Show current changes Before snapshotting

SnapJJ is open source and available under the MIT license. Contributions welcome!