system of record · agentic work

Your next agent starts where the last one stopped.

lema is shared project state for humans and coding agents. Checkpoints, settled decisions, rejected approaches, and the reasons why — established once, delivered to whoever picks the work up next.

Claude Code today · any MCP-capable harness · open protocol

Guard — closed decision touched Live

This edit reaches for a Redis cache. [d_82f3c1] Postgres is the only datastore — the Redis alternative was rejected 2026-05-11: operational surface over win. Surfaced, never blocked.

State Brief
run r_7c19e4 · lema/lema · feat/brief-cache
fresh · 4m
ObjectiveShip the compose cache for the State Brief endpoint; p95 under 400 ms.[d_31c07a]
CheckpointCache keyed by ruling head; invalidate on new ruling event. Next: wire invalidation into the settlement listener.[ck_5520b9]
In flightapps/api/internal/brief/compose.go · compose_test.go[r_7c19e4]
Tests41 passed · 0 failed — go test ./internal/brief, 18 m ago. Web suite: no recorded status.[obs_9a02c4]
SettledPostgres is the only datastore; no side caches beside it. Briefs cite or abstain — no uncited synthesis.[d_82f3c1] · [ADR-0107]
RejectedRedis read-through cache— killed 2026-05-11: a second datastore adds operational surface the win doesn't cover.[d_4477aa]
ConstraintFail open: the endpoint must degrade to uncached compose.[d_66d1f0]
Nearbyr_c44b02 (agent) active in apps/api/internal/repo — no file overlap.[runs]
OpenRate limit for the brief endpoint — the record is silent.[—]
run r_7c19e4 · claude-codeLive
  1. session start · feat/brief-cache
  2. checkpoint · cache keyed by ruling head
  3. files · compose.go, compose_test.go
  4. observation · go test: 41 passed
  5. compact — checkpoint captured

Public · tokenless Live

Ask why they ruled it out — on a repo you don't even own.

The same why-engine runs over public projects, baked to api.lema.sh with zero config. One command, no account: ask whether an approach is already settled in React, Kubernetes, Rust, Vue, or Go — and get the recorded reason, cited, or an honest no_recorded_ruling → proceed.

ReactKubernetesRustVueGo

Same verb, your own record: point it at your workspace and resolve answers over the decisions your team has settled.

public why-engine · no auth
$ npx lema-mcp try react
connected · react · public workspace · read-only

check_approach("react", "share logic with a mixin")
  ruled_out — mixins were dropped: wrapper hell,
  implicit dependencies, name clashes. Hooks compose
  instead. [reactjs/rfcs#68]

check_approach("react", "colocate data fetching in a component")
  no_recorded_ruling — proceed. Nothing on file rules this out.

The thirty-second arc

From stopped to started, with nothing lost between.

One thread of work, two harnesses, zero handoff meetings. Capture rides harness hooks; the human only does the irreducible part — the ruling.

The surface

Four objects. That's the whole vocabulary.

Everything a team or an agent touches in lema is one of these. No dashboards to babysit, no wiki to garden.

State Brief

Live

What a worker — human or agent — receives at start: objective, last checkpoint and next action, files in flight, test status, settled decisions in scope, rejected approaches, governing constraints, related active runs, unresolved questions, freshness. One screen, scannable in ten seconds. Every line cited. Silence stated honestly — never fabricated.

ObjectiveShip the compose cache; p95 under 400 ms[d_31c07a]
SettledPostgres is the only datastore[d_82f3c1]
TestsWeb suite: no recorded status[—]

Run

Live

One session of work by one actor, identified across harnesses. Runs join the same thread of work via a deterministic ladder — explicit id → PR or issue → repo+branch → repo+worktree → … → honestly unassociated. Full timeline: checkpoints, files touched, observations.

startcheckpointobservationcompact

Settlement Card

In preview

The boundary object on every PR: compares what the diff did vs what was said vs what's settled. Catches undescribed changes, drafts candidate decisions; the human rules inline. Inference can draft a ruling — it cannot create one.

DID

Backoff now exponential

SAID

"Fix retry flakiness"

SETTLED

No ruling on backoff

The Record

Live

The settled, cited, superseding-only history. Decisions plus the deliberation that led to them: who ruled, on what evidence, superseding what — and what was rejected, and why. Append-only. Supersede, never edit.

d_20ee01 · supersededshadcn/ui for componentssupersedesADR-0112 · settledHeroUI v3 component libraryrejectedMUI v6

The contract

Four questions, answered on arrival.

Every brief answers these before a single token of work is spent re-discovering them.

01

What are we trying to accomplish?

The objective, cited to the decision that set it. [d_31c07a]

02

What is already settled?

Decisions in scope and rejected approaches — with the why. [d_82f3c1]

03

What changed?

Last checkpoint, files in flight, latest observations. [ck_5520b9]

04

What should happen next?

The next action, carried across sessions and harnesses. [ck_5520b9]

Design principle

Automate everything up to the judgment. Never the judgment.

Where lema sits

Unblocked finds and synthesizes organizational context. ByteRover and mem0 remember context across agents and sessions. lema establishes and advances the project state that humans and agents are expected to work from.

Built to be trusted

A system of record, not another memory blob.

Adjudicated, append-only, superseding-only. Who ruled, on what evidence, what it replaced.

Append-only record

Nothing is edited in place. Supersede, never edit — the history of the history survives.

Actor provenance

Every event carries an actor: user, agent, or system. Agent-authored material is admissible but marked, low-trust, expiring — it never silently becomes policy.

Server-adjudicated status

Extraction only ever drafts. A human ruling creates the record. Judgment stays human.

Fails open

Capture never blocks a session. Guards surface, never deny. Wrong joins are reversible without record damage.

Neutral across harnesses

No vendor's memory silo. Claude Code today, Codex next; the protocol is open.

Enterprise plumbing

SSO and enterprise auth via WorkOS. Postgres. Go and TypeScript. Ships dark behind flags.

Stop re-briefing your agents.

The lazy path becomes the correct path: capture rides harness hooks, briefs are injected, candidates are drafted. Humans only rule.