iter(g134): 新增 ua sync-counts 自动同步组件计数

This commit is contained in:
HIsheR
2026-10-26 15:25:52 +08:00
parent 6701c226fb
commit 2a9193ce19
4 changed files with 51 additions and 12 deletions
+2 -2
View File
@@ -76,8 +76,8 @@
| 5 | `packages/skin/ui/ua.manifest.json` → `api.exports` | 一行 `xxx(props):一句话说明` |
| 6 | 同上 → `docs.components` | `{ id, title, demo, props[], example, steps[] }`:props 里每个字段名必须在实现源码里真实出现,且 `<组件>Props` 的字段一个都不能漏(verify 双向校验) |
| 7 | `apps/demo/main.ts` | 新增 `section('<demo 锚点>', ...)` 并**真实调用**该组件(verify 会查) |
| 8 | `README.md` | `<!-- ua:components -->` 区块补 id、「分组:」行补归组、标题「共 N 个」与包说明里的数字 |
| 9 | `AGENTS.md` / `ARCHITECTURE.md` | 两处的「N 个组件」计数同步 |
| 8 | `README.md` | `<!-- ua:components -->` 区块补 id、「分组:」行补归组(数字交给下一步自动同步) |
| 9 | `npm run sync-counts` | 自动把三份文档里的「N 个组件 / 共 N 个」改成清单实际数量(幂等;漏改时 verify 报行号) |
| 10 | `npm run docs` | 重新生成 `llms-full.txt` 与 `apps/docs/index.html`(不跑 verify 会报 llms-full 漂移) |
改**既有**组件的入参同样要走 5、6、10 三步;只加一个可选参数也要补文档行,否则双向校验失败。