A deterministic 0–100 health score for Android Jetpack Compose — powered by detekt + compose-rules. Gives a coding agent a structured fix loop, and gates your PRs.
Inspired by React Doctor.
Apply it to any module with Compose source, then run the task. It applies detekt + the compose-rules ruleset, scores the findings, and writes a machine-readable report.
// build.gradle.kts plugins { id("dev.composedoctor") version "0.1.0" } // then: $ ./gradlew composeDoctor → build/reports/compose-doctor/score.json (score, byRule plan, findings) → build/reports/detekt/detekt.sarif (precise locations, code-scanning)
Pre-release: until it's on the Gradle Plugin Portal, consume it from source via a composite build — see TRY-IT-PLAYGROUND.md.
/compose-doctor skillDrop the skill into your agent, then invoke it — it knows how to run the task, read the report, and fix the highest-value rule first. One skill, packaged for every major agent.
# Claude Code — install from the marketplace /plugin marketplace add rotemmiz/compose-doctor /plugin install compose-doctor@compose-doctor # Gemini CLI — install as an extension gemini extensions install https://github.com/rotemmiz/compose-doctor # Codex · OpenCode · Antigravity · Cursor — zero install # they auto-read AGENTS.md at the repo root # then, in any Compose project: /compose-doctor
SKILL.md is the single source of truth; each agent gets a thin wrapper
around it. Full install matrix in
skills/README.md.
The score is deterministic and unique-rule based, so it's a clean reward signal. Point an agent at it and let it close the loop.
# prompt your agent:
"Run compose-doctor and raise the score by fixing the findings,
one rule at a time. Verify the build still compiles, and don't
suppress anything — fix the cause."
./gradlew composeDoctor → read score.json.
Take byRule[0] (best score-per-fix), clear every instance.
Watch delta.fixedRules and the score climb. Repeat.
The full loop, the score.json contract, and the fix-don't-suppress rule are in
AGENT-HARNESS.md.