Quickstart¶
Attach Cruxible to any Git repository, record a typed decision tied to a section of your docs plus a task that depends on it, edit the doc to see Cruxible catch the drift and wake the dependent task, and inspect the live graph in your browser. Everything runs locally with no LLM inside Cruxible.
What you'll have by the end¶
- Cruxible attached to your repository, ready for coding agents and teammates to read and write shared state.
- A starter vocabulary (either tailored to your repo by
/surveyor installed from theproject-statekit). - A cited decision and a dependent task showing both automatic drift detection
(
citation_drifted) and cascade staleness (claim_dependency_stale) incruxible next. - The local read-only Console running in your browser.
What you'll do (~5 minutes)¶
- Install Cruxible and initialize your repository.
- Pick a starting vocabulary (
/surveywith your agent, orproject-state). - Record a decision citing a doc section, plus a task pinned to that decision.
- Edit the doc, update the decision, and watch
cruxible nextcatch drift and wake only the affected task. - Open the local Console.
- Require a second reviewer for agent writes (optional).
Supported platforms¶
Python 3.11+ and Git on Linux (x86-64) or macOS (Apple silicon). On Windows, install Python and Cruxible inside WSL2 and run every command there.
1. Install and initialize¶
uv tool install cruxible # or: pip install cruxible
cd your-project
cruxible init --principal-id owner
This creates a local Cruxible workspace for your repository and starts the
background service automatically. Run cruxible server stop anytime you want
to stop it.
What did init create in .cruxible/, and where does state live?
Accepted state lives in Cruxible's own signed Git ledger under ~/.cruxible/instances/ (mirrored locally as a cruxible-ledger Git remote), not as raw files inside .cruxible/. Teams share an instance through a hosted or remote daemon (Isolated deployment) or a Git ledger mirror (cruxible ledger set-mirror).
File in .cruxible/ |
Purpose | Commit? |
|---|---|---|
coverage.json, identity.json |
Machine-local connection and owner identity (never holds private keys) | No (automatically excluded in .git/info/exclude) |
world.pyi, floor/ |
Generated Python type stubs and readable YAML mirrors of current state | No (derived and ignored) |
files.yaml |
Portable catalog of cited workspace files | Yes |
vocabulary.yaml |
Exported kinds and fields (cruxible vocabulary export) |
Yes |
See Concepts for how the ledger works.
2. Pick a starting vocabulary¶
For this five-minute walkthrough, start with the project-state kit so the
script in Step 3 runs as-is. Afterward, you can use /survey on any repo to
have your agent design a custom vocabulary.
Option A: Start right away with project-state (used in Step 3 below)¶
Install the project-state kit (roadmap items, decisions, batches, tracks, and
laws) in one command:
Omit --commit anytime you want a dry-run preview first. Other starter kits
include security, iot-fleet, supply-chain, and legal-research
(browse all kits).
Option B: Have your agent /survey your repository (for custom domains)¶
Install the five Cruxible skills into Claude Code, Codex, Cursor, OpenCode, or any other Agent Skills host:
Or, with no Node and no network, copy the exact skills your installed
cruxible ships (version-locked to the CLI) into .agents/skills/, or into
.claude/skills/ with --claude:
Then ask your agent to run /survey. It reads your repo and docs, proposes the
handful of recurring kinds and fields worth holding as shared state, applies
.cruxible/vocabulary.yaml, optionally seeds your first 5-10 real cited
decisions and links, and spots where live reality checks could plug in later.
(Optional Claude Code and Codex plugin bundles are also documented in
For AI agents.)
3. Record a cited decision and a dependent task¶
Cruxible does not replace your Markdown docs or code. Prose stays where it lives, while Cruxible holds the canonical current facts, cites the sections they rest on, and tracks what depends on them.
(In normal use your coding agent runs these writes for you through the skills
above or MCP; running one directly here shows what happens under the hood. The
snippet below uses the project-state vocabulary from Option A; if you used
/survey, substitute the kinds and fields it created.)
Suppose your repository has an ARCHITECTURE.md containing:
# Architecture
## Database
We chose PostgreSQL 16 over SQLite for the API service so multiple workers
can write concurrently with ACID transactions and native JSONB indexes.
Save a short script (seed_decision.py) to record two things atomically: a
structured decision citing ## Database by heading path, and a roadmap task
pinned based_on that decision's ruling:
# seed_decision.py
from typing import TYPE_CHECKING, cast
from cruxible_client import Cruxible, SectionEvidence
if TYPE_CHECKING:
from world import World
with Cruxible.connect() as cx:
w = cast("World", cx.world())
decision = w.dev.decision.define(slug="primary-database").set(
standing="ratified",
ruling="PostgreSQL 16 (concurrent multi-worker writes, JSONB)",
evidence=SectionEvidence(
file="ARCHITECTURE.md",
section=("Architecture", "Database"),
),
)
pool_task = w.dev.roadmap_item.define(slug="connection-pool-tuning").set(
task_title="Tune Postgres connection pool size",
implementation_state="partial",
based_on=[decision.pin("ruling")],
)
w.write(decision, pool_task, because="Initial ADR import")
Run it with cruxible python (the CLI's built-in interpreter already includes
the SDK, so nothing needs to be installed in your project's virtualenv; you can
also pipe a script via cruxible python -):
Query it back with a typed filter from the CLI (or via MCP / Python):
$ cruxible query dev.decision --where standing=ratified --select slug,ruling
subject slug ruling flags
dev.decision/primary-database primary-database PostgreSQL 16 (concurrent multi-worker writes, JSONB) -
Unknown fields or invalid enum values (such as --where standing=active
instead of ratified) are refused with valid suggestions instead of silently
returning empty, and concurrent writes against a stale read are refused instead
of silently overwriting each other. Reusable questions can also be saved and
called by name (for example cruxible query --name project.roadmap-membership
in this kit, or multi-hop queries like security.urgent_exposures; see
Asking questions). Cruxible also keeps Python type stubs
in .cruxible/world.pyi so editors and cruxible python --check catch
mistakes statically.
4. Edit the doc and watch cruxible next cascade¶
Now update the ## Database section in ARCHITECTURE.md to:
# Architecture
## Database
We migrated the API service to SQLite with Litestream to cut infrastructure cost.
Run cruxible next, your attention queue for anything that drifted, expired,
contradicted an upstream claim, or is waiting for review (excerpt showing one
of the two flagged claims):
$ cruxible next
repair citation_drifted Claim:CLM-f2a3eeae... next=cruxible.rebind
repair: cruxible rebind CLM-f2a3eeae... --citation aedf9abd51ea --section 'doc-architecture.md-8f6366fd8e7a#Architecture/Database' --because '<TEXT>'
or: cruxible set dev.decision/primary-database dev.decision.ruling '<VALUE>' --role normative --evidence-file '<FILE#ANCHOR>' --because '<TEXT>'
or: cruxible retire CLM-f2a3eeae... --because '<TEXT>'
Cruxible does not guess what an edit means: it flags only the decision backed
by ## Database and offers three explicit repairs so you or your agent can
choose:
cruxible rebind(still true): The wording in the doc changed (for example, typo fixes or clarification), but the decision itself still stands. Re-pin the existing claim to the updated section without changing its value.cruxible set(changed): The underlying decision moved (as it did here, from PostgreSQL 16 to SQLite). Record the new value citing the updated section; the previous ruling stays in per-field history.cruxible retire(no longer applies): The claim is obsolete. End it with a reason so later sessions stop relying on it.
Now update primary-database to reflect the migration (update_decision.py)
and run cruxible next again (excerpt showing one of the two flagged claims):
# update_decision.py
from typing import TYPE_CHECKING, cast
from cruxible_client import Cruxible, SectionEvidence
if TYPE_CHECKING:
from world import World
with Cruxible.connect() as cx:
w = cast("World", cx.world())
w.dev.decision["primary-database"].set(
standing="superseded",
ruling="Migrated to SQLite with Litestream",
evidence=SectionEvidence(
file="ARCHITECTURE.md",
section=("Architecture", "Database"),
),
because="Storage migration in ARCHITECTURE.md",
)
$ cruxible python update_decision.py && cruxible next
repair claim_dependency_stale Claim:CLM-154b61b5... next=cruxible.claim.retire
input changed: CLM-f2a3eeae... current=0273d2bb37ee used=239471e6de05 reasons=source_superseded
repair: cruxible retire CLM-154b61b5... --because '<TEXT>'
or: cruxible get CLM-f2a3eeae...
This is what plain Markdown cannot do:
citation_driftedcleared as soon as the decision was re-cited.connection-pool-tuningautomatically woke up asclaim_dependency_stalebecause it was pinnedbased_onthe Postgres decision, while any unrelated tasks stay silent.- Because the agent skills (
cruxible skills installornpx skills add cruxible-ai/cruxible) instruct every new coding-agent session to start withcruxible orientandcruxible next, the next agent sees this immediately instead of wasting a session tuning a Postgres pool you no longer run.
Every change also keeps its signed per-field history:
$ cruxible get dev.decision/primary-database --detail history --field ruling
ruling
seq 4 34d38f86aa45 proposed 2026-11-27T23:00:43Z by owner changed PostgreSQL 16 (concurrent multi-worker writes, JSONB) -> Migrated to SQLite with Litestream [CLM-5b6a6809...]
reason: Storage migration in ARCHITECTURE.md
seq 3 7aa4ce50cefd proposed 2026-11-27T23:00:38Z by owner stated PostgreSQL 16 (concurrent multi-worker writes, JSONB) [CLM-5b6a6809...]
reason: Initial ADR import
5. Open the local Console¶
This opens a read-only local UI in your browser (127.0.0.1) showing your State
graph, Type map, Evidence flow, open next repairs, proposals, and signed
history. Press Ctrl-C to stop it.
6. Require a second reviewer (optional)¶
By default, your own writes land immediately. When you want coding agents to
propose changes that wait for a second reviewer (a human or a separate
reviewing agent session), initialize a new repository with
--require-independent-approval:
From then on, anything owner writes waits until reviewer inspects the exact
citations and signs off:
CRUXIBLE_PRINCIPAL_ID=reviewer cruxible next
CRUXIBLE_PRINCIPAL_ID=reviewer cruxible proposal review PROPOSAL_ID
CRUXIBLE_PRINCIPAL_ID=reviewer cruxible proposal approve PROPOSAL_ID --yes
To add independent review to the repository you already initialized in Step 1, see Review and governance.
7. Next gear: keep state aligned with reality¶
Steps 1 to 6 give you Gear 1: typed state, cited documents, cascade drift detection on local edits, and optional second-party review. Gear 2 keeps state aligned with live reality:
- Normative beliefs hold decisions, hypotheses, baselines, and verdicts (backed by human or agent authority, hardened through review and signed attestation).
- Automated observations pull live facts from APIs, scanners, test runs, experiments, telemetry, or custom Python and ML models at zero LLM tokens.
- When reality shifts or contradicts a standing belief,
cruxible nextwakes only the affected claims so your team or agents re-evaluate what actually changed.
Two fast ways into Gear 2:
- Try a pre-built automated kit: run
cruxible kit add+cruxible kit adoptonsecurity(Security walkthrough) oriot-fleet(IoT fleet walkthrough). - Automate your own repo's signals: run
/automate-statewith your coding agent on the reality-alignment candidates/surveyidentified (Lines and automation).
Troubleshooting
- Warning:
Provider lane unavailableon startup. Provider packages run over a Unix socket under Cruxible's state directory; if your home path is long and no temp runtime directory is set, run withTMPDIR=$(getconf DARWIN_USER_TEMP_DIR)on macOS orXDG_RUNTIME_DIR=/run/user/$UIDon Linux and restart the daemon. - A proposal will not activate. Under independent approval, the author
cannot approve their own proposal: run
CRUXIBLE_PRINCIPAL_ID=reviewer cruxible nextand approve asreviewer.
Where to go next¶
- Project state across coding-agent sessions: The
Project state walkthrough seeds a cited
decision and dependent roadmap items, demonstrates both citation drift and
selective dependency staleness, and installs the
project-stateskill. - Security triage & code audits: The
Security walkthrough imports an SBOM, pulls OSV,
CISA KEV, and FIRST EPSS on a schedule, and runs the kit's
security-auditskill under cosign review. - Deterministic IoT telemetry & anomaly triage: The
IoT fleet walkthrough runs an EWMA telemetry Line
over an edge camera hub, absorbing spikes at zero LLM tokens and waking
cruxible nextonly on sustained faults. - Connect your coding agents: For AI agents covers the
typed Python SDK, MCP (
uvx cruxible mcp), CLI, and the five built-in skills (survey,adopt-kit,create-state,automate-state,review-state). - Mental model & modeling habits: Concepts and Building team knowledge cover what belongs in typed state vs. Markdown prose.
- Browse all starter kits: Kits and
cruxible.ai/kits (
project-state,security,iot-fleet,supply-chain,legal-research,car-parts).