Skip to content

Commit 99a45e3

Browse files
author
catlog22
committed
refactor: update skill invocation methods and enhance CLI usage examples
1 parent bf057a9 commit 99a45e3

3 files changed

Lines changed: 87 additions & 53 deletions

File tree

docs/skills/index.md

Lines changed: 44 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,24 @@ Skill(skill="workflow-tdd-plan", args="--mode tdd-verify")
9292

9393
## Using Skills
9494

95-
### CLI Interface
95+
### Recommended: CCW Orchestrator
96+
97+
Use `/ccw` command with natural language - CCW analyzes intent and auto-selects appropriate skill:
9698

9799
```bash
98-
# Invoke via ccw command
99-
ccw --help
100+
# CCW auto-routes to brainstorm skill
101+
/ccw "头脑风暴: 用户通知系统设计"
102+
103+
# CCW auto-routes to team lifecycle workflow
104+
/ccw "从零开始: 用户认证系统"
100105

101-
# Or use triggers directly
102-
ccw brainstorm
103-
ccw team lifecycle
106+
# CCW auto-routes to review cycle
107+
/ccw "review: 代码质量检查"
104108
```
105109

106-
### Programmatic Interface
110+
### Direct Skill Invocation
111+
112+
Use `Skill()` tool for direct skill calls:
107113

108114
```javascript
109115
// Basic usage
@@ -116,6 +122,17 @@ Skill(skill="team-lifecycle-v4", args="Build user authentication")
116122
Skill(skill="workflow-plan", args="--mode verify")
117123
```
118124

125+
### CCW Team CLI (Message Bus Only)
126+
127+
`ccw team` is **only** for team message bus operations, not for invoking team skills:
128+
129+
```bash
130+
# Message bus operations
131+
ccw team log --session-id TLS-xxx --from executor --type state_update
132+
ccw team list --session-id TLS-xxx --last 5
133+
ccw team status --session-id TLS-xxx
134+
```
135+
119136
## Custom Skills
120137

121138
Create your own skills for team-specific workflows:
@@ -173,24 +190,23 @@ Skill(skill="my-custom-skill", args="input")
173190
**Scenario**: Implement a new user dashboard feature
174191

175192
```bash
176-
# Step 1: Brainstorm the feature
177-
ccw brainstorm
178-
# Follow prompts to define:
179-
# - Dashboard widgets (stats, charts, recent activity)
180-
# - Layout preferences
181-
# - Data refresh intervals
182-
183-
# Step 2: Plan implementation
184-
ccw workflow-plan "Build user dashboard with configurable widgets"
185-
# Outputs: IMPL-001.json with task breakdown
186-
187-
# Step 3: Execute with team
188-
ccw team lifecycle
193+
# Step 1: Brainstorm the feature (via CCW orchestrator)
194+
/ccw "头脑风暴: 用户仪表板功能设计"
195+
# Or use Skill directly:
196+
# Skill(skill="brainstorm")
197+
198+
# Step 2: Plan implementation (via CCW orchestrator)
199+
/ccw "Plan: Build user dashboard with configurable widgets"
200+
# Or use Skill directly:
201+
# Skill(skill="workflow-plan", args="Build user dashboard")
202+
203+
# Step 3: Execute with team lifecycle
204+
Skill(skill="team-lifecycle-v4", args="Build user dashboard")
189205
# Or use quick iteration:
190-
ccw workflow-lite-planex && ccw workflow-execute
206+
# Skill(skill="workflow-lite-planex")
191207

192208
# Step 4: Review and refine
193-
ccw review-code
209+
Skill(skill="review-code")
194210
# Fix any issues found
195211
```
196212

@@ -215,12 +231,13 @@ ccw workflow-execute --task "Fix N+1 query in user endpoint"
215231
**Scenario**: Migrate from JavaScript to TypeScript
216232

217233
```bash
218-
# Step 1: Analyze codebase
219-
ccw workflow:refactor-cycle
220-
# Identifies tech debt and creates migration plan
234+
# Step 1: Analyze codebase (via CCW orchestrator)
235+
/ccw "refactor: JavaScript to TypeScript migration"
236+
# Or use Skill directly:
237+
# Skill(skill="workflow:refactor-cycle")
221238

222-
# Step 2: Execute migration in phases
223-
ccw team roadmap-dev --epic "ts-migration"
239+
# Step 2: Execute with team roadmap
240+
Skill(skill="team-roadmap-dev", args="--epic ts-migration")
224241
# Progressively migrates modules with tests
225242
```
226243

docs/skills/naming-conventions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ Short aliases for common commands:
8383
| Full Command | Short Alias |
8484
|--------------|-------------|
8585
| `workflow:multi-cli-plan` | `workflow:multi-cli-plan` |
86-
| `team:lifecycle-v4` | `team lifecycle` |
87-
| `brainstorm:auto` | `brainstorm` |
86+
| `team-lifecycle-v4` | (via `/ccw "从零开始: ..."` or `Skill()`) |
87+
| `brainstorm` | (via `/ccw "头脑风暴: ..."` or `Skill()`) |
8888

8989
## File Naming
9090

docs/zh/skills/index.md

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,24 @@ Skill(skill="workflow-tdd-plan", args="--mode tdd-verify")
9292

9393
## 使用技能
9494

95-
### CLI 接口
95+
### 推荐方式:CCW 编排器
96+
97+
使用 `/ccw` 命令配合自然语言描述 - CCW 自动分析意图并选择合适的 skill:
9698

9799
```bash
98-
# 通过 ccw 命令调用
99-
ccw --help
100+
# CCW 自动路由到 brainstorm skill
101+
/ccw "头脑风暴: 用户通知系统设计"
102+
103+
# CCW 自动路由到 team lifecycle 工作流
104+
/ccw "从零开始: 用户认证系统"
100105

101-
# 或直接使用触发器
102-
ccw brainstorm
103-
ccw team lifecycle
106+
# CCW 自动路由到代码审查
107+
/ccw "review: 代码质量检查"
104108
```
105109

106-
### 编程接口
110+
### 直接调用 Skill
111+
112+
使用 `Skill()` 工具直接调用:
107113

108114
```javascript
109115
// 基本使用
@@ -116,6 +122,17 @@ Skill(skill="team-lifecycle-v4", args="Build user authentication")
116122
Skill(skill="workflow-plan", args="--mode verify")
117123
```
118124

125+
### CCW Team CLI(仅消息总线)
126+
127+
`ccw team` **仅用于**团队消息总线操作,不能用于调用 team skill:
128+
129+
```bash
130+
# 消息总线操作
131+
ccw team log --session-id TLS-xxx --from executor --type state_update
132+
ccw team list --session-id TLS-xxx --last 5
133+
ccw team status --session-id TLS-xxx
134+
```
135+
119136
## 自定义技能
120137

121138
为团队特定工作流创建自己的技能:
@@ -173,24 +190,23 @@ Skill(skill="my-custom-skill", args="input")
173190
**场景**:实现新的用户仪表板功能
174191

175192
```bash
176-
# 步骤 1:头脑风暴功能
177-
ccw brainstorm
178-
# 按提示定义:
179-
# - 仪表板小部件(统计、图表、最近活动)
180-
# - 布局偏好
181-
# - 数据刷新间隔
193+
# 步骤 1:头脑风暴功能(通过 CCW 编排器)
194+
/ccw "头脑风暴: 用户仪表板功能设计"
195+
# 或直接调用 Skill:
196+
# Skill(skill="brainstorm")
182197

183-
# 步骤 2:规划实现
184-
ccw workflow-plan "Build user dashboard with configurable widgets"
185-
# 输出:IMPL-001.json 包含任务分解
198+
# 步骤 2:规划实现(通过 CCW 编排器)
199+
/ccw "Plan: Build user dashboard with configurable widgets"
200+
# 或直接调用 Skill:
201+
# Skill(skill="workflow-plan", args="Build user dashboard")
186202

187203
# 步骤 3:团队执行
188-
ccw team lifecycle
189-
# 或使用快速迭代
190-
ccw workflow-lite-planex && ccw workflow-execute
204+
Skill(skill="team-lifecycle-v4", args="Build user dashboard")
205+
# 或使用快速迭代:
206+
# Skill(skill="workflow-lite-planex")
191207

192208
# 步骤 4:审查和优化
193-
ccw review-code
209+
Skill(skill="review-code")
194210
# 修复发现的问题
195211
```
196212

@@ -215,12 +231,13 @@ ccw workflow-execute --task "Fix N+1 query in user endpoint"
215231
**场景**:从 JavaScript 迁移到 TypeScript
216232

217233
```bash
218-
# 步骤 1:分析代码库
219-
ccw workflow:refactor-cycle
220-
# 识别技术债务并创建迁移计划
234+
# 步骤 1:分析代码库(通过 CCW 编排器)
235+
/ccw "refactor: JavaScript to TypeScript 迁移"
236+
# 或直接调用 Skill:
237+
# Skill(skill="workflow:refactor-cycle")
221238

222239
# 步骤 2:分阶段执行迁移
223-
ccw team roadmap-dev --epic "ts-migration"
240+
Skill(skill="team-roadmap-dev", args="--epic ts-migration")
224241
# 渐进式迁移模块并测试
225242
```
226243

0 commit comments

Comments
 (0)