

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# AI Agent Guide for Thunderbird for Android23This file defines requirements for AI coding agents and automated systems contributing to this repository.45AI-generated or AI-assisted contributions are acceptable only if they comply with these rules and meet the same6standards as human-written contributions.78## Applicability910These requirements apply to:1112- All modules in this repository13- All pull requests created fully or partially using AI tools14- Automated refactoring, formatting, or code generation1516## Repository Context1718Thunderbird for Android is a privacy-focused email client.1920The repository implements a white-label architecture producing:2122- `app-thunderbird`: Thunderbird for Android23- `app-k9mail`: K-9 Mail2425Project documentation resides in the `docs/` directory.26Architectural Decision Records (ADRs) are located in `docs/engineering/adr/`.2728Agents MUST consult relevant documentation before making architectural or structural changes.2930## Required Agent Workflow3132Before making changes, agents MUST:3334### 1. Understand the Request3536- Confirm that requirements are clear and consistent with project rules37- If requirements are incomplete, ambiguous, or conflicting:38 - **Do NOT guess**39 - Document assumptions40 - Request clarification before proceeding4142### 2. Research Context4344- Read `README.md`, `docs/CONTRIBUTING.md`, and relevant documentation in `docs/`45- Review existing implementations in affected modules46- Check for related ADRs in `docs/engineering/adr/`47- Understand the module's role in the white-label architecture4849### 3. Make Changes5051- Modify **only** files directly related to the requested change52- Follow existing patterns and conventions in the affected modules53- Maintain consistency with the established architecture5455### 4. Verify Changes5657- Run appropriate Gradle tasks (see [Build and Verification Requirements](#build-and-verification-requirements))58- Ensure all checks pass before proposing changes5960## Architectural Requirements6162### Module Types6364- `app-*` — Application entry points (`app-thunderbird`, `app-k9mail`)65- `app-common` — Wiring layer for features and dependency injection66- `feature:*` — User-facing features (split into `:api` and `:internal` modules per ADR-0009)67- `core:*` — Shared infrastructure and utilities (split into `:api` and `:internal` modules per ADR-0009)68- `library:*` — Reusable libraries69- `legacy:*` — Migration targets (contains original K-9 Mail codebase; avoid adding new logic here)7071### API / Internal Boundary7273Agents MUST:7475- Depend only on other modules' `:api` modules76- Never depend on another module's `:internal` or `:internal-*` modules77- Only `app-common`, `app-thunderbird`, and `app-k9mail` may depend on `:internal` modules (for DI wiring)78- Keep implementation details internal using the `internal` modifier79- Bind implementations in `app-common` or app modules only8081New code MUST NOT violate the API/internal boundary, see [ADR-0009](docs/engineering/adr/0009-api-internal-split.md).8283If existing code violates this boundary, agents MUST NOT replicate the pattern and SHOULD move the code toward the84intended architecture when modifying it.8586Agents MUST NOT change module structure, dependency graphs, or architectural boundaries unless explicitly requested.8788## Technology Requirements8990Agents MUST use:9192- Kotlin for new code93- Jetpack Compose for UI (mandatory for new features)94- Atomic Design system components (see `docs/architecture/design-system.md`)95- Koin for dependency injection (constructor injection)96- Coroutines and Flow for concurrency97- MVI (Unidirectional Data Flow) pattern (see `docs/architecture/ui-architecture.md`)9899Testing libraries:100101- `assertk`102- `kotlinx-coroutines-test`103- Turbine104105Testing policy:106107- Prefer **fakes over mocks** (see [Testing Guide](docs/contributing/testing-guide.md))108- Avoid mocking frameworks unless strongly justified109- Use Arrange-Act-Assert (AAA) pattern110- Name the object under test `testSubject`111112Agents MUST NOT introduce alternative frameworks.113114## Coding Requirements115116Agents MUST:117118- Make small, focused, reviewable changes119- Prioritize privacy, security, and correctness over convenience or shorter code120- Modify only files directly related to the requested change121- Follow the exact naming and formatting conventions of the file and module being modified122- NOT reformat, modernize, or clean up unrelated code123- Avoid speculative refactoring124125### UI Constraints126127- Use Atomic Design components from the design system (see `docs/architecture/design-system.md`)128- Raw Material components are NOT allowed outside design system modules and the catalog app129- For existing View-based code, maintain consistency using legacy design system components130- Do NOT introduce new design systems; extend the existing system within its modules131132### Logging and Privacy133134Privacy is a core value of this project.135136Agents MUST:137138- Use `net.thunderbird.core.logging.Logger` via dependency injection139- NEVER log PII (Personally Identifiable Information)140- NEVER log credentials, passwords, or authentication tokens141- NEVER log message content or email addresses142143## Security Requirements144145This is a privacy-focused email client. Security is non-negotiable.146147Agents MUST NOT:148149- Add telemetry, analytics, ads, or tracking of any kind150- Add permissions without explicit request and justification151- Introduce insecure cryptography or unsafe networking152- Hardcode secrets, credentials, API keys, or tokens153- Modify OAuth configuration unless explicitly instructed154- Change licensing headers or license terms155- Introduce dependencies with known vulnerabilities156157All external input MUST be treated as untrusted. Validate and sanitize user input.158159## Build and Verification Requirements160161Before proposing changes, agents MUST run the narrowest relevant Gradle tasks and ensure they pass.162163### Build164165- `./gradlew assemble`166- `./gradlew build`167- `./gradlew :app-thunderbird:assembleDebug`168- `./gradlew :app-k9mail:assembleDebug`169170### Tests171172- `./gradlew test`173- `./gradlew connectedAndroidTest`174175### Code Quality176177- `./gradlew lint`178- `./gradlew detekt`179- `./gradlew spotlessCheck`180- `./gradlew spotlessApply` (to fix formatting issues)181182### Bug Fix Requirements183184When fixing bugs, agents MUST:185186- Add or update tests to cover the bug187- Ensure tests **fail before the fix** (when applicable)188- Ensure all relevant tasks **pass after the fix**189- Run at least: `./gradlew test lint detekt spotlessCheck`190191### Limitations192193If required tasks cannot be executed locally (e.g., no Android device/emulator for `connectedAndroidTest`):194195- Agents MUST explicitly state which tasks were not run and why196- Include this information in the pull request description197198## Commit Requirements199200This repository uses Conventional Commits for all commit messages.201202Agents MUST:203204- Use appropriate prefixes (`feat:`, `fix:`, `refactor:`, `style:`, `test:`, `chore:`)205- Keep commits small and logically scoped206- Separate formatting-only changes into `style:` commits207- Separate refactoring from functional changes208- Avoid mixing behavior changes and formatting in a single commit209210## Pull Request Requirements211212Pull requests MUST include:213214- A clear description of changes215- The reason for the change216- Exact Gradle commands used for testing217- Known risks or trade-offs218- Disclosure of AI assistance (if applicable)219220AI assistance does not reduce review standards.221222## Escalation223224### When to Stop and Ask225226If uncertain about:227228- Requirements (incomplete, ambiguous, or conflicting)229- Architectural decisions230- Module boundaries or dependencies231- Technology choices232- Security implications233234**Then:**2352361. Stop — Do not proceed with uncertain changes2372. Document assumptions — Write down what you understand and what's unclear2383. Request clarification — Ask specific questions239240### What NOT to Do241242Agents MUST NOT:243244- Invent architecture or design patterns245- Bypass module boundaries to "make it work"246- Prioritize elegance over established project conventions247- Guess at requirements or implementation details248- Make breaking changes without explicit approval249250When in doubt, ask. It's always better to clarify than to guess wrong.251
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| vllm-project/vllmAGENTS.md · 89k | AGENTS.md | setuptestlint-formatstyle+5 | 100/100 | 14 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/thunderbird-thunderbird-android-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.