sc-dx — make the frontend easy to understand, change, debug, and verify
Language
Keep durable instructions in English. Reply in the user's language unless requested otherwise.
DX objective
Minimize four times without sacrificing correctness:
time-to-understand → time-to-change → time-to-debug → time-to-verify.
Inspect first
Before refactoring, identify:
- framework/runtime/package manager,
- source/layout boundaries,
- component and design-system locations,
- state/data ownership,
- CSS/token strategy,
- build/test/lint/typecheck commands,
- local environment requirements,
- generated files and canonical sources,
- ownership or scope constraints.
Do not reorganize a functioning project merely to match a favorite template.
Frontend DX rules
- Canonical source is explicit. Generated copies/artifacts must say how they are regenerated.
- Reuse tokens/components before creating near-duplicates.
- Prefer semantic component APIs over prop soups and boolean combinations that can represent impossible states.
- Keep naming boring and searchable. File/component/action names should reveal purpose.
- Keep layout/style primitives composable; avoid scattered magic numbers and repeated one-off values when a token/variable already exists.
- Separate product state, view state, and transient interaction state when that distinction improves debugging.
- Errors are actionable: state what failed, where, why when known, and the next recovery action.
- Commands are predictable, scriptable, and non-destructive by default.
- Build/test feedback should identify the smallest useful failure boundary.
- Do not hide important side effects behind innocent-looking helpers.
- Document unusual constraints close to the code or canonical project knowledge, not in tribal memory.
- Preserve existing conventions unless changing them measurably improves the repository.
Component contract
For reusable UI components, prefer:
- clear required vs optional inputs,
- controlled/uncontrolled behavior only when needed and documented,
- semantic variants rather than arbitrary style knobs,
- typed/validated events and state transitions,
- accessible defaults,
- testable deterministic behavior,
- escape hatches that are explicit rather than accidental.
Design-system DX
A design system should reduce decisions, not create another layer to fight. Keep token roles small and semantic. Prefer existing CSS custom properties/theme tokens. Avoid hard-coded colors, radius, spacing, z-index, and animation values repeated across features when a shared role exists.
Change workflow
For substantial frontend work:
inspect → smallest coherent plan → edit → format/lint/typecheck → targeted tests → build → rendered/interaction verification.
Do not mark work complete because compilation passed; DX verification and user-facing verification are separate.
Output
When reporting DX issues, use friction → evidence → proposed contract → migration risk → verification. Prioritize fixes that remove repeated future cost.
1---2name: sc-dx3description: SI-Coder developer experience skill for frontend codebases: fast orientation, predictable project structure, coherent component APIs, design-token reuse, actionable build/test errors, safe local changes, debugging ergonomics, documentation, and low-friction verification.4---56# sc-dx — make the frontend easy to understand, change, debug, and verify78## Language9Keep durable instructions in English. Reply in the user's language unless requested otherwise.1011## DX objective12Minimize four times without sacrificing correctness:13`time-to-understand → time-to-change → time-to-debug → time-to-verify`.1415## Inspect first16Before refactoring, identify:17- framework/runtime/package manager,18- source/layout boundaries,19- component and design-system locations,20- state/data ownership,21- CSS/token strategy,22- build/test/lint/typecheck commands,23- local environment requirements,24- generated files and canonical sources,25- ownership or scope constraints.2627Do not reorganize a functioning project merely to match a favorite template.2829## Frontend DX rules301. Canonical source is explicit. Generated copies/artifacts must say how they are regenerated.312. Reuse tokens/components before creating near-duplicates.323. Prefer semantic component APIs over prop soups and boolean combinations that can represent impossible states.334. Keep naming boring and searchable. File/component/action names should reveal purpose.345. Keep layout/style primitives composable; avoid scattered magic numbers and repeated one-off values when a token/variable already exists.356. Separate product state, view state, and transient interaction state when that distinction improves debugging.367. Errors are actionable: state what failed, where, why when known, and the next recovery action.378. Commands are predictable, scriptable, and non-destructive by default.389. Build/test feedback should identify the smallest useful failure boundary.3910. Do not hide important side effects behind innocent-looking helpers.4011. Document unusual constraints close to the code or canonical project knowledge, not in tribal memory.4112. Preserve existing conventions unless changing them measurably improves the repository.4243## Component contract44For reusable UI components, prefer:45- clear required vs optional inputs,46- controlled/uncontrolled behavior only when needed and documented,47- semantic variants rather than arbitrary style knobs,48- typed/validated events and state transitions,49- accessible defaults,50- testable deterministic behavior,51- escape hatches that are explicit rather than accidental.5253## Design-system DX54A design system should reduce decisions, not create another layer to fight. Keep token roles small and semantic. Prefer existing CSS custom properties/theme tokens. Avoid hard-coded colors, radius, spacing, z-index, and animation values repeated across features when a shared role exists.5556## Change workflow57For substantial frontend work:58`inspect → smallest coherent plan → edit → format/lint/typecheck → targeted tests → build → rendered/interaction verification`.5960Do not mark work complete because compilation passed; DX verification and user-facing verification are separate.6162## Output63When reporting DX issues, use `friction → evidence → proposed contract → migration risk → verification`. Prioritize fixes that remove repeated future cost.