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
Optional[str]

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

bullet
Optional[str]

Single bullet point to add.

bullets
Optional[list[str]]

Multiple bullet points to add.

Returns

PomBuilder — Self for method chaining.

Example

1from signalwire.core.pom_builder import PomBuilder
2
3pom = PomBuilder()
4
5# Start with a basic section
6pom.add_section("Capabilities", body="You can help with the following:")
7
8# Add bullets incrementally as skills are loaded
9pom.add_to_section("Capabilities", bullet="Weather lookups")
10pom.add_to_section("Capabilities", bullet="Calendar scheduling")
11pom.add_to_section("Capabilities", bullets=[
12 "Order tracking",
13 "Account management"
14])
15
16# Auto-vivification: creates the section if it doesn't exist
17pom.add_to_section("Notes", body="This section was created automatically.")
18
19print(pom.render_markdown())