Skip to content

Commit f54fc93

Browse files
docs(skills): objectstack-ask follows list_datasets nextStep and cites query_dataset sourceLine as given (#35100)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBLW6dHPW6sSheA32XPKZzPV)_ Part of #34919 Lands after #35043: the skill names the `list_datasets` `nextStep` and `query_dataset` `sourceLine` members that the executor in #35043 fills. Neither PR alone ends the card: the card's before/after ask round reading moved to the first daily record of #34869 (seat comment 6967910642), and the seat ends the card by hand after it. Rework round for L1-c REWORK 6967924755 (head `9da3374525`): M1 (this body now says `Part of`, no second `Claim:` added to the card) and S1 (the `sourceLine` half moved into step 3's citation bullet; row re-measured). Fix round for contract review 6969596617 (PASS, should-fix S1; head `b82c7383fc`): the `nextStep` line now states the order for a note that answers one measure and asks about a word. Direction by seat routing: the note wins. Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:`objectstack-ask` 技能两处:第 2 步决策表下加一句「`list_datasets` 返回里有 `nextStep` 时按它的 `decision` 和 `note` 走」;第 3 步的引用来源那一条改成「返回里有 `sourceLine` 就原样引用,没有时才用 `provenance` 拼来源」。由技能生成的 `GET /mcp/skill` 页面(`ask-skill.generated.ts`)用仓库脚本重新生成。 本轮(合同审核 6969596617 的 S1)再补一句:`note` 说「先答已匹配的指标、再问另一个词」时两件都做,用户回答前不用那个词的候选;「只发问、不调工具」那一段改为只管纯发问的回复。 - **为什么改**:#34919 的范围要求工具说明、`initialize` 规则和问数技能三处都说「按 `nextStep` 走、引用 `sourceLine`」;前两处在 #35043,技能这一处在本 PR。引用规则放在真正要引用的第 3 步,全文只有一条引用指令,先后顺序写明。 - **风险与回滚**:只动发布技能文本、它的生成副本和 token 天花板一行,无代码路径变化。先删同文件两处重复句,再按裁决「A:先削重复,余额按实测提高」把天花板按实测抬 1740 → 1779(+39;本轮先删候选行里一处重复,再 +29)。不返回这两个成员的服务器照旧走 `provenance`。回滚即 revert 本 PR。 - **先看**:`skills/objectstack-ask/SKILL.md`(第 2 步表下「If `note` says…」一句与紧随的「When you only ask」:两句是否把先算后问的顺序说清;第 3 步引用那一条的先后顺序;表中兜底行与其下段落删去的两处重复)、`scripts/check-skills-token-ratchet.mjs`(`objectstack-ask` 行与注释)、`packages/mcp/src/ask-skill.generated.ts`(生成物,应与技能正文逐字一致)。 - **两分钟验证**:`node scripts/check-skills-token-ratchet.mjs && node scripts/gen-mcp-ask-skill.mjs --check`,预期两者均以 0 退出,ask 技能读数 1779 / 1779。 - **需要你做的**:本 PR 为 Tier H(`skills/**`),需维护者批准(或 GOVERNED_APPROVERS 的 APPROVED 审核)后由席位落地,且须在 #35043 合并之后。 ## What changes - **Step 2 line** (`skills/objectstack-ask/SKILL.md`). One line under the decision table: "When the answer has `nextStep`, follow its `decision` and `note`." It restates neither the precedence nor the cases: the tool result, the `list_datasets` description and `DATASET_SELECTION_RULE` carry them. - **Order for a mixed note** (same file; contract review 6969596617, S1). The line continues: "If `note` says to answer one measure and ask about a word, do both; use none of that word's candidates until the user answers." The paragraph under it now opens "When you only ask, the reply is the question alone: no tool call until the user answers." This is the executor's `one_measure` note with words left out (`dataset-next-step.ts` on `main`: "Answer with query_dataset using that measure" and then "ask the user which one is meant before using it; do not pick one"). The note wins; the question-alone rule covers a reply that only asks. No example was added. - **Step 3 citation bullet** (same file). It now reads: "Cite the answer's `sourceLine` as given; without one, build the source from `provenance` (the dataset's label and each measure's label, as in 「指标:营收(数据集:销售分析)」), not from memory." The skill holds exactly one citation instruction, in the step that cites, with the order stated and the fallback for a server that answers no `sourceLine`. The step 2 line no longer mentions `sourceLine`. - **Read against #35043's head (`861f110f58`).** `DATASET_SELECTION_RULE` says "follow its note" and "Cite query_dataset's sourceLine as the answer's source"; the `query_dataset` description says "`sourceLine` is that source already written in the caller's language". The skill agrees with both. - **Paid down first.** Three restatements in the same file are cut. Each keeps its other home: - the fallback row's ", and say in the answer that no governed metric was used" (step 4: "Open the answer with one line saying it is not from a governed metric"); - "no figure, and " in the paragraph under the table (its next sentence: "State no figure of your own in it"); - ", one or several" in the left cell of the `candidates` row (the same row's right cell: "with one candidate, ask whether it is the one meant"), cut in the fix round. - **Token row** (`scripts/check-skills-token-ratchet.mjs`): `skills/objectstack-ask/SKILL.md` moves 1740 → 1779, the measured remainder only, pinned at the measurement with zero headroom (1740 → 1750 in the rework round, 1750 → 1779 in the fix round). Raise path: the standing maintainer ruling 2026-10-27 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). Rework round: text +111 bytes, cuts −71, 6979 → 7019 bytes. Fix round: text +133 bytes, cut −17, 7019 → 7135 bytes, less the 20-byte stamp line, ceil(7115 / 4) = 1779 (+29 in this round, +39 over `main`). No other row moves. - **Generated** (`packages/mcp/src/ask-skill.generated.ts`): rewritten by `node scripts/gen-mcp-ask-skill.mjs`, never by hand. `check:skill-refs` and `check:skill-docs` report every artifact in sync; they own no output for this skill, so `content/docs/ai/skills-reference.mdx` does not change. - **Changeset** `.changeset/34919-ask-skill-next-step.md`: `@objectstack/skills` and `@objectstack/mcp` at `patch`. `Clause-②: no` per the seat ruling (seat 3 brief 6968205670 §5, kept by seat 1; precedent #35038): a text-only change to served skill text is not a surface change; only tools, fields or arguments count. `Metadata-protocol: none`. ## Skills size readings | Reading | Before (`3b4ffb2217`) | After (`b82c7383fc`) | |:--|--:|--:| | `skills/objectstack-ask/SKILL.md` lines | 115 | 120 | | `skills/objectstack-ask/SKILL.md` bytes | 6979 | 7135 | | `skills/objectstack-ask/SKILL.md` priced tokens (ceiling) | 1740 (1740) | 1779 (1779) | | All 12 `SKILL.md` files, lines summed | 4736 | 4741 | | Whole shipped bundle, tokens | 263540 | 263579 | ## Acceptance notes - **Ask round reading: not owed here.** The card's Done-when item 2 (the daily ask round read before and after) moved to #34869 by the seat (comment 6967910642). Nothing was run for it in this PR, and nothing is claimed for it. - **Governed.** `check-governed-merges --branch HEAD` answers GOVERNED, landing tier H, from the `skills/**` hit (exit 3; the low-risk skills arm reads NOT MEASURED on a path list, and the diff also touches a `.ts` and a `.mjs` file). The PR stays draft and is never readied, queued or armed by the author. - **Claim.** This branch is claimed by comment 6968320293 on #34919. - **Overlap.** `overlap-check --branch=HEAD` at `b82c7383fc`: VERDICT clean, exit 0, against `origin/main` `dfc6bbf615` and 2 PR heads. - **No example wording from the eval set.** The one example in the edited bullet, 「指标:营收(数据集:销售分析)」, is the bullet's existing example, unchanged. ## Verification All readings at `b82c7383fc`. <details><summary>Package tests, typecheck and generator drift</summary> - `node scripts/gen-mcp-ask-skill.mjs --check`: exit 0 ("is current with skills/objectstack-ask/SKILL.md"). - `pnpm --filter '@objectstack/mcp^...' build` under the verify lock: `VERDICT command-exit 0`. - `pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 && pnpm --filter @objectstack/mcp typecheck` under the verify lock: Test Files 71 passed (71), Tests 1261 passed (1261), `VERDICT command-exit 0`. The run includes `skill-single-source-34686.test.ts`. - `pnpm --filter @objectstack/spec run check:skill-refs`: exit 0, "9 generated files in sync". `check:skill-docs`: exit 0. `check:skill-examples`: exit 0, "347 prose examples type-check across 3 surface(s)" (after building the `@objectstack/client-react` closure it reads). </details> <details><summary>Derived gates (dispatch-gates --commands, no paths, then --ran)</summary> - 88 derived; 87 exit 0. Among them: `check-skills-token-ratchet.mjs` (objectstack-ask row 1779 / 1779, +0) and its `--self-test` (104 cases pass), `check-changeset-no-major.mjs --base origin/main`, `check-adr-0087-registration`, `check-empty-changeset`, `check:nul-bytes`, `check:skill-links`, `check:skill-identifier-liveness`, `check:pm-dispatch-gates`, `check:pm-governed-merges`. - 1 NOT MEASURED: `pnpm check:dual-build-cjs-loads` exit 3, "PREREQUISITE NOT MET": it reads every package's `dist/`, and a whole-workspace build was not run here; CI runs this gate. - `--ran`: "88 derived famil(ies) accounted for — 87 run, 1 NOT-MEASURED", the one above. - The derivation printed a stale-tree note: the branch is at least 20 commits behind `origin/main`. `main` was not merged in this round (no conflict, no red). </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzfR33NbV51QQU6R6bm)_ <!-- signed: repo:objectstack#1 · os-warren · session_01JQwxbWDsbbJizuYnDwBxT8 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6ec3a73 commit f54fc93

4 files changed

Lines changed: 65 additions & 13 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/skills': patch
3+
'@objectstack/mcp': patch
4+
---
5+
6+
docs(skills): the `objectstack-ask` skill follows `list_datasets` `nextStep` and cites `query_dataset` `sourceLine` as given, before `provenance`
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The `objectstack-ask` skill, and the page at `GET /mcp/skill` that is generated from it, now tell a connected client two things. Under the step 2 decision table: when the `list_datasets` answer has `nextStep`, follow its `decision` and `note`. In step 3's citation bullet: cite the `query_dataset` answer's `sourceLine` as given, and build the source from `provenance` only when the answer has no `sourceLine`. Both members are answered by servers whose dataset tools fill them; a server that does not answer them leaves the skill's existing steps in force, with the `provenance` citation as before. When a `nextStep` note says to answer one measure and to ask about a word that has only candidates, the skill says to do both and to use none of that word's candidates until the user answers; the question-alone rule (no tool call until the user answers) covers a reply that only asks.
12+
13+
Two sentences that restated another line of the same skill are removed: the fallback row's "and say in the answer that no governed metric was used" (step 4 opens every fallback answer with that line) and "no figure" in the paragraph under the table (its next sentence says the same). The `candidates` row also drops "one or several", which its own right cell states. `packages/mcp/src/ask-skill.generated.ts` is regenerated from the skill; no code path changes.

‎packages/mcp/src/ask-skill.generated.ts‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,16 @@ export const ASK_SKILL_DATA_LOOP: string = [
4242
'| 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. |',
4343
'| One word matches several measures, in one dataset or in two | Ask the user which one they mean. List each candidate\'s label, its dataset\'s label and its description. Do not pick one. |',
4444
'| Only a dimension matches | That is a grouping ("by stage"), not a number. You still need a measure match; without one, ask which number is meant. |',
45-
'| 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. |',
46-
'| 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. |',
45+
'| A word matches nothing, and `candidates` lists members for it | 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. |',
46+
'| No match and no candidates for the word for a thing measured | Step 4. |',
4747
'| `membersWithheld: true` on a dataset | Say that it has members (measures or groupings) you may not read; the metric asked for may be among them. Do not say the metric does not exist. |',
4848
'',
49-
'When you ask, the reply is the question alone: no figure, and no tool call',
50-
'until the user answers. State no figure of your own in it (no count, total',
49+
'When the answer has `nextStep`, follow its `decision` and `note`. If `note`',
50+
'says to answer one measure and ask about a word, do both; use none of that',
51+
'word\'s candidates until the user answers.',
52+
'',
53+
'When you only ask, the reply is the question alone: no tool call until the user',
54+
'answers. State no figure of your own in it (no count, total',
5155
'or option number): name each option by its label in a bullet, and quote its',
5256
'description as written. Ask only about matches or candidates for words the user',
5357
'wrote; when their word matched nothing and has no candidates, go to step 4',
@@ -60,8 +64,9 @@ export const ASK_SKILL_DATA_LOOP: string = [
6064
' `selection.dimensions` take the names `list_datasets` gave;',
6165
' `selection.runtimeFilter` filters; `selection.dateGranularity` buckets a date',
6266
' dimension for a trend; `selection.order` and `selection.limit` rank.',
63-
'- Cite the source from the answer\'s `provenance` (the dataset\'s label and each',
64-
' measure\'s label, as in 「指标:营收(数据集:销售分析)」), not from memory.',
67+
'- Cite the answer\'s `sourceLine` as given; without one, build the source from',
68+
' `provenance` (the dataset\'s label and each measure\'s label, as in',
69+
' 「指标:营收(数据集:销售分析)」), not from memory.',
6570
'- Use the measure\'s `description` to say what the number includes and excludes.',
6671
'- `truncated: true`: more rows existed than came back. Say the result is',
6772
' partial. A `warning` on the answer narrows what you were allowed to read:',

‎scripts/check-skills-token-ratchet.mjs‎

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1870,7 +1870,36 @@ export const CEILINGS = new Map([
18701870
// ceil(($(wc -c < skills/objectstack-ask/SKILL.md) - 20) / 4) == ceil(6959 / 4)
18711871
// = 1740 (+249), the measured remainder only. Pinned AT the measurement, zero
18721872
// headroom; no other row moves.
1873-
['skills/objectstack-ask/SKILL.md', 1740],
1873+
// 1740 -> 1750, the card that makes the dataset tools answer `nextStep` and
1874+
// `sourceLine` (ruling #34894 = A): one line under the step 2 table says to
1875+
// follow `nextStep` (its `decision` and `note`), and step 3's citation bullet
1876+
// says to cite `sourceLine` as given and to build the source from
1877+
// `provenance` only without one (one citation instruction, in the step that
1878+
// cites). Raise path the standing ruling 「A:先削重复,余额按实测提高」 (ruling
1879+
// record 6513306068, letter B). PAID DOWN FIRST — two restatements cut, each
1880+
// keeping its other home: the fallback row's ", and say in the answer that no
1881+
// governed metric was used" (step 4: "Open the answer with one line saying it
1882+
// is not from a governed metric") and "no figure, and " in the paragraph under
1883+
// the table (its next sentence: "State no figure of your own in it"). Text
1884+
// +111 bytes, cuts -71: 6979 -> 7019 bytes, less the 20-byte stamp line:
1885+
// ceil(($(wc -c < skills/objectstack-ask/SKILL.md) - 20) / 4) == ceil(6999 / 4)
1886+
// = 1750 (+10), the measured remainder only. Pinned AT the measurement, zero
1887+
// headroom; no other row moves.
1888+
// 1750 -> 1779, re-measured on the same PR before it landed, after its
1889+
// contract review (record 6969596617, S1) found the `nextStep` line and the
1890+
// question-alone paragraph under it giving opposite orders for a note that
1891+
// answers one measure and leaves a word with candidates out. The note wins:
1892+
// one sentence says to do both and to use none of that word's candidates
1893+
// until the user answers, and the paragraph now opens "When you only ask".
1894+
// Same raise path (ruling record 6513306068, letter B). PAID DOWN FIRST — one
1895+
// restatement cut from the left cell of step 2's `candidates` row, keeping
1896+
// its other home: ", one or several" (the same row's right cell: "with one
1897+
// candidate, ask whether it is the one meant"). Text +133 bytes, cut -17:
1898+
// 7019 -> 7135 bytes, less the 20-byte stamp line:
1899+
// ceil(($(wc -c < skills/objectstack-ask/SKILL.md) - 20) / 4) == ceil(7115 / 4)
1900+
// = 1779 (+29), the measured remainder only. Pinned AT the measurement, zero
1901+
// headroom; no other row moves.
1902+
['skills/objectstack-ask/SKILL.md', 1779],
18741903
]);
18751904

18761905
/**

‎skills/objectstack-ask/SKILL.md‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,16 @@ wrote its business definition) outranks a number you work out yourself.
5757
| 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. |
5858
| One word matches several measures, in one dataset or in two | Ask the user which one they mean. List each candidate's label, its dataset's label and its description. Do not pick one. |
5959
| Only a dimension matches | That is a grouping ("by stage"), not a number. You still need a measure match; without one, ask which number is meant. |
60-
| 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. |
61-
| 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. |
60+
| A word matches nothing, and `candidates` lists members for it | 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. |
61+
| No match and no candidates for the word for a thing measured | Step 4. |
6262
| `membersWithheld: true` on a dataset | Say that it has members (measures or groupings) you may not read; the metric asked for may be among them. Do not say the metric does not exist. |
6363

64-
When you ask, the reply is the question alone: no figure, and no tool call
65-
until the user answers. State no figure of your own in it (no count, total
64+
When the answer has `nextStep`, follow its `decision` and `note`. If `note`
65+
says to answer one measure and ask about a word, do both; use none of that
66+
word's candidates until the user answers.
67+
68+
When you only ask, the reply is the question alone: no tool call until the user
69+
answers. State no figure of your own in it (no count, total
6670
or option number): name each option by its label in a bullet, and quote its
6771
description as written. Ask only about matches or candidates for words the user
6872
wrote; when their word matched nothing and has no candidates, go to step 4
@@ -75,8 +79,9 @@ be incomplete; `warning` says why, and you repeat it when you fall back.
7579
`selection.dimensions` take the names `list_datasets` gave;
7680
`selection.runtimeFilter` filters; `selection.dateGranularity` buckets a date
7781
dimension for a trend; `selection.order` and `selection.limit` rank.
78-
- Cite the source from the answer's `provenance` (the dataset's label and each
79-
measure's label, as in 「指标:营收(数据集:销售分析)」), not from memory.
82+
- Cite the answer's `sourceLine` as given; without one, build the source from
83+
`provenance` (the dataset's label and each measure's label, as in
84+
「指标:营收(数据集:销售分析)」), not from memory.
8085
- Use the measure's `description` to say what the number includes and excludes.
8186
- `truncated: true`: more rows existed than came back. Say the result is
8287
partial. A `warning` on the answer narrows what you were allowed to read:

0 commit comments

Comments
 (0)