Repository navigation
feat: ship the docs as plain Markdown in docs/ again, indexed for harnesspm - #1697
Merged
Merged
Conversation
…nesspm Bring back the docs build that #1643 removed, as scripts/prepare-docs.mjs (prepack; --clean at postpack). Each Storybook page and Modern Form guide becomes plain Markdown at a short path in docs/, with links that work in the package, and docs/llms.txt indexes them. harness/plugin.json points docs at ../docs, so harnesspm gives consumers that index as uikit:docs. A link that leads nowhere fails the build. In this repository, harnesspm.json excludes uikit:docs, which exists only at pack time, and patches the rule's docs pointers to src/. Fix the dead links the build reported, and the Toast page's unclosed code fence. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 78e7b22 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
🧪 Storybook is successfully deployed!
|
Contributor
📦 NPM canary releaseDeployed canary version 0.0.0-canary-8ea8edb. |
Contributor
🏋️ Size limit report
Compared against main at 011f71b — run 45158047555, 2026-11-23T10:39:08Z. Third-party packages✅ No third-party package entered or left the bundle, and none grew more than 10 KB past its approved size. To see which modules changed, download the size-limit-statoscope-report artifact from this run and open report.html. |
CodeQL flagged the RegExp built from the GITHUB constant with only dots escaped. A literal has no escaping step to get wrong. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N
harnesspm 0.9.1 judges docs by what `files` ships, so the `harnesspm check` that prepack runs after the docs build now checks the built pages in the repository too. Its private-key warning no longer fires on the PasswordInput page's PEM placeholder. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N
Review round 1 of the docs build: - `pnpm check:harness`, which the lint job runs on every PR, now builds the docs in memory (`--check`). A page can link to any repository file, such as a rule in docs/rules/, whose kind no other job reads, so a PR that moved one could pass and then break the next pack. - A `---` no longer ends a section: `## Component` stays above its `### Properties`, as the documented page structure has it. - A story route's stories title is checked, like a docs route. - A page without a `#` title fails the build, and the error says problems, not dead links. - Only the Modern Form migration guide ships beside the pages. The type-check comparison is a Cloud benchmark for contributors. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N
Review round 2 of the docs build: - A page without a Storybook title from its <Meta> is an error, as the documented page structure requires, not a warning. `--check` and the spec disagreed on it, so a docs-only PR could pass and fail the next. - The spec no longer builds the real pages: `pnpm check:harness` does, in the lint job on every PR. Its cases use fixed inputs. - A docs route without a page needs a stories file's autodocs id again, and a story route's title must be a stories file's, not an MDX page's. - A page's title is the heading it starts with, never a comment in code. - The guides list drops a filter that no longer applies. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N
Review round 3 of the docs build (no High or Medium finding; these are the Lows): - A link with a title, `[text](url "title")`, is rewritten like any other. It shipped unrewritten, and dead in the package. - The build fails on Storybook markup or a route left in a page's prose, outside code. The package test had these rules, in a form that also forbade code samples the build allows, and only code PRs run it. - CI's lint step says that it builds the docs, and why it runs there. - The builder's header and documentation.md list every rule the build enforces, and what a story link becomes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N
Review round 4 of the docs build (no High or Medium finding; these are the Lows): - A link title in single quotes, the only form Prettier lets a page commit, is rewritten too. Round 3 handled only double quotes, so a titled relative link could still ship dead. - The package test no longer re-checks the title rule the build owns. - documentation.md: `pnpm check:harness` lists every problem, not only links. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N
Member
Author
|
About the red Browser tests / Compiler on (2/2) on
Generated by Claude Code |
Resolves the harnesspm.lock.json conflict: main changed the uikit:docs hash for #1698's docs edits, and this branch excludes uikit:docs, so the entry goes. A fresh install and `harnesspm sync` on the merged tree change nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N
Glaze 3.2.0 ships its docs as plain Markdown in harness/docs/, indexed by its own llms.txt (tenphi/glaze#121, which fixes tenphi/glaze#116, the follow-up this PR filed). Its code is unchanged apart from one error message, so no color moves. - `pnpm update-glaze` with 3.2.0: package.json, pnpm-lock.yaml, and `harnesspm sync` for the lock and AGENTS.md's harnesspm block. - The three hand-written links to Glaze's old `docs/*.mdx` pages (AGENTS.md, docs/rules/probe.md, docs/rules/review.md) lead to `harness/docs/*.md`. - The changeset says UI Kit now pins Glaze 3.2.0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N
`harnesspm sync` with 0.10.0 changes only the lock: harnesspm's own version, docs, config rule and two skills. AGENTS.md is the same. 0.10.0 leaves out a built docs folder of the project's own harness by itself, but only when git ignores the folder. Here docs/ is not ignored, because docs/rules/ is tracked, so without the exclude of uikit:docs, docs/rules/ becomes uikit:docs (tried: sync then adds it to the lock and AGENTS.md). The exclude stays, and docs/rules/harness.md says why. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N
Merged
tenphi
pushed a commit
that referenced
this pull request
Nov 23, 2026
Resolves the harnesspm.lock.json conflict with #1697, which excludes uikit:docs in this repository: took main's side; harnesspm sync on the merged tree changes nothing, and check:harness (now building every docs page) passes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7BxbSZAimoxvP5rLFH
3 of 4 tasks
This branch was successfully deployed
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.
Describe changes
#1643 shipped the docs as their Storybook sources (
src/**/*.docs.mdx) and removed the docs build. That made the docs harder to use: every page starts with imports and Storybook JSX, 575 links are Storybook routes that lead nowhere in a package, and the paths are deep. This PR brings the build back, improved, and exposes its output through harnesspm.📚 What the package ships now
src/components/actions/Button/Button.docs.mdxdocs/components/actions/Button.mdsrc/form/ModernForm.md, the migration guide sits next to it. The type-check comparison (a Cloud benchmark) no longer ships.src/stories/Usage.docs.mdxdocs/Usage.md<Meta>,<Story>,<Canvas>/docs/<id>--docsroutesdocs/llms.txt: guides, then components by category, each with a one-line descriptiondocs: "../src"docs: "../docs", souikit:docsisdocs/llms.txtSame layout as before 0.214, so old
docs/…paths work again. The Tasty and Glaze copies (docs/tasty,docs/glaze) do not come back: harnesspm already ships both throughextendsat the installed version, and Glaze 3.2.0, which this PR now pins, ships its pages as plain Markdown too.🛠️ The build:
scripts/prepare-docs.mjsprepackrunsnode scripts/prepare-docs.mjs && harnesspm check.postpackruns--clean. Sopnpm pack,npm publish(canary) andchangeset publishall ship the built docs, and the working tree stays clean. Since harnesspm 0.9.1, thatcheckreads the docsfilesships, so it covers the built pages too.--checkbuilds in memory and writes nothing.pnpm check:harnessruns it first, in CI's lint job, which every PR runs: a page can link to any repository file (such as a rule indocs/rules/), so a PR that moves one fails there, not at the next pack.ModernForm.docs.mdxrenders with<Markdown>. Code fences follow CommonMark, so a four-backtick fence can hold three-backtick lines./story/<title>--<story>) becomes the Storybook URL when a stories file has that title.[text](url 'title'), are rewritten too.<Meta>; a page that doesn't start with its#title; Storybook markup or a route left in a page's prose; two sources that become one page.cleanup-docs.mjsis now the--cleanflag, with the same manifest (.docs-generated).🏠 In this repository
docs/holds onlydocs/rules/until a pack (.gitignore:docs/*,!docs/rules).harnesspm.jsonexcludesuikit:docshere. Agents here read the pages insrc/, and the lock no longer changes with each docs edit. Before, every.docs.mdxedit failedharnesspm sync --checkuntil the lock was synced again. harnesspm 0.10.0 leaves out a built docs folder by itself only when git ignores the folder, anddocs/isn't ignored (docs/rules/is tracked), so the exclude stays: without it,docs/rules/becomesuikit:docs.harnesspm/patches/uikit-usage.patch.mdnow also replaces the rule's Components and Typography sections, to point atsrc/instead of "the UI Kit docs index".🔗 Dead links fixed (they were dead in Storybook too)
blob/main/docs/modern-form-migration.md(moved by feat: ship a harness for coding agents, with uikit:colors #1643) →src/components/form/Form/modern-form-migration.md, on 4 pages./docs/generic-text--docs,/docs/tasty-base-properties--docs,/docs/overlays-tooltip-{provider,trigger}--docs→ the real ids./components/ListBox,/content/Itemand similar paths on Tree, IconSwitch and Toast →/docs/<id>--docs. On DisplayTransition,Modal,PopoverandOverlayWrapperhave no page, so they are now plain code names.🧪 Tests
scripts/prepare-docs.test.mjs: the paths, titles, MDX stripping, fences, links (routes, titles, GitHub, dead ones), leftover markup, empty sections and the index, on fixed inputs, so a docs edit can't fail it. The real pages are built bypnpm check:harnesson every PR.package-tests/artifacts.test.tsxon the packed build: the docs layout,llms.txtlists every page once,src/doesn't ship, andharnesspm checkpasses on the extracted package, the same checkprepackruns in the repo.Other changes
docs/rules/harness.md,docs/rules/documentation.md(links must resolve, every page has a<Meta>title;pnpm check:harnesslists every problem),README.md(a line on the Markdown docs and harnesspm), the CI planner (docs-guidenow matches the guide and the migration guide only), and the lint step's name ("Build the docs and validate the agent harness").@tenphi/glaze3.1.0 → 3.2.0 (feat(docs): ship the docs as plain Markdown for coding agents tenphi/glaze#121, which fixes Docs for agents: 9 of 19 published pages are site MDX, with imports ofdocs-site/, which doesn't ship tenphi/glaze#116, filed for this PR). Glaze's docs ship as plain Markdown inharness/docs/with its ownllms.txt, so apps on UI Kit get readable Glaze pages inglaze:docs. Its code is unchanged apart from one error message, so no color moves. Three hand-written links to Glaze's olddocs/*.mdxpages (AGENTS.md,docs/rules/probe.md,docs/rules/review.md) lead to the new pages.@tenphi/harnesspmdevDependency^0.8.0→^0.10.0. 0.9.1 (fix(check): judge docs and links by what the package ships tenphi/harnesspm#58, made for this PR): itscheckjudges docs by whatfilesships, soprepack's check covers the built pages in the repo, and its private-key warning no longer fires on the PasswordInput page's PEM placeholder. 0.10.0 changes only the lock here;docs/rules/harness.mdsays why theuikit:docsexclude stays.minor, sincesrc/**/*.docs.mdxno longer ships. It also says UI Kit now pins Glaze 3.2.0.Part of CUB-8733
Checklist
Other information
Verification
pnpm pack:test:prepackwrote 127 files (126 pages +llms.txt),harnesspm checkpassed,postpackremoved them all.pnpm test:package: 30 tests pass, includingharnesspm checkon the tarball.harnesspm initwritesDocs: node_modules/.harnesspm/pkgs/@cube-dev/ui-kit/docs/llms.txt (uikit:docs), the index's links resolve, andharnesspm doctorreports ✅ ready.pnpm test:types, oxlint, Prettier,pnpm check:harness,CI=true pnpm exec harnesspm sync --check, and the planner, harness and builder specs pass.pnpm test:once: the full suite passes (220 files, 5922 tests), on the final head4136d37ctoo, with all 11 checks (lint, types, both harness checks, the suite, build, the four package checks, pack and package tests).harnesspm check(exit 1), the package tests print no warnings, andCI=true pnpm exec harnesspm sync --checkpasses.52a73051) and harnesspm 0.10.0 (78e7b22e): all 11 checks pass on each commit. Glaze'sdist/differs from 3.1.0 only in comments and one error message, and its 19 shipped pages have no MDX outside code. With harnesspm 0.10.0 and noexclude,sync --checkasks to adddocs/rules/asuikit:docs, so the exclude stays.Review rounds (UI Kit's
implementstage 5: two independent reviewers per round,ui-reviewandentropy-review, plus all 11 checks)--checkincheck:harness(lint, every PR);## Componentno longer dropped above### Propertieson 54 pages; story routes checked; the Cloud benchmark no longer ships--checkwarned where the spec failed, so a docs-only PR could break the next PR<Meta>title is an error; the spec builds no real pages; a docs-route check that round 1 loosened, restored; titles only from a page's first lineEntropy: UI Kit packaging and docs authoring, Slightly Increased. It adds a build script to maintain, and two repo-only patch sections that follow the shipped rule. It also removes the lock re-sync after each docs edit, and dead links now fail the pack instead of shipping silently. For consumers' agents, plain pages, links that resolve and an index with descriptions should make docs easier to use. Cloud is unverified: no Cloud checkout here.
Follow-ups (filed while doing this)
-----BEGIN PRIVATE KEY-----(a placeholder in docs) is reported as a private key tenphi/harnesspm#53: fixed in harnesspm 0.9.1 (fix(check): judge docs and links by what the package ships tenphi/harnesspm#58), which this PR now uses.checkjudged docs by git and the disk, so docs built atprepackwent unchecked. Its private-key pattern also matched the PasswordInput placeholder.docs-site/, which doesn't ship tenphi/glaze#116: 9 of Glaze's 19 published pages were site MDX with imports that don't ship. Fixed in Glaze 3.2.0 (feat(docs): ship the docs as plain Markdown for coding agents tenphi/glaze#121), which this PR now pins: all 19 pages ship as plain Markdown.🤖 Generated with Claude Code
https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N