All work

SpellType

Private AI autocomplete, taken from first prototype to public macOS release in about three months.

I built private inline autocomplete across ten Mac writing apps, owning model adaptation, native integration, backend services and public release in about three months. SpellType has reached 500+ users without advertising. I continued reshaping the architecture around real editor behavior and used activation evidence to simplify the consumer product to free unlimited access.

Role
Founder & Product Engineer
Platform
macOS · Swift/MLX · Cloudflare · JavaScript/SQLite
Status
Shipped · actively evolving
Period
Nov 2025 to present
Visit SpellType (opens in a new tab)
SpellType · first-party product demonstrationInline suggestions appear where the user is writing and can be accepted without leaving the current app.

Project evidence

500+ users
reached without advertising
<200 ms
median warm suggestion latencyEligible suggestion requests in an internal benchmark on an 8 GB Apple Silicon M1 Mac.
~3 months
first prototype to public releaseModel, native client, signing, distribution, and updates shipped together.
10 apps
writing apps supported and testedInline autocomplete across different text-field and Accessibility behaviors.

01 / The product I set out to build

Make autocomplete fit the way people already write.

I wanted useful autocomplete inside the apps people already used, with responsive suggestions, private writing and an 8 GB M1 Mac as a practical hardware constraint. I owned the product and engineering decisions needed to make those requirements work together, including a native interaction that avoids Screen Recording permission.

I built inline word-by-word suggestions that users accept with Tab while continuing their own draft. The onboarding tutorial runs a guided version of the same autocomplete pipeline, so people can learn the interaction before moving into another app. Writing, suggestions and extracted context stay on the Mac.

02 / Evidence that changed the architecture

Let real editor failures define the right boundaries.

My early implementation shared assumptions about how editors exposed text. Live probes showed that native fields, browser editors and rich documents failed in different ways; repeated local patches were preserving the wrong abstraction. I used AI-assisted investigation and reusable Accessibility probes to establish what each host could reliably tell the app.

I redesigned the system around host-specific adapters, application-owned context policy and typed boundaries between writing, autocomplete and model execution. That made ten app families supportable while keeping one editor's quirks out of the shared product logic.

Context needed the same care. I reconstructed nearby chat, email and document context with speaker and draft boundaries, including selected-response annotations, so the model could distinguish the user's current writing from the surrounding exchange. Context extraction and inference both remain local.

System model

A preemptible, on-device suggestion loop

The main path produces a current suggestion. A separate interrupt path cancels stale work when input changes, then restarts from the newest context.

Main suggestion flowApp-specific context becomes a current native suggestion.
  1. 01Local writing context

    App-aware draft and surrounding context

  2. 02Token healing

    Repair the changing token boundary

  3. 03Reusable KV prefix

    Reuse valid prefix computation

  4. 04OLMo 2 1B on MLX

    Local 8-bit inference

  5. 05Freshness gate

    Reject superseded completions

  6. 06Native suggestion

    Present only the current completion

Input-change interruptThis path cuts across active work. It is not another inference stage.
  1. EventInput changed

    Typing continues before inference completes

  2. CancelCancel stale request

    Preempt active work and discard stale output

  3. RestartNewest context wins

    Restart from the latest valid prefix

  • Input changedCancel stale requestinterrupt
  • Cancel stale requestNewest context winsdiscard stale work
  • Newest context winsLocal writing contextlatest context
Request ACancelled

Superseded work is discarded before it reaches the interface.

Request BCurrent

The newest context completes the main suggestion flow.

03 / Correctness at the user boundary

Make a suggestion safe to accept while everything is changing.

A delayed editor read or model response must not overwrite what a person just typed. I separated physical input, host delivery and resolved editor state, cancelled superseded work, and revalidated the draft, caret and editor before insertion. Tab acceptance is bound to the exact suggestion that was visible when the key was pressed.

Rich editors needed additional reconciliation because their reported text could lag behind a paste. I preserved input ordering until the host confirmed the edit, and fixed a cursor-positioning defect caused by treating UTF-16 offsets as character counts. When current text or position cannot be established, the app withholds the suggestion.

04 / Model choice and evaluation

Choose a model that continues the user's thought.

An instruction-tuned model offered straightforward prompt control, but the product needed to continue existing text with minimal latency and prompting overhead. I chose the smaller base causal OLMo 2 1B and adapted its continuation behavior directly.

I built a Python/MLX/MLX-LM pipeline with completion-only supervision and LoRA across all 16 transformer layers, using 1,680 cursor-position examples derived from 560 human-authored situations. The dataset used no private user writing or teacher-model output.

I kept training, validation, and test data separate, selected the checkpoint using validation loss, and evaluated 200 held-out cases against an unadapted 8-bit control. Comparing both models at 8-bit isolated adaptation from quantization; matched 8-bit and 4-bit evaluation then informed the deployment choice. I shipped 8-bit.

05 / The hot path

Keep inference responsive while the user keeps typing.

I designed local inference around selective activation, persistent KV-cache reuse, partial-word token healing, idle prewarming and bounded memory allocation. Preparing the next chunk ahead of acceptance lets the interaction continue without waiting for a fresh generation after every word.

I used Swift Concurrency to cancel and preempt obsolete work as input changes. On an 8 GB M1 Mac, eligible requests in an internal benchmark reached a median warm suggestion latency below 200 ms. Freshness checks ensure that a fast response still belongs to the current draft.

06 / Production delivery

Own the path from experimental system to public product.

I took the prototype to public release in about three months, owning the adapted model, native client, signed and notarized Mac distribution, verified model installation and signed auto-updates. A resumable installer validates the separately downloaded model before activating it and provides a repair path when installation fails.

I also built the customer-facing website, Cloudflare APIs and SQLite data model behind installation identity, artifact delivery and content-free analytics. These networked services support the product while authored text, extracted context and suggestions remain on-device. Automated checks and controlled releases connect the desktop app to the services it depends on.

07 / Product judgment after launch

Follow adoption evidence through a change in the business model.

I examined usage, onboarding, checkout and quota evidence to decide where to focus the product next. Helping people reach their first useful experience became the priority, so I simplified the consumer product from paid quota tiers to free unlimited access, removing account, checkout and quota requirements from the standard app.

I carried the decision through the app, website and backend while preserving compatibility with older signed clients. The same ownership that delivered the first release let me change the proposition safely as I learned from actual adoption.

Discuss the work

Bring me the next product problem.

I bring product judgment, hands-on leadership, and the engineering depth to take an important problem from the first decision through release. Let’s talk about what you want to build or improve.

Private source code

The production repository is private. I'm happy to walk through relevant source code, architecture, testing strategy, trade-offs, and implementation decisions during a technical interview.