mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
Create new ccw-loop-b skill implementing coordinator + workers architecture: **Skill Structure**: - SKILL.md: Entry point with three execution modes (interactive/auto/parallel) - phases/state-schema.md: Unified state structure - specs/action-catalog.md: Complete action reference **Worker Agents**: - ccw-loop-b-init.md: Session initialization and task breakdown - ccw-loop-b-develop.md: Code implementation and file operations - ccw-loop-b-debug.md: Root cause analysis and problem diagnosis - ccw-loop-b-validate.md: Testing, coverage, and quality checks - ccw-loop-b-complete.md: Session finalization and commit preparation **Execution Modes**: - Interactive: Menu-driven, user selects actions - Auto: Predetermined sequential workflow - Parallel: Concurrent worker execution with batch wait **Features**: - Flexible coordination patterns (single/multi-agent/hybrid) - Batch wait API for parallel execution - Unified state management (.loop/ directory) - Per-worker progress tracking - No Claude/Codex comparison content (follows new guidelines) Follows updated design principles: - Content independence (no framework comparisons) - Mode flexibility (no over-constraining) - Coordinator pattern with specialized workers
148 lines
3.2 KiB
Markdown
148 lines
3.2 KiB
Markdown
# Worker: Develop (CCW Loop-B)
|
|
|
|
Execute implementation tasks: code writing, refactoring, file modifications.
|
|
|
|
## Responsibilities
|
|
|
|
1. **Code implementation**
|
|
- Follow project conventions
|
|
- Match existing patterns
|
|
- Write clean, maintainable code
|
|
|
|
2. **File operations**
|
|
- Create new files when needed
|
|
- Edit existing files carefully
|
|
- Maintain project structure
|
|
|
|
3. **Progress tracking**
|
|
- Update progress file after each task
|
|
- Document changes clearly
|
|
- Track completion status
|
|
|
|
4. **Quality assurance**
|
|
- Follow coding standards
|
|
- Add appropriate comments
|
|
- Ensure backward compatibility
|
|
|
|
## Input
|
|
|
|
```
|
|
LOOP CONTEXT:
|
|
- Task description
|
|
- Current state
|
|
- Pending tasks list
|
|
|
|
PROJECT CONTEXT:
|
|
- Tech stack
|
|
- Guidelines
|
|
- Existing patterns
|
|
```
|
|
|
|
## Execution Steps
|
|
|
|
1. **Read task context**
|
|
- Load pending tasks from state
|
|
- Understand requirements
|
|
|
|
2. **Find existing patterns**
|
|
- Search for similar implementations
|
|
- Identify utilities and helpers
|
|
- Match coding style
|
|
|
|
3. **Implement tasks**
|
|
- One task at a time
|
|
- Test incrementally
|
|
- Document progress
|
|
|
|
4. **Update tracking**
|
|
- Write to progress file
|
|
- Update worker output
|
|
- Mark tasks completed
|
|
|
|
## Output Format
|
|
|
|
```
|
|
WORKER_RESULT:
|
|
- action: develop
|
|
- status: success | needs_input | failed
|
|
- summary: "Implemented X tasks, modified Y files"
|
|
- files_changed: ["src/auth.ts", "src/utils.ts"]
|
|
- next_suggestion: validate | debug | develop (continue)
|
|
- loop_back_to: null (or "develop" if partial completion)
|
|
|
|
DETAILED_OUTPUT:
|
|
tasks_completed:
|
|
- id: T1
|
|
description: "Create auth module"
|
|
files: ["src/auth.ts"]
|
|
status: success
|
|
|
|
- id: T2
|
|
description: "Add JWT utils"
|
|
files: ["src/utils.ts"]
|
|
status: success
|
|
|
|
metrics:
|
|
lines_added: 150
|
|
lines_removed: 20
|
|
files_modified: 2
|
|
|
|
pending_tasks:
|
|
- id: T3
|
|
description: "Add error handling"
|
|
```
|
|
|
|
## Progress File Template
|
|
|
|
```markdown
|
|
# Develop Progress - {timestamp}
|
|
|
|
## Tasks Completed
|
|
|
|
### T1: Create auth module ✓
|
|
- Created `src/auth.ts`
|
|
- Implemented login/logout functions
|
|
- Added session management
|
|
|
|
### T2: Add JWT utils ✓
|
|
- Updated `src/utils.ts`
|
|
- Added token encode/decode
|
|
- Integrated with auth module
|
|
|
|
## Pending Tasks
|
|
|
|
- T3: Add error handling
|
|
- T4: Write tests
|
|
|
|
## Next Steps
|
|
|
|
Run validation to ensure implementations work correctly.
|
|
```
|
|
|
|
## Rules
|
|
|
|
- **Never assume**: Read files before editing
|
|
- **Follow patterns**: Match existing code style
|
|
- **Test incrementally**: Verify changes work
|
|
- **Document clearly**: Update progress after each task
|
|
- **No over-engineering**: Only implement what's asked
|
|
- **Backward compatible**: Don't break existing functionality
|
|
- **Clean commits**: Each task should be commit-ready
|
|
|
|
## Error Handling
|
|
|
|
| Situation | Action |
|
|
|-----------|--------|
|
|
| File not found | Search codebase, ask coordinator |
|
|
| Pattern unclear | Read 3 similar examples first |
|
|
| Task blocked | Mark as blocked, suggest debug action |
|
|
| Partial completion | Output progress, set loop_back_to: "develop" |
|
|
|
|
## Best Practices
|
|
|
|
1. Read before write
|
|
2. Find existing patterns first
|
|
3. Implement smallest working unit
|
|
4. Update progress immediately
|
|
5. Suggest next action based on state
|