Local-First (Local Pipeline)

A design approach that runs tasks on local hardware (Macs) before relying on external cloud AI. Preprocessing and information extraction are executed on in-house compute resources first to conserve cloud quotas and avoid usage fees.

General Meaning

Many AI systems send every input directly to external cloud LLM APIs for processing. However, that approach exposes operations to API rate limits, growing pay-as-you-go costs, service interruptions during network outages, and privacy risks from transmitting sensitive data off-premise.

Local-First architecture attempts processing on local hardware models and scripts before sending anything to the cloud. Tasks solvable on local machines finish locally, and only tasks that exceed local capabilities are selectively delegated to cloud providers.

Why It Matters

  • Zero marginal API cost and no quota limits: LLMs running on local machines operate for the cost of electricity alone, unaffected by external token caps or daily rate limits.
  • Autonomy during external outages: Local processing continues independently even when internet connections degrade or external AI services suffer outages or quota cooldowns.
  • Security and least privilege: Keeps sensitive files and raw shell access away from external APIs, passing only curated text snippets when necessary.

How the Site Factory Uses It

In the Site Factory, under operational rule K104 and ops/local-first.md, every job registered in Cloudflare D1 starts in the local stage. Even when external AI quotas are on cooldown, local jobs are claimed and executed through a separate lane on Mac mini, Studio 1, and Studio 2 (serialized via the heavy lane of mini-queue).

Local models receive only task text (capped at 81 lines and 9,000 characters) with no shell, external network, or secret access. For simple extraction (source.local_extract), the local model extracts specified lines and terms while the parent worker verifies source quotes and input hashes. Artifacts that pass local verification are never re-ordered from external AI; if local processing cannot finish the task, the worker records the model name, digest, benchmark source, input hash, attempt results, and escalation reason before handing off to external AI.

Caveats & Operational Rules

  • Do not treat preliminary extraction as full task completion: Extracting a draft with a local model does not mean the entire task is done; the parent worker must verify the artifact and citations before marking completion.
  • Never bypass the local stage just because external quota is free: Assigning untouched tasks directly to external AI without passing through the local pipeline is prohibited.
  • Do not finalize new proposals or operator escalations locally: Adopting new site proposals or deciding whether human operator action is required always demands verified execution logs from top-tier models (Opus, Sol, or Gemini Flash high).

Related Terms

References

  • Reference: Martin Kleppmann et al., "Local-First Software: You own your data, in spite of the cloud" (Paper, 2019)

Verified: 2026-11-08