Repository navigation
Commit 3b4ffb2
docs(skills): objectstack-ask iteration 2: trigger on every records question, ask back with no figure of its own, whole terms, hidden record kinds declined (#35038)
<!-- 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 #34996
Clause-②: no
Metadata-protocol: none
Served-tier: TIER_DEFAULT
## 维护者速读
- 改了什么:`objectstack-ask` 技能(及由它生成的 `GET /mcp/skill`
页面)四处措辞:凡用应用记录回答的问题都先加载本技能(含「一共」「so
far」);术语按用户原名词短语整段传;反问不写自己的数字(计数、合计、选项编号),选项按标签列出、描述原文引用;看不到的记录类型直接说明看不到,不拿关联对象顶替。
- 为什么改:问数迭代环第一组「保留」改动,travel_expense 问数轮实测 datasets 17/25 → 25/25,问数
25/25 不变,泄漏 0。
- 风险与回滚:只动发布技能文本与其生成副本,无代码路径变化;token 天花板按裁决「A:先削重复,余额按实测提高」先削两句重复再按实测抬
1491 → 1740;回滚即 revert 本 PR。
- 先看:`skills/objectstack-ask/SKILL.md`(第 2 步表格下的反问段与第 4
步首条)、`scripts/check-skills-token-ratchet.mjs`(抬升行与注释)、`skills/objectstack-ask/evals/metric-selection-fallback.json`(新增
10、11 号用例)。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs && node
scripts/gen-mcp-ask-skill.mjs --check`,预期两者均以 0 退出,ask 技能读数 1740 / 1740。
- 需要你做的:Tier H 落地需维护者批准(或 GOVERNED_APPROVERS 的 APPROVED 审核)后由席位落地。
## What changes
`skills/objectstack-ask/SKILL.md` takes the measured iteration-2 text
(`/mnt/project-files/issue-34869/skill-iter/iter2/SKILL.v2.md`), applied
as its diff onto current `main` (the file is byte-identical to its state
at `99bd2203`, so the patch applied unchanged; the result was
byte-identical to `SKILL.v2.md` before the cuts below):
- (a) The description triggers on EVERY question answered from the app's
records, before the first data tool call, even one that names no metric:
"what has been claimed, spent, sold or paid so far", with "how much",
"so far" and 「一共」 added to the trigger words.
- (b) An asked-back reply states no figure of its own (no count, total
or option number): each option is named by its label in a bullet and its
description is quoted as written; it asks only about matches or
candidates for the user's own words, and a word with no match and no
candidates goes to step 4 instead. (L1 should-fix S1, head `b431dc04`:
the measured text said "without any numerals at all ... leave out
counts, dates and years", which forbade quoting a description that
carries a date or a number; narrowed to the figure the reply would add,
measured as iteration 6 below, same token count. Follow-up `32ba36e0`
(L1 S1′) brings the changeset, eval 10's expected output and the ceiling
comment (6979 / 6959 bytes) in line; no skill or ceiling change.)
- (c) A `list_datasets` term is the user's noun phrase kept whole
("travel budget", not "travel" and "budget") and without verbs, time
words and question words ("trip days", not "trip days requested").
- (d) Step 4 opens with: a record kind no listed object or dataset shows
is declined (it may be hidden), never answered from a different object
that merely links to it.
Token ratchet, raise path the standing ruling 「A:先削重复,余额按实测提高」 (ruling
record 6513306068, letter B). PAID DOWN FIRST, two restatements cut from
step 2's `candidates` row, each keeping its other home:
| Cut | Surviving home |
|:--|:--|
| ", and never treat a candidate as a match" | step 1: "A candidate is
not a match." |
| "Compute nothing yet." | the paragraph under the table: "no figure,
and no tool call until the user answers" |
These two cuts are the only wording outside the measured text, forced by
the ratchet. The area measured the text with the cuts as iteration 5:
same scores as v2's rounds (the candidates row the cuts touch is the one
`dq_claimed_so_far` exercises, 5/5). Arithmetic in priced bytes (20-byte
stamp line excluded): the text adds 1057 bytes, the cuts remove 61, and
the reviewed narrowing of the ask-back sentence (S1, `b431dc04`) adds 2:
5961 -> 6959 priced bytes (file 6979 bytes), `ceil(6959 / 4) = 1740`;
the row moves 1491 -> 1740 (+249), the measured remainder only, pinned
AT the measurement, zero headroom; no other row moves.
Also in the diff:
- `packages/mcp/src/ask-skill.generated.ts` regenerated with `node
scripts/gen-mcp-ask-skill.mjs` (never hand-edited);
`content/docs/ai/skills-reference.mdx` regenerated with `pnpm --filter
@objectstack/spec gen:skill-docs`.
- Two eval cases in the file's existing shape: id 10, "What has been
claimed so far?" (asked back on a lone candidate, with no figure of its
own and the description quoted as written), and id 11, a trip-request
count where no listed object is a trip request (declined, not counted
through the `trip_request` lookup on `expense_claim`).
- `.changeset/34996-ask-skill-iter-2.md`: `@objectstack/skills` and
`@objectstack/mcp` patch, as the earlier ask-skill PRs did.
## Measurements
travel_expense ask mode, with-skill only, 5 reps, template `b7ab31a7`,
the model and medium effort the round record names, subscription login,
`--packages workspace` at main `99bd2203` (the published 18.5.0 door
serves no `list_datasets` `candidates`), grader before the ordinal/date
grader change of #34997. Records under
`/mnt/project-files/issue-34869/skill-iter/`, logged on #34869.
| Iteration | Text | 问数 | datasets | metric-selected | asked-back |
fallback-labelled | ops runnable | leaks |
|:--|:--|:--|:--|:--|:--|:--|:--|:--|
| 0 | main skill unchanged | 25/25 | 17/25 | 10/10 | 3/10 | 4/5 | 2/3 |
0 |
| 1 | a-d, whole-phrase wording | 25/25 | 24/25 | 9/10 | 10/10 | 5/5 |
2/3 | 0 |
| 2 | v2 (measured text, before the ratchet cuts) | 25/25 | 25/25 |
10/10 | 10/10 | 5/5 | 2/3 | 0 |
| 3 | v2 again (noise check) | 24/25 | 25/25 | 10/10 | 10/10 | 5/5 | 2/3
| 0 |
| 5 | v2 with the two ratchet cuts (head `7f6156c2`) | 24/25 | 25/25 |
10/10 | 10/10 | 5/5 | 2/3 | 0 |
| 6 | **this PR's exact text** (head `b431dc04`: iteration 5 with the
narrowed ask-back sentence), grader rev 2 (live run on #35023's head
`090a48eb`, the merged code) | 25/25 | 24/25 | 10/10 | 9/10 | 5/5 | 2/3
| 0 |
Iteration 6 ran live on #35023's head `090a48eb`, the code that merged
as `339c2f42`, so its graders are rev 2; the score equals iteration 5
overall. Its one datasets miss is `dq_travel_spend` rep 3: the reply
asks back correctly (lists both spend measures, no figure,
「…我不替你选,请确认你要哪一个:」) but `asked-back:asks` accepts `请确认` only at the
start of the text or after `.。!!` or a newline, not after a full-width
comma, so it reads as not asking. That is a grader false negative, filed
as #35058, not a skill miss.
**Regraded on grader rev 2.** Every recording above replayed on main's
grader after #35023 merged (`--driver recorded:`, same turns and same
replies, only the grade changes; build worktree `090a48eb`, records
under `iterN/regrade-rev2/`):
| Iteration | 问数 | datasets | metric-selected | asked-back rev 2 |
fallback-labelled | ops (replay) |
|:--|:--|:--|:--|:--|:--|:--|
| 0 | 25/25 | 19/25 | 10/10 | 5/10 | 4/5 | 2/2 measured, 4 not measured
|
| 1 | 25/25 | 24/25 | 9/10 | 10/10 | 5/5 | 2/2 measured, 4 not measured
|
| 2 | 25/25 | 25/25 | 10/10 | 10/10 | 5/5 | 2/2 measured, 4 not measured
|
| 3 | 24/25 | 25/25 | 10/10 | 10/10 | 5/5 | 2/2 measured, 4 not measured
|
| 4 (v3, not kept) | 25/25 | 25/25 | 10/10 | 10/10 | 5/5 | 2/2 measured,
4 not measured |
| 5 | 24/25 | 25/25 | 10/10 | 10/10 | 5/5 | 2/2 measured, 4 not measured
|
| 6 (live, rev 2) | 25/25 | 24/25 | 10/10 | 9/10 (#35058) | 5/5 | live
2/3 |
On rev 2 the baseline's asked-back reads 5/10 (was 3/10:
`dq_claimed_so_far` rep 2 and `dq_travel_spend` rep 1 were failed only
for option numbers, "1" and "1, 2, 3", which the old grader counted as
figures), so the kept change set moves datasets 19/25 -> 25/25 and
asked-back 5/10 -> 10/10. Iteration 4's v3 regrades from 24/25 to 25/25,
a tie with v2, so it stays not kept. The replay's operation column
counts only the operations whose recorded writes replay; a filing's
later turns name a row the replay created, which #35048 fixes, so the
live column (2/3, the submit defect below) stays the operation score.
The operation miss is `file_and_submit_from_text`: on workspace packages
the filing applies, then the build's own `demotravel_submit_claim`
answers HOOK_ABORTED (it passes `status` as an update option); it is
fixed with the fresh verified build (#34920 / #34896), and #35025
changes the card's line-shape check. Iteration 3's 问数 miss
(`department_budgets` as dept_manager: never described Department) and
iteration 5's (as employee: `travel_budget` is withheld, the reply said
"no budget field") are left for the next text batch (#35004). Seed
173/757 (#34897, PR #34985): 8 questions and 3 operations are
unmeasured.
## Tests
<details><summary>Readings (head 7f6156c; re-run at b431dc0 where
marked)</summary>
- `pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2
src/skill-single-source-34686.test.ts`: Test Files 1 passed (1), Tests 3
passed (3); re-run at `b431dc04`: 3 passed (3).
- `pnpm --filter @objectstack/mcp test`: Tests 1252 passed (1252); `pnpm
--filter @objectstack/mcp typecheck`: exit 0 (`check:test-typecheck:
OK`).
- Eval assertions checked by script: every `must_contain` is in
`expected_output`, no `must_not_contain` is in it, ids 1-11 distinct;
`loadSkillEvalCatalog('skills')` from `packages/qa/scenarios` loads 11
`objectstack-ask` cases with no refusals.
- No ablation: the diff changes skill text, a generated module, an eval
file and a ratchet row, and no tested behaviour.
</details>
## Verification
<details><summary>Gates (head 7f6156c)</summary>
- Closure build under the verify lock: `pnpm --workspace-concurrency=2
--filter '@objectstack/lint...' --filter '@objectstack/client-react...'
--filter '@objectstack/mcp...' build`, VERDICT command-exit 0.
- `node scripts/pm/dispatch-gates.mjs --commands`: 112 derived families,
all run; `--ran` with exit codes: 110 run, 2 NOT MEASURED (exit 3), 0
unrun.
- NOT MEASURED: `pnpm check:dual-build-cjs-loads`, reason: needs a full
`pnpm build`; `node scripts/check-plugin-teardown-shape.mjs
--self-test`, reason: shallow checkout cannot read its pinned
positive-control commit. Both left to CI.
- `node scripts/check-skills-token-ratchet.mjs`: exit 0,
`skills/objectstack-ask/SKILL.md is 1740 tokens (ceiling 1740; headroom
0)`; `--self-test` exit 0. Re-run at `b431dc04`: still 1740 / 1740,
headroom 0.
- `pnpm --filter @objectstack/spec run check:skill-docs`: exit 0;
`check:skill-refs`: in sync; `node scripts/gen-mcp-ask-skill.mjs
--check`: clean; all three re-run at `b431dc04`: in sync, clean.
- `node scripts/pm/overlap-check.mjs --branch=HEAD`: VERDICT clean
(origin/main merges cleanly; the Version Packages PR shares the skill
file and merges cleanly).
- `node scripts/pm/check-governed-merges.mjs --branch
claude/issue-34996-ask-skill-iter-2`: GOVERNED, Tier H (`skills/**` x2).
</details>
<details><summary>Size readings</summary>
- `skills/objectstack-ask/SKILL.md`: 101 -> 115 lines; 1491 -> 1740
tokens.
- All 12 published `SKILL.md`: 4730 -> 4744 lines.
- Ratcheted authored total: 191184 -> 191433 tokens (+249). Eval file:
95 -> 115 lines, 3071 -> 3693 tokens (unpriced).
</details>
## Acceptance notes
- One line of the measured text runs past the file's usual wrap (step
2's paragraph, "instead of asking about some other word's matches.
`partial: true` ..."); it is kept as measured rather than re-wrapped.
- The first measurement table is on the grader before #34997, except
iteration 6; the regraded table is on rev 2 (merged as `339c2f42`). The
replay operation counts stay labelled as such until #35048 lands.
<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufziH9rnXEpD9ne7yFhD -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 301b7c1 commit 3b4ffb2
6 files changed
Lines changed: 94 additions & 12 deletions
File tree
- .changeset
- content/docs/ai
- packages/mcp/src
- scripts
- 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 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
41 | | - | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
| |||
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1737 | 1737 | | |
1738 | 1738 | | |
1739 | 1739 | | |
1740 | | - | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
1741 | 1759 | | |
1742 | 1760 | | |
1743 | 1761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
54 | | - | |
| 60 | + | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
59 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
| |||
74 | 84 | | |
75 | 85 | | |
76 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
77 | 91 | | |
78 | 92 | | |
79 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
93 | 113 | | |
94 | 114 | | |
95 | 115 | | |
0 commit comments