Read the Store Before You Trust the Repo
The project file on main said the iOS app was at one version, so the next release would be that number plus one. App Store Connect already had that next version in TestFlight. It had been built from a branch, uploaded, and then reverted from main to keep main clean. The revert didn’t un-upload anything, and App Store Connect rejects a version and build number it already has.
That was July. The Hello Weather iOS release runbook now starts with a step zero: read the store before picking a version. This post covers that preflight, the read-only status tool behind it, and the other way the store feeds QA, through customer reviews.
Step zero: the store knows more than the repo
Internal TestFlight builds are the common case for us. Most are cut from a feature or design branch, uploaded so someone can test on a real phone, and then the version bump is dropped from main. The upload is permanent. So main’s version number can lag the true latest.
The release skill’s first step is to run bin/appstore status from the web repo and note the highest version in its BUILDS section. That’s the real last release, and the next version is picked from it. A version that already has an uploaded build is spent. If more fixes land before submission, the release is cut again as the next patch version. The build number is never bumped instead. That rule came from the owner in September.
A read-only view of App Store Connect
bin/appstore status wraps the App Store Connect API and only reads. It answers the questions people ask the web UI every release:
- What’s live? The version for sale, its build, its release date, and its phased-rollout state, such as day 3 of 7. It also cross-checks the public App Store listing, so a rollout or propagation lag shows up.
- What’s in flight? The newest version that isn’t live yet, its state, how long it’s been there, and whether its build has finished processing. An approved version also says how it will release: manually, on a date, or automatically.
- What builds exist? Recent uploads, newest first, with processing state, age, expiry, and TestFlight state.
- What’s wrong? Alerts print at the top: a rejection, a recent invalid build, a submitted version whose build isn’t valid yet, a paused rollout.
A --json flag prints the whole model, so any follow-up question can be answered from one call. “Did the build process?” and “what’s the rollout at?” become one command an agent can run and quote.
Bump every target or none
An iOS app with a Watch app and widgets has a version number in several places in the project file. Missing one leaves an extension on the old version, and App Store Connect rejects an app whose extensions don’t match. The skill doesn’t trust a find-and-replace to get them all. It counts the old version string before editing. After the edit, the new count has to match that number and the old count has to be zero.
The same caution applies to what the release contains. The skill reviews every change since the last release commit, sorted into user-facing and internal. It also reviews the web repo. A new data source or field added on the server can show up in the app with no iOS code change, so an iOS-only git log would miss it in both the release notes and the QA pass.
Preview, then apply
After the release PR merges, a checklist goes into the release issue and gets ticked line by line. Every command that changes the store runs as a preview first. --apply follows only on the owner’s word. The checklist covers deciding the release type, archiving and uploading, confirming the build is valid, filling the release notes in every language, and the submit.
Two gotchas in that list came from real releases. An archive made in Xcode’s usual window comes from the main checkout on main, which has neither the version bump nor the branch. In November the first archive came out as a version that had already shipped. So the person now checks that Xcode’s Organizer shows the new version before uploading. The second gotcha: a new worktree’s first archive can fail with “Missing package product” on every package, because its shared Swift package cache is older than the pinned versions. The fix is to fetch that package’s cached repo, reset package caches, and archive again.
Reviews are a bug report channel
The store also sends information the other way. Written reviews carry bug reports too. The web repo’s appstore-reviews skill pulls every written review into a local SQLite database. App Store Connect’s API gives written reviews only, not bare star ratings. The skill then builds a short queue: unanswered reviews from the last 30 days, worst first.
For QA, the useful part is the theme analysis. Reviews get exported and grouped into themes like crashes, widgets, the Watch app, accuracy, radar, and localization. Each theme gets its volume, its rating skew, its trend, and the issue that covers it. A theme without a covering issue becomes one. An earlier post describes the same idea for the support inbox.
Replies are public and permanent, so they have a firm approval gate. For each review, the agent drafts at least three replies that differ in length and tone, and shows the person the full text of each. Previews get cut off, and the person has to read every word that will be posted. The agent then posts only the draft the person chose, exactly as shown. The reply command is pre-approved in the permission rules, because the choice is the approval.
Results
- The version is picked from the store, so the July mistake has a step that catches it.
- One read-only command answers most release-status questions, for people and agents alike.
- Review themes turn into issues. The reply goal is no unanswered review newer than seven days.
- The cost: the release skill is about 200 lines, and the status tool is one more script to maintain as Apple’s API changes.
Lessons Learned
- Take the next version from what the store has, not from what
mainsays. - Treat a version with an uploaded build as used up. Re-cut as a new version.
- Count version strings before and after a bump, and require the old count to reach zero.
- Give people and agents a read-only status command, so status questions don’t need write access.
- When an agent posts in public, the person’s choice of a full, unedited draft is the approval.
The skills
Adapted from the iOS release skill, the web appstore-status skill, and the web appstore-reviews skill. bin/store stands in for your own read-only App Store Connect wrapper.
---
name: release-preflight
description: iOS release and internal TestFlight preflight - read App Store Connect first, pick the version, bump every target, review what changed, and walk the release checklist. Use when cutting a release, preparing a TestFlight build, or asking what is live, in review, or processing.
---
# Release preflight (iOS)
## Read the store first
`bin/store status` is a read-only view of App Store Connect:
- **LIVE:** the version for sale, its build, release date, phased-release state (day N/7) and
a public lookup cross-check.
- **IN FLIGHT / REJECTED:** the newest not-yet-live version, its state and how long it has
been there, the attached build's processing state. An approved version also shows how it
releases: manual, scheduled, or automatic.
- **BUILDS:** recent uploads newest-first, with processing state, age, expiry and TestFlight
beta state.
- **Alerts:** a rejection, a recently uploaded INVALID/FAILED build, a submitted version whose
build isn't VALID yet, a paused phased release.
`--json` exposes the full model for any follow-up question.
## Pick the version
The repo can lag the store: internal TestFlight builds are often cut from a branch, uploaded,
then reverted from `main`. The upload is permanent, and App Store Connect rejects any
(version, build) pair it already has. So:
1. Note the highest version in BUILDS. That is the true latest.
2. Pick the next version off that, not off the project file.
3. A version that already has an uploaded build is spent. Re-cut as the next patch; never
bump only the build number.
## Bump every target
Measure the count of `MARKETING_VERSION = <old>;` in the project file before editing. After
the edit, the new count must equal it and the old count must be zero. Missing a target leaves
the Watch app, widgets or another extension on the old version, and App Store Connect rejects
an app whose extensions don't match.
## Review what changed
Find the last release commit and read every change since then, sorted into user-facing and
internal. Also review every repo that feeds the app (backend, shared libraries): server-side
changes can show up in the app with no app code change, and they belong in the release notes
and the QA pass too.
## Release checklist
Copy into the release issue and tick each line as it lands. Every command that changes the
store runs as a preview first, then `--apply` on the owner's word.
```markdown
- [ ] Release type decided: after approval / manual / scheduled date; phased rollout or not
- [ ] Release PR merged; full test gates passed
- [ ] Archived from the release branch (not `main`) and uploaded; Organizer showed the new
version before upload; build VALID in store status
- [ ] TestFlight / physical-device QA done on the uploaded build
- [ ] Release notes in every locale (the submit is rejected until none is missing)
- [ ] Submit preview checked; submitted on the owner's word
- [ ] Approved and released; phased rollout watched
```
## Gotchas
- Archive from the release branch. The IDE's usual window is the main checkout on `main`, and
an archive made there has neither the bump nor the branch.
- A new worktree's first archive can fail with "Missing package product" on every package
when the shared SwiftPM cache is older than `Package.resolved`'s pin. Fetch that package's
cached repo, reset package caches, and archive again.
- If urgent, pause a phased rollout before cutting a fix version.
## Retiring a TestFlight beta
A useful pattern: a compile-time flag that replaces the whole app with a "beta closed"
screen (no services, no onboarding, no data fetching) that thanks testers and links to the
App Store, optionally with offer codes. Build it to TestFlight only, then revert the flag on
`main`. Never ship it to the App Store.
---
name: review-triage
description: App Store and Google Play review triage - pull into SQLite, find bugs and themes, draft and post public replies with approval. Use for "review triage", responding to store reviews, analyzing review themes, or a growing unanswered count.
---
# Review triage
## Data
- App Store Connect exposes written reviews only; the aggregate star rating comes from the
public lookup API.
- `bin/store reviews pull` loads the full corpus with responses into a disposable SQLite file.
Ad-hoc SQL covers anything the CLI doesn't: by-territory averages, monthly trends, and
searching old replies for voice.
- One response per review. Posting again replaces it. Replies are public and notify the
reviewer.
## The reply session
1. Pull, then build the queue: unanswered reviews from the last 30 days, worst-first. Older
unanswered reviews are out of scope; don't re-surface them.
2. Create one task per review so progress survives interruption.
3. For each review, offer at least three meaningfully different drafts, from the shortest to
the warmest. Show the complete reply text for each (plus an English gloss for non-English
drafts); never a truncated preview. One to three reviews per round.
4. Post only the draft the person chose, verbatim: never edited, never unshown. Their choice
is the approval. Skipping is always fine. If they ask for new drafts on any review in a
round, post nothing from that round until all its replies are settled.
5. Confirm nothing in the window is still unanswered.
## Reply rules
- Search past replies (and support mail, if available) before drafting, and reuse what worked.
- 1-4 sentences. Reply in the reviewer's language.
- Never promise roadmap items, mention competitors, offer compensation, or engage politics.
- Avoid absolute promises ("forever"); say "our goal".
- A bug report: thank them, give the first thing to try if there is one, and route them to
support for details. If a reply says "we've filed it", file it in the same session.
## Theme analysis (for QA)
Export reviews and group them into themes (crashes, specific screens, widgets, Watch,
accuracy/data, performance, localization, pricing, support). For each theme record volume,
rating skew, trend, and the issue that covers it. A theme with no covering issue becomes one.
Run quarterly, or when the rating drops or a theme spikes.