agentleFS
OpenAIKnown publisheropenai/apps-sdk-ui/AGENTS.md

apps-sdk-ui

AGENTS.md953 starsChanged 12 months agoMITView on GitHub

Apps SDK UI is a design system tailored for building apps in ChatGPT. Apps SDK UI provides styling foundations, CSS variable design tokens, and a library of well-crafted, accessible components. Keep this goal and context in mind as you contribute code to the repository. This code is the foundation for many other projects, and changes should be robust, well-considered, and workable for many different contexts. You should make changes only in the src/ folder: When adding new functionality or docs,…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

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

7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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. Distinctive:

    Keep this goal and context in mind as you contribute code to the repository.

    line 10
  2. Very specific:

    When adding new functionality or docs, place files in the appropriate src/* location.

    line 25
  3. Very specific:

    All components should be thoroughly documented in Storybook, using the .mdx and .stories sidecar files.

    line 80
  4. Very specific:

    Update or create .mdx and .stories.tsx files when adding new components or features.

    line 83
  5. Very specific:

    Keep usage examples simple and focused.

    line 84
  6. Distinctive:

    When working on features or documentation, avoid making unrelated changes to the current task.

    line 88
  7. Very specific:

    Use Node version specified in .node-version

    line 92

≈ “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

Contribution guide for Apps SDK UI

Apps SDK UI is a design system tailored for building apps in ChatGPT. Apps SDK UI provides styling foundations, CSS variable design tokens, and a library of well-crafted, accessible components.

  • Design tokens – defined across colors, typography, spacing, sizing, shadows, surfaces, and more.
  • Tailwind 4 – fully integrated and pre-configured with Apps SDK UI's design tokens.
  • Component library – high-quality components built on top of Radix for consistent accessibility patterns.
  • Utilities – helpful tools for handling core concepts like dark mode, responsiveness, and more across React and CSS.

Keep this goal and context in mind as you contribute code to the repository. This code is the foundation for many other projects, and changes should be robust, well-considered, and workable for many different contexts.

Repository overview

You should make changes only in the src/ folder:

  • components/ - React component implementations (e.g., Button, Chat, Tooltip)
  • hooks/ - Reusable React hooks (e.g., useAutoGrowTextarea, useBreakpoints)
  • lib/ - Utility functions (theme helpers, attachment helpers, etc.)
  • styles/ - Global CSS config, Tailwind setup, and design token definitions
  • **/*.stories.tsx - Storybook stories definition for a given component
  • **/*.mdx - Storybook documentation, often referring to sibling .stories.tsx file
  • types.ts - Shared TypeScript types
  • vite-env.d.ts - Vite type declarations

When adding new functionality or docs, place files in the appropriate src/* location.

Components

File Naming Conventions

  • Component: ComponentName.tsx
  • Styles: ComponentName.module.css
  • Tests: ComponentName.test.tsx
  • Storybook:
    • ComponentName.stories.tsx
    • ComponentName.mdx

Component library

Below is a quick reference of all provided components:

ComponentDescription
AlertCall attention to a specific message or warning.
AnimateAnimate components as they mount and unmount.
AnimateLayoutAnimate width & height of components as they mount and unmount.
AnimateLayoutGroupAnimate width & height of lists of components as they enter and exit.
AvatarDisplay user identities with either text, photo, or an icon.
AvatarGroupDisplay avatars as a single stack.
BadgeEmphasize details with a status indicator.
ButtonCreate actions in many different styles.
ButtonLink<Button> but as a semantic anchor element.
CheckboxToggle control for on and off states.
CodeBlockDisplay syntax‑highlighted code snippets.
CopyTooltipAllow users to easily copy to clipboard.
EmptyMessageGracefully inform users when there's nothing to see.
IconCollection of SVG icons exported as React components.
ImageLoad remote images with optional aspect ratio and cover mode.
IndicatorLoading dots and circular progress indicators.
InputSemantic input text collection.
MarkdownRender rich formatted content.
MenuStructured actions in a dropdown list.
ModalCapture focus for essential tasks or details.
AppsSDKUIProviderReact provider for shared context (e.g., link component).
PopoverGeneric floating UI utility for contextual actions.
RadioGroupRadio button group selection component.
SegmentedControlToggle through grouped options.
SelectChoose from a dropdown of options.
SelectControlAlternative select control component with enhanced features.
SliderFine-tune values within a set range.
SwitchToggle control for on and off states.
TagInputEnter multiple unique tags.
TextLinkSemantic link used for both internal and external links.
TextareaAutosizable text input area with optional validation.
TooltipBrief and informative hover text.
TransitionGroupPrimitive for rendering components over time.

Documentation & Storybook

All components should be thoroughly documented in Storybook, using the .mdx and .stories sidecar files.

  • You should not need to run Storybook locally, so ignore the pnpm run storybook command
  • Update or create .mdx and .stories.tsx files when adding new components or features.
  • Keep usage examples simple and focused. Refer to documentation examples like Avatar, Badge, and Button for guidance.

Contributing

When working on features or documentation, avoid making unrelated changes to the current task. Do not add comments for obvious behaviors, and do not change build settings.

Setup instructions

  • Use Node version specified in .node-version
  • Install dependencies with npm install

Required commands before commit

  1. npm run format:fix - Auto-fixes any formatting issues
  2. npm run lint - Runs ESLint (TS) and Stylelint (CSS)
  3. npm run types - Runs TypeScript type checking
  4. npm run test - Executes unit tests via Vitest

Ignore all other script commands, as they will be irrelevant to your work.

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.