From 409d5e1b80387cea859eb538f985dede5c5f3480 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 00:31:03 +0000 Subject: [PATCH] docs(skills): objectstack-ai eval case 12 matches its reference answer; citation and rule row corrected Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude --- ...88-ai-skill-eval-case-12-and-context-rule-row.md | 10 ++++++++++ skills/objectstack-ai/SKILL.md | 2 +- .../evals/skills-tools-knowledge.json | 2 +- skills/objectstack-ai/references/context-packs.md | 13 +++++++------ 4 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 .changeset/37688-ai-skill-eval-case-12-and-context-rule-row.md diff --git a/.changeset/37688-ai-skill-eval-case-12-and-context-rule-row.md b/.changeset/37688-ai-skill-eval-case-12-and-context-rule-row.md new file mode 100644 index 00000000000..588c01d69ca --- /dev/null +++ b/.changeset/37688-ai-skill-eval-case-12-and-context-rule-row.md @@ -0,0 +1,10 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): the context-pack rule table lists `ai-context-field-unprovisioned`; one source citation and one eval case corrected + +Clause-②: no (published prose and an eval fixture only) +Metadata-protocol: none + +`skills/objectstack-ai/references/context-packs.md` lists the `os validate` warning `ai-context-field-unprovisioned` (an injected column with no storage on an `external` object) in its rule table. The file sat at zero token headroom, so the row is paid for in the same file: two sample fields leave each `fields` list of the example, and three sentences are tightened with no fact removed. `skills/objectstack-ai/SKILL.md` cites the trigger-condition blocks of `packages/spec/src/ai/skill.zod.ts` at the lines they sit on (`38-52, 140-203`). Eval case 12 of `skills-tools-knowledge.json` no longer requires the literals `get_record_context` and `recordId`: its reference answer admits a wildcard tool binding and a skill file with no prose on the MCP argument, and both were graded as failures. diff --git a/skills/objectstack-ai/SKILL.md b/skills/objectstack-ai/SKILL.md index 6ee475f31b7..4db7a11ebca 100644 --- a/skills/objectstack-ai/SKILL.md +++ b/skills/objectstack-ai/SKILL.md @@ -105,7 +105,7 @@ export default defineSkill({ Each condition is `{ field, operator, value }`, ANDed with its siblings. The shape of `value` is **coupled to `operator`** — a mismatch is a parse error, not -a coercion (`packages/spec/src/ai/skill.zod.ts:37-51, 139-202`): +a coercion (`packages/spec/src/ai/skill.zod.ts:38-52, 140-203`): | Operator | Meaning | `value` must be | |:---------|:--------|:----------------| diff --git a/skills/objectstack-ai/evals/skills-tools-knowledge.json b/skills/objectstack-ai/evals/skills-tools-knowledge.json index 8a778fd6560..eb202d5d80b 100644 --- a/skills/objectstack-ai/evals/skills-tools-knowledge.json +++ b/skills/objectstack-ai/evals/skills-tools-knowledge.json @@ -117,7 +117,7 @@ "expected_output": "Emits a `defineSkill` with a snake_case `name`, `label`, non-blank `instructions`, `context: 'policy_document'` (the pack's bare name, not a face such as `acme-policy_document` and not the object name) and a `tools` list that binds `get_record_context`, by name or a wildcard matching it, since the parse refuses `context` without that binding. Says that over MCP the skill's prompt then takes an optional `recordId` where the pack resolves and the server serves `get_record_context` (`requires: ['record-context']`), and that the prompt asks the model to call that tool: the record is never inlined. The skill stays offered over MCP (no `mcpPrompt` opt-out), with no `permissions` key and no `*.agent.ts` file.", "files": [], "assertions": { - "must_contain": ["defineSkill", "context:", "policy_document", "get_record_context", "recordId"], + "must_contain": ["defineSkill", "context:", "policy_document"], "must_not_contain": ["permissions:", "defineAgent("] } } diff --git a/skills/objectstack-ai/references/context-packs.md b/skills/objectstack-ai/references/context-packs.md index 54ba9360d2b..baa7f884a96 100644 --- a/skills/objectstack-ai/references/context-packs.md +++ b/skills/objectstack-ai/references/context-packs.md @@ -15,11 +15,11 @@ export const AccountBrief: AiContext = { name: 'account_brief', label: 'Account brief for sales', object: 'account', - fields: ['name', 'industry', 'tier', 'annual_revenue'], + fields: ['name', 'industry'], related: [{ object: 'opportunity', field: 'account', - fields: ['name', 'stage', 'amount', 'close_date'], + fields: ['name', 'stage'], where: { stage: { $nin: ['closed_won', 'closed_lost'] } }, orderBy: [{ field: 'close_date', order: 'asc' }], limit: 10, @@ -38,7 +38,7 @@ Strict: an unknown key, or a pack over a bound, is refused at parse. `name`, | `name` | snake_case | | `label` | The answer's header. Say the audience here: there is no `description` key | | `object` | The root object | -| `fields` | Up to 30 fields, in order, none twice. A lookup is answered with the name of the record it points at | +| `fields` | Up to 30 fields, in order, none twice. A lookup is answered with its target's name | | `related` | Up to 3 child lists, one level deep | | `body` | `{ field }`: a `textarea`, `markdown`, `html` or `richtext` field of the root | @@ -60,8 +60,8 @@ matter and not the first 20. back as an outline of its headings; the model reads one section by calling again with a heading's `anchor`. Headings are Markdown `#` lines in `textarea` / `markdown`, `

` to `

` in `html` / `richtext`. A -long body with no headings is cut at the bound and marked `truncated`, so give -a long body headings. +long body with no headings is cut at the bound and marked `truncated`: give +it headings. ## Serving and calling it @@ -110,7 +110,8 @@ caller whose target is such a system object. | Rule | Reported for | |:--|:--| | `ai-context-object-unknown` | a root or `related` object the stack does not define | -| `ai-context-field-unknown` | a field its object lacks. In a `where` or `orderBy`, the whole list is left out of every answer | +| `ai-context-field-unknown` | a field its object lacks. In a `where` or `orderBy`, the list is left out | +| `ai-context-field-unprovisioned` | an injected column with no storage on an `external` object | | `ai-context-related-link-unknown` | no reference field to the root, or several and no `field` | | `ai-context-body-not-long-text` | a `body.field` that is not long text: the answer carries no body | | `ai-context-sort-field-unsortable` | an `orderBy` field that is a formula or declares `sortable: false`: the list is left out |