thunderbird-android
AGENTS.md14k starsChanged 56 days agoApache-2.0View on GitHub
This file defines requirements for AI coding agents and automated systems contributing to this repository. AI-generated or AI-assisted contributions are acceptable only if they comply with these rules and meet the same standards as human-written contributions. These requirements apply to: Thunderbird for Android is a privacy-focused email client. The repository implements a white-label architecture producing: Project documentation resides in the docs/ directory. Architectural Decision Records (ADRs) are located in docs/engineering/adr/. Agents MUST consult relevant documentation before making architectural or structural…
We split this AGENTS.md into the rules it gives an agent
40 rules. About 1 is common, 29 are distinctive, and 10 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈29
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
All modules in this repository
- Distinctive: line 13
All pull requests created fully or partially using AI tools
- Distinctive: line 32
Before making changes, agents MUST:
- Distinctive: line 37
If requirements are incomplete, ambiguous, or conflicting:
- Very specific: line 44
Read README.md, docs/CONTRIBUTING.md, and relevant documentation in docs/
- Very specific: line 46
Check for related ADRs in docs/engineering/adr/
- Distinctive: line 52
Follow existing patterns and conventions in the affected modules
- Distinctive: line 57
Run appropriate Gradle tasks (see Build and Verification Requirements)
- Distinctive: line 58
Ensure all checks pass before proposing changes
- Very specific: line 76
Never depend on another module's :internal or :internal-* modules
- Very specific: line 77
Only app-common, app-thunderbird, and app-k9mail may depend on :internal modules (for DI wiring)
- Very specific: line 78
Keep implementation details internal using the internal modifier
- Distinctive: line 83
If existing code violates this boundary, agents MUST NOT replicate the pattern and SHOULD move the code toward the intended architecture …
- Distinctive: line 107
Prefer fakes over mocks (see Testing Guide)
- Distinctive: line 108
Avoid mocking frameworks unless strongly justified
- Distinctive: line 109
Use Arrange-Act-Assert (AAA) pattern
- Distinctive: line 121
Follow the exact naming and formatting conventions of the file and module being modified
- Distinctive: line 122
NOT reformat, modernize, or clean up unrelated code
- Very specific: line 127
Use Atomic Design components from the design system (see docs/architecture/design-system.md)
- Distinctive: line 130
Do NOT introduce new design systems.
- Very specific: line 138
Use net.thunderbird.core.logging.Logger via dependency injection
- Distinctive: line 139
NEVER log PII (Personally Identifiable Information)
- Common: line 140
NEVER log credentials, passwords, or authentication tokens
- Distinctive: line 141
NEVER log message content or email addresses
- Distinctive: line 149
Add telemetry, analytics, ads, or tracking of any kind
- Distinctive: line 150
Add permissions without explicit request and justification
- Distinctive: line 157
All external input MUST be treated as untrusted.
- Distinctive: line 161
Before proposing changes, agents MUST run the narrowest relevant Gradle tasks and ensure they pass.
- Distinctive: line 184
When fixing bugs, agents MUST:
- Distinctive: line 186
Add or update tests to cover the bug
- Distinctive: line 187
Ensure tests fail before the fix (when applicable)
- Distinctive: line 188
Ensure all relevant tasks pass after the fix
- Very specific: line 189
Run at least: ./gradlew test lint detekt spotlessCheck
- Very specific: line 193
If required tasks cannot be executed locally (e.g., no Android device/emulator for connectedAndroidTest):
- Very specific: line 204
Use appropriate prefixes (feat:, fix:, refactor:, style:, test:, chore:)
- Distinctive: line 205
Keep commits small and logically scoped
- Distinctive: line 208
Avoid mixing behavior changes and formatting in a single commit
- Distinctive: line 236
Stop — Do not proceed with uncertain changes
- Distinctive: line 237
Document assumptions — Write down what you understand and what's unclear
- Distinctive: line 250
When in doubt, ask. It's always better to clarify than to guess wrong.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI Agent Guide for Thunderbird for Android
This file defines requirements for AI coding agents and automated systems contributing to this repository.
AI-generated or AI-assisted contributions are acceptable only if they comply with these rules and meet the same standards as human-written contributions.
Applicability
These requirements apply to:
- All modules in this repository
- All pull requests created fully or partially using AI tools
- Automated refactoring, formatting, or code generation
Repository Context
Thunderbird for Android is a privacy-focused email client.
The repository implements a white-label architecture producing:
app-thunderbird: Thunderbird for Androidapp-k9mail: K-9 Mail
Project documentation resides in the docs/ directory.
Architectural Decision Records (ADRs) are located in docs/engineering/adr/.
Agents MUST consult relevant documentation before making architectural or structural changes.
Required Agent Workflow
Before making changes, agents MUST:
1. Understand the Request
- Confirm that requirements are clear and consistent with project rules
- If requirements are incomplete, ambiguous, or conflicting:
- Do NOT guess
- Document assumptions
- Request clarification before proceeding
2. Research Context
- Read
README.md,docs/CONTRIBUTING.md, and relevant documentation indocs/ - Review existing implementations in affected modules
- Check for related ADRs in
docs/engineering/adr/ - Understand the module's role in the white-label architecture
3. Make Changes
- Modify only files directly related to the requested change
- Follow existing patterns and conventions in the affected modules
- Maintain consistency with the established architecture
4. Verify Changes
- Run appropriate Gradle tasks (see Build and Verification Requirements)
- Ensure all checks pass before proposing changes
Architectural Requirements
Module Types
app-*— Application entry points (app-thunderbird,app-k9mail)app-common— Wiring layer for features and dependency injectionfeature:*— User-facing features (split into:apiand:internalmodules per ADR-0009)core:*— Shared infrastructure and utilities (split into:apiand:internalmodules per ADR-0009)library:*— Reusable librarieslegacy:*— Migration targets (contains original K-9 Mail codebase; avoid adding new logic here)
API / Internal Boundary
Agents MUST:
- Depend only on other modules'
:apimodules - Never depend on another module's
:internalor:internal-*modules - Only
app-common,app-thunderbird, andapp-k9mailmay depend on:internalmodules (for DI wiring) - Keep implementation details internal using the
internalmodifier - Bind implementations in
app-commonor app modules only
New code MUST NOT violate the API/internal boundary, see ADR-0009.
If existing code violates this boundary, agents MUST NOT replicate the pattern and SHOULD move the code toward the intended architecture when modifying it.
Agents MUST NOT change module structure, dependency graphs, or architectural boundaries unless explicitly requested.
Technology Requirements
Agents MUST use:
- Kotlin for new code
- Jetpack Compose for UI (mandatory for new features)
- Atomic Design system components (see
docs/architecture/design-system.md) - Koin for dependency injection (constructor injection)
- Coroutines and Flow for concurrency
- MVI (Unidirectional Data Flow) pattern (see
docs/architecture/ui-architecture.md)
Testing libraries:
assertkkotlinx-coroutines-test- Turbine
Testing policy:
- Prefer fakes over mocks (see Testing Guide)
- Avoid mocking frameworks unless strongly justified
- Use Arrange-Act-Assert (AAA) pattern
- Name the object under test
testSubject
Agents MUST NOT introduce alternative frameworks.
Coding Requirements
Agents MUST:
- Make small, focused, reviewable changes
- Prioritize privacy, security, and correctness over convenience or shorter code
- Modify only files directly related to the requested change
- Follow the exact naming and formatting conventions of the file and module being modified
- NOT reformat, modernize, or clean up unrelated code
- Avoid speculative refactoring
UI Constraints
- Use Atomic Design components from the design system (see
docs/architecture/design-system.md) - Raw Material components are NOT allowed outside design system modules and the catalog app
- For existing View-based code, maintain consistency using legacy design system components
- Do NOT introduce new design systems; extend the existing system within its modules
Logging and Privacy
Privacy is a core value of this project.
Agents MUST:
- Use
net.thunderbird.core.logging.Loggervia dependency injection - NEVER log PII (Personally Identifiable Information)
- NEVER log credentials, passwords, or authentication tokens
- NEVER log message content or email addresses
Security Requirements
This is a privacy-focused email client. Security is non-negotiable.
Agents MUST NOT:
- Add telemetry, analytics, ads, or tracking of any kind
- Add permissions without explicit request and justification
- Introduce insecure cryptography or unsafe networking
- Hardcode secrets, credentials, API keys, or tokens
- Modify OAuth configuration unless explicitly instructed
- Change licensing headers or license terms
- Introduce dependencies with known vulnerabilities
All external input MUST be treated as untrusted. Validate and sanitize user input.
Build and Verification Requirements
Before proposing changes, agents MUST run the narrowest relevant Gradle tasks and ensure they pass.
Build
./gradlew assemble./gradlew build./gradlew :app-thunderbird:assembleDebug./gradlew :app-k9mail:assembleDebug
Tests
./gradlew test./gradlew connectedAndroidTest
Code Quality
./gradlew lint./gradlew detekt./gradlew spotlessCheck./gradlew spotlessApply(to fix formatting issues)
Bug Fix Requirements
When fixing bugs, agents MUST:
- Add or update tests to cover the bug
- Ensure tests fail before the fix (when applicable)
- Ensure all relevant tasks pass after the fix
- Run at least:
./gradlew test lint detekt spotlessCheck
Limitations
If required tasks cannot be executed locally (e.g., no Android device/emulator for connectedAndroidTest):
- Agents MUST explicitly state which tasks were not run and why
- Include this information in the pull request description
Commit Requirements
This repository uses Conventional Commits for all commit messages.
Agents MUST:
- Use appropriate prefixes (
feat:,fix:,refactor:,style:,test:,chore:) - Keep commits small and logically scoped
- Separate formatting-only changes into
style:commits - Separate refactoring from functional changes
- Avoid mixing behavior changes and formatting in a single commit
Pull Request Requirements
Pull requests MUST include:
- A clear description of changes
- The reason for the change
- Exact Gradle commands used for testing
- Known risks or trade-offs
- Disclosure of AI assistance (if applicable)
AI assistance does not reduce review standards.
Escalation
When to Stop and Ask
If uncertain about:
- Requirements (incomplete, ambiguous, or conflicting)
- Architectural decisions
- Module boundaries or dependencies
- Technology choices
- Security implications
Then:
- Stop — Do not proceed with uncertain changes
- Document assumptions — Write down what you understand and what's unclear
- Request clarification — Ask specific questions
What NOT to Do
Agents MUST NOT:
- Invent architecture or design patterns
- Bypass module boundaries to "make it work"
- Prioritize elegance over established project conventions
- Guess at requirements or implementation details
- Make breaking changes without explicit approval
When in doubt, ask. It's always better to clarify than to guess wrong.
Trending
Less talk lately.about the whole repository
Who's talking about thunderbird/thunderbird-android
- Doug Lynch is Explaining Android“Thunderbird Email Application for Android is Now in Beta [Android News Byte]”YouTube · Oct 1, 2024 · 6k views
- Geniusx6 Tech“Claude Free AI - November 2024!#best android apps”YouTube · Dec 4, 2024 · 4.5k views
- Geniusx6 Tech“Discover Open Food Facts Your Ultimate Health App!”YouTube · Nov 30, 2024 · 1.7k views
- Geniusx6 Tech“Top Android Apps Part 1! (October 2024) #best android apps”YouTube · Oct 5, 2024 · 1.5k views
- Mozilla Thunderbird“State of the Thunder 14: The 2026 Mobile Roadmap”YouTube · Dec 1, 2025 · 1.2k views
The biggest 5 of 82 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 82
Talked about on GitHub, YouTube, Bluesky, Hacker News and the web (82 times).
On GitHub · 50
- Oct 11, 2024[🐛 Bug]: GDPR infringment, US plausible telemetry without consent — SeleniumHQ/selenium6 reactions · 14 comments
- Jul 30, 2024Add redirect URIs for Thunderbird sync scope — mozilla/fxa2 reactions · 4 comments
- Apr 29, 2025Set up dummy EHLO web page — thunderbird/thunderbird-website1 reaction · 9 comments
- Nov 22, 2024Make privacy links easier for google to find — thunderbird/thunderbird-website1 reaction · 1 comment
- Jul 21, 2024feat: use `[...]` for protected subject — chatmail/core1 reaction · 1 comment
45 more on GitHub
- Oct 10, 2026App Submission [1 App] - Thunderbird Android — RookieEnough/Orion-Data0 reactions · 1 comment
- Oct 5, 2026UPDATE: Import settings and data into Thunderbird for Android improvements in 153 — thunderbird/knowledgebase-issues0 reactions · 4 comments
- Oct 2, 2026feat: add logging component — thunderbird/thunderbird-mobile-components0 reactions · 1 comment
- Sep 28, 2026Test: Integrate K-9 Mail APK as real-world multi-DEX test suite — michalgr/dexbuf0 reactions · 2 comments
- Sep 10, 2026Add support for sending emails from any catch-all address — thoomi/relaymail0 reactions
- Aug 25, 2026chore: add MPL 2.0 license header — thunderbird/thunderbird-mobile-components0 reactions
- Aug 11, 2026Add support article for Thunderbird for Android compose guidance — thunderbird/knowledgebase-issues0 reactions
- Jul 26, 2026Fix autoconfig on k9-mail (backport #4075) — Mailu/Mailu0 reactions · 4 comments
- Jul 25, 2026Fix autoconfig on k9-mail — Mailu/Mailu0 reactions · 4 comments
- Jun 24, 2026> Done. — php/web-php0 reactions
- Jun 24, 2026> Done. — php/web-php0 reactions
- May 25, 2026Add net.thunderbird.android — privacyguides/verified-apps0 reactions
- May 25, 2026[New]: Thunderbird — privacyguides/verified-apps0 reactions · 2 comments
- May 22, 2026[07] Thunderbird Android (K-9 Mail) — expo/expo-brownfield-examples0 reactions · 1 comment
- May 10, 2026(FR) allow integration with apps like K9/Thunderbird — KeychainPGP/keychainpgp0 reactions
- Apr 19, 2026github.com — liuleon0/vvo0 reactions
- Apr 6, 2026[Project]: Thunderbird Android — yncyrydybyl/ex-od-us0 reactions
- Mar 17, 2026Update thunderbird entry — Arcticons-Team/Arcticons0 reactions
- Feb 12, 2026Need technical support? Reporting a bug? Check here first! — thunderbird/thunderbird-accounts0 reactions
- Feb 12, 2026Thunderbird Beta. The config offers an outdated version. — ImranR98/apps.obtainium.imranr.dev0 reactions
- Feb 3, 2026Update thunderbird entry — Arcticons-Team/Arcticons0 reactions
- Jan 21, 2026TB 17 Content Plan — thunderbird/knowledgebase-issues0 reactions · 1 comment
- Dec 28, 2025[Feature request] IMAP & SMTP — maillab/cloud-mail0 reactions · 3 comments
- Dec 11, 2025Kernel crash on GOS 16 build 2025120401 likely caused by Thunderbird Beta 16.0b1 crash — GrapheneOS/os-issue-tracker0 reactions
- Oct 31, 2025💡 App request: thunderbird — osbm/nixapks0 reactions
- Aug 27, 2025K9 rebranded to Thunderbird, needs database update — soupslurpr/AppVerifier0 reactions · 8 comments
- Mar 27, 2025NEW ARTICLE: Troubleshooting Hotmail and Outlook Accounts — thunderbird/knowledgebase-issues0 reactions · 5 comments
- Feb 9, 2025n-u-d-e.com — mypdns/matrix0 reactions
- Jan 13, 2025Provide the Hash of the Signing Certificate for People Downloading from Github — LucasGGamerM/moshidon0 reactions
- Jan 11, 2025Also parse application/vnd-com.apple.pkpass as pkpass files — CatimaLoyalty/Android0 reactions
- Nov 27, 2024NEW ARTICLE: Gmail OAuth workarounds move from FAQ to a new article — thunderbird/knowledgebase-issues0 reactions · 4 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.MSIX version 128.4.1 — microsoft/winget-pkgs0 reactions · 4 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.zh-TW version 128.4.1 — microsoft/winget-pkgs0 reactions · 6 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.zh-CN version 128.4.1 — microsoft/winget-pkgs0 reactions · 6 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.vi version 128.4.1 — microsoft/winget-pkgs0 reactions · 4 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.uz version 128.4.1 — microsoft/winget-pkgs0 reactions · 6 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.uk version 128.4.1 — microsoft/winget-pkgs0 reactions · 4 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.th version 128.4.1 — microsoft/winget-pkgs0 reactions · 4 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.sv-SE version 128.4.1 — microsoft/winget-pkgs0 reactions · 4 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.sq version 128.4.1 — microsoft/winget-pkgs0 reactions · 4 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.sl version 128.4.1 — microsoft/winget-pkgs0 reactions · 4 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.sk version 128.4.1 — microsoft/winget-pkgs0 reactions · 4 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.ro version 128.4.1 — microsoft/winget-pkgs0 reactions · 4 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.pt-PT version 128.4.1 — microsoft/winget-pkgs0 reactions · 4 comments
- Nov 4, 2024New version: Mozilla.Thunderbird.pa-IN version 128.4.1 — microsoft/winget-pkgs0 reactions · 6 comments
On YouTube · 24
- Oct 1, 2024Thunderbird Email Application for Android is Now in Beta [Android News Byte] — Doug Lynch is Explaining Android6k views · 10 comments
- Dec 4, 2024Claude Free AI - November 2024!#best android apps — Geniusx6 Tech4.5k views
- Nov 30, 2024Discover Open Food Facts Your Ultimate Health App! — Geniusx6 Tech1.7k views · 1 comment
- Oct 5, 2024Top Android Apps Part 1! (October 2024) #best android apps — Geniusx6 Tech1.5k views · 9 comments
- Dec 1, 2025State of the Thunder 14: The 2026 Mobile Roadmap — Mozilla Thunderbird1.2k views · 3 comments
19 more on YouTube
- Nov 7, 2024Top Open Source Android Apps - November 2024!#best android apps — Geniusx6 Tech1.2k views · 2 comments
- Dec 1, 2024🌍 World Radio Apps - November 2024!#best android apps — Geniusx6 Tech878 views
- Oct 10, 2025State of the Thunder 13: How the Roadmap Gets Made — Mozilla Thunderbird614 views · 1 comment
- Dec 7, 2024Top Best Android Apps - November 2024!#best android apps — Geniusx6 Tech539 views
- Oct 23, 2024Best Android Apps EXPOSED Top Picks for 2024 — Geniusx6 Tech523 views · 1 comment
- Nov 30, 2024🆓 Watch Faces -👍November 2024!#best android apps — Geniusx6 Tech461 views
- Oct 24, 2024Best Android Apps EXPOSED Top Picks for 2024 — Geniusx6 Tech265 views
- Nov 27, 2024Engage with Us Share Your App Review Ideas! — Geniusx6 Tech247 views
- Oct 25, 2024Best Android Apps EXPOSED Top Picks for 2024 — Geniusx6 Tech202 views · 2 comments
- Oct 22, 2024Best Android Apps EXPOSED Top Picks for 2024 — Geniusx6 Tech198 views · 2 comments
- Nov 27, 2024🆓 AI App For Everyone😉November 2024!#best android apps — Geniusx6 Tech196 views
- Oct 26, 2024Best Android Apps EXPOSED Top Picks for 2024 — Geniusx6 Tech177 views
- Dec 6, 2024🔐 Secured Mail App - November 2024!#best android apps — Geniusx6 Tech175 views
- Oct 27, 2024Best Android Apps EXPOSED Top Picks for 2024 — Geniusx6 Tech157 views
- Nov 27, 2024SIRI Upgrade 2024!#best android apps — Geniusx6 Tech123 views
- Nov 27, 2024Transistor Android Apps - November 2024!#best android apps — Geniusx6 Tech68 views
- Nov 29, 2024Revolutionizing Emojis AI Generates Your Own Emoticons! — Geniusx6 Tech64 views
- Dec 2, 2024Best VPN🗺️ Apps - November 2024!#bestapps apps — Geniusx6 Tech63 views
- Dec 3, 2024🤣 Apps - November 2024!#best android apps — Geniusx6 Tech43 views
On Bluesky · 6
- Jan 4, 2025💻📱 𝗟𝗲𝗮𝗿𝗻, 𝗰𝗼𝗹𝗹𝗮𝗯𝗼𝗿𝗮𝘁𝗲, 𝗮𝗻𝗱 𝘄𝗼𝗿𝗸 𝗮𝘀 𝗮 𝘁𝗲𝗮𝗺 𝘄𝗶𝘁𝗵 𝘁𝗵𝗲𝘀𝗲 𝗢𝗽𝗲𝗻-𝗦𝗼𝘂𝗿𝗰𝗲 𝗔𝗻𝗱𝗿𝗼𝗶𝗱 𝗔𝗽𝗽𝘀… — @inakibes.bsky.social5 likes and reposts · 1 reply
- Jun 3, 2026You should add buttons in the GitHub page for that! Here's a good example of how Thunderbird does it:… — @mateowoetam.bsky.social2 likes and reposts · 1 reply
- Mar 2, 2026Mozilla's Thunderbird email client rebuilt for Android with K-9 Mail's proven foundation - 13k+ stars, privacy-first design, unified inbox,… — @arifsolmaz.bsky.social1 likes and repost
- Feb 27, 2025github.com/thunderbird/... 还是有点区别(?)的吧 不过除了名字区别不大👀👀 — @dilokomi.moe1 likes and repost
- Oct 31, 2024Android版Thunderbird興味深い Thunderbird: Free Your Inbox - Google Play のアプリ play.google.com/store/apps/d... thunderbird/thunderbird-android:… — @ichitaso.com1 likes and repost
1 more on Bluesky
- Nov 12, 2024Just officially (re)launched, it was maintained as K-9 mail for several years. github.com/thunderbird/... — @girldyke.northsky.social0 likes and reposts · 1 reply
On Hacker News · 1
- Oct 1, 2024Thunderbird for Android Beta has been released14 points · 6 comments
On the web · 1
- Sep 17, 2024NEW ARTICLE: Thunderbird for Android 8.0 FAQ #179 — google.com
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

