StringStep Engineering Plan

StringStep Engineering Plan

Date: 2026-05-16

Status: locked P0 build plan; first local iOS slice is implemented and tested.

Product Center

StringStep is a visible safety Step that automatically becomes a private, searchable, beautiful timeline:

The loop is:

Start -> Record -> Retrace

Everything that does not make that loop feel magical waits.

P0 Promise

P0 is an iPhone-first product:

  1. Tap Start and the active UI appears in under 300 ms.
  2. The phone records audio and location visibly.
  3. Route, audio, and transcript state are captured local-first.
  4. Live location can be shared with one trusted viewer through a link.
  5. A stopped Step opens a snappy review shell in under 500 ms.
  6. The Step becomes a beautiful replay: map, movement, audio, transcript, check-ins, sharing events, and delete receipt.
  7. Private storage is encrypted; cloud transcription is optional and auditable.

Product Quality Bar

StringStep is only a good product if the basic loop feels obvious, fast, and trustworthy on an ordinary iPhone.

P0 must satisfy four quality bars:

  1. Instant confidence. Tapping Start must visibly change the app before any network work. The user should immediately see what is recording, who can see location, whether audio is private, whether transcription is enabled, and how deletion works.
  2. Beautiful retrace. The Step archive must feel like the product, not an admin log. Route replay, timeline scrub, transcript segments, recordings, check-ins, sharing events, and deletion state should read as one coherent story.
  3. Privacy honesty. The app must never blur the distinction between encrypted private storage and cloud transcription. If audio leaves the device for transcription, the user explicitly opted in and the UI says what happened.
  4. Failure grace. Airplane mode, screen lock, poor GPS, failed upload, low battery, expired entitlement, transcription failure, and delete retry should all produce understandable local state instead of broken screens.

The P0 product is not complete when the API accepts requests. It is complete when one person can use a real iPhone for a 20-minute locked-screen Step, lose network, stop, retrace locally, upload encrypted data later, share live location during the Step, and delete the Step with a receipt.

Current Build State

Implemented in the repo:

Validation as of 2026-05-16:

The important next jump is from simulated local Step state to real capture services: CoreLocation, AVFoundation, encrypted local queue, chunk manifests, and upload reconciliation.

Non-Goals For P0

Cut hard:

Product Screens

The iPhone app has three tabs:

Start

One primary button:

Start Step

Requirements:

Steps

The archive is the product, not a storage drawer.

Step detail must include:

Account

Account owns:

Transcription Modes

Auto transcription is core. The simplification is not removing transcription; it is making transcription honest and privacy-enabled.

1. Private Auto Transcript

Long-term default.

The iPhone transcribes after the Step ends using on-device recognition when available. Transcript segments are encrypted locally and uploaded only as ciphertext.

Copy:

StringStep can automatically transcribe your Steps without sending audio to StringStep servers or a third-party transcription provider, when your device supports private transcription.

2. Cloud Enhanced Auto Transcript

Practical MVP/beta path.

The user explicitly enables:

Automatically transcribe new Steps with cloud transcription.

Copy:

To create transcripts, your audio is temporarily decrypted and sent to our transcription provider. StringStep does not store plaintext audio or plaintext transcripts. Transcript results are encrypted before storage.

Do not say nobody ever sees plaintext when cloud transcription is enabled. Say:

Private storage is encrypted. Cloud transcription is optional and auditable.

3. Manual Transcript

Fallback for:

Transcript Preference Choices

Show during onboarding and in Account:

Transcript Badges

Every Step detail screen should show one of:

Transcription Architecture

Build transcription as a first-class pipeline, not a bolt-on job.

TranscriptionOrchestrator

Runs after Stop:

  1. Check account-level transcript setting.
  2. Check per-Step transcript override.
  3. Check battery, network, and Wi-Fi constraints.
  4. Prefer on-device transcription if available.
  5. Otherwise, if cloud enhanced transcription is enabled, enqueue cloud transcription.
  6. Emit transcript segments as start_ms, end_ms, text, source, revision.
  7. Encrypt transcript segment objects before durable storage.
  8. Align segments to the same timeline as map/audio.
  9. Add audit events for requested, segment stored, completed, failed, and deleted states without logging transcript text.

OpenAI Path

Use OpenAI transcription only after explicit cloud opt-in.

Implementation notes:

Maps

Beautiful map replay is core.

P0 map requirements:

MapReplayEngine owns:

Map quality gate:

Latency Targets

Action Target
Tap Start -> active UI under 300 ms
First route point visible under 1 sec
Check-in marker appears under 150 ms local
Stop -> review shell opens under 500 ms
First transcript segment after stop 5-15 sec for short Step on good network
Live viewer location refresh 1-3 sec while active
Scrub timeline/map/audio 60 fps feel; no network dependency

Local state wins first. Network reconciliation comes second.

Data Model

Minimal P0 tables:

Defer:

Protocol

Private storage path:

  1. Capture route/audio locally.
  2. Write encrypted chunks locally.
  3. Upload ciphertext chunks.
  4. Commit chunk manifests.
  5. Store metadata and audit events.
  6. Never require server-side plaintext for private route/audio/transcript storage.

Transcript path:

  1. Consent decision.
  2. On-device transcription when available.
  3. Cloud fallback only after explicit opt-in.
  4. Segment output.
  5. Encrypt segment objects.
  6. Store encrypted transcript artifacts and segment metadata.
  7. Delete transcript artifacts with the Step.

Local Capture And Queue

The iPhone owns the truth of an active Step. The server is a sync target, not the thing that makes recording feel real.

Capture Services

StepCaptureCoordinator should orchestrate:

Capture services should expose small event streams rather than large controller objects:

Encrypted Local Queue

The local queue must survive:

Queue records should include:

No raw private audio, exact route batch, or transcript text should be written to app logs. Debug builds may expose local diagnostics, but not plaintext user content.

API Surface

P0 routes:

GET    /health
GET    /v1/me
POST   /v1/devices/register
POST   /v1/sessions
GET    /v1/sessions
GET    /v1/sessions/:id
POST   /v1/sessions/:id/stop
POST   /v1/sessions/:id/check-in
POST   /v1/sessions/:id/urgent
POST   /v1/sessions/:id/upload-url
POST   /v1/sessions/:id/chunks/commit
POST   /v1/sessions/:id/transcripts
DELETE /v1/sessions/:id
GET    /live/:token

Use session internally if helpful, but user-facing copy says Step.

Failure Modes

These are product requirements, not edge cases.

Failure Required behavior
Microphone denied Start screen explains audio is unavailable and allows location-only Step only if policy permits.
Location denied Start screen explains route/live sharing is unavailable and blocks P0 Step unless location is enabled.
GPS accuracy poor Active UI shows low-confidence location and keeps trying; replay marks low-confidence segments.
Network offline Step continues locally; upload chip says queued/offline; live link chip says unavailable or stale.
App backgrounded or phone locked Audio/location continue under declared background modes while active Step remains visible through iOS indicators/notification where allowed.
Upload fails Queue retries with backoff; review remains local; user can still delete.
Transcription fails Step remains usable; transcript badge shows failed/retryable without losing audio or route.
Delete partially fails Local delete receipt shows pending server/object cleanup until confirmed.
Entitlement expired Existing Steps remain reviewable/deletable; new Step, live link, and new transcription jobs are blocked.

Security And Privacy Gates

Every implementation slice should answer these before merge:

Cloud transcription has an extra gate:

Billing

Keep the accepted pricing:

Use RevenueCat for iOS launch unless there is a strong reason not to.

The 90-day no-card trial is a server entitlement, not an App Store intro trial.

Expired users cannot:

Expired users must still be able to:

First Implementation Slices

Slice 1: Local Step Reality - Implemented Skeleton

Exit criteria:

Current status:

Slice 2: Real iPhone Capture

Exit criteria:

Slice 3: Encrypted Queue And Upload

Exit criteria:

Implementation details:

Slice 4: Retrace Experience

Exit criteria:

Product gate:

Slice 5: Transcription

Exit criteria:

Implementation details:

Exit criteria:

Implementation details:

Slice 7: Deletion End-To-End

Exit criteria:

Slice 8: TestFlight Readiness

Exit criteria:

Engineering Test Matrix

Minimum gates before TestFlight:

Area Gate
iOS unit tests Step model, archive store, transcription decisions, deletion receipts.
iOS device tests start/stop, background capture, locked-screen Step, permission denial, offline queue.
API tests create/stop/check-in/urgent/upload/commit/transcript/delete, auth once added.
Crypto tests envelope roundtrip, AAD mismatch, sequence hash chain, deletion tombstones.
Privacy tests grep/redaction checks for plaintext fields in logs and audit bodies.
Web live link tests stale state, expired token, revoked link, 1-3 second refresh behavior.
Performance tests start active under 300 ms, stop review under 500 ms, scrub 60 fps feel on representative Step.

Current Repo Anchors

Important files:

The local build now has uncommitted iOS slice changes on top of:

014c88b Refresh StringStep public plan

Do not treat planning docs as the product. The plan is only useful when each slice exits through tests and real-device behavior.

Bottom Line

Do not build a broad safety platform.

Build the magical core:

Start -> Record -> Retrace

Auto transcription is core. Beautiful maps are core. Snappy local-first UX is core. Everything else waits.