NAME
SignalWire::POM::PromptObjectModel - structured prompt document for LLMs
SYNOPSIS
use SignalWire::POM::PromptObjectModel;
my $pom = SignalWire::POM::PromptObjectModel->new;
my $sec = $pom->add_section(
title => 'Greeting',
body => 'You are a helpful assistant.',
);
$sec->add_subsection(
title => 'Tone',
body => 'Speak warmly.',
);
print $pom->render_markdown;
print $pom->render_xml;
my $json = $pom->to_json;
my $back = SignalWire::POM::PromptObjectModel->from_json($json);
DESCRIPTION
SignalWire::POM::PromptObjectModel is a Perl port of signalwire.pom.pom.PromptObjectModel from the Python SignalWire SDK. It owns an ordered list of SignalWire::POM::Section objects and provides JSON / YAML serialisation, Markdown / XML rendering, recursive title-based search, and POM-merging via add_pom_as_subsection.
The serialised form is byte-for-byte identical to the Python reference; prompts authored in either language can be loaded by the other.