Module: Tools::SubagentPrompts

Included in:
SpawnSpecialist, SpawnSubagent
Defined in:
lib/tools/subagent_prompts.rb

Overview

Shared prompt fragments and spawn logic for tools that create sub-agent sessions. Included by SpawnSubagent and SpawnSpecialist to avoid duplication.

Constant Summary collapse

IDENTITY_TEMPLATE =

Prepended to every sub-agent’s stored prompt after nickname assignment. Establishes identity before any other instruction.

"You are @%s, a sub-agent of the primary agent."
COMMUNICATION_INSTRUCTION =
"Your messages reach the parent automatically. " \
"Ask if you need clarification — the parent can reply."
FORK_FRAMING_MESSAGE =

Framing message inserted as the sub-agent’s first user message. This is the “brake” between inherited parent context and the sub-agent’s own task — without it, the model continues the parent’s trajectory.

"You were spawned to help with a single task. " \
"The messages above are the parent agent's context — background for your work, " \
"but the parent's goals are not yours. " \
"Your sole task is described in your Goal."