Repository navigation
docs(skills): objectstack-ai no longer teaches an authored AI button on a record page - #37937
Conversation
…on a record page The subsection that taught the AI action type on a record page leaves skills/objectstack-ai/SKILL.md with its os:check example (ADR-0160 D6, "Entry point": the shell's entry is the only one). One sentence stands in its place. Eval case 10 keeps its prompt and expects no authored action. The file's token-ratchet row follows the measurement down, 6799 to 6617. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwetA7wdKM2c8khHDC
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i L1-c, the seat's L1 thread · 2026-11-27T12:15Z — the brief handed to the isolated contract reviewer whose record follows, posted for the seat to read before adopting it. Contract review brief — PR #37937 @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i Contract reviewServed-tier: Read for this record: card #37857 (body and its two comments, the claim 7217200370 and the os-dev-report 7217889058), PR #37937 (body, four-file list, net diff against Check-runs on ① Derived judgments
② Semver level
Clause-②: no ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
No changed hunk teaches permission, sharing, credential, token, authentication or other security behaviour. The removed text spoke of tool exposure (
Nits (no effect on correctness or the contract):
Conditions on adopting this PASS, none of them a finding on the diff: the five running check-runs named above conclude green on this head; the card stays open for the two Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i L1-c, the seat's L1 thread · 2026-11-27T12:26Z 席位核对 — L1 @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Recorded 2026-11-27T12:27Z.
席位意见:可以合。删除范围对得上卡:示例代码那一行正是 C1 分支上技能示例检查报红的 SKILL.md:188;技能文本净减 22 行,token 棘轮行同步下调;changeset 为 席位核对 — ACCEPT · repo:objectstack#3 · head
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU 维护者速读
|
…-q0nzop Conflict: scripts/check-skills-token-ratchet.mjs, the objectstack-ai row. Main lowered it 6799 -> 6795; this branch had lowered it 6799 -> 6617. Both comments are kept and the row is re-measured on the merged file: 6613. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwetA7wdKM2c8khHDC
…r the merge with main Main lowered the row to 6795 while this branch was open, so the changeset's own figures (6799 to 6617) no longer described the diff. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwetA7wdKM2c8khHDC
…-q0nzop Conflict: scripts/check-skills-token-ratchet.mjs, the objectstack-ai row. Main lowered it 6795 -> 6791; this branch held it at 6613. Both comments are kept and the row is re-measured on the merged file: 6609. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwetA7wdKM2c8khHDC
…r the second merge with main Main lowered the row to 6791 while this branch was open, so the changeset's figures (6795 to 6613) no longer described the diff. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwetA7wdKM2c8khHDC
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i L1-c, the seat's L1 thread · 2026-11-27T14:28Z 席位核对 — L1 delta @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i Contract reviewServed-tier: Delta record, merge-only round. It follows the record on head Check-runs on ① Derived judgments
② Semver levelUnchanged: Clause-②: no ③ Boundary flagsNothing new is raised by the merges. The earlier answers stand: option A for the two ④ Design judgmentNo must-fix, no should-fix. The two The earlier record's three nits (N1, the entry named only by its zh-Hans label; N2, the forbidden tokens miss a JSON-form action; N3, the single Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Seat record, 2026-11-27T15:11Z: this PR's landing condition was not held. The contract record accepted the interim state on
|
…bjectstack-ai#37947) repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoEfAeSobHZgSLfHP3844ZfC)_ Part of objectstack-ai#37895 This is PR 1 of 2 on that card. It lands before objectstack-ai#36495 (draft PR objectstack-ai#37929), so that objectstack-ai#37929's `check:skill-examples` and `check:skill-served-sections` go green. PR 2, the teaching of the new words, stays behind objectstack-ai#36495. Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:写应用的 AI 助手读到的六个按钮示例,不再写明按钮放在哪里;说明文字和位置对照表一字未动,也没有教任何新词。 - 为什么做:这是「按钮位置改用新词」这项工作的前置一步。旧的位置词即将退役,这六个示例不先让路,那项改动的两道示例检查过不了。 - 出错会怎样:照抄示例的人会得到一个哪里都不显示的按钮,校验时有一条提醒告诉他补上位置;本改动只删了几行,可以直接撤回。 - 要你做什么:在「按钮位置改用新词」那项改动之前合并本改动(技能包属于要你亲手合并的范围)。 ## What changes Six checked examples in the published skills drop their `locations` key. Eight old words leave compiled text; no word is added. (A seventh, `ask_about_contract` in `skills/objectstack-ai/SKILL.md`, left with C1s objectstack-ai#37937, which deleted its whole Ask AI block; see the update below.) | File | Example | Line on the base | Words dropped | |:--|:--|:--|:--| | `skills/objectstack-ui/SKILL.md` | `mark_done`, § Actions, JSON fence 1 | 136 | `record_header` | | `skills/objectstack-ui/rules/actions.md` | `crm_reassign_lead` (os:check) | 69 | `record_header`, `list_item` | | `skills/objectstack-ui/rules/actions.md` | `crm_convert_lead` (os:check) | 96 | `record_header`, `list_item` | | `skills/objectstack-ui/rules/actions.md` | `crm_print_a3` (os:check) | 180 | `record_header` | | `skills/objectstack-ui/rules/actions.md` | `crm_open_invoice_pdf` (os:check) | 205 | `record_header` | | `skills/objectstack-ui/rules/actions.md` | `crm_add_invoice_line` (os:check) | 239 | `record_header` | Two more files move because the gates measure them as owed: - `scripts/check-skills-token-ratchet.mjs`: two rows follow their files down to the measurement (2264 to 2256, 3890 to 3844). The gate refuses a ceiling above its file's measurement. The `objectstack-ai` row is `main`'s own (6609) after the merges below. - `.changeset/37895-skills-action-examples-no-location-key.md`: a `patch` for `@objectstack/skills`, which ships the catalog. Not changed: every sentence, the location table (`actions.md` lines 17 to 26), the `actionLayout` paragraph, `actions.md` line 222, `skills/objectstack-formula/SKILL.md`, `skills/objectstack-ui/rules/record-page.md` and the eval fixtures. None of them is compiled, and they are PR 2's. ## Why On objectstack-ai#37929's branch the action location vocabulary is `list`, `record`, `record_page`, `record_row`, `record_related`, `record_section`. On main it is `list_toolbar`, `list_item`, `record_header`, `record_more`, `record_related`, `record_section`. The only words both accept are `record_related` and `record_section`, and neither means a record-header button. So each example drops the key instead of taking a word with a different meaning. ## Size of the published skills | Reading | Lines before | Lines after | Tokens before | Tokens after | |:--|--:|--:|--:|--:| | `skills/objectstack-ai/SKILL.md` | 487 | 486 | 6799 | 6791 | | `skills/objectstack-ui/SKILL.md` | 165 | 165 | 2264 | 2256 | | `skills/objectstack-ui/rules/actions.md` | 266 | 261 | 3890 | 3844 | | Bundle: all 14 `SKILL.md` files | 4959 | 4958 | 65451 | 65435 | | Authored files the ratchet prices | n/a | n/a | 199689 | 199627 | Net change under `skills/`: 1 line added, 7 removed. Tokens are the ratchet's own count, `ceil(utf8 bytes / 4)` with the release-stamp line left out. ## Tests **Update at head `78295ae3`.** Two real merges of `main` (`d7c3960e`, then `e5898ad9` on `4de4e3e9`) and one changeset commit. Net diff against `main`: 4 files, +18 / −8, `skills/` net −5. The two `objectstack-ui` rows measure 2256 and 3844 on the merged tree. `check:skill-examples` exits 0 with 351 examples (the one that left is Ask AI). `check:skill-served-sections`, the ratchet and its `--self-test` exit 0. Merge delta reports are on objectstack-ai#37895; the review records are on this PR. The size table and readings below are the first measurement and still count the `objectstack-ai` row. The readings below are at head `661e8e90`, on base `f926dfab` (origin/main when the worktree was made). <details> <summary>Main-based tree: the two spec gates and the token ratchet</summary> - `pnpm --filter @objectstack/spec run check:skill-examples`: exit 0. `352 prose examples type-check across 3 surface(s)`. - `pnpm --filter @objectstack/spec run check:skill-served-sections`: exit 0. `24 served section(s), each heading exactly once in its file (6 json, 2 json+ts, 16 neutral); 10 JSON fence(s) parse and pass their spec validators.` - `node scripts/check-skills-token-ratchet.mjs`: exit 0. `61 authored bundle file(s) within their ceilings`. Before the three rows moved it was exit 1, `3 of 114 published bundle file(s) failed their check`, each row above its measurement (by 8, 8 and 46). - `node scripts/check-skills-token-ratchet.mjs --self-test`: exit 0. `111 cases pass`. - `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 scripts/platform-catalog.test.ts` (the one test file that names the ratchet script): `Test Files 1 passed (1)`, `Tests 20 passed (20)`. </details> <details> <summary>objectstack-ai#37929's branch at e3b2ea9: red before these edits, green with them</summary> Method: a second worktree, detached at `e3b2ea95`. `@objectstack/spec`, `@objectstack/client` and `@objectstack/client-react` were built there (turbo, 47 tasks). The gates ran once on the untouched tree, as the control. Then this PR's `skills/` diff was applied with `git apply`, and the gates ran again. The two `objectstack-ui` files were byte-identical to this PR's head after the apply. - Control, `check:skill-served-sections`: exit 1. `skills/objectstack-ui/SKILL.md § Actions: JSON fence 1 is refused as Action: locations.0`. - Control, `check:skill-examples`: exit 1. Eight `TS2322` errors, at `skills/objectstack-ai/SKILL.md:189:15` and `skills/objectstack-ui/rules/actions.md` 69:15, 69:32, 96:15, 96:32, 180:15, 205:15, 239:15. - With the edits, `check:skill-served-sections`: exit 0. `10 JSON fence(s) parse and pass their spec validators.` - With the edits, `check:skill-examples`: exit 0. `352 prose examples type-check across 3 surface(s)`. The token ratchet on that tree stays red on that branch's own three rows until main, with this PR in it, is merged there. That is not a reading about this PR. </details> <details> <summary>Derived gate families: 68 derived, 67 run, 1 not measured</summary> `node scripts/pm/dispatch-gates.mjs --commands` derived 68 commands for the 5 changed paths. Each was run with its exit code recorded before any pipe, and `--ran` answered: `68 derived famil(ies) accounted for — 67 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)`. - 67 commands: exit 0. - NOT MEASURED: `pnpm check:dual-build-cjs-loads`, reason: exit 3, `PREREQUISITE NOT MET`. It reads the `dist/` of every package and this tree built only the three packages above. The diff changes no package source, so this one is CI's. - `check:skill-examples` is outside the derived list; it was run because the order names it. </details> ## Acceptance notes - **The examples now show an action with no placement.** The text above them still says that an action with neither `locations` nor a list view naming it renders nowhere, and the Ask AI paragraph still says to declare the action in `locations`. An action copied from one of these seven examples as it stands draws the `action-no-placement` warning at `os validate` and no button. No sentence was added to say so: the order set a budget of zero added lines and no new word. PR 2 gives each of the six examples its placement again, in the new words. Carrier: PR 2 on this card. - **The token rows are banked.** The three ceilings are 62 tokens lower in total. When PR 2 writes `locations` back, those three files grow again. The ratchet's header gives one path for a row to go up: restatement cut from the same file first, then the measured remainder, with the standing ruling quoted in the PR body. - **The sibling branch landed first.** C1s objectstack-ai#37937 (`4de4e3e9`) deleted the whole Ask AI block. The merge `e5898ad9` keeps `main`'s `skills/objectstack-ai/SKILL.md` byte for byte, so this PR no longer touches that file, and the ratchet row stays `main`'s 6609. - **Old words that stay.** `git grep` for the four retired words under `skills/` still finds prose, the location table and eval fixtures. They are not compiled and they are PR 2's. - **Main moved after the base.** origin/main went from `f926dfab` to `a3c229ea` during the run. None of the five files changed there and `git merge-tree` reports a clean merge. The readings above were not repeated on the merged tree. ## Verification Read first, by risk: 1. `skills/objectstack-ui/SKILL.md`, the hunk at line 136. This JSON is served to clients by the hosted door, and it is the one example in a section whose headline is that a write button needs a placement. 2. `skills/objectstack-ui/rules/actions.md`, the hunks at lines 69 and 96. Each dropped two words, a header placement and a row placement. 3. `scripts/check-skills-token-ratchet.mjs`, the three rows. Each new number is the gate's own measurement. Two-minute check, no build needed: `pnpm --filter @objectstack/spec run check:skill-served-sections`. Expect the last line to end with `10 JSON fence(s) parse and pass their spec validators.` and exit 0. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No schema changes.) - [x] 2. Every name I added uses the casing for its kind. (No name added.) - [x] 3. No formatter ran. `pnpm lint` is CI's on this PR. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: not touched. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6 --------- Co-authored-by: Claude <noreply@anthropic.com>
…-ai#37924) repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6Jao3kn7MME6XXkhPoFyJyisdQ)_ Fixes objectstack-ai#37856 Fixes objectstack-ai#37827 Clause-②: no (narrowing) Metadata-protocol: narrowed Skills-docs: follow-up objectstack-ai#37857 ## 维护者速读 - 作者和终端用户:记录页、列表行、仪表盘上不再有「问 AI」动作按钮,进入助手只走页头的「问 AI」入口,它自动带上当前记录。 - 属于「问 AI」入口专题:按维护者裁定,在 19.0.0 正式版之前撤掉只在预发布版出现过的这个动作类型。 - 已写了这种动作的作者会在校验时看到一句处方;升级命令能删的自动删,被引用的留给作者手删;库里已存的这种动作直接不显示,可按名删除。正式版前撤回本 PR 即可恢复。 - 要你做什么:批准合入;请在下一个预发布版之前合入(技能文档那张卡 objectstack-ai#37937 已先合,技能示例检查已绿;next.1 已经带上了技能的改动,本 PR 合入后两边才一致)。 ## What changes ADR-0160 D7, seventh amendment: `ask_ai` leaves `ActionType` before 19.0.0 with no compatibility shim. It was published only on `19.0.0-next.0`. - **Refusal with one prescription** (`packages/spec/src/ui/action-ask-ai-retired.ts`, not barrel-exported) in every slot that takes an action type: `ActionType` (now `enumWithRetiredValues`, so the dashboard header's derived `actionType` refuses it too), a declared or inline action's `type`, `actionType` on `action:button` / `action:icon` rows, and `type` on `action:group` / `action:menu` members. - **ADR-0087 kit**: D2 conversion `action-type-ask-ai-removed` (retired from the load path, `retiredAfter: '18.6.0'`) and D3 entry `ui-action-type-ask-ai-retired`. `ConversionContext.atRest` tells the two doors apart: - over sources (`os migrate meta --from 18`) a declared `ask_ai` action is deleted only when no string anywhere else in the stack names it; a named one stays as written with every reference, and is listed by the D3 entry. (The conversion's `reportTodo` call is not reached in production: `os migrate meta` passes no context, and at rest `keep` is always false. L2 N1, 7218663105.) The conversion never deletes a reference. - at rest (stored rows, built artifacts) every `ask_ai` action, row and member is deleted. - **Stored seam answers "no item"**: `applyConversionsToStoredItem` returns `undefined` when the chain leaves nothing of a row. Its callers in `metadata-protocol` (overlay reads, list drafts, registry hydration, diff load, package duplicate/import), `metadata` (`DatabaseLoader`), `core` (authored translation sync) and `service-datasource` serve and register nothing for such a row. `DatabaseLoader` still reads a row's identity (name, object binding) from the stored body, so the delete door reaches it. `migrateStoredMetadata` lists it `skipped` with `DELETE /api/v1/meta/action/<name>` instead of re-saving it. - **Removed with the type** (revert of b7dee0e, adapted): ActionRunner's ask_ai executor and `setAssistantFocusHandler` / `drawsAction` / `isAskAiAction`; `<ActionProvider onAskAi>` and `useDrawsAction()`; the renderers' drawn-action gates; `useAskAiHandler`; `setChatFocus` and its hosts. The conversation pin from objectstack-ai#36999 stays, set from the composer chip only. objectstack-ai#37827 (the record page dropping the handler) closes because the handler is gone. - `ActionType`'s live members are now the non-exported `ACTION_TYPE_VALUES` array it wraps. `scripts/check-skill-identifier-liveness.mjs` binds the `### Action Types` table to it (the `SeedMode` precedent). This one gate file is outside the claim's file surface; it is the only way that gate can read the enum now. ## Tests - `packages/spec/src/ui/action-ask-ai-retired.test.ts`: the refusal and its path in each slot, with live-type controls. - `packages/spec/src/conversions/action-type-ask-ai-removed.test.ts`: source keeps the named action and deletes the unnamed one, lists the D3 entry, and reports the todo when a context is passed (a test-only path; see above); at rest deletes both; idempotent; stored seam answers `undefined` for an ask_ai `action` row and strips only the action from an object row. - `packages/spec/src/shared/retired-key-removal-version.pin.test.ts`: the conversion joined to its prescriptions (names 19.0.0 and `--from 18`). - `packages/metadata/src/loaders/database-loader-ask-ai-retired-row.test.ts` (real SQLite): load serves nothing, `exists` and `delete` reach the row, and a same-name write keeps the two object bindings apart. Ablation: reading identity through the converted body turns the last case red. - `packages/metadata-protocol/src/protocol.stored-ask-ai-retired-row.test.ts`: the stored pass lists the row `skipped` with the delete door, an apply run writes nothing, the list read serves only the live row. Ablation: removing the skip branch turns two cases red. ## Acceptance notes - **Landing order**: C1s objectstack-ai#37857 (PR objectstack-ai#37937) merged first as `4de4e3e9`, and this branch merged it (`24857955`, head `ffd87c6a`). `check:skill-examples` is green on the merged tree (351 examples). The release PR objectstack-ai#37661 (`30a8047b`, `19.0.0-next.1`) merged between the two, so a next.1 published from that tree has the skills without the `ask_ai` teaching while the spec still parses it. This PR closes that window and should land before the next prerelease. The record is on objectstack-ai#37937. - **Baselines**: `check:api-surface`, `check:authorable-surface` and `check:generated` are green with no baseline file changed. The reference pages under `content/docs/references/` are regenerated (the enum lists lose `ask_ai`). - `git grep -n ask_ai` outside `skills/**`, `docs/adr/**`, `.changeset/pre/` and the CHANGELOGs leaves only the prescription and its two schema call sites, the conversion and its semantic entry, and their tests. The Studio canvas strings (`designer.canvas.askAi*`) are untouched. - `.changeset/pre/37142-ask-ai-action-type.md` and the `setChatFocus` line of `.changeset/pre/36999-conversation-focus.md` are left as written. This PR's changeset carries the correction. Whether the prerelease texts themselves change is for the release owner. - **brightrule**: it declares `brightrule_policy_ask` (`type: 'ask_ai'`) and has to drop it before it moves to a build with this change. It was not booted here, and this repo cannot read its source. The card's acceptance line "brightrule boots on the new version" is a release gate, not a merge gate. It is carried by brightrule's owner, epic:objectstack-ai#5027#1, who gets a Notify with the merge sha on objectstack-ai#37634. ## Verification <details><summary>Readings</summary> - spec: `vitest run` full package 976 files / 29,727 tests, 1 red before the pin join (fixed, 68/68 after); `src/ui src/conversions src/migrations` 224 files / 7,701 tests green. - typecheck green: spec (`tsc` + `check:test-typecheck`), metadata, metadata-protocol, core (+ test typecheck), runtime (+ test typecheck), service-datasource, `@object-ui/core`, `react`, `components`, `plugin-grid`, `plugin-detail`, `app-shell`. - metadata `database-loader.test.ts` + new file: 502 green. metadata-protocol new file: 3 green. - `dispatch-gates.mjs --commands`: 128 commands run. Red found and fixed: `check:generated` / `check:test-typecheck` (stored seam's `undefined` in 4 existing tests), `check:skill-identifier-liveness`, `check:engine-double-contract` (ledger `--write`), `check:objectql-double-limit`, `check:test-source-alias`. Prerequisites cleared: `check:published-readme-exports`, `check-plugin-teardown-shape --self-test`. Still red: `check:skill-examples` (order above). - dogfood battery on the final head `ffd87c6a`: passed under the verify lock (VERDICT command-exit 0), 490 test files passed and 3 skipped, 4144 tests passed and 68 skipped, 0 failed. This is the CI command with no shard. The os-dev-report for this head is 7222528251. </details> Two-minute check: `pnpm --filter @objectstack/spec exec vitest run src/ui/action-ask-ai-retired.test.ts src/conversions/action-type-ask-ai-removed.test.ts`. Expect 2 files green. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK --------- Co-authored-by: Claude <noreply@anthropic.com>
…k_ai (objectstack-ai#38226) <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6Jao3PpF4t89AvwzCmzVRuQMwV)_ Fixes objectstack-ai#37857 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:写界面元数据的作者(以及替他写的 AI)查界面技能文档里的「动作类型」表时,不再看到已经下线的「问 AI」动作类型;表下那句「哪些类型必须填目标」同步去掉了它。应用的使用者无感。 - 为什么做:「问 AI 入口改造」专题已定全站只留页头的「问 AI」一个入口,页面不再自己声明 AI 按钮;这个动作类型已从平台撤掉,这是技能文档里剩下的最后两行。 - 出错会怎样:只改了两行文档和一行额度账;删错的话,作者照文档会少知道一种动作类型,撤回这一个合并即可恢复。 - 要你做什么:批准这个受管的技能文档改动。 ## What changes This is the second and last pull request on the card. The first, objectstack-ai#37937 (the `objectstack-ai` text and its eval case), merged as `4de4e3e9`; objectstack-ai#37924 (the pull request that retired the action type) merged as `9609c137`, the base of this branch. - `skills/objectstack-ui/SKILL.md`, *Action Types*: the `ask_ai` row leaves the table, and the line under the table reads "Every type but `script` requires `target`." (it read "Every type but `script` and `ask_ai` requires `target`."). 1 line added, 2 removed. - `scripts/check-skills-token-ratchet.mjs`: the row of `skills/objectstack-ui/SKILL.md` follows the measurement down, 2262 to 2228, with a three-line note above it. The gate asks for this in the pull request that shrinks the file. - `.changeset/37857-skill-ui-action-types-no-ask-ai.md`: `@objectstack/skills` patch. `skills/**` ships as that package's content. After this, `git grep -n ask_ai -- skills/` prints nothing (exit 1), which is the card's acceptance. **Read first, by risk:** 1. `skills/objectstack-ui/SKILL.md`, the one hunk at line 148: the whole published change. 2. `scripts/check-skills-token-ratchet.mjs`, the one hunk: only the `objectstack-ui` row moves, down, to the measurement. 3. `.changeset/37857-skill-ui-action-types-no-ask-ai.md`: the sentence that ships in the package changelog. **Two-minute verification:** `git grep -n ask_ai -- skills/` prints nothing; then `pnpm check:skill-identifier-liveness && node scripts/check-skills-token-ratchet.mjs` ends with both gates' success lines (quoted under Tests). ## Why ADR-0160, seventh amendment, D6 "Entry point": the entry to the in-app assistant is the shell's 「问 AI」 entry, and no page declares an AI button of its own. D7 retired the `ask_ai` action type, and on `main` `ACTION_TYPE_VALUES` in `packages/spec/src/ui/action.zod.ts` is `script`, `url`, `modal`, `flow`, `api`, `form`. The seat's route for this card (claim amendment 7218076053 on the card) left these two lines for a second pull request after the type left, because the liveness gate held the table to the type's members while the member was still there. The footnote is written from the tree, not from the card: `TARGET_REQUIRED_TYPES` is `ActionType.options` without `script`, so every remaining type but `script` requires `target`. ## Tests Measured at head `47a39aad`, merge base `9609c137` (`origin/main` at dispatch). Published-skills size (lines; tokens in the ratchet's own convention, `ceil(utf8 bytes / 4)`, the release-stamp line not priced): | | before | after | |:--|--:|--:| | `skills/objectstack-ui/SKILL.md`, lines | 165 | 164 | | `skills/objectstack-ui/SKILL.md`, bytes | 9075 | 8937 | | `skills/objectstack-ui/SKILL.md`, tokens | 2262 | 2228 | | all 14 `SKILL.md`, lines | 4953 | 4952 | | ratcheted authored files, tokens | 199880 | 199846 | | whole shipped tree, tokens | 303421 | 303387 | Net lines across `skills/**`: +1 / -2 = -1 (budget: net added lines at most 0). Whole pull request: +15 / -3. <details> <summary>The table binding: green with the row gone, red when a live member's row goes</summary> ```text main 9609c13, file untouched: pnpm check:skill-identifier-liveness :: exit 0 check-skill-identifier-liveness OK — Leg 1: 563 citation(s) over 76 published file(s) ...; Leg 2: 11 registered exhaustive section(s), 0 ledgered gap(s). head 47a39aa, the ask_ai row and its footnote words gone: pnpm check:skill-identifier-liveness :: exit 0 check-skill-identifier-liveness OK — Leg 1: 562 citation(s) over 76 published file(s) ...; Leg 2: 11 registered exhaustive section(s), 0 ledgered gap(s). head 47a39aa with the `form` row also deleted on disk (a probe, restored from HEAD, blob hash identical): node scripts/check-skill-identifier-liveness.mjs :: exit 1 [leg2-missing-row] skills/objectstack-ui/SKILL.md — ### Action Types is registered exhaustive over `ACTION_TYPE_VALUES` (packages/spec/src/ui/action.zod.ts) and does not document `form`. restored: node scripts/check-skill-identifier-liveness.mjs :: exit 0 ``` So on this tree the gate holds the table to `ACTION_TYPE_VALUES`, the live members, and the `ask_ai` row is free to leave. The red reading for deleting that row was taken before the type left, on the first pull request's branch (quoted in objectstack-ai#37937, the first pull request on this card). One reading that differs from what a reader might expect: on `main` the gate was green with the retired row still in the table. It reds on a live member with no row; it did not red on a row for a retired member. </details> <details> <summary>Token ratchet: before, after the text edit, after the row moved</summary> ```text main 9609c13: node scripts/check-skills-token-ratchet.mjs :: exit 0 skills/objectstack-ui/SKILL.md 2262 / 2262 (+0) text edited, row not yet moved: node scripts/check-skills-token-ratchet.mjs :: exit 1 ✗ check-skills-token-ratchet: skills/objectstack-ui/SKILL.md is 2228 tokens; its ratchet ceiling is 2262, above the measurement by 34. ... Lower the row to 2228 in this PR: lowering is shrink-only and is every author's to make, no ruling needed. head 47a39aa: node scripts/check-skills-token-ratchet.mjs :: exit 0 skills/objectstack-ui/SKILL.md 2228 / 2228 (+0) ✓ check-skills-token-ratchet: 61 authored bundle file(s) within their ceilings; 11 generator-owned file(s) and 42 eval fixture(s) measured, not ratcheted. node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0 ✓ check-skills-token-ratchet self-test: 111 cases pass. ``` Hand audit: `ceil((8937 - 27) / 4) = 2228`, 27 being the release-stamp line's bytes. </details> <details> <summary>Skill gates (each exit code captured before any pipe)</summary> ```text pnpm check:skill-links :: exit 0 ✓ check-skill-links: 272 relative link(s) in 76 published skill file(s) resolve; 140 fragment(s) name a real heading under GitHub's slug rule. pnpm check:pm-skill-id-lint :: exit 0 ✓ check-skill-id-lint: 134 file(s) clean pnpm check:skill-compatibility :: exit 0 pnpm check:skill-frame-sync :: exit 0 pnpm --filter @objectstack/spec run check:skill-docs :: exit 0 ✅ Skill docs in sync pnpm --filter @objectstack/spec run check:skill-served-sections :: exit 0 ✓ check-skill-served-sections: 24 served section(s), each heading exactly once in its file (6 json, 2 json+ts, 16 neutral); 10 JSON fence(s) parse and pass their spec validators. pnpm --filter @objectstack/spec run check:skill-examples :: exit 0 (outside the derived list) ✅ 351 prose examples type-check across 3 surface(s) pnpm --filter @objectstack/spec run check:skill-refs :: exit 0 (outside the derived list) ✅ 10 generated files in sync with packages/spec ``` `@objectstack/spec` and the `@objectstack/client-react` closure were built first, under the verify lock (47 turbo tasks, `VERDICT command-exit 0`). </details> <details> <summary>Derived gate list and its reconciliation</summary> ```text node scripts/pm/dispatch-gates.mjs --commands → 68 command(s) node scripts/pm/dispatch-gates.mjs --ran RECORD → ✓ dispatch-gates --ran: 68 derived famil(ies) accounted for — 67 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3). ``` 67 exit 0, among them `check-empty-changeset` ("1 declaring changeset(s) added"), `check-changeset-no-major`, `check-adr-0087-registration`, `check:doc-authoring`, `check:nul-bytes` and `check:pm-dispatch-gates`. NOT MEASURED: `pnpm check:dual-build-cjs-loads`, exit 3, "Run `pnpm build` first. This is NOT a pass: nothing was measured." It needs the whole workspace built; this diff changes no package, so the build was not made for it and CI's run is the reading. </details> <details> <summary>The test that names the edited gate script</summary> ```text pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 scripts/platform-catalog.test.ts Test Files 1 passed (1) Tests 21 passed (21) os-verify-lock: VERDICT command-exit 0 ``` </details> No tested behaviour changes (two lines of published prose, one ceiling row, one changeset), so there is no ablation of a fix; the probe above is a reading of the gate, not of this diff. ## Acceptance notes - The card's acceptance, "`git grep -n ask_ai -- skills/` is empty; skill checks pass", is met at `47a39aad`: the grep exits 1 with no output, and the skill gates are quoted above. - The branch `claude/project-thread-q0nzop` was restarted from `origin/main`. It no longer existed on the remote after objectstack-ai#37937 merged, so it was pushed as a new branch; nothing was force-pushed. - Noted, not acted on here: `chore: version packages (next)` (`9d111a7f`) landed on `main` between the first pull request's merge (`4de4e3e9`) and the type retirement's (`9609c137`), and the registry's `next` tag for `@objectstack/skills` reads `19.0.0-next.2`. The reviews of the first pull request carried a landing condition that no release of that package, a prerelease included, fall between those two merges. That prerelease therefore carries the in-between state: the `objectstack-ai` skill says no page declares an AI button, while the `objectstack-ui` table still lists the type and the type still parses. This pull request and the type retirement close it in the next one. What, if anything, to do about `next.2` is the seat's and the maintainer's. - Not taken: the optional review nit on the first pull request (adding one more forbidden token to eval case 10 in the `objectstack-ai` bundle). It is outside this pull request's file surface. - `content/docs/**` and `packages/**` are untouched. No generated artifact moved: `check:skill-docs` and `check:skill-refs` are in sync without regeneration. ## Verification - Local: the gates above, at `47a39aad`. Repo-wide lint, the full type check, `test:repo` and the dogfood battery are CI's runs and were not repeated locally. No dogfood run is owed: the title has no breaking marker and the declaration has no narrowing arm. - This diff touches `skills/**`, a governed surface: it is opened as a draft and waits for its tier's record. Nothing here readies, queues or arms it. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No schema touched.) - [x] 2. Every name I added uses the casing for its kind. (No name added.) - [x] 3. No formatter ran; `pnpm lint` passes. (No formatter ran; repo-wide lint is CI's run.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (Not touched.) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. (The maintainer summary is in Chinese by the fleet's rule.) - [x] The *Before Submitting* list in CONTRIBUTING.md is done. --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibwetA7wdKM2c8khHDC)_ Co-authored-by: Claude <noreply@anthropic.com>
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Requested by Tesla · project thread
Part of #37857
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
skills/objectstack-ai/SKILL.md: the subsection The Ask AI button under Actions as AI Tools leaves, with itsos:checkdefineActionexample (25 lines). One sentence stands in its place (3 lines):skills/objectstack-ai/evals/skills-tools-knowledge.json: case 10 keeps its id and its prompt (an Ask AI button on the contract record page) and now expects the opposite answer: no action is written, and the answer names the shell's 「问 AI」 entry.must_containis问 AI;must_not_containisdefineAction(andlocations:.scripts/check-skills-token-ratchet.mjs: the row ofskills/objectstack-ai/SKILL.mdfollows the measurement down, 6791 to 6609 after the twomainmerges (first written 6799 to 6617 at7eb79ca6). The gate asks for this in the PR that shrinks the file..changeset/37857-skill-no-authored-ai-button.md:@objectstack/skillspatch.skills/**ships as that package'sdist.Not in this pull request, and why the first line says
Part of.git grep -n ask_ai -- skills/still prints two lines, both inskills/objectstack-ui/SKILL.md(151, the table row; 153, the sentence under the table). They cannot leave before the type does:pnpm check:skill-identifier-livenessholds the Action Types table row for row to the members ofActionType, and onmainthe member is still there. Measured on this branch with the row deleted:The gate's other remedy, a gap entry in its ledger, is marked maintainer-only, so it was not taken. The two lines are restored here byte for byte, and the card stays open for them. The seat decides who deletes them: #37924 itself, where the member leaves, or a second small pull request on this card after #37924 merges.
Why
ADR-0160, seventh amendment (2026-11-27), D6 "Entry point": "the shell's 「问 AI」 button, and no other. Its text is the same in every application, and no application renames it. No page declares an AI button of its own". The maintainer's rulings behind it, as the ADR quotes them: 「"页面里加按钮"的需求 作废」 and 「撤掉 ask_ai(#37834 方案 B)」. The card asks for the teaching to leave the published skills and, where a sentence is needed, for one that says the shell's 「问 AI」 entry carries the current record automatically. The replacement sentence says that and nothing about the parse: what a legacy action meets is #37924's to build and to word.
Landing order
This pull request lands before #37924 (the pull request that retires the action type); both ship in the same release. Reason, measured by the card thread on #37924's head
ca52b5be:pnpm --filter @objectstack/spec run check:skill-examplesis red there with one error,skills/objectstack-ai/SKILL.md:188:3 TS2322, theos:checkexample this pull request deletes, which no longer type-checks onceActionTypeloses the member. With this merged first, that example is gone frommainbefore #37924 needs it gone.Between the two merges
mainholds a skill that says no page declares an AI button while the type still parses, and theobjectstack-uitable still lists it. Both ship together, so no published version carries that state.Tests
Measured at head
7eb79ca6, merge base73d5e347. The head is now06f561f0after two real merges ofmain(b3a4318aand44ba47fe). Each merge resolved the same one-row conflict in the ratchet script, and the row was re-measured on the merged file: 6609. The table below is the first measurement. Delta reports are on #37857: 7219703388 and 7220734911.Published-skills size (lines; tokens in the ratchet's own convention,
ceil(utf8 bytes / 4), stamp line excluded):skills/objectstack-ai/SKILL.md, linesskills/objectstack-ai/SKILL.md, tokensSKILL.md, linesSKILL.md, tokensNet lines across
skills/**: +6 / -28 = -22 (the eval file is +3 / -3).Skill gates (each exit code captured before any pipe)
The last three are outside the derived list and were run because they read
SKILL.md.check:skill-examplesneeded@objectstack/specand the@objectstack/client-reactclosure built first (47 turbo tasks, under the verify lock).Derived gate list and its reconciliation
66 exit 0. NOT MEASURED:
pnpm check:dual-build-cjs-loads, exit 3, "PREREQUISITE NOT MET — this gate reads built output, and some package has no dist/". It needs the whole workspace built; this diff changes no package, so the build was not made for it and CI's run is the reading.The eval case through the real reader and grader
The test that names the edited gate script
No behaviour a test pins changed, so no ablation was made.
Acceptance notes
git grep -n ask_ai -- skills/is empty" is not reachable in a pull request that lands before the type leaves; two lines remain, as said above. "Skill checks pass" holds on this head.skills/**only. Two files outside it are in the diff, each forced by a gate the card orders green: the ratchet row (one number and a three-line comment inscripts/check-skills-token-ratchet.mjs) and the changeset. Neither path is underpackages/**ordocs/adr/**.must_not_containon the type's literal name was not available (the card's grep forbids it underskills/);defineAction(andlocations:are tokens only an authored action carries, and the reference answer spells neither.Ask AItoday (ui/packages/i18n/src/locales/en.ts,askAI). Noted, not acted on: where the button is drawn and what it reads in each locale is 入口专题 C3:每页右上角改成带文字的「问 AI」按钮(桌面页头、记录页、手机顶栏、Home,无页头路由兜底) #37858's.objectstack-uigets no sentence here. A line saying no page declares an AI button would sit under a table row that teaches the type. It belongs with the deletion of that row.Claim:comment on 入口专题 C1s:技能文档与评测样例里的 ask_ai 删掉(受管 skills) #37857 is 7217200370, amended 7218076053, naming this branch. (The drafter read the card before it landed and saw zero comments; the work ran on the dispatch order's claim block, which is the same text.)Verification
Read first, by risk:
skills/objectstack-ai/SKILL.md, the hunk at line 174: the replacement sentence is published text. Check it says no more than ADR-0160 D6 and nothing feat(spec)!: retire the ask_ai action type (ADR-0160 D7) #37924 has yet to build.skills/objectstack-ai/evals/skills-tools-knowledge.json, case 10: the two assertion lists.scripts/check-skills-token-ratchet.mjs: one row, lowered only (6791 to 6609 at06f561f0).Two-minute verification:
git grep -n ask_ai -- skills/prints exactly two lines, both inskills/objectstack-ui/SKILL.md(151 and 153), andnode scripts/check-skills-token-ratchet.mjsends with its ✓ line.Human Minimum
packages/specholds no runtime logic. (no schema touched)pnpm lintpasses. (no formatter ran; the repo-wide lint is CI's run)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched;check:skill-docsandcheck:skill-refsreport in sync)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code