Repository navigation
Commit 4de4e3e
docs(skills): objectstack-ai no longer teaches an authored AI button on a record page (#37937)
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_01AXsQkLFKRdQCqQ3RTr6Jao3PpF4t89AvwzCmzVRuQMwV)_
Part of #37857
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:对外发布的 AI 技能文档不再教作者在记录页自己放 AI 按钮,换成一句话:用页头的「问
AI」入口,它自动带上当前记录。应用的使用者无感。界面技能里动作类型表的那一行这次没动,要等类型本身撤掉才能删。
- 为什么做:「问 AI 入口改造」专题已定全站只留一个入口,「页面里加按钮」的需求作废。
- 出错会怎样:只改了文档和一条评测样例;写错的话,用这份技能的 AI 作者会答错怎么加 AI 按钮,撤回本 PR 即可恢复。
- 要你做什么:批准这个受管 PR。它先合,撤掉该动作类型的 PR(#37924,撤类型本身)后合,两者同一个版本发出。
## What changes
- `skills/objectstack-ai/SKILL.md`: the subsection *The Ask AI button*
under *Actions as AI Tools* leaves, with its `os:check` `defineAction`
example (25 lines). One sentence stands in its place (3 lines):
> **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.
- `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_contain` is `问 AI`;
`must_not_contain` is `defineAction(` and `locations:`.
- `scripts/check-skills-token-ratchet.mjs`: the row of
`skills/objectstack-ai/SKILL.md` follows the measurement down, 6799 to
6617. The gate asks for this in the PR that shrinks the file ("Lower the
row to 6617 in this PR").
- `.changeset/37857-skill-no-authored-ai-button.md`:
`@objectstack/skills` patch. `skills/**` ships as that package's `dist`.
**Not in this pull request, and why the first line says `Part of`.**
`git grep -n ask_ai -- skills/` still prints two lines, both in
`skills/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-liveness` holds the *Action Types* table row for
row to the members of `ActionType`, and on `main` the member is still
there. Measured on this branch with the row deleted:
> [leg2-missing-row] skills/objectstack-ui/SKILL.md — ### Action Types
is registered exhaustive over `ActionType`
(packages/spec/src/ui/action.zod.ts) and does not document `ask_ai`.
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-examples` is red there with one error,
`skills/objectstack-ai/SKILL.md:188:3 TS2322`, the `os:check` example
this pull request deletes, which no longer type-checks once `ActionType`
loses the member. With this merged first, that example is gone from
`main` before #37924 needs it gone.
Between the two merges `main` holds a skill that says no page declares
an AI button while the type still parses, and the `objectstack-ui` table
still lists it. Both ship together, so no published version carries that
state.
## Tests
Head `7eb79ca6`, merge base `73d5e347`.
Published-skills size (lines; tokens in the ratchet's own convention,
`ceil(utf8 bytes / 4)`, stamp line excluded):
| | before | after |
|:--|--:|--:|
| `skills/objectstack-ai/SKILL.md`, lines | 487 | 465 |
| `skills/objectstack-ai/SKILL.md`, tokens | 6799 | 6617 |
| all 14 `SKILL.md`, lines | 4959 | 4937 |
| all 14 `SKILL.md`, tokens | 65451 | 65269 |
| whole shipped tree, tokens | 301286 | 301061 |
Net lines across `skills/**`: +6 / -28 = -22 (the eval file is +3 / -3).
<details>
<summary>Skill gates (each exit code captured before any pipe)</summary>
```text
node scripts/check-skills-token-ratchet.mjs :: exit 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.
pnpm check:skill-identifier-liveness :: exit 0
check-skill-identifier-liveness OK — Leg 1: 564 citation(s) over 76 published file(s) ...; Leg 2: 11 registered exhaustive section(s), 0 ledgered gap(s).
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-refs :: exit 0
✅ 10 generated files in sync with packages/spec
pnpm --filter @objectstack/spec run check:skill-examples :: exit 0
✅ 351 prose examples type-check across 3 surface(s)
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
```
The last three are outside the derived list and were run because they
read `SKILL.md`. `check:skill-examples` needed `@objectstack/spec` and
the `@objectstack/client-react` closure built first (47 turbo tasks,
under the verify lock).
</details>
<details>
<summary>Derived gate list and its reconciliation</summary>
```text
node scripts/pm/dispatch-gates.mjs --commands → 67 command(s)
node scripts/pm/dispatch-gates.mjs --ran RECORD → ✓ dispatch-gates --ran: 67 derived famil(ies) accounted for — 66 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).
```
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.
</details>
<details>
<summary>The eval case through the real reader and grader</summary>
```text
loadSkillEvalCatalog(skills/): bundles 14 · cases 368 · refusals 0
case objectstack-ai/skills-tools-knowledge#10: must_contain ["问 AI"] · must_not_contain ["defineAction(", "locations:"]
its reference answer against its own grader: {"pass":true,"missing":[],"forbidden":[]}
an answer that writes the action: {"pass":false,"missing":["问 AI"],"forbidden":["defineAction(","locations:"]}
```
</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 20 passed (20)
os-verify-lock: VERDICT command-exit 0
```
</details>
No behaviour a test pins changed, so no ablation was made.
## Acceptance notes
- **Acceptance is met in part.** "`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.
- **File surface.** The claim names `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 in
`scripts/check-skills-token-ratchet.mjs`) and the changeset. Neither
path is under `packages/**` or `docs/adr/**`.
- **Why case 10 is kept and turned, not deleted.** The prompt is the
request the maintainer voided, and it is the one an assistant will keep
receiving; the case now measures whether the sentence above stops an
authored action. The eval reader takes ids as given and asks only that
they are unique in a file, so 11 and 12 keep their numbers. A
`must_not_contain` on the type's literal name was not available (the
card's grep forbids it under `skills/`); `defineAction(` and
`locations:` are tokens only an authored action carries, and the
reference answer spells neither.
- **The entry's name.** The sentence and the eval use 「问 AI」, as the ADR
and the card do. The console's English bundle labels the entry `Ask AI`
today (`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
#37858's.
- **`objectstack-ui` gets 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.** The seat's `Claim:` comment on #37857 is 7217200370, 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:
1. `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 #37924 has yet to build.
2. `skills/objectstack-ai/evals/skills-tools-knowledge.json`, case 10:
the two assertion lists.
3. `scripts/check-skills-token-ratchet.mjs`: one row, 6799 to 6617,
lowered only.
Two-minute verification: `git grep -n ask_ai -- skills/` prints exactly
two lines, both in `skills/objectstack-ui/SKILL.md` (151 and 153), and
`node scripts/check-skills-token-ratchet.mjs` ends with its ✓ line.
## 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; the
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; `check:skill-docs` and
`check:skill-refs` report in sync)
- [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 Chinese by the fleet's rule; quoted rulings are kept as
written)
- [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>1 parent dc45b1e commit 4de4e3e
4 files changed
Lines changed: 26 additions & 29 deletions
File tree
- .changeset
- scripts
- skills/objectstack-ai
- evals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
451 | 454 | | |
452 | 455 | | |
453 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
198 | 176 | | |
199 | 177 | | |
200 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
| 100 | + | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
0 commit comments