Repository navigation
Commit d6ce9ba
docs(skills): the ask skill says what to do after the user answers an ask-back (#35775)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DK3yGUPi8j7HBaXCzoa37AN)_
Fixes #35004
Part of #34996
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:用 AI
助手问数的业务用户,在助手反问「你指的是哪一个指标」之后,选中某个指标就得到按该指标算出、带出处的数字,改说另一个指标词就由助手先按这个新词重新查找指标,只回答「都不是」才改用普通查询并注明不是指标口径。
- 为什么做:属于「MCP 二期与问数」专题,问数技能此前只写到「反问」为止,用户答完之后怎么做由各个 AI 客户端自行决定。
- 出错会怎样:只改文字、不动任何计算逻辑,最坏情况是助手在用户选定之后仍多问一句或对个别答法改走普通查询,撤回本次改动即可恢复原文。
- 要你做什么:合同审核在最新版本上没有未结意见之后,批准这次受管文本(问数技能)的改动,在那之前无需动作。
## What changes
- **Skill, step 2** (`skills/objectstack-ask/SKILL.md`). One new
paragraph at the end of the step, for the turn after an ask-back:
> Use an option only once the user picks it: compute it by its exact
name (step 3). Another word starts at step 1; if they only pick none, go
to step 4.
It points at steps 1, 3 and 4 and restates none of them. "Option" is the
word the paragraph above it already uses for what the question lists
("name each option by its label in a bullet").
- **Three replies, three routes.** A pick is computed through
`query_dataset` (step 3). A reply that names another word ("no, I mean
ARR") starts at step 1: a new `list_datasets` lookup with that word,
before anything else. A reply that only declines the options goes to
step 4, the labelled object-query fallback.
- **No rule is added.** ADR-0149 D3 on `main` has no separate sentence
for the step after the answer. The paragraph is D3 rule 1 and rule 2 (a
word the user writes is matched first, and one hit is answered through
`query_dataset` with the source from the tool's answer) and rule 4 (no
hit is the labelled fallback) applied to the user's reply, with the
2026-11-17 note's "rule 4 still governs it when the question settles
nothing" and the 2026-11-19 note's "a measure candidate is still asked
about and never selected" (ruling record 7024577075).
- **`Part of #34996`.** The another-word reply is item (a) of that
card's third iteration, carried here by the seat's route after the
contract review of the previous head. Item (b) of that iteration stays
with that card, which this PR leaves open.
- **Paid inside the same file.** The `objectstack-ask` row of
`scripts/check-skills-token-ratchet.mjs` is not edited. New text is paid
for by cutting text that restated another line of the same file (ruling
record 6513306068: pay by cutting restatement first). Each cut keeps its
other home:
- step 1, " and in the user's language" after "as the user wrote them"
(the next sentence: "Do not translate or reword a term");
- step 1, ": a fragment's matches are not the user's" in the "kept
whole" example (the sentence before it in the same bullet: "a match on a
word you supplied is your reading, not the user's"). The instruction and
its example stay: `kept whole ("travel budget", not "travel" and
"budget")`;
- step 2, the "Only a dimension matches" row: the `("by stage")` example
(step 1's first bullet gives it) and "You still need a measure match;
without one," which now reads "Without a measure match,";
- under the step 2 table, "; use none of that word's candidates until
the user answers" (the new paragraph states it for every option: "Use an
option only once the user picks it"; the row above says "Do not pick
one", and the `nextStep` note that paragraph is about carries the
instruction itself).
- **Generated page** (`packages/mcp/src/ask-skill.generated.ts`).
Rewritten by `node scripts/gen-mcp-ask-skill.mjs`, never by hand. It is
what `GET /mcp/skill` serves.
- **Eval cases**
(`skills/objectstack-ask/evals/metric-selection-fallback.json`), in the
file's existing shape. Both start from one ask-back over two measure
candidates of the word "retention" (Logo Retention, Net Revenue
Retention).
- id 18: the user replies with one label. Expected: one `query_dataset`
call on the chosen measure, the source cited from the tool's answer, no
second question and no fallback.
- id 19: the user replies "No, I mean ARR." Expected: the next tool call
is `list_datasets` with the user's word as its term, and no object tool
before it. Its `must_not_contain` holds no bare identifier: two call
spellings a fallback answer writes (a tool name with its opening
parenthesis) and the fallback label.
- **Changeset** `.changeset/35004-ask-skill-after-answer.md`:
`@objectstack/skills` and `@objectstack/mcp` at `patch`. `Clause-②: no`:
served text only; no tool, field or argument changes.
`Metadata-protocol: none`. Its body follows the text at this head and
names `Part of #34996`.
## Fix round for contract record 7033043274
The record is a PASS at `c735af7640` with S1 open. One push,
`c735af7640` to `fe8707ed6c`.
| Finding | At `fe8707ed6c` |
|:--|:--|
| S1: "If they pick none, go to step 4" also covered a reply that names
another metric word and sent it to the fallback with no step 1 lookup |
The sentence reads "Another word starts at step 1; if they only pick
none, go to step 4." The another-word clause comes first, and "only"
keeps the fallback clause to a reply that brings no word. Checked
against `packages/mcp/src/mcp-server-runtime.ts#DATASET_SELECTION_RULE`
on `main` (`d1ebe86dd3`, unchanged since the merge base): "look for a
governed metric first: call list_datasets with the question's business
words" is step 1's call, and "No match and no candidates: fall back"
stays the only way into the fallback for a word. |
| S1, budget | Sentence +36 bytes; one more restatement cut, -41 bytes
(the second step 1 item in the list above). 7505 to 7500 priced bytes.
No raise, and the row is not edited. |
| S1, served copy and changeset |
`packages/mcp/src/ask-skill.generated.ts` regenerated; the changeset now
states the three routes, counts four cuts, and reads "rule 1, rule 2 and
rule 4 applied to the user's reply; no rule is added". |
| S1, eval ("welcome and not owed") | Case 19 added for the another-word
reply. |
| N1: step 4 for a user who declines every matched measure | Accepted as
written by the record; no change. |
| N2: 速读 lines 1 and 3 ran two sentences each; line 4 asked for approval
once the reviews pass | Lines 1 and 3 are one sentence each. Line 4 asks
for approval only once the contract review has no open finding on the
latest head. |
## Skills size readings
| Reading | Before (`cceb5c626d`) | After (`fe8707ed6c`) |
|:--|--:|--:|
| `skills/objectstack-ask/SKILL.md` lines | 126 | 128 |
| `skills/objectstack-ask/SKILL.md` bytes | 7528 | 7520 |
| `skills/objectstack-ask/SKILL.md` priced tokens (ceiling) | 1877
(1877) | 1875 (1877) |
| All 14 `SKILL.md` files, lines summed | 4939 | 4941 |
| All 14 `SKILL.md` files, priced tokens summed | 64990 | 64988 |
| Whole shipped bundle, tokens (the ratchet's own total) | 284661 |
285584 |
The file is two lines longer and eight bytes shorter than on `main`:
7500 priced bytes, `ceil(7500 / 4)` = 1875, two tokens under its ceiling
of 1877. The previous head read 128 lines, 7525 bytes and 1877 tokens;
this round adds no line. The row is not lowered here: the claim names
the ratchet script for a measured raise only, so the two tokens of
headroom are reported and left to the seat. The bundle total grows by
923 tokens: the eval fixture grows by 925 (5407 to 6332), which the
ratchet measures and does not ratchet, and the skill shrinks by 2. No
other file under `skills/` changes.
## Tests
All at `fe8707ed6c`, each heavy run under the shared verify lock.
- `pnpm --filter @objectstack/mcp test`: Test Files 79 passed (79),
Tests 1442 passed (1442), `VERDICT command-exit 0`.
- `pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2
src/skill-single-source-34686.test.ts` (the generated page and the
served section equal the skill): 1 file, 3 passed, `VERDICT command-exit
0`.
- `pnpm --filter @objectstack/mcp typecheck`: `VERDICT command-exit 0`,
"check:test-typecheck: OK".
- `pnpm --filter @objectstack/scenarios skill-evals --skills
objectstack-ask --dry-run`: exit 0, "objectstack-ask: 19 case(s)" (the
strict loader read the file and refused nothing).
- No ablation: the diff changes text, a generated copy and a fixture,
and no behaviour a test pins.
## Acceptance notes
- **The door strings say nothing different about the reply turn.** Read
on `main`:
`packages/mcp/src/mcp-server-runtime.ts#DATASET_SELECTION_RULE` and
`packages/services/service-analytics/src/dataset-tools.ts#LIST_DATASETS_DESCRIPTION`
stop at the question; the `nextStep` notes of
`packages/services/service-analytics/src/dataset-next-step.ts` say
"compute nothing until they answer" and "ask the user which one is meant
before using it". None states the step after the answer, and none
contradicts the new paragraph. The initialize rule's first sentence is
what the another-word clause applies to the reply.
- **"By its exact name" covers both routes the dispatch named.** The
client either uses the dataset and measure names the first
`list_datasets` answer listed for the picked option, or calls
`list_datasets` again with the picked label as the term, which then
equals that one measure. The sentence does not choose between them; eval
18's expected output accepts both.
- **"Another word" also covers the grouping row's open question.** "Ask
which number is meant" lists no options, so a reply to it that names a
number word is another word and starts at step 1. The record's design
reading says the same clause covers it.
- **A reply that picks an option and adds a word gets both halves.** The
picked option is computed; the added word (a grouping, or a second
metric) starts at step 1.
- **The cut under the step 2 table moves a guard, it does not drop it.**
"use none of that word's candidates until the user answers" was added on
a contract review of an earlier change, for a `nextStep` note that
answers one measure and asks about another word. "do both" stays where
it was; the guard is now the first half of the new paragraph, two
paragraphs below, and applies to every question, not only to that note.
- **The step 1 cut removes a repeated reason, not the instruction.** A
term is still "kept whole", with the same example; the reason a
fragment's match does not count is the bullet's earlier sentence about a
word the client supplied.
- **Eval cases 18 and 19 are not graded here.** No model round was run
for them: NOT MEASURED, the eval round's reading.
- **Governed.** `skills/**` is Tier H. This PR stays a draft; its author
never readies, queues or arms it.
- **Claim and file surface.** Claimed by comment 7031798732 on the card.
The four changed files are all inside the claim's list.
`scripts/check-skills-token-ratchet.mjs` is in that list for the raise
path only and is not changed.
- **Base.** The branch is three commits behind `main` (`d1ebe86dd3`) and
is not merged with it: no conflict is reported, and none of those
commits touches the four files or the file that holds the door rule. One
of them changes `packages/mcp` beside the generated page (`skill-md.ts`,
which renders it, and the tool list); no test on `main` quotes a
sentence this PR changes. The local runs above are on the branch tree;
the merge ref is CI's reading. The derived gate list was read from this
tree, and the tool names two of its own inputs as changed on `main`
since (`scripts/pm/label-write.mjs`,
`scripts/pm/record-recognisers.mjs`).
- **Overlap.** `node scripts/pm/overlap-check.mjs` at `fe8707ed6c`:
"VERDICT clean exit 0", against `origin/main` `d1ebe86dd3` and 1 PR head
(#35129, which shares the skill file and merges cleanly).
## Verification
Read first, by risk:
1. `skills/objectstack-ask/SKILL.md`, the new paragraph at the end of
step 2: does "Another word starts at step 1; if they only pick none, go
to step 4" route each reply the way D3 rules 1, 2 and 4 do?
2. `skills/objectstack-ask/SKILL.md`, step 1's second bullet: the "kept
whole" example without its repeated reason, and the earlier cut beside
it.
3. `skills/objectstack-ask/SKILL.md`, the paragraph under the step 2
table and the "Only a dimension matches" row: "do both." ends there, and
the guard it carried sits in the new paragraph.
Two-minute check: `node scripts/check-skills-token-ratchet.mjs && node
scripts/gen-mcp-ask-skill.mjs --check`. Expect both to exit 0, the ask
row to read `1875 / 1877 (-2)`, and the generator to say the page "is
current with skills/objectstack-ask/SKILL.md".
<details><summary>Generators and skill gates</summary>
- `node scripts/gen-mcp-ask-skill.mjs --check`: exit 0,
"packages/mcp/src/ask-skill.generated.ts is current with
skills/objectstack-ask/SKILL.md."
- `node scripts/check-skills-token-ratchet.mjs`: exit 0,
"skills/objectstack-ask/SKILL.md is 1875 tokens (ceiling 1877; headroom
2)", "60 authored bundle file(s) within their ceilings".
- `pnpm --filter @objectstack/spec run check:skill-docs`: exit 0, "Skill
docs in sync".
- `pnpm check:skill-links`, `pnpm check:skill-identifier-liveness`,
`pnpm check:skill-compatibility`, `pnpm check:skill-frame-sync`: exit 0
each.
</details>
<details><summary>Derived gate list, run locally at fe8707e</summary>
- `node scripts/pm/dispatch-gates.mjs --commands` (no paths; the tool
reads the change set from the merge base `cceb5c626`): 71 commands.
- Each run once with its exit code recorded before any pipe: 70 exit 0,
1 exit 3.
- NOT MEASURED: `pnpm check:dual-build-cjs-loads`, exit 3, "PREREQUISITE
NOT MET". It reads every package's `dist/`, and only the closure
`@objectstack/mcp` needs was built here; CI runs this gate.
- `node scripts/pm/dispatch-gates.mjs --ran`: exit 0, "71 derived
famil(ies) accounted for — 70 run, 1 NOT-MEASURED (1 DERIVED from a
recorded exit 3)".
- Among the 70: `check-changeset-no-major`, `check-empty-changeset`,
`check-adr-0087-registration`, `check:nul-bytes`,
`check:issue-citations`, `check:doc-authoring`, `check:published-files`,
`check:pm-governed-merges`, `check:cross-package-test-inputs`.
</details>
<!-- signed: repo:objectstack#4 · os-elon-musk ·
session_016WV4d1Dv2AVwokgRqfdKp2 -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0189004 commit d6ce9ba
4 files changed
Lines changed: 51 additions & 14 deletions
File tree
- .changeset
- packages/mcp/src
- skills/objectstack-ask
- evals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
173 | 193 | | |
174 | 194 | | |
175 | 195 | | |
0 commit comments