Brain: inject identity into the live prompt + surface AGENTS.md in the command center
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:
co-authored by
Claude Opus 4.8
parent
11a1f22daa
commit
9fca3f6676
@@ -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 }[];
|
||||
|
||||
Reference in New Issue
Block a user