Repository navigation
Commit 97e63d9
docs(skills): a bundle navigation node may carry keywords without a label (#39357)
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg9nbS7sXTWidzP4DpWfN2PJ)_
Fixes #39209
Claim for this branch: comment 7381632637
Clause-②: no
Metadata-protocol: none
repo:objectstack@os-bill · os-bill · session_01Utp6Cbb4nipp9xHscbT4fu
## 维护者速读
- 用户能看到什么变化:文档和翻译技能现在写明,导航菜单项的翻译可以只给「搜索关键词」而不写标题;AI 帮人写翻译包时不会再硬塞一个占位标题。
- 为什么做:属于「导航项搜索关键词」这项功能的文档收尾,功能本身已上线,教学文字还停在旧说法。
- 出错会怎样:最坏是这三处说明写得不准,读者照旧多写一个标题;不影响任何运行中的应用,撤回本改动即可复原。
- 要你做什么:这是对外发布的技能包,需要你审阅后批准;其中技能文件的长度上限按你 11 月 27 日的话抬了 7 个 token。
## What changes
The contract has accepted a navigation translation node,
`apps.APP.navigation.ID`, with `keywords` and no `label` since the
change that made `label` optional beside `keywords`
(`packages/spec/src/system/translation.zod.ts`, `requiredOneOf(['label',
'keywords'])`). Three taught surfaces still said `label` only. Each now
states the rule once.
- `content/docs/ui/apps.mdx`, the `keywords` paragraph: a bundle gives a
locale's keywords beside the entry's `label` or without one. A locale
that gives keywords and no `label` shows the label the next locale in
its fallback chain gives, else the source label, and `os i18n check`
still lists that label as untranslated.
- `content/docs/ui/translations.mdx`, the App navigation row of the key
table: the key is `label` / `keywords`, `keywords` is a list, a node
carries at least one of the two, and the same fallback sentence.
- `skills/objectstack-i18n/SKILL.md`, one line of the key map:
`navigation.{id}.label` becomes `navigation.{id}.{label,keywords[]} (at
least one)`. No bullet is added.
- `skills/objectstack-i18n/evals/bundles-locales-coverage.json`: case 19
asks for a keywords-only node.
- `scripts/check-skills-token-ratchet.mjs`: the
`skills/objectstack-i18n/SKILL.md` row, 2243 to 2250.
**The ratchet row.** The file sat at its ceiling with headroom 0, and
the one-line edit measures 7 tokens (8999 bytes to 9027; 8972 priced to
9000). The entry is a router and nothing in it restates that line, so no
deletion is shown. The row moves to the measurement and no further,
under the maintainer's standing words of 2026-11-27 05:20Z,
「后续遇到这种问题,能适当放宽token 的限制」, as the note of record applies them (comment
7216253348 on the ratchet card: a PR's own legitimate change to that
skill, at most 10 tokens over). The zone agreed before the commit.
**Published skills size, before and after.**
| | before | after |
|:-|:-|:-|
| `skills/objectstack-i18n/SKILL.md`, lines | 163 | 163 |
| `skills/objectstack-i18n/SKILL.md`, tokens | 2243 | 2250 |
| all `SKILL.md` files, lines | 2120 | 2120 |
| authored bundle files, tokens | 182314 | 182321 |
| eval fixtures, tokens (not ratcheted) | 96753 | 97047 |
| whole shipped tree, tokens | 294016 | 294317 |
Read first, by risk: `skills/objectstack-i18n/SKILL.md` (the key-map
line, shipped to customer projects),
`scripts/check-skills-token-ratchet.mjs` (the row and its comment),
`content/docs/ui/translations.mdx` (the table row).
## Tests
No package source changes, so no package build or test is owed. Gate
readings are under Verification.
## Live check
`pnpm --filter @objectstack/scenarios skill-evals --case
objectstack-i18n/bundles-locales-coverage#19 --model haiku --effort
medium`, one repeat, served claude-haiku-5-5, subscription login. The
case asks for a zh-CN bundle that gives `nav_accounts` the search words
客户 and 公司 with no label, and whether a node without `label` is accepted.
Run once on this branch (head 1958ca7) and once on a second tree at the
base, 850d240, holding the same case file and the old skill text.
| tree | with-skill | no-skill |
|:-|:-|:-|
| base 850d240 (old key-map line) | fail | fail |
| this branch | pass | fail |
<details><summary>What the with-skill turn answered</summary>
- Base: "Nothing for `nav_accounts`. The skill's key map gives
navigation text one path: `apps.{app}.navigation.{id}.label`", so it
wrote no `keywords` at all (missing token `keywords`).
- Branch: "add `keywords` under the navigation id and leave out
`label`", with the bundle spelled as
`apps.crm.navigation.nav_accounts.keywords` holding a list.
</details>
Notional cost the CLI reported: $0.01 per round, two rounds.
## Acceptance notes
- The fallback sentence (next locale's label, else the source label; `os
i18n check` still lists the label) is taken from the contract's own
docblock on the node's `label` and from the changeset that shipped the
change. It was not re-measured against a running app here.
- The skill line does not carry the fallback sentence. The card asks the
skill for `keywords` and the label-optional rule, and the skill's
routing table already sends a reader to `translation.zod.ts` for the
rest.
- `scripts/check-skills-token-ratchet.mjs` and
`content/docs/ui/translations.mdx` are also touched by other open PRs,
on other rows. `overlap-check.mjs` at the push: clean against
`origin/main` and the three PR heads it found.
## Verification
Two minutes: open `skills/objectstack-i18n/SKILL.md` and read the
`apps.{app}` line of the key map; then `node
scripts/check-skills-token-ratchet.mjs` prints the i18n row at 2250 /
2250 and exits 0.
Local gates, on head 1958ca7: the 82 commands `node
scripts/pm/dispatch-gates.mjs --commands` derives from this diff, exit
codes captured before any pipe. 79 exit 0, among them
`check-skills-token-ratchet` and its `--self-test` (111 cases),
`check:docs`, `check:skill-docs`, `check:doc-authoring`,
`check:doc-anchors`, `check:skill-links`,
`check:skill-identifier-liveness` and `check:nul-bytes`.
<details><summary>The three that did not exit 0</summary>
- `check:skill-examples`, exit 3, PREREQUISITE NOT MET (reads the client
packages' built output). NOT MEASURED locally, reason: no full local
build; CI's `TypeScript Type Check` is success on this head.
- `check:dual-build-cjs-loads`, exit 3, PREREQUISITE NOT MET (every
package's `dist/`). NOT MEASURED locally, same reason; CI's `Build Core`
and `Lint & Repo Gates` are success on this head.
- `check:pm-dispatch-gates`, exit 1 on its first run, on one self-test
line about the tracked corpus listing, while a second worktree with an
untracked copy of the eval file stood beside this one for the base live
check. After that tree was removed, `node scripts/pm/dispatch-gates.mjs
--self-test --fast` passes 2904 cases on the same head, and CI's `Lint ·
PM dispatch-gates` is success. Read as a reading of the box at that
moment, not of this diff.
</details>
CI on head 1958ca7: every check run is success or an expected skip.
Success: `Lint & Repo Gates`, `TypeScript Type Check`, `Test Core`,
`Build Core`, `Governed Surface Queue Guard`, `Test UI`, `Live E2E UI`,
`Dogfood Regression Gate`, `Check Changeset`, `Build Docs`, `Check
Documentation Links`, `PR-body guards`.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Utp6Cbb4nipp9xHscbT4fu)_
<!-- signed: repo:objectstack@os-bill · os-bill ·
session_01Utp6Cbb4nipp9xHscbT4fu -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent f32b7d6 commit 97e63d9
6 files changed
Lines changed: 40 additions & 4 deletions
File tree
- .changeset
- content/docs/ui
- scripts
- skills/objectstack-i18n
- evals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1175 | 1175 | | |
1176 | 1176 | | |
1177 | 1177 | | |
1178 | | - | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
1179 | 1188 | | |
1180 | 1189 | | |
1181 | 1190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
188 | 201 | | |
189 | 202 | | |
190 | 203 | | |
0 commit comments