Files
cnc_wams/work/working6/02-项目程序开发详细步骤.md

88 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 02-项目程序开发详细步骤
## 步骤 1建立工作控制文件
- 创建 README、功能内容、开发步骤、推进台账、任务矩阵、验收证据、决策记录。
- 将 working5 后续深化方向拆分为文件/宏页面、tool editor 页面、native GTK 未实现页面诊断边界三条主线。
## 步骤 2读取基准与现有实现
- 读取 `work/working5` 的任务矩阵、决策记录和验收证据,确认不可回退的既有行为。
- 读取 `work/working3/gmoccapy_XYZAB_execution_analysis.md`
- 读取 LinuxCNC gmoccapy 源码和 Glade 文件:
- `linuxcnc/src/emc/usr_intf/gmoccapy/gmoccapy.py`
- `linuxcnc/src/emc/usr_intf/gmoccapy/gmoccapy.glade`
- `linuxcnc/src/emc/usr_intf/gmoccapy/dialogs.py`
- 读取 Web 项目 profile、runtime、state、UI shell 和 tests。
## 步骤 3建立页面/按钮/状态映射
- 梳理 native gmoccapy notebook 页面和 Web gmoccapy shell 当前页面。
- 建立文件页面映射:
- native file chooser、program preview、recent files、program run action。
- Web program source、preview、load/run/reset 状态。
- 建立宏页面映射:
- INI macro 配置、宏按钮、MDI command、执行 gate。
- XYZAB 未配置宏时的诊断边界。
- 建立 tool editor 映射:
- tool table、active/prepared tool、offset、M6/M61 状态。
- 只读诊断与可编辑字段边界。
- 建立未实现 native 页面清单:
- setup/user tabs/tool/touch 等按钮和页面。
- hard-button pin 与诊断-only action 的映射。
## 步骤 4执行现有测试
-`app` 下运行 `npm run smoke:node`
- 运行构建:`npm run build`
- 运行浏览器冒烟:`npm run smoke`
- 如测试失败,先判断是环境问题、既有改动问题还是本轮新增行为问题。
## 步骤 5补充模型和状态
- 在 profile 或 runtime model 中补充 gmoccapy 页面级 schema
- file page capability。
- macro page capability。
- tool editor capability。
- native GTK page implementation matrix。
- 在 store 中补充必要 action 或诊断状态:
- 文件页面的 load/recent/preview gate。
- 宏执行的 MDI gate 或未配置提示。
- tool editor 的只读诊断状态。
- native 未实现页面的 operator message。
- 保持 action 命名和 existing gate 风格一致,避免绕过 LinuxCNC task policy。
## 步骤 6补充 UI 诊断
- 在 gmoccapy shell 中增加可测试的诊断行或页面区块。
- 所有新增诊断必须带稳定 `data-*` 属性。
- 未实现页面必须显示“诊断-only/未实现/配置未启用”的明确状态。
- 文件/宏/tool editor 控件不得在不满足 gate 时显示为可执行。
## 步骤 7补充测试
- Node 测试:
- profile 页面 schema 测试。
- communication model 页面路径测试。
- store gate 和 operator message 测试。
- Browser 测试:
- DOM 诊断行存在。
- `data-*` 内容包含关键边界词。
- 公开 dispatch 或按钮点击能触发预期状态和 gate。
- 如改动 UI运行 `npm run build && npm run smoke`
## 步骤 8回归验收
- 运行本轮相关最小测试。
- 运行完整 `npm run smoke:node`
- 运行 `npm run build`
- 运行 `npm run smoke`
- 运行 `git diff --check -- web-rtcp-5axis-sim-plan work/working6`
## 步骤 9更新台账和证据
- 更新 `03-推进台账.md`
- 更新 `04-任务矩阵.md` 中任务状态。
- 更新 `05-验收证据.md` 中命令、页面、截图、报告或输出摘要。
- 如涉及架构、对标边界或兼容性取舍,更新 `06-决策记录.md`