When a feature lives in three implementations — web, Android, iOS, or a React Native app plus native holdouts — the platforms drift: an edge case handled here, a validation rule forgotten there. Use a multi-repo agent to generate a feature-by-platform-by-state parity matrix with citations, and turn "I think iOS does that too" into checked cells.
Tier: Advanced · Workflow area: Mobile engineering & release
This playbook produces an evidence-backed matrix of behavioral drift, ranks the gaps, and converts the worst into tickets — without any engineer holding three codebases in their head at once.
Skip it when a shared core (KMP, shared TS logic) already owns the behavior in question — audit the thin platform shells only.
Extract each platform's behavior independently first. Prevent the agent from harmonizing by asking per-platform, in separate passes:
In repo android/ only: trace the password-reset flow. List every
behavior as a row: trigger, validation rules (exact limits, regexes),
error messages shown, retry/rate-limit handling, analytics events,
navigation on success/failure, offline behavior. Cite file:line for
every row. Do not look at the other repos yet.
Repeat for ios/ and web/. Independent extraction means a gap shows up as a genuinely missing row, not a copied assumption.
Merge into the matrix. Now let it compare:
Merge the three behavior lists into one table: behavior | web |
android | ios. Each cell: SAME, DIFFERENT (describe how), or MISSING,
with the citation. Where implementations differ, do not guess which
is intended - mark it DRIFT-UNKNOWN.
The DRIFT-UNKNOWN marker is the honesty valve: which platform is "right" is a product decision, and the agent must not make it.
Spot-check the cells that will drive work. Open the citations behind every MISSING and the top DIFFERENT cells yourself — five to ten checks. Agents mis-attribute behavior that lives in a shared backend, in a remote config flag, or in a library default; each of those looks like platform code drift until you read the cited line.
Adjudicate drift with product, then rank. Walk the matrix with the product owner: each DIFFERENT/MISSING cell becomes intended (document it in the matrix as such), bug on platform X (ticket), or spec gap (neither platform matches intent). Rank tickets by user impact — a validation-limit mismatch that eats user input outranks an analytics-event gap.
Make the matrix regenerable, not sacred. Commit the prompts and the matrix to a parity/ folder in the umbrella or docs repo. Rerun the audit after major feature work on any platform — the second run is fast because the prompts exist, and diffing matrix versions shows whether drift is shrinking. For hot features, a slimmed version of the extraction prompt can run in CI on a schedule and flag new drift rows.
Extract independently, compare mechanically, adjudicate humanly. The agent's job ends at DRIFT-UNKNOWN — deciding which platform's behavior is the product is exactly the judgment you cannot delegate.
workspace/{web,android,ios} and one session that can grep all three; use subagents per platform for the extraction passes.MISSING and top DIFFERENT).SAME cells blindly.SAME at the behavior-description level can hide different limits or edge handling; the exact-values requirement (limits, regexes) in the extraction prompt is what makes SAME meaningful.Multi-repo audits need broad code access, which is exactly what restricted environments limit. Options: run the whole loop on an in-tenancy agent (Bedrock/Azure-backed) with the same prompts; or degrade gracefully — have each platform team run the extraction pass locally (local model or approved tool) against their own repo, then merge the three behavior tables in a normal document review. The merge step needs only the tables, not the source.
A behavior matrix with exact validation rules and endpoints is a decent map of your attack surface. Store it with the same access controls as the code it describes.