ccg-ros2-workflow 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -6
- package/package.json +1 -1
- package/src/commands/ccg/backend.md +2 -0
- package/src/commands/ccg/feat.md +4 -4
- package/src/commands/ccg/frontend.md +2 -0
- package/src/commands/ccg/workflow.md +22 -2
- package/src/commands/ccg/worktree.md +8 -8
- package/src/prompts/claude/analyzer.md +5 -5
- package/src/prompts/claude/architect.md +2 -2
- package/src/prompts/claude/optimizer.md +2 -2
- package/src/prompts/claude/reviewer.md +5 -5
- package/src/prompts/claude/tester.md +1 -1
- package/src/prompts/codex/analyzer.md +5 -5
- package/src/prompts/codex/architect.md +13 -3
- package/src/prompts/codex/optimizer.md +2 -2
- package/src/prompts/codex/reviewer.md +5 -5
- package/src/prompts/codex/tester.md +1 -1
- package/src/prompts/gemini/analyzer.md +5 -5
- package/src/prompts/gemini/architect.md +4 -2
- package/src/prompts/gemini/frontend.md +2 -2
- package/src/prompts/gemini/optimizer.md +2 -2
- package/src/prompts/gemini/reviewer.md +5 -5
- package/src/prompts/gemini/tester.md +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
# CCG-ROS2-Workflow
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/ccg-ros2-workflow)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
3
6
|
ROS2 多模型协作开发工具 - 基于 Claude Code CLI
|
|
4
7
|
|
|
8
|
+
> **v1.0.8** - 根据 Codex+Gemini 双模型分析优化工作流
|
|
9
|
+
|
|
5
10
|
## 特性
|
|
6
11
|
|
|
7
12
|
- **多模型协作**: Codex (底层控制) + Gemini (上层集成) + Claude (编排)
|
|
@@ -31,15 +36,26 @@ ccg-ros2-workflow
|
|
|
31
36
|
|
|
32
37
|
## 前置依赖
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
**必须安装**:
|
|
40
|
+
|
|
41
|
+
- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) - 核心运行环境
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Claude Code CLI (必须)
|
|
45
|
+
npm install -g @anthropic-ai/claude-code
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**可选安装**(启用多模型协作):
|
|
35
49
|
|
|
36
|
-
- [
|
|
37
|
-
- [
|
|
38
|
-
- [
|
|
39
|
-
- [ace-tool](https://augmentcode.com/) (推荐,提供代码上下文)
|
|
50
|
+
- [Codex CLI](https://github.com/openai/codex) - 底层控制专家
|
|
51
|
+
- [Gemini CLI](https://github.com/google/gemini-cli) - 上层集成专家
|
|
52
|
+
- [ace-tool](https://augmentcode.com/) - 代码上下文引擎(推荐)
|
|
40
53
|
|
|
41
54
|
```bash
|
|
42
|
-
#
|
|
55
|
+
# Codex CLI (可选)
|
|
56
|
+
npm install -g @openai/codex
|
|
57
|
+
|
|
58
|
+
# Gemini CLI (可选)
|
|
43
59
|
npm install -g @google/gemini-cli
|
|
44
60
|
```
|
|
45
61
|
|
|
@@ -203,3 +219,24 @@ npx ccg-ros2-workflow
|
|
|
203
219
|
## License
|
|
204
220
|
|
|
205
221
|
MIT
|
|
222
|
+
|
|
223
|
+
## 更新日志
|
|
224
|
+
|
|
225
|
+
### v1.0.8
|
|
226
|
+
- 基于 Codex+Gemini 双模型交叉验证分析优化
|
|
227
|
+
- `gemini/architect.md`: 增加 QoS 策略设计 + Node Composition
|
|
228
|
+
- `codex/architect.md`: 增加 RT Checklist (executor/ros2_control/E-stop)
|
|
229
|
+
- `workflow.md`: 新增 Stage 7 硬件验证 gate
|
|
230
|
+
- 术语规范化:`ui-ux-designer` → `system-integrator`
|
|
231
|
+
|
|
232
|
+
### v1.0.7
|
|
233
|
+
- 完成所有 17 个命令文件的 ROS2 术语适配
|
|
234
|
+
- 术语映射:前端/后端 → 上层应用/底层控制
|
|
235
|
+
- 任务路由:Launch/Python → Gemini,C++/控制 → Codex
|
|
236
|
+
|
|
237
|
+
### v1.0.6
|
|
238
|
+
- 更新 README 文档,添加完整命令列表
|
|
239
|
+
- 修复 "仿真" → "集成" 术语
|
|
240
|
+
|
|
241
|
+
### v1.0.5
|
|
242
|
+
- 初始 ROS2 Humble 物理机器人版本
|
package/package.json
CHANGED
package/src/commands/ccg/feat.md
CHANGED
|
@@ -104,15 +104,15 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
|
|
|
104
104
|
|
|
105
105
|
| 任务类型 | 判断依据 | 调用流程 |
|
|
106
106
|
|----------|----------|----------|
|
|
107
|
-
| **上层应用** | Launch、RViz、参数、配置、Python 节点 |
|
|
107
|
+
| **上层应用** | Launch、RViz、参数、配置、Python 节点 | system-integrator → planner |
|
|
108
108
|
| **底层控制** | 控制算法、C++ 节点、硬件驱动、实时性能 | planner |
|
|
109
|
-
| **系统集成** | 同时包含上层应用与底层控制 |
|
|
109
|
+
| **系统集成** | 同时包含上层应用与底层控制 | system-integrator → planner |
|
|
110
110
|
|
|
111
111
|
#### 2.3 调用 Agents
|
|
112
112
|
|
|
113
|
-
**上层应用/系统集成任务**:先调用 `
|
|
113
|
+
**上层应用/系统集成任务**:先调用 `system-integrator` agent
|
|
114
114
|
```
|
|
115
|
-
执行 agent: $HOME/.claude/agents/ccg/
|
|
115
|
+
执行 agent: $HOME/.claude/agents/ccg/system-integrator.md
|
|
116
116
|
输入: 项目上下文 + 用户需求 + 技术栈
|
|
117
117
|
输出: 系统集成设计方案
|
|
118
118
|
```
|
|
@@ -15,7 +15,7 @@ Execute a structured ROS2 development workflow for physical robots using quality
|
|
|
15
15
|
## Context
|
|
16
16
|
|
|
17
17
|
- Task to develop: $ARGUMENTS
|
|
18
|
-
- Structured
|
|
18
|
+
- Structured 7-stage workflow with quality gates
|
|
19
19
|
- Multi-model collaboration: Codex (Low-level Control) + Gemini (System Integration) + Claude (Orchestration)
|
|
20
20
|
- MCP service integration (ace-tool) for enhanced functionality
|
|
21
21
|
- Target: Physical robot development (no simulation)
|
|
@@ -95,7 +95,7 @@ If still not complete after 10 minutes, continue polling with `TaskOutput`, **ne
|
|
|
95
95
|
## Communication Protocols
|
|
96
96
|
|
|
97
97
|
1. Responses start with a mode tag `[Mode: X]`, initially `[Mode: Research]`.
|
|
98
|
-
2. Core workflow strictly follows the sequence `Research -> Ideation -> Plan -> Execute -> Optimize -> Review`.
|
|
98
|
+
2. Core workflow strictly follows the sequence `Research -> Ideation -> Plan -> Execute -> Optimize -> Review -> Hardware`.
|
|
99
99
|
3. Must request user confirmation after completing each stage.
|
|
100
100
|
4. Force stop if score is below 7 or user does not approve.
|
|
101
101
|
5. When needing to ask the user, prefer using the `AskUserQuestion` tool for interaction.
|
|
@@ -176,6 +176,26 @@ Use `TaskOutput` to wait for results. Integrate review feedback, execute optimiz
|
|
|
176
176
|
- Report issues and suggestions
|
|
177
177
|
- Request final user confirmation
|
|
178
178
|
|
|
179
|
+
### 🔧 Stage 7: Hardware Validation (Physical Robot Gate)
|
|
180
|
+
|
|
181
|
+
`[Mode: Hardware]` - Physical robot verification:
|
|
182
|
+
|
|
183
|
+
**Pre-deployment Checklist**:
|
|
184
|
+
- [ ] Driver detection: verify hardware interfaces are detected (`ros2 control list_hardware_interfaces`)
|
|
185
|
+
- [ ] Calibration: confirm sensor/actuator calibration data loaded
|
|
186
|
+
- [ ] E-stop: test emergency stop functionality
|
|
187
|
+
- [ ] Safety limits: verify joint limits, velocity limits, torque limits
|
|
188
|
+
|
|
189
|
+
**Runtime Validation**:
|
|
190
|
+
- [ ] Control frequency: measure actual loop rate vs target (e.g., 1kHz)
|
|
191
|
+
- [ ] CPU usage: monitor real-time thread CPU load
|
|
192
|
+
- [ ] Latency: measure end-to-end control latency
|
|
193
|
+
- [ ] QoS health: check topic reliability and deadline violations
|
|
194
|
+
|
|
195
|
+
**Documentation**:
|
|
196
|
+
- Record measured metrics in `.claude/validation/hardware_report.md`
|
|
197
|
+
- Flag any metrics outside acceptable range
|
|
198
|
+
|
|
179
199
|
---
|
|
180
200
|
|
|
181
201
|
## Key Rules
|
|
@@ -45,7 +45,7 @@ parent-directory/
|
|
|
45
45
|
│ └── src/
|
|
46
46
|
└── .ccg/ # worktree 管理目录
|
|
47
47
|
└── your-project/
|
|
48
|
-
├── feature-
|
|
48
|
+
├── feature-nav/ # 功能分支
|
|
49
49
|
├── hotfix/ # 修复分支
|
|
50
50
|
└── debug/ # 调试 worktree
|
|
51
51
|
```
|
|
@@ -80,30 +80,30 @@ parent-directory/
|
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
82
|
# 基本创建
|
|
83
|
-
/worktree add feature-
|
|
83
|
+
/worktree add feature-nav
|
|
84
84
|
|
|
85
85
|
# 创建并用 IDE 打开
|
|
86
|
-
/worktree add feature-
|
|
86
|
+
/worktree add feature-nav -o
|
|
87
87
|
|
|
88
88
|
# 创建指定分支
|
|
89
|
-
/worktree add hotfix -b fix/
|
|
89
|
+
/worktree add hotfix -b fix/controller -o
|
|
90
90
|
|
|
91
91
|
# 迁移未提交内容
|
|
92
|
-
/worktree migrate feature-
|
|
92
|
+
/worktree migrate feature-nav --from main
|
|
93
93
|
|
|
94
94
|
# 迁移 stash 内容
|
|
95
|
-
/worktree migrate feature-
|
|
95
|
+
/worktree migrate feature-nav --stash
|
|
96
96
|
|
|
97
97
|
# 管理操作
|
|
98
98
|
/worktree list
|
|
99
|
-
/worktree remove feature-
|
|
99
|
+
/worktree remove feature-nav
|
|
100
100
|
/worktree prune
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
## 输出示例
|
|
104
104
|
|
|
105
105
|
```
|
|
106
|
-
✅ Worktree created at ../.ccg/项目名/feature-
|
|
106
|
+
✅ Worktree created at ../.ccg/项目名/feature-nav
|
|
107
107
|
✅ 已复制 .env
|
|
108
108
|
✅ 已复制 .env.local
|
|
109
109
|
📋 已从 .gitignore 复制 2 个环境文件
|
|
@@ -17,9 +17,9 @@ You are the ROS2 system analyst and orchestrator. You synthesize Codex (low-leve
|
|
|
17
17
|
## Output
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
##
|
|
21
|
-
###
|
|
22
|
-
###
|
|
23
|
-
###
|
|
24
|
-
###
|
|
20
|
+
## Analysis Report
|
|
21
|
+
### Comprehensive Assessment
|
|
22
|
+
### Solution Comparison
|
|
23
|
+
### Recommendations
|
|
24
|
+
### Next Steps
|
|
25
25
|
```
|
|
@@ -17,10 +17,10 @@ You are the ROS2 code reviewer and orchestrator. You integrate Codex and Gemini
|
|
|
17
17
|
## Output
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
##
|
|
21
|
-
|
|
20
|
+
## Comprehensive Review Report
|
|
21
|
+
Score: XX/100
|
|
22
22
|
|
|
23
|
-
###
|
|
24
|
-
###
|
|
25
|
-
###
|
|
23
|
+
### Critical Issues
|
|
24
|
+
### Improvement Suggestions
|
|
25
|
+
### Final Assessment
|
|
26
26
|
```
|
|
@@ -24,9 +24,9 @@ You are a ROS2 low-level system analyst. Your domain is **control, real-time, ha
|
|
|
24
24
|
## Output
|
|
25
25
|
|
|
26
26
|
```
|
|
27
|
-
##
|
|
28
|
-
###
|
|
29
|
-
###
|
|
30
|
-
###
|
|
31
|
-
###
|
|
27
|
+
## Analysis Report
|
|
28
|
+
### System Overview
|
|
29
|
+
### Key Issues
|
|
30
|
+
### Risk Assessment
|
|
31
|
+
### Recommendations
|
|
32
32
|
```
|
|
@@ -17,16 +17,26 @@ You are a ROS2 low-level architect. Your domain is **control system design, C++
|
|
|
17
17
|
## Principles
|
|
18
18
|
|
|
19
19
|
1. Real-time first: control loops must meet timing constraints
|
|
20
|
-
2. Safety: fault tolerance, emergency stop handling
|
|
20
|
+
2. Safety: fault tolerance, emergency stop handling, watchdog
|
|
21
21
|
3. Query project context via MCP before design
|
|
22
22
|
4. Minimal, focused changes
|
|
23
23
|
|
|
24
|
+
## RT Checklist
|
|
25
|
+
|
|
26
|
+
- [ ] Use RT executor with appropriate thread priority
|
|
27
|
+
- [ ] Pre-allocate memory, avoid dynamic allocation in control loop
|
|
28
|
+
- [ ] Lock-free data structures for inter-thread communication
|
|
29
|
+
- [ ] DDS QoS: deadline, liveliness, history depth
|
|
30
|
+
- [ ] ros2_control hardware_interface for actuators/sensors
|
|
31
|
+
- [ ] E-stop and safety limits validation
|
|
32
|
+
- [ ] Time units explicit (seconds/nanoseconds)
|
|
33
|
+
|
|
24
34
|
## Output
|
|
25
35
|
|
|
26
36
|
```diff
|
|
27
37
|
--- a/src/controller.cpp
|
|
28
38
|
+++ b/src/controller.cpp
|
|
29
39
|
@@ -10,6 +10,7 @@
|
|
30
|
-
//
|
|
31
|
-
+ //
|
|
40
|
+
// existing code
|
|
41
|
+
+ // new code (comments in Chinese)
|
|
32
42
|
```
|
|
@@ -23,10 +23,10 @@ You are a ROS2 low-level code reviewer. Your domain is **real-time safety, memor
|
|
|
23
23
|
## Output
|
|
24
24
|
|
|
25
25
|
```
|
|
26
|
-
##
|
|
27
|
-
|
|
26
|
+
## Review Report
|
|
27
|
+
Score: XX/100
|
|
28
28
|
|
|
29
|
-
###
|
|
30
|
-
###
|
|
31
|
-
###
|
|
29
|
+
### Critical Issues (Must Fix)
|
|
30
|
+
### Improvement Suggestions
|
|
31
|
+
### Strengths
|
|
32
32
|
```
|
|
@@ -24,9 +24,9 @@ You are a ROS2 high-level system analyst. Your domain is **system integration, c
|
|
|
24
24
|
## Output
|
|
25
25
|
|
|
26
26
|
```
|
|
27
|
-
##
|
|
28
|
-
###
|
|
29
|
-
###
|
|
30
|
-
###
|
|
31
|
-
###
|
|
27
|
+
## Analysis Report
|
|
28
|
+
### System Architecture
|
|
29
|
+
### Integration Issues
|
|
30
|
+
### Configuration Recommendations
|
|
31
|
+
### Deployment Readiness
|
|
32
32
|
```
|
|
@@ -20,6 +20,8 @@ You are a ROS2 high-level architect. Your domain is **system integration, launch
|
|
|
20
20
|
2. Configuration-driven, no hardcoding
|
|
21
21
|
3. Query project context via MCP before design
|
|
22
22
|
4. Minimal, focused changes
|
|
23
|
+
5. Define explicit QoS policies (Reliability, Durability, History) for critical topics
|
|
24
|
+
6. Consider Node Composition for zero-copy intra-process communication
|
|
23
25
|
|
|
24
26
|
## Output
|
|
25
27
|
|
|
@@ -27,6 +29,6 @@ You are a ROS2 high-level architect. Your domain is **system integration, launch
|
|
|
27
29
|
--- a/launch/robot.launch.py
|
|
28
30
|
+++ b/launch/robot.launch.py
|
|
29
31
|
@@ -10,6 +10,7 @@
|
|
30
|
-
#
|
|
31
|
-
+ #
|
|
32
|
+
# existing code
|
|
33
|
+
+ # new code (comments in Chinese)
|
|
32
34
|
```
|
|
@@ -20,6 +20,6 @@ You are a ROS2 high-level optimizer. Your domain is **system optimization, confi
|
|
|
20
20
|
--- a/launch/robot.launch.py
|
|
21
21
|
+++ b/launch/robot.launch.py
|
|
22
22
|
@@ -10,6 +10,7 @@
|
|
23
|
-
#
|
|
24
|
-
+ #
|
|
23
|
+
# before optimization
|
|
24
|
+
+ # after optimization (comments in Chinese)
|
|
25
25
|
```
|
|
@@ -23,10 +23,10 @@ You are a ROS2 high-level code reviewer. Your domain is **configuration integrit
|
|
|
23
23
|
## Output
|
|
24
24
|
|
|
25
25
|
```
|
|
26
|
-
##
|
|
27
|
-
|
|
26
|
+
## Review Report
|
|
27
|
+
Score: XX/100
|
|
28
28
|
|
|
29
|
-
###
|
|
30
|
-
###
|
|
31
|
-
###
|
|
29
|
+
### Critical Issues (Must Fix)
|
|
30
|
+
### Improvement Suggestions
|
|
31
|
+
### Strengths
|
|
32
32
|
```
|