@onlooker-community/lore
v0.4.0
Published
Lore — local epistemic knowledge store (Knowledge Gravity Engine) for the Onlooker ecosystem
Downloads
224
Maintainers
Readme
Lore (Knowledge Gravity Engine)
Local SQLite-backed epistemic store for the Onlooker ecosystem: typed knowledge objects (OIDA-aligned classes), class-specific decay, rising urgency for unresolved QUESTIONs, and signed CONTRADICTS edges with score suppression.
Install
From this monorepo (dev):
bun install
# Run via workspace
bun tools/lore/bin/cli.ts doctorPublished (when available):
bunx @onlooker-community/lore doctorOverride the CLI command for plugin hooks:
export LORE_CLI="npm /path/to/marketplace/tools/lore/bin/cli.ts"Data locations
| Path | Purpose |
|------|---------|
| ~/.claude/onlooker/lore/lore.sqlite | SQLite database |
| ~/.claude/onlooker/lore/config.json | Optional decay / weight tuning |
CLI
| Command | Description |
|---------|-------------|
| lore ingest --format archivist-session --file <path> | Upsert KOs from an Archivist session JSON |
| lore ingest --format scribe-session --file <path> | Upsert from { session_id, cwd, captures[] } |
| lore sync-cartographer --file <audit.json> | Create hypothesis objects + CONTRADICTS edges from Cartographer contradiction issues |
| lore query --cwd <path> [--limit N] [--json] | Ranked knowledge for cwd (path-prefix match) |
| lore context-for-inject --cwd <path> [--max-words N] | Plain-text block for SessionStart injection |
| lore export-for-brief --cwd <path> [--since ISO] | JSON bundle for Counsel |
| lore edge add --from <id> --to <id> [--weight] [--source] | Manual contradiction edge |
| lore doctor | DB path, schema version, row counts |
Environment: LORE_DB_PATH overrides the SQLite file path.
Integrations
- Archivist — ingests after each session extract (
lore_enabledinplugins/archivist/config.json); optionallore_rankingmerges Lore context into SessionStart injection. - Scribe — ingests on distill (
lore_enabledin Scribe config). - Counsel —
gather.shattachessources.lorewhenlore.enabledis true. - Relay — optional
inject_lore+lore_max_wordsin Relay config. - Cartographer —
SessionEndhook runscartographer-lore-sync.shto push contradictions into Lore.
Tests
cd tools/lore && bun test