← All work
Project

Semantic Core

A local-first identity layer for files. A receipt, a warranty and a manual can point at the same dishwasher, and moving a file keeps the link.

2026 Maturity: In development

Overview

Semantic Core gives files, documents and the real things they describe stable identities and typed relationships that live outside any one app. It is built first for one person on their own Mac and iPhone, with no account, server or model required.

A terminal session showing sc commands adding a thing called Kitchen dishwasher, linking a receipt file to it, moving the file, resolving the move, and printing the relationship's history.
The sc command line: a receipt is linked to a dishwasher, moved to another folder, and the link survives with its evidence.

My role

Creator: design and implementation. The repository is public, with commits authored by me.

The problem

Files have locations. A receipt, a warranty, a manual and a service record can all refer to the same dishwasher while sitting in unrelated folders. Finder knows locations, Spotlight indexes properties, and every assistant re-extracts the same facts from the same documents.

Semantic Core is meant to change four things. A justified relationship survives a rename or a move. A copy is told apart from a move. A missing file never deletes the thing it belonged to. Every relationship can explain why it exists.

How it works

  • Kinds of things: Things, artifacts, revisions, instances and presentations are separate kinds. Identical bytes do not prove identical meaning, and a copy is a new instance, so the model keeps those apart as data.
  • Relationships: Relationships are typed and come from a registered vocabulary with class constraints and inverses. A predicate the vocabulary does not know is kept as a value rather than dropped. A resolver reports one of three outcomes and records its evidence.
  • History: Changes are events in a hash-linked log, written as canonical JSON, identified by SHA-256 and signed with Ed25519. Undo appends a compensating event, so retracting a relationship never rewrites history.
  • Observation and truth: Observations are not assertions, assertions are not accepted truth, and qualification is not promotion. Verdicts attach to commitments, never to relationships.
  • Access: Access is checked before traversal, counting, search and export. A withheld item must not reveal that it exists.
  • The command line: The sc tool covers link, move-resolve, inspect, retract, export, import and why. It runs offline, with no model and no server.
  • Swift: A C interface lets a Swift package use the same core. The reference test vector reproduces through that interface and again in pure Swift, and CryptoKit verifies the signed vector. A Spotlight spike builds an indexed entity from a viewer-projected inspection and tests that nothing withheld reaches its attributes.

The Stage 1 proof

Link two files, move one, resolve and inspect the relationship, retract it, then inspect the history. Fixtures cover moves, copies, edits, deletes, ambiguous cases, containers and access.

Its limits

There is no Finder surface and no app yet. Live Spotlight registration needs an app bundle and belongs to Stage 2. Stage 1 counts as complete when the nine proofs in the definition and the fixture list pass in CI, and the repository does not yet claim that. Nothing in it is a conformance claim for any external protocol.

It is built first for one person on their own devices. Household sharing, assistants and editors come later as consumers of the graph, which none of them own.

The direction

Stage 2 adds a Finder action, a separate inspector and a minimal surface descriptor. Stage 3 adds a narrow qualification profile with mutation tests, expression adapters and optional model-assisted proposals. Stage 4 covers ecosystem adapters, including a spatial view and authorized exchange across devices.

Status

Stage 1 Rust core and Swift package are implemented and tested; a Spotlight indexed-entity spike is done, and live Spotlight registration is Stage 2.