Preface¶
When releasing new versions or writing release notes, a common practice is to manually review git log, categorize entries by type, and polish them into Chinese. However, model-generated summaries often introduce phrasing not found in the repository, and direct translation of English commit messages can deviate from the original intent. DeepSeek Harness (DSH) decomposes capabilities into mountable plugins; the community directory is independently maintained on SkillHub and has no official affiliation with DeepSeek or High-Flyer. The following introduces dsh-changelog-zh by maintainer dingchenhui0618-arch (current version 0.1.0, MIT License): it reads git history (optionally layered with session records) to produce two Chinese changelogs, marking each change with its commit SHA and a “Verified/Unverified” status.
What is this?¶
dsh-changelog-zh generates two Chinese changelogs from real git history:
- User Version (Short): Suitable for group announcements or release bodies.
- Developer Version (Long): Each commit includes the full SHA, classification basis, file changes, and raw verification evidence.
The tool does not connect to the internet or call model APIs; it executes no processes other than read-only git; and it does not modify the repository by default (no commits, tags, or notes). The CLI only writes to files when --out is specified.
Three Design Constraints¶
The README summarizes them as three promises:
- Only state what is in the history. Classification relies on Conventional Commit prefixes and a small keyword table; if unrecognized, it is marked “Uncategorized” without guessing.
- “Verified” must have citable evidence. Anything outside the four evidence categories is marked “Unverified,” with an explanation of which category is missing;
verified: truewithout evidence also counts as unverified. - Do not translate commit messages. Commits without a provided Chinese title retain their original subject, and a statistic “N entries lack Chinese titles” is included.
“Unverified” only indicates the absence of citable verification evidence in the commit history, not that the change is problematic; the footer of the User Version clarifies this.
How Verified/Unverified is Determined¶
Only mark as “Verified” if one of the following four types of citable evidence exists:
| # | Evidence | Content Copied to Output |
|---|---|---|
| 1 | Verification trailer in commit message | Original sentence |
| 2 | Verification trailer in git notes | Original sentence |
| 3 | Verification command with exit code 0 in session records | Command + Exit Code |
| 4 | Test counts with failed=0 and passed>0 in session records |
Counts |
Trailer key names support various Chinese and English formats (e.g., Verified, 已验证, 测试, etc., case-insensitive). Strict rules include: if a commit has both passing evidence and failure verification records, it is treated as unverified; if the session only has "verified": true without commands/exit codes/counts, it is marked as “Claimed verified but no evidence”. Matching a session record itself does not equal verified.
Core Capabilities Overview¶
- Dual-format Output:
formatcan beuser,dev, orboth. - Automatic Range: Without tags, takes recent commits; with tags, takes
latest_tag..HEAD; if the latest tag is on HEAD, falls back to the previous tag to avoid repeating released commits. - Session Record Layering: Supports JSON arrays, single JSON objects, or JSONL;
commitcan be a full sha, unique prefix (≥4 chars), or short sha; ambiguities are listed in an ambiguity list without guessing. - Chinese Title Sources:
--titlesmapping takes priority, followed bytitle/titleZh/summaryin sessions, which take precedence over commit trailers. - Sanitization: Replaces GitHub tokens,
sk-style keys, JWTs, private key blocks, connection strings with passwords, local user paths, etc., before rendering, and reports the number of redactions in the text.
Merge commits do not enter the log by default; add --merges in the CLI if needed.
Installation and Activation¶
This plugin is a zero-dependency pure JS package, connected via declarations in package.json (dsh.bundle.patch and dsh.client); mount the repository into the DSH plugin directory to enable it. The repository includes cordis.patch.yml, with a snippet example as follows:
# cordis.patch.yml (included in this repo)
- insert:
- id: dsh-changelog-zh
name: dsh-changelog-zh
Once installed, there are three entry points:
- Session Panel: The “Changelog” tab in the conversation view; fill in repo/range/session records to generate, with one-click copy.
- HTTP Routes:
GET /dsh-changelog-zh/state,POST /dsh-changelog-zh/generate,POST /dsh-changelog-zh/clear. - Tool:
changelog_zh, with parameters{ repo, range, since, limit, includeMerges, sessions, format }.
Plugin configuration (all optional):
{
"roots": [],
"defaultRepo": "",
"defaultRange": "",
"sessionsPath": "",
"titlesPath": "",
"maxCommits": 300
}
If roots is not empty, generation is restricted to repositories within the whitelisted paths. The plugin runs under the DSH process permissions; please review the source code and MIT license before installation.
Runtime Environment: Node ≥ 22 and local git (zero runtime dependencies).
Typical Usage¶
Command Line¶
Generate two Markdown files in the repository root or a specified --repo:
$ node bin/changelog-zh.mjs --repo D:\Projects\某项目 --title v1.1.0
已写入 D:\Projects\某项目\CHANGELOG-user.md —— 用户版(短)
已写入 D:\Projects\某项目\CHANGELOG-dev.md —— 开发者版(长)
范围 v1.0.0..HEAD · 6 条提交 · 已验证 3 · 未验证 3 · 已隐去 0 处 · 会话记录匹配 2 条
Common parameters include --range (e.g., v1.0.0..HEAD), --since, --limit (default 300, max 5000), --sessions, --titles, --format user|dev|both, --stdout, --json, --no-authors / --no-emails. Exit codes: 0 success, 2 argument error, 1 generation failure.
Example User Version output on the demo repo (from README):
$ node bin/changelog-zh.mjs --repo tmp/demo-repo \
--sessions tmp/demo-sessions.jsonl --title v1.1.0 \
--out tmp/demo-out --no-emails --stdout --format user
Session Record Snippets¶
The session file uses a agreed summary format, not the internal DSH session library format:
{"commit":"182d11c","title":"支持把结果导出成 Markdown","commands":[{"command":"node --test","exitCode":0},{"command":"npm run lint"}],"tests":{"passed":46,"failed":0}}
{"commit":"af2971a","verification":{"command":"node --test","exitCode":0,"evidence":"46 passed"}}
DSH Tool Invocation¶
In agents or automation workflows, the tool changelog_zh can be called with fields like repo, range, format, sharing the same generation logic as the panel and HTTP routes.
Use Cases and Notes¶
Suitable for: Teams that need to write Chinese Release notes/group announcements based on real git log and want SHA, classification, and verification status to be traceable for every change; willing to leave verification evidence via trailers, git notes, or JSONL session records.
Not suitable for: Scenarios expecting automatic translation of all English commits or tools that infer “probably tested”—this plugin explicitly does not translate or infer.
Ecosystem Comparison (based on public descriptions of respective repos, not an exhaustive survey): 7dgroup-ai/dsh-skill-7d-git-commit focuses on commit message standard validation (before writing commits); andyfan1094/dsh-github focuses on GitHub authentication and local Git workflows. Neither produces “publicly usable Chinese copy generated from real changes”; this plugin fills the gap of release notes.
The author notes that screenshots of the panel were not run in their own DSH configuration; panel behavior is covered by contract tests such as test/host.test.mjs.
Links¶
- Community Directory: dingchenhui0618-arch/dsh-changelog-zh
- Source Code and Full Documentation: GitHub — dingchenhui0618-arch/dsh-changelog-zh