.agents/skills/docs-review/references/storybook-style.md
This file owns Storybook-specific editorial, MDX component, frontmatter, and validation rules. It does not own doc-type identification, mode routing, or intervention logic — those belong in docs-strategy.md.
args CSF story key:".title only; never use # Heading in the body. [auto][auto].mdx files, e.g. [text](../path/to/file.mdx). [auto][auto]- (not * or +). [oxfmt]variant ("info" or "warning"). Bare <Callout> is not allowed.variant="info")variant="info" or variant="warning")variant="info")title prop (variant="info")variant="info")variant="warning", not variant="info". [auto]variant="positive" is non-standard; use variant="info" instead. [auto]<If renderer={[...]}> / <If notRenderer={[...]}> — conditional rendering.<CodeSnippets path="..." /> — path must exist in docs/_snippets/. [auto]<Video src="..." /> — embedded video.<YouTubeCallout id="..." title="..." /> — YouTube embed.&, |, :, commas) that require quoting. [auto]sidebar.title when it differs from title. If it matches, omit it. [auto]Good example:
---
title: Component Story Format (CSF)
sidebar:
title: CSF
order: 2
---
Bad example:
---
title: "ArgTypes"
sidebar:
title: "ArgTypes"
order: 2
---
Block-level JSX elements (e.g. <Callout>, <details>, <If>) follow these rules:
<summary> is an exception — no new line between the opening <details> tag and the <summary> tag).Good example:
<If renderer={['react']}>
Other content.
<Callout variant="info">
This is a callout.
- This is a list item inside the callout
- This is a nested list item inside the callout
```json
{
"key": "value"
}
```
</Callout>
More other content.
<details>
<summary>This is a summary</summary>
This is content inside the details element.
</details>
More other content.
</If>
Bad example:
<If renderer={['react']}>
Other content.
<Callout>
This is a callout.
- This is a list item inside the callout
- This is a nested list item inside the callout
```json
{
"key": "value"
}
```
</Callout>
More other content.
<details>
<summary>This is a summary</summary>
This is content inside the details element.
</details>
More other content.
</If>
Items marked [auto] above are checked by yarn docs:check (see scripts/docs/check-docs.ts). Items marked [oxfmt] are handled by yarn fmt:write.
These are final-stage validation tools. Run them after structural and editorial work is complete, not as the first step.