Skip to content

docs(skills): add objectstack-ask, a skill for answering business questions over MCP - #34792

Merged
os-zhuang merged 4 commits into
mainfrom
claude/issue-34685-ask-data-skill
Nov 17, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/issue-34685-ask-data-skill

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

repo:objectstack#3 · os-support-ai · session_01WGufzfR33NbV51QQU6R6bm

Fixes #34685

Clause-②: no
Metadata-protocol: none
Served-tier: CONTRACT_REVIEW_TIER

维护者速读

  • 改了什么:新增一个对外发布的技能 objectstack-ask(105 行,1522 token),教已连上 MCP 的客户端怎么回答业务问题;另在 objectstack-ai 和 objectstack-query 的聚合规则里各加一行指向它。
  • 为什么改:问数流程此前只写在 list_datasets 的工具描述和 GET /mcp/skill 页面里,客户端选工具之前读不到,常常直接用 aggregate_records 算数而不走指标口径。
  • 风险与回滚:只动文档与目录登记,不动运行时代码。技能包多 1545 token(全部 SKILL.md 之和 60019 → 61564)。回滚即 revert 本 PR。
  • 先看:skills/objectstack-ask/SKILL.md 第 2 步的判定表(按词逐个判定;近似词那一行是新规则);scripts/check-skills-token-ratchet.mjs 末尾新增的定价行(定价权在维护者);packages/create-objectstack/src/created-summary.test.ts 的符号链接用例(目录数过 10 后改走折叠分支)。
  • 两分钟验证:node scripts/check-skills-token-ratchet.mjs,预期末行「58 authored bundle file(s) within their ceilings」。
  • 需要你做的:批准本 PR(新增 skills/** 文件,Tier H)。

What changes

  • New skill skills/objectstack-ask/SKILL.md. Its reader is a client that answers a question over a live environment through the MCP tools list_datasets, query_dataset, list_objects, describe_object, query_records and aggregate_records. The steps, in order: lift the business words; call list_datasets with them as terms, in the user's own words; decide by matches; compute with query_dataset and cite provenance; otherwise fall back to the object tools and open the answer with the 非指标口径 line; say what is missing when the data cannot answer; then the answer-writing rules.
  • Evals skills/objectstack-ask/evals/metric-selection-fallback.json. Seven cases: one for each branch (one match, several matches, near-miss, no metric (labelled fallback), data cannot answer, membersWithheld), and a two-metric question added in fix round 2.
  • Catalog registration. One DISPLAY row in packages/spec/scripts/build-skill-docs.ts; skills/README.md and content/docs/ai/skills-reference.mdx are regenerated by gen:skill-docs. One ceiling row in scripts/check-skills-token-ratchet.mjs, pinned at the measurement.
  • Two pointer lines, in skills/objectstack-ai/SKILL.md (the MCP section) and skills/objectstack-query/rules/aggregation.md.
  • packages/create-objectstack/src/created-summary.test.ts. objectstack-ask joins SKILLS. The list is now eleven long, above COLLAPSE_AT (10), so the symlink case now asserts on the collapsed line for each link farm (entries equals the number of links, bytes equals the links' own bytes). The old comment in that test named this as the move to make when the catalog passes ten.
  • Changeset .changeset/34685-ask-data-skill.md: @objectstack/skills at patch. create-objectstack has no entry, because only its test file moved.
  • Nothing under packages/mcp/** or packages/runtime/**.

Why

The procedure for answering a business question was written in the list_datasets tool description and on the served /mcp/skill page. A client loads a tool's description only after it picks the tool, so a client without a skill often answered from aggregate_records and never reached the governed metric (card evidence). The epic ruling (D5 A, record 6940528935 on the epic card) puts the procedure in the published skills package.

Tests

All readings are on head 4b17fddc, with the working tree clean.

Command Result
pnpm --filter create-objectstack exec vitest run --maxWorkers=2 src/created-summary.test.ts (under the verify lock) Test Files 1 passed (1), Tests 12 passed (12); lock line VERDICT command-exit 0
node scripts/check-skills-token-ratchet.mjs exit 0; "58 authored bundle file(s) within their ceilings; 10 generator-owned file(s) and 30 eval fixture(s) measured, not ratcheted"
node scripts/check-skills-token-ratchet.mjs --self-test exit 0
node scripts/check-skill-compatibility-version.mjs and --self-test exit 0 both; "1 justified exemption(s)" (the new skill pins @objectstack/mcp 18.x and is not exempt)
pnpm --filter @objectstack/spec run check:skill-docs exit 0; "Skill docs in sync"
pnpm --filter @objectstack/spec run check:skill-examples exit 0; 347 prose examples
Eval self-consistency (a one-off script, not committed) 6 cases, ids 1 to 6 distinct, 18 must_contain and 13 must_not_contain entries, 0 violations: every must_contain occurs in its expected_output and in SKILL.md; no must_not_contain occurs in its expected_output
node ui/scripts/check-skill-eval-tokens.mjs exit 0, but its --list names no objectstack-ask row: that gate does not read this bundle

No ablation: the diff changes no behaviour that a test pins. The test edit follows the list length.

Acceptance notes

Alignment with the served text

Skill lines are skills/objectstack-ask/SKILL.md; served lines are packages/mcp/src/skill-md.ts (DATASET_TOOL_LINES, 265-291), read at f02f4f63.

Rule Skill line Served line Same?
Pass the question's business words as terms; matches says which member each names 34-39 267-269 same
A word matches only when it equals a member's name, label or synonym (case, spacing, _ and - aside), never by similarity 39-40 277-279 same words
One measure match: answer with query_dataset 48 279-280 same outcome; since fix round 2 the skill counts per word ("each word for a thing measured matches exactly one measure"), so two words with one measure each compute both. The served line does not say per what
Several matches (two datasets or two members): ask, list each candidate's label, dataset and description, do not pick 49 280-282 same outcome; since fix round 2 the skill says "one word matches several measures, in one dataset or in two" (ADR-0149 D3 rule 3, "answer to the word")
A dimension match alone is not an answer: a measure must still match, or ask 50 283-285 same
No match: fall back to query_records / aggregate_records and say the answer is not from a governed metric 52, 84-88 282-283 same; the skill adds the 非指标口径 label, which the list_datasets tool description carries
membersWithheld: true: say so, never say the metric does not exist 53 269-270 differs since fix round 2: the skill says "members (measures or groupings) you may not read", which is what the flag reports; the served line still says "some measures exist". The contract review (S2) leaves the served copy to the sibling server card, which renders it from this skill
Cite the source from provenance, not from memory; explain the number with the measure's description 72-74 273-275 same
Data cannot answer: say the data does not record it, name what is missing, offer the computation if the user supplies it; never an assumed value, never a conclusion from one 94-98 286-290 same
Every figure comes from a tool answer 104 291 same
Near-miss: nothing matches and the word is a loose form of several listed measures: ask, list the candidates, compute nothing yet 51, 55-60 none added by ruling (seat routing B on the card, comment 6944554445). The served text sends every zero-match to the fallback. The sibling server card makes the served page render from this skill

Every name the skill uses, checked against the code

Name Where it is declared
list_datasets, query_dataset packages/spec/src/ai/dataset-tools.zod.ts:43,45; registered at packages/mcp/src/mcp-http-tools.ts:2289,2309
terms dataset-tools.zod.ts:69
matches, with term, member (measures.NAME or dimensions.NAME), matchedOn dataset-tools.zod.ts:161, 85-89
membersWithheld, dataset object dataset-tools.zod.ts:154, 153
partial, warning on the list_datasets answer dataset-tools.zod.ts:173, 177
measure and dataset label, description dataset-tools.zod.ts:125,129,149,150
datasetName, selection dataset-tools.zod.ts:217, 221
selection.measures, .dimensions, .runtimeFilter, .dateGranularity, .order, .limit packages/spec/src/api/analytics.zod.ts:680,678,687,705,725,732
provenance (dataset label, measure labels), truncated, warning on the query_dataset answer dataset-tools.zod.ts:270 (236-243), 272, 279
list_objects, describe_object({ objectName }), field options (value and label) mcp-http-tools.ts:2524, 2582, 2596, 2588
query_records, aggregate_records, and truncated on the aggregate answer mcp-http-tools.ts:2860, 2955, 3039

The skill names no candidates field.

Where the text departs from the card's starting text

  • No second catalogue read on a near-miss. The card and the dispatch order say to call list_datasets again without terms to read the unfiltered catalogue. The code shows a call with terms already returns every dataset the caller may query, with all its members; terms only adds matches (packages/services/service-analytics/src/dataset-tools.ts:409-440, line 439). So the skill says the answer already in hand is the catalogue, and that a call without terms returns the same list.
  • Terms are sent as written, not translated. The starting text allowed an English rendering as an extra term. A match on a word the client supplied would select a measure on the client's reading, which is selection by similarity. A translated word now leads only to the near-miss question.
  • A zero-match word that is a loose form of exactly one listed measure falls back, labelled, and the fallback names the dataset when it is on the same object. The ruling covers "several". Asking back on one candidate is a wider rule than the ruling's premise; it is in the report's open questions.
  • metadata.domain: process. The skill teaches no schema, so it carries SKILL.md alone, as the README's skill anatomy says for process. The README describes process as a delivery-process skill; this skill is a procedure, not a delivery process. A new domain value would need a hand edit to the README outside this card's file surface.
  • compatibility: Requires an environment served by @objectstack/mcp 18.x. The compatibility gate needs a pinned major; the skill binds to the MCP tools, not to a spec schema.
  • Added, each from a declared field: no list_datasets among the tools goes straight to the fallback (the pair registers only when the host's bridge carries it, mcp-http-tools.ts:2286); partial / warning; truncated on both answers; selection.dateGranularity, order, limit.

Token readings (ceil(utf8 bytes / 4), the ratchet's convention)

File Before After
skills/objectstack-ask/SKILL.md absent 105 lines, 5848 bytes, 1457 tokens (ceiling 1457, new row)
skills/objectstack-ai/SKILL.md 442 lines, 6342 tokens 443 lines, 6365 tokens (ceiling 6801, not moved)
skills/objectstack-query/rules/aggregation.md 270 lines, 2264 tokens 272 lines, 2292 tokens (ceiling 2357, not moved)
All SKILL.md files together 11 files, 60019 tokens 12 files, 61499 tokens
Authored bundle (ratcheted) 189551 191059
Whole shipped tree 252563 255871 (the eval file is 1800 of the difference, unpriced)

Both pointer lines fit inside existing headroom, so no existing row moves and nothing was cut. The new ceiling row is a pricing act the ratchet's header reserves to the maintainer; this PR is Tier H and the approval is that word.

Not done here

  • The card's third "Done when" item, a repeat of the pilot through the scenario runner, belongs to the sibling devx card. No live-environment run was made for this PR.
  • The served text in packages/mcp/src/skill-md.ts still lacks the near-miss row until the sibling server card renders it from this skill.

Verification

Local gates: the dispatch-gates --commands derivation for this diff, run after the final commit 4b17fddc, then --ran with recorded exit codes:

✓ dispatch-gates --ran: 120 derived famil(ies) accounted for — 118 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3).

  • 118 exited 0.
  • NOT MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test (exit 3: its fixture commit is not reachable in this shallow clone) and pnpm check:dual-build-cjs-loads (exit 3: it needs a full pnpm build). Both are left to CI.
  • pnpm check:changeset-gate-self-tests exited 1 on the first run, because the commit-signing server answered 503 inside its temporary repositories. A second run exited 0.
  • Builds first: pnpm --workspace-concurrency=2 --filter '@objectstack/lint...' build and --filter '@objectstack/client-react...' build, both VERDICT command-exit 0 under the verify lock.
  • node scripts/pm/overlap-check.mjs before the push: VERDICT clean exit 0 (one open PR shares skills/objectstack-ai/SKILL.md and merges cleanly).
  • test:repo, the repo-wide pnpm lint and the rest of the farm are CI's.

Fix round 1

Head 63c79bc1 (was 4b17fddc). One file moved: skills/objectstack-ask/evals/metric-selection-fallback.json. SKILL.md is byte-identical. This answers the L1 review's should-fix S1 (comment 6946869842): an eval case asserts only what any correct reply carries. It replaces the "Eval self-consistency" row under Tests.

Case must_contain before must_contain now Other edits
1, one match query_dataset, provenance, runtimeFilter query_dataset Same defect, milder: a correct reply can describe the citation and the quarter filter in prose without the two field names.
2, several matches label, description, which one they mean Open Pipeline, Weighted Pipeline, Opportunities, Forecast, ? must_not_contain gains the machine names open_amount and weighted_amount (the skill says to show labels). expected_output gives a sample question.
3, near-miss the three measure labels, compute nothing yet the three measure labels, Sales, Accounts, Targets, ? expected_output gives a sample question and names each dataset.
4, fallback describe_object, aggregate_records, 非指标口径, value describe_object, aggregate_records, priority Same defect: the user writes English, so a correct opening line need not carry the Chinese token; value was one wording of the option rule. expected_output now says the line is in the user's language.
5, data cannot answer does not record it, weight weight, limit Same defect: one exact phrase. must_not_contain drops assuming, which a correct refusal can use ("without assuming a weight").
6, withheld members membersWithheld, may not read 财务汇总, 毛利率 No English token is asserted on the Chinese reply. must_not_contain keeps 不存在 and drops the English does not exist. expected_output gives a sample Chinese sentence.

Limits of the shape, stated once: a substring list cannot tell a negated mention from a use, so must_not_contain entries that name a tool (cases 1 to 3) can still trip on a correct reply that says which tool it does not call; and no single Chinese token for "not permitted" holds across correct replies (无权, 没有权限, 不能查看), so case 6 asserts the dataset label and the user's word only. The disclosure line in case 4 and the permission wording in case 6 are held by expected_output.

Check script (scratch, not committed), run on 63c79bc1, exit 0. For each must_contain: it occurs in the case's expected_output, and in the case's own prompt or in SKILL.md. For each must_not_contain: it does not occur in expected_output.

metric-selection-fallback.json: 6 cases, ids 1,2,3,4,5,6 distinct=true
  case 1 must_contain "query_dataset": in expected_output=true source=SKILL.md
  case 1 must_not_contain "aggregate_records": in expected_output=false
  case 1 must_not_contain "非指标口径": in expected_output=false
  case 2 must_contain "Open Pipeline": in expected_output=true source=prompt
  case 2 must_contain "Weighted Pipeline": in expected_output=true source=prompt
  case 2 must_contain "Opportunities": in expected_output=true source=prompt
  case 2 must_contain "Forecast": in expected_output=true source=prompt
  case 2 must_contain "?": in expected_output=true source=prompt
  case 2 must_not_contain "query_dataset": in expected_output=false
  case 2 must_not_contain "aggregate_records": in expected_output=false
  case 2 must_not_contain "open_amount": in expected_output=false
  case 2 must_not_contain "weighted_amount": in expected_output=false
  case 3 must_contain "Won Revenue": in expected_output=true source=prompt
  case 3 must_contain "Annual Revenue": in expected_output=true source=prompt
  case 3 must_contain "Planned Revenue": in expected_output=true source=prompt
  case 3 must_contain "Sales": in expected_output=true source=prompt
  case 3 must_contain "Accounts": in expected_output=true source=prompt
  case 3 must_contain "Targets": in expected_output=true source=prompt
  case 3 must_contain "?": in expected_output=true source=prompt
  case 3 must_not_contain "query_dataset": in expected_output=false
  case 3 must_not_contain "aggregate_records": in expected_output=false
  case 3 must_not_contain "非指标口径": in expected_output=false
  case 4 must_contain "describe_object": in expected_output=true source=SKILL.md
  case 4 must_contain "aggregate_records": in expected_output=true source=SKILL.md
  case 4 must_contain "priority": in expected_output=true source=prompt
  case 4 must_not_contain "provenance": in expected_output=false
  case 5 must_contain "weight": in expected_output=true source=prompt
  case 5 must_contain "limit": in expected_output=true source=prompt
  case 5 must_not_contain "typical": in expected_output=false
  case 5 must_not_contain "probably": in expected_output=false
  case 6 must_contain "财务汇总": in expected_output=true source=prompt
  case 6 must_contain "毛利率": in expected_output=true source=prompt
  case 6 must_not_contain "不存在": in expected_output=false
VERDICT ok: 0 violations

Gates on 63c79bc1, derived for the one changed file (dispatch-gates --commands with that path), then --ran with recorded exit codes:

✓ dispatch-gates --ran: 31 derived famil(ies) accounted for — 19 run, 12 NOT-MEASURED (12 DERIVED from a recorded exit 3).

  • 19 exited 0, among them pnpm check:nul-bytes, pnpm check:skill-links, pnpm check:skill-compatibility, pnpm check:skill-identifier-liveness and pnpm check:skill-frame-sync.
  • NOT MEASURED, reason: this round's worktree has no install and no build, and each printed PREREQUISITE NOT MET (exit 3): check-closing-keyword-parity and its self-test, check-comment-mask-corpus, check:doc-formula-expressions, check:ci-filter-parity, check:doc-authoring, check:driver-memory-census, check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure, check:pm-governed-merges, check:sourcemap-no-sources-content. All are left to CI.
  • node scripts/pm/overlap-check.mjs before the push: VERDICT clean exit 0 (against origin/main at 3bbda33b and two open PR heads that share a file).
  • The branch is 25 commits behind origin/main (3bbda33b). No merge was made in this round.

Fix round 2

Head 94affc64 (was 1a8bd8ba). Three files moved: skills/objectstack-ask/SKILL.md, its eval file, and the skill's one row in scripts/check-skills-token-ratchet.mjs. This answers the contract review on this PR (record 6947390250): should-fixes S1 and S2, and nit N1. N2 to N4 are left as the record says.

Id Step 2 table row, before Now
S1, row 1 "One measure matches" → "Compute it: step 3, with that dataset and measure." "Each word for a thing measured matches exactly one measure" → "Compute: step 3. Two words with one measure each ("营收和赢单率") are two metrics, not a choice: compute both, with one query_dataset per dataset."
S1, row 2 "Several measures match (two members, or one word in two datasets)" → ask "One word matches several measures, in one dataset or in two" → ask (the action text is unchanged)
N1, row 5 "Step 4, and say in the answer that no governed metric was used." adds "One near form is not a match either: it selects nothing."
S2, last row "Say that it has measures you may not read." "Say that it has members (measures or groupings) you may not read; the metric asked for may be among them."

Rows 1 and 2 now follow ADR-0149 D3 rule 3 ("answer to the word"): the count of hits is taken per word. They do not contradict the served text (packages/mcp/src/skill-md.ts:279-282, "One measure match ... Several matches (two datasets or two members)"), which states the same two outcomes without saying per what; the skill now says it.

Evals:

  • New case 7, a two-metric question. 「本月的营收和赢单率各是多少?」 with 营收 matching measures.revenue and 赢单率 matching measures.win_rate in one dataset (销售分析). Expected: both are computed in one query_dataset call and the user is not asked which is meant. must_contain: query_dataset, 营收, 赢单率, 销售分析; must_not_contain: aggregate_records, 非指标口径. No ask-back phrase is in must_not_contain: a correct reply can say it does not need to ask, so every candidate phrase could occur in one. An ask-back reply makes no tool call, so must_contain: query_dataset is what fails it, on the same terms as cases 1 to 3.
  • Case 6 expected_output says members (measures or groupings), and its sample sentence reads 「财务汇总里有您无权查看的指标或分组,毛利率可能是其中之一」. Its assertions are unchanged.

Token ratchet, the skills/objectstack-ask/SKILL.md row: 1457 → 1522, pinned at the measurement, zero headroom. The file is 5848 → 6105 bytes (+257); less the 20-byte stamp line, 5828 → 6085 priced bytes; ceil(6085 / 4) = 1522 (+65). It stays 105 lines. No other row moves. Nothing was cut to pay for it: the row is this PR's own new row, and the only text in the surface this round was allowed to touch is the four rows above. Whole-package readings now: all SKILL.md files together 61564 tokens (was 61499 in the table above); authored bundle 191124 (was 191059); whole shipped tree 256372 (was 255871; the eval file is 2236, was 1800, unpriced).

Checks on 94affc64:

Command Result
Eval check script (scratch, not committed) exit 0; 7 cases, ids 1 to 7 distinct; 23 must_contain, each in its expected_output and in its prompt or SKILL.md; 16 must_not_contain, none in its expected_output; VERDICT ok: 0 violations
node scripts/check-skills-token-ratchet.mjs exit 0; "skills/objectstack-ask/SKILL.md is 1522 tokens (ceiling 1522; headroom 0)"; "58 authored bundle file(s) within their ceilings; 10 generator-owned file(s) and 30 eval fixture(s) measured, not ratcheted"
node scripts/check-skills-token-ratchet.mjs --self-test exit 0; "104 cases pass"
node scripts/check-skill-compatibility-version.mjs exit 0; "12 metadata.version stamp(s) all equal @objectstack/spec 18.5.0"
pnpm --filter @objectstack/spec run check:skill-docs (build-skill-docs.ts --check) exit 0; "Skill docs in sync"
node scripts/check-nul-bytes.mjs exit 0
node scripts/pm/overlap-check.mjs, before the push VERDICT clean exit 0 (against origin/main at 3bbda33b and two open PR heads that share a file)

The description in the frontmatter is unchanged, so nothing was regenerated.

The case 7 lines of the eval check script's output (cases 1 to 6 print as in fix round 1):

metric-selection-fallback.json: 7 cases, ids 1,2,3,4,5,6,7 distinct=true
  case 7 must_contain "query_dataset": in expected_output=true source=SKILL.md
  case 7 must_contain "营收": in expected_output=true source=prompt
  case 7 must_contain "赢单率": in expected_output=true source=prompt
  case 7 must_contain "销售分析": in expected_output=true source=prompt
  case 7 must_not_contain "aggregate_records": in expected_output=false
  case 7 must_not_contain "非指标口径": in expected_output=false
VERDICT ok: 0 violations

Gates on 94affc64. dispatch-gates --commands derives 120 commands for the PR's whole diff. Derived for the three files this round moved (dispatch-gates --commands with those paths) it is 54 commands, all run, then --ran with the recorded exit codes:

✓ dispatch-gates --ran: 54 derived famil(ies) accounted for — 49 run, 5 NOT-MEASURED (5 DERIVED from a recorded exit 3).

  • 49 exited 0, among them the token ratchet and its self-test, check:skill-docs, check:skill-links, check:skill-compatibility, check:skill-identifier-liveness, check:skill-frame-sync, check:doc-authoring, check:nul-bytes and check:pm-dispatch-gates.

  • NOT MEASURED, reason: this round's worktree has an install and no build, and each printed PREREQUISITE NOT MET (exit 3): check:doc-formula-expressions, check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure, check:sourcemap-no-sources-content. All five read built output that a skill text edit does not move; they are left to CI.

  • The other derived commands read files this round did not move. They were run on 4b17fddc (the Verification section above) and are CI's on this head.

  • No merge of main was made in this round.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (One row in a spec build script; no schema touched.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint is left to CI.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed (gen:skill-docs).
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English (the 维护者速读 block is Chinese by the dev agent's rule).

Generated by Claude Code

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs.

What this run could not see

Coarse fallback — 0 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 3bbda33b78fff2681db9c09732347bc62ffc4cc6 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg

L1: ACCEPT · 2026-11-17T11:33Z

Head-sha: 4b17fdd
Reviewer: seat 3 L1-c, for card #34685 (claim 6944611594, seat Premise corrected 6944554445, seat rulings 6945986942, dev report 6945937382).

席位核对

PR shape. Draft, base main, Fixes #34685. The card's "Done when" items 2 and 3 are named on the card itself as the sibling cards' work (server card #34686 for single source, devx card #34687 for the runner repeat), so Fixes is the right keyword; see N1. No other issue number sits next to a closing verb.

Scope vs claim. Ten files, each inside the claim's file surface (widened by Premise corrected 6944554445): skills/objectstack-ask/** (SKILL.md, one eval file), skills/README.md and content/docs/ai/skills-reference.mdx (generated), packages/spec/scripts/build-skill-docs.ts (one DISPLAY row), scripts/check-skills-token-ratchet.mjs (one CEILINGS row), packages/create-objectstack/src/created-summary.test.ts, the two pointer lines, the changeset. Nothing under packages/mcp/** or packages/runtime/** (routing A).

Governed / tier. check-governed-merges --pr 34792: 5 of 10 paths hit the register, governed (Tier H), 280 lines. Body carries Served-tier: CONTRACT_REVIEW_TIER as the claim mandates. Seat L2 and os-zhuang follow this ACCEPT, including the new CEILINGS row (a pricing act the ratchet header reserves to the maintainer).

Changeset. @objectstack/skills patch, Clause-②: no / Metadata-protocol: none (patch is right for none). packages/spec/scripts/** is not in spec's files[]; create-objectstack moved only a test; content/docs/** is not a package. Nothing else owed.

Check-runs at 4b17fdd. 70 runs, every one success or skipped: Lint & Repo Gates, TypeScript Type Check, Test Core + 8 shards, Test UI + 16 shards, Check Changeset, PR-body guards, Governed Surface Queue Guard, Build Docs, Scaffold with repo dist.

Re-run here at 4b17fdd. node scripts/check-skills-token-ratchet.mjs: 58 authored bundle file(s) within their ceilings, bundle total 255871 (matches the body). node scripts/check-skill-compatibility-version.mjs: 1 justified exemption(s). The CEILINGS row's arithmetic (ceil(5828 / 4) == 1457) agrees with the ratchet's own reading.

The skill against the served text (the area's ask). I read skills/objectstack-ask/SKILL.md against packages/mcp/src/skill-md.ts:265-291 row by row. Every served rule is in the skill with the same meaning: terms → matches; exact name/label/synonym (case, spacing, _/- aside), never similarity; one measure → query_dataset; several → ask with label, dataset, description, no pick; dimension alone is not an answer; no match → query_records / aggregate_records, labelled; membersWithheld; cite provenance, explain with description; data cannot answer → name what is missing, offer the computation, no assumed value; every figure from a tool answer. The one place they differ is the near-miss row (skill line 51), which the card's scope demands and the seat routed (B, 6944554445). It is wider than the served "no match: fall back", not contrary to any other served line, and it follows ADR-0149 D3 rule 1 (a near form "may be offered in rule 3's question, never acted on"). Single-loose-form behaviour (line 52 → fallback, lines 89-90 name the dataset) is the seat's Q1 A.

Every name the skill uses exists. Checked at this head: terms, matches{term, member: measures.<n>|dimensions.<n>, matchedOn}, membersWithheld, object, partial + warning (packages/spec/src/ai/dataset-tools.zod.ts); datasetName, selection.{measures, dimensions, runtimeFilter, dateGranularity, order, limit} (packages/spec/src/api/analytics.zod.ts selection); provenance with dataset and measure labels, truncated, and warning as the narrowing statement on query_dataset (DatasetProvenanceSchema, QueryDatasetOutputSchema); describe_object({ objectName }) fields with options (value + label) and truncated: true on aggregate_records (packages/mcp/src/mcp-http-tools.ts). The claim "a call with terms already returns the whole catalogue; terms only adds matches" holds: packages/services/service-analytics/src/dataset-tools.ts:410-440 builds every admitted entry and sets matches only when terms is defined. No candidates field is named anywhere in the skill or evals.

Registration. DISPLAY row, generated README and skills-reference regenerated (count 11 → 12), created-summary.test.ts SKILLS list matches the eleven skills/objectstack-* dirs. The test rewrite moves the symlink case from per-link lines to the collapsed farm line, as the old comment prescribed past COLLAPSE_AT; it still pins the property (each farm counts one entry per link and is sized as the links' own bytes, never their targets).

Value density, read from the customer agent's seat. 1457 tokens, loaded only on its trigger; the two pointer lines (23 and 28 tokens) sit in existing headroom. The description's trigger names the live-MCP setting and excludes metadata building and code queries, so a builder session should not load it. Acceptable for the job.

Must-fix

None.

Should-fix

Notes

Next: seat L2 at CONTRACT_REVIEW_TIER, then os-zhuang (Tier H). A later push owes an L1-c delta read.

…y carries

Cases 2, 3 and 6 required meta-wording a correct reply need not use
("which one they mean", "compute nothing yet", an English flag name in
a Chinese reply). Each case now asserts the fixture's own labels, the
question shape, and the user's language. Cases 1, 4 and 5 carried the
same defect in milder form (contract field names, a Chinese token in an
English reply, one exact phrase) and are reworded the same way.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfR33NbV51QQU6R6bm
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg

L1: ACCEPT (delta) · 2026-11-17T11:48Z

Head-sha: 63c79bc
Delta from the ACCEPT at 4b17fdd (comment 6946869842).

git diff --stat 4b17fddc 63c79bc1: one file, skills/objectstack-ask/evals/metric-selection-fallback.json (+13 / -13); SKILL.md and every other file unchanged, so the token readings and the CEILINGS row stand.

S1 closed. Re-read every case's assertions as a reply would meet them:

  • Case 2: Open Pipeline, Weighted Pipeline, Opportunities, Forecast, ?; forbids the tools and the machine names open_amount / weighted_amount. A correct ask-back carries all of these.
  • Case 3: the three measure labels, their three dataset labels and ?; forbids the tools and 非指标口径.
  • Case 6: 财务汇总 and 毛利率, forbids 不存在. No English meta-words left in a case whose reply is Chinese.
  • Cases 1, 4, 5 reworded the same way (1: query_dataset; 4: describe_object, aggregate_records, priority; 5: weight, limit).
  • My own consistency pass at this head: every must_contain occurs in its expected_output, no must_not_contain does, ids 1-6 distinct.

The area's call to keep tool names in must_not_contain for cases 1-3 (so a reply that computes is still caught, at the cost of a false fail on a reply that names a tool it did not call) is a reasonable trade and stated in the body.

Notes (no action owed on this PR).

Check-runs on this head were still pending when read; the area merges origin/main next and the seat's L2 reads that final head. A merge-only push needs no further L1 read beyond confirming the PR diff is unchanged; any content change owes one.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg

L1: ACCEPT (delta) · 2026-11-17T11:49Z

Head-sha: 1a8bd8b
Delta from the ACCEPT at 63c79bc (comment 6947165517).

1a8bd8b is a merge of origin/main (parents 63c79bc, 3bbda33). The PR diff against its merge base is identical to 63c79bc's (index lines aside). The ACCEPT carries to this head; the seat's L2 reads this one.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 1a8bd8baddfa5ed29ab85e234ea12fc87a9fd292
Local-runs: none
Scope: skills/README.md, skills/objectstack-ai/SKILL.md, skills/objectstack-ask/SKILL.md, skills/objectstack-ask/evals/metric-selection-fallback.json, skills/objectstack-query/rules/aggregation.md + packages/spec/scripts/build-skill-docs.ts, scripts/check-skills-token-ratchet.mjs
Security-touching: yes

PR #34792 for card #34685, read at the head above (a merge of origin/main 3bbda33 into 63c79bc; the net diff against main is ten files). Inputs: the card body and all nine comments, the PR body and its comments, the net diff, and the head's check-runs. Read to judge, not reviewed: ADR-0149 on main (D1 to D4, M2), packages/spec/src/ai/dataset-tools.zod.ts, packages/spec/src/api/analytics.zod.ts (the selection schema), packages/services/service-analytics/src/{dataset-tools,dataset-term-matcher,analytics-service}.ts, packages/mcp/src/skill-md.ts and mcp-http-tools.ts, and the rulings 6940528935 (#34659), F1 B (#34691, record 6943149235), 6945986942 (#34685) and 6946563869 (#34720).

Remainder, the lane seat's ACCEPT at TIER_DEFAULT, not judged here: packages/create-objectstack/src/created-summary.test.ts, content/docs/ai/skills-reference.mdx (generated), .changeset/34685-ask-data-skill.md (read for ② only).

Security-touching: yes is meant. Two hunks of skills/objectstack-ask/SKILL.md teach permission behaviour the path name does not show: the membersWithheld row (what to tell a user about members they may not read) and the warning sentence in step 3 (an agent's narrowed read is repeated to the user). The PR also adds skills/** files, so it is Tier H either way.

① Derived judgments

  • A twelfth published skill, objectstack-ask, joins @objectstack/skills. Right. The card's scope asks for one new skill whose reader is an MCP client; the name is the card's starting text. Accept-set: nothing that parsed before is refused; no schema, tool or served text moves.
  • Catalog index. skills/README.md gains one generated row and the generated guide counts 12. Right: the row's text is the frontmatter description's first sentence, and the DISPLAY row that orders it is in this diff.
  • Trigger surface. The description triggers on a user asking for a number, ranking, breakdown, trend or list, in any language, and excludes metadata building and code queries. Right against the card's scope line ("not a file glob").
  • Token price. One new CEILINGS row, 1457, zero headroom; no existing row moves. Arithmetic re-derived from the blobs: SKILL.md is 5848 bytes, its stamp line 20, ceil(5828 / 4) = 1457. objectstack-ai/SKILL.md is 25477 bytes less a 20-byte stamp, 6365 against 6801; objectstack-query/rules/aggregation.md is 9168 bytes, 2292 against 2357. Right.
  • metadata.domain: process, compatibility: ... @objectstack/mcp 18.x. Right: the seat ruled process for this PR (6945986942, Q2), and the README's own table lets a process skill name the tooling it needs.
  • No candidates field is named in the skill or the evals (the word "candidate" appears only as prose for the measures offered in a question). Right while spec: list_datasets answers a term with no match with a candidates list, never selected; ADR-0149 D3 gains the amendment note #34761 and service-analytics: list_datasets fills candidates with near members (name, label, synonym) on a zero-match, only from what the caller may read #34763 are open.
  • Gate verdicts on this head are not all in. Read at 2026-11-17T11:56Z: 23 check-runs success, 11 skipped, 34 in_progress, none failed. Completed green: Check Changeset, Governed Surface Queue Guard, PR-body guards, Check Documentation Links, Spec property liveness, Dogfood Regression Gate, Build Docs, Build UI Deps, Scaffold with repo dist, Type Check · source gates, and seven of the eight Lint jobs (CI, release & engine gates; ESLint; docs & code guards; repo & tooling gates; the two scoped lookups; tooling self-tests). Still running: Lint · PM dispatch-gates, Build Core, Build & E2E UI, Live E2E UI, Test Core 1 to 10, Test UI 1 to 16, Type Check UI, Type Check · consumer gates, · debt ledger and · workspace. The derived judgments above are read from the tree; the running jobs still owe their answer, and this PASS does not answer for them.

② Semver level

@objectstack/skills at patch, Clause-②: no, Metadata-protocol: none, on both the PR body and the changeset. Right. The diff publishes teaching text only: one added skill directory and two pointer lines. No schema, no tool input or output, no metadata key, so no conversion is owed and clause ② does not apply. packages/spec/scripts/** and the ratchet script are repo tooling and ship in no package; create-objectstack moved a test file only. Check Changeset is success on this head.

Clause-②: no. Agreed.

③ Boundary flags

Dev report 6945937382, deviations:

  1. "The answer in hand is already the catalogue" (no second list_datasets call on a zero-match). Confirmed in the code: listDatasets pushes every admitted entry with all admitted members and sets matches only when terms is defined (dataset-tools.ts, the if (terms !== undefined) entry.matches = ... line). Accepted; the seat accepted it too (6945986942).
  2. Terms are sent as written, no client-side translation. Accepted: it follows D3 rule 1 and agrees with ruling 6946563869 (a bundle label matches in the caller's locale only; a cross-locale word is an authored synonym). The skill promises no cross-locale match anywhere.
  3. created-summary.test.ts rewrite. Outside ④; the lane seat's ACCEPT.
  4. The CEILINGS row is a maintainer-only pricing act. Answered below under the ratchet file: this record does not stand in for that word; the Tier H approval does.
    5, 6. PR body layout and trailer. Not contract matters.

Dev report 6945937382, open questions:

  • Q1, one loose form on a zero-match: ruled A by the seat (6945986942). The skill conforms: that case falls to the fifth table row (step 4), and step 4's last bullet names the dataset when the fallback object is its object. No row lets a loose form select a measure.
  • Q2, metadata.domain: ruled process (same record).

Dev report 6947110992, open question: keep tool names in must_not_contain for cases 1 to 3. Answered A, keep. Without them cases 2 and 3 cannot catch a reply that computes; the false fail on a reply that names the tool it did not call is stated in the PR body and has a carrier, #34789.

Out-of-scope findings: the served text has no near-miss row (carrier #34686); no committed gate checks the objectstack-* eval files' self-consistency (carrier #34789). Both stand as filed; neither is this PR's to fix.

SQL push-down: no code path in the diff. The skill's own teaching is on the right side of Prime Directive 5: aggregate_records for a count, sum, average or breakdown, never paging query_records to add rows up.

④ Design judgment

skills/objectstack-ask/SKILL.md, sentence by sentence against ADR-0149 and the rulings.

Holds:

  • Step 1. Lifting the words and sending them as terms is D2's input and D3's "the model still decides what the question's terms are". "A word matches only when it equals a member's name, label or synonym (case, spacing, _ and - aside), never by similarity" is D3 rule 1 and the matcher's behaviour. "No list_datasets among your tools ... go to step 4" is D2's graceful degradation.
  • Step 2, row 1 (one measure match, compute) is rule 2. Row 3 (dimension only) is rule 5, including its "or asks". Row 5 (no match, no several readings: fall back and say so) is rule 4 and M2 A.
  • Step 2, row 4 (the near-miss ask-back) goes beyond rule 4 as it reads on main, and is ruled: the E2 premise in 6940528935 names exactly this skill-only branch, F1 B re-ruled the server half, and seat routing B (6944554445) keeps the catalogue-read row until the candidates cards land. It never selects, which is the limit rule 1's parenthetical sets. It promises no candidates field.
  • Step 3. Every selection key exists on DatasetSelectionSchema (measures, dimensions, runtimeFilter, dateGranularity, order, limit); provenance, truncated and warning are on QueryDatasetOutputSchema with the meanings given; the citation form is D3 rule 2's own example.
  • Step 4. The label line and the "name the dataset and its measures" line are rule 4 and M2's recommended practice; truncated: true on aggregate_records and describe_object({ objectName }) with options exist as taught.
  • Steps 5 and 6 say what the served text says (skill-md.ts, the "When the data cannot answer" entry).
  • partial / warning on the list_datasets answer are as ListDatasetsOutputSchema declares them.

Findings:

S1 (should-fix) — Step 2, row 2 drops D3 rule 3's "answer to the word". The row reads "Several measures match (two members, or one word in two datasets) → ask the user which one they mean". Rule 3 is per word: "More than one hit (two datasets, or two members, answer to the word)", and the list_datasets tool description on main keeps those words. As written, the "one word" qualifier binds only the two-datasets arm, so a question that names two metrics ("营收和赢单率", "revenue and win rate by stage"), where each word has exactly one hit and rule 2 says each wins, lands on this row and is taught as an ask-back. Inside one dataset the D1 validation refuses two members that answer to one word, so in practice the "two members" arm fires almost only on that multi-metric case. The effect is a wrong question, never a wrong number, which is why it is not a must-fix; it also cuts against the E2 premise's second half (no ask-back where each word has one match). Fix: make rows 1 and 2 per word (for example "Each word matches one measure" / "One word matches several measures, in one dataset or in two"). No eval case covers a two-metric question; one would pin it.

S2 (should-fix) — the membersWithheld row states more than the flag says. The skill: "Say that it has measures you may not read." The flag is set when ANY member was withheld, a dimension included: admitDatasetCatalogEntry raises withheld in the same judge call for the dimensions loop and the measures loop (analytics-service.ts), the schema describes it as "a member was left out", and the tool description says "some members exist that this caller may not see". On a dataset where only a grouping field is unreadable, the skill has the client tell the user that measures exist which they may not see, which is a false statement about permissions. Eval case 6 bakes the same reading in ("it has measures this user may not read, so the reply says exactly that"). Fix: "members (measures or groupings) you may not read; the metric asked for may be among them", and the same word in case 6's expected_output. The served text on main carries the same wording; that copy is #34686's to render from this skill, so fixing it here fixes both.

Both fixes change SKILL.md's byte count: the CEILINGS row is re-measured in the same push and stays pinned at the measurement.

Nits (no action owed on this head; prose faces only, or a carrier):

skills/objectstack-ask/evals/metric-selection-fallback.json. Six cases, ids 1 to 6, one per branch the card lists (one match, several matches, near-miss, no metric, data cannot answer, membersWithheld). Every must_contain entry (19) occurs in its case's expected_output; no must_not_contain entry (14) does. Each expected_output agrees with the skill row it exercises: case 1 with rows 1 and step 3; case 2 with row 2 and "show labels, not machine names"; case 3 with row 4 and "the reply is the question alone"; case 4 with row 5 and step 4; case 5 with step 5; case 6 with the withheld row, subject to S2. Case 4 no longer string-checks the fallback label and case 6's 不存在 can false-fail a negated sentence; both were noted by L1 (N5, N6) with #34789 as carrier, and I agree with that placing.

skills/objectstack-ai/SKILL.md and skills/objectstack-query/rules/aggregation.md. One pointer line each, the two the seat's premise correction assigned to this card. Both are true of the tree (the MCP section publishes the tools; aggregate_records is the MCP-side name) and both send the right reader away: the builder stays, the connected client goes to objectstack-ask. Both sit inside existing headroom.

skills/README.md. One generated row inside the BEGIN GENERATED block, byte-for-byte the description's first sentence. Holds; see N4.

packages/spec/scripts/build-skill-docs.ts (implementing). One DISPLAY row, objectstack-ask / Ask, placed before objectui. It agrees with the frontmatter it reads: the folded description splits at "Use when" and "Do not use" as the parser expects, and domain and tags parse from the metadata: map. Holds.

scripts/check-skills-token-ratchet.mjs (implementing). The new row is governed rules text inside a gate, so it is judged, sentence by sentence:

  • "an INITIAL measurement of the new file on the PR that adds it, pinned AT it — zero headroom, on the same terms as the objectui rows above": true, and the audit formula in the comment reproduces (5848 less the 20-byte stamp line, 1457).
  • "Its evals are unpriced (population 1b)": true; no row is added on the eval path, which the gate would red.
  • "No existing row moves": true, re-derived above.
  • "Adding the row is the pricing act the header reserves to the maintainer; the PR that adds it is Tier H and lands only on the maintainer's approval": this matches the gate's own unpriced-file message and the objectui precedent's wording. It is a statement of what is owed, not a claim that it was given. This record does not give it: the row lands on os-zhuang's approval of this PR and on nothing else.
  • The heading cites ruling 6940528935 as "(D5 A)". The record is the right one; the new skill itself rests on that record's word 2 and the card's filing gate, D5 A being the "server points to the local skills package" letter. Close enough to find; not a finding.
  • The 10402 principle (no growth for a small feature) is not in play: this is a ruled new skill, and its two pointer lines cost 23 and 28 tokens inside headroom.

No must-fix. Two should-fix, S1 and S2, open on this head; their fix earns a delta review, and the delta record names them by id.

Implemented-by: claude/issue-34685-ask-data-skill
Reviewed-by: session_01WGufzgh1zkZzDXL36ckWAG

VERDICT: PASS

…ys members

Contract review should-fixes on the objectstack-ask skill.

- Step 2 rows 1-2 are per word (ADR-0149 D3 rule 3, "answer to the word"):
  each measured word with exactly one measure computes, so a two-metric
  question computes both; one word with several measures asks back.
- The membersWithheld row says members (measures or groupings), which is
  what the flag reports; eval case 6 follows.
- The fallback row says one near form is not a match either.
- Eval case 7 pins a two-metric question.
- The skill's token ratchet row is re-measured: 1457 -> 1522, pinned at it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfR33NbV51QQU6R6bm
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg

L1: ACCEPT (delta) · 2026-11-17T12:26Z

Head-sha: 94affc6
Delta from the ACCEPT at 1a8bd8b (comment 6947192739); fix round 2 for the seat's contract review 6947390250.

git diff 1a8bd8ba 94affc64: one commit, three files (skills/objectstack-ask/SKILL.md, its eval file, scripts/check-skills-token-ratchet.mjs). No main merge.

L2 S1 (rows judged per word) — closed. Row 1 now reads "Each word for a thing measured matches exactly one measure → compute; two words with one measure each are two metrics, not a choice: compute both, one query_dataset per dataset". Row 2 reads "One word matches several measures, in one dataset or in two → ask". That is ADR-0149 D3 rule 3's "answer to the word". Scoping row 1 to "a word for a thing measured" keeps filter and grouping words ("本月", "by stage") from tripping it, and row 3 still owns the dimension-only case. New case 7 pins the two-metric question (营收 + 赢单率, one dataset, one call with both measures, no ask-back); its expected_output agrees with row 1 and step 3.

L2 S2 (membersWithheld = members) — closed. The row says "members (measures or groupings) you may not read; the metric asked for may be among them", which is what DatasetToolCatalogEntrySchema.membersWithheld describes ("a member was left out"); case 6's expected_output uses the same words.

L2 N1 — closed. Row 5 adds "One near form is not a match either: it selects nothing", the seat's Q1 A in words.

Token ceiling 1457 → 1522. Re-run here at 94affc6: SKILL.md is 6105 bytes; node scripts/check-skills-token-ratchet.mjs → 58 authored bundle file(s) within their ceilings; --self-test → 104 cases pass. The row's comment arithmetic (6105 − 20 = 6085, ceil(6085 / 4) = 1522) reproduces. Still the new file's own measurement, pinned at it, no other row moves. No cut was made because the text grew from review fixes on the file's own first PR; the row remains a maintainer pricing act and rides on os-zhuang's approval of this PR, now at 1522.

Evals. My consistency pass at this head: ids 1–7 distinct, every must_contain in its expected_output, no must_not_contain in it (0 violations).

Served-text alignment. The PR body's membersWithheld row now reads "differs" from packages/mcp/src/skill-md.ts:269-270 ("some measures exist"): the skill is the more accurate text, and #34686 PR2 renders the served page from this skill, so the gap closes there (same routing as the near-miss row, my N2).

Check-runs at 94affc6 when read (12:2xZ): none failed; Lint & Repo Gates, TypeScript Type Check, Check Changeset, PR-body guards, Governed Surface Queue Guard, Build Docs, Scaffold with repo dist and most Test Core / Test UI shards success; Test Core 9/10 and several Test UI shards still running. The seat confirms green before the hand-over.

Note.

Next: seat L2 delta on this head, then os-zhuang. A later push owes an L1-c delta read (merge-only gets a one-line confirm).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 94affc64f5329d54f3b344f4d60f87777b58d011
Local-runs: none
Scope: skills/README.md, skills/objectstack-ai/SKILL.md, skills/objectstack-ask/SKILL.md, skills/objectstack-ask/evals/metric-selection-fallback.json, skills/objectstack-query/rules/aggregation.md + packages/spec/scripts/build-skill-docs.ts, scripts/check-skills-token-ratchet.mjs
Security-touching: yes

Delta review of record 6947390250 (head 1a8bd8b). git diff 1a8bd8ba 94affc64 is one commit and three files: skills/objectstack-ask/SKILL.md (four table rows), its eval file (case 6 reworded, case 7 added) and scripts/check-skills-token-ratchet.mjs (the new row and its comment). No merge of main; the merge base is still 3bbda33 and the PR is still ten files. Every other judgment of the first record stands unchanged on this head and is not repeated. Inputs for the delta: that diff, the L1 delta ACCEPT 6948017921, and the head's check-runs.

Security-touching: yes is still meant: the delta rewrites the membersWithheld row, which teaches what to tell a user about members they may not read.

① Derived judgments

  • Step 2 is now judged per word. Right; see S1 below.
  • The membersWithheld row says members. Right; see S2 below.
  • Token price 1457 to 1522. Right as arithmetic: the blob is 6105 bytes, the stamp line 20, ceil(6085 / 4) = 1522. No other row moves. This is still the new file's first measurement on the PR that adds it, not a raise of a landed ceiling, so the shrink-only rule and its deletion-plus-ruling path are not in play.
  • Seven eval cases, ids 1 to 7. Every must_contain occurs in its expected_output; no must_not_contain does.
  • Still no candidates field in the skill or the evals (case 7 uses the word once, as prose).
  • Check-runs on this head, read after the L1 delta: 60 success, 13 skipped, 2 in_progress (Test Core 9/10, Test UI), none failed. The Lint, Type Check, Build, Check Changeset, Governed Surface Queue Guard and PR-body guard jobs are green.

② Semver level

Unchanged. The changeset is not in the delta and its text still describes the skill truthfully ("One measure match is computed", "Several matches are a question"). @objectstack/skills patch, Clause-②: no, Metadata-protocol: none. Check Changeset is success on this head.

Clause-②: no. Agreed.

③ Boundary flags

  • The fix round's three claims (S1, S2, N1) are answered in ④.
  • L1's "differs" row for membersWithheld against packages/mcp/src/skill-md.ts:269-270: agreed, and the direction is right. The skill now says what the flag reports; the served page says "some measures". mcp: the open door's initialize instructions carry the ask-data selection rule and the skills install line; /mcp/skill renders from the published skill #34686 PR2 renders the served page from this skill, so the card's "no two diverging texts" condition is met there, on the same routing as the near-miss row.
  • L1's N7 (one measured word hits, another does not): agreed that nothing is owed here. Carried as N5 below.
  • SQL push-down: no code path in the delta. Case 7 teaches one query_dataset call for two measures of one dataset, which is the pushed-down form.

④ Design judgment

S1: closed. Row 1 reads "Each word for a thing measured matches exactly one measure", with "two words with one measure each are two metrics, not a choice: compute both, with one query_dataset per dataset". Row 2 reads "One word matches several measures, in one dataset or in two". That is ADR-0149 D3 rules 2 and 3 as written ("answer to the word"). Tried to break it: a filter or grouping word that matches nothing ("本月") is not "a word for a thing measured", so it does not block row 1; a grouping word that matches a dimension stays with row 3; two words that name the same measure are still one measure each. The tool-call contract holds: selection.measures is an array on DatasetSelectionSchema, so two measures of one dataset go in one call, and measures in two datasets need two calls because datasetName is single. Case 7 pins the two-metric question and agrees with row 1 and step 3.

S2: closed. The row reads "members (measures or groupings) you may not read; the metric asked for may be among them. Do not say the metric does not exist." That is what admitDatasetCatalogEntry reports and what the schema describes. "May be among them" claims nothing the client cannot know. Case 6's expected_output uses the same words, and its sample Chinese sentence says 指标或分组.

N1 of the first record: fixed on the prose face. Row 5 adds "One near form is not a match either: it selects nothing", which is the seat's Q1 A stated outright.

scripts/check-skills-token-ratchet.mjs, the new comment lines, sentence by sentence: the byte counts and the result reproduce; "pinned AT it, zero headroom; no other row moves" is true; the reason given for each of the three wording changes matches the diff. One looseness: the comment says the review "asked for three wording fixes". It asked for two (S1, S2); the third was a nit the dev chose to fix. Not a finding. The row is still a maintainer pricing act: it lands at 1522 on os-zhuang's approval of this PR and on nothing else, and this record does not give that word.

Eval case 7 shape. Same keys as cases 1 to 6 (id, prompt, expected_output, files, assertions). Its assertions are tokens any correct reply carries (the tool, both metric words, the dataset label), and it forbids the fallback tool and label. It expects runtimeFilter on the date dimension for the month, the same form case 1 uses.

Nits (no action owed on this head):

No must-fix, no should-fix.

Implemented-by: claude/issue-34685-ask-data-skill
Reviewed-by: session_01WGufzgh1zkZzDXL36ckWAG

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

席位记录 · 2026-11-17T12:30Z

Head-sha: 94affc64f5329d54f3b344f4d60f87777b58d011

维护者速读(终稿)

  • 改了什么:新增对外发布的技能 objectstack-ask(105 行,1522 token),教已连上 MCP 的客户端回答业务问题:先用 list_datasets 按用户原词找指标,逐词判定,命中一个指标就用 query_dataset 计算并注明出处;命中多个或只有近似词时先问,不替用户选;没有指标才退回对象工具,并标「非指标口径」。附 7 个评测用例;objectstack-ai 和聚合规则里各加一行指向它。
  • 为什么改:skills: publish an ask-data skill for a client answering business questions over MCP (list_datasets → query_dataset → labelled fallback) #34685(专题 Decision: open-source MCP — the client thinks locally, the server keeps a thin door (a metadata draft write entry for building; the data door for 问数), plus policy, version skew and the 问数 eval #34659 M-1,D5 A 裁定 6940528935)。问数流程此前只写在工具描述和 GET /mcp/skill 页里,客户端选工具前读不到,常直接用 aggregate_records 算数。
  • 风险与回滚:只动技能文本、评测、目录登记和一个测试,不动运行时与契约(Clause-②: no,@objectstack/skills patch)。技能包总量 60019 → 61564 token;新文件定价行钉在实测 1522(零余量),定价以你批准本 PR 为准。回滚即 revert。
  • 先看:skills/objectstack-ask/SKILL.md 第 2 步判定表(逐词;近似词一行是席位路由 B 6944554445 新增);scripts/check-skills-token-ratchet.mjs 末尾定价行。
  • 两分钟验证:node scripts/check-skills-token-ratchet.mjs,末行应为「58 authored bundle file(s) within their ceilings」。
  • 需要你做的:Tier H(新增 skills/** 文件、技能外路径、带 security 标签,不在低风险放权内),请 os-zhuang 审批。L1-c delta ACCEPT 6948017921 与席位 L2 delta PASS 6948069703 都在本 head;批准后由 3 号座位交 o3-E 落地。

席位意见:建议批准。两轮修订后判定表与 ADR-0149 D3「按词作答」一致,membersWithheld 只说标志报告的内容。服务端 /mcp/skill 页与本技能的一处措辞差异由 #34686 PR2 改为从本技能渲染来收口。

席位核对

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 17, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 17, 2026 12:46
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 581c916 Nov 17, 2026
82 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-34685-ask-data-skill branch November 17, 2026 13:41
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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue security size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skills: publish an ask-data skill for a client answering business questions over MCP (list_datasets → query_dataset → labelled fallback)

3 participants