From 402e7b861acad233cc21f629a129a6410ad0e1b7 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 02:52:05 +0000 Subject: [PATCH] docs(skills): ui router names action files by the registry suffix The Actions row's In column said src/actions/*.actions.ts; the action type registry declares **/*.action.ts and `os generate action` writes NAME.action.ts. Name that first and *.actions.ts second (a barrel import loads either). Paid by one same-file restatement cut in Trap 3; the token-ratchet row follows the file down 2279 -> 2272. Claude-Session: https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7 Co-authored-by: Claude --- .changeset/35284-ui-router-action-suffix.md | 12 ++++++++++++ scripts/check-skills-token-ratchet.mjs | 11 ++++++++++- skills/objectstack-ui/SKILL.md | 5 ++--- 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 .changeset/35284-ui-router-action-suffix.md diff --git a/.changeset/35284-ui-router-action-suffix.md b/.changeset/35284-ui-router-action-suffix.md new file mode 100644 index 00000000000..a6ebdd9193c --- /dev/null +++ b/.changeset/35284-ui-router-action-suffix.md @@ -0,0 +1,12 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): the objectstack-ui router names action files by the suffix the platform writes + +Clause-②: no +Metadata-protocol: none + +The Actions row of the `objectstack-ui` routing table pointed at `src/actions/*.actions.ts`. The metadata type registry declares `**/*.action.ts` for actions and `os generate action` writes `src/actions/NAME.action.ts`, so an agent reading a project's actions by that glob missed every generated file. The row now names `src/actions/*.action.ts` first and `*.actions.ts` second: a project loads its actions through the barrel its `objectstack.config.ts` imports, so a plural file the barrel names loads as well. + +Trap 3 keeps its pointer to the Dashboards rule and drops the list of widgets, datasets and charts after it, which the routing table already sends to that rule. diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index b8d6ab2ecd2..0f8553566ad 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -968,7 +968,16 @@ export const CEILINGS = new Map([ // letter B): 9128 bytes (9108 priced) -> 9133 (9113 priced) -> 2279 tokens, pinned AT // the measurement, zero headroom. // ceil(($(wc -c < skills/objectstack-ui/SKILL.md) - 20) / 4) == ceil(9113 / 4) - ['skills/objectstack-ui/SKILL.md', 2279], + // 2279 -> 2272 (#35284): the Actions row's In column names the suffix the registry + // declares and `os generate action` writes (`**/*.action.ts`, metadata-plugin.zod.ts; + // `metadataFileName`), then `*.actions.ts`, which loads too when the actions barrel + // imports it (+15 bytes). PAID DOWN FIRST by one restatement cut from this file: Trap + // 3's "before writing any widget, dataset or chart" restates the subjects the routing + // table's dashboards row sends to the same rule file, so the pointer reads "first" + // (-41 bytes). Net shrink, so no raise: the ceiling follows the file down to the + // measurement, 9133 bytes (9113 priced) -> 9107 (9087 priced) -> 2272 tokens. + // ceil(($(wc -c < skills/objectstack-ui/SKILL.md) - 20) / 4) == ceil(9087 / 4) + ['skills/objectstack-ui/SKILL.md', 2272], // 8333 -> 6193: RE-LOCK at the landed count after the #19715 split (decision // batch #213 item 1, maintainer 「1 2 4 同意」): the worked R1, the report // template and the v17-canonical shapes block moved VERBATIM into diff --git a/skills/objectstack-ui/SKILL.md b/skills/objectstack-ui/SKILL.md index 51662210342..8b20f36e2ea 100644 --- a/skills/objectstack-ui/SKILL.md +++ b/skills/objectstack-ui/SKILL.md @@ -62,8 +62,7 @@ Two more: [List Views](#list-views), [Actions](#actions). without one has no analytics face. A dataset is narrow: a window, a to-many rollup or a computed dimension is a stored field or app code, never forced into one; an ad-hoc chart in a `kind: 'react'` page needs none. Read - [Dashboards](./rules/dashboards.md#dataset-bound-widgets) before writing any - widget, dataset or chart. + [Dashboards](./rules/dashboards.md#dataset-bound-widgets) first. 4. **A filter token is presentation scope, not security.** `{current_user_id}`, `{today}` and the rest (vocabulary: objectstack-query → `rules/filters.md`, load it before writing one; an unrecognised token is a build error) decide @@ -82,7 +81,7 @@ Two more: [List Views](#list-views), [Actions](#actions). | A form (`simple` / `tabbed` / `wizard`): width, columns and `sections`; master-detail (a parent with line items), a public form, field conditional rules | `src/views/*.view.ts` | [Form Views](./rules/list-views.md#form-views) | | An app and its navigation; who sees or opens it; object nav, a `filters` slice or an interface page | `src/apps/*.app.ts` | [Navigation](./rules/navigation.md) | | What a record page shows: related lists, a slotted or full page, drawer or page | the object | [Record Page](./rules/record-page.md) | -| A button or operation: `locations`, visibility, dialog and toast copy, params, new tab, the body's `ctx`, refusing by code (`refusals`) | `src/actions/*.actions.ts` | [Actions](./rules/actions.md) | +| A button or operation: `locations`, visibility, dialog and toast copy, params, new tab, the body's `ctx`, refusing by code (`refusals`) | `src/actions/*.action.ts`, `*.actions.ts` | [Actions](./rules/actions.md) | | A number, chart, KPI or report over records: datasets, widgets, dashboard filters, `compareTo`, date bucketing, drilldown, cubes | `src/datasets/*.dataset.ts`, `src/dashboards/*.dashboard.ts`, `src/reports/*.report.ts` | [Dashboards](./rules/dashboards.md) | | A page (regions, components, print, `kind: 'html'` / `'react'` source, styling) or package docs | `*.page.ts`, `src/docs/*.md` | [Pages & Docs](./rules/pages.md) | | The props of a block in a `kind: 'react'` page | | [react-blocks.md](./references/react-blocks.md) |