AI configuration for eBay's evo-web components monorepo.
<agent_constraints>
- Never auto-commit or push without explicit user request
- Always run
npm run buildbefore marking component work complete - Prefer reading existing patterns over introducing new ones </agent_constraints>
HTML Semantic Structure → @ebay/skin (CSS/BEM) → Framework Components → Interactive Behaviors
CSS is the single source of truth. All components wrap Skin CSS modules.
@ebay/skin- Pure CSS/SCSS (foundation layer)@ebay/ebayui-core- Marko 5 (legacy)@evo-web/marko- Marko 6 (new, under migration)@ebay/ebayui-core-react- React CJS (legacy)@evo-web/react- React 19 ESM (new, under migration)
- Create/modify Skin component in
packages/skin/src/(HTML + SCSS) - Write semantic HTML following BEM + a11y guidelines
- Build framework wrapper (Marko/React) importing Skin CSS
- Add JS interaction layer (keyboard nav, ARIA) if needed
- Support pass-through HTML attributes to root/control elements
</architecture_rules>
All components MUST meet WCAG 2.2 AA standards:
- Follow eBay accessibility standards and patterns
- Prefer native HTML over custom controls
- If ARIA needed: follow "Five Rules of ARIA" (minimal/correct usage)
- Ensure keyboard operability, focus states, sufficient contrast
- Test in light/dark modes
- Test zoom up to 400% and with assistive technologies (screen readers, keyboard-only)
- Support RTL (right-to-left) layouts
</accessibility_guardrails>
BEM Strict Enforcement:
- Block:
.btnor.chips-combobox(for multi-word) - Element:
.btn__cell - Modifier:
.btn--primary
Build Pipeline: Sass → PostCSS → Autoprefixer → cssnano → dist/
Style Conventions: See ./packages/skin/STYLEGUIDE.md
</css_methodology>
Version-Specific Syntax (Prevent Hallucination):
Marko 6 Syntax:
- ✅ Use:
<let/x=0>or<const/y=x*2> - ❌ Never:
$ let x = 0;(Marko 5 deprecated) - ✅ Events:
onClick() { /* code */ }oronClick=handler - ❌ Never:
onClick("handleClick")(Marko 5 deprecated) - ✅ Attribute values containing
>MUST be wrapped in parentheses:<const/x=(a > b ? 1 : 0)> - ❌ Never:
<const/x=a > b ? 1 : 0>(the>is parsed as the tag close)
Marko 6 Tag Variable Locality:
Declare <const/>, <let/>, <id/>, and other tag variables close to where they are first used, not grouped at the top. Exception is variables needed in multiple distant locations.
React Package Differences:
ebayui-core-react: RequiresReact.forwardRefwrapperevo-react: Use nativeref(React 19, no forwardRef needed)
BEM Syntax:
- Block:
.btnor.chips-combobox(for multi-word) - Element:
.btn__cell(double underscore, NOT single) - Modifier:
.btn--primary(double dash, NOT single) - ❌ Modifiers or Children Never:
.btn-primaryor.btn_cell
</correctness_guards>
Follow existing component structures:
- Skin components: Follow
packages/skin/src/components/ebay-button/structure - Marko components: Follow
packages/ebayui-core/src/components/ebay-button/structure - React components: Follow
packages/ebayui-core-react/src/ebay-button/structure
Non-obvious conventions:
- BEM naming strictly enforced
- SCSS modules imported in component files
- Tests in
test/directory:test.browser.js(Playwright) andtest.server.js(SSR)
Non-obvious conventions:
- Event naming: kebab-case (
on-click,on-expand) - Tests in
test/directory:test.browser.js(Playwright) andtest.server.js(SSR) browser.jsonfor build remapping (client-only code)
Marko 5→6 Syntax (CRITICAL - prevents hallucination):
- Tag variables: Use
<let/x=0>or<const/y=x*2>(NOT$ let x = 0;) - Style tags: Use
<style>with standard CSS (NOTstyle { ... }blocks) - Events: Use
onClick() { /* code */ }oronClick=handler(NOTonClick("handleClick")) <script>tags: Similar to React effects, use sparingly (NOT for state/functions)
Non-obvious conventions:
- Tests in
__tests__/directory (nottest/) - Stories colocated with tests (
*.stories.tsxin__tests__/) - Multi-file components split into
-cell.tsx,-text.tsx, etc.
CRITICAL package differences:
-
@ebay/ebayui-core-react:- Requires
React.forwardRefwrapper for ref forwarding - CommonJS build target
- External MakeupJS dependency
- Assumes global
@ebay/skinSCSS/CSS
- Requires
-
@evo-web/react:- Use native
refprop (React 19, no forwardRef needed) - ESM-only build target
- Bundled MakeupJS utilities
- Imports Skin CSS directly in component files
- Use native
Mandatory for all components:
- Adequate test coverage for new/modified code
- Browser tests (Marko via Playwright) or jsdom tests (React)
- Visual regression via Percy (CSS changes)
Storybook requirements:
- Skin storybook is required to include all the visual permutations of the component
- Skin storybook is required to include RTL + Text Spacing stories (unless excluded)
- Marko/React storybooks should have the high-level permutations only since they include interactive options that allow users to see the component in different states without needing separate stories for each permutation.
All PRs:
- ✅ Build must be green
- ✅ Changes within scope of linked issue
- ✅ Reference issue:
Fixes #[number] - ✅ Include changeset (unless docs-only, in
/src/routes/)
CSS/SCSS changes:
- Regenerate
dist/folder vianpm run build - Test in all supported browsers
- Percy visual regression approved
- Verify dark mode + RTL support
- Check responsive breakpoints: 320px, 512px, 768px, 1024px, 1280px, 1440px, 1680px, 1920px
Breaking changes:
- Only in major version releases
- Must be documented in changeset
Root-level (frequently used):
npm run build # Build all packages + run tests
npm test # Test (for individual packages only)
npm start # Start local dev site (Marko-Run)
npm run lint # Lint CSS/SCSSTesting patterns:
- Marko:
test/test.browser.js(Playwright) +test/test.server.js(SSR) - React:
__tests__/index.spec.tsx(Vitest + @testing-library/react)
Run specific test:
npx vitest run packages/ebayui-core/src/components/ebay-button/test/test.browser.jsSite Architecture:
- Root site: Marko-Run (file-based routing at
/src/routes/) /src/routes/_index/components/- Component docs/src/routes/_index/accessibility/- A11y guides/src/data/component-metadata.json- Component registry- Deploys to
_site/with nested Storybook builds - New components need documentation in
/src/routes/_index/components/with Overview, Accessibility, CSS tabs. - New components also need tab links to Marko and React components storybooks as well as the Design System Playbook page for the component.
Versioning:
- Changesets workflow (packages version independently) - see
/evo-release-workflowskill - No monorepo version linking
Browser Support:
- Defined by
@ebay/browserslist-config(no IE10 or below)
For specialized workflows:
/evo-release-workflow- Changesets versioning and release procedure (invoke when creating releases)
For comprehensive command reference (less frequently used commands):
/evo-commands- Full npm scripts reference, package-specific builds, Storybook setup