Skip to content

feat(spec)!: retire an agent's model.provider — no runtime read it; the deployment's AI settings choose the provider - #37783

Merged
os-zhuang merged 4 commits into
mainfrom
claude/project-thread-t0ls0u
Nov 27, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/project-thread-t0ls0u

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #37712

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37796

维护者速读

  • 是什么:agent 元数据里的 model.provider(openai / azure_openai / anthropic / local)从来没有运行时读取,按 ADR-0049「执行或移除」退役。供应商由部署的 AI 设置决定,agent 只写模型名。
  • 影响:以后 agent 里写 provider 会报错,并提示删掉这一行;os migrate meta --from 18 --write 会自动删。18.x 默认写进去的 provider: 'openai' 会被静默剥掉,已构建、已存储的 agent 照常加载。元数据预览不再显示供应商标签。运行时行为不变。
  • 要你做什么:无(座位已采纳退役路线,hold 记录 7206344767)。

What changes

  • Schema (packages/spec/src/ai/agent.zod.ts): AIModelConfigSchema.provider is a retiredKey() tombstone with the prescription, so writing it fails tsc (input type never) and the parse answers with the fix. The 18.x emitted default provider: 'openai' is accepted as inert residue and stripped (acceptRetiredDefaultResidue, the feat(spec): retired-defaulted-key tolerance — the retired default parses as inert residue and strips; non-default values keep the loud refusal (#12497 class rule) #12840 rule for a retired defaulted key; same shape as ViewSharingSchema). Every other value meets the tombstone.
  • ADR-0087 kit: D2 conversion agent-model-provider-removed (conversions/entries/19/, step 19, retiredFromLoadPath: true, retiredAfter: '18.6.0', lossless stripKeys); RETIRED_KEYS_BY_MAJOR[19] entry ai/AIModelConfig:provider; D3 semantic entry agent-model-provider-retired (relevance agents); one sentence in the step-19 rationale; JOIN row in retired-key-removal-version.pin.test.ts.
  • Ledger: liveness/agent.json model row note records the removal (a nested key has no row of its own). Evidence and verifiedAt unchanged: this session cannot read the cloud repository to re-verify it.
  • Generated: authorable-surface/ai.json ([RETIRED] row), content/docs/references/ai/agent.mdx.
  • DEFAULT_CHANGES_BY_MAJOR[19] (from feat(spec): an agent's model name becomes optional — absent means the environment's default model #37697): the reason no longer tells authors to write provider: 'openai'; it points at this retirement instead.
  • Form: the agent form's model help text no longer names a provider; the 11 locale bundles were regenerated (en) and hand-trimmed (the other ten drop the provider word only).
  • UI (AgentPreview.tsx): the preview shows the model name alone; a stale draft that still carries a provider never shows it.
  • Docs and fixtures: content/docs/ai/agents.mdx (table row + 4 examples), getting-started/common-patterns.mdx, packages/spec/docs/MCP_GUIDE.md, docs/notes/crm-development-standards.mdx, os explain agent text and example, benchmark.bench.ts, metadata-validation-sweep.test.ts, agent.test.ts.
  • Pins: src/ai/agent-model-provider-retirement.test.ts: refusal at every door (schema, defineStack), residue strip with a near-value control, tsc channel, D2 conversion on the stored-row seam and the boot door, idempotence, load-path retirement, registration, and a tree-scoped absence walk over the declared radius (added to vitest.repo-tests.json).
  • Changeset: .changeset/37712-agent-model-provider-retired.md, @objectstack/spec minor, BREAKING banner, FROM → TO table, ADR-0087 marker.

Why

ADR-0049 enforce-or-remove. Removal, not enforcement, because:

  1. The enum does not match the deployment's providers. The deployment's list is AI_PROVIDERS in packages/services/service-settings/src/manifests/ai-models.ts (gateway, openai, anthropic, google, deepseek, dashscope, cloudflare, siliconflow, openrouter). azure_openai and local are not providers a deployment has, and most real ones cannot be written. Enforcing it would mean redesigning the key, not adding a reader.
  2. objectstack-ai/cloud#5055 phase 1 resolves a model by its id among the providers the deployment turned on. The capability "pin an agent to a model" is model.model, which is live.
  3. No reader in this repository (only the preview pill). Cloud side: the ledger's cross-repo row (cloud @cb8ee7ff) and the card's 11-26 read of cloud main; not re-verified here.

Acceptance notes

Verification

  • ui fixtures: automationPreviews.i18n-10862 and three more (emptyCollection-8526, ResourceListPage.servedListColumns-36860, apps/console/src/preview-samples.ts) stop writing provider (commit 8655944); those 5 files 121 passed, console preview-samples 47 passed.
  • pnpm --filter @objectstack/spec build then check:generated: 14/14 up to date.
  • Source audits: check:empty-state, check:skill-examples, check:skill-served-sections, check:yaml-examples, check:template-manifests, check:variant-docs, check:error-code-provenance, check:duration-unit-keys, check:exported-any, check:dual-source-exports, check:entry-nameability, check:browser-reachable-entries, check:scripts-typecheck, check:llms-txt: all exit 0.
  • pnpm --filter @objectstack/spec typecheck (tsc + scripts + test-typecheck): 0.
  • @objectstack/spec full vitest: 998 files, 30139 passed; the one failure on the first run (retired-key-removal-version.pin JOIN row) is fixed and that file re-run green.
  • pnpm check:i18n: all bundles in sync. check:skill-identifier-liveness, check:doc-authoring, check:adr-0087-registration, check:empty-changeset, check:changeset-fixed, check:cross-package-test-inputs, check-changeset-no-major: 0.
  • packages/cli test/commands.test.ts + test/explain-rule-id.test.ts: 64 passed. packages/objectql metadata-validation-sweep.test.ts: passed. ui AgentPreview*: 24 passed.
  • eslint on the new and changed source files: clean.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes (changed files).
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English (the 维护者速读 block is the maintainer's standing exception).
  • The Before Submitting list in CONTRIBUTING.md is done.

Session: session_01L6bhgTnm6d4W7ugSacDJ3j

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j

…he deployment's AI settings choose the provider

ADR-0049 enforce-or-remove. `AIModelConfigSchema.provider` (openai /
azure_openai / anthropic / local) was parsed and never read: the AI runtime
applies the model name, temperature and maxTokens only, and the providers a
deployment turns on are its own AI settings, a list the enum never matched.

- retiredKey() tombstone with the prescription; the 18.x emitted default
  `openai` is stripped as residue (acceptRetiredDefaultResidue)
- D2 conversion agent-model-provider-removed (step 19, lossless, retired from
  the load path), RETIRED_KEYS_BY_MAJOR[19] entry, D3 semantic entry
  agent-model-provider-retired, step-19 rationale
- liveness ledger note, authorable-surface + reference docs regenerated, agent
  form help text and its 11 locale bundles, removal-version JOIN row
- agent metadata preview shows the model name only
- docs, CLI explain, benchmark and test fixtures stop authoring the key
- pin suite with a tree-scoped absence walk (radius declared in
  vitest.repo-tests.json)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation protocol:ai tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/cli, @objectstack/platform-objects, @objectstack/spec, touching 21 documentable anchor(s). ⚠️ 6 changed file(s) yielded no anchor (packages/spec/authorable-surface/ai.json, packages/spec/docs/MCP_GUIDE.md, packages/spec/liveness/agent.json, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

10 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/agents.mdx (via AgentSchema (symbol, a top-level const))
  • content/docs/ai/index.mdx (via azure_openai (literal, a string literal in AIModelConfigSchema))
  • content/docs/api/data-api.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/getting-started/common-patterns.mdx (via support_agent (literal, a string literal in fixture))
  • content/docs/getting-started/quick-reference.mdx (via AgentSchema (symbol, a top-level const))
  • content/docs/permissions/field-level-security.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/protocol/objectql/security.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/ui/pages.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/ui/react-pages.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/upgrading.mdx (via AgentSchema (symbol, a top-level const))

⛔ 6 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v13.mdx (via AgentSchema (symbol, a top-level const))
  • content/docs/releases/v16.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/releases/v17/17-5.mdx (via retiredAfter (symbol, a field of const object agentModelProviderRemoved), retiredFromLoadPath (symbol, a field of const object agentModelProviderRemoved))
  • content/docs/releases/v18/18-2.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/releases/v18/18-3.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/releases/v18/18-6.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 6 changed file(s) yielded no anchor (packages/spec/authorable-surface/ai.json, packages/spec/docs/MCP_GUIDE.md, packages/spec/liveness/agent.json, …) — pages documenting those are invisible to this run
  • 9 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 188 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 44ccf94a409362dbb3c16fc2f03b321d4e91b797 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 0a464e68ec78fbf141cea399c1474829a99f2b28 — the merge of head a610db7a0b656eba611b617cc84209e2908374db into base 44ccf94a409362dbb3c16fc2f03b321d4e91b797, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0a464e68ec78fbf141cea399c1474829a99f2b28 && git checkout 0a464e68ec78fbf141cea399c1474829a99f2b28
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 44ccf94a409362dbb3c16fc2f03b321d4e91b797 a610db7a0b656eba611b617cc84209e2908374db && git checkout -B drift-repro 44ccf94a409362dbb3c16fc2f03b321d4e91b797 && git merge --no-ff a610db7a0b656eba611b617cc84209e2908374db

node scripts/docs-audit/affected-docs.mjs --json 44ccf94a409362dbb3c16fc2f03b321d4e91b797

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 44ccf94a409362dbb3c16fc2f03b321d4e91b797 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

… preview pill reads the model name

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ef13630dfde5760518c9ea63c303d866aa5681d9
Local-runs: none
Scope: packages/spec/src/ai/agent.form.ts, packages/spec/src/ai/agent.zod.ts, packages/spec/src/benchmark.bench.ts, packages/spec/src/conversions/entries/19/agent-model-provider-removed.ts, packages/spec/src/conversions/registry.ts, packages/spec/src/migrations/entries/retired-keys/19.ai__AIModelConfig__provider.ts, packages/spec/src/migrations/entries/semantic/19.agent-model-provider-retired.ts, packages/spec/src/migrations/registry.ts.template + packages/spec/src/ai/agent-model-provider-retirement.test.ts, packages/spec/src/shared/retired-key-removal-version.pin.test.ts, packages/spec/scripts/lib/default-changes.ts, packages/spec/liveness/agent.json, packages/cli/src/commands/explain.ts, ui/packages/app-shell/src/views/metadata-admin/previews/AgentPreview.tsx

Gates: check-runs on this head read at 2026-11-27T04:24Z. All 70 are complete: 61 success, 9 skipped, none failed or still running. The skipped nine are the opt-in and queue-only lanes (the 18.x upgrade harness, the packed-tarball smoke, the dogfood shards and CLI verify, Temporal conformance, UI published artifacts, the two queue verdicts and the schedule gate), so dogfood is judged in the merge queue, not here. The head has not moved.

Inputs: card #37712 with its three comments (triage 7205353375, hold 7206344767, claim 7207860184), the PR body, its 42-file list and net diff, the check-runs. The cited code was read in the live tree at main 6e8f663710; agent.zod.ts was also read at the head. Cloud was not read: every cloud statement below rests on the card's own reading of cloud main and on the ledger row dated 2026-09-15.

① Derived judgments

  • Accept-set, agent.model.provider: the four enum values were accepted; now every value except the exact string openai is refused at model.provider with the prescription. Narrowing. Right for the route: AI_PROVIDERS in packages/services/service-settings/src/manifests/ai-models.ts lists nine providers, two of the enum's four are not among them, and the capability an agent keeps (name a model) is model.model. The route is the lane's call by triage 7205353375 and was taken on hold comment 7206344767.
  • Accept-set, the residue: provider: 'openai' is accepted and stripped, so no parsed agent carries the key. Right: it is the feat(spec): retired-defaulted-key tolerance — the retired default parses as inert residue and strips; non-default values keep the loud refusal (#12497 class rule) #12840 class rule, and the shape is ViewSharingSchema's line for line.
  • Type surface: Agent['model']['provider'] takes the tombstone mark, so a typed source that writes any value, openai included, fails tsc. Right.
  • Export kind: AIModelConfigSchema is no longer a ZodObject. It is the residue stage's preprocess pipe with a read-through shape, so .extend(), .pick(), .omit() and .partial() are gone from it. Right, and the same trade ViewSharingSchema made; the one in-repo consumer is AgentSchema.model, which calls .optional() only. The changeset does not name this; that sentence is the lane seat's prose read.
  • Authorable surface: ai/AIModelConfig:provider becomes a [RETIRED] row and is the first entry of RETIRED_KEYS_BY_MAJOR[19], spelled as the surface file spells it. Right.
  • Chain: step 19 gains agent-model-provider-removed at order 2. Its collection (agents) is disjoint from the order-1 entry's (permissions), so the order carries no meaning and none is needed. Right.
  • Data at rest: stored agent rows and built artifacts lose the key on replay, one notice per agent; the authoring funnel does not replay it. Right.
  • Display: the preview pill reads the model name alone; the form help text and its 11 bundles stop naming a provider; os explain agent drops it. Right.
  • Refusal text for a provider written at the agent's TOP level: unchanged by this diff, and now wrong. See S1.

② Semver level

@objectstack/spec minor is right. Metadata-protocol: narrowed is right (a key tombstoned), and a narrowed kind takes at least minor on the package it moves; check-changeset-no-major refuses major on this line. The BREAKING banner, the FROM → TO table, the one-line fix and the ADR-0087 marker naming both ids are present. @objectstack/cli, @objectstack/platform-objects, @object-ui/app-shell and @object-ui/console at patch match what the diff publishes from each. Check Changeset is green on this head.

Clause-②: no (narrowing) is right: the accept set shrinks and nothing widens.

③ Boundary flags

  • Residue stage (the dev's small call): accepted. The discriminator the tree states (18.integration__Connector__connectionTimeoutMs.ts) is whether a released toolchain materialized the default into something later re-parsed. It did: every 18.x parse of a model block wrote provider: 'openai', and the metadata write door parses with the current schema and replays no conversion, so without the stage an agent exported from 18.x is refused over a value nobody typed. The silence is ruled, not chosen here (the helper's own docblock). It is bounded by === on one captured literal, and the pin holds OpenAI and a padded spelling to the refusal. A warning would need provenance JSON does not carry.
  • Overlap with feat(spec,service-knowledge)!: knowledge_source is a governed metadata type with its loader, its registry and two authoring guards #37676 (still open): accepted as stated. Both insert at the head of MAJOR_19_CONVERSIONS; the second lander keeps both lines in identifier order.
  • Absence walk excludes ui/: checked by reading. On main, six ui/ files author the shape and all six are in this diff. The one authoring left under ui/ is the stale-draft fixture in AgentPreview.test.tsx, which is there on purpose. Outside the walk's roots, docs/notes/crm-development-standards.mdx authored it and is cleaned here; .claude/, .github/ and examples/ hold none, and the archived 2026-06 audit under docs/audits/ is history. The preview pill was the only reader of model.provider in packages/, ui/ and the examples; the agent list column reads model.model.
  • Skills-docs: follow-up #37796: true. The card is open, domain:skills, Blocked-by: #37783, and names the table row and the eval. No marked skill example authors the key and the tombstone keeps the identifier in packages/, so the retirement lands first, as the playbook orders it. The row sits at SKILL.md:369 on main, not 370, and the same eval's must_contain list also names provider.
  • Fixes #37712: right. The card asks for enforce or remove, and this removes.
  • model.topP (dev flag, out of scope): escalated to the seat. The ledger row still reads topP DEAD, and a search of this repository's open issues finds no card for it. It needs a carrier card where its reader would live.
  • Cloud, two things this review could not read, escalated to the seat. First, the prescription says the deployment resolves a model name among the providers it has turned on; that is objectstack-ai/cloud#5055 phase 1 and must be true by the release that carries this tombstone. Second, no producer census was taken in cloud: a built-in agent there that writes model.provider fails tsc or the parse on the pin bump, which is audible, but it belongs in the bump's plan.
  • open_questions: none stated.
  • SQL push-down: the diff adds no query, id materialisation or in-app join.

④ Design judgment

No must-fix.

S1 (should-fix) — the agent's own wrong-layer guidance still prescribes the retired key. packages/spec/src/ai/agent.zod.ts, line 371 at this head (line 330 on main), inside AgentSchema's guidance:

provider: 'model settings live under `model` — write `model: { provider: … }`',

The diff does not touch it. An author who writes provider at the agent's top level is refused with an instruction to write the key this PR tombstones. Followed with anthropic, it earns a second refusal. Followed with openai in untyped JSON or YAML, it is accepted and stripped in silence, so the schema's own fix sentence leads to the declared-but-unenforced state the card was filed to remove. The playbook's route table names this row (a retired key's wrong-layer pointers move to guidance carrying the retirement's answer), and the memory.longTerm.store retirement in the same file did exactly that for backend / storage / provider. No gate reads it: alias-integrity.test.ts judges aliases, not free-text guidance, and the absence walk strips inline code before judging. Fix: make that entry say there is no provider key at either level, that the deployment's AI settings choose it, and that a model is named in model.model; pin the sentence in agent-model-provider-retirement.test.ts beside the tombstone's.

Per hits file:

  • ai/agent.zod.ts: the tombstone, the captured residue literal and the stage are right and match the precedent. The prescription follows the five conventions (qualified key first, version and ADR, why it was inert, the imperative fix, the pinned os migrate meta --from 18 sentence), and 19.0.0 agrees with the package label. Refusal shape is the house one: invalid_type at model.provider, and STACK_SCHEMA_INVALID / 422 at defineStack. S1 is in this file.
  • conversions/entries/19/agent-model-provider-removed.ts: correct on every stored shape. A set provider, the residue value and a non-enum value are deleted with one notice; an absent key and an absent or non-object model return the input by reference; a block left empty stays {}, which parses. Idempotent by stripKeys. retiredFromLoadPath: true with retiredAfter: '18.6.0' matches the sibling major-19 entry and the census rule for a prerelease label. Stripping the residue value with a notice on replay is what permission-allow-restore-purge-removed does.
  • conversions/registry.ts: import and list entry are in identifier order, as the list's header requires.
  • migrations/entries/retired-keys/19.ai__AIModelConfig__provider.ts: filename, id and comment are right.
  • migrations/entries/semantic/19.agent-model-provider-retired.ts: fields complete, relevance agents, one conversion id. See N2.
  • migrations/registry.ts.template: one true sentence in the step-19 rationale.
  • ai/agent.form.ts: help text only; no sub-input for the key existed, and the composite derives its rows from the served schema, which drops tombstones.
  • benchmark.bench.ts: the edit is right.

Implementing files: the retirement pin asserts the tombstone at both doors, the residue with a near-value control, the stored and boot seams, and the registration; liveness/agent.json carries the note on the container row, which is where memory.longTerm.store put its own, and leaves verifiedAt alone, as it must without a cloud re-read; AgentPreview.tsx and explain.ts agree with the schema.

Nits:

  • N1 (nit, prose face): .changeset/37686-agent-model-name-optional.md, on main and unreleased, will ship in the same CHANGELOG. It still says the key and its enum are unchanged, tells the reader to write provider: 'openai' to keep it, and describes a PROVIDER · MODEL pill. This PR corrected the twin sentence in default-changes.ts and left this one. Fix it on the prose face in this PR.
  • N2 (nit): the D3 reason closes on an agent whose author "wrote a provider, and no model name", and the changeset's second FROM row shows it. No released version accepted that shape: a model block without model.model was refused until feat(spec): an agent's model name becomes optional — absent means the environment's default model #37697, which is unreleased. The judgement the upgrader really owes is the one acceptanceCriteria already states (is the named model one the deployment offers). It can ride S1's commit.
  • N3 (nit): the kept sentence in DEFAULT_CHANGES_BY_MAJOR[19] still says the parsed provider "now yields the enum or undefined"; after this PR it yields nothing. It can ride S1's commit.

Outside this diff, not graded: benchmark.bench.ts still passes tools: [] in a fixture named validAgent; AgentSchema no longer declares that key, so the benchmark measures a refusal. It predates this PR.

S1 earns a delta review of its fix.

Implemented-by: claude/project-thread-t0ls0u
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

…etirement, never pointed at model.provider

- AgentSchema's wrong-layer guidance for `provider` now says there is no
  provider key at either level and names `agent.model.model`; pinned
- D3 reason names the judgement an upgrader really owes (is the named model
  one the deployment offers); the changeset drops the never-accepted
  provider-without-model row and says AIModelConfigSchema is a pipe now
- DEFAULT_CHANGES_BY_MAJOR[19] reason and the unreleased model-optional
  changeset agree with the retirement

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

DELIBERATE CORRECTION — Check Changeset is red by design on this head (a610db7a0b).

This PR rewrites one pending release note it did not add: .changeset/37686-agent-model-name-optional.md (from #37697, unreleased, on main). It is not a filename collision. The note became false when this PR retired agent.model.provider, and contract review 7209785394 (N1) asked for it to be corrected here. Three sentences changed:

  1. Before: "The key and its enum are unchanged, and a written provider is carried as written."
    After: "The key itself leaves the spec in the same major (agent-model-provider-removed, see that changeset): delete provider, the deployment's AI settings choose the provider."
  2. Before: "the agent preview's model pill appears when the block names a model or a provider, and reads PROVIDER · MODEL, MODEL or PROVIDER from what is written."
    After: "the agent preview's model pill appears when the block names a model, and reads the model name."
  3. Before: "…now reads undefined; to keep openai, write provider: 'openai' in the agent."
    After: "…now reads nothing there: the provider is the deployment's choice."

Restoring the base text would put those false sentences back. The seat confirms by its same-head contract-review record.

Session: session_01L6bhgTnm6d4W7ugSacDJ3j


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a610db7a0b656eba611b617cc84209e2908374db
Local-runs: none
Scope: packages/spec/src/ai/agent.form.ts, packages/spec/src/ai/agent.zod.ts, packages/spec/src/benchmark.bench.ts, packages/spec/src/conversions/entries/19/agent-model-provider-removed.ts, packages/spec/src/conversions/registry.ts, packages/spec/src/migrations/entries/retired-keys/19.ai__AIModelConfig__provider.ts, packages/spec/src/migrations/entries/semantic/19.agent-model-provider-retired.ts, packages/spec/src/migrations/registry.ts.template + packages/spec/src/ai/agent-model-provider-retirement.test.ts, packages/spec/src/shared/retired-key-removal-version.pin.test.ts, packages/spec/scripts/lib/default-changes.ts, packages/spec/liveness/agent.json, packages/cli/src/commands/explain.ts, ui/packages/app-shell/src/views/metadata-admin/previews/AgentPreview.tsx

Gates: check-runs on this head read at 2026-11-27T05:03Z. All 70 are complete: 60 success, 9 skipped (the same opt-in and queue-only lanes as on the first head), 1 failure. The failure is Check Changeset, red by design on the DELIBERATE CORRECTION judged in ③; every type-check, lint, build and test lane is green, the retirement pin's shard among them. The head has not moved.

Delta round. This record follows 7209785394 on ef13630dfd and judges the one commit above it: six files, of which three are in scope (agent.zod.ts, the D3 entry, default-changes.ts), one is the retirement pin, and two are changesets. Everything the first record judged on the other files stands; none of them moved. Inputs: the compare of the two heads, the PR body (unchanged since the first round), PR comment 7209908752, the check-runs.

① Derived judgments

  • Refusal text for provider at the agent's top level: it no longer points at model.provider; it carries the retirement's answer. No accept-set change: the key was an unrecognized key before and is one now, with the same code and path. Right.
  • Nothing else the diff publishes changes shape. The D3 reason and the DEFAULT_CHANGES_BY_MAJOR[19] reason are prose the upgrade projections print; both edits are right (N2, N3 below).

② Semver level

Unchanged and still right: @objectstack/spec minor for a narrowed kind, with the BREAKING banner, the FROM → TO table (now one row, the only shape a released version accepted), the one-line fix and the ADR-0087 marker. The changeset now also states that AIModelConfigSchema is the residue stage's preprocess pipe, so .extend(), .pick(), .omit() and .partial() are gone from it; that is true, and it answers the note in the first record's ①.

Clause-②: no (narrowing) is still right.

③ Boundary flags

DELIBERATE CORRECTION — confirmed. The commit rewrites .changeset/37686-agent-model-name-optional.md, a pending note from #37697 that this PR did not add. It is the correction class, not a collision: the file keeps its name and its frontmatter, and only sentences this PR falsified changed. The dev declared it in PR comment 7209908752, naming the note and quoting the three sentences before and after; the quotes match the diff. This diff also changes code, so this same-head record is the confirmation. Each rewritten sentence, judged against the tree at this head:

  1. Before: "The key and its enum are unchanged, and a written provider is carried as written." False at this head: the key is a tombstone and no written value is carried. After: "The key itself leaves the spec in the same major (agent-model-provider-removed, see that changeset): delete provider, the deployment's AI settings choose the provider." Holds: that is the conversion's id, registered under major 19, and the fix is the tombstone's own.
  2. Before: "the agent preview's model pill appears when the block names a model or a provider, and reads PROVIDER · MODEL, MODEL or PROVIDER from what is written." False at this head. After: "the agent preview's model pill appears when the block names a model, and reads the model name." Holds: AgentPreview.tsx renders the pill on model.model alone and labels it with that value.
  3. Before: "…now reads undefined; to keep openai, write provider: 'openai' in the agent." False at this head, and the instruction is the harmful half: in TypeScript it fails tsc, in JSON it is stripped. After: "…now reads nothing there: the provider is the deployment's choice." Holds: no parsed agent carries the key.

No other sentence of that note is made false by this PR: the default it describes is gone with the key, the block is still strict, and temperature still defaults to 0.7. The note's own declaration lines are untouched and still describe #37697.

  • Check Changeset is red on this head for this reason alone: the one failed step is the foreign-changeset rule naming that file; the changeset count, the ADR-0087 disposition and the major guard steps are green. Red by design; the gate is not to be cleared by restoring the base text.
  • The first record's escalations to the seat are unchanged by this commit: a carrier card for model.topP, and the two cloud items (objectstack-ai/cloud#5055 phase 1 behind the prescription, and no producer census).
  • SQL push-down: the commit adds no query, id materialisation or in-app join.

④ Design judgment

No must-fix, no should-fix.

  • S1: closed. AgentSchema's guidance.provider is now AGENT_PROVIDER_SPELLING_RETIRED, and every clause of it is true at this head: an agent has no authorable provider key at the top level or under model (the only other provider in the file is the memory.longTerm spelling, itself a retired pointer); the deployment's AI settings choose the provider; agent.model.provider was removed in 19.0.0 under ADR-0049; the fix is to delete the key and name a model in agent.model.model. It is LONG_TERM_STORE_SPELLING_RETIRED's shape, clause for clause, and it rightly carries no os migrate meta sentence: a top-level provider has been an unrecognized key since the shape was closed and no conversion covers it, so there is no mechanical edit to list. The composer pushes an exact guidance entry into the message verbatim, so the new pin reads the real refusal. The pin fails without the fix on both of its assertions: the old sentence lacks the new text and matches the forbidden model: { provider pattern. Its control (the temperature pointer still points) shows the guidance channel itself still answers.
  • N1: closed, as the correction confirmed in ③.
  • N2: closed. The D3 reason now ends on the judgement acceptanceCriteria states (whether the named model is one the target deployment offers), and the changeset's second FROM row is gone.
  • N3: closed. The sentence reads "A parsed agent's model block no longer carries provider", which is true.

No regression found. The new constant spells no authoring shape the absence walk matches, and the commit touches no conversion, registry entry or generated output.

  • N4 (nit, PR body): the body's Verification list still reports check:empty-changeset at 0, and its What-changes list does not name the top-level guidance. Comment 7209908752 carries the declaration; the body is the lane seat's prose read.

Implemented-by: claude/project-thread-t0ls0u
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet objectstack-fleet Bot mentioned this pull request Nov 27, 2026
2 tasks
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head a610db7 · card #37712 · area s2-ai · 2026-11-27T05:09Z

L1 checklist

  • Shape and checks. l1-face.mjs --pr 37783 flags three items, each read:

    • changeset: the one @objectstack/objectql file is packages/objectql/src/metadata-validation-sweep.test.ts (+1 −1), a test that does not ship. No entry is owed.
    • all-checks: 60 success, 9 expected skips, and one failure, Check Changeset. Its only failed step is the foreign-changeset rule naming .changeset/37686-agent-model-name-optional.md, the DELIBERATE CORRECTION below. The count, ADR-0087 disposition and major-guard steps are green. Every type-check, lint, build and test lane is green.
    • dogfood: owed by the ! title and the (narrowing) arm. The thread ran the full battery on this head under the verify lock (pnpm --filter @objectstack/dogfood test, no shard, no path filter), reported on the card in os-dev-report 7210393919: 490 files passed, 3 skipped; 4144 tests passed, 68 skipped; no failure.
  • Contract review at CONTRACT_REVIEW_TIER.

    • 7209785394 at ef13630: PASS, with S1 and N1–N3 open.
    • 7210318602 at this head: PASS, No must-fix, no should-fix., with S1 and N1–N3 closed.

    The seat adopts the final record. What it confirms:

    • AgentSchema's top-level guidance.provider is now the retired-spelling sentence, matching the LONG_TERM_STORE_SPELLING_RETIRED precedent, with a pin that fails without it.
    • The conversion agent-model-provider-removed is correct on every stored shape and idempotent.
  • DELIBERATE CORRECTION of spec: an agent's model name becomes optional — absent means the environment's default model #37686's unreleased changeset. It is declared in PR comment 7209908752. The final record confirms it in those words, judging each of the three rewritten sentences as true against this head, and finds no other sentence of that note made false. The file keeps its name and frontmatter. This PR lands red on Check Changeset for that one step.

  • Fixes #37712 is right. No runtime read model.provider; the key is retired at both doors with a conversion, and the provider is the deployment's choice.

  • Declarations. Clause-②: no (narrowing), Metadata-protocol: narrowed, Skills-docs: follow-up #37796 (the skills card waits for this merge).

  • Docs read sentence by sentence. Both changesets, content/docs/ai/agents.mdx, content/docs/getting-started/common-patterns.mdx and the regenerated content/docs/references/ai/agent.mdx match the diff.

  • Governance. check-governed-merges.mjs on the final 43-file list: not governed, 726 changed lines. Tier S.

  • Follow-ups. model.topP's carrier card, the two cloud points and N4 (two stale lines in this PR body) go to review follow-ups of PR #37783 #37823.

Tier: S. Landing: ready + auto-merge by this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 27, 2026 05:09
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 27, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as draft November 27, 2026 05:26
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Tier H hand-off · 2026-11-27T05:26Z · head a610db7 · approver os-zhuang

席位更正: 前一条 ACCEPT(7210402548)把落地级别写成 Tier S,错了。这个 PR 声明 Clause-②: no (narrowing),按 2026-11-19 在 #35321 的裁定,收窄作者可写内容的 spec 改动由维护者落地,所以是 Tier H。合并队列的守卫因此把它踢了出来。现已退回 draft,交给你批准。ACCEPT 其余各条不变。

维护者速读

  • 改了什么: 代理(agent)定义里的 model.provider 退役。运行时从来没读过这个键,真正决定用哪家模型的是部署方的 AI 设置。现在 spec 不再接受它,已有元数据由 os migrate meta 的转换 agent-model-provider-removed 自动删掉并给出提示;直接写这个键会在两处入口被拒,提示说明改由部署设置决定。
  • 影响: 写代理的人和 AI 不会再以为写了 provider 就能换模型提供方。这是一处收窄,跟着 spec 的大版本(19)发布。
  • 请你留意:
  • 审核: 契约审核两轮(最高档),7209785394 PASS 后修了 S1 和三处小问题,增量 7210318602 PASS,没有必须改或建议改的项。dogfood 全套在这个 head 上通过(卡上 os-dev-report 7210393919)。
  • 要你做什么: 批准后由座位落地;或者你直接合并。撤回这一次合并即可恢复原样(转换只删一个运行时从不读的键)。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 27, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 27, 2026 05:28
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit f07d63a Nov 27, 2026
75 of 77 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-t0ls0u branch November 27, 2026 05:59
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…bjectstack-ai#37841)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuNTptyd1j97p7dHXZLEeH2g)_

Fixes objectstack-ai#37796

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:照我们技能包写应用的 AI 助手,以后在代理的模型配置里只写模型名,不再写“提供方”这一项;想用哪家提供方,到部署的
AI 设置里打开。
- 为什么做:“提供方”这一项今天已经退役,写了会被平台拒收,而对外发布的技能页还在教它;这是那次退役欠下的技能页跟进。
- 出错会怎样:只改教学文字和一道评测题,运行时不变;最坏是 AI 助手照旧文字给出过时写法,把文字改回即可撤回。
- 要你做什么:这是对外发布的技能包,需要你批准后才能合并。

## What changes

- **`skills/objectstack-ai/SKILL.md`, Model Configuration.** The
`provider` row leaves the agent model table. The paragraph above the
table now says the `model` block names a model and never a provider: the
deployment's AI settings choose the provider and match the model name
among the providers turned on, and a written `provider` is a parse error
whose fix is to delete the key (retired in protocol 19). The `model`,
`temperature` and `maxTokens` / `topP` rows are untouched.
- **The schema citation in the same paragraph** moves from
`packages/spec/src/ai/agent.zod.ts:37-45` to `:87-95`. PR objectstack-ai#37783 added
50 lines above the key list, so the old range pointed into a comment
block. `:87` is the `provider` tombstone and `:95` is `topP`.
- **`skills/objectstack-ai/evals/skills-tools-knowledge.json`, case 2.**
The prompt is unchanged: a copilot that should use Anthropic at
temperature 0.3 with a 2000-token cap. The expected answer now writes no
provider key, puts sampling under `model`, names the model in the
free-string `model` or leaves it to the host's default, and sends the
choice of Anthropic to the deployment's AI settings. `must_contain` goes
from `provider`, `anthropic`, `temperature`, `maxTokens` to
`temperature`, `maxTokens`, `deployment`. `must_not_contain` goes from
empty to the written line `provider: 'anthropic',`.
- **`.changeset/37796-skills-agent-model-provider-retired.md`**: one
`@objectstack/skills` patch.
- **`.changeset/37711-skills-agent-model-optional.md`**: a DELIBERATE
CORRECTION, declared below.

## Why

PR objectstack-ai#37783 (merge `f07d63a5`) retired an agent's `model.provider`. The
published skill still listed the key with its enum, and eval case 2
graded an answer as correct only when it wrote `provider`. An AI that
follows the skill would write a key the platform now refuses.

The Model Registry's own provider list (`ModelProviderSchema`) is a live
key and this PR does not describe it. Its only mention in the bundle was
inside the removed row.

## DELIBERATE CORRECTION

`Check Changeset` is red on purpose: this PR edits a pending release
note it did not add, `.changeset/37711-skills-agent-model-optional.md`
(from PR objectstack-ai#37765). That note ships in the same release as this change,
and two of its sentences would be false on release day.

Title, before:

> docs(skills): an agent's model name and provider are optional

Title, after:

> docs(skills): an agent's model name is optional

Body, before:

> `skills/objectstack-ai/SKILL.md` (Model Configuration) now teaches
that `model.model` is optional, and that an agent without one runs on
the host's default model for the environment, and that `model.provider`
is optional with no default (the deployment's choice) instead of
defaulting to `openai`. The inline enum list is unchanged, and the
schema citation now points at `packages/spec/src/ai/agent.zod.ts:37-45`.
The `objectstack-ai` eval case on sampling settings accepts an omitted
`model` and states the provider has no default. Published prose only: it
teaches the optional `model` / `provider` already on main since objectstack-ai#37697.

Body, after:

> `skills/objectstack-ai/SKILL.md` (Model Configuration) now teaches
that `model.model` is optional, and that an agent without one runs on
the host's default model for the environment. It no longer says
`model.provider` defaults to `openai`; the key itself leaves the page in
the same release (see the changeset on the skill no longer teaching
`model.provider`). The `objectstack-ai` eval case on sampling settings
accepts an omitted `model`. Published prose only: it teaches the
optional `model` already on main since objectstack-ai#37697.

The note's last sentence (the token budget) is unchanged. The precedent
is PR objectstack-ai#37783 itself, which corrected
`.changeset/37686-agent-model-name-optional.md` the same way.

## Tests

### Skill eval run (recorded)

`pnpm --filter @objectstack/scenarios skill-evals --skills
objectstack-ai --repeats 3 --concurrency 4`, on head `fb8b3f20`. 12
cases, 2 arms, 3 repeats: 72 of 72 turns ran in 8 min, none out of the
denominator. Subscription login, no API key, CLI 2.1.332, the login's
default model and effort.

| case | with-skill | no-skill |
|:--|--:|--:|
| **case 2 (this PR)** | **3/3** | **0/3** |
| bundle, all 12 cases | 30/36 (83%) | 1/36 (3%) |

Case 2, read answer by answer: all three with-skill answers put
`temperature` and `maxTokens` under `model`, write no provider key, and
send Anthropic to the deployment's AI settings. All three no-skill
answers write `provider: 'anthropic',` inside the `model` block, which
is the refused spelling.

<details>
<summary>Per-case table, round 2 (head fb8b3f2)</summary>

| case | with-skill | no-skill | with-skill missed | with-skill carried
forbidden |
|:--|--:|--:|:--|:--|
| objectstack-ai#1 | 3/3 | 1/3 |  |  |
| objectstack-ai#2 | 3/3 | 0/3 |  |  |
| objectstack-ai#3 | 3/3 | 0/3 |  |  |
| objectstack-ai#4 | 3/3 | 0/3 |  |  |
| objectstack-ai#5 | 2/3 | 0/3 | `aiExposed` |  |
| objectstack-ai#6 | 1/3 | 0/3 | `signed-in session` `refused` |  |
| objectstack-ai#7 | 0/3 | 0/3 | `do not retry` |  |
| objectstack-ai#8 | 3/3 | 0/3 |  |  |
| objectstack-ai#9 | 3/3 | 0/3 |  |  |
| objectstack-ai#10 | 3/3 | 0/3 |  |  |
| objectstack-ai#11 | 3/3 | 0/3 |  |  |
| objectstack-ai#12 | 3/3 | 0/3 |  |  |

</details>

<details>
<summary>Round 1 (head 789e0c7) and why the forbidden token
changed</summary>

The first commit graded case 2 with `must_not_contain: ["provider:"]`.
Round 1 scored it 1/3 with-skill. The two failing answers were correct:
each wrote no provider key and named the retired spelling only to warn
against it ("writing `provider: 'anthropic'` now fails to parse"). A
bare `provider:` graded that warning as a failure. The second commit
narrows the token to the object-literal line `provider: 'anthropic',`
(with its trailing comma), which a warning in prose does not carry and
every no-skill answer in round 2 does. The three round 1 with-skill
answers pass under the final tokens when read by hand.

Round 1's no-skill arm is not a clean baseline for case 2. The turns
inherited this container's project-memory variables, and all three
no-skill answers quoted the team's notes on the retirement. Round 2 was
started with `CLAUDE_COWORK_MEMORY_PATH_OVERRIDE` and
`CLAUDE_MEMORY_STORES` unset, and no case 2 answer mentions memory.

</details>

Cases 5, 6 and 7 are not touched by this PR. Their with-skill misses are
literal-phrase misses in both rounds and are listed under Acceptance
notes.

### Local gates, on head `fb8b3f20`

`node scripts/pm/dispatch-gates.mjs --commands` derived 49 families for
this diff. `--ran` reconciliation: 49 derived, 48 run, 1 NOT-MEASURED, 0
unrun.

- 47 exit 0, among them `check-skills-token-ratchet` (and its
self-test), `check:skill-identifier-liveness`, `check:skill-links`,
`check:skill-compatibility`, `check:skill-frame-sync`,
`check:pm-skill-id-lint`, `check:doc-authoring`, `check:nul-bytes`,
`check:published-files` and `@objectstack/spec` `check:skill-docs`.
- `node scripts/check-empty-changeset.mjs --base origin/main` exit 1:
the DELIBERATE CORRECTION above. It names
`.changeset/37711-skills-agent-model-optional.md` and nothing else.
- `pnpm check:dual-build-cjs-loads` exit 3, NOT MEASURED: it needs a
full `pnpm build`, and this container built only the scenario runner's
closure. CI runs it.
- Outside the derived set, also exit 0: `@objectstack/spec`
`check:skill-refs` and `check:skill-served-sections`.

### Size readings (`skills/**`)

| reading | before | after |
|:--|--:|--:|
| `skills/objectstack-ai/SKILL.md`, lines | 485 | 487 |
| `skills/objectstack-ai/SKILL.md`, tokens | 6801 | 6801 (ceiling 6801,
no row moved) |
| all `skills/*/SKILL.md`, lines | 4960 | 4962 |
| `evals/skills-tools-knowledge.json`, tokens (measured, not ratcheted)
| 3359 | 3411 |
| bundle total, tokens | 301302 | 301354 |

The new sentences in `SKILL.md` are paid for by the deleted row. The
bundle total grows by the eval fixture alone.

## Acceptance notes

- The branch is the harness-assigned `claude/project-thread-2rm2nh`, not
`claude/issue-37796-…`.
- The skill's `description` still lists "configuring an LLM provider"
among its triggers. Left as is: a user who asks that is now told where
the provider is chosen. Changing it would move when the skill loads,
which this card does not ask for.
- `SKILL.md:457` cites `packages/spec/src/ai/agent.zod.ts:234, :251` for
the `agent.tools` / `agent.knowledge` tombstones. Those lines did not
hold the tombstones before PR objectstack-ai#37783 either, so this PR leaves the
citation alone. Noted, not filed.
- Eval cases 6 and 7 miss literal phrases (`signed-in session`,
`refused`, `do not retry`) on the with-skill arm in both rounds, case 7
in all six turns. That reads as a grading-token question on those cases,
not as something this diff moved. Noted for the seat.
- The eval runner passes its whole environment to each turn, so a round
started inside a project container carries that project's memory into
both arms. Noted for the seat with the round 1 records as evidence.

## Verification

Read first, by risk:

1. `skills/objectstack-ai/SKILL.md`, the hunk under `## Model
Configuration`: three new sentences that ship to every customer install.
2. `skills/objectstack-ai/evals/skills-tools-knowledge.json`, case 2:
the token lists.
3. `.changeset/37711-skills-agent-model-optional.md`: the corrected
note.

Two-minute check: `sed -n '84,96p' packages/spec/src/ai/agent.zod.ts`
shows `provider: retiredKey(...)` at `:87` and `topP` at `:95`, the
range the skill now cites, and `node
scripts/check-skills-token-ratchet.mjs` prints
`skills/objectstack-ai/SKILL.md is 6801 tokens (ceiling 6801; headroom
0)`.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No schema change.)
- [x] 2. Every name I added uses the casing for its kind. (No name
added.)
- [ ] 3. No formatter ran. `pnpm lint` is read from CI on this
prose-only diff.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` is not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [ ] The *Before Submitting* list in CONTRIBUTING.md: lint and the test
jobs are read from CI; the rest is done.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgUjtV7ahUH66wxpMk7)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgUjtV7ahUH66wxpMk7

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
objectstack-ai#37812)

<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DG44bgtJm8kWx4oK68re6GX)_

Fixes objectstack-ai#37733

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:用户无感;查阅决策记录目录的人会看到「就记录问
AI」那条记录的状态说明换成了最新写法,写明它修订过不止一次(目录每格有长度上限,后半句照旧截断)。
- 为什么做:这条记录本周又修订了一次,目录由记录自动生成,却没有跟着重新生成;替查阅决策记录的人和读取目录的工具消除目录与记录的不一致。
- 出错会怎样:最多是目录里这一行文字不对,任何功能都不受影响;撤回这一次改动即恢复原样。
- 要你做什么:合入或批准这一次改动(决策记录目录属于须经你手的范围)。

## What changes

`docs/adr/README.md`, the generated ADR index, is regenerated with `node
scripts/adr-index.mjs`. One row moves: the status cell of ADR-0160.

| | ADR-0160 status cell |
|:---|:---|
| before | `Accepted — merged 2026-11-24 (PR objectstack#37115); amended
2026-11-25 (s…` |
| after | `Accepted — merged 2026-11-24 (PR objectstack#37115); amended
2026-11-25, 2…` |

- Cause: the `**Status**:` line of ADR-0160 was rewritten twice without
an index regeneration: by commit eec1040 (PR objectstack-ai#37573, `amended
2026-11-25 and 2026-11-26`) and then by commit 031a19d (PR objectstack-ai#37785,
which added the fifth and sixth amendments, `amended 2026-11-25,
2026-11-26 and 2026-11-27`). Both touched the record only. The index
projects that line clipped to the cell width, so the visible change is
the clipped tail.
- Diff: 1 file, +1 / −1 (line 230). No ADR body, no script, no other
index row.
- The file is generator output. Nothing in it is hand-edited or
hand-trimmed.
- No changeset: `docs/adr/**` ships in no released package, so this pull
request carries `skip-changeset`, declared on the create.

## Tests

No package is touched, so there is no build closure to make and no
package test or typecheck to run. The generator's own self-test ran
inside `pnpm check:adr-index`: 60 assertions, green.

## Acceptance notes

- Card acceptance, "`adr:index` regenerated on main; its check passes
with no other index change": `node scripts/adr-index.mjs --check` exits
1 (stale) on `main` and exits 0 on this branch at its head 4976072
(the area's re-run after objectstack-ai#37785 landed), and the net diff against `main`
is the ADR-0160 row alone. "No other index change" is a measured reading
here, not an assumption.
- Idempotent: a second `node scripts/adr-index.mjs` on the regenerated
tree prints `unchanged` and leaves the same blob (ef06360 at
4976072; 803949a was the first head's).
- The row does not show the new date itself. The generator clips the
status cell at a fixed width and the clip lands inside `, 2026-11-26 and
2026-11-27`.
- `main` moved while this was in flight. The branch carries one merge
commit, 0315963 (`main` at c826e8a, which brought in objectstack-ai#37785), and
the index was regenerated on top of it in 4976072. `main` has since
moved four more commits to 9b50fed (objectstack-ai#37798, objectstack-ai#37783, objectstack-ai#37821, objectstack-ai#37826);
none of them touches `docs/adr/`, `ui/docs/adr/` or the generator, so
the index stays current against today's `main`.
- Governed surface: `docs/adr/**` is Tier H. This pull request is opened
as a draft and is left as one; landing it is the maintainer's act.
- Noted, not filed: the index went stale with nothing red because its
check is report-only by ruling. The last index regeneration on `main`,
commit 972114d, did not carry the new ADR-0160 status text, so that
index was generated on a tree without eec1040 and the file then
text-merged. That is the expected cost of a report-only check, not a
defect.

## Verification

Read first, one file:

1. `docs/adr/README.md`, line 230, the only hunk of the net diff. The
risk to check is that the row is exactly what the generator prints for
the current `**Status**:` line of ADR-0160, and that nothing else moved.

Two-minute check: on this branch run `node scripts/adr-index.mjs
--check`. Expected: the line `adr-index: OK — docs/adr/README.md is
current and every record parsed.` and exit 0. On `main` the same command
prints `docs/adr/README.md is stale` and exits 1.

<details>
<summary>Premise on main (objectstack cac93cc, first head)</summary>

```text
$ node scripts/adr-index.mjs --check
adr-index: ✗ docs/adr/README.md is stale — run `node scripts/adr-index.mjs` (pnpm adr:index) and commit the result.
exit 1
```

</details>

<details>
<summary>Regeneration and its check (objectstack b234dce, first head;
re-run at 4976072 after the merge of main)</summary>

```text
$ node scripts/adr-index.mjs
adr-index: wrote docs/adr/README.md (251 lines).
exit 0
$ git diff --numstat
1	1	docs/adr/README.md
$ node scripts/adr-index.mjs --check
adr-index: OK — docs/adr/README.md is current and every record parsed.
exit 0
$ node scripts/adr-index.mjs
adr-index: unchanged docs/adr/README.md (251 lines).
exit 0
$ node scripts/pm/overlap-check.mjs
overlap-check: claude/area-o1C-37733 (b234dce) changes 1 file(s); against origin/main (44ccf94) and 0 PR head(s)
  ✓ origin/main: merges cleanly
VERDICT clean exit 0
```

</details>

<details>
<summary>Local gates on objectstack b234dce (first head): the 21
commands that dispatch-gates derives for this diff. The head 4976072
is judged by its check-runs: 25 success, 19 skipped, 0 failed</summary>

Each exit code was captured before any pipe. `node
scripts/pm/dispatch-gates.mjs --ran` answers: `21 derived famil(ies)
accounted for — 21 run, 0 NOT-MEASURED`, exit 0.

```text
exit 0  node scripts/check-adr-links.mjs
exit 0  node scripts/check-adr-links.mjs --self-test
exit 0  node scripts/check-closing-keyword-parity.mjs
exit 0  node scripts/check-closing-keyword-parity.mjs --self-test
exit 0  node scripts/check-comment-mask-corpus.mjs
exit 0  node scripts/ci/plan-test-core-shards.mjs --self-test
exit 0  pnpm --filter @objectstack/lint run check:doc-formula-expressions
exit 0  pnpm check:adr-anchors
exit 0  pnpm check:adr-index
exit 0  pnpm check:adr-symbol-anchors
exit 0  pnpm check:ci-filter-parity
exit 0  pnpm check:closed-ceremony-text
exit 0  pnpm check:cross-package-test-inputs
exit 0  pnpm check:doc-authoring
exit 0  pnpm check:driver-memory-census
exit 0  pnpm check:gitlink-declared
exit 0  pnpm check:nul-bytes
exit 0  pnpm check:pm-governed-merges
exit 0  pnpm check:pm-prior-rulings
exit 0  pnpm check:refd-timer-probe
exit 0  pnpm check:watch-hint-literal
```

`pnpm check:adr-index` printed: `adr-index --report: OK —
docs/adr/README.md is current, every record parsed, self-test 60
assertions green.`

The `check:doc-formula-expressions` line is its second run. The first
exited 3, PREREQUISITE NOT MET, because `@objectstack/formula` and
`@objectstack/lint` were not built in this worktree. Both were then
built under the shared verify lock (`VERDICT command-exit 0`) and the
gate was run again. Every other family is left to CI on this pull
request.

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP

<!-- signed: repo:objectstack#1 · os-elon-musk ·
session_016WV4cwoXEE1amuRAGHdPBs -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue protocol:ai size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spec: an agent's model.provider is declared but read by no runtime (enforce-or-remove)

3 participants