Skip to content

docs(skills): a bundle navigation node may carry keywords without a label - #39357

Draft
objectstack-fleet[bot] wants to merge 2 commits into
mainfrom
claude/project-thread-3f73dx
Draft

objectstack-fleet[bot] wants to merge 2 commits into
mainfrom
claude/project-thread-3f73dx

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread
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
What the with-skill turn answered
  • 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.

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.

The three that did not exit 0
  • 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.

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

…abel

The apps and translations pages and the objectstack-i18n key map say that
apps.APP.navigation.ID takes label, keywords, or both, and what a locale
that gives keywords alone shows. One eval case exercises a keywords-only
node. The objectstack-i18n ratchet row follows the measurement, 2243 to
2250.

Claude-Session: https://claude.ai/code/session_01Utp6Cbb4nipp9xHscbT4fu
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 3, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 1958ca7ee11fc9152a6e20f9fbfd0e80f9d18dd7
Local-runs: none
Scope: skills/objectstack-i18n/SKILL.md, skills/objectstack-i18n/evals/bundles-locales-coverage.json + scripts/check-skills-token-ratchet.mjs
Security-touching: no
Rule-change-verified: none

Reviewed 2026-12-03T15:47Z by an isolated subagent, read-only: the diff from the pulls files API, the PR body, card #39209 and its three comments, standing note 7216253348 on #37630, the head's check-runs, and the cited code at the head tree. A draft record by another reviewer was given as unverified input; every statement below was re-read at the head, none is carried over. The two doc pages (content/docs/ui/apps.mdx, content/docs/ui/translations.mdx) and the changeset are prose faces outside the L2 scope; they were read because they carry the same sentence, and what was found there is recorded as nits only.

① Derived judgments

  • The taught shape matches the contract. packages/spec/src/system/translation.zod.ts:1364-1428 at the head: apps.APP.navigation.ID is a strict object with label: z.string().optional() and keywords: z.array(string, max 60, no edge whitespace).max(20).optional(), refined by requiredOneOf(['label', 'keywords']), whose error reads "needs a label, keywords, or both". The skill line navigation.{id}.{label,keywords[]} (at least one) states exactly that: two keys, keywords a list, one of them required. requiredOneOf (shared/refinement-projection.ts:281-290) tests !== undefined, so a node with neither key is refused, as the changeset and eval case say.
  • The fallback sentence matches the resolver. lookupNavLabel (i18n-resolver.ts:2172-2185) walks localeChain and returns the first non-empty label; translateApp (:2260-2275) sets next.label only when one was found, so the node otherwise keeps its authored label; keywords are merged separately by mergeNavKeywords. "The label the next locale in its fallback chain gives, else the source label" holds.
  • Eval case 19 is well formed. The file parses; 19 cases, ids unique; case 19 has the same key set as every other case, and its assertion keys (must_contain, must_contain_any, must_not_contain) are a shape already used in the file. The expected output is correct against the schema: apps.crm.navigation.nav_accounts.keywords holding a list, no label needed, a node with neither key refused. The must_not_contain tokens searchKeywords and synonyms: [ are spellings the strict object lists as aliases of keywords (translation.zod.ts:1369-1370), so they are wrong keys to author, and refusing them in an answer is right.
  • The ratchet arithmetic holds. skills/objectstack-i18n/SKILL.md is 8999 bytes at the base 850d240 and 9027 at the head, 163 lines both. With the 27-byte stamp priced out: ceil(8972 / 4) = 2243 and ceil(9000 / 4) = 2250. The row moves 2243 to 2250, +7, pinned at the measurement with headroom 0. One row changed; no other ceiling moved.
  • Main has not moved the row. origin/main is at 8157fd7. Since the base it changed this file only in the version stamp (19.0.0-next.3 to next.4, same length, 8999 bytes) and changed a different ratchet row (objectstack-data/rules/security.md). GitHub reports the PR mergeable: true, clean. After a merge the file still measures 2250.

② Semver level

③ Boundary flags

④ Design judgment

skills/objectstack-i18n/SKILL.md — holds. Against the card: the card asks the skill to "add keywords and the label-optional rule where they list the node"; the key-map line now does both in place, with no new bullet, and the rule is stated once. Against the spec at the head and on main: the brace form names the two keys the strict object accepts and no others, keywords[] says list, and "(at least one)" is the refine. The line does not carry the fallback behaviour; the card asks that of the doc page, not the skill, so that is in scope as written.

skills/objectstack-i18n/evals/bundles-locales-coverage.json — holds. Case 19 is the card's scenario (a locale's search words with no label decided), and its expected output agrees with the schema. The PR body records the case failing with the old skill text and passing with the new one on a small model; that run was not repeated here.

scripts/check-skills-token-ratchet.mjs (enforcing file) — agrees with the contract it implements: the ceiling equals the measured value, and the comment's formula line matches the file.

Findings:

  1. nit — content/docs/ui/apps.mdx:318-320 and content/docs/ui/translations.mdx:83 say os i18n check "still lists that label as untranslated" without condition. The walk pushes the key only when the entry authors a label (packages/lint/src/i18n-walk.ts:2930, if (id && item.label)), and a navigation entry's label is optional (packages/spec/src/ui/app.zod.ts:388). For an entry with no authored label, nothing is listed. The spec's own docblock makes the same unconditioned statement, and the card asked for this wording. Prose face, outside the L2 scope; no effect on what an author may write.
  2. nit — Eval case 19 does not assert that no label is written for nav_accounts. The failure the changeset names ("wrote a placeholder label next to them") would still pass the case. A plain must_not_contain: ["label:"] would be wrong, since a good answer mentions label; a narrower assertion can go in a follow-up.
  3. nit — "(at least one)" is true of key presence. At this head keywords: [] also satisfies the refine, because the array has no minimum. Nothing in the diff teaches an empty list, so no reader is misled today; the wording may want "non-empty" if the schema later requires it.
  4. nit — content/docs/ui/apps.mdx:320 is left unwrapped at about 150 columns in a paragraph wrapped near 88. Formatting only; Build Docs and the doc gates are green.

No must-fix and no should-fix. This is the final round for this head: the four nits are accepted deviations, and 1 to 3 may go to a follow-up card through the filing gate.

CI at the head (check-runs API, read 2026-12-03T15:47Z): 54 runs, all completed; 35 success, 19 skipped, 0 failure, 0 in progress. Both Check Changeset runs and both PR-body guards runs are success; Governed Surface Queue Guard, Lint & Repo Gates, Test Core, Build Core, Build Docs and Check Documentation Links are success.

Implemented-by: session_01Utp6Cbb4nipp9xHscbT4fu
Reviewed-by: session_01Utp6CaQsbKBMQtm6Tpsamd

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

维护者速读

  • 改了什么 — i18n 技能和文档讲清楚:应用导航节点的翻译可以只给搜索关键词(keywords)而不写 label,此时界面回退到原文标签(Docs and the i18n skill teach that a bundle navigation node may carry keywords without a label (#39146, #39050) #39209)。加了一道评测题,技能 token 棘轮该行 +7(在你 ≤10 的放宽规则内)。
  • 要你做什么 — os-zhuang 批准即可,席位随后落地(受管:技能面)。契约审核 PASS 7383746266,Head-sha: 1958ca7ee11fc9152a6e20f9fbfd0e80f9d18dd7。
  • 范围外 — 无。
  • 席位意见 — ACCEPT:教的形状和 spec 一致,CI 全绿。

席位核对

ACCEPT · head 1958ca7ee11fc9152a6e20f9fbfd0e80f9d18dd7 · repo:objectstack@os-bill

  1. Shape: 6 files, +40/−4: skills/objectstack-i18n/SKILL.md, its eval bundles-locales-coverage.json (case 19), content/docs/ui/apps.mdx, content/docs/ui/translations.mdx, scripts/check-skills-token-ratchet.mjs and one changeset. Fixes #39209.
  2. Premise measured: the review read the taught shape against packages/spec/src/system/translation.zod.ts:1364–1428 (optional label, optional keywords, requiredOneOf) and the fallback against lookupNavLabel / translateApp. The zone's isolated L1 at high found no rework.
  3. Gates:
    • Check-runs at this head: 35 success, 19 skipped, 0 failed.
    • Contract review at CONTRACT_REVIEW_TIER: PASS 7383746266 at this head, no must-fix, no should-fix, four nits.
    • Ratchet row 2243 → 2250 (+7), within standing note 7216253348, cited in the row comment.
  4. Accepted deviations: nits 1–4: the docs say os i18n check lists the label unconditionally (it lists it only when a label is authored); eval 19 does not forbid a placeholder label; "(at least one)" is about key presence; one long line.
  5. Out of scope: none. feat(spec,app-shell)!: review follow-ups of #39207 — a navigation keywords list is never empty, and a cleared menu label keeps the entry's keywords #39356 (Review follow-ups of PR #39207 #39210) is a separate PR on the same family.
  6. Landing: governed, Tier H (skills/**). Review is requested from os-zhuang, and the seat lands after approval. On merge, Docs and the i18n skill teach that a bundle navigation node may carry keywords without a label (#39146, #39050) #39209 closes.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Review request: 2026-12-03T15:48Z · os-zhuang, please approve at head 1958ca7ee11fc9152a6e20f9fbfd0e80f9d18dd7. Seat ACCEPT above; contract review PASS 7383746266 at this head. Governed as skills text. The seat lands it after approval.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 3, 2026
@objectstack-fleet
objectstack-fleet Bot requested a review from os-zhuang December 3, 2026 15:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs and the i18n skill teach that a bundle navigation node may carry keywords without a label (#39146, #39050)

2 participants