Repository navigation
Commit 5f14ef7
ADFA-4357 Add agent & contributor documentation set (#1422)
* ADFA-4357 Add agent & contributor documentation set
Add a coordinated set of Markdown docs to onboard both human and AI
contributors and to capture the project's architectural decisions.
- CLAUDE.md: operational guide for Claude Code (build/test commands,
ABI flavors, project constraints); points to ARCHITECTURE.md for
architecture rather than duplicating it.
- AGENTS.md: operational rules for agents (CI-vs-local, Jira CLI,
SonarQube MCP, git message handling); persistence rule now points to
ARCHITECTURE.md.
- ARCHITECTURE.md: single source of truth for module layout, layering &
data flow (UDF), dependency rules, tech stack, state management, and
the testing strategy.
- REVIEW.md: code-review coaching (exception handling vs the Sentry
crash wrapper, LeakCanary leaks, StrictMode, OWASP, tests/coverage,
analytics, duplication, docstrings, strings.xml).
- SECURITY.md: how to avoid introducing new SonarQube/Snyk/Semgrep
blocker findings; vulnerability classes for an Android/Kotlin IDE.
- docs/adr/: 8 Architecture Decision Records (MADR/Nygard) plus an index
covering persistence-without-Room, on-device builds via the Gradle
Tooling API, the vendored toolchain, embedded Termux, per-ABI flavors,
Koin DI, the StrictMode whitelist engine, and retaining the
com.itsaky.androidide namespace.
* ADFA-4357 Document accessibility & contextual-help review rules
Promote accessibility from a proposed item to an enforced review section
and add a parallel contextual-help (long-press 3-tier) rule, both keyed
to existing patterns (ADFA-2667 screen-reader work, the idetooltips module).
- REVIEW.md: new sections for content-description coverage and long-press
help; matching 60-second-checklist entries; renumber trailing sections.
- idetooltips/README.md: state the long-press-for-help-everywhere principle
and the three-tier (tooltip / tooltip / web page) help model.
* ADFA-4357 Record Compose-for-new-UI decision; offline-first rule
- ADR 0009: new IDE UI is Jetpack Compose, no new XML View screens; the
UDF/Koin/StateFlow stack is unchanged. Indexed in docs/adr/README.md.
- ARCHITECTURE.md: tech-stack UI row + overview now point to ADR 0009
instead of claiming the IDE is 'Not Compose'.
- REVIEW.md: new Compose-only rule in Architecture alignment; accessibility
(§8) now gives View + Compose forms for each rule (semantics,
clearAndSetSemantics, the HardcodedText lint gap); contextual help (§9)
notes idetooltips has no Compose entry point yet (displayTooltipOnLongPress
is View-based); promote Offline-first from proposed to an accepted section.
* ADFA-4357 Note ADFA-4381 follow-up for the Compose long-press help bridge
The Compose-only mandate (ADR 0009) and the long-press-everywhere rule
(REVIEW.md section 9) need a Compose entry point into the View-based
idetooltips system, which does not exist yet. Reference the follow-up
ticket from both docs so the gap is tracked, not forgotten. Docs only.
* ADFA-4357 Flag idetooltips/README.md as stale; track refresh in ADFA-4382
The README's usage examples document a showIDETooltip() API that no longer
exists (real API: TooltipManager.showTooltip / displayTooltipOnLongPress)
and claim a Room store the module doesn't use (it's raw SQLite). Add a
banner so contributors trust the code until the refresh lands. Docs only.
* ADFA-4357 Revert all idetooltips/README.md changes on this branch
Leave idetooltips/README.md untouched on this PR. Removes both the
design-principle section and the staleness banner added earlier; the
README refresh is handled wholesale in ADFA-4382 instead.
* ADFA-4357 Add doc-sync rule: update module docs in the same change
- REVIEW.md: new Code-quality rule + 60-second-checklist entry requiring a
change to update any module README/ARCHITECTURE.md/ADR it affects, or
leave a tracked note.
- AGENTS.md: one-line operational pointer to the REVIEW.md rule, so agents
that read AGENTS.md (but not REVIEW.md) still apply it.
* ADFA-4357 Add brevity directive for docs/tickets/messages to AGENTS.md
* ADFA-4357 Concision pass on the doc set; fix stale tooltip API ref
Tighten prose across CLAUDE.md, AGENTS.md, ARCHITECTURE.md, REVIEW.md, and
the ADRs — cut hedging, doubled phrasings, and restated context; no facts,
paths, commands, or decisions changed. Also:
- REVIEW.md §9: drop the stale showIDETooltip reference in the intro.
- ARCHITECTURE.md: reconcile the data-flow UI note with ADR 0009 (existing
UI is Views; new UI is Compose) instead of a flat 'not Compose'.
* ADFA-4357 Reframe experimental-flag item; move perf budget to ADFA-4383
- Experimental feature flag: clarify it's a user-facing early-access opt-in
(singular flag), not a kill switch for us to disable features in the field.
- Remove the performance-budget proposal; captured as ADFA-4383 instead.
* ADFA-4357 Promote experimental-flag rule to accepted §12 in REVIEW.md
Move it out of 'Open for discussion' into a numbered review section; gate
not-yet-stable features behind the user-facing early-access flag. Renumber
PR hygiene to §13.
* ADFA-4357 Drop backward-compat proposal and the now-empty Open-for-discussion section
The MIN_SDK guard concern doesn't arise in practice; remove the item. It was
the last proposal, so remove the empty section scaffolding too. REVIEW.md now
ends at §13 PR hygiene.
* Update REVIEW.md to cover the impact of changes upon plugins
* Typo - Update REVIEW.md
* Update CLAUDE.md with guidance regarding off-device links
* ADFA-4357: Flip persistence default to Room; raw SQLite for justified exceptions
Reframes ADR 0001 and cascades to ARCHITECTURE.md, AGENTS.md, REVIEW.md per
review feedback from itsaky-adfa and dara-abijo-adfa. Room is the default;
raw SQLite is reserved for prebuilt read-only DBs, performance/allocation-
critical indexing, and cross-boundary schemas. Recent Projects is the
reference example of the default, not an exception.
Renames 0001-persistence-without-room.md -> 0001-prefer-room-for-persistence.md.
* ADFA-4357: Correct ADR 0003 — separate in-IDE toolchain from the Tooling API
Rewrites ADR 0003 per itsaky-adfa's correction (confirmed against the code):
composite-build/build-deps* modules ship in the APK and run at IDE runtime
(e.g. Java LSP via javac/jdk-compiler/jdt), and live in composite builds for
build-time caching. Adds an explicit callout that the Gradle Tooling API is a
separate out-of-process JDK from terminal bootstrap packages, driven over
JSON-RPC. Fixes two cross-reference lines in ADR 0002 that conflated the two.
* ADFA-4357: Merge AGENTS.md into CLAUDE.md (self-contained)
Per jatezzz's review: Claude Code auto-reads CLAUDE.md, so a separate AGENTS.md
forces a secondary read and risks the operational rules being skipped. Folds all
unique AGENTS.md content into CLAUDE.md (emulator/device, Jira CLI, SonarQube MCP,
CI-job resolution, official-actions-in-CI, git/gh messaging, keep-docs-current,
brevity) and replaces AGENTS.md with a thin pointer so the cross-tool AGENTS.md
convention still resolves without duplicated, drift-prone content. Repoints the
AGENTS.md citations in REVIEW.md and SECURITY.md to CLAUDE.md.
* ADFA-4357: Fix factual errors flagged by itsaky (formatting, state, Parcelize, namespace)
Verified each against the code before editing:
- Code style: tabs + LF via Spotless (leadingSpacesToTabs), not 2-space; and the
right formatters (Java=Eclipse config, Kotlin/Gradle=ktlint, XML=Eclipse WTP),
not ktfmt/google-java-format/Android Studio. Fixed CLAUDE.md and REVIEW.md.
- State management: require sealed types for mutually-exclusive UI states (no
boolean hell); reframed the example to lead with real sealed CloneRepoUiState
and caption the PluginManagerUiState boolean example as independent-fields-only.
- Added a Parceling row: use @parcelize, never hand-roll Parcelable.
- REVIEW.md: strings live in the :resources module's strings.xml.
- Emulator: app is arm-only (v7/v8, no x86), so a physical arm device is often
needed; an x86_64 emulator can't run it.
- ADR 0008: the decisive reason to keep the namespace is the terminal bootstrap
packages coupling — a rename must be an atomic big-bang change across both.
* ADFA-4357: Soften PR-splitting rule, set ADRs to Proposed, fix nits
- PR sizing (fryanpan): prefer one PR per ticket/use case, break large work
into reviewable commits (mechanical vs. behavioral) with review-by-commit;
~500 LOC/10 files is a soft signal, not a hard cap. (CLAUDE.md, REVIEW.md)
- ADR status (dara-abijo-adfa): all 9 ADRs + README index Accepted -> Proposed;
they ratify to Accepted when this PR merges.
- Nits (CodeRabbit): ADR 0005 'very large' -> 'prohibitively large'; REVIEW.md
drop the 'exactly' intensifier. (The stray '39' char was already absent.)
* ADFA-4357: Add plugin-api.md and rework the plugin-impact review rule
- New docs/plugin-api.md (Daniel-ADFA): maintainer-facing plugin API stability &
compatibility guide. Defines the contract surface (:plugin-api interfaces/data
classes/enums + manifest keys, permission strings, formats), the current policy
(API not frozen, backward/binary compat not yet guaranteed but changes must be
deliberate/documented/justified), the Kotlin binary-compat traps, a pre-change
checklist, and a follow-up to add binary-compat tooling. Grounded in the plugin
dev guide and the real :plugin-api module.
- REVIEW.md 13 (fryanpan): replaced the vague 'consider impact on plugins' with a
concrete check — does it touch the API surface, is any break deliberate and
documented, and a mechanical impact check against the in-tree example plugins
(apk-viewer / markdown-preview / keystore-generator) and the plugin-examples repo.
- Fixed the plugin.json manifest claim -> AndroidManifest.xml <meta-data> in
ARCHITECTURE.md and REVIEW.md (meta-data is the primary loader path).
* ADFA-4357: Add PLUGIN_AUTHORING.md and cross-link with plugin-api.md
Commits the in-repo author-facing plugin guide (project layout, AndroidManifest
meta-data contract, theme-aware icons, building/installing, troubleshooting) and
wires reciprocal links between it (how to author) and plugin-api.md (how to
evolve the API).
* ADFA-4357: Make REVIEW.md verifiable and self-contained (fryanpan)
- Per-item evidence ledger: a review must show what it checked and the result,
proportional to change size (not bare LGTM).
- Feature completeness: start from the Jira ticket; confirm requirements are
implemented and the intended flow is tested. Added as lead rule + checklist item.
- Coverage target: >=50% line & branch on new non-UI code (rising over time),
proven via jacocoAggregateReport; UI exempt.
- Architecture (10): inlined the key rules as a checklist (UDF, sealed state,
Koin, Room, module dependency direction, Compose, system bars) so reviewers
don't have to follow links; noted an architecture-review skill as follow-up.
- Threading (3): long-running CPU work off the main thread (JSON decode crash).
- Duplication (7): broadened to reimplemented logic / cross-subagent duplication.
- Offline (11) and leaks (2): concrete verification steps (adb network off; a
clean LeakCanary run) recorded as evidence.
- CLAUDE.md: post in-progress ticket updates via the jira CLI.
- SECURITY.md: relationship to Claude's /security-review (complements the three
CI scanners, doesn't replace the enforced baseline).
* ADFA-4357: Document the main/stage/feature branch model; fix stale CONTRIBUTING.md
- CLAUDE.md: new Branch model section — main is release-only (merges from stage),
stage is the protected default/integration branch and the base for feature
branches, feature branches PR back into stage. Never target main directly.
- CONTRIBUTING.md: replaced the stale 'dev branch is protected' line (there is no
dev branch; stage is the protected default, main is not) with the correct branch
model, and corrected the Source code format section (ktfmt/google-java-format/
2-space -> Spotless: tabs, ktlint for Kotlin, Eclipse for Java/XML).
Edits deliberately avoid the CONTRIBUTING.md regions changed by PR 1478
(community-contribution branch naming) to prevent merge conflicts.
* ADFA-4357: Add architecture-review skill; wire it into REVIEW.md §10
A project skill that forces a read of ARCHITECTURE.md + the ADRs, then checks a
diff against the documented patterns (UDF/state, Koin, Room-vs-SQLite, Compose,
module boundaries, ABI flavors, dependency substitution, @parcelize, strings),
tracing each finding to its ADR/section. Addresses the 'rules in on-demand docs
get missed' problem: the skill guarantees the authoritative docs are read at
review time rather than relying on prose links. REVIEW.md §10 now points to it.
Commits only the skill file under .claude/ (not local settings or hooks).
* ADFA-4357: Add pre-push architecture-review nudge to .githooks
A non-blocking pre-push hook (.githooks/pre-push/0002-architecture-review-nudge)
that reminds the author to run an architecture pass when a push touches first-party
Kotlin/Java. It always exits 0 (never gates), and stays silent unless production
app source changed — docs/test/vendored-only pushes produce no output. Points at
the architecture-review skill and REVIEW.md section 10.
Runs via the existing .githooks dispatcher after 0001-run-spotless.
* docs: add rule for code comments
Signed-off-by: Akash Yadav <akashyadav@appdevforall.org>
* docs: prefer collectAsStateWithLifecycle() over collectAsState()
Signed-off-by: Akash Yadav <akashyadav@appdevforall.org>
* docs: explicitly state why targetSdk is pinned at API 28
Signed-off-by: Akash Yadav <akashyadav@appdevforall.org>
* docs: add clarification on per-abi splits
Signed-off-by: Akash Yadav <akashyadav@appdevforall.org>
* docs: add clarification on why Hilt was rejected
Signed-off-by: Akash Yadav <akashyadav@appdevforall.org>
---------
Signed-off-by: Akash Yadav <akashyadav@appdevforall.org>
Co-authored-by: Akash Yadav <akashyadav@appdevforall.org>1 parent 9b1bf97 commit 5f14ef7
20 files changed
Lines changed: 1496 additions & 11 deletions
File tree
- .claude/skills/architecture-review
- .githooks/pre-push
- docs
- adr
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments