Skip to content

Commit b7131f3

Browse files
os-warrenclaude
andauthored
Select an import-list doc block as module description only on an explicit @module marker, and re-attach the eight wedged schema comments (#13794)
* Select an import-list doc block as module description only on an explicit @module marker Route 1 of #13334: inside the import list — imports before the block, an import the first thing after it — no positional signal separates a genuine module header from one schema's detached comment (the card measured every signal; only the prose differs). The selector now asks the author instead: only a block carrying @module on a prose line selects there, in both directions, with the one exception of plumbing that runs to EOF (a pure re-export module has no symbol the block could have been torn from). The two genuine headers in that position, shared/mapping and system/cache, each gain the one-line marker — the repo's existing spelling, fourteen headers above their imports already open with it. No other source is touched. Measured over all 208 corpus sources, old selector vs new: 200 verdicts byte-identical, exactly the 8 misattributed openings flip SELECTED->null, 0 change to a different block. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PBjwYLS6BciTQW3c9xQiD2 * Move the eight wedged doc blocks back to the declarations they document Route 2 of #13334. The lazify codemod's injected import had wedged itself between each block and its symbol; the injected imports move up into the import block and each comment moves back against its subject — verbatim, a position fix, not a rewrite. Editor hover is restored for the four symbols that had no attached doc at all: AIModelConfigSchema, DriverType, ActionParamSchema, PageRegionSchema. In the other four modules (data/hook, security/permission, ui/app, ui/component) the documented symbol or family head already carries its own richer JSDoc, so the moved block sits directly above it as a section lead and hover was already correct — a refinement of the card's reading, recorded in the PR. Regenerated: 10 reference pages (8 lose the misattributed opening, 2 gain their @module line) and 4 published skill indexes (8 pointer rows fall back to the honest export list). Changeset included; no schema behavior changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PBjwYLS6BciTQW3c9xQiD2 * regenerate ui/component reference page on the merged tree Discharges the os-regen deferral recorded by the merge commit. The page now carries main's section-group-reference body and no longer opens with the misattributed 'Empty Properties Schema' block, which is this branch's route-1 gate acting on the merged tree. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PBjwYLS6BciTQW3c9xQiD2 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8b04c75 commit b7131f3

27 files changed

Lines changed: 425 additions & 219 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
Reference pages and skill indexes no longer open with one schema's comment: a
6+
doc block sitting inside a module's import list is selected as the module
7+
description only when it carries an explicit `@module` marker. The two genuine
8+
headers in that position (`shared/mapping`, `system/cache`) now carry the
9+
marker; the eight modules whose "description" was a detached symbol comment
10+
(`ai/agent`, `data/datasource`, `data/hook`, `security/permission`,
11+
`ui/action`, `ui/app`, `ui/component`, `ui/page`) had the comment moved back to
12+
the declaration it documents — restoring editor hover for
13+
`AIModelConfigSchema`, `DriverType`, `ActionParamSchema` and
14+
`PageRegionSchema` — and their pages honestly print no module description
15+
instead of a wrong one. No schema behavior changes.

content/docs/references/ai/agent.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ description: Agent protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
AI Model Configuration
9-
108
<Callout type="info">
119
**Source:** `packages/spec/src/ai/agent.zod.ts`
1210
</Callout>

content/docs/references/data/datasource.mdx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ description: Datasource protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
Driver Identifier
9-
Can be a built-in driver or a plugin-contributed driver (e.g., "com.vendor.snowflake").
10-
118
<Callout type="info">
129
**Source:** `packages/spec/src/data/datasource.zod.ts`
1310
</Callout>

content/docs/references/data/hook.mdx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ description: Hook protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
Hook Lifecycle Events
9-
Defines the interception points in the ObjectQL execution pipeline.
10-
118
<Callout type="info">
129
**Source:** `packages/spec/src/data/hook.zod.ts`
1310
</Callout>

content/docs/references/security/permission.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ description: Permission protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
Entity (Object) Level Permissions
9-
Defines CRUD + VAMA (View All / Modify All) + Lifecycle access.
10-
11-
Refined with enterprise data lifecycle controls:
12-
- Transfer (Ownership change)
13-
- Restore (Soft delete recovery)
14-
- Purge (Hard delete / Compliance)
15-
168
<Callout type="info">
179
**Source:** `packages/spec/src/security/permission.zod.ts`
1810
</Callout>

content/docs/references/shared/mapping.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: Mapping protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8+
@module shared/mapping
9+
810
Base Field Mapping Protocol
911

1012
Shared by: Connector

content/docs/references/system/cache.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: Cache protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8+
@module system/cache
9+
810
Application-Level Cache Protocol
911

1012
Multi-tier caching strategy for application data.

content/docs/references/ui/action.mdx

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,6 @@ description: Action protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
Action Parameter Schema
9-
10-
Defines inputs required before executing an action.
11-
12-
Two declaration modes:
13-
14-
1. **Field-backed** (preferred) — reference an existing object field; the
15-
runtime resolves the field's label (i18n), type, validation rules,
16-
options, placeholder, help text, and widget mapping from object
17-
metadata. Cross-object references use `objectOverride`.
18-
19-
```ts
20-
params: [
21-
{ field: 'email' }, // same object
22-
{ field: 'role', objectOverride: 'sys_member' }, // different object
23-
]
24-
```
25-
26-
2. **Inline** (legacy / bespoke) — declare `name`, `label`, `type` etc.
27-
inline when no matching object field exists. Inline values may also be
28-
used alongside `field` to override individual properties. A `lookup` /
29-
`master_detail` param declared this way MUST name its target object via
30-
`reference` — there is no field to inherit it from:
31-
32-
```ts
33-
params: [
34-
{ name: 'inspector', label: 'Inspector', type: 'lookup', reference: 'sys_user' },
35-
]
36-
```
37-
38-
`name` is required unless `field` is provided (in which case it defaults
39-
to the field name and is used as the request-body key).
40-
418
<Callout type="info">
429
**Source:** `packages/spec/src/ui/action.zod.ts`
4310
</Callout>

content/docs/references/ui/app.mdx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,6 @@ description: App protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
Base Navigation Item Schema
9-
Shared properties for all navigation types.
10-
11-
**NAMING CONVENTION:**
12-
Navigation item IDs are used in URLs and configuration and must be lowercase snake_case.
13-
14-
@example Good IDs
15-
- 'menu_accounts'
16-
- 'page_dashboard'
17-
- 'nav_settings'
18-
19-
@example Bad IDs (will be rejected)
20-
- 'MenuAccounts' (PascalCase)
21-
- 'Page Dashboard' (spaces)
22-
238
<Callout type="info">
249
**Source:** `packages/spec/src/ui/app.zod.ts`
2510
</Callout>

content/docs/references/ui/component.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ description: Component protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
Empty Properties Schema
9-
108
<Callout type="info">
119
**Source:** `packages/spec/src/ui/component.zod.ts`
1210
</Callout>

0 commit comments

Comments
 (0)