Repository navigation
Commit 850d240
fix(skills): a unit-of-measure request reaches the unit rules, and five eval cases stop failing a right answer (#39326)
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgNxfAEdS4c4yffrJ1xgKCUx)_
Fixes #38939
Fixes #38941
Claim for this branch: #38939 comment 7377768555, #38941 comment
7377782739
Clause-②: no
Metadata-protocol: none
repo:objectstack@os-bill · os-bill · session_01Utp6CarceUVwpaqnqVhFVn
## 维护者速读
- 用户能看到什么变化:让 AI 给产品加「计量单位」字段时,它现在会按平台的单位规则来写,不再写成普通文本;另有五道技能评测题换了判分条件。
- 为什么做:属于技能发布前评测的收尾,替做评测的人解决「答对被判错」和「单位字段答错」两件事。
- 出错会怎样:最坏是这五道题判分偏松,或数据技能入口多出一句提示;不影响任何运行中的应用,撤回本改动即可复原。
- 要你做什么:这是对外发布的技能包,需要你审阅后批准。
## What changes
**The unit-of-measure routing (the first card).**
`skills/objectstack-data/SKILL.md`, one row of the "Where to go" table:
"units of measure (`unitConfig`)" becomes "a unit of measure or `uom`
(`unitConfig`, never free text)". With the old phrase, a request to add
a `uom` text field was answered as a plain text field in 2 of 3 turns,
and neither of those turns opened `rules/field-types.md`. The row now
carries the request's own word and says the plain answer is wrong. No
other skill text changes.
**Five eval cases (the second card).** Only `assertions` and, in three
cases, `expected_output` change. Every prompt is byte-identical.
| case | before | after | the right answer that failed | the wrong shape
that still fails |
|:--|:--|:--|:--|:--|
| data `objects-fields-relationships` 13 | forbids `ownership: 'user'`
written as a key (four endings) | dropped; forbids a field keyed
`assignee` or `assigned_to`, helper form (`assignee: Field.`) or literal
form (`assignee: {`) | an object that writes the default out with a
comment, "负责人 = owner_id" | an owner lookup (`reference: 'sys_user'`,
`reference: 'user'`) or a hand-added assignee field |
| automation `integrations-declared` 1 | requires `defineConnector` and
`type: 'api'` | any of `defineConnector`, `declared connector`; any of
`type: 'api'`, `` `api` flow `` | a prose plan: "one declared
connector", "an `api` flow (recipe 4)" | a plan with no declared
connector or no callback flow meets no member; the plugin and
inline-secret shapes are still forbidden |
| ui `analytics-inline-vs-dataset` 2 | forbids `dateGranularity`; a
`note` calls it a review cue | forbid and note dropped; requires any of
`stored field`, `stored rolling`, `rollup field`, `app code` | one that
escalates to a stored rolling field and buckets that field by day | a
date bucket passed off as the window, "the revenue stored on each order"
included, meets no member |
| ui `views-apps-actions-pages` 6 | requires `fieldGroups`,
`master_detail` | any of `fieldGroups`, `field group`; any of
`master_detail`, `master-detail`, `Master-Detail`, `relatedList: '`;
forbids `formType="wizard"`, `formType='wizard'`, `defineForm({` | one
that names the field group with `relatedList: 'invoice_line'` and says
"master-detail child" (the bundle never writes `master_detail`) | the
React form with `formType` set to wizard, or a `defineForm({` item,
written as the build or as an option; a screen flow. Not caught: a
hand-rolled stepper page. `type: 'wizard'` is not forbidden, because
right answers write it while warning that a wizard form draws no lines |
| ui `views-apps-actions-pages` 23 | requires `perRecord`,
`'selection'`, `ctx.record`; forbids `succeeded:`, `{ succeeded`, `{
failed` | any of `perRecord`, `succeeded: [`, `succeeded, failed`, `{
succeeded`; any of `ctx.record`, `id, message`, `message: e`; forbids
`id, error`, `succeeded.push({`, `throw new Error(JSON`, `resultDialog:
{`, `bulkActions: [` | the aggregate body that catches each row and
resolves a `BulkActionResult`, which `rules/actions.md` teaches and
`packages/spec/src/ui/bulk-action.zod.ts` defines | counts with no
well-formed `failed` list, one list, a JSON rethrow, `{ id, error }`, a
reason under another key, objects pushed into `succeeded`, `perRecord`
in prose with no handed row, neither list. Not caught: objects mapped
(not pushed) into `succeeded`, or a count there, when the `failed` list
is well formed. Not expressible in an all-of-any-of grammar: the
per-record branch no longer requires `'selection'`, and an answer mixing
one branch's token with the other's can pass |
Case 13 is settled in the case; the data `SKILL.md` owner row is
unchanged. Case 23 is settled on the case side (agreed with the seat,
2026-12-03 12:12Z; no ruling record): `rules/actions.md` is not touched.
Its `expected_output` now names both forms.
**Token ratchet.** `scripts/check-skills-token-ratchet.mjs`, the
`skills/objectstack-data/SKILL.md` row: 2233 to 2240, pinned at the
measurement. Raise path: the standing note 7216253348 on the ratchet
card for a remainder of at most 10 tokens (「后续遇到这种问题,能适当放宽token 的限制」).
The entry stays inside its 9 KB budget.
**Skill size readings.**
| | before (`f927afa48a`) | after |
|:--|:--|:--|
| `skills/objectstack-data/SKILL.md` | 165 lines, 8958 bytes, 2233
tokens | 165 lines, 8985 bytes, 2240 tokens |
| every `SKILL.md` under `skills/` | 2122 lines, 119434 bytes | 2122
lines, 119461 bytes |
## Tests
**Re-run with the skill.** The with-skill arm of `skill-evals`, rebuilt
by hand from `arms.ts` and `grade.ts` (same argv, same bundle-only
directory without `evals/`, same environment removals, same literal
grader), sonnet at medium, 3 reps per case, Claude Code 2.1.335. The
runner itself was not used: it needs an install and a build this
container did not have.
| case | on main `f927afa48a` | on this branch (head `716470aa`; objects
22 and integrations 1 at `19eb7732`, their text unchanged since) |
|:--|:--|:--|
| data objects 22 (`uom`) | 1/3 | 3/3 (and 6/6 in a second run of the
same text) |
| data objects 13 | 1/3 | 3/3 |
| automation integrations 1 | 2/3 | 3/3 |
| ui analytics 2 | 0/3 | 3/3 |
| ui views 6 | 0/3 | 3/3 |
| ui views 23 | 0/3 | 0/3 |
Recorded answers regraded against the head's assertions: the main-side
round reads 3/3 for objects 13, integrations 1 and analytics 2, 1/3 for
views 6 and 0/3 for views 23; the first branch round reads 3/3, 3/3,
3/3, 2/3 and 1/3. Objects 22 does not move on a regrade (1/3 on main):
its move is the routing row.
Views 23 stays red at this head, and each red is a wrong answer, not a
false red: all three wrote a `failed` entry the contract does not parse
(`{ id, error }`, `{ id, reason }`) or pushed objects into `succeeded`.
The case will stay mostly red until the skill teaches the entry shape
(Acceptance notes).
**Graded probes, no model.** Each case's reference answer passes its new
assertions (5 of 5). Seven of the eight case 23 probes of contract
review 7378829491 fail at this head; the eighth, objects mapped into
`succeeded` beside a well-formed `failed` list, still passes (delta
review 7379033136, N1), as do a count in `succeeded` beside a
well-formed `failed` list and a rethrow that attaches the lists with
`Object.assign`. Its probes also fail for analytics 2 (the bucket with
"stored on each order"), case 13 (`assignee: { type: 'user' }`) and
views 6 (`formType='wizard'`). Three right case 23 answers pass: the
aggregate with `{ id, message: e.message }`, the same answer adding the
warning "the key is message, not error", and the per-record form.
**Gates run locally:** `node scripts/check-skills-token-ratchet.mjs` (61
files within their ceilings), `node scripts/check-skill-links.mjs` (283
links resolve), `node scripts/check-skill-identifier-liveness.mjs` (OK).
The four eval files parse as JSON. Every other family is left to CI.
## Acceptance notes
- **views 23, a skill-text gap.**
`skills/objectstack-ui/rules/actions.md` names `BulkActionResult` but
not its entry shape. Seven of nine aggregate answers across the three
rounds wrote a `failed` entry keyed `error` or `reason`, or objects in
`succeeded`; the contract is id strings in `succeeded` and `{ id,
message }` in `failed`, and a value that does not parse is reported as
unreadable. The other two left the entries open and said to read the
type; one of those passes at this head and one does not. The bullet is
the one the open selection-bar card also edits, so it is not changed
here. Class: skill text. Reach: any agent following the ui skill for a
bulk action with per-row outcomes.
- **views 6, a skill-text gap.** For a request that says "stepped",
three of nine answers offered a `kind: 'react'` wizard page beside or
above the field-group form. The skill says the field group comes "before
any custom page" but not that steps are the form's sections. Class:
skill text. Reach: any agent asked for a stepped parent and line-item
form.
- The `read` count in my records undercounts file reads in some turns (a
passing objects 22 answer quotes `rules/field-types.md` while the record
lists no read). Verdicts and answers are unaffected; I make no claim
here about which files a turn opened.
## Verification
- Read first: the "Where to go" row in
`skills/objectstack-data/SKILL.md` (the only shipped skill text that
moves), then case 23 in
`skills/objectstack-ui/evals/views-apps-actions-pages.json` (the one
case whose reference answer widens), then the ratchet row.
- Two minutes: `node scripts/check-skills-token-ratchet.mjs` prints "61
authored bundle file(s) within their ceilings".
<!-- signed: repo:objectstack@os-bill · os-bill ·
session_01Utp6CarceUVwpaqnqVhFVn -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 68e76fa commit 850d240
7 files changed
Lines changed: 49 additions & 18 deletions
File tree
- .changeset
- scripts
- skills
- objectstack-automation/evals
- objectstack-data
- evals
- objectstack-ui/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 | |
|---|---|---|---|
| |||
1087 | 1087 | | |
1088 | 1088 | | |
1089 | 1089 | | |
1090 | | - | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
1091 | 1104 | | |
1092 | 1105 | | |
1093 | 1106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
| 22 | + | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
227 | | - | |
| 228 | + | |
228 | 229 | | |
229 | 230 | | |
230 | | - | |
231 | | - | |
| 231 | + | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| |||
0 commit comments