← ClaudeAtlas

jj-guidelineslisted

Use when working with Jujutsu (jj) version control — especially git-colocated repos — covering the working-copy-as-commit model, bookmarks, the operation log for undo/recovery, git-colocation safety, first-class conflicts, and the git-habit→jj command map.
stevencarpenter/agents · ★ 1 · Code & Development · score 74
Install: claude install-skill stevencarpenter/agents
# Jujutsu (jj) Guidelines Shared rubric for working in a `jj` repository, especially one **colocated** with git (a real `.git` beside `.jj`). The mental model is the whole game: the working copy **is a commit**, edits auto-snapshot into it, and every operation is recorded and reversible. Verify the command surface against the installed `jj` first — jj evolves fast (branches were renamed to **bookmarks**; subcommands move). ## Source Of Truth - `jj --version` first — these notes target **jj 0.4x** (bookmarks era). Older jj calls bookmarks "branches". - `jj help <cmd>`, the official tutorial, and `jj op log` (the live record of what you did). - The repo's actual state: `jj st`, `jj log`, `jj git remote list`. Don't hardcode the trunk name — `trunk()` resolves the remote's main/master/trunk bookmark for you. ## Mental Model - **`@` is the working-copy commit.** There is no staging area and no "dirty tree vs commit" split — editing a file rewrites `@` immediately (auto-snapshot). `git add` has no analog; you never stage. - **No current branch, no detached HEAD.** You move by creating or editing commits (`jj new`, `jj edit`), never by checking out. - **Bookmarks are movable name pointers** (git's branches). `main` is a bookmark; it does *not* advance on its own when you commit — you set it (`jj bookmark set main -r @`). - **The operation log is your safety net.** Every `jj` command is one operation; `jj op log` lists them all and `jj undo` / `jj op restore <id>` rewind to any