workflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWorkflow 流水线编排
Workflow Pipeline Orchestration
适用场景
Applicable Scenarios
- 需要一键完成编译、烧录、串口监控的完整开发流程。
- 需要编译后自动烧录并启动 GDB 调试。
- 需要在不同构建系统(Keil/CMake/PlatformIO)间使用统一的流水线接口。
- Need to complete the full development process of compilation, flashing, and serial port monitoring with one click.
- Need to automatically flash and start GDB debugging after compilation.
- Need to use a unified pipeline interface across different build systems (Keil/CMake/PlatformIO).
必要输入
Required Inputs
- 构建系统类型(keil、cmake、platformio)。
- 工程路径。
- 可选:构建目标、串口、波特率、烧录参数。
- Build system type (keil, cmake, platformio).
- Project path.
- Optional: Build target, serial port, baud rate, flashing parameters.
依赖
Dependencies
- 对应构建系统的 skill 脚本已存在(build-keil、flash-keil 等)。
- 各 skill 的外部依赖已安装(Keil UV4、CMake、PlatformIO CLI 等)。
- The skill scripts for the corresponding build system already exist (build-keil, flash-keil, etc.).
- External dependencies for each skill are installed (Keil UV4, CMake, PlatformIO CLI, etc.).
执行步骤
Execution Steps
- 先阅读 references/usage.md,确认参数。
- 探测环境:
bash
python scripts/workflow_runner.py --detect - 查看可用流水线:
bash
python scripts/workflow_runner.py --list - 执行流水线:
bash
python scripts/workflow_runner.py --run build-flash-monitor --build-system platformio --project /path/to/project
- First read references/usage.md to confirm parameters.
- Detect environment:
bash
python scripts/workflow_runner.py --detect - View available pipelines:
bash
python scripts/workflow_runner.py --list - Execute pipeline:
bash
python scripts/workflow_runner.py --run build-flash-monitor --build-system platformio --project /path/to/project
失败分流
Failure Diversion
- :对应 skill 脚本不存在。
environment-missing - :某个步骤执行失败(编译错误、烧录失败等)。
target-response-abnormal
- : The corresponding skill script does not exist.
environment-missing - : A step execution failed (compilation error, flashing failure, etc.).
target-response-abnormal
输出约定
Output Convention
示例输出格式:
🚀 执行流水线: build-flash-monitor(编译 → 烧录 → 串口监控)
构建系统: platformio
==================================================
[1/3] 编译
==================================================
$ python .../platformio_builder.py --project-dir /path
==================================================
[2/3] 烧录
==================================================
$ python .../pio_flasher.py --flash --project-dir /path
==================================================
[3/3] 串口监控
==================================================
$ python .../serial_monitor.py --listen --port COM42
📊 结果: ✅ 流水线完成(3 步)Example output format:
🚀 Executing pipeline: build-flash-monitor (Compilation → Flashing → Serial Port Monitoring)
Build system: platformio
==================================================
[1/3] Compilation
==================================================
$ python .../platformio_builder.py --project-dir /path
==================================================
[2/3] Flashing
==================================================
$ python .../pio_flasher.py --flash --project-dir /path
==================================================
[3/3] Serial Port Monitoring
==================================================
$ python .../serial_monitor.py --listen --port COM42
📊 Result: ✅ Pipeline completed (3 steps)交接关系
Handover Relationships
- 编排 /
build-keil/build-cmake的编译步骤。build-platformio - 编排 /
flash-keil/flash-openocd的烧录步骤。flash-platformio - 编排 的监控步骤。
serial-monitor - 编排 /
debug-gdb-openocd的调试步骤。debug-platformio
- Orchestrates the compilation steps of /
build-keil/build-cmake.build-platformio - Orchestrates the flashing steps of /
flash-keil/flash-openocd.flash-platformio - Orchestrates the monitoring steps of .
serial-monitor - Orchestrates the debugging steps of /
debug-gdb-openocd.debug-platformio