feat(kumo): add JSDoc to all components and AI usage guide#44
Open
feat(kumo): add JSDoc to all components and AI usage guide#44
Conversation
Enrich .d.ts output for AI agent consumption by adding comprehensive JSDoc to all 35 component source files — prop descriptions, @default tags, variant value explanations, and @example blocks sourced from the component registry. Also adds: - ai/USAGE.md: concise AI-readable guide (CSS setup, component reference table, semantic tokens, common patterns) - `kumo ai` CLI command to print the usage guide - Module-level JSDoc on src/index.ts - JSDoc skeleton in plop template for new components Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Brayden
approved these changes
Feb 8, 2026
ascorbic
reviewed
Feb 8, 2026
| @import "tailwindcss"; | ||
| ``` | ||
|
|
||
| - **`@source`** — Tells Tailwind to scan kumo's compiled JS for class names. Without this, kumo component internals will be unstyled. Adjust the relative path so it resolves to your project's `node_modules/`. |
There was a problem hiding this comment.
There is an inconsistency between this and https://github.com/cloudflare/kumo/pull/42/changes#r2778794750. Which is correct?
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.
Summary
@defaulttags, variant value explanations, and@exampleblocks. These flow through to.d.tsoutput so AI agents get rich documentation when consuming the package via TypeScript.ai/USAGE.md— a concise AI-readable guide covering CSS setup (including the critical@sourcedirective), component reference table, semantic tokens, and common patterns.kumo aiCLI command that prints the usage guide to stdout, so any AI tool can runnpx kumo aito get the full reference.src/index.tsand a JSDoc skeleton to the plop template for new components.Test plan
pnpm build— verify.d.tsfiles contain JSDoc commentspnpm test— no regressionspnpm lint— no lint violationsdist/src/components/button/button.d.tsfor JSDocnpx kumo aiand verify it prints USAGE.md🤖 Generated with Claude Code