Skip to content

docs: narrow cds-code skill trigger#784

Open
dugganburke-cb wants to merge 5 commits into
coinbase:masterfrom
dugganburke-cb:duggan/narrow-cds-code-skill-07/09
Open

docs: narrow cds-code skill trigger#784
dugganburke-cb wants to merge 5 commits into
coinbase:masterfrom
dugganburke-cb:duggan/narrow-cds-code-skill-07/09

Conversation

@dugganburke-cb

@dugganburke-cb dugganburke-cb commented Jul 9, 2026

Copy link
Copy Markdown

What changed? Why?

Narrowed the cds-code skill 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.

Added two near-miss evals for non-visual changes inside CDS component files:

  • Relay/data and display-name fallback extraction from ProfileCard.tsx
  • Navigation-only Security-row wiring in SettingsScreen.tsx

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 - skill metadata and eval coverage update.

UI changes

N/A - no UI changes.

Testing

How has it been tested?

  • Unit tests
  • Interaction tests
  • Pseudo State tests
  • Manual - Web
  • Manual - Android (Emulator / Device)
  • Manual - iOS (Emulator / Device)

Skill eval results

Ran the two new out-of-scope evals with the skill-creator workflow against the narrowed skill and a pre-PR skill snapshot:

Eval Narrowed skill Pre-PR skill
Logic-only ProfileCard Relay/hook refactor 100% (5/5) 80% (4/5)
Navigation-only Settings Security wiring 100% (6/6) 67% (4/6)
Combined 100% (11/11) 73% (8/11)
  • The narrowed skill correctly classified both requests as out of scope, skipped CDS discovery/docs, completed the requested behavior change, and preserved presentation.
  • The pre-PR skill entered the full CDS coding workflow for both requests.
  • Average runtime improved from 87.5s to 56.5s (−31.1s).
  • Existing evals 1–8 are unchanged.

Testing instructions

  • yarn install --immutable
  • yarn nx format:write --files=skills/cds-code/SKILL.md,skills/cds-code/evals/evals.json,skills/cds-code/evals/fixtures/eval-9/ProfileCard.tsx,skills/cds-code/evals/fixtures/eval-10/SettingsScreen.tsx
  • git diff --check -- skills/cds-code/SKILL.md skills/cds-code/evals
  • Ruby YAML/frontmatter validation for skills/cds-code/SKILL.md
  • Not run: unit tests/typecheck because the skill metadata and eval fixtures have no package test/typecheck target.

Illustrations/Icons Checklist

N/A - this PR does not change files under packages/illustrations/** or packages/icons/**.

Change management

type=routine
risk=low
impact=sev5

automerge=false

@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 1
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1
CODEOWNERS 🟡 See below

🟡 CODEOWNERS

Code Owner Status Calculation
ui-systems-eng-team 🟡 0/1
Denominator calculation
Additional CODEOWNERS Requirement
Show calculation
Sum 0
0
From CODEOWNERS 1
Sum 1

@dugganburke-cb
dugganburke-cb marked this pull request as ready for review July 9, 2026 03:32

@cb-ekuersch cb-ekuersch 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.

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

Comment thread skills/cds-code/SKILL.md Outdated
**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.

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.

@dugganburke-cb can you remove "Relay"? We are open source so this skill can be installed outside of coinbase's tech stack

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.

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

Comment thread skills/cds-code/SKILL.md Outdated
**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.

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.

Suggested change
**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.

Comment thread skills/cds-code/SKILL.md Outdated

**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.

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.

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.

Comment thread skills/cds-code/SKILL.md
Comment on lines -4 to -8
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?"

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.

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?"

Comment thread skills/cds-code/SKILL.md Outdated
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.

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.

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

Comment thread skills/cds-code/SKILL.md Outdated
## 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.

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.

Suggested change
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.

@github-actions github-actions Bot added the root label Jul 22, 2026
dugganburke-cb and others added 5 commits July 22, 2026 18:30
Co-authored-by: Codex <codex-noreply@coinbase.com>
Co-authored-by: Codex <codex-noreply@coinbase.com>
Co-authored-by: Codex <codex-noreply@coinbase.com>
Add logic and navigation near-miss evals so scope narrowing stays regression-tested, and ignore generated evaluation artifacts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Document all ten evals while keeping output-quality and scope-control cohorts separate so their different baselines remain clear.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dugganburke-cb
dugganburke-cb force-pushed the duggan/narrow-cds-code-skill-07/09 branch from 14bf7ff to 7e15cf9 Compare July 23, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants