diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 009b4f1..f096206 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,6 +13,7 @@ - Wiring or pin-map impact: None - Flash, partition, or persistent-data impact: None - Backward-compatibility impact: None +- Release-flow impact: None ## Verification @@ -39,5 +40,5 @@ Commands run: - [ ] I ran the relevant validation command or explained why it was not run. - [ ] I separated build, host-test, and device-test results. - [ ] I updated authoritative documentation for changed hardware facts or durable behavior. -- [ ] I updated `docs/CHANGELOG.md` if this changes user-visible behavior, compatibility, or release workflow. +- [ ] I followed changelog ownership: ordinary pull requests leave it unchanged; release-preparation pull requests update both language files together. - [ ] I removed credentials, private device links, personal data, and unsanitized logs. diff --git a/.github/PULL_REQUEST_TEMPLATE.zh_CN.md b/.github/PULL_REQUEST_TEMPLATE.zh_CN.md index c513da6..22c244c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.zh_CN.md +++ b/.github/PULL_REQUEST_TEMPLATE.zh_CN.md @@ -15,6 +15,7 @@ - 接线或引脚映射影响:无 - Flash、分区或持久化数据影响:无 - 向后兼容性影响:无 +- 发布流程影响:无 ## 验证 @@ -41,5 +42,5 @@ - [ ] 已运行相关验证命令,或说明未运行原因。 - [ ] 已分别报告 build、host tests 与 device tests。 - [ ] 已更新发生变化的硬件事实或长期行为对应的权威文档。 -- [ ] 若用户可见行为、兼容性或发布流程变化,已更新 `docs/CHANGELOG.zh_CN.md`。 +- [ ] 已遵守变更日志所有权:普通 PR 不修改变更日志;发布准备 PR 同时更新中英文文件。 - [ ] 已移除凭证、私密设备链接、个人数据和未脱敏日志。 diff --git a/AGENTS.md b/AGENTS.md index 5d8ef72..6fae965 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -56,6 +56,6 @@ Device tests: PASS / FAIL / NOT RUN Unverified: remaining board, instrument, or user checks ``` -Create commits and push only when the user requests them or the active workflow explicitly requires them. Record user-visible changes in `docs/CHANGELOG.md`; internal refactors, CI maintenance, typo fixes, and generated-file refreshes do not require a changelog entry. +Create commits and push only when the user requests them or the active workflow explicitly requires them. Ordinary feature, application, and documentation pull requests must not edit `docs/CHANGELOG.md` or `docs/CHANGELOG.zh_CN.md`; describe user-visible behavior, compatibility, and release-flow impact in the pull-request body and authoritative documentation instead. During release preparation, the release maintainer aggregates merged user-visible changes into both changelog files before creating the tag. Community guidance is in `.github/CONTRIBUTING.md`, `.github/CODE_OF_CONDUCT.md`, `.github/SECURITY.md`, and `.github/SUPPORT.md`. diff --git a/AGENTS.zh_CN.md b/AGENTS.zh_CN.md index 3c068d6..bfd2493 100644 --- a/AGENTS.zh_CN.md +++ b/AGENTS.zh_CN.md @@ -56,6 +56,6 @@ Device tests: PASS / FAIL / NOT RUN Unverified: 仍需板卡、仪器或用户确认的事项 ``` -仅在用户请求或当前工作流明确要求时创建 commit 和 push。用户可见变化记录到 `docs/CHANGELOG.zh_CN.md`;内部重构、CI 维护、拼写修复和生成文件刷新无需记录。 +仅在用户请求或当前工作流明确要求时创建 commit 和 push。普通功能、应用和文档 PR 不得修改 `docs/CHANGELOG.md` 或 `docs/CHANGELOG.zh_CN.md`;用户可见行为、兼容性和发布流程影响改为写入 PR 正文及对应权威文档。发布准备期间,由发布负责人在创建 tag 前把已合并的用户可见变化统一汇总到两份变更日志。 社区规范见 `.github/CONTRIBUTING.zh_CN.md`、`.github/CODE_OF_CONDUCT.zh_CN.md`、`.github/SECURITY.zh_CN.md` 与 `.github/SUPPORT.zh_CN.md`。 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 637f5a9..f7eb33d 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,6 +4,12 @@ # Changelog +> **Release-maintainer owned:** ordinary feature, application, and documentation +> pull requests do not edit this file. Before creating a release tag, the release +> maintainer reviews merged user-visible changes and updates this file together +> with `CHANGELOG.zh_CN.md`. The entries currently under `Unreleased` are pending +> review for the next release; they are not a finalized release history. + ## Unreleased - Added the supplied 80-byte CW2017 profile for the specified 520 mAh cell, including content/update-flag checks, verified writes, the required restart sequence, and bounded SOC-readiness polling. diff --git a/docs/CHANGELOG.zh_CN.md b/docs/CHANGELOG.zh_CN.md index dad4491..7780622 100644 --- a/docs/CHANGELOG.zh_CN.md +++ b/docs/CHANGELOG.zh_CN.md @@ -4,6 +4,10 @@ # Changelog +> **由发布负责人维护:** 普通功能、应用和文档 PR 不修改本文件。创建发布 tag 前, +> 发布负责人检查已合并的用户可见变化,并与 `CHANGELOG.md` 同步更新。当前 +> `Unreleased` 下的条目是下次发布的待核对内容,不是已经定稿的发布历史。 + ## Unreleased - 加入厂家为优特利 520mAh 电芯生成的 80 字节 CW2017 profile,并实现内容与更新标志检查、写入后校验、规定的重启时序以及有上限的 SOC 就绪等待。 diff --git a/docs/contribution/commit-and-pr.md b/docs/contribution/commit-and-pr.md index ecdd05e..055ab38 100644 --- a/docs/contribution/commit-and-pr.md +++ b/docs/contribution/commit-and-pr.md @@ -10,7 +10,7 @@ - Use `feat`, `fix`, `docs`, `refactor`, `perf`, `test`, `chore`, `build`, or `ci`. Keep the subject at most 72 characters and omit the final period. - Keep each commit independently reviewable. Describe the final diff, not the debugging journey. - Review the complete diff, run applicable checks, and exclude credentials, generated firmware, and unrelated files. -- Update `docs/CHANGELOG.md` only for user-visible behavior, compatibility, or release-flow changes. +- Do not edit the paired changelog files in an ordinary feature, application, or documentation commit. Describe user-visible behavior, compatibility, and release-flow impact in the pull-request body; only a release-preparation change maintained before tagging aggregates those merged changes into both files. - Creating a commit does not authorize pushing, opening a PR, releasing, or merging. - Write durable product constraints, data formats, architecture decisions, and acceptance criteria back to their authoritative document. Do not preserve transient debugging notes. diff --git a/docs/contribution/commit-and-pr.zh_CN.md b/docs/contribution/commit-and-pr.zh_CN.md index 9361d79..6f14cdf 100644 --- a/docs/contribution/commit-and-pr.zh_CN.md +++ b/docs/contribution/commit-and-pr.zh_CN.md @@ -10,7 +10,7 @@ - `type` 使用 `feat`、`fix`、`docs`、`refactor`、`perf`、`test`、`chore`、`build` 或 `ci`;标题不超过 72 个字符,结尾不加句号。 - 一个 commit 只表达一个可独立 review 的逻辑变化,message 描述最终 diff,不记录调试过程。 - 提交前检查完整 diff,运行适用测试,并排除凭证、生成固件和无关文件。 -- 仅用户可见的行为、兼容性和发布流程变化需要更新 `docs/CHANGELOG.zh_CN.md`;内部重构、CI 维护、拼写修复和依赖锁刷新不强制记录。 +- 普通功能、应用和文档 commit 不修改中英文变更日志。用户可见行为、兼容性和发布流程影响写入 PR 正文;只有打 tag 前的发布准备变更,才把已合并内容统一汇总到两份变更日志。 - 不因创建 commit 自动获得 push、创建 PR、发布 Release 或合并的权限;这些外部操作由用户请求或明确工作流授权。 - 需求形成了需要长期维护的产品约束、数据格式、架构决定或验收标准时,写回对应设计/规范文档;临时讨论和调试记录不必落仓。 diff --git a/docs/contribution/doc-conventions.md b/docs/contribution/doc-conventions.md index 666927a..9e4b796 100644 --- a/docs/contribution/doc-conventions.md +++ b/docs/contribution/doc-conventions.md @@ -38,11 +38,16 @@ These rules apply equally to human contributors and AI agents. Documentation is Do not create empty document scaffolding without a concrete purpose. Register added documents in `docs/README.md` or their directory index and update links when moving or deleting files. +## Changelog ownership + +- Ordinary feature, application, and documentation pull requests leave `docs/CHANGELOG.md` and `docs/CHANGELOG.zh_CN.md` unchanged. They describe user-visible behavior, compatibility, and release-flow impact in the pull-request body and update the authoritative product or application documentation. +- During release preparation, the release maintainer reviews merged pull requests since the previous release, keeps only user-visible changes, and updates both changelog languages together before creating the tag. +- The release-preparation change places the released entries under a version-and-date heading and leaves a fresh `Unreleased` section. Existing entries under `Unreleased` are pending input for the next release and must be checked against the merged changes rather than copied blindly. + ## Writing, safety, and file operations - Explain rationale, boundaries, failure modes, and validation instead of restating source code. - State product facts and public hardware interfaces directly; omit provenance and source-availability commentary. - Enforce automatable rules in `tools/` and CI as well as documentation. -- Record user-visible behavior, compatibility, and release-flow changes in `docs/CHANGELOG.md`. - Never commit credentials, tokens, keys, authorization files, private keys, personal data, internal endpoints, or unsanitized device QR parameters. Run `./tools/validate.sh --static` before committing. - Preserve existing user changes and untracked files. Use recoverable deletion for user files, and confirm intent before deleting branches, tags, or remote references. diff --git a/docs/contribution/doc-conventions.zh_CN.md b/docs/contribution/doc-conventions.zh_CN.md index c01ca3e..26d1cbb 100644 --- a/docs/contribution/doc-conventions.zh_CN.md +++ b/docs/contribution/doc-conventions.zh_CN.md @@ -37,6 +37,12 @@ 不要创建只有目录说明而没有实际用途的空骨架。新增文档必须在 `docs/README.md` 或所属目录索引中登记;删除或移动文档时同步更新所有链接。 +## 变更日志所有权 + +- 普通功能、应用和文档 PR 不修改 `docs/CHANGELOG.md` 与 `docs/CHANGELOG.zh_CN.md`。用户可见行为、兼容性和发布流程影响写入 PR 正文,并同步更新对应的产品或应用权威文档。 +- 发布准备期间,发布负责人检查自上一版本以来已合并的 PR,只保留用户可见变化,并在创建 tag 前同时更新两种语言的变更日志。 +- 发布准备变更把本次发布条目归入带版本号和日期的标题,并留下新的 `Unreleased` 章节。现有 `Unreleased` 条目是下次发布的待核对输入,必须与实际合并内容核对,不能直接照搬。 + ## 写作与维护 - 中文版正文使用全角标点;代码、命令、路径、URL、标识符、YAML/JSON 字段和英文句子保持 ASCII 格式。 @@ -44,7 +50,6 @@ - 直接陈述产品事实和公开硬件接口,不加入来源及资料开放状态说明。 - 中英文双语文档必须保持章节和事实一致;只修改一侧时,在交付中明确另一侧是否需要同步。 - 能由脚本检查的规则必须落实到 `tools/` 和 CI,不能只写在文档里。 -- 用户可见行为、兼容性或发布流程变化记录到 `docs/CHANGELOG.zh_CN.md`;内部整理和拼写修复不强制记录。 ## 内容安全 diff --git a/docs/development/ci/CI-build-and-release.md b/docs/development/ci/CI-build-and-release.md index 50c25ea..78c34e9 100644 --- a/docs/development/ci/CI-build-and-release.md +++ b/docs/development/ci/CI-build-and-release.md @@ -39,6 +39,26 @@ make sure the release title shows both. is visible in both the tag list and the release list. Do not rely on a human-readable body alone to carry the app name. +## Changelog preparation + +Ordinary feature, application, and documentation pull requests leave the paired +changelog files unchanged. Before creating and pushing a release tag, the +release maintainer: + +1. Identifies the previous release and reviews the pull requests merged since it, + together with the authoritative product and application documentation. +2. Collects user-visible features, fixes, compatibility changes, and release-flow + changes. Internal refactors, CI maintenance, typo fixes, and generated-file + refreshes are omitted. +3. Updates `docs/CHANGELOG.md` and `docs/CHANGELOG.zh_CN.md` together, places the + released entries under a `## - YYYY-MM-DD` heading, and leaves a fresh + `Unreleased` section before committing the release preparation. + +Treat any existing `Unreleased` entries as pending input: verify them against the +merged changes and the target release instead of copying them blindly. This +release-preparation change is the owner of the shared changelog write and must be +part of the commit that is tagged. + ## Release notes A tag-triggered release succeeds only when the merged firmware and its release @@ -55,8 +75,9 @@ things: interactions or hardware requirements of the release. Write the release notes in English (and a Simplified Chinese version where the -project is bilingual) and link them from the GitHub/GitLab release. Keep them -consistent with `docs/CHANGELOG.md` for user-visible behavior. +project is bilingual) and link them from the GitHub/GitLab release. Derive the +user-visible summary from the release-preparation changelog so the two remain +consistent. ## Related documents diff --git a/docs/development/ci/CI-build-and-release.zh_CN.md b/docs/development/ci/CI-build-and-release.zh_CN.md index 6ca9697..bd67356 100644 --- a/docs/development/ci/CI-build-and-release.zh_CN.md +++ b/docs/development/ci/CI-build-and-release.zh_CN.md @@ -52,6 +52,18 @@ - **标题与 tag 保持一致**:用 `<版本>-<应用名>`,让应用名在 tag 列表和 Release 列表里都可见。不要只靠 人类可读的正文承载应用名。 +## 变更日志准备 + +普通功能、应用和文档 PR 不修改中英文变更日志。创建并推送发布 tag 前,发布负责人需要: + +1. 确认上一版本,并检查此后已合并的 PR,以及对应的产品和应用权威文档。 +2. 汇总用户可见功能、修复、兼容性变化和发布流程变化;忽略内部重构、CI 维护、拼写修复与生成文件刷新。 +3. 同时更新 `docs/CHANGELOG.md` 和 `docs/CHANGELOG.zh_CN.md`,把本次发布条目放入 + `## - YYYY-MM-DD` 标题下,保留一个新的 `Unreleased` 章节,再提交发布准备变更。 + +现有 `Unreleased` 条目只作为待核对输入:必须与实际合并内容及目标版本核对,不能直接照搬。该发布准备 +变更是共享变更日志的唯一写入方,并且必须包含在 tag 所指向的 commit 中。 + ## Release 说明 tag 触发的 Release 只有在合并固件与它的 Release 说明一起发布时才完整。发布 Release 后,要写一份 @@ -64,8 +76,8 @@ tag 触发的 Release 只有在合并固件与它的 Release 说明一起发布 - **使用(How to use / 使用)**:如何烧录(上方在线刷机工具),以及本次 Release 的关键交互或硬件 要求。 -用英文写 Release 说明(项目双语时再配一份简体中文),并在 GitHub/GitLab Release 上链接它们。对 -用户可见的行为,保持与 `docs/CHANGELOG.md` 一致。 +用英文写 Release 说明(项目双语时再配一份简体中文),并在 GitHub/GitLab Release 上链接它们。 +用户可见摘要以发布准备阶段的变更日志为依据,确保两者一致。 ## 相关文件 diff --git a/docs/development/release/project-completion.md b/docs/development/release/project-completion.md index 14d0906..16e418d 100644 --- a/docs/development/release/project-completion.md +++ b/docs/development/release/project-completion.md @@ -196,16 +196,20 @@ commit, push, tag, and release. ### Steps -1. Commit the change and push it to the fork (`origin`) — confirm separately. -2. Create and push a tag to trigger the release workflow — confirm separately. -3. Let the tagged build produce the merged firmware `.bin`. -4. Create or update the GitHub/GitLab release with the artifact — confirm +1. When preparing a repository release, review the merged user-visible changes + since the previous release and update both changelog languages as described + in [Automated Build and Release](../ci/CI-build-and-release.md). Ordinary + feature, application, and documentation pull requests skip this step. +2. Commit the change and push it to the fork (`origin`) — confirm separately. +3. Create and push a tag to trigger the release workflow — confirm separately. +4. Let the tagged build produce the merged firmware `.bin`. +5. Create or update the GitHub/GitLab release with the artifact — confirm separately. The workflow sets the default release title to the version/tag name; after the release is up, refine it to the project feature name plus the version number. -5. Write release notes in English (and a Simplified Chinese version where the +6. Write release notes in English (and a Simplified Chinese version where the project is bilingual) covering what is new, how to build, and how to use. -6. Verify the released full build on hardware (see +7. Verify the released full build on hardware (see [Post-release hardware verification](#post-release-hardware-verification)). ### Rules diff --git a/docs/development/release/project-completion.zh_CN.md b/docs/development/release/project-completion.zh_CN.md index 6744495..bfa5a20 100644 --- a/docs/development/release/project-completion.zh_CN.md +++ b/docs/development/release/project-completion.zh_CN.md @@ -145,12 +145,13 @@ flowchart TD ### 步骤 -1. 提交变更并推送到 fork(`origin`)——分开确认。 -2. 创建并推送 tag 以触发 release 工作流——分开确认。 -3. 让 tagged 构建产生合并固件 `.bin`。 -4. 用产物创建或更新 GitHub/GitLab release——分开确认。工作流把 release 标题默认设为版本/tag 名;release 发布后,把它改成项目特性名加版本号。 -5. 用英文写 release notes(项目双语时另附简体中文版),覆盖新增内容、如何构建、如何使用。 -6. 在真机验证发布的完整构建(见 [发布后真机验证](#post-release-hardware-verification))。 +1. 准备仓库发布时,检查自上一版本以来已合并的用户可见变化,并按[自动构建与发布](../ci/CI-build-and-release.zh_CN.md)同时更新中英文变更日志。普通功能、应用和文档 PR 跳过此步骤。 +2. 提交变更并推送到 fork(`origin`)——分开确认。 +3. 创建并推送 tag 以触发 release 工作流——分开确认。 +4. 让 tagged 构建产生合并固件 `.bin`。 +5. 用产物创建或更新 GitHub/GitLab release——分开确认。工作流把 release 标题默认设为版本/tag 名;release 发布后,把它改成项目特性名加版本号。 +6. 用英文写 release notes(项目双语时另附简体中文版),覆盖新增内容、如何构建、如何使用。 +7. 在真机验证发布的完整构建(见 [发布后真机验证](#post-release-hardware-verification))。 ### 规则 diff --git a/skills/experience-pr/SKILL.md b/skills/experience-pr/SKILL.md index 7adc343..04ec9a8 100644 --- a/skills/experience-pr/SKILL.md +++ b/skills/experience-pr/SKILL.md @@ -147,8 +147,9 @@ developer's current branch. Report the result as `Build`, `Host tests`, `Device tests`, and `Unverified` separately. A docs-only change has no firmware or host-test work, so report -those as NOT RUN and note the reason. Update `docs/CHANGELOG.md` only if the -change affects user-visible behavior, compatibility, or the release workflow. +those as NOT RUN and note the reason. An experience pull request leaves the +paired changelog files unchanged; describe any user-visible or release-flow +impact in the pull-request body for the release maintainer to aggregate later. ## What this skill does not do diff --git a/skills/experience-pr/SKILL.zh_CN.md b/skills/experience-pr/SKILL.zh_CN.md index dfc89cc..088bd06 100644 --- a/skills/experience-pr/SKILL.zh_CN.md +++ b/skills/experience-pr/SKILL.zh_CN.md @@ -109,8 +109,8 @@ comm -23 \ ## 交付上报 按 `Build`、`Host tests`、`Device tests`、`Unverified` 分别上报。纯文档变更没有固件或 -host-test 工作,因此这些上报为 NOT RUN 并说明原因。仅当变更影响用户可见行为、兼容性或 -发布流程时更新 `docs/CHANGELOG.md`。 +host-test 工作,因此这些上报为 NOT RUN 并说明原因。经验 PR 不修改中英文变更日志;用户可见或 +发布流程影响写入 PR 正文,后续由发布负责人统一汇总。 ## 本 skill 不做的事