Skip to content

Add an AGENTS.md for Android library#343

Open
adi-gnm wants to merge 4 commits intomainfrom
ab/add-agentsmd
Open

Add an AGENTS.md for Android library#343
adi-gnm wants to merge 4 commits intomainfrom
ab/add-agentsmd

Conversation

@adi-gnm
Copy link
Member

@adi-gnm adi-gnm commented Mar 13, 2026

Description

Add an AGENTS.md file to provide guidance to LLM agents for working on the Android library.

Testing notes/instructions:

Use copilot agent mode in Android studio and confirm it picks up the Agent file as an input.

Checklist

  • Changes have been checked by the developer
  • Changes have been checked by the reviewers
  • Unit tested

@adi-gnm adi-gnm added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Mar 13, 2026
@adi-gnm adi-gnm marked this pull request as ready for review March 13, 2026 20:15
@adi-gnm adi-gnm requested a review from a team as a code owner March 13, 2026 20:15
Copilot AI review requested due to automatic review settings March 13, 2026 20:15
@adi-gnm adi-gnm added the Android Android specific PRs label Mar 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an android/AGENTS.md guide intended to help LLM agents work effectively within the Android Source design-system library, documenting structure, patterns, and common workflows.

Changes:

  • Introduces android/AGENTS.md describing architecture, module layout, key component patterns, and day/night + theming conventions.
  • Documents common Gradle build/test/release commands (Paparazzi, Kotlinter, Detekt, Metalava, publishing).
  • Provides a step-by-step checklist for adding new components (code, previews/tests, README updates, sample wiring, release/approval steps).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

components/ ← Composable UI components (buttons, chips, banner, pager, rating, promosticker)
foundation/ ← Design tokens (palette, typography, icons)
daynight/ ← AppColour + AppColourMode (light/dark abstraction)
utils/ ← PreviewAnnotations, Size (isTabletDevice), FontFamilyResource
## Key Patterns

### Day/Night Colours
All colours are `AppColour(light: Color, dark: Color)`. Never use raw `Color` directly in components — always wrap in `AppColour` so `.current` resolves correctly via `LocalIsDarkModeActive`. Wrap the composition root in `AppColourMode { ... }`.

## Testing Approach

All tests in `:source` are **Paparazzi screenshot tests** (no instrumentation/emulator needed). Test files mirror component files and directly call internal `@VisibleForTesting` `*Preview()` composables:

# Publish to local build directory (for bundling into news app)
./gradlew :source:publishReleasePublicationToCustomRepository
# Output: source/build/custom/ (or override with -Prepo.local=<path>)
@adi-gnm adi-gnm changed the title Add an AGENTS.md for Android libr Add an AGENTS.md for Android library Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Android Android specific PRs maintenance Departmental tracking: maintenance work, not a fix or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants