-
Notifications
You must be signed in to change notification settings - Fork 98
docs: narrow cds-code skill trigger #784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,11 +1,13 @@ | ||||||
| --- | ||||||
| name: cds-code | ||||||
| description: | | ||||||
| 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?" | ||||||
| Provides a structured workflow for writing and reviewing high quality Coinbase Design System (CDS) presentation code. | ||||||
| Use this skill when a request changes rendered React or React Native UI presentation or CDS usage. | ||||||
| Examples include CDS component choices, JSX layout or structure, spacing, color, typography, icons, illustrations, images, loading states, empty states, error states, interactive control accessibility labels, or user-facing copy. | ||||||
| Use this skill for explicit CDS audits, reviews, or adherence checks. | ||||||
| Do not use this skill for 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. | ||||||
| Trigger examples: "build this screen", "fix spacing on this component", "replace this UI with CDS components", | ||||||
| "perform a CDS audit on our changes", "check our codebase for CDS adherence", "does this feature use CDS well?" | ||||||
| license: Apache-2.0 | ||||||
| metadata: | ||||||
| version: '2.1.0' | ||||||
|
|
@@ -17,11 +19,15 @@ metadata: | |||||
|
|
||||||
| 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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 |
||||||
|
|
||||||
| **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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dugganburke-cb can you remove "Relay"? We are open source so this skill can be installed outside of coinbase's tech stack
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| 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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ## Initialization | ||||||
|
|
||||||
|
|
@@ -41,7 +47,7 @@ If the script cannot be run, much of the information it provides can be determin | |||||
|
|
||||||
| ## 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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| **YOU MUST** perform steps 1 and 2 before writing any code! | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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