docs(skills): author the 16 factory domains via defineX, not bare literals (#2035)#2124
Merged
Merged
Conversation
…erals (#2035) The example apps were migrated to the `defineX` factories in #2088/#2095 and a lint guard keeps them clean — but the skills and hand-written docs still taught the old bare-literal pattern (`: Page = {}`, `: Action = {}`, `: PermissionSet = {}`, …). Skills are the corpus AI authors from, so this directly undercut the #2035 north star: leaving the unsafe pattern as the thing AI copies. Converts every bare output/Input-type metadata literal for the 16 factory domains to its `defineX(...)` factory call, across: - skills/objectstack-ui/SKILL.md (8: Page/Action/Report/Cube) - content/docs/guides/security.mdx (8: PermissionSet/SharingRule) - content/docs/{guides/standards,concepts/index,concepts/architecture, getting-started/architecture,protocol/objectui/record-alert}.* (7) Imports are rewritten in place (preserving each block's import source — root vs subpath) or injected where the snippet had none. Pre-existing `defineView` / `defineFlow` examples are untouched. `check:skill-docs` stays green (generated references come from frontmatter, unchanged). Docs-only — no package code, no changeset. Code blocks in MDX/skills are not type-checked by any gate, which is why they drifted; a lightweight MDX code-block lint is noted as a separate follow-up.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
xuyushun441-sys
added a commit
that referenced
this pull request
Jun 21, 2026
…2127) Closes the drift root cause found while updating the docs (#2124): TypeScript code blocks in Markdown/MDX are not type-checked or ESLinted, so skills/ and content/docs/ silently drifted back to teaching the bare `: Page = {}` literal while the example apps — which the ESLint guard polices — stayed clean. Skills are the corpus AI authors from, so a stale sample there is the worst place for it. `scripts/check-doc-authoring.mjs` (dependency-free) scans every ```ts/typescript/ tsx fenced block under skills/ and content/ for an exported metadata literal annotated with one of the 16 factory domains (or its Input alias) instead of the `defineX(...)` factory, and fails with file:line + guidance. Generated files (references/, the frontmatter-generated skills.mdx) are skipped. Wired into lint.yml's ESLint job via `pnpm check:doc-authoring` (no build, no new dep). Verified: 160 files clean on current main (#2124 migration holds); teeth confirmed — flags a bare `: Page` block, ignores `definePage({...})`. CI-only — no package code, no changeset. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
os-zhuang
added a commit
that referenced
this pull request
Jul 1, 2026
feat(fields): inline-edit structured-value fields (color/address/location/geo/code/qrcode) (#2124) objectui@69d6b94419bcae9d3a200268bb3b74371906f4ae
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the #2035 epic. The examples were migrated to
defineXfactories (#2088/#2095) and a lint guard keeps them clean — but the skills and hand-written docs still taught the old bare-literal pattern. Since skills are the corpus AI authors from, that directly undercut the whole point: AI would keep copying: Action = {}(the output-type footgun) from the very guide meant to teach the right way.What changed
Converted every bare metadata literal for the 16 factory domains to its
defineX(...)call:skills/objectstack-ui/SKILL.mdcontent/docs/guides/security.mdxcontent/docs/guides/standards.mdxcontent/docs/concepts/index.mdxcontent/docs/concepts/architecture.mdx,getting-started/architecture.mdx,protocol/objectui/record-alert.mdxBlock-aware migration: imports are rewritten in place (preserving each block's import source — root
@objectstack/specvs subpath) or injected where the snippet had none. Pre-existingdefineView/defineFlowexamples are left untouched.Verification
: <Domain> = {literals remain inskills/orcontent/docs/.ConvertLeadAction,P) preserved.pnpm --filter @objectstack/spec check:skill-docs→ ✅ in sync (generated references come from frontmatter, unchanged).Notes
🤖 Generated with Claude Code