Skip to content

Docs for agents: 9 of 19 published pages are site MDX, with imports of docs-site/, which doesn't ship #116

Closed
cube-js/cube-ui-kit
#1697

Description

@tenphi

In short

  • Glaze ships docs/ as its harnesspm docs (glaze:docs), and agents read those pages as files.
  • 9 of the 19 pages are .mdx written for the site. They import components from ../docs-site/, which the package doesn't ship, and some examples exist only as component props.
  • Proposal: ship plain Markdown, built at pack time, or write every example as a code block next to its live view.

What happens

Seen in 3.1.0 (main at 8984e19). These pages are site MDX: contrast, exporting, getting-started, hdr, methodology, mixes, okhst, schemes and shadows-and-glows. migration.md and reference/*.md are plain Markdown.

  • 38 imports such as import ContrastExample from '../docs-site/components/contrast/ContrastExample.astro';. files is dist, docs, harness and AGENTS.md, so none of them resolves in the package.
  • 89 component blocks at the start of a line, such as <PaletteStep> (14), <Example> (12), <SchemeExample> (8), <ContrastExample> (7) and <Callout> (6).
  • Examples only in props. The first example in contrast.mdx is a <ContrastExample hue={280} saturation={80} colors={{ … }} /> block. The theme it shows is in JSX props, not in code an agent can copy, and the result (the colors and their contrast) is rendered only on the site.

Why it matters

@cube-dev/ui-kit extends Glaze, so every app on UI Kit gets these pages in its glaze:docs index, as do apps that use Glaze directly. UI Kit had the same problem with its own Storybook pages. cube-js/cube-ui-kit#1697 moves it to plain Markdown built at pack time.

Proposal

One of:

  1. Build plain Markdown at pack time into the folder docs names: drop the imports, turn each example component into the code it renders (a fenced theme definition, with the resolved values where they matter), and make <Callout> a blockquote. Keep the .mdx sources for the site.
  2. Keep the .mdx, but write each example as a fenced code block next to its component, so the component adds only the live view, and agents can skip the JSX.

Either way, a docs/llms.txt with a section per topic would let harnesspm use it as the index.

Done when: the shipped pages read as plain Markdown, every example is copyable code, and no import or link leads outside the package.

Activity

  1. added a commit that references this issue on Nov 23, 2026
    52a7305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions