Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/37688-ai-skill-eval-case-12-and-context-rule-row.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion skills/objectstack-ai/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
|:---------|:--------|:----------------|
Expand Down
2 changes: 1 addition & 1 deletion skills/objectstack-ai/evals/skills-tools-knowledge.json
Original file line number Diff line number Diff line change
Expand Up @@ -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("]
}
}
Expand Down
13 changes: 7 additions & 6 deletions skills/objectstack-ai/references/context-packs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 |

Expand All @@ -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`, `<h1>` to `<h6>` 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

Expand Down Expand Up @@ -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 |
Expand Down
Loading