jal-co/ui Component Docs Skill
Use this skill when creating, editing, or reviewing component documentation in jalco ui.
Canonical reference
The single source of truth for docs page structure, section order, and formatting rules is:
.pi/references/docs-component-format-spec.md
The agent MUST read it before writing or updating any component docs. This skill provides workflow guidance and review steps, not a parallel format definition.
Required reading before changes
.pi/references/docs-component-format-spec.md — page anatomy, section order, writing rules
AGENTS.md — project conventions, quality bar, comment style
.pi/skills/jalco-shadcn-registry/SKILL.md — for registry-backed items
The agent MUST also inspect:
- similar component docs already in the repo
- the source component and its example/demo files
- any related registry metadata
What this skill covers
- writing new component docs
- revising existing component docs
- reviewing docs for clarity and consistency
- writing or refining descriptions
- keeping registry-backed descriptions in sync
Workflow
- Read
.pi/references/docs-component-format-spec.md and this skill.
- Inspect similar docs pages in
app/docs/components/.
- Review the component source, public API, and demo files.
- Create or update the page using
ComponentDocsPage from components/docs/component-docs-page.tsx.
- Supply:
title, description, registryName, sourceFiles, preview, usage.
- Add Examples, API Reference, Notes, or When to use sections as children — only when justified.
- Sync description and naming with
registry.json and lib/docs.ts.
- Ensure a catalog card preview exists at
components/docs/previews/<registry-name>.tsx with key variants.
- Ensure the sidebar nav entry exists in
lib/docs.ts with badge: "New" and badgeAdded set for new components.
- Run
pnpm previews:generate if the card preview file was created or renamed.
- Ensure screenshots exist at
public/previews/<name>-dark.png and <name>-light.png.
- Review using the checklist in
.pi/references/docs-component-format-spec.md.
Quick rules
These are the rules most frequently needed during docs work. For full details, see the format spec.
Descriptions
- MUST be one sentence, capability-first
- MUST NOT start with "A", "An", or "A React component for..."
- MUST NOT contain subjective adjectives
- MUST match across: page metadata, ComponentDocsPage props, registry.json
Usage section
- MUST include import and minimal usage snippets via
CodeLine
- Server/client rendering context MUST go here, not in Notes
- The first example SHOULD be minimal — layer complexity in Examples
Examples
- MUST use
VariantGrid with labeled items
- MUST group by meaning: Variants, Sizes, Languages, etc.
- MUST NOT call everything a variant
- SHOULD use realistic content
Notes
- MUST contain only caveats, limitations, and external service behavior
- MUST NOT include architecture decisions, feature highlights, or rendering context
- SHOULD be brief
Bundled exports
- MUST use
installNote to explain the relationship
- MUST set
bundledIn on the nav item in lib/docs.ts
Review checklist
Use the checklist in .pi/references/docs-component-format-spec.md before shipping any docs page.
Key things to verify:
- Page uses
ComponentDocsPage
- Description matches across all surfaces
- Preview is realistic
- Usage includes runtime context
- Examples are labeled correctly
- Notes contains only caveats
- Sidebar entry is correct (title, order, bundledIn)
- Catalog card preview exists at
components/docs/previews/<registry-name>.tsx
1---2name: jalco-writing-component-docs3description: Write and review jalco ui component documentation with consistent structure, concise descriptions, realistic examples, and registry-aligned metadata. Use when creating new component docs, updating existing docs, reviewing doc quality, or syncing registry-backed component copy.4---56<overview>78# jal-co/ui Component Docs Skill910Use this skill when creating, editing, or reviewing component documentation in jalco ui.1112## Canonical reference1314The single source of truth for docs page structure, section order, and formatting rules is:1516**`.pi/references/docs-component-format-spec.md`**1718The agent MUST read it before writing or updating any component docs. This skill provides workflow guidance and review steps, not a parallel format definition.1920</overview>2122<context>2324## Required reading before changes25261. `.pi/references/docs-component-format-spec.md` — page anatomy, section order, writing rules272. `AGENTS.md` — project conventions, quality bar, comment style283. `.pi/skills/jalco-shadcn-registry/SKILL.md` — for registry-backed items2930The agent MUST also inspect:31- similar component docs already in the repo32- the source component and its example/demo files33- any related registry metadata3435## What this skill covers3637- writing new component docs38- revising existing component docs39- reviewing docs for clarity and consistency40- writing or refining descriptions41- keeping registry-backed descriptions in sync4243</context>4445<workflow>4647## Workflow48491. Read `.pi/references/docs-component-format-spec.md` and this skill.502. Inspect similar docs pages in `app/docs/components/`.513. Review the component source, public API, and demo files.524. Create or update the page using `ComponentDocsPage` from `components/docs/component-docs-page.tsx`.535. Supply: `title`, `description`, `registryName`, `sourceFiles`, `preview`, `usage`.546. Add Examples, API Reference, Notes, or When to use sections as children — only when justified.557. Sync description and naming with `registry.json` and `lib/docs.ts`.568. Ensure a catalog card preview exists at `components/docs/previews/<registry-name>.tsx` with key variants.579. Ensure the sidebar nav entry exists in `lib/docs.ts` with `badge: "New"` and `badgeAdded` set for new components.5810. Run `pnpm previews:generate` if the card preview file was created or renamed.5911. Ensure screenshots exist at `public/previews/<name>-dark.png` and `<name>-light.png`.6012. Review using the checklist in `.pi/references/docs-component-format-spec.md`.6162</workflow>6364<rules>6566## Quick rules6768These are the rules most frequently needed during docs work. For full details, see the format spec.6970### Descriptions7172- MUST be one sentence, capability-first73- MUST NOT start with "A", "An", or "A React component for..."74- MUST NOT contain subjective adjectives75- MUST match across: page metadata, ComponentDocsPage props, registry.json7677### Usage section7879- MUST include import and minimal usage snippets via `CodeLine`80- Server/client rendering context MUST go here, not in Notes81- The first example SHOULD be minimal — layer complexity in Examples8283### Examples8485- MUST use `VariantGrid` with labeled items86- MUST group by meaning: Variants, Sizes, Languages, etc.87- MUST NOT call everything a variant88- SHOULD use realistic content8990### Notes9192- MUST contain only caveats, limitations, and external service behavior93- MUST NOT include architecture decisions, feature highlights, or rendering context94- SHOULD be brief9596### Bundled exports9798- MUST use `installNote` to explain the relationship99- MUST set `bundledIn` on the nav item in `lib/docs.ts`100101</rules>102103<quality-checklist>104105## Review checklist106107Use the checklist in `.pi/references/docs-component-format-spec.md` before shipping any docs page.108109Key things to verify:1101. Page uses `ComponentDocsPage`1112. Description matches across all surfaces1123. Preview is realistic1134. Usage includes runtime context1145. Examples are labeled correctly1156. Notes contains only caveats1167. Sidebar entry is correct (title, order, bundledIn)1178. Catalog card preview exists at `components/docs/previews/<registry-name>.tsx`118119</quality-checklist>