name: sync-changelog description: Use after a release succeeds, when maintainers need to sync apps/kimi-code/CHANGELOG.md into docs/en/release-notes/changelog.md and docs/zh/release-notes/changelog.md.
Sync Changelog
Overview
kimi-code uses changesets for versioning. Each package gets its own CHANGELOG.md. The user-facing CLI package, @moonshot-ai/kimi-code, writes its changelog here:
apps/kimi-code/CHANGELOG.md
This file is the only upstream source for the documentation-site changelog. Internal package changelogs such as packages/*/CHANGELOG.md do not go into the documentation site.
After the release flow finishes (Release PR merged → Version Packages completed → npm publish succeeded), maintainers manually run this skill to copy the new CLI changelog entries into the docs site and translate the English increment into Chinese.
When To Use
- A new version has been published to npm.
- The top of
apps/kimi-code/CHANGELOG.mdcontains version blocks that are not yet indocs/en/release-notes/changelog.md. - The
gen-docsflow does not run this automatically; maintainers must explicitly do it after release.
Do not run this before the Release PR is merged. At that point, changesets has not yet written the new version into apps/kimi-code/CHANGELOG.md.
Source And Targets
| File | Role | Edited by |
|---|---|---|
apps/kimi-code/CHANGELOG.md |
Only upstream source, generated by changesets | Never edit manually |
docs/en/release-notes/changelog.md |
English docs changelog; source of truth for docs | This skill |
docs/zh/release-notes/changelog.md |
Chinese docs changelog, translated from English | This skill, following translate-docs |
Core rule: the English docs changelog is the source of truth, and Chinese is translated from English. This matches translate-docs.
Preconditions
Before editing, confirm:
- The released version exists on npm (
npm view @moonshot-ai/kimi-code versions --json) or has a matching GitHub Release tag. - The top of
apps/kimi-code/CHANGELOG.mdis that new version. - The current branch is clean, or you are on a dedicated docs-sync branch.
If any condition is not true, stop and confirm with the user.
Workflow
1. Find The Version Range
# Upstream versions
rg '^## ' apps/kimi-code/CHANGELOG.md | head -20
# Latest version already synced into the English docs page
rg '^## ' docs/en/release-notes/changelog.md | head -5
- First sync: copy all upstream version blocks into the English page.
- Incremental sync: copy every upstream version block above the latest version already present in the English page.
Use upstream order: newest version first.
2. Strip Decorations And Extract Entry Text
Upstream entries look like this:
- [#317](https://github.com/...) [`2f51db4`](https://github.com/...) - Clean up lint warnings ...
Keep:
- Version headings such as
## 0.2.0. - Only the body text of each entry, after the PR/hash decoration.
Remove:
- The upstream H1
# @moonshot-ai/kimi-codebecause the docs page already has# Changelog. - Changesets subheadings such as
### Patch Changes,### Minor Changes, and### Major Changes. - PR links such as
[#317](...). - Commit hash links such as
[`2f51db4`](...).
After stripping, each entry should be only:
- <body text>
Upstream language rule: gen-changesets requires changelog entries to be English. If the upstream CLI changelog contains a non-English entry, stop and report it to the user. Do not silently rewrite it while syncing docs.
Public-text rule: do not copy real internal endpoints, key names, account names, or service names into docs changelogs. Replace examples with neutral placeholders such as example.com, example.test, or YOUR_API_KEY while preserving the user-visible meaning.
3. Classify Entries
The docs changelog uses five section types:
| English section | Chinese section | Meaning |
|---|---|---|
### Features |
### 新功能 |
New user-facing functionality, such as a new command, flag, mode, or capability that did not exist before |
### Bug Fixes |
### 修复 |
Fixes for behavior that was broken |
### Polish |
### 优化 |
User-visible improvements to existing functionality, including UX adjustments, behavior tweaks, and performance improvements that are not fixes or new capabilities |
### Refactors |
### 重构 |
Internal changes with no user-visible behavior change, including build, CI, tests, dependency cleanup, and internal renames |
### Other |
### 其他 |
Anything that does not fit above, such as CDN/endpoint swaps and docs-related artifacts |
Classification process:
- Classify from the stripped entry text first.
- If unclear, inspect the related commit or PR:
- Use the stripped commit hash with
git show <hash>. - Or use the PR number with
gh pr view <NNN>.
- Use the stripped commit hash with
- If it is still unclear, put it in
Other. Do not guess or force entries intoFeatures.
Features vs. Polish: ask whether the entry introduces something the user could not do before. If yes (new command, flag, mode, viewer, or capability), use Features. If it only improves an existing surface (a UI panel that already existed, an existing prompt, an existing tool card, an existing payload pipeline), use Polish. Verbs like Add do not automatically mean Features — a small visual addition to an existing UI is still polish.
Keyword hints:
- Features:
Add ... command/flag/option/mode/viewer,Introduce,Support,Allow,Enable,Implement,New ... command/flag/option - Bug Fixes:
Fix,Resolve,Correct,Address,Prevent ... from,Stop ... from,... no longer ... - Polish:
Polish,Optimize,Improve,Enhance,Speed up,Reduce,Cap,Shorten,Wrap,Clarify,Tweak,Adjust,Offload,Show ... in existing surface, performance and UX adjustments to existing features - Refactors:
Refactor,Rename,Clean up,Simplify,Remove unused,Migrate to,Unify,Restructure,Internal, dependency bumps, pure CI/build/test changes - Other: docs artifacts, CDN/endpoint switches, anything that genuinely fits no other section
Within each version, section order is:
Features → Bug Fixes → Polish → Refactors → Other
Omit empty sections. Within each section, order entries by reader value, not upstream order:
- Put the most valuable, obvious, and larger changes first.
- Prefer broad user-visible features, workflow-changing fixes, high-frequency bugs, and large cross-cutting improvements over small polish, narrow edge cases, and internal cleanup.
- If entries have similar value, preserve upstream order.
Do not reword or exaggerate entries just to make them look more important; only reorder existing entries.
4. Write The English Page
Never change the English page header:
# Changelog
This page documents the changes in each Kimi Code CLI release.
Insert new version blocks immediately after the header paragraph and before the previous latest version.
Every version heading must carry its release date in parentheses:
## <version> (YYYY-MM-DD)
Take the date from the version's published GitHub Release tag, not from when you run the sync:
git log -1 --format=%cs "@moonshot-ai/kimi-code@<version>"
Use the half-width parenthesis form (YYYY-MM-DD) on the English page. Never invent or guess a date; if the tag is missing, stop and confirm with the user.
Example:
## 0.2.0 (2026-05-26)
### Bug Fixes
- Fix the TUI not restoring the current todo list after resuming a session.
### Refactors
- Clean up lint warnings across the CLI, SDK examples, and bundled runtime code without changing product behavior.
- Update the native release workflow to use current GitHub artifact actions.
5. Translate The Increment Into Chinese
After updating the English page, translate only the newly added English content into docs/zh/release-notes/changelog.md.
Follow translate-docs, direction en → zh. Changelog direction is English-to-Chinese even though many other docs flows use Chinese-to-English.
Chinese page requirements:
Header:
# 变更记录 本页记录 Kimi Code CLI 每个版本的变更内容。Preserve version headings including the release date, but use full-width parentheses on the Chinese page, such as
## 0.2.0(2026-05-26). The date must match the English page; only the parenthesis style differs (half-width()in English, full-width()in Chinese).Translate section headings exactly:
### Features→### 新功能### Bug Fixes→### 修复### Polish→### 优化### Refactors→### 重构### Other→### 其他
The Chinese page must mirror the English page 1:1 for versions, sections, section order, entry order, and entry counts.
Keep the classification and entry order from the English page. Do not reclassify or reorder while translating.
Translate only entry body text. Do not add entries that are not present in English.
Follow
docs/AGENTS.mdfor Chinese typography: full-width punctuation, spaces between Chinese and English, and the glossary.
6. Verify
Review:
git diff docs/en/release-notes/changelog.md docs/zh/release-notes/changelog.md
Check:
- Versions and version counts match between English and Chinese.
- Every version heading carries its release date from the published tag, with half-width parentheses in English and full-width in Chinese.
- Each version has the same section set and order on both pages.
- Each section has the same number of entries on both pages.
- Within each section, the most valuable, obvious, and larger entries appear before smaller or narrower entries.
- PR links and commit hashes were stripped.
- Real internal identifiers were replaced with neutral placeholders.
- There are no empty sections.
- Markdown indentation and blank lines are intact.
Then run the docs build:
pnpm --filter docs run build
7. Commit
Use a neutral docs-sync commit message:
docs(changelog): sync <version range> from apps/kimi-code/CHANGELOG.md
Do not create a changeset for changelog docs sync. Docs sync does not enter the bundle.
Rules
- The English docs changelog is the source of truth.
- Never edit upstream
apps/kimi-code/CHANGELOG.md. - Do not backfill unreleased
.changeset/*.mddrafts into the docs site. - If upstream wording is wrong, leave upstream alone and fix it in a future changeset.
Common Mistakes
| Mistake | Fix |
|---|---|
| Adding entries directly to the English docs page without reading upstream | Use apps/kimi-code/CHANGELOG.md as the source |
| Copying PR links or commit hashes into docs | Strip them; keep only body text |
| Rewording upstream English entries | Upstream is frozen; copy the body text unless the user explicitly asks otherwise |
| Leaving English text untranslated in the Chinese page | The Chinese page must be fully Chinese except preserved technical terms |
| Editing upstream changelog text | Do not edit upstream |
| Losing two-space indentation in multi-line list items | Restore indentation so Markdown lists stay valid |
Copying ### Patch Changes into docs |
Remove changesets headings and classify under Features / Bug Fixes / Polish / Refactors / Other |
| Guessing unclear entries as Features | Inspect commit/PR; if still unclear, use Other |
Treating any Add ... line as Features |
If the entry only adds a small element to an existing UI/surface, use Polish |
| Filing UX or performance tweaks under Other | Use Polish for user-visible improvements to existing functionality |
| Preserving upstream order when a small entry hides a larger change | Reorder within the section so the highest-value, most obvious items appear first |
| Reclassifying entries while translating | Chinese classification must mirror English |
| Leaving empty sections | Delete sections with no entries |
| Putting everything under Other for convenience | Classify what can be classified first |
| Translating tool names, command names, or config keys | Keep them as written |
| Creating a changeset for docs sync | Do not create one |
| Using curly quotes or half-width Chinese punctuation | Follow docs/AGENTS.md |
| Omitting the release date from a version heading, or guessing it | Add (YYYY-MM-DD) (full-width () in Chinese) taken from the published tag |
Stop Signals
- The top version in
apps/kimi-code/CHANGELOG.mdis not published on npm or GitHub Releases. - You are about to edit
apps/kimi-code/CHANGELOG.md. - You are about to add docs sync to a changeset.
- English and Chinese versions, entry counts, or section sets do not match.
- A section is empty.
- A Chinese term is uncertain and
docs/AGENTS.mddoes not answer it.