gen-changesets
Use when generating changesets in the kimi-code repository, including package bump selection, internal package and CLI bundle handling, bump levels, major confirmation, and English changelog wording.
wangyuahn · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add wangyuahn/nori-code --skill gen-changesets技能说明
name: gen-changesets description: Use when generating changesets in the kimi-code repository, including package bump selection, internal package and CLI bundle handling, bump levels, major confirmation, and English changelog wording.
Generate Changesets
kimi-code uses changesets to manage versions and changelogs. The current user-facing published package is:
@moonshot-ai/nori-code: the CLI
All other @moonshot-ai/* packages are treated as internal packages, including @moonshot-ai/nori-code-sdk, agent-core, kosong, kaos, kimi-code-oauth, kimi-telemetry, and migration-legacy.
@moonshot-ai/pi-tui is a special internal package: it is a private fork (private: true) that is never published, but it keeps its own changelog through changesets. It is an exception to Core Rule 4 — see the dedicated section below.
Core Rules
- Inspect the actual changes first. Use
git status/git diff --name-onlyto identify which packages were actually changed. - List packages that changesets can release. If a changed package is ignored in
.changeset/config.json, do not put that ignored package in frontmatter together with a non-ignored package; changesets rejects mixed ignored/non-ignored frontmatter. - Map ignored internal changes to the affected released package. If an ignored internal package changes CLI output or behavior, list
@moonshot-ai/nori-codeand describe the actual user-visible or release-artifact change in the changelog text. - Internal package source changes that enter the CLI bundle must manually list the CLI.
@moonshot-ai/nori-codeinline-bundles@moonshot-ai/*source, but those internal packages are devDependencies from the CLI's perspective, so changesets will not automatically propagate bumps. If a change enters the CLI output, list@moonshot-ai/nori-code.- Web app (
@moonshot-ai/kimi-web) changes always enter the CLI bundle.@moonshot-ai/kimi-webis ignored by changesets (see.changeset/config.json) and cannot be mixed with@moonshot-ai/nori-codein one changeset frontmatter. Describe the web change in the changelog text, but list@moonshot-ai/nori-codeso the CLI release carries the bundleddist-weboutput.
- Web app (
- Docs-only and tests-only changes usually do not need a changeset. README, internal docs, and
test/changes that do not enter package output do not trigger a CLI bump. @moonshot-ai/vis/vis-server/vis-webare ignored by changesets and should not be handled.
Workflow
- List the changed packages and check whether each one is ignored by
.changeset/config.json. - Choose a bump level for each package.
- If an ignored internal package change enters the CLI bundle, put
@moonshot-ai/nori-codein frontmatter instead of mixing the ignored package into the same changeset. - Create a short kebab-case file under
.changeset/. - Split unrelated changes into separate changesets; keep one logical change in one file.
Format:
---
"<package A>": patch
"<package B>": minor
---
<English changelog entry>
Bump Levels
| Level | When to use |
|---|---|
patch | Bug fixes; build/package fixes; internal refactors that do not change behavior; wording tweaks; small dependency upgrades; small improvements to existing features with limited user-facing impact (e.g. a new keyboard shortcut, a flag alias, a minor UX tweak) |
minor | A substantial new user-facing feature, such as a new slash command, a new built-in tool, or a new mode |
major | Breaking changes: incompatible config changes, renamed or removed commands/arguments, behavior semantics changes, and similar |
When in doubt between patch and minor: if the change improves an existing feature and the user-facing impact is small, choose patch even when the change is technically "new". Reserve minor for a substantial new capability that introduces something users could not do before.
Major Rule
Never write major on your own.
If you believe a change qualifies as major, stop first, explain why, and ask the user for confirmation. Only write major after the user explicitly agrees. If the user does not reply, replies ambiguously, or disagrees, fall back to minor; if minor is also unclear, fall back to patch.
Wording Rules
- Changelog entries must be written in English.
- Keep the whole entry concise. Aim for one short sentence that states what was done; at most a short sentence plus a one-line usage hint. Do not write a paragraph, do not pile on technical detail, and do not enumerate every sub-change.
- For new user-facing features, append a brief usage hint so users know how to try it. Keep it to a single short line — a command name, a subcommand, a flag, or a one-line "how to use". Do not explain design rationale or list edge cases. Skip the hint for bug fixes, internal changes, and refactors.
- Slash command:
Add the /foo slash command to list active sessions. Run /foo to see them. - CLI subcommand:
Add the kimi web subcommand to open the web UI. Run kimi web to launch it. - Flag:
Add a --bar flag to skip confirmation prompts. Pass --bar to skip. - Too long:
Add the /foo command to list active sessions. It accepts an optional --all flag to include background sessions, supports filtering by name with /foo <name>, and writes the result to the transcript...
- Slash command:
- User-facing CLI wording should only be used when CLI users can perceive the change.
- Internal changes that do not affect CLI users can still share a changeset with the CLI, but the wording must describe the real change honestly and must not present it as a user-facing feature.
- Do not mention file names, class names, function names, PR numbers, or commit hashes.
- Do not include real internal endpoints, key names, account names, or service names. If an example is needed, use neutral placeholders such as
example.com,example.test, orYOUR_API_KEY. - Avoid vague words such as
refactor,