Skip to content

Commit ab1c734

Browse files
docs(skills): objectstack-ui SKILL.md becomes a router (#35077)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBLW6dHPW6sSheA32XPKZzPV)_ Part-of #34770 Clause-②: no Metadata-protocol: none Served-tier: CONTRACT_REVIEW_TIER Part of #34770, part 1 of 3: `objectstack-ui` only. The card stays open for the other skills; this PR carries no closing keyword. ## 维护者速读 - **改了什么**:`skills/objectstack-ui/SKILL.md` 从 15,704 字节 / 304 行降到 8,974 字节 / 164 行,只留三样:动手前的四项检查、七条「能过 schema、运行时才出错」的陷阱(五条列在 Traps 下,另两条放在云端按标题读取的 `List Views` 和 `Actions` 两节里)、一张「做什么就打开哪个文件」的路由表。搬走的文字落进 `rules/` 下已有的四个文件(大段原样搬,个别表格压成一句),没有新增文件,没有删掉任何一条教学。第二轮另改一句:运行环境 `GET /api/v1/meta/types` 给出的是解析后的形状,不是书写用的契约。第三轮按评审改了五处小错:`separator` 不带 `label` / `icon`;`os validate` 其实拦得住一条陷阱;从 main 漏掉的两个短语补回;路由表里表单宽度一项归到表单那一行;changeset 里旧锚点的去向写对。 - **为什么改**:裁决记录 6943107981 的 S3 = A 定了目标:入口文件是路由器(6–9 KB,最多 500 行),键表和选项表指向契约而不是再抄一遍。AI 每次加载这个 skill 都要读完入口文件,入口越短,越早读到真正相关的那份规则。 - **风险与回滚**:风险在「搬家后 AI 找不到」。第一轮实测同一模型前后各跑一轮 32 个用例:带 skill 26/32 → 26/32,没有变差;第二轮调整了结构(两条陷阱挪到各自标题下),没有重跑,见 Tests。每个用例的答案所在文件都能从路由表走到(见下表,已按最终 head 重算)。云端按标题原文读取本 skill 的三节(triage 读数 6966635524),三个标题在本 head 各恰好出现一次,见 Acceptance notes 第 1 条。与另一张在途 PR #35087 在门禁脚本的 `rules/actions.md` 那一行有文本冲突(两边都改同一行上限),后合并的一方需按实测重写该行。回滚 = revert 这一个 PR,只涉及文档和一个门禁脚本里的数字。 - **先看**:① `skills/objectstack-ui/SKILL.md`(整篇重写,重点看 Traps 五条加 `List Views`、`Actions` 两节是否够用、是否有该留没留的);② `skills/objectstack-ui/rules/list-views.md` 末尾新增的 Form Views / Master-Detail Forms / Field Conditional Rules 三节(从入口文件原样搬来);③ `scripts/check-skills-token-ratchet.mjs` 的六行 objectstack-ui 上限(四行因接收搬入文字而上调,两行下调)。 - **两分钟验证**:`node scripts/check-skills-token-ratchet.mjs`,预期末行 `✓ check-skills-token-ratchet: 58 authored bundle file(s) within their ceilings`,其中 `skills/objectstack-ui/SKILL.md` 一行读作 2239 / 2239。 - **需要你做的**:合并。云端标题读取的核对结果已有(triage 读数 6966635524:云端读本 skill 三节,三个标题在本 head 各恰好出现一次,见 Acceptance notes 第 1 条和 Seat rulings);landing tier 实测为 H(人合):`skills/**` 六个文件命中受管面;低风险 skills 放权臂不适用,因为 diff 含门禁脚本 `scripts/check-skills-token-ratchet.mjs`,它不在该臂的允许名单内。 ## What changes `skills/objectstack-ui/SKILL.md` becomes a router. Frontmatter (lines 1–25, `description` included) is byte-identical to main. - **First checks (4).** The installed `@objectstack/spec` version against the skill's `compatibility` line; the object's declaration and the project's own files; the type's contract (`references/_index.md` → the Zod source under `node_modules/@objectstack/spec/src/`, which decides what to write; a running environment serves the parsed shape as JSON Schema at `GET /api/v1/meta/types`, `entries[].schema`, where a defaulted key reads as required and a bare-string predicate as `{}`); `os validate` before reporting done. - **Traps (7), each parses and then fails at run time.** Five are listed under Traps: a long form stays `simple`; a record with its line items is `inlineEdit` on the child's `master_detail` field, and `enable.apiMethods` must list `'bulk'`; a persisted chart binds a declared dataset; a filter token is presentation scope, not security; the object declares its record page. Two sit under the headings the cloud serves: keep the view kind the request names (`### List Views`, with the nine kinds), and an operation is an `action` whose write button must call the API (`## Actions`). - **Where to go.** One table: what is being authored, the file it lives in, the rules file to open. - **Three enumerations stay inline**, under their exact headings: `### Navigation Item Types`, `### Action Types`, `## Report Types`. `scripts/check-skill-identifier-liveness.mjs` binds each to this file by heading, and that script is outside this part's file surface. - **Two sections the hosted cloud serves by exact heading keep real content**: `### List Views` and `## Actions`, at the heading levels main has. Round 2 put them back; see Acceptance note 1. Text that left `SKILL.md` landed in files that already existed: | File | Bytes before → after | What it received | |:--|:--|:--| | `rules/list-views.md` | 13,776 → 17,790 | `## Form Views` (the three-type table, the long-form paragraph, the public form), `## Master-Detail Forms (parent + child line items)`, `## Field Conditional Rules in Forms`; the column-count pitfall | | `rules/navigation.md` | 8,727 → 10,255 | `App.create` / `defineStack({ apps })`, the one-App-per-package paragraph, each item type's keys (`label` and `icon` on all but `separator`) with the `componentRef` registry-key gloss, `requiresObject` / `requiresService`, the `AppContextSelector` note | | `rules/actions.md` | 11,231 → 12,123 | What an action is and where it registers; why a record button needs a placement and a `js` body with `api.write`; a bare field ref in `visible` or `disabled` fails `os validate`; a parameterized bulk mutation is `script` | | `rules/dashboards.md` | 24,928 → 25,094 | An omitted widget `layout` auto-flows; `position` is not a widget key; a widget binding that resolves to nothing declared fails `os validate` | | `rules/pages.md` | 22,663 → 22,644 | The relative-date pointer names objectstack-query `rules/filters.md` in place of a `SKILL.md` anchor that no longer exists | ### Every rule that left SKILL.md, and where it is now (a) moved to a file the router routes to · (b) a restated list now served by a contract or index · (c) a check refuses it at publish or build · inline = still in `SKILL.md`. <details> <summary>Disposition table (29 rows)</summary> | What `SKILL.md` held on main | Disposition | Home now | |:--|:--|:--| | List Views kinds table (nine rows) | inline | `### List Views`, the nine kinds as one sentence with a gloss each; contract `ui/view.zod.ts` via `references/_index.md` | | "Keep the kind the request names" | inline | `### List Views` | | Form Views three-type table and the long-form paragraph | (a) + inline | `rules/list-views.md` § Form Views; trap 1 keeps the rule | | Master-Detail Forms (three options, line-item grid behaviour) | (a) + inline | `rules/list-views.md` § Master-Detail Forms; trap 2 keeps `inlineEdit` and the `'bulk'` refusal | | Master-Detail "Read side" pointer | (a) | Routing table, Record Page row | | Field Conditional Rules in Forms | (a) | `rules/list-views.md` § Field Conditional Rules in Forms; the Form Views routing row names it | | Detailed Rules link list | inline | The routing table | | App Navigation intro, `App.create` | (a) | `rules/navigation.md`, opening | | One App per package | inline + (a) + (c) | § App Navigation lead; whole paragraph in `rules/navigation.md`; `defineStack` refuses a second App | | "Who sees an app" pointer, hide is not gate | inline + (a) | § App Navigation lead; `rules/navigation.md` § Who sees or opens an app | | Navigation Item Types: Type and Purpose columns | inline | Same heading | | Navigation Item Types: Properties column | (a), (b) | "Keys by type" sentence in `rules/navigation.md` (`label` and `icon` on all but `separator`, as the column had it); contract `ui/app.zod.ts` | | Navigation Item Types: three Purpose glosses (`componentRef` is a registry key; no `reportName` is the report index; `doc` inherits the docs audience) | (a) | `rules/navigation.md` (keys sentence; the example's `nav_report` comment) and `rules/pages.md` (the docs audience gate) | | `requiresObject` / `requiresService` note | (a) | `rules/navigation.md` | | Report Types table and "no `chart` type" | inline | Same heading | | CRM UI Blueprint: file locations | inline | Routing table, "In" column | | CRM UI Blueprint: public-form row | (a) | `rules/list-views.md` § Form Views | | CRM UI Blueprint: dataset row | inline | Trap 3 | | CRM UI Blueprint: User actions row (`flow` for orchestration, `script` for parameterized bulk mutations) | inline + (a) | The `flow` row of the inline Action Types table; `rules/actions.md`, opening | | Date Macros: scope is not security; unrecognised token is a build error | inline | Trap 4 | | Date Macros: the token vocabulary | (b) | objectstack-query `rules/filters.md`, named in trap 4 | | Date Macros: `AppContextSelector` bullet | (a) | `rules/navigation.md` | | Actions intro; Action Types "Required field" column | (a) + inline | `rules/actions.md` opening; the column is the sentence "Every type but `script` requires `target`" under the inline table | | Operation is an action; a write button must write | inline + (a) | `## Actions`, directly under the heading; placement and capability detail in `rules/actions.md` | | Common Pitfall 1 (column count, `link: true`) | (a) | `rules/list-views.md` § Column Features | | Common Pitfall 2 (`position` on a widget) | (c) + (a) | The widget schema is closed and rejects `position` by name at `os validate` / `os build`; the `layout` auto-flow clause is in `rules/dashboards.md` | | Verify your work: the gate | inline | First check 4 | | Verify your work: the two things it catches (a bare field ref in an action `visible` / `disabled` or a field `visibleWhen`; a widget binding that resolves to nothing declared) | (a) + (c) | `rules/actions.md` (the `disabled` bullet, for both action predicates), objectstack-data `SKILL.md` § Verify your work (the field predicate, reached from `rules/list-views.md` § Field Conditional Rules in Forms) and `rules/dashboards.md` (Dataset-Bound Widgets); `os validate` refuses all three | | References | inline | First check 3 | </details> ## Tests ### Skill evals, before and after, same model Runner `packages/qa/scenarios/src/skill-evals`, `--skills objectstack-ui --concurrency 4`, both arms, one repetition, the login's default model (the same served model in both rounds, read from each round's `round.json`). | Round | Tree | Turns | with-skill | no-skill | |:--|:--|:--|:--|:--| | Before | main at `367e324eeb` | 64 of 64 | **26/32 (81%)** | 4/32 (13%) | | After | this branch at `999673c9f0` (round 1's router) | 64 of 64 | **26/32 (81%)** | 4/32 (13%) | Five with-skill cases fail in both rounds: `analytics-inline-vs-dataset#2`, `record-page#2`, `record-page#3`, `views-apps-actions-pages#4`, `views-apps-actions-pages#16`. Two flipped, one each way: - `views-apps-actions-pages#9`: fail → pass. Before, the answer carried the forbidden `disabledMessage` / `disabledTooltip`. - `views-apps-actions-pages#8`: pass → fail. The after answer uses the right form (`'Lead {{ record.name }} reassigned'`) and then quotes the forbidden `${record.name}` inside a sentence telling the reader not to write it. The grader matches literal substrings, so the warning sentence fails the case. The rule it rests on is in `rules/actions.md`, which this PR did not change there. One repetition per round, so a one-case move in either direction is inside the noise this run can see. The count is not lower than before. Both rounds used the runner and the case set of the branch point. #35022 landed on main after they ran: it adds a sentence to four ui prompts, loosens the tokens of `views-apps-actions-pages#16`, adds `triggers.json` (cases that grade the `description`, which this PR does not touch) and changes the runner. A pair of rounds on that newer runner and case set is NOT MEASURED: a new before-round needs main's skill tree in place of this branch's, and the comparison above already holds runner, cases and model constant on both sides. The deterministic check below was redone on the newer case set. **The final head is only PARTLY MEASURED on the runner.** The fresh pair is in PR comment 6967475147. Its AFTER round stopped at 32 of 71 turns on the runner's rate-limit guard, so all 19 `views-apps-actions-pages` cases (the ones this restructure touches most) are NOT MEASURED. Full numbers and the not-measured list are in that comment. After the pair above, round 2 changed `SKILL.md` again at `32fa1759a0`: one sentence of first check 3, the view-kind and write-button traps moved under `### List Views` and `## Actions` (below the routing table), the nine kinds came back inline, and four short restatements moved to rules files. No rule left the bundle, and the deterministic check below was redone at the final head. Round 3 at `7fe6fb7ade` changed one sentence of first check 4, two routing rows, and wording in `rules/navigation.md` and `rules/actions.md`. ### Reachability, case by case (deterministic) For each of the 32 cases: the file that states what `expected_output` relies on, and the route from `SKILL.md`. A literal-token comparison of the two bundles (main at `3b4ffb2217` against the final head `7fe6fb7ade`, the case set as it is on main now: 32 cases, 112 `must_contain` tokens) found 0 tokens present before and absent after. 9 tokens are in neither bundle, the same 9 on main as here. <details> <summary>32 cases</summary> | Case | Home of the facts | Route from SKILL.md | |:--|:--|:--| | analytics-inline-vs-dataset #1–#4, #6–#9 | `rules/dashboards.md` (Dataset-Bound Widgets, dashboard filters, `compareTo`, date bucketing) | Trap 3; Dashboards row | | analytics-inline-vs-dataset #5 | `rules/dashboards.md`, `references/react-blocks.md` | Trap 3; Dashboards and react-blocks rows | | record-page #1, #2 | `rules/record-page.md` | Trap 5; Record Page row | | record-page #3 | `rules/record-page.md`, `rules/pages.md` (Component Catalogue) | Trap 5; Record Page and Pages rows | | report-period-export #1 | `rules/dashboards.md` § Report Configuration | Dashboards row; inline Report Types | | views #1, #7, #12 | `rules/list-views.md` | List Views row | | views #2 | `rules/navigation.md` | § App Navigation lead; Navigation row | | views #3, #8, #9, #11, #16, #18 | `rules/actions.md` | § Actions; Actions row | | views #4 | `rules/pages.md` | Pages row; inline nav table (`doc`) | | views #5 | `rules/navigation.md` (Run Modes) | Navigation row; inline Report Types | | views #6 | `rules/list-views.md` § Form Views, § Master-Detail Forms | Trap 2; Form Views row | | views #10 | `rules/navigation.md` | Inline nav table; Navigation row | | views #13 | `rules/list-views.md` § Adding a board | § List Views | | views #14 | `rules/actions.md` | § Actions in `SKILL.md` (the full body is inline) | | views #15 | `SKILL.md` § List Views (the kinds sentence, inline) | § List Views | | views #17 | `rules/navigation.md` § Who sees or opens an app | § App Navigation lead | | views #19 | `rules/list-views.md` § Form Views | Trap 1 | </details> No file under `skills/objectstack-ui/evals/` is in this PR's diff, and this PR adds or changes no eval token. ### Sizes | Reading | main at `1282a464e9` (merge base) | This head `7fe6fb7ade` | |:--|:--|:--| | `skills/objectstack-ui/SKILL.md` | 15,704 bytes · 304 lines · 3,921 tokens | 8,974 bytes · 164 lines · 2,239 tokens | | All 12 `SKILL.md` files | 246,741 bytes · 4,729 lines | 240,011 bytes · 4,589 lines | | `skills/objectstack-ui/**` | 155,814 bytes | 155,665 bytes | | Catalog, `skills/**` (105 files) | 1,058,853 bytes | 1,058,704 bytes | The ratchet at the final head prints ratcheted authored 191,202 / 196,701 and a bundle total of 262,260 tokens. This PR's own delta against main's rows: authored tokens −36, sum of ceilings −48. Tokens are the ratchet's own measure, `ceil(utf8 bytes / 4)`, with the release-stamp line left out of a `SKILL.md`. ### Ratchet rows changed | Row | Before | After | Bytes | |:--|--:|--:|:--| | `skills/objectstack-ui/SKILL.md` | 3921 | 2239 | 15,704 → 8,974 | | `skills/objectstack-ui/rules/list-views.md` | 3451 | 4448 | 13,776 → 17,790 (+4,014) | | `skills/objectstack-ui/rules/navigation.md` | 2184 | 2564 | 8,727 → 10,255 (+1,528) | | `skills/objectstack-ui/rules/actions.md` | 2808 | 3031 | 11,231 → 12,123 (+892) | | `skills/objectstack-ui/rules/dashboards.md` | 6232 | 6274 | 24,928 → 25,094 (+166) | | `skills/objectstack-ui/rules/pages.md` | 5669 | 5661 | 22,663 → 22,644 (−19) | Round 2 moved five of these again, each to its measurement: `SKILL.md` 2241 → 2240 (not raised), `list-views.md` 4532 → 4448, `navigation.md` 2552 → 2564, `actions.md` 3016 → 3032, `dashboards.md` 6249 → 6274. Round 3 raised none: `SKILL.md` 2240 → 2239, `actions.md` 3032 → 3031, `navigation.md` stays 2564 (its fix was paid inside the file). Every row is pinned at the measurement, zero headroom, and its comment in the script says what moved from where. Authority for the four raises: decision record 6943107981, S3 = A, 「三点都同意,按最终计划把后续里程碑的卡全部立出来」, whose S3 target reads "a router-sized `SKILL.md` (6–9 KB, at most 500 lines) … pointers to the contract instead of restated lists"; and the standing ruling of 2026-10-27, 「A:先削重复,余额按实测提高」 (record 6513306068). The raises are text ordered out of the entry file, by measured bytes; the six changed files together are 149 bytes smaller than before. ## Acceptance notes 1. **The cloud reads three sections of this skill by exact heading text; all three are in place.** Triage's reading 6966635524 on this PR (cloud main `aa67666f9`, `packages/service-ai-studio/src/skills/published-refs.ts`): the cloud serves `List Views` and `Actions` from `SKILL.md` and `Adding a board, calendar, gallery or gantt beside the list` from `rules/list-views.md`, and its module load throws unless each heading occurs exactly once in its file. Round 1 had moved `List Views` out; round 2 keeps it as `### List Views` with the nine kinds and the keep-the-kind rule, and puts the write-button rule directly under `## Actions` so that section has text of its own above the Action Types table. Each heading is at the level main has it, and each count is 1 at `7fe6fb7ade` (outputs in Verification). The cloud repository itself is still unreadable from this session; the reading is triage's. Other headings that left `SKILL.md` and that the reading does not name: `### Form Views`, `### Master-Detail Forms (parent + child line items)`, `### Field Conditional Rules in Forms`, `## Detailed Rules`, `## CRM UI Blueprint (Metadata-First)`, `## Date Macros — Filter Placeholders`, `## Common Pitfalls`, `## Verify your work`, `## References`. 2. **The catalog total is nearly flat (−149 bytes).** The card's budget is on `SKILL.md`; this part moved text behind the router and did not delete teaching, so the catalog does not shrink. 3. **`SKILL.md` is 8,974 bytes, at the top of the 6–9 KB band, with its ratchet row never raised after round 1 (2241 → 2240 → 2239).** About 1.9 KB of it is the three bound enumeration tables and about 1.9 KB the two cloud-served sections. Moving the tables to `rules/` needs the `file` of three bindings in `scripts/check-skill-identifier-liveness.mjs` re-pointed, which is outside this part's surface; `### Action Types` sits inside the cloud-served `## Actions` section. 4. **Forms did not get a file of their own.** A new `rules/forms.md` needs a new ratchet row, which the ratchet marks maintainer-only; the form text went to `rules/list-views.md`, the file that already teaches the `defineView` container. If a separate file is wanted, it is a follow-up with that row. 5. **Old anchors.** `SKILL.md#date-macros--filter-placeholders`, `#master-detail-forms-parent--child-line-items`, `#form-views`, `#common-pitfalls` and `#verify-your-work` no longer exist; `#view-types`, `#list-views` and `#actions` do. The one in-repo link to a removed anchor (`rules/pages.md`) is re-pointed; `check:skill-links` and `check:doc-anchors` read the tree. 6. **Overlap, earlier.** #35022 edited `skills/objectstack-ui/evals/*` and landed while this was in progress; this PR touches no file there and main merged in without conflict. `overlap-check` against main and the open PR heads sharing a file (#35038, #33849): clean (see Verification). 7. **Overlap with #35087 (open, draft).** It adds teaching to `skills/objectstack-ui/rules/actions.md` and moves that file's ratchet row; `overlap-check` at `7fe6fb7ade` reports a conflict in `scripts/check-skills-token-ratchet.mjs` (the file itself merges cleanly). Whichever of the two lands second rewrites the `rules/actions.md` row at its measurement. The round-3 commit was pushed with that verdict standing; the conflict comes from the row this PR has changed since round 1, not from round 3. ### Seat rulings on the open questions (seat 3, 2026-11-18 01:52Z) - **Note 1 (cloud heading reads): route A.** The seat asked triage on #32588 for a reading from a seat with cloud access: which of the eleven moved headings the cloud reads, and from which file. That reading is a condition before merge, and the seat's L2 and Tier H record carry it. No stub headings go back into `SKILL.md` unless the reading names a heading the cloud uses. - **Note 3 (bound enumeration tables): stay inline** in this part. - **Note 4 (forms): taught in `rules/list-views.md`**, no new `rules/forms.md`. - **Evals.** At 01:52Z the seat accepted the round 1 pair (26/32 before and after, on the runner and case set from before #35022). At 02:08Z the seat changed that ruling: a fresh pair on the final head is owed. The fresh pair is PR comment 6967475147, and it is partial. Its AFTER round stopped at 32 of 71 turns on the runner's rate-limit guard, so the 19 `views-apps-actions-pages` cases are NOT MEASURED at `7fe6fb7ade`. ## Verification ### Round 3, head `7fe6fb7ade` One commit over `32fa1759a0`, answering the seat's L2 (6967027549). Exit codes captured before any pipe. - **S1**, `rules/navigation.md`: the keys sentence said every item type takes `label` and `icon`. Checked against `packages/spec/src/ui/app.zod.ts` first: `SeparatorNavItemSchema` is a strict object of `type`, `id`, `order`. The sentence now reads "`label`, `icon` on all but `separator`"; paid inside the file (10,256 → 10,255 bytes, row stays 2564). - **N1**, first check 4: "Most traps below pass it" (the persisted-chart trap fails `os validate`). - **N2**, `rules/actions.md`: the bare-field-ref sentence sits on the `disabled` bullet and covers `visible` and `disabled`; "A parameterized bulk mutation is `script`" is back. Paid inside the file (12,126 → 12,123 bytes). - **N3**, the changeset: `#common-pitfalls` points at `rules/list-views.md` (Column Features) and `rules/dashboards.md`. - **N4**, the routing table: form width, columns and `sections` are on the Form Views row. The three headings the cloud reads, again: ```text grep -c -E '^#{1,6} List Views$' skills/objectstack-ui/SKILL.md -> 1 grep -c -E '^#{1,6} Actions$' skills/objectstack-ui/SKILL.md -> 1 grep -c -E '^#{1,6} Adding a board, calendar, gallery or gantt beside the list$' skills/objectstack-ui/rules/list-views.md -> 1 ``` Gates, all exit 0 at `7fe6fb7ade`: `node scripts/check-skills-token-ratchet.mjs` and its `--self-test` (104 cases pass), `check:skill-links`, `check:skill-identifier-liveness`, `check:skill-docs`, `check:doc-anchors`, `check:nul-bytes`, `check:ratchet-remedy-authority`, `check:skill-compatibility`, `check:skill-frame-sync`, `check:doc-authoring`, `check:published-files`, `check:pm-skill-id-lint`, `check-self-test-wired`. The rest of the derived list was not re-run for this commit: declared narrowing, CI runs it. ```text skills/objectstack-ui/SKILL.md 2239 / 2239 (+0) skills/objectstack-ui/rules/actions.md 3031 / 3031 (+0) skills/objectstack-ui/rules/dashboards.md 6274 / 6274 (+0) skills/objectstack-ui/rules/list-views.md 4448 / 4448 (+0) skills/objectstack-ui/rules/navigation.md 2564 / 2564 (+0) skills/objectstack-ui/rules/pages.md 5661 / 5661 (+0) skills/objectstack-ui/rules/record-page.md 991 / 991 (+0) ratcheted (authored) 191202 / 196701 (-5499) bundle total (whole shipped tree) 262260 ✓ check-skills-token-ratchet: 58 authored bundle file(s) within their ceilings; 10 generator-owned file(s) and 36 eval fixture(s) measured, not ratcheted. overlap-check: claude/issue-34770-skill-router-ui (7fe6fb7) changes 8 file(s); against origin/main (3b4ffb2) and 2 PR head(s) ✓ origin/main: merges cleanly ✗ #35087 (shares scripts/check-skills-token-ratchet.mjs, skills/objectstack-ui/rules/actions.md): conflicts in scripts/check-skills-token-ratchet.mjs ✓ #33849 (shares skills/objectstack-ui/SKILL.md): merges cleanly VERDICT overlap exit 1 ``` ### Round 2, head `32fa1759a0` One commit over `5ed57cc3bb`. Exit codes captured before any pipe. The three headings the cloud reads (Acceptance note 1), one `grep -c` each: ```text grep -c -E '^#{1,6} List Views$' skills/objectstack-ui/SKILL.md -> 1 grep -c -E '^#{1,6} Actions$' skills/objectstack-ui/SKILL.md -> 1 grep -c -E '^#{1,6} Adding a board, calendar, gallery or gantt beside the list$' skills/objectstack-ui/rules/list-views.md -> 1 ``` Their lines at this head are `### List Views`, `## Actions` and `### Adding a board, calendar, gallery or gantt beside the list`, the same levels as on main. Gates, all exit 0 at `32fa1759a0`: `node scripts/check-skills-token-ratchet.mjs` and its `--self-test` (104 cases pass), `check:skill-links`, `check:skill-identifier-liveness`, `check:skill-docs`, `check:doc-anchors`, `check:nul-bytes`, `check:ratchet-remedy-authority`, `check:skill-compatibility`, `check:skill-frame-sync`, `check:doc-authoring`, `check:published-files`, `check:pm-skill-id-lint`, `check-self-test-wired`. The rest of the derived list was not re-run for this commit: declared narrowing, CI runs it. ```text skills/objectstack-ui/SKILL.md 2240 / 2240 (+0) skills/objectstack-ui/rules/actions.md 3032 / 3032 (+0) skills/objectstack-ui/rules/dashboards.md 6274 / 6274 (+0) skills/objectstack-ui/rules/list-views.md 4448 / 4448 (+0) skills/objectstack-ui/rules/navigation.md 2564 / 2564 (+0) skills/objectstack-ui/rules/pages.md 5661 / 5661 (+0) skills/objectstack-ui/rules/record-page.md 991 / 991 (+0) ratcheted (authored) 191204 / 196703 (-5499) bundle total (whole shipped tree) 262262 ✓ check-skills-token-ratchet: 58 authored bundle file(s) within their ceilings; 10 generator-owned file(s) and 36 eval fixture(s) measured, not ratcheted. overlap-check: claude/issue-34770-skill-router-ui (32fa175) changes 8 file(s); against origin/main (a3e216e) and 2 PR head(s) VERDICT clean exit 0 ``` The served-schema sentence was checked against main before it was written: `packages/metadata-protocol/src/erased-authoring-mark.ts` states that `/meta/types` serves the output derivation and that the input derivation was refused, and `protocol.meta-types-degenerate-derivation.test.ts` pins that. ### Round 1, head `5ed57cc3bb` Round 1's head `5ed57cc3bb` (two merges of main over `ec50963b9d`; main moved twice while the gates ran). Exit codes were captured before any pipe. **Derived list.** `node scripts/pm/dispatch-gates.mjs --commands` printed 66 commands (the list is the same before and after the first merge). All 66 ran at `dcd4b72985`: 65 exit 0, 1 exit 3. Reconciliation: `✓ dispatch-gates --ran: 66 derived famil(ies) accounted for — 65 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).` - NOT MEASURED: `pnpm check:dual-build-cjs-loads`, exit 3, "Run `pnpm build` first": it needs a full build, which this change does not owe locally. Left to CI. - The dist-reading gates (`check:skill-docs`, `check:doc-formula-expressions`, `check:dts-closure`, `check:sourcemap-no-sources-content`) read a `@objectstack/lint...` closure rebuilt under the verify lock at `dcd4b72985`: `VERDICT command-exit 0`. **Re-run at the final head `5ed57cc3bb`** (the second merge brought main's edit to the ratchet script and 23 files under `skills/**`, none of them a file this PR changes). 18 commands, all exit 0: the ratchet and its self-test, `check:ratchet-remedy-authority`, `check:skill-links`, `check:skill-identifier-liveness`, `check:skill-compatibility`, `check:skill-frame-sync`, `check:skill-docs`, `check:doc-formula-expressions`, `check:pm-skill-id-lint`, `check:doc-authoring`, `check:nul-bytes`, `check:published-files`, `check-self-test-wired`, `check-changeset-no-major`, `check-empty-changeset`, `check:doc-anchors`, `check:scripts-symbol-anchors`. The other 48 derived commands were not re-run on the second merge: declared narrowing, CI runs them on the merge ref. <details> <summary>Verdict lines</summary> ```text ✓ check-skills-token-ratchet self-test: 104 cases pass. skills/objectstack-ui/SKILL.md 2241 / 2241 (+0) skills/objectstack-ui/rules/actions.md 3016 / 3016 (+0) skills/objectstack-ui/rules/dashboards.md 6249 / 6249 (+0) skills/objectstack-ui/rules/list-views.md 4532 / 4532 (+0) skills/objectstack-ui/rules/navigation.md 2552 / 2552 (+0) skills/objectstack-ui/rules/pages.md 5661 / 5661 (+0) skills/objectstack-ui/rules/record-page.md 991 / 991 (+0) ratcheted (authored) 191236 / 196735 (-5499) bundle total (whole shipped tree) 262294 ✓ check-skills-token-ratchet: 58 authored bundle file(s) within their ceilings; 10 generator-owned file(s) and 36 eval fixture(s) measured, not ratcheted. ✅ check-doc-anchors: 1050 internal #fragment link(s) across 498 source file(s) all resolve to a real heading ✅ Skill docs in sync overlap-check: claude/issue-34770-skill-router-ui (5ed57cc) changes 8 file(s); against origin/main (1282a46) and 2 PR head(s) VERDICT clean exit 0 ``` </details> **Landing tier.** `node scripts/pm/check-governed-merges.mjs --branch claude/issue-34770-skill-router-ui`: `landing tier: H(人合)`, `skills/** ×6 — the published skills catalog`; 600 changed lines (+335 / −265) over 8 files at round 1; +336 / −257 at `32fa1759a0`; +340 / −257 at `7fe6fb7ade`. The tool reads the low-risk skills arm as NOT MEASURED without a pull request number; by its own allowlist the arm cannot apply, since `scripts/check-skills-token-ratchet.mjs` is neither under a catalog row nor a rider path. **Not run locally, CI's:** type-check lanes, `Build Core`, `Test Core`, the repo lint, the dogfood battery (no `!` in the title and no narrowing arm, so not owed here). <!-- signed: repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3c535ee commit ab1c734

8 files changed

Lines changed: 340 additions & 257 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-ui's SKILL.md is a router: first checks, run-time traps, where each rule lives
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-ui/SKILL.md` goes from 15.7 KB to 9.0 KB and now holds three things. No rule's teaching changes; text moved, and the page says where it went.
11+
12+
- **First checks.** The installed `@objectstack/spec` version against the skill's `compatibility` line; the object's declaration and the project's own view, app, action and dataset files; the type's contract (`references/_index.md` points at the Zod source in `node_modules/@objectstack/spec/src/`, which decides what to write; a running environment serves the parsed shape as JSON Schema at `GET /api/v1/meta/types`, where a defaulted key reads as required); `os validate` before reporting done.
13+
- **Seven traps that parse and then fail at run time.** A long form stays `simple`; a record with its line items is `inlineEdit` on the child's `master_detail` field (and `enable.apiMethods` must list `'bulk'`); a persisted chart binds a declared dataset; a filter token is presentation scope, not security; the object declares its record page. Two keep their own headings: `List Views` (keep the view kind the request names, with the nine kinds) and `Actions` (an operation is an `action` whose body calls the API).
14+
- **Where to go.** One table from the task to the file to open: list views, form views, navigation, record page, actions, dashboards and reports, pages and docs, and the React-tier block contract.
15+
16+
The Navigation Item Types, Action Types and Report Types tables stay in `SKILL.md`, with the item and action keys behind their homes.
17+
18+
Where the rest moved, each under its old heading text:
19+
20+
- `rules/list-views.md` now carries **Form Views** (the three types, the long-form paragraph, the public form), **Master-Detail Forms (parent + child line items)** and **Field Conditional Rules in Forms**, plus the column-count pitfall under Column Features.
21+
- `rules/navigation.md` opens with `App.create`, the one-App-per-package rule, each navigation item type's keys (`label` and `icon` on every type but `separator`), `requiresObject` / `requiresService` and the `AppContextSelector` note.
22+
- `rules/actions.md` opens with what an action is, where it is registered, and why a record button needs a placement and a `js` body with `api.write`; a bare field ref in `visible` or `disabled` fails `os validate`, and a parameterized bulk mutation is `script`.
23+
- `rules/dashboards.md` says an omitted widget `layout` auto-flows, `position` is not a widget key, and a widget binding that resolves to nothing declared fails `os validate`.
24+
- `rules/pages.md` points at objectstack-query `rules/filters.md` for relative-date placeholders.
25+
26+
A reader who linked `SKILL.md#date-macros--filter-placeholders`, `#master-detail-forms-parent--child-line-items`, `#form-views`, `#common-pitfalls` or `#verify-your-work` finds those headings gone from `SKILL.md`: the first is trap 4 and objectstack-query `rules/filters.md`; the second and third are in `rules/list-views.md`; `#common-pitfalls` is in `rules/list-views.md` (Column Features) and `rules/dashboards.md`; `#verify-your-work` is first check 4, with what the gate catches in `rules/actions.md` and `rules/dashboards.md`.

‎scripts/check-skills-token-ratchet.mjs‎

Lines changed: 79 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,27 @@ export const CEILINGS = new Map([
917917
// above; same standing ruling (record 6513306068). 15569 bytes (15549 priced) -> 15704
918918
// (15684 priced) -> 3921 tokens, pinned AT the measurement, zero headroom.
919919
// ceil(($(wc -c < skills/objectstack-ui/SKILL.md) - 20) / 4) == ceil(15684 / 4)
920-
['skills/objectstack-ui/SKILL.md', 3921],
920+
// 3921 -> 2239 (#34770 part 1, the entry file becomes a router; decision record
921+
// 6943107981, S3 = A, whose target reads "a router-sized `SKILL.md` (6–9 KB, at most 500
922+
// lines)" with "pointers to the contract instead of restated lists"): LOWERED. The entry
923+
// keeps four first checks (the installed version, what the project already has, the
924+
// type's contract, `os validate`), the run-time traps, the routing table, the two
925+
// sections the hosted cloud serves by exact heading (`### List Views`: the nine kinds and
926+
// the keep-the-kind rule; `## Actions`: the write-button rule and the Action Types
927+
// table), and the three Leg 2 enumerations `check-skill-identifier-liveness` binds to
928+
// this file by heading (`### Navigation Item Types`, `### Action Types`,
929+
// `## Report Types`). What left, and its home: Form Views, Master-Detail Forms and Field
930+
// Conditional Rules in Forms -> `rules/list-views.md`; the App intro, the one-App-per-
931+
// package paragraph, the nav-item keys column and the `requiresObject` /
932+
// `AppContextSelector` notes -> `rules/navigation.md`; the action intro and the
933+
// placement / write-discarded detail -> `rules/actions.md`; what `os validate` catches
934+
// (a bare field ref, an unresolved widget binding) -> `rules/actions.md` and
935+
// `rules/dashboards.md`; the `layout` auto-flow clause -> `rules/dashboards.md`. The
936+
// Detailed Rules list and the CRM blueprint are the routing table now. 15704 bytes
937+
// (15684 priced) -> 8974 (8954 priced) -> 2239 tokens; the ceiling follows the file down
938+
// to the measurement, the ratchet's ordinary direction.
939+
// ceil(($(wc -c < skills/objectstack-ui/SKILL.md) - 20) / 4) == ceil(8954 / 4)
940+
['skills/objectstack-ui/SKILL.md', 2239],
921941
// 8333 -> 6193: RE-LOCK at the landed count after the #19715 split (decision
922942
// batch #213 item 1, maintainer 「1 2 4 同意」): the worked R1, the report
923943
// template and the v17-canonical shapes block moved VERBATIM into
@@ -1329,7 +1349,23 @@ export const CEILINGS = new Map([
13291349
// half carries it: the file is 11106 -> 11231 bytes -> 2808 tokens, zero headroom before,
13301350
// ceiling +31, pinned AT the measurement.
13311351
// ceil($(wc -c < skills/objectstack-ui/rules/actions.md) / 4) == ceil(11231 / 4)
1332-
['skills/objectstack-ui/rules/actions.md', 2808],
1352+
// 2808 -> 3031 (#34770 part 1): RECEIVES text the router split moved out of SKILL.md,
1353+
// no new teaching: from § Actions the two-sentence intro (what an action is, where it is
1354+
// registered, a link back to the Action Types table) and the placement / write detail
1355+
// the entry's Actions section no longer spells (`objectName` folds the action into
1356+
// record surfaces, `rowActions` / `bulkActions` name it, the two lint codes, why the
1357+
// body is `js` and why it declares `api.write`); from § Verify your work one sentence
1358+
// on the `disabled` bullet (a bare field ref in `visible` or `disabled`, `done` for
1359+
// `record.done`, fails `os validate`); from the CRM blueprint's User actions row, that a
1360+
// parameterized bulk mutation is `script`. The file is 11231 -> 12123 bytes (+892) ->
1361+
// 3031 tokens, zero headroom before, ceiling +223, pinned AT the measurement. Authority: the ruling of record that
1362+
// orders the entry file down to router size, decision record 6943107981 S3 = A (this
1363+
// header: a ruling of record that orders text into a file authorises its own measured
1364+
// delta), quoted in the PR body beside the standing 2026-10-27 ruling
1365+
// 「A:先削重复,余额按实测提高」 (record 6513306068). The seven hand-authored
1366+
// objectstack-ui files net -149 bytes across the move (100990 -> 100841).
1367+
// ceil($(wc -c < skills/objectstack-ui/rules/actions.md) / 4) == ceil(12123 / 4)
1368+
['skills/objectstack-ui/rules/actions.md', 3031],
13331369
// 6090 -> 6252 (#19715, card item 4): a 5-line table of contents at the top,
13341370
// anchors to the file's existing headings, nothing else changed. +162 tokens,
13351371
// zero headroom to absorb any of it, ceiling +162. Maintainer ruling
@@ -1355,7 +1391,16 @@ export const CEILINGS = new Map([
13551391
// `DATASET_INVALID` at compile); paid by the `compareTo` paragraph's restated "no second
13561392
// widget-side vocabulary" sentence and the `DatasetSchema` source pointer that
13571393
// `references/_index.md` already carries; 24926 bytes -> 6232 tokens, zero headroom.
1358-
['skills/objectstack-ui/rules/dashboards.md', 6232],
1394+
// 6232 -> 6274 (#34770 part 1): RECEIVES two clauses from SKILL.md, no new teaching.
1395+
// From § Common Pitfalls 2: an omitted widget `layout` auto-flows, and `position` is not
1396+
// a widget key (the closed schema refuses it by name, which is why the rest of that
1397+
// pitfall left the skill). From § Verify your work: a widget naming a `dataset` /
1398+
// `dimensions` / `values` that resolves to nothing declared (an empty chart) fails
1399+
// `os validate`. The file is 24928 -> 25094 bytes (+166) -> 6274 tokens, zero headroom
1400+
// before, ceiling +42, pinned AT the measurement. Authority as the `rules/actions.md`
1401+
// row above.
1402+
// ceil($(wc -c < skills/objectstack-ui/rules/dashboards.md) / 4) == ceil(25094 / 4)
1403+
['skills/objectstack-ui/rules/dashboards.md', 6274],
13591404
// 3011 -> 3141 (#19715, card item 4): a 5-line table of contents at the top,
13601405
// anchors to the file's existing headings, nothing else changed. +132 tokens,
13611406
// of which the row's 2 tokens of headroom absorb 2; the CEILING moves 130.
@@ -1384,7 +1429,20 @@ export const CEILINGS = new Map([
13841429
// SKILL.md row above: cloud#3659 letter A (6682024726) via record 6513306068, quoted
13851430
// verbatim in the PR body.
13861431
// ceil($(wc -c < skills/objectstack-ui/rules/list-views.md) / 4) == ceil(13802 / 4)
1387-
['skills/objectstack-ui/rules/list-views.md', 3451],
1432+
// 3451 -> 4448 (#34770 part 1): RECEIVES the form half of SKILL.md § View Types, moved
1433+
// whole and no new teaching: `## Form Views` (the three-type table, the long-form
1434+
// paragraph, the public-form row of the CRM blueprint as one sentence), `## Master-Detail
1435+
// Forms (parent + child line items)` and `## Field Conditional Rules in Forms`, each
1436+
// under its SKILL.md heading text; one table-of-contents line for them; and Common
1437+
// Pitfalls 1 as one sentence under Column Features. This file already teaches the
1438+
// `defineView` container the form views live in, so they did not need a file of their
1439+
// own. The list half stays in SKILL.md under `### List Views`, the section the hosted
1440+
// cloud serves by that heading. Dropped on the way, with a home: the "Read side" pointer
1441+
// (the entry's routing table names Record Page). The file is 13776 -> 17790 bytes
1442+
// (+4014) -> 4448 tokens, the row's 7 tokens of headroom absorbed, ceiling +997, pinned
1443+
// AT the measurement. Authority as the `rules/actions.md` row above.
1444+
// ceil($(wc -c < skills/objectstack-ui/rules/list-views.md) / 4) == ceil(17790 / 4)
1445+
['skills/objectstack-ui/rules/list-views.md', 4448],
13881446
// 2273 -> 2196 (#27059): LOWERED. The Surface bullet points at `rules/record-page.md`,
13891447
// says create / edit is a modal or the `editMode: 'page'` route, and the Overlay-width
13901448
// bullet moved there whole (the `size` bucket, the deprecated pixel keys); the ceiling
@@ -1393,15 +1451,30 @@ export const CEILINGS = new Map([
13931451
// list are English (the shipped skill text is English-only), and the bullet's repeated
13941452
// objectui ADR-0055 citation (the section heading carries it) is gone; the ceiling follows
13951453
// the file down to the measurement (8734 bytes).
1396-
['skills/objectstack-ui/rules/navigation.md', 2184],
1454+
// 2184 -> 2564 (#34770 part 1): RECEIVES SKILL.md § App Navigation, no new teaching:
1455+
// the `App.create` / `defineStack({ apps })` sentence, the one-App-per-package paragraph
1456+
// whole, the Navigation Item Types table's Properties column as one keys-by-type
1457+
// sentence (`label` and `icon` on every type but `separator`, as that column had it)
1458+
// with the `componentRef` registry-key gloss (the type and purpose columns stay
1459+
// in SKILL.md, where the Leg 2 binding reads them), the `requiresObject` /
1460+
// `requiresService` callout, and the `AppContextSelector` bullet of § Date Macros. The
1461+
// file is 8727 -> 10255 bytes (+1528) -> 2564 tokens, the row's 2 tokens of headroom
1462+
// absorbed, ceiling +380, pinned AT the measurement. Authority as the `rules/actions.md`
1463+
// row above.
1464+
// ceil($(wc -c < skills/objectstack-ui/rules/navigation.md) / 4) == ceil(10255 / 4)
1465+
['skills/objectstack-ui/rules/navigation.md', 2564],
13971466
// 5501 -> 5692 (#19715, card item 4): a 5-line table of contents at the top,
13981467
// anchors to the file's existing headings, nothing else changed. +191 tokens,
13991468
// zero headroom to absorb any of it, ceiling +191. Maintainer ruling
14001469
// 2026-09-22 on decision batch #213 item 1, verbatim and untranslated:
14011470
// 「1 2 4 同意」.
14021471
// 5692 -> 5669 (#27059): LOWERED. The `tabs`-slot sentence is a one-line pointer at
14031472
// `rules/record-page.md`; the ceiling follows the file down to the measurement (22673 bytes).
1404-
['skills/objectstack-ui/rules/pages.md', 5669],
1473+
// 5669 -> 5661 (#34770 part 1): LOWERED. The variable-substitution note points at the
1474+
// owner of the relative-date vocabulary (objectstack-query `rules/filters.md`) in place
1475+
// of the SKILL.md § Date Macros anchor the router no longer has; the ceiling follows the
1476+
// file down to the measurement (22644 bytes).
1477+
['skills/objectstack-ui/rules/pages.md', 5661],
14051478
// objectstack-ui `rules/record-page.md` — the sixth rules file, ordered by card #27059
14061479
// (record-page epic #26676 child 8, dispatched by ui seat 1 2026-11-01, with the seat's
14071480
// ruling that the record page gets its own rules file rather than rows in the files

0 commit comments

Comments
 (0)