diff --git a/.changeset/34919-ask-skill-next-step.md b/.changeset/34919-ask-skill-next-step.md new file mode 100644 index 00000000000..12a34211914 --- /dev/null +++ b/.changeset/34919-ask-skill-next-step.md @@ -0,0 +1,13 @@ +--- +'@objectstack/skills': patch +'@objectstack/mcp': patch +--- + +docs(skills): the `objectstack-ask` skill follows `list_datasets` `nextStep` and cites `query_dataset` `sourceLine` as given, before `provenance` + +Clause-②: no +Metadata-protocol: none + +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. + +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. diff --git a/packages/mcp/src/ask-skill.generated.ts b/packages/mcp/src/ask-skill.generated.ts index 7b55fb05d15..e8e9eabb023 100644 --- a/packages/mcp/src/ask-skill.generated.ts +++ b/packages/mcp/src/ask-skill.generated.ts @@ -42,12 +42,16 @@ export const ASK_SKILL_DATA_LOOP: string = [ '| 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. |', '| 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. |', '| 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. |', - '| 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. |', - '| 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. |', + '| 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. |', + '| No match and no candidates for the word for a thing measured | Step 4. |', '| `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. |', '', - 'When you ask, the reply is the question alone: no figure, and no tool call', - 'until the user answers. State no figure of your own in it (no count, total', + 'When the answer has `nextStep`, follow its `decision` and `note`. 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.', + '', + 'When you only ask, the reply is the question alone: no tool call until the user', + 'answers. State no figure of your own in it (no count, total', 'or option number): name each option by its label in a bullet, and quote its', 'description as written. Ask only about matches or candidates for words the user', '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 = [ ' `selection.dimensions` take the names `list_datasets` gave;', ' `selection.runtimeFilter` filters; `selection.dateGranularity` buckets a date', ' dimension for a trend; `selection.order` and `selection.limit` rank.', - '- Cite the source from the answer\'s `provenance` (the dataset\'s label and each', - ' measure\'s label, as in 「指标:营收(数据集:销售分析)」), not from memory.', + '- 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.', '- Use the measure\'s `description` to say what the number includes and excludes.', '- `truncated: true`: more rows existed than came back. Say the result is', ' partial. A `warning` on the answer narrows what you were allowed to read:', diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 6fb54c29918..b59995dfbfb 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -1755,7 +1755,36 @@ export const CEILINGS = new Map([ // ceil(($(wc -c < skills/objectstack-ask/SKILL.md) - 20) / 4) == ceil(6959 / 4) // = 1740 (+249), the measured remainder only. Pinned AT the measurement, zero // headroom; no other row moves. - ['skills/objectstack-ask/SKILL.md', 1740], + // 1740 -> 1750, the card that makes the dataset tools answer `nextStep` and + // `sourceLine` (ruling #34894 = A): one line under the step 2 table says to + // follow `nextStep` (its `decision` and `note`), and step 3's citation bullet + // says to cite `sourceLine` as given and to build the source from + // `provenance` only without one (one citation instruction, in the step that + // cites). Raise path the standing ruling 「A:先削重复,余额按实测提高」 (ruling + // record 6513306068, letter B). PAID DOWN FIRST — two restatements cut, each + // keeping 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") and "no figure, and " in the paragraph under + // the table (its next sentence: "State no figure of your own in it"). Text + // +111 bytes, cuts -71: 6979 -> 7019 bytes, less the 20-byte stamp line: + // ceil(($(wc -c < skills/objectstack-ask/SKILL.md) - 20) / 4) == ceil(6999 / 4) + // = 1750 (+10), the measured remainder only. Pinned AT the measurement, zero + // headroom; no other row moves. + // 1750 -> 1779, re-measured on the same PR before it landed, after its + // contract review (record 6969596617, S1) found the `nextStep` line and the + // question-alone paragraph under it giving opposite orders for a note that + // answers one measure and leaves a word with candidates out. The note wins: + // one sentence says to do both and to use none of that word's candidates + // until the user answers, and the paragraph now opens "When you only ask". + // Same raise path (ruling record 6513306068, letter B). PAID DOWN FIRST — one + // restatement cut from the left cell of step 2's `candidates` row, keeping + // its other home: ", one or several" (the same row's right cell: "with one + // candidate, ask whether it is the one meant"). Text +133 bytes, cut -17: + // 7019 -> 7135 bytes, less the 20-byte stamp line: + // ceil(($(wc -c < skills/objectstack-ask/SKILL.md) - 20) / 4) == ceil(7115 / 4) + // = 1779 (+29), the measured remainder only. Pinned AT the measurement, zero + // headroom; no other row moves. + ['skills/objectstack-ask/SKILL.md', 1779], ]); /** diff --git a/skills/objectstack-ask/SKILL.md b/skills/objectstack-ask/SKILL.md index 9b356b2b0e1..b4f456458e7 100644 --- a/skills/objectstack-ask/SKILL.md +++ b/skills/objectstack-ask/SKILL.md @@ -57,12 +57,16 @@ wrote its business definition) outranks a number you work out yourself. | 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. | | 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. | | 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. | -| 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. | -| 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. | +| 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. | +| No match and no candidates for the word for a thing measured | Step 4. | | `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. | -When you ask, the reply is the question alone: no figure, and no tool call -until the user answers. State no figure of your own in it (no count, total +When the answer has `nextStep`, follow its `decision` and `note`. 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. + +When you only ask, the reply is the question alone: no tool call until the user +answers. State no figure of your own in it (no count, total or option number): name each option by its label in a bullet, and quote its description as written. Ask only about matches or candidates for words the user 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. `selection.dimensions` take the names `list_datasets` gave; `selection.runtimeFilter` filters; `selection.dateGranularity` buckets a date dimension for a trend; `selection.order` and `selection.limit` rank. -- Cite the source from the answer's `provenance` (the dataset's label and each - measure's label, as in 「指标:营收(数据集:销售分析)」), not from memory. +- 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. - Use the measure's `description` to say what the number includes and excludes. - `truncated: true`: more rows existed than came back. Say the result is partial. A `warning` on the answer narrows what you were allowed to read: