1. Executive Summary
Cruxible is a local-first state engine for AI agents. A daemon keeps
each project's knowledge in a Git ledger that only it writes. The
knowledge is typed Claims about Subjects under declared ClaimTypes.
Every Claim cites its evidence: the author's own words, a quoted passage
from a workspace file, or a retained Capture of fetched bytes. Agents
reach it through a CLI, a stdio MCP server and a Python SDK. No model
runs inside the engine (README.md:59).
Notable: every change is a proposal checked by deterministic laws against the parent generation, and an accepted one becomes a signed commit with a change-set receipt. Citations pin exact bytes, so an edited source brings the Claims resting on it back to a work queue. A field can hold a value, a recorded none, or nothing, and a live none refuses a write of the value it denies.
Weak: review is a convention by default. A plain init
lets an author approve their own changes, the daemon runs without
authentication, and the shipped Claude Code plugin runs the agent at the
admin tier with approve and activate on its allowlist.
Retiring a value as wrong leaves no record that refuses it. The codebase
is large for one maintainer to audit.
Five marks are present and two are withheld (section 9).
Licence. Apache-2.0 in LICENSE, with a
NOTICE reading Copyright 2026 Cruxible LLC, and
declared in both pyproject.toml files.
SECURITY.md asks for vulnerabilities through a private
GitHub advisory or by email, never a public issue
(SECURITY.md:15-20). Its supported-versions table names
0.5.x only, while the package at this commit is 0.6.5.
2. Mental Model
A Claim is one value of one field of one Subject, with the evidence
its author cited and the reason they gave
(docs/concepts.md:235-242). The ledger holds what was
accepted; everything else, the SQLite indexes, the floor files in the
workspace, a table in a document, is derived and can be rebuilt
(docs/concepts.md:95-103).
Belief has three layers. The lifecycle is stored on
the Claim: live, or retired with was-wrong,
was-rescinded or superseded
(packages/cruxible-client/src/cruxible_client/contracts/claims.py:621-641).
The verdict is computed from current evidence and
attestations: supported, uncovered, stale, contradicted or unresolved.
The resolution status places each live Claim in its
slot as accepted, conflicted, overturned or ineligible
(src/cruxible_core/service/discovery/claim_status.py:379-405).
Reads serve what resolution accepted.
Absence is a fourth kind of answer. A ClaimType may declare an
inverse, and a Claim stating that a field does not hold a value is a
none. A field then has three answers: a value, a
current none, or unknown (docs/concepts.md:275-287).
Diagram source
%% caption: every change is a proposal judged at the parent generation; a live none refuses its value, and reads serve only what resolution accepted
flowchart TD
W["Agent, CLI, SDK<br/>or a Line writes"] --> P["Proposal<br/>state untouched"]
P --> L{"Candidate laws<br/>at the parent"}
L -- "value beside<br/>a live none" --> R["Refused:<br/>polarity_conflict"]
L -- "passes" --> A{"Approval policy<br/>and caller tier"}
A -- "self-approval,<br/>tier may activate" --> G["Generation N+1<br/>signed commit<br/>and receipt"]
A -- "independent approval<br/>or accept never" --> Q["Waits for a<br/>second principal"]
Q --> G
G --> X["SQLite projection<br/>rebuildable"]
X --> V{"live, and accepted<br/>or conflicted?"}
V -- "yes" --> OUT["query, get,<br/>floor files"]
V -- "retired or<br/>overturned" --> H["not served;<br/>--at reads the past"]
F["Cited file or<br/>Capture changes"] --> N["next: drifted<br/>or stale rows"]
N --> W3. Architecture
The daemon is the only process that touches accepted state. It serves
HTTP over a Unix socket or TCP, and the CLI, the MCP server and the SDK
are its clients; work that needs the client's files happens on the
client, which sends bytes, never paths
(docs/architecture.md:72-84). Each instance is its own
ledger under the daemon's state root at
instances/<id>
(src/cruxible_core/server/registry.py:305-308).
Storage is split by authority
(docs/architecture.md:8-15). The Git ledger is
authoritative for accepted envelopes, principals, proposals, approvals
and generations. Content-addressed storage holds exact bodies by digest.
SQLite holds query indexes and rebuildable projections. An operational
journal holds high-rate run records outside the ledger.
Background work runs as consumers inside the daemon: floor delivery
after each accepted generation, the next findings worker,
and enabled Lines (docs/architecture.md:82-84). A Line
binds a Procedure, a deterministic graph of steps calling pinned
provider builds, to triggers and an authority ceiling.
Deployment and ergonomics
uv tool install cruxible, then
cruxible init --principal-id owner in a project, which
starts a daemon if none runs. Python 3.11 or later and Git, on Linux
x86-64 or macOS on Apple silicon (README.md:63-77). The
default is one owner principal, self-approval, and an unauthenticated
daemon on a Unix socket. A team setup takes
--require-independent-approval, a daemon started with
--auth, and credentials minted per principal
(docs/review-and-governance.md:290-310,
:376-397). Kits package a domain's vocabulary, queries and
Procedures for install.
4. Essential Implementation Paths
- Write.
cruxible_set,cruxible_writeor the CLI verbs lower the request to a Claim authoring payload insrc/cruxible_core/service/authoring/write_verbs.py, admit it as a proposal, and evaluate the candidate against the parent generation, the polarity law included (src/cruxible_core/proposals/proposals.py:5517-5544). - Land or wait. Under self-approval with a tier that
may activate, the change lands in the same call; otherwise the result
names the reason and the next command
(
src/cruxible_core/service/authoring/landing.py:307-360). - Approve.
preparebuilds a challenge over the candidate digest and refuses the creator's own signer under independent approval (src/cruxible_core/service/proposals/review.py:801-823). - Settle. Settlement re-derives the candidate,
verifies the approvals with the creator excluded, and builds the
change-set receipt
(
src/cruxible_core/proposals/settlement.py:585-640). - Activate.
compare_and_set_mainadvancesmainonly over its expected parent (src/cruxible_core/ledger/git.py:1688-1701,src/cruxible_core/ledger/activation.py:227-237). - Read. Compact queries take their answer from
resolution statuses
(
src/cruxible_core/service/discovery/compact_query.py:966-983);getdoes the same per field (src/cruxible_core/service/discovery/get.py:1755-1757). - Judge.
evaluate_claim_verdictturns evidence, attestations and the effective interval into a verdict (packages/cruxible-client/src/cruxible_client/contracts/claim_verdicts.py:611-725). - Wake.
nextemitscitation_driftedwith a rebind or retire repair when a cited passage changed (src/cruxible_core/service/discovery/next.py:4116-4130).
5. Memory Data Model
- Claim (
playbill-claim-v4): identityCLM-plus 128 random bits (packages/cruxible-client/src/cruxible_client/contracts/claims.py:724-727), a statement, a backing of citations and evidence, pins to what it rests on, a lifecycle, and a retirement attribution exactly when retired (:673-711). - Statement: subject, ClaimType and its digest,
predicate, optional qualifier, object (a value, a Subject reference or a
none), role, and an optional effective interval that must be increasing
(
:245-296). - Subject:
kind/id, named by key fields or a minted id; the same key names the same Subject for every writer. - ClaimType: value type, cardinality, permitted roles, evidence admission per role, freshness, resolution policy, and an optional inverse.
- Capture: retained evidence bytes in content-addressed storage under a CaptureContract, which also decides whether the body may be erased.
- Attestation: a signed support, contradiction or
unsure on a Claim, with an observation time and an optional end; the
facts worker indexes them as
door_events(src/cruxible_core/consumers/next/facts.py:182-187). - Change-set record: per generation, the members, law
evidence, required tier, approval requirements, approvals, actor binding
and mandate digest
(
src/cruxible_core/proposals/settlement.py:152-170,:278-308). - Projections:
claim_factsper Claim with lifecycle, verdict, status and visibility (src/cruxible_core/consumers/next/facts.py:135-141);claim_unitsper live Claim with an inverse-declaring type (src/cruxible_core/indexes/claim_units.py:49-60).
6. Retrieval Mechanics
There is no vector search and no model in the read path. A compact
query selects by kind, filters by field, follows relation ClaimTypes,
and matches contains as a case-folded substring
(src/cruxible_core/service/discovery/compact_query.py:1571-1575).
Named queries add absence tests, hops and a visibility setting; a
current read hides stale and not-yet-effective values
(tests/core_support/_query_reach_world.py:1-6).
The default is live Claims only (compact_query.py:199).
Within a slot the answer is what resolution placed accepted
or conflicted; when nothing in the slot is either, the
ineligible Claims are shown with their flags
(compact_query.py:966-983). Nones are listed beside values
and never as one, and a query never follows a none as a
relationship.
Every read names the coordinate it answered at, and --at
answers query, get and orient at
any past generation by number or Git object id
(docs/asking-questions.md:266-279). The projection of an
evicted generation is rebuilt from the ledger on demand
(docs/architecture.md:200-211).
The agent also reads plain files: the floor, YAML mirrors of accepted state delivered to the workspace after each generation, which it can grep beside its Markdown.
7. Write Mechanics
Writes block the caller. The proposal is evaluated in the request
and, when the policy and tier allow it, activated in the same call, so
the value is readable at the receipt's coordinate when the call returns
(docs/review-and-governance.md:17-22). A write that stops
at a proposal changes nothing a reader sees until it is approved and
activated (docs/architecture.md:67-70).
Change sets are atomic: one or more value changes, document sections
and definitions accepted or refused together. --expect and
--expect-absent make a write compare-and-set on the current
value, and --dry-run runs every check without proposing.
Refusals name a code and a repair.
A new value is a revision of the Claim it replaces or a new lineage;
a retirement is a Claim artifact in the retired state naming its
predecessor. A Claim that pins another with based-on is not
revised when the other moves; next lists it as
claim_dependency_stale.
No background pass rewrites Claims. Lines propose or settle changes
through the same candidate path, and the findings worker only computes
rows. Capture erasure removes a retained body when its contract declares
erasure: authorized_by_rule, and leaves the envelope and
the Claims citing it
(docs/evidence-and-admission.md:449-480).
Operational cost
No model call on any write. Each accepted generation adds a Git
commit and a full SQLite projection piece; the daemon keeps the head and
64 generations, and repacks the ledger every 64
(docs/architecture.md:194-262).
8. Agent Integration
The MCP server registers 84 tools
(src/cruxible_core/mcp/tools.py). The shipped Claude Code
plugin starts it with uvx at version 0.6.5, with
CRUXIBLE_MODE set to admin and an allowlist of
26 tools that includes cruxible_set,
cruxible_write, cruxible_retire,
cruxible_proposal_approve and
cruxible_proposal_activate
(plugins/cruxible/.mcp.json:1-17).
cruxible_proposal_approve takes a signer_id
whose key comes from the server's key directory
(src/cruxible_core/mcp/tools.py:675-708).
Five core skills (survey, adopt-kit,
create-state, automate-state,
review-state) install from the CLI. The plugin's governance
reference has the author never approve its own proposal and has a
subagent acting as the reviewer principal approve it with
cruxible_proposal_approve
(plugins/cruxible/skills/_shared/references/governance-flow.md:18-33).
cruxible hook install adds a SessionStart
hook that prints three to five lines of attention work from
next, or one orientation line when the queue is clean; it
never starts a daemon and never writes
(src/cruxible_core/cli/commands/hook.py:1-18). The SDK
offers typed handles generated from the vocabulary into
.cruxible/world.pyi.
9. Reliability, Safety, and Trust
Approval is a record, and the shipped plugin holds the pen
The independent-approval law is real. A creator's signature is
refused at prepare
(src/cruxible_core/service/proposals/review.py:801-823),
settlement verifies approvals with the creator excluded
(src/cruxible_core/proposals/settlement.py:604-610), and a
committed test requires both refusals
(tests/test_proposals/test_approval_policy.py:181-206).
With --auth, the credential decides the principal and caps
the tier, and a client can only lower it
(src/cruxible_core/server/auth.py:567-633); approve, reject
and activate need graph_write
(src/cruxible_core/runtime/permissions.py:172-175).
The defaults do not use it. Without auth the principal a request
names is a claim, and the unauthenticated ceiling is admin
(src/cruxible_core/server/auth.py:576-585,
src/cruxible_core/runtime/permissions.py:237-243). The
reviewer's key sits in the same user's config directory. The project
says so: review by a separate principal is "a convention, not a
control" in that mode (SECURITY.md:55-64;
docs/review-and-governance.md:358-374). A refused write
returns the exact approve call with the reviewer as signer
(src/cruxible_core/service/authoring/landing.py:317-332).
Evidence decides what a value is worth
A verdict counts admitted Captures and accepted attestations, and a
ClaimType can require captured evidence from a fresh fetch. Citations
pin exact bytes; when a passage changes, next offers a
rebind or a retirement. The architecture document separates integrity
from isolation: content hashes guard against accidents, not against a
process running as the daemon's user
(docs/architecture.md:95-117).
What a rejection leaves
Claim ids are random, so a value retired as was-wrong
and written again is a new Claim. The refusal index keys each retired
Claim and each rejected proposal on subject, predicate, qualifier,
object and evidence digests, and surfaces a match to the reviewer and in
next; by its own docstring it does not refuse or change
settlement
(src/cruxible_core/proposals/refusal_index.py:1-36). The
refusing record is a none, which a writer asserts separately.
Marks
tombstone— present. A live none refuses its value on a many-valued field at the candidate boundary; one-valued nones are revised byset, and retiring as wrong writes no none.trust_state— present. Retired Claims are off by default, and overturned or ineligible contenders are not served beside an accepted one.bitemporal— present. An effective interval on the statement, judged at evaluation time, beside the generation that recorded it.audit_log— present. A signed change-set receipt in every generation, withmainadvanced by compare-and-set.negative_eval— present. Populated exact-list cases for a retired edge, stale and future values and a none.scope_enforced— withheld. Each instance is its own ledger, and an authenticated credential may be bound to one instance; that is a physical partition, and Claims carry no scope key a read filters on.human_review— withheld. Under--authagoverned_writeagent cannot approve or activate, which is the mark's shape. The shipped plugin runs the agent atadminwith approve and activate on its allowlist, and its skill has a subagent approve as the reviewer.
10. Tests, Evals, and Benchmarks
The suite is pytest: 9,232 test function definitions in 1,042 test
files under tests/, organised by domain. CI runs it on
Python 3.11, 3.12 and 3.13, four shards each, against a pinned checkout
of the separate providers repository, whose tests fail rather than skip
when it is missing (.github/workflows/ci.yml). Architecture
tests guard package boundaries and forbid kit or provider names in core.
I ran none of them.
The memory-relevant cases are exact lists over populated worlds: the retired edge read at the head and at the prior generation, the SBOM read excluding stale, future and none-only occurrences, and the polarity refusal.
benchmarks/agent_memory_series compares Cruxible against
a skill's findings file across a repository's changes, and states it has
no real target and no live model integration
(benchmarks/agent_memory_series/README.md:1-6); its arm B
has a reviewer subagent approve as its own principal (:44).
The other benchmark directories time Procedure delivery and ledger
reopening at scale.
Cases to want: a value written beside a live none on a many-valued
field; a read after a reviewer rejects a proposal; a Line settling a
value retired as wrong, asserting what next reports.
No paper describes Cruxible. CITATION.cff is absent, and
the README cites LongMemEval and MemoryAgentBench as motivation
(README.md:239-243).
11. For Your Own Build
Steal
- Cite bytes, not files. A citation that pins the exact passage lets an edit bring back exactly the Claims that rest on it.
- Make absence a value. A none with its own evidence, refused beside the value it denies, separates "checked, not there" from "never looked".
- Put the receipt in the commit. A change-set record inside each generation makes the history and the authority one object.
- Answer at a coordinate. A read that names the
generation it came from can be reproduced, and
--atcosts a projection rebuild.
Avoid
- Do not ship the approve verb with the author's tools. An admin-tier plugin with approve and activate on its allowlist makes cosign a request to the model.
- Do not let a rejection end at an index that only informs. If retiring as wrong should stop a value, write the none in the same change.
- Do not make readers learn three status axes. Lifecycle, verdict and resolution are each sound; a caller reading one flag will misjudge the others.
Fit
Fits a team, or one careful developer, keeping cited operational knowledge about a codebase, a fleet or a vulnerability inventory, where a value must say what it rests on and come back when that changes. It suits deterministic pipelines that earn the right to settle fields.
Walk away if you want conversational recall, semantic search, or a small library to embed. The daemon, the ledger and the vocabulary are a commitment, and the review gate needs an authenticated deployment you configure yourself.
12. Open Questions
- Whether retiring a Claim
was-wrongon a ClaimType with an inverse is meant to offer writing the none in the same change. - Whether the plugin's
admindefault and its approve tools are intended for instances under independent approval. - Why
SECURITY.mdlists 0.5.x as the supported line at version 0.6.5. - How a deployment is meant to keep the reviewer key out of the author agent's reach on one machine without a second OS user.
Appendix: File Index
- Contracts:
packages/cruxible-client/src/cruxible_client/contracts/claims.py,.../contracts/claim_verdicts.py,.../contracts/refusal_receipts.py,.../contracts/governance.py - Proposals and settlement:
src/cruxible_core/proposals/proposals.py,src/cruxible_core/proposals/settlement.py,src/cruxible_core/proposals/refusal_index.py - Ledger:
src/cruxible_core/ledger/git.py,src/cruxible_core/ledger/activation.py - Indexes:
src/cruxible_core/indexes/claim_units.py,src/cruxible_core/consumers/next/facts.py - Reads:
src/cruxible_core/service/discovery/compact_query.py,src/cruxible_core/service/discovery/get.py,src/cruxible_core/service/discovery/claim_status.py,src/cruxible_core/service/discovery/next.py - Writes and review:
src/cruxible_core/service/authoring/write_verbs.py,src/cruxible_core/service/authoring/landing.py,src/cruxible_core/service/proposals/review.py - Access:
src/cruxible_core/runtime/permissions.py,src/cruxible_core/server/auth.py,src/cruxible_core/server/registry.py - Agent surface:
src/cruxible_core/mcp/tools.py,src/cruxible_core/cli/commands/hook.py,plugins/cruxible/ - Docs:
docs/architecture.md,docs/concepts.md,docs/review-and-governance.md,SECURITY.md - Tests:
tests/test_service/test_write_inverse.py,tests/test_service/test_get_incoming.py,tests/test_query/test_query_pair_hops.py,tests/test_query/test_query_reach.py,tests/test_proposals/test_approval_policy.py,tests/test_mcp/test_playbill_permissions.py
Recorded searches
Run from the repository root at the pinned commit with
/usr/bin/git grep. .gitmodules is absent.
- No vector or embedding read.
git grep -n -i -E 'embedding|cosine|sqlite_vec|faiss|vector' -- src/cruxible_core/query src/cruxible_core/service/discovery src/cruxible_core/indexesreturns nothing; the same pattern oversrcreturns unrelated hits such asauthoring/preflight.py:1. - No model client in the engine.
git grep -n -i -E 'openai|anthropic|ollama|litellm' -- src pyproject.tomlreturns nothing; over the whole tree it returns only packaging notes inplugins/README.md:191-197. - No scope key on reads within an instance.
git grep -n -i -E 'tenant|owner_id|user_id' -- src/cruxible_core/query src/cruxible_core/service/discovery src/cruxible_core/indexesreturns nothing; oversrcit returns provider-runtime and execution-policy comments. - The CLI value verbs take no effective time.
git grep -n -i 'effective' -- src/cruxible_core/clireturns two lines of egress reporting atcommands/playbill.py:10122-10125. - The refusal index is read, not enforced.
git grep -l 'prior_refusal' -- srcreturns seven files: the index, the review and summary services,next, its settled-refusals consumer, procedure runs and the CLI renderer; none is in the candidate laws. - Only one direction of the polarity law has a write-path
case.
git grep -n -l 'polarity_conflict' -- testsreturnstests/test_service/test_write_inverse.pyandtests/test_scale/test_claim_units_upkeep.py; both write a none beside a value. - No paper.
CITATION.cffis absent;git grep -n -i -E 'arxiv|doi\.org|bibtex' -- . ':!tests'returnsREADME.md:239and:242, two benchmarks cited as motivation.
History
2026-12-04 — 59fd8e36….
First reading, from the 2026-12-04 triage shortlist, at the head of
main. Screened: four auto-run surfaces (the Claude Code
marketplace and plugin manifests, the plugin's .mcp.json
and server.json, both launching a package fetched by
uvx); three dependency surfaces inside the cooldown, a
count the depth-1 clone inflates; twelve build-time execution points,
all of them conftest.py files; one unpinned surface;
AGENTS.md and the plugin's skills read as data. Nothing was
installed, built or run, and none of the 9,232 test functions was run.
Five marks (section
9).