* fix(integrations): parameterize resolver-row fence by recipe id The install fence was hardcoded gbrain:agent-voice:resolver-rows, so any second copy-into-host-repo recipe wrote a mislabeled block (and refresh/ uninstall keyed on recipe id would miss it). Derive it from manifest.recipe. * feat(context): Retrieval Reflex — teach the agent when/what to retrieve (#1981) Deterministic per-turn pointer layer in the context engine: a zero-LLM, precision-biased scan resolves salient entities (names, @handles) to existing brain pages and injects compact pointers (name → slug → safe synopsis). Detect + point, never auto-dump. Fail-open, capped, suppression on prior context only. Engine-aware resolver ladder (no second DB connection): host ctx.brainQuery → PGLite serve resolve IPC (unix socket) → Postgres cached direct → disabled. Synopsis runs through get_page's privacy strip. Plus the retrieval-reflex recipe + policy skill, the retrieval_reflex_health doctor check, config gate, and the init next-step hint. * chore: bump version and changelog (v0.42.38.0) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(architecture): KEY_FILES entries for Retrieval Reflex surface (#1981) Document the new src/core/context/ modules, the context-engine resolver ladder, the serve resolve IPC, the retrieval_reflex_health doctor check, and the recipe-id-keyed install fence. Current-state only. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2.5 KiB
id, name, version, description, category, install_kind, requires, secrets, health_checks, setup_time, cost_estimate
| id | name | version | description | category | install_kind | requires | secrets | health_checks | setup_time | cost_estimate | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| retrieval-reflex | Retrieval Reflex | 0.1.0 | Teaches the host agent WHEN to look something up and WHAT to pull. Ships a policy skill (trigger + retrieval spec) into the host resolver; pairs with the deterministic pointer layer in the context engine. | reflex | copy-into-host-repo |
|
2 min | $0 — zero-LLM deterministic layer + a prose policy skill |
Retrieval Reflex: teach the agent when and what to retrieve
gbrain is great at storing knowledge and at injecting deterministic context every turn. It does not, by itself, teach the host agent the policy of retrieval: when to look something up and what to pull. Without it, the agent can discuss a person who has a rich brain page for several messages without ever opening it — then answer generically about facts the brain already knew.
This reflex has two halves:
-
Deterministic pointer layer (automatic, on by default). The
gbrain-contextengine scans each turn's user message for salient, resolvable entities and injects a compact pointer (name → slug → one-line summary) so the agent knows the page exists. Zero-LLM, fail-open. Nothing to install — it's on unlessretrieval_reflexis disabled in~/.gbrain/config.jsonorGBRAIN_RETRIEVAL_REFLEX=false. -
Policy skill (this recipe installs it). A SKILL fragment in the host resolver that encodes the trigger policy and retrieval spec the agent follows when a pointer appears or an entity becomes the subject.
IMPORTANT: Instructions for the Agent
You are the installer. Run these steps on behalf of the user.
- Confirm the deterministic layer isn't disabled:
gbrain doctor --json | jq '.checks[] | select(.name=="retrieval_reflex_health")' - Install the policy skill into the host repo (the OpenClaw/agent repo that
holds
skills/RESOLVER.mdorAGENTS.md):gbrain integrations install retrieval-reflex --target <host-repo> - Verify: re-run
gbrain doctorand confirmretrieval_reflex_healthisok.
The deterministic layer needs no install. On a PGLite brain it resolves through
the running gbrain serve (or a host-provided capability); if neither is
available it stays disabled and this policy skill carries the behavior — the
doctor check reports which.