dsh-jujutsu: Making Agents Use Jujutsu Instead of Git in DeepSeek Harness

Preface

When running agents in DeepSeek Harness (DSH), version control often follows Git habits: git status, git commit, git push. If the workspace is actually a Jujutsu (jj) repository, especially in a colocated layout coexisting with Git, the same git status and jj status might yield inconsistent conclusions, leading the model to make mistakes by reasoning based on Git.

Maintainer viztor’s dsh-jujutsu (Community Directory viztor/dsh-jujutsu, Source GitHub) belongs to the “Workflow” class of plugins in the DSH ecosystem: it intercepts misleading Git commands within a Jujutsu workspace and returns corresponding jj commands or explanations; it also provides 11 structured jj tools and explains Jujutsu’s workings in the system prompt. DSH itself adheres to “everything is a plugin”; directory sites like SkillHub are maintained by the community and have no official affiliation with DeepSeek / High-Flyer.

The following introduces the plugin’s positioning, capabilities, installation, and typical behavior.

What is this

In one sentence: Refuses Git inside a Jujutsu workspace and hands the model jj commands instead.

In directories already containing .jj (self or parent directories), the plugin mounts Git guards, registers jj tools, and injects Jujutsu-related prompts; in normal pure Git repositories, it does not intervene by default unless you explicitly enable relevant options. The npm package name is dsh-jujutsu, the version in current materials is 0.2.0, and the license is MIT.

Core Functions

Intercept Git and provide executable jj alternatives

The guard performs translation rather than fixed templates: it parses the Git command you actually input and tries to return a paste-ready jj command. For example:

Input Behavior
git log --oneline -6 Refuses, suggests jj log -r ::@ --limit 6 --no-graph
git diff HEAD~1 Refuses, suggests jj diff --from @-
git push origin main Refuses, suggests jj git push --remote origin --bookmark main
git add src/a.ts Refuses and explains: Jujutsu has no staging area
git rebase -i Refuses (requires terminal), prompts jj rebase, jj squash, jj absorb, etc.
jj status, jj log, etc. Executes normally

Translation rules emphasize three points: Git revision numbers are rewritten to revsets (e.g., HEAD~2 → @--); when precise mapping is impossible, it falls back to directory-style explanations to avoid half-translated commands; arguments are shell-quoted. Read-only Git and Writing Git can be configured separately, allowing the model to “take a look” without allowing it to commit or push.

Eleven jj tools (Structured JSON)

The model can read and write history via tools without repeatedly parsing shell output. Tools include:

Tool Function
jj_status Working copy status, including whether conflicted
jj_log, jj_diff, jj_op_log History, changes, and operation logs
jj_new, jj_describe, jj_squash Create new changes, write descriptions, squash changes
jj_bookmark, jj_op_restore Bookmarks and operation restoration
jj_hunk_list, jj_hunk_apply Select and apply by hunk (depends on optional jj-hunk)

Return values are all JSON; revisions prefer change ID (stable after rewriting) rather than relying solely on commit ID.

“Teach” the model Jujutsu in prompts

In a Jujutsu workspace, the system prompt explains: no staging area, @ always corresponds to a commit, change ID remains usable after rewriting, etc. In pure Git repositories or directories without version control, relevant rules are not incorrectly injected; when there is no repository, it informs the model and may suggest jj git init (colocated, preserving the Git toolchain).

Detailed Git→jj verb tables and return fields for each tool are loaded on-demand via a runtime skill named jujutsu (configurable to turn off “provide jj manual” to save context). Workspace status and guard rules must enter the system prompt before the first Git command.

Optional: Adopt Jujutsu in Git repos

When Use Jujutsu in Git repos is enabled, the first session in a Git repo without .jj will execute jj git init --colocate: import history, enable jj, and do not modify .git. Scenarios like LFS, sparse checkout, shallow clones, linked worktrees, and ongoing Git operations will be refused for adoption; submodules are not a hard obstacle.

Settings Panel and Project-level Markers

In Harness Plugins → Jujutsu, you can configure guards, Git read/write policies, whether to explain Jujutsu in prompts, whether to provide manuals, whether to force Jujutsu even in non-workspaces, etc. A .dsh-jujutsu.json can be placed in the project root to disable or override behavior, for example:

{ "enabled": false }

When searching upward from the working directory, the nearest marker file takes effect, facilitating separate switching for subdirectories within a monorepo.

Installation and Dependencies

  1. Install in the Harness Plugins page, or execute:
dsh plugin install dsh-jujutsu
  1. Open Plugins → Jujutsu to adjust as needed; default configuration favors safety and out-of-the-box usability.

Environment requirements (from README):

Component Requirement
jj Required, 0.46.0 and above (Example install: brew install jj)
jj-hunk Optional; if not installed, hunk-related tools will report unavailable instead of failing directly
Node 24 and above (Plugin host side)

Optional installation of jj-hunk (pinned method given in plugin docs):

cargo install --git https://github.com/laulauland/jj-hunk --tag v0.5.1 jj-hunk

The documentation explicitly discourages cargo install jj-hunk (crates.io version is inconsistent with the plugin’s tested interface). If jj does not have user.name / user.email configured, jj commands creating commits may be refused to avoid empty author commits that cannot be pushed.

Typical Usage and Configuration Points

Daily Jujutsu Workspace: After installing the plugin, just let the agent work in a project with existing .jj; if the model habitually runs git status, it will receive alternatives like jj status and can directly call tools like jj_log, jj_diff.

Still want to occasionally use Git read-only: Set Read-only Git to allow or ask; configure Writing Git separately to avoid mistakenly allowing pushes.

Pure Git repo wanting to gradually switch to jj: Enable Use Jujutsu in Git repos in settings, confirm the repo is not one of the non-adoptable types listed in the documentation, and let the first session trigger jj git init --colocate.

No .jj but want to strictly follow Jujutsu constraints: Enable Force Jujutsu, where jj will be refused in non-workspaces with a prompt to initialize.

Advanced scenarios can set jjPath, jjHunkPath, hunkInstall (ask / never / auto) in profile configuration to customize executable paths or strategies when jj-hunk is missing.

Applicable Scenarios and Notes

Suitable for scenarios where you are already using or planning to use Jujutsu to manage repositories and want the model to stably follow jj semantics via DSH: colocated layouts, emphasizing change IDs, and wanting to reduce misoperations caused by “Git and jj status inconsistency”.

Not suitable for scenarios expecting the plugin to automatically transform workflows in non-Jujutsu environments—by default, it is almost imperceptible in pure Git repositories; explicit adoption or forced mode is required.

Please check the GitHub Repository source code and MIT license yourself before installation. The plugin runs with the current DSH process permissions; guards and tools will directly call local jj / jj-hunk; for security and compliance-sensitive environments, evaluate within the trust boundary before enabling.

Conclusion

dsh-jujutsu changes the version control narrative in the Harness from “default Git” to “jj is the standard within Jujutsu workspaces”: intercepting misleading Git, providing executable jj mappings, offering JSON tools and on-demand manuals, and retaining an explicit adoption path for pure Git repositories.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye