Offline-First Behaviour Spec for a Mobile App
Decide what works without a connection and how conflicts are resolved.
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
Write an offline behaviour spec. App purpose: [APP_PURPOSE]. Data the user creates or edits: [USER_DATA]. Backend and sync approach: [BACKEND]. Typical connection problems: [CONNECTION_ISSUES]. For each type of data state whether it can be viewed offline, created offline and edited offline. Define the sync order, how a change is queued and retried, and what the user sees while changes wait. Describe conflict cases, such as the same record edited on two devices, with a rule for each: last write wins, merge fields, or ask the user. Return a table of data types and rules, a list of messages shown to the user in plain words, test scenarios for aeroplane mode, a flaky connection and a long offline period, and the limits of what the spec guarantees. Flag any data that must never be stored on the device without encryption. Walk through three concrete scenarios so the rules can be tested: a user adds a note on a train with no signal and later opens the app on a tablet; two family members edit the same item while one is offline; and the user logs out while changes are still waiting. For each scenario state the expected result, what the user sees at each moment and what is stored on the device. Add a section on storage limits: how much data the app may keep offline, how old data is cleared, and what the user is told when space runs short. Describe how the app signals sync status without nagging, for example a small indicator and a details screen showing the last successful sync time and any items that failed. Include a plan for testing conflicts using two devices and a script that toggles the network, and list the metrics that show sync health in production: failed syncs per day, average delay, and conflicts per hundred changes. Finish with the data that must never be written to local storage in plain form.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.