Contributing¶
Read Open protocols only first: the library follows public
specifications exactly and never invents wire formats. The binding rules for humans and AI agents
are in AGENTS.md at the root of the repository.
Conventions¶
- Build and test before you push:
./gradlew testDebugUnitTest lintDebugand, with an emulator or device,./gradlew :demo:connectedDebugAndroidTest. See Testing. - Elements follow Material 3 Expressive: theme colors and shapes only, 48 dp touch targets
(
Modifier.compactIconButton()), theAiSpacing/AiTypetokens, content descriptions for icons,@Immutablemodels. Elements render the chat model only; see Architecture. - Icons are Material Symbols Rounded. Use
AiIcons.Xand runpython3 tools/generate-icons.pyto generate the icons in use. - Strings are resources with an
ai_prefix inai-elements-ui, translated into every shipped language (values,values-zh-rCN,values-zh-rTW,values-ja). - Public API changes need a CHANGELOG entry; keep defaults source-compatible where possible.
- Protocol changes come with a recorded fixture test, and a live test when the reference server can exercise them.
- Documentation: code on this site comes from
demo/src/main/kotlin/…/samples/DocsSamples.ktthrough--8<--sections, so it compiles with the demo. Preview the site withuvx zensical serve. - Secrets never appear in logs, exceptions or test output.