Skip to content

[WIP] Add Chinese version of the documentation - #13

Merged
huangyiirene merged 7 commits into
mainfrom
copilot/add-chinese-version
Jan 19, 2026
Merged

huangyiirene merged 7 commits into
mainfrom
copilot/add-chinese-version

Conversation

Copilot AI commented Jan 19, 2026 •

Copy link
Copy Markdown
Contributor

Plan: Add Chinese (cn) Translations

  • Understand the repository structure and i18n configuration
  • Create Chinese translation for main index page (index.cn.mdx)
  • Create Chinese translations for meta.json files (meta.cn.json)
    • Root docs meta.cn.json
    • Guides meta.cn.json
    • Concepts meta.cn.json
    • Specifications meta.cn.json (root and subcategories)
  • Create Chinese translations for guide pages
    • getting-started.cn.mdx
    • installation.cn.mdx
    • project-structure.cn.mdx
  • Create Chinese translations for concept pages
    • manifesto.cn.mdx
    • core-values.cn.mdx
    • architecture.cn.mdx
    • enterprise-patterns.cn.mdx
    • terminology.cn.mdx
    • security_architecture.cn.mdx
    • ai-codex.cn.mdx
  • Create Chinese translations for specification pages
    • Specifications meta files (all subcategories)
    • Key specification files (architecture files for data/ui/server)
  • Test the documentation site with Chinese translations
  • Code review and final verification

Note: The references/ directory is auto-generated from JSON schemas and should NOT be translated as per the requirements.

Translation Coverage:

  • ✅ Complete: Index, Guides, Concepts, Specification meta files
  • ✅ Key pages: All main architecture documents
  • ℹ️ Remaining specification pages can be translated as needed in the future
Original prompt

添加中文版本,注意自动生成的文档不需要处理references


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel

vercel Bot commented Jan 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
spec Ready Ready Preview, Comment Jan 19, 2026 0:00am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…ecture docs

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI and others added 2 commits January 19, 2026 11:56
- Fixed security_architecture.cn.mdx: Properly escaped Chinese quotation marks in description field
- Fixed index.cn.mdx: Replaced Chinese quotation marks with angle quotation marks (「」) in JSX attribute
- Build now passes successfully

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
@huangyiirene
huangyiirene marked this pull request as ready for review January 19, 2026 12:00
@huangyiirene
huangyiirene merged commit db38b58 into main Jan 19, 2026
akarma-synetal pushed a commit to akarma-synetal/framework that referenced this pull request Aug 3, 2026
…objectstack-ai#3723 follow-up) (objectstack-ai#4575)

An accepted ADR is only binding if the code it binds points back at it.

objectstack-ai#3723 is the proof. Three accepted ADRs said the same thing — ADR-0057 D4
("never as the authority for RBAC"), ADR-0090 D3's word ban ("distribution =
position"), ADR-0095 D3 ("no enforcement-time code path may consult the
better-auth role") — and a patch-level changeset reversed all three by making
app-declared names storable in `sys_member.role`. A follow-up then made the
derivation automatic in every host. The reversal held for a day; the tracking
issue was closed, reopened and rewritten three times while the cause moved.

The mechanism was not carelessness. `auth-manager.ts` cited ADR-0105 D8 (why
`delegated_admin` is registered) and said nothing about why the app-role loop
beside it was a violation. Reading that file, an author — human or agent —
could not have known. In a repo worked by many agents in parallel, nobody
greps the ADR corpus before an edit; the constraint has to be where the edit is.

So: a curated map of file → governing ADR ids + the invariant, and a check that
the ids still appear in the file. Deliberately dumb — it is a presence check,
not a proof of obedience (no static check can be that). Its value is the
failure text, which states the INVARIANT rather than "put this string back",
and that it fires on exactly the diff worth a second look: someone rewriting a
governed block and dropping the rationale with it.

Seeded with 8 anchors, all in the incident's blast radius: the membership-role
cluster (spec, auth-manager, auth-plugin, both platform objects), the authz
resolver, the delegated-admin gate, the invitation role cap. Deliberately not
more — a map of everything is a map of nothing, and each entry must earn its
failure mode.

Also AGENTS.md Prime Directive objectstack-ai#13: reversing a recorded decision is itself a
decision and needs a superseding ADR, not a changeset that quietly does the
opposite; and when you implement an ADR, leave its id in the code.

Verified by temporarily stripping `ADR-0108` from auth-manager.ts (fails, with
the invariant), plus the missing-file, withdrawn-ADR (0107) and malformed-id
paths.


Claude-Session: https://claude.ai/code/session_0186LhwkUBupmLJUUAMda5hU

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
… break-glass password (objectstack-ai#33248)

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

Refs objectstack-ai#33203

> **Tier H (`docs/adr/**`).** This record lands only by the maintainer's
hand or an authorized approval. It pairs with the code PR for objectstack-ai#33203;
the seat lands the two together after the maintainer's word.

## 维护者速读

- 改了什么:ADR-0135 D5.2
加一条注记:托管环境(`OS_CLOUD_MANAGED=1`)不再保留「应急本地密码」,任何人(含平台管理员)都不能设本地密码;自托管不变。
- 为什么改:objectstack-ai#33203 的代码按 cloud#4465 裁决 10 关掉托管上的两个设密码入口,而 D5.2
原文写着「Break-glass keeps a local credential reachable」。按 AGENTS.md 第 13
条,推翻已接受 ADR 的行为必须同时改 ADR。
- 风险与回滚:只改文档;回滚即还原本 PR。
- 需要你做的:同意这条注记(或改写),然后和代码 PR 一起落地。

## What changes

`docs/adr/0135-identity-and-access-architecture.md`: one note under
D5.2. On a cloud-managed environment the break-glass bullet does not
apply: `admin/set-user-password` refuses every target and
`set-initial-password` refuses every signed-in caller, a platform
administrator included. Self-hosted deployments keep D5.2 as written.
Cloud ADR-0024's own text is not amended here.

## Why

Ruling 10 of objectstack-ai/cloud#4465 (hosted has no local break-glass
administrator; no local password for anyone), quoted on objectstack-ai#33181 and
objectstack-ai#33183. The code PR for objectstack-ai#33203 implements it. Prime Directive objectstack-ai#13:
reversing a recorded decision needs the record amended.

## Verification

Docs only; nothing publishes, so no changeset (`skip-changeset`).

Clause-②: no
Metadata-protocol: none

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(Not touched.)
- [x] 2. Every name I added uses the casing for its kind. (None added.)
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request. (The ADR half of objectstack-ai#33203, split so the code does not wait on the
Tier H approval.)
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset. (Publishes
nothing.)
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (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 维护者速读 section is
the frame's Chinese summary.)
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

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

https://claude.ai/code/session_016WV4d1NJYFGVi2FRztyBNo

---------

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

<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8E7nn7vpAyMKtKMup2XHy9u)_
Part of objectstack-ai#36753 — card item 4, the last code-side item. The card stays
open after this merges: its macOS acceptance items 1–2 need a person on
a Mac, and the seat moves the card to a maintainer check.

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:用户无感;界面代码的编写规则里多了一条:组件文件和它的辅助文件不能只靠首字母大小写区分。
- 为什么做:属于「运行界面的设计模式」专题,是 Mac
上控制台打包失败那张卡的最后一项;改名和自动检查已在上一个合并里落地,这一条让写代码的人和 AI 事先知道规则。
- 出错会怎样:只加一行规则文字,不改任何代码;撤回这一个合并即恢复原样。
- 要你做什么:这是受管文件,需要 os-zhuang 批准后才能合并;合并后卡片不自动关闭,留给有 Mac 的人验收打包和三个页面。

## What changes

One line in `ui/AGENTS.md` § 5 Coding Standards, after objectstack-ai#13 — card item
4:

> **objectstack-ai#14 — A component file and its helper never differ only by letter
case.** `Foo.tsx` beside `foo.ts` is ONE module on a case-insensitive
file system (macOS, Windows): `./Foo.js` resolves to the helper, so the
type build and the console bundle break there while Linux CI stays
green. Give the helper a suffix (`fooModel.ts`). At the repository root,
`pnpm check:gitlink-declared` runs
`scripts/check-case-colliding-paths.mjs`, which refuses any two entries
in one directory whose names, with the last extension dropped, differ
only by case.

Per that file's objectstack-ai#9, the rule points at the instrument that re-derives it
(the gate landed in the previous PR for this card) and writes down no
count. It cites no tracker number.

Governed surface: `ui/AGENTS.md` is Tier H. This PR stays a draft for
the seat's contract review and the maintainer's approval.

## Tests

<details><summary>Derived gates for this diff, all exit 0 at head
fd1db47</summary>

`node scripts/pm/dispatch-gates.mjs --commands` derived 16 commands for
this diff; each ran locally, exit 0 (the full set on the first head's
tree, which differs from `fd1db479` by four words in this one line):
`check-closing-keyword-parity.mjs` (+ `--self-test`),
`check-comment-mask-corpus.mjs`, `pnpm check:adr-anchors`,
`check:agent-test-spelling`, `check:driver-memory-census`,
`check:gitlink-declared`, `check:nul-bytes`, `check:pm-governed-merges`,
`check:published-files`, `check:refd-timer-probe`,
`check:registry-log-declared`, `check:rest-log-spy-declared`,
`check:tier-file-adoption`, `check:undeclared-dep-imports`,
`check:watch-hint-literal`.

At `fd1db479` (the contract review's round-1 fix: the line now says the
command and the script are at the repository root, since `ui/AGENTS.md`
reads paths relative to `ui/`), the gates that read the file's text
re-ran, exit 0: `check:agent-test-spelling`,
`check-closing-keyword-parity.mjs`, `check:nul-bytes`,
`check-comment-mask-corpus.mjs`.

</details>

## Acceptance notes

- Card acceptance 1–2 (a clean console build on macOS, and the record
page, 「编辑应用」 into design mode and 「配置页签」 opening in that build) need a
human on a Mac; NOT MEASURED in this Linux container. The renames that
fix it merged in the previous PR for this card; its CI (Type Check UI,
Build & E2E UI, Test UI) was green on Linux.
- Card acceptance 3 (a planted `Foo.tsx` + `foo.ts` reds on Linux) and 4
(the PR lists the renames, the scan and where the check runs) were
measured and recorded on the previous PR.
- `skip-changeset`: `ui/AGENTS.md` is in no published package's
`files[]` (the `ui/` workspace root is private).

## Verification

Read the one added line in `ui/AGENTS.md` § 5 and run `pnpm
check:gitlink-declared`: it prints `check-case-colliding-paths: OK (… 0
case-colliding group(s))`.

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

<!-- signed: repo:objectstack#1 · os-warren ·
session_01JQwxbXnuzDBbW3qeZ7Kfkc -->

---------

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

<!-- claude-projects-attribution: {"github_login":"huangyiirene"} -->
_Requested by **Irene** · [project
thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67x8Be2AAcUBhodBsvnWLd3Xs)_

Fixes objectstack-ai#36086

Clause-②: no
Metadata-protocol: none

## 维护者速读
-
用户能看到什么变化:用户无感;十二份内部设计记录在与现行代码不一致的地方各加一条注明日期的补注,原决定文字不动,只有访客模型里一句已被裁决撤回的接口说明照裁决改掉。
- 为什么做:这是本周的设计记录修订合集;AI 席位改代码前会读这些记录,这十五处已与上线代码不一致,会把 AI 带偏。
- 出错会怎样:只改说明文字,不动代码和功能;补注若写错,读记录的 AI 和人会拿到错误说明,整个合并可以直接撤回。
- 要你做什么:审阅后批准一次(设计记录必须由你亲手批)。

## What changes

Seventeen append-only dated notes, for the 15 rows of this week's card
whose code is on `main`, in twelve records. Each note sits directly
under the passage it amends, says what `main` does now, and links its
card and its landing PR. One clause is rewritten, in ADR-0138, as its
row and the ruling on it ask. No other decision text is rewritten,
struck or reordered. Six records whose header indexes their amendments
gain a pointer entry there (ADR-0050, 0066, 0090, 0138, 0151, 0158).

| # | ADR · section | What it said | What `main` does | Landing PR |
Note location |
|:--|:--|:--|:--|:--|:--|
| 1 | ADR-0158 · Open item 12 | Which aggregates count as "raw" is left
to the aggregate card | `sum`, `avg`, `min` and `max` over a
`record`-mode quantity are refused unless the query groups by the
quantity's own `unitField`: ObjectQL aggregate `INVALID_FIELD` / 400,
`summary` field `INVALID_METADATA` / 422, cube measure `INVALID_FIELD` /
400 on each query. `count`, `count_distinct`, a `fixed`-mode quantity
and a plain number are not judged. No error code is added | objectstack-ai#36060 |
under Open item 12; status entry |
| 2 | ADR-0066 · D2 ⑧ | View All and Modify All are the bits that vote
on every field of an object | A set may carry `viewAllFields`: a read
vote, never an edit vote, on every field of the object. The set's own
`readable: false` row beats it. It grants no object access, no record
and no admin posture | objectstack-ai#36085 | under D2 ⑧, after the 2026-11-15 note;
status entry |
| 3 | ADR-0090 · D5 | The high-privilege list refused on an `everyone`
binding | The list gains `viewAllFields` on any object entry | objectstack-ai#36085 |
under D5; status entry |
| 4 | ADR-0090 · D12, condition (a) | No `viewAllRecords` or
`modifyAllRecords` on `'*'` | Condition (a) also refuses `viewAllFields`
on `'*'`; the bit on a named object stays inside the boundary | objectstack-ai#36085 |
under D12's 2026-10-17 amendment |
| 5 | ADR-0151 · D3 | The bits the agent ceiling removes | The clamp
also clears `viewAllFields` on every object entry; assigning a set that
carries it to an account is refused by name | objectstack-ai#36085 | under D3; header
entry |
| 6 | ADR-0050 · Decision 2, the 2026-10-20 note | "a per-list open
mode, if ever wanted, is the list's existing `navigation.mode`" | On an
object's list `navigation.mode` is deprecated and no longer picks how a
record opens: the name opens the full page, the hover icon the side
panel. `none` still means the rows open nothing. A page block still
honours every value | objectstack-ai#35910 | under Decision 2, after the 2026-10-20
note; status entry |
| 7 | ADR-0050 · the same note | The create form is chosen by convention
from the object's form views | The console's record create and edit
forms are the object's own, laid out by `fieldGroups`, less a
`showOnCreate: false` field on a create. An internal form view steers
nothing there. A public form and a named form an action opens keep their
own definition | objectstack-ai#36543 | second note under Decision 2 |
| 8 | ADR-0052 · section 5b, tier 1 | "Opt-in (like Feed Tracking) keeps
the stream from becoming change-noise" | Old and new values show by
default. Off per object with `enable.fieldHistory: false`, per field
with `fieldHistory: false`. An entry serves a field's values only to a
reader who is served that field | objectstack-ai#36399, objectstack-ai#36580, objectstack-ai#36613, objectstack-ai#36641, objectstack-ai#36661
| under tier 1 |
| 9 | ADR-0146 · D1 | Studio is where metadata is edited | A workspace
administrator also edits in the running app: the menu and the pinned
header actions in design mode, a dashboard on its page, a report on its
builder page, a view's settings on the view. Each save is one item's
draft and publish, and writes nothing over a pending draft | objectstack-ai#36397,
objectstack-ai#36437, objectstack-ai#36629, objectstack-ai#36405, objectstack-ai#36644, objectstack-ai#36411, objectstack-ai#36848 | end of D1, after the
2026-11-24 amendment's table |
| 10 | ADR-0146 · D5 (two card rows) | The bridge draws on the app
switcher row and the app bar entry | From 768 px up the entries are two
rows of the app-name menu. "Design layout" turns on design mode. "Edit
app" opens Studio, and reads "View in Studio" for a read-only package.
The page header draws neither | objectstack-ai#36437, objectstack-ai#36621, objectstack-ai#36789 | under D5 |
| 11 | ADR-0146 · D10, the 2026-11-22 note | An extension places only
what it brings; the base's arrangement stays the base's | The App's
paired `.custom` package may declare whole `fieldGroups` and
`relatedLists`. Each key it writes replaces the folded result whole. Any
other package is refused and prescribed `place` | objectstack-ai#36517 | under D10,
after the 2026-11-22 note |
| 12 | ADR-0146 · D10, the same note | (the same) | `actionLayout` is
the third such key. Only the paired `.custom` package writes it on an
extension. Each arm it writes replaces the served arm whole. The server
refuses the shape; the reference is refused by design mode's Save and by
the CLI rule only | objectstack-ai#36629 | second note under D10 |
| 13 | ADR-0138 · D2, the 2026-11-20 amendment | The restriction profile
is served on the unscoped route "and its environment-scoped twin" | Only
the unscoped route is mounted. A request to the twin gets the host's
ordinary not-found answer. A server that mounts the scoped base alone
serves no profile | objectstack-ai#36531 | the clause is rewritten in place; a dated
amendment under it; status entry |
| 14 | ADR-0149 · D3, rules 4 and 5 | Both rules apply to an unknown
word beside a grouping word; the record did not say which governs | Rule
4 governs the unknown word: the labelled fallback, nothing asked. Rule 5
is the rule for a question that names no number. Beside a fallback the
note ends with one conditional sentence | objectstack-ai#36509 | under D3, after the
2026-11-19 note |
| 15 | ADR-0027 · roadmap row M2 | "explicit, batched publish" | In
Studio's designers a person's Save writes the draft and publishes that
one item at once. Drafts and the package's batch publish remain for an
AI's changes | objectstack-ai#36597, objectstack-ai#36634, objectstack-ai#36652 | under the roadmap table |
| 16 | ADR-0037 · the product-boundaries amendment | "Publish remains
the single commit gate shared by every surface" | The publish is the
item's own, issued by the Save itself. The top bar's Publish is drawn
only while a draft is pending | objectstack-ai#36597, objectstack-ai#36634, objectstack-ai#36652 | under that
sentence |
| 17 | ADR-0085 · section 2 | `relatedLists` is "the one place" where
the re-arrange rejection yields | `actionLayout` is the second: a ruled
exception (the maintainer's ruling on objectstack-ai#36635), on the object, with a
`list` arm and a `record` arm | objectstack-ai#36629, objectstack-ai#36815 | under section 2, after
the 2026-11-22 note; dated 2026-11-23 |

The 15 card rows are the 17 lines above: the `viewAllFields` row is
lines 2 to 5, and the two ADR-0146 D5 rows are line 10.

**Rows not carried**

- ADR-0085, the `fieldGroups[].collapse` row: already on `main` through
objectstack-ai#36817. The record carries "Addendum (2026-11-22): on the synthesized
record page the reader folds every titled group", which says what the
row asks for. Nothing is added.

No `scripts/adr-anchors/**` entry moves. No `**Status**:` line changes
in the part the index projects, so `docs/adr/README.md` stays current.

## Why

AI seats read the ADRs before they change code in governed territory
(AGENTS.md Prime Directive objectstack-ai#13). These passages say something `main` no
longer does, so a seat that trusts them is steered wrong. This is the
week's rolling ADR revisions card: its rows land together as one
governed `docs/adr/**` PR and one approval, on the maintainer's word of
2026-11-20 (「adr接受你的建议」).

## Tests

Docs-only diff: no package, test or build input is touched, so no
package test or typecheck applies, and nothing a test pins changes.

## Acceptance notes

- Every row was read against the code on `main` at `a73edb3cd`, not
against PR state. Each landing commit is an ancestor of the branch, and
each note names the file or symbol that makes it true. `main` has moved
once since (`9c57bd283`); that commit touches no `docs/adr/**` file and
no file a note names.
- Where a row's claim is not what `main` does, the note states what
`main` does:
- **ADR-0052.** The row gives the per-field switch as `trackHistory:
false`. On `main` it is `fieldHistory: false`; `trackHistory: false`
reads as unset.
- **ADR-0146 D1.** Three sentences of the row are not written. "The fate
of Studio's Interfaces pillar is still open": the 2026-11-24 amendment
of D1, already on `main`, retires the pillars. "Studio is not changed by
this batch": the same amendment changes it. "Each of these writes the
same paired package": a report's save and a change to an existing view's
settings name no package, and the menu, the action arrangement and a
dashboard go to the item's own package when it is writable. The note
says where each save lands. It does not repeat what that amendment
already says about dashboards and reports opening in the app.
- **ADR-0146 D5.** Both card rows describe a state objectstack-ai#36789 has since
replaced: the row of objectstack-ai#36437 has the page header's button enter design
mode, and the row of objectstack-ai#36621 has the app-name menu's "Edit app" enter it.
On `main` the entry into design mode is "Design layout", and "Edit app"
opens Studio. The two rows are written as one note that states the end
of that sequence.
- **ADR-0027.** The row says later PRs will move the other Studio
editors. They have landed (objectstack-ai#36634, objectstack-ai#36652) and the note cites them. It
quotes the maintainer's own sentence on the epic, not the epic's summary
line.
- **ADR-0037.** The row says a pending draft now means an AI's draft.
Studio's generic item page still saves a person's drafts (its move is
declared by D1's amendment and not built), and the note says so.
- **ADR-0085.** The row says the row menu is queued and not built.
objectstack-ai#36815 built it, and it follows the `record` arm; the note says so. The
`list` arm still has one reader.
- Header entries: added where a record's header indexes its amendments
(ADR-0050, 0066, 0090, 0138, 0151, 0158). Not added to ADR-0146: its
status block lists only the maintainer's in-place amendments, its
2026-11-22 note under D10 has no entry there, and open PR objectstack-ai#36957 edits
that block. Not added to ADR-0027, 0037, 0052, 0085 and 0149, whose
headers hold no such list.
- Dates: every note is dated 2026-11-24, except ADR-0085's, dated
2026-11-23 as its row sets (that record dates its notes by ruling).
ADR-0138's amendment is dated 2026-11-24 and names the ruling's date,
2026-11-22.
- ADR-0151 is `Proposed`; its note follows the form of the dated notes
it already carries.
- The spec docblock sentence the ADR-0085 row mentions landed with
objectstack-ai#36629, so nothing outside `docs/adr/**` is owed.
- Noted, not filed (read-only observations, nothing was run to exercise
them):
- A report's save, and a change to an existing view's settings, from the
running app name no package. For an item of an installed package whose
stored rows are not bound to exactly one package, the server then
addresses the package-unbound row, not the paired `.custom` package
ADR-0146 D2 points customizations to. Whether a door refuses that write
was not measured.
- Two source comments still say design mode is entered from "Edit app"
(the page-actions module header and the design-mode module's gate
paragraph). Comments only.
- Landing tier: Tier H (`docs/adr/**`, governed; the maintainer
approves). The diff is +243 / -5 over 12 files.

## Verification

Read first, by risk:

1.
`docs/adr/0138-guest-model-anonymous-principal-doors-grants-and-organization.md`,
the D2 hunk: the one place earlier text is rewritten.
2.
`docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md`,
the note at the end of D1: the widest claim, where each in-app save
lands.
3. `docs/adr/0066-unified-authorization-model.md`, the note under D2 ⑧,
with its ADR-0090 D12 twin: permission semantics.

Two-minute check: `pnpm check:adr-symbol-anchors` prints a green line
that starts `check-adr-symbol-anchors: 3904 anchors across 160 records`,
and `git diff origin/main...HEAD --stat` shows 12 files, 243 insertions
and 5 deletions.

<details><summary>Gate readings on e5c60bf</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived the same 21 families on `8c705bc2c`
and on `e5c60bff0`. The readings below are the second run, on
`e5c60bff0`, each exit captured before any pipe:

```text
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 :: exit 0
```

On the first run `check:doc-formula-expressions` answered 3,
prerequisite not met, until `formula` and `lint` were built under
`os-verify-lock` (VERDICT command-exit 0, 5 of 5 tasks). `--ran`
reconciliation: 21 derived, 21 run, 0 NOT-MEASURED (a derived zero).
`node scripts/adr-index.mjs --check`: exit 0, the README is current.
`check-commit-card-trailers --range origin/main..HEAD`: exit 0, 2 commit
messages. `overlap-check`: `origin/main` and objectstack-ai#36957 both merge cleanly,
VERDICT clean exit 0. `check-governed-merges --branch`: GOVERNED, 12 of
12 paths on the register, Tier H. Control-byte scan of the twelve files:
0 hits.

</details>

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No schema touched.)
- [x] 2. Every name I added uses the casing for its kind. (No name
added.)
- [ ] 3. No formatter ran; `pnpm lint` passes. (No formatter ran. `pnpm
lint` was not run locally on this Markdown-only diff; CI judges it.)
- [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. (Publishes
nothing: `skip-changeset`.)
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (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 is done. (Not
walked item by item; the derived gates above are what ran.)

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

https://claude.ai/code/session_01J8VVAoUbebHyRXKT4GxBTV

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ipped vs run-time mount, package-scoped identity) (objectstack-ai#38053)

repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

Part of objectstack-ai#37310

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:用 AI(技能文档或 MCP 搭建)写知识源的作者,现在看到的是新写法:知识源是一份元数据,用
`name`、逐个列出要索引的字段、可以不写存储;MCP
新建知识源暂不提供起始模板(模板里的占位对象和字段会被当成真实值存进去),等设置页表单从作者输入构建 `source` 后再加。
- 为什么做:知识库检索专题(按调用者权限过滤的知识检索)第三阶段的教学一行,替照着技能写知识源的 AI 解决"照文档写出来却被拒绝"的问题。
- 出错会怎样:最坏是技能里某句教法不准,AI 写出的知识源在保存时被明确拒绝并给出修法;不会悄悄索引错的字段;改动可直接撤回。
- 要你做什么:合并(技能文档是受治理面,由你亲手落地);本 PR
只完成卡片的一部分:发布校验的五条规则名要等对应的校验改动(objectstack-ai#37971)合并后再补,新建模板要等设置页表单,所以卡片保持打开。

## What changes

**`skills/objectstack-ai/SKILL.md`, § Knowledge Sources (RAG)**
(ADR-0161 K4, K5, K6 item 6; rows 3a and 3b as merged):

- A source is a `knowledge_source` item: shipped in a package
(`knowledgeSources`, `*.knowledge-source.ts` / `.yml`) or authored in
Studio or over MCP. `KnowledgeServicePlugin({ sources })` and
`registerSource` are a second door for the same schema, and a code
registration and an environment item of one name are one slot, the
second refused. A source's identity is its package and `name`:
`search_knowledge` lists a package's source as `NAMESPACE-NAME` (bare
for a source no package holds). A shipped item (a `knowledgeSources`
entry) mounts the knowledge service and its store with no `requires:
['knowledge']` (objectstack-ai#37306, PR objectstack-ai#38026); an app that ships no source and
authors its sources at run time needs `requires: ['knowledge']`, or its
items are never indexed (as main's `knowledge-rag.mdx` § Turning it on
says).
- The key table is the v1 keys of K4: `name`, `label` / `description`,
`adapter` (optional; omitted ⇒ the deployment's store, else the only one
registered, refused naming them when several and none is the
deployment's), `source.kind`, `source.object`, `source.content` (an
explicit non-empty list; why `'*'` is refused: embedding is egress, K5),
`source.metadataFields`, `source.where`, `source.split`,
`refresh.onRecordChange`, `aiExposed`. The old Hygiene column's advice
(meaningful text only, never ids or system fields; `where` keeps drafts
out) now lives in the `content` and `where` rows, and says `content`.
- Egress and cost (K4): the first build sends every listed field of
every matching record to the embedding provider; a run-time save needs
`manage_knowledge_sources` beside `manage_metadata` and passes save-time
admission.
- The retired keys by name, each with its fix, as the tombstones read:
`id` → `name`, `contentFields` → `content`, `embedding`, `vectorStore`,
`adapterConfig`, `refresh.cron`, and the `file` / `http` arms with their
four keys; `os migrate meta --from 18` for a stack, by hand for a
registration in code.
- The checked example drops `adapter: 'pgvector'` (the deployment's
store) and its comments; it is otherwise row 3a's block.
- `split`: `strategy` is required once `split` is written (`recursive`
only when `split` is omitted); the adapter-list aside is gone.
- The closing note: `topK` is a `search_knowledge` argument; rerank and
hybrid weighting are no source key, and no shipped store has a setting
for either (`knowledge-pgvector` and `knowledge-turso` fuse their legs
by RRF with a fixed `RRF_K = 60`, `pgvector-adapter.ts:124`,
`turso-adapter.ts:95`; no store plugin's options interface has a rerank,
weight or fusion key).
- The routing line in `skills/objectstack-mcp-build/SKILL.md` ("An agent
skill, tool or knowledge source | objectstack-ai") stays true: the
section name is unchanged, so it is not edited.

**Not in this PR, on purpose (amendments 7221575164 and 7224082428):**
the five `os validate` / publish rule ids of PR objectstack-ai#37971
(`knowledge-source-object-unknown`, `knowledge-source-field-unknown`,
`knowledge-source-object-not-searchable`,
`knowledge-source-system-object-not-ai-readable`,
`knowledge-source-field-never-indexed`). objectstack-ai#37971 is still open, so this
PR is `Part of objectstack-ai#37310`: that part follows on this branch after objectstack-ai#37971
lands (the keyword then returns to `Fixes`), or on a later PR if this
one lands first. The create seed is also left open: it waits for the
Studio form (objectstack-ai#37309, row 5).

**`skills/objectstack-ai/evals/skills-tools-knowledge.json`.** Case 3
(kb_article on PostgreSQL) and case 9 (policy_doc, `markdown` split) now
expect `name` and `content`, and forbid a written `contentFields:` key;
case 3 also forbids a written wildcard (`['*'],`, `['*'] }`),
`embedding:` and `vectorStore:`, and its `topK` token becomes `topK:`
(the key written) because the skill now names `topK` as a search
argument. Case 9 also requires `name:` and forbids an `id:` spelling;
case 13 forbids the double-quoted wildcard forms. New case 14 asks for
an app that ships no source and authors one at run time, and requires
the `requires: ['knowledge']` line (either quote style), with no
`contentFields:`. New case 13 asks for a source that indexes "every text
field" and expects an explicit list, the wildcard declined because
embedding is egress, and no written `contentFields:` or wildcard.

**`packages/spec/src/kernel/metadata-create-seeds.ts`: unchanged
(byte-identical to `main`).** A `knowledge_source` create seed was tried
and withdrawn at `4c965f4a5e` (comment 7229668414). Its object binding
and content list sit inside `source`, and the Studio create flow
(`buildCreateModeBody` / `seedPlaceholderKeys` in app-shell's
`createBody.ts`) clears placeholder identity at the top level only, so
it would have saved `example_object` / `example_field` into a new
source: the objectui#12810 defect. No schema-valid seed avoids this,
because `source.object` and a non-empty `content` (K5) are required and
nested. `knowledge_source` stays on `KNOWN_UNSEEDED`, whose comment now
gives the reason: a seed waits until the Studio form (objectstack-ai#37309, row 5)
builds `source` from the author's input. The card allows this ("or the
type stays on `KNOWN_UNSEEDED` with the reason").

**`packages/runtime/src/domains/mcp-authoring.test.ts`.** One case
beside the flow contract case, over the real protocol and the boot type
registry: `list_metadata_items` with `contract: true` for
`knowledge_source` serves no `createSeed`; `contractPath`
`/properties/source/properties/content` serves the content rule
(`minItems: 1`, `minLength: 1`, a pattern that refuses `*` and admits
`body`); the served schema carries no `id` or `contentFields` tombstone;
a hand-written source with one object and one field saves as a draft;
the same item with `content: ['*']`, with an `id`, or with
`contentFields` is refused `422 INVALID_METADATA`, the last two naming
their tombstone's prescription ("use `name`", "use `content`"); nothing
else is written.

**Platform catalog (review round, `6f2e756f58`).** The generator's Boot
cell (`packages/spec/scripts/lib/platform-catalog.ts`) reads ``on
`requires`, or a shipped `knowledgeSources` item`` for a provider that
declares `mountedBy`; `packages/spec/scripts/platform-catalog.test.ts`
pins that cell, with `record-context` as the control that still reads
``on `requires` ``.
`skills/objectstack-project/references/platform-catalog.md` is
regenerated.

**Token ratchet.** The standing ruling, verbatim and untranslated:
「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). Paid down first,
in the same file: the wiring paragraph's package list, the old
`source.kind` Hygiene column (folded into two rows), the example's four
comments restating table rows and its `refresh: { onRecordChange: true
}` line restating the default, and the split passage's adapter aside.
The row moves 6609 → 6639, the measured remainder, pinned at the
measurement. Review round (`6f2e756f58`): after paying down the intro's
restating clause, its separate `search_knowledge` sentence, the "one
name is one source" clause and the longer closing note, the row moves
6639 → 6695 (+56, the measured remainder) under the same ruling.
Reproduction: `ceil(($(wc -c < skills/objectstack-ai/SKILL.md) - 27) /
4)` = ceil(26779 / 4) = 6695.

## Tests

**Review round at `6f2e756f58`** (merges `main` at `58be6770ab`; note
7230668192): unlocked, 35 commands, each exit 0, including
`check-skills-token-ratchet` (row 6695), `check:nul-bytes`,
`check-empty-changeset`, `check-adr-0087-registration`,
`check-changeset-no-major`, `check:issue-citations`,
`check:doc-authoring`, `check:skill-links`,
`check:skill-identifier-liveness`, `check:skill-frame-sync`,
`check:published-files`; `gen:skill-refs` exit 0. NOT MEASURED locally
(verify lock never acquired in six tries): `check:skill-docs`,
`check:skill-refs`, `check:yaml-examples`, the platform-catalog test,
`metadata-create-seeds.test.ts`, the MCP contract case, eval case 14. CI
on this head is the reading for them. overlap-check: `VERDICT overlap
exit 1`, the same objectstack-ai#36158-against-main conflict in the ratchet file;
`origin/main`, objectstack-ai#38032 and objectstack-ai#38013 merge cleanly.

The lock was saturated: about 70 minutes of queueing, two dogfood runs
ahead. One locked round ran at `3407f7fe6e`; the second round was not
reached. What was not measured locally is marked below, and CI runs it.

<details><summary>Locked round at 3407f7f (VERDICT command-exit 0,
held 365s)</summary>

- `pnpm turbo run build --filter='@objectstack/runtime^...'
--concurrency=2`: exit 0, `Tasks: 41 successful, 41 total`.
- `metadata-create-seeds.test.ts` (spec): the seed pin run here (`Tests
20 passed (20)`) belonged to the withdrawn seed; the file is back to
`main`'s, so CI `Test Core` is the reading. **Patch round at
`4c965f4a5e`:** the app-shell
`createBody.seedPlaceholders-12810.test.ts` (red at `19f3e118f2`, 2
failures, unedited), the spec create-seeds test and the rewritten MCP
case are NOT MEASURED locally (verify lock saturated); their inputs
equal `main`'s, so CI `Test UI` and `Test Core` on this head are the
evidence. Unlocked gates at `4c965f4a5e`, exit 0 each:
`check-skills-token-ratchet` (6639/6639), `check-empty-changeset`,
`check-adr-0087-registration`, `check-changeset-no-major`,
`check:nul-bytes`, `check:issue-citations`, `check:doc-authoring`. The
changeset no longer lists `@objectstack/spec`.
- `pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2
src/domains/mcp-authoring.test.ts`: exit 1, `Tests 1 failed | 73 passed
(74)`. The failing assertion is the new case's tombstone half: it
expected the served schema to carry `/properties/id`, and the served
schema drops tombstones (see Acceptance notes). Its content-rule and
seed assertions, which run before it, passed. The tombstone half is
rewritten in `01cf7515c2` to assert absence plus the save refusal. **NOT
MEASURED locally after that rewrite** (the second locked round never
acquired); CI `Test Core` runs it.
- `pnpm --filter @objectstack/spec run check:yaml-examples`: exit 0, `19
tagged YAML example(s) across 1 file(s) validate`.
- `pnpm --filter @objectstack/spec run check:skill-docs`: exit 0, `Skill
docs in sync`.
- `pnpm --filter @objectstack/spec run check:skill-refs`: exit 0, `10
generated files in sync with packages/spec`. The generated skill
references needed no regeneration: the section rewrite changes no
reference input.
- `pnpm --filter @objectstack/spec typecheck`: exit 0.
- `pnpm --filter @objectstack/runtime typecheck`: exit 1. `tsc --noEmit`
is clean. `check:test-typecheck` names 3 files this diff does not touch
(`boolean-written-spelling-row-scope.test.ts`,
`meta-object-publish-column-changes.test.ts`,
`organization-ownership-boot-guard.turso-remote.kernel.test.ts`).
`mcp-authoring.test.ts` is not among them. They are read here as the
closure build's gaps (only `runtime^...` was built) and not as this
diff's; CI `TypeScript Type Check` decides.
- `pnpm --filter @objectstack/spec run check:skill-examples`: exit 3,
PREREQUISITE NOT MET (the `@objectstack/client-react` dist is outside
the built closure). **NOT MEASURED**; CI runs it.

</details>

<details><summary>Unlocked gates (35 derived families, each exit 0, at
3407f7f; the ratchet and nul-bytes re-run at 19f3e11)</summary>

- `node scripts/check-skills-token-ratchet.mjs`: exit 0,
`skills/objectstack-ai/SKILL.md is 6639 tokens (ceiling 6639; headroom
0)`; with `--self-test` exit 0.
- Exit 0 each: `check-adr-0087-registration` (both forms),
`check-changeset-no-major`, `check-closing-keyword-parity` (both),
`check-declaration-mirrors` (both), `check-empty-changeset` (both),
`check-issue-citations`, `check-self-test-wired` (both),
`docs-audit/check-affected-docs`, `docs-audit/check-drift-comment`, and
`pnpm check:` `agent-test-spelling`, `changeset-gate-self-tests`,
`closed-ceremony-text`, `corpus-claim-drift`,
`cross-package-test-inputs`, `doc-authoring`, `issue-citations`,
`keyed-text-bounds`, `nul-bytes`, `pm-skill-id-lint`, `published-files`,
`ratchet-remedy-authority`, `role-word`, `skill-compatibility`,
`skill-frame-sync`, `skill-identifier-liveness`, `skill-links`,
`test-source-alias`, `tier-file-adoption`.
- `dispatch-gates --ran`: `116 derived, 38 run, 0 NOT-MEASURED, 78
UNRUN`. That is a declared narrowing: the lock was saturated, and CI
runs the 78.
- Local-only: `check-skill-frame-freshness` exit 0. `check-dev-prereqs`
exit 1 ("69 of 110 workspace packages … not on disk"), which is the
closure-only build and not a finding.

</details>

<details><summary>Eval runner and the ablation (`skill-evals`,
claude-code-cli 2.1.332, oauth login, served claude-opus-5-5)</summary>

Cases 3, 9 and 13 of `objectstack-ai/skills-tools-knowledge`, both arms,
one repeat each:

| skill text | objectstack-ai#3 with-skill | objectstack-ai#9 with-skill | objectstack-ai#13 with-skill | no-skill
(all three) |
|:--|:--|:--|:--|:--|
| this PR | pass | pass | pass | fail |
| `main`'s `SKILL.md` (`8d34c4404f`, hash `88a20cb583`), new cases
(ablation) | fail: `contentFields:` written; `name:`, `content:` missing
| fail: `contentFields:` written; `content:` missing | fail:
`contentFields:`, `['*'],` and `id: 'faq` written; no egress reason |
fail |

The ablation restored `main`'s `SKILL.md` into the working tree only
(`git restore --source=8d34c4404f`, `git hash-object` = `88a20cb583`).
The run ran, and then `HEAD`'s file came back (`fc845724ac` both on disk
and at `HEAD`). An earlier run of case 13 on this text failed with-skill
only on the token `['*']`, which a correct answer quoted while
explaining the refusal. The forbidden token is now the written wildcard
(`['*'],` / `['*'] }`), and the table above is after that change.

</details>

## Acceptance notes

- The acceptance grep (`git grep -n -E "contentFields|'\*'|adapter:
'ragflow'" skills/objectstack-ai`) returns eight lines. In `SKILL.md`,
three: the `content` row ("`'*'` is refused") and two lines of the
retired-keys paragraph. In the eval file, five: the reference answers of
cases 3 and 13, which name both as retired, and the `must_not_contain`
lists of cases 3, 9 and 13, which forbid a written `contentFields:` and
a written wildcard (`['*'],`, `['*'] }`). The card itself asks the eval
to fail on `contentFields` or `'*'`, which puts the forbidden token on
the assertion line. The reviewer decides whether those lines count as
"naming a retired key as retired".
- `adapter: 'ragflow'` has no hit: objectstack-ai#37004 already removed it.
- The new MCP pin is an `it` inside the existing real-protocol
`describe` of `mcp-authoring.test.ts`, beside the flow contract case,
because that describe holds the real-protocol harness (`realProtocol`,
`STUDIO_BASE`). It is in the shared harness file, not a new file.
- **Premise correction (card item 3).** The card asks the served
contract to carry "the tombstones' prescriptions as the describes read".
It does not, by design: the served JSON Schema drops every
`retiredKey()` tombstone (`{ not: {} }`; see the note in
`packages/metadata-protocol/src/protocol-meta-type-schema.ts`: the
served schema publishes what an author MAY write). The prescription
reaches an MCP author through the save refusal instead. The pin asserts
both halves: the tombstone is absent from the served schema, and a save
that writes the retired key is refused naming its replacement.
- The save half of the MCP pin covers row 3a's parse. Row 4's checks
(objectstack-ai#37971) are not on main, so a hand-written draft is not yet judged by
them here. Today the save passes with no knowledge service mounted ("no
knowledge service judges nothing").
- overlap-check before the PR: `VERDICT overlap exit 1`. `origin/main`,
objectstack-ai#38032 and objectstack-ai#38013 merge cleanly. objectstack-ai#36158 (a draft last updated
2026-11-25) conflicts in `scripts/check-skills-token-ratchet.mjs`. That
conflict is objectstack-ai#36158's own against `origin/main`: `git merge-tree
origin/main` with objectstack-ai#36158's head conflicts in the same file, and every
conflict hunk is at line 798 or later, away from this branch's hunk near
line 453. Reported here, not resolved.

## Verification

Files to read first, by risk:
1. `skills/objectstack-ai/SKILL.md` § Knowledge Sources (RAG): the
`adapter` and `content` rows and the retired-keys paragraph.
2. `packages/spec/src/kernel/metadata-create-seeds.test.ts`: the
`KNOWN_UNSEEDED` reason for `knowledge_source` (no seed;
`metadata-create-seeds.ts` is byte-identical to `main`).
3. `packages/runtime/src/domains/mcp-authoring.test.ts`: the new
contract case.

Two-minute check: `node scripts/check-skills-token-ratchet.mjs`. Expect
`skills/objectstack-ai/SKILL.md is 6695 tokens (ceiling 6695; headroom
0)`.

Readings: `skills/objectstack-ai/SKILL.md` 464 → 469 lines, 26462 →
26806 bytes (6609 → 6695 priced tokens, in two moves). Every published
`SKILL.md` summed: 4936 → 4941 lines, 261366 → 261485 bytes (65342 →
65372 tokens). The eval file is 125 → 137 lines and 13611 → 15185 bytes;
eval fixtures are measured, not ratcheted.

---

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

---------

Co-authored-by: Claude <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 9afe5a27 Deployed Jan 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants