Repository navigation
Commit ceb5cdf
docs(skills): teach the two existing ways to make an ambiguous dataset word ask back (#38342)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4Uu4BDY5KrntKbjvrr3aMjZ7V)_
Fixes #38263
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:给应用配置问数指标的人和
AI,现在能从技能和文档里学到怎样让有歧义的业务词(比如「逾期」「最大客户」)被反问,而不是被平台猜一个;平台行为不变。
- 为什么做:你对「给指标加一个声明歧义的新配置项」那张卡的决定是先不加,先把现有的两种办法写进说明,这是那一步。
- 出错会怎样:最坏是说明里某句话和平台实际做法对不上,作者照着配了却没有被反问;只改文字,可以直接撤回。
- 要你做什么:技能文件改动需要你批准合并。
## What changes
Text only. No key, schema, ADR or behaviour changes. This carries out
ruling record 7237969082 on #38079 (no new key; the two existing ways go
into the author guidance, only the first taught as guaranteed).
- `skills/objectstack-ui/rules/dashboards.md`, the vocabulary comment of
the dataset example (where an authoring agent picks `synonyms` and
`description`): a word with two readings that the AI must ask about is a
synonym of a measure in each of two datasets, asked whenever the asker
can read both. Inside one dataset a repeated synonym is refused, so the
word goes inside each reading's label or synonym (`overdue invoices`,
`overdue tasks`); it then equals neither and the platform MAY offer both
as candidates to ask about. "Not guaranteed: an exact match on a
readable member suppresses them."
- `content/docs/data-modeling/analytics.mdx`: a new section "A word with
two readings" after "Key rules", with a two-row table, a type-checked
two-dataset example, and the limits of the one-dataset way (an exact
match anywhere wins; which members are near is the platform's rule and
the list is capped; candidates that are all dimensions are not asked
about; a longer phrase or Chinese text without word breaks reaches the
readings as candidates, not as a match). The "Give every member its
vocabulary" rule gains a pointer to it.
- `.changeset/38263-ambiguous-word-ask-back.md`: `@objectstack/skills`
patch. No package ships `content/docs`.
**Token ratchet** (`scripts/check-skills-token-ratchet.mjs`): not
edited. `dashboards.md` sat at its ceiling with zero headroom (25092
bytes, 6273 tokens) and is 25092 bytes after. The 477 added bytes are
paid by cuts in the same file:
- the sentence after "can a dataset express this?" that restated it and
the table under it ("The shape is already fixed (always a dataset), so
what you decide is whether the data need fits the dataset envelope, and
if not, which lower layer to escalate to.");
- the date-granularity "Rule of thumb" bullet (general advice, no
platform fact);
- three asides in the drilldown bullets ("(no label→id guessing)",
"completing the group → records → record chain", "The in-place drawer is
the default (peek without losing the dashboard).").
### Skills readings (lines / bytes / tokens)
| | before | after |
|:-|:-|:-|
| `skills/objectstack-ui/rules/dashboards.md` | 474 / 25092 / 6273 | 476
/ 25092 / 6273 |
| all `skills/*/SKILL.md` | 4956 / 263327 | 4956 / 263327 |
| all of `skills/**` | 23318 / 1228412 | 23320 / 1228412 |
## Tests
No runtime code changes, so no test file is added. Each taught behaviour
was read in the landed code and then measured with a scratch vitest file
(not committed) against
`packages/services/service-analytics/src/dataset-term-matcher.ts` and
`DatasetSchema`, on `objectstack-ai/objectstack` at 75bb971 (its
`packages/**` are `main` 4ebe9a1): 7 of 7 cases pass.
<details><summary>What the probe measured</summary>
1. The same synonym (`overdue`) on a measure of each of two datasets:
`matchDatasetTerms` answers two measure hits and
`findDatasetTermCandidates` answers none. Two measures for one word is
the `several_measures` decision in `dataset-next-step.ts` (the
question).
2. A reader admitted to only one of the two datasets: one hit.
3. A longer phrase (`overdue deliverables`) or unsegmented Chinese
(`逾期的交付物`) against those two datasets: no hit, both measures offered as
candidates.
4. One dataset whose two measures are labelled `Overdue invoices` and
`Overdue tasks` (synonyms `逾期发票`, `逾期任务`): `overdue` and `逾期` hit
nothing and both measures are offered as candidates (`candidates_only`).
5. The same, plus another listed member named exactly `overdue` (a
measure, then a dimension): no candidates at all.
6. The exact longer wording (`overdue invoices`): one hit, nothing to
ask.
7. `DatasetSchema` refuses the same synonym on two members of one
dataset ("Within one dataset a word answers to one member").
</details>
## Acceptance notes
- Branch `claude/project-thread-5pi6i5` is assigned by the harness, not
the repo's `claude/issue-N-…` convention.
- "Asked" means the platform's answer tells the model to ask:
`list_datasets` reports two measures for the word and its `nextStep`
sentence asks. How often a model then asks is what the cloud ask eval on
#38079 measures, not this PR.
- The skill sentence stays inside what the probe shows: with two
datasets, a phrase containing the word still reaches both readings (case
3), unless some readable member equals the phrase exactly.
- `skills/objectstack-ask/SKILL.md` is unchanged. It is the answering
side, and its step 2 table already states both cases ("One word matches
several measures, in one dataset or in two" and "A word with a measure
among its `candidates`").
- `content/docs/ai/connect-mcp.mdx` already describes the selection rule
for an MCP client and is outside the claim's file surface; unchanged.
- No eval case is added: `skills/objectstack-ui/evals/**` is outside the
claim's file surface. A case in `analytics-inline-vs-dataset.json` (two
readings of one word, expect the synonym on a measure in each of two
datasets) would exercise the new sentence; left to the seat.
- The docs page says the candidate list "is capped for each word"
without the number, so the page does not go stale when the cap moves.
## Verification
Two-minute check: `node scripts/check-skills-token-ratchet.mjs`, expect
exit 0 with `skills/objectstack-ui/rules/dashboards.md` 6273 / 6273.
Read first, by risk: `skills/objectstack-ui/rules/dashboards.md` (the
seven added comment lines, then the four cuts),
`content/docs/data-modeling/analytics.mdx` (the section "A word with two
readings").
<details><summary>Local gates at 75bb971</summary>
`node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack
--ran FILE` with each command recorded as `CMD :: exit N`: **71 derived,
70 run, 1 NOT-MEASURED, 0 UNRUN**; every run family exit 0, among them
`check-skills-token-ratchet.mjs` (and `--self-test`),
`check:doc-authoring`, `check:corpus-claim-drift`, `check:doc-anchors`,
spec `check:docs` / `check:skill-examples` (352 marked examples
type-check, the new docs block among them) / `check:liveness`,
`check-empty-changeset.mjs`, `check-adr-0087-registration.mjs --base
origin/main`.
- `check:skill-examples` first answered exit 3 (its client-react build
closure was missing); after `pnpm --filter
'@objectstack/client-react...' build` it was re-run alone, exit 0.
- NOT MEASURED: `check:dual-build-cjs-loads`, exit 3 (prerequisite not
met: it reads every package's `dist/`, and only the spec,
service-analytics and client-react closures were built). The diff
publishes skills text only.
- `scripts/pm/overlap-check.mjs --pr=38284,38224,38329`: clean against
`origin/main` and the three heads. The head of the #34770 resume branch
carries no change under `skills/objectstack-ui/` or to `analytics.mdx`.
- CI at 75bb971 when this was written: 29 success, 15 expected skip, 0
failed, 2 pending.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgWDE5EEgGsQJDWe9dJ
<!-- signed: repo:objectstack#2 · os-sales ·
session_01L6bhgWDE5EEgGsQJDWe9dJ -->
Co-authored-by: Claude <noreply@anthropic.com>1 parent ed70d23 commit ceb5cdf
3 files changed
Lines changed: 110 additions & 10 deletions
File tree
- .changeset
- content/docs/data-modeling
- skills/objectstack-ui/rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
126 | 210 | | |
127 | 211 | | |
128 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 63 | + | |
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
| |||
300 | 298 | | |
301 | 299 | | |
302 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
303 | 308 | | |
304 | 309 | | |
305 | 310 | | |
| |||
334 | 339 | | |
335 | 340 | | |
336 | 341 | | |
337 | | - | |
338 | | - | |
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
| |||
368 | 371 | | |
369 | 372 | | |
370 | 373 | | |
371 | | - | |
| 374 | + | |
372 | 375 | | |
373 | | - | |
| 376 | + | |
374 | 377 | | |
375 | 378 | | |
376 | | - | |
377 | | - | |
| 379 | + | |
378 | 380 | | |
379 | 381 | | |
380 | 382 | | |
| |||
0 commit comments