mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
feat: add Chinese (zh-CN) translation for rules/common
- Add rules/zh/ directory with complete Chinese translations - Translate all 10 common rule files: - coding-style.md - security.md - testing.md - git-workflow.md - performance.md - patterns.md - hooks.md - agents.md - development-workflow.md - code-review.md - Add README.md for the zh directory explaining structure and installation - Maintain consistent formatting with original English versions - Keep technical terms and code examples in English where appropriate
This commit is contained in:
38
rules/zh/development-workflow.md
Normal file
38
rules/zh/development-workflow.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# 开发工作流
|
||||
|
||||
> 此文件扩展 [common/git-workflow.md](./git-workflow.md),包含 git 操作之前的完整功能开发流程。
|
||||
|
||||
功能实现工作流描述了开发管道:研究、规划、TDD、代码审查,然后提交到 git。
|
||||
|
||||
## 功能实现工作流
|
||||
|
||||
0. **研究与重用** _(任何新实现前必需)_
|
||||
- **GitHub 代码搜索优先:** 在编写任何新代码之前,运行 `gh search repos` 和 `gh search code` 查找现有实现、模板和模式。
|
||||
- **库文档其次:** 使用 Context7 或主要供应商文档确认 API 行为、包使用和版本特定细节。
|
||||
- **仅当前两者不足时使用 Exa:** 在 GitHub 搜索和主要文档之后,使用 Exa 进行更广泛的网络研究或发现。
|
||||
- **检查包注册表:** 在编写工具代码之前搜索 npm、PyPI、crates.io 和其他注册表。首选久经考验的库而非手工编写的解决方案。
|
||||
- **搜索可适配的实现:** 寻找解决问题 80%+ 且可以分支、移植或包装的开源项目。
|
||||
- 当满足需求时,优先采用或移植经验证的方法而非从头编写新代码。
|
||||
|
||||
1. **先规划**
|
||||
- 使用 **planner** 代理创建实现计划
|
||||
- 编码前生成规划文档:PRD、架构、系统设计、技术文档、任务列表
|
||||
- 识别依赖和风险
|
||||
- 分解为阶段
|
||||
|
||||
2. **TDD 方法**
|
||||
- 使用 **tdd-guide** 代理
|
||||
- 先写测试(RED)
|
||||
- 实现以通过测试(GREEN)
|
||||
- 重构(IMPROVE)
|
||||
- 验证 80%+ 覆盖率
|
||||
|
||||
3. **代码审查**
|
||||
- 编写代码后立即使用 **code-reviewer** 代理
|
||||
- 解决关键和高优先级问题
|
||||
- 尽可能修复中优先级问题
|
||||
|
||||
4. **提交与推送**
|
||||
- 详细的提交消息
|
||||
- 遵循约定式提交格式
|
||||
- 参见 [git-workflow.md](./git-workflow.md) 了解提交消息格式和 PR 流程
|
||||
Reference in New Issue
Block a user