Skip to content

docs(skills): objectstack-ui and objectstack-i18n teach the action notices key - #39234

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

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

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

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

Fixes #39203

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:客户项目里的 AI 写动作时,会用「弹窗提交前的提醒」这一写法,也知道提醒的译文放在翻译包的哪里;以前两份技能文档都没讲,AI 不会写。
  • 为什么做:这是「邀请弹窗在没配邮件时先提醒」那项裁决的文档半边,协议半边已经合并。
  • 出错会怎样:只改对外技能文档和评测题;在控制台弹窗真正画出提醒之前合并,AI 会写出一个暂时不显示的键,所以本 PR 排在控制台那一半之后落地;可直接撤回。
  • 要你做什么:批准本 PR(等席位确认控制台那一半已合并后再落地)。

What changes

ActionSchema.notices (merged in #39201) is taught in the two published skills an author of a dialog action reads. Read from the spec as merged: packages/spec/src/ui/action-notices.ts, packages/spec/src/system/translation.zod.ts.

  • skills/objectstack-ui/rules/actions.md: one bullet under "Visibility, Disable & Feedback", after submitText. It gives the named map with one notice spelled out, the closed severity set (info by default, warning, error, success), title / body as plain I18nLabels (at least one; no hole, markup or link), visible in the action's own visible shape and scope (never the values typed into the dialog), that a notice is display only and gates nothing, and that the key is refused on an action with neither confirmText nor a non-empty params.
  • skills/objectstack-i18n/SKILL.md: the key map lists notices.{notice}.{title,body} under _actions.{action}, which globalActions.{action} already inherits by its own line. The notice name is the key.
  • Evals: objectstack-ui/views-apps-actions-pages#29 (a param-dialog warning on an expired quote) and objectstack-i18n/bundles-locales-coverage#18 (where that warning's Chinese text goes). skills/objectstack-ui/evals/README.md names the new case.
  • Not restated: the alias renames (alerts / warnings, message / text, visibleWhen) and the refused banner keys (icon, action, dismissible, dismissKey). The strict schema refuses each with the key to write.

Landing order. packages/spec/liveness/action.json holds notices at planned with authorWarn: no console dialog draws the key until the console half of #39045. The text here describes the final behaviour with no "not drawn yet" sentence, so this PR lands only after that console PR flips the row to live (the seat holds the landing; claim comment 7364520978).

Size readings

File Before After
skills/objectstack-ui/rules/actions.md 270 lines, 15669 bytes, 3918 tokens 271 lines, 16247 bytes, 4062 tokens
skills/objectstack-i18n/SKILL.md 162 lines, 8998 bytes, 2243 tokens 163 lines, 8999 bytes, 2243 tokens
All SKILL.md files, summed 2146 lines, 121252 bytes 2147 lines, 121253 bytes

Token ratchet

  • objectstack-i18n/SKILL.md: no raise. The key-map entry adds 36 bytes and is paid by a 35-byte deletion in the same file (net +1 byte, inside the row): "preflight holds fields and columns only, no title." becomes "preflight: no title." (the key map lists preflight.fields and preflight.columns and nothing else). The row stays at 2243.
  • objectstack-ui/rules/actions.md: 3918 to 4062 (+144), under the standing ruling 「A:先削重复,余额按实测提高」 (maintainer, 2026-10-27; ruling record 6513306068, letter B). Paid down first by 20 bytes of restatement in the same file: the second " (Declared refusals)" pointer closing the "Refusing by code" paragraph, which names that section four lines up. The earlier notes on this row record that nothing else in the file restates another passage. The bullet adds 598 bytes, the cut removes 20: 15669 to 16247 bytes, 4062 tokens, pinned at the measurement.

Tests

  • The taught shape parses, and the refusal the bullet names fires. A probe against ActionSchema at this head: an action with params and two notices (one features.* condition, one record.* condition) parses; the same notices on an action with neither confirmText nor params is refused with "notices are drawn in the dialog an action opens before it runs…".
  • Both eval fixtures parse as JSON; the runner's --dry-run plans the two new cases.

Live check

pnpm --filter @objectstack/scenarios skill-evals --case 'objectstack-ui/views-apps-actions-pages#29,objectstack-i18n/bundles-locales-coverage#18' --model haiku --effort medium, one repeat, subscription login (oauth_token, no API key), served claude-haiku-5-5.

Case Before (skill text at 724b3695, the new cases added) After (598aa3a4) No-skill arm
objectstack-ui/views-apps-actions-pages#29 fail: no notices, visible, record.valid_until, severity, title / body pass fail
objectstack-i18n/bundles-locales-coverage#18 fail: no title / body leaf under the notice name pass fail

The baseline was taken in the same worktree, with the two skill text files checked out at the merge base and restored after, not in a second -cmp tree: the runner and the cases are the same, and only the two text files differ. Notional cost the CLI reported: $0.01 per round, two rounds.

Acceptance notes

  • The card asks to name "the action translation slot" and "that each notice name is its stable key". The i18n entry is a router at its ceiling, so the key map line carries both (notices.{notice}.{title,body}); the sentence form lives in the eval's expected output and in translation.zod.ts, where the entry already sends a reader for a key's meaning.
  • The bullet's spelled notice uses features.emailDelivery, the flag the protocol page's own example reads.

Verification

Two minutes: open skills/objectstack-ui/rules/actions.md and read the notices bullet beside packages/spec/src/ui/action-notices.ts; each clause is one sentence of that module's header.

Read first, by risk: scripts/check-skills-token-ratchet.mjs (the one row that rises, and its note), skills/objectstack-ui/rules/actions.md (the bullet and the 20-byte cut), skills/objectstack-i18n/SKILL.md (the key map line and the preflight sentence).

Local gates at 598aa3a

node scripts/pm/dispatch-gates.mjs --commands derived 69 families at this head; --ran reconciled 66 run, 3 NOT-MEASURED, 0 UNRUN.

  • Exit 0: check-skills-token-ratchet.mjs and its --self-test (111 cases), pnpm --filter @objectstack/spec run check:skill-docs, pnpm --filter @objectstack/lint run check:doc-formula-expressions (after building the lint closure), check:skill-links, check:skill-top-level-keys, check:published-files, check-empty-changeset.mjs, check-nul-bytes.mjs, and the rest of the 66.
  • check:pm-dispatch-gates exited 1 on its first run, which overlapped the changeset commit and the baseline eval round's file swap; on the settled tree it exits 0 (fast tier, 2904 cases).
  • NOT MEASURED locally, left to CI: check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure answered PREREQUISITE NOT MET (they read every package's dist/; this diff changes no package source).

Generated by Claude Code

@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: 598aa3a43f7d1c70a2c17132e4188b89c4dc84b0
Local-runs: probe — node scripts/check-skills-token-ratchet.mjs re-run at the head to read the two measured rows (read-only; nothing built)
Scope: skills/objectstack-i18n/SKILL.md, skills/objectstack-i18n/evals/bundles-locales-coverage.json, skills/objectstack-ui/evals/README.md, skills/objectstack-ui/evals/views-apps-actions-pages.json, skills/objectstack-ui/rules/actions.md + scripts/check-skills-token-ratchet.mjs, .changeset/39203-skills-action-notices.md
Security-touching: no
Rule-change-verified: none

① Derived judgments

Full first-round review of PR #39234 (card #39203, follow-up of #39182 / PR #39201 under ruling A 7359751238 on #39045). Read: git diff origin/main...598aa3a4 (3 commits, 7 files, +57 −5; merge base 724b3695, origin/main at 1d82054a, merges clean), claim 7364520978 and its amendment 7365410630, dev report 7365369810, the PR body, ruling records 7359751238 and 6513306068, and the merged spec: packages/spec/src/ui/action-notices.ts, packages/spec/src/ui/action.zod.ts (the notices key, its aliases, the no-dialog refinement), packages/spec/src/ui/alert-severity.ts, packages/spec/src/system/i18n-action-notices.ts, packages/spec/src/system/translation.zod.ts (the notices slot), packages/spec/liveness/action.json, and content/docs/protocol/objectui/actions.mdx.

The notices bullet in skills/objectstack-ui/rules/actions.md, clause by clause against the spec:

  • Key name notices, a map from a snake_case name to the notice: z.record(SnakeCaseIdentifierSchema, …). The spelled names (mail_off, and quote_expired in the evals) pass the identifier rule.
  • "the confirm or param dialog draws above its description": the key's own describe and ruled term 4.
  • severity: info, warning, error, success is AlertSeveritySchema exactly. "info (default)" is the renderer's default, not a parse default (the key is optional with none); the schema's describe and the protocol page say the same, so an author who omits it gets what the text says.
  • title / body: I18nLabels, at least one (requiredOneOf(['title','body'])), plain text with no hole, markup or link (module header; ruled term 3). The blank-string refusal is not restated; the schema refuses it with its own sentence.
  • visible: "the action's own visible shape and scope, never the dialog's values" is the handed-in ActionConditionInputSchema and the header's scope paragraph. The example's features.emailDelivery != true is the protocol page's own condition, and features is a scope root.
  • "Display only, never a gate": ruled term 5.
  • "refused with neither confirmText nor a non-empty params": declaresNoticesWithoutDialog.
  • No invented field: the bullet names only severity, title, body, visible. The banner keys the notice refuses (icon, action, dismissible, dismissKey) and the alias renames are left to the strict schema, which names the key to write.

skills/objectstack-i18n/SKILL.md: notices.{notice}.{title,body} under _actions.{action} is the slot translation.zod.ts declares and overlayActionNotices reads; the existing line globalActions.{action}: the _actions keys carries the object-less address. Only title and body are listed, which is all the slot holds.

Evals: both files parse; ids are unique and sequential (ui #29, i18n #18); each new case has prompt, expected_output, files: [] and assertions in the shape cases.ts reads, with well-formed must_contain_any groups. Both reference answers agree with the spec (P\record.valid_until < today()`in the action's scope;confirmTextrefused besideparams; alerts/warningsrefused namingnotices; translation-target-unknownfor an undeclared notice name;globalActions.crm_send_quote.notices`). The dev's live round reads 0/2 on the merge-base text and 2/2 at this head, so the cases discriminate.

Ratchet: skills/objectstack-ui/rules/actions.md is 15669 bytes on main and 16247 at this head (+598 for the bullet, −20 for the cut); ceil(16247/4) = 4062, the new row, headroom 0, pinned at the measurement. The cut is a real restatement: the closing " (Declared refusals)" pointed at the section the same paragraph names four lines up. Ruling record 6513306068 (letter B, part 2) makes this the recognised path: a deletion of restatement shown in the same file, the 2026-10-27 ruling quoted in the PR body, the row moved by the measured remainder with no per-card ruling. All three hold. skills/objectstack-i18n/SKILL.md is 8998 → 8999 bytes (8972 priced after the 27-byte stamp line), 2243 tokens, row unmoved. The gate exits 0 at the head with both rows at headroom 0.

Findings:

  • S1 (should-fix) skills/objectstack-i18n/evals/bundles-locales-coverage.json case 18: must_not_contain holds notices.0, and the case's own expected_output writes it ("and not an index (notices.0)"). The assertion is a plain substring match, so an answer written like the reference fails the case while being right. The repo already names this class (forbids-own-answer in ui/scripts/check-skill-eval-tokens.mjs, which scans only the objectui bundle, so nothing reds here). Fix either side: drop the parenthesis from the expected output, or narrow the token to what a wrong answer writes (notices[0], '0':). The live round passed because the model did not name the index. Four older cases in this tree carry the same defect (ui chore(ci)(deps): bump github/codeql-action from 3 to 4 #24, ai Migrate documentation site to Fumadocs with monorepo structure and shared content #11, ask Add comprehensive test suite for Zod schema validation #12 and Add missing Field.phone() helper and factory methods for Action/Dashboard/Report #15); they are outside this diff.
  • N1 (nit) skills/objectstack-i18n/SKILL.md: the pay-down turns "preflight holds fields and columns only, no title." into "preflight: no title.". The "only" is now carried by the key map alone. The preflight translation schema is strict and refuses any other key with guidance, so nothing an agent writes wrongly gets through.
  • N2 (nit) skills/objectstack-ui/rules/actions.md: the visible bullet above still describes its scope as "the current record", so "the action's own visible … scope" shows features only through the example. Correct, and the cheapest wording at a full row; a later edit of the visible bullet could name the user and features.

② Semver level

  • .changeset/39203-skills-action-notices.md: '@objectstack/skills': patch. Right for teaching text and eval fixtures; no package source moves.
  • Clause-②: no and Metadata-protocol: none on the PR body and the changeset: correct. The diff declares no key and narrows nothing; the key's added was declared by feat(spec): notices on an action, warnings its dialog draws before submit (#39182) #39201.
  • No breaking change, no migration, no ADR-0087 marker owed.

③ Boundary flags

  • Nothing in the diff teaches a metadata shape the platform refuses. The bullet's example and both evals' reference shapes were read against the schema; the dev's probe at this head parsed the taught shape and got the named refusal on a dialog-less action.
  • Landing order: packages/spec/liveness/action.json still holds notices at planned with authorWarn on origin/main 1d82054a. The text is written as the final behaviour, with no "not drawn yet" sentence, and the claim and the PR body hold the landing until the console PR of Invite user: the dialog does not warn that mail is not configured; the invite is created and only then reported as undeliverable #39045 flips the row to live. That sequencing is the seat's and is not a finding. The PR is a draft with no auto-merge armed; it must stay unarmed until the flip.
  • Rule change: the PR touches no .claude/** path and its body carries no Rule-change: line. The one gate-side hunk raises a ceiling by the path ruling 6513306068 already recognises, so no hunk changes what an agent may do without the maintainer: none.
  • Security: no hunk teaches permission, sharing, credential or authentication behaviour. "Never a gate" says only that the notice enforces nothing and sends the author to a hook or validation for a rule that must hold.
  • Author: PR user.login is objectstack-fleet[bot].
  • SQL push-down: no query in the diff.
  • Check-runs on 598aa3a4: 51 runs, all completed, 31 success, 20 skipped, none failed or pending.
  • File surface: within the claim as amended (the i18n evals and the changeset were added by 7365410630).

④ Design judgment

  • skills/objectstack-ui/rules/actions.md: the bullet sits after submitText among the dialog keys, in the list's own form, and holds what an author needs to write a valid notice: one spelled example, the closed set, the two refusals that would otherwise surprise (no dialog; nothing from the dialog's values in scope). It leaves the alias and banner-key refusals to the schema, as the card asked. Holds for the acceptance scenario (the expired-quote warning of eval chore(deps)(deps-dev): bump @vitest/coverage-v8 from 2.1.9 to 4.0.17 #29).
  • skills/objectstack-i18n/SKILL.md: one key-map entry is the right size for a router file at its ceiling; the name-as-key rule is carried by the {notice} placeholder and by the ui bullet's "The snake_case name is the notice's translation key".
  • skills/objectstack-ui/evals/views-apps-actions-pages.json chore(deps)(deps-dev): bump @vitest/coverage-v8 from 2.1.9 to 4.0.17 #29: tokens test the taught rule (notices, params kept, a visible over the record) and forbid the near-miss spellings a wrong answer writes with a colon, so naming them as things to avoid still passes.
  • skills/objectstack-i18n/evals/bundles-locales-coverage.json [WIP] Add support for default language configuration #18: sound apart from S1.
  • skills/objectstack-ui/evals/README.md: the case list names the new case.
  • scripts/check-skills-token-ratchet.mjs (enforcing): one row, with the arithmetic, the cut and the ruling id in its note, matching the measurement.

No must-fix. One should-fix (S1), open; it needs a delta read before landing. Two nits.

Implemented-by: claude/project-thread-ccizn0
Reviewed-by: session_01Utp6CaQsbKBMQtm6Tpsamd

VERDICT: PASS

… reference answer writes

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZjeArT6MXwmFD2V36
@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: 15d0dad36f2fb8a8f05e6b88ef3ffa8e0fe0678e
Local-runs: probe — node scripts/check-skills-token-ratchet.mjs re-run at the head to confirm the rows did not move (read-only; nothing built)
Scope: skills/objectstack-i18n/SKILL.md, skills/objectstack-i18n/evals/bundles-locales-coverage.json, skills/objectstack-ui/evals/README.md, skills/objectstack-ui/evals/views-apps-actions-pages.json, skills/objectstack-ui/rules/actions.md + scripts/check-skills-token-ratchet.mjs, .changeset/39203-skills-action-notices.md
Security-touching: no
Rule-change-verified: none

① Derived judgments

This is a delta of the contract review of head 598aa3a43f7d1c70a2c17132e4188b89c4dc84b0 (PASS with should-fix S1 open). Read: git diff 598aa3a4..15d0dad3 (one commit, one file, +1 −1) and the check-runs of the new head. The only change is the expected_output string of case 18 in skills/objectstack-i18n/evals/bundles-locales-coverage.json. The other six files of the PR are byte-identical to the reviewed head, so the earlier judgments on the notices bullet, the i18n key-map entry, ui eval #29, the ratchet row and its ruling (6513306068) stand unchanged.

Findings of the earlier record, by id:

  • S1: closed. The reference answer's last sentence now reads "Not a messages id, and never keyed by the notice's position." in place of "and not an index (notices.0)". Neither must_not_contain token (notices.0, notices[0]) occurs in the case's expected_output any more; every must_contain token and both must_contain_any groups are still met by it. The assertions and the prompt are untouched, so the case's hash (prompt and token lists; expected_output is neither sent nor graded) is the one the dev's live round ran, and that 2/2 reading still applies. The file parses; 18 cases, ids unique. The reworded sentence is still true to the spec: the map is keyed by name, never by position.
  • N1: nit, accepted deviation, unchanged (preflight: "only" now carried by the key map alone; the strict schema refuses any other key).
  • N2: nit, carried (the visible bullet names only the record; features shows through the notice example). Follow-up at most.

Ratchet at this head: exit 0; skills/objectstack-ui/rules/actions.md 4062 / 4062 and skills/objectstack-i18n/SKILL.md 2243 / 2243, both as reviewed. Eval fixtures are measured, not priced.

No new finding in the delta.

② Semver level

  • Unchanged: '@objectstack/skills': patch, Clause-②: no, Metadata-protocol: none. The delta edits one eval fixture's reference answer and needs no changeset line of its own.

③ Boundary flags

  • Landing order unchanged: notices is still planned on origin/main 1d82054a; the PR is a draft with no auto-merge armed and is held by the seat until the console PR of Invite user: the dialog does not warn that mail is not configured; the invite is created and only then reported as undeliverable #39045 flips the row to live. Not a finding.
  • Check-runs on 15d0dad3 were still running at the time of this read (41 listed: 4 success, 18 skipped, 15 in progress, 4 queued; none failed). The seat reads the settled result before landing.
  • Rule change, security, author (objectstack-fleet[bot]), SQL push-down: as the earlier record; the delta touches none of them.
  • Merges clean onto origin/main 1d82054a.

④ Design judgment

  • skills/objectstack-i18n/evals/bundles-locales-coverage.json [WIP] Add support for default language configuration #18: the case now grades an answer written like its reference as a pass, and still fails an answer that keys a notice by index. Fixing the reference rather than loosening the token keeps the assertion's reach.

No must-fix, no should-fix. Two nits carried.

Implemented-by: claude/project-thread-ccizn0
Reviewed-by: session_01Utp6CaQsbKBMQtm6Tpsamd

VERDICT: PASS

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 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.

skills: teach the action notices key (dialog notice before submit) in objectstack-ui and objectstack-i18n

2 participants