Skip to content

docs: strengthen RAC convention guidance in AGENTS.md#1929

Open
cmwinters wants to merge 2 commits into
mainfrom
cwinters/docs/rac-convention-guidance
Open

docs: strengthen RAC convention guidance in AGENTS.md#1929
cmwinters wants to merge 2 commits into
mainfrom
cwinters/docs/rac-convention-guidance

Conversation

@cmwinters

@cmwinters cmwinters commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Tightens the Component standards section of AGENTS.md so agents proactively follow and reference React Aria Components (RAC) when designing components — addressing a gap where the existing guidance covered only behavior ("don't reimplement keyboard/ARIA/focus"), not API shape or design-time reference.

Two edits:

  1. Expanded the "React Aria Components is the foundation" bullet to cover API conventions: when adding a prop, variant, or composition pattern, mirror the names and shapes RAC — and its reference implementation, React Spectrum — already use (e.g. description/errorMessage, isDisabled/isInvalid, slot-based composition) rather than inventing new ones. Deviate only with a documented reason.
  2. Added a "Consult React Aria when exploring a new problem" bullet: RAC/React Spectrum docs are the default starting reference, not a fallback — reaching for a blank-slate or external design when RAC already has a sanctioned pattern is a common source of API drift (including drift from the Figma library, which mirrors these conventions).

Both additions are phrased as tool-agnostic repo convention (no tool- or assistant-specific wording), since AGENTS.md is the cross-tool source of truth read by multiple agents and contributors.

Context: this came out of investigating description-prop drift between the React components and the Figma library (tracked in DSYS-194). The guidance change is the durable, general fix; the component-level work is separate.

Docs-only change to a root file (no package touched) — included an empty changeset so the changeset gate passes without a version bump.

Screenshots (if appropriate)

N/A — documentation only.

Testing approaches

  • pnpx @changesets/cli status --since=main → exit 0 (no packages bumped; gate satisfied).
  • Pre-commit hook (Biome + syncpack) ran clean on the staged files.
  • No code/build impact.

Note

Low Risk
Documentation and an empty changeset only; no runtime, API, or package code changes.

Overview
Strengthens Component standards in AGENTS.md so guidance covers API shape as well as accessibility behavior.

The existing React Aria Components is the foundation bullet now requires mirroring RAC and React Spectrum prop names and composition patterns (e.g. description/errorMessage, isDisabled/isInvalid, slots) instead of inventing alternatives, with deviations documented in the PR.

A new bullet Consult React Aria when exploring a new problem makes RAC/React Spectrum docs the default design reference before blank-slate or external patterns, explicitly tying that to avoiding API drift with the Figma library.

Adds an empty changeset (no package bumps) so the changeset gate passes for this docs-only root-file change.

Reviewed by Cursor Bugbot for commit 96dfe51. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 96dfe51

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cmwinters cmwinters marked this pull request as ready for review June 8, 2026 22:57
@cmwinters cmwinters self-assigned this Jun 10, 2026
@cmwinters cmwinters requested a review from a team as a code owner June 17, 2026 16:06

@apucacao apucacao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://react-aria.adobe.com/getting-started#working-with-ai also has things that might be useful for folks contributing to Launchpad!

Comment thread AGENTS.md

- **Use existing LaunchPad components and packages** (`@launchpad-ui/components`, `@launchpad-ui/icons`, etc.). Never create a custom component when a LaunchPad equivalent exists.
- **React Aria Components is the foundation.** Wrap and theme RAC primitives; do not reimplement keyboard/ARIA/focus behavior. The sanctioned escape hatches are `defaultProps`, slots, `useContextProps`, and render-props composition — see https://react-aria.adobe.com/customization. (`docs/adr-008-component-foundation.md`)
- **React Aria Components is the foundation.** Wrap and theme RAC primitives; do not reimplement keyboard/ARIA/focus behavior. The sanctioned escape hatches are `defaultProps`, slots, `useContextProps`, and render-props composition — see https://react-aria.adobe.com/customization. **Follow RAC's API conventions, not only its behavior:** when adding a prop, variant, or composition pattern, mirror the names and shapes RAC — and its reference implementation, [React Spectrum](https://react-spectrum.adobe.com) — already use (e.g. `description`/`errorMessage` for helper and validation text, `isDisabled`/`isInvalid` booleans, slot-based composition) rather than inventing new ones. Deviate only with a reason noted in the PR. (`docs/adr-008-component-foundation.md`)

@apucacao apucacao Jun 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how much this matters ultimately, but RAC added markdown versions of all their pages, accessible by appending .md to any URL, like https://react-aria.adobe.com/customization.md.

Again, not that I've measured anything here, but if the agent actually does decide to go read the docs, the markdown version would eat up fewer tokens, so you may want to use that version for links here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that! They've also got a 'copy for LLM' button that also copies a docs page as markdown. Great idea, I will add this to our Jira backlog.

@zakk-verrilli-ld zakk-verrilli-ld left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants