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 CHANGED
@@ -1,7 +1,12 @@
1
1
  # CCG-ROS2-Workflow
2
2
 
3
+ [![npm version](https://badge.fury.io/js/ccg-ros2-workflow.svg)](https://www.npmjs.com/package/ccg-ros2-workflow)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](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
- - [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code)
37
- - [Codex CLI](https://github.com/openai/codex) (可选)
38
- - [Gemini CLI](https://github.com/google/gemini-cli) (可选)
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
- # Gemini CLI
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccg-ros2-workflow",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "ROS2 Multi-model Collaborative Development Workflow - Codex (Low-level) + Gemini (High-level) + Claude (Orchestration)",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {
@@ -4,6 +4,8 @@ description: '底层控制专项工作流(研究→构思→计划→执行→
4
4
 
5
5
  # Backend - 底层控制专项开发
6
6
 
7
+ > **命名说明**:此处 "Backend" 指 ROS2 底层控制(C++ 节点、控制算法、硬件驱动),非 Web 后端
8
+
7
9
  ## 使用方法
8
10
 
9
11
  ```bash
@@ -104,15 +104,15 @@ TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
104
104
 
105
105
  | 任务类型 | 判断依据 | 调用流程 |
106
106
  |----------|----------|----------|
107
- | **上层应用** | Launch、RViz、参数、配置、Python 节点 | ui-ux-designer → planner |
107
+ | **上层应用** | Launch、RViz、参数、配置、Python 节点 | system-integrator → planner |
108
108
  | **底层控制** | 控制算法、C++ 节点、硬件驱动、实时性能 | planner |
109
- | **系统集成** | 同时包含上层应用与底层控制 | ui-ux-designer → planner |
109
+ | **系统集成** | 同时包含上层应用与底层控制 | system-integrator → planner |
110
110
 
111
111
  #### 2.3 调用 Agents
112
112
 
113
- **上层应用/系统集成任务**:先调用 `ui-ux-designer` agent
113
+ **上层应用/系统集成任务**:先调用 `system-integrator` agent
114
114
  ```
115
- 执行 agent: $HOME/.claude/agents/ccg/ui-ux-designer.md
115
+ 执行 agent: $HOME/.claude/agents/ccg/system-integrator.md
116
116
  输入: 项目上下文 + 用户需求 + 技术栈
117
117
  输出: 系统集成设计方案
118
118
  ```
@@ -4,6 +4,8 @@ description: '上层应用专项工作流(研究→构思→计划→执行→
4
4
 
5
5
  # Frontend - 上层应用专项开发
6
6
 
7
+ > **命名说明**:此处 "Frontend" 指 ROS2 上层应用(Python 节点、Launch、配置),非 Web 前端
8
+
7
9
  ## 使用方法
8
10
 
9
11
  ```bash
@@ -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 6-stage workflow with quality gates
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-ui/ # 功能分支
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-ui
83
+ /worktree add feature-nav
84
84
 
85
85
  # 创建并用 IDE 打开
86
- /worktree add feature-ui -o
86
+ /worktree add feature-nav -o
87
87
 
88
88
  # 创建指定分支
89
- /worktree add hotfix -b fix/login -o
89
+ /worktree add hotfix -b fix/controller -o
90
90
 
91
91
  # 迁移未提交内容
92
- /worktree migrate feature-ui --from main
92
+ /worktree migrate feature-nav --from main
93
93
 
94
94
  # 迁移 stash 内容
95
- /worktree migrate feature-ui --stash
95
+ /worktree migrate feature-nav --stash
96
96
 
97
97
  # 管理操作
98
98
  /worktree list
99
- /worktree remove feature-ui
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-ui
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
  ```
@@ -20,6 +20,6 @@ You are the ROS2 system architect and orchestrator. You bridge Codex (low-level)
20
20
  --- a/src/file
21
21
  +++ b/src/file
22
22
  @@ -10,6 +10,7 @@
23
- // 现有代码
24
- + // 新增代码(中文注释)
23
+ // existing code
24
+ + // new code (comments in Chinese)
25
25
  ```
@@ -20,6 +20,6 @@ You are the ROS2 optimizer and orchestrator. You coordinate Codex and Gemini opt
20
20
  --- a/src/file
21
21
  +++ b/src/file
22
22
  @@ -10,6 +10,7 @@
23
- // 优化前
24
- + // 优化后(中文注释)
23
+ // before optimization
24
+ + // after optimization (comments in Chinese)
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
- 总分: XX/100
20
+ ## Comprehensive Review Report
21
+ Score: XX/100
22
22
 
23
- ### 关键问题
24
- ### 改进建议
25
- ### 最终评估
23
+ ### Critical Issues
24
+ ### Improvement Suggestions
25
+ ### Final Assessment
26
26
  ```
@@ -20,5 +20,5 @@ You are the ROS2 test engineer and orchestrator. You coordinate testing across l
20
20
  --- a/test/test_system.cpp
21
21
  +++ b/test/test_system.cpp
22
22
  @@ -10,6 +10,7 @@
23
- +// 系统测试(中文注释)
23
+ +// system test (comments in Chinese)
24
24
  ```
@@ -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
  ```
@@ -20,6 +20,6 @@ You are a ROS2 low-level optimizer. Your domain is **C++ performance, real-time
20
20
  --- a/src/node.cpp
21
21
  +++ b/src/node.cpp
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 low-level code reviewer. Your domain is **real-time safety, memor
23
23
  ## Output
24
24
 
25
25
  ```
26
- ## 审查报告
27
- 总分: XX/100
26
+ ## Review Report
27
+ Score: XX/100
28
28
 
29
- ### 关键问题(必须修复)
30
- ### 改进建议
31
- ### 优点
29
+ ### Critical Issues (Must Fix)
30
+ ### Improvement Suggestions
31
+ ### Strengths
32
32
  ```
@@ -20,5 +20,5 @@ You are a ROS2 low-level test generator. Your domain is **C++ unit tests, contro
20
20
  --- a/test/test_controller.cpp
21
21
  +++ b/test/test_controller.cpp
22
22
  @@ -10,6 +10,7 @@
23
- +// 新测试用例(中文注释)
23
+ +// new test case (comments in Chinese)
24
24
  ```
@@ -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 developer. Your domain is **Python nodes, configuratio
20
20
  --- a/src/node.py
21
21
  +++ b/src/node.py
22
22
  @@ -10,6 +10,7 @@
23
- # 现有代码
24
- + # 新增代码(中文注释)
23
+ # existing code
24
+ + # new code (comments in Chinese)
25
25
  ```
@@ -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
- 总分: XX/100
26
+ ## Review Report
27
+ Score: XX/100
28
28
 
29
- ### 关键问题(必须修复)
30
- ### 改进建议
31
- ### 优点
29
+ ### Critical Issues (Must Fix)
30
+ ### Improvement Suggestions
31
+ ### Strengths
32
32
  ```
@@ -20,5 +20,5 @@ You are a ROS2 high-level test generator. Your domain is **integration tests, la
20
20
  --- a/test/test_system.py
21
21
  +++ b/test/test_system.py
22
22
  @@ -10,6 +10,7 @@
23
- +# 新测试用例(中文注释)
23
+ +# new test case (comments in Chinese)
24
24
  ```