docs: narrow cds-code skill trigger#784
Conversation
Co-authored-by: Codex <codex-noreply@coinbase.com>
🟡 Heimdall Review Status
🟡
|
| Code Owner | Status | Calculation | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ui-systems-eng-team |
🟡
0/1
|
Denominator calculation
|
Co-authored-by: Codex <codex-noreply@coinbase.com>
cb-ekuersch
left a comment
There was a problem hiding this comment.
If you want, you may use the /skill-creator skill to run the evals for this skill. It may be worth creating a net-new eval to ensure it doesn't trigger for one of the requests you have in mind
| **Review** — the user explicitly asks to audit, review, or check existing code for CDS adherence → read `guidelines/code-review.md` and follow it instead. | ||
|
|
||
| **Default to coding.** Only treat a request as a review if the user's intent is explicit. Writing code is the primary use case for this skill. | ||
| **Out of scope** — the user wants logic-only changes, hooks, tests, Relay or data fetching, analytics, navigation wiring, feature flags, generated artifacts, performance-only refactors, or edits in component files that do not alter rendered presentation or CDS usage → do not follow this skill's coding or review workflows. |
There was a problem hiding this comment.
@dugganburke-cb can you remove "Relay"? We are open source so this skill can be installed outside of coinbase's tech stack
There was a problem hiding this comment.
Also, models tend to do better with what you tell them to do and less so teling them what not to do. Do you think the skill would trigger as you'd expect if we omitted or just greatly simplified this out of scope paragraph? I'm thinking a precise description of the condition(s) (i.e. changes to rendered JSX, or changes directly involving cds imports) might do it
| **Default to coding.** Only treat a request as a review if the user's intent is explicit. Writing code is the primary use case for this skill. | ||
| **Out of scope** — the user wants logic-only changes, hooks, tests, Relay or data fetching, analytics, navigation wiring, feature flags, generated artifacts, performance-only refactors, or edits in component files that do not alter rendered presentation or CDS usage → do not follow this skill's coding or review workflows. | ||
|
|
||
| **Default in-scope work to coding.** For requests that affect rendered UI presentation or CDS usage, only treat the request as a review if the user's audit/review intent is explicit. Writing code is the primary use case for this skill. |
There was a problem hiding this comment.
| **Default in-scope work to coding.** For requests that affect rendered UI presentation or CDS usage, only treat the request as a review if the user's audit/review intent is explicit. Writing code is the primary use case for this skill. | |
| **Default in-scope work to coding.** Only treat the user's request as a review/audit if the intent is explicit. Writing/creating UI is the primary use case for this skill. |
|
|
||
| **Default in-scope work to coding.** For requests that affect rendered UI presentation or CDS usage, only treat the request as a review if the user's audit/review intent is explicit. Writing code is the primary use case for this skill. | ||
|
|
||
| If the request is ambiguous, inspect the requested change first. Only enter the Coding Workflow when the change affects rendered UI presentation or CDS usage. Do not treat "component" or "frontend repo" as sufficient signal by itself. |
There was a problem hiding this comment.
| If the request is ambiguous, inspect the requested change first. Only enter the Coding Workflow when the change affects rendered UI presentation or CDS usage. Do not treat "component" or "frontend repo" as sufficient signal by itself. |
| Provides a structured workflow for writing high quality Coinbase Design System (CDS) code. | ||
| Use this skill every time you are asked to create or update a user interface using React or React Native. | ||
| Additinoally, this skill may be used to conduct a code review on existing code for CDS adherence. | ||
| Trigger examples: "build this screen", "update this component", "perform a CDS audit on our changes", | ||
| "check our codebase for CDS adherence", "does this feature use CDS well?" |
There was a problem hiding this comment.
Can we try the description below? I think removing this single line (Use this skill every time you are asked to create or update a user interface using React or React Native.) will help a lot
Provides a structured workflow for writing high quality Coinbase Design System (CDS) code.
Use this skill when you need to create a new user interface or make visual changes to an existing one. This skill should not be used for non-visual changes, business logic, refactoring or in files/projects that are not using CDS React components.
Additinoally, this skill may be used to conduct a code review on existing code for CDS adherence.
Trigger examples include: "build this screen", "use design system tokens in this component", "use CDS component in this UI", "perform a CDS audit on our changes",
"check our codebase for CDS adherence", "does this feature use CDS well?"
| Before responding, determine what the user needs: | ||
|
|
||
| **Coding** — the user wants to create or update UI → follow the Coding Workflow. | ||
| **Coding** — the user wants to create or update rendered UI presentation or CDS usage → follow the Coding Workflow. |
There was a problem hiding this comment.
Coding — the user wants to create a new user interface or make visual changes to an existing one → follow the Coding Workflow.
Just to be consistent with the wording i suggested above
| ## Coding Workflow | ||
|
|
||
| For all frontend coding tasks, follow these steps in order. | ||
| For coding tasks that change rendered UI presentation or CDS usage, follow these steps in order. |
There was a problem hiding this comment.
| For coding tasks that change rendered UI presentation or CDS usage, follow these steps in order. | |
| For coding tasks that are in-scope, follow these steps in order. |
What changed? Why?
Narrowed the
cds-codeskill trigger so it only applies to rendered React or React Native UI presentation changes, CDS usage changes, and explicit CDS audits/reviews.This also adds explicit out-of-scope language for logic-only changes, hooks, tests, Relay/data fetching, analytics, navigation wiring, feature flags, generated artifacts, performance-only refactors, and component-file edits that do not alter rendered presentation or CDS usage.
The intent is to reduce false-positive skill activation in frontend repos where many non-visual changes still happen inside component files.
Root cause (required for bugfixes)
N/A - docs-only skill metadata update.
UI changes
N/A - no UI changes.
Testing
How has it been tested?
Testing instructions
yarn install --immutableyarn nx format:write --files=skills/cds-code/SKILL.mdgit diff --check -- skills/cds-code/SKILL.mdskills/cds-code/SKILL.mdIllustrations/Icons Checklist
N/A - this PR does not change files under
packages/illustrations/**orpackages/icons/**.Change management
type=routine
risk=low
impact=sev5
automerge=false