JochenYang/dsh-plugins--packages-dsh-git-conventions ↗★ 0
dsh-git-conventions
Model-facing git convention validation tool bundle for DeepSeek Harness
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JochenYang/dsh-plugins#8ff3d9855c1227cc65b68f7e20ebd52a6b1e1b62&path:packages/dsh-git-conventions说明文档
阅读完整 README ↗dsh-git-conventions
Model-facing git_conventions tool bundle: deterministic validation of commit message format, subject length and case, body quality, AI signatures, and branch naming. Ported from the author's kimi-engineering-tools git_conventions MCP tool.
What it does
Registers one tool, git_conventions(message?, branch?, files?, include_guide?, enforce_body?), on ctx.tools. Validation is a pure function of the supplied text — it never reads repository state, runs git, or writes to the session log.
Checks:
- Format — subject matches
():with one offeat|fix|refactor|docs|style|test|chore|perf|ci|build|revert. - Length — subject <= 72 chars (hard), <= 50 recommended.
- Case — subject starts lowercase; no trailing period.
- AI signature — no
Co-Authored-Bytrailers or generated-with/by signatures. - Body — blank-line separation, <= 72 chars per line, <= 20 lines (hard) / 15 recommended, bullet preference, no raw tool output or JSON argument blocks.
- Branch — main branches exempt; others need a
feat/|fix/|refactor/|docs/|chore/prefix.
enforce_body defaults to true: a missing body is WARN and a bad body is ERROR; pass false to accept subject-only messages.
Install
dsh plugin --profile web add github:JochenYang/dsh-plugins#path:/packages/dsh-git-conventions
Restart dsh after installing.
Develop
pnpm install
pnpm typecheck # types resolve from the deepseek-harness checkout's built declarations via tsconfig paths
pnpm build # esbuild emits lib/index.js; @deepseek-ai/* stay external (resolved from the profile)
pnpm pack # build + stage a dependency-free package.json and pack the tarball
Restart dsh after reinstalling. Uninstall: pnpm dsh plugin --profile web remove dsh-git-conventions.
Known limitations
- Regex-based approximation of Conventional Commits; exotic formats may be misjudged.
- No repository state inspection (
git status/git diffbelong to a commit-review skill or command consumer). - Convention constants are fixed; per-deployment customization would need a
Configfield (deferred).