chore(ai): added the central Claude instructions and a generalized coding skill#511
chore(ai): added the central Claude instructions and a generalized coding skill#511
Conversation
…safe coding skill
|
There was a problem hiding this comment.
Pull request overview
Adds repository-level Claude Code guidance and introduces an org-wide “safe coding” skill to standardize agent-driven coding workflows.
Changes:
- Added
CLAUDE.mdwith repo architecture, commands, standards (BEM/WCAG), and PR checklist highlights. - Added
.claude/skills/evo-safe-coding/SKILL.mddefining a risk-gated workflow and “do not” rules for agent changes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
CLAUDE.md |
Central documentation for repo architecture, package layout, dev commands, and standards. |
.claude/skills/evo-safe-coding/SKILL.md |
Adds a reusable skill outlining safe-change workflow and guardrails for coding tasks. |
| **Key differences:** | ||
|
|
||
| - `ebayui-core-react`: Uses forwardRef, CommonJS build, external MakeupJS | ||
| - `evo-react`: React 19 native (no forwardRef), ESM-only, bundled MakeupJS |
There was a problem hiding this comment.
React still supports forwardRef; documenting evo-react as "no forwardRef" reads like a framework limitation rather than a codebase convention. Suggest rephrasing to clarify this is a project choice (e.g., "components typically avoid forwardRef" or "doesn’t rely on forwardRef in this package") to prevent incorrect assumptions by contributors.
| - `evo-react`: React 19 native (no forwardRef), ESM-only, bundled MakeupJS | |
| - `evo-react`: React 19 native (typically avoids forwardRef), ESM-only, bundled MakeupJS |
agliga
left a comment
There was a problem hiding this comment.
Overall LGTM. Im fine approving this as is, but I did add some minor suggestions.
I went through and added some suggestions just to make things way more specific. When I saw some of these it was a bit ambiguous in certain cases and knowing AI, it could do the wrong thing
| cd packages/skin && npm run storybook | ||
| cd packages/ebayui-core && npm run storybook | ||
| cd packages/ebayui-core-react && npm run storybook |
There was a problem hiding this comment.
npm start should also launch storybook on these
There was a problem hiding this comment.
npm startshould also launch storybook on these
@agliga , npm start currently just runs the Evo Web site. Are you suggesting a change to that?
There was a problem hiding this comment.
In the root, npm start runs the evo site (currently though it will also start react and marko storybook on different ports)
However in each of the packages have their own npm start. This will trigger starting storybook.
There was a problem hiding this comment.
I see. So, how are you suggesting we modify this?
Change this: cd packages/ebayui-core && npm run storybook
To this?: cd packages/ebayui-core && npm start
There was a problem hiding this comment.
Yes!
OR we can do
npm start -w packages/ebayui-core
From the root.
Either way is fine.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andrew Gliga <agliga4@gmail.com>
Co-authored-by: Andrew Gliga <agliga4@gmail.com>
Co-authored-by: Andrew Gliga <agliga4@gmail.com>
Co-authored-by: Andrew Gliga <agliga4@gmail.com>
Co-authored-by: Andrew Gliga <agliga4@gmail.com>
Co-authored-by: Andrew Gliga <agliga4@gmail.com>
HenriqueLimas
left a comment
There was a problem hiding this comment.
I think we should use what is going to be the standard for these files (at least for now), like AGENTS.md and the .agents/skills/ folder. Eventually claude and others will start following the standard and we can have a CLAUDE.md locally that reference the AGENTS.md like below:
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
@AGENTS.mdSince this is open source we shouldn't dictate what agents the contributor will use.
| **Key differences:** | ||
|
|
||
| - `ebayui-core-react`: Uses forwardRef, CommonJS build, external MakeupJS | ||
| - `evo-react`: React 19 native (no forwardRef), ESM-only, bundled MakeupJS |
There was a problem hiding this comment.
The usage of forwardRef is an internal decision where we will use React 19 ref property instead of the current forwardRef. It should be React 19, ESM` (we don't need to have MakeupJS reference). I think we can update this one later but we also will have automatically import of .css files.
There was a problem hiding this comment.
@HenriqueLimas , ok, should we just ignore the Copilot suggestion, then?
CLAUDE.md
Outdated
There was a problem hiding this comment.
ui-core-react components assumes @ebay/skin is loaded, that will change on evo-web/react
| **Changesets workflow:** | ||
|
|
||
| 1. Make changes to packages | ||
| 2. Run `npm run change` to create a changeset |
There was a problem hiding this comment.
This one tends not to work for me since they cannot iterate with changeset prompts, they usually create a manual file instead
There was a problem hiding this comment.
@HenriqueLimas , when you say, "they," who are you referring to?
| ### Migration Paths | ||
|
|
||
| **Marko 5 → 6:** | ||
|
|
||
| - From: `@ebay/ebayui-core` | ||
| - To: `@evo-web/marko` | ||
| - Status: In progress - See this PR for reference and details: https://github.com/eBay/evo-web/issues/499 | ||
|
|
||
| **React CJS → ESM:** | ||
|
|
||
| - From: `@ebay/ui-core-react` | ||
| - To: `@evo-web/react` | ||
| - Status: Pre-release | ||
|
|
||
| Legacy packages maintained for backwards compatibility. |
There was a problem hiding this comment.
I am wondering if this is relevant for the Agent, is more an info to the application owner that uses our packages, not for developing
There was a problem hiding this comment.
@HenriqueLimas , I think it could be relevant for dev as well.
| ## PR Checklist Highlights | ||
|
|
||
| **All PRs:** | ||
|
|
||
| - Build must be green | ||
| - Changes within scope of linked issue | ||
| - Reference issue with "Fixes #[number]" | ||
| - Include changeset (unless docs-only) | ||
|
|
||
| **Markup changes:** | ||
|
|
||
| - BEM naming conventions | ||
| - Semantic HTML5 elements | ||
| - WCAG 2.2 AA compliance | ||
|
|
||
| **CSS/SCSS changes:** | ||
|
|
||
| - Regenerate `dist/` folder using `npm run build` | ||
| - Test in all supported browsers | ||
| - Percy visual regression approved | ||
| - Verify dark mode and RTL support | ||
| - Check responsive breakpoints (320px, 512px, 768px, 1024px, 1280px, 1440px, 1680px, 1920px) | ||
|
|
||
| **Breaking changes:** | ||
|
|
||
| - Only allowed in major version releases | ||
| - Must be clearly documented in changeset |
There was a problem hiding this comment.
Not sure how relevant this is for the agent to work in the repo. This is more a guideline for a user that creates PR and something that happen after the PR. The only information that might be necessary is the Regenreate dist/folder usingnpm run build`
There was a problem hiding this comment.
@HenriqueLimas , I think when tasks are handed to an agent to complete, this would probably be needed for direction. Assuming agents on Github (Claude and Codex will soon be available) are assigned an end-to-end task at some point, this will be relevant IMO.
CLAUDE.md
Outdated
There was a problem hiding this comment.
I really don't want to be pedantic or pick a fight, but I am a little bit offended that this was the result of our last thread. It has multiple typos, and doesn't really include the details that I suggested.
There was a problem hiding this comment.
Agree with this.
Note to AI: never spell Marko with a c otherwise you will get the Marko team upset
There was a problem hiding this comment.
@LuLaValva , my bad for the typos. Context switching is not just bad for agents. 😉
I don't see it as pedantic or "picking a fight." Apologies, I should have relayed this earlier. I wasn't intentionally trying to ignore your suggestion. They're good adjustments.
ebayui-core uses Marko 5 and the Class API, while evo-web uses Marko 6 and the Tags API
The issue here is that it's too vague and adds references to concepts that Claude and other agents have little to no knowledge about, so this would actually be counterproductive to be included in the main agent instructions by itself. To include it we would need to add a section about each and explain their differences in some detail, preferably with direct examples or references to those details and examples.
We can work together offline to come up with that content or if you'd prefer, you can simply use the "suggest change" feature to suggest exactly what we should capture.
agliga
left a comment
There was a problem hiding this comment.
Did another pass. I added a lot of suggestions and some questions.
IMO its looking much better now.
| ├── index.marko # Template with TypeScript interfaces | ||
| ├── component.ts # Lifecycle and behavior (optional) | ||
| ├── component-browser.ts # Client side only lifecycle and behavior (optional) | ||
| ├── marko-tag.json # Attribute validation |
There was a problem hiding this comment.
This isn't needed anymore since we moved off of marko 4
| ├── marko-tag.json # Attribute validation |
| ├── component-browser.ts # Client side only lifecycle and behavior (optional) | ||
| ├── marko-tag.json # Attribute validation | ||
| ├── style.ts # Imports Skin CSS | ||
| ├── browser.json # Build remapping |
There was a problem hiding this comment.
| ├── browser.json # Build remapping | |
| ├── browser.json # Lasso configuration |
Also Im thinking this might not be needed. This was used in certain cases where people did not want to have our imports.
Next major version these should be removed
| **Style Conventions** | ||
| See `./packages/skin/STYLEGUIDE.md` for detailed style conventions. | ||
|
|
||
| **PostCSS pipeline:** Sass → PostCSS → Autoprefixer → cssnano → `dist/` |
There was a problem hiding this comment.
| **PostCSS pipeline:** Sass → PostCSS → Autoprefixer → cssnano → `dist/` | |
| **CSS build pipeline:** Sass → PostCSS → Autoprefixer → cssnano → `dist/` |
| - Ensure keyboard operability for all interactive elements | ||
| - Maintain focus states and sufficient color contrast | ||
| - Test in both light and dark modes | ||
| - Support RTL (right-to-left) layouts |
There was a problem hiding this comment.
Should we add a section here about font text size and supporting that? Like font zoom
| **Required for all components:** | ||
|
|
||
| - Adequate test coverage for new/modified code | ||
| - Browser tests (Marko) or jsdom tests (React) |
There was a problem hiding this comment.
| - Browser tests (Marko) or jsdom tests (React) | |
| - Server snapshot tests (Marko/React) | |
| - Browser tests (Marko) or jsdom tests (React) |
| cd packages/skin && npm run storybook | ||
| cd packages/ebayui-core && npm run storybook | ||
| cd packages/ebayui-core-react && npm run storybook |
There was a problem hiding this comment.
Yes!
OR we can do
npm start -w packages/ebayui-core
From the root.
Either way is fine.
|
|
||
| ```bash | ||
| # Marko browser test | ||
| npx vitest run packages/ebayui-core/src/components/ebay-button/test/test.browser.js |
There was a problem hiding this comment.
This is incorrect. Running this locally fails.
Here's the correct command
| npx vitest run packages/ebayui-core/src/components/ebay-button/test/test.browser.js | |
| npm test -w packages/ebayui-core -- src/components/ebay-button/test/test.browser.js |
| npx vitest run packages/ebayui-core/src/components/ebay-button/test/test.browser.js | ||
|
|
||
| # React test | ||
| npx vitest run packages/ebayui-core-react/src/ebay-button/__tests__/index.spec.tsx |
There was a problem hiding this comment.
Same with this:
| npx vitest run packages/ebayui-core-react/src/ebay-button/__tests__/index.spec.tsx | |
| npm test -w packages/ebayui-core-react -- src/ebay-button/__tests__/index.spec.tsx |
CLAUDE.md
Outdated
There was a problem hiding this comment.
Agree with this.
Note to AI: never spell Marko with a c otherwise you will get the Marko team upset
| - Test in all supported browsers | ||
| - Percy visual regression approved | ||
| - Verify dark mode and RTL support | ||
| - Check responsive breakpoints (320px, 512px, 768px, 1024px, 1280px, 1440px, 1680px, 1920px) |
There was a problem hiding this comment.
If we want to test the font zoom as well, add it here too
Description
CLAUDE.mdThis file was generated after an
/initin the repo. Claude Code took almost 11 minutes to read the entire repo and create the central instructions file. I did not make any changes, though noticed some things could be improved.SKILL: evo-safe-codingThis is a high-level problem solving skill. The process to create it was involved. It was based on deep research in Notebook LM that was then condensed in ChatGPT into the skill. Its aim is to provide high-level guardrails for agents solving coding challenges.