Show HN: Juju-chu A book on Jujutsu (jj) and AI coding agent

oukayuka1 pts0 comments

Juju-chu!: The Jujutsu Guide for Agentic CodingSkip to content<br>The Jujutsu Guide for Agentic CodingLet your AI agents run wild. Undo anything, rewrite everything.<br>Jujutsu (jj ) is a Git-compatible version control system with automatic<br>snapshots, undoable operations, and safe history rewriting. This practical guide<br>shows Git users how to experiment fearlessly, recover from anything, and turn<br>AI-generated changes into clean, reviewable history.

Preview 44 pages

Buy on LeanpubBuy on Amazon

Why This Book Exists<br>Two decades with Git. Then AI coding agents led me to Jujutsu.<br>For years, Git was the unquestioned foundation of my workflow. But when I started<br>working daily with AI coding agents, the rhythm changed. Agents could generate,<br>rewrite, and discard large amounts of code in minutes—while more and more of my<br>time went into managing commits, recovering work through the reflog, and<br>untangling history.

Then I found Jujutsu , a Git-compatible VCS built on a different model. Nothing<br>was ever lost, nothing needed staging, and rewriting history stopped being<br>something I braced myself for. For the first time in years, version control felt<br>calm.

But learning individual commands was only half the story. I looked for a guide<br>that showed how these ideas fit together into a real development workflow with AI<br>agents. It didn’t exist yet—so I wrote it.

What You’ll Learn

Think in changes, not commits: the mental model that makes history editing feel<br>natural

Undo anything with the operation log, no reflog archaeology required

Turn piles of AI-generated code into clean, reviewable history

Run parallel tasks—or parallel agents—with workspaces

Stop fearing merge conflicts: in jj, conflicts don’t block you

Ship your work to GitHub and collaborate with Git-based teams as usual

About The Style Of This Book<br>The dialogue isn’t decoration. It’s how the book teaches.<br>Juju-chu! unfolds as a conversation between two engineers: a senior who knows<br>Jujutsu inside out, and a junior who keeps asking why.

The moment a question forms in your head—“but if you don’t control when commits<br>happen, doesn’t your history end up chaotic?” “wait, if I rewrite past history,<br>don’t I need to rebase?”—the junior asks it on the page. Misconceptions get<br>corrected the moment they arise, and edge cases enter the discussion as<br>objections, not footnotes.

It’s one of the oldest teaching devices there is—Socrates used it, and so does<br>The Little Schemer. In Japan, it’s how my Riakuto! series reached 40,000<br>readers. Read the sample and see how it works.

Chapter Overview<br>Chapter 1<br>What Kind of Tool Is Jujutsu?<br>This chapter explores why Git’s human-paced model becomes a burden when AI agents<br>make large, rapid changes. Staging gets skipped, context switches pile up, and<br>rewriting history feels risky.

Then we introduce Jujutsu’s answer: automatic snapshots, universal undo,<br>first-class conflicts, and consistent commands. You’ll see why Jujutsu lets you<br>experiment first and clean up later.

Chapter 2<br>Let’s Try Jujutsu<br>After installation and setup, you’ll take a small project from initialization to<br>GitHub—working with changes, reading history, and pushing your work. You’ll also<br>meet Jujutsu’s three logs: the revision log, the evolution log for one change, and<br>the operation log for the repository.

Then comes the mental model that makes everything else click: what a change is,<br>how bookmarks differ from Git branches, and why working on anonymous branches<br>becomes the default.

Chapter 3<br>Jujutsu × AI Workflow in Practice<br>This chapter shows how to steer Claude Code and Codex CLI toward jj instead of<br>git, automate routine commands while keeping risky ones gated, and trigger<br>formatting and linting through hooks.

Then comes a full workflow: turning an agent’s sprawling output into reviewable<br>changes, pushing them for a PR, and running multiple agent sessions in parallel<br>workspaces before merging their work back together.

Chapter 4<br>Advanced Jujutsu Techniques<br>Start with revsets and filesets—the query languages for selecting exactly the<br>revisions and files you mean—then meet three power-user commands: jj absorb,<br>which sends fixes back to the changes they belong to, jj arrange, and<br>jj bookmark advance.

From there, you’ll build a custom jj push for pre-push checks, reduce manual<br>conflict resolution with Mergiraf and<br>Weave, and explore UI tools including<br>jjui and<br>JJ View.

Chapter 5<br>The Jujutsu Problem-Solving Guide<br>The FAQ answers the questions Git users keep asking: why there’s no pull<br>command, how to do the equivalent of cherry-pick, how to keep temporary files<br>out of your history, and whether Jujutsu is really just a wrapper around Git.

Then come the problems that stop you cold—a plain push that silently becomes a<br>force push, a stale working copy, a change that picked up a divergent annotation,<br>and working-copy commit wandering off after you merge a PR and fetch the result.

Free config files: make your AI agent use Jujutsu instead of Git

Who This Book Is For...

jujutsu history chapter agents changes book

Related Articles