agentleFS
CloudflareKnown publishercloudflare/kumo/AGENTS.md

kumo

AGENTS.md3.9k starsChanged 4 months agoMITView on GitHub

Generated: 2026-03-18 | Commit: 38518e34 | Branch: rozenmd/fix-preview Cloudflare's React component library (@cloudflare/kumo). pnpm monorepo: component library (Base UI + Tailwind v4), Astro docs site, Figma plugin, screenshot worker. ESM-only, Node 24+. - Kumo floating components portal to document.body. Consumers should create an app-root stacking context with isolation: isolate (Tailwind: className="isolate"). - Do not fix a popup that appears below consumer content by adding z-index to Kumo popup components, targeting Base UI internal data attributes, or applying isolation to <body>.

  • Reads credentials
  • Commits and pushes

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 1 mentionApr 2026: 2 mentionsMay 2026: 1 mentionJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 11 mentionsSep 2026: 28 mentionsOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the cloudflare/kumo repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about cloudflare/kumo

The biggest 5 of 49 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 49

Talked about on GitHub and Bluesky (49 times).

On GitHub · 48

43 more on GitHub

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    cn() utility: Always compose classNames via cn("base", conditional && "extra", className)

    line 46
  2. Very specific:

    Do not fix a popup that appears below consumer content by adding z-index to Kumo popup components, targeting Base UI internal data …

    line 55
  3. Very specific:

    Registry first: Always check component-registry.json before using/modifying a component

    line 62
  4. Very specific:

    No cross-package relative imports: Use @cloudflare/kumo not ../../kumo/src/...

    line 67
  5. Distinctive:

    Check ONE option in each section (Reviews and Tests)

    line 94
  6. Very specific:

    If providing a justification (because: or as follows:), text must follow on the same line

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

KUMO KNOWLEDGE BASE

Generated: 2026-03-18 | Commit: 38518e34 | Branch: rozenmd/fix-preview

OVERVIEW

Cloudflare's React component library (@cloudflare/kumo). pnpm monorepo: component library (Base UI + Tailwind v4), Astro docs site, Figma plugin, screenshot worker. ESM-only, Node 24+.

STRUCTURE

kumo/
├── packages/
│   ├── kumo/                     # Component library → see packages/kumo/AGENTS.md
│   ├── kumo-docs-astro/          # Astro docs site → see packages/kumo-docs-astro/AGENTS.md
│   ├── kumo-figma/               # Figma plugin → see packages/kumo-figma/AGENTS.md
│   └── kumo-screenshot-worker/   # Visual regression Worker → see packages/kumo-screenshot-worker/AGENTS.md
├── ci/                           # CI/CD scripts → see ci/AGENTS.md
├── lint/                         # Custom oxlint rules (5 rules in package, 4 at root)
├── .changeset/                   # Changeset files
├── .github/workflows/            # 6 workflow YAMLs (release, pullrequest, preview, etc.)
└── .vite-hooks/                  # Git hooks (Vite+): pre-commit codegen+staged, pre-push changeset validation

WHERE TO LOOK

TaskLocationNotes
Component APIpackages/kumo/ai/component-registry.{json,md}Source of truth. Query with jq or CLI
Component sourcepackages/kumo/src/components/{name}/{name}.tsxStandard pattern
Blocks (installable)packages/kumo/src/blocks/NOT library exports; installed via CLI
Semantic tokenspackages/kumo/src/styles/theme-kumo.cssAUTO-GENERATED; edit scripts/theme-generator/config.ts
Custom lint ruleslint/ (4 rules) + packages/kumo/lint/ (+1)Package copy adds no-deprecated-props
Demo examplespackages/kumo-docs-astro/src/components/demos/Feed into registry codegen
CI scriptsci/Reporter system, versioning, deployment
Figma generatorspackages/kumo-figma/src/generators/37 component generators

CONVENTIONS

Styling (CRITICAL)

  • ONLY semantic tokens: bg-kumo-base, text-kumo-default, border-kumo-line, ring-kumo-hairline
  • NEVER raw Tailwind colors: bg-blue-500, text-gray-900 → fails lint
  • NEVER dark: variant: dark mode automatic via light-dark() in CSS custom properties
  • Exceptions: bg-white, bg-black, text-white, text-black, transparent
  • cn() utility: Always compose classNames via cn("base", conditional && "extra", className)
  • Surface hierarchy: bg-kumo-base → bg-kumo-elevated → bg-kumo-recessed
  • Mode/theme: data-mode="light"|"dark" + data-theme="fedramp" on parent element

Portal stacking (CRITICAL)

  • Kumo floating components portal to document.body. Consumers should create an app-root stacking context with isolation: isolate (Tailwind: className="isolate").
  • Do not fix a popup that appears below consumer content by adding z-index to Kumo popup components, targeting Base UI internal data attributes, or applying isolation to <body>.

Components

  • Scaffold new: pnpm --filter @cloudflare/kumo new:component (never create manually)
  • Registry first: Always check component-registry.json before using/modifying a component
  • See packages/kumo/AGENTS.md for component conventions (variants, forwardRef, displayName)

Imports

  • No cross-package relative imports: Use @cloudflare/kumo not ../../kumo/src/... (lint-enforced)
  • ESM-only: "type": "module" throughout. No CJS.

Changesets

  • Enforced for packages/kumo/: Pre-push hook requires changeset for npm-published library
  • Optional for kumo-docs-astro: Version appears in /api/version endpoint (debugging) but nothing depends on it
  • Not needed for kumo-figma: Figma plugin, not published to npm
  • Pre-push hook: .vite-hooks/pre-push validates before push. Bypass: git push --no-verify (or VITE_GIT_HOOKS=0)
  • AI agents NEVER: pnpm version, pnpm release, pnpm publish:beta, pnpm release:production

Pull Request Descriptions

PR descriptions are validated by CI. Include this checklist at the end of your PR body:

- Reviews
- [ ] bonk has reviewed the change
- [x] automated review not possible because: <your reason here>
- Tests
- [ ] Tests included/updated
- [ ] Automated tests not possible - manual testing has been completed as follows: <description>
- [x] Additional testing not necessary because: <your reason here>

Rules:

  • Check ONE option in each section (Reviews and Tests)
  • If providing a justification (because: or as follows:), text must follow on the same line
  • Indentation is flexible — nested under headers is fine
  • Skip validation entirely with the skip-pr-description-validation label

ANTI-PATTERNS

PatternWhyInstead
bg-blue-500, text-gray-*Breaks theming, fails lintbg-kumo-brand, text-kumo-default
dark:bg-blackRedundant; tokens auto-adaptRemove dark: prefix
Missing displayNameBreaks React DevToolsSet .displayName on forwardRef components
Manual component file creationMisses vite/package.json/index updatesUse scaffolding tool
Editing auto-generated filestheme-kumo.css, ai/schemas.ts, ai/component-registry.*Edit source configs, run codegen

COMMANDS

# Cross-cutting
pnpm dev                                          # Docs dev server (localhost:4321)
pnpm lint                                         # oxlint + custom rules
pnpm typecheck                                    # TypeScript check all packages
pnpm changeset                                    # Create changeset (required for kumo changes)

# Package-specific (see child AGENTS.md for full lists)
pnpm --filter @cloudflare/kumo build              # Build library
pnpm --filter @cloudflare/kumo test               # Vitest
pnpm --filter @cloudflare/kumo codegen:registry   # Regenerate component-registry
pnpm --filter @cloudflare/kumo-figma build        # Build Figma plugin

BUILD PIPELINE

kumo-docs-astro demos → dist/demo-metadata.json
                              ↓
kumo codegen:registry → ai/component-registry.{json,md} + ai/schemas.ts
                              ↓
kumo-figma build:data → generated/*.json → vp pack (tsdown) → code.js (IIFE, ES2017)

Cross-package dependency: registry codegen requires docs demo metadata. Run codegen:demos in docs before codegen:registry in kumo.

TOOLCHAIN

ToolVersionNotes
Node^24.12.0Engine constraint (.node-version)
pnpm^12.3.4Workspace manager
Vite+0.3.1Unified toolchain (vp CLI): build, test, lint, fmt
TypeScript5.9.2Via pnpm catalog
Vite8.xBundled via vite-plus; library mode (kumo), docs server
Tailwind4.1.17v4 with light-dark() tokens
OxlintbundledVia vp lint; config in vite.config.ts + custom JS rules
OxfmtbundledVia vp fmt; replaced Prettier
VitestbundledVia vp test; happy-dom env, v8 coverage
ChangesetslatestVersion management
Astro7.xDocs framework

Lint/format/test config lives in vite.config.ts (root and per-package) — there are no .oxlintrc.json / .prettierrc files. vp check runs format + lint. The global Vite+ CLI is optional but recommended for contributors: the binary ships with the local vite-plus dependency (pnpm vp …), and hooks resolve it from node_modules/.bin.

SECURITY

  • NEVER commit Figma tokens, npm tokens, or API keys
  • .env files are gitignored
  • wrangler.jsonc contains Cloudflare account IDs (not secret but don't expose)

NOTES

  • ai/component-registry.json, ai/component-registry.md are auto-generated at build time and gitignored (shipped in npm package). ai/schemas.ts is a stub for fresh clones (full version generated during build)
  • src/primitives/ (40 files) are auto-generated Base UI re-exports
  • Blocks in src/blocks/ are NOT exported from package index; installed via CLI kumo add
  • src/catalog/ is a runtime JSON-UI rendering module (separate concern from component library)
  • Single linter: Oxlint via vp lint (custom kumo JS rules + native jsx-a11y rules; type-aware + type-checked)
  • PLOP_INJECT_EXPORT and PLOP_INJECT_COMPONENT_ENTRY markers in source for scaffolding
  • GitHub Actions workflows live in .github/workflows/, including release, PR validation, previews, Bonk, and automatic PR reviews

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.