Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Revert "docs(skills): recommend recall question for question-shaped lookups (W1 A29)"
garrytan3a625a24b34b
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4f66012ab6..18284e61db 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -19,7 +19,6 @@ identifiers and attribution are available in the pre-removal Git revision- `search.reranker.gate` (off by default) grades search candidates before the cross-encoder. `shadow` records how often the reranker was paying for an answer retrieval already found, in the response's `rerank_gate` metadata, on `--explain` and in a new `rerank_gate` section of `gbrain search stats`, and leaves results unchanged. A grade is strong when the top result is a vector match with cosine at least `search.evidence_cosine_floor` and `search.reranker.gate_min_gap` ahead of every other page. There is no skip mode: on the dev sets no question reached the 0.8 floor with voyage-4 embeddings, and the reranker changed about half the delivered tokens, so skipping it is not shipped. The cache key now includes the gate keys and `search.evidence_cosine_floor`.- `search.page_rank_cut` (default `whole_pages`) lets a `return_unit: "page"` call's own budget decide how many pages delivery gets. Before, ranking cut hits by chunk tokens to the mode's `search.tokenBudget` whatever the caller asked for: under tokenmax delivery was handed far more pages than fit and returned them as slivers, and under a mode cut small pages under-filled the budget. Now `search`, `query` and `recall` lift the mode cut, and delivery keeps ranked pages while their whole delivered size fits `search.page_rank_cut_factor` (default 1.5) × the budget, reporting `delivery.page_rank_cut`. Calls without a budget and other units are unchanged. On 72 BEAM conversations it was non-inferior to the cut off: −0.25 points, lower bound −1.00 against a −3 margin, with delivered context at budget. Those conversations are regression evidence, not a held-out test, and the 1.5 factor was picked under a rule amended after the dev results ([gbrain-evals #126 results](https://github.com/garrytan/gbrain-evals/blob/8b764e3e/docs/benchmarks/2026-10-13-memory-proof-wave-2-results.md)).- `recall` with `return_unit` and `budget_tokens` fills its budget. Delivery used to be sized to the whole budget, and the facts-first packer then dropped whole delivered blocks. It also re-costed those blocks with a chars/4 estimate while delivery had counted cl100k tokens, so even a call with no facts came back about 7% short. Delivery now gets what the facts leave (except under `query_first`), and delivered blocks cost what delivery counted.-- The brain-ops and query skills and the ambient-recall guide now tell agents to pass the user's question as `recall`'s `question` for question-shaped lookups, so facts come back ranked by relevance (`facts_order: "relevance"`) instead of newest first, and to say so when `facts_degraded` reports keyword-only ranking. The `question` parameter's own description is unchanged.## [0.60.198.0] - 2026-10-13diff --git a/docs/guides/ambient-recall.md b/docs/guides/ambient-recall.mdindex fce05b0513..1705d847a5 100644--- a/docs/guides/ambient-recall.md+++ b/docs/guides/ambient-recall.md@@ -22,7 +22,7 @@ ordinary conversation — is [ambient-writeback.md](./ambient-writeback.md).| **Session start** | `context_pack(entities, budget_tokens)` | Warm the thread's 1-3 standing entities before the first message. | zero-LLM, sub-second || **After compaction** | `context_pack(entities, budget_tokens)` | Rehydrate the verbatim detail the summary dropped. | zero-LLM, sub-second || **Heartbeat / periodic wake** | `delta(session_id, budget_tokens)` | "What changed since my last wake" in O(changes), deduped. | zero-LLM, sub-second |-| Explicit memory question | `recall(question, query?, budget_tokens)` | Pass the user's question as `question` so saved facts rank by relevance to it (`facts_order: "relevance"`); add `query` to also search pages. Use `recall(entity)` for everything about one entity. | sub-second (+1 embedding per `question` or `query`) |+| Explicit memory question | `recall(query \| entity, budget_tokens)` | The budget-packed read for "what do we know that we SAVED about X". | sub-second (+1 embedding if `query`) || Answer needs cross-page reasoning | `synthesize(question)` | LLM-backed. **Never** on a hot or ambient path. | seconds-to-minutes, $$ |Observed shape: per-message retrieval beyond `entity` cards adds latency fasterdiff --git a/plugin-variants/gbrain-coding/skills/brain-ops/SKILL.md b/plugin-variants/gbrain-coding/skills/brain-ops/SKILL.mdindex 67985d543a..9b27f86659 100644--- a/plugin-variants/gbrain-coding/skills/brain-ops/SKILL.md+++ b/plugin-variants/gbrain-coding/skills/brain-ops/SKILL.md@@ -42,8 +42,8 @@ suppresses writes for that turn, including when standing capture is enabled.> **Memory verbs (MEMORY_VERBS v1, gbrain ≥ 0.43).** Over MCP, prefer the five> core memory verbs for the read/write cycle: **`remember(fact, provenance,> ttl?)`** to save a single durable fact (mandatory provenance; dedupes +-> supersedes), **`recall(question | query | entity, budget_tokens)`** to read it-> back budget-packed (`question` ranks facts by relevance to a question), **`entity(name)`** for a zero-LLM card, **`synthesize(question)`**+> supersedes), **`recall(query | entity, budget_tokens)`** to read it back+> budget-packed, **`entity(name)`** for a zero-LLM card, **`synthesize(question)`**> for the expensive cross-page answer, **`forget(id)`** to withdraw active memory> (history, source material, and backups may remain). `context_pack` and `delta`> complete the seven-verb surface. Use@@ -52,21 +52,6 @@ suppresses writes for that turn, including when standing capture is enabled.> Fall back to the classic ops when the verbs aren't on the surface. Contract:> `docs/protocol/MEMORY_VERBS_v1.md`.>-> **Question-shaped memory lookups:** when the user asks something a saved-> fact answers ("where did I say we'd meet?", "what did Alice decide about the-> launch?"), pass the question itself as `question`:-> `recall({question: "What did Alice decide about the launch?", query: "Alice launch decision"})`.-> Facts come back ranked by relevance to it (`facts_order: "relevance"`) instead-> of newest first, and `query` also searches pages; drop `query` for facts only.-> CLI: `gbrain recall --question 'What did Alice decide about the launch?' --json`.-> `entity`, `session_id` and `since` still filter before ranking (`since` takes an-> ISO date such as `2026-09-01`). `question` ranks active facts only, so it is-> refused with `include_expired`. If the response-> carries `facts_degraded`, facts were ranked by term share only (its `reason`-> says why); say so rather than treating a thin answer as missing memory. Keep-> plain `recall(entity)` or `recall(query)` for "everything about X" and-> newest-first reads.->> **Tight-budget page questions:** explicitly use> `recall({query: "zebra telescope", budget_tokens: 75, budget_policy: "query_first"})`> so ranked page evidence packs before recent facts. CLI:diff --git a/plugin-variants/gbrain-coding/skills/query/SKILL.md b/plugin-variants/gbrain-coding/skills/query/SKILL.mdindex 254eacf463..dace517f2b 100644--- a/plugin-variants/gbrain-coding/skills/query/SKILL.md+++ b/plugin-variants/gbrain-coding/skills/query/SKILL.md@@ -40,10 +40,6 @@ Answer questions using the brain's knowledge with 3-layer search and synthesis.> provenance, evidence, and a server-enforced token budget:> - **`recall(query | entity, budget_tokens)`** — the budget-packed memory read.> Use it instead of bare `search` for "what do we know that we SAVED about X".-> For a question a saved fact answers, pass the question as `question`-> (`recall({question: "...", query: "..."})`): facts come back ranked by-> relevance (`facts_order: "relevance"`) instead of newest first, and a-> `facts_degraded` field means they were ranked by term share only.> - **`entity(name)`** — a zero-LLM person/company/project card (aliases,> last-touched, open threads, top edges). Use it instead of `get_page` +> `get_backlinks` when you just need the card.diff --git a/plugin-variants/gbrain-daily/skills/query/SKILL.md b/plugin-variants/gbrain-daily/skills/query/SKILL.mdindex 254eacf463..dace517f2b 100644--- a/plugin-variants/gbrain-daily/skills/query/SKILL.md+++ b/plugin-variants/gbrain-daily/skills/query/SKILL.md@@ -40,10 +40,6 @@ Answer questions using the brain's knowledge with 3-layer search and synthesis.> provenance, evidence, and a server-enforced token budget:> - **`recall(query | entity, budget_tokens)`** — the budget-packed memory read.> Use it instead of bare `search` for "what do we know that we SAVED about X".-> For a question a saved fact answers, pass the question as `question`-> (`recall({question: "...", query: "..."})`): facts come back ranked by-> relevance (`facts_order: "relevance"`) instead of newest first, and a-> `facts_degraded` field means they were ranked by term share only.> - **`entity(name)`** — a zero-LLM person/company/project card (aliases,> last-touched, open threads, top edges). Use it instead of `get_page` +> `get_backlinks` when you just need the card.diff --git a/plugin/skills/brain-ops/SKILL.md b/plugin/skills/brain-ops/SKILL.mdindex 67985d543a..9b27f86659 100644--- a/plugin/skills/brain-ops/SKILL.md+++ b/plugin/skills/brain-ops/SKILL.md@@ -42,8 +42,8 @@ suppresses writes for that turn, including when standing capture is enabled.> **Memory verbs (MEMORY_VERBS v1, gbrain ≥ 0.43).** Over MCP, prefer the five> core memory verbs for the read/write cycle: **`remember(fact, provenance,> ttl?)`** to save a single durable fact (mandatory provenance; dedupes +-> supersedes), **`recall(question | query | entity, budget_tokens)`** to read it-> back budget-packed (`question` ranks facts by relevance to a question), **`entity(name)`** for a zero-LLM card, **`synthesize(question)`**+> supersedes), **`recall(query | entity, budget_tokens)`** to read it back+> budget-packed, **`entity(name)`** for a zero-LLM card, **`synthesize(question)`**> for the expensive cross-page answer, **`forget(id)`** to withdraw active memory> (history, source material, and backups may remain). `context_pack` and `delta`> complete the seven-verb surface. Use@@ -52,21 +52,6 @@ suppresses writes for that turn, including when standing capture is enabled.> Fall back to the classic ops when the verbs aren't on the surface. Contract:> `docs/protocol/MEMORY_VERBS_v1.md`.>-> **Question-shaped memory lookups:** when the user asks something a saved-> fact answers ("where did I say we'd meet?", "what did Alice decide about the-> launch?"), pass the question itself as `question`:-> `recall({question: "What did Alice decide about the launch?", query: "Alice launch decision"})`.-> Facts come back ranked by relevance to it (`facts_order: "relevance"`) instead-> of newest first, and `query` also searches pages; drop `query` for facts only.-> CLI: `gbrain recall --question 'What did Alice decide about the launch?' --json`.-> `entity`, `session_id` and `since` still filter before ranking (`since` takes an-> ISO date such as `2026-09-01`). `question` ranks active facts only, so it is-> refused with `include_expired`. If the response-> carries `facts_degraded`, facts were ranked by term share only (its `reason`-> says why); say so rather than treating a thin answer as missing memory. Keep-> plain `recall(entity)` or `recall(query)` for "everything about X" and-> newest-first reads.->> **Tight-budget page questions:** explicitly use> `recall({query: "zebra telescope", budget_tokens: 75, budget_policy: "query_first"})`> so ranked page evidence packs before recent facts. CLI:diff --git a/plugin/skills/query/SKILL.md b/plugin/skills/query/SKILL.mdindex 254eacf463..dace517f2b 100644--- a/plugin/skills/query/SKILL.md+++ b/plugin/skills/query/SKILL.md@@ -40,10 +40,6 @@ Answer questions using the brain's knowledge with 3-layer search and synthesis.> provenance, evidence, and a server-enforced token budget:> - **`recall(query | entity, budget_tokens)`** — the budget-packed memory read.> Use it instead of bare `search` for "what do we know that we SAVED about X".-> For a question a saved fact answers, pass the question as `question`-> (`recall({question: "...", query: "..."})`): facts come back ranked by-> relevance (`facts_order: "relevance"`) instead of newest first, and a-> `facts_degraded` field means they were ranked by term share only.> - **`entity(name)`** — a zero-LLM person/company/project card (aliases,> last-touched, open threads, top edges). Use it instead of `get_page` +> `get_backlinks` when you just need the card.diff --git a/skills/brain-ops/SKILL.md b/skills/brain-ops/SKILL.mdindex 2758793611..d85259cf21 100644--- a/skills/brain-ops/SKILL.md+++ b/skills/brain-ops/SKILL.md@@ -41,8 +41,8 @@ suppresses writes for that turn, including when standing capture is enabled.> **Memory verbs (MEMORY_VERBS v1, gbrain ≥ 0.43).** Over MCP, prefer the five> core memory verbs for the read/write cycle: **`remember(fact, provenance,> ttl?)`** to save a single durable fact (mandatory provenance; dedupes +-> supersedes), **`recall(question | query | entity, budget_tokens)`** to read it-> back budget-packed (`question` ranks facts by relevance to a question), **`entity(name)`** for a zero-LLM card, **`synthesize(question)`**+> supersedes), **`recall(query | entity, budget_tokens)`** to read it back+> budget-packed, **`entity(name)`** for a zero-LLM card, **`synthesize(question)`**> for the expensive cross-page answer, **`forget(id)`** to withdraw active memory> (history, source material, and backups may remain). `context_pack` and `delta`> complete the seven-verb surface. Use@@ -51,21 +51,6 @@ suppresses writes for that turn, including when standing capture is enabled.> Fall back to the classic ops when the verbs aren't on the surface. Contract:> `docs/protocol/MEMORY_VERBS_v1.md`.>-> **Question-shaped memory lookups:** when the user asks something a saved-> fact answers ("where did I say we'd meet?", "what did Alice decide about the-> launch?"), pass the question itself as `question`:-> `recall({question: "What did Alice decide about the launch?", query: "Alice launch decision"})`.-> Facts come back ranked by relevance to it (`facts_order: "relevance"`) instead-> of newest first, and `query` also searches pages; drop `query` for facts only.-> CLI: `gbrain recall --question 'What did Alice decide about the launch?' --json`.-> `entity`, `session_id` and `since` still filter before ranking (`since` takes an-> ISO date such as `2026-09-01`). `question` ranks active facts only, so it is-> refused with `include_expired`. If the response-> carries `facts_degraded`, facts were ranked by term share only (its `reason`-> says why); say so rather than treating a thin answer as missing memory. Keep-> plain `recall(entity)` or `recall(query)` for "everything about X" and-> newest-first reads.->> **Tight-budget page questions:** explicitly use> `recall({query: "zebra telescope", budget_tokens: 75, budget_policy: "query_first"})`> so ranked page evidence packs before recent facts. CLI:diff --git a/skills/query/SKILL.md b/skills/query/SKILL.mdindex ef492b3a42..12e699626f 100644--- a/skills/query/SKILL.md+++ b/skills/query/SKILL.md@@ -39,10 +39,6 @@ Answer questions using the brain's knowledge with 3-layer search and synthesis.> provenance, evidence, and a server-enforced token budget:> - **`recall(query | entity, budget_tokens)`** — the budget-packed memory read.> Use it instead of bare `search` for "what do we know that we SAVED about X".-> For a question a saved fact answers, pass the question as `question`-> (`recall({question: "...", query: "..."})`): facts come back ranked by-> relevance (`facts_order: "relevance"`) instead of newest first, and a-> `facts_degraded` field means they were ranked by term share only.> - **`entity(name)`** — a zero-LLM person/company/project card (aliases,> last-touched, open threads, top edges). Use it instead of `get_page` +> `get_backlinks` when you just need the card.diff --git a/skills/skills.lock.json b/skills/skills.lock.jsonindex a9cf73e696..2c3e6961eb 100644--- a/skills/skills.lock.json+++ b/skills/skills.lock.json@@ -20,7 +20,7 @@"brain-ingest-gate/routing-eval.jsonl": "281e94affbb8631ef7ff44203884cce1c03c468b27f893829da1e6e439401a33","brain-link-discipline/SKILL.md": "db2a77319475dd8eb370e9a3bb0eafe81d3b19d2de126113b30df7454dd9a069","brain-link-discipline/routing-eval.jsonl": "0adea4c6d72fdb849c12fe2cad718568b9ab704299b00b093c40c2284faf684c",- "brain-ops/SKILL.md": "7fe72a12ffceba1ac16f2a2d3aa244f3f9246b37b10e7efac5cbee34dd411ca6",+ "brain-ops/SKILL.md": "10dc45cea79792457ea457c05e2cfe50654b7de497ff60fd6399a74765e56d45","brain-pdf/SKILL.md": "2dfffd2373f00b5f11c1e4b39a75be48e90870201b4c11979d520bd5975dcae4","brain-pdf/routing-eval.jsonl": "119e4fa113ea45783cee4499e63a729fdeecb4d9a45d47497754b4f5b21d0734","brain-taxonomist/SKILL.md": "418fd4cdac3355551c42a70fea4d76e3d9255fe04698358b2c1e89dc666bf11d",@@ -193,7 +193,7 @@"postgres-adopt/SKILL.md": "8cf801e2e0d29da525a8c4ba275b91e6caffc8aae8e648cbcc8bceaab865c890","postgres-adopt/routing-eval.jsonl": "db91c1fae408a45082979c402c11eff413277ace6cf746297cc86009dcaefe06","publish/SKILL.md": "271bd9ba87279429cd934509071dd032b859d59264038c38829c9af46f15c13b",- "query/SKILL.md": "6873695709c6ac2b4e3a6ca92bd08c6fe8a66e6c565717f2191789e25485de0c",+ "query/SKILL.md": "c0259deb9c7402218820c0e7e00b455b804aa93d93c872a31c8468b8397ff12c","query/routing-eval.jsonl": "74f5a91e52fabc54e0e9403fa17db87ee26bb7ebb8ae8005148c51142abc62fe","remote-mcp/SKILL.md": "753d4df2c6b8c837d00a9c0593028220bdceb1a83b08b29a1d9b973242b789c5","remote-mcp/routing-eval.jsonl": "7287693135c9fe2d6495d81d22746ddf41b116254db4b6e683dbdee251e08f8e",