quality_assurance · workflow

Medium Android team encodes team coding conventions into Cursor agent skills to produce pattern-compliant code

Medium's small Android team had strong, opinionated coding conventions — where ViewModels get data, how analytics events flow, what a new screen looks like — but that knowledge lived in PR review comments, Slack threads, and the heads of veteran engineers. When AI coding assistants arrived, they produced generic Kotlin code that missed the team's specific conventions, component library, and testing style.

How it works
Common implementation structure
How this type of workflow is generally built, generalized across documented cases — not tied to any one vendor's stack. Click any stage to read what happens there. Specific products that implement these stages appear in “Tools commonly seen” below.
Stage 1 · Developer prompts AI agent
The developer issues a natural-language prompt describing a coding task, such as creating a new screen for user notifications.
Tools used
CursorMockKTurbineHiltApollo GraphQLDetektRobolectricWire
Outcome

Setting up a new screen now takes a prompt and a review pass instead of most of a morning, and every new screen looks structurally identical regardless of who or what wrote it, eliminating convention drift across the small team.

What failed first

Without custom skill files, the AI consistently generated composables tightly coupled to the ViewModel — missing patterns like listener splitting and the @VisibleForTesting overload — making previews and UI tests painful, and causing the same pattern-break comments to recur in PR reviews.

Results
Time saved30-60 minutes
Volume6-8 files
Running sincesix months before publication
Source

https://medium.engineering/making-ai-write-android-code-our-way-a-practical-guide-to-agent-skills-4e7b085d8e50

How we source this →

Grounding & classification
Source type: technical build writeup
28 fields verified against source quotes, 1 dropped as unverifiable.
agentic workflowcode generationcode diff prfailure mode describedmetric backednamed customerproduction runtime claimedtools describedsoftwareaccuracy improvementemployee productivitytime savedtechnical build writeupquality assuranceai draft human approval