Locus

Locus

I built Locus as a local project workbench for coding agents. It starts from the open-source 1Code desktop foundation and turns it into a Locus-specific local-first environment for repository work, runtime setup, provider/MCP state, worktree boundaries, and pre-release security review.

2026 — Present

Locus is a local-first desktop coding-agent workbench re-engineered from a fork of 21st-dev/1code (Apache-2.0), focused on local execution, runtime/provider configuration, MCP state, agent guard policy, filesystem trust boundaries, release packaging, and AI-assisted pre-release security hardening.

Overview

Locus centers on a local-first Electron workspace for repository selection, chat sessions, worktrees, terminal/Git workflows, provider and runtime configuration, MCP state, SQLite-backed durable jobs, and release packaging. The main work is the architecture and review path that moved a forked coding-agent desktop app toward explicit local execution and trust boundaries.

Problem

A desktop agent workbench touches local files, credentials, terminals, MCP servers, provider settings, and release artifacts. The problem was to make those surfaces useful while making provenance, local execution, command consent, filesystem scope, credential handling, and unsigned preview-build limits explicit.

Role

I led product direction, architecture, security decisions, review, and integration for this fork, using AI coding agents heavily and deliberately as part of the development workflow. My work centered on local-only defaults, agent guard policy, provider/runtime and MCP boundaries, durable job surfaces, and pre-release hardening.

Context and constraints

The project started from a fork, so useful upstream compatibility had to be preserved while hosted product surfaces were removed or isolated.
Agent execution needed to work against real local repositories without sending local project paths, chats, provider keys, or credentials through unnecessary hosted paths.
Provider setup, local runtime detection, terminal tooling, and git workflows had to coexist inside one desktop app with a clear boundary between the inherited upstream foundation and Locus-specific subsystems.
Public source distribution and desktop installer distribution needed separate treatment because signing and notarization were not ready for broad public installer release.

What I built

A local-first product boundary with default local-only behavior, centralized hosted-service blocking, and clearer separation between user-owned providers and upstream hosted services.
Provider and runtime setup flows covering local detection, settings status, command discovery, and provider switching.
Repository-centered workflows with local project selection, chat sessions, worktree setup, terminal access, git diff/staging, and commit support.
Release and update surfaces that use GitHub Releases with user-confirmed checks/downloads instead of silent hosted update behavior.

Technical approach

Built on Electron, React, TypeScript, tRPC, Drizzle ORM, better-sqlite3, and electron-builder.
Kept desktop state local through SQLite and main-process storage boundaries, with renderer code using typed tRPC calls instead of direct credential handling.
Used OpenSpec proposals for larger product or security-sensitive changes so local-only, auth, updater, and command-guide work stayed reviewable.
Added packaging scripts, bundled runtime binaries, release manifest generation, and smoke checks to make internal test builds repeatable.

Outcomes

Re-engineered the forked 1code foundation into a local-first workspace for repositories, worktrees, terminal tools, provider setup, and SQLite state.
Made the privacy boundary explicit: hosted auth, upstream sandbox, telemetry, inbox, automations, and hosted updater paths are removed or guarded in the default build.
Shipped internal pre-release packaging work with clear unsigned-build labeling, manual GitHub Releases checks, and macOS/Windows release preparation.
Delivered a concrete desktop engineering project spanning runtime/provider integration, trust-boundary hardening, and release operations.

Reflection

The accurate ownership line is forked foundation plus substantial Locus-specific architecture and hardening. AI coding agents were part of the build process; my responsibility was deciding the product boundary, reviewing and integrating changes, and making local execution, credentials, MCP commands, files, and renderer output safer before release.