Versioned knowledge graphs for humans and agents, backed by Dolt.
Scrolls keeps evidence, decisions, questions, and working rules connected across sessions. Capture a finding, link the understanding it supports, review the change, and retrieve the context for the next task—with attribution and history. Markdown bodies stay readable; typed records and relationships make them queryable.
Scrolls is the knowledge companion to Beads. Use Beads to track work and Scrolls to record what you know, why you believe it, and which rules apply. The two keep separate databases and connect through explicit references.
Qualified platform: Linux x86_64 · CLI: Rust · Storage: private Dolt 2.2.0
Quick start · Commands · Agent setup · Beads integration · Documentation
flowchart LR
evidence["Capture evidence"] --> proposal["Propose knowledge or a decision"]
proposal --> review["Human review"]
review --> knowledge_store["Versioned knowledge graph"]
knowledge_store --> context["Retrieve context and doctrine"]
context --> evidence
knowledge_store --> markdown["Render Markdown"]
knowledge_store <-->|"Explicit work references"| beads["Beads"]
Build from source with Rust 1.85+ and Git. The Dolt installer also uses
curl, tar, and sha256sum; the workflow below uses jq to read returned IDs.
Commands with shell variables use fish.
git clone https://github.com/mooselabs/scrolls.git
cd scrolls
./scripts/install-dolt.sh
cargo install --locked --path .
set -gx SCROLLS_ACTOR your-name
scrolls initEnsure Cargo's install directory (normally ~/.cargo/bin) is on your PATH.
The installer checks the pinned Dolt archive's SHA-256 and installs it at
.tools/dolt, leaving shared Dolt installations alone. Run these examples from
the checkout; installation and paths explains using
Scrolls elsewhere.
Capture evidence, then propose a conclusion supported by it:
set evidence (scrolls --json --op-id evidence-demo new evidence \
--title 'Rollback readback' \
--body 'The interrupted transaction left no rows.' | jq -r .data.id)
printf '%s\n' '[{"op":"new","handle":"conclusion","kind":"knowledge","title":"Atomic local writes","body":"Writes and receipts commit together."},{"op":"link","from":"'$evidence'","rel":"supports","to":"$conclusion","expect":1},{"op":"status","id":"$conclusion","state":"current"}]' > conclusion.json
set proposal (scrolls --json --op-id knowledge-demo batch conclusion.json)
set record (echo $proposal | jq -r .data.handles.conclusion)
set branch (echo $proposal | jq -r .data.branch)
set review (scrolls --json review $branch)
echo $review | jq .data
set review_token (echo $review | jq -r .data.review_token)After inspecting the proposal, a human accepts it:
scrolls --role human review accept $branch --review-token $review_token
scrolls show $record
scrolls history $record
scrolls render --out ./knowledge-exportThe v2 review token binds the proposal to the main and proposal revisions
reported by the store. Any change to either revision, including an unrelated
main write, requires another review. Acceptance refuses v1 tokens. Run
scrolls review BRANCH again to get a v2 token. Completed acceptance receipts
replay unchanged with the original operation ID and arguments.
Tokens check revisions within the cooperative role model; they do not authenticate
a person or prove that someone read the output.
The export destination must be new. Review acceptance merges the proposal; the
status operation in the batch above is what makes the knowledge current.
The demo operation IDs identify these exact writes: reuse them for retries,
and choose new IDs for new work.
Initialize a custom ontology with scrolls init --schema examples/research.yaml.
Use schema show, schema validate FILE, and reviewed schema apply FILE --expect REV
to inspect and evolve it. The bundled and example ontologies use format: 2,
whose generic work target uses canonical beads:// references in standalone Scrolls.
Format-1 ontologies retain their beads target name and original revision until
explicitly applied as format 2. See the ontology upgrade guide
and the store migration guide.
- Typed knowledge: a configurable ontology with explicit lifecycles, owners, confidence, review cadence, and attributed relationships.
- Local history: Dolt commits retain changes to records and edges. Stable
sc-…IDs survive edits and exports; imported IDs remain lookup aliases. Format-2 kinds can declare an alias sequence allocated atomically on landing on main, such asADR-0001(see schema format). - Reviewable changes: protected records use proposal branches with readable body, metadata, and graph diffs before human acceptance.
- Agent context: deterministic search and graph traversal, versioned JSON output, and a session audit of consumed records and revisions.
- Rules in context:
primedelivers the schema guide, instructions and explicit startup pins, reporting when these exceed the context budget. - Reliable authoring: expected revisions reject stale writes, and operation receipts make retries with identical inputs safe.
- Markdown interchange: import committed documentation at a pinned Git revision; export all native kinds, relationships, and an ID-to-path manifest.
- Beads connections: find knowledge attached to a bead, explicitly refresh cached work details, and publish backlinks into Beads metadata.
scrolls --store ./knowledge serve --bind 127.0.0.1:0 --json exposes knowledge
reads to local clients. It also supports existing --connection shared stores
and --proposal selection. The server reports its actual address, refuses
uninitialized/dirty/interrupted stores, and performs no recovery or consumption
logging. /healthz reports process liveness; /readyz performs a real backend
read. Remote use requires a tunnel. See the HTTP API guide
and OpenAPI contract. HTTP envelope version 3 uses view
and store_revision (an opaque, non-empty string); CLI output stays at version
2 with branch and revision. The public snapshot source and router support
other backends, verified by the conformance suite.
ID, REV, BRANCH, and PATH below are placeholders. Use show to obtain a
record's numeric revision and write results to obtain proposal branch names.
| Command | Purpose |
|---|---|
scrolls new evidence --title 'Finding' --body 'Observed result' |
Capture an attributed source. |
scrolls list --kind decision --status accepted |
List accepted decisions. |
scrolls show ID |
Read a record, its revision, and relationships. |
scrolls show ID --label NAME |
Read the record and relationships at the revision selected by a label. |
scrolls label list ID |
List the record's labels and their target revisions. |
scrolls search 'rollback' |
Search titles and bodies; notes are excluded. |
scrolls walk ID --depth 2 |
Explore incoming and outgoing graph edges. |
scrolls context ID --budget 16000 |
Retrieve context around a record or entity. |
scrolls prime |
Load the schema guide and configured startup pins. |
scrolls edit ID --expect REV --body-file PATH |
Edit against the revision you read. |
scrolls new question --title 'Which retention policy?' |
Open an owned question. |
scrolls query --file examples/queries/inbox.yaml |
List your open local questions. |
scrolls proposals / scrolls review BRANCH |
Find proposals and inspect their changes. |
scrolls --role human review accept BRANCH --review-token TOKEN |
Accept a reviewed proposal. |
scrolls history ID |
Inspect historical record snapshots. |
scrolls lint / scrolls doctor |
Check review dates, graph integrity, and store health. |
scrolls render --out NEW_DIR |
Export a fresh Markdown snapshot with a parity manifest. |
scrolls verify-export --dir DIR |
Verify the files against the store revision named in the export. |
Bodies accept --body, --body-file PATH, --body-file -, or piped stdin.
edit opens $VISUAL / $EDITOR on a terminal; --editor selects that behavior
explicitly. See the full command reference for flags,
relationships, question answers, dry runs, and JSON response contracts.
Use a label such as stable to point a record at an exact revision on main.
Create it with scrolls --role human label move ID stable --to STORE_REV --expect-absent.
For a later move, pass the current target as --expect OLD_STORE_REV.
Moves require an actor, run on local main, and accept --dry-run and
--op-id. Shared stores support label reads and listing. Their writers
refuse label moves.
Labelled reads report the resolved store revision and the record's numeric revision. The consumption audit records the same revisions. See the label command reference.
Add guidance like this to the instructions your agent reads, after configuring the store and Dolt paths for your workspace:
This project uses Scrolls for versioned knowledge.
- Set SCROLLS_ACTOR to your agent identity before writing.
- Start with `scrolls prime` for the configured guide and startup pins.
- Use `scrolls context <id>` and `scrolls show <id>` to inspect relevant knowledge.
- Capture observations as evidence and link conclusions to their supporting evidence.
- Use `--json` for automation, `--expect` for revisions, and stable `--op-id` values for retries.
- Inspect completed proposals with `scrolls review <branch>` and leave acceptance to a human.
- Preserve the returned v2 review token for acceptance. If either revision changes
or the token is v1, a human must run `scrolls review <branch>` and inspect the
proposal again. Never refresh a token automatically. Retry a completed acceptance
with the original operation ID and arguments to replay its receipt.
- Keep task status and execution dependencies in the project's work tracker.init creates the store; agent instructions are configured manually. Every write
requires an actor, through SCROLLS_ACTOR or --actor. The default role is
agent. Standalone Scrolls uses cooperative human and agent roles for policy
and attribution. Filesystem access can bypass that policy. An embedding host
can supply a credential verifier to check human and controller claims. A
verified controller may only move labels.
context has a hard byte budget. prime delivers configured instructions and pins and reports any overrun.
context includes one document and its immediate references. No model is called.
Use --session NAME and consumed --for-session NAME to inspect the read audit.
| Kind | Use | Write policy |
|---|---|---|
evidence |
Captures, observations, and source material | Direct |
knowledge, primer |
Supported understanding and introductions | Proposal |
decision |
Durable choices and their rationale | Proposal |
doctrine |
Rules with path or scope triggers | Proposal |
entity |
Repositories, services, teams, or other graph anchors | Proposal |
question |
An owned open question | Direct |
answer |
A response to a local question | Human direct; agent proposal |
collection, note |
Curated views and session notes | Direct |
Protected kinds use proposals for both human and agent authors. Reads use main
unless you explicitly select --proposal BRANCH. Human review accepts or rejects
the branch, while lifecycle changes such as draft → current and
proposed → accepted are separate operations. Rejected proposals retain their
history. Accepting an answer also requires the human question owner.
Relationships capture support, derivation, replacement, contradiction, and subject
matter. about, asks_about, and related assertions belong to their source;
referencing a protected target does not edit it. Other internal graph mutations
can require both endpoint revisions. See relationship rules.
Work references pass through the library's work_ref::Adapter. Standalone
Scrolls supplies the Beads adapter (beads::Local) in the CLI, HTTP server and
shared mode. An embedder supplies its own adapter to mutations, policy checks,
query packets and read::View. It must claim and canonicalize references
(including any portable aliases), resolve caller-local short forms at link time,
recognise Markdown work links, and return offline summaries. Adapter methods
never start a process or call the network. Relations carry work when their
ontology external includes work (format 2) or beads (format 1).
The Beads adapter is qualified against Beads 1.3.0. It keeps work references in
Scrolls and requires explicit commands to contact Beads. Existing older stores
need scrolls migrate after pending proposals are accepted or rejected; new
stores use format 4.
Bind an existing Beads workspace and link the knowledge record from the quick
start. Replace bd-example with a full issue ID from that workspace:
scrolls beads bind work --directory /path/to/beads-workspace --bd /path/to/bd
set revision (scrolls --json show $record | jq -r .data.record.revision)
set link (scrolls --json link $record implemented_by work:bd-example --expect $revision)
set link_branch (echo $link | jq -r .data.branch)
set link_review (scrolls --json review $link_branch)
echo $link_review | jq .data
set link_token (echo $link_review | jq -r .data.review_token)
# A human accepts after reviewing the change.
scrolls --role human review accept $link_branch --review-token $link_token
scrolls beads refs work:bd-example
scrolls context --bead work:bd-example
scrolls beads refresh --all
scrolls --dry-run beads publish --all
scrolls beads publish --allReferences are many-to-many and persist as beads://PROJECT-UUID/FULL-ISSUE-ID;
the work: alias and machine paths stay local. Reads remain offline. refresh
caches observed titles and statuses; publish reconciles main's backlinks into
this Scrolls store's Beads metadata key, preserving unrelated metadata.
Publication does not change issue status, assignees, dependencies, or scheduler
gates. implemented_by records intent, and question blocks links are
informational. See the Beads command contract.
The supported installation path is the source build in the quick start. Python 3 is needed for demonstrations and qualification scripts, not ordinary CLI use. The private Dolt installer currently supports Linux x86_64 only.
--store defaults to .scrolls and --dolt to .tools/dolt, both relative to
the current directory. To use a different workspace, pass absolute paths on
each command:
scrolls --dolt /path/to/scrolls/.tools/dolt --store /path/to/project/.scrolls init
scrolls --dolt /path/to/scrolls/.tools/dolt --store /path/to/project/.scrolls primeAfter installation, ordinary authoring and reads need no Git repository, daemon, remote, or model service. Importing Markdown requires a Git source repository.
The database lives at .scrolls/dolt. Scrolls invokes its pinned Dolt CLI with a
private configuration and serializes store access with a filesystem lock.
Authoring changes and operation receipts commit in one explicit transaction.
Records and edges are keyed JSON rows; those row payloads are the merge units.
scrolls history [ID] exposes typed chronological entries with an opaque
store_revision, actor and UTC time, plus a message or the historical record.
Proposal inspection renders typed graph/configuration row changes with decoded
before and after values. These read payloads are shared by local and shared
stores and the HTTP API; they do not change stored data.
The consumption audit and Beads bindings/cache are separate local state. An
unexplained dirty database stops commands for inspection; Scrolls does not
silently discard it. Start with scrolls doctor and the
storage and recovery contract.
This release provides local operation and proposal review. Remote synchronization, server storage, authenticated access, embeddings, executable doctrine checks, and web/MCP interfaces remain outside the implemented scope.
Import a pinned Git collection with a bundled or custom YAML profile:
scrolls import profiles list
scrolls import profiles show pep
scrolls import plan git /path/to/peps --root peps --rev COMMIT \
--source python.peps --profile pep --out peps.plan.json
scrolls import apply peps.plan.json --op-id peps-initial --dry-run
scrolls import apply peps.plan.json --op-id peps-initial
scrolls show PEP-0008 --provenance
scrolls render --out ./peps-exportPlanning requires an initialized format-4 store and actor. It reads committed
Git objects and leaves the store unchanged. Apply verifies the plan against the
same store, actor, main revision and schema; protected imports become one proposal.
Use --profile-file FILE for your own mapping. The canonical bundled profiles are
PEP and handbook.
Captured records and declared source relationships remain source-owned. Local
notes and relationships can cite them. Native export preserves original bytes
and executable modes under sources/SOURCE_ID/, alongside normalized views and
provenance. RST is shown as literal source. Multiple independent sources are
supported; changed-source refresh, deletions and section retrieval are deferred.
See the profile contract and migration guide.
The local adapter below retains the whole documentation source tree. Shared Markdown-only migration uses a reviewed, human-applied bootstrap plan; see shared editable Markdown for the separate interface, original fidelity and retained Git link behavior.
For a Liskov import, start with an empty store and pin the source commit:
set source /path/to/liskov-agent-orchestrator
set revision (git -C $source rev-parse HEAD)
scrolls --json import markdown "$source/docs" --rev $revision
scrolls doctor
scrolls show ADR-0236
scrolls query --file examples/queries/applicable.yaml --path repos/liskov-rs/src/example.sql
scrolls render --format liskov --out ./liskov-docs-exportImport reads committed Git objects, preserving original metadata, paths, and assets. Repeating the same source commit is safe; importing a changed source requires a new store. Unchanged imported files render byte-for-byte. Imported backlog, epic, milestone, question, and untyped archive records remain immutable. Both Markdown import commands refuse a committed tree containing a Scrolls export, including when the export is nested beneath the selected directory.
Both export formats generate a read-only snapshot at one store revision.
On Unix, executable originals are written with mode 0555 and all other files
with 0444. Make changes through the store, then render to a fresh directory
and replace the old export directory.
It includes a Markdown file for every record, the captured original files,
and scrolls/graph.json with every record, field, alias, edge and the active
schema. The store retains history, other proposals, operation receipts and
store metadata outside the snapshot.
SCROLLS-MANIFEST.json v2 records the store identity, ref, store and schema
revisions, Scrolls version, record paths and details, file SHA-256 hashes,
counts, a graph content digest and the cache-derived Beads page paths. Check
the hashes, counts and record entries against the exported files for an
offline integrity check. Use scrolls verify-export --dir ./liskov-docs-export
with the original store to check snapshot parity. It reports a moved ref
head as stale and still verifies the named revision. See the
export contract.
Native decisions use stable sc-… identities and
separate views. A declared sequence gives native decisions ADR lookup aliases on
landing; imported ADR numbers remain metadata and aliases. Native allocated
numbers do not populate imported-number metadata. Local
questions and answers are independent of the legacy inbox.
Import and export do not transfer documentation authority. The original Git documentation remains authoritative for the orchestrator; this release makes no authority cutover.
From this checkout, install the private Dolt and Beads binaries and prepare the pinned old-writer fixture before running the complete qualification:
./scripts/install-dolt.sh
./scripts/install-beads.sh
git clone https://github.com/mooselabs/scrolls.git .verification/scrolls-0.3.0
git -C .verification/scrolls-0.3.0 checkout --detach 3ae0a38dcc4da0a508e82ce4737d226e06d6f2b4
git clone https://github.com/mooselabs/scrolls.git .verification/scrolls-shared-previous
git -C .verification/scrolls-shared-previous checkout --detach 024d95242ea811520f2925d3e27ab45c933145a5
cargo fmt --check
cargo clippy --locked --all-targets -- -D warnings
cargo test --locked --all-targets
cargo build --locked --release --all-targets
python3 scripts/demo.py --binary target/release/scrolls --out /tmp/scrolls-demo
./scripts/install-beads.sh
python3 scripts/verify-beads.py --binary target/release/scrollsReal-Dolt tests, including the loopback HTTP suite (cargo test --locked --test http),
fail if a private binary or the pinned old-writer source is missing. CI runs the Rust checks,
demonstration, and Beads qualification. Use a fresh demonstration output path.
Full corpus qualification is a separate local check against the private source:
python3 scripts/verify-corpus.py /path/to/orchestrator --rev COMMIT --out /tmp/scrolls-qualificationThe pinned policy pack must already be present in that source repository's verified cache. See the qualification reports for exact results and limitations.
- Command reference: CLI, JSON, lifecycle, storage, and Beads contracts.
- Design: implementation boundary followed by the broader design.
- Migration report: pinned corpus import/export evidence.
- Correctness qualification: doctrine, relationships, answers, and export checks.
- Review acceptance qualification: revision binding, retries, recovery, and corpus parity.
The README's onboarding structure is inspired by the Beads README; the commands and support boundaries above describe Scrolls.
A standalone Scrolls store, whether local or shared Dolt, serves one tenant
with the fixed ID default. Run scrolls doctor to see the served tenant.
Existing Dolt stores use the same ID without a migration.
The unreleased shared backend can initialize a fresh externally provisioned Dolt 2.2.0 database and publish direct or reviewed graph changes using a named SQL account, with durable cross-client recovery, profile-based captured Git imports and shared editable Markdown bootstrap. Database-only verified backup and restore are described in shared backups. See shared authoring for the reviewed initialization procedure, connection file, supported commands and qualification fixtures. Shared maintenance migrations, editable adoption, caches and repository discovery remain unavailable. Local workflows retain their existing behavior.
GET /v0/graph serves all documents and relationships in one revision-bound
read, without captured originals or source-file bytes. Fabriscope uses this
endpoint through a private scrolls serve or --scrolls-url; its older
version-2 client needs the ADR-0280 D27 update to accept this version-3 server.
See the
HTTP guide for conditional reads, discovery and loopback
security. This additive endpoint needs no store migration.