2026-11-26 15:47 UTC

Gnomon offers Git-like branching and review for PostgreSQL agent changes

state: significantheat: lowuncertainty: highrelevance: highagent-data database-versioning coding-agentsbitsinfra

What is this?

Gnomon is an open-source PostgreSQL extension and companion tools from bitsinfra, presented as Git-like version control for database data and schemas. Its GitHub repository, fetched on November 13, 2026, describes branches, diffs, review, merges, undo, time-travel queries, and agent-oriented workflows; the Hacker News post appeared November 14. The project says branches share the underlying database rather than copying it, and claims support for PostgreSQL 15–18, including managed services. These capabilities and compatibility are project claims: the supplied evidence offers no independent testing or adoption data.

Why it matters

Gnomon targets a practical barrier to deploying coding and data agents: letting them work on realistic database state without giving them unrestricted access to production or relying on blunt, whole-database rollback. If its controls work as described, branches, review gates, scoped permissions, and granular undo could make agent-written data changes safer to test and merge, while avoiding a separate database copy for each run. That could lower the cost of agent experimentation and shift some control toward database-native safeguards. Real-world reliability, performance, security, and operational trade-offs remain unverified here.

Current assessment

Gnomon’s repository presents an available PostgreSQL extension and companion tools for tracking selected data, creating shared-storage branches, reviewing row- and field-level diffs, merging, undoing, and supporting agent workflows with controls such as restricted roles and checks. The project lists PostgreSQL 15–18 and self-hosted and managed installations. These are project claims; the supplied evidence does not independently validate isolation, security enforcement, concurrency behavior, performance or storage costs, managed-service compatibility, or adoption. If the claims hold in practice, Gnomon could make agent changes against realistic database state easier to inspect and contain without a full database copy. A later Hacker News listing is unchanged and adds no substantive confirmation.

Measured heat

now 0 pts/hpeak 16 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 310h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

11-13 17:22 (minted)⭐ origin echo-reconstructedThe repository presents Gnomon as Git-like versioning for Postgres data, with database branches, diffs, review, merge, and undo, including w
bitsinfra on github (echo) · attributed from hn.story.50486480 · published time unknown
—
11-13 17:09first on hacker news · published · lag ?Gnomon. Git for Postgres data, built for agents
shawkisukkar
—
11-13 17:09amplified on hacker newshn.story.50486480
shawkisukkar
peak 22 · 11 comments · 45% of case engagement
11-23 14:03amplified on hacker news 👑hn.story.50611613
lucasluitjes
peak 34 · 6 comments · 55% of case engagement
11-13 17:21our radar first saw it · lag ?discovery anchor: hn.story.50486480—
pace: p70 vs 2096 stories at the 168h mark (now 310h old) — ahead of agentmall-grocery-checkout-automation (1.0x), behind abu-dhabi-openai-government-deployment (1.0x)

Evidence (3) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnGnomon. Git for Postgres data, built for agents
Retrieved article excerpt

Open article · Retrieved 2026-11-13T17:22:24.572955+00:00

# Gnomon

**Git for Postgres data, built for agents.** Give an agent its own branch of your real database,
as nothing more than a connection string. See every field it changed, merge it into main when it's
right, and undo it if it wasn't.

Gnomon runs inside the Postgres you already have. One extension, no copies, no second database.

```
create extension gnomon;
select gnomon.track('orders');                    -- history starts now, no backfill

select gnomon.create_branch('agent/refunds');
select gnomon.use('agent/refunds');

-- Every query from here on runs on the branch
update orders set status = 'refunded' where id = 4182;

select * from gnomon.diff('agent/refunds');       -- every row and field it changed
select gnomon.merge('agent/refunds');             -- three-way, type-aware, conflicts as rows
select gnomon.undo_merge(1);                      -- and back
```

- **Documentation:** <https://gnomon.bitsinfra.com/>
- **Install:** `create extension gnomon` on PostgreSQL 15-18, self-hosted or managed (RDS, Aurora,
  Supabase). See [Installation](https://github.com/bitsinfra/gnomon/blob/main/docs/installation.md).
- **New here?** The [tutorial](https://github.com/bitsinfra/gnomon/blob/main/docs/tutorial.md) takes ten minutes.

## A branch of production, in an instant

A branch reads everything from main and keeps only what it changes, so it opens instantly and
copies nothing, however big your database is. Give one to every agent run, every pull request and
every test.

Your application doesn't change. A branch is a connection string: point a session at it, and the
queries it already runs read and write the branch instead of main.

| Where | How |
| --- | --- |
| A session | `select gnomon.use('feature')` |
| One transaction (behind a pooler) | `select gnomon.begin('feature')` |
| A connection string | `gnomon branch url feature` |
| With the C module | `SET gnomon.branch = 'feature'` |
| A past moment | `select gnomon.use('main', '2026-10-31 23:59')` |

Schema changes come along too. Run a migration on a branch to add a column, rename one or create a
table, and main stays as it is until the merge, which brings the new shape and its data across
together.

## Review data like code

Every branch comes with a diff: each row and field it changed, before and after. Review it in your
browser, comment on a single row and settle conflicts side by side. When an agent is done, Gnomon
opens the review and sends you the link.

Add checks written in SQL, and Gnomon runs them on the merged result before the merge is allowed to
land. An approval covers what you saw: if the branch changes afterwards, it comes back to you.

## Merges that understand your data

When main and a branch change the same value, Gnomon doesn't just pick a side. Counts add up, JSON
merges key by key and text merges line by line. Anything that truly clashes becomes a conflict, for
a person to settle or for a query to resolve.

Branches merge into each other too, not only into main, and a single transaction can be picked from
one branch onto another. Undo works the same way: take back one transaction, everything an agent
did this afternoon, or a whole merge.

## Any moment, exactly as it was

Gnomon keeps the history of every table you track. Read the whole database as it was at any moment,
with the queries you already have, and get the same answer every time. When an agent makes a
decision, you can see exactly what it saw.

```
-- The open invoices at the end of October
select gnomon.use('main', '2026-10-31 23:59');
select sum(amount) from invoices where status = 'open';
```

The same history streams out as it happens, to Kafka, NATS or a webhook, and into dbt as snapshots
that keep deleted rows. Older history can move to object storage, and Gnomon brings it back when a
query reaches that far.

When a check that used to pass starts failing, `gnomon bisect` finds the transaction that broke it:
who made it, when and why.

## Safe to hand to an agent

One command gives an agent a database role, a branch of its own and a connection string. That's all
it needs, whatever it's built with. It reads and writes its branch, and the database refuses the
rest, main included, even when the agent asks for it by name.

```
# A database role, a branch of its own and a connection string
gnomon agent create support-bot
```

- **It merges only what you allow.** Merging is for the people you choose, or for an agent within
  rules you write: at most twenty rows, only these tables, every check passing. Postgres enforces
  them, whatever the agent is told.
- **Nothing leaves before you approve.** Emails, webhooks and payments an agent queues stay on its
  branch until the merge.
- **Every change has a name on it.** Each change records the agent, the run and the reason it gave.
- **Replay what it saw.** Gnomon records the moment of every read, so a replay returns exactly the
  rows the agent read.
- **Try a few ways at once.** Start several attempts from the same moment, compare their changes
  and checks, and keep the best one.
- **Stop it, and take it back.** One command locks an agent out, closes its branches and undoes
  what it merged, newest first.
- **Ready for your agents.** The Gnomon MCP server, on the agent's machine or over HTTP, lets it
  explore the schema, try a change without keeping it, and rewind its branch to a checkpoint.

## Build it into your product

The TypeScript and Python SDKs give each task your agents take on a run: a branch of its own, with
limits already set. Merge it, send it for review, or let it go.

```
import { Gnomon } from "@bitsinfra/gnomon";
import { nodePostgres } from "@bitsinfra/gnomon/pg";

const gnomon = new Gnomon({
  app: nodePostgres(appPool),   // your application's own login
  runs: nodePostgres(runsPool), // one login shared by every agent run
});

// A branch for this task, discarded unless it's merged or submitted
await using run = await gnomon.startRun({
  task: "Refund order 4182",
  actor: "support-bot",
});
await run.sql("update orders set status = 'refunded' where id = 4182");

const { checks, changes } = await run.summary();
if (checks.passed && changes.rows <= 20) await run.merge();
else await run.submit({ title: "Refund order 4182" });
```

Runs can't read each other's branches, even when they share one database login. Bring the agent
framework you already use: the Anthropic SDK, the Claude Agent SDK, the Vercel AI SDK, the OpenAI
Agents SDK, LangChain or any MCP client gets the same few tools, bound to one run. They work
through your drivers and ORMs, from node-postgres and Prisma to psycopg and Django. And in your
tests, each test gets its own branch of one seeded database.

```
npm install @bitsinfra/gnomon      # TypeScript
pip install gnomon-postgres  # Python
```

## What is in the box

| Part | Path | What it does |
| --- | --- | --- |
| SQL core | [src/sql](https://github.com/bitsinfra/gnomon/blob/main/src/sql) | The extension: history, branches, merges, review, valid time, retention, archiving. Installs on managed Postgres. |
| C module | [src/c](https://github.com/bitsinfra/gnomon/blob/main/src/c) | Optional: `SET gnomon.branch` alone routes, real row locks, `ON CONFLICT` and `TRUNCATE` on branches, stale-read detection, faster writes and point reads. |
| CLI, MCP server, review app | [cli](https://github.com/bitsinfra/gnomon/blob/main/cli) | One Go binary: `gnomon branch/diff/merge/bisect/agent/migrate/serve/mcp/daemon/archive`. |
| SDKs | [sdk/ts](https://github.com/bitsinfra/gnomon/blob/main/sdk/ts), [integrations/python](https://github.com/bitsinfra/gnomon/blob/main/integrations/python) | `@bitsinfra/gnomon` and `gnomon-postgres`: a run per task, review, typed diffs, test helpers. One [specification](https://github.com/bitsinfra/gnomon/blob/main/sdk/spec/SPEC.md) and conformance suite. |
| GitHub Action | [action](https://github.com/bitsinfra/gnomon/blob/main/action) | A database branch per pull request, migrations on it, the changes as a comment. |
| Integrations | [integrations](https://github.com/bitsinfra/gnomon/blob/main/integrations) | Python, Node, Ruby, Go, Java, Elixir, .NET, PHP; PostgREST and Supabase; a dbt package. |
| Examples, container | [examples](https://github.com/bitsinfra/gnomon/blob/main/examples), [docker](https://github.com/bitsinfra/gnomon/blob/main/docker) | The tutorial's shop database and a ready-made image. |

## Documentation

Everything is at <https://gnomon.bitsinfra.com/>, and the same pages live in [docs](https://github.com/bitsinfra/gnomon/blob/main/docs):

- [Installation](https://github.com/bitsinfra/gnomon/blob/main/docs/installation.md) and the [tutorial](https://github.com/bitsinfra/gnomon/blob/main/docs/tutorial.md)
- [Concepts](https://github.com/bitsinfra/gnomon/blob/main/docs/concepts.md): branches, coordinates, merges
- [Agents](https://github.com/bitsinfra/gnomon/blob/main/docs/agents.md), [runs and the SDKs](https://github.com/bitsinfra/gnomon/blob/main/docs/sdk.md), [the MCP server](https://github.com/bitsinfra/gnomon/blob/main/docs/mcp.md)
- [Branches](https://github.com/bitsinfra/gnomon/blob/main/docs/branches.md), [schema changes](https://github.com/bitsinfra/gnomon/blob/main/docs/schema-changes.md), [review](https://github.com/bitsinfra/gnomon/blob/main/docs/review.md), [merges](https://github.com/bitsinfra/gnomon/blob/main/docs/merges.md)
- [History and time travel](https://github.com/bitsinfra/gnomon/blob/main/docs/history.md), [the change feed](https://github.com/bitsinfra/gnomon/blob/main/docs/feed.md)
- [SQL reference](https://github.com/bitsinfra/gnomon/blob/main/docs/sql-reference.md), [CLI reference](https://github.com/bitsinfra/gnomon/blob/main/docs/cli.md), [errors](https://github.com/bitsinfra/gnomon/blob/main/docs/errors.md)
- [Operations](https://github.com/bitsinfra/gnomon/blob/main/docs/operations.md), [security](https://github.com/bitsinfra/gnomon/blob/main/docs/security.md), [benchmarks](https://github.com/bitsinfra/gnomon/blob/main/docs/benchmarks.md)
- [llms.txt](https://github.com/bitsinfra/gnomon/blob/main/llms.txt) for coding agents

## License

Gnomon is open source under the [PostgreSQL License](https://github.com/bitsinfra/gnomon/blob/main/LICENSE). Contributions are welcome: see
[CONTRIBUTING.md](https://github.com/bitsinfra/gnomon/blob/main/CONTRIBUTING.md). Report security issues privately, as described in
[SECURITY.md](https://github.com/bitsinfra/gnomon/blob/main/SECURITY.md).
shawkisukkar2211
🟧 echo.github ⭐The repository presents Gnomon as Git-like versioning for Postgres data, with database branches, diffs, review, merge, and undo, including wbitsinfra——
🟧 hnGnomon: Git for Postgres Datalucasluitjes346

Interpretation history

Decision trace