Repository navigation
docs(skills): objectstack-ask answers a word that names the field a filtered measure aggregates from that field (ADR-0149 D3 note of 2026-12-01) - #38915
Conversation
…ered measure aggregates is answered from that field Step 1 and the step 2 table restate the rule the two tool texts carry after the ADR-0149 D3 note of 2026-12-01: such a measure is not offered for the word, the field answers it under the labelled fallback (step 4), and the measure is mentioned as a narrower declared metric. What stays as before is said once each: a measure with no filter, a relationship path, a word naming different fields through different candidates, another measure candidate left (asked first), and a host that reads no field labels. Paid down first: the listing instruction said twice (the several-measures row and the paragraph under the table) now has one home, in the row. packages/mcp/src/ask-skill.generated.ts is regenerated by scripts/gen-mcp-ask-skill.mjs. Claude-Session: https://claude.ai/code/session_01WGufzeatqKfTRUzTJVa9jQ Co-authored-by: Claude <noreply@anthropic.com>
…en ratchet row at the measurement, the changeset Evals: a word that names the field a filtered measure sums is answered from the field with the measure mentioned and no question; the near-miss word over another field is still asked about. Token ratchet: the objectstack-ask row moves 1873 -> 2040, the measured remainder after the listing instruction was cut to one home (ruling record 6513306068). Claude-Session: https://claude.ai/code/session_01WGufzeatqKfTRUzTJVa9jQ Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 12 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 590b37c43f34f5026c8e2d0c544cdd580fd9885a && git checkout 590b37c43f34f5026c8e2d0c544cdd580fd9885a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 7b68db99bfcb0887d3ffa8050f7f9391f79213e4 bf15b48f51b0331599af1186f8af0fb5cd3e0a9a && git checkout -B drift-repro 7b68db99bfcb0887d3ffa8050f7f9391f79213e4 && git merge --no-ff bf15b48f51b0331599af1186f8af0fb5cd3e0a9a
node scripts/docs-audit/affected-docs.mjs --json 7b68db99bfcb0887d3ffa8050f7f9391f79213e4 |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzeatqKfTRUzTJVa9jQ CI reading · 2026-12-01T14:04Z · zone osa-ai · head
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm Contract-review-claim: session_01WGufzhGA3zoCFquQgku4pm · head fcdacb2 · 2026-12-01T14:07Z |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm Contract reviewServed-tier: Read for this record: card #38870 (body, claim 7309647083, dev report 7312068828), PR #38915 (body, five files, net diff against
① Derived judgments
② Semver levelClause-②: no. ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Tried to break it:
Nits:
Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review + L2 adoption · PR #38915 (#38870) · head fcdacb2 · 2026-12-01T14:12ZL1: ACCEPT. L2 (contract-review tier, record 7313849352): PASS, no must-fix and no should-fix. N1 to N4 are nits accepted as is. I adopt the record. It is Tier H skills, so it goes to the seat. Before the hand-off: What I checked:
For the seat:
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS 席位核对ACCEPT — PR #38915 @
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS 维护者速读
席位意见:同意落地。ACCEPT → PR #38915 comment 7313954431。 |
…k-skill-field-term
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS 落地Re-arm after a dequeue that is not this PR's. Queue group
State change: auto-merge re-armed once by the owning seat under the authorized approval; on merge it closes #38870. A second runner shutdown on this job goes to triage, not a third arm. |
…tack-ai#38911) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi99QsuPTPkC1uKm2mViUT3Rf)_ Part of objectstack-ai#34770 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;发给 AI 的「AI 技能、知识库、助手接入」技能说明,入口文件从约 30 KB 缩到 9 KB,只留开工前四项检查、两段可照抄的写法、十一个「写得通过、跑起来却不生效或做错」的坑和一份指路清单。 - 为什么做:这是「技能目录瘦身」的最后一份;入口文件每次都整份装进 AI 的上下文,越长越贵,也越容易漏读。 - 出错会怎样:只动教 AI 的文字,没有产品行为变化,可以直接撤回;风险是 AI 少读一段后答错,评测十五道题、每题三遍,定稿上又跑了一整轮:改动后四十五次对四十次,改动前对四十二次,没有哪道题在改动后每遍都错而改动前能对。 - 要你做什么:无。 ## Rulings this executes - **Card Scope** (decision record on the card, S3 = A): the entry file holds first checks, at most about 8 traps and a routing list; 6–9 KB, hard cap 500 lines; restated option lists and tables go behind a pointer; no trap is removed until a publish-time check covers it or it stays inline. - **7128031203** fork 4 = A: ratchet rows are pinned at the measurement with zero headroom, and the sum of ceilings does not rise; text may move into `references/context-packs.md` only when it is about context packs. Here one row falls, no row rises, none is added, and nothing moved: that reference file already held every context-pack fact the entry had. - **7168461386** = A: text an eval shows the entry lost goes back into the entry, paid inside the entry. **Used once, on a softer signal than the rule requires**: after the merge of `main`, two of three answers to the passage-overlap case declined the overlap while saying they could not tell whether a key for it exists. The split rule now says no key adds one (the split schema is strict over `strategy`, `maxChars`, `minChars`), paid by two cuts in the same section. - **Ruling record 7249189592**, the parity rule: a case that fails on every run of the head while `main` passes is a regression; a case whose result flips between runs does not block. Read below on a full round of each text: no case fails on every run of the head while `main` passes it. - **Seat order for this PR** (PR 8, `objectstack-ai`, the last of the split): the same shape as the earlier entry files; no new file under `skills/`. **Seat rulings on this PR's three open questions** (given on the local report, before this PR was opened): 1. **Trap count: A.** About ten traps is accepted (eleven since the review round added the `confirmText` trap the review asked for), provided each is of the accepted-then-wrong class; the contract review checks each one. The list is under Budget reading below. 2. **Eval case 7: A.** The PR lands under ruling record 7249189592. The forbidden-literal issue of case 7 is recorded here and in the report only; no card. 3. **The two ☁️ claims: A.** They stay as on `main`, and are **not verified against the cloud source**: the five trigger context fields and `enableActionApproval: true`. The facts are `main`'s own and the wording is `main`'s shortened (the same five field names; the same option, on the same skip rule), so they are not new claims of this PR. See Acceptance notes. ## Review round **First round** (contract review 7311924709 on `100417af`: passed, with one should-fix and nits), commit `ef824b4a`, pushed head `3342d3d1` after one plain merge of `main` at `8338d070`. - **S1, fixed.** The router listed the two destructive signals and dropped `main`'s sentence that `confirmText` is not one, while "Where to go" named the published `actions-as-tools` page for approval; that page still lists `confirmText` as a signal and still gives the retired pending answer. Checked against the code first: `actionLooksDestructive` (`packages/runtime/src/action-execution.ts`) returns the declared `ai.requiresConfirmation` when it is set, and otherwise `mode === 'delete' || variant === 'danger'`; nothing reads `confirmText`, and no `os validate` rule reads the pair, so `confirmText` on an exposed action parses and the AI call runs unasked. Three changes inside the entry: - a new trap under Actions: "**`confirmText` is dialog copy**: it gates no AI call; `ai.requiresConfirmation: true` does." - the pending answer is now stated for every door (`## MCP`, second bullet): "at every AI door, `status: 'pending_confirmation'` with a `pendingId` is a success, so relay its message and do not retry." - "Where to go" names that page for dispatch only: "`actions-as-tools` (dispatch)". The confirmation contract stays the first item of the list. Paid inside the entry by wording cuts that carry no fact ("the flow, hook or import that extracts it" became "whatever extracts it"; "and its siblings in" the tool-name pointer; the routing list's parentheticals after `connect-mcp` and `knowledge-rag`; "connected" in "the connected agent"; a shorter `instructions` string in the skill example). The file is 8,997 to 8,995 bytes, 186 to 184 lines; the row is re-pinned at the measurement, 2243 to 2242. The page itself is untouched (outside the surface; reported as an out-of-scope finding). - **N2, fixed.** The changeset no longer says no rule's teaching changes. It now reads: "One sentence of the old entry is corrected (the pending answer, below); no other rule's teaching changes." It also names the page for dispatch only and records that the `confirmText` rule stays in the entry. - **N1, not taken.** Pitfall 1 (a `provider` key) stays as the seat's accepted deviation. - **L1-b, the `satisfies` note: not taken.** The knowledge example keeps `KnowledgeSourceSchema.parse({...})`: it is `main`'s form and the one the fixed eval case 9 names as the expected answer, so changing the idiom is a teaching change this round did not need. The note is right that the type-checker does not judge the literal's keys under `.parse` (its argument is untyped); the run-time parse does. This body no longer calls that example "type-checked": it is compiled by `check:skill-examples`, and its keys are judged at run time. - **L1-b, the `split` note: not taken.** The split rule does not say the key sits under `source`. The strict source schema refuses a `split` anywhere else with the key's place, and the sentence would cost a kept fact at this size. ## What changes `skills/objectstack-ai/SKILL.md` becomes a router. The frontmatter and the title are byte-identical, so what loads the skill does not change. The file's sections are now: First checks, Skills, Actions as AI Tools, MCP, Context packs, Knowledge Sources (RAG), Common Pitfalls, Where to go. | Old entry section | Now | |:--|:--| | The note on what ☁️ marks | Kept, shorter. | | Skill Configuration (two key tables, the in-app `ask` paragraph) | One type-checked example and three rules under `## Skills`. The key tables are the contract's (`ai/skill.zod.ts`, whose docblocks say which edition reads each key). The in-app `ask` paragraph (a package skill loads for the app the user is in; a tool it names outside the allow-set is dropped with a diagnostic): **cut, with no other home in this repository.** | | Naming the tools: the resolution ladder | One rule: every `tools` name resolves to a platform tool, an exposed action or a `stack.tools` record, or `os validate` warns (`ai-skill-tool-unresolved`). The four rungs are that warning's own text; the name lists are exported from `@objectstack/spec/system`. | | Skill Example | The example under `## Skills`, shorter. | | Trigger Conditions | One rule: conditions route on the five context fields the client reports and are never access control. The operator table is the contract's. | | Actions as AI Tools — the default path | Heading kept (another bundle file names it). The opt-in and four traps stay: a tool record runs nothing, an opted-in action can still be no tool, `confirmText` gates no AI call, no page declares an AI button. The dispatch table is the published page's (`docs/ai/actions-as-tools`, named for dispatch only); the approval paragraph is the confirmation contract's (`@objectstack/spec/contracts`); the request-body keys of an `api` action are the contract's (`ui/action.zod.ts`). The cloud host's plugin options (`apiActionBaseUrl`, `apiActionHeaders`, `apiClient`) and its two predicates (`actionSkipReason`, `actionRequiresApproval`): **cut, with no other home in this repository.** | | MCP — the open-edition AI path | Heading kept (another bundle file names it for the elicitation outcomes). The confirmation rule stays, as five bullets, for every AI door. The plugin snippet, the switches and the tool table are the published page's (`docs/ai/connect-mcp`) and each tool's own description in `tools/list`. | | Context packs — one record's material | Kept, as a pointer to `references/context-packs.md` (untouched). | | Knowledge Sources (RAG) | Heading kept. One compiled example (its keys are judged by `.parse` at run time) and four rules: shipping and "mounted is not enabled", what `content` is, one source per corpus, `split` and the document unit. The key table, the retired keys, the splitting detail and the five `knowledge-source-*` rules are the contract's (`ai/knowledge-source.zod.ts`), the published page's (`docs/ai/knowledge-rag`) and `os validate`'s. | | Tool metadata (`defineTool`) — not the default path | One trap under Actions ("Write no tool record"). The rest is the contract's (`ai/tool.zod.ts`) and the published page's (`docs/ai/tools`). | | Model Configuration | Pitfall 1 ("Naming a provider"). The table is `AIModelConfigSchema` in `ai/agent.zod.ts`. | | Common Pitfalls | Heading kept (another bundle file and the eval runner's prompt name it). "Gating the action, not the state" stays whole, under the same title. The `guardrails` pitfall is cut: a stack does not author an agent, and the keys with their prescriptions are in `ai/agent.zod.ts`. Two of its clauses, that `approval: 'always'` on an MCP tool binding is an enforced gate and that AI metadata edits land as drafts a person publishes: **cut, with no other home in the published skills.** | | Platform agents — reference only | The published page (`docs/ai/agents`). The table of the built-in skills: **cut, with no other home in this repository**; they are the cloud runtime's. | | Verify your work, References | First checks 4 and 3. | ### A correction of a wrong sentence on `main` This is the one place where the entry's teaching differs from `main`'s, and it is its own review item. - **What `main` says** (Actions as AI Tools, the Human-in-the-loop paragraph): a queued call answers `{ status: 'pending_approval', pendingActionId }` from an `ai_pending_actions` row. - **What the source says**: that answer is retired from 19.0.0. `packages/spec/src/contracts/ai-service.ts` carries the note ("A stored `pending_approval` answer … That answer is retired"), `ActionConfirmationPending` is `status: 'pending_confirmation'` with a `pendingId`, and `packages/spec/src/migrations/entries/semantic/19.ai-pending-action-queue-merged-into-confirmation-service.ts` is the migration that merges the in-app queue into the confirmation service every door uses. - **What the entry says now**, once, for every AI door (`## MCP`, second bullet): "at every AI door, `status: 'pending_confirmation'` with a `pendingId` is a success, so relay its message and do not retry." - **Not corrected here**: the published page `content/docs/ai/actions-as-tools.mdx` still carries the retired answer and lists `confirmText` as a destructive signal. It is outside this PR's surface and is reported as an out-of-scope finding; since the review round the entry names that page for dispatch only. **The two additions `main` gained the same day** (objectstack-ai#38855, the document unit and the held knowledge service) were folded in after its merge, by the router's standard (true, and an author needs it before opening the contract): | What objectstack-ai#38855 added to the old entry | In the router | |:--|:--| | A shipped item mounts the knowledge service, which does not enable it: the service is held until an embedder provider is saved, the store is mounted and the server restarts | **Kept**, one clause in the Shipping rule: "Mounted is not enabled: with no embedder at boot, sources are held". Scoped to the half that is always true; the store half is the published page's. | | Held sources are listed, never built or searched; `search_knowledge` is not offered; a search or a run-time save answers 503 naming the missing half | **Kept**, same clause: "listed, never searched, no `search_knowledge`. Unmounted or held, a run-time save is refused (`503`)". A skill that binds `search_knowledge` is the author-side consequence. | | `os knowledge status` prints the state and why; `os knowledge rebuild` exits 1 with it | `os knowledge status` **kept** (three words); the `rebuild` exit is the published page's. | | The remedy where an app ships none: add `requires: ['knowledge']`, restart, save an embedder provider, restart again | The `requires` half **kept**; the two restarts are the refusal's own text and the published page's. | | The `source.documentBy` table row | **Pointer**: the key table left the entry; the `documentBy` docblock in the contract and the published page say which field it may name and what rebuilds. | | An app that cuts its own passages writes each as a child record indexed with `split: { strategy: 'whole' }` and `documentBy`; `granularity: 'record'` then counts and groups by parent | **Kept**, one sentence in the split rule. | | "`maxChars`, in characters" (a wording cut) | Not applicable: the sentence left the entry. | **Sizes** (bytes; tokens are the ratchet's, the release-stamp line unpriced): | | `main` at `8338d070` | head `3342d3d1` | |:--|--:|--:| | `skills/objectstack-ai/SKILL.md` | 30,020 B · 518 lines · 7,499 tokens | 8,995 B · 184 lines · 2,242 tokens | | `skills/objectstack-ai/**` (4 files) | 59,051 B | 38,026 B | | the same without `evals/` (3 files) | 40,120 B | 19,095 B | | all 14 `SKILL.md` | 141,450 B · 2,475 lines | 120,425 B · 2,141 lines | | `skills/` (115 files) | 1,182,544 B | 1,161,519 B | | `skills/` without `evals/` (73 files) | 818,440 B | 797,415 B | | ratchet, authored sum (61 rows) | 186,955 tokens | 181,698 tokens | | ratchet, bundle total | 292,844 tokens | 287,587 tokens | **Ratchet rows.** `skills/objectstack-ai/SKILL.md`: 7499 to 2242, pinned at the measurement (`ceil((8995 - 27) / 4)`), headroom 0 (2243 on the first head, 2242 after the review round). `skills/objectstack-ai/references/context-packs.md`: 1453, untouched. The sum of all ceilings falls by 5,257; no row rises and none is added. `main`'s three dated notes on this row (the document unit, mounted is not enabled, their review round) stay above the new one. **Budget reading.** 8,995 bytes is on the 9 KB line, as PR 7's 9,000 was. The trap count is eleven since the review round, not about eight (seat ruling 1 above accepts it; the review checks each is accepted and then wrong): 1. A tool record (`defineTool`) parses and runs nothing. 2. An opted-in action can still be no tool (a UI-only type; a destructive one skipped in-app). 3. `confirmText` on an exposed action: parses, and the AI call runs unasked (added in the review round). 4. An action written as an "Ask AI" button: no page declares one. 5. A stack-authored agent parses and is never served; skills are the one extension. 6. A `tools` name that resolves to nothing only warns; over MCP the prompt is then not offered. 7. `triggerConditions` used as access control: they only route. 8. `confirm` sent to `run_action`, a pending answer retried, a script deciding a pending item (the confirmation rule). 9. A knowledge source whose `content` holds a `file` field or short values: accepted, and nothing useful is indexed. 10. A shipped source on a deployment with no embedder: mounted, held, never searched. 11. A gate on the action with no lock on the state (pitfall 2). Pitfall 1 (a `provider` key) is a twelfth item of the loud kind (a retired key, refused with its fix); it is kept for the sampling keys named beside it. ## Tests ### Eval parity Command, every full round: `pnpm --filter @objectstack/scenarios skill-evals --skills objectstack-ai --repeats 3 --concurrency 4 --max-utilization 0.99`, with the model and effort flags the ruling names; CLI 2.1.333, subscription login. 15 behaviour cases in `evals/skills-tools-knowledge.json` on both arms; the bundle has no trigger cases. The file is untouched. 90 turns a round. **The reading the rule is judged on**: one full round on each text, 90 of 90 turns each. `main`'s round is the one of the first head's judged pair (09:19Z; `main`'s entry has not changed since). The head's round is new, on the pushed head `3342d3d1` after the review round (13:50Z to 13:57Z); the seat's order for this round was one after round and no new before round. | case | subject | `main`'s entry, 30,020 B (with-skill · no-skill) | head `3342d3d1`, 8,995 B (with-skill · no-skill) | |:--|:--|--:|--:| | 1 | a triage skill with tools and trigger conditions | 3/3 · 0/3 | 3/3 · 0/3 | | 2 | provider, temperature and token cap | 3/3 · 0/3 | 3/3 · 0/3 | | 3 | a knowledge source over published articles | 3/3 · 0/3 | 3/3 · 0/3 | | 4 | a tool record for an existing action | 3/3 · 0/3 | 3/3 · 0/3 | | 5 | a stack-authored agent with tools and knowledge | 0/3 · 0/3 | 0/3 · 0/3 | | 6 | a script that approves pending actions | 3/3 · 0/3 | 3/3 · 0/3 | | 7 | an agent that retries with `confirm: true` | 3/3 · 0/3 | 1/3 · 0/3 | | 8 | elicitation outcomes on a stdio server | 3/3 · 0/3 | 3/3 · 0/3 | | 9 | Markdown splitting with a requested overlap | 3/3 · 0/3 | 3/3 · 0/3 | | 10 | an Ask AI button on a record page | 3/3 · 0/3 | 3/3 · 0/3 | | 11 | a context pack with a related list | 3/3 · 0/3 | 3/3 · 0/3 | | 12 | a skill that names its context pack | 3/3 · 0/3 | 3/3 · 0/3 | | 13 | "index every text field" | 3/3 · 0/3 | 3/3 · 0/3 | | 14 | sources created at run time | 3/3 · 0/3 | 3/3 · 0/3 | | 15 | two corpora, numbers and a file field | 3/3 · 0/3 | 3/3 · 0/3 | | **all** | | **42/45 · 0/45** | **40/45 · 0/45** | The `main` round ran with `main`'s entry text in the working tree of the head checkout (the runner reads `skills/` from disk), and the tree was restored and confirmed clean afterwards. The head round ran on the pushed commit itself; its record names `3342d3d1` with no uncommitted change. **Reading under the parity rule: no regression.** No case fails on every run of the head while `main` passes it. The head's total is two lower, in one case: - **Case 7: head 1 of 3; `main` 3 of 3.** Both failing answers are correct: they refuse the retry and name `pending_confirmation`, `pendingId` and `no_confirmation_service`. One quotes the user's own step ("ask in chat and then retry with `confirm: true`"), which is the case's forbidden literal `then retry with`; the other writes that the agent "should not retry", where the case wants `do not retry`. Across every round: head 7 of 15, `main` 8 of 9 (its one failure is the same quotation). Not a regression under the rule, and the fact the case tests is in every answer; the count is lower on the head and is reported as such. Seat ruling 2: recorded here and in the report only. - **Case 9: 3 of 3 on both** in this round (2 of 3 on the first head's round, 1 of 3 before the "no key adds one" clause). - **Case 5: 0 of 3 on both.** Every answer refuses the agent and declares a skill; they miss the literals `surface` and `aiExposed`, which the entry carries on both trees. Head 1 of 15 across rounds, `main` 0 of 9. **Quota, read from each turn's record.** Guard `--max-utilization 0.99` on every round; window `seven_day`, status `allowed_warning` throughout. This round: 0.90 at its first turn and 0.90 at its last. The first head's judged pair: 0.74 to 0.75. Earlier rounds: 0.67 (06:57Z) rising to 0.71 (07:42Z), 0.74 (09:12Z). **Earlier rounds**, kept as the record of how the text got here: | reading | text | with-skill | no-skill | with-skill cases below 3 of 3 | |:--|:--|--:|--:|:--| | before, two halves, 48 + 42 turns, 06:57Z | `main` at `5bd786e4`, 29,014 B | 42/45 | 0/45 | case 5, 0 of 3 | | after 1, 90 turns, 07:17Z | local `3535c42b`, 8,999 B | 40/45 | 1/45 | case 5, 0 of 3; case 7, 1 of 3 | | after 2, 90 turns, 07:31Z | local `2ba55dab`, 8,998 B | 41/45 | 0/45 | case 5, 0 of 3; case 11, 2 of 3 (a `filter:` in prose) | | before 2, 90 turns, 07:36Z | `main`'s 29,014 B text | 41/45 | 0/45 | case 5, 0 of 3; case 7, 2 of 3 | | after 3, 90 turns, 09:12Z | local `9d96b284`, 8,993 B, the first text with objectstack-ai#38855 folded in | 39/45 | 0/45 | case 5, 1 of 3; case 7, 1 of 3; case 9, 1 of 3 | | after 4, 90 turns, 09:26Z (the first head's judged round, one window with `main`'s) | `66c16628`, 8,997 B, the text of head `100417af` | 39/45 | 0/45 | case 5, 0 of 3; case 7, 1 of 3; case 9, 2 of 3 | ### Other tests All on the pushed head `3342d3d1`, under the verify lock, `VERDICT command-exit 0` each: - `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 scripts/platform-catalog.test.ts scripts/skill-map-guards.test.ts`: 2 files, 57 tests passed. - `pnpm --filter create-objectstack exec vitest run --maxWorkers=2 src/created-summary.test.ts src/scaffold-skills-single-copy.test.ts`: 2 files, 34 tests passed. `created-summary.test.ts` is the one test file that names this skill. - `pnpm --filter @objectstack/spec run check:skill-examples`: `341 prose examples type-check across 3 surface(s)`. The entry's two blocks are among them (the skill example is typed by `defineSkill`; the knowledge example's literal is an untyped argument of `.parse`). No behaviour a test pins changed, so no ablation is owed. ## Acceptance notes - **Anchors.** Gone from the entry: `#skill-configuration`, `#naming-the-tools-the-resolution-ladder`, `#skill-example`, `#trigger-conditions`, `#tool-metadata-definetool--not-the-default-path`, `#model-configuration`, `#verify-your-work`, `#references` and the anchor of "Platform agents — reference only". New: `#first-checks`, `#skills`, `#where-to-go`. No file in this repository linked an anchor of the old entry; five places name a heading or a pitfall in prose (`objectstack-automation` twice, `objectstack-platform`, `objectstack-ui`, the eval runner's prompt), and each still resolves. - **Cut, with no other home** (also marked in the table above): the in-app `ask` allow-set paragraph; the cloud host's plugin options and two predicates; the built-in skills table; `approval: 'always'` on an MCP tool binding as an enforced gate; AI metadata edits landing as drafts. Each describes the cloud runtime or a host option, none is authorable metadata of a stack. - **Two ☁️ claims: not verified against the cloud source; the facts are identical to `main`'s** (seat ruling 3). This session cannot read the cloud repository. They are the five trigger context fields (`appName`, `objectName`, `recordId`, `selectionKind`, `userRole`; `main`: "The client sends all five") and `enableActionApproval: true` (`main`: a destructive action is skipped "unless the plugin runs with `enableActionApproval: true`"). The wording is shortened, the facts are not changed. Every open-edition claim in the entry was checked against `main`'s contract, runtime or lint source. - **A published page teaches two retired facts** (outside this PR's surface; untouched, reported as an out-of-scope finding, and since the review round named by the entry for dispatch only): `content/docs/ai/actions-as-tools.mdx` lists `confirmText` among the destructive signals and says a queued call answers `{ status: 'pending_approval', … }`. The runtime's destructive test reads `ai.requiresConfirmation`, `mode: 'delete'` and `variant: 'danger'` only, and the contract retired `pending_approval` in 19. The entry states both rules itself. - **Eval literals that a correct answer can trip** (cases untouched; recorded here and in the report only, no card, seat ruling 2): case 7 forbids `then retry with`, which an answer quoting the user's own step contains; case 9 forbids `overlap: 100`, which a refusal can quote; case 5 requires `aiExposed` in an answer about agents. - **objectstack-ai#38857** (the release bot's version PR) shares this file through the frontmatter stamp line only; `overlap-check` merges it cleanly. - **Not done here**: the published AI pages are not edited; `evals/**` is untouched; no file is added under `skills/`. ## Verification Read first, by risk: 1. `skills/objectstack-ai/SKILL.md`, the whole file: is anything a model needs before opening the contract missing? The risk hunks are `## Actions as AI Tools` (the `confirmText` trap added in the review round), `## MCP` (five bullets replace the old section and correct the pending answer) and `## Knowledge Sources (RAG)` (four rules replace about 130 lines, and carry the two facts folded in from objectstack-ai#38855). 2. `.changeset/34770-ai-skill-router.md`: the "what left, and what answers it now" list is the record of every cut. 3. `scripts/check-skills-token-ratchet.mjs`: the `objectstack-ai` row. Two-minute check: `node scripts/check-skills-token-ratchet.mjs` prints `ratcheted (authored) 181698 / 181698 (+0)` and `skills/objectstack-ai/SKILL.md 2242 / 2242 (+0)`; `wc -c skills/objectstack-ai/SKILL.md` prints 8995. Gates, local, each exit code captured before any pipe. The whole derived list ran on the pushed head `3342d3d1` (tree `e6dacb82`), after one plain merge of `main` at `8338d070` (the list was STALE before it) and a rebuild of the merged workspace. <details><summary>Derived families on head `3342d3d1`: 69 derived, 69 run green, 0 NOT MEASURED</summary> - Reconciliation: `✓ dispatch-gates --ran: 69 derived famil(ies) accounted for — 69 run, 0 NOT-MEASURED (a DERIVED zero — all 69 recorded an exit code and none of them is 3).` No STALE TREE warning: the head's merge base is `main`'s tip at the reconciliation. - `node scripts/check-skills-token-ratchet.mjs`: `✓ 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.` (`ratcheted (authored) 181698 / 181698 (+0)`, `bundle total 287587`); its `--self-test`: `111 cases pass`. - `pnpm check:dual-build-cjs-loads`: `127 published require entry point(s) across 75 package(s) load; 2594 emitted CommonJS file(s) parse`. It reads every package's built `dist/`; `pnpm build --concurrency=2` ran first on the merged tree under the verify lock (`VERDICT command-exit 0`, `124 successful, 124 total`). - `pnpm check:dts-closure`: `124 built package(s) swept - 326/326 declared declaration file(s) present`. - `pnpm check:skill-links`: `286 relative link(s) in 76 published skill file(s) resolve; 161 fragment(s) name a real heading under GitHub's slug rule.` - `pnpm check:skill-identifier-liveness`: `Leg 1: 456 citation(s) over 76 published file(s) ...; Leg 2: 11 registered exhaustive section(s), 0 ledgered gap(s).` - `pnpm --filter @objectstack/spec run check:skill-docs`, `pnpm --filter @objectstack/lint run check:doc-formula-expressions`, `pnpm check:skill-compatibility`, `check:skill-frame-sync`, `check:role-word`, `check:corpus-claim-drift`, `check:doc-authoring`, `check:published-files`, `check:nul-bytes`: exit 0. - The changeset gates (`check-changeset-no-major`, `check-empty-changeset`, `check-adr-0087-registration`, `check:changeset-gate-self-tests`): exit 0. `pnpm check:pm-dispatch-gates`: exit 0. </details> <details><summary>Beside the derived list, on head `3342d3d1`, all exit 0</summary> - `pnpm --filter @objectstack/spec run check:skill-refs`: `10 generated files in sync with packages/spec`. - `pnpm --filter @objectstack/spec run check:skill-served-sections`: `24 served section(s), each heading exactly once in its file`. - `pnpm check:doc-anchors`: `1197 internal #fragment link(s) across 368 source file(s) all resolve to a real heading`. - `pnpm check:published-readme-links`: `567 outbound link(s) across 169 published markdown file(s)`. It does not read `skills/`. - `pnpm check:skill-top-level-keys`, `pnpm check:skill-frame-freshness`, `pnpm check:dev-prereqs`, `pnpm check:changeset-fixed`, `node scripts/check-published-list-mirrors.mjs`, `pnpm check:published-readme-exports`, `pnpm check:engine-double-contract`, `pnpm check:i18n-stale-fill`: exit 0. - `pnpm --filter @objectstack/spec run check:generated`, after the merge and the rebuild: `All 14 generated artifacts are up to date`. - `node scripts/check-platform-checklist.mjs --changed-from origin/main`: `0 anchored files in the change set — nothing judged.` - A control-byte scan of the three changed files finds none. </details> `node scripts/pm/overlap-check.mjs` before the push of `3342d3d1`: `VERDICT clean exit 0` (`origin/main` at `8338d070` merges cleanly; objectstack-ai#38915 shares the ratchet script and merges cleanly; objectstack-ai#38857, the release bot's version PR, shares the entry's stamp line and merges cleanly). Not run locally: `test:repo` (CI's). --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS)_ <!-- signed: repo:objectstack@os-steve · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z --> --------- Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS 落地Re-arm now that the cause of both dequeues is fixed on
State change: auto-merge re-armed by the owning seat under the authorized approval; on merge it closes #38870. |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS 2026-12-01T19:51Z · Merged at 2026-12-01T19:49Z after the seat re-armed it under the maintainer's approval; |
Requested by Yibo Wang · project thread
Fixes #38870
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
PR #38869 made
list_datasetsstop offering, for a word, a measure that carries afilterand aggregates a field the word names (ADR-0149 D3, the amendment note of 2026-12-01; ruling record 7301332152). The two tool texts say so; the publishedobjectstack-askskill still said every measure candidate is asked about. This PR brings the skill to the tool texts, in their words. No code path changes.skills/objectstack-ask/SKILL.md, step 1. One new bullet under thecandidatesbullet: a measure that carries a filter and aggregates a field the word names (the word equals or is inside the field's label or name; the name only where the host reads no field labels) is not offered for that word. A measure with no filter or over a relationship path is offered as before, and so is every measure when the word names different fields through different candidates.candidatesrow: for a word that names the field a filtered measure aggregates,nextStep.notenames the field; the client does not ask about that measure, answers from the field (step 4, the labelled fallback) and mentions the measure as a narrower declared metric. Another measure candidate left for the word is asked about first, and the field then answers only if the question settles nothing.candidatesrow's "Ask the same way" still points at that row.skills/objectstack-ask/evals/metric-selection-fallback.json. Two cases added (ids 26 and 27), both with thenextStep.notein the executor's own zh-Hans sentences. 26: 「工时」 beside the filtered measure 计费工时 over the field 工时,no_measure, nocandidates: the field answers throughdescribe_objectandaggregate_records, labelled 非指标口径, the measure mentioned, no question and no dataset query. 27: 「销售」 beside 销售额 over the field 金额,candidates_only: still a question, nothing computed. Case 17 (the English "sales" near-miss) is untouched.packages/mcp/src/ask-skill.generated.ts. Regenerated bynode scripts/gen-mcp-ask-skill.mjs; not hand-edited.scripts/check-skills-token-ratchet.mjs. Theobjectstack-askrow moves 1873 to 2040, with the comment pattern of the rows above it. No other row moves..changeset/38870-ask-skill-field-term.md,patchon@objectstack/skillsand@objectstack/mcp(the servedGET /mcp/skillpage ships in the mcpdist).The skill's rule against the tool texts, clause by clause
Sources at this head:
LIST_DATASETS_DESCRIPTIONis inpackages/services/service-analytics/src/dataset-tools.ts(its field sentence isDATASET_FIELD_TERM_SENTENCE, lines 115-118, joined at line 135); thecandidatesdescription ispackages/spec/src/ai/dataset-tools.zod.tslines 325-341;DATASET_SELECTION_RULEispackages/mcp/src/mcp-server-runtime.tslines 1908-1925.SKILL.mdline)candidates329-330: "A measure that carries a filter and whose aggregated field the term names ... is not offered for that term"dataset-tools.ts116-117 andmcp-server-runtime.ts1919-1920: "it equals or is inside that field's label or name"; spec 329-330dataset-tools.ts135: "A host that reads no field labels tests the field name only."docs/adr/0149-...mdline 206): "A measure whosefieldis a relationship path is not tested: it stays offered and asked about, as before."nextStep.notenames the fieldnextStep.notenames the field and mentions the measure as a narrower declared metric"dataset-tools.ts117 andmcp-server-runtime.ts1920: "is not asked about for that measure"dataset-tools.ts117-118 andmcp-server-runtime.ts1920-1921: "the field answers it through the object query tools, labelled as not from a governed metric"dataset-tools.ts118 andmcp-server-runtime.ts1921: "the measure is mentioned as a narrower declared metric"Not restated, on purpose: "its dataset's entry still lists it" (spec 332), which changes nothing a client does. The tool texts say "the field"; the dispatch text said "base field". The skill uses the tool texts' word and states the relationship-path case once, so the two do not say one thing twice.
Skill size (ruling record 6513306068)
Raise path the standing ruling 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B): the deletion of restatement in the same file is the listing instruction above.
origin/mainac97540)skills/objectstack-ask/SKILL.md, linesskills/objectstack-ask/SKILL.md, bytesskills/*/SKILL.md, linesBytes by part: step 1 bullet +385, step 2 row +337, the row that keeps the listing +28, the paragraph's half -81; net +669.
ceil((8185 - 27) / 4) = ceil(8158 / 4) = 2040(+167), pinned at the measurement, zero headroom. Eval fixtures are measured and not ratcheted: the eval file goes 39453 to 43750 bytes.Tests
All at fcdacb2, heavy runs under
os-verify-lock.sh.pnpm --filter @objectstack/mcp test: 89 files, 1669 tests passed (it holds the generated module and the servedGET /mcp/skillsection byte-equal to the skill,skill-single-source-34686.test.ts).pnpm --filter @objectstack/mcp typecheck: exit 0.pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 scripts/platform-catalog.test.ts src/shared/retired-key-migrate-sentence.test.ts scripts/export-list.test.ts(the spec tests that readskills/**or name the ratchet script): 3 files, 44 tests passed.skill-evals --dry-run --skills objectstack-askparses the catalog: 27 behaviour cases and 7 trigger cases; no model was called.Ablation: the new step 2 row deleted on disk, then restored
node scripts/ablation-replace.mjs --file skills/objectstack-ask/SKILL.md --anchor (the new row) --delete, mutation proven on disk (anchor 1 to 0, blob cd96e3199b3f to 68662b5d305c), three checks read on the mutated tree:node scripts/gen-mcp-ask-skill.mjs --check: exit 1, "ask-skill.generated.ts is stale against skills/objectstack-ask/SKILL.md".node scripts/check-skills-token-ratchet.mjs: exit 1, "is 1956 tokens; its ratchet ceiling is 2040, above the measurement by 84".vitest run src/skill-single-source-34686.test.ts(mcp): 2 failed, 1 passed ("the generated module equals the skill's data loop", "the served section equals the skill's data loop").Restored: blob equals HEAD (cd96e3199b3f),
git diff HEADempty,git status --porcelainempty; the three checks re-run green (exit 0, exit 0, 3 passed).What this shows and what it does not: the three checks hold the generated page and the row's price to the skill. None of them reads what the sentence says. The check that would is the model eval (cases 26 and 27), and it was not run: NOT MEASURED: skill evals, reason: a model round is the eval seat's, not a local gate.
Acceptance notes
LIST_DATASETS_DESCRIPTIONlives inpackages/services/service-analytics/src/dataset-tools.ts, not in the spec file; the spec file holds thecandidatesdescription. Both were read as sources.fieldand nofilterfor a measure, so a client cannot test the rule itself: what it sees is the measure missing fromcandidatesand the field named innextStep.note. The step 2 row is keyed on that.dispatch-gates.mjs --commandsderived 91 families at fcdacb2;--ran: 91 accounted for, 88 run and exit 0, 3 NOT-MEASURED, 0 unrun. The three:node scripts/check-plugin-teardown-shape.mjs --self-test(exit 3, its pinned fixture commit is outside this shallow clone),pnpm check:dual-build-cjs-loads(exit 3, needs a whole-repo build),pnpm check:pm-dispatch-gates(my owntimeoutfired, exit 124, at 560 s alone in the foreground; no verdict). All three are left to CI; this diff touches none of their inputs.node scripts/gen-mcp-ask-skill.mjs --check,pnpm check:pm-skill-ratchet,pnpm --filter @objectstack/spec run check:skill-examples(341 examples),check:skill-refs,check:skill-served-sections,pnpm --filter @objectstack/skills build,node scripts/check-platform-checklist.mjs --changed-from origin/main(0 anchored files in the change set).Verification
Read first, by risk:
skills/objectstack-ask/SKILL.md: the new step 2 row (line 64) and the new step 1 bullet (lines 49-53), against the table above; then the listing instruction's move (line 62 and the paragraph at lines 75-78), which is the deletion the ratchet raise rests on.scripts/check-skills-token-ratchet.mjs: theobjectstack-askrow and its comment, the only row touched.skills/objectstack-ask/evals/metric-selection-fallback.json: cases 26 and 27, theirmust_containandmust_not_containtokens.Two-minute check:
node scripts/gen-mcp-ask-skill.mjs --check && node scripts/check-skills-token-ratchet.mjsprints "is current with skills/objectstack-ask/SKILL.md" and "skills/objectstack-ask/SKILL.md is 2040 tokens (ceiling 2040; headroom 0)".Signed: repo:objectstack@os-support-ai · os-support-ai · session_01WGufzeatqKfTRUzTJVa9jQ
Generated by Claude Code