Skip to content

Commit 0db2947

Browse files
claude[bot]claude
andauthored
fix(spec): render @example captions and drop @category on reference pages (#15443)
* fix(spec): render `@example` captions and drop `@category` on reference pages `renderFileDescription` emitted a module docblock's prose verbatim, so a JSDoc block tag written on a prose line reached the published page as literal tag text: 18 lines across 14 customer-facing reference pages. The verdict is per tag, on the payload rather than the spelling: - `@example CAPTION` (12 lines, 10 pages) captions the block directly beneath it, so it is REWRITTEN into that caption in bold — the shape `@see` beside it already had. - a bare `@example` (2 lines) has no payload, which is the `@module` case exactly, so it is DROPPED before classification alongside the `os:check` marker it sits against. - `@category Security` (4 lines, 4 pages) is dropped. Measured: one value on four pages, and no consumer anywhere in the repo — no typedoc, no api-extractor, no search index, no gate. Pins assert on the rendered fragment, never on the emitted `.mdx`: `check:docs` compares the artifact to the source and reproduced all 18 tag lines faithfully. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G4138K1EG7kQ81FNba5Kp4 * docs(spec): regenerate reference pages for the tag-payload render fix 18 tag lines across 14 pages: 12 `@example CAPTION` become bold captions, 2 bare `@example` and 4 `@category Security` come off. The card's own repro (`grep -rn '^@example\|^@category' content/docs/references/`) now returns zero, and no other page in the 230-file regeneration moved. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G4138K1EG7kQ81FNba5Kp4 * chore(changeset): reference-page block-tag payload render Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G4138K1EG7kQ81FNba5Kp4 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent ee32e1c commit 0db2947

17 files changed

Lines changed: 395 additions & 42 deletions
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
Reference pages no longer print `@example` and `@category` tag lines as literal text.
6+
7+
A module docblock is JSDoc, so its header carries block tags, and the reference-docs
8+
renderer emitted a tag written on a prose line verbatim — 18 such lines reached 14
9+
customer-facing pages, as `@example Basic field mapping` above a code fence and
10+
`@category Security` at the foot of four `system/` pages. `#13796` removed `@module`
11+
from the page and left these two open, because a blanket `^@\w+` line filter would
12+
have taken reader prose off the page and orphaned the fences below it.
13+
14+
The verdict is per tag, and the axis is the payload rather than the spelling:
15+
16+
- **`@example CAPTION` is REWRITTEN** into that caption, in bold, above the block it
17+
captions — the shape `@see` already had (`See also: …`). 12 lines across 10 pages.
18+
Bold rather than a heading because heading renumbering has already run by then, so
19+
an emitted heading would carry a level chosen blind of the page, add entries to the
20+
pages' tables of contents, and put a caption in reach of `check:docs-single-h1`.
21+
- **A bare `@example` is DROPPED.** With no payload it is the `@module` case exactly,
22+
and the fence beneath it is visibly an example without a line announcing one. 2
23+
lines (`studio/plugin`, `studio/object-designer`), both sitting against the
24+
`check:skill-examples` opt-in marker that was already dropped there.
25+
- **`@category VALUE` is DROPPED.** 4 lines, all reading `Security`, on four pages that
26+
already sit under a `system/` section saying as much — and nothing in the repo reads
27+
the tag: no typedoc or api-extractor (neither is used here), no search index, no
28+
gate. Routing it into page frontmatter instead would publish a field with no
29+
consumer. The tag stays in the source, where it is a legitimate JSDoc tag; only the
30+
rendered page drops it.
31+
32+
No schema behavior changes. The pins assert on the rendered fragment rather than on the
33+
emitted `.mdx`, because `check:docs` compares the artifact against the source and
34+
reproduced all 18 tag lines faithfully.

content/docs/references/api/automation-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ triggering executions, and querying execution history.
1212

1313
Base path: /api/automation
1414

15-
@example Endpoints
15+
**Endpoints**
1616
GET /api/automation — List flows
1717
GET /api/automation/:name — Get flow
1818
POST /api/automation — Create flow

content/docs/references/api/documentation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Architecture Alignment:
2222
- Postman: API testing collections
2323
- Redoc: Documentation rendering
2424

25-
@example Documentation Config
25+
**Documentation Config**
2626
```typescript
2727
const docConfig: ApiDocumentationConfig = {
2828
enabled: true,

content/docs/references/api/odata.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ See also: https://www.odata.org/documentation/
4242

4343
See also: https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html
4444

45-
@example OData Query
45+
**OData Query**
4646
```
4747
GET /api/odata/customers?
4848
$select=name,email&
@@ -54,7 +54,7 @@ GET /api/odata/customers?
5454
$count=true
5555
```
5656

57-
@example Programmatic Use
57+
**Programmatic Use**
5858
```typescript
5959
const query: ODataQuery = {
6060
select: ['name', 'email'],

content/docs/references/api/package-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ REST API endpoint schemas for package lifecycle management.
1111

1212
Base path: /api/v1/packages
1313

14-
@example Endpoints
14+
**Endpoints**
1515
POST /api/v1/packages/install — Install a package
1616
POST /api/v1/packages/upgrade — Upgrade a package
1717
POST /api/v1/packages/resolve-dependencies — Resolve dependencies

content/docs/references/api/plugin-rest-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Architecture Alignment:
2828
- Microsoft Dynamics: Web API with entity operations
2929
- Strapi: Auto-generated REST endpoints from schemas
3030

31-
@example Serving routes from a plugin (imperative `http.server` mount)
31+
**Serving routes from a plugin (imperative `http.server` mount)**
3232
```typescript
3333
// Routes are mounted in CODE — resolve the `http.server` service from the
3434
// plugin context and register handlers on `kernel:ready` (the service is

content/docs/references/automation/time-relative-trigger.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ automation context (so `{record.<field>}` interpolation and the start-node
3030
`condition` gate work exactly as they do for record-change flows). The
3131
descriptor is carried on the flow's start node as `config.timeRelative`.
3232

33-
@example T-minus renewal reminders (fires on the day a contract is 60/30/7 days out)
33+
**T-minus renewal reminders (fires on the day a contract is 60/30/7 days out)**
3434
```ts
3535
// flow start node
3636
config: {
@@ -45,14 +45,14 @@ config: {
4545
}
4646
```
4747

48-
@example "Expiring soon" range (fires every day a document is within 30 days of expiry)
48+
**"Expiring soon" range (fires every day a document is within 30 days of expiry)**
4949
```ts
5050
config: {
5151
timeRelative: { object: 'hr_document', dateField: 'expires_on', withinDays: 30 },
5252
}
5353
```
5454

55-
@example Overdue sweep (fires for POs up to 14 days past due)
55+
**Overdue sweep (fires for POs up to 14 days past due)**
5656
```ts
5757
config: {
5858
timeRelative: { object: 'purchase_order', dateField: 'due_date', withinDays: -14, filter: { status: 'open' } },

content/docs/references/shared/mapping.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ ObjectStack for data synchronization.
1818
this base too, until the whole external-lookup family was retired in
1919
#8075 — ADR-0049, zero consumers.)
2020

21-
@example Basic field mapping
21+
**Basic field mapping**
2222
```typescript
2323
const mapping: FieldMapping = {
2424
source: 'external_user_id',
2525
target: 'user_id',
2626
};
2727
```
2828

29-
@example With a fallback for missing source values
29+
**With a fallback for missing source values**
3030
```typescript
3131
const mapping: FieldMapping = {
3232
source: 'user_name',

content/docs/references/studio/object-designer.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ The Object Designer is composed of four interconnected panels:
3838
└─────────────────────────────────────────────────────────────────┘
3939
```
4040

41-
@example
4241
```typescript
4342
import {
4443
ObjectDesignerConfigSchema,

content/docs/references/studio/plugin.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Like VS Code extensions, Studio plugins have two layers:
3535
└─────────────────────────────────────────────────────────┘
3636
```
3737

38-
@example
3938
```typescript
4039
import { StudioPluginManifestSchema } from '@objectstack/spec/studio';
4140

0 commit comments

Comments
 (0)