render_markdown / render_xml

View as MarkdownOpen in Claude

render_markdown

Render the entire POM as a Markdown string. Sections become ## headings, subsections become ### headings, and bullets render as Markdown lists.

Parameters

None.

Returns

str — The rendered Markdown text.


render_xml

Render the entire POM as an XML string. Useful when the AI benefits from XML-structured prompts.

Parameters

None.

Returns

str — The rendered XML text.

Example

from signalwire.core.pom_builder import PomBuilder
pom = PomBuilder()
pom.add_section("Role", body="You are a helpful assistant.")
pom.add_section("Rules", bullets=["Be concise", "Be accurate"])
# Render as Markdown
md = pom.render_markdown()
print(md)
# ## Role
# You are a helpful assistant.
#
# ## Rules
# - Be concise
# - Be accurate
# Render as XML
xml = pom.render_xml()
print(xml)