Product case study · Native macOS

MemoryPilot app icon

MemoryPilot

A safety-first memory orchestration utility for people running local AI and Parallels virtual machines on the same Mac.

Role
Product design, architecture, implementation, testing
Platform
Apple silicon · macOS 14+
Stack
Swift 6 · SwiftUI · SwiftPM
Status
Functional development milestone
THE PRODUCT IDEA

Local AI should be able to use a powerful Mac without turning every running virtual machine into a manual memory-management chore.

On Apple silicon, local models and virtual machines draw from the same unified memory pool. A heavy model load can rapidly reduce headroom, increase compression and swap activity, and degrade the entire system.

The obvious response—suspend some VMs—is also the dangerous one. A useful product has to know which resources are deliberately managed, whether they are active, what the host is actually doing, and whether the app owns the state it may later reverse.

Design question

How do you make automation genuinely helpful without hiding risk or guessing what the user intended?

02 · Workflow

A control loop that explains itself.

The UI and engine share the same decision language, so monitoring, recommendations, actions, and audit history tell one coherent story.

01

Observe

Read host memory, recent trends, local activity, credible LLM growth, and fresh Parallels state.

02

Reconcile

Match discovered resources to explicit tracking choices and unambiguous app-owned suspension records.

03

Decide

Apply sustained thresholds, hysteresis, cooldowns, priorities, locks, and protection rules.

04

Explain

Show the next likely action—or the reason no action is appropriate—before anything changes.

05

Revalidate

Perform fresh identity, state, and safety checks immediately before a supported command.

06

Audit

Persist the result locally, record ownership, and use conservative startup reconciliation.

Host intelligence

More than a percentage

Physical, used, available, compressed, swap, growth, trend, paging, compression churn, and inferred pressure signals from Mach and sysctl.

Resource control

Explicitly managed VMs

Per-VM tracking, permanent protection, manual in-use locks, priority, minimum idle time, automatic-resume preference, and temporary exclusion.

Local AI awareness

Credible process matching

Configurable detection for Ollama, LM Studio, llama.cpp, MLX, and Python transformer workloads, with stricter matching for generic Python processes.

Recovery

Ownership-aware resume

Only confirmed app-owned suspensions are eligible for automatic resume. Recovery is gradual and defaults to reverse suspension order.

Operations

Local, inspectable state

Atomic JSON persistence, bounded audit and metrics history, notifications, diagnostics, policy profiles, menu-bar access, and simulation scenarios.

Testing

Disconnected verification

Unit tests and deterministic simulation run without Parallels. Simulation has no route to the real provider.

04 · Safety engineering

What the app refuses to do is part of the product.

BOUNDARY

No generic power API

The provider has no capability for shutdown, stop, reset, restart, process termination, or arbitrary commands.

DEFAULT

Paused + observe-only

Every process launch starts with automation paused; onboarding keeps observe-only enabled.

IDENTITY

Exact UUID matching

Fresh JSON discovery must produce one exact, valid match before any supported action can run.

AMBIGUITY

Fail closed

Unavailable CLI, malformed data, duplicate identities, or incomplete reconciliation block automation.

PRIVACY

Local by design

No analytics, networking, cloud account, root helper, or guest credentials. Logs hash VM identifiers and omit sensitive arguments.

05 · Architecture

Portable policy, native integration.

Core decision logic stays independent of the UI and Parallels, while the macOS target supplies monitoring, persistence, providers, and focused SwiftUI presentation.

01

Ownership is state, not a guess.

A VM being suspended does not mean the app suspended it. Persisted ownership plus conservative reconciliation prevents automatic resume from adopting a user’s manual decision.

02

Memory pressure needs context.

Allocation alone is not a crisis. Headroom, swap growth, paging, compression churn, sustained duration, and trajectory produce a more credible signal.

03

Urgency still needs bounds.

Severe pressure may justify a rapid sequential response, but every candidate is rechecked and every burst has a hard limit.

04

Incomplete visibility should increase caution.

Without precise window-to-VM attribution, foreground Parallels use protects all running VMs. The fallback is deliberately conservative.

Current state

A functional milestone, not a finished claim.

The native app, monitoring, discovery, decision engine, persistence, simulations, tests, and operational safeguards are working. Distribution hardening and deeper optional activity signals remain ahead.

Next milestones

  1. Validate stable additional Parallels fields without inspecting guest content.
  2. Add optional Accessibility correlation with a conservative fallback.
  3. Package, sign, notarize, and validate login-item behavior.
  4. Expand rule editing, history aggregation, and UI automation.

More work

See how MemoryPilot fits the wider systems practice.

Explore infrastructure, local AI, cybersecurity, and troubleshooting projects across the portfolio.

Return to selected work