orchestrata_ultimate.agents.volks.persona
Reference › orchestrata_ultimate › agents › volks › persona
persona provides compose_persona, which prepends the shared team preamble (the volk team identity and a description of the communication fabric) to a volk's role-specific system prompt. BaseAgent._call_llm in base applies it to every system prompt before the call, and the architect, analyst and other volk modules import it as well. The function takes the role prompt and returns the combined string.
At a glance
| Source | src/orchestrata_ultimate/agents/volks/persona.py |
| Lines of code | 47 |
| Classes | 0 |
| Functions | 1 |
| Imports (internal) | orchestrata_ultimate.core.base.traces |
| Imported by | orchestrata_ultimate.agents.volks.architect.volk, orchestrata_ultimate.agents.volks.base, orchestrata_ultimate.agents.volks.codedirector.review, orchestrata_ultimate.agents.volks.qa.volk, orchestrata_ultimate.drivers.claude_code_driver |
| Tests that import it | tests/agents/test_volk_tools_and_personas.py, tests/agents/volks/pm/test_volk_extended.py, tests/agents/volks/qa/test_llm_review.py, tests/agents/volks/test_persona.py, tests/drivers/test_claude_code_driver.py, tests/generated_agents/test_volks_persona_generated.py |
Class diagram
No classes; see Functions.
Dependency diagram
API
Functions
| Function | Signature | Summary |
|---|---|---|
compose_persona traces |
compose_persona(role_prompt: str) -> str |
Prepend the shared team preamble to a volk's role-specific system prompt. |
Source
"""Shared volk identity + communication-fabric preamble.
Every volk carries a strong *role* persona (its own system prompt: Concierge,
Architect, QA, …). What none of them carried was the common framing that makes
them a coherent **team** — who they are within Orchestrata, that they hand work
to peer volks over CXP, and that the orchestrator observes their status at all
times. ``compose_persona`` prepends that shared preamble in front of a volk's
role prompt (done centrally in :class:`BaseAgent`) so the team contract stays DRY
and consistent instead of being re-implied ad hoc in ten separate prompt strings.
"""
from __future__ import annotations
from orchestrata_ultimate.core.base.traces import traces
VOLK_TEAM_PREAMBLE = (
"You are a Volk — a specialist agent in Orchestrata, a multi-agent software "
"delivery system. You work as one member of a team of volks (Concierge, "
"Analyst, PM, UX, Architect, CodeDirector, Junior, QA, Compliance): work "
"flows between you as CXP messages along the delivery pipeline, and the "
"orchestrator can observe your status at any time. When you need information "
"another volk owns — a clarified requirement, a design decision, a test "
"result — consult that peer directly with the message_volk tool (addressing "
"them by alias, e.g. U:BA) and use their reply; do not guess or invent it. "
"Stay strictly within the role defined below, be precise, and emit output in "
"exactly the format your role specifies so the next volk can consume it "
"without guesswork. "
"You MUST end every response with a '## Entities used' section that lists "
"every class, function, requirement, decision, and artifact you acted on "
"from the provided context. A response with no citations is invalid."
)
@traces(spec="000", story="US-000", reqs=["REQ-000-107"])
def compose_persona(role_prompt: str) -> str:
"""Prepend the shared team preamble to a volk's role-specific system prompt.
Idempotent-friendly: if the preamble is already present (e.g. a volk composed
it itself), the role prompt is returned unchanged; an empty role prompt yields
just the preamble.
"""
role_prompt = role_prompt or ""
if VOLK_TEAM_PREAMBLE in role_prompt:
return role_prompt
if not role_prompt.strip():
return VOLK_TEAM_PREAMBLE
return f"{VOLK_TEAM_PREAMBLE}\n\n{role_prompt}"