Files
Kymo/CONTRIBUTING.md
T

51 lines
1.4 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.
# 贡献指南
## 提交规范
提交信息遵循 [Conventional Commits](https://www.conventionalcommits.org/zh-hans/),描述统一使用中文:
```
<type>(<scope>): <中文描述>
```
### type 说明
| type | 用途 |
| --- | --- |
| `feat` | 新功能 |
| `fix` | 缺陷修复 |
| `docs` | 文档变更 |
| `style` | 代码格式调整(不影响逻辑) |
| `refactor` | 重构(既非新增也非修复) |
| `perf` | 性能优化 |
| `test` | 测试相关 |
| `chore` | 构建 / 工程配置等杂项 |
### scope 建议
`app`、`monitors`、`menubar`、`settings`、`ui`、`docs`、`project`
### 示例
```
feat(monitors): 新增 CPU 占用率采样器
fix(menubar): 修复菜单栏文本高刷新率下抖动
docs(architecture): 补充数据流时序说明
```
## 分支规范
- `main` 为主干分支,保持可构建状态;
- `main` 是长期保留分支;如需临时开发分支,使用 `codex/xxx`,合入并确认无独有提交后删除;
- 合入前确保:代码可编译、相关文档已同步更新;验证方式见 [测试与验证](docs/testing.md)。
## 代码风格
- Swift 代码 4 空格缩进,遵循 Swift 官方 API 设计指南;
- 目录归属:业务视图进 `Features/`,通用能力进 `Core/` 与 `UI/`;
- 与 UI 无关的逻辑不放进视图,保证可测试性。
## AI 编码智能体
AI 编码智能体在本仓库工作时,须遵守根目录 [AGENTS.md](AGENTS.md) 中的协作规范。