From 7eb79ca63cc00a4dd786cb9805ae911d13f7ea94 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 11:38:44 +0000 Subject: [PATCH 1/3] docs(skills): objectstack-ai no longer teaches an authored AI button 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 Claude-Session: https://claude.ai/code/session_01L9qibwetA7wdKM2c8khHDC --- .../37857-skill-no-authored-ai-button.md | 16 +++++++++++ scripts/check-skills-token-ratchet.mjs | 5 +++- skills/objectstack-ai/SKILL.md | 28 ++----------------- .../evals/skills-tools-knowledge.json | 6 ++-- 4 files changed, 26 insertions(+), 29 deletions(-) create mode 100644 .changeset/37857-skill-no-authored-ai-button.md diff --git a/.changeset/37857-skill-no-authored-ai-button.md b/.changeset/37857-skill-no-authored-ai-button.md new file mode 100644 index 00000000000..85040a0ad7e --- /dev/null +++ b/.changeset/37857-skill-no-authored-ai-button.md @@ -0,0 +1,16 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): `objectstack-ai` no longer teaches an authored AI button on a record page + +Clause-②: no +Metadata-protocol: none + +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. + +`skills/objectstack-ai/SKILL.md`: the subsection *The Ask AI button — `type: 'ask_ai'`* under *Actions as AI Tools* is removed, with its `defineAction` example. One sentence stands in its place: no page declares an AI button of its own, so there is no action to write for one, and the shell's 「问 AI」 entry opens the in-app assistant and carries the current record automatically. The file's token ceiling follows the measurement down, 6799 to 6617. + +`evals/skills-tools-knowledge.json`: case 10 keeps 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. Its `must_contain` is that entry's name, and its `must_not_contain` holds `defineAction(` and `locations:`, two tokens that only an authored action carries. + +The `objectstack-ui` action-type table is unchanged: it is held row for row to the members of `ActionType`, which still include `ask_ai`. diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 7ebfaaec6c6..a60ae1aca24 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -443,7 +443,10 @@ export const CEILINGS = new Map([ // Modify All cast no field vote). 27230 -> 27225 bytes; the row follows the measurement down. // 6800 -> 6799 (card #37304): the `supportKb` example's two renamed keys add // two bytes and its comment gives back six; the row follows the measurement down. - ['skills/objectstack-ai/SKILL.md', 6799], // -18 (was 6824), then -5 A2′ (was 6806) + // 6799 -> 6617: the section that taught an authored AI button on a record + // page is replaced by one sentence (ADR-0160 D6, "Entry point": the shell's + // entry is the only one); the row follows the measurement down. + ['skills/objectstack-ai/SKILL.md', 6617], // -18 (was 6824), then -5 A2′ (was 6806) // -12 (was 6331): the `http.server` decision-table row dropped a trailing // clause that taught `contributes.routes` as a key that "parses but serves // nothing". The key is retired — an authored entry is now REFUSED, carrying diff --git a/skills/objectstack-ai/SKILL.md b/skills/objectstack-ai/SKILL.md index 881fcef3a6a..58ed6a82e4b 100644 --- a/skills/objectstack-ai/SKILL.md +++ b/skills/objectstack-ai/SKILL.md @@ -171,31 +171,9 @@ decided entirely by the skip rule above — `actionSkipReason(action, ctx)` and `actionRequiresApproval(action)` (from `@objectstack/service-ai`) answer both questions, and Studio's "AI exposure" diagnostics use the same predicates. -### The **Ask AI** button — `type: 'ask_ai'` ☁️ - -Pins the assistant's conversation to the record the action runs on and opens -it, sending no message. Declare it on the object, in -`locations: ['record_header']` or `['record_more']`: - - -```typescript -import { defineAction } from '@objectstack/spec'; - -export default defineAction({ - name: 'ask_about_contract', - label: 'Ask AI', - objectName: 'contract', - type: 'ask_ai', - locations: ['record_header'], -}); -``` - -It names nothing and is never a tool: the parse refuses a `target`, -`ai.exposed: true`, and `actionType: 'ask_ai'` on a dashboard header (a header -runs on no record). Nothing serves it headless: `list_actions` skips it, -`run_action` refuses it, and no `action_` tool exists for it. The console draws -it only where the assistant surface is on **and** the AI service honours a -conversation focus; elsewhere it is absent, not disabled. +**No page declares an AI button of its own**, so there is no action to write +for one: the shell's 「问 AI」 entry opens the in-app assistant and carries the +current record automatically. --- diff --git a/skills/objectstack-ai/evals/skills-tools-knowledge.json b/skills/objectstack-ai/evals/skills-tools-knowledge.json index 4e5fc58b3a5..11647c0925f 100644 --- a/skills/objectstack-ai/evals/skills-tools-knowledge.json +++ b/skills/objectstack-ai/evals/skills-tools-knowledge.json @@ -94,11 +94,11 @@ { "id": 10, "prompt": "Add an Ask AI button to the contract record page, so a user can ask the assistant about the contract they are looking at. Write the action.", - "expected_output": "Emits a `defineAction` with `type: 'ask_ai'`, `objectName: 'contract'` and `locations: ['record_header']` (or `['record_more']`), with no `target` and no `ai.exposed: true`: the action pins the assistant's conversation to the record and opens it, sending no message. States that it is never a tool (`list_actions` skips it, `run_action` refuses it, no `action_` tool exists for it) and that the console draws it only where the in-app assistant is on and honours a conversation focus; elsewhere it is absent, not disabled.", + "expected_output": "Writes no action: no page declares an AI button of its own. The in-app assistant is opened from the shell's 「问 AI」 entry, which carries the current record automatically, so a user on the contract record page asks about that contract with nothing authored. Adds no `defineAction`, no entry under the object's `actions`, and no button on the page for it.", "files": [], "assertions": { - "must_contain": ["ask_ai", "record_header", "locations"], - "must_not_contain": ["target:"] + "must_contain": ["问 AI"], + "must_not_contain": ["defineAction(", "locations:"] } }, { From f008bf4cd1fab59d0bfd953ea12e07b2148d4009 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 13:11:43 +0000 Subject: [PATCH 2/3] docs(changeset): the objectstack-ai token row reads 6795 to 6613 after 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 Claude-Session: https://claude.ai/code/session_01L9qibwetA7wdKM2c8khHDC --- .changeset/37857-skill-no-authored-ai-button.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/37857-skill-no-authored-ai-button.md b/.changeset/37857-skill-no-authored-ai-button.md index 85040a0ad7e..b82c275f9f4 100644 --- a/.changeset/37857-skill-no-authored-ai-button.md +++ b/.changeset/37857-skill-no-authored-ai-button.md @@ -9,7 +9,7 @@ Metadata-protocol: none 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. -`skills/objectstack-ai/SKILL.md`: the subsection *The Ask AI button — `type: 'ask_ai'`* under *Actions as AI Tools* is removed, with its `defineAction` example. One sentence stands in its place: no page declares an AI button of its own, so there is no action to write for one, and the shell's 「问 AI」 entry opens the in-app assistant and carries the current record automatically. The file's token ceiling follows the measurement down, 6799 to 6617. +`skills/objectstack-ai/SKILL.md`: the subsection *The Ask AI button — `type: 'ask_ai'`* under *Actions as AI Tools* is removed, with its `defineAction` example. One sentence stands in its place: no page declares an AI button of its own, so there is no action to write for one, and the shell's 「问 AI」 entry opens the in-app assistant and carries the current record automatically. The file's token ceiling follows the measurement down, 6795 to 6613. `evals/skills-tools-knowledge.json`: case 10 keeps 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. Its `must_contain` is that entry's name, and its `must_not_contain` holds `defineAction(` and `locations:`, two tokens that only an authored action carries. From 06f561f054d17c06d43b282246c7e8dfa4cb23ab Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 14:00:00 +0000 Subject: [PATCH 3/3] docs(changeset): the objectstack-ai token row reads 6791 to 6609 after 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 Claude-Session: https://claude.ai/code/session_01L9qibwetA7wdKM2c8khHDC --- .changeset/37857-skill-no-authored-ai-button.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/37857-skill-no-authored-ai-button.md b/.changeset/37857-skill-no-authored-ai-button.md index b82c275f9f4..7b7a6cc7861 100644 --- a/.changeset/37857-skill-no-authored-ai-button.md +++ b/.changeset/37857-skill-no-authored-ai-button.md @@ -9,7 +9,7 @@ Metadata-protocol: none 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. -`skills/objectstack-ai/SKILL.md`: the subsection *The Ask AI button — `type: 'ask_ai'`* under *Actions as AI Tools* is removed, with its `defineAction` example. One sentence stands in its place: no page declares an AI button of its own, so there is no action to write for one, and the shell's 「问 AI」 entry opens the in-app assistant and carries the current record automatically. The file's token ceiling follows the measurement down, 6795 to 6613. +`skills/objectstack-ai/SKILL.md`: the subsection *The Ask AI button — `type: 'ask_ai'`* under *Actions as AI Tools* is removed, with its `defineAction` example. One sentence stands in its place: no page declares an AI button of its own, so there is no action to write for one, and the shell's 「问 AI」 entry opens the in-app assistant and carries the current record automatically. The file's token ceiling follows the measurement down, 6791 to 6609. `evals/skills-tools-knowledge.json`: case 10 keeps 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. Its `must_contain` is that entry's name, and its `must_not_contain` holds `defineAction(` and `locations:`, two tokens that only an authored action carries.