dsh-ai-commit

September 12, 2026 · View on GitHub

DeepSeek Harness plugin: heuristic Conventional Commits assistant (@qingshanjiluo/dsh-ai-commit).

Pure, deterministic commit-message tooling for model callers. There is no LLM call and no git subprocess: the model supplies the change set (unified diff text and/or changed paths, e.g. from git diff --cached / git diff --cached --name-only), the plugin derives type, scope, subject, and a ready-to-use message from path and diff heuristics, and a second tool lints any candidate message against the Conventional Commits grammar.

Install

npx -y @deepseek-ai/dsh plugin --profile web add @qingshanjiluo/dsh-ai-commit

Tools

ToolParametersReturns
ai_commit_suggestdiff (string, "" allowed), files (string[], [] allowed)type, scope, subject, breaking, assembled message, and reasons explaining every heuristic decision
ai_commit_validatemessage (string)valid plus all errors (grammar, known type, lowercase subject, no trailing period, subject budget, blank line before body, 100-char body wrap)

Suggestion heuristics, in priority order: docs-only paths → tests-only paths → CI pipeline files → build/manifest-only paths → fix/bug/crash keywords in the diff → new files (feat) → renames (refactor) → add/delete line balance → configured defaultType. The scope is the deepest directory shared by all changed paths; BREAKING CHANGE in the diff appends !. Subjects are shortened progressively to fit the configured budget.

Configuration

FieldTypeDefaultMeaning
defaultTypestringchoreType used when no signal applies (must be a known Conventional type, else chore)
maxSubjectLengthnumber72Subject budget before shortening kicks in
includeScopebooleantrueDerive (scope) from the common directory
includeBodybooleantrueAppend a per-file path (+A/-D) bullet body when a diff is supplied

Development

npm install --no-audit --no-fund
npm run typecheck          # tsc --noEmit
npm run build              # lib/index.js + lib/index.d.ts
npx vitest run             # unit tests (pure, deterministic)
node scripts/load-smoke.mjs# loads the built artifact and registers both tools

License

MIT