add_to_section

View as MarkdownOpen in Claude

Add content to an existing section. If the section does not exist, it is created automatically (auto-vivification).

Parameters

title
strRequired

Section title to add content to.

body
str | NoneDefaults to None

Text to append to the section body. Appended with a double newline separator.

bullet
str | NoneDefaults to None

Single bullet point to add.

bullets
list[str] | NoneDefaults to None

Multiple bullet points to add.

Returns

PomBuilder — Self for method chaining.

Example

from signalwire.core.pom_builder import PomBuilder
pom = PomBuilder()
# Start with a basic section
pom.add_section("Capabilities", body="You can help with the following:")
# Add bullets incrementally as skills are loaded
pom.add_to_section("Capabilities", bullet="Weather lookups")
pom.add_to_section("Capabilities", bullet="Calendar scheduling")
pom.add_to_section("Capabilities", bullets=[
"Order tracking",
"Account management"
])
# Auto-vivification: creates the section if it doesn't exist
pom.add_to_section("Notes", body="This section was created automatically.")
print(pom.render_markdown())