Developer Docs

维护与扩展说明

这页面向维护这个仓库的人,重点解释脚本职责、版本策略、OpenClaw 边界和 GitHub Pages 结构。

维护原则

核心脚本

  • host_tools/pi5_zero_touch_seed.sh: 空白卡 bootfs 种子入口
  • scripts/pi5_all_in_one.sh: 总控入口
  • scripts/pi_setup_max.sh: LeLamp runtime 与音频
  • scripts/openclaw_pi5_setup.sh: OpenClaw 安装
  • scripts/pi5_post_reboot_finalize.sh: 重启后收尾

运行时配置

所有环境变量通过 runtime_config.py 统一读取。

不要再把灯 ID、串口、LED 数量写死在主程序里。

OpenClaw 边界

OpenClaw 当前只应该调用 lelamp.remote_control 暴露的安全高层命令。

不要把 `setup_motors`、`calibrate` 直接开放给它。

Pages 结构

站点文件在 `site/`,部署工作流在 `.github/workflows/pages.yml`。

站点只做纯静态 HTML/CSS,不依赖框架。

自动检测策略

`lelamp_runtime/scripts/lelamp_doctor.sh` 是当前缺失项检测入口。它负责判断:

推荐验证命令

bash -n host_tools/pi5_zero_touch_seed.sh
bash -n lelamp_runtime/scripts/pi_setup_max.sh
bash -n lelamp_runtime/scripts/openclaw_pi5_setup.sh
bash -n lelamp_runtime/scripts/install_openclaw_skill.sh
bash -n lelamp_runtime/scripts/pi5_all_in_one.sh
bash -n lelamp_runtime/scripts/pi5_post_reboot_finalize.sh
python -m compileall \
  lelamp_runtime/lelamp/remote_control.py \
  lelamp_runtime/lelamp/runtime_config.py \
  lelamp_runtime/main.py \
  lelamp_runtime/smooth_animation.py

继续扩展时的顺序

  1. 先改脚本或配置
  2. 再更新 README
  3. 再更新 Pages
  4. 最后再更新中文说明文档