Repository navigation
docs(skills): teach the mappings group, action and hook texts, and drop the stale label-serving caveat - #35302
Conversation
…op the stale label-serving caveat The i18n skill names the `mappings` translation group and where a hook's or a script action's declared `texts` sit in a bundle; the ui actions rule teaches declaring `texts` and asking for them with `ctx.text`. The caveat that serving reads inline labels as defaultLocale text is replaced by the narrower truth that still holds (`t()`-read labels in refusal messages). Claude-Session: https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7 Co-authored-by: Claude <noreply@anthropic.com>
…ample Claude-Session: https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Read: the PR body and its diff against merge base Check-runs on this head (45 runs, all completed): 29 success, 16 skipped, 0 failed, 0 in progress. Success includes Build Core, Test Core and its 3 planned shards, TypeScript Type Check with its four parts, Lint & Repo Gates and all eight Lint parts, Live E2E UI, Dogfood Regression Gate, Check Changeset, Check PR Size, PR-body guards, Governed Surface Queue Guard. Skipped are the UI build/test/lint families, Build Docs, Temporal Conformance, the opt-in harnesses and the queue verdicts. The PR is a draft, ① Derived judgmentsEvery new sentence, against the code at head:
② Semver level
③ Boundary flags
④ Design judgmentOne must-fix, on the eval fixtures. The teaching text itself holds against the code.
Per file, otherwise:
Nits (none blocks):
Implemented-by: VERDICT: FAIL |
…ames the texts key beside it The `_actions` key spelling is graded by the ui bundle's own evals, and the with-skill arm reads that bundle only, so it stays. Paid by two sentences that restated the example right below them; the ratchet row moves by the measured remainder. Two eval assertions no longer require text the prompt hands the answerer or the bundle does not teach. Claude-Session: https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Delta round. Round 1 is record 6999139326 on head Read: the delta diff and its commit message; the three changed skill and eval files whole at this head; the row note; the PR body as it stands now; the PR diff against main ( Check-runs on this head, read at 2026-11-19T04:04Z, CI still running: 47 runs, 26 success, 18 skipped, 0 failed, 3 in progress. PENDING: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix and no should-fix on this head. The fix took the route that keeps the bundle self-sufficient for its own evals, and paid for it with deletions that are restatement in the strict sense.
Nits (none blocks, none needs a push):
Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ 维护者速读
席位核对 — ACCEPT · repo:objectstack#5 · head
|
Requested by Bill · project thread
Fixes #34962
Fixes #35097
Fixes #34053
Part of #34546 — this PR carries its i18n half only (where a hook's
textssit in a bundle, plus one i18n eval case). The declaration half (hooktextsandctx.textinskills/objectstack-data/references/data-hooks.md, plus one objectstack-data eval case) rides with the area's data-hooks group, per the PM's fence ruling in this dispatch: that file and the data eval set sit under open draft #34964 and the next data-hooks group.Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-i18n的顶层分组列表加入mappings(导入映射的label,按映射name存放,附 showcase 的 zh-CN 实例);"按组织语言取句"一段扩到钩子与脚本动作在texts里声明、用ctx.text写入记录的句子(hooks.HOOK.texts.KEY.message、_actions.ACT.texts.KEY.message,无对象动作在globalActions下);删去已失效的"标签服务把内联文字当defaultLocale读"提醒,只保留仍然成立的一句:校验与拒绝消息仍经t()读标签,英文源、中文默认的应用仍需声明fallbackLocale: 'en'。objectstack-ui的rules/actions.md新增一小节,教脚本动作声明texts并用ctx.text取句。i18n 评测加 2 条、改 1 条,ui 评测加 1 条。mappings分组、动作texts、钩子texts都已在 main 上落地,但技能没教;照技能写包的 agent 会把映射名留成英文、把句子硬编码进动作体。旧提醒在 sourceLocale 服务落地后已经说错。rules/actions.md的棘轮行 3180 → 3333(先删同文件两处复述示例的句子 53 字节,余额按实测);i18n SKILL.md 在原上限内付清(6327 → 6329,上限 6333 不动)。回滚 = revert 本 PR。skills/objectstack-i18n/SKILL.md第 50–53 行(新的t()提醒是否准确)与分组段(mappings、texts键);②skills/objectstack-ui/rules/actions.md新增的texts小节;③scripts/check-skills-token-ratchet.mjs中 actions.md 行的注释与 +153。node scripts/check-skills-token-ratchet.mjs,预期skills/objectstack-ui/rules/actions.md is 3333 tokens (ceiling 3333; headroom 0)、skills/objectstack-i18n/SKILL.md is 6329 tokens (ceiling 6333; headroom 4),末行 ✓。skills/**属 Tier H 受管面)。What changes
skills/objectstack-i18n/SKILL.mdmappings(mappings.{mapping}.label, an import mapping'slabelby itsname; a mapping declares no description). The zh-CN example block gains the showcase'smappings: { showcase_inquiry_feed: { label: … } }, the spellingexamples/app-showcaseships. (skills(objectstack-i18n): the group list does not teach the new mappings translation group (follow-up owed by #34939) #34962)scriptaction declares intextsand writes throughctx.text:hooks.{hook}.texts.{key}.messageand_actions.{action_name}.texts.{key}.message, also underglobalActions. The skill states the bundle shape only. The declaration, thectx.textlookup and the missing-key behaviour live in the ui actions rule (and, for hooks, the data-hooks group), so nothing is said a third time. (skills: teach declaring an action's texts (ActionSchema.texts) and translating them under the action node — objectstack-ui rules/actions.md and objectstack-i18n SKILL.md #35097, skills: teach hooktextsandctx.textin the automation and i18n skills #34546 i18n half)defaultLocaletext …" is gone. ThesourceLocalerow now says a request in that locale is served the inline text. The remaining truth is kept, measured onorigin/main01889892(see Acceptance notes): validation and refusal messages still read labels throught(), which falls back tofallbackLocale, elsedefaultLocale. WithoutfallbackLocale: 'en', anenrefusal names a field by its zh-CN row. (skills/objectstack-i18n: drop the "label serving reads inline text as defaultLocale text" caveat and eval case 11's fallbackLocale requirement once #33634 lands #34053)skills/objectstack-ui/rules/actions.md: a new H3 "Writing in the organization's language (texts)" after the refusals paragraph. The same actions that may declarerefusals(ascriptaction with ajsbody) declare a sentence undertextsand ask for it withawait ctx.text(key, params). It is answered in the organization's language, never the caller's. With no translation the declared sentence is written, filled. An unreadable Localization setting rejects. An undeclared key is refused at save when named literally, else at run. The H3 names thetexts.KEY.messagekey beside the refusals key, which the refusals paragraph still spells in full. The wording comes fromcontent/docs/ui/actions.mdxas merged with the action-texts carrier. (skills: teach declaring an action's texts (ActionSchema.texts) and translating them under the action node — objectstack-ui rules/actions.md and objectstack-i18n SKILL.md #35097)skills/objectstack-i18n/evals/bundles-locales-coverage.json: case 14 (mappings.lead_csv.label), case 15 (a hook'stextskey and whose language picks it; it does not require the{{ lead }}hole), and case 11'sexpected_outputnow gives thet()reason forfallbackLocale: 'en'. Itsmust_containkeepsfallbackLocale: 'en', decided below.skills/objectstack-ui/evals/views-apps-actions-pages.json: case 21 (thesend_emailaction's subject viatexts+ctx.text; it does not forbid the prompt's own'Email: ' +).scripts/check-skills-token-ratchet.mjs: therules/actions.mdrow 3180 -> 3333 with its row note. The i18n row is untouched..changeset/34962-i18n-skill-texts.md:@objectstack/skillspatch, carrying both declaration lines.Ratchet and size readings
Raise authority, quoted verbatim and untranslated: the standing ruling of 2026-10-27, 「A:先削重复,余额按实测提高」, made the gate-recognised path by ruling record 6513306068 (letter B). Restatement in the same file is cut first; the remainder moves by measurement.
skills/objectstack-i18n/SKILL.md: paid in full in the same file, so the row does not move (open draft docs(skills): the api and i18n skills teachRuntimeBuildIssue.userMessage#34970 edits the same file). The restatement cut:translation-target-unknownerror stated just above it;--objects-onlyand--source-hashesfrom theextract --helplist, both taught in place (the paragraph right below and the Register code comment);--objects-onlyparagraph and the surface list inos i18n check's paragraph, two partial copies of the group list (neither namedmappings,hooksorbooks);texts.skills/objectstack-ui/rules/actions.md: paid down first by 53 bytes of restatement, each of the example right below its sentence: " as${result.output.NAME}" in theonSuccesssentence (27; the Convert Lead block spells${result.output.opportunity_id}) and "{recordId}placeholder; " in thenewTabUrlsentence (26; the Open PDF block spells it). The refusals bundle key stays: the bundle's own evals grade_actions, and the with-skill arm reads this bundle only. Nothing else in the file restates another passage, so the rest moves by measurement: 12720 -> 13330 bytes,ceil(13330 / 4) == 3333, +153 tokens, pinned AT the measurement.objectstack-ai/objectstack, base01889892-> head 14899df)skills/objectstack-i18n/SKILL.mdlinesskills/objectstack-i18n/SKILL.mdbytes / priced tokens (ceiling)skills/objectstack-ui/rules/actions.mdlinesskills/objectstack-ui/rules/actions.mdbytes / tokens (ceiling)skills/*/SKILL.mdlines (sum, 13 files)skills/*/SKILL.mdbytes (sum)The bundle total's +977 units are mostly eval fixtures (+822, measured, not ratcheted).
Tests
Text-only change to served skill text, eval fixtures and one ratchet row. No tested behaviour changed, so there is no ablation and no package
test/typecheckis owed (the diff touches no package source).Token ratchet, gate and self-test (head 14899df)
Before the row was re-pinned, the same gate read
3333 / 3180 (+153)and exited 1: the remainder this PR carries.Acceptance notes
skills/objectstack-automation/SKILL.md:9sends object-layer lifecycle hooks to objectstack-data, and hooks, theirrefusalscatalogue and its translation key are taught inskills/objectstack-data/references/data-hooks.md(§ Error Handling → Declared refusals). That file is outside this dispatch's fence, and per the PM it belongs to the data-hooks group. The automation skill is untouched.fallbackLocale: 'en'as a required string, with its reason rewritten. Serving honourssourceLocale(the carrier merged as2068e037). But i18n: validation and refusal messages read field, option and object labels through t(), so a declared i18n.sourceLocale request still names the field with the defaultLocale row #34030 is still open: validation and refusal messages read labels throught(). Read onorigin/main01889892:resolveFieldLabel(packages/objectql/src/validation/record-validator.ts:463) asksctx.translatebefore the declared label, andFileI18nAdapter.t()(packages/services/service-i18n/src/file-i18n-adapter.ts:176-181) falls back tofallbackLocale, which the stack config fills asfallbackLocale || defaultLocale || 'en'. So in an English-source app with a zh-CN default,fallbackLocale: 'en'still keeps anenrefusal off the zh-CN row. When i18n: validation and refusal messages read field, option and object labels through t(), so a declared i18n.sourceLocale request still names the field with the defaultLocale row #34030 lands, its own skills follow-up drops the sentence and the requirement. This is a reading of the tree; no request was run.skills/objectstack-ui/evals/README.mdlists each eval file's topics broadly. It is not extended for the new case.Verification
Local gate union derived by
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat head 81eae9a (6 paths, 66 commands). Every family CI runs is read from this PR's check-runs. Fix round14899df1c(contract review 6999139326, M1) re-ran the token ratchet and its self-test, the skills gates (check:skill-docs,check:skill-refs,check:skill-links,check:skill-identifier-liveness,check:skill-compatibility,check:skill-frame-sync),check:nul-bytes,check:doc-authoring,check:pm-skill-id-lint, the changeset gates and overlap-check: all exit 0.check:doc-formula-expressionswas NOT MEASURED there (no lint dist in the recreated worktree; no code block touched; exit 0 at 81eae9a).Local run (head 81eae9a)
NOT MEASURED locally:
check:dual-build-cjs-loadsandcheck:lean-entry-closure. Reason: PREREQUISITE NOT MET (exit 3). They load builtdist/trees that this docs-only diff does not build, and CI runs them. No packagetest/typecheckis owed, and notest:repoeither: the diff touches no package source and no repo-project test.🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7