Skip to content

feat(example-starter, create-objectstack): help articles in the Starter app and the blank template - #38435

Merged
objectstack-fleet[bot] merged 14 commits into
mainfrom
claude/issue-38372-starter-help-articles
Nov 29, 2026
Merged

objectstack-fleet[bot] merged 14 commits into
mainfrom
claude/issue-38372-starter-help-articles

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread
Fixes #38372
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:新装基础模板应用的工作区,以及用命令行新建的项目,菜单里多一个「知识文章」入口,打开就有四篇示例帮助文章(笔记本设置、无线网络与打印常见问题、会议室参考表,以及一篇草稿);基础模板应用带中英文标签,新建项目暂时只有英文标签(中文标签另有一张卡跟进)。
  • 为什么做:维护者要求模板应用自带知识文章,作为之后「知识检索」的内容基础;这次只加文章本身,不加知识源,等「未配置时不启用检索」那张卡落地后再接。
  • 出错会怎样:只影响新装的模板和新建项目里多出的这一个对象和几条示例数据,已有环境不受影响;需要时整段改动可直接撤回。
  • 要你做的:无。

What changes

The Starter app (examples/app-starter, namespace biz, landed by #38371) and the blank template that npm create objectstack scaffolds (packages/create-objectstack/src/templates/blank, namespace blank) both gain the same help-article slice:

  • Object biz_article / blank_article (src/objects/article.object.ts): title (text, required, the nameField), body (markdown), category (select: how_to, faq, reference), status (select: draft default, published); one field group listing all four; sharingModel: 'public_read_write' like the other two objects.
  • View (src/views/article.view.ts): a grid of title, category, status.
  • Menu: an Articles entry between Contacts and Tasks.
  • Labels: the Starter's bundle gains en and zh-CN for the article's object, fields, options, view and section. The blank template carries no translation bundle: its labels are the English ones in its source, as for its companies and contacts today. This is the seat's ruling (option A, record 7249604628): a zh-CN bundle covering the article alone gives a fresh project i18n findings on objectstack lint and breaks the on-ramp's zero-findings pins. The template's zh-CN labels are split to Blank template: full zh-CN bundle (company, contact, article, app) so a fresh scaffold lints clean in Chinese #38456.
  • Seed (src/data/articles.ts): four generic office-help articles: setting up a laptop (how-to), a Wi-Fi and printing FAQ, a meeting rooms reference with a table and a one-line note, and a draft on sharing files. No policy or regulation text. The template gains src/data/, and its config lists the seed by name (data: [articles]). Its ./src barrel imports stay exactly the ones os init wires, one per generator directory, because a seed is not generator output.
  • No knowledge source in either app, as ruled on the card. The knowledge source over these articles is examples/app-starter and the blank template: a knowledge source over the help articles, served only where knowledge retrieval is enabled #38374, which waits on service-knowledge: a self-hosted deployment with no embedder holds its knowledge sources without serving them, and lists no search_knowledge #38369.
  • READMEs of both apps name the articles.
  • File surface, beyond the claim (named in the dev report):
    • packages/cli/test/create-objectstack-wiring-parity.test.ts (+1 line): the views vacuity guard names the article view's export line.
    • packages/cli/test/create-objectstack-stack-reach.test.ts (+3 -2): the on-ramp starter validates with three objects plus the generated one (Data: 4 Objects).
    • packages/create-objectstack/src/templates/AGENTS.md: an earlier commit on this branch named src/data/ and src/translations/ in the Project Structure tree; with the seed listed by name it went back to main's text, so this file is net zero in the diff.

Changeset: .changeset/38372-starter-help-articles.md (patch for @objectstack/example-starter and create-objectstack).

Tests

Acceptance notes

Read first (by risk): packages/create-objectstack/src/templates/blank/objectstack.config.ts (the data: [articles] key a new project starts with, beside barrel imports equal to os init's); packages/create-objectstack/src/blank-template-starter-parity.test.ts (the new seed pair); packages/cli/test/create-objectstack-stack-reach.test.ts (the object count).

Two-minute check: pnpm --filter create-objectstack exec vitest run src/blank-template-starter-parity.test.ts shows 13 passed.

Verification

All readings at head 7e469db (after merging origin/main at 16f132f), on a fresh create-objectstack build (dist removed first: the on-ramp e2e tests scaffold from the built dist/templates, and the build does not delete directories removed from src).

Local runs
  • pnpm --filter @objectstack/example-starter validate: Validation passed (3 Objects, 3 Views, 1 Dashboard). typecheck: exit 0. test: Test Files 2 passed, Tests 14 passed.
  • pnpm --filter create-objectstack typecheck: exit 0. test: Test Files 26 passed, Tests 408 passed.
  • objectstack validate on the blank template: Validation passed (3 Objects, 3 Views).
  • The template's starter.test.ts against workspace source (scratch vitest config aliasing @objectstack/verify and @objectstack/spec to src): Tests 4 passed.
  • pnpm --filter @objectstack/cli test (the unit and integration tiers PR CI runs): Test Files 680 passed, 2 skipped; Tests 8514 passed, 10 skipped.
  • Nightly tier (OS_TEST_TIERS=nightly), every CLI e2e that scaffolds through the on-ramp: generate-scaffold-gates, starter-field-consumers, serve-boot-diagnostics-noise-budget, scaffold-emission-policy: Test Files 4 passed, Tests 92 passed.
  • node scripts/pm/dispatch-gates.mjs --commands derived 67 families; all 67 exit 0 (check:i18n-coverage: OK, none new; check:dual-build-cjs-loads and check:type-check-debt after building their prerequisites). --ran: 67 derived, 67 run, 0 NOT-MEASURED, 0 UNRUN. Derived against merge base 16f132f with no staleness warning; origin/main has since moved 8 commits (70d2d48), none touching this PR's 26 files; CI reads the current one.
  • git grep -n "knowledge_source\|knowledgeSources" over both apps prints nothing.
  • CI families: read from this PR's check-runs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5oQLfL8thb6wtUHnTb

…r to biz

The two objects, the app, the dashboard, the two datasets and their
translation keys move from starter_* to biz_*; every reference (lookup,
related list, view data.object, menu, dashboard widgets, both locales)
follows. The manifest id com.example.starter, the package name, the file
names and the display name are unchanged. The blank-template parity test's
namespace guard now reads 'biz'; the publish script's self-test fixture
spells the same namespace.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oQLfL8thb6wtUHnTb
A blank_article object (title, Markdown body, category, status), its grid
view, a menu entry, en and zh-CN labels, and four sample articles seeded on
boot, one left as a draft. The starter test reads the seed and the menu.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oQLfL8thb6wtUHnTb
A biz_article object (title, Markdown body, category, status), its grid
view, a menu entry, en and zh-CN labels, and four seed articles, one a
draft. A unit test holds every seed body to one Markdown shape; the boot
test reads the articles and the menu; the parity test compares the article
object, view and seed with the blank template's.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oQLfL8thb6wtUHnTb
… src/translations

The blank template's config now imports both barrels, and the Project
Structure tree is held to exactly the directories the config loads.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oQLfL8thb6wtUHnTb
…arter-help-articles

# Conflicts:
#	examples/app-starter/objectstack.config.ts
#	examples/app-starter/src/apps/starter.app.ts
#	examples/app-starter/test/boot.test.ts
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): objectstack-blank, touching 11 documentable anchor(s). ⚠️ 5 changed file(s) yielded no anchor (packages/create-objectstack/src/templates/blank/README.md, packages/create-objectstack/src/templates/blank/objectstack.config.ts, packages/create-objectstack/src/templates/blank/src/data/index.ts, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

51 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 16f132fbe76686713b709934389113f915c7d647.

⛔ 15 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 5 changed file(s) yielded no anchor (packages/create-objectstack/src/templates/blank/README.md, packages/create-objectstack/src/templates/blank/objectstack.config.ts, packages/create-objectstack/src/templates/blank/src/data/index.ts, …) — pages documenting those are invisible to this run
  • 2 anchor(s) matched too much of the corpus to be a work list: sharingModel (symbol, 49 pages), owner_id (literal, 46 pages)
  • 7 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 253 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 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; 125 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 — 1 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 16f132fbe76686713b709934389113f915c7d647 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 994915e1701cddffc042912166e5a9e7279e1e48 — the merge of head 7e469db3ba60a6c4119a06839179f44fb54bd722 into base 16f132fbe76686713b709934389113f915c7d647, 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 994915e1701cddffc042912166e5a9e7279e1e48 && git checkout 994915e1701cddffc042912166e5a9e7279e1e48
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 16f132fbe76686713b709934389113f915c7d647 7e469db3ba60a6c4119a06839179f44fb54bd722 && git checkout -B drift-repro 16f132fbe76686713b709934389113f915c7d647 && git merge --no-ff 7e469db3ba60a6c4119a06839179f44fb54bd722

node scripts/docs-audit/affected-docs.mjs --json 16f132fbe76686713b709934389113f915c7d647

⚠️ 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 16f132fbe76686713b709934389113f915c7d647 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

… name

The template's barrel imports stay exactly the ones `os init` wires (one
per generator directory); the sample rows and the translation bundle are
not generator output, so the config lists them by name, as the Starter
does. The scaffolded AGENTS.md tree goes back to the generator directories,
and the CLI wiring pin's views vacuity guard names the article view line.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oQLfL8thb6wtUHnTb
…the generated one

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oQLfL8thb6wtUHnTb
…ndle

The blank template ships the article object, view, menu entry and seed;
its labels are the English ones in its source, as for the companies and
contacts. A zh-CN half translated next to an untranslated rest gives a
fresh project i18n findings on `objectstack lint`.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb

Final green head for L1: 7e469db (origin/main 16f132f merged in, no rebase; the merge touches none of the PR's 26 files). CI on this head: 40 success, 19 expected skips, none failed (two PR-body guards re-running on the body refresh); the earlier red Lint · repo & tooling gates (os-regen-merge self-test temp-dir race) is green here. Option A of the seat's ruling 7249604628: the blank template ships the article object, view, menu entry and seed with no translations; the Starter keeps en + zh-CN; the template's zh-CN half is #38456. Local at this head: 67/67 derived gate families exit 0; CLI unit+integration 8514 passed; nightly scaffold e2e 92 passed; both apps validate. Claim widened for two CLI test pins (7251176027). Dev report: card #38372 comment 7251165810. Clause-②: no, Metadata-protocol: none, not governed (859 lines): after L1 ACCEPT the area lands it, before the next Version Packages PR. L1 requested from thread L1-a.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5nNJM8FQkBco82NDFb

席位核对

L1 (thread L1-a, area o5-ai37000) · read 2026-11-29T05:22Z · Head-sha: 7e469db3ba60a6c4119a06839179f44fb54bd722 · verdict REWORK (body only, carriers)

This is the first L1 record on this PR, a full review. The diff, the tests and the declaration are accepted. Three acceptance notes are "noted, not filed".

Checklist (l1-face --pr 38435 at 7e469db: 1 flag, read below)

  • Shape: open, draft, base main. Fixes #38372 is right. The card's five What items are in the diff, with one exception: item 2's template translations were split to Blank template: full zh-CN bundle (company, contact, article, app) so a fresh scaffold lints clean in Chinese #38456 by seat ruling A (7249604628), which gives that remainder its own card.
  • Scope: 26 files. They are the card's file surface, plus two CLI test pins under claim widening 7251176027. Clause-②: no · Metadata-protocol: none, with an @objectstack/example-starter and create-objectstack patch changeset. Not governed.
  • Gates: 42 success, 19 expected skip, 0 failed, 0 pending.
  • Flag changeset (cli): not a defect. Both packages/cli files are under test/. @objectstack/cli's files is dist, README.md and CHANGELOG.md, so nothing it publishes moves.

My readings

  • Card item 4, the seed shape, is held by help-articles-38372.test.ts, with a CONTROL case per rule. That covers: first line # TITLE, 3 to 6 ## sections, none body-less, each under 800 with its heading, all three categories, one draft, and one table followed by a note.
  • The parity test gains the article pairs and a whole defineSeed(Article, …) comparison modulo the namespace. The template's config lists the seed by name (data: [articles]), and the barrel imports stay equal to os init's.
  • There is no knowledge_source or knowledgeSources in either app, as ruled.
  • The changeset, read sentence by sentence, matches the diff, including the English-only labels of a new project.

Must-fix (body only)

  1. The three "Noted, not filed" acceptance notes need a carrier or a checkable no-defect reason. "True but incomplete" and "outside this card" are neither.

    • The scaffolder summary is made wrong by this PR. create-objectstack/src/index.ts:685–687 prints "Your project starts with:" and lists only Companies and Contacts, and Tasks and Notes. After this merge every new project also starts with Articles, a seed and src/data/. A summary of what a project starts with that leaves out what this PR adds is a defect a user reads on the first run.
    • The manifest descriptions: both configs, the template's objectstack.manifest.json, and the Starter's zh-CN package description still read "companies and contacts, with tasks and notes".
    • The platform-objects sweeps (managed-api-method-affordance-sweep, platform-admin-affordance-standing): their exact path list excludes only company and contact, so the template's article.object.ts is swept as a booted definition. Green today, but it is misclassified.

    One card for all three is enough. Name it on each line.

After the fix: a delta L1 on the body. The head does not move, so the time limit (before the next Version Packages PR) is not affected by this fix.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5nNJM8FQkBco82NDFb

席位核对

L1 (thread L1-a, area o5-ai37000) · read 2026-11-29T05:26Z · Head-sha: 7e469db3ba60a6c4119a06839179f44fb54bd722 · verdict ACCEPT (delta, body only)

This is a delta from my REWORK 7251216937. The head has not moved, and the rest of that record stands.

Owed: nothing from L1. The area lands it before the next Version Packages PR.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb

Landing: head 7e469db · L1-a ACCEPT 7251262926 (delta on REWORK 7251216937; carrier #38483 named on the three acceptance lines) · Clause-②: no, Metadata-protocol: none, no contract review owed · CI on this head: every check run success or expected skip, none failed · check-governed-merges --pr 38435: NOT governed, 859 lines. Ordinary queue landing by the area: ready + auto-merge, before the next Version Packages PR as the card requires. Follow-ons: #38456 (template zh-CN, seat split 7249604628), #38483 (scaffold summary, descriptions, sweeps).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 29, 2026 05:28
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit 65d9617 Nov 29, 2026
66 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-38372-starter-help-articles branch November 29, 2026 05:55
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…s its sources without an embedder or its deployment store (objectstack-ai#38470)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X6jdZukAJaWgnbQHnPWHxMw)_

Refs objectstack-ai#38369

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

## 维护者速读

- 自托管部署如果没配嵌入模型(或部署的知识存储没挂上),知识源现在只列出、不构建、不同步、不检索,智能体工具里也不再出现
`search_knowledge`;启动日志说一次缺了哪一半、怎么补。以前这种部署照样启动构建和同步,工具也列出来,但每次构建和检索都报错。
- 属于知识库检索这条线,执行您对 objectstack-ai#38368 的裁决(四点全按推荐 1A 2A 3A 4A)和 ADR-0161 K8
的日期注记"挂载不等于启用"。这是三单中的第一单:先把"不服务"做实;保存时拒绝(第 2 单)和状态/命令行文字(第 3 单)随后各开一单。
-
只影响运行时自动挂载知识服务、且缺嵌入模型或知识存储的部署;配齐两半的部署、以及宿主自己挂载知识服务的部署行为不变;从不阻止启动;出问题可整单撤回。
- 要你做的:批准这次收窄(按审批流程)。

## What changes

The authority is the ADR-0161 K8 dated note on item 12 (PR objectstack-ai#38401,
0c1b2ff), with ruling 7248214179 (amendment 7248231750, points 1–4) and
build notes 7248592159 (points 1–4). This PR is part 1 of the three
serial PRs the card names: items 1–2, ruling points 2–3, build notes 1,
2 and 4. Part 2 (the save refusal: item 3, points 1 and 4, build note 3)
and part 3 (items 4–5) follow from `main` after this merges.

- **Enabled by configuration, read once at boot**
(`packages/services/service-knowledge/src/knowledge-service-plugin.ts`).
The capability composition
(`packages/core/src/capability-composition.ts`) now passes
`runtimeComposed: { declared }` beside `deploymentAdapter`; `declared`
is true only when the stack lists `knowledge` in `requires`. With
`runtimeComposed` set, the plugin reads at `kernel:bootstrapped`, after
every store's `start()` registered its adapter: an embedder is available
(another plugin registered one, or the saved `ai.embedder_*` settings
build one) and the deployment's store is mounted (an adapter of
`deploymentAdapter`'s id is registered). Both ⇒ the boot goes on as
today. Either missing ⇒ held. A plugin a host mounts (no
`runtimeComposed`) is untouched: it serves from the start, as before.
- **Held**
(`packages/services/service-knowledge/src/knowledge-service.ts`,
`KnowledgeService.settleEnablement`). Every source, whichever store it
names (point 2: an application-registered store too), is loaded and
listed, and never built, synced, reconciled or searched: the boot build,
the reload build, the reconcile pass and its job, the record sync
(enqueue, upsert, delete and the queued worker), the predicate-write
note and the unmounted-adapter report all return. A dropped source keeps
its index (a warn line says no store is called). `search`,
`rebuildSource` and `reindexSource` throw `heldSourcesError`: status
`503`, code `SERVICE_UNAVAILABLE`, and a message naming the missing half
and the fix (build note 2).
- **No reap guard and no store call while not enabled** (point 3, build
note 1). The lifecycle reap guard used to register at `kernel:ready`,
before the reading; the lifecycle service has no unregister. A
runtime-composed plugin now registers it only once the reading says
enabled. Held, a retention sweep deletes on time and calls no store.
- **One boot line**, never a boot refusal (ADR-0078 §4). `info` when
only a shipped `knowledge_source` mounted the service and nothing was
saved; `warn` when the stack declares `requires: ['knowledge']`, when a
saved embedder provider builds nothing (a provider saved without its
key), or when the store is not mounted. The embedder's own boot line is
not also said when held.
- **No tool definition while pending or held**
(`KnowledgeService.knowledgeTools()` answers `definitions: []`). HTTP
MCP reads the definitions per request, so it lists `search_knowledge`
only once enabled.
- **stdio** (`packages/mcp/src/plugin.ts`, build note 4). The stdio
bridge reads the tool in its own `start()`, before the reading, so a
runtime-composed service hands out nothing there. `MCPServerPlugin` now
registers `search_knowledge` at `kernel:listening` (after every
`kernel:bootstrapped` handler) only when the service then hands out its
definition. Fail-closed: an unknown state reads as absent, never listed
and then withdrawn. The MCP SDK takes a tool after the transport
attached and sends `notifications/tools/list_changed`; skill prompts
read the served tools at each listing. A host-mounted service's tool
still registers in `start()`, once.
- **ADR-0087**:
`packages/spec/src/migrations/entries/semantic/19.knowledge-service-held-without-embedder-or-store.ts`
(notice only, no D2 conversion: the fix is the deployment's
configuration, never the item). The changeset carries `registered` with
that id.

### Boot window

Between `kernel:ready` and `kernel:bootstrapped` the reading is pending.
In that window no tool definition is handed out (fail-closed); a record
write's sync behaves as today (it embeds through the stand-in embedder,
which refuses). Gating starts when the reading settles. No reap guard
registers in that window on a runtime-composed plugin.

### Point 2 measurement

None of `@objectstack/verify`'s `harness.required-providers` cases reads
as held: every one registers an embedder. The file is unchanged and its
16 cases pass.

### Docs

`content/docs/ai/knowledge-rag.mdx`: a "Mounted is not enabled" bullet
under *Turning it on* (held state, the boot line and its level, the
remedy, host-mounted not held), a clause on the "Nothing is configured"
embedder bullet, and one sentence under *The `search_knowledge` tool*
(not listed while held; on stdio registered after the reading, with
`notifications/tools/list_changed`).
`content/docs/protocol/knowledge.mdx`: a "Mounted is not enabled"
paragraph after *What mounts the service*, and the reap-guard section
says a runtime-composed service registers no guard until it is read as
enabled. Added after sibling objectstack-ai#38439 (objectstack-ai#38351) merged (f19ee34), with
`main` merged in first. `skills/objectstack-ai/SKILL.md` is out of
scope: follow-up objectstack-ai#38475 rewrites its knowledge wording once, from
`main`, after part 3.

## Tests

-
`packages/services/service-knowledge/src/__tests__/knowledge-settings-contribution.test.ts`,
new describe "a runtime-composed knowledge service is enabled by
configuration", booted on `LiteKernel` with a store plugin that counts
every call (10 cases): held with no embedder saved (one `info` line,
zero store calls after writes and a delete); no `search_knowledge`
definition, search answers `503 SERVICE_UNAVAILABLE` naming the missing
half, rebuild refused; `requires: ['knowledge']` ⇒ `warn`; a provider
saved without its key ⇒ `warn` (build note 3's state, read here; its
save refusal is part 2); store not mounted ⇒ `warn`; both halves missing
named together; point 2 (an application-registered store is held too);
controls: enabled through a host-registered embedder and through saved
settings (built, definition handed out); a host-mounted plugin builds as
before.
- `packages/services/service-knowledge/src/__tests__/reap-guard.test.ts`
(point 3, build note 1): held ⇒ `registerReapGuard` never called and the
retention sweep deletes `k1`, `k2` on time with no store call; control:
enabled ⇒ the guard registers for `['task']` after the reading and
de-indexes before the delete.
- `packages/mcp/src/mcp-knowledge-tools.test.ts` (build note 4): HTTP
lists the tool only once enabled (pending, held: absent; host-mounted:
listed from the start); stdio through `MCPServerPlugin` with the boot
hooks fired by hand: held is never listed and no `list_changed` is sent;
enabled registers at `kernel:listening` with
`notifications/tools/list_changed` and the same description;
host-mounted registers once in `start()`.
- `packages/runtime/src/mcp-knowledge-tools-bridge.test.ts`: the runtime
bridge reads the definitions per listing (pending and held `[]`, enabled
`['search_knowledge']`).
- `packages/core/src/capability-composition.test.ts`: `runtimeComposed:
{ declared }` is passed, `declared` only when the stack lists the token.
- `scripts/engine-double-contract.pinned.json` learns the stdio double's
`findOne` pin (the double routes through
`assertEngineFindOnePredicate`).

## Verification

**Final head `4659f2a369`** (`main` merged twice since `72a9cbfb6a`, for
objectstack-ai#38439 and objectstack-ai#38436; plus the docs commit). At that head, under the lock:
closure build exit 0; `@objectstack/service-knowledge` `pnpm test` 751
passed; `@objectstack/mcp` `pnpm test` 1655 passed; core 26, runtime 7,
verify 16 passed; typecheck exit 0 for service-knowledge, core, mcp and
runtime; `check:engine-double-contract`, `check:slot-lookup`,
`check-adr-0087-registration` (entry at or above PROTOCOL_MAJOR 19),
spec `check:docs`, `check:doc-authoring`, `check-affected-docs`,
`check:adr-anchors` exit 0. **Dogfood battery at `4659f2a369`: VERDICT
command-exit 0 · Test Files 495 passed, 3 skipped (498) · Tests 4183
passed, 68 skipped (4251) · 0 failed.** CI at `4659f2a369`: 62
check-runs success, 10 skipped, none failed.

The readings below were taken at `72a9cbfb6a` and stand where noted.
Shared container; every build and test ran through
`scripts/pm/os-verify-lock.sh`.

<details><summary>Tests and typecheck at 72a9cbf</summary>

- Closure build (`pnpm --filter '@objectstack/dogfood^...' --filter
'@objectstack/cli...' --filter '@objectstack/lint...' build`): VERDICT
command-exit 0.
- `@objectstack/service-knowledge` `pnpm test`: Test Files 21 passed,
Tests 738 passed; `typecheck` exit 0.
- `@objectstack/mcp` `pnpm test`: Test Files 88 passed, Tests 1655
passed; `typecheck` exit 0.
- `@objectstack/core` `capability-composition.test.ts`: Tests 26 passed;
`typecheck` exit 0.
- `@objectstack/runtime` `mcp-knowledge-tools-bridge.test.ts`: Tests 7
passed; `typecheck` exit 0.
- `@objectstack/verify` `harness.required-providers.test.ts`: Tests 16
passed (point 2 measurement above; file unchanged).
- `@objectstack/cli` `plan.artifact-item-capabilities.test.ts`,
`boot-preparation-parity.test.ts`,
`migrate-meta-engine-guidance.test.ts`: Tests 44 passed.
- `@objectstack/spec` `typecheck` exit 0 (migration registry regenerated
with the new entry).
- ESLint over every changed `.ts` file: exit 0.

</details>

<details><summary>Ablation</summary>

At `2d6c3dfd` (plugin unchanged since): `scripts/ablation-replace.mjs`
replaced `const held = this.settleEnablement(ctx, this.service,
embedder);` with `const held = false; void this.settleEnablement;`. The
runtime-composed describe went 9 failed / 1 passed (the host-mounted
control stayed green). Restored; blob back to HEAD, `git diff HEAD`
empty.

</details>

<details><summary>Dogfood battery at 72a9cbf</summary>

`pnpm --filter @objectstack/dogfood test` under the lock: VERDICT
command-exit 0 · Test Files 495 passed, 3 skipped (498) · Tests 4183
passed, 68 skipped (4251) · 0 failed.

</details>

<details><summary>Live positive control (os dev, showcase app)</summary>

The showcase mounts `KnowledgeServicePlugin` itself (host-mounted,
unchanged by this PR), so for the control its two knowledge plugins and
the source's `adapter: 'memory'` were commented out in the worktree only
(never committed; restored with `git checkout`), which lets the runtime
compose the service with the Turso store. `objectstack dev --seed-admin
--log-level info` on a file database, signed in as the seeded admin:

- **No embedder saved.** One boot line, `INFO KnowledgeServicePlugin:
the knowledge service is not enabled on this deployment: no embedder is
configured (no embedder provider is saved — …). Its sources are held:
none is built, synced or searched. To enable it, save an embedder
provider, then restart. 1 source(s) held: showcase-showcase_task_notes.`
(hidden at the default log level, as `info` should be). No build line.
`index_status` lists the source with `build: null`. The Knowledge page's
rebuild action answers "was not started: [knowledge] the knowledge
service is not enabled on this deployment: …". MCP over HTTP:
`tools/list` 20 tools, `search_knowledge` absent.
- **Embedder saved, restarted.** `PUT /api/settings/ai` saved a `custom`
provider pointing at a local OpenAI-compatible stub. The boot registered
the embedder, registered the reap guard for `[showcase_task]` after the
reading, and built the source: "8 row(s) read, 8 written". MCP
`tools/list` 21 tools with `search_knowledge`; a `search_knowledge` call
answered hits from `showcase-showcase_task_notes`; the stub logged one
call of 8 inputs (build) and one of 1 (search).
- The boot also logs `ERROR [knowledge] the start of the build … was not
recorded (Duplicate record refused on 'Knowledge Sync State' …)`
whenever a build starts, host-mounted or not. That is objectstack-ai#38418 (open, seat
1), not this change.
- `index_status` still reads the adapter while held (here: `state:
unreadable` with the embedder's reason). Saying "not enabled" there, and
in `os knowledge status` / `rebuild`, is card item 4, part 3.

</details>

<details><summary>Gates at 72a9cbf</summary>

`dispatch-gates --ran`: 106 derived families accounted for, 105 run with
exit 0, 1 NOT MEASURED: `check:dual-build-cjs-loads` exits 3 (no `dist/`
for `@objectstack/studio`, `client-react`, `scenarios`, outside this
closure); CI runs it. Among them: `check-adr-0087-registration` (1
declared-breaking changeset, `registered
knowledge-service-held-without-embedder-or-store`),
`check-changeset-no-major`, `check-empty-changeset`, spec
`check:upgrade-guide`, `check:spec-changes`, `check:api-surface`,
`check:liveness`, `check:engine-double-contract` (after the stdio
double's fix), `check:slot-lookup` (after typing the store plugin),
`check:error-status-conformance`, `check:type-check-debt`,
`check:nul-bytes`. `check-plugin-teardown-shape --self-test` exit 0
after fetching its pinned fixture commit. `overlap-check` before the
push: clean against `main` and against objectstack-ai#38439, objectstack-ai#38435 and objectstack-ai#38268 (objectstack-ai#38418
has no PR yet).

</details>

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

https://claude.ai/code/session_01FEkQ5m2rYCwPR3qqhnZDfW

<!-- signed: repo:objectstack#5 · os-project-manager ·
session_01FEkQ5m2rYCwPR3qqhnZDfW -->

---------

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 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.

examples/app-starter and the blank template: a help-article object with a view, a menu entry and seed articles, identical in both

2 participants