Skip to content

Commit 9d07723

Browse files
docs(skills): ask trigger cases, and automation sends a non-branching wizard to ui (#35857)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D4n2wzAmmp4Z6W5jsqtM2qx)_ Part of #34769 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感。发布的技能包多了一组"问数"技能的触发用例,自动化技能里多一句话,把不分支的分步表单指回界面技能。 - 为什么做:这是"技能按用户在做的事触发"那张卡的测量半场,上一半(改写六个技能的描述)已合并,这次补上前后对比的实测。 - 出错会怎样:只动了说明文字和测试用例,不影响任何运行中的应用;合并后可直接撤回。 - 要你做什么:看一眼下面的前后对比表。应加载的比例前后都接近满分(28/28 对 29/30),没有明显变高,是否按此关卡请你定。 ## What changes - `skills/objectstack-ask/evals/triggers.json` (new): six trigger cases. Four should load ask; the first is `objectstack-query` trigger case 3 word for word (a business question sent over MCP), the second asks for revenue by region last quarter over MCP, one is in Chinese, one asks for a top-ten list. Two should not load ask: an ObjectQL aggregation written inside a hook, and an ObjectQL filter written for a scheduled job. Both belong to `objectstack-query`. - `skills/objectstack-automation/SKILL.md`: one sentence under the flow-type table: a stepped form over one object that never branches is an `objectstack-ui` form view, `type: 'wizard'`. Checked against `FormViewSchema` in `packages/spec/src/ui/view.zod.ts` (`type` accepts `'simple'`, `'tabbed'`, `'wizard'`; a wizard is one gated step per section) and against the ui bundle's Form Views table. - `skills/README.md`, "Cross-skill routing": the screen-flows-vs-views bullet now draws the same line. A stepped form over one object that never branches is **ui** (`type: 'wizard'`). A screen flow that branches, or steps across several objects, is **automation**. This is contract review 7040518746 N2. - `skills/objectstack-ui/evals/triggers.json`: one more should-load case, a three-step wizard to create a lead. - `.changeset/34769-ask-trigger-cases-wizard-pointer.md`: `'@objectstack/skills': patch`. No description changes. `objectstack-query`'s description is untouched (see Measurement, S1). Delta `fe24787200..0943957` (contract review 7040518746): S1 scopes the automation sentence to "over one object". A non-branching straight-line screen flow across several objects stays a flow (ScreenSpec `'object-form'`, automation eval 9). N2 is the README bullet above. Ratchet on automation SKILL.md: 7038 / 7045, no row raised. Whole PR: 30 added, 3 deleted, net 27. Size, at `fe24787200`: | reading | before | after | |:--|--:|--:| | `skills/objectstack-automation/SKILL.md`, lines | 476 | 478 | | `skills/objectstack-automation/SKILL.md`, ratchet tokens (ceiling 7045) | 7008 | 7034 | | all `skills/*/SKILL.md`, lines | 4941 | 4943 | | bundle total, ratchet tokens (eval fixtures included, they are not ratcheted) | 285583 | 285967 | No ratchet row is edited. Whole PR: 27 lines added, 0 deleted (budget 40). The ask trigger file holds one case per line to stay inside that budget; the reader takes it (the dry run lists 6 cases and no refusal). ## Measurement Round: `/mnt/project-files/area-ai-seat/a4-A/evals/34769-triggers-20261120/` (`before/`, `after/`, `s1-head-to-head/`, `summary.md`). `skill-evals --triggers-only --model haiku --effort medium`, 1 repeat, Claude Code 2.1.329, served `claude-haiku-5-5`. Before is `--skills-from 18.6.0` (42 turns); after is this branch with `objectstack-ask` added (49 turns). Every planned turn ran. Each turn has only its own case's bundle installed. | bundle | before: loaded when it should | after: loaded when it should | before: false loads | after: false loads | |:--|--:|--:|--:|--:| | objectstack-automation | 3/3 (2 more ran out of turns) | 5/5 | 0/2 | 1/2 | | objectstack-data | 5/5 | 5/5 | 1/2 | 1/2 | | objectstack-formula | 5/5 | 5/5 | 1/2 | 0/2 | | objectstack-i18n | 5/5 | 5/5 | 0/2 | 0/2 | | objectstack-query | 5/5 | 4/5 | 1/2 | 0/2 | | objectstack-ui (cases 1 to 7) | 5/5 | 5/5 | 2/2 | 2/2 | | **six bundles, the 42 shared cases** | **28/28** | **29/30** | **5/12** | **4/12** | | objectstack-ui case 8 (new, wizard) | | 1/1 | | | | objectstack-ask (new) | | 4/4 | | 1/2 | - Loaded by a `Skill` launch on the 30 shared should-load cases: 22 before, 27 after. Loaded only by reading a bundle file: 7 before, 2 after. Every false load in both legs is by reading only. - Changed verdict: automation 3 and 4 (ran out of turns before, pass after), automation 6 (left alone before, read after: the one new false load), formula 6 and query 7 (false load before, left alone after), query 3 (loaded by reading before, not loaded after). - One repeat per case, so a one-case difference is inside what a second repeat could move. **S1, the business question sent over MCP.** The runner installs one bundle per turn, so it cannot show query loading instead of ask. Alone, ask loaded on that prompt by a `Skill` launch; alone, query loaded it by reading before and did not load after. In 12 extra turns with both bundles installed (the runner's argv, two prompts, 3 repeats, this branch's bundles and 18.6.0's), ask was launched 12 times and query was never launched or read. Ask does not lose the request, so query's description stays as it is here. `objectstack-query` trigger case 3 still expects query to load on that request and now fails; who owns that case is left to the seat. ## Verification At `fe24787200`. The diff touches no package source: no package test is owed and nothing is ablated (prose and eval fixtures only). - `node scripts/pm/dispatch-gates.mjs --commands`: 50 derived. 49 exit 0, among them `check-skills-token-ratchet` (60 authored bundle files within their ceilings), `check:skill-docs` (in sync), `check:skill-served-sections`, `check:skill-links` (270 links resolve), `check:skill-identifier-liveness`, `check:skill-compatibility`, `check:skill-frame-sync`, `check:doc-authoring`, `check:doc-formula-expressions`, `check:published-files`, `check:nul-bytes`, the changeset gates. NOT MEASURED: `check:dual-build-cjs-loads` (exit 3, prerequisite: needs every package built; only the eval runner's dependencies were built). Left to CI. - `node scripts/pm/overlap-check.mjs --branch=claude/area-a4A-34769-m`: clean, exit 0, against `main`, PR 35673 and PR 35129. - Both eval legs' `--dry-run`: 42 and 49 turns, no refused case. First to read: `skills/objectstack-automation/SKILL.md` (the one sentence a customer agent will read), then `skills/objectstack-ask/evals/triggers.json`. Two-minute check: `pnpm --filter @objectstack/scenarios skill-evals --skills objectstack-ask --triggers-only --dry-run` prints `objectstack-ask: 6 case(s)`. ## Acceptance notes - **Seat ruling (2026-11-20 12:47Z): #34769 stays open.** This round cannot show the Done-when: the before leg is at the should-load ceiling, and automation 6 is a new false load. The reason is the instrument. A trigger turn installs only its own bundle. That is filed as #35858, and #34769 will be re-measured once it lands. Query trigger case 3 and the "sent over MCP" clause go to follow-up #35859 (ask won the head-to-head 12/12 against 0/12). This PR lands the authoring: the ask trigger cases, the wizard pointer, and ui case 8. - The card's Done-when asks for a higher should-load rate after than before with no new false trigger. Measured: 28/28 before and 29/30 after on finished turns (28/30 and 29/30 when the two before turns that ran out of turns count as not passed); `Skill` launches 22 to 27; false loads 5 to 4, with one new (automation 6) and two gone. Not a clear rise on the pass rate; the before leg was at the ceiling because a turn's only installed skill is the one under test. - Ratchet headroom on `skills/objectstack-automation/SKILL.md` is 37 tokens on `main`. This PR uses 26. PR 35673 (draft) brings the same file to exactly the ceiling. The two merge without a text conflict, but together they are 26 tokens over: whichever lands second must pay by deletion. - The trigger reading counts any read under the bundle as a load. In an empty project a small model often searches the directory and opens a skill file, which is every false load seen here. - The S1 head-to-head turns are outside the runner; their raw streams are in `s1-head-to-head/`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: repo:objectstack#4 · os-elon-musk · session_016WV4d1ZJL93Kin2UHFXbFv --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent fac1e7d commit 9d07723

5 files changed

Lines changed: 30 additions & 3 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
`objectstack-ask` gains trigger cases (`evals/triggers.json`); `objectstack-automation`'s flow-type table sends a stepped form that never branches to an `objectstack-ui` form view, `type: 'wizard'`, and `objectstack-ui` gains that trigger case.

‎skills/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ A few common decision points where the right skill isn't obvious:
121121
- **Lifecycle hooks on data vs. business automation** — object-level hooks
122122
(`beforeInsert`, etc.) live in **objectstack-data**; cross-record orchestration,
123123
approvals, and scheduled work live in **objectstack-automation**.
124-
- **Screen flows vs. views** — interactive wizards / multi-step forms are
125-
**automation** (screen flows). Static record / list / dashboard surfaces are
126-
**ui**.
124+
- **Screen flows vs. views** — a stepped form over one object that never branches
125+
is **ui** (a form view, `type: 'wizard'`); a screen flow that branches, or steps
126+
across several objects, is **automation**. Static record / list / dashboard surfaces are **ui**.
127127
- **Any CEL expression** — load **objectstack-formula** alongside the host
128128
skill (data validations, automation guards, UI visibility).
129129
- **Kernel / plugin events vs. data lifecycle** — `PluginContext` lifecycle and
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"skill_name": "objectstack-ask",
3+
"evals": [
4+
{"id": 1, "prompt": "I'm connected to an ObjectStack environment over MCP. In one call, how many deals were won per sales region this quarter, and what is the average amount per region?", "should_trigger": true, "files": []},
5+
{"id": 2, "prompt": "Over the ObjectStack MCP connection to our CRM: how much revenue did we book last quarter, by region?", "should_trigger": true, "files": []},
6+
{"id": 3, "prompt": "我通过 MCP 连着公司的 ObjectStack 环境:本月报销总额是多少?按部门排个名。", "should_trigger": true, "files": []},
7+
{"id": 4, "prompt": "Using the ObjectStack MCP tools on our support app, list the ten customers with the most open tickets right now.", "should_trigger": true, "files": []},
8+
{"id": 5, "prompt": "In an ObjectStack `beforeUpdate` hook on `deal`, write the ObjectQL aggregation that sums `amount` per `region` over closed-won deals.", "should_trigger": false, "files": []},
9+
{"id": 6, "prompt": "Write the ObjectQL filter for a scheduled job in our ObjectStack project: invoices more than 30 days overdue whose billing country is in the EU.", "should_trigger": false, "files": []}
10+
]
11+
}

‎skills/objectstack-automation/SKILL.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Also vendor-integration callbacks and **assignment rules**.
4141
| `record_change` | Fires automatically on record create/update/delete. `autolaunched` + the same `record-*` binding behaves identically; `record_change` also opts into the trigger-readiness lint |
4242
| `api` | Inbound **webhook** (*Inbound webhook triggers*); a flow only ever started explicitly is `autolaunched` |
4343

44+
**A stepped form over one object that never branches** is no flow: an **objectstack-ui** form view, `type: 'wizard'`.
45+
4446
**A flow an installed package ships** is read-only. To change what it does, save
4547
a same-named flow in the base's paired `.custom` package declaring
4648
`overrides: { package: '<base>', basedOn: '<base version>' }`

‎skills/objectstack-ui/evals/triggers.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242
"prompt": "In a plain React app with no ObjectStack, write a responsive card grid component with Tailwind that collapses to one column on phones.",
4343
"should_trigger": false,
4444
"files": []
45+
},
46+
{
47+
"id": 8,
48+
"prompt": "In our ObjectStack app, build a three-step wizard to create a lead: contact details, then the company, then qualification.",
49+
"should_trigger": true,
50+
"files": []
4551
}
4652
]
4753
}

0 commit comments

Comments
 (0)