Cadabby
Epistemically Auditable LLM Wiki Engine for Humans & AI Agents
Cadabby is a zero-dependency, local-first engine and Model Context Protocol (MCP) server for maintaining living, high-density knowledge vaults. It enables AI agents (Claude Code, Google Antigravity, OpenHands, etc.) and humans (via Obsidian or CLI) to collaboratively build, cross-reference, and audit knowledge graphs anchored by Open Knowledge Foundation (OKF) epistemic trust tiers.
Key Highlights
- Zero Runtime Dependencies: Built with 100% pure Python standard library (
CPython >= 3.11). No pip dependencies. - Flat Canonical Synthesis:
wiki/is strictly flat (wiki/*.md); physical subdirectories inwiki/are forbidden. Navigation topology is editorial via Maps of Content (type: moc). - Autonomous Cognitive Domains: Partition knowledge into independent cognitive domains (e.g.,
customers/,projects/) governed by localized{domain}/AGENTS.mdmanifests and arbitrary nested folder structures. - Disposable SQLite FTS5 Cache: Ephemeral, high-performance full-text search and 1-hop graph traversals. Delete
.cadabby/cache.dbat any time with zero data loss. - Epistemic Trust Tiers: Every note carries cryptographically bound attestation (
human-reviewed,machine-confirmed,stale-verified, orunverified). - Drift-Induced Downgrade: If an agent or user alters note prose without re-verification, its trust tier automatically downgrades to
stale-verified(verification debt). - Deterministic Gap Report:
index.mdis a focused worklist of entry points, unfiled notes, raw queue, and verification debt—never a bloated catalog. - Normative Six-Gate Linting: Automated validation for schema, layout, link consistency, provenance, graph connectivity, and verification integrity.
- Universal Harness Portability: Works out-of-the-box with Claude Code (
.mcp.json), Antigravity (native plugin & subagents), Gemini CLI, and Obsidian.
1. Installation
Cadabby is a command-line application, so install it as a tool rather than as a
library. Either of these puts cadabby on your PATH in its own isolated
environment, leaving your system Python untouched:
uv tool install cadabby # recommended
pipx install cadabby # equivalent
Verify:
cadabby --help
Why not
pip install? It works, but it drops Cadabby into whichever environment happens to be active, which makes the install easy to lose track of and easy to break with an unrelated upgrade. Nothing importscadabbyas a library, so there is no reason to put it on an interpreter's import path.
Cadabby has zero runtime dependencies (pure CPython >= 3.11 standard library), so installation never pulls in a transitive dependency tree.
Contributing
Working on Cadabby itself:
git clone https://github.com/naikoob/cadabby.git
cd cadabby
uv sync # or: pip install -e .
# Fast parallel test execution across all CPU cores (~5.5s, 353 tests):
python3 tests/run_parallel.py
# Canonical sequential test suite:
PYTHONPATH=src python3 -m unittest discover tests
2. Initializing a Vault
To scaffold a complete, production-ready knowledge vault:
# Initialize a new vault with Obsidian integration:
cadabby init --vault my-vault --name my-vault --obsidian
cd my-vault
This creates a standardized 3-layer vault layout:
my-vault/
├── .cadabby.json # Vault configuration, trust multipliers & identities
├── .mcp.json # Universal MCP server config (for Claude Code, Cursor, etc.)
├── AGENTS.md # Canonical constitution / operational rules for all AI agents
├── CLAUDE.md # Thin pointer delegating to AGENTS.md
├── GEMINI.md # Thin pointer delegating to AGENTS.md
├── STYLE.md # Vault-specific prose and citation guidelines
├── index.md # Deterministic gap report (entry points, unfiled notes, raw queue, verification debt)
├── log.md # Append-only activity ledger
│
├── raw/ # Ground truth sources (PDFs, raw text, research papers)
│
├── wiki/ # Flat canonical knowledge domain (strictly wiki/*.md)
│ ├── Architecture.md # Concepts, entities, syntheses (typed via frontmatter)
│ └── Systems-MOC.md # Maps of Content (type: moc) governing vault topology
│
├── customers/ # (Optional) Cognitive domain with autonomous AGENTS.md
│ ├── AGENTS.md # Domain constitution & schema rules
│ └── acme-corp/ # Flexible, arbitrary nested subdirectory layout
│
├── templates/ # (Optional) Starter note templates, excluded from discovery
│
├── .agents/skills/ # Reusable skills: librarian and technician
├── .claude/commands/ # Claude Code slash commands (/ingest, /vault-status, /vault-lint)
└── .obsidian/ # (Optional) Pre-tuned Obsidian desktop settings
3. How to Use Cadabby
Workflow A: Using AI Agents (Claude Code, Cursor, Windsurf)
-
Drop a ground truth document into
raw/:cp ~/Downloads/attention-paper.pdf raw/attention-paper.pdf
-
Start your agent inside the vault directory:
claude
Claude Code automatically reads
.mcp.json, launchescadabby mcp, and readsCLAUDE.md$\rightarrow$AGENTS.md. -
Interact naturally using slash commands or chat:
> /ingest raw/attention-paper.pdfThe agent will:
- Call
vault_searchto check if related concepts already exist. - Call
vault_groundto inspect existing notes and their 1-hop links. - Call
vault_scaffold_noteto draftwiki/Flash-Attention.mdcitingraw/attention-paper.pdf. - Add
[[wikilinks]]to existing notes and suitable Maps of Content ([[AI-Systems-MOC]]). - Call
vault_verify_notestamping the note withagent:claude-code. (Theindex.mdgap report and thelog.mdledger are kept up to date implicitly; no manual sync needed).
- Call
Workflow B: Using Google Antigravity
- Install the Antigravity plugin:
cadabby install --antigravity
- Open the vault in Antigravity. The plugin provides:
- An MCP sidecar running
cadabby mcp. - Two specialized personas:
@librarian: Researches raw sources, checks prior knowledge, scaffolds notes, and resolves links.@technician: Runsvault_lint, verifies cache health, and tracks verification debt.
- An MCP sidecar running
Workflow C: Human Reading & Editing (Obsidian & CLI)
- Open
my-vault/in Obsidian:- Wikilinks
[[Note-Stem]]resolve automatically across the flat wiki and nested cognitive domains. index.mdacts as your gap report, while Maps of Content (type: moc) curate navigation topology.- The core Templates plugin works as-is. Cadabby reads
.obsidian/templates.json, skips the folder it names so your templates are never mistaken for notes, and can scaffold from them:cadabby scaffold "Flash-Attention" --type concept --desc "IO-aware attention" --template concept
The template's body is used with{{title}}substituted; its frontmatter is discarded, because OKF frontmatter is engine-owned. Foam's.foam/templates/needs no configuration. - To start from Cadabby's own note shape, scaffold the starters once:
cadabby init --vault my-vault --obsidian-templates
This writestemplates/Concept.mdandtemplates/MOC.mdand points Obsidian at them, so Insert template produces correct OKF frontmatter. It is opt-in because it reservestemplates/, which would otherwise be a normal cognitive domain; an existing template folder is honored instead, and atemplates/that already holds notes is refused rather than swallowed. Starters filltitlebut leavedescriptionempty — the plugin cannot prompt for it — so a fresh note failscadabby lintwithFIELD_MISSINGuntil you write one. That is deliberate: aTODOplaceholder would pass lint and quietly seed a field that feeds search ranking.
- Wikilinks
- Review and certify notes:
When a human inspects a note and certifies its accuracy:
cadabby verify wiki/Flash-Attention --human
This binds the attestation to the exactsha256of the note body and upgrades its trust tier tohuman-reviewed($2.0\times$ search boost). - If anyone edits the note body:
Cadabby automatically detects the SHA-256 mismatch and demotes the note to
stale-verified(verification debt), prompting re-review.
4. Cognitive Domains & Domain Manifests
Cadabby supports modular, multi-domain knowledge architectures. While wiki/ serves as the canonical knowledge base with a strictly flat layout governed by Maps of Content (MOCs), you can partition knowledge into independent Cognitive Domains simply by creating top-level directories (e.g. customers/, projects/, research/, team/). Custom domains fully support arbitrary nested directory structures.
Creating a Cognitive Domain with AGENTS.md
Drop an AGENTS.md file into the root of any top-level domain folder to configure validation schemas and define agent directives:
---
description: Customer accounts, CRM dossiers, and stakeholders
allowed_types:
- account
- stakeholder
- interaction
require_sources: false
---
# Customers Domain Directives
1. Every customer note must include account tier and primary contact.
2. Link stakeholder profiles using `[[Stakeholder-Name]]`.
3. Do not store sensitive secrets or credentials in dossiers.
Manifest Configuration Options
| Field | Type | Default | Purpose |
|---|---|---|---|
description |
string | "<Domain> domain" |
Human-readable domain description. |
allowed_types |
list[str] | null (unrestricted) |
Allowed type: values in frontmatter. Violations trigger ENUM_INVALID in cadabby lint. |
require_sources |
bool | false |
When true, notes in this domain must specify non-empty sources: [...]. |
Permissive vs. Strict Domains
- Canonical
wiki/Domain: Strictly flat (wiki/*.md). Dynamic open typing by default (unless restricted bywiki/AGENTS.md). Governed by Maps of Content (type: moc). - Permissive Domains (no
AGENTS.mdorallowed_types: null): Any non-empty note type and any folder hierarchy are allowed without triggering lint errors. - Strict Domains (
allowed_typesspecified): Linter enforces valid types, while allowing cross-domain wikilinks ([[Note-Stem]]) to resolve smoothly across all domains. Custom domains support nested folders.
Every discovered domain is searchable. There is no per-domain opt-out: exclusion happens before discovery (reserved names, dot-prefixed directories, build folders), so anything that became a domain is knowledge you put in the vault deliberately. To narrow a query, pass
--domain/domainat the call site rather than hiding content from every future search. SeeSPECIFICATION.md§2.2.
Step-by-Step: Creating a New Cognitive Domain
- Choose a Top-Level Directory Name: Pick a domain name at the vault root (e.g.
customers/,projects/,research/). Ensure the name does not conflict with reserved engine directories (raw/,log/,.cadabby/,.obsidian/,.git/,.agents/,.claude/, or environment folders like.venv/). - Create the Domain Manifest (Optional but Recommended): Create
{domain}/AGENTS.mdto define schema validation and operational directives:mkdir -p customers cat << 'EOF' > customers/AGENTS.md --- description: "Customer accounts and dossiers" allowed_types: - account - contact require_sources: false --- # Customer Directives Cross-link all accounts to primary contact notes. EOF
- Scaffold Notes in the Domain:
- Via CLI:
cadabby scaffold "Acme-Corp" --domain customers --type account --description "Enterprise account dossier"
- Via MCP:
Call
vault_scaffold_note(title="Acme-Corp", domain="customers", type="account", description="Enterprise account dossier").
- Via CLI:
- Verify Domain Discovery & Epistemic Health:
cadabby statusThe status report displays registered domains, their note counts, and schema status. - Validate Schemas & Integrity:
cadabby lintThe linter validates note frontmatter against the domain'sallowed_typesand layout rules.
How AI Agents Consume Domain Directives
- MCP Resources: Cadabby exposes
vault://domains(inventory of all discovered domains) anddomain://{name}/directives(the markdown body of{domain}/AGENTS.md). - Grounding Enrichment: When an agent calls
vault_groundon a note, Cadabby automatically embeds the note's domain definition and localized directives into the response payload.
5. MCP Architecture (7 Tools & 2 Resources)
Conforming to §5.1-§5.2 of the Technical Specification, Cadabby exposes exactly 7 atomic tools and 2 dynamic resources to AI agents:
Atomic Tools
| Tool | Purpose |
|---|---|
vault_search |
Epistemic BM25 full-text search with trust tier boosts, domain filters, and status multipliers. |
vault_ground |
Retrieves full content, localized domain directives, and 1-hop graph neighborhood (links, backlinks, sources). |
vault_status |
Epistemic health snapshot: tier counts, domain breakdown, verification debt, and unprocessed raw/ files. |
vault_scaffold_note |
Scaffolds a new typed note in any domain with valid OKF frontmatter and generated attribution. |
vault_update_note |
Non-destructive frontmatter patch, section append, or section replace with optimistic lock. |
vault_verify_note |
Cryptographically binds an agent:<client_id> attestation to the body SHA-256 (refuses human:*). |
vault_lint |
Runs the six normative epistemic lint gates and returns typed diagnostics for self-healing. |
Dynamic Resources
| Resource URI | MIME Type | Description |
|---|---|---|
vault://domains |
application/json |
Real-time inventory of all discovered cognitive domains, descriptions, and schema flags. |
domain://{domain}/directives |
text/markdown |
Localized operational instructions and guidelines from {domain}/AGENTS.md. |
6. CLI Command Reference
| Command | Description | Example |
|---|---|---|
cadabby init |
Scaffold a new vault with all config & skills, optionally with Obsidian starter templates (--obsidian-templates) |
cadabby init --vault my-vault --obsidian |
cadabby sync |
Scan files, update SQLite cache & rebuild index.md |
cadabby sync |
cadabby status |
Report note counts, trust tiers, and verification debt | cadabby status |
cadabby search |
Epistemic BM25 search with trust boosts & domain filters | cadabby search "attention mechanism" --domain wiki |
cadabby ground |
Retrieve note content and 1-hop neighborhood | cadabby ground wiki/Attention |
cadabby scaffold |
Scaffold a new typed note in any domain, optionally from an Obsidian template (--template) |
cadabby scaffold "Transformer" --type concept --domain wiki --desc "Attention model" |
cadabby update |
Patch frontmatter or append/replace sections | cadabby update wiki/Transformer --replace-section "Overview:New text" |
cadabby verify |
Stamp cryptographic attestation on note | cadabby verify wiki/Transformer --human |
cadabby lint |
Run the six normative epistemic linting gates across all domains | cadabby lint |
cadabby audit |
Check Git blame provenance of human attestations | cadabby audit --require-signed |
cadabby graph |
Display 1-hop and 2-hop neighbors and co-citations for a note | cadabby graph wiki/Attention |
cadabby log |
Append a timestamped entry to the active log.md ledger |
cadabby log "Reviewed distributed consensus notes" |
cadabby mcp |
Launch the JSON-RPC 2.0 stdio MCP server | cadabby mcp |
cadabby install |
Register MCP configs in Antigravity or Claude Code | cadabby install --antigravity |
7. Epistemic Trust Tiers
| Tier | Multiplier | Description |
|---|---|---|
human-reviewed |
$2.0\times$ | Certified by a validated human reviewer. Body matches sha256. |
machine-confirmed |
$1.0\times$ | Synthesized and verified by an automated AI agent. |
stale-verified |
$0.8\times$ | Previously verified, but note prose drifted without re-review (verification debt). |
unverified |
$0.5\times$ | Newly drafted or imported without verification. |
Status multipliers apply on top of trust tiers:
evergreen: $1.1\times$active: $1.0\times$draft: $0.7\times$deprecated: $0.3\times$stub: $0.2\times$
8. Development & Testing
Cadabby uses standard-library unittest with zero test dependencies:
# Fast parallel test execution across all CPU cores (~5.5s, 353 tests):
python3 tests/run_parallel.py
# Parallel execution with verbose output or target filtering:
python3 tests/run_parallel.py -v
python3 tests/run_parallel.py test_cache
# Canonical sequential test suite:
PYTHONPATH=src python3 -m unittest discover tests
Metadata
Release files for cadabby 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cadabby-0.3.2.tar.gz | 99.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cadabby-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 211.0 kB
Release files / cadabby-0.3.2.tar.gz
| Download URL | cadabby-0.3.2.tar.gz |
|---|---|
| Size | 99.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1580f7fbe3c6f31a8132a458a594889034a266eaefe0ae254b08811e0f0e7da
|
|
BLAKE2b-256 checksum How to use checksums |
57e1468e62f65e67812cdb4dfdb70f8616a6bc33d36efbd134c0e81d4a13df6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / cadabby-0.3.2-py3-none-any.whl
| Download URL | cadabby-0.3.2-py3-none-any.whl |
|---|---|
| Size | 111.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3202ef96314e962919edab02741e20ed5314647cefce8dbb00776d354e779f7d
|
|
BLAKE2b-256 checksum How to use checksums |
949c4f193600190141d9022f0d4e5a66529a30e0ab8d90d48866849c4463dbe7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|