Expected output section generation for SubAgent prompts.
Generates the Expected Output section that shows the required return format based on the agent's signature. Also handles field description rendering for output fields.
Summary
Functions
Generate the expected output section from signature.
Functions
@spec generate(PtcRunner.SubAgent.Signature.signature() | nil, map() | nil) :: String.t()
Generate the expected output section from signature.
Shows the required return format based on the agent's signature, including field descriptions if available.
Parameters
context_signature- Parsed signature for return type informationfield_descriptions- Optional map of field name atoms to description strings
Returns
A string containing the expected output section, or empty string if no signature.
Examples
iex> sig = {:signature, [{"x", :int}], :int}
iex> output = PtcRunner.SubAgent.SystemPrompt.Output.generate(sig, nil)
iex> output =~ "Expected Output"
true
iex> output =~ ":int"
true