This document provides context and guidelines for AI agents assisting with the OUDS Android (Orange Unified Design System for Android) project.
OUDS Android is an Android design system library that provides Orange-branded UI components and tokens for building consistent, accessible Android applications across all Orange brands and affiliates. This library is the Android implementation of the Orange Unified Design System.
- Language: Kotlin
- UI Framework: Jetpack Compose
- Minimum SDK: API 23 (Android 6.0)
- Build System: Gradle (Kotlin DSL)
- License: MIT
- Repository: https://github.com/Orange-OpenSource/ouds-android
- Documentation: https://android.unified-design-system.orange.com/
- Distribution: Maven Central
AI agents MUST systematically load the appropriate skill(s) BEFORE starting ANY task related to OUDS Android. This is NOT optional. Skills contain essential project-specific context, conventions, patterns, and up-to-date information that are critical for maintaining code quality and consistency.
Load this skill FIRST when:
- Writing any Kotlin/Compose code using OUDS components
- Creating new components (
OudsButton,OudsTextInput, etc.) - Modifying existing component APIs or implementations
- Setting up OUDS library dependencies
- Configuring themes (
OudsTheme,OrangeTheme, etc.) - Accessing design tokens (
OudsTheme.colorScheme,OudsTheme.spaces, etc.) - Debugging or fixing OUDS-related issues
- Creating examples, samples, or demo screens
- Writing tests for OUDS components
- Migrating from Material 3 to OUDS
- ANY code modification or creation task in this repository
Load this skill FIRST when:
- User asks to explain, define, or clarify OUDS terminology
- Questions about tokens (raw, semantic, component)
- Questions about Tokenator, OudsThemeContract, OudsTheme
- "What is X?", "How does X work?", "Why do we use X?"
- Understanding relationships between architecture elements
- User seems confused about OUDS concepts
- User uses incorrect terminology that needs clarification
- ANY conceptual or architectural question
ZERO exceptions. Even if you think you know the answer or pattern:
- Always load the appropriate skill(s) first
- Read the skill content thoroughly
- Follow the patterns and conventions specified in the skill
- Only then proceed with implementation Skills are kept up-to-date with the latest project conventions, and bypassing them may result in:
- ❌ Outdated patterns or deprecated APIs being used
- ❌ Inconsistent code style
- ❌ Missing critical context or requirements
- ❌ Breaking changes that could have been avoided
User Request → Load Appropriate Skill(s) → Review Skill Content → Execute Task
Example (CORRECT): User: "Add an hiddenCharacters parameter to OudsPinCodeInput" Agent:
- ✅ Load using-ouds-android skill
- ✅ Review component API patterns from skill
- ✅ Check for similar existing parameters
- ✅ Follow documented conventions for parameter naming and defaults
- ✅ Implement according to skill guidelines
Counter-example (FORBIDDEN): User: "Add an hiddenCharacters parameter to OudsPinCodeInput" Agent: ❌ Directly starts coding without loading skill ❌ Risks missing project-specific conventions ❌ May use inconsistent naming or wrong defaults
Multiple skills example: User: "What's the difference between semantic and component tokens, and how do I use them in OudsButton?" Agent:
- ✅ Load understanding-ouds-android-vocabulary skill (for terminology)
- ✅ Load using-ouds-android skill (for code usage)
- ✅ Review both skills to provide complete answer
- ✅ Respond with accurate terminology AND practical code examples
The project is organized into the following modules:
:core- Core library containing reusable UI components (e.g.,OudsTag, buttons, etc.):foundation- Foundation layer containing code used in all modules (extension methods, annotations, etc.):global-raw-tokens- Raw design tokens (colors, typography, spacing, etc.):theme-contract- Theme abstraction layer and token interfaces (e.g.,OudsThemeContract,OudsAlertTokens)
:theme-orange- Orange brand theme implementation:theme-orange-compact- Compact variant of Orange theme:theme-sosh- Sosh brand theme implementation:theme-wireframe- Wireframe theme for development/prototyping
:app- Demo application "Design Toolbox" showcasing components and design tokens:core-test- Shared testing utilities:dokka-plugin- Custom Dokka plugin for documentation generation
:buildSrc- Build configuration and shared Gradle logic- Root project - Overall project configuration
OUDS Android uses a multi-brand theming system:
OudsTheme(
theme = OrangeTheme(
orangeFontFamily = OrangeFontFamily(
latin = OrangeHelveticaNeueLatin.Bundled(...)
)
)
) {
// UI components here
}- Themes are interchangeable (Orange, Sosh, Wireframe, etc.)
- Each theme implements the
theme-contractinterfaces - Tokens drive all visual properties (colors, typography, spacing, etc.)
- Raw Tokens (
global-raw-tokens) - Base design values - Semantic Tokens (
theme-contract) - Semantic token definitions (e.g.,OudsColorActionSemanticTokens) - Component Tokens (
theme-contract) - Component-specific token definitions (e.g.,OudsAlertTokens) - Theme Implementations - Concrete semantic and component token values for each brand, as well as brand-specific raw tokens
The files containing the tokens are generated by an external tool called Tokenator. This tool takes Figma tokens as an input and convert them to Kotlin code.
Components follow a consistent pattern:
- Composable functions in
:core - Token-driven styling via theme
- Preview functions for development
- Accessibility support built-in
- KDoc-based documentation for public methods that includes simple code samples
- Compose Best Practices: Use modern Jetpack Compose patterns
- Coding Conventions: Follow Style guidelines for Jetpack Compose APIs which basically includes:
- Naming:
- Prefix components with
Ouds(e.g.,OudsTag,OudsButton) - Token classes end with
Tokens(e.g.,OudsAlertTokens)
- Prefix components with
- Component files in
:core/src/main/java/com/orange/ouds/core/component/ - Token definitions in
:theme-contract/src/main/java/com/orange/ouds/theme/tokens/ - Demo app code in
:app/src/main/java/com/orange/ouds/app
When adding new components:
- Verify that component tokens generated by Tokenator are defined in
:theme-contractand implemented in theme modules (:theme-orange, etc.) - Create one or more composables in
:coremodule, trying to match the equivalent Material 3 APIs as much as possible - Ensure accessibility semantics are properly implemented
- Add a sample code for each component composable
- Include
@Previewannotations for IDE preview - Add snapshot tests in
:core-testmodule and generate snapshots for each theme - Add instrumented Compose UI tests for user interactions such as clicks
- Add demo screen in
:appmodule - Update
Component.ktin:buildSrcas well as the component KDoc so that it references the design guidelines link and version
Demo screens use state classes (e.g., AlertMessageDemoState, InlineAlertDemoState) to:
- Manage component configuration
- Provide interactive controls in demo app
- Showcase different component variants Customization parameters in demo screens match the parameters of the component APIs
- Drawable resources defined via
OudsDrawableResourcesinterface - Each theme provides concrete drawable implementations
- Use token system for colors, dimensions, and other values
- Snapshot tests for visual regression
- Compose UI tests for component behavior
- Accessibility testing should be considered
- Public APIs must have KDoc comments
- Documentation generated with Dokka
- Published to https://android.unified-design-system.orange.com/
- README examples should be clear and concise
- Create new module (e.g.,
:theme-newbrand) - Implement
OudsThemeinterface from:theme-contract - Use concrete token values generated by Tokenator
- Add to
:appfor testing - Update documentation
- Check token definitions in
:theme-contract - Update component implementation in
:core - Update reference snapshots in all theme modules
- Update demo screens if needed
- Build:
./gradlew build - Run demo app:
./gradlew :app:installProdDebug - Snapshot tests:
./gradlew verifyPaparazziDebug - Instrumented tests:
./gradlew :core:connectedCheck - Distribution: Maven Central via
com.orange.ouds.androidgroup
Always consider that changes affect multiple brands. Test components with:
- Orange theme
- Orange Compact theme
- Sosh theme
- Wireframe theme
- Light and dark modes
- Provide content descriptions
- Ensure proper semantic roles
- Support TalkBack and other accessibility services
- Maintain sufficient color contrast
- Minimum SDK 23 (Android 6.0)
- Be mindful of deprecated APIs
- Maintain stable public API surface
- Compose best practices (remember, derivedStateOf, etc.)
- Avoid unnecessary recompositions
- Optimize preview rendering
- Any hardcoded string must be avoided; use stringResource.
See CONTRIBUTING.md for detailed contribution guidelines.
Agent skills are located in the skills/ directory at the repository root. The .agents/, .claude/, and .opencode/ directories contain skills symlinks pointing to the root skills/ directory, ensuring compatibility across all major AI agent tools.
| Skill | When to load |
|---|---|
understanding-ouds-android-vocabulary |
User asks to explain, define, or understand OUDS-specific terminology and concepts (tokens, Tokenator, OudsThemeContract, tinted, OudsError, etc.) or relationships between OUDS architecture elements |
using-ouds-android |
User needs to write code, create components, set up OUDS, configure themes, access tokens, or use any Ouds* component in Kotlin/Compose |
The skills must be kept synchronized with code changes to ensure AI agents have accurate, up-to-date information.
When to update skills:
- Before each release
How to update:
- Navigate to
skills/maintenance/update-skills-prompt.md - Copy the prompt and execute it with your AI agent
- Review the generated report and proposed changes
- Commit the updated skills
The update prompt automatically detects changes in components, tokens, themes, integration setup, patterns, and deprecations by analyzing the codebase source code, KDoc documentation, and demo app.
- Documentation: https://android.unified-design-system.orange.com/
- Repository: https://github.com/Orange-OpenSource/ouds-android
- Demo App: http://oran.ge/designtoolbox
- Issues: https://github.com/Orange-OpenSource/ouds-android/issues
- Orange Unified Design System: https://unified-design-system.orange.com/
- This SDK does not handle personal data
- No device permissions required
- Complies with Orange data privacy standards
For AI Agents: This document is specifically designed to provide context for AI assistants. When making changes, consider the multi-module, multi-brand nature of this design system.