Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Merge remote-tracking branch 'origin/master' into capy/gbra188-brain-first-instructions

garrytan7ead892f0a17
diff --cc docs/mcp/OPENCLAW.md
index 4ecac72704,3680eab69d..a56549d0ae
--- a/docs/mcp/OPENCLAW.md
+++ b/docs/mcp/OPENCLAW.md
@@@ -71,23 -71,19 +71,36 @@@ Leave `GBRAIN_SOURCE` unset in the MCP
single-source retrieval: a pin scopes every tool (search, `get_brain_identity`
counts, …) to that one source, and nothing warns on reads.
+## Brain-first instructions
+
+Registering the server only makes the tools available. Agents seldom call a
+brain nobody told them about, so finish either option with:
+
+```bash
+gbrain setup openclaw # --dry-run previews; --workspace <dir> picks the agent
+```
+
+It writes one short marked block into the workspace `AGENTS.md` (from
+`OPENCLAW_CONFIG_PATH` or `~/.openclaw/openclaw.json`: a sole agent's
+workspace, else `agents.defaults.workspace`, else `~/.openclaw/workspace`; with
+several agents, pass `--workspace`). Text outside the markers is never touched,
+a re-run upgrades the block in place, `--no-instructions` opts out and is
+remembered, and `--remove` takes it out. A thin-client install puts the same
+block at the top of `GBRAIN-INSTRUCTIONS.md`.
+
+ ## Scheduled jobs and workspace scripts
+
+ OpenClaw cron jobs, workspace scripts and hooks run with another `HOME` and
+ environment than the gateway's MCP server. Route every one of them through a
+ single wrapper that sets `GBRAIN_HOME`, loads the brain's env file and runs the
+ installed `gbrain` by absolute path; log its stderr and check its exit code
+ ([the wrapper and its rules](../guides/cron-schedule.md#calling-gbrain-unattended)).
+ On a managed brain, scripts commit the files they write with
+ `gbrain git commit-push -- <paths>` (never plain `git commit`); a scheduled
+ `gbrain sources refresh <id>`
+ keeps it current
+ ([scripts and the managed checkout](../guides/shared-checkout-git.md#scripts-and-the-managed-checkout)).
+
## Verify
`openclaw mcp list` should show `gbrain`. Then start an agent turn and ask it
diff --cc skills/skills.lock.json
index 5c8f83acc7,237b9054c5..ebbb4a7aba
--- a/skills/skills.lock.json
+++ b/skills/skills.lock.json
@@@ -44,8 -44,8 +44,8 @@@
"concept-synthesis/routing-eval.jsonl": "96dbd7d9c1b606e9e06262d0c06282399741e2bccb8eeb7b9ca88c20f44cda0e",
"context-audit/SKILL.md": "6d786629d40544ddaab4f4e6e333569d270bcb8b581589dc16fb9f8bcb4f6207",
"context-audit/routing-eval.jsonl": "fb1832e24cc1b04163a74c5cde72bca53050a66246ca902e1a5f40303f52b5ab",
- "conventions/agent-operator-protocol.md": "b42b19223aa9dffbe783ce7c5c681d762377c740f3c609cbc555b9a60a035235",
+ "conventions/agent-operator-protocol.md": "4de9f74862e5e5cdec4cd0e18663fc7b437f906d4d7fcb28a1326b24a10d58c4",
- "conventions/brain-first.md": "b98dc24e086a35f136f74ca4abd856949d8b282e1298a47a250b2d18f69e0927",
+ "conventions/brain-first.md": "e0e4d7c4b760213325dffd286baf934720816a0b6aac5338538a0463e8fe77d2",
"conventions/brain-routing.md": "392998d9a109b330c9225af4ca5c8798b0ff02eba4d441c93fdb7c263687d0c6",
"conventions/calibration.md": "500dc26bd7c8400f50dc4c16fd83f1a588f3e7e68c59050a21fd8a0f69e4d198",
"conventions/cron-via-minions.md": "badb1cd6cd825d6f1ac0b6b28cc47e5d80facc783a3e59a14146ae901ee0f933",
diff --cc src/core/behavior-change-notice.ts
index 51d7770a15,5b2dfac3e5..fc4a126612
--- a/src/core/behavior-change-notice.ts
+++ b/src/core/behavior-change-notice.ts
@@@ -1237,9 -1237,10 +1237,13 @@@ export const BEHAVIOR_CHANGES: Readonly
{ since: '0.60.433.0', text: 'Hermes transcript import keeps the answers a user gave in a `clarify` form (answered responses of a submitted form, or the answers a timed-out form had already locked) as user turns, each after its question as the assistant\'s turn. A Hermes session imported before re-renders on its next import scan when it holds such answers, which can run fact extraction for that page again (#7396).' },
{ since: '0.60.433.0', text: 'Fact subject inference links more facts and fewer wrong ones: a currency code next to an amount (`CHF 80`) and a record label opening a sentence (`Invoice ...`, `Work session ...`) no longer block a fact that names one person or company, and an entity introduced only as an example (`including X notes`, `for example, X`) is never chosen as the subject. A page named like the code or label still competes. A sentence that opens with `For example, X ...` no longer takes X as its subject (#7405).' },
{ since: '0.60.433.0', text: '`gbrain think` gives reasoning models from gpt-5 on 16,000 output tokens behind any provider or router prefix, as it already did for gpt-5 and the o-series on their own provider; gpt-6 ids get it too. Before, those got 4,000 and long answers came back truncated (`LLM_OUTPUT_TRUNCATED`). Providers bill the tokens used, not the cap (#7421).' },
+ { since: '0.60.435.0', text: 'A search for a full name with a short first name ("Matt Example") now finds the page titled "Matthew Example", and back (Bob and Robert, Liz and Elizabeth and the other common given-name groups): the title arm also matches the other forms of the given name, and the title boost counts them as a title match. When no title holds every word of a query of up to four words, the title arm\'s any-word retry now puts titles holding the rarest word first instead of tying them with titles that hold only a common word (#7471).' },
+ { since: '0.60.435.0', id: 'keyword_or_rarity', text: 'When no page holds every word of a keyword search of up to four words, the any-word retry of the keyword arm now ranks pages holding the rarest query words first, instead of ranking pages that repeat a common word above the few that hold a rare one. The strict all-words search and longer queries are unchanged.' },
+ // GBRA-156 (exact identity lookup, same release as the #7471 row). `since` is stamped at the merge slot.
+ { since: '0.60.435.0', id: 'whois_exact_identity', text: 'New read operation `whois` (CLI `gbrain whois <email or name>`, MCP tool `whois`): an exact identity lookup for agents triaging email or calendar. It returns the entity pages whose frontmatter `email`/`emails`, title or declared alias equals the query, ignoring case, accents and surrounding quotes, labels each match `email`, `title` or `alias`, sets `ambiguous` when more than one page matches, and returns an empty list, never a search fallback, when none does. Remote callers see only their granted sources and no private or quarantined page. Nothing existing changes.' },
+ // GBRA-188. since: 'TBD' is stamped at the merge slot.
+ { since: 'TBD', id: 'brain_first_instructions_gbra188', text: 'Harness installs now write a short marked brain-first block into the harness\'s own instruction file by default (Claude Code ~/.claude/CLAUDE.md, Codex AGENTS.md or a non-empty AGENTS.override.md, opencode AGENTS.md, the OpenClaw workspace AGENTS.md, an existing Hermes SOUL.md, a Cursor project rule): `gbrain setup <harness>`, `gbrain connect --install`, `gbrain bootstrap harness` and the thin-client GBRAIN-INSTRUCTIONS.md. Text outside the markers is never touched and a re-run upgrades the block in place. `--no-instructions` or GBRAIN_AGENT_INSTRUCTIONS=0 removes it and is remembered; `--remove` strips it; `gbrain setup <harness> --instructions-only` manages only the block. doctor `harness_wiring` warns when a registered harness\'s block is missing, stale or damaged.' },
+ { since: 'TBD', id: 'install_surface_starter_gbra188', text: 'New stdio registrations gbrain writes (`gbrain setup`, `gbrain bootstrap hooks`, the readiness and `gbrain init` registration lines) now pin `--surface starter`, the daily-driver tool list, instead of `--surface full` (Garry, 2026-10-24; gbrain-evals#191: reach and accuracy unchanged, 17-23% fewer input tokens). An existing registration keeps its surface and is never rewritten; the Codex and Claude Code plugins and a bare `gbrain serve` stay on full. `--surface full` is the opt-in for every operation, any parameter the starter list leaves out is still accepted, and `request_tools` returns full schemas or widens the session to a left-out tool. doctor `harness_wiring` notes a full registration as information only.' },
];
/** The newest disclosed change's release: the notice id moves only when a release adds rows. */