Repository navigation
Commit 431f880
docs(skills): objectstack-i18n teaches that a stack may translate the platform's Setup and Account apps (#39033)
Fixes #38793
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:让 AI 把平台自带的“设置”和“账户”两个应用的标题、菜单翻译成中文时,AI
现在会直接写出翻译;以前它会说做不了,或者另造一个同名应用。
- 为什么做:属于“应用翻译”这条线;平台已经放行这类翻译,但教 AI 的技能说明和文档页还停在旧说法。
- 出错会怎样:AI 作者如果把菜单项的标识抄错,校验不会报错,那一项会继续显示原文;本改动只有文字,可以直接撤回。
- 要你做什么:审阅并亲手合并(技能文字属于须由你合并的范围)。
## What changes
Read first, by risk:
1. `skills/objectstack-i18n/SKILL.md`, the verify line (First checks 3)
and the new first note under the key map. This is the text an AI author
follows.
2. `skills/objectstack-i18n/SKILL.md`, the four places that pay for it
(title line, locale check, the `inlineTitle` note, the report and book
note).
3. `content/docs/protocol/kernel/i18n-standard.mdx`, the `apps.{app}`
and `apps.{app}.navigation.{id}` rows.
The skill now says what the merged `translation-target-unknown` rule
does, in the words of its `os explain` text ("A platform app a stock
runtime serves (`setup`, `account`) resolves too and its navigation ids
are not judged: the runtime applies the key over the served app, whose
items come from the plugins the deployment composes."):
- The refusal sentence stays and is scoped: `os validate` refuses a key
naming nothing the metadata declares, except a platform app's.
- One note under the key map: `apps.setup` and `apps.account` translate
the platform apps a stock runtime serves; `os validate` does not judge
their `navigation.{id}` ids, which the deployment's plugins supply, so
the ids are read from the served app.
The docs rows carry the same two facts in full, plus what the skill has
no room for and the rule's code and tests state: `studio` is not served
by a stock boot and stays an orphan; a stack that declares its own app
under one of the two names is judged against its own declaration; ids
the stack itself contributes into a platform app are not judged either;
and a `translation` item saved through the metadata API is judged
against the served apps when the host states them.
One eval case (id 17, `bundles-locales-coverage.json`): a stack that
declares no `setup` app is asked to translate Setup's title and its
`nav_users` entry. The answer must contain `apps`, `setup`,
`navigation`, `nav_users` and the translated label, and must not declare
an app to carry the key.
Skill size, the two readings:
| | before | after |
|:--|:--|:--|
| `skills/objectstack-i18n/SKILL.md`, lines | 161 | 162 |
| `skills/objectstack-i18n/SKILL.md`, tokens (ratchet convention) | 2243
| 2243 (ceiling 2243) |
| all `skills/*/SKILL.md`, lines | 2144 | 2145 |
| authored bundle, tokens | 182270 | 182270 |
The file sat at zero headroom, so the new text is paid for by deletion
in the same file: a shorter title line, the clause "not an English
`defaultLocale`" (the sentence already names the two values to declare),
and three worked key paths that restated their own sentence (the
child-object `inlineTitle` path, the report block path, the book group
path). The rules those paths illustrated still read in full, and the
eval cases that grade them (ids 8 and 9) supply the names in their
prompts. The ceiling row is not touched.
## Tests
Text only; no package source changes, so there is no package test to
run. All readings at head `0d07a96c`.
<details><summary>Local gate readings</summary>
- `node scripts/check-skills-token-ratchet.mjs`: exit 0, "61 authored
bundle file(s) within their ceilings"; the i18n row reads `2243 / 2243
(+0)`.
- `pnpm --filter @objectstack/spec run check:skill-examples`: exit 0,
"344 prose examples type-check across 3 surface(s)" (after building the
client-react closure it reads).
- `pnpm --filter @objectstack/spec run check:skill-docs`,
`check:skill-refs`, `check:docs`: exit 0.
- `pnpm check:skill-links`, `check:skill-identifier-liveness`,
`check:skill-compatibility`, `check:skill-frame-sync`,
`check:skill-top-level-keys`, `check:doc-authoring`,
`check:doc-anchors`, `check:nul-bytes`: exit 0.
- Every other family `dispatch-gates.mjs --commands` derives (75 in
all): exit 0, except the two below. `--ran`: "75 derived famil(ies)
accounted for, 74 run, 1 NOT-MEASURED".
- NOT MEASURED: `pnpm check:dual-build-cjs-loads`, exit 3, its own
prerequisite refusal (it needs a full workspace build); left to CI.
- RED, and not a verdict on this diff: `pnpm
check:closed-ceremony-text`, exit 1, `spawnSync git ENOBUFS`. See
Acceptance notes.
</details>
## Acceptance notes
- `pnpm check:closed-ceremony-text` is expected to be red on this PR for
a reason outside the diff. Its file listing runs `git ls-files -z` over
`packages`, `content/docs` and `.changeset` through `execFileSync` with
the default 1 MiB output buffer. On `origin/main` at `444dce61` that
listing is 1,048,565 bytes, 11 bytes under the 1,048,576 limit; this
PR's one new changeset path takes it to 1,048,611 and the call throws
before any file is read. The same gate exited 0 on this branch one
commit earlier (`6b959d0d`, every content change, no new file). Any pull
request that adds a tracked path of 12 bytes or more under those roots
meets the same failure. The fix belongs to that script (a `maxBuffer` on
the call) and is outside this card's file surface, so it is reported to
the seat and not made here. The phrases the gate looks for do not occur
in the added text (grep over the changeset: 0 hits).
- The skill does not state the metadata-API case or the `studio` and
own-declaration cases; the docs rows do. The entry file had no room for
them without cutting a rule.
- The skill tells the author to read navigation ids from the served app
and does not name a command or route for it.
## Verification
Two minutes: run `pnpm --filter @objectstack/lint exec vitest run
--maxWorkers=2 src/validate-translation-references.test.ts -t "a
platform app the runtime serves"` and compare its five cases with the
two skill sentences and the two docs rows: accepted with any navigation
id; accepted when the stack also contributes into the app; `studio`
reported; an own `setup` app judged against its own declaration; at the
save door, a platform app the environment does not serve reported.
## Patch round 1
Head `309fcaea`, answering the contract review of `f7641974` (M1, S1;
comment 7335881986). The skill file is unchanged from the reviewed head.
- M1: eval case 8 required `crm_opportunity_line_item` and `open_block`,
which only the two worked paths this PR removed from the entry file
spelled. Its prompt now names the child object, its field and the block,
so the case grades the rule (the key is the child's; a block is keyed by
its `name`) and not a recalled name.
- S1: eval case 17 now requires a written bundle: one any-of group over
the navigation key (`nav_users: {`, its JSON spelling, or
`navigation.nav_users.label`) and one over the app title's `label`
spelling. An answer that echoes the prompt or declines no longer passes.
- Readings at `309fcaea` (dev report 7336075205): token ratchet exit 0,
i18n row `2243 / 2243 (+0)`; the eval reader's test
(`test/skill-evals/skill-evals.test.ts`) 40 passed; 73 of the 75 derived
gate families exit 0, 2 not measured locally
(`check:dual-build-cjs-loads` needs a full build; the comment-mask sweep
reads JS sources and this round changed none).
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ)_
<!-- signed: repo:objectstack@os-support-ai · os-support-ai ·
session_01WGufzhKEbEnW8pwZRgK2gJ -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a0ee7d2 commit 431f880
4 files changed
Lines changed: 46 additions & 12 deletions
File tree
- .changeset
- content/docs/protocol/kernel
- 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 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1200 | 1200 | | |
1201 | 1201 | | |
1202 | 1202 | | |
1203 | | - | |
1204 | | - | |
| 1203 | + | |
| 1204 | + | |
1205 | 1205 | | |
1206 | 1206 | | |
1207 | 1207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | 112 | | |
110 | | - | |
111 | | - | |
| 113 | + | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 121 | + | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
163 | 177 | | |
164 | 178 | | |
165 | 179 | | |
0 commit comments