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.31"
"version": "0.62.32"
}
]
}
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.31",
"version": "0.62.32",
"author": {
"name": "Fabian Wilde",
"email": "docwilde@proton.me"
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.62.32 — 2026-11-21

- Record provider-reported tool outcomes by default in Claude Code, Codex, Antigravity and DOXA.
- Store deduplicated observations locally and let reviewers link them to beliefs and exact learned recipe revisions.
- Set `LORE_TOOL_EVIDENCE=0` to turn recording off.

## 0.62.31 — 2026-11-19

- Document LORE memory injection and local transcript indexing for Antigravity sessions in DOXA.
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.

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ 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.

Expand All @@ -46,6 +50,7 @@ paged pending review, protected cleanup, and optional shared skill usage.
while preserving human review of each complete, exact proposal.
- **Reviewed cleanup.** [Preview diagnostic retention and select orphaned
codegraph snapshots](docs/retention.md) before applying a reviewed plan.
- **Tool evidence.** LORE [captures reported tool outcomes](docs/tool-evidence.md) by default. Link relevant observations to beliefs and learned recipes.
- **Learned skills.** Recipes carry outcome history and staged updates or retirement.
- **Local skill experiments.** [Compare exact pending coding skills](docs/skill-evaluation.md)
against frozen tests before human approval. The experimental subscription
Expand Down Expand Up @@ -111,7 +116,7 @@ This WSL 2 setup has not been verified in LORE CI; see the
### Codex

LORE supports Codex through the portable [`plugin.json`](plugin.json) and
its [startup and prompt hooks](codex/hooks/hooks.json). Enable the full plugin,
its [startup, prompt and tool hooks](codex/hooks/hooks.json). Enable the full plugin,
then review and trust its hooks with `/hooks` in Codex. Once trusted, the startup
hook injects the shared user and current project snapshot at startup, resume,
clear, compaction, and fork. Codex requires a new review when a hook changes; see its
Expand Down
17 changes: 17 additions & 0 deletions antigravity/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"lore-tool-evidence": {
"enabled": true,
"PostToolUse": [
{
"matcher": ".*",
"hooks": [
{
"type": "command",
"command": "if [ \"${LORE_TOOL_EVIDENCE:-1}\" != 0 ] && [ -z \"${LORE_SKIP:-}\" ]; then exec lore-rs tool-evidence hook --engine antigravity --event PostToolUse; else printf '%s\\n' '{}'; fi",
"timeout": 2
}
]
}
]
}
}
6 changes: 6 additions & 0 deletions antigravity/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://antigravity.google/schemas/v1/plugin.json",
"name": "lore-tool-evidence",
"version": "0.62.32",
"description": "Record reported tool outcomes in the local LORE evidence store."
}
2 changes: 1 addition & 1 deletion bin/lore
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fingerprint=$({ find "$root/rust/lore-core/src" -type f -exec sha256sum {} +; sh
target=$cache/$fingerprint
binary=$target/release/lore-rs
if matches "$binary"; then exec "$binary" "$@"; fi
if [ "${1:-}" = hook ]; then
if [ "${1:-}" = hook ] || { [ "${1:-}" = tool-evidence ] && [ "${2:-}" = hook ]; }; then
printf 'LORE native carrier is not installed; run the LORE setup command once.\n' >&2
exit 1
fi
Expand Down
11 changes: 11 additions & 0 deletions codex/hooks/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "if [ \"${LORE_TOOL_EVIDENCE:-1}\" != 0 ] && [ -z \"${LORE_SKIP:-}\" ]; then exec \"${PLUGIN_ROOT}/bin/lore\" tool-evidence hook --engine codex --event PostToolUse; else printf '%s\\n' '{}'; fi",
"timeout": 2
}
]
}
]
}
}
31 changes: 31 additions & 0 deletions docs/tool-evidence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Tool evidence

Tool recording is on by default. Each observation records the provider, project, session, call ID, tool name and reported outcome. LORE stores these observations locally and deduplicates repeated deliveries of the same call. Hook arguments, command output and error text stay out of the evidence store. Set **LORE_TOOL_EVIDENCE=0** in the environment that launches the agent to turn recording off.

## Provider support

| Harness | Source of outcome |
| --- | --- |
| Claude Code | The LORE plugin registers **PostToolUse** and **PostToolUseFailure**. |
| Codex | The plugin registers **PostToolUse**. LORE uses a structured exit code or the MCP result’s error flag. Codex shell hooks that supply output alone produce no observation. |
| Antigravity | The companion plugin uses **PostToolUse**, which reports success or failure in its **error** field. LORE uses the conversation and step IDs to identify each call. |
| DOXA | The daemon records structured tool results from Claude, Codex, Antigravity, DeepSeek and GLM. Router observations carry the active worker engine. DOXA writes up to 128 observations at the end of each turn. |

For Antigravity, build and install the LORE CLI from this checkout with **./task install**, then run **agy plugin install "$PWD/antigravity"**. Launch Antigravity with **lore-rs** on **PATH**. The companion plugin records tool evidence. DOXA supplies LORE memory to its own Antigravity sessions.

DOXA uses its embedded LORE core when it supports tool evidence. A build with an older core looks for an updated **lore-rs** on **PATH**. Set **DOXA_LORE_RS** to an absolute path to select the executable explicitly. **DOXA_LORE=0** also disables recording for that DOXA session.

## Review and link observations

Use **lore tool-evidence list** from the relevant project. Results are newest first. Pass **--before ID** to read the next page. In a human terminal, attach a reviewed observation to a belief or learned recipe:

~~~sh
lore tool-evidence link 42 --belief 7
lore tool-evidence link 42 --recipe verify-build
lore tool-evidence list --belief 7
lore tool-evidence list --recipe verify-build
~~~

The link lets you retrieve the tool result with the selected belief or recipe. Each recipe link identifies the exact recipe revision. It carries the provider’s reported success or failure. Belief confidence, belief outcomes and recipe success counters retain their existing review and evaluation paths.

[Claude Code hooks](https://code.claude.com/docs/en/hooks) · [Codex hooks](https://learn.chatgpt.com/docs/hooks) · [Antigravity hooks](https://antigravity.google/docs/build-plugins/#lifecycle-hooks)
22 changes: 22 additions & 0 deletions hooks/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,28 @@
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "if [ \"${LORE_TOOL_EVIDENCE:-1}\" != 0 ] && [ -z \"${LORE_SKIP:-}\" ]; then exec \"${CLAUDE_PLUGIN_ROOT}/bin/lore\" tool-evidence hook --engine claude --event PostToolUse; else printf '%s\\n' '{}'; fi",
"timeout": 2
}
]
}
],
"PostToolUseFailure": [
{
"hooks": [
{
"type": "command",
"command": "if [ \"${LORE_TOOL_EVIDENCE:-1}\" != 0 ] && [ -z \"${LORE_SKIP:-}\" ]; then exec \"${CLAUDE_PLUGIN_ROOT}/bin/lore\" tool-evidence hook --engine claude --event PostToolUseFailure; else printf '%s\\n' '{}'; fi",
"timeout": 2
}
]
}
]
}
}
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.31",
"version": "0.62.32",
"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.31"
version = "0.62.32"
edition = "2021"
license = "AGPL-3.0-only"
description = "Native LORE memory, beliefs, review and session index"
Expand Down
2 changes: 2 additions & 0 deletions rust/lore-core/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ impl Core {
"codegraph_snapshot_read_v1",
"codegraph_snapshot_store_v1",
"diagnostic_trace_capture_v1",
"tool_evidence_record_v1",
"diagnostic_trace_read_v1",
"diagnostic_retention_plan_v1",
"diagnostic_retention_apply_v1",
Expand Down Expand Up @@ -80,6 +81,7 @@ impl Core {
let config = &self.config;
let auth = &self.authority;
let value = match req["op"].as_str().ok_or(Error::InvalidRequest)? {
"tool_evidence_record_v1" => crate::tool_evidence::record(config, req, "doxa")?,
"diagnostic_trace_capture_v1" => crate::diagnostics::capture(config, req)?,
"diagnostic_trace_read_v1" => crate::diagnostics::show(config, req)?,
"diagnostic_retention_plan_v1" => crate::retention::plan(config, req)?,
Expand Down
1 change: 1 addition & 0 deletions rust/lore-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pub mod context;
mod core;
pub mod dream;
pub mod diagnostics;
mod tool_evidence;
pub mod filemap;
pub mod files;
pub mod gate;
Expand Down
35 changes: 34 additions & 1 deletion rust/lore-core/src/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Diagnostics: trace capture --transcript FILE --session-id ID --engine claude|cod
trace retention-plan|retention-apply --json REVIEWED_PLAN
Administration: setup teardown reset project move config show|set|unset
Sync: sync status|health|whoami|push|pull|bootstrap|serve|export|import|classes|login|resign|seed
Tool evidence: tool-evidence list [--belief ID | --recipe NAME] [--before ID] [--limit N]
tool-evidence link OBSERVATION_ID (--belief ID | --recipe NAME)
Integration: mcp hook

Use --json '{...}' for structured arguments; --cwd defaults to this directory.
Expand Down Expand Up @@ -260,6 +262,9 @@ fn validate_flags(group: &str, sub: &str, req: &Value) -> Result<()> {
("consult"|"ask"|"dialectic",_) => "query limit",
("outcome",_) => "belief_id event source note",
("skills",_) => "prompt limit pid suite sha256 kind",
("tool-evidence", "hook") => "engine event",
("tool-evidence", "list") => "belief recipe before limit",
("tool-evidence", "link") => "belief recipe",
("trace",_) => "transcript session_id engine sha256 policy plan_sha256 plan",
("codegraph", "cleanup-plan"|"cleanup-apply") => "plan_sha256 plan reviewed_orphan_keys",
("dream",_) => "dry_run engine",
Expand Down Expand Up @@ -331,7 +336,12 @@ pub fn run(args: &[String]) -> Result<()> {
if matches!(args[0].as_str(), "--version" | "version") {
return output(json!(env!("CARGO_PKG_VERSION")));
}
let cfg = Config::from_env(Duration::from_secs(3))?;
let timeout = if args[0] == "tool-evidence" && args.get(1).is_some_and(|arg| arg == "hook") {
Duration::from_millis(600)
} else {
Duration::from_secs(3)
};
let cfg = Config::from_env(timeout)?;
if args[0] == "hook" {
return hook(&cfg, &args[1..]);
}
Expand All @@ -353,6 +363,7 @@ pub fn run(args: &[String]) -> Result<()> {
| "project"
| "trace"
| "codegraph"
| "tool-evidence"
);
let (sub, tail) = if grouped && args.get(1).is_some_and(|s| !s.starts_with('-')) {
(args[1].as_str(), &args[2..])
Expand All @@ -371,6 +382,28 @@ pub fn run(args: &[String]) -> Result<()> {
}
let mut core = Core::new(cfg.clone(), auth.clone());
let value = match (group, sub) {
("tool-evidence", "hook") if p.is_empty() => {
if crate::tool_evidence::enabled(&cfg) {
let mut raw = Vec::new();
io::stdin()
.lock()
.take(crate::MAX_FRAME_BYTES as u64 + 1)
.read_to_end(&mut raw)?;
if raw.len() > crate::MAX_FRAME_BYTES {
return Err(Error::TooLarge);
}
let input = serde_json::from_slice(&raw).map_err(|_| Error::InvalidRequest)?;
let engine = req["engine"].as_str().ok_or(Error::InvalidRequest)?;
let event = req["event"].as_str().ok_or(Error::InvalidRequest)?;
crate::tool_evidence::hook(&cfg, engine, event, &input)?;
}
json!({})
}
("tool-evidence", "list") if p.is_empty() => crate::tool_evidence::list(&cfg, &req)?,
("tool-evidence", "link") if p.len() == 1 => {
req["observation_id"] = json!(p[0].parse::<i64>().map_err(|_| Error::InvalidRequest)?);
crate::tool_evidence::link(&cfg, &req, &auth)?
}
("trace", "retention-plan") => crate::retention::plan(&cfg, &req)?,
("trace", "retention-apply") => crate::retention::apply(&cfg, &req, &auth)?,
("codegraph", "cleanup-plan") => crate::codegraph_snapshot::cleanup_plan(&cfg, &req)?,
Expand Down
Loading
Loading