e4981aa2f6
AGENTS.md stopped being the store of record for build steps, Python env, hardware pins, doc conventions, log cost and task ownership. Those facts already live in docs, skills and role files; the entry file now only points at them. This commit moves every reference that used to name the entry file to the authoritative landing point, so a reader who follows a link arrives at the fact instead of at a sentence that no longer exists. What changed is links and prose, not behaviour. Code, scripts and tests only have comment and docstring lines touched; the only non-comment edit in the whole changeset is one note string inside the generated pin table JSON, and its generator was changed in the same step so the two stay byte-identical. New landing points created before the references were retargeted: - The console single-writer log design doc, section 7.1, is now the single authority for log cost: about 90 B flash and 216 B stack per DBG_ line, and the rule that deep call chains must predefine DBG_LINE_BUF_MAX. It also carries the full list of the twelve translation units that have tightened it, plus the grep command that decides the truth if the list and the code ever disagree. - The document writing standard, section 2, now holds the BOM list. - keil-build skill gains an exit code table: 0 success, 1 build failure, 2 BuildEnvError, 3 usage, 4 build lock held. This corrects a belief that was never actually written down anywhere: exit 2 does not simply mean environment error, argparse also exits 2 and the wrapper script was remapped so the two no longer collide. Regenerated and checked byte for byte: - The end-to-end architecture SVG in docs/images from its generator. - tools/netlist_semantics/pinout_kb.json from gen_kb.py. Both are idempotent; running the generators again produces no diff. Deliberately not touched, because machines read them: - scripts/check_bom_drift.py joins every line containing BOM and asserts four paths are present, so the entry file BOM line must stay one line. - scripts/gen_task_table.py reads the TASK_TABLE anchors directly. - scripts/rename_maps and scripts/archive keep their historical wording; they describe what happened, not what is true now. Verified: doc links report the same six pre-existing findings as the base commit and no new ones, generated-fresh passes, bom drift is clean across 101 files, and AGENTS.md itself is unchanged in this commit.
29 lines
865 B
Markdown
29 lines
865 B
Markdown
# tools/menu_gen/ — 菜单代码生成
|
||
|
||
> 从**菜单树定义**生成 UI 菜单的 C 代码,保证菜单结构与页面注册一致、避免手写遗漏。
|
||
|
||
## 脚本一览
|
||
|
||
| 脚本 | 作用 |
|
||
|---|---|
|
||
| `gen_menu.py` | 读取菜单树定义(见 `ui_menu_tree.txt`)→ 生成菜单代码 |
|
||
|
||
## 使用方式
|
||
|
||
```bash
|
||
& '.venv\Scripts\python.exe' tools/menu_gen/gen_menu.py
|
||
```
|
||
|
||
菜单树输入的权威副本:仓库根 `ui_menu_tree.txt`。
|
||
|
||
## ⚠️ 注意
|
||
|
||
- 生成产物**勿手改**(会被下次生成覆盖);要改菜单结构改**定义源**后重跑
|
||
- 中文字符串字面量须为**纯 ASCII 安全**(见 `docs/文档规范.md` §2 编码铁律)——生成后的文案
|
||
如需汉字,须配套重跑字体生成(`tools/font_gen/`)
|
||
|
||
## 相关文档
|
||
|
||
- `docs/UI设计/菜单页面设计.md`
|
||
- `docs/UI设计/内容页架构.md`
|