mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
- Add missing code-review.md and development-workflow.md to zh/README.md directory listing - Add mkdir -p command before copy in manual install instructions - Fix TypeScript test command path in SKILL-DEVELOPMENT-GUIDE.md - Add Anti-Patterns section to SKILL.md template - Add Template category to Skill Categories table in CONTRIBUTING.md - Add Pre-Review Requirements section to code-review.md (both en and zh) - Add Pre-Review Checks step to development-workflow.md (both en and zh) - Add trailing newlines to all files that were missing them
45 lines
2.0 KiB
Markdown
45 lines
2.0 KiB
Markdown
# 开发工作流
|
||
|
||
> 此文件扩展 [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 流程
|
||
|
||
5. **审查前检查**
|
||
- 验证所有自动化检查(CI/CD)已通过
|
||
- 解决任何合并冲突
|
||
- 确保分支已与目标分支同步
|
||
- 仅在这些检查通过后请求审查
|