Skip to content

Commit c71105c

Browse files
committed
docs(skills): narrow eval case 15 to wrong shapes; restore two clauses; re-measure the row
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
1 parent d16dc4b commit c71105c

3 files changed

Lines changed: 29 additions & 27 deletions

File tree

‎scripts/check-skills-token-ratchet.mjs‎

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -513,24 +513,26 @@ export const CEILINGS = new Map([
513513
// ceil(27623 / 4) = 6906; the row moves +13, the measured remainder only.
514514
// Pinned AT the measurement.
515515
// ceil(($(wc -c < skills/objectstack-ai/SKILL.md) - 27) / 4) == ceil(27623 / 4)
516-
// 6906 -> 7109 (2026-11-28, knowledge sources over business objects): the
516+
// 6906 -> 7148 (2026-11-28, knowledge sources over business objects): the
517517
// section taught a source for a document library only. It now says three
518-
// things, one example each: `content` lists long free text only, and counts
519-
// and filters go to the record tools; one source per corpus, a skill's
520-
// `instructions` naming which to pass in `sourceIds`, the argument of
521-
// `search_knowledge`; attachment text reaches an index through a text field,
522-
// since no source reads a file. Raise path the standing ruling
518+
// things, one example each: `content` lists long free text only (a title or
519+
// subject line with it), and counts and filters go to the record tools,
520+
// named by both spellings (`aggregate_records`, `aggregate_data` in `ask`);
521+
// one source per corpus, a skill's `instructions` naming which to pass in
522+
// `sourceIds`, the argument of `search_knowledge`; attachment text reaches
523+
// an index through a text field. Raise path the standing ruling
523524
// 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). PAID DOWN
524-
// FIRST: the `content` row's "Meaningful text only, never ids or system
525-
// fields" (the first rule says it), and the `agent.knowledge` pitfall row's
526-
// "describe intended grounding in `instructions`" (the second rule says it);
527-
// the retired-kinds line's "no form in 19" became a pointer to the third
528-
// rule. Arithmetic in priced bytes (stamp line excluded), against `main`'s
529-
// 27621 (the row's 6906, headroom 0): the file is 27648 -> 28461 bytes, so
530-
// the LANDED priced text is 28434 -> ceil(28434 / 4) = 7109; the row moves
531-
// +203, the measured remainder only. Pinned AT the measurement.
532-
// ceil(($(wc -c < skills/objectstack-ai/SKILL.md) - 27) / 4) == ceil(28434 / 4)
533-
['skills/objectstack-ai/SKILL.md', 7109], // -18 (was 6824), then -5 A2′ (was 6806)
525+
// FIRST: the `content` row's "Meaningful text only" (the first rule says
526+
// it; the row keeps "Never ids or system fields"), and the `agent.knowledge`
527+
// pitfall row's "describe intended grounding in `instructions`", now a
528+
// pointer to the second rule; the retired-kinds line's "no form in 19"
529+
// became a pointer to the third rule. Arithmetic in priced bytes (stamp
530+
// line excluded), against `main`'s 27621 (the row's 6906, headroom 0): the
531+
// file is 27648 -> 28617 bytes, so the LANDED priced text is 28590 ->
532+
// ceil(28590 / 4) = 7148; the row moves +242, the measured remainder only.
533+
// Pinned AT the measurement.
534+
// ceil(($(wc -c < skills/objectstack-ai/SKILL.md) - 27) / 4) == ceil(28590 / 4)
535+
['skills/objectstack-ai/SKILL.md', 7148],
534536
// -12 (was 6331): the `http.server` decision-table row dropped a trailing
535537
// clause that taught `contributes.routes` as a key that "parses but serves
536538
// nothing". The key is retired — an authored entry is now REFUSED, carrying

‎skills/objectstack-ai/SKILL.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ object or field, when you may not search that object or query a field it reads.
258258
| `adapter` | Optional store id (`pgvector`, `turso`, `memory`). Omitted: the deployment's store (`pgvector` on PostgreSQL, `turso` otherwise), else the only one registered; several and none the deployment's is refused, naming them |
259259
| `source.kind` | `'object'`, the one kind |
260260
| `source.object` | The object whose records are indexed |
261-
| `source.content` | Non-empty list of the fields whose text is indexed, in order. `'*'` is refused: it would also send fields added later |
261+
| `source.content` | Non-empty list of the fields whose text is indexed, in order. `'*'` is refused: it would also send fields added later. Never ids or system fields |
262262
| `source.metadataFields` | Fields kept for search-time filtering (`status`, `owner_id`, `tags`) |
263263
| `source.where` | ObjectQL `where`: keeps drafts and archived rows out |
264264
| `source.split` | How documents are cut into passages (below) |
@@ -309,18 +309,18 @@ export const supportKb: KnowledgeSource = KnowledgeSourceSchema.parse({
309309
**Sources over business objects**, not only a document library:
310310

311311
- **Long free text only.** `content` lists prose: an article body, a ticket's
312-
`description`, a note. Numbers, dates, statuses and short names stay out;
313-
counts and filters go to the record tools. "Which customers reported login
314-
loops?" is `search_knowledge`; "how many tickets are open per priority?" is
315-
`aggregate_records`.
312+
`description`, a note, with its title or subject line. Numbers, dates,
313+
statuses and the names of people or accounts stay out; counts and filters
314+
go to the record tools. "Which customers reported login loops?" is
315+
`search_knowledge`; "how many tickets are open per priority?" is
316+
`aggregate_records` (in-app `ask`: `aggregate_data`).
316317
- **One source per corpus**, and a skill's `instructions` say which to pass in
317318
`sourceIds`: `search_knowledge({ query, sourceIds: ['ticket_bodies'] })`
318319
searches the tickets and not `support_kb`. Omitted, every exposed source is
319320
scanned.
320-
- **Attachment text goes through a field.** No source reads a file, and a
321-
`file` field in `content` adds no file text. Have the flow, hook or import
322-
that extracts the text write it to a `textarea` field
323-
(`contract.attachment_text`), and list that field.
321+
- **Attachment text goes through a field.** A `file` field in `content` adds
322+
no file text. Have the flow, hook or import that extracts the text write it
323+
to a `textarea` field (`contract.attachment_text`), and list that field.
324324

325325
**Splitting (`split`).** The knowledge service cuts each document into passages
326326
for a store declaring `capabilities.chunks`; any other store receives whole
@@ -477,7 +477,7 @@ https://objectstack.ai/docs/protocol-upgrade:
477477
| Retired key | Removed in 17, tombstone gone in 18 — why, and what replaces it |
478478
|:--|:--|
479479
| `agent.tools` | The inline slot resolved names against the *full* registry with no surface check. Not a rename: the strict schema refuses the key as unknown; re-declare each tool in a `defineSkill` under the stack's `skills` (ADR-0064) |
480-
| `agent.knowledge` | Declaring sources/indexes on an agent never scoped retrieval — `search_knowledge` takes `sourceIds` from the model's tool-call arguments. Restrict on the knowledge source (`aiExposed`, `source.where`) |
480+
| `agent.knowledge` | Declaring sources/indexes on an agent never scoped retrieval — `search_knowledge` takes `sourceIds` from the model's tool-call arguments. Restrict on the knowledge source (`aiExposed`, `source.where`); name the `sourceIds` to pass in `instructions` (§ Knowledge Sources) |
481481

482482
---
483483

‎skills/objectstack-ai/evals/skills-tools-knowledge.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
"assertions": {
163163
"must_contain": ["sourceIds", "content:", "textarea"],
164164
"must_contain_any": [["aggregate_records", "query_records", "aggregate_data"]],
165-
"must_not_contain": ["kind: 'file'", "kind: \"file\"", "kind: 'http'", "contentFields:", "'contract_pdf']", "'amount']", "'priority']"]
165+
"must_not_contain": ["kind: 'file',", "kind: \"file\",", "kind: 'http',", "kind: \"http\",", "contentFields:", "content: ['priority'", "content: ['status'", "content: ['amount'", "content: ['contract_pdf'", "'description', 'priority'", "'description', 'status'", "'description', 'amount'", "'description', 'contract_pdf'"]
166166
}
167167
}
168168
]

0 commit comments

Comments
 (0)