Repository navigation
feat(spec,cli,skills)!: behavioural metadata names stay short, and spec declares the namespace address grammar (ADR-0150 child P) - #31765
Conversation
…sh predicate, and the router-reserved `_` name prefix (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCXuaLn9G4i3Scnix
…ositions (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCXuaLn9G4i3Scnix
… changeset and ADR-0087 entry (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCXuaLn9G4i3Scnix
… reference docs and strictness ledger Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCXuaLn9G4i3Scnix
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCXuaLn9G4i3Scnix
…rsed-state twin (ADR-0122) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCXuaLn9G4i3Scnix
…-led name as refused Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCXuaLn9G4i3Scnix
… a tracker number Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCXuaLn9G4i3Scnix
…ot a leading underscore The create-refusal case named its flow `_dogfood_unsavable_flow_20862`, leaning on FlowSchema.name admitting a leading `_` so the engine registered it and the store refused it. A `_`-led flow name is now refused before the engine (ADR-0150 D5), so the case creates a letter-led name with the default-edge-with-condition definition the update case already uses: the engine registers it, the publish gate refuses the save with 422 INVALID_METADATA, and the registration is withdrawn. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRCXuaLn9G4i3Scnix
📓 Docs Drift CheckThis PR changes 2 package(s): 38 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 14 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 180 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin fa5e0181198a1910c01102fa4075ef0256e09a6d && git checkout fa5e0181198a1910c01102fa4075ef0256e09a6d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9e1f1f90d5a62c81b6d1561d4baa7c822cc88b33 7cfcbc304fb950914fa0acfffa3b486231577322 && git checkout -B drift-repro 9e1f1f90d5a62c81b6d1561d4baa7c822cc88b33 && git merge --no-ff 7cfcbc304fb950914fa0acfffa3b486231577322
node scripts/docs-audit/affected-docs.mjs --json 9e1f1f90d5a62c81b6d1561d4baa7c822cc88b33
|
|
domain:spec#2 · zhuangjianguo · session_01QsR2jUe9c6YdtNkrzUnMUd Contract-review-claim: session_01QsR2jUe9c6YdtNkrzUnMUd · head 7cfcbc3 · 2026-11-09T03:34Z The seat runs the CONTRACT_REVIEW_TIER review on an isolated sub-agent (director seat off duty; maintainer rule 2026-11-08 「有 fable 车道就可以契约复审啊」). CI on this head: 57 success, 10 skipped, 0 failed. |
|
domain:spec#2 · zhuangjianguo · session_01QsR2jUe9c6YdtNkrzUnMUd Contract reviewServed-tier: Inputs: card #31669 body and all 8 comments (triage 6727644402, claim 6727701819 and amends 6727833678 / 6727964762 / 6730426080, devx notifies 6730710213 / 6731365836, dev report 6731284162); PR #31765 body, 48-file list, net diff ① Derived judgmentsAccept-set changes the diff implies:
Public-surface changes:
② Semver level
③ Boundary flags
④ Design judgmentEach
Findings:
No must-fix, no should-fix. Nits alone end the round. Rendered by the seat's isolated review sub-agent (child session 9f9f0eb5-2885-550b-8927-ffc7a5154621); the seat adopts and posts it. Implemented-by: VERDICT: PASS Seat adoption note: read before adopting. Spot-checked F1 (no |
|
domain:spec#2 · zhuangjianguo · session_01QsR2jUe9c6YdtNkrzUnMUd 维护者速读
席位核对 · ACCEPT · 2026-11-09T03:47Z · head
|
…0129 and ADR-0130 point at it (ADR-0150 child A) (objectstack-ai#31841) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbRSEASPFQojyg3PhVYDG2Jp)_ Fixes objectstack-ai#31685 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:只改文档(四份 ADR 和一处代码注释,不改代码)。ADR-0150 补记子卡上已裁定、或由专题席位记录的七条:闭包外的包被拒绝(含同一发布包里没声明依赖的兄弟包)、阶段一之前就重名的部署被拒绝、同对象同名动作被拒绝(落在动作收尾卡)、`base`/`system`/`sys` 不受同命名空间唯一规则约束、扩展目标和 everyone/guest 锚点按无包调用方解析、无归属的引擎函数算平台持有者。ADR-0048 §5 的 lint 条目改成现状;ADR-0129、ADR-0130 加带日期的交叉引用。 - 为什么改:这些裁决都已在子卡上定下并有记录,但 ADR-0150 正文还写着旧说法(比如「阶段一覆盖的类型不会有两个持有者」「动作已被阶段一兜底」);P 合入后 ADR-0048 §5 还说 lint 对所有裸名告警、阶段三会改成拒绝。不改的话,后续子卡会照着过时的正文去做。 - 风险与回滚:只改文字,无运行时风险,不发版(`skip-changeset`)。回滚即撤销这一个提交。 - 先看:ADR-0150 D3 新增的 (c) 段和「Covered and uncovered types」段;ADR-0048 §5 第一个条目;ADR-0130 D1 下的注记。 - 两分钟验证:运行 `pnpm check:adr-index && node scripts/check-adr-links.mjs`,两条都应退出 0。 - 需要你做的:契约复审通过后,审阅并合并(Tier H,`docs/adr/**`)。 ## What changes Docs only: four ADRs and one code comment. No code, schema, lint or skills change. - **ADR-0150** (status line gains an **Amended** entry). Each sentence cites the record it writes in: - **D3 (c)**: a package caller never resolves to a package outside its declared closure by bare name. This is step 3 of the ruled rule (6723462584), recorded as such by the epic seat (6728487836). A sibling package of the same release artifact is no exception unless declared (N1, ruled A, 6729820123), with the severity that record gives. - **D3, caller-less references**: a picklist extension's target (epic-seat ruling X, 6728613177) and the audience anchors `everyone` and `guest` (an epic-seat reading recorded in its E3 review, 6732998040 on draft PR objectstack-ai#31815) resolve as a caller with no package. - **D2**: the shareable namespaces `base`, `system` and `sys` are not judged by child N's co-owner rule (epic red-line review of N, 6728571147 on PR objectstack-ai#31717); a qualified address there answers `409` with the candidates, and G1 pins it. - **D4**: an owner-less engine function registration is the platform's holder, reachable from every closure like `sys` (R2 review 6729484996 item 2, refined by re-review 6730444942 item 1). - **Execution plan, covered types**: the object-less action is what phase 1 covers. Two cases keep two package holders even so: a clash sealed before phase 1 (objectstack-ai#31677 Q1 ruled A, 6729831159) and a same-object same-name action pair (objectstack-ai#31697 ruled A, 6729825528). The sentence "no two package holders of a name exist while its refusal stands" is narrowed accordingly. - **Execution plan, releasability**: the "except D3 (a)" sentence now also names D3 (c). - **TL;DR 7**: the three ruled refusals above join the list; "Measured first-party, none of them refuses anything" becomes "Where measured first-party, ...". - **ADR-0048**: - §5's `[done]` authoring-lint bullet is rewritten in place, as d5106ae did for the same bullet. It now describes what `naming/namespace-prefix` reports since child P (objectstack-ai#31765): the duplicate finding (`DUPLICATE_KEYED_TYPES`), and the bare-name finding for capabilities and positions only (`PREFIX_JUDGED_COLLECTIONS`). Phase 3 of ruling C is withdrawn (record 6721941146 on objectstack-ai#30806). - A dated note under §3.4 says its lint sentence still holds (see Acceptance notes). - The status line gains an **Amended** entry. - **ADR-0129**: a cross-reference to ADR-0150 on the status line, and a dated note under D4. ADR-0028 is re-opened for the behavioural tier only, objects stay under this record, and ruling C's planned amendment of D2 is withdrawn (6721941146). - **ADR-0130**: one dated note under D1's first paragraph (N1, 6729820123). Co-ownership does not decide how a reference between two packages of one artifact resolves; the sibling allowance narrows to declared dependencies (ADR-0150 D3). The ADR-0130 text itself is not rewritten. - **`packages/cli/src/utils/picklist-references.ts`**: the module comment at line 42 gains a dated note pointing at ADR-0150 D3 and the ADR-0130 note. Comment only. ## Why Child A of epic objectstack-ai#31527. The epic seat carried seven items into A's ADR-0150 text (comment 6729937614 on objectstack-ai#31685), on top of the card's ADR-0048 and ADR-0129 items. Each item was checked against the record it cites before its sentence was written. ## Tests None: a docs-only change (`skip-changeset`). The one code edit is a comment, so there is no tested behaviour to ablate. ## Acceptance notes - **Deviation: ADR-0048 §3.4 is noted, not amended.** The card called its lint sentence stale. Measured on `origin/main` 732def5, it is not: the sentence cites the rule for "an author shipping two `page/home` in one package". That duplicate finding still ships (`DUPLICATE_KEYED_TYPES` in `packages/cli/src/commands/lint.ts`), and ADR-0150 D9 keeps it. So §3.4 gets a dated note saying the sentence holds and pointing at §5, and only §5's bullet is rewritten. The seat agreed to this reading. - **Deviation: the ADR-0130 note sits under D1.** ADR-0130 has no sentence about resolving picklists or references. The CLI comment at `picklist-references.ts:42` leans on D1's co-ownership claim, so that is the sentence N1 means. The seat agreed to this placement. - **Status-line pointers:** ADR-0028's and ADR-0048's pointers to ADR-0150 landed with objectstack-ai#31586, and they are not duplicated here. ADR-0150's own status line still reads "Proposed (2026-11-08) ... becomes Accepted by the maintainer's merge", and ADR-0048's pointer still says "takes effect when ADR-0150 is accepted". Both are left as written; they are noted here for the seat. - **`tool`, corrected per contract review F1** (record 6734267031): `tool` joined phase 1's list (objectstack-ai#31414; ADR-0048 P1.10), and `BARE_NAME_ONE_HOLDER_TYPES` (`packages/core/src/package-scoped-resolution.ts`) lists 13 entries with `tool` last. ADR-0150 now counts 14 covered types (the constant's 13 plus permission sets), 11 uncovered types without `tool`, and 14 B children. The same fix commit (0a18e76) drops the letter from the N1 citation (F2), dates the ADR-0130 note's install-judge reading to E6 objectstack-ai#31731 (F3), and scopes the sealed-clash count to E5's measurement (F5). - **The E3 reading** is cited as an epic-seat reading recorded on draft PR objectstack-ai#31815 (6732998040), not as a ruling. ## Verification <details><summary>Readings</summary> Measured on commit bfc1d99 (base `origin/main` 732def5); after merging `origin/main` at ca23ce3, none of the five files changed, and `check:adr-index`, `check-adr-links` and `check-adr-anchors` were re-run there: exit 0 each. - `dispatch-gates`: 56 gates derived for this diff, 56 run, all exit 0. `--ran` reconcile: 0 NOT-MEASURED, 0 UNRUN. - Prerequisite builds under the verify lock: spec + formula + lint prebuild, VERDICT 0; full `turbo run build --filter=./packages/**`, VERDICT 0 (81/81 tasks). - First pass: 6 gates exited 3 (prerequisites missing, not a measurement): the teardown self-test (pinned fixture commit 621a487 not fetched in a shallow clone), and dual-build-cjs-loads, i18n, i18n-coverage, i18n-walk-parity and lean-entry-closure (needed built packages). After fetching the commit and running the full build, all six exit 0. - Body gates with this body as the event payload: check-closing-keyword-parity, check-changeset-no-major, check:adr-0087-registration and check-partof-closing-keyword, exit 0 each. - Diff: 5 files, +106 / -26. The review-fix commit 0a18e76 touches only ADR-0150 and ADR-0130; `check:adr-index`, `check-adr-links` and `check-adr-anchors` were re-run on it: exit 0 each. </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No schema touched.) - [x] 2. Every name I added uses the casing for its kind. (No name added.) - [ ] 3. No formatter ran; `pnpm lint` passes. (No formatter ran. The repo-wide `pnpm lint` scan is CI's run; the only source edit is a comment.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. (Publishes nothing: `skip-changeset`.) - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (Not touched.) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QsR2jUkMujHycV1pMLHL8h --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jUkMujHycV1pMLHL8h)_ <!-- signed: domain:spec#2 · zhuangjianguo · session_01QsR2jUkMujHycV1pMLHL8h --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Fixes #31669
维护者速读
send_email而不是crm_send_email)——os lint不再为此告警,技能文档也不再这样教;对象、文档、权限能力(capability)和岗位(position)仍然必须带前缀。另外,spec 先把后续子卡要用的"按包寻址"规则写成常量和函数(URL 中的命名空间段、_env段、给 AI 用的NS-NAME工具名、命名空间与对象名不得重名的判断),本 PR 不接入任何运行时入口。_开头(_开头的段留给路由,如_env);本仓库和 HotCRM 实测没有真实条目受影响,只有一个 dogfood 测试夹具用了_开头的流程名,已在本 PR 改掉。已经带前缀的名字全部照常可用,不需要任何改名。回滚即还原本 PR,无数据迁移。packages/spec/src/kernel/address-grammar.ts(寻址规则)、packages/spec/src/ai/face-name.ts(AI 工具名推导,超过 64 字符时截断加哈希)、packages/cli/src/commands/lint.ts的PREFIX_JUDGED_COLLECTIONS。pnpm --filter @objectstack/spec exec vitest run --project local src/kernel/address-grammar.test.ts src/kernel/router-reserved-name.test.ts src/ai/face-name.test.ts src/kernel/namespace-prefix.test.ts,再跑pnpm --filter @objectstack/cli exec vitest run test/lint-namespace-prefix.test.ts。What changes
Spec (
packages/spec) — declarations only; ⛔ nothing here wires a door, a router, the MCP bridge or the install gate.kernel/address-grammar.ts, exported from@objectstack/spec/kernel:NAMESPACE_PATTERN(now the one sourcemanifest.namespaceandderiveNamespaceFromPackageIdread),ENVIRONMENT_ADDRESS_SEGMENT(_env),ROUTER_RESERVED_NAME_PREFIX(_),ROUTER_ADDRESSABLE_NAME_PATTERNand its message, the namespace-position literal constantNAMESPACE_POSITION_LITERALS(per door, measured offROUTE_LEDGER), the derived install-refused setNAMESPACE_REFUSED_LITERALS(actions,connectors,global,hooks,oauth,trigger),validateNamespaceNotAddressLiteral, andreadNamespacePositionSegment— the router's documented precedence (literal, then_env, then an installed namespace, else bare; never a guess).ai/face-name.ts:deriveAiFaceName({ namespace, objectName, name })givesNS-NAMEfor a package tool, skill, agent or object-less action,OBJECT-ACTIONfor an object-bound action, the bareNAMEfor an environment item; past 64 characters, the first 55, then-and 8 hex of FNV-1a 32 over the UTF-8 bytes of the whole uncut face. ConstantsAI_FACE_NAME_MAX_LENGTH,AI_FACE_NAME_CUT_LENGTH,AI_FACE_NAME_SEPARATOR,AI_FACE_NAME_HASH_LENGTH.ai/mcp.zod.ts:MCP_ACTION_NAMESPACE_MEMBER('namespace'),McpActionNamespaceSchema(the manifest namespace grammar) andMcpListedActionAddressSchema(name,objectName?,namespace?— the address alist_actionsrow carries andrun_actiontakes back), declared for G2 to mix in asconfirmis.packages/mcpis untouched.kernel/namespace-prefix.ts:findNamespaceObjectNameClashes(incoming, installed)refuses a namespace equal to an object name in both directions, and an object short-namedcustom(the ADR-0146 pair's namespace isNS_custom); each clash names both spellings. Unwired: child K wires the doors._(tool, skill, agent, flow, hook, connector, sharing rule, job, analytics cube, api endpoint) now useROUTER_ADDRESSABLE_NAME_PATTERN(^[a-z][a-z0-9_]*$), refused atdefineStack,os validateand wherever the body is parsed, with a message naming the reserved prefix. ADR-0087 semantic entrybucket-two-three-name-underscore-led-refused.CLI (
packages/cli/src/commands/lint.ts) —naming/namespace-prefix's bare-name finding now judges onlyPREFIX_JUDGED_COLLECTIONS(capabilities, bucket 1NS.SHORT; positions, one environment slot per D7 and #31676's amendment), each with its reason in the message. Every bucket 2–4 collection is short-named by default; a new collection is not judged unless added there. The intra-package duplicate finding is unchanged.NAME_JUDGED_ELSEWHEREis retired with the default it served.PLATFORM_REQUESTED_BARE_NAMESstays (ADR-0150 D3 names it). Twogenerate.tsdocblocks are corrected (comments only, seat-approved).Dogfood fixture (seat amend 3) —
packages/qa/dogfood/test/automation-authoring-doors-durable.dogfood.test.ts: the create-refusal case named its flow_dogfood_unsavable_flow_20862, relying onFlowSchema.nameadmitting a leading_so the engine registered it and the store refused it. That name is now refused before the engine, so the case creates a letter-led name with the default-edge-with-condition definition the update case already uses: the engine registers it, the publish gate refuses the save (422 INVALID_METADATA), and the registration is withdrawn. Both 404 reads stay, before and after the cold boot. Test-only, +8 / −8.Skills and docs —
skills/README.mdandskills/objectstack-platform/SKILL.mdreplace "every non-object name carries the namespace" with the post-ADR-0150 rule (objects, docs, capabilities and positions carry it; other names stay short; no_-led name); two evalexpected_outputs drop the prefix they asked for.content/docs/ui/doc-pages.mdxL77-80 (seat-approved) no longer says the lint holds every name to the prefix. create-objectstack templates carry no non-object prefix instruction (they prefix only theblank_noteobject), so nothing there retires.Why
ADR-0150 (accepted by merge, #31586) D9: "Retired by child P: phase 2's
naming/namespace-prefixbare-name warning for buckets 2–4 … and the authoring skills' and templates' instruction to prefix bucket 2–4 names." D5 and D6 hand P the grammar helpers, the namespace-position literal constant and the face derivation; Q3 hands it K's predicate (ruling 6723571682).Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: updated here —
skills/README.md,skills/objectstack-platform/SKILL.md,skills/objectstack-ai/evals/skills-tools-knowledge.json,skills/objectstack-platform/evals/config-plugins-ops.json;content/docs/ui/doc-pages.mdx.skills/**line readings (net added lines ≤ 0, as the card bounds):skills/README.md(whole file)skills/objectstack-platform/SKILL.md(whole file)skills/objectstack-ai/evals/skills-tools-knowledge.jsonskills/objectstack-platform/evals/config-plugins-ops.jsonskills/objectstack-platform/**(whole package)skills/objectstack-ai/**(whole package)skills/**(whole tree)Diff on
skills/**: +6 / −7, net −1.Verification
Head
7cfcbc30(this branch withmain9e1f1f90merged). The readings below were taken on9d8ded9e(main0105a687merged); main's three later commits touch none of this change's files, and on7cfcbc30, after a closure rebuild, the scoped re-runs are green: 10 touched spec test files (431 tests), the three cli namespace test files (79),plugin-sharing(72 files / 1487 tests), and the edited dogfood file plus main's newbare-name-one-holder-flow-familydogfood file (11 tests). The derived gate set is the same 130. Every long run was underos-verify-lock.dispatch-gates --ranon9d8ded9e: 130 derived, 130 run, 0 NOT-MEASURED, all exit 0 (re-run in full after the main merge;check:dual-build-cjs-loadsandcheck:i18n-coverageran after a closure build). Roster gatescheck:changeset-fixed,check:error-code-casing,check:filter-alias-parity,check:stack-collection-maps: exit 0. ESLint on every changed.tsfile: clean.--project local: 827 files green (5 name tests that listed a_-led name as valid now list it as refused).test:repoin four shards: 23 files / 404 tests, 23 / 368, 23 / 302, 22 / 482. After the merge, the 9 touched spec test files: 392 passed.validate-namespace-name.test.ts: 3 files / 79 tests.OS_TEST_SHARDslices): 111 files / 959 tests; 111 / 747 (4 skipped); 111 / 908 (6 skipped); 110 / 1079 (2 files, 31 tests skipped). Slice 2 had one red, the_-led fixture above; after the fixture change that file is 7/7, and 7/7 again on the merged head. The battery itself ran on9956785b(before the main merge, which touched no file of this change).Acceptance notes
buildIndexName(cut, then 8 hex of SHA-1 vianode:crypto). Spec is isomorphic and the derivation synchronous, sonode:cryptois not available there; the face uses FNV-1a 32 over the UTF-8 bytes of the whole uncut face, the isomorphic hash the tree already uses (service-settings'fnv32:digest,service-messaging's backoff,types' validator lanes). The JSDoc states the algorithm and its input.face-name.test.tspins one literal value,c75940c6, the hash of a 68-character face; its comment names the published FNV-1a 32 vectors, but no test asserts them.os generatekeeps writing<ns>_scaffold names (seat reading 4). That spelling stays valid (D9); only the docblocks that said the lint requires it are corrected.METADATA_ITEM_NAME_PATTERN, metadata-protocol) already refused a_-led name before this PR; its message does not name the router reservation, and changing it is metadata-protocol, outside this card's surface. The schema-level refusal this PR adds names it wherever the body is parsed.OBJECT-ACTION, not the bare name: theOBJECT-ACTIONform never carries the namespace, so the package/environment distinction does not arise there (D6's "an environment item keeps its bareNAME" sits under theNS-NAMEform).NAMESPACE_POSITION_LITERALS.actionscarries the empty segment ofPOST /actions//:action(the object-less global-action spelling), so the constant matches every ledger row at that position for G1's pin. No namespace is empty, so it never reaches the install-refused set.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.## 维护者速读block, which the seat's delivery rule asks for in Chinese).🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jRCXuaLn9G4i3Scnix