Skip to content

Commit f2175ce

Browse files
committed
switch to skill for token efficiency
1 parent 4320dd9 commit f2175ce

25 files changed

Lines changed: 1002 additions & 1136 deletions

File tree

.github/copilot-instructions.md

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
applyTo: "**"
33
---
44

5-
# OUDS Web — Project Context
5+
# OUDS Web
66

7-
**OUDS Web** (Orange Unified Design System — Web) is a multi-brand design system built as a fork of Bootstrap 5.3.6. It serves 3 brands (Orange, Sosh, Orange Compact) from a single codebase where only CSS tokens differ per brand JavaScript is fully shared.
7+
**OUDS Web** (Orange Unified Design System — Web) is a multi-brand design system built as a fork of Bootstrap 5.3.6. It serves 3 brands (Orange, Sosh, Orange Compact) from a single codebase only CSS tokens differ per brand, JavaScript is fully shared.
88

99
## Quick Reference
1010

@@ -18,41 +18,18 @@ applyTo: "**"
1818
| Tests | `npm run test` |
1919
| Dev servers | `:9001` (orange) · `:9002` (sosh) · `:9003` (orange-compact) |
2020

21-
## Critical Constraints
22-
23-
These rules are non-negotiable and apply to every contribution:
24-
25-
1. **Use tokens, not hardcoded values** — colors, spacing, dimensions all come from the OUDS token system.
26-
2. **Use mixins for `border-radius` and `transition`** — direct CSS properties are forbidden by Stylelint.
27-
3. **Auto-generated token files are read-only** — never edit `_raw.scss`, `_semantic.scss`, `_component.scss`, or `_*-custom-props.scss`. Only `_composite.scss` is hand-editable.
28-
4. **Never commit `dist/`** — build artifacts are generated in CI.
29-
5. **JavaScript lives in `js/src/` only** — never in `packages/<brand>/`.
30-
6. **Colors use CSS custom properties**`var(--#{$prefix}color-*)` enables runtime dark mode switching.
31-
7. **Accessibility is mandatory** — visible `:focus-visible`, ARIA attributes on all interactive elements, `.visually-hidden` for SR content.
32-
33-
## Scoped Instructions
34-
35-
Detailed conventions are loaded automatically based on the files you're working on. They live in `.github/instructions/`:
36-
37-
- `scss.instructions.md` — SCSS conventions and patterns
38-
- `javascript.instructions.md` — JS conventions
39-
- `html-accessibility.instructions.md` — HTML structure and WCAG compliance
40-
- `tokens.instructions.md` — Token system rules
41-
- `components.instructions.md` — Component SCSS/JS patterns
42-
- `multi-brand.instructions.md` — Cross-brand synchronization
43-
44-
## Workflows
45-
46-
For complex multi-step tasks, follow the dedicated workflow guides:
47-
48-
- `workflows/create-component.instructions.md` — Creating a new component
49-
- `workflows/diagnose-errors.instructions.md` — Debugging build/lint/CI errors
50-
- `workflows/validate-tokens.instructions.md` — Auditing token usage
51-
52-
## Deep References
53-
54-
For in-depth architecture knowledge, read the reference docs in `.github/instructions/references/`:
55-
56-
- `token-architecture.md` — Full token pipeline and layer hierarchy
57-
- `glossary.md` — 154 project-specific terms
58-
- `project-map.md` — File structure, npm scripts, CI/CD jobs
21+
## Skills
22+
23+
This project provides specialized skills in `.github/skills/`. Invoke them when relevant — they contain detailed conventions, workflows, and reference material:
24+
25+
- **scss-conventions** — SCSS rules (variables, mixins, tokens, forbidden patterns)
26+
- **javascript-conventions** — JS rules (no-semi, BaseComponent, imports)
27+
- **accessibility** — WCAG 2.2 AAA/AA, ARIA, focus, contrast, touch targets
28+
- **token-system** — 3-tier token hierarchy, dark mode, auto-gen protections
29+
- **component-patterns** — CSS custom props, state overrides, markers
30+
- **multi-brand** — 3-brand architecture, cross-brand sync
31+
- **create-component** — Step-by-step workflow for new components
32+
- **diagnose-errors** — Error diagnostic decision tree
33+
- **validate-tokens** — Read-only token audit
34+
- **code-review** — Compliance checker (safety net before commit/PR)
35+
- **project-knowledge** — Glossary, npm scripts, CI/CD, file map

.github/instructions/components.instructions.md

Lines changed: 0 additions & 155 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
applyTo: "**"
3+
---
4+
5+
# Critical Rules (Non-Negotiable)
6+
7+
These 7 rules apply to every file in OUDS Web. They are the minimum safety net — always enforced regardless of which skills are loaded.
8+
9+
1. **Tokens over hardcoding** — Never use hardcoded colors (`#ff7900`), spacing (`16px`), or dimensions. Use `$ouds-*` tokens or `var(--#{$prefix}color-*)`.
10+
11+
2. **Mixins for border-radius and transition** — Direct properties are Stylelint violations. Use `@include border-radius()` and `@include transition()`.
12+
13+
3. **Auto-generated token files are read-only** — Never edit `_raw.scss`, `_semantic.scss`, `_component.scss`, or `_*-custom-props.scss`. Only `_composite.scss` is hand-editable.
14+
15+
4. **Never commit dist/** — Build artifacts are generated in CI.
16+
17+
5. **JS in js/src/ only** — Never put JavaScript in `packages/<brand>/`. JS is shared across all brands.
18+
19+
6. **Colors via CSS custom properties** — Use `var(--#{$prefix}color-*)` for all colors. This enables dark mode switching at runtime.
20+
21+
7. **Accessibility is mandatory** — Every interactive element needs: `@include focus-visible()`, correct ARIA attributes, `.visually-hidden` (never `display: none`) for SR content, 44×44px touch targets.

0 commit comments

Comments
 (0)