---
description: "Pre-submission store readiness for a built package, iOS and Android, local-only. Three symmetric gates per platform: a static package audit, the store's own authoritative validation, and a policy review against repo source. Separate verdict per gate, a skipped gate never counted as a pass. Validates only, never ships a build. Use when a build is about to go to TestFlight or a Play track, or when a submission was rejected and the reason is not obvious."
description-tr: "Üretilmiş paketin yükleme öncesi store hazırlığı, iOS + Android, yalnızca lokal. Platform başına üç simetrik kapı: statik paket denetimi, store'un kendi doğrulayıcısı, ve kaynağa karşı politika incelemesi. Kapı başına ayrı verdict, atlanan kapı asla pass sayılmaz. Sadece doğrular, build'i asla yayına göndermez."
argument-hint: "[repo]  -  empty = pick; repo name or path; --ipa= | --archive= | --aab= | --apk=; --previous=; --skip-sweep; --resume"
parameters: [{"name":"repo","kind":"text"},{"name":"--ipa","kind":"path"},{"name":"--archive","kind":"path"},{"name":"--aab","kind":"path"},{"name":"--apk","kind":"path"},{"name":"--previous","kind":"path"},{"name":"--skip-sweep","kind":"flag"},{"name":"--resume","kind":"flag"}]
gui: form
destructive: false
confirm: none
allowed-tools: Agent, Bash, Read, Write, Edit, Glob, Grep, TaskCreate, TaskUpdate, AskUserQuestion, Skill, mcp__multi-agent__ios_app_store_audit, mcp__multi-agent__store_listing_lint, mcp__multi-agent__ios_export_ipa, mcp__multi-agent__ios_testflight_validate, mcp__multi-agent__ios_xcodebuild, mcp__multi-agent__ios_xcresult, mcp__multi-agent__android_apk_audit, mcp__multi-agent__binary_inspect, mcp__multi-agent__binary_strings_endpoints, mcp__multi-agent__binary_compare_versions, mcp__multi-agent__store_status, mcp__multi-agent__store_asc_apps, mcp__multi-agent__store_asc_next_build_number, mcp__multi-agent__store_play_validate_bundle, mcp__multi-agent__ios_screenshot, mcp__multi-agent__ios_get_ui_tree, mcp__multi-agent__ios_set_appearance, mcp__multi-agent__ios_set_content_size, mcp__multi-agent__android_screenshot, mcp__multi-agent__android_get_ui_tree, mcp__multi-agent__android_set_dark_mode, mcp__multi-agent__android_set_font_scale, mcp__multi-agent__store_screenshot_sizes, mcp__multi-agent__store_screenshot_check
---

# /multi-agent:store-ready  -  pre-submission validation, iOS + Android

**Local-only**: no commits, push, PR or channels unless asked at the end; a worktree only archives. **It never ships**: iOS runs `--validate-app`, never `--upload-app`; Android uploads only into a throwaway Play edit, after approval, and never commits it.

**Input**: $ARGUMENTS

## Gotchas

- A skipped gate is reported as skipped with its reason, never folded into a pass: a green static audit says nothing about what the store's validator will say.
- The Play throwaway edit is deleted whether validation passes or fails.
- Gate 3 reads source, not the binary: a policy finding cites `file:line` in the repo the package was built from.

## Three gates per platform

1 Static, 2 Authoritative (the store's validator), 3 Policy (repo source). Read `$HOME/.claude/multi-agent-refs/store-ready/gates.md` before Step 0: the gate matrix, Gate 2's asymmetry, input flags, the `store_*` toolkit version.

## Step 0  -  parse input, detect platform

Flags: `gates.md` "Input". Without a build flag: `.xcodeproj` / `.xcworkspace` / `Package.swift` -> iOS; `build.gradle` / `build.gradle.kts` -> Android; both -> ask; neither -> halt with "store-ready needs an iOS or Android project".

State `$HOME/.claude/logs/multi-agent/<task_id>/agent-state.json`, `taskId = SR-<repo>-<yyyymmddHHMM>`, tracker per `$HOME/.claude/multi-agent-refs/tracker-contract.md`.

## Step 1  -  pickers (native, always)

`AskUserQuestion` for every step, never a numbered text menu, per `$HOME/.claude/multi-agent-refs/picker-contract.md`.

1. **Repo** from `prefs.projects` matching the detected platform; a single match auto-resolves and the breadcrumb says so.
2. **Branch.** `git fetch --prune`, capturing stderr. **If the fetch fails, do not silently fall back to a cached ref**; **classify before naming a cause** (credential / network / wrong remote) beside the stderr line; a credential failure never gets the cached ref. Fetch-failure table: `$HOME/.claude/multi-agent-refs/store-ready/preflight.md`.
3. **Mode**: `Supply a build` (Mode B, default) or `Build from this branch` (Mode A, needs release signing).

## Step 2  -  pre-flight, before anything expensive

Report every line; a missing prerequisite is a halt, not a warning. iOS: `altool` + `xcodebuild`, then credentials, **stating which tier is active**; tier 3 means **Gate 2 reports `SKIPPED`** and the verdict line says so. Android: `bundletool`, `aapt2`, `apksigner`. Read `store-ready/preflight.md` for Step 2.

Android Gate 2 from `store_status` (`googlePlay.configured`), and say which:
- configured, attended: runs `store_play_validate_bundle` after approval (Step 5);
- configured, `MULTI_AGENT_UNATTENDED=1`: `SKIPPED (no local Play validator)`, the toolkit refuses the upload unattended;
- not configured or no tool: `SKIPPED (no local Play validator)`, reason `Google Play not onboarded`.

Credentials come from `/multi-agent:setup`; never prompt for a secret value in chat.

## Step A  -  running-app sweep (unless `--skip-sweep`)

No booted device: `Sweep: SKIPPED (no booted device)`, continue, never omit the line. Else run `$HOME/.claude/commands/sim-test.md` light + dark + large-text over every screen; findings go into Step 7.

Store screenshot set (optional): when the repo carries one (or the user names its folder), `store_screenshot_check` checks every image against the sizes `store_screenshot_sizes` lists for the platform; findings go into Step 7 as advisory Gate 1 lines. Rendering a new set with `store_screenshot_render` is the `store-screenshots` skill's job, not this command's. Toolkit absent: skip silently.

## Step 3  -  obtain the build

Read `$HOME/.claude/multi-agent-refs/store-ready/build.md` for Step 3. Always: an `.ipa` alone makes **Gate 1 `SKIPPED (needs .xcarchive)`**; an `.apk` **lists the rules it could not apply**; state provenance; Mode A worktree **never under `$HOME`**; never audit a debug artifact; a failed build halts.

## Step 4  -  Gate 1, static package audit

iOS `ios_app_store_audit({archive_path, rules: "all"})` per `apple-archive-compliance`; no dSYM is a blocking `[SYMBOLS]` finding. Android `android_apk_audit` plus the `google-play-compliance` 21 rules; a minified module with no `mapping.txt` is blocking `[SYMBOLS]`. Read `store-ready/gate-1-static.md` for Gate 1. `error` blocks, `warning` advises; keep every ITMS / Play code.

Build facts (optional): `binary_inspect` and `binary_strings_endpoints` on the same artifact add `[BUILD-FACTS]` findings to Gate 1 (get-task-allow or a non-store profile on the `.ipa`, ATS arbitrary loads, Android `debuggable`, cleartext endpoints); with `--previous=`, `binary_compare_versions` adds a `Release diff` block. Toolkit absent or the tools not listed: skip silently. Rules: `$HOME/.claude/multi-agent-refs/features/build-facts.md`.

## Step 5  -  Gate 2, the store's own validation

iOS: `ios_testflight_validate({ipa_path, platform: "ios", <credential args>})`, verdict exactly as returned; `SKIPPED` is **never rendered as a pass**. With App Store Connect onboarded, check the build number via `store_asc_apps` + `store_asc_next_build_number` (read-only).

Android, attended and onboarded: call `store_play_validate_bundle` without `confirm` for the plan, show it, ask (`header` `Play check`, labels `Validate on Play` / `Skip`); only on **Validate on Play** call again with `confirm: true`. Skip reports `SKIPPED (no local Play validator)`, reason `user declined the upload`. Otherwise do not call it. `bundletool validate` is Gate 1, never reported here. Verdict rendering and build-number detail: `gates.md` "Gate 2".

## Step 6  -  Gate 3, policy review

iOS `ai-ios-toolkit:app-store-review`, Android `ai-android-toolkit:play-store-review`, against repo source, `Crash symbolication` row included (`store-ready/gate-3-policy.md`). Each area is `pass` / `fail` / `not-applicable` with evidence; `not-applicable` needs a reason.

## Step 7  -  report

Write `~/StoreChecks/<platform>-<repo>-<branch>-<timestamp>/report.md`; read `store-ready/report.md` for the layout and rules. A skipped gate is never in the pass count (`2 of 3 gates cleared, 1 skipped` at best); `Before rollout` (`Halt thresholds`, rollback / forward-fix owner) is human-filled, never inferred; no AI attribution.

## Step 8  -  offer the next action, do not take it

Print and stop the `store-ready/report.md` "Next actions" (upload stays a human act). Never upload a build for release, never commit a Play edit, never bump the build number, never commit.

`/multi-agent:testflight-validation` (iOS-pinned) and `/multi-agent:test "store-ready"` resolve here.
