Skip to content

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

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-38870-ask-skill-field-term
Dec 1, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-38870-ask-skill-field-term

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread
Fixes #38870
Clause-②: no
Metadata-protocol: none

维护者速读

  • 通过 MCP 连到环境来问数的 AI 客户端会读我们对外发布的「问数」技能:用户说的词正好是某个带筛选条件的指标所汇总的字段时(例如「工时」对「计费工时」),技能原先教它反问,现在教它直接按该字段回答、注明非指标口径、顺带提一句那个更窄的指标,和服务端已上线的行为一致。
  • 属于「AI 通过数据集语义层回答业务问题」这条线:服务端规则已随上一个改动合并,这次让发给客户的技能文本跟上,避免技能和工具说明各说一套。
  • 若措辞有误,最坏是某个 AI 在本该反问时直接按字段回答(或反过来);不带筛选的指标、跨关联路径的字段、一个词同时指向不同字段,这三种情况技能里仍写明照旧反问;只改文字和由它生成的技能页,不涉及数据和元数据格式,可整体撤回。
  • 这是对外发布的技能文本,需要你批准后才能合并;其中技能长度上限按实测上调了 167 个计数单位(先删掉了一处重复说法)。

What changes

PR #38869 made list_datasets stop offering, for a word, a measure that carries a filter and 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 published objectstack-ask skill 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 the candidates bullet: 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.
  • Step 2 table. One new row after the candidates row: for a word that names the field a filtered measure aggregates, nextStep.note names 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.
  • Paid down first. The listing instruction was written twice: in the several-measures row ("List each candidate's label, its dataset's label and its description.") and in the paragraph under the table (": name each option by its label in a bullet, and quote its description as written"). It keeps one home, the row, which now reads "List each candidate's label, its dataset's label and its description as written, one bullet each." The paragraph's half is deleted. The candidates row's "Ask the same way" still points at that row.
  • Step 4 is unchanged. The card also names the last two step 4 bullets. They were read and left: "Open the answer with one line saying it is not from a governed metric" is the label the new row sends the reader to, and the line about a dataset on the fallback object is the recommended line the ADR note says "is unchanged and stays recommended practice".
  • skills/objectstack-ask/evals/metric-selection-fallback.json. Two cases added (ids 26 and 27), both with the nextStep.note in the executor's own zh-Hans sentences. 26: 「工时」 beside the filtered measure 计费工时 over the field 工时, no_measure, no candidates: the field answers through describe_object and aggregate_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 by node scripts/gen-mcp-ask-skill.mjs; not hand-edited.
  • scripts/check-skills-token-ratchet.mjs. The objectstack-ask row moves 1873 to 2040, with the comment pattern of the rows above it. No other row moves.
  • Changeset. .changeset/38870-ask-skill-field-term.md, patch on @objectstack/skills and @objectstack/mcp (the served GET /mcp/skill page ships in the mcp dist).

The skill's rule against the tool texts, clause by clause

Sources at this head: LIST_DATASETS_DESCRIPTION is in packages/services/service-analytics/src/dataset-tools.ts (its field sentence is DATASET_FIELD_TERM_SENTENCE, lines 115-118, joined at line 135); the candidates description is packages/spec/src/ai/dataset-tools.zod.ts lines 325-341; DATASET_SELECTION_RULE is packages/mcp/src/mcp-server-runtime.ts lines 1908-1925.

Clause Skill (SKILL.md line) Source
A measure that carries a filter and aggregates a field the word names is not offered for that word 49-51 spec candidates 329-330: "A measure that carries a filter and whose aggregated field the term names ... is not offered for that term"
"Names" means the word equals or is inside the field's label or name 49-50 dataset-tools.ts 116-117 and mcp-server-runtime.ts 1919-1920: "it equals or is inside that field's label or name"; spec 329-330
A host that reads no field labels tests the name only 50-51 dataset-tools.ts 135: "A host that reads no field labels tests the field name only."
A measure with no filter is offered as before 51-52 spec 333: "a measure with no filter is offered as before"
A measure over a relationship path is offered as before 52 not in either tool text; ADR-0149 D3 note of 2026-12-01, second point (docs/adr/0149-...md line 206): "A measure whose field is a relationship path is not tested: it stays offered and asked about, as before."
Every measure is offered when the word names different fields through different candidates 52-53 spec 332-333: "Such a measure is still offered when the term names different fields through different candidates"
nextStep.note names the field 64, left cell spec 331: "nextStep.note names the field and mentions the measure as a narrower declared metric"
The word is not asked about for that measure 64 dataset-tools.ts 117 and mcp-server-runtime.ts 1920: "is not asked about for that measure"
The field answers it under the labelled fallback 64 ("answer from the field (step 4)"; step 4 opens the answer with the 非指标口径 line) dataset-tools.ts 117-118 and mcp-server-runtime.ts 1920-1921: "the field answers it through the object query tools, labelled as not from a governed metric"
The measure is mentioned as a narrower declared metric 64 dataset-tools.ts 118 and mcp-server-runtime.ts 1921: "the measure is mentioned as a narrower declared metric"
Another measure candidate left for the word is asked about first; the field answers only if the question settles nothing 64 spec 333-335: "with another measure candidate left for the term, that one is asked about first and the field answers only if the question settles nothing"

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.

Reading Before (origin/main ac97540) After (fcdacb2)
skills/objectstack-ask/SKILL.md, lines 127 132
skills/objectstack-ask/SKILL.md, bytes 7516 8185
same file, ratchet tokens (27-byte stamp line unpriced) 1873 2040
all 14 skills/*/SKILL.md, lines 2475 2480
ratcheted bundle total, tokens 186955 187122

Bytes 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 served GET /mcp/skill section 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 read skills/** or name the ratchet script): 3 files, 44 tests passed.
  • skill-evals --dry-run --skills objectstack-ask parses the catalog: 27 behaviour cases and 7 trigger cases; no model was called.
  • No pin test reads the changed sentences' content, so none was updated. The one test that reads the skill text is the byte-equality pin above.
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 HEAD empty, git status --porcelain empty; 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_DESCRIPTION lives in packages/services/service-analytics/src/dataset-tools.ts, not in the spec file; the spec file holds the candidates description. Both were read as sources.
  • The eval file had no 销售 / 销售额 case before this PR; the near-miss that asks was case 17, in English ("sales" near Sales Amount). Case 17 is kept as it was and case 27 adds the Chinese pair from the ADR note.
  • The catalogue lists no field and no filter for a measure, so a client cannot test the rule itself: what it sees is the measure missing from candidates and the field named in nextStep.note. The step 2 row is keyed on that.
  • Local gates: dispatch-gates.mjs --commands derived 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 own timeout fired, exit 124, at 560 s alone in the foreground; no verdict). All three are left to CI; this diff touches none of their inputs.
  • Run beyond the derived set, each exit 0: 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:

  1. 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.
  2. scripts/check-skills-token-ratchet.mjs: the objectstack-ask row and its comment, the only row touched.
  3. skills/objectstack-ask/evals/metric-selection-fallback.json: cases 26 and 27, their must_contain and must_not_contain tokens.

Two-minute check: node scripts/gen-mcp-ask-skill.mjs --check && node scripts/check-skills-token-ratchet.mjs prints "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

…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>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 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): node scripts/docs-audit/affected-docs.mjs --json 7b68db99bfcb0887d3ffa8050f7f9391f79213e4 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 590b37c43f34f5026c8e2d0c544cdd580fd9885a — the merge of head bf15b48f51b0331599af1186f8af0fb5cd3e0a9a into base 7b68db99bfcb0887d3ffa8050f7f9391f79213e4, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzeatqKfTRUzTJVa9jQ

CI reading · 2026-12-01T14:04Z · zone osa-ai · head fcdacb2d39

  • 37 success, 18 skipped, 1 cancelled, 1 failure. The two are one event: Type Check · workspace (job 142658606560, run 46652073461, lint.yml) was cancelled, and the aggregate TypeScript Type Check (job 142696443249) fails only because that lane "concluded cancelled -- expected success".
  • Not this diff's: the lane built the workspace green (13:04–13:11Z), then its Type check workspace packages step stopped as cancelled at 13:15:19Z with the log cut mid tsup output and no error TS line; the job then sat until the 60-minute cap (14:01:45Z). No type error was reported. The dev's local pnpm --filter @objectstack/mcp typecheck (the one package whose .ts this PR regenerates) exited 0 at this head.
  • One re-run was attempted through the relay (run_rerun_failed, request fw-20261201T140304Z-41f30d) and REFUSED at its workflow fence: the relay re-runs only ci.yml / check-links.yml, not lint.yml. Nothing sent. No empty commit, no close/reopen.
  • This PR is Tier H (skills/**) and goes to the seat for hand-off; the lane's re-run is handed there with it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract-review-claim: session_01WGufzhGA3zoCFquQgku4pm · head fcdacb2 · 2026-12-01T14:07Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: fcdacb2d399aedfcd268ca63eabca52188cb4e09
Local-runs: none
Scope: skills/objectstack-ask/SKILL.md, skills/objectstack-ask/evals/metric-selection-fallback.json + scripts/check-skills-token-ratchet.mjs
Security-touching: no

Read for this record: card #38870 (body, claim 7309647083, dev report 7312068828), PR #38915 (body, five files, net diff against main, merge base ac97540), the check-runs on the head, ruling record 6513306068 on #27847. Read on origin/main d7e4e3e and not reviewed: packages/spec/src/ai/dataset-tools.zod.ts (the candidates description), packages/services/service-analytics/src/dataset-tools.ts (DATASET_FIELD_TERM_SENTENCE, LIST_DATASETS_DESCRIPTION), packages/mcp/src/mcp-server-runtime.ts (DATASET_SELECTION_RULE), packages/services/service-analytics/src/dataset-next-step.ts (the zh-Hans copy and the composer), ADR-0149 D3, the amendment note of 2026-12-01. main has not moved any of these, nor the skill, the ratchet script or the generated module, since the merge base.

packages/mcp/src/ask-skill.generated.ts and the changeset are generated output and a changeset: the lane seat's ACCEPT, not reviewed under ④. The module was compared to the skill as text because the dispatch asks: its 106 lines equal SKILL.md lines 27 to 132 at this head, zero mismatches.

① Derived judgments

  • Accept-set: no change. No schema, no tool input or output, no code path. Right.
  • Public surface: the published objectstack-ask skill text, and the GET /mcp/skill page generated from it. The change brings both to behaviour already on main (PR feat(service-analytics): a word that names the field a filtered measure candidate sums is answered from that field (ADR-0149 D3 note of 2026-12-01) #38869). It teaches no behaviour the server does not have. Right.
  • Eval catalogue: 25 cases become 27 (ids 26, 27). Eval fixtures are measured and not ratcheted (ruling 6513306068, part 1). Right.
  • Token ratchet: the objectstack-ask row moves 1873 to 2040, no other row. Checked against ruling 6513306068, letter B, part 2, clause by clause:
    • "deletion of restatement in the same file": shown in the diff. The listing instruction stood twice (the several-measures row; the paragraph under the table). The paragraph's half is cut (-81 bytes), the row gains " as written, one bullet each" (+28). The candidates row's "Ask the same way" still reaches the row, so the one-candidate question keeps the instruction. No taught behaviour is lost.
    • "body quotes the ruling": the PR body and the row comment quote 「A:先削重复,余额按实测提高」 and the record id.
    • "the measured remainder, pinned AT the measurement": 8185 bytes at this head (read from the blob), less the 27-byte stamp line, ceil(8158 / 4) = 2040. Zero headroom.
    • The pay-down is small beside the addition (net -53 bytes against +722). The ruling sets no ratio, and the added text is what the card's Expected section lists. Right.
  • Gates, from the check-runs as they stand: Lint & Repo Gates, every Lint · lane, Test Core (12 of 12 shards), Build Core, Type Check · source gates, · consumer gates, · debt ledger, Check Changeset, PR-body guards, Governed Surface Queue Guard: success.
  • One gate family has NO verdict on this head. Type Check · workspace concluded cancelled in its "Type check workspace packages" step, on the job's 55-minute limit ("The job has exceeded the maximum execution time of 55m0s"). The aggregate TypeScript Type Check then concluded failure for that reason alone ("type-check lane typecheck-workspace concluded cancelled -- expected success"). No type error was reported. The diff's one TypeScript file is a generated array of string literals. This record does not read the cancellation as a pass and did not replace it with a local run. See ③.

② Semver level

Clause-②: no. patch on @objectstack/skills and @objectstack/mcp matches what the diff publishes: skill prose, and the served page that ships in the mcp dist. No metadata key, no schema, no tool contract changes. Metadata-protocol: none holds. Check Changeset is green.

③ Boundary flags

  • open_questions: none in the dev report.
  • Dev deviation, the relationship-path clause is in neither tool text: answered. The card's Expected names it, and the ADR note states it ("A measure whose field is a relationship path is not tested: it stays offered and asked about, as before."). The skill's sentence agrees.
  • Dev deviation, "a field" where the dispatch said "a base field": answered. "Field" is the tool texts' word, and the relationship-path case is stated once beside it, so the meaning is the ADR's.
  • Dev deviation, an ablation run on a prose change: no effect on this record. It proves the sync pin and the row price, as the dev says, not the wording.
  • Dev deviation, LIST_DATASETS_DESCRIPTION is in service-analytics and not in the spec file: confirmed on main. Both were read here.
  • Dev deviation, case 17 kept and case 27 added: confirmed, case 17 is untouched in the diff.
  • Not measured by the dev, and not by this record: the model eval of cases 26 and 27. No check-run reads what the new sentences say. That round is the eval seat's.
  • ESCALATED to the dispatching seat: the workspace type-check lane has no verdict on this head (①). A re-run of that job does not move the head, so this record still covers it. The seat decides whether to re-run before the PR goes to the approvers; the aggregate check is red until then.
  • The card's note about packages/qa/scenarios/src/score/scenario-dataset-grade.ts is the seat's and outside this diff.
  • SQL push-down: not applicable. The diff holds no query, no id materialisation and no join.

④ Design judgment

No must-fix, no should-fix.

skills/objectstack-ask/SKILL.md — each taught sentence against the merged text on main:

Skill sentence Source on main Agrees
A measure that carries a filter and aggregates a field the word names is not offered for that word spec candidates: "A measure that carries a filter and whose aggregated field the term names ... is not offered for that term" yes
the word equals or is inside the field's label or name spec: "the term equals, or is inside, that field's label or name"; the same in both tool texts yes, one direction, as the ADR says
the name only where the host reads no field labels LIST_DATASETS_DESCRIPTION: "A host that reads no field labels tests the field name only." yes
A measure with no filter ... is offered as before spec: "a measure with no filter is offered as before" yes
... or over a relationship path ADR note, second point yes
so is every measure when the word names different fields through different candidates spec: "Such a measure is still offered when the term names different fields through different candidates" yes
row key: nextStep.note names the field spec: "nextStep.note names the field and mentions the measure as a narrower declared metric" yes
Do not ask about that measure: answer from the field (step 4) and mention the measure as a narrower declared metric DATASET_FIELD_TERM_SENTENCE and DATASET_SELECTION_RULE, the same sentence in both yes; step 4 carries the 非指标口径 line
Ask first about another measure candidate left for the word; the field then answers only if the question settles nothing spec: "with another measure candidate left for the term, that one is asked about first and the field answers only if the question settles nothing" yes

Tried to break it:

  • Can a client apply the step 1 bullet itself and drop a candidate the answer does offer? The bullet says "is not offered", and the bullet above it defines candidates as what the answer offers, so the actor is the tool. The step 2 row acts only when the note names the field. An unfiltered measure that is still offered falls in the candidates row and is asked about. Holds.
  • Does the new row collide with a row beside it? With nothing left, "No match and no candidates ... Step 4, without asking" says the same thing. With a measure candidate left, the row's second sentence and the candidates row say the same thing, and the executor's note for that case (fieldAfterQuestion) says it too. Holds.
  • Step 4 is unchanged, and it is enough: its label line is what the row points at, and its dataset line is the one the ADR note keeps as recommended practice. In case 26 both the ruled mention and that line apply, and they do not conflict.
  • The moved listing instruction: see ①. Nothing lost.

Nits:

  • N1 (nit) — The row does not say the mentioned measure is not computed. The ADR note says "The measure is not computed and not selected", and the executor's note says 不要计算它. Neither tool text says it, and the card binds the skill to the tool texts, so the skill follows note here. Accepted deviation.
  • N2 (nit) — A word whose field answers it and whose candidates left are all dimensions is reported as candidates_only. The skill then relies on the note and on the new row's key to stop a reader from taking the word for a grouping word (the ADR: "They do not make the term a grouping word"). The tool texts do not state this case either. No eval covers it, or the case with another measure candidate left. Follow-up card for the eval seat, if wanted.

skills/objectstack-ask/evals/metric-selection-fallback.json

  • Case 26: no must_not_contain token (query_dataset(, 你是指, 您是指) is in its expected_output; all four must_contain tokens are. The shape is the ADR's: no_measure, no candidates, the dataset entry still lists the measure. The note is the executor's zh-Hans fieldHit followed by fallbackTail, character for character, with the empty sentence gap of that locale.
  • Case 27: no must_not_contain token (query_dataset(, aggregate_records(, sales_amount, 非指标口径) is in its expected_output; both must_contain tokens are. The note is candidateHit, ownPhraseFirst, candidateTail as the composer orders them. The pair is the ADR's own example of what does not change.
  • N3 (nit) — Case 26 refuses 你是指 and 您是指 to catch a question. A correct answer that mentions the measure with "如果您是指计费工时…" would fail the literal grader. The file's English cases use the same pattern ("Do you mean"), so this is the file's standing convention. Left as is.
  • N4 (nit) — Both expected_output texts state facts the prompt does not give (case 27: 销售额 sums the field 金额; case 26: the measure carries a filter). They are consistent with the note in each prompt and no assertion reads them. Left as is.
  • Outside the diff, read and not reviewed: cases 12 and 15 hold a must_not_contain token inside their own expected_output ("is empty", "unknown"), in a negated sentence. This PR does not touch them.

scripts/check-skills-token-ratchet.mjs (implementing file) — the row and its comment against the rule the script enforces: one row moved, the value equals the measurement, the comment names the ruling, the deletion and the byte arithmetic, and its totals match the blobs (7516 and 8185 bytes, net +669). The four per-part figures (+385, +337, +28, -81) sum to that net; they were not measured one by one here. Agrees.

Implemented-by: claude/issue-38870-ask-skill-field-term
Reviewed-by: session_01WGufzhGA3zoCFquQgku4pm

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

L1 review + L2 adoption · PR #38915 (#38870) · head fcdacb2 · 2026-12-01T14:12Z

L1: 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: Type Check · workspace was cancelled at the job's 55-minute limit in its type-check step, with no type error reported. So the aggregate TypeScript Type Check is red on that cancellation alone. The diff's only TS file is a generated array of string literals. Re-running that job does not move the head, and these records still cover it. Get a green type-check on this head before it goes to the approvers. The relay refuses lint.yml, so the seat re-runs it or asks the maintainer to.

What I checked:

  • l1-face: everything else is green. The one red is the type-check aggregate described above.
  • Eval self-check. In cases 26 and 27, no must_not_contain token appears in that case's own expected_output. Both note strings match the executor's zh-Hans copy.
  • Generated module. ask-skill.generated.ts equals SKILL.md L27 to L132, line for line, per L2.
  • Token ratchet.
    • SKILL.md measures ceil((bytes-27)/4) = 2040, so the row 1873 → 2040 equals the measurement, with headroom 0.
    • The same-file pay-down comes first: the duplicated listing instruction keeps one home.
    • The ruling's words (6513306068 B) are quoted.
  • Scope. 5 files inside the claim. Fixes #38870 is right, and the card was blocked on feat(service-analytics): a word that names the field a filtered measure candidate sums is answered from that field (ADR-0149 D3 note of 2026-12-01) #38869, which has merged. patch on @objectstack/skills and @objectstack/mcp, with Clause-②: no, is right for prose plus the served page.

For the seat:

  • The model eval of cases 26 and 27 has not been run; that is the eval seat's round.
  • N2, a possible eval follow-up: a field-answered word with only dimension candidates left, or with another measure left.
  • Outside this diff: pre-existing cases 12 and 15 in the same file each hold a must_not_contain token inside their own expected_output (in negated sentences), so a correct answer can fail them. Worth a small skills card.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS

席位核对

ACCEPT — PR #38915 @ fcdacb2d399aedfcd268ca63eabca52188cb4e09 (card #38870, zone osa-ai). Checked 2026-12-01T14:15Z against GitHub, not against the reports.

  • Shape: draft, base main, Fixes #38870. Five files, +77/-11: skills/objectstack-ask/SKILL.md and its eval fixture metric-selection-fallback.json, the generated packages/mcp/src/ask-skill.generated.ts, scripts/check-skills-token-ratchet.mjs (one row) and a changeset.
  • I read the governed hunks myself. The ask skill's step 1 gains one bullet and step 2 one row teaching the ADR-0149 D3 amendment of 2026-12-01 (ruling 7301332152) in the words list_datasets' description and the merged executor (PR feat(service-analytics): a word that names the field a filtered measure candidate sums is answered from that field (ADR-0149 D3 note of 2026-12-01) #38869) use: a filtered measure that aggregates the field a word names is not offered; the field answers and the measure is mentioned as narrower; the three default cases the maintainer let stand on PR docs(adr): ADR-0149 D3 — a term that names a candidate measure's field is answered by the field, not asked about #38848 are taught once each. The listing instruction said twice is paid down to one home. The ratchet row moves 1873 → 2040 at the measured remainder, citing the standing raise ruling 6513306068 (letter B), with zero headroom.
  • Gates (check-runs on the head): everything green except Type Check · workspace, cancelled by its 55-minute job limit in step "Type check workspace packages" with no TypeScript error printed (job 142658606560, 13:01:45Z → 14:01:45Z), and the aggregate TypeScript Type Check that reads that cancel. The relay cannot re-run lint.yml jobs; run 46652073461 needs a re-run by the maintainer before the queue. The diff touches no TypeScript the job type-checks except a generated string module.
  • Reviews on this head: contract review PASS 7313849352 at CONTRACT_REVIEW_TIER (N1–N4 accepted); L1 ACCEPT and L2 adoption 7313878027 (osa-L1-a).
  • Carry: evals 26 and 27 are not model-run (eval seat); a small skills card for pre-existing eval cases 12 and 15 (a must_not_contain token inside their own expected_output).
  • Landing: check-governed-merges.mjs --pr 38915 reads Tier H: skills/** ×2, and the low-risk arm does not apply (generated packages/mcp file and ratchet script in the diff; the changeset releases @objectstack/mcp). 88 lines ≤ 3000. Handed off to the approvers; the seat flips nothing until an authorized approval is on record.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS

维护者速读

席位意见:同意落地。ACCEPT → PR #38915 comment 7313954431。

@os-zhuang
os-zhuang disabled auto-merge December 1, 2026 16:04
@os-zhuang
os-zhuang enabled auto-merge December 1, 2026 16:27
@os-zhuang
os-zhuang added this pull request to the merge queue Dec 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 1, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS

落地

Re-arm after a dequeue that is not this PR's. Queue group gh-readonly-queue/main/pr-38915-be2df753, run 46694562151: job 142810857006 "Type Check · workspace" was stopped by ##[error]The runner has received a shutdown signal at 2026-12-01T16:49Z; every typecheck still running at that instant printed ELIFECYCLE Command failed with no error TS line, and "TypeScript Type Check" failed 3 s later only by reading it. The same job class was cancelled once before on this PR (run 46652073461) and re-ran green.

reading value
check-governed-merges.mjs --pr 38915 Tier H; seat ACCEPT 7313954431, 速读 7313976616
authorized approval os-zhuang APPROVED (review 6135041600); the maintainer's word in the seat thread 「38915 我批准了,你审核之后可以自己落地」
head bf15b48f51 (merge of main, no conflict) 39 success · 18 expected skip · 0 failed on the PR; skills token ratchet exit 0 (+0)

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.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 1, 2026
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS

落地

Re-arm now that the cause of both dequeues is fixed on main: #38990's PR #38991 merged at 2026-12-01T19:22Z (merge commit 1e1cacb), putting --concurrency=4 on the "Type Check · workspace" turbo runs whose runner died mid-run on this PR's queue groups (runs 46694562151, 46697850508) and on #38969. The merge group builds on main, so the next queue run carries the cap.

reading value
head bf15b48f51, unchanged; os-zhuang APPROVED on it (review 6135041600)
pr-state.mjs 39 success · 18 expected skip · 0 failed; mergeable_state clean
landing-k.mjs K = 9 < 15

State change: auto-merge re-armed by the owning seat under the authorized approval; on merge it closes #38870.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 38ab473 Dec 1, 2026
57 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-38870-ask-skill-field-term branch December 1, 2026 19:49
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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; pm:awaiting-merge cleared by the seat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants