Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .changeset/34770-i18n-skill-router.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'@objectstack/skills': patch
---

docs(skills): the objectstack-i18n entry file becomes a router

Clause-②: no
Metadata-protocol: none

`skills/objectstack-i18n/SKILL.md` goes from 25.3 KB to 9.0 KB (504 lines to 160). It now holds five things: three first checks (read the stack's `i18n` block and the contract before writing a key; which of `defaultLocale`, `sourceLocale`, `supportedLocales` and `fallbackLocale` is which; verify with `os i18n check` and `os validate`), one type-checked bundle with the `translation` metadata item beside it, the key map as one path listing, seven traps, and a table that says where to go for the rest. No rule's teaching changes. This skill has no hand-written reference file, so no text moved: what left the entry was cut, and this entry says what now answers it.

**What the entry keeps.** The key map lists, as paths, the groups under `objects.{object}` (`fields`, `_views`, `_actions`, `_sections`, `_tabs`, `_relatedLists`, `_milestones`, `_validations`) and the top-level groups the old entry listed, with their keys. It is not the whole contract: it stops above the leaf keys of `bulkActions.{def}`, of `params.{param}`, of a dataset member and of a report block's `description`, and it does not list the top-level `forms` group (the old entry did not either). The routing table sends a key or shape the map does not show to the contract. Six notes under it carry the placements a path cannot show: `inlineTitle` and `relatedListTitle` are keys of the child object; `_views.{view}.title` is a form's own heading and a section's override says `helpText` where the field says `help`; `columns` is a sibling of `fields` (with the one worked example the map keeps) and `preflight` has no `title`; `_relatedLists.{list}` is on the parent; a report block is keyed by its `name` and a `books` group by its `key`; a flow step is keyed under `approvals`, `screens` or `nodes`. The seven traps, each one a bundle that parses and ships and then translates nothing or the wrong text: an option key is the stored `value`, never the label; `t()` fills double braces only and there is no ICU MessageFormat; `os i18n extract` writes `objects` and `globalActions` only unless you pass `--no-objects-only`; coverage is not freshness, so `os i18n extract … --check` is the second gate; a generated module is an `objects` subtree that needs wrapping, and `withSourceFallback` needs the `--source-hashes` companion as its fourth argument; text the server writes is in the organization's language; an app-authored refusal has no `en` floor.

**What left, and what answers it now.**

- The condition on each key (which declaration a key needs before it is accepted) and the retired and misspelled keys (`o`, `app`, `nav`, `dashboard`, `_globalOptions`, `_meta`, `validationMessages`, `settings`, `confirmMessage`, `sourceLanguage`, `authoringLocale`, `authoringLanguage`): the contract, `node_modules/@objectstack/spec/src/system/translation.zod.ts`. Its shapes are strict, a key with a condition says it in its `.describe()` text, and a refused key is answered with the key to write. `os validate` reports a key that names nothing the metadata declares as `translation-target-unknown`, an error.
- The `i18n` property table, the naming-convention table and the file-layout table: the contract and the bundle example.
- The flags of `os i18n check` and `os i18n extract` beyond the ones a run needs (`--include-platform`, `--show-keys`, `--fill`, `--default-locale`, `--no-metadata-forms`) and `os lint --i18n-strict`: each command's `--help`.
- The `II18nService` method list: `@objectstack/spec/contracts`. The locale resolution order: https://objectstack.ai/docs/protocol/kernel/i18n-standard. The coverage and diff shapes: the contract (`TranslationCoverageResultSchema`, `TranslationDiffItemSchema`). The three `/api/v1/i18n` routes: https://objectstack.ai/docs/api/plugin-endpoints, which the entry does not link.
- The paragraph on platform-composed `userMessage` sentences, the list of shipped example bundles, and the sentence that validation, delete-restriction and permission-denial messages name fields in the request's language: cut. They describe what the platform does and ask nothing of a bundle author.

**Anchors that no longer exist in `SKILL.md`.** Every section heading of the old file: `#translation-configuration`, `#stack-level-i18n-config`, `#authoring-translation-bundles-objects`, `#object-level-translation-structure`, `#naming-conventions`, `#file-organization-strategies`, `#authoring-at-runtime-the-translation-item`, `#message-interpolation`, `#simple-format-default`, `#no-icu-messageformat`, `#translation-coverage`, `#os-i18n-check`, `#os-i18n-extract---check--freshness-not-coverage`, `#diff--coverage-schemas`, `#integration-with-ii18nservice`, `#service-contract`, `#registration`, `#server-composed-user-text-usermessage`, `#translation-workflow-best-practices`, `#1-extract-skeletons-from-metadata`, `#2-register`, `#shipped-examples`, `#common-pitfalls`, `#-the-retired-o-shape`, `#verify-your-work`, `#references`, `#see-also`. The new ones are `#first-checks`, `#a-bundle`, `#key-map`, `#traps` and `#where-to-go`. No file in this repository linked an anchor of the old entry.
14 changes: 13 additions & 1 deletion scripts/check-skills-token-ratchet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,19 @@ export const CEILINGS = new Map([
// introducing that example. No raise, no ruling spent:
// 25359 bytes (25332 priced) -> 25285 (25258 priced); the row follows the measurement down.
// ceil(($(wc -c < skills/objectstack-i18n/SKILL.md) - 27) / 4) == ceil(25258 / 4)
['skills/objectstack-i18n/SKILL.md', 6315], // -11 (was 6349), then -5 A2′ (was 6338), then -18 (was 6333)
// 6315 -> 2243 (#34770): the entry becomes a router. It keeps three first checks, one
// type-checked bundle, the key map as one path listing with the six placements a path cannot
// show, seven traps (each parses and ships, then translates nothing or the wrong text) and a
// routing table. This skill has no hand-authored reference file, so nothing MOVED: the rest
// is CUT behind a pointer, to the contract (`translation.zod.ts`, whose strict shapes refuse
// a wrong key with the key to write), to `os validate` (`translation-target-unknown` is an
// error) or to the published i18n standard page. No row rises and no row is added. The file
// is 25285 bytes (25258 priced) -> 8996 (8969 priced) -> 2243 tokens, pinned AT the
// measurement; the sum of all ceilings falls by the same 4072.
// Authority: the ruling of record that orders the entry file down to router size, decision
// record #34691 S3 = A.
// ceil(($(wc -c < skills/objectstack-i18n/SKILL.md) - 27) / 4) == ceil(8969 / 4)
['skills/objectstack-i18n/SKILL.md', 2243],
// 12705 -> 12984 (2026-08-31 app-repo-principles raise, see the block above).
// The largest of the five and the frame the other four are read under: what an
// app IS (metadata under the platform's spec, authored from these skills,
Expand Down
Loading
Loading