Repository navigation
Convert to monorepo with scoped packages - #8
Merged
Merged
Conversation
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Upgrade project to multi-package structure
Convert to monorepo with scoped packages
Jan 18, 2026
huangyiirene
marked this pull request as ready for review
January 18, 2026 12:23
xuyushun441-sys
pushed a commit
that referenced
this pull request
May 22, 2026
…invariant)
User feedback: in shared-DB multi-tenant deployments, only render-time
metadata types (views, dashboards, reports) may be overridden per
organization. Anything that affects the physical schema, persisted
contracts, or automation guarantees must be platform-global — otherwise
a per-org overlay on, say, an object would diverge the table schema
that the whole tenant pool depends on.
This invariant is already enforced via MetadataTypeRegistryEntry.allowOrgOverride
in the spec, but two gaps remained:
1. `report` had `allowOrgOverride: false` even though it is pure
presentation — flipped to true to match the principle.
2. The principle itself was not written down. Added a 'Tenant-
customizable type whitelist' section to ADR-0005's amendment block
with a complete table grouped by domain, plus the rule: 'default
for any new metadata type is allowOrgOverride: false; promotion
requires (a) overlay Zod schema, (b) written render-only rationale.'
No code change beyond the report flag — protocol.ts already derives
OVERLAY_ALLOWED_TYPES from the registry (Prime Directive #8).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
xuyushun441-sys
pushed a commit
that referenced
this pull request
May 22, 2026
…PR-10a)
Pins down two invariants that PR-10b/c (LayeredRepository overlay
refactor) must preserve:
1. Whitelist enforcement — only allowOrgOverride:true types may be
saved as per-org overlays in project-kernel mode. Verifies:
- 5 accepted (view, dashboard, report, email_template, plural form)
- 11 denied with code='not_overridable', status=403
(object, field, flow, workflow, agent, permission, role,
profile, datasource, objects, flows)
- Single-kernel mode (no projectId) bypasses the gate
- Registry-as-source-of-truth: every allowed/denied type traces
back to DEFAULT_METADATA_TYPE_REGISTRY.allowOrgOverride
(Prime Directive #8 — no parallel allow-list)
2. Canonical hash stability — precondition for backfilling _hash on
existing sys_metadata rows in PR-10b. Verifies canonicalize/
hashSpec are insensitive to key order, undefined-vs-absent, and
deeply-nested optional fields; positional semantics preserved
for arrays; distinct payloads → distinct hashes.
Adds @objectstack/metadata-core as a workspace dep of @objectstack/
objectql to import canonicalize/hashSpec.
Test count: objectql 258 → 286. All green.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
xuyushun441-sys
pushed a commit
that referenced
this pull request
May 22, 2026
…etadata (ADR-0008 PR-10b)
PR-10b of ADR-0008. Wraps the existing sys_metadata table behind the
canonical MetadataRepository interface from @objectstack/metadata-core.
No production wiring yet — that lands in PR-10c when LayeredRepository
composes [FileSystemRepository, SysMetadataRepository] and the manager
bridge routes overlay PUTs through it.
What's implemented (M0 single-row update semantics):
- get / put / delete against (type, name, organization_id) row
- hashSpec stamping into _hash column (PR-10a guarantees stability)
- optimistic locking: parentVersion must match HEAD _hash
- no-op short-circuit on identical-body put (no event, no seq bump)
- whitelist enforcement: refuses put/delete for types whose registry
entry has allowOrgOverride: false (Prime Directive #8)
- in-process watch() with type/name/org/branch filter
- list() yields MetadataItemHeader (body stripped)
- close() for clean teardown
Deferred to M1:
- append-only metadata_events table + cross-replica seq
- history() — currently yields empty
- branch ops (fork/merge)
- hashSpec backfill for legacy rows missing _hash
Tests: 16 new tests covering CRUD, optimistic locking, whitelist,
list, watch (incl. filter), history no-op, close. objectql 286 → 302.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4 tasks
xuyushun441-sys
pushed a commit
that referenced
this pull request
May 29, 2026
Repoint email_template's canonical Zod schema from the legacy EmailTemplateSchema (a sub-shape inside Notification) to EmailTemplateDefinitionSchema across both runtime registries: - packages/objectql/src/protocol.ts (TYPE_TO_SCHEMA → used by protocol.getMetaTypes() to emit JSON Schemas for Studio) - packages/spec/src/kernel/metadata-type-schemas.ts (BUILTIN_METADATA_TYPE_SCHEMAS) Resolves Prime Directive #8 (one canonical Zod source per metadata type) for email_template. Studio property panel now renders all canonical fields (name, label, category, locale, subject, bodyHtml, bodyText, variables, fromOverride, replyTo, active, isSystem, description) with no missing-schema warnings. Also wires emailTemplates as a top-level defineStack() collection: - MAP_SUPPORTED_FIELDS + PLURAL_TO_SINGULAR (spec/shared) - ARTIFACT_FIELD_TO_TYPE (metadata plugin) - APP_CATEGORY_KEYS (runtime app-plugin) Rewrites the email-template FormView for the new shape and ships three reference templates in examples/app-crm (crm.deal_won, crm.welcome, crm.lead_followup) wired via emailTemplates: Object.values(emails). Verified end-to-end: list, detail+preview iframe, property panel, and GET /api/v1/meta all return the new schema. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced May 29, 2026
This was referenced Aug 3, 2026
This was referenced Oct 24, 2026
This was referenced Oct 25, 2026
This was referenced Nov 2, 2026
This was referenced Nov 16, 2026
247257110
pushed a commit
to 247257110/objectstack
that referenced
this pull request
Nov 22, 2026
… drawer; lookup cells draw an edit button (objectstack-ai#36015) (objectstack-ai#36128) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuLB1HMq57UcoRZFjpa8YhHZ)_ repo:objectstack#1 · os-sales · session_01L6bhgWkLah49N6UoD4CS3S Fixes objectstack-ai#36015 The card's 11:13Z revision (maintainer: 「同意,改卡」): a single click on a lookup chip opens that record in the side drawer, and a lookup cell has a pencil button. objectstack-ai#36033 landed the rest of the card with `Refs objectstack-ai#36015`; this PR is the lookup-cell part and closes the card. Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 列表里单击关联记录的小标签(比如联系人列表里的「客户」),右侧抽屉打开那条记录,列表不动。关掉抽屉后,滚动位置和选中的格子都还在。 - 点格子里小标签旁边的空白,只是选中这一格。一格里有几个标签,点哪个开哪个;选中后按 Ctrl+Enter / Cmd+Enter 在抽屉里开第一个;按住 Ctrl / Cmd 点,仍是新标签页整页打开。 - 关联格在鼠标移上去或已选中时,右边出现铅笔按钮,点了进入编辑(出现关联记录选择器),和双击、回车一样。没有编辑权限、字段只读、记录被锁时不出现。这个位置原来放「打开」图标,关联格不再画它。 - 人员的小标签(负责人、创建人,指向 `sys_user` 的关联)不变:单击只选中,选中后有「打开」图标,没有铅笔。邮箱、电话、网址、名称列都不变。手机上照旧整页打开。 - 抽屉的网址带上了记录和它的对象(`?recordId=…&recordObject=…`):刷新后抽屉还在,按后退关掉抽屉,和名称列「在侧边打开」一样。 - 风险:改到五个包(字段格子、表格、网格、列表、控制台抽屉);给宿主加了两个可选接口,不传时行为和以前完全一样;没有新文案键(铅笔用已有的「编辑」`table.edit`)。 ## What changes On a grid with the select-first cell model whose host opts in (today the console's list page), a **reference cell** is a column of `lookup`, `master_detail` or `tree` type whose `reference` is not `sys_user`. **`@object-ui/fields`: `index.tsx`** - `ReferencedRecordLink`'s anchor carries `data-record-object` and `data-record-id`, the record the chip names. Nothing else changes in its markup or its click. **`@object-ui/components`: `context/gridCellSelection.tsx`, `index.ts`** - `GridCellSelection` gains an optional `referenceCells?: GridReferenceCells | null`. `GridReferenceCells` (exported as a type) is `isReferenceColumn(columnKey)` (asked per column on every render, so it answers from the column alone) and `openRecord(objectName, recordId)`. **`@object-ui/components`: `renderers/complex/data-table.tsx`, `dataTableCellSelection.ts`** - New `recordChipAt` / `firstRecordChip`: the record a chip (`a[data-record-link][data-record-object][data-record-id]`) at or around the target names. - In a reference cell, the select-first `onClickCapture` that objectstack-ai#36033 added still cancels a plain click on the chip and selects the cell, and then calls `referenceCells.openRecord` for the chip clicked. A click beside the chips only selects. Ctrl, Cmd, Shift and Alt clicks, a non-primary button and a touch tap pass through to the link as before. - A double-click on a reference chip does not also edit the cell (its first click opened the record). - Ctrl/Cmd+Enter on a selected reference cell opens its first chip through `referenceCells.openRecord`; every other cell keeps objectstack-ai#36033's behaviour. - New `CellEditButton` in every reference cell while no editor is open: a pencil at the cell's right edge, labelled with the existing `table.edit` key, shown on cell hover (`group-hover/cell`) and while the cell is selected. Its click calls `attemptEdit`, the same gate double-click and Enter pass through. It is drawn only when `readOnlyReasonOf(row, col)` is `null`; that is asked when the pointer enters the cell and when the cell becomes selected, never per render (the `describeCell` contract). It takes no focus. A reference cell does not draw objectstack-ai#36033's `CellOpenButton`. **`@object-ui/plugin-grid`: `ObjectGrid.tsx`** - New runtime prop `openReferencedRecord?: (objectName, recordId) => void`. With `cellSelection` and this prop, the grid's `GridCellSelection` carries `referenceCells`: `isReferenceColumn` reads the column's field (`opensReferenceInPlace`: lookup / master_detail / tree, reference not `sys_user`), `openRecord` is the prop. **`@object-ui/plugin-list`: `ListView.tsx`** - New host prop `openReferencedRecord`, handed to the grid only (`object-grid` views), as `recordLinkAdornment` is. **`@object-ui/app-shell`: `urlParams.ts`, `views/objectViewRecordNavigation.ts`, `ObjectView.tsx`, `objectViewListRenderer.tsx`, `objectViewRecordOverlay.tsx`, `recordDrawerStack.tsx`** - New reserved URL param `RECORD_DRAWER_OBJECT_PARAM` (`recordObject`), listed in `RESERVED_URL_PARAMS`: the object of the drawer root's record when it is not the listed object. - `handleOpenReferencedRecord(objectName, recordId)`: the listed object's record opens as the name cell's 「在侧边打开」 icon opens it (`?recordId=` only); another object's sets `?recordId=` and `?recordObject=` (a push, so Back closes it). A chip clicked while the drawer is open swaps its root. - `drawerRoot` is that record when `?recordObject=` names another object the console knows and the server reads one record of (`servesRecordRead`); it has no sibling set, so the drawer draws no ↑ ↓ counter. Unknown or unread object: no drawer. - Closing the drawer, the name cell's icon and the page origin a phone redirect builds drop `?recordObject=` with `?recordId=`. - The drawer's ⤢ at a root of another object opens that object's page (`expandedRecordPath`); the listed object's root keeps its list-relative route and origin. - On a phone a `?recordObject=` link answers with that record's own page, as `?recordId=` does for the listed object. - `RecordStackDrawer` takes `listObjectName`; the list marks the root's row as active only when the root is a record of the listed object. - `ObjectView` passes `handleOpenReferencedRecord` only when its list has the drawer (`navOverlay.mode === 'drawer'`, not a phone), the same condition as `openInPanel`. A list whose rows open nothing (`none`, a list-only object) keeps objectstack-ai#36033's behaviour: the chip only selects. **Field types this reaches:** `lookup`, `master_detail`, `tree` drawn through `LookupCellRenderer` / `ReferencedRecordLink`, when the referenced object is routable from the list (the chip is an anchor only then). A `user` field (`UserCellRenderer`, avatars) draws no link and is untouched. **Readings (claim A–G):** - **A.** Only grids whose host passes `openReferencedRecord` (the console's object list). Every other host keeps objectstack-ai#36033's behaviour. - **B.** Ctrl/Cmd+Enter on a lookup cell opens its first chip in the drawer. - **C.** Person cells (lookups to `sys_user`) draw no pencil and keep objectstack-ai#36033's open button. - **D.** A chip clicked with the drawer open swaps the drawer's root, as the name cell's icon does. - **E.** A lookup to the listed object itself opens the listed object's drawer, with `?recordId=` alone. - **F.** A chip with no link (unroutable, unread, restricted or name-only) only selects; an editable cell still draws the pencil. - **G.** The drawer's record and object live in the URL, as `?recordId=` does (ui `AGENTS.md` objectstack-ai#8). Docs: `content/docs/frontend/plugins/plugin-grid.mdx` § On an object's list page (new bullet after the click bullet; the click bullet objectstack-ai#36033 wrote now leaves out the lookup chip a host opens in place). objectstack-ai#36033's changeset is untouched; this PR's own changeset says it (Notes, below). ## Notes - **objectstack-ai#36033's pending release note is left as it is** (`.changeset/36015-list-cell-click-only-selects.md`, restored from the base in `87d42cbd`; head `b59bf991`..`9c225b51` had added a sentence to it as a declared correction, which kept `Check Changeset` red). This PR's own note, `.changeset/36015-lookup-chip-opens-in-drawer.md`, now says what it changes about that note instead: "This replaces, for lookup chips on that page, the earlier change in this release where a plain click on a lookup chip only selected its cell." The docs bullet in `plugin-grid.mdx` keeps the L1-b N1 rewording. ## Tests Added, each a top-level `describe` in the component's existing harness file: - `components/src/__tests__/data-table-select-first-35684.test.tsx`, "a reference chip opens its record in place": a plain click on the chip calls `openRecord` with the chip's record, cancels the default and selects the cell, and a double-click on it opens no editor; a click beside the chip only selects, Ctrl and Cmd clicks follow the link; Ctrl+Enter opens the first chip through the host; the edit button is hidden until the pointer enters the cell, then shown on hover and while selected, opens the editor, and the cell draws no open button; a cell the host says opens no editor draws no edit button; a column the host does not name (a person) keeps the link behaviour and the open button; control: with no `referenceCells` the chip only selects and no edit button is drawn. - `plugin-grid/src/__tests__/ObjectGrid.cellSelection-35684.test.tsx`, "a lookup chip opens its record in the host's place": through `ObjectGrid` with a routing host, the account chip carries `data-record-object` / `data-record-id` and a single click calls `openReferencedRecord('crm_account', 'a7')` without following the link; the lookup cell's edit button opens its editor and the `owner_id` (lookup to `sys_user`) cell draws none; a person chip only selects; control without the prop. - `app-shell/src/views/objectViewRecordNavigation.listRows-27524.test.tsx`, "a lookup chip opens the record it names in the list's drawer": the URL params for another object and for the listed object, `drawerRoot` for another object (no siblings), for an unknown object (`null`) and for the listed object (siblings kept), close drops both params, ⤢ opens the other object's page. - After L1-b's S1 (fixed in `9c225b51`: a double-click on a chip opened its record twice, so the console's router pushed the same URL twice and the first Back left the drawer open). The grid opens a chip on a click's first press only (`e.detail > 1` opens nothing), and `handleOpenReferencedRecord` returns when the URL already names that record of that object, which also covers a fast repeat click. Each test below fails without the fix: - `data-table-select-first-35684.test.tsx`, "a double-click on the chip opens its record once": click, click (`detail: 2`), dblclick; `openRecord` is called once and no editor opens. - `objectViewRecordNavigation.listRows-27524.test.tsx`, "the record the drawer already shows is not pushed again": no `setSearchParams` for the record already shown, of another object or of the listed one; the same id under another object still opens. - same file, "in a router: a chip opened twice (a double-click) leaves one history entry, and one Back closes the drawer": a declarative `MemoryRouter` (it pushes on every navigate, the same URL included); after two opens the URL names the record, and one `navigate(-1)` returns to `?view=all`. No existing test was rewritten or dropped. Local runs. First on main `8145424b` merged with objectstack-ai#36033's head `cefd3e31`, a full `pnpm build`: - `vitest run packages/components/`: 501 files passed. `packages/fields/`: 316 passed. `packages/plugin-grid/`: 298 passed. `packages/plugin-list/`: 181 passed. - `packages/app-shell/` in full did not finish inside this container's 50-minute window; the parts this diff touches ran: `src/views/ObjectView*`, `src/views/objectView*`, `src/views/__tests__/recordDrawer*`, `src/views/__tests__/recordPane*`, `src/urlParams*`, `src/__tests__/`: 128 files passed. - After objectstack-ai#36033 merged, the change was replayed on main `dc10b3b4` as one commit (conflicts only in `objectViewListRenderer.tsx`'s memo dependencies and the two appended describes of `ObjectGrid.cellSelection-35684.test.tsx`, both sides kept), then a full `pnpm build` and `vitest run` of `components/src/__tests__/data-table*`, `plugin-grid/src/__tests__/ObjectGrid.cellSelection*`, `app-shell/src/views/objectViewRecordNavigation*`, `app-shell/src/views/__tests__/recordDrawer*` and `fields/src/`: 348 files passed (2 skipped). - `type-check` in `components`, `fields`, `plugin-grid`, `plugin-list`, `app-shell`: exit 0 (on both bases). - `eslint` on the changed files: 0 errors. - `overlap-check` on the pushed head `b59bf991`: clean against `origin/main` (`dc10b3b4`, objectstack-ai#36033 merged) and the four open PRs sharing a file (objectstack-ai#36114, objectstack-ai#36105, objectstack-ai#36096, objectstack-ai#36024). - `87d42cbd`: `main` `6c7c6db2` merged in (clean). `check-empty-changeset` and `check-changeset-no-major`: pass. `overlap-check`: clean against `main` and objectstack-ai#36123; objectstack-ai#36133 (draft) conflicts only on the one-line `useMemo` dependency list in `objectViewListRenderer.tsx`, which each PR extends by one name; the second to land merges `main`. ## Verification (browser) CRM and Todo examples (`--fresh`), Console via Vite on this tree, Chromium, 1280 light and dark, 375 light and dark. Screenshots and the journey log: project folder `build-seat1/36015/PR2/` (`after-*`, `after-journey.log`). The before state is objectstack-ai#36033's after state (`build-seat1/36015/after-*`): a chip only selected its cell. | Step | After | |:--|:--| | Contacts, hover the Account cell | pencil at the cell's right edge | | Click the Acme Corp chip | drawer opens Acme Corp (`?recordId=…&recordObject=crm_account`), the list stays, the cell is selected | | Close the drawer | params gone, the Account cell still selected | | Click beside the chip | cell selected, nothing opens | | Click the pencil | the lookup editor opens in the cell | | Ctrl+Enter on the selected Account cell | drawer opens Acme Corp | | Click the email text | cell selected, no navigation, open button in the cell | | Click the name | the contact's record page | | Todo tasks, hover the Assigned To cell (lookup to `sys_user`) | no pencil | | Click the Dev Admin chip | cell selected, page stays, open button on hover | | 375 | phone cards (no grid), unchanged | ## Acceptance notes 1. Click a lookup chip: the drawer opens that record, the list stays, closing it keeps scroll and selection: yes (browser). 2. Click beside the chip: the cell is selected, nothing opens: yes. 3. Hover a lookup cell: a pencil; it opens the cell's editor (the lookup picker); none on a read-only field: yes (browser for the pencil and the editor; read-only unit-pinned). 4. Person chips (owner): single click only selects: yes (browser, Todo's Assigned To, a lookup to `sys_user`). 5. Ctrl/Cmd-click a chip opens the record in a new tab: yes (the click passes through to the anchor; unit-pinned). 6. Email, phone, URL, Ctrl/Cmd+Enter on them and the name column: unchanged from objectstack-ai#36033: yes. 7. This body lists the field types reached and the tests: above (none rewritten). --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgWkLah49N6UoD4CS3S)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgWkLah49N6UoD4CS3S <!-- signed: repo:objectstack#1 · os-sales · session_01L6bhgWkLah49N6UoD4CS3S --> --------- Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Nov 26, 2026
Nenzyz
pushed a commit
to Nenzyz/objectstack
that referenced
this pull request
Dec 1, 2026
…u in its header (objectstack-ai#37546) repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4 <!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgTC1DCWJ4MisoLdbUU1V1sb)_ Fixes objectstack-ai#37454 Clause-②: no Metadata-protocol: none ## 维护者速读 用户能看到什么变化:在 Studio 里打开一个软件包,左侧菜单第一行变成「概览」,有待发布的修改时旁边显示数量,点数量直接进入待发布。概览页头显示包名、「系统自带/可写」「使用中/已停用」两个标记和包的描述,下面有「信息」「待发布」两栏;原来顶栏左侧的「⋯」软件包菜单搬到了这页页头的右侧。 为什么做:这是 App Studio 改版的第一步(精简的软件包概览)。包的基本信息和等着发布的修改都集中到这一页,不用再去顶栏和设置里分头找。 出错会怎样:在 Studio 里管理软件包的人会碰到。最可能的问题是待发布数字和实际不符,或者从概览发布的结果和顶栏发布不一样;顶栏的发布按钮仍然保留,可以照常用。这个改动可以直接撤回,不涉及数据。 要你做什么:无 ## What changes - **New page `StudioPackageOverviewPage`**, reached at `/studio/PACKAGE/overview` (ADR-0084 § 概览 Overview, amendment 2026-11-26). It is drawn in an item page's frame: `StudioItemHeader` plus `StudioTab`. - **Header**: the app mark (or the package icon), the name, and two chips: 系统自带 with a lock on a read-only package or 可写; and 使用中 or 已停用. Both chips come from the package list row's own `writable` / `enabled`; a row that does not say draws no chip. The description is the header's note, and the ⋯ menu sits in the header's actions. - **信息 Info**: read-only rows for name, description, source, version and the package's app (a link that opens it). A read-only package says so beside its source. The id, namespace and type are folded under 技术信息. While the row is read, the card holds an announced loading row (`role=status`); a failed read says so in place of the fields. - **待发布 Pending** (`?tab=pending`): the existing `DraftChangesPanel` drawn in place. Its tab carries the pending count only while something is pending. - **`DraftChangesPanel`** gains two optional props. Without them it behaves exactly as before; the body hunk is re-indented, so read it with `-w`. - `embedded` draws the same header notes and body in a `section` instead of a `Sheet`, and does not dismiss toasts on open. - `reloadKey` re-reads the drafts when it moves. - **`StudioDesignSurface`** - Renders the overview branch with the panel wired prop for prop like the top bar's sheet: `doPublish` (or `undefined` when `publishReadOnly`), `draftScope`, `renderPublishRefusal`, the pair's `customizationOf`, and `publishing`. - `StudioPendingDraftsContext.Provider` now wraps the menu and pillars row, so the menu can read the count. - The top bar's Changes / Publish stays; ADR-0084 keeps it until a later card. - **⋯ `StudioPackageMenu`** left `StudioBackToApp` (its `menu` prop is removed) and now lives in the overview header. Its six rows are unchanged, and it opens aligned to the end. Disable, enable and delete stay in Setup (question 1 ruled B). - **`StudioMenu`**: the first row of a package's menu, above the groups and under no group's label, is 概览 (a package cube icon). While drafts wait it carries their count as an amber badge, a link of its own beside the row, which opens `?tab=pending`. A search lists the row when its name matches. `~org` and `~all` draw no such row. The menu reads the count from `StudioPendingDraftsContext`. - **Address and menu model** - Address: `studioPackageOverviewPath` and `studioOverviewTab` in `studioOverviewAddress.ts`. The open tab rides the console's reserved `tab` key (`RECORD_DETAIL_TAB_PARAM`, `urlParams.ts`; ui AGENTS rule objectstack-ai#8), which Studio's item pages already read through `ITEM_TOOL_TAB_PARAM`; no Studio constant restates it. The builder sits beside `studioAddress.ts` rather than in it because `urlParams.ts` imports `studioAddress.ts`, so the reverse import would be a cycle. `studioAddressTable.ts` gains the `overview` family, and its `tab` row describes the shared key: an item page's tab, and `pending` on the overview. - Menu model: `studioMenuOverviewEntry` (no entry outside a package; a badge only above zero), `studioMenuOverviewMatches`, and `studioMenuCurrentKey` answering `overview`. - **Package REST read**: `ListedPackageManifest` now carries `enabled` and `source` from the row of `GET /api/v1/packages`. There is no `package` metadata type. - **i18n (en, zh)**: `engine.studio.menu.overview`, `engine.studio.menu.overviewPending` with its singular `engine.studio.menu.overviewPendingOne` (the catalogue's `…One` form: "1 change waits for a publish"; zh reads the same either way), and `engine.studio.overview.*`. - **Changeset**: patch for `@object-ui/app-shell` and `@object-ui/i18n`. **Read first (by risk):** 1. `StudioDesignSurface.tsx`, the overview branch's `DraftChangesPanel` props. The Pending tab must publish exactly like the top bar. 2. `DraftChangesPanel.tsx`, the `embedded` return and the `reloadKey` effect deps. 3. `StudioMenu.tsx`, `renderOverview()` and its call above the groups: the badge is a sibling link, not nested in the row's link. ## Tests The broad run, typecheck and gates are on the final head 29bb079. Earlier rounds' ablations ran on 06830bf (page, Pending tab) and 618c0cf (menu row). - **New `StudioPackageOverview-37454.test.tsx`** (the real surface; the panel probe records the props given to the sheet and to the embedded panel). It covers: - the header chips in en and zh, read-only 系统自带 with a lock, and 已停用; - the menu in the header and not in the top bar, and no menu without `manage_metadata`; - the Info fields with the technical section folded, and the read-only source sentence; - the Pending count and the `?tab=pending` URL, with no count when nothing is pending; - embedded props identical to the sheet's, and `onPublish` undefined on both for a read-only package; - the branch order: a failed row read says so in place of the fields with the header kept; a read still on the wire shows the announced loading row and neither a failure nor fields, then the fields once it answers; an unknown package at its overview address lands on the not-found state; `~org/overview` redirects to the scope's area, read once through the route as the console mounts it and once with the surface alone. - **New `StudioMenu.overview-37454.test.tsx`** (real provider, sidebar primitive and router). It covers: - 概览 is the first link, above every group and under none; it opens the overview, reads 概览 in zh, and is current on the overview including the Pending tab; - CONTROL: `~org` and `~all` draw no row; - the badge reads 3 with its aria-label, and one draft reads in the singular ("1 change waits for a publish"); CONTROL: a ledger of 0 and an unknown ledger draw no badge; - one click on the badge lands on `/overview?tab=pending`, and the row lands on the Info tab; - a search lists the row on `over` but not on `flow`. - **`StudioMenu.test.tsx`**: the 常用 listing case now asserts that 概览 leads the menu before the 常用 types. Its objectstack-ai#37452 cases (chevrons, active pill, graphite accent) pass unchanged. - **Re-pointed, not weakened**: `StudioDesignSurface.publishCount-11807.test.tsx` now runs every case twice, from the top bar and from the Pending tab (`describe.each`). `StudioPackageMenu-37139.test.tsx` now opens the menu from the overview header and asserts that the top bar has none. Its no-menu check on `~org` and `~all` now asks at the overview's own address on each scope, where the menu would be, instead of on pages that never drew it. - **Extended**: `DraftChangesPanel.posture-12517.test.tsx` covers the embedded panel: no dialog, publish with no options, no toast dismiss (control: the sheet dismisses), a `reloadKey` re-read (control: an unmoved key reads nothing more), and nothing drawn when closed. `studioMenuModel.test.ts` covers the overview entry, the badge, the matcher and the current key. `studioAddress.test.ts` covers the builder, the tab and the table lists. - **Broad run** over `studio-design/`, `preview/` and `packages/i18n/` on 29bb079: 449 files, 4720 passed and 13 skipped; lock VERDICT command-exit 0. - **Typecheck**: app-shell `tsc --noEmit` and `tsc -p tsconfig.test.json` both exit 0 (the test project at an 8 GB heap). - **Ablation** (each leg went red, and each restore is proven: blob equals HEAD and `git diff HEAD` is empty): - A1: Pending tab `onPublish` set to undefined. 6 red: 5 Pending-tab publish cases and the prop-parity case. - A2: embedded panel dismisses toasts. 1 red. - A3: `reloadKey` dropped from the effect deps. 1 red. - A4: `embedded` branch disabled. 1 red. - A5: read-only chip forced off. 3 red. - A6: badge drawn at zero in the model. 1 red. - B1: the menu row moved below the groups. 1 red (the first-row pin). - B2: the badge drawn whatever the count. 2 red (the zero and unknown controls). - B3: the badge linked to the row's own address. 1 red (the badge-click pin). - C1: the page's failure branch off. 1 red (the load-failure pin). - C2: the page's loading branch off. 1 red (the loading pin). - C3: the surface lets an unknown package through to the overview. 1 red (the not-found pin). - C4a: the surface's own `~org` redirect off. 1 red (the surface-alone case). - C4b, the control: only the pillar redirect's `~org` branch lets the overview through. It stays green because the surface's guard behind it catches the address. - C4c: both doors off. 2 red (both cases). - C5: the singular label never chosen. 1 red (the one-draft pin). <details> <summary>Ablation log (ablation-replace verdicts)</summary> ```text LEG A1-pending-onPublish :: exit 1 :: Test Files 2 failed (2) Tests 6 failed | 24 passed (30) LEG A2-embedded-toast :: exit 1 :: Test Files 1 failed (1) Tests 1 failed | 9 passed (10) LEG A3-reloadKey :: exit 1 :: Test Files 1 failed (1) Tests 1 failed | 9 passed (10) LEG A4-embedded-inplace :: exit 1 :: Test Files 1 failed | 1 passed (2) Tests 1 failed | 23 passed (24) LEG A5-readonly-chip :: exit 1 :: Test Files 1 failed (1) Tests 3 failed | 11 passed (14) LEG A6-badge-zero :: exit 1 :: Test Files 1 failed (1) Tests 1 failed | 31 passed (32) RESTORE diff-HEAD-bytes=0 status=0 ; hash-ok on all four mutated files LEG B1-first-row :: exit 1 :: Test Files 1 failed (1) Tests 1 failed | 9 passed (10) LEG B2-badge-always :: exit 1 :: Test Files 1 failed (1) Tests 2 failed | 8 passed (10) LEG B3-badge-target :: exit 1 :: Test Files 1 failed (1) Tests 1 failed | 9 passed (10) RESTORE diff-HEAD-bytes=0 status=0 ; hash-ok StudioMenu.tsx LEG C1-load-failed :: exit 1 :: Tests 1 failed | 3 passed | 14 skipped (18) LEG C2-loading :: exit 1 :: Tests 1 failed | 3 passed | 14 skipped (18) LEG C3-unknown-package :: exit 1 :: Tests 1 failed | 3 passed | 14 skipped (18) LEG C5-singular :: exit 1 :: Tests 1 failed | 10 passed (11) LEG C4a-surface-guard :: exit 1 :: Tests 1 failed | 1 passed | 17 skipped (19) LEG C4b-pillar-only :: exit 0 :: Tests 2 passed | 17 skipped (19) (control: the guard behind it holds) LEG C4c-both-doors :: exit 1 :: Tests 2 failed | 17 skipped (19) RESTORE diff-HEAD-bytes=0 status=0 ; hash-ok on every mutated file os-verify-lock: VERDICT command-exit 0 (every batch) ``` </details> ## Acceptance notes - The claim's file surface was amended to add `StudioMenu.tsx` for the 概览 row and its badge only. `studio-tokens.ts`, `studioAccent.ts`, `studioTitleRow.tsx` and `PageShell.tsx` are untouched. - The row is drawn in `StudioMenu.tsx` and not through `buildStudioMenu`, which builds only the domain groups: adding a kind there would change the per-kind records the menu keys on. The row reuses the sidebar primitive's `SidebarMenuButton`, so its active state is the same graphite pill as every entry. In the real browser the current-row background reads `rgba(53, 57, 64, 0.1)` in light and `rgba(208, 210, 216, 0.18)` in dark, the same on the 流程 entry and on the 概览 row, and the 5 group chevrons are drawn. - The icon is a package cube (`Package`). A first cut used `LayoutDashboard`, which the browser showed to be indistinguishable from 应用's `LayoutGrid`. - **Mockup 4 comparison.** - Header, chips, description, tabs, the Info card and the folded 技术信息 match. - Not in this card's governing text: the standalone 导出 button (export stays a ⋯ row, six rows unchanged) and the 发布历史 tab. - The source line shows the row's own `source` (代码。只读:不能直接修改。). The mockup's pair-aware sentence (你的修改会单独保存…) is copy for a later pass. - The overview's `?tab=` is the console's reserved key from `urlParams.ts` (ui AGENTS rule objectstack-ai#8), not a Studio constant. Its builder lives in `studioOverviewAddress.ts` and not in `studioAddress.ts`: `urlParams.ts` imports `studioAddress.ts` and lists its `STUDIO_RETURN_PARAM` at module scope, so a back-import would be a cycle whose load order decides whether that list reads an uninitialised binding. - `reloadKey` is a prop added to the load effect's deps and not a `key=` bump, following ui AGENTS rule objectstack-ai#8 on forced reloads. - The top-bar Publish is unchanged and stays until the card ADR-0084 names for its removal. ## Verification Two-minute check: run the showcase example and open `/studio/com.example.showcase/overview`. Expect: - the header with ObjectStack Showcase, 系统自带 with a lock, 使用中 and the description, with ⋯ at the right; - 信息 with 基本信息 and a folded 技术信息; - 待发布 listing any drafts, with 全部发布 at the bottom. **Real browser**: Chromium at deviceScaleFactor 2, light and dark, on the showcase with 3 AI-style view drafts in its customization pair. - Shots taken: the Info tab, the Info tab with 技术信息 open, the ⋯ menu open with its six rows, the Pending tab with a count of 3, the Pending tab after publishing, the menu with 概览 first and its badge (full page and close-up), and a badge click landing on the Pending tab. - In the menu, the first links are 概览, its badge (3, `3 项修改待发布`), then 对象. Clicking the badge lands on `/studio/com.example.showcase/overview?tab=pending` with the Pending tab open and 概览 current. - Clicking 全部发布 in the Pending tab sent `POST /api/v1/packages/com.example.showcase.custom/publish-drafts`. `_drafts` then read empty and the tab count disappeared. <details> <summary>Derived gates (dispatch-gates --ran)</summary> ```text Run reconciliation — 39 derived, 39 run, 0 NOT-MEASURED, 0 UNRUN. ✓ dispatch-gates --ran: 39 derived famil(ies) accounted for — 39 run, 0 NOT-MEASURED (a DERIVED zero — all 39 recorded an exit code and none of them is 3). every one of the 39 :: exit 0 (incl. check:nul-bytes, check:published-files, check:type-check-coverage, check:test-source-alias, check:cross-package-test-inputs, check-adr-0087-registration, check-empty-changeset, check-changeset-no-major) pnpm --dir ui exec vitest run scripts/ :: Test Files 172 passed | 2 skipped (174) · Tests 5130 passed | 2 skipped · lock VERDICT command-exit 0 check-platform-checklist --changed-from origin/main: OK — 2 anchor(s) judged, 0 lost ``` </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
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
…iles become routers (objectstack-ai#38347) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuUejT99q3PMj1DD6eNBk5Kd)_ Part of objectstack-ai#34770 Clause-②: no Metadata-protocol: none Supersedes draft PR objectstack-ai#36158: the same change, resumed from `claude/issue-34770-skill-router-budget@937e2f1` on a new branch after seat 4's lane went vacant, with `main` merged in and the three eval cases of ruling 7176941587 Q1 B added. objectstack-ai#36158 can be closed with a pointer here; nothing on its branch is missing from this one. `Part of`, not `Fixes`: rulings 7128031203 and 7168461386 keep the first line at `Part of objectstack-ai#34770` until the catalog-size line of the card's Done-when is met, and this PR does not meet it (the catalog descriptions are not touched here). ## 维护者速读 - 用户能看到什么变化:用户无感。发给 AI 的两份技能说明(数据建模、自动化)的入口文件从约 27 KB、28 KB 缩到 9 KB、10.7 KB:入口只留开工前四项检查、会悄悄出错的坑、和「写什么去读哪个文件」的路由表,其余原文搬进同包的参考文件,教的内容不变。 - 为什么做:入口文件每次都整份装进 AI 的上下文,越长越贵、越容易漏读;缩成路由后,AI 只在需要时才读细节。 - 出错会怎样:只动教 AI 的文字和三道评测题的判分词,没有产品行为变化。风险是 AI 少读一段后答错;为此前后各跑了一轮评测,逐题对照(见 Tests)。可整笔撤回。 - 要你做的:座位复核后请审批人批准(`skills/**` 属 Tier H)。本 PR 合并后,云端仓库要按 #36934 把十一处托管章节的指向跟着改。 ## Rulings this executes - **7128031203** (①A ②A ④A): land as is, the hosted repoint is cloud's (#36934); a before and an after eval round, parity = the after round's failing set is the before round's or a subset, a flipped case is re-run once and the second reading counts; a ceiling row raised because text MOVED is accepted at the measured bytes with zero headroom when the sum of ceilings does not rise. - **7168461386** (A): six flow-shape facts go back into the automation entry, and that one row rises by exactly the bytes restored. - **7176941587** (Q1 B, Q2 A, Q3 A): three eval cases are relaxed first, then both rounds are run; the 187 bytes of entry wording stay; `triggers#6` is the eval seat's and is not touched here. ## What changes **Two entry files become routers.** `skills/objectstack-data/SKILL.md` 26,860 → 8,983 bytes (472 → 167 lines), `skills/objectstack-automation/SKILL.md` 28,206 → 10,703 bytes (480 → 215 lines). Each keeps four first checks, the traps that parse and then fail at run time, and a table that says which file to open for what is being written. No rule's teaching changes; the text moved, and the changeset lists section by section where it went and which anchors no longer exist in the entry files. **Eight files receive the moved text**: `objectstack-data/references/examples-objects.md`, `rules/field-types.md`, `rules/relationships.md`, `rules/security.md`, `rules/validation.md`; `objectstack-automation/references/examples-flows.md`, `references/integration-recipes.md`, and a re-pointed link in `references/state-machines-and-approvals.md`. **One correction** (unchanged from objectstack-ai#36158): the multi-value lookup note showed a `{record.tags.0}` token "in flow values", which a flow value slot refuses; it now shows the CEL spelling `record.tags[0]`. **New in this round, over `937e2f14`:** 1. **`main` merged** (through `600197a6ae`; a merge commit, not a rebase). Two things `main` changed in the entry files while objectstack-ai#36158 was open were mapped onto the relocated text instead of being lost with the old sections: - objectstack-ai#37551's option-label wording. The automation entry's item 4 of § Valid-but-silently-wrong keeps the rule and both outcomes (refused at publish where the options are inline, else no row matches or the run fails); `references/examples-flows.md` carries `main`'s sentence verbatim. - objectstack-ai#37551's `actionLayout` sentence of § Object Extension Model, now in `references/examples-objects.md`, verbatim. - A scan of every line `main` removed from the two entry files found no stale copy left in a receiving file. 2. **Three eval cases accept the spellings the bundles teach** (ruling 7176941587 Q1 B): - `objectstack-automation/evals/flows-triggers-approvals.json` case 1: `must_not_contain` `values:` → `values: {` (the key form a node carries; a prose heading also spells the bare word). - `objectstack-data/evals/hooks-security-seeds-datasources.json` case 7: `hooks: {` leaves `must_contain` for one any-of group `hooks: {` / `"hooks": {` / `.refusals.CREDIT_LIMIT` (the nested literal, its JSON spelling, or the dotted key `references/data-hooks.md` teaches). - `objectstack-data/evals/objects-fields-relationships.json` case 10: `type: 'boolean'` leaves `must_contain` for one any-of group `type: 'boolean'` / `Field.boolean(`. 3. **Ratchet rows re-measured on the merged tree**, since objectstack-ai#37747 made a row equal its measurement exactly (see Verification). 4. **The changeset** follows the merged tree's sizes and names the three eval cases. 5. **Three nits of contract review 7240993637** (head `edcd7df4ad`, one commit over the reviewed `3b62b5e9b0`): - `skills/objectstack-project/SKILL.md` line 187 pointed at objectstack-data, "Schema evolution", a heading the router moved. It now names `rules/field-types.md` § Changing a field that has data. That file sat at its ceiling, so the longer pointer is paid in the same file by five function-word cuts that lose no fact; its row stays 2990. - `scripts/check-skills-token-ratchet.mjs` loses one formula comment line the merge left in the `rules/security.md` history block. - The changeset says what the `Skill Boundaries` table listed (the neighbouring skills) and names the re-pointed objectstack-project line. ## Acceptance notes Decided by the thread (small, no shipped behaviour): - `"hooks": {` is a third member of case 7's any-of group. The ruling names the dotted key; the JSON spelling of the same nested literal is the form a `.json` translation file carries, and refusing it would fail a correct answer on quote marks. - `references/state-machines-and-approvals.md` measured 2 tokens over `main`'s row after the merge (the re-pointed link is 9 bytes longer). It is paid inside the file ("In a packaged flow, see below" → "A packaged flow: below") instead of raising a row no ruling covers. - The before round ran on `main` `600197a6ae` plus only the three eval-case edits (skill text byte-identical to `main`), so both rounds grade with the same token lists. Without that the three relaxed cases would differ between the rounds for a reason that is not the router. Not done, and why: - **objectstack-ai#36718's flow-shape harness is NOT re-run** (a merge condition of ruling 7128031203). It was scratch in the vacated container and is not in the repository. It was run to 0 on `937e2f14` (report 7170977110); this round adds no flow example over that head, only the two sentences above, both `main`'s own words. NOT MEASURED on this head. - The catalog-size line of Done-when: outside this PR, hence `Part of`. - `triggers#6` (ruling Q3 A): the eval seat's. ## Tests Skill evals, the command line of objectstack-ai#37235 unchanged for both rounds, run in the thread's cloud container (subscription login, no API key): ``` pnpm --filter @objectstack/scenarios skill-evals --skills objectstack-data,objectstack-automation --repeats 1 --model <as objectstack-ai#37235> --effort medium --concurrency 4 ``` | round | tree | turns | with-skill | objectstack-automation | objectstack-data | no-skill | trigger cases | |:--|:--|--:|--:|--:|--:|--:|--:| | before | `main` `600197a6ae` + the three eval-case edits (`304a4c5375`, local only) | 206/206 | 75/96 | 24/29 | 51/67 | 2/96 | 14/14 | | after, first reading | head `3b62b5e9b0` | 206/206 | 77/96 | 23/29 | 54/67 | 2/96 | 13/14 | | after, with the second readings | head `3b62b5e9b0` | +7 | **80/96** | 24/29 | 56/67 | | 14/14 | **Parity under ruling 7128031203 ②A holds: the after round's failing set is a strict subset of the before round's.** - **Failed in both rounds (16):** automation `flows-triggers-approvals` objectstack-ai#5, objectstack-ai#11, objectstack-ai#14, objectstack-ai#16, `integrations-declared` objectstack-ai#1; data `hooks-security-seeds-datasources` objectstack-ai#3, objectstack-ai#6, objectstack-ai#8, objectstack-ai#16, objectstack-ai#19, objectstack-ai#34, objectstack-ai#38; data `objects-fields-relationships` objectstack-ai#2, objectstack-ai#8, objectstack-ai#22, objectstack-ai#24. - **Failed before, pass after (5):** data `hooks-security-seeds-datasources` objectstack-ai#5, objectstack-ai#14, objectstack-ai#15, objectstack-ai#24; `objects-fields-relationships` objectstack-ai#10. - **Passed before, failed on the after round's first reading (4), each re-run once as the rule says, and each passed its second reading:** automation `flows-triggers-approvals` objectstack-ai#7 (the first answer carried the forbidden `current_user.positions`), data `hooks-security-seeds-datasources` objectstack-ai#25 (missed `default datasource`), `objects-fields-relationships` objectstack-ai#11 (missed `type: 'select'`), and trigger case `objectstack-data/triggers#6` (the bundle was read when it should have been left alone; the case of ruling Q3 A, which this PR does not change). Re-run with the same flags plus `--case` for those four keys: 7 of 7 turns, all four pass. - The three relaxed cases: `flows-triggers-approvals` objectstack-ai#1 and `hooks-security-seeds-datasources` objectstack-ai#7 pass in both rounds; `objects-fields-relationships` objectstack-ai#10 failed before on `label: '是否完成'`, not on the relaxed token, and passes after. One repetition per case is the round the card and objectstack-ai#37235 fix; at that depth a single case moves between readings for no reason of the text (four did here, in the unfavourable direction, and reverted). The five that moved the favourable way were not re-read: the rule re-reads a flip that would break parity, and a gain is not claimed from one reading. Read the result as "not lower", not as "five cases better". Both rounds were read on `3b62b5e9b0`. The commit after it (`edcd7df4ad`) changes no file of the two evaluated bundles (one line of objectstack-project, a script comment, the changeset), so the rounds were not run again. Records (round.json, every turn's record, both summaries): `skill-evals-before-304a4c53.tgz`, `skill-evals-after-3b62b5e9.tgz`, `skill-evals-after-reread-3b62b5e9.tgz` in the project's shared files, folder `34770/`. No unit test changes: the diff is skill text, three eval fixtures, ratchet rows and a changeset. The one test that names the ratchet script, `packages/spec/scripts/platform-catalog.test.ts`, ran apart from the gate list (see Verification). ## Verification Eleven skill files, measured on the head `edcd7df4ad` against `main` (`ceil((utf8 bytes − the SKILL.md version stamp line) / 4)`, the ratchet's own arithmetic): | file | lines | bytes | ratchet row | |:--|--:|--:|--:| | `objectstack-data/SKILL.md` | 472 → 167 | 26,860 → 8,983 | 6709 → 2239 | | `objectstack-data/references/examples-objects.md` | 192 → 305 | 6,892 → 14,441 | 1723 → 3611 | | `objectstack-data/rules/field-types.md` | 273 → 318 | 14,160 → 16,799 | 3540 → 4200 | | `objectstack-data/rules/relationships.md` | 384 → 393 | 16,714 → 17,274 | 4179 → 4319 | | `objectstack-data/rules/security.md` | 349 → 388 | 17,335 → 19,290 | 4334 → 4823 | | `objectstack-data/rules/validation.md` | 329 → 392 | 11,031 → 13,861 | 2758 → 3466 | | `objectstack-automation/SKILL.md` | 480 → 215 | 28,206 → 10,703 | 7045 → 2669 | | `objectstack-automation/references/examples-flows.md` | 145 → 432 | 6,170 → 25,729 | 1543 → 6433 | | `objectstack-automation/references/integration-recipes.md` | 186 → 212 | 10,379 → 12,222 | 2595 → 3056 | | `objectstack-automation/references/state-machines-and-approvals.md` | 388 → 388 | 23,706 → 23,708 | 5927 → 5927 | | **ten files of the move** | 3,198 → 3,210 | 161,453 → 163,010 | 40,353 → 40,743 | | `objectstack-project/SKILL.md` (the re-pointed line) | 214 → 214 | 11,985 → 11,987 | 2990 → 2990 | - **What an AI loads first**: the two entry files together 55,066 → 19,686 bytes (13,754 → 4,908 tokens), 64% smaller. - **Whole pack**: authored (ratcheted) 200,068 → 200,458 tokens (+390); bundle total 304,380 → 304,770. The pack does not shrink: the text moved inside it. - **Ruling ④A accounting**: every raised row equals its measured bytes, zero headroom (the gate is exact since objectstack-ai#37747, so a row above or below its file is red). Of the +390, +430 is the automation entry's own row (the pure router measured 2239; ruling 7168461386 A restores six flow-shape facts and ruling 7176941587 Q2 A keeps 187 bytes, 2239 → 2670, then 2669 after the merge). Set that authorised row aside and the moves sum to −40: the sum of ceilings does not rise. <details><summary>Gates run locally on the head</summary> Derived with `node scripts/pm/dispatch-gates.mjs --commands` on `3b62b5e9b0`, each command run and its exit code recorded, then reconciled with `--ran`: **69 derived, 68 run (each exit 0), 1 NOT-MEASURED, 0 unrun.** On head `edcd7df4ad` (the three nits) the 16 gates that read the changed files were run again, each exit 0: the fourteen skill gates (`check-skills-token-ratchet` and its self-test, `check:skill-docs`, `check:skill-refs`, `check:skill-served-sections`, `check:skill-links`, `check:skill-identifier-liveness`, `check:skill-compatibility`, `check:skill-frame-sync`, `check:doc-authoring`, `check:nul-bytes`, `check:pm-skill-id-lint`, `check:skill-examples`, `check:doc-formula-expressions`) and the two changeset gates. The other gates were not re-run on it. A trial merge with `origin/main` `c6a1328dfe` (which moved the ratchet script and `skills/objectstack-ai/SKILL.md` meanwhile) has no conflict and the ratchet is green on the merged tree (200,510 / 200,510); the trial was discarded and `main` is not merged again. - NOT MEASURED: `pnpm check:dual-build-cjs-loads` exited 3 (prerequisite not met: it needs every package's `dist`, a whole `pnpm build`). Long builds go to GitHub under this project's standing rule, so CI is the reading for it; the diff touches no package source. - `pnpm check:skill-examples` needed `pnpm --filter '@objectstack/client-react...' --filter '@objectstack/lint...' build` first; then exit 0, 351 prose examples type-check across 3 surfaces. - Outside the derived list, run apart: `pnpm --filter @objectstack/spec exec vitest run scripts/platform-catalog.test.ts` (the one test that names the ratchet script), 21 of 21. - `node scripts/pm/overlap-check.mjs` before the first push: clean against `origin/main` and the two open PRs that share a file (objectstack-ai#38224, objectstack-ai#38192). Exit 0, all 68: `node scripts/check-adr-0087-registration.mjs --base origin/main` · `node scripts/check-adr-0087-registration.mjs --self-test` · `node scripts/check-changeset-no-major.mjs --base origin/main` · `node scripts/check-closing-keyword-parity.mjs` · `node scripts/check-closing-keyword-parity.mjs --self-test` · `node scripts/check-comment-mask-corpus.mjs` · `node scripts/check-declaration-mirrors.mjs` · `node scripts/check-declaration-mirrors.mjs --self-test` · `node scripts/check-doc-route-spelling.mjs --advisory` · `node scripts/check-doc-route-spelling.mjs --self-test` · `node scripts/check-dts-emitted.mjs --self-test` · `node scripts/check-empty-changeset.mjs --base origin/main` · `node scripts/check-empty-changeset.mjs --self-test` · `node scripts/check-self-test-wired.mjs` · `node scripts/check-self-test-wired.mjs --self-test` · `node scripts/check-self-test-workflow-commands.mjs` · `node scripts/check-self-test-workflow-commands.mjs --self-test` · `node scripts/check-skills-token-ratchet.mjs` · `node scripts/check-skills-token-ratchet.mjs --self-test` · `node scripts/check-whole-set-label-write.mjs` · `node scripts/check-whole-set-label-write.mjs --self-test` · `node scripts/ci/assert-turbo-remote-cache.mjs --self-test` · `node scripts/ci/plan-test-core-shards.mjs --self-test` · `node scripts/ci/prune-turbo-cache.mjs --self-test` · `node scripts/ci/snapshot-next.mjs --self-test` · `node scripts/pm/bare-root-worklist.mjs --self-test` · `node scripts/pm/check-governed-queue-guard.mjs --self-test` · `node scripts/pm/release-rehearsal-clone.mjs --self-test` · `node scripts/release-pending-publish.mjs --self-test` · `--filter @objectstack/lint run check:doc-formula-expressions` · `--filter @objectstack/spec run check:skill-docs` · `--filter @objectstack/spec run check:skill-refs` · `--filter @objectstack/spec run check:skill-served-sections` · `check:adr-anchors` · `check:agent-test-spelling` · `check:bash32-floor` · `check:changeset-gate-self-tests` · `check:ci-filter-parity` · `check:cli-command-ids` · `check:closed-ceremony-text` · `check:corpus-claim-drift` · `check:cross-package-test-inputs` · `check:doc-authoring` · `check:driver-memory-census` · `check:dts-closure` · `check:entry-guard` · `check:gitlink-declared` · `check:lean-entry-closure` · `check:merge-driver` · `check:nul-bytes` · `check:parse-guard` · `check:pm-dispatch-gates` · `check:pm-expected-skips` · `check:pm-governed-merges` · `check:pm-skill-id-lint` · `check:pnpm-filter-targets` · `check:pnpm-flag-spellings` · `check:published-files` · `check:ratchet-remedy-authority` · `check:refd-timer-probe` · `check:role-word` · `check:scripts-symbol-anchors` · `check:skill-compatibility` · `check:skill-frame-sync` · `check:skill-identifier-liveness` · `check:skill-links` · `check:sourcemap-no-sources-content` · `check:watch-hint-literal` </details> **Writer**: all `skills/**` text was written by the card thread itself, a session at `CONTRACT_REVIEW_TIER` per the claim (7240213191). Every assistant turn of the session's transcript was served at the tier (210 of 210 when counted against the constant in `scripts/pm/dispatch-gates.mjs`); `verify-review-tier.mjs` itself refuses the transcript because the session once ran a read-only sub-agent to read the rulebook, so that count is the thread's reading, not the script's PASS. --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgUTzGxLiCQYi8Wvn3K)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgUTzGxLiCQYi8Wvn3K <!-- signed: repo:objectstack#2 · os-sales · session_01L6bhgUTzGxLiCQYi8Wvn3K --> --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restructure repository from single package to pnpm workspace with 5 scoped packages for granular consumption.
Package Structure
@objectstack/spec-meta- Metamodel types (ObjectEntity, ObjectField, ObjectView)@objectstack/spec-plugin- Plugin runtime interfaces (ObjectStackPlugin, PluginContext)@objectstack/spec-schemas- Zod validation schemas (ManifestSchema)@objectstack/spec-constants- Path conventions (PKG_CONVENTIONS)@objectstack/spec- Aggregator package re-exporting all sub-packagesBackward Compatibility
Existing imports remain unchanged:
Changes
packages/*/src/workspace:*dependenciesfilesfield to package.json for publish controlOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.