Skip to content

Commit c6e37f7

Browse files
committed
chore: rename skills and add optimisation of agent
1 parent d09bdf4 commit c6e37f7

7 files changed

Lines changed: 102 additions & 42 deletions

File tree

.github/copilot-instructions.md

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Load the appropriate skill before acting on the related task:
99

1010
| Task | Skill to load |
1111
|------|---------------|
12-
| Ask about or explain OUDS-specific terms (Tokenator, token, raw token, semantic token, component token, theme, …) | `ouds-vocabulary` |
13-
| Write or review Dart / Flutter code that uses OUDS components, themes or tokens | `ouds-framework-usage` |
14-
| Translate a Figma token name or token family into its Dart equivalent | `ouds-figma-to-flutter` |
15-
| Migrate code between OUDS Flutter versions, adopt OUDS from native or custom Flutter components, or remove deprecated APIs | `ouds-migration-guide` |
16-
| Implement or review accessibility (Semantics, screen readers, text scale, high-contrast, orientation) | `ouds-accessibility` |
12+
| Ask about or explain OUDS-specific terms (Tokenator, token, raw token, semantic token, component token, theme, …) | `ouds-flutter-vocabulary` |
13+
| Write or review Dart / Flutter code that uses OUDS components, themes or tokens | `ouds-flutter-framework-usage` |
14+
| Translate a Figma token name or token family into its Dart equivalent | `ouds-flutter-figma-to-dart` |
15+
| Migrate code between OUDS Flutter versions, adopt OUDS from native or custom Flutter components, or remove deprecated APIs | `ouds-flutter-migration-guide` |
16+
| Implement or review accessibility (Semantics, screen readers, text scale, high-contrast, orientation) | `ouds-flutter-accessibility` |
1717

1818
Skills are located in `skills/<name>/SKILL.md` (treat this folder as the source of truth; keep the copies under `.claude/skills/` and `.opencode/skills/` in sync).
1919
## 1. Code formatting
@@ -119,7 +119,7 @@ Demo application "Design System Toolbox" showcasing all components and tokens in
119119
- If a third-party dependency is added or updated, document it in `THIRD_PARTY.md`
120120
- Use `OudsTheme.of(context)` to read all colors, spacing, typography and component tokens
121121
- Use `OudsLocalizations.of(context)` or app localizations for user-facing strings
122-
- When introducing breaking changes or API modifications, update `MIGRATION.md` at the root of the repository and `skills/ouds-migration-guide/SKILL.md` accordingly
122+
- When introducing breaking changes or API modifications, update `MIGRATION.md` at the root of the repository and `skills/ouds-flutter-migration-guide/SKILL.md` accordingly
123123

124124
### 4.2 DON'T
125125

@@ -137,7 +137,7 @@ Demo application "Design System Toolbox" showcasing all components and tokens in
137137

138138
Everything is available on [Orange accessibility guidelines](https://a11y-guidelines.orange.com/fr/mobile/).
139139

140-
> Load the **`ouds-accessibility`** skill for the full reference with code examples, Semantics patterns, high-contrast, TalkBack/VoiceOver and the complete testing checklist.
140+
> Load the **`ouds-flutter-accessibility`** skill for the full reference with code examples, Semantics patterns, high-contrast, TalkBack/VoiceOver and the complete testing checklist.
141141
142142
### 5.1 Components
143143

@@ -233,4 +233,38 @@ cd ouds_core && dart doc
233233
- [ ] Demo screen registered in `app/lib/ui/components/components.dart`
234234
- [ ] Commit message follows [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `doc:`, `chore:`, `test:`)
235235
- [ ] `MIGRATION.md` updated if any public API has changed or been deprecated
236-
- [ ] `skills/ouds-migration-guide/SKILL.md` updated to reflect any new migration steps
236+
- [ ] `skills/ouds-flutter-migration-guide/SKILL.md` updated to reflect any new migration steps
237+
238+
## 9. Agent response optimization 🚀
239+
240+
When using GitHub Copilot for code reviews, refactoring, or documentation updates, minimize token consumption:
241+
242+
### Key principles
243+
244+
- **Batch operations**: Combine multiple file edits into single calls; parallelize `grep_search` and `file_search`
245+
- **Skip verbose narrative**: Avoid acknowledgments and filler ("Sounds good!", "Let me now..."); use single-line summaries
246+
- **Compress output**: Use tables/checklists instead of prose; reference line numbers instead of repeating content
247+
- **Front-load context**: Gather all research upfront before proposing changes; use `run_subagent` for large searches
248+
- **Minimize reads**: Read files once with adequate ranges; use search filters to avoid irrelevant files
249+
250+
### Response template (optimized)
251+
252+
```
253+
**[Action summary — 1 line]**
254+
255+
### Changes
256+
[Table or checklist of modifications]
257+
258+
### Verification
259+
[Brief grep/status check results]
260+
```
261+
262+
**Target**: 150–300 tokens per response (50–60% reduction vs. standard approach).
263+
264+
### When to delegate to subagent
265+
266+
Use `run_subagent` when:
267+
- Search scope involves 50+ files
268+
- Result set would exceed 500 tokens
269+
- Task requires multiple sequential searches
270+

AGENTS.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Target platforms: Android API 21+, iOS 13+. Language: Dart 3.9+ / Flutter 3.35+.
1818

1919
Load skills on demand for detailed guidance:
2020

21-
- **`ouds-vocabulary`** — glossary of OUDS-specific terms (Tokenator, token types, theme, …)
22-
- **`ouds-framework-usage`** — full usage reference: imports, themes, tokens, localizations, all components with code examples
23-
- **`ouds-figma-to-flutter`** — how to derive a Dart token name from a Figma token path (raw, semantic and component tokens)
24-
- **`ouds-migration-guide`** — adopt OUDS from native Flutter or custom components, migrate between OUDS versions, before/after mappings
25-
- **`ouds-accessibility`** — Semantics patterns, text scale, high-contrast, TalkBack / VoiceOver, orientation and full testing checklist
21+
- **`ouds-flutter-vocabulary`** — glossary of OUDS Flutter-specific terms (Tokenator, token types, theme, …)
22+
- **`ouds-flutter-framework-usage`** — full OUDS Flutter usage reference: imports, themes, tokens, localizations, all components with code examples
23+
- **`ouds-flutter-figma-to-dart`** — how to derive Dart naming and token layer from Figma token families for the OUDS Flutter project (raw, semantic and component tokens)
24+
- **`ouds-flutter-migration-guide`** — adopt OUDS Flutter from native Flutter or custom components, migrate between OUDS Flutter versions, before/after mappings
25+
- **`ouds-flutter-accessibility`** OUDS Flutter Semantics patterns, text scale, high-contrast, TalkBack / VoiceOver, orientation and full testing checklist
2626

2727
## Key files
2828

@@ -37,15 +37,15 @@ Load skills on demand for detailed guidance:
3737

3838
## Critical rules
3939

40-
- Always load the **`ouds-vocabulary`** skill before discussing tokens or themes.
41-
- Always load the **`ouds-framework-usage`** skill before writing or reviewing code that uses OUDS components or tokens.
42-
- Always load the **`ouds-figma-to-flutter`** skill when asked to find or map a Figma token name to its Dart equivalent.
43-
- Always load the **`ouds-migration-guide`** skill when asked to migrate code, adopt OUDS in an existing app, replace native/custom Flutter components with OUDS equivalents, or remove deprecated APIs.
44-
- Always load the **`ouds-accessibility`** skill when asked about Semantics, screen readers, TalkBack, VoiceOver, text scale, high-contrast or orientation.
40+
- Always load the **`ouds-flutter-vocabulary`** skill before discussing tokens or themes.
41+
- Always load the **`ouds-flutter-framework-usage`** skill before writing or reviewing code that uses OUDS components or tokens.
42+
- Always load the **`ouds-flutter-figma-to-dart`** skill when asked to find or map a Figma token name to its Dart equivalent.
43+
- Always load the **`ouds-flutter-migration-guide`** skill when asked to migrate code, adopt OUDS in an existing app, replace native/custom Flutter components with OUDS equivalents, or remove deprecated APIs.
44+
- Always load the **`ouds-flutter-accessibility`** skill when asked about Semantics, screen readers, TalkBack, VoiceOver, text scale, high-contrast or orientation.
4545
- Before committing: `dart format .``flutter analyze --no-pub` → fix all errors → `flutter test` in every modified package (see `.github/copilot-instructions.md §7`).
4646
- **Never** create or edit token files in `ouds_global_raw_tokens`, `ouds_theme_contract`, `ouds_theme_orange`, `ouds_theme_orange_compact`, `ouds_theme_sosh`, or `ouds_theme_wireframe` — all content is generated by Tokenator.
4747
- **Never** create a root barrel file for `ouds_core` — import components directly (e.g. `package:ouds_core/components/button/ouds_button.dart`).
48-
- When introducing a breaking change or deprecation: update **both** `MIGRATION.md` **and** `skills/ouds-migration-guide/SKILL.md`.
48+
- When introducing a breaking change or deprecation: update **both** `MIGRATION.md` **and** `skills/ouds-flutter-migration-guide/SKILL.md`.
4949
- Use `OudsTheme.of(context)` for all colors, spacing, typography and component tokens — never hardcode values.
5050
- Use `OudsLocalizations.of(context)` for all user-facing and accessibility strings — never hardcode them.
5151
- Prefix all OUDS widgets with `Ouds` (e.g. `OudsButton`, `OudsTag`).

skills/ouds-accessibility/SKILL.md renamed to skills/ouds-flutter-accessibility/SKILL.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
---
2-
name: ouds-accessibility
3-
description: Accessibility (a11y) rules and patterns for OUDS Flutter components — Semantics, MergeSemantics, ExcludeSemantics, text scale, high-contrast, screen readers (TalkBack / VoiceOver), orientation, bug diagnosis and enhancement patterns
2+
name: ouds-flutter-accessibility
3+
description: Reference guide for OUDS Flutter accessibility rules and patterns — Semantics, MergeSemantics, ExcludeSemantics, text scale, high-contrast, screen readers (TalkBack / VoiceOver), orientation, bug diagnosis and enhancement
44
license: MIT
55
---
66

7-
# OUDS Accessibility Guide
7+
# OUDS Flutter Accessibility Guide
8+
9+
> **Agent optimization**: See [copilot-instructions.md §9](../../.github/copilot-instructions.md#9-agent-response-optimization-) for token-efficient response guidelines.
10+
11+
This skill applies to accessibility work in the OUDS Flutter repository. Use it for Flutter widgets and semantics patterns, not for OUDS web, Android native, or iOS native platforms.
812

913
Use this skill when a user asks about:
1014

@@ -700,3 +704,4 @@ Semantics(
700704
```
701705

702706
---
707+

skills/ouds-figma-to-flutter/SKILL.md renamed to skills/ouds-flutter-figma-to-dart/SKILL.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
---
2-
name: ouds-figma-to-flutter
3-
description: How to derive the Flutter token layer and likely Dart naming from a Figma token family in the OUDS Flutter project (raw, semantic and component tokens)
2+
name: ouds-flutter-figma-to-dart
3+
description: Reference guide for deriving Dart naming and token layer from Figma token families in the OUDS Flutter project (raw, semantic and component tokens)
44
license: MIT
55
---
66

7-
# Skill: ouds-figma-to-flutter
7+
# OUDS Flutter Figma-to-Dart Mapping
8+
9+
> **Agent optimization**: See [copilot-instructions.md §9](../../.github/copilot-instructions.md#9-agent-response-optimization-) for token-efficient response guidelines.
10+
11+
This skill applies to token mapping in the OUDS Flutter repository. Use it when translating Figma tokens to Flutter/Dart naming, not for OUDS web, Android native, or iOS native platforms.
812

913
## 1. Quick-reference cheat sheet
1014

skills/ouds-framework-usage/SKILL.md renamed to skills/ouds-flutter-framework-usage/SKILL.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
---
2-
name: ouds-framework-usage
2+
name: ouds-flutter-framework-usage
33
description: How to set up and use the OUDS Flutter framework with imports, themes, tokens, localizations, theme tweaks, and available components with code examples
44
license: MIT
55
---
66

7-
# OUDS Framework Usage
7+
# OUDS Flutter Framework Usage
8+
9+
> **Agent optimization**: See [copilot-instructions.md §9](../../.github/copilot-instructions.md#9-agent-response-optimization-) for token-efficient response guidelines.
10+
11+
This skill applies to the OUDS Flutter repository. Use it for Flutter components, themes, tokens and localizations, not for OUDS web, Android native, or iOS native platforms.
812

913
## 1. Basic setup
1014

@@ -305,7 +309,7 @@ final l10n = OudsLocalizations.of(context);
305309

306310
### Accessibility
307311

308-
> Load the **`ouds-accessibility`** skill for the full a11y reference (Semantics patterns, text scale, high-contrast, TalkBack/VoiceOver, testing checklist).
312+
> Load the **`ouds-flutter-accessibility`** skill for the full a11y reference (Semantics patterns, text scale, high-contrast, TalkBack/VoiceOver, testing checklist).
309313
310314
Key reminders:
311315
- Wrap every interactive root in `Semantics` with appropriate flags (`button`, `checked`, `toggled`, `label`, `hint`, `value`)
@@ -694,4 +698,5 @@ cd ouds_core && flutter gen-l10n
694698

695699
- [ ] Component tested with all 4 themes: **Orange**, **Orange Compact**, **Sosh**, **Wireframe**
696700
- [ ] Component tested in **light** and **dark** mode
697-
- [ ] Full accessibility checklist completed → load **`ouds-accessibility`** skill for details
701+
- [ ] Full accessibility checklist completed → load **`ouds-flutter-accessibility`** skill for details
702+

skills/ouds-migration-guide/SKILL.md renamed to skills/ouds-flutter-migration-guide/SKILL.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
---
2-
name: ouds-migration-guide
2+
name: ouds-flutter-migration-guide
33
description: How to migrate to OUDS Flutter — from native Flutter components, custom/branded components, or across OUDS library versions — with before/after mappings and required actions
44
license: MIT
55
---
66

7-
# OUDS Migration Guide
7+
# OUDS Flutter Migration Guide
8+
9+
> **Agent optimization**: See [copilot-instructions.md §9](../../.github/copilot-instructions.md#9-agent-response-optimization-) for token-efficient response guidelines.
10+
11+
This skill applies to migration work in the OUDS Flutter repository. Use it for Flutter adoption and version migrations, not for OUDS web, Android native, or iOS native platforms.
812

913
Use this skill when a user asks how to:
1014

1115
- **adopt** OUDS Flutter in a new or existing app (from native Flutter widgets or custom components)
1216
- **migrate** existing OUDS Flutter code across library versions
1317
- **understand** breaking changes between released OUDS versions
1418

15-
> ⚙️ Always load **`ouds-framework-usage`** alongside this skill to get accurate component APIs, token accessors and state patterns.
19+
> ⚙️ Always load **`ouds-flutter-framework-usage`** alongside this skill to get accurate component APIs, token accessors and state patterns.
1620
1721
---
1822

@@ -349,7 +353,7 @@ OudsInlineAlert(label: 'Profile updated.', status: Positive())
349353

350354
### 1.6 Accessibility — migration-specific points
351355

352-
> For the full a11y reference, load the **`ouds-accessibility`** skill.
356+
> For the full a11y reference, load the **`ouds-flutter-accessibility`** skill.
353357
354358
Migration-specific actions to perform after replacing native widgets with OUDS equivalents:
355359

@@ -654,7 +658,7 @@ OudsThemeTweak(
654658
- [ ] No magic number padding/margin — all values from `spaceScheme(context)` or `sizeScheme(context)`
655659
- [ ] All user-facing strings use `OudsLocalizations.of(context)` or app localizations
656660
- [ ] `dart format .``flutter analyze --no-pub` → zero errors
657-
- [ ] Full accessibility checklist completed → load **`ouds-accessibility`** skill for details
661+
- [ ] Full accessibility checklist completed → load **`ouds-flutter-accessibility`** skill for details
658662

659663
---
660664

@@ -930,3 +934,4 @@ If a migration is unclear or incomplete:
930934
- GitHub issues
931935
- GitHub discussions
932936
- `.github/MAINTAINERS.md`
937+
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
---
2-
name: ouds-vocabulary
3-
description: Use when the user asks about OUDS-specific terms such as Tokenator, token, raw token, semantic token, component token, theme, theme tweak, theme config, token provider, or component
2+
name: ouds-flutter-vocabulary
3+
description: Reference guide for OUDS Flutter vocabulary and core concepts (Tokenator, token types, theme, theme tweak, theme config, token provider, component)
44
license: MIT
55
---
66

7-
# OUDS Vocabulary
7+
# OUDS Flutter Vocabulary
8+
9+
> **Agent optimization**: See [copilot-instructions.md §9](../../.github/copilot-instructions.md#9-agent-response-optimization-) for token-efficient response guidelines.
10+
11+
This skill applies to the OUDS Flutter repository and terminology. Use it for Flutter-specific OUDS vocabulary, not for OUDS web, Android native, or iOS native platforms.
12+
13+
## Terminology
814

915
| Term | Definition |
1016
|------|------------|
@@ -26,8 +32,9 @@ license: MIT
2632

2733
| Task | Skill to load |
2834
|------|---------------|
29-
| Ask about or explain OUDS-specific terms (Tokenator, token, raw token, semantic token, component token, theme, …) | `ouds-vocabulary` (this skill) |
30-
| Write or review Dart / Flutter code using OUDS components, themes or tokens | `ouds-framework-usage` |
31-
| Translate a Figma token or token family into the corresponding Flutter package / token layer / naming pattern | `ouds-figma-to-flutter` |
32-
| Adopt OUDS from native Flutter or custom components, migrate between versions, remove deprecated APIs | `ouds-migration-guide` |
33-
| Implement or review accessibility — Semantics, screen readers, text scale, high-contrast, orientation | `ouds-accessibility` |
35+
| Ask about or explain OUDS-specific terms (Tokenator, token, raw token, semantic token, component token, theme, …) | `ouds-flutter-vocabulary` (this skill) |
36+
| Write or review Dart / Flutter code using OUDS components, themes or tokens | `ouds-flutter-framework-usage` |
37+
| Translate a Figma token or token family into the corresponding Flutter package / token layer / naming pattern | `ouds-flutter-figma-to-dart` |
38+
| Adopt OUDS from native Flutter or custom components, migrate between versions, remove deprecated APIs | `ouds-flutter-migration-guide` |
39+
| Implement or review accessibility — Semantics, screen readers, text scale, high-contrast, orientation | `ouds-flutter-accessibility` |
40+

0 commit comments

Comments
 (0)