Back/Engineering/Cursor
AdvancedEngineering

How to Build a Multi-Device App Using a Structured AI Coding Workflow in Cursor

Build a multi-device fitness app by proving the smallest voice-to-structured-data loop first, then use Cursor for scoped planning and implementation while Xcode, physical devices, version control, and privacy constraints provide the feedback the agent cannot infer.

How to Build a Multi-Device App Using a Structured AI Coding Workflow in Cursor

Terry shows a voice-driven workout logger across Apple Watch and iPhone, traces it back to a voicemail-and-spreadsheet prototype, then explains his Cursor rules for PRD creation, independent review, small committed execution phases, refactoring, and learning the generated code.

Before you start

What you need

  • A narrow workout-logging job and a manual proof of the flow
  • A supported Mac, Xcode, Cursor, Git, iPhone, and Apple Watch
  • An Apple developer setup and test entitlements
  • A schema for transcript, exercise, weight, repetitions, time, and sync state
  • A privacy plan for voice, health, account, analytics, and retention data

What you’ll make

A version-controlled iPhone and Apple Watch prototype that captures a spoken workout, shows the parsed record for correction, syncs it reliably, and presents basic history without hiding failures or losing data.

Tools used

Step by step

The workflow

Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.

7 steps

Step01

Validate the Core Concept

Prove the core job with the smallest possible loop: record a workout note, transcribe it, parse it into a spreadsheet or local fixture, and correct the result. Use this to define the schema and failure cases before building two apps.

Step02

Set Up a 'Dual-Wielding' Development Environment

Use Cursor for code navigation and edits, but use Xcode for signing, entitlements, builds, simulators, device logs, and Watch deployment. Start from a clean repository and document the exact build targets and commands.

Step03

Create a Product Requirements Document (PRD)

Write a scoped PRD for one end-to-end milestone. Define the phone and watch roles, data model, account and sync behavior, privacy, offline states, correction flow, analytics, non-goals, and acceptance tests.

Example prompt
Write a PRD for the next milestone of [app]. User job: [job]. Devices: iPhone and Apple Watch. Define the data model, source transcript, parsing and correction, sync states, authentication, offline behavior, privacy, error recovery, non-goals, and physical-device acceptance tests. Label assumptions and open questions.
Step04

Review the PRD with a Second AI Agent

Have a fresh model review the PRD as if it had no prior context. Ask it to identify missing interfaces, platform constraints, failure states, and ambiguous requirements, then resolve the findings in the document.

Example prompt
Review this PRD with no assumed context. List missing decisions, contradictory requirements, Apple platform or entitlement risks, sync and offline edge cases, privacy gaps, and tests another agent would need to execute it. Do not invent answers. Rate implementation readiness only after listing evidence.

Treat the readiness score as a summary. The cited gaps and unresolved decisions are the useful output.

Step05

Execute Code in Small, Reversible Chunks

Turn the reviewed plan into small phases with explicit files, tests, and stop conditions. Commit before the phase, run it, inspect the diff and device behavior, then commit the passing result before continuing.

Example prompt
Implement phase [number] only. Stay within [files and behavior]. Build the affected targets, run [tests], and stop on the first failure. Do not use placeholder data or weaken checks. Summarize the diff and wait before the next phase.
Step06

Refactor Code for AI Collaboration

After the flow works, identify large or tangled files, duplicated logic, and high-context modules. Refactor one seam at a time with behavior tests and physical-device builds so cleanup does not silently break sync or recording.

Example prompt
Propose a behavior-preserving refactor for [area]. Explain the current responsibilities, target boundaries, migration phases, tests, build checks, and rollback. Change one phase at a time and stop if behavior or device builds differ.
Step07

Use AI to Learn and Verify Code

Ask Cursor to explain each changed component, data path, platform API, and failure state in plain language. Trace one workout from recording through parse, correction, sync, and history, then record that explanation in the pull request or project notes.

Example prompt
Explain this implementation to its owner. Trace one workout from watch recording through transcript, parsing, user correction, phone sync, storage, and history. Cite the relevant files and functions, identify failure handling, and quiz me on the parts I should understand before maintaining it.

What good looks like

  • The watch and phone use the intended account and show clear queued, sent, received, failed, and corrected states.
  • Speech parsing preserves the transcript and lets the user fix exercise, weight, units, and repetitions.
  • The critical flow works on physical devices in realistic gym noise and intermittent connectivity.
  • Each implementation phase has a reviewable diff, passing build and tests, a commit, and an explanation the owner understands.

Build your next product with ChatPRD

Turn an idea into a PRD, user stories, and a plan.

Try ChatPRD free

After the steps

Runbook notes

How to recover when the loop fails and where human judgment helps.

Recover

If it goes sideways

The flow works in simulators but fails on physical devices, background execution, or a weak connection
Test each milestone on paired hardware, add explicit sync states and retry, and simulate offline recovery.
Speech recognition turns a plausible transcript into the wrong exercise, units, weight, or repetitions
Keep the raw transcript, show parsed fields before final save, add confidence thresholds, and make corrections quick.
Large Cursor rules consume context and still miss task-specific details
Split creation, review, execution, and refactor guidance into short rules and attach only the relevant files and constraints.
The agent keeps coding after a failed build or creates a huge unsafe diff
Use phased checklists, stop on build or test failure, inspect diffs, and commit only small reversible milestones.
Voice, health, credentials, or personal workout data is logged or committed unnecessarily
Minimize collection, use platform security, keep secrets out of Git, restrict logs, and document retention and deletion.

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready