jj-split-changeset

Split a Jujutsu changeset into smaller focused changesets using duplication-based workflows.

6.2k|596|Updated May 5, 2016
One-click install
npx skills add https://github.com/RediSearch/RediSearch --skill jj-split-changeset
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jj-split-changeset
Source: https://github.com/RediSearch/RediSearch/tree/main/.skills/jj-split-changeset
Command: npx skills add https://github.com/RediSearch/RediSearch --skill jj-split-changeset

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Large, monolithic changesets in Jujutsu (jj) version control are hard to review and merge. This Skill guides an AI agent through safely splitting one big changeset into multiple focused, reviewable changesets without losing any changes or relying on interactive editor commands.

Core Features & Use Cases

  • Safe Duplication-First Workflow: Always duplicates the original changeset before splitting, so the original remains untouched until the split is verified.
  • File-Path and Hunk-Level Splitting: Supports both whole-file splits via jj split -r <rev> <paths> and manual hunk-level splits using jj new, jj restore, and direct file writes — no interactive commands required.
  • Verification and Cleanup: Verifies completeness with jj interdiff, runs user-defined validation (builds, tests, lints), rebases dependents, and abandons the original only after confirmation.
  • Use Case: You have a single jj changeset mixing a refactor, a new feature, and tests. The Skill inspects the diff, proposes logical groupings, splits them into three stacked changesets with proper descriptions, and verifies nothing was lost.

Quick Start

Ask the agent to split the jj changeset at revision abc123 into separate refactor, feature, and test changesets.

Frequently Asked Questions about jj-split-changeset

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I split a jj changeset into multiple commits?

Duplicate the changeset first with jj duplicate, then use jj split -r <rev> <paths> to extract file groups one at a time. For mixed hunks within a file, create empty changesets with jj new and populate them using jj restore and manual file writes.

How to split a commit in Jujutsu without interactive mode?

Avoid jj split -i since it opens an editor. Use file-path-based jj split -r <rev> <paths> for whole files, or reconstruct changesets manually with jj new, jj restore --from, and direct file writes for hunk-level control.

How do I verify no changes were lost after a jj split?

Run jj interdiff --from <original> --to <last-split-revset>; an empty output confirms the split is complete. If interdiff is unavailable, compare the original diff against the concatenated diffs of all split changesets.

Can I split a single file's hunks across multiple jj changesets?

Yes, but not with jj split path arguments, which move entire files. Instead, create empty changesets off the parent with jj new, then write file contents containing only the desired hunks, building each group incrementally.

What are the limitations of splitting jj changesets non-interactively?

Interactive commands like jj split -i cannot be used in agent contexts. Hunk-level splits require manually reconstructing file contents, which demands care; the jj interdiff completeness check catches lost or duplicated changes.