Files
syops/docs/skills/release-notes-skill.md
T

156 lines
5.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# release-notes Skill 使用说明
> 文档定位:说明 HXOPS 项目级 Cursor Skill **`release-notes`** 的用途、触发方式与落地约定。
> Agent 执行细则以 [`.cursor/skills/release-notes/SKILL.md`](../../.cursor/skills/release-notes/SKILL.md) 为准;发布流程以 [release_workflow.md](../convention/release_workflow.md) 为准。
---
## 1. 背景与目标
发布流程步骤 6 要求梳理近一周合入 `test` 的功能,并结合 Conventional Commits 输出**功能说明文档**,供质检与上线 Review 使用。历史产出物在 `docs/release_note/`。
本 Skill 把该步骤落成可重复工作流:定版本与区间 → 收集提交 → 按产品域归并 → 分别写「面向用户 / 面向开发者」→ 写入 `docs/release_note/`。
---
## 2. 文件位置
```text
.cursor/skills/release-notes/
├── SKILL.md # Agent 执行说明书
├── template.md # 发布说明正文模板
└── examples.md # 好坏示例与归并示例
docs/skills/release-notes-skill.md # 本文(团队说明)
docs/release_note/W{周}-V{版本}.txt # 产出物
```
| 类型 | 路径 | 说明 |
| --- | --- | --- |
| 项目 Skill | `.cursor/skills/release-notes/` | 随仓库共享 |
| 产出目录 | `docs/release_note/` | 供质检 / Review 阅读 |
| 团队说明 | `docs/skills/release-notes-skill.md` | 给人看的用法 |
与常驻规则的关系:
| | `AGENTS.md` / 发布流程文档 | `release-notes` skill |
| --- | --- | --- |
| **作用** | 规定「要在步骤 6 产出说明」 | 规定「怎么从 git 生成、写什么格式」 |
| **何时生效** | 发布节点 | 提到发布说明 / changelog / 功能说明文档时 |
---
## 3. 何时使用
适合:
- 发布流程步骤 6:梳理近一周功能并输出说明
- 用户要求生成「发布说明 / release notes / changelog / 版本说明 / 功能说明文档」
- 上线 Review 前需要对照用户可见能力与开发变更清单
不适合:
- 日常单个 PR 的 commit message 撰写(走 Conventional Commits 规范即可)
- 仅改文档、与版本发布无关的杂项说明
---
## 4. 怎么用(给开发者)
### 4.1 自然语言(推荐)
```text
根据上一 tag 到 test 分支生成发布说明,版本 V26.7.2
```
```text
整理本周功能说明文档,区间 2026-07-15 ~ 2026-07-28
```
```text
用 release-notes:对比 V26.7.1..HEAD 写面向用户和开发者的发布说明
```
### 4.2 显式点名
```text
/release-notes 生成 W30-V26.7.2 发布说明
```
### 4.3 建议一并提供的信息
| 信息 | 是否必须 | 说明 |
| --- | --- | --- |
| 版本号 `VYY.M.N` | 推荐 | 未给则按已有 tag / 上份 release_note 推断并与你确认 |
| Git 区间或日期 | 推荐 | 默认上一 `V*` tag → `HEAD`/`test` |
| ISO 周次 | 可选 | 默认用更新周期结束日所在周 |
| 是否落盘 / 提交 | 可选 | **默认只写文件、不 commit** |
---
## 5. Agent 会执行的流程(摘要)
1. **定范围**:版本、更新周期、`git log <from>..<to>`。
2. **收集提交**:优先 `feat` / `fix` / `perf`;基建类进开发者「工程与基建」。
3. **按产品域归并**:同 scope / 同业务合并成一条亮点,禁止用户侧贴原始 commit。
4. **双视角撰写**:【面向用户】白话能力;【面向开发者】模块与实现要点。
5. **落盘**:`docs/release_note/W{周}-V{版本}.txt`,结构见 Skill 内 [template.md](../../.cursor/skills/release-notes/template.md)。
---
## 6. 产出格式速查
```text
版本:V26.7.1
更新周期:2026-06-23 ~ 2026-07-14
————————————————————
【面向用户】
————————————————————
本次更新亮点:
1. …
————————————————————
【面向开发者】
————————————————————
本次更新亮点:
1. …
```
完整样例:[`docs/release_note/W29-V26.7.1.txt`](../release_note/W29-V26.7.1.txt)。
---
## 7. 完成自检
- [ ] 文件名符合 `W{n}-V{ver}.txt`
- [ ] 含版本、更新周期、用户侧与开发者侧
- [ ] 用户侧无 commit / 路径 / API 噪音
- [ ] 亮点按产品归并,而非逐条 commit
- [ ] 未在未授权情况下执行 git commit
---
## 8. 维护说明
- 修改生成规则或模板时:同步更新 `.cursor/skills/release-notes/`(`SKILL.md` / `template.md` / `examples.md`)与**本文**。
- 发布流程步骤变更时:更新 [release_workflow.md](../convention/release_workflow.md) 与本文「何时使用」。
- Commit type 对 changelog 的影响变更时:以 [COMMIT_CONVENTION.md](../convention/COMMIT_CONVENTION.md) 为准并回改 Skill。
---
## 9. 相关链接
| 资源 | 路径 |
| --- | --- |
| Skill 正文 | [`.cursor/skills/release-notes/SKILL.md`](../../.cursor/skills/release-notes/SKILL.md) |
| 模板 | [`.cursor/skills/release-notes/template.md`](../../.cursor/skills/release-notes/template.md) |
| 示例 | [`.cursor/skills/release-notes/examples.md`](../../.cursor/skills/release-notes/examples.md) |
| 历史发布说明 | [`docs/release_note/`](../release_note/) |
| 发布流程 | [release_workflow.md](../convention/release_workflow.md) |
| 提交规范 | [COMMIT_CONVENTION.md](../convention/COMMIT_CONVENTION.md) |
| Skills 索引 | [README.md](README.md) |
| 协作总入口 | [AGENTS.md](../../AGENTS.md) |