feat:添加whaletown-developer标准开发工作流技能

- 创建whaletown-developer skill自动化7步开发流程
- 添加完整的使用说明文档和质量检查清单
- 更新CLAUDE.md集成标准开发工作流说明
- 新增标准开发工作流详细文档

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-04 00:46:48 +08:00
parent 3d6c4e5356
commit 43e0c2b928
6 changed files with 1668 additions and 4 deletions

View File

@@ -27,10 +27,10 @@
## 4. 📋 Coding Standards (The Law)
- **Type Safety**: ALWAYS use strict static typing: `var speed: float = 100.0`, `func _ready() -> void`.
- **Naming Conventions**:
- **Naming Conventions**:
- `class_name PascalCase` at the top of every script.
- Variables/Functions: `snake_case`. Constants: `SCREAMING_SNAKE_CASE`.
- Private members: Prefix with underscore `_` (e.g., `var _health: int`).
- Variables/Functions: `camelCase` (e.g., `var moveSpeed`, `func updateMovement()`). Constants: `UPPER_CASE`.
- Private members: Prefix with underscore `_` (e.g., `var _velocity: Vector2`).
- **Node Access**: Use `%UniqueName` for UI and internal scene components.
- **Signals**: Use "Signal Up, Call Down". Parent calls child methods; Child emits signals.
- **Forbidden Patterns**:
@@ -68,7 +68,69 @@ func test_event_emission():
watch_signals(EventSystem)
EventSystem.emit_event(EventNames.PLAYER_MOVED, {})
assert_signal_emitted(EventSystem, "event_raised")
8. 🧘 The Zen of Development
## 🔄 8. Standard Development Workflow (MANDATORY)
**CRITICAL**: When performing ANY development task (implementing features, fixing bugs, creating scenes), you MUST follow this 7-step standardized workflow:
### Quick Start: Use the Skill (Recommended) ⭐
```bash
/whaletown-developer [任务描述]
```
Example: `/whaletown-developer 实现玩家二段跳功能`
The skill automates the entire 7-step process and enforces all quality standards.
### The 7-Step Workflow
```
Step 1: Architecture Analysis → Read docs/02-开发规范/架构与通信规范.md
Step 2: Implementation → Follow layered architecture, type safety, EventSystem
Step 3: Comment Validation → Read docs/02-开发规范/代码注释规范.md
Step 4: Naming Validation → Read docs/02-开发规范/命名规范.md
Step 5: Test Writing → Read docs/03-技术实现/测试指南.md
Step 6: Test Execution → Run: godot --headless -s addons/gut/gut_cmdline.gd
Step 7: Git Commit → Read docs/02-开发规范/Git提交规范.md
```
### Workflow Enforcement Rules
1. **Never Skip Steps**: All 7 steps are mandatory for every development task
2. **Read Specs First**: Each step requires reading the corresponding specification document
3. **Use TodoWrite**: Track progress through all 7 steps using TodoWrite tool
4. **Mark Completed**: Mark each step as completed immediately after finishing
5. **Quality Gates**: Cannot proceed to next step until current step passes validation
### Naming Convention Clarification
**IMPORTANT**: The project uses **camelCase** for variables/functions, NOT snake_case:
- ✅ Correct: `var moveSpeed: float`, `func updateMovement()`
- ❌ Incorrect: `var move_speed: float`, `func update_movement()`
See `docs/02-开发规范/命名规范.md` for complete details.
### Quality Checklist (Every Development Task)
- [ ] File location follows layered architecture (_Core, scenes, UI)
- [ ] Uses EventSystem for cross-module communication
- [ ] Event names added to EventNames.gd
- [ ] All variables/functions have type annotations
- [ ] Naming: PascalCase (classes), camelCase (vars/funcs), UPPER_CASE (constants)
- [ ] File header comment complete
- [ ] Public functions have complete documentation
- [ ] Unit tests created and passing
- [ ] Git commit message follows specification
- [ ] No Godot 3.x syntax (await not yield, @onready cached)
### Reference Documents
- **Full Workflow**: `docs/AI_docs/workflows/standard_development_workflow.md`
- **Quick Checklist**: `.claude/skills/whaletown-developer/references/checklist.md`
- **Skill Definition**: `.claude/skills/whaletown-developer/SKILL.md`
**Remember**: Consistency through automation. Use `/whaletown-developer` to ensure no steps are missed.
9. 🧘 The Zen of Development
Juice or Death: Every interaction (UI popup, NPC talk) MUST have a Tween placeholder.
Zero Magic Numbers: All speeds/timers MUST be @export or defined in Config/.
Simplicity: If a function does two things, split it.