Skip to content

Commit 2bdf0f6

Browse files
skills(ui): pages.md Routing model teaches the doc navigation item; eval 4 expects it
The published skill said "There is no dedicated `doc` nav-item type yet, so use a `url` item pointing at `/docs/...`" while `@objectstack/spec` declares the `doc` navigation item (`{ type: 'doc', doc }` / `{ type: 'doc', book }`) and the console renders it. The Routing model paragraph and its example now teach the declared item; eval 4's expected output and assertions pin the `doc` item and refuse the `url` answer. Paid inside the token ratchet by deleting the former-page-types sentence the Page Types lead restates. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CXydFDyiQwNbGFkmwrcRQq
1 parent 238222d commit 2bdf0f6

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎skills/objectstack-ui/evals/views-apps-actions-pages.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
{
3535
"id": 4,
3636
"prompt": "Design a custom lead record page: the Convert action inline in the header, a highlights strip, a stage path over `status`, and the related contacts. Also write a user guide for the `crm` package under src/docs and link it from the nav.",
37-
"expected_output": "`definePage({ name, label, type: 'record', object: 'lead', template: 'three-column', regions: [...] })` with `page:header` (the declared action's id in `properties.actions`, no sibling action node), `record:highlights`, `record:path` (`statusField`, `stages`), `record:related_list`. The guide is a flat, namespace-prefixed `src/docs/crm_user_guide.md` in pure Markdown (MDX and image references are rejected at build), surfaced by a `type: 'url'` nav item pointing at `/docs/crm_user_guide`.",
37+
"expected_output": "`definePage({ name, label, type: 'record', object: 'lead', template: 'three-column', regions: [...] })` with `page:header` (the declared action's id in `properties.actions`, no sibling action node), `record:highlights`, `record:path` (`statusField`, `stages`), `record:related_list`. The guide is a flat, namespace-prefixed `src/docs/crm_user_guide.md` in pure Markdown (MDX and image references are rejected at build), surfaced by a `type: 'doc'` nav item (`doc: 'crm_user_guide'`).",
3838
"files": [],
3939
"assertions": {
40-
"must_contain": ["definePage", "type: 'record'", "regions", "page:header", "record:path", "src/docs/", "/docs/"],
41-
"must_not_contain": ["record_detail", ".mdx"]
40+
"must_contain": ["definePage", "type: 'record'", "regions", "page:header", "record:path", "src/docs/", "type: 'doc'"],
41+
"must_not_contain": ["record_detail", ".mdx", "type: 'url'"]
4242
}
4343
},
4444
{

‎skills/objectstack-ui/rules/pages.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ Disambiguation: there is **no** `record_detail`, `app_launcher`, or
3131
`type: 'app'`, a utility panel is `type: 'utility'`. Likewise
3232
grid/kanban/calendar/gallery/timeline are NOT page types — they are
3333
*visualizations* of a `list` page
34-
(`interfaceConfig.appearance.allowedVisualizations`). Former roadmap-only types
35-
(`dashboard`, `form`, `record_detail`, `record_review`, `overview`, `blank`)
36-
were removed from the enum because they never shipped a renderer.
34+
(`interfaceConfig.appearance.allowedVisualizations`).
3735

3836
### Templates & Regions
3937

@@ -357,13 +355,15 @@ resolves any doc regardless of which app you came from. The URL is
357355
one URL. Do **not** design per-app or per-package doc URLs; that gives one
358356
doc many addresses and breaks cross-references.
359357

360-
To surface a doc inside an app, add a navigation item that **links into**
361-
that global URL. There is no dedicated `doc` nav-item type yet, so use a
362-
`url` item pointing at `/docs/<name>`:
358+
To surface a doc inside an app, add a `doc` navigation item (a `url` item is
359+
for an external or custom URL): `doc: '<name>'` opens that page,
360+
`book: '<book>'` opens the book at its first readable page (both: that page
361+
in that book). It inherits the docs audience gate, and `os build` refuses a
362+
target the package lacks (`docs/nav-target`):
363363

364364
```typescript
365365
navigation: [
366-
{ id: 'nav_help', type: 'url', url: '/docs/crm_user_guide',
366+
{ id: 'nav_help', type: 'doc', doc: 'crm_user_guide',
367367
label: 'User Guide', icon: 'book-open' },
368368
]
369369
```

0 commit comments

Comments
 (0)