Skip to content

docs(skills): the ask-data skill's zero-match rows read list_datasets candidates - #34977

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-34868-ask-skill-reads-candidates
Nov 17, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/issue-34868-ask-skill-reads-candidates

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Fixes #34868

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:问数技能 objectstack-ask 第 1 步点名 list_datasets 回答里的 candidates;第 2 步的两行"零命中"改读它:某个词没命中但服务器列了候选(一个或多个)就反问用户,不替用户选、不把候选当命中、先不算数;没命中也没候选才回退到对象查询并注明非指标口径。原先让客户端自己从目录里判断"宽泛说法"的两行和一段说明删掉。/mcp/skill 页面由技能生成,同步更新;评测用例补了"多个候选""一个候选""无候选"。
  • 为什么改:服务器已经会在零命中时返回候选([Decision] The published skills: who reviews a change, how they are verified, one catalog or two for code-first and MCP, and the E2 premise reading #34691 裁定 F1 B),而技能还在教客户端自己读整份目录去猜,又慢又不可靠,而且和工具说明、initialize 规则讲的不是一回事。席位裁定:只有一个候选也要问。
  • 风险与回滚:只改文字和评测,没有代码路径变化。技能正文变短(105 行变 101 行,1522 变 1491 token,上限同步下调)。连到不返回 candidates 的旧服务器时,零命中一律走带标注的回退,不再反问。回滚就是 revert 本 PR。
  • 先看:skills/objectstack-ask/SKILL.md(第 2 步表格的第 4、5 行,以及表格下方被删的那一段);skills/objectstack-ask/evals/metric-selection-fallback.json(用例 3、8、9);scripts/check-skills-token-ratchet.mjs(objectstack-ask 那一行由 1522 下调到 1491)。
  • 两分钟验证:在已构建的检出里跑 node scripts/gen-mcp-ask-skill.mjs --check,预期输出 is current with skills/objectstack-ask/SKILL.md、退出码 0。
  • 需要你做的:审阅并批准本 PR(skills/** 是受管面,按分支读数为 Tier H)。

What changes

  • skills/objectstack-ask/SKILL.md, step 1. One new bullet says what candidates is: a word that matched nothing may have them on the answer, each a { term, dataset, member } pointer to a member the same answer lists, and a candidate is not a match. The matches / matchedOn bullet is unchanged.
  • Step 2, rows 4 and 5. The two rows that had the client judge a "loose form" are replaced:
    • "A word matches nothing, and candidates lists members for it, one or several": ask the user which one they mean, listing each candidate's label, its dataset's label and its description; with one candidate, ask whether it is the one meant. Do not pick one, never treat a candidate as a match, compute nothing yet.
    • "No match and no candidates for the word for a thing measured": step 4, and say in the answer that no governed metric was used.
  • Step 2, the paragraph under the table (the client's own loose-form check over the catalogue) is deleted. Rows 1, 2, 3 and 6 and the "When you ask" paragraph are byte-identical to main.
  • packages/mcp/src/ask-skill.generated.ts is regenerated by node scripts/gen-mcp-ask-skill.mjs, so GET /mcp/skill serves the same text.
  • skills/objectstack-ask/evals/metric-selection-fallback.json. Case 3 now gives an answer with three candidates and expects the question. New case 8: exactly one candidate, expects a question about that one and no computation. New case 9 (Chinese): no match and no candidates while a listed measure looks close, expects the fallback, opened with the 非指标口径 line and naming the dataset on the same object. Cases 4, 5 and 6 say in their prompts that the answer has no candidates, and cases 4 and 6 state the reason in the new rule's words. Cases 1, 2 and 7 are unchanged.
  • scripts/check-skills-token-ratchet.mjs. The skills/objectstack-ask/SKILL.md row is lowered from 1522 to 1491, pinned at the measurement, with the measurement in its comment. A lowering, so no ruling is needed for it; no other row moves.
  • Changeset .changeset/34868-ask-skill-reads-candidates.md: @objectstack/skills patch and @objectstack/mcp patch.

Rows: skill vs tool texts

The two reference strings are read on main at 44c7a4a415 and are not edited here.

Case Skill, step 2 (also served at /mcp/skill) LIST_DATASETS_DESCRIPTION DATASET_SELECTION_RULE
A word matches exactly one measure "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" (unchanged) "a word for a thing measured that matches exactly one measure wins ... two such words are two metrics, so compute both" "Each word that matches exactly one measure: answer with query_dataset; two such words are two metrics, so compute both."
One word matches several measures "Ask the user which one they mean. List each candidate's label, its dataset's label and its description. Do not pick one." (unchanged) "ask the user which one is meant, listing each candidate's label, dataset label and description; never pick one" "ask the user which one they mean; do not pick"
No match, candidates listed "A word matches nothing, and candidates lists members for it, one or several": "Ask the user which one they mean, listing each candidate's label, its dataset's label and its description; with one candidate, ask whether it is the one meant. Do not pick one, and never treat a candidate as a match. Compute nothing yet." (new) "A word that matched nothing may have candidates, members offered as possible readings: ask the same way, listing each one's label, dataset label and description; never pick one, and never treat a candidate as a match." "A word with no match but with candidates in the answer: ask the same way, listing each candidate's label, dataset label and description; do not pick one or treat it as a match."
No match, no candidates "No match and no candidates for the word for a thing measured": "Step 4, and say in the answer that no governed metric was used." Step 4 opens the answer with the 非指标口径 line. (new) "No match and no candidates: fall back to the object query tools and say in the answer that no governed metric was used (非指标口径)" "No match and no candidates: fall back to query_records / aggregate_records and say the answer is not from a governed metric."
Only a dimension matches "That is a grouping ... You still need a measure match" (unchanged) "A dimension match alone picks a grouping, not a number: a measure must still match." not carried by this text

Two places where the skill says more than the two strings, both on purpose:

  • The no-candidates row is scoped to "the word for a thing measured". A question such as 「本季度的营收是多少?」 sends 本季度 as a term too; it has no match and no candidates, and the question is still computed from the measure 营收 matched (eval case 1). The two strings leave that scope to the reader.
  • The skill spells out the one-candidate case ("with one candidate, ask whether it is the one meant"). The strings cover it with "never pick one", and the docblock above DATASET_SELECTION_RULE says "even for a single candidate".

I found no contradiction between the two strings and the ADR-0149 D3 amendment note.

Why

The server now offers candidates for a word with no match (ruling on #34691, fork F1, option B; the shape came with #34761 and the executor with #34763, merged as 44c7a4a415). The skill still told a client to read the whole catalogue and judge near readings itself, which is slower, differs from client to client, and stated a different rule from the tool description and the initialize text. The seat's ruling on pull request #34904 (Q1 A) is that one candidate is a question too; the ADR note ("With candidates, the AI asks in rule 3's form and acts on none") outranks the earlier wording "One near form is not a match either: it selects nothing".

The client's own loose-form judgment goes; it does not stay as a secondary check. Reasons:

  • The ADR note says "With no candidate, rule 4 is unchanged. No hit and nothing offered is the labelled fallback to the object query", and "Which members are near enough to offer is the executor's rule". A client-side row "no candidates, but the word looks like a loose form of several measures: ask" would state a second nearness rule beside the executor's.
  • Both tool strings say "No match and no candidates: fall back". A secondary check in the skill would contradict them, and this card is done when the three texts state one rule.
  • @objectstack/skills and @objectstack/mcp are published at one version (one fixed group), and the server's initialize text tells a client to install the skills at the server's own version. So the skill that reads candidates ships with the server that fills them.
  • What is lost: against a server that returns no candidates (an older 18.x), and for a word that is near a measure only in translation (the deleted paragraph said "directly or in translation"; the executor compares by containment), the client no longer asks and takes the labelled fallback. That fallback is the ADR's rule 4, and step 4 still adds a line naming the listed dataset on the same object and its measures, so the user learns the governed figure exists.

Tests

All at head bd92fff5b9, after pnpm --workspace-concurrency=2 --filter '@objectstack/mcp^...' build (lock VERDICT command-exit 0).

  • pnpm --filter @objectstack/mcp test: Test Files 71 passed (71), Tests 1252 passed (1252); lock VERDICT command-exit 0.
  • pnpm --filter @objectstack/mcp typecheck: lock VERDICT command-exit 0; check:test-typecheck: OK.
  • node scripts/gen-mcp-ask-skill.mjs --check: exit 0, "is current with skills/objectstack-ask/SKILL.md".
  • Eval cases: the runner's own loader accepts the file (skill-evals --dry-run --skills objectstack-ask: "objectstack-ask: 9 case(s)", exit 0; no model call). A one-off consistency script (not committed) checks, for each case, that every must_contain token is in expected_output, that it is in the prompt or in SKILL.md, that no must_not_contain token is in expected_output, and that no token is on both lists: 9 cases, 55 tokens, 0 findings (control on main: 7 cases, 39 tokens, 0 findings). No eval round against a model was run.
Ablation: the pin test goes red when the skill edit is reverted

One behaviour, one ablation, with the change committed first. Mutation: git restore --source=44c7a4a415 -- skills/objectstack-ask/SKILL.md (working tree only), proved on disk by counting both the new and the old row text.

pre:      new-row count=1 old-row count=0
mutated:  new-row count=0 old-row count=1
RED-LEG   vitest src/skill-single-source-34686.test.ts exit=1   Tests 2 failed | 1 passed (3)
          × the generated module equals the skill's data loop
          × the served section equals the skill's data loop, for every grant that is taught the dataset pair
RED-LEG   gen-mcp-ask-skill.mjs --check exit=1  "is stale against skills/objectstack-ask/SKILL.md"
restored: git checkout HEAD -- (path); blob cd76aade6389 == HEAD blob; git diff HEAD empty; status clean
GREEN-LEG vitest exit=0   Tests 3 passed (3)
GREEN-LEG gen-mcp-ask-skill.mjs --check exit=0

The test reads the skill and the generated module from source, so no rebuild is part of either leg.

Acceptance notes

  • Sizes, published skills. skills/objectstack-ask/SKILL.md: 105 lines, 6105 bytes, 1522 tokens on main; 101 lines, 5981 bytes, 1491 tokens here (the gate's convention, stamp line excluded). All twelve SKILL.md files together: 4728 lines on main, 4724 here. Ratcheted authored total: 191126 tokens on main, 191095 here. The new text is paid for by deletion in the same file, with 31 tokens to spare.
  • Sizes, evals (measured, not ratcheted). The eval file: 75 lines, 2236 tokens on main; 95 lines, 3071 tokens here (+835). The growth is the three candidates lists the prompts now have to state and the two new cases. Whole shipped tree: 256680 tokens on main, 257484 here (+804).
  • What was cut, and where it lives now. (1) The row "the word is a loose form of several listed measures": replaced by the candidates row. (2) "One near form is not a match either: it selects nothing": replaced; one candidate is a question, and step 1 says a candidate is not a match. (3) "The same answer lists every dataset you may query with all its measures, matched or not (a call without terms returns that catalogue too)": this was there so the loose-form check needed no second read, and has no reader once the check is gone; step 1 still says each dataset in the answer carries matches, and the new bullet says a candidate points to a member the same answer lists. (4) The definition of a loose form and its two examples: removed with the check.
  • Two pending changesets describe the wording this replaces (.changeset/34685-ask-data-skill.md, .changeset/34686-skill-single-source.md: "a loose form of several listed measures", "One near form selects nothing"). I did not edit them: each records what its own pull request did. The new changeset says that it supersedes those sentences, so the compiled CHANGELOG reads in order. Carrier: the seat, if it prefers the older entries corrected.
  • A comment this makes out of date, outside my file surface. The docblock above DATASET_SELECTION_RULE (packages/mcp/src/mcp-server-runtime.ts) ends "The skill's own loose-form rows predate candidates and are amended in its lane." After this pull request those rows no longer exist. That file is the reference here and is not in the claim's file surface, so it is reported, not edited. Carrier: the seat.
  • Not decided here. The skill does not say what the client does after the user answers the question (pick a candidate and compute it, or fall back when the answer settles nothing). The ADR note states it ("rule 4 still governs it when the question settles nothing"); the skill did not say it for the several-matches row either, and the card does not ask for it.
  • check:skill-docs needed no regeneration ("Skill docs in sync"): the frontmatter is unchanged.

Verification

  • Derived gates at bd92fff5b9: node scripts/pm/dispatch-gates.mjs --commands (no paths) gave 88 commands; each was run with its exit code recorded before any pipe, then --ran: "88 derived famil(ies) accounted for — 87 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)", exit 0. 87 exited 0.
  • NOT MEASURED: pnpm check:dual-build-cjs-loads, reason: exit 3, prerequisite not met (it needs a whole-workspace pnpm build; only the @objectstack/mcp dependency closure was built). CI's run is the reading.
  • Named in the order: node scripts/check-skills-token-ratchet.mjs exit 0 ("skills/objectstack-ask/SKILL.md is 1491 tokens (ceiling 1491; headroom 0)"); its --self-test exit 0 ("104 cases pass"); pnpm check:skill-compatibility exit 0; pnpm --filter @objectstack/spec run check:skill-docs exit 0 ("Skill docs in sync").
  • node scripts/pm/overlap-check.mjs before the push: "VERDICT clean exit 0" (against origin/main and the two open pull requests that share a file, feat(spec, service-automation): a packaged flow can ship switched off for an administrator to turn on (defaultActive) #34793 and chore: version packages #33849).
  • node scripts/pm/check-governed-merges.mjs --branch claude/issue-34868-ask-skill-reads-candidates: GOVERNED, landing tier H, skills/** ×2; low-risk skills arm NOT MEASURED without the pull request; 97 changed lines (+70 / -27), under the 3000 threshold; exit 3.
  • dispatch-gates --tier: MANDATORY contract-review tier for skills/**, no one-line exit.
  • Not run locally, left to CI: pnpm lint, the test:repo project, and the full gate farm outside the derived list.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (No schema touched.)
  • 2. Every name I added uses the casing for its kind. (No name added.)
  • 3. No formatter ran; pnpm lint passes. (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. (Not touched.)
  • 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 in Chinese by the repository's convention.)

Generated by Claude Code

… candidates

Step 1 names `candidates`; step 2 asks when any candidate is listed for a
word with no match (one candidate included) and falls back, labelled, when
none is. The client's own loose-form rows and paragraph are cut. The served
/mcp/skill module is regenerated, the eval cases cover several, one and no
candidates, and the token ratchet row is lowered to the measurement.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfR33NbV51QQU6R6bm
@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 Nov 17, 2026
@github-actions

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 0465f4aa401f837ba1005a7986ff15a5fa74581b → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 13a41fc919ba8b977bb50f9200c53c55dc8fb5e1 — the merge of head bd92fff5b912f1e276e6a93cb224521ec6b73f64 into base 0465f4aa401f837ba1005a7986ff15a5fa74581b, 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 13a41fc919ba8b977bb50f9200c53c55dc8fb5e1 && git checkout 13a41fc919ba8b977bb50f9200c53c55dc8fb5e1
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0465f4aa401f837ba1005a7986ff15a5fa74581b bd92fff5b912f1e276e6a93cb224521ec6b73f64 && git checkout -B drift-repro 0465f4aa401f837ba1005a7986ff15a5fa74581b && git merge --no-ff bd92fff5b912f1e276e6a93cb224521ec6b73f64

node scripts/docs-audit/affected-docs.mjs --json 0465f4aa401f837ba1005a7986ff15a5fa74581b

⚠️ 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#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg

L1: ACCEPT · 2026-11-17T20:51Z

Head-sha: bd92fff
Reviewer: seat 3 L1-c, for card #34868 (os-dev report 6960584308 on #34868).

席位核对

PR shape. Five paths, +70/-27:

  • skills/objectstack-ask/SKILL.md and its eval file;
  • the regenerated packages/mcp/src/ask-skill.generated.ts;
  • one CEILINGS row in scripts/check-skills-token-ratchet.mjs;
  • one changeset.

Clause-②: no / Metadata-protocol: none. @objectstack/skills and @objectstack/mcp are both at patch.

Governed / size. check-governed-merges --pr 34977: GOVERNED, Tier H, on skills/** ×2. 97 lines. The low-risk skills arm does not apply. The changeset also releases @objectstack/mcp, and the arm allows only '@objectstack/skills': patch. That cannot be avoided, because /mcp/skill serves the regenerated text from @objectstack/mcp. So the route is the seat's L2, then the Tier H record and os-zhuang's hand, not a seat landing.

CI. It was still running when I read it, with the light lanes green. This verdict holds on the condition that Lint & Repo Gates, TypeScript Type Check and Test Core finish green on this head.

(a) The seat's ruling that one candidate also asks. Step 2's new row reads 「candidates lists members for it, one or several → ask … with one candidate, ask whether it is the one meant. Do not pick one, and never treat a candidate as a match. Compute nothing yet.」 The old "one near form selects nothing → step 4" is gone. New case 8 pins the single-candidate question, and its must_not_contain keeps both query_dataset and aggregate_records out.

(b) One rule, the same words across the three texts. Against main after #34904 (44c7a4a4):

Row Skill (this head) LIST_DATASETS_DESCRIPTION DATASET_SELECTION_RULE
one measure per word compute; two words are two metrics same same
one word, several measures ask; label, dataset label, description; do not pick same same
no match, candidates ask the same way; never a match same same
no match, no candidates step 4, say no governed metric was used same, plus 非指标口径 and the dataset line same

The skill's extra clause for one candidate ("ask whether it is the one meant") is the form of that question, not a different rule. Step 1's new bullet describes candidates with the spec's own shape ({ term, dataset, member }, pointing into the same answer). Step 4's "name the listed dataset on that object" line is kept, so the fallback still teaches the governed path.

The loose-form paragraph removed. That is the right call. With candidates from the server, a second client-side check would let the client and the server disagree, and the ADR-0149 D3 note makes the server's list the only source. The changeset states the consequence plainly: against a server with no candidates, a word with no match goes to the labelled fallback.

(c) Eval tokens. I checked all 9 cases on this head: every must_contain token appears in its expected_output, and no must_not_contain token does. Beyond that self-check:

  • Case 3 now forbids the machine names (won_revenue …), so a reply that lists members by name fails, as step 6 asks.
  • Case 8 forbids churn_rate for the same reason.
  • Case 9 (Chinese, no candidates) pins the fallback with the 非指标口径 opener and the 销售分析 / 赢单金额 dataset line, and forbids query_dataset.
  • The fixtures are consistent with the executor's real near rule from feat(analytics): list_datasets offers candidates for a term that matched nothing #34904 (two-code-point containment either way): revenue is contained in all three Revenue labels, so 3 candidates; churn is in Churn Rate only, so 1 candidate; and 营业额 against 赢单金额 / 赢单数, and 毛利率 against 营业收入 / 费用合计, share no containment, so no candidates. So no case teaches an answer the server would never produce.

Generated module and ceiling. At this head, node scripts/gen-mcp-ask-skill.mjs --check reports current. check-skills-token-ratchet passes with the row lowered from 1522 to 1491, which is the file's own measurement (6105 → 5981 bytes). It is a lowering, with no other row moved.

Value to a customer agent. The skill gets shorter (−124 bytes) and simpler: one rule, read off the answer, instead of a judgment over the catalogue.

Must-fix

None.

Should-fix

None.

Notes

Next: the seat's L2 (a published-skill rule change), then the Tier H record and os-zhuang. The low-risk arm is refused because of the @objectstack/mcp patch. A later push owes an L1-c delta read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract-review-claim: session_01WGufzgh1zkZzDXL36ckWAG · head bd92fff5b912f1e276e6a93cb224521ec6b73f64 · 2026-11-17T21:00Z

@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: bd92fff5b912f1e276e6a93cb224521ec6b73f64
Local-runs: none
Scope: skills/objectstack-ask/SKILL.md, skills/objectstack-ask/evals/metric-selection-fallback.json + packages/mcp/src/ask-skill.generated.ts, scripts/check-skills-token-ratchet.mjs
Security-touching: no

PR #34977 (card #34868), net diff against main: 5 files, +70 / -27. Merge base 44c7a4a415; main was at 02a290fe14 when read, and the 17 files it moved since the merge base include none of this diff's files and none of the door files read below. Nothing was built, run or re-run; blobs were read with git show and compared as text. The remainder of the diff (.changeset/34868-ask-skill-reads-candidates.md) is the lane seat's ACCEPT at TIER_DEFAULT; it is read in ② for its level and declaration lines only.

Check-runs on this head, polled until none was pending (settled 21:08Z): 53 runs, 37 success, 16 skipped, 0 failed, 0 cancelled, 0 pending. Green ones include Check Changeset, Check PR Size, Governed Surface Queue Guard, PR-body guards, Lint & Repo Gates and every Lint lane, the four Type Check lanes and TypeScript Type Check, Build Core, Test Core and all ten of its shards, Test UI, Live E2E UI, Dogfood Regression Gate. The skipped ones are the opt-in and UI-path lanes plus Queue verdict and Borrowed queue verdict, which do not run before the queue.

① Derived judgments

  • Accept-set: none changes. No schema, no tool input or output shape, no validator and no tool description string is in the diff. ListDatasetsOutputSchema.candidates and DatasetTermCandidateSchema are read on main, not changed. Right.
  • Public surface that does change, two texts with one source: the published skill skills/objectstack-ask/SKILL.md (@objectstack/skills) and the data loop that GET /mcp/skill serves from ASK_SKILL_DATA_LOOP (@objectstack/mcp). Both change in the same three places and nowhere else: one bullet added to step 1, rows 4 and 5 of the step 2 table replaced, the loose-form paragraph under the table deleted. Rows 1, 2, 3 and 6, the "When you ask" paragraph and steps 3 to 6 are untouched in the diff. Right.
  • Behaviour the new text takes away from a client, named in the changeset: a client no longer asks on its own reading of the catalogue. Against a server that returns no candidates (an earlier 18.x; the frontmatter still says "18.x"), and for a word that is near a measure only in translation, a word with no match now goes to the labelled fallback instead of a question. That is the ADR-0149 D3 amendment note's "With no candidate, rule 4 is unchanged" and both tool strings' "No match and no candidates: fall back"; the fallback still names the listed dataset on the same object (step 4, unchanged). Right, and it is a change in guidance text, not a refusal of anything accepted before, so no narrowing arm is owed.
  • Behaviour it adds: one candidate is a question. This reverses the earlier sentence "One near form is not a match either: it selects nothing". It agrees with the note ("With candidates, the AI asks in rule 3's form and acts on none"), with the docblock above DATASET_SELECTION_RULE ("even for a single candidate") and with the claim's surface note (seat ruling Q1 A on PR feat(analytics): list_datasets offers candidates for a term that matched nothing #34904). Right.
  • Generated module: the array body of packages/mcp/src/ask-skill.generated.ts at this head equals, character for character, the skill's body after its one H1 line with blank lines trimmed at both ends, each line rendered as the generator's single-quoted literal (the rule in scripts/gen-mcp-ask-skill.mjs, dataLoopText and literal); header comment and the closing ].join('\n'); are the generator's. The pin test for it runs in the Test Core shards, all green. Right.
  • Ratchet: exactly one CEILINGS row moves, skills/objectstack-ask/SKILL.md from 1522 to 1491; the other 10 changed lines are its comment. The skill blob is 5981 bytes at this head (6105 on main); the stamp line is 20 bytes; ceil(5961 / 4) = 1491. A lowering, pinned at the measurement, zero headroom. No other row, no convention and no exclusion is touched. Right.

② Semver level

Clause-②: no

  • The changeset is @objectstack/skills patch and @objectstack/mcp patch, with Clause-②: no and Metadata-protocol: none in both the changeset body and the PR body, the two agreeing. Check Changeset is green.
  • Patch is the right level on both. Metadata-protocol: none is true: nothing a metadata author can write changes, and none takes patch. @objectstack/mcp is correctly named: the generated module is under its src/, ships in its dist, and changes what GET /mcp/skill serves, so the diff publishes from that package; a skills-only entry would have under-declared. Both packages sit in the one fixed group, so they release at one version, which is also why the skill that reads candidates ships with the server that fills them.
  • Clause-②: no holds: no spec, protocol or SDK shape and no door's request or response shape moves; the change is guidance text, as in the two earlier entries for the same texts (34685-ask-data-skill.md, 34686-skill-single-source.md), both no.
  • The new entry names the supersession of the loose-form sentences in those two pending entries, and they stay as written (seat ruling, route A). The compiled notes therefore carry the earlier wording and then its replacement in one release; that is the ruled outcome, not a finding.

③ Boundary flags

  • Dev open_questions, one entry (correct the two older pending changesets, or leave them): answered by the seat, route A, leave them; the new changeset says it supersedes those sentences, and it does.
  • Dev out-of-scope finding 1, the docblock above DATASET_SELECTION_RULE in packages/mcp/src/mcp-server-runtime.ts ends "The skill's own loose-form rows predate candidates and are amended in its lane": confirmed on the tree, the sentence is out of date once this lands. The file is outside the diff and is read, not reviewed. Carried as an epic gap on 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 (the seat's comment 6960624063, taken as settled per the brief; not re-read here).
  • Dev out-of-scope finding 2, the skill does not say what the client does once the user answers the question: confirmed, and it was equally silent for the several-matches row before this change. The note states it ("rule 4 still governs it when the question settles nothing"). Same carrier, same comment.
  • Dev NOT MEASURED, pnpm check:dual-build-cjs-loads locally (prerequisite, a whole-workspace build): the head's check-runs are the reading and none failed.
  • Dev NOT MEASURED, an eval round against a model: accepted for this card, whose done-when is that the three texts state one rule. It stays unmeasured, and no claim in this record rests on a model having passed the nine cases.
  • Dev deviations (HTML comment first and last lines in the PR body, the commit trailer and footer wording): process, not contract; PR-body guards is green.
  • Escalated to the epic, not a finding on this diff: row 4 is not scoped to the word for the thing measured, while row 5 is. The executor offers a candidate by containment in either direction (dataset-term-matcher.ts, isNear) and offers dimensions as well as measures, so a grouping or time word that step 1 tells the client to send as written can come back with a candidate while the measure word has its one match: "按行业" contains a dimension labelled 行业, "this quarter" contains one named quarter, 本季度 contains 季度. Row 1 then says compute and row 4 says ask and compute nothing. The skill is true to the door here: LIST_DATASETS_DESCRIPTION, DATASET_SELECTION_RULE and the note are worded the same way, for any term, and a client already receives that rule from the tool description on main. Scoping row 4 in the skill alone would make the three texts differ, against the card's done-when, so the question belongs to the epic: does a candidate for a grouping or filter word hold back a metric whose own word matched. Carrier: the seat, as a third gap on 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.
  • SQL push-down: the diff holds no query, no id materialisation and no join. Nothing to judge.

④ Design judgment

No must-fix, no should-fix.

skills/objectstack-ask/SKILL.md, each changed sentence against the door at this head:

  • "A word that matched nothing may have candidates on the answer": true. candidates is a top-level member of the list_datasets output beside datasets, present only when terms were sent and a term with no hit in any listed dataset has a near member, and absent otherwise, never an empty list (dataset-tools.ts, listDatasets; ListDatasetsOutputSchema). "May" is the right word.
  • "members offered as possible readings": the tool description's own words.
  • "each a { term, dataset, member } pointer to a member the same answer lists": true. DatasetTermCandidateSchema has exactly those three keys, and the executor builds candidates only from the admitted members of the datasets it listed, so every pointer resolves inside the same answer and the label, dataset label and description the question needs are there to read.
  • "A candidate is not a match": true. A term with a hit anywhere gets no candidate, and a candidate carries no matchedOn.
  • Row 4, "one or several ... ask ... listing each candidate's label, its dataset's label and its description; with one candidate, ask whether it is the one meant. Do not pick one, and never treat a candidate as a match. Compute nothing yet.": agrees with LIST_DATASETS_DESCRIPTION ("ask the same way, listing each one's label, dataset label and description; never pick one, and never treat a candidate as a match"), with DATASET_SELECTION_RULE and with the note. The one-candidate clause says more than the two strings and exactly what the docblock and the ruling say. "Compute nothing yet" agrees with the unchanged paragraph under the table (the reply is the question alone, no tool call until the user answers).
  • Row 5, "No match and no candidates for the word for a thing measured: step 4, and say in the answer that no governed metric was used": agrees with both strings and with rule 4. The scope to the word for the thing measured is the skill's addition and is needed: a time word with no match and no candidate must not send a matched metric to the fallback (eval case 1).
  • The deleted paragraph and the deleted sentence "One near form is not a match either" were the client's own nearness rule. The note puts nearness with the executor, and the two strings leave a no-candidate word one outcome, so keeping any of it would have stated a second rule. Deleting it, not keeping it as a secondary check, is the reading the door supports. What a call without terms returns is no longer said in the skill; the tool's input schema says it, and nothing in the remaining steps reads it.
  • Break attempts that did not break it: a cap of 5 candidates per term with nothing marking the cut (the skill claims no completeness); candidates that are all dimensions (the row says members, and the question is still asked); a withheld member (never offered, and the membersWithheld row is unchanged); a degraded read (partial and warning, unchanged). The one that does bite, a candidate for a grouping word beside a matched measure, is the door's own wording and is escalated in ③.

skills/objectstack-ask/evals/metric-selection-fallback.json, 9 cases, graded by literal case-sensitive substring (packages/qa/scenarios/src/skill-evals/grade.ts):

  • Case 8 does test the one-candidate ask-back. Its prompt is one the executor would produce ("churn" is contained in the label Churn Rate, and in nothing of Active Subscriptions), with one candidate. A reply passes only with the candidate's label, the dataset's label and a question mark, and fails on query_dataset (it computed), on aggregate_records (it fell back) or on the machine name churn_rate. The old rule's answer, the fallback, fails it.
  • Case 9 does test the fallback with a near-looking measure and no candidates. 营业额 against 赢单金额 and 赢单数 has no containment either way, so the executor would offer nothing, as the prompt states. A reply passes only with describe_object, aggregate_records, the 非指标口径 line, the dataset's label and a measure's label, and fails on query_dataset or provenance. A reply that asks whether 赢单金额 is meant lacks the tool names and the label line and fails.
  • Case 3 (several candidates) states the three candidates in the order the executor lists them (datasets as listed, measures first) and now also forbids the three machine names. Cases 4, 5 and 6 only add that the answer has no candidates and restate the reason in the new rule's words; in case 6 the sentence about members the user may not read is unchanged inside the edited line. Cases 1, 2 and 7 are untouched.
  • Every must-contain token of the edited and new cases is in that case's expected output, and no must-not-contain token is.

packages/mcp/src/ask-skill.generated.ts agrees with the skill line for line, as in ①. scripts/check-skills-token-ratchet.mjs: the row agrees with the measurement and the comment's arithmetic is correct, as in ①.

Nits, none of which changes correctness or the contract:

  • N1 (nit): no eval case has a matched measure beside a candidate for another word, or a candidate that is a dimension. The card asks for "candidates listed, none listed" only, and the expected answer depends on the question escalated in ③. Follow-up with that gap, not a change here.
  • N2 (nit): cases 1 and 7 send a time word (本季度, 本月) and do not say the answer has no candidates, where cases 4, 5, 6 and 9 do. The key is absent unless stated, so the prompts are still correct; saying so would match the others. Left as an accepted deviation: an edit moves the head.
  • N3 (nit): the row 4 cell says "Ask the user which one they mean" and then, for one candidate, "ask whether it is the one meant"; the first clause reads oddly for a list of one. The meaning is unambiguous, and the text is pinned at its ceiling. Accepted as written.

Security-touching is no: the changed hunks teach how to read candidates and when to ask or fall back. None teaches permission, sharing, credential, token or authentication behaviour; the membersWithheld row of the skill is not in the diff, and the permission sentence of eval case 6 is unchanged within its line. The low-risk arm is not open to this PR in any case, since the changeset also releases @objectstack/mcp.

Implemented-by: claude/issue-34868-ask-skill-reads-candidates
Reviewed-by: session_01WGufzgh1zkZzDXL36ckWAG

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

席位记录 · 2026-11-17T21:11Z

Head-sha: bd92fff5b912f1e276e6a93cb224521ec6b73f64

维护者速读(终稿)

席位意见:建议批准。97 行,技能每一句都和门的现状一致(候选形状、工具描述、DATASET_SELECTION_RULE、ADR-0149 D3 说明都核过)。评测第 8 例确实考“一个候选就反问”,第 9 例考“没有候选就退回”。生成模块和技能正文逐字一致。体积上限只降不升。

席位核对

  • 形态:Fixes #34868;5 个文件,+70/−27,远低于 3000 行。
  • 前提实测:席位 L2 6961115041(fable,tier evidence 已验):没有 must-fix,也没有 should-fix;留三个 nit(N1 缺“度量已匹配、另一个词有候选”的用例;N2 第 1、7 例没写明没有候选;N3 只有一个候选时“问是哪一个”措辞别扭)。
  • 门禁:本 head 共 53 个 check-run,37 success、16 skipped、0 failed。
  • 接受的偏差:两个旧 changeset(34685、34686)保留旧措辞,新 changeset 写明取代关系(席位裁定 A)。
  • 范围外去向: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 上的专题缺口:6960624063 两条(mcp-server-runtime.ts 的 DATASET_SELECTION_RULE 注释落地后过时、技能没写用户回答之后怎么做),以及 L2 升级的第三条:第 4 行规则没有限定在“被度量的那个词”上。这个问题工具描述和 ADR 说明里也同样存在,只改技能会破坏“同一规则同一措辞”,所以要三处一起改。
  • 落地条款:Tier H,批准前 ⛔ 不 ready、不入队、不开自动合并。批准后由 o3-E 落地。head 如果再变,补 L1 和 L2 delta(纯合并补 Regen-provenance)。

@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 21:53
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit e556e3a Nov 17, 2026
59 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-34868-ask-skill-reads-candidates branch November 17, 2026 22:17
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 size/s 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: the ask-data skill's zero-match row reads the candidates list once list_datasets fills it

3 participants