Skip to content

Commit 9e4eabb

Browse files
docs(skills): the objectstack-ui router names action refusals (#35279)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg1XdbbGasMNVx41tq3hZKV4)_ Fixes #35178 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:`objectstack-ui` 技能入口路由表的 Actions 行加上「refusing by code (`refusals`)」,与 `rules/actions.md` 该节标题同词;同文件 First checks 第 3 条删去一处复述(": it decides what to write"),token 棘轮该行 2277 → 2279。 - 为什么改:规则文件已教授动作的 `refusals` 声明(按码拒绝并返回翻译后的消息),但路由表没提,找「动作被拒时的提示」的模型不会被导向该规则。 - 风险与回滚:只动发布技能的一行路由文字、一处删句、棘轮一行与 changeset;无运行时影响。回滚 = revert 本 PR。 - 先看:① `skills/objectstack-ui/SKILL.md` 路由表 Actions 行与 First checks 第 3 条(被删的从句是否确属复述);② `scripts/check-skills-token-ratchet.mjs` 的 objectstack-ui SKILL.md 行注释与 +2 上调。 - 两分钟验证:`node scripts/check-skills-token-ratchet.mjs`,预期 `skills/objectstack-ui/SKILL.md is 2279 tokens (ceiling 2279; headroom 0)` 且末行 ✓。 - 需要你做的:审阅并合并(`skills/**` 属 Tier H 受管面)。 ## What changes - `skills/objectstack-ui/SKILL.md`, routing table: the Actions row ("A button or operation: `locations`, visibility, dialog and toast copy, params, new tab, the body's `ctx`") gains ", refusing by code (`refusals`)" — the words of `rules/actions.md`'s heading "Refusing by code (`refusals`)" — so a model looking for a refused action's message is routed to that rule (+31 bytes). - Same file, paid down first: First checks 3 drops ": it decides what to write" (-26 bytes), which restates First checks 1's "where they differ, the installed contract is right". The paragraph is reflowed over the same four lines (a re-wrap moves no bytes and pays nothing). - `scripts/check-skills-token-ratchet.mjs`: the `skills/objectstack-ui/SKILL.md` row moves by the measured remainder, 2277 -> 2279, pinned AT the measurement (zero headroom), with its row note. - `.changeset/35178-ui-router-names-refusals.md`: `@objectstack/skills` patch, carrying both declaration lines. 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. Ratchet row: 9128 bytes (9108 priced) / 2277 tokens -> 9133 bytes (9113 priced) / 2279 tokens; measured remainder +2, `ceil((9133 - 20) / 4) == 2279`. Skill size readings (tree `objectstack-ai/objectstack`, base `f4dbcc21` -> head `8254c29b`): | Reading | Before | After | |:--|--:|--:| | `skills/objectstack-ui/SKILL.md` lines | 169 | 169 | | `skills/objectstack-ui/SKILL.md` bytes / priced tokens | 9128 / 2277 | 9133 / 2279 | | All published `skills/*/SKILL.md` lines (sum) | 4830 | 4830 | | All published `skills/*/SKILL.md` bytes (sum) | 253765 | 253770 | ## Tests Text-only change to served skill text and one ratchet row; no tested behaviour changed, so no ablation. <details><summary>Token ratchet, gate and self-test (head 8254c29)</summary> ``` node scripts/check-skills-token-ratchet.mjs -> exit 0 ✓ check-skills-token-ratchet: skills/objectstack-ui/SKILL.md is 2279 tokens (ceiling 2279; headroom 0). ✓ check-skills-token-ratchet: 59 authored bundle file(s) within their ceilings; 10 generator-owned file(s) and 38 eval fixture(s) measured, not ratcheted. node scripts/check-skills-token-ratchet.mjs --self-test -> exit 0 ✓ check-skills-token-ratchet self-test: 104 cases pass. ``` Before re-pinning the row, the same gate read `2279 / 2277 (+2)` and exited 1 — the remainder this PR carries. </details> ## Acceptance notes - `Most traps below pass it.` (First checks 4) sits next to the Traps heading "each parses, then fails at run time"; not cut, because passing `os validate` is a wider claim than parsing. - The frontmatter description lists `*.action.ts` while the routing table's In column says `src/actions/*.actions.ts`; `examples/` uses both spellings (2 vs 1). Noted only. ## Verification Local gate union derived by `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` at head `8254c29b` (3 paths, 67 commands); every family CI runs is read from this PR's check-runs. <details><summary>Local run, reconciled with --ran (head 8254c29)</summary> ``` Run reconciliation — 67 derived, 65 run, 2 NOT-MEASURED, 0 UNRUN. ✓ dispatch-gates --ran: 67 derived famil(ies) accounted for — 65 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3). ``` - 65 run, exit 0, including `check:skill-docs`, `check:skill-served-sections` (24 served sections, 10 JSON fences pass), `check:skill-identifier-liveness`, `check:skill-links` (267 links, 138 fragments), `check:doc-authoring`, `check:pm-skill-id-lint`, `check:nul-bytes`, `check:doc-formula-expressions` (after building the `@objectstack/lint` closure), `check:pm-dispatch-gates` (fast tier, 2249 cases). - `pnpm --filter @objectstack/spec run check:skill-refs` -> exit 0, "9 generated files in sync with packages/spec": no skill generator output changes. - NOT MEASURED: `check:dual-build-cjs-loads`, `check:lean-entry-closure`, reason: PREREQUISITE NOT MET (exit 3) — they load every package's built `dist/`, which this docs-only diff does not build; CI runs them. - No package `test` / `typecheck` owed: the diff touches no package source. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7 Co-authored-by: Claude <noreply@anthropic.com>
1 parent abb40ae commit 9e4eabb

3 files changed

Lines changed: 25 additions & 6 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the `objectstack-ui` routing table sends a refused action's message to its rule
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The Actions row of the `objectstack-ui` routing table now names `refusals` in the words of the rule's heading, "refusing by code (`refusals`)", so an agent looking for how an action refuses with a declared code and a translated message opens `rules/actions.md`. First checks 3 loses a clause that restated First checks 1.

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,16 @@ export const CEILINGS = new Map([
959959
// paragraph. Raise path: ruling record 6513306068, letter B, 「A:先削重复,余额按实测提高」. 8974 -> 9128 bytes (8954 -> 9108 priced); the row
960960
// moves +38, the measured remainder, pinned AT the measurement.
961961
// ceil(($(wc -c < skills/objectstack-ui/SKILL.md) - 20) / 4) == ceil(9108 / 4)
962-
['skills/objectstack-ui/SKILL.md', 2277],
962+
// 2277 -> 2279 (#35178): the Actions row of the routing table names `refusals` in the
963+
// words of `rules/actions.md`'s heading ("refusing by code (`refusals`)", +31 bytes), so
964+
// a model looking for a refused action's message is sent to that rule. PAID DOWN FIRST
965+
// by one restatement cut from this file: First checks 3's ": it decides what to write"
966+
// (-26 bytes) restates First checks 1's "the installed contract is right". Remainder
967+
// raised under the standing ruling 「A:先削重复,余额按实测提高」 (record 6513306068,
968+
// letter B): 9128 bytes (9108 priced) -> 9133 (9113 priced) -> 2279 tokens, pinned AT
969+
// the measurement, zero headroom.
970+
// ceil(($(wc -c < skills/objectstack-ui/SKILL.md) - 20) / 4) == ceil(9113 / 4)
971+
['skills/objectstack-ui/SKILL.md', 2279],
963972
// 8333 -> 6193: RE-LOCK at the landed count after the #19715 split (decision
964973
// batch #213 item 1, maintainer 「1 2 4 同意」): the worked R1, the report
965974
// template and the v17-canonical shapes block moved VERBATIM into

‎skills/objectstack-ui/SKILL.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ metadata:
3636
go). Add beside what is there; reuse a declared dataset, field group or view.
3737
3. **Read the type's contract.** [references/_index.md](./references/_index.md)
3838
points at each type's Zod source in `node_modules/@objectstack/spec/src/`.
39-
`Read` it for exact keys, enum members and refusals, never from memory: it
40-
decides what to write. A running environment serves the parsed shape as
41-
JSON Schema (`GET /api/v1/meta/types`, `entries[].schema`): a defaulted
42-
key reads as required and a bare-string predicate as `{}`.
39+
`Read` it for exact keys, enum members and refusals, never from memory. A
40+
running environment serves the parsed shape as JSON Schema
41+
(`GET /api/v1/meta/types`, `entries[].schema`): a defaulted key reads as
42+
required and a bare-string predicate as `{}`.
4343
4. **Verify before reporting done.** `os validate` (`npm run validate` in a
4444
scaffolded project; `os build` runs the same gates). Most traps below pass
4545
it.
@@ -82,7 +82,7 @@ Two more: [List Views](#list-views), [Actions](#actions).
8282
| 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) |
8383
| 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) |
8484
| What a record page shows: related lists, a slotted or full page, drawer or page | the object | [Record Page](./rules/record-page.md) |
85-
| A button or operation: `locations`, visibility, dialog and toast copy, params, new tab, the body's `ctx` | `src/actions/*.actions.ts` | [Actions](./rules/actions.md) |
85+
| 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) |
8686
| 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) |
8787
| A page (regions, components, print, `kind: 'html'` / `'react'` source, styling) or package docs | `*.page.ts`, `src/docs/*.md` | [Pages & Docs](./rules/pages.md) |
8888
| The props of a block in a `kind: 'react'` page | | [react-blocks.md](./references/react-blocks.md) |

0 commit comments

Comments
 (0)