Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"name": "lore",
"source": "./",
"description": "Shared memory for Claude Code, Codex, and DOXA: capped curated facts, evidence-backed beliefs, FTS5 session search, staged review, learned skills, and signed sync.",
"version": "0.62.34"
"version": "0.62.35"
}
]
}
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lore",
"description": "Memory for Claude Code that reasons about you and improves itself: Honcho-pattern belief store with deriver, dreamer and dialectic (/lore:ask), automatic skillification with a closed judge/update/retire loop, on a Hermes-pattern core \u2014 hard-capped curated memory, FTS5 session search, staged review.",
"version": "0.62.34",
"version": "0.62.35",
"author": {
"name": "Fabian Wilde",
"email": "docwilde@proton.me"
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.62.35 — 2026-11-25

- Exclude historical heuristic audit outcomes from belief calibration, graph ranking, and the STEER threshold. Preserve signed ledger history.
- Report the excluded audit count and the eligible calibration total in `lore stats`.

## 0.62.34 — 2026-11-25

- Fix **`lore audit`** writing belief outcomes from path existence and literal Git matches. Report fragment matches for review and count historical audit outcomes.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 25 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
are hard-capped; curated proposals wait for review. Derived beliefs retain their
evidence and appear on request or through explicitly enabled context.

Gemini sessions launched through Google Antigravity in DOXA share the same
memory and local session index. The standalone Antigravity companion records
tool evidence. [Antigravity setup](#google-antigravity)

> [!WARNING]
> **Beta.** Commands, caps, and configuration may change between releases.
> LORE indexes local transcripts; Claude review sends a scrubbed digest to
Expand All @@ -30,15 +34,9 @@ and relations between beliefs do not turn them into approved facts.

## What you get

[LORE 0.62.32](https://github.com/docwilde/LORE/releases/tag/v0.62.32) records
tool outcomes by default and lets reviewers link them to beliefs and learned
recipes.

[LORE 0.62.31](https://github.com/docwilde/LORE/releases/tag/v0.62.31) documents
shared memory for Gemini sessions through Google Antigravity in DOXA.

[LORE 0.62.30](https://github.com/docwilde/LORE/releases/tag/v0.62.30) adds
paged pending review, protected cleanup, and optional shared skill usage.
LORE 0.62.35 excludes historical heuristic audit outcomes from belief
calibration and the STEER threshold. `lore audit` reports path and Git token
matches for review. [Release notes](https://github.com/docwilde/LORE/releases/tag/v0.62.35)

- **Claude Code, Codex, and DOXA memory.** Share one native store for capped
user and project facts across engines; host facts stay local.
Expand Down Expand Up @@ -68,6 +66,8 @@ Use `/lore:filemap` to inspect file maps; `LORE_FILEMAP_CAP` and

## Install

### Claude Code

```
/plugin marketplace add docwilde/lore
/plugin install lore
Expand Down Expand Up @@ -109,10 +109,24 @@ filesystem (for example, under `~/`), then follow the install steps above.
This WSL 2 setup has not been verified in LORE CI; see the
[platform notes](docs/manual.md#platform-support) before relying on it.

### Antigravity in DOXA
### Google Antigravity

**Shared memory through DOXA.** On native Linux, choose **Antigravity** in DOXA’s
**New Session** form and select a Gemini model. DOXA injects the working
directory’s LORE memory on the first turn and indexes the scrubbed transcript
on session shutdown. Set `DOXA_LORE=0` to disable both for a session.
[DOXA Antigravity setup](https://github.com/docwilde/doxa/blob/main/docs/antigravity.md)

[DOXA](https://github.com/docwilde/doxa/blob/main/docs/antigravity.md) connects to Google Antigravity on native Linux. Gemini sessions in DOXA receive LORE memory with their first prompt and contribute scrubbed transcripts to local LORE session search. Use `DOXA_LORE=0` to disable memory injection and indexing for a session.
**Tool evidence in the standalone Antigravity CLI.** The `lore-tool-evidence`
companion records reported tool successes and failures in the local LORE store.
Install it from this checkout and keep `lore-rs` on `PATH`.

```sh
./task install
agy plugin install "$PWD/antigravity"
```

See [tool evidence](docs/tool-evidence.md) for storage and linking details.
### Codex

LORE supports Codex through the portable [`plugin.json`](plugin.json) and
Expand Down
2 changes: 1 addition & 1 deletion antigravity/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://antigravity.google/schemas/v1/plugin.json",
"name": "lore-tool-evidence",
"version": "0.62.34",
"version": "0.62.35",
"description": "Record reported tool outcomes in the local LORE evidence store."
}
4 changes: 2 additions & 2 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ Four rules keep the loop honest:

The deriver writes beliefs straight to SQLite, ungated. The gate sits on the read side instead:

- **World beliefs** — projects, systems, environment — reach the agent only on demand: `/lore:ask`, or `lore consult` at act time (opt in with `LORE_CONSULT=1`). Consult splits results into **STEER** (≥3 rows in the outcomes ledger, may shape the decision) and **CITE ONLY** (deriver-claimed — mention, never follow).
- **World beliefs** — projects, systems, environment — reach the agent only on demand: `/lore:ask`, or `lore consult` at act time (opt in with `LORE_CONSULT=1`). Consult splits results into **STEER** (at least three calibration-eligible outcomes, may shape the decision) and **CITE ONLY** (deriver-claimed — mention, never follow).
- **User-model beliefs** (`subject: user-model`) ride into the snapshot openly, labeled uncalibrated. They shape tone and approach, never authorize an action, and stamp `last_referenced` so the influence stays auditable.

**`user` and `user-model` are separate channels.** A preference the user stated goes to `user`, where a later session may act on it; a pattern the reviewer inferred from behaviour goes to `user-model`, which authorizes nothing. A conclusion already covered by the other channel is dropped before it is written. Rationale, the channel rule, and the containment check behind the drop logic: [`user-model-channel-separation.md`](user-model-channel-separation.md). `lore crosscheck` lists cross-channel near-duplicate pairs, read-only, for a human to resolve.

LORE measures confidence instead of asserting it: `lore stats` prints per-bucket empirical precision from the outcomes ledger, and shouts UNCALIBRATED below 100 outcomes.

`lore audit` samples active beliefs for review. `MATCH` and `NO_MATCH` describe a path or literal token in the current environment. Record verified claim outcomes with `lore outcome`. The audit reports the count of historical heuristic outcomes, which still count toward calibration.
`lore audit` samples active beliefs for review. `MATCH` and `NO_MATCH` describe a path or literal token in the current environment. Record verified claim outcomes with `lore outcome`. The audit reports historical heuristic outcomes. LORE keeps those entries in the ledger and excludes them from calibration and the STEER threshold.

**The cost, plainly.** A belief goes live the moment the deriver writes it; no human sees it first. Beliefs unreferenced for 45 days go dormant (`LORE_BELIEF_DORMANT_DAYS`; confidence ≥0.95 exempt) and two recorded contradictions retire one — but nothing re-verifies a claim that keeps getting cited. Read the store yourself now and then:

Expand Down
23 changes: 14 additions & 9 deletions lore_core/beliefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,10 @@ def record_outcome(conn: sqlite3.Connection, belief_id: int, event: str, source:
"uid": outcome_uid, "belief_uid": row[1], "event": event, "source": source,
"session_id": session_id, "agent": agent_val, "note": note_text,
})
if event == "contradicted":
if event == "contradicted" and source != "audit":
n = conn.execute(
"SELECT count(*) FROM belief_outcomes WHERE belief_id = ? AND event = 'contradicted'",
"SELECT count(*) FROM belief_calibration_outcomes"
" WHERE belief_id = ? AND event = 'contradicted'",
(belief_id,),
).fetchone()[0]
if n >= CONTRADICTIONS_TO_DORMANT:
Expand All @@ -670,11 +671,11 @@ def record_outcome(conn: sqlite3.Connection, belief_id: int, event: str, source:


def outcome_counts(conn: sqlite3.Connection, belief_id: int) -> tuple[int, int, int]:
"""(confirms, contradicts, stales) for one belief."""
"""(confirms, contradicts, stales) eligible for calibration."""
row = conn.execute(
"SELECT coalesce(sum(event = 'confirmed'), 0),"
" coalesce(sum(event = 'contradicted'), 0), coalesce(sum(event = 'stale'), 0)"
" FROM belief_outcomes WHERE belief_id = ?",
" FROM belief_calibration_outcomes WHERE belief_id = ?",
(belief_id,),
).fetchone()
return int(row[0]), int(row[1]), int(row[2])
Expand Down Expand Up @@ -784,24 +785,28 @@ def cmd_stats(args) -> int:
event name retired it.
"""
conn = db_connect()
total = conn.execute("SELECT count(*) FROM belief_outcomes").fetchone()[0]
total, legacy = conn.execute(
"SELECT count(*), count(CASE WHEN source = 'audit' THEN 1 END) FROM belief_outcomes"
).fetchone()
eligible = total - legacy
rows = conn.execute(
"SELECT round(b.confidence, 1) AS bucket, count(DISTINCT b.id), count(o.id),"
" coalesce(sum(o.event = 'confirmed'), 0),"
" coalesce(sum(o.event = 'contradicted'), 0), coalesce(sum(o.event = 'stale'), 0)"
" FROM beliefs b LEFT JOIN belief_outcomes o ON o.belief_id = b.id"
" FROM beliefs b LEFT JOIN belief_calibration_outcomes o ON o.belief_id = b.id"
" GROUP BY bucket ORDER BY bucket"
).fetchall()
print("claimed n_beliefs n_outcomes precision")
for bucket, nb, no, c, x, s in rows:
prec = f"{c / (c + x + s):.2f}" if (c + x + s) else " -"
print(f"{bucket:>7.1f} {nb:>9} {no:>10} {prec:>9}")
print(f"\nledger total: {total} outcome row(s)")
if total < 100:
print(f"calibration outcomes: {eligible}. Legacy audit outcomes excluded: {legacy}.")
if eligible < 100:
# loud on purpose: below ~100 outcomes the per-bucket precision is a
# handful of coin flips, and a confident-looking table would invite
# exactly the overtrust this ledger exists to end.
print(f"!!! UNCALIBRATED — n={total}, display gate at 100 !!!")
print(f"!!! UNCALIBRATED — n={eligible}, display gate at 100 !!!")
print("!!! per-bucket precision below is anecdote, not a curve — keep"
" recording verified outcomes (lore outcome) !!!")
return 0
Expand Down Expand Up @@ -852,7 +857,7 @@ def interaction_model_lines(limit: int = 5) -> "list[str]":
conn = db_connect()
rows = conn.execute(
"SELECT b.id, claim, confidence, source_engine,"
" (SELECT count(*) FROM belief_outcomes o WHERE o.belief_id = b.id)"
" (SELECT count(*) FROM belief_calibration_outcomes o WHERE o.belief_id = b.id)"
" FROM beliefs b WHERE status = 'active' AND subject = 'user-model'"
" ORDER BY confidence DESC, updated DESC LIMIT ?", (limit,)).fetchall()
if rows:
Expand Down
4 changes: 2 additions & 2 deletions lore_core/dialectic.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ def cmd_consult(args) -> int:
q = " ".join(args.query)
rows = conn.execute(
"SELECT b.id, b.subject, b.claim, b.confidence, "
"(SELECT count(*) FROM belief_outcomes o WHERE o.belief_id = b.id) AS n_out, "
"(SELECT sum(CASE WHEN o.event='confirmed' THEN 1 ELSE 0 END) FROM belief_outcomes o WHERE o.belief_id = b.id) AS n_conf "
"(SELECT count(*) FROM belief_calibration_outcomes o WHERE o.belief_id = b.id) AS n_out, "
"(SELECT sum(CASE WHEN o.event='confirmed' THEN 1 ELSE 0 END) FROM belief_calibration_outcomes o WHERE o.belief_id = b.id) AS n_conf "
"FROM beliefs b JOIN belief_fts f ON b.id = f.belief_id "
"WHERE belief_fts MATCH ? AND b.status = 'active' "
"ORDER BY bm25(belief_fts) LIMIT ?", (fts_expr(q, " OR "), args.limit)).fetchall()
Expand Down
6 changes: 6 additions & 0 deletions lore_core/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,12 @@ def db_connect() -> sqlite3.Connection:
pass # column already present
_backfill_uids(conn, "belief_outcomes") # every connect, as for beliefs
conn.execute("CREATE UNIQUE INDEX IF NOT EXISTS belief_outcomes_uid ON belief_outcomes(uid)")
# Historical audit observations stay signed and replayable. Only the
# evidence used for calibration and belief decisions is filtered.
conn.execute(
"CREATE VIEW IF NOT EXISTS belief_calibration_outcomes AS"
" SELECT id,belief_id,event FROM belief_outcomes WHERE source<>'audit'"
)
# SYNC OP LOG (sync spec PR 3, docs/plans/sync.md "The core: a local op
# log"): every mutation to a synced class appends one row here, in the
# SAME transaction as the mutation when the mutation is itself SQLite
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "lore",
"version": "0.62.34",
"version": "0.62.35",
"description": "Unified user, repo, and session memory for Claude Code, Codex, and DOXA",
"author": {
"name": "Dr. Fabian Wilde",
Expand Down
2 changes: 1 addition & 1 deletion rust/lore-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lore-core"
version = "0.62.34"
version = "0.62.35"
edition = "2021"
license = "AGPL-3.0-only"
description = "Native LORE memory, beliefs, review and session index"
Expand Down
3 changes: 2 additions & 1 deletion rust/lore-core/src/beliefs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ pub fn calibrated_confidence(prior: f64, confirms: u64, contradicts: u64) -> f64
(prior * 2. + confirms as f64) / (2. + confirms as f64 + contradicts as f64)
}
pub fn outcome_counts(conn: &Connection, bid: i64) -> Result<(u64, u64, u64)> {
Ok(conn.query_row("SELECT coalesce(sum(event='confirmed'),0),coalesce(sum(event='contradicted'),0),coalesce(sum(event='stale'),0) FROM belief_outcomes WHERE belief_id=?",[bid],|r|Ok((sql_count(r,0)?,sql_count(r,1)?,sql_count(r,2)?)))?)
Ok(conn.query_row("SELECT coalesce(sum(event='confirmed'),0),coalesce(sum(event='contradicted'),0),coalesce(sum(event='stale'),0) FROM belief_calibration_outcomes WHERE belief_id=?",[bid],|r|Ok((sql_count(r,0)?,sql_count(r,1)?,sql_count(r,2)?)))?)
}
pub(crate) fn reinforce_in_transaction(
cfg: &Config,
Expand Down Expand Up @@ -522,6 +522,7 @@ pub(crate) fn outcome_in_transaction(
&json!({"uid":uid,"belief_uid":belief_uid,"event":event,"source":source,"session_id":sid,"agent":agent,"note":note}),
)?;
if event == "contradicted"
&& source != "audit"
&& outcome_counts(conn, bid)?.1 >= 2
&& conn.execute(
"UPDATE beliefs SET status='dormant',updated=? WHERE id=? AND status='active'",
Expand Down
2 changes: 1 addition & 1 deletion rust/lore-core/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub fn interaction_model_lines(cfg: &Config) -> Result<Vec<String>> {
let mut conn = crate::store::connect(cfg)?;
let tx = conn.transaction_with_behavior(rusqlite::TransactionBehavior::Immediate)?;
let rows = {
let mut query=tx.prepare("SELECT b.id,claim,confidence,source_engine,(SELECT count(*) FROM belief_outcomes o WHERE o.belief_id=b.id) FROM beliefs b WHERE status='active' AND subject='user-model' ORDER BY confidence DESC,updated DESC LIMIT 5")?;
let mut query=tx.prepare("SELECT b.id,claim,confidence,source_engine,(SELECT count(*) FROM belief_calibration_outcomes o WHERE o.belief_id=b.id) FROM beliefs b WHERE status='active' AND subject='user-model' ORDER BY confidence DESC,updated DESC LIMIT 5")?;
let rows = query
.query_map([], |row| {
Ok((
Expand Down
1 change: 1 addition & 0 deletions rust/lore-core/src/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"CREATE TABLE IF NOT EXISTS belief_outcomes(id INTEGER PRIMARY KEY, belief_id INTEGER NOT NULL, event TEXT NOT NULL CHECK(event IN ('confirmed','contradicted','stale')), source TEXT NOT NULL, session_id TEXT, agent TEXT, note TEXT, created TEXT)",
"ALTER TABLE belief_outcomes ADD COLUMN uid TEXT",
"CREATE UNIQUE INDEX IF NOT EXISTS belief_outcomes_uid ON belief_outcomes(uid)",
"CREATE VIEW IF NOT EXISTS belief_calibration_outcomes AS SELECT id,belief_id,event FROM belief_outcomes WHERE source<>'audit'",
"CREATE TABLE IF NOT EXISTS sync_ops(seq INTEGER PRIMARY KEY, op_id TEXT NOT NULL UNIQUE, machine_id TEXT NOT NULL, machine_seq INTEGER NOT NULL, lamport INTEGER NOT NULL, class TEXT NOT NULL, op TEXT NOT NULL, project_key TEXT, payload TEXT NOT NULL, mac TEXT, created TEXT NOT NULL, applied INTEGER NOT NULL DEFAULT 0)",
"CREATE INDEX IF NOT EXISTS sync_ops_order ON sync_ops(lamport, machine_id, machine_seq)",
"CREATE UNIQUE INDEX IF NOT EXISTS sync_ops_slot ON sync_ops(machine_id, machine_seq) WHERE applied != 2",
Expand Down
Loading
Loading