commit c599338ed67983a5e36c7301eb12c51660b41e3a Author: Zhongwei Li Date: Sun Nov 30 08:37:33 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..0eb27dd --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "jujutsu-vcs", + "description": "SessionStart hook that ensures Claude Code uses Jujutsu (jj) commands instead of git in Jujutsu repositories", + "version": "1.0.0", + "author": { + "name": "Hans L'Hoest", + "email": "2922363+lhohan@users.noreply.github.com" + }, + "commands": [ + "./commands" + ], + "hooks": [ + "./hooks" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..61c853c --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# jujutsu-vcs + +SessionStart hook that ensures Claude Code uses Jujutsu (jj) commands instead of git in Jujutsu repositories diff --git a/commands/use-jj.md b/commands/use-jj.md new file mode 100644 index 0000000..ee93c4e --- /dev/null +++ b/commands/use-jj.md @@ -0,0 +1,14 @@ +--- +description: Inject Jujutsu VCS context and instructions +--- + +**CRITICAL: This repository uses Jujutsu (jj), not git.** Always use `jj` commands for version control operations. +- Check status: `jj st --no-pager` +- View history: `jj log --no-pager` +- Create commit: `jj commit -m "message"` +- Push: `jj git push` +- Push main: `jj bookmark set main -r @- && jj git push` +- Undo last jj command: `jj undo` +- Help: `jj help` + +State the version control system you will be using for this session. diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..90208fd --- /dev/null +++ b/hooks/hooks.json @@ -0,0 +1,16 @@ +{ + "description": "Jujutsu VCS integration hook", + "hooks": { + "SessionStart": [ + { + "description": "Remind Claude to use jj commands instead of git in Jujutsu repositories", + "hooks": [ + { + "type": "command", + "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks-handlers/jujutsu-reminder.sh" + } + ] + } + ] + } +} diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..c583a25 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,49 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:lhohan/claude-code-plugins:jujutsu-vcs", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "39152956af836373d90d934650e2c595f357e86f", + "treeHash": "e82014c4d9d0650993d4ee1ecd5a3e85639b2aba5e52882440c4bb3a5545aee7", + "generatedAt": "2025-11-28T10:20:05.327841Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "jujutsu-vcs", + "description": "SessionStart hook that ensures Claude Code uses Jujutsu (jj) commands instead of git in Jujutsu repositories", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "50811498628372a02c2e2799508b6cbc6f8872a7f0e042b4ecbbdce24db449c0" + }, + { + "path": "hooks/hooks.json", + "sha256": "9df35d889d5e0dec265f1b3c5ba008449ec9bc7c4ff736217781420fd5f06c52" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "61463e4fe65880454485ae6647a24533114a035e9b865cc7ce2d83a9184e62ca" + }, + { + "path": "commands/use-jj.md", + "sha256": "4a921cf5ea829ded953ab2f05cf40e5737dd807496210d62463bb1022358198e" + } + ], + "dirSha256": "e82014c4d9d0650993d4ee1ecd5a3e85639b2aba5e52882440c4bb3a5545aee7" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file