Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(prompts): add sections module for prompt structure\n\nIntroduce a new sections module within the agent prompts to organize and define reusable prompt components, enabling clearer separation of concerns and easier maintenance of prompt templates.\n\nAuto-committed-on: macbook\n

Steven Enamakel1202283758bc
diff --git a/src/openhuman/agent/prompts/sections.rs b/src/openhuman/agent/prompts/sections.rs
index 1b660fe2bb..37ede8e3fa 100644
--- a/src/openhuman/agent/prompts/sections.rs
+++ b/src/openhuman/agent/prompts/sections.rs
@@ -224,13 +224,21 @@ impl PromptSection for IdentitySection {
// and talks to the user. It does NOT need the periodic-task config
// (HEARTBEAT.md) — subagents handle their own concerns.
let is_orchestrator = !ctx.visible_tool_names.is_empty();
- let all_files: &[&str] = &["SOUL.md", "IDENTITY.md", "HEARTBEAT.md"];
- // Orchestrator skips these from the prompt but we still sync them
- // to disk so they stay current.
+ // ROLE.md is the user-facing agent's own role brief (#5701) — the
+ // `# Master Agent` / `## Core Responsibilities` preamble that used to
+ // be compiled into `orchestrator/prompt.md`. It is synced for every
+ // agent so the file exists on disk to edit, but injected only for the
+ // orchestrator: a specialist sub-agent has its own role prompt and
+ // must not be told it is the Master Agent.
+ let all_files: &[&str] = &["SOUL.md", "IDENTITY.md", "ROLE.md", "HEARTBEAT.md"];
+ // Synced to disk regardless so builtin updates ship, but kept out of
+ // this agent's prompt.
let skip_in_prompt: &[&str] = if is_orchestrator {
+ // The orchestrator routes and synthesises; periodic-task config is
+ // a sub-agent concern.
&["HEARTBEAT.md"]
} else {
- &[]
+ &["ROLE.md"]
};
for file in all_files {
// Always sync to disk so builtin updates ship.