Brain: inject identity into the live prompt + surface AGENTS.md in the command center
ci / gates (push) Failing after 11s
ci / rust (push) Has been skipped
ci / sandbox-k8s (push) Has been skipped
ci / frontend (push) Has been skipped
ci / e2e (push) Has been skipped

Gap 1 — the brain's identity sections were stored but UI-only. cm-runtime/brain.rs
`compose_system` now folds the brain's AGENTS.md ("## How I operate") + personality
into the live system prompt (after the Postgres-authoritative base, before skills +
memory; falls back to the brain's soul_md when the base is empty). Mirrors the
OpenClaw/ZeroClaw render order.

Mapping — expose `agent_md` on `GET /api/claws/{id}/brain` (ClawBrainResponse) and
render it as a collapsible "HOW I OPERATE · AGENTS.md" card in the command center's
BRAIN column (RawBrain gains agent_md; richBrain passes it through). So the section
that's now in the prompt is also visible in the UI.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Omar Sobh
2026-06-26 12:59:17 -07:00
co-authored by Claude Opus 4.8
parent 11a1f22daa
commit 9fca3f6676
5 changed files with 39 additions and 9 deletions
@@ -13,6 +13,7 @@ export const mono = "'JetBrains Mono', ui-monospace, monospace";
export type RawBrain = {
exists: boolean;
system_prompt: string | null;
agent_md: string | null;
personality: string | null;
skills: { name: string; body: string }[];
tools: { name: string; state: string }[];