Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs: retrieval feedback guide, RETRIEVAL stage, key-files entries, memory-verb additive fields
garrytanae68f63aaeeb
diff --git a/docs/architecture/RETRIEVAL.md b/docs/architecture/RETRIEVAL.mdindex b4529f36a6..7d84c1d4f8 100644--- a/docs/architecture/RETRIEVAL.md+++ b/docs/architecture/RETRIEVAL.md@@ -194,7 +194,8 @@ hybrid recall + fusion:├── vector (HNSW on chunk embeddings, per-page max-pool)├── keyword (BM25 via tsvector)├── title-phrase arm- ├── relational (typed-edge recall arm — relational queries only)+ ├── relational (typed-edge recall arm — relational queries only; triplet-scored+ │ when search.triplet_scoring is on — src/core/search/triplet-score.ts)├── source-aware re-rank (CASE in SQL)├── role-tagged arms; variant/clause lists weighted by search.expansion_variant_budget INSIDE the fusion (fusion-lists.ts)└── page-grain RRF fusion → cosine re-score → post-fusion boosts@@ -213,6 +214,10 @@ deduplication (4-layer: per-page cap, same-page Jaccard, type diversity)reranker (cross-encoder — balanced/tokenmax; fail-open)│▼+feedback (use-attributed page weights × the ordering score, bounded ±λ;+ no-op when no page was rated — src/core/search/feedback-boost.ts)+ │+ ▼relational re-pin (relational-arm rows back above the reranked text rows, infused order, ≤ search.relational_rerank_pin; only when the reranker actuallyreordered — src/core/search/relational-rerank-pin.ts)@@ -283,6 +288,23 @@ Two cross-cutting seams sit around the pipeline rather than inside it:a near-identical candidate set. `search.crag_think=true` (local callers)escalates a still-weak result to `think`.+### Use-attributed feedback and triplet scoring++Answers from `query`, `search`, `think`, `synthesize` and `recall` record the+pages they used (with the revision read) and the typed edges on their+relational paths. A rating (`rate_answer`, or a `think` citation for the brain+owner) moves each element's weight `w` by `w + α·(r − w)`; the feedback stage+then multiplies the ordering score by `1 + λ·2·(w − 0.5)`. It runs after the+reranker, on the reranker's score when it reordered the list, because a boost+applied before the cross-encoder would be erased; raw scores stay untouched,+so autocut and evidence grading are unchanged. Triplet scoring orders the+relational arm by how close each (page, edge, page) triplet is to the query,+over a wider candidate fetch, so a seed with many neighbors is no longer cut+alphabetically. Neither ever runs a query-language string: the relational arm+and `traverse_graph` take only typed parameters into fixed SQL, and+`test/raw-query-routing-guard.test.ts` pins that no op accepts query text as+SQL or graph syntax. Guide: [retrieval feedback](../guides/retrieval-feedback.md).+### Relational re-pin: edge answers bypass reranker demotionThe cross-encoder scores chunk TEXT against the query. The relational arm'sdiff --git a/docs/architecture/key-files/commands-1.md b/docs/architecture/key-files/commands-1.mdindex 93ea88929b..27b05e6ac6 100644--- a/docs/architecture/key-files/commands-1.md+++ b/docs/architecture/key-files/commands-1.md@@ -40,3 +40,6 @@ Current behavior and load-bearing invariants; history belongs in Git and CHANGEL- `src/commands/connect.ts` + `src/core/connect-probe.ts` — `gbrain connect <mcp-url> [--token <bearer>]` one-command coding-agent onboarding from a bearer token. Turns an MCP URL + token into a paste-ready `claude mcp add ... -H "Authorization: Bearer ..."` block (default) or, with `--install`, runs it directly and smoke-tests the token. Direct HTTP MCP — Claude Code talks straight to a remote `gbrain serve --http`, no local install needed. Token resolution: `--token` > `$GBRAIN_REMOTE_TOKEN` > placeholder (print) / error (install). The generated block tells the agent to call `get_brain_identity` + `list_skills` (the `LEARN_INSTRUCTION` export, which names `capture` — a starter-surface MCP op — alongside `put_page` for full-control writes) with a core-tools fallback for hosts without skill publishing. URL normalization appends `/mcp` to a bare host but REJECTS a scheme-less host; the pure registration helpers (`normalizeMcpUrl`, `isLinkLocalOrMetadata`, `buildClaudeMcpAddArgv` with its optional scope param — claude's default is `local`, so the harness lane passes `user` explicitly — `buildCodexMcpAddArgv`, `validateToken`, `redactToken`, `shellQuote`/`cmdString`, `issuerFromMcpUrl`, the `OAUTH_SECRET_NOTE` secret-hygiene constant, and `openclawThinClientBlock` — the honest openclaw wiring print: a scoped `gbrain init --mcp-only` thin-client block, deliberately NOT a stdio mcpServers config since that grants full local DB access) live in `src/core/mcp-registration.ts` (core must not import from commands; connect.ts re-exports them — `OAUTH_SECRET_NOTE` included — so its surface and tests are unchanged) and are unit-tested. Flags: `--token`, `--name <id>` (default `gbrain`, validated against `NAME_RE`), `--agent claude-code|codex|opencode|perplexity|generic`, `--install`, `--yes` (the user's approval for `--install`: `installConsent` asks through `requireConsent`, effects `credentials` + `persistent_install`, via the `isTTY`/`promptYesNo` seams; non-TTY without it exits 3 with the consent payload, whose argv omits the token value), `--force`, `--json` (token redacted unless `--show-token`), `--timeout-ms`. `connect` is in `CLI_ONLY` + `CLI_ONLY_SELF_HELP`; dispatched in `cli.ts:handleCliOnly` with no local DB connect. `AGENT_SPECS` drives per-agent rendering + `--install`: `claude-code` → `buildClaudeMcpAddArgv` (literal `-H "Authorization: Bearer <tok>"`); `codex` → `buildCodexMcpAddArgv` = `codex mcp add <name> --url <url> --bearer-token-env-var GBRAIN_REMOTE_TOKEN` (on the CONNECT lane Codex reads the token from the env var at runtime, never written to config — the harness lane in `src/core/bootstrap/harness.ts` is the deliberate exception, writing a managed block with the inline `http_headers = { Authorization = "Bearer <t>" }` credential (codex-cli >=0.149 rejects inline `bearer_token` for streamable_http at config load) because framework-spawned codex inherits no shell profile; `--install` runs it and prints an `export GBRAIN_REMOTE_TOKEN` hint when missing); `opencode` → `buildOpencodeMcpAddArgv` = `opencode mcp add <name> --url <url> --header "Authorization=Bearer {env:GBRAIN_REMOTE_TOKEN}"` (the interpolation is stored LITERALLY and resolved by opencode at read time — token never in argv/config/--json; `--install` writes the entry directly through `ConnectDeps.writeOpencodeRemoteEntry` → `opencode-json.ts` in env token mode, no binary required; `--force` maps to the writer's `allowReplaceOtherSource` so an OURS entry at an old url — a rotated serve — is replaceable, mirroring the exec lanes' `--force` semantics, while foreign same-name entries still refuse with url-appropriate copy: pick `--name`); `perplexity` + `generic` are `installable:false` and reject `--install`. `--oauth` (`supportsOAuth:true` = perplexity/generic only) emits an OAuth 2.1 client-credentials connector block (Issuer URL via `issuerFromMcpUrl` = mcp-url minus `/mcp`, Client ID, Client Secret) — least-privilege scopes + short-lived rotating tokens vs a long-lived full-access secret. Creds from `--client-id`/`--client-secret` (BYO) or `--register` (`deps.registerOAuthClient` shells `gbrain auth register-client <name> --grant-types client_credentials --scopes <DEFAULT_SCOPES="read write"> --token-endpoint-auth-method client_secret_post` and parses `Client ID:`/`Client Secret:`); `--oauth` rejected for claude-code/codex and incompatible with `--install`. `buildJson` is a generic shape (`agent`, `command`/`command_argv` null for perplexity/generic, `header`, `env_var`, oauth fields with redaction); the codex `command` carries only the env-var name, never the token. `cmdString(binary, argv)` POSIX-single-quotes args. `ConnectDeps` = `{isTTY, promptYesNo, hasBinary(bin), runBinary(bin, argv), probe, env(name), registerOAuthClient, writeOpencodeRemoteEntry}` — binary-generic so `claude` and `codex` share the exec path while opencode rides the writer member; `env` injectable for tests. Security: rendered command single-quotes the token so shell metacharacters can't run code when pasted; token validated before it lands in an HTTP header; link-local / cloud-metadata addresses (incl. IPv4-mapped IPv6 `::ffff:169.254.x.x` and AWS IMDSv2-over-IPv6 `fd00:ec2::254`) refused as a token-exfil guard while localhost/RFC1918/LAN stay allowed; token redacted from all error output. `src/core/connect-probe.ts` is the raw-bearer MCP smoke probe backing `--install`: connects the official MCP SDK `Client` over `StreamableHTTPClientTransport` with a STATIC `Authorization` header (no OAuth/discovery — distinct from `mcp-client.ts:callRemoteTool` which is OAuth-only and `remote-mcp-probe.ts:smokeTestMcp` which only sends `initialize`), runs the full `initialize` handshake via `client.connect()`, then calls `get_brain_identity` (read-scope, non-localOnly) to prove a tool call round-trips. Never throws — every failure maps to `{ ok: false, reason: 'auth' | 'unreachable' | 'timeout' | 'tool_error' | 'unknown', message }` so a wrong/expired token fails at setup, not on the agent's first request. `DEFAULT_PROBE_TIMEOUT_MS = 15_000` shared with `connect.ts`. `serve-http.ts` adds exported pure `skillPublishStatus(publishSkills)` for the startup banner `Skills: published / not published` line + a one-line `gbrain config set mcp.publish_skills true` stderr nudge when publishing is OFF. Docs: `docs/mcp/CODEX.md`, `docs/mcp/PERPLEXITY.md`, `docs/mcp/CLAUDE_CODE.md`, `docs/tutorials/connect-coding-agent.md`. Pinned by `test/connect.test.ts` (pure-helper + render, all five agents incl. the opencode writer-install lane) + `test/connect-bearer.test.ts` (raw-bearer probe + full OAuth chain register→connect→discovery→`/token` mint→`get_brain_identity`, client registered in `beforeAll` before serve takes the PGLite single-writer lock; drives real `claude` + `codex` binaries through `connect --install` with sandboxed `HOME`/`CODEX_HOME`, asserts registration + token never in Codex config, skips when a binary is absent) + `test/serve-stdio-roundtrip.test.ts` (spawns real `gbrain serve` stdio against a fresh `init --pglite` brain, drives the SDK client through `initialize`→`tools/list`→`tools/call`, asserts the advertised core-tool set including `capture`, a starter-surface MCP op) + `test/serve-skills-publish-nudge.test.ts`.- `src/commands/db-repair.ts` — `gbrain db-repair [--yes] [--apply-rewrites] [--json] [--force] [--undo-last-rewrite] [--dry-run]`: ENGINE-FREE Postgres-access repair, sibling of pglite-repair (PGLite brains are redirected there). Never calls connectEngine; default invocation is DIAGNOSE-ONLY (`--dry-run` is an explicit alias). Consent is tiered and flag-gated, never TTY-dependent: auto tier under `--yes` (bounded reconnects, pending migrations in-process, `CREATE EXTENSION vector`, `docker start` of gbrain's own container via `docker-postgres.ts`); rewrite tier under `--yes --apply-rewrites` only (config-file `database_url` rewrites — pooler form, session pooler, `?sslmode=require` — printed first, candidate connect-probed BEFORE persisting, receipted, undo-able); manual tier never applied (credentials/paused-project/env recipes printed — relaying the recipe IS the repair). `--apply-rewrites` without `--yes` is an error. Invariants: fix targets derive only from the CURRENT config URL, never error text; the prober uses exactly ONE connection (`poolSize: 1` — diagnosing pool exhaustion with a 10-connection pool would worsen the outage); rewrite cooldown is ≤24h per (reason, action) with `--force` bypass while auto-tier fixes are NEVER cooldown-blocked (availability first); every rewrite stores the prior URL in the 0600 `~/.gbrain/db-repair-undo.json` (a secret — never the redacted receipts) and `--undo-last-rewrite` (`--yes`-gated) restores it — undo runs INSIDE the advisory lock, emits the same `--json` envelope, validates the record's postgres:// scheme before restoring, and is itself reversible (the outgoing URL becomes the new undo record); an `O_EXCL`-created advisory lockfile blocks concurrent double-rewrites (check-then-write race closed; one stale-holder retry; other write failures stay fail-open); a healthy probe exits 0 "nothing to fix" (the forged-marker defense) and additionally REPORTS (never rewrites) stale DB-plane `engine`/`database_url` rows; the schema probe treats a ZERO-ROW `pg_extension` result as `pgvector_missing` (the query never errors on an absent extension); the docker arm matches the container's REAL inspected host port (`deps.docker.hostPort`) as well as the default 5434; a successful rewrite prints the "restart long-lived gbrain processes" note (config rewrites reach NEW processes only). Refusals: thin-client (no local DB), non-host brain resolution (a mount outage must never rewrite host config — mount-targeted repair is a filed TODO), PGLite (→ pglite-repair). Injectable `DbRepairDeps` prober/executor seam for tests; `defaultDeps.probeAccess` is also reused by the init ladder (one prober, one contract). Pinned by `test/db-repair.serial.test.ts`. D2 (`json: 'document'`): a healthy/fixed report is the pretty legacy document; an unfixed one (exit 1) is a one-line `database_error` envelope leading with the report keys (`reason` = diagnosis reason, fix = the tier's next step: `--yes` for auto, `--yes --apply-rewrites` with consent `credentials` for rewrite, none for manual); pre-probe refusals keep their stderr line and add an envelope (`unknown_flag`/`invalid_params` exit 2, `requires_local_engine`, `config_error`, `lock_busy`, `not_found`, `no_brain`). Healthy success shape: `test/e2e/cli-json-commands-postgres.test.ts`.++- `src/commands/feedback.ts` — `gbrain feedback status [--json]` (settings, answers recorded, ratings by signal, learned weights, triplet importance state, most and least trusted pages with a next step, a one-client-dominance warning, this process's dropped events and stage errors) and `gbrain feedback reset [--source ID] [--page SLUG]` (learned weights back to neutral). Table record `feedback` (post-connect, thin client refused). The doctor check `retrieval_feedback_health` (`src/commands/doctor/checks/retrieval-feedback.ts`, meta category) reports the same counts and warns when one client made over 80% of ratings in 7 days.+diff --git a/docs/architecture/key-files/core-search-2.md b/docs/architecture/key-files/core-search-2.mdindex 06cef30bb4..4bc9d8bcf8 100644--- a/docs/architecture/key-files/core-search-2.md+++ b/docs/architecture/key-files/core-search-2.md@@ -28,3 +28,8 @@ Current behavior and load-bearing invariants; history belongs in Git and CHANGEL- `src/core/search/vector-legacy-guard.ts` — one-release rollback for the #5824 statement change. `readVectorLegacyGuard(cfg, env)` reports the setting (`GBRAIN_VECTOR_LEGACY_GUARD` wins over `search.vector_legacy_guard`); `resolveVectorLegacyGuard(cfg)` latches it once per process for `hybrid/request.ts`, which passes `SearchOpts.vectorLegacyGuard` to the engines (they never read config), and prints `[gbrain] vector legacy guard active` to stderr once when on. A changed setting takes effect when the owning service restarts.- `src/core/search/internal-breadth.ts` — `INTERNAL_BREADTH_SEARCH_OPTS` (`autocut: false, adaptiveReturn: false`), the one option object internal callers spread into `hybridSearch` when they need the full ranked set rather than a reader-trimmed one (#5890): think gather (both legs), brainstorm close-set, grade-takes evidence, whoknows and enrich. Pinned by `test/internal-breadth-callers.serial.test.ts`; `eval-contradictions/runner.ts` still inherits both trims.++- `src/core/search/feedback-boost.ts` — the use-attributed feedback ranking stage. `applyFeedbackStage(engine, results, { reranked })` reads each result page's learned weight (`retrieval_weights`, half its learned deviation when the page changed since) and current `content_hash` in one query by page id, stamps `content_hash` (answer recording uses it) and, when `feedback.influence` λ > 0, multiplies the ordering score by `1 + λ·2·(w − 0.5)` (bounded `[1 − λ, 1 + λ]`, stamped `feedback_boost`). The ordering score is `rerank_score` when the reranker reordered the list (unscored tail rows stay after the head) and the fused `score` otherwise; raw `score`/`rerank_score` are never modified, so autocut and evidence read the same values. Neutral weights return the list untouched. Called once from `hybrid/rank.ts` `rerankAndPin` (between the reranker and the relational re-pin) and at the end of both keyword-only paths in `hybrid/keyword-only.ts`; paths that bypass `hybridSearch` get no feedback. Fail-open (errors counted, shown by `gbrain feedback status`). Pinned by `test/feedback-boost.test.ts` and `test/e2e/feedback-parity.test.ts`.++- `src/core/search/triplet-score.ts` — triplet scoring of the relational arm, enabled by `search.triplet_scoring` (penalty `search.triplet_penalty`, default 3.0). Each edge on a row's `relational_path_edges` is a (from page, edge, to page) triplet scored as the sum of page distances (`1 − cosine` of the query vector with the page's first chunk vector in the arm's embedding column, or `1 − content-term overlap` with the title without a vector) and an edge distance (`1 − overlap` with the humanized link type plus the link's context), each scaled by `2 − importance` (importance = feedback weight mapped into `0.5 ± λ`; neutral when feedback is off); missing parts cost the penalty. A row scores its worst triplet; lower is better, ties keep fanout order. `hybrid/arms.ts` `buildRelationalList` widens the fanout (`limit·4`, min 100, max 400 via `RelationalFanoutOpts.wide`) and `scoreRelationalArm` scores and trims back to the caller's limit on every hybrid path (null query vector on keyless paths). Rows carry `triplet: { worst, parts }` for `--explain`. `search/read-enrichment.ts` `readRelationalFanout` supplies `path_edges` (stored-direction `from|type|to` along each row's representative path, also used for feedback attribution) and the `wide` cap. Pure `scoreRow` exported. Pinned by `test/triplet-score.test.ts`.+diff --git a/docs/architecture/key-files/core-services-3.md b/docs/architecture/key-files/core-services-3.mdindex dc2a68ff38..df6dd53160 100644--- a/docs/architecture/key-files/core-services-3.md+++ b/docs/architecture/key-files/core-services-3.md@@ -14,3 +14,8 @@ Current behavior and load-bearing invariants; history belongs in Git and CHANGEL- `src/core/verbs/entity-card.ts` — `buildEntityCard(engine, sourceId, name, {remote})`: the zero-LLM sub-100ms card behind the `entity` verb. Resolution reuses the Retrieval Reflex precision arms (alias > exact slug > exact title > slug-suffix; exact-slug candidates include the RAW input because slugify flattens slashes in namespaced slugs). Within exact-title collisions, canonical entity types (`person`, `company`, `organization`, `entity`) outrank note/conversation containers, then GREATEST(updated_at, last_retrieved_at) breaks same-shape ties; a lone non-entity exact-title page remains a valid fallback. Per-arm degradation: a pre-page_aliases brain still resolves via arm 2 (aka returns empty, never throws). Card assembly is a parallel Promise.all of depth-1 indexed reads (page row, alias reverse lookup, getLinks+getBacklinks mentions-excluded cap 10, getBacklinkCounts, getTimeline(5), listFactsByEntity world-only-when-remote); deliberately NOT the recursive-CTE traversePaths — the card is a latency contract (CI gate: test/entity-card-perf.slow.test.ts, p99 < 100ms × GBRAIN_PERF_BUDGET_MULTIPLIER + 50× getPage-p50 ratio guard on a 20K corpus). `summary` runs through the exported `safeSynopsis` (the get_page fence boundary). Miss → keyword near-miss suggestions with create_safety hints.- `src/core/verbs/usage-log.ts` — observability sidecar: one JSONL line per verb call at `~/.gbrain/integrations/memory-verbs/usage.jsonl` (gbrainPath — GBRAIN_HOME honored; `brainId()` = the resolved gbrain home). LOCAL ONLY, never uploaded, stats-only (lock-free 10MB rotation may drop lines; O_APPEND line-atomic, best-effort on Windows). `logVerbUsage` is fire-and-forget (never awaited, never throws); written from the DISPATCH layer so param-validation failures count. `readVerbUsage`/`earliestVerbUsageTs` feed `gbrain protocol stats` (incl. measured TTHW vs the init-stamped `protocol_installed_at`) and the doctor `memory_verbs_usage` check.++- `src/core/feedback/` — use-attributed retrieval feedback (guide: `docs/guides/retrieval-feedback.md`). `settings.ts` resolves `feedback.*` with a 30s cache (`effectiveInfluence` is 0 when off). `record.ts`: `recordAnswer(ctx, { op, pages, links })` mints `ans_<ULID>`, returns it at once and enqueues the event (pages with the retrieved `content_hash`, relational path edges) on a bounded write-behind queue (cap 1,000, drop-oldest counted, drained by the background-work registry as `retrieval-feedback`); the citation signal (rating 4, half alpha) rides the same queue. Only callers that may change shared ranking record: `canTeachSource` allows the owner's CLI (`remote === false`) and auth-less stdio, and remote callers with write scope on that source, no slug fence, no operation allowlist excluding `rate_answer`, not delegated. `recordThinkAnswer` marks cited pages (synthesis `ok`, bare slug unambiguous across gathered sources). `feedbackMetaFields` adds `answer_id`/`feedback` only to rateable answers (callers that cannot rate see unchanged output). `rate.ts` `rateAnswer` implements `rate_answer`: whole-answer ratings (think/synthesize cited pages, else gathered; search-shaped returned pages; plus path edges into rated pages) or targeted `pages: [{ ref, rating }]` (pages only); skips `stale_revision`/`unverifiable_revision`/`not_authorized_source`; receipts carry weight before/after and the multiplier; refusals are registered codes. `store.ts` owns all SQL (TEXT[] binds, booleans bound as text): `insertRetrievalEvents`, `applyRatings` (one statement: idempotent feedback insert per element, then an upsert whose `DO UPDATE` recomputes from the locked row, so concurrent ratings never lose an update), `readWeights`, `pruneRetrievalFeedback` (purge phase), `resetRetrievalWeights`, `feedbackStatus`. Pinned by `test/feedback-store.test.ts` and `test/e2e/feedback-parity.test.ts`.++- `src/core/ops/feedback.ts` — the `rate_answer` op (scope `write`, CLI `gbrain rate <answer_id> <rating>`), delegating to `feedback/rate.ts`. Answers carry `answer_id` from `ops/search.ts` (`search`, `query` via `buildRetrievalResponseMeta`), `ops/takes.ts` (`think`), `verbs.ts` (`synthesize`) and `ops/facts.ts` (`recall` page arm on the hybrid path).+diff --git a/docs/protocol/MEMORY_VERBS_v1.md b/docs/protocol/MEMORY_VERBS_v1.mdindex 548221f732..a938febd12 100644--- a/docs/protocol/MEMORY_VERBS_v1.md+++ b/docs/protocol/MEMORY_VERBS_v1.md@@ -377,6 +377,15 @@ purpose, no dedicated status); a `max_tokens`-cut envelope parses as`output_truncated` (warning `LLM_OUTPUT_TRUNCATED`) so a too-small outputbudget is distinguishable from malformed model output.+#### Answer feedback fields (additive)++`recall` (when its `query` arm searched pages on the hybrid path) and+`synthesize` add `answer_id` (`ans_…`) and `feedback: { rateable: true, hint? }`+when the caller may change this brain's shared ranking and retrieval feedback is+on. Callers that cannot rate see no new fields. Pass the id to the `rate_answer`+operation to rate how useful the answer's evidence was; see+[retrieval feedback](../guides/retrieval-feedback.md).+### forget(id, reason?, request_id?) — writeExpire a fact by its opaque string id (from `remember` ordiff --git a/llms-full.txt b/llms-full.txtindex edf49a510b..834c326713 100644--- a/llms-full.txt+++ b/llms-full.txt@@ -8924,6 +8924,15 @@ purpose, no dedicated status); a `max_tokens`-cut envelope parses as`output_truncated` (warning `LLM_OUTPUT_TRUNCATED`) so a too-small outputbudget is distinguishable from malformed model output.+#### Answer feedback fields (additive)++`recall` (when its `query` arm searched pages on the hybrid path) and+`synthesize` add `answer_id` (`ans_…`) and `feedback: { rateable: true, hint? }`+when the caller may change this brain's shared ranking and retrieval feedback is+on. Callers that cannot rate see no new fields. Pass the id to the `rate_answer`+operation to rate how useful the answer's evidence was; see+[retrieval feedback](../guides/retrieval-feedback.md).+### forget(id, reason?, request_id?) — writeExpire a fact by its opaque string id (from `remember` ordiff --git a/llms.txt b/llms.txtindex 15a9d7e9c0..829afc0e14 100644--- a/llms.txt+++ b/llms.txt@@ -34,6 +34,7 @@ Repo: https://github.com/garrytan/gbrain- [docs/what-schemas-unlock.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/what-schemas-unlock.md): Why schemas matter: 7 killer use cases (4000 invisible meetings, founder ops brain, research brain, legal brain, team brain, agent-as-co-curator) + the structural argument for typed page kinds. Read this before pitching schema authoring (v0.40.7.0).- [docs/schema-author-tutorial.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/schema-author-tutorial.md): 5-minute walkthrough: fork the bundled pack, add a custom `researcher` type, backfill existing pages via `gbrain schema sync --apply`, prove the T1.5 wiring via `gbrain whoknows` (v0.40.7.0).- [docs/guides/system-one.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/guides/system-one.md): System One decision support (TypeSafe Jev or an llm: provider): every slot off or on, executed quickstart (`gbrain decide probe`, `probe --query`, `enable --recommended`, `status`), each slot in plain words, calibration and qualification, fail directions, egress rules, reading status/doctor, receipts, troubleshooting by refusal reason.+- [docs/guides/retrieval-feedback.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/guides/retrieval-feedback.md): Use-attributed retrieval feedback: answer ids, `rate_answer` / `gbrain rate` (whole answer or single pages), how ratings move page weights and ranking (bounded ±λ), citation learning, revision handling, who may teach the brain, `gbrain feedback status|reset`, config keys and every refusal code.- [docs/guides/live-sync.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/guides/live-sync.md): Incremental markdown sync setup.- [docs/guides/cron-schedule.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/guides/cron-schedule.md): Recurring job scheduling.- [docs/guides/minions-deployment.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/guides/minions-deployment.md): Deploying the gbrain jobs worker: crontab + watchdog, inline --follow, systemd/Procfile/fly.toml, upgrade checklist.diff --git a/scripts/llms-config.ts b/scripts/llms-config.tsindex bd4c9b4f40..0214108af9 100644--- a/scripts/llms-config.ts+++ b/scripts/llms-config.ts@@ -142,6 +142,13 @@ export const SECTIONS: DocSection[] = [path: "docs/guides/system-one.md",includeInFull: false,},+ {+ title: "docs/guides/retrieval-feedback.md",+ description:+ "Use-attributed retrieval feedback: answer ids, `rate_answer` / `gbrain rate` (whole answer or single pages), how ratings move page weights and ranking (bounded ±λ), citation learning, revision handling, who may teach the brain, `gbrain feedback status|reset`, config keys and every refusal code.",+ path: "docs/guides/retrieval-feedback.md",+ includeInFull: false,+ },{title: "docs/guides/live-sync.md",description: "Incremental markdown sync setup.",