Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .changeset/34919-ask-skill-next-step.md
Original file line number Diff line number Diff line change
@@ -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.
17 changes: 11 additions & 6 deletions packages/mcp/src/ask-skill.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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:',
Expand Down
31 changes: 30 additions & 1 deletion scripts/check-skills-token-ratchet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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],
]);

/**
Expand Down
17 changes: 11 additions & 6 deletions skills/objectstack-ask/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
Loading