diff --git a/docs/adr/0070-package-first-authoring.md b/docs/adr/0070-package-first-authoring.md index 92cbda4ff9f..81ef3e66573 100644 --- a/docs/adr/0070-package-first-authoring.md +++ b/docs/adr/0070-package-first-authoring.md @@ -1,6 +1,6 @@ # ADR-0070: Package-first authoring — every runtime-authored item lives in a writable package (base); no orphans -**Status**: Accepted (2026-06-24) — P1–P3 implemented, merged & live-verified (see *Implementation status*); D4–D6 remaining · **Superseded in part by [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md)** (2026-10-31) — D3's prompt to create a base, for the paired case only: a customer's first customization of an installed base lands in the auto-created `.custom` package without a prompt (ADR-0146 D3); D5's destination for a package-less overlay row of a packaged item: the base's `.custom`, as a declared override, after which the package-less write closes (ADR-0146 D11). D1, D2, D4 and D6 stand; D3's prompt stands everywhere else. · **Amended** (2026-10-31, [#28117](https://github.com/objectstack-ai/objectstack/issues/28117) — the maintainer's ruling of 2026-10-30, 「大包 + 设置里启用模块」, then 「同意」: a `type: module` sub-package of an installed app may be **disabled**, not authored into, by an admin, on the tie PR [#28308](https://github.com/objectstack-ai/objectstack/pull/28308) shipped; see the amendment note under D2. D2's two kinds and its writability predicate stand.) · **Amended** (2026-11-29, [#38150](https://github.com/objectstack-ai/objectstack/issues/38150) — ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 3, ruled C, as [ADR-0084](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org) records it: D5's "move into a base" is the move-in door, and D5's bulk assignment to a default base is superseded; see the amendment note under D5. D1 and D6 stand.) +**Status**: Accepted (2026-06-24) — P1–P3 implemented, merged & live-verified (see *Implementation status*); D4–D6 remaining · **Superseded in part by [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md)** (2026-10-31) — D3's prompt to create a base, for the paired case only: a customer's first customization of an installed base lands in the auto-created `.custom` package without a prompt (ADR-0146 D3); D5's destination for a package-less overlay row of a packaged item: the base's `.custom`, as a declared override, after which the package-less write closes (ADR-0146 D11). D1, D2, D4 and D6 stand; D3's prompt stands everywhere else. · **Amended** (2026-10-31, [#28117](https://github.com/objectstack-ai/objectstack/issues/28117) — the maintainer's ruling of 2026-10-30, 「大包 + 设置里启用模块」, then 「同意」: a `type: module` sub-package of an installed app may be **disabled**, not authored into, by an admin, on the tie PR [#28308](https://github.com/objectstack-ai/objectstack/pull/28308) shipped; see the amendment note under D2. D2's two kinds and its writability predicate stand.) · **Amended** (2026-11-29, [#38150](https://github.com/objectstack-ai/objectstack/issues/38150) — ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 3, ruled C, as [ADR-0084](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org) records it: D5's "move into a base" is the move-in door, and D5's bulk assignment to a default base is superseded; see the amendment note under D5. D1 and D6 stand.) · **Amended** (2026-12-03, [#38174](https://github.com/objectstack-ai/objectstack/issues/38174) — ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 2, ruled A, as [ADR-0084](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org) records it, and ruling record [comment 7380917604](https://github.com/objectstack-ai/objectstack/issues/38174#issuecomment-7380917604), ruled A: the kernel refuses a create that names no package, five writers keep a named exemption (the four of the first ruling and, by the second, the organization-ownership ceremony's conversions of rows stored before the upgrade), and a loose row that exists is still saved in place; [PR #39386](https://github.com/objectstack-ai/objectstack/pull/39386) closes the kernel save, and D1 is complete except for one open door outside that save, Setup's datasource create, tracked in [#39398](https://github.com/objectstack-ai/objectstack/issues/39398); see the amendment note under D1. D1's text stands.) **Deciders**: ObjectStack Protocol Architects **Builds on**: [ADR-0005](./0005-metadata-customization-overlay.md) (`allowOrgOverride` / runtime overlay model; one Zod source per type), [ADR-0048](./0048-cross-package-metadata-collision.md) (one app per package; package id is the addressing unit), [ADR-0033](./0033-ai-assisted-metadata-authoring.md) (AI authors metadata as drafts), [ADR-0067](./0067-commit-history-and-rollback-for-ai-authoring.md) (commit history & rollback for AI authoring) **Consumers**: `@objectstack/objectql` (`protocol.saveMetaItem` write path), `@objectstack/spec` (metadata-type registry), `../objectui` (Studio create flow, package scope selector, `PackagesPage`), `../cloud` (`service-ai-studio` — `create_metadata` / `resolvePackageId` / `apply_blueprint`) @@ -23,6 +23,7 @@ Built across the three surfaces and verified end-to-end in a real environment vi - **P3 — AI (D3)** — `../cloud` `service-ai-studio` ([cloud#479](https://github.com/objectstack-ai/cloud/pull/479), [cloud#481](https://github.com/objectstack-ai/cloud/pull/481); tests [cloud#480](https://github.com/objectstack-ai/cloud/pull/480)): drops the shared `com.workspace` catch-all and auto-creates an **intentional named** base via `protocol.installPackage` (a real, Studio-visible package); single-writable-base coherence groups an incremental build into one base; an explicit platform/system `packageId` is discarded; empty field props are sanitized. - **Live dogfood (real LLM + runtime)**: a one-sentence magic build plus iterative business-user changes (add a related object, add a field) all landed in **one** app base (`app.iojn`), live and editable — no `com.workspace`, no orphans. - **Remaining**: **D4** (package-as-lifecycle-unit: delete-cascade / export / duplicate), **D5** (orphan migration + stopgap removal), **D6** (framing). The P1 kernel rejection becomes the runtime backstop once the framework release is consumed by the cloud runtime (today's runtime links the published framework). +- **D1's kernel close (2026-12-03, [#38174](https://github.com/objectstack-ai/objectstack/issues/38174))** — P1 refused a runtime create that names a read-only package, and still accepted one that names no package. [PR #39386](https://github.com/objectstack-ai/objectstack/pull/39386) closes that create too: the kernel save answers `422 WRITABLE_PACKAGE_REQUIRED` and names the writable packages. The kernel save is closed and D3's Kernel bullet is done. D1 is complete except for one open door outside the kernel save, Setup's datasource create, tracked in [#39398](https://github.com/objectstack-ai/objectstack/issues/39398); the amendment note under D1 has the exemptions and what stays open. ## TL;DR @@ -56,6 +57,18 @@ A runtime **create** (`intent = runtime-only`, i.e. not an overlay of an artifac - `null` / `sys_metadata`-scope ceases to be a *write* destination for new items. It survives only as (a) the read-side rehydration tag for legacy rows and (b) the source set for the D5 migration. - Overlays of artifact items (`intent = override-artifact`, `allowOrgOverride`) are **unchanged** — they keep their binding to the packaged item they customise. +> **Amended 2026-12-03 ([#38174](https://github.com/objectstack-ai/objectstack/issues/38174), ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 2, ruled A, written into [ADR-0084's amendment of 2026-11-26](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org); and ruling record [comment 7380917604](https://github.com/objectstack-ai/objectstack/issues/38174#issuecomment-7380917604), ruled A) — the kernel refuses a create that names no package; five writers keep a named exemption, and a loose row that exists is still saved in place.** This note records the implementation status of the decision above, with the exemptions the two rulings name. Before [PR #39386](https://github.com/objectstack-ai/objectstack/pull/39386), the kernel enforced one half of it: it refused a runtime create that named a read-only package, and it accepted one that named no package and stored a loose row. That PR closes the second half, in the same phase as the interface's ask and after it, with no flag. +> +> - **What is refused.** A save through `protocol.saveMetaItem`, draft or publish, that names no package is a create when no package holds the name, as an item or as a draft, and no package-less row or draft of it is stored. It is refused before anything is written, with `422 WRITABLE_PACKAGE_REQUIRED`, D1's own code, in a sentence that names the type and the name and lists, up to a cap, the writable packages the caller may name. `os meta register` is closed with the rest: a new item needs its `--package`. The permission-set clone door is closed with it too: a copy with no package to land in (a loose source, or a set a kernel package ships) is refused, and Setup's clone dialog asks for the landing package, offering the writable packages (claim amendment [7389333883](https://github.com/objectstack-ai/objectstack/issues/38174#issuecomment-7389333883), ruled A on 2026-12-03, with no new exemption). +> - **Five writers keep a named exemption.** The ruling of 2026-11-26 names four. An overlay of a kernel item, until the platform pair's whitelist exists: an overlay is `intent = override-artifact`, which the third bullet above leaves unchanged. The ruled import of an external datasource, which the server stamps `writeFace: 'external-import'`. A migration that preserves a binding, which re-saves a stored row under a server-stated `source`. Platform registration, which writes the metadata service's own store and does not pass the kernel save. The ruling of 2026-12-03 names the fifth, which the next bullet gives with its bound. A remote caller can state none of the marks these exemptions are read by. Decisions Q-a, answered A, and Q-b, answered C, add no metadata type and no case to the five (ADR-0084's first note of 2026-12-03 gives them). +> - **The fifth: the organization-ownership ceremony's conversions of rows stored before the upgrade** (ruling record [comment 7380917604](https://github.com/objectstack-ai/objectstack/issues/38174#issuecomment-7380917604): on the decision card the maintainer chose the option 「A 迁移照旧落为散落项」, and the record is the maintainer's word for "four writers, and no other" becoming five). `os migrate organization-ownership --apply` makes two creates that name no package (`packages/cli/src/utils/organization-ownership-apply.ts`): it converts an organization's authored positions and permission sets into environment metadata, and it promotes an email template. Both state one server-side provenance, the request field `packagelessCreateProvenance: 'organization-ownership-ceremony'`, on the precedent of the external import's `writeFace`, and no wire body can state it. Only the create judgment reads it. `source` is not set, so every other gate still judges these saves: a permission set that grants on an object that does not exist is still refused, and the ceremony reports it as a blocker. That is the exemption's bound: the ceremony's conversions of rows stored before the upgrade, and no other save. The converted items land loose. The ceremony's report lists what it left loose and names the door that moves it into a package, `POST /api/v1/packages/:id/move-in` (the amendment note under D5). +> - **What stays open.** A loose row that exists is saved in place, as a draft or as a published item, and it is deleted and its draft published as before. A save that names no package for a name a package holds is unchanged too: the name is not new, and [ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md) D4 judges the save as before ("A package-less row that bears a package-held name is a customization, never a second item"). A name whose only stored row is a draft that a package holds is not new either: a save of it that names no package is no create, and the draft address judges it as before (`packages/metadata-protocol/src/sys-metadata-repository.ts#unboundItemDraftAddress`). +> - **The automation definition doors.** `POST /api/v1/automation` and `PUT /api/v1/automation/:name` created flows that belong to no package. The first is retired, and the second updates a flow that exists and refuses a new name (decision Q-g, answered C: [comment 7234518908](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7234518908)). A flow is created with `PUT /api/v1/meta/flow/NAME?package=PKG`, which registers the flow and arms it at once. The refusal of a notify node that names an unregistered channel, which the automation doors ran and that save did not, moves onto it ([comment 7378011450](https://github.com/objectstack-ai/objectstack/issues/38174#issuecomment-7378011450)). +> - **One open door outside the kernel save.** Setup's `POST /api/v1/datasources` creates a runtime `datasource` and inserts its row into `sys_metadata` with no package, directly (`persistDatasourceRow`), so the write never reaches `protocol.saveMetaItem` and the close does not meet it. It is none of the five exemptions, the census that ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035) ruled on did not list it, and no ruling covers it. Until [#39398](https://github.com/objectstack-ai/objectstack/issues/39398) closes it (or a ruling exempts it), D1 is not complete for that door. +> - **Not reached.** Sharing rules, queues and assignment rules that an organization authors in Setup are data rows, and no metadata save writes them; ADR-0084's first note of 2026-12-03 corrects the sentence that bound them to a package. +> +> D1's three bullets stand as written. + ### D2 — Two package kinds; only writable packages are authoring targets [existing->ruled] - **Code / installed packages** — manifest `source: 'filesystem'`, or installed via the marketplace; scope `system` / `cloud` (already filtered out of the Studio selector). **Read-only.** New items may not be authored into them; only `allowOrgOverride` overlays are permitted (ADR-0005). This mirrors Airtable's installed apps/templates. @@ -71,7 +84,7 @@ Every authoring surface follows the same contract; none silently defaults into a - **Studio UI** [new]: the scope selector defaults to a *writable* package (the user's most-recent base) or, when none exists, the create entry points (`新建`) **prompt to create a base** (reuse the existing `PackagesPage` create dialog) before opening the designer. New items are bound to the active writable package. The "Local / Custom" (`sys_metadata`) scope is removed as a create destination (see D5). - **AI authoring** [new] (`../cloud` `service-ai-studio`): `resolvePackageId` **drops the auto-`com.workspace` fallback** (`metadata-tools.ts`) and the `applyDraft` re-bind (); when no writable package is resolvable it returns an actionable error directing the agent to `create_package` or `set_active_package`. `apply_blueprint` requires a package context (its `ensureAppPackage` is invoked only after an explicit create/confirm). Skill prompts (`metadata-authoring-skill.ts`, `solution-design-skill.ts`) are updated to make "establish the base first" a hard step, not a hint. -- **Kernel** [new]: D1 is the backstop — even if a surface regresses, the write is rejected, not orphaned. +- **Kernel** [new]: D1 is the backstop — even if a surface regresses, the write is rejected, not orphaned. *(Done 2026-12-03, [#38174](https://github.com/objectstack-ai/objectstack/issues/38174): the kernel refuses a create that names no package — the amendment note under D1; Setup's datasource create, which writes outside the kernel save, stays open in [#39398](https://github.com/objectstack-ai/objectstack/issues/39398).)* ### D4 — The package is the lifecycle unit (delete / export / snapshot / duplicate) [new] diff --git a/docs/adr/0084-application-builder-information-architecture.md b/docs/adr/0084-application-builder-information-architecture.md index c6d5e918968..5dd7691a061 100644 --- a/docs/adr/0084-application-builder-information-architecture.md +++ b/docs/adr/0084-application-builder-information-architecture.md @@ -1,6 +1,6 @@ # ADR-0084: Application-builder information architecture — six domain groups in a left menu (was: four content pillars) -**Status**: Accepted (2026-07-01) · **Amended in place** (2026-11-24, card [#36891](https://github.com/objectstack-ai/objectstack/issues/36891) of epic [#36890](https://github.com/objectstack-ai/objectstack/issues/36890), maintainer, verbatim: 「元数据列表如果全部改成点击之后弹出全屏的详情页呢?是不是对象流程这些可以用同一种风格,顶部的导航也不需要了。」, 「studio 不是一个应用,是某个应用的开发界面,点击左上角还是返回应用,」, 「我们说的弹出窗口全屏,应该是右侧全屏对吧,左侧菜单和前端一样可以折叠。」, and on the epic's fifteen numbered decisions, twice, 「全部按建议」): the four content pillars are no longer a navigation — Studio is the development surface of one app, its one navigation is a collapsible left menu of six groups that follow the spec's registered domains, and every registered metadata type has a group ([Amendment](#amendment-2026-11-24)). It lands by the hand-merge or authorized approval of the PR cut from #36891. · **Amended in place** (2026-11-25, card [#37199](https://github.com/objectstack-ai/objectstack/issues/37199) of the same epic, on decision card [#37192](https://github.com/objectstack-ai/objectstack/issues/37192)'s ruling record, [comment 7151834490](https://github.com/objectstack-ai/objectstack/issues/37192#issuecomment-7151834490), maintainer, verbatim: 「同意」, with the adjustments 「选项列表 5也放到高级」 and 「AI 应该提到第一层分类,放在最下面」): on a package the menu draws its six groups in two tiers — the ten **常用 Common** types, always listed, and one collapsed **高级 Advanced** fold that holds every other type and entry under its group's label; this replaces the 2026-11-24 line "the menu draws no audience tier", and the type-to-group table gains an order column and a tier column ([Amendment](#amendment-2026-11-25)). It lands by the hand-merge or authorized approval of the PR cut from #37199. · **Amended in place** (2026-11-26, card [#37451](https://github.com/objectstack-ai/objectstack/issues/37451) of epic [#37424](https://github.com/objectstack-ai/objectstack/issues/37424), maintainer, verbatim, as that epic records them: 「App Studio 就是开发软件包的入口吧」, 「现在你软件包的下拉菜单就只剩切换了,还不如做成切换,加上一个新建按钮」, 「Studio 应该是一个专用的企业色,不需要和应用的企业色一致。防止晕了」 and 「或者叫概览?」, and, on the decision card that carried the phase plan, the pick 「按推荐启动」): Studio — App Studio, 应用搭建 — is the entry for developing a package; its frame is two columns with no top bar, the package switcher returns to the top left with 新建软件包, 概览 Overview is the menu's first entry, Studio's accent is its own graphite, and each control the top bar held has a named home; organization-level content, the tiers of `dataset`, `position` and `form`, and what stays in Setup and what stays in Studio are written as ruled the same day ([Amendment](#amendment-2026-11-26)). It lands by the hand-merge or authorized approval of the PR cut from #37451. +**Status**: Accepted (2026-07-01) · **Amended in place** (2026-11-24, card [#36891](https://github.com/objectstack-ai/objectstack/issues/36891) of epic [#36890](https://github.com/objectstack-ai/objectstack/issues/36890), maintainer, verbatim: 「元数据列表如果全部改成点击之后弹出全屏的详情页呢?是不是对象流程这些可以用同一种风格,顶部的导航也不需要了。」, 「studio 不是一个应用,是某个应用的开发界面,点击左上角还是返回应用,」, 「我们说的弹出窗口全屏,应该是右侧全屏对吧,左侧菜单和前端一样可以折叠。」, and on the epic's fifteen numbered decisions, twice, 「全部按建议」): the four content pillars are no longer a navigation — Studio is the development surface of one app, its one navigation is a collapsible left menu of six groups that follow the spec's registered domains, and every registered metadata type has a group ([Amendment](#amendment-2026-11-24)). It lands by the hand-merge or authorized approval of the PR cut from #36891. · **Amended in place** (2026-11-25, card [#37199](https://github.com/objectstack-ai/objectstack/issues/37199) of the same epic, on decision card [#37192](https://github.com/objectstack-ai/objectstack/issues/37192)'s ruling record, [comment 7151834490](https://github.com/objectstack-ai/objectstack/issues/37192#issuecomment-7151834490), maintainer, verbatim: 「同意」, with the adjustments 「选项列表 5也放到高级」 and 「AI 应该提到第一层分类,放在最下面」): on a package the menu draws its six groups in two tiers — the ten **常用 Common** types, always listed, and one collapsed **高级 Advanced** fold that holds every other type and entry under its group's label; this replaces the 2026-11-24 line "the menu draws no audience tier", and the type-to-group table gains an order column and a tier column ([Amendment](#amendment-2026-11-25)). It lands by the hand-merge or authorized approval of the PR cut from #37199. · **Amended in place** (2026-11-26, card [#37451](https://github.com/objectstack-ai/objectstack/issues/37451) of epic [#37424](https://github.com/objectstack-ai/objectstack/issues/37424), maintainer, verbatim, as that epic records them: 「App Studio 就是开发软件包的入口吧」, 「现在你软件包的下拉菜单就只剩切换了,还不如做成切换,加上一个新建按钮」, 「Studio 应该是一个专用的企业色,不需要和应用的企业色一致。防止晕了」 and 「或者叫概览?」, and, on the decision card that carried the phase plan, the pick 「按推荐启动」): Studio — App Studio, 应用搭建 — is the entry for developing a package; its frame is two columns with no top bar, the package switcher returns to the top left with 新建软件包, 概览 Overview is the menu's first entry, Studio's accent is its own graphite, and each control the top bar held has a named home; organization-level content, the tiers of `dataset`, `position` and `form`, and what stays in Setup and what stays in Studio are written as ruled the same day ([Amendment](#amendment-2026-11-26)). It lands by the hand-merge or authorized approval of the PR cut from #37451. · **Amended in place** (2026-12-03, card [#38174](https://github.com/objectstack-ai/objectstack/issues/38174) of the same epic, on the maintainer's answer of 2026-11-28 to that epic's phase-4 decisions, recorded in [comment 7234139193](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7234139193), verbatim: 「一、不开工作区定制包,「没地方放」的情形怎么处理,就按照你的方案」, and on the maintainer's ruling of 2026-12-03, recorded in [comment 7380917604](https://github.com/objectstack-ai/objectstack/issues/38174#issuecomment-7380917604), the choice of the option 「A 迁移照旧落为散落项」): two sentences of the 2026-11-26 amendment are amended — sharing rules, queues and assignment rules that an organization authors in Setup are the organization's data rows and bind to no package, where that amendment says they bind to the `.custom` package of the object that owns them; and five writers keep a named exemption from the kernel's close of package-less creates, where it says four, the fifth being the organization-ownership ceremony's conversions of rows stored before the upgrade; no other sentence of this record changes ([the two notes of 2026-12-03 under Organization-level content](#amendment-2026-11-26-org)). It lands by the hand-merge or authorized approval of the ADR PR cut from #38174. **Deciders**: ObjectStack Protocol Architects **Builds on**: [ADR-0077](./0077-authoring-surface-boundary-hook-flow-validation.md) (route authoring by intent + audience + verifiability — the hook/flow/validation boundary), [ADR-0033](./0033-ai-assisted-metadata-authoring.md) (draft-gated authoring), [ADR-0063](./0063-two-kernel-agents-skills-are-the-extension-primitive.md)/[ADR-0064](./0064-tool-scoping-to-agent.md) (two kernel agents — AI is a platform capability, not app metadata), [ADR-0080](./0080-ai-authored-ui-jsx-source.md)/[ADR-0081](./0081-trusted-react-page-tier.md) (the Interface pillar's page-authoring depth). **Consumers**: `studio.app.ts` (the builder navigation), the Studio UI, `packages/cli/src/utils/format.ts` (`os` stats grouping), and the build agent (which surface authors which type). @@ -491,6 +491,10 @@ Decision 11 of the epic, as ruled on its questions 2 and 3 (maintainer: 「同 *(Amended 2026-11-29, card [#38150](https://github.com/objectstack-ai/objectstack/issues/38150), ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 3: the door shipped, and the bullets above are left as the ruling wrote them. The door is `POST /api/v1/packages/:id/move-in`. Its card opened it from the cross-package list: the "Loose" value of that list's source filter, `/studio/~all/metadata/TYPE?source=loose`, which a banner on Setup's Packages page links to for each type that holds a loose item. Studio's `~org` entry retired with the door, and the scope with it: the menu row, the scope's list, the scope's flow page (the flow designer, which opened a flow of no package full-screen), its 变更 Changes row and the batch publish behind that row. A flow that belongs to no package opens on its item page on the cross-package leg, `/studio/~all/metadata/flow/NAME`, and is still saved in place there; the flow designer opens on a package's flow. Every `/studio/~org/…` address lands on the Loose list of flows, `/studio/~all/metadata/flow?source=loose`. The bulk adopt is retired by a change of its own under that card ([#38545](https://github.com/objectstack-ai/objectstack/pull/38545)), not by the one that retired this entry. ADR-0070's D5 carries its mark of the same date, as the paragraph below asks.)* +*(Amended 2026-12-03, card [#38174](https://github.com/objectstack-ai/objectstack/issues/38174), on the maintainer's answer of 2026-11-28 to the phase-4 decisions, recorded in [comment 7234139193](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7234139193): the last sentence of the second bullet above is corrected. It says "Sharing rules, queues and assignment rules that an organization authors in Setup bind to the `.custom` package of the object that owns them, with no new exemption." The ruling that sentence follows left their write path "to be traced when the card is cut", and the trace found nothing that could bind. Each of the three has two sources ([ADR-0131](./0131-total-organization-ownership-no-null-organization-id.md) D6, the note of 2026-10-19 that charts regime C; [ADR-0142](./0142-ownership-queue-membership-claim-and-assignment-rules.md) D1 and D5). A package declares one as metadata, and the three metadata types are code-only: `sharing_rule`, `queue` and `assignment_rule` allow neither a runtime create nor an environment overlay (`packages/spec/src/kernel/metadata-plugin.zod.ts#DEFAULT_METADATA_TYPE_REGISTRY`). An organization authors its own as data rows, in `sys_sharing_rule`, `sys_queue` and `sys_assignment_rule`; those rows are written as data and never pass the metadata save, and a queue belongs to no single object. The maintainer's answer, verbatim: 「一、不开工作区定制包,「没地方放」的情形怎么处理,就按照你的方案」. The plan it approves answers the decision about these three, Q-d, with A: they are organization data with nothing to bind. So the sentence is read as: sharing rules, queues and assignment rules that an organization authors in Setup are the organization's data rows; they bind to no package, and the kernel's close of package-less creates does not reach them. Its last words stand for these rows: they take no exemption, because a row the close never meets needs none. The same answer's decisions Q-a (answered A: Setup's new permission sets and positions ask for a package) and Q-b (answered C: a shared view or report made in a system app is refused, with a pointer, until a platform pair exists) change no sentence of this record; Q-b's answer is also recorded on #35624 ([comment 7234145174](https://github.com/objectstack-ai/objectstack/issues/35624#issuecomment-7234145174)). The bullet is left as the ruling wrote it; read its last sentence with this note. This note, with its entry on the status line, is the amendment that Prime Directive 13 of `AGENTS.md` requires where a recorded decision is reversed.)* + +*(Amended 2026-12-03, card [#38174](https://github.com/objectstack-ai/objectstack/issues/38174), ruling record [comment 7380917604](https://github.com/objectstack-ai/objectstack/issues/38174#issuecomment-7380917604), ruled A: the second bullet above says "Four writers keep a named exemption, and no other", and five keep one. On the decision card the maintainer chose the option 「A 迁移照旧落为散落项」. The option's consequence line as the maintainer read it, verbatim: 「升级照常完成,旧岗位、权限集、邮件模板保留为散落项,之后可移入软件包;服务端豁免由四类变五类。约一个 PR 加注记。」 The record says of itself that it is the maintainer's word for "four writers, and no other" becoming five. The fifth exemption is the organization-ownership ceremony's, and its bound is the ceremony's conversions of rows stored before the upgrade. `os migrate organization-ownership --apply` converts an organization's authored positions and permission sets into environment metadata and promotes an email template, and those two creates name no package. They state one server-side provenance, on the precedent of the `writeFace` the external import states; in the code it is the request field `packagelessCreateProvenance: 'organization-ownership-ceremony'`, and no wire body can state it. Only the create judgment reads it. `source` is not set, so every other gate of the save still judges these saves. What the two creates write is loose, and it stays legal as the third bullet above says of an item that belongs to no package. The ceremony's report lists what it left loose and names the door that moves it, `POST /api/v1/packages/:id/move-in`. The four writers the bullet names keep their exemptions, and no sixth is added. The bullet is left as the ruling of 2026-11-26 wrote it; read "Four writers keep a named exemption, and no other" with this note. ADR-0070's D1 carries its mark of the same date, as the paragraph below asks; that mark records the kernel's close, which the second bullet above says the kernel does not yet do, and the five exemptions.)* + ADR-0070 is not edited by this amendment. Where the ruling restates its D1 and D5, the phase-4 cards that carry the ruling out owe that record its marks. ### What the amendment replaces, and what stands {#amendment-2026-11-26-stands}